|
@@ -6,217 +6,90 @@
|
|
|
:source="sourceList.data"
|
|
|
:pagination="sourceList.pagination"
|
|
|
:config="config"
|
|
|
+ :statConfig="statConfig"
|
|
|
:loading="loading"
|
|
|
:selectConfig="selectConfig"
|
|
|
- :statConfig='statConfig'
|
|
|
highlight-current-row
|
|
|
- :action-list="[
|
|
|
-
|
|
|
- ]"
|
|
|
+ :onMoreSearch="true"
|
|
|
+ @moreSearch="clickMoreSearch"
|
|
|
+ :action-list="[]"
|
|
|
@get-list="getList"
|
|
|
>
|
|
|
- <template #amount="{ item }">
|
|
|
- <div></div>
|
|
|
- </template>
|
|
|
+ <!-- {
|
|
|
+ text: '默认汇率',
|
|
|
+ action: () => openModal(),
|
|
|
+ }, -->
|
|
|
</byTable>
|
|
|
<div
|
|
|
style="padding: 0 20px 20px 20px; background-color: white"
|
|
|
v-if="rateStatus"
|
|
|
>
|
|
|
- <el-table v-loading="loading" :data="sourceList.data">
|
|
|
- <el-table-column label="合同编号">
|
|
|
- <el-table-column label="" prop="contractCode" width="160">
|
|
|
- <template #default="{ row }">
|
|
|
- <div style="width: 100%">
|
|
|
- <a
|
|
|
- style="color: #409eff; cursor: pointer; word-break: break-all"
|
|
|
- @click="openDetails(row)"
|
|
|
- >{{ row.contractCode }}</a
|
|
|
- >
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="客户名称">
|
|
|
- <el-table-column label="" prop="customerName" min-width="200" />
|
|
|
+ <el-table :data="sourceList.data">
|
|
|
+ <el-table-column label="合同编号" prop="code" width="160" fixed />
|
|
|
+ <el-table-column
|
|
|
+ label="客户名称"
|
|
|
+ prop="customerName"
|
|
|
+ min-width="200"
|
|
|
+ fixed
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="收入总计"
|
|
|
+ prop="incomeAmount"
|
|
|
+ width="140"
|
|
|
+ fixed
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="支出总计"
|
|
|
+ prop="expenditureAmount"
|
|
|
+ width="140"
|
|
|
+ fixed
|
|
|
+ />
|
|
|
+ <el-table-column label="毛利率" width="140" fixed>
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>{{ parseFloat(row.grossRate).toFixed(2) }}%</div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="业务员">
|
|
|
- <el-table-column label="" prop="userName" width="120" />
|
|
|
+ <el-table-column label="毛利" prop="gross" width="140" fixed />
|
|
|
+ <el-table-column label="合同金额" width="140">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>{{ row.currency }} {{ row.amount }}</div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="销售合同金额">
|
|
|
- <el-table-column label="" width="120">
|
|
|
- <template #default="{ row }">
|
|
|
- <div>
|
|
|
- {{ row.currency }} {{ moneyFormat(row.contractAmount, 2) }}
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column label="物料成本" width="140">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>{{ row.currency }} {{ row.amount }}</div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="收入(CNY)">
|
|
|
- <el-table-column label="合同到账" width="120">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-popover placement="top" :width="580" trigger="click">
|
|
|
- <template #reference>
|
|
|
- <span class="table-btn">{{ moneyFormat(row.contractArrival, 2) }}</span>
|
|
|
- </template>
|
|
|
- <div style="max-height: 300px;overflow-y: auto;">
|
|
|
- <el-table :data="row.claimList">
|
|
|
- <el-table-column width="150" property="date" label="认领金额">
|
|
|
- <template #default="{ row }">
|
|
|
- <div>{{row.currency}} {{ moneyFormat(row.money, 2) }}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column width="60" property="rate" label="汇率" />
|
|
|
- <el-table-column width="160" property="userName" label="操作人" />
|
|
|
- <el-table-column width="190" property="createTime" label="操作时间" />
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
-
|
|
|
- </el-popover>
|
|
|
-
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="退税" width="120">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-popover placement="top" :width="580" trigger="click">
|
|
|
- <template #reference>
|
|
|
- <span class="table-btn">{{moneyFormat(row.taxReturnMoney, 2) }}</span>
|
|
|
- </template>
|
|
|
- <div style="max-height: 300px;overflow-y: auto;">
|
|
|
- <el-table :data="row.taxReturnList">
|
|
|
- <el-table-column width="150" property="date" label="交易金额">
|
|
|
- <template #default="{ row }">
|
|
|
- <div>{{row.currency}} {{ moneyFormat(row.amount, 2) }}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column width="60" property="rate" label="汇率" />
|
|
|
- <el-table-column width="160" property="userName" label="操作人" />
|
|
|
- <el-table-column width="190" property="createTime" label="操作时间" />
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- </el-popover>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="其他收入" width="120">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-popover placement="top" :width="580" trigger="click">
|
|
|
- <template #reference>
|
|
|
- <span class="table-btn">{{moneyFormat(row.otherIncome, 2) }}</span>
|
|
|
- </template>
|
|
|
-
|
|
|
- </el-popover>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="拖车费" width="140">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>{{ row.agencyFee }}</div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="采购合同金额">
|
|
|
- <el-table-column label="" width="120">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-popover placement="top" :width="580" trigger="click">
|
|
|
- <template #reference>
|
|
|
- <span class="table-btn">CNY {{ moneyFormat(row.purchaseAmount, 2) }}</span>
|
|
|
- </template>
|
|
|
- <div style="max-height: 300px;overflow-y: auto;">
|
|
|
- <el-table :data="row.purchaseList">
|
|
|
- <el-table-column width="140" property="date" label="交易金额">
|
|
|
- <template #default="{ row }">
|
|
|
- <div>{{row.currency}} {{ moneyFormat(row.amount, 2) }}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column width="120" property="rate" label="汇率" />
|
|
|
- <el-table-column min-width="130" property="purchaseName" label="业务员" />
|
|
|
- <el-table-column width="160" property="createTime" label="操作时间" />
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- </el-popover>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="验货红包" width="140">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>
|
|
|
+ {{ row.inspectionRedPack }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="支出(CNY)">
|
|
|
- <el-table-column label="支付货款" width="120">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-popover placement="top" :width="580" trigger="click">
|
|
|
- <template #reference>
|
|
|
- <span class="table-btn">{{ moneyFormat(row.payForGoods, 2) }}</span>
|
|
|
- </template>
|
|
|
- <div style="max-height: 300px;overflow-y: auto;">
|
|
|
- <el-table :data="row.payList">
|
|
|
- <el-table-column width="150" property="date" label="交易金额">
|
|
|
- <template #default="{ row }">
|
|
|
- <div>{{row.currency}} {{ moneyFormat(row.amount, 2) }}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column width="60" property="rate" label="汇率" />
|
|
|
- <el-table-column width="160" property="userName" label="操作人" />
|
|
|
- <el-table-column width="190" property="createTime" label="操作时间" />
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- </el-popover>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="其他支出" width="120">
|
|
|
- <template #default="{ row }">
|
|
|
- <el-popover placement="top" :width="580" trigger="click">
|
|
|
- <template #reference>
|
|
|
- <span class="table-btn">{{moneyFormat(row.otherExpenses, 2) }}</span>
|
|
|
- </template>
|
|
|
- <div style="max-height: 300px;overflow-y: auto;">
|
|
|
- <el-table :data="row.accountRequestFundsDetailList">
|
|
|
- <el-table-column width="150" property="date" label="交易金额">
|
|
|
- <template #default="{ row }">
|
|
|
- <div>{{row.currency}} {{ moneyFormat(row.amount, 2) }}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column width="60" property="rate" label="汇率" />
|
|
|
- <el-table-column width="160" property="userName" label="操作人" />
|
|
|
- <el-table-column width="190" property="createTime" label="操作时间" />
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
- </el-popover>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column label="佣金" width="140">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>{{ row.commission }}</div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="统计">
|
|
|
- <el-table-column label="收入合计" width="120">
|
|
|
- <template #default="{ row }">
|
|
|
- <div>{{ moneyFormat(row.totalIncome, 2) }}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="支出合计" width="120">
|
|
|
- <template #default="{ row }">
|
|
|
- <div>{{ moneyFormat(row.totalExpenses, 2) }}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="毛利" width="120">
|
|
|
- <template #default="{ row }">
|
|
|
- <div>{{ moneyFormat(row.grossProfit, 2) }}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="毛利率" prop="grossProfitMargin" width="120">
|
|
|
- <template #default="{ row }">
|
|
|
- <div style="width: 100%">{{ row.grossProfitMargin }}%</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column label="其他" width="140">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>{{ row.other }}</div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" align="center" width="170" fixed="right">
|
|
|
+
|
|
|
+ <el-table-column label="操作" align="center" width="160" fixed="right">
|
|
|
<template #default="{ row }">
|
|
|
<div>
|
|
|
- <el-button type="primary" @click="changeExchangeRate(row)" link
|
|
|
- >调整汇率</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="clickSettlement(row)"
|
|
|
- v-if="row.settlementStatus === 0"
|
|
|
- link
|
|
|
- >结算</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="clickCancelSettlement(row)"
|
|
|
- v-else
|
|
|
- link
|
|
|
- >取消结算</el-button
|
|
|
+ <el-button type="primary" @click="changeBudget(row)" link
|
|
|
+ >预算</el-button
|
|
|
>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -267,6 +140,7 @@
|
|
|
:inline-message="true"
|
|
|
>
|
|
|
<el-input-number
|
|
|
+ onmousewheel="return false;"
|
|
|
v-model="row.rate"
|
|
|
placeholder="请输入兑 CHY 汇率"
|
|
|
style="width: 100%"
|
|
@@ -320,10 +194,11 @@
|
|
|
:inline-message="true"
|
|
|
>
|
|
|
<el-input-number
|
|
|
+ onmousewheel="return false;"
|
|
|
v-model="row.rate"
|
|
|
placeholder="请输入兑 CHY 汇率"
|
|
|
style="width: 100%"
|
|
|
- :precision="4"
|
|
|
+ :precision="6"
|
|
|
:controls="false"
|
|
|
:min="0"
|
|
|
/>
|
|
@@ -340,13 +215,146 @@
|
|
|
>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="预算" v-if="openBudget" v-model="openBudget" width="400">
|
|
|
+ <byForm
|
|
|
+ :formConfig="formBudgetConfig"
|
|
|
+ :formOption="formOption"
|
|
|
+ v-model="formBudgetData.data"
|
|
|
+ ref="budget"
|
|
|
+ >
|
|
|
+ <template #budgetMoney>
|
|
|
+ <div style="width: 100%">
|
|
|
+ <el-form-item label="拖车费" prop="trailerFee">
|
|
|
+ <el-input
|
|
|
+ v-model="formBudgetData.data.trailerFee"
|
|
|
+ placeholder="请输入拖车费"
|
|
|
+ class="input-with-select"
|
|
|
+ >
|
|
|
+ <template #prepend>
|
|
|
+ <el-select
|
|
|
+ v-model="formBudgetData.data.trailerFeeCurrency"
|
|
|
+ placeholder="请选择货币"
|
|
|
+ style="width: 115px"
|
|
|
+ disabled
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in accountCurrency"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item
|
|
|
+ label="验货红包"
|
|
|
+ prop="inspectionRedPack"
|
|
|
+ style="margin-top: 20px"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="formBudgetData.data.inspectionRedPack"
|
|
|
+ placeholder="请输入验货红包"
|
|
|
+ class="input-with-select"
|
|
|
+ >
|
|
|
+ <template #prepend>
|
|
|
+ <el-select
|
|
|
+ v-model="formBudgetData.data.inspectionRedPackCurrency"
|
|
|
+ placeholder="请选择货币"
|
|
|
+ style="width: 115px"
|
|
|
+ disabled
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in accountCurrency"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ label="佣金"
|
|
|
+ prop="commission"
|
|
|
+ style="margin-top: 20px"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ v-model="formBudgetData.data.commission"
|
|
|
+ placeholder="请输入佣金"
|
|
|
+ class="input-with-select"
|
|
|
+ >
|
|
|
+ <template #prepend>
|
|
|
+ <el-select
|
|
|
+ v-model="formBudgetData.data.commissionCurrency"
|
|
|
+ placeholder="请选择货币"
|
|
|
+ style="width: 115px"
|
|
|
+ disabled
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in accountCurrency"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="其他" prop="other" style="margin-top: 20px">
|
|
|
+ <el-input
|
|
|
+ v-model="formBudgetData.data.other"
|
|
|
+ placeholder="请输入其他"
|
|
|
+ class="input-with-select"
|
|
|
+ >
|
|
|
+ <template #prepend>
|
|
|
+ <el-select
|
|
|
+ v-model="formBudgetData.data.otherCurrency"
|
|
|
+ placeholder="请选择货币"
|
|
|
+ style="width: 115px"
|
|
|
+ disabled
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in accountCurrency"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </byForm>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="openBudget = false" size="large">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitBudgetForm()" size="large"
|
|
|
+ >确 定</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
<el-dialog
|
|
|
- title="合同详情"
|
|
|
- v-if="openDetailsDialog"
|
|
|
- v-model="openDetailsDialog"
|
|
|
- width="1100"
|
|
|
+ :title="'高级检索'"
|
|
|
+ v-model="moreSearchDialog"
|
|
|
+ width="500px"
|
|
|
+ destroy-on-close
|
|
|
>
|
|
|
- <ContractDetails :contractId="currentContractId"></ContractDetails>
|
|
|
+ <byForm
|
|
|
+ :formConfig="formSearchConfig"
|
|
|
+ :formOption="formOption"
|
|
|
+ v-model="sourceList.pagination"
|
|
|
+ >
|
|
|
+ </byForm>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="moreSearchReset" size="large">重置</el-button>
|
|
|
+ <el-button @click="moreSearchQuery" type="primary" size="large"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -357,21 +365,10 @@ import byTable from "@/components/byTable/index";
|
|
|
import byForm from "@/components/byForm/index";
|
|
|
import useUserStore from "@/store/modules/user";
|
|
|
import { ElMessage } from "element-plus";
|
|
|
-import ContractDetails from "@/components/contractCom/contractDetails.vue";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const accountCurrency = ref([]);
|
|
|
const userList = ref([]);
|
|
|
-const settlementStatus = ref([
|
|
|
- {
|
|
|
- label: "未结算",
|
|
|
- value: "0",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "已结算",
|
|
|
- value: "1",
|
|
|
- },
|
|
|
-]);
|
|
|
const sourceList = ref({
|
|
|
data: [],
|
|
|
pagination: {
|
|
@@ -379,46 +376,98 @@ const sourceList = ref({
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
keyword: "",
|
|
|
- settlementStatus: "",
|
|
|
userId: "",
|
|
|
- isArrival: "1",
|
|
|
+ userName: "",
|
|
|
+ contractCode: "",
|
|
|
+ customerName: "",
|
|
|
+ beginTime: "",
|
|
|
+ endTime: "",
|
|
|
},
|
|
|
});
|
|
|
const loading = ref(false);
|
|
|
-
|
|
|
-let statConfig = ref([])
|
|
|
-
|
|
|
const selectConfig = computed(() => {
|
|
|
return [
|
|
|
- {
|
|
|
- label: "是否完结",
|
|
|
- prop: "settlementStatus",
|
|
|
- data: settlementStatus.value,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "业务员",
|
|
|
- prop: "userId",
|
|
|
- data: userList.value,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "是否到账",
|
|
|
- prop: "isArrival",
|
|
|
- data: [
|
|
|
- {
|
|
|
- label: "未到账",
|
|
|
- value: "0",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "已到账",
|
|
|
- value: "1",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // label: "业务员",
|
|
|
+ // prop: "userId",
|
|
|
+ // data: userList.value,
|
|
|
+ // },
|
|
|
];
|
|
|
});
|
|
|
const config = computed(() => {
|
|
|
return [];
|
|
|
});
|
|
|
+const headerData = ref({
|
|
|
+ grossProfitMargin: 0,
|
|
|
+});
|
|
|
+const statConfig = computed(() => [
|
|
|
+ {
|
|
|
+ label: "统计",
|
|
|
+ data: [
|
|
|
+ //一个卡牌多数据配置
|
|
|
+ {
|
|
|
+ label: "支出统计(CNY)",
|
|
|
+ type: 5,
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ label: "物料成本",
|
|
|
+ num: proxy.moneyFormat(headerData.value.peritectoidSumAmount, 2),
|
|
|
+ color: "#FF6F67",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "拖车费",
|
|
|
+ num: proxy.moneyFormat(headerData.value.trailerFeeSumAmount, 2),
|
|
|
+ color: "#FF6F67",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "验货红包",
|
|
|
+ num: proxy.moneyFormat(
|
|
|
+ headerData.value.inspectionRedPackSumAmount,
|
|
|
+ 2
|
|
|
+ ),
|
|
|
+ color: "#FF6F67",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "佣金",
|
|
|
+ num: proxy.moneyFormat(headerData.value.commissionSumAmount, 2),
|
|
|
+ color: "#FF6F67",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "其他",
|
|
|
+ num: proxy.moneyFormat(headerData.value.otherSumAmount, 2),
|
|
|
+ color: "#FF6F67",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "收支统计(CNY)",
|
|
|
+ type: 1,
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ label: "总收入",
|
|
|
+ num: proxy.moneyFormat(headerData.value.totalIncomeSumAmount, 2),
|
|
|
+ color: "#0084ff",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "总支出",
|
|
|
+ num: proxy.moneyFormat(headerData.value.totalExpensesSumAmount, 2),
|
|
|
+ color: "#0084ff",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "总毛利",
|
|
|
+ num: proxy.moneyFormat(headerData.value.grossProfitSum, 2),
|
|
|
+ color: "#0084ff",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "毛利率",
|
|
|
+ num: headerData.value.grossProfitMargin + " %",
|
|
|
+ color: "#0084ff",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+]);
|
|
|
const getDict = () => {
|
|
|
proxy
|
|
|
.post("/dictTenantData/page", {
|
|
@@ -458,9 +507,8 @@ const getDict = () => {
|
|
|
const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
loading.value = true;
|
|
|
- getTotal()
|
|
|
proxy
|
|
|
- .post("/saleStatement/getProfitSettlement", sourceList.value.pagination)
|
|
|
+ .post("/contract/getProfitBudgetPage", sourceList.value.pagination)
|
|
|
.then((res) => {
|
|
|
sourceList.value.data = res.rows;
|
|
|
sourceList.value.pagination.total = res.total;
|
|
@@ -468,109 +516,12 @@ const getList = async (req) => {
|
|
|
loading.value = false;
|
|
|
}, 200);
|
|
|
});
|
|
|
+ proxy
|
|
|
+ .post("/contract/getProfitBudgetHeadStatistic", sourceList.value.pagination)
|
|
|
+ .then((res) => {
|
|
|
+ headerData.value = res;
|
|
|
+ });
|
|
|
};
|
|
|
-//获取统计数据
|
|
|
-const getTotal = () => {
|
|
|
- proxy.post("/saleStatement/getProfitSettlementHead", sourceList.value.pagination).then(
|
|
|
- (res) => {
|
|
|
-
|
|
|
- statConfig.value = [{
|
|
|
- label: '统计',
|
|
|
- data:[
|
|
|
- //一个卡牌多数据配置
|
|
|
- {
|
|
|
- label:'订单统计(CNY)',
|
|
|
- type:2,
|
|
|
- data:[
|
|
|
- {
|
|
|
- label:'订单数',
|
|
|
- num:res.contractCount,
|
|
|
- color:'#9E64ED',
|
|
|
- },
|
|
|
- {
|
|
|
- label:'销售总金额',
|
|
|
- num:res.contractSumAmount,
|
|
|
- color:'#9E64ED',
|
|
|
- },
|
|
|
- {
|
|
|
- label:'采购总金额',
|
|
|
- num:res.purchaseSumAmount,
|
|
|
- color:'#9E64ED',
|
|
|
- },
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label:'收入统计(CNY)',
|
|
|
- type:3,
|
|
|
- data:[
|
|
|
- {
|
|
|
- label:'合同到账',
|
|
|
- num:res.contractArrivalSumAmount,
|
|
|
- color:'#FF9315',
|
|
|
- },
|
|
|
- {
|
|
|
- label:'退税',
|
|
|
- num:res.taxReturnMoneySumAmount,
|
|
|
- color:'#FF9315',
|
|
|
- },
|
|
|
- {
|
|
|
- label:'其他收入',
|
|
|
- num:res.otherIncomeSumAmount,
|
|
|
- color:'#FF9315',
|
|
|
- },
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label:'支出统计(CNY)',
|
|
|
- type:5,
|
|
|
- data:[
|
|
|
- {
|
|
|
- label:'支付货款',
|
|
|
- num:res.payForGoodsSumAmount,
|
|
|
- color:'#F94539',
|
|
|
- },
|
|
|
- {
|
|
|
- label:'其他支出',
|
|
|
- num:res.otherExpensesSumAmount,
|
|
|
- color:'#F94539',
|
|
|
- },
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label:'收支统计(CNY)',
|
|
|
- type:1,
|
|
|
- data:[
|
|
|
- {
|
|
|
- label:'总收入',
|
|
|
- num:res.totalIncomeSumAmount,
|
|
|
- color:'#0084FF',
|
|
|
- },
|
|
|
- {
|
|
|
- label:'总支出',
|
|
|
- num:res.totalExpensesSumAmount,
|
|
|
- color:'#0084FF',
|
|
|
- },
|
|
|
- {
|
|
|
- label:'总毛利',
|
|
|
- num:res.grossProfitSum,
|
|
|
- color:'#0084FF',
|
|
|
- },
|
|
|
- {
|
|
|
- label:'毛利率',
|
|
|
- num:res.GrossProfitMargin + '%',
|
|
|
- color:'#0084FF',
|
|
|
- },
|
|
|
- ]
|
|
|
- },
|
|
|
- ],
|
|
|
- }]
|
|
|
- },
|
|
|
- (err) => {
|
|
|
-
|
|
|
- }
|
|
|
- );
|
|
|
-}
|
|
|
-
|
|
|
const rateStatus = ref(false);
|
|
|
const judgeRate = () => {
|
|
|
proxy.post("/currencyRate/list", {}).then(
|
|
@@ -733,39 +684,42 @@ const changeExchangeRate = (row) => {
|
|
|
openChange.value = true;
|
|
|
if (row.currencyRateJson) {
|
|
|
let currencyRateJson = JSON.parse(row.currencyRateJson);
|
|
|
- //row.currencyList和currencyRateJson进行匹配
|
|
|
- for (let i = 0; i < row.currencyList.length; i++) {
|
|
|
- const element = row.currencyList[i];
|
|
|
- for (let j = 0; j < currencyRateJson.length; j++) {
|
|
|
- const jelement = currencyRateJson[j];
|
|
|
- if(element.id == jelement.id){
|
|
|
- element.rate = jelement.rate;
|
|
|
+ formChangeData.data.list = formChangeData.data.list.map((item) => {
|
|
|
+ for (let i = 0; i < currencyRateJson.length; i++) {
|
|
|
+ if (item.type === currencyRateJson[i].type) {
|
|
|
+ item.rate = currencyRateJson[i].rate;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- formChangeData.data.list = row.currencyList
|
|
|
- // formChangeData.data.list = formChangeData.data.list.map((item) => {
|
|
|
- // for (let i = 0; i < currencyRateJson.length; i++) {
|
|
|
- // if (item.type === currencyRateJson[i].type) {
|
|
|
- // item.rate = currencyRateJson[i].rate;
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // return {
|
|
|
- // ...item,
|
|
|
- // };
|
|
|
- // });
|
|
|
- console.log(row.currencyList)
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ };
|
|
|
+ });
|
|
|
loadingDialog.value = false;
|
|
|
} else {
|
|
|
- formChangeData.data = {
|
|
|
- id: row.contractId,
|
|
|
- list: row.currencyList,
|
|
|
- };
|
|
|
+ proxy.post("/currencyRate/list", {}).then(
|
|
|
+ (res) => {
|
|
|
+ if (res && res.length > 0 && formChangeData.data.list.length > 0) {
|
|
|
+ formChangeData.data.list = formChangeData.data.list.map((item) => {
|
|
|
+ for (let i = 0; i < res.length; i++) {
|
|
|
+ if (item.type === res[i].type) {
|
|
|
+ item.rate = res[i].rate;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ loadingDialog.value = false;
|
|
|
+ },
|
|
|
+ (err) => {
|
|
|
+ console.log(err);
|
|
|
+ loadingDialog.value = false;
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
- loadingDialog.value = false
|
|
|
};
|
|
|
const submitChangeForm = () => {
|
|
|
change.value.handleSubmit(() => {
|
|
@@ -773,10 +727,10 @@ const submitChangeForm = () => {
|
|
|
let data = {};
|
|
|
data.id = formChangeData.data.id;
|
|
|
data.currencyRateJson = JSON.stringify(formChangeData.data.list);
|
|
|
- proxy.post("/saleStatement/update", data).then(
|
|
|
+ proxy.post("/contract/edit", data).then(
|
|
|
() => {
|
|
|
ElMessage({
|
|
|
- message: "操作成功",
|
|
|
+ message: "保存成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
openChange.value = false;
|
|
@@ -789,47 +743,145 @@ const submitChangeForm = () => {
|
|
|
);
|
|
|
});
|
|
|
};
|
|
|
-const clickSettlement = (row) => {
|
|
|
- const data = {
|
|
|
- ...row,
|
|
|
- grossGrofit: row.grossProfit,
|
|
|
- grossRofitMargin: row.grossProfitMargin,
|
|
|
- contractCurrency: row.currency,
|
|
|
- purchaseCurrency: "CNY",
|
|
|
- taxReturnAmount: row.taxReturnMoney,
|
|
|
- settlementStatus: 1,
|
|
|
+const openBudget = ref(false);
|
|
|
+const budget = ref(null);
|
|
|
+const formBudgetData = reactive({
|
|
|
+ data: {},
|
|
|
+});
|
|
|
+const formBudgetConfig = computed(() => {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ type: "title",
|
|
|
+ title: "合同信息",
|
|
|
+ label: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "code",
|
|
|
+ label: "合同编号",
|
|
|
+ itemType: "text",
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "customerName",
|
|
|
+ label: "客户名称",
|
|
|
+ itemType: "text",
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "userName",
|
|
|
+ label: "业务员",
|
|
|
+ itemType: "text",
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "title",
|
|
|
+ title: "预算金额",
|
|
|
+ label: "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "slot",
|
|
|
+ slotName: "budgetMoney",
|
|
|
+ label: "",
|
|
|
+ },
|
|
|
+ ];
|
|
|
+});
|
|
|
+const changeBudget = (row) => {
|
|
|
+ let currency = "CNY";
|
|
|
+ if (accountCurrency.value && accountCurrency.value.length > 0) {
|
|
|
+ currency = accountCurrency.value[0].value;
|
|
|
+ }
|
|
|
+ formBudgetData.data = {
|
|
|
+ contractId: row.contractId,
|
|
|
+ code: row.code,
|
|
|
+ customerName: row.customerName,
|
|
|
+ userName: row.userName,
|
|
|
+ trailerFeeCurrency: currency,
|
|
|
+ trailerFee: row.trailerFee,
|
|
|
+ customsFeeCurrency: currency,
|
|
|
+ customsFee: row.customsFee,
|
|
|
+ agencyFeeCurrency: currency,
|
|
|
+ agencyFee: row.agencyFee,
|
|
|
+ portMixedFeeCurrency: currency,
|
|
|
+ portMixedFee: row.portMixedFee,
|
|
|
+ inspectionRedPackCurrency: currency,
|
|
|
+ inspectionRedPack: row.inspectionRedPack,
|
|
|
+ commissionCurrency: currency,
|
|
|
+ commission: row.commission,
|
|
|
+ otherCurrency: currency,
|
|
|
+ other: row.other,
|
|
|
};
|
|
|
- proxy.post("/saleStatement/settlement", data).then(() => {
|
|
|
+ openBudget.value = true;
|
|
|
+};
|
|
|
+const submitBudgetForm = () => {
|
|
|
+ proxy.post("/contractBudget/budget", formBudgetData.data).then(() => {
|
|
|
ElMessage({
|
|
|
- message: "操作成功",
|
|
|
+ message: "保存成功",
|
|
|
type: "success",
|
|
|
});
|
|
|
+ openBudget.value = false;
|
|
|
getList();
|
|
|
});
|
|
|
};
|
|
|
-const clickCancelSettlement = (row) => {
|
|
|
- proxy
|
|
|
- .post("/saleStatement/settlement", {
|
|
|
- ...row,
|
|
|
- grossGrofit: row.grossProfit,
|
|
|
- grossRofitMargin: row.grossProfitMargin,
|
|
|
- contractCurrency: row.currency,
|
|
|
- purchaseCurrency: "CNY",
|
|
|
- settlementStatus: 0,
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- ElMessage({
|
|
|
- message: "操作成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- getList();
|
|
|
- });
|
|
|
+
|
|
|
+const formSearchConfig = computed(() => {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ label: "合同编号",
|
|
|
+ prop: "contractCode",
|
|
|
+ itemWidth: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ label: "客户名称",
|
|
|
+ prop: "customerName",
|
|
|
+ itemWidth: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "date",
|
|
|
+ itemType: "datetime",
|
|
|
+ label: "合同时间",
|
|
|
+ prop: "beginTime",
|
|
|
+ placeholder: "合同开始时间",
|
|
|
+ itemWidth: 50,
|
|
|
+ clearable: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "date",
|
|
|
+ itemType: "datetime",
|
|
|
+ label: " ",
|
|
|
+ prop: "endTime",
|
|
|
+ placeholder: "合同结束时间",
|
|
|
+ itemWidth: 50,
|
|
|
+ clearable: true,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+});
|
|
|
+const moreSearchDialog = ref(false);
|
|
|
+const clickMoreSearch = () => {
|
|
|
+ moreSearchDialog.value = true;
|
|
|
};
|
|
|
-const openDetailsDialog = ref(false);
|
|
|
-const currentContractId = ref("");
|
|
|
-const openDetails = (row) => {
|
|
|
- currentContractId.value = row.contractId;
|
|
|
- openDetailsDialog.value = true;
|
|
|
+const moreSearchQuery = () => {
|
|
|
+ moreSearchDialog.value = false;
|
|
|
+ getList();
|
|
|
+};
|
|
|
+const moreSearchReset = () => {
|
|
|
+ sourceList.value.pagination = {
|
|
|
+ total: 0,
|
|
|
+ pageNum: sourceList.value.pagination.pageNum,
|
|
|
+ pageSize: sourceList.value.pagination.pageSize,
|
|
|
+ keyword: "",
|
|
|
+ userId: "",
|
|
|
+ userName: "",
|
|
|
+ contractCode: "",
|
|
|
+ customerName: "",
|
|
|
+ beginTime: "",
|
|
|
+ endTime: "",
|
|
|
+ };
|
|
|
+ moreSearchQuery();
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -840,8 +892,4 @@ const openDetails = (row) => {
|
|
|
::v-deep(.el-input-number .el-input__inner) {
|
|
|
text-align: left;
|
|
|
}
|
|
|
-.table-btn{
|
|
|
- cursor: pointer;
|
|
|
- color: #409EFF;
|
|
|
-}
|
|
|
</style>
|