|
@@ -1,132 +1,88 @@
|
|
|
<template>
|
|
|
<div class="tenant">
|
|
|
- <byTable
|
|
|
- :hideTable="true"
|
|
|
- :hidePagination="true"
|
|
|
- :source="sourceList.data"
|
|
|
- :pagination="sourceList.pagination"
|
|
|
- :config="config"
|
|
|
- :statConfig="statConfig"
|
|
|
- :loading="loading"
|
|
|
- :selectConfig="selectConfig"
|
|
|
- highlight-current-row
|
|
|
- :onMoreSearch="true"
|
|
|
- @moreSearch="clickMoreSearch"
|
|
|
- :action-list="[]"
|
|
|
- @get-list="getList"
|
|
|
- >
|
|
|
+ <byTable :hideTable="true" :hidePagination="true" :source="sourceList.data" :pagination="sourceList.pagination" :config="config"
|
|
|
+ :statConfig="statConfig" :selectConfig="selectConfig" highlight-current-row :onMoreSearch="true" @moreSearch="clickMoreSearch"
|
|
|
+ :action-list="[]" @get-list="getList">
|
|
|
<!-- {
|
|
|
text: '默认汇率',
|
|
|
action: () => openModal(),
|
|
|
}, -->
|
|
|
</byTable>
|
|
|
- <div
|
|
|
- style="padding: 0 20px 20px 20px; background-color: white"
|
|
|
- v-if="rateStatus"
|
|
|
- >
|
|
|
- <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
|
|
|
- />
|
|
|
+ <div style="padding: 0 20px 20px 20px; background-color: white">
|
|
|
+ <el-table :data="sourceList.data" v-loading="loading">
|
|
|
+ <el-table-column label="合同编号" prop="salesContractCode" width="160" fixed />
|
|
|
+ <el-table-column label="客户名称" prop="customerName" min-width="200" fixed />
|
|
|
+ <el-table-column label="收入总计" prop="totalIncome" width="140" fixed />
|
|
|
+ <el-table-column label="支出总计" prop="totalExpenditure" width="140" fixed />
|
|
|
<el-table-column label="毛利率" width="140" fixed>
|
|
|
<template #default="{ row }">
|
|
|
- <div>{{ parseFloat(row.grossRate).toFixed(2) }}%</div>
|
|
|
+ <div>{{ parseFloat(row.grossProfitMargin).toFixed(2) }}%</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="毛利" prop="gross" width="140" fixed />
|
|
|
+ <el-table-column label="毛利" prop="grossProfit" width="140" fixed />
|
|
|
<el-table-column label="合同金额" width="140">
|
|
|
<template #default="{ row }">
|
|
|
- <div>{{ row.currency }} {{ row.amount }}</div>
|
|
|
+ <div> {{ row.contractAmount }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+
|
|
|
<el-table-column label="物料成本" width="140">
|
|
|
<template #default="{ row }">
|
|
|
- <div>{{ row.currency }} {{ row.amount }}</div>
|
|
|
+ <div> {{ row.materialFee }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="拖车费" width="140">
|
|
|
<template #default="{ row }">
|
|
|
- <div>{{ row.agencyFee }}</div>
|
|
|
+ <div>{{ row.trailerFee }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="验货红包" width="140">
|
|
|
<template #default="{ row }">
|
|
|
<div>
|
|
|
- {{ row.inspectionRedPack }}
|
|
|
+ {{ row.inspectionRedPackFee }}
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="佣金" width="140">
|
|
|
<template #default="{ row }">
|
|
|
- <div>{{ row.commission }}</div>
|
|
|
+ <div>{{ row.commissionFee }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="售后成本" width="140">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>
|
|
|
+ {{ row.afterSalesFee }}
|
|
|
+ </div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+
|
|
|
<el-table-column label="其他" width="140">
|
|
|
<template #default="{ row }">
|
|
|
- <div>{{ row.other }}</div>
|
|
|
+ <div>{{ row.otherFee }}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="操作" align="center" width="160" fixed="right">
|
|
|
<template #default="{ row }">
|
|
|
<div>
|
|
|
- <el-button type="primary" @click="changeBudget(row)" link
|
|
|
- >预算</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="changeBudget(row)" link>其他支出</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<el-row style="padding: 20px" justify="end" type="flex">
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :current-page="sourceList.pagination.pageNum"
|
|
|
- :page-size="sourceList.pagination.pageSize"
|
|
|
- :total="sourceList.pagination.total"
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handlePageChange"
|
|
|
- />
|
|
|
+ <el-pagination background layout="total, sizes, prev, pager, next, jumper" :current-page="sourceList.pagination.pageNum"
|
|
|
+ :page-size="sourceList.pagination.pageSize" :total="sourceList.pagination.total" @size-change="handleSizeChange"
|
|
|
+ @current-change="handlePageChange" />
|
|
|
</el-row>
|
|
|
</div>
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="默认汇率"
|
|
|
- v-if="dialogVisible"
|
|
|
- v-model="dialogVisible"
|
|
|
- width="600"
|
|
|
- >
|
|
|
- <byForm
|
|
|
- :formConfig="formConfig"
|
|
|
- :formOption="formOption"
|
|
|
- v-model="formData.data"
|
|
|
- :rules="rules"
|
|
|
- ref="submit"
|
|
|
- >
|
|
|
+ <el-dialog title="默认汇率" v-if="dialogVisible" v-model="dialogVisible" width="600">
|
|
|
+ <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
|
|
|
<template #currencyList>
|
|
|
- <el-table
|
|
|
- :data="formData.data.list"
|
|
|
- style="width: 100%"
|
|
|
- v-loading="loadingDialog"
|
|
|
- >
|
|
|
+ <el-table :data="formData.data.list" style="width: 100%" v-loading="loadingDialog">
|
|
|
<el-table-column label="币种">
|
|
|
<template #default="{ row }">
|
|
|
<div>{{ dictValueLabel(row.type, accountCurrency) }}</div>
|
|
@@ -134,20 +90,9 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="兑 CHY 汇率">
|
|
|
<template #default="{ row, $index }">
|
|
|
- <el-form-item
|
|
|
- :prop="'list.' + $index + '.rate'"
|
|
|
- :rules="rules.rate"
|
|
|
- :inline-message="true"
|
|
|
- >
|
|
|
- <el-input-number
|
|
|
- onmousewheel="return false;"
|
|
|
- v-model="row.rate"
|
|
|
- placeholder="请输入兑 CHY 汇率"
|
|
|
- style="width: 100%"
|
|
|
- :precision="6"
|
|
|
- :controls="false"
|
|
|
- :min="0"
|
|
|
- />
|
|
|
+ <el-form-item :prop="'list.' + $index + '.rate'" :rules="rules.rate" :inline-message="true">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.rate" placeholder="请输入兑 CHY 汇率" style="width: 100%" :precision="6"
|
|
|
+ :controls="false" :min="0" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -156,31 +101,14 @@
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
<el-button @click="dialogVisible = false" size="large">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitForm()" size="large"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="调整汇率"
|
|
|
- v-if="openChange"
|
|
|
- v-model="openChange"
|
|
|
- width="600"
|
|
|
- >
|
|
|
- <byForm
|
|
|
- :formConfig="formChangeConfig"
|
|
|
- :formOption="formOption"
|
|
|
- v-model="formChangeData.data"
|
|
|
- :rules="rules"
|
|
|
- ref="change"
|
|
|
- >
|
|
|
+ <el-dialog title="调整汇率" v-if="openChange" v-model="openChange" width="600">
|
|
|
+ <byForm :formConfig="formChangeConfig" :formOption="formOption" v-model="formChangeData.data" :rules="rules" ref="change">
|
|
|
<template #currencyList>
|
|
|
- <el-table
|
|
|
- :data="formChangeData.data.list"
|
|
|
- style="width: 100%"
|
|
|
- v-loading="loadingDialog"
|
|
|
- >
|
|
|
+ <el-table :data="formChangeData.data.list" style="width: 100%" v-loading="loadingDialog">
|
|
|
<el-table-column label="币种">
|
|
|
<template #default="{ row }">
|
|
|
<div>{{ dictValueLabel(row.type, accountCurrency) }}</div>
|
|
@@ -188,20 +116,9 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="兑 CHY 汇率">
|
|
|
<template #default="{ row, $index }">
|
|
|
- <el-form-item
|
|
|
- :prop="'list.' + $index + '.rate'"
|
|
|
- :rules="rules.rate"
|
|
|
- :inline-message="true"
|
|
|
- >
|
|
|
- <el-input-number
|
|
|
- onmousewheel="return false;"
|
|
|
- v-model="row.rate"
|
|
|
- placeholder="请输入兑 CHY 汇率"
|
|
|
- style="width: 100%"
|
|
|
- :precision="6"
|
|
|
- :controls="false"
|
|
|
- :min="0"
|
|
|
- />
|
|
|
+ <el-form-item :prop="'list.' + $index + '.rate'" :rules="rules.rate" :inline-message="true">
|
|
|
+ <el-input-number onmousewheel="return false;" v-model="row.rate" placeholder="请输入兑 CHY 汇率" style="width: 100%" :precision="6"
|
|
|
+ :controls="false" :min="0" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -210,150 +127,25 @@
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
<el-button @click="openChange = false" size="large">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitChangeForm()" size="large"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="submitChangeForm()" size="large">确 定</el-button>
|
|
|
</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>
|
|
|
+ <el-dialog title="其他支出" v-if="openBudget" v-model="openBudget" width="400">
|
|
|
+ <byForm :formConfig="formBudgetConfig" :formOption="formOption" :rules="formBudgetRules" v-model="formBudgetData.data" ref="budget">
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
<el-button @click="openBudget = false" size="large">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitBudgetForm()" size="large"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="submitBudgetForm()" size="large">确 定</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog
|
|
|
- :title="'高级检索'"
|
|
|
- v-model="moreSearchDialog"
|
|
|
- width="500px"
|
|
|
- destroy-on-close
|
|
|
- >
|
|
|
- <byForm
|
|
|
- :formConfig="formSearchConfig"
|
|
|
- :formOption="formOption"
|
|
|
- v-model="sourceList.pagination"
|
|
|
- >
|
|
|
+ <el-dialog :title="'高级检索'" v-model="moreSearchDialog" width="500px" destroy-on-close>
|
|
|
+ <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
|
|
|
- >
|
|
|
+ <el-button @click="moreSearchQuery" type="primary" size="large">搜索</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -376,9 +168,8 @@ const sourceList = ref({
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
keyword: "",
|
|
|
- userId: "",
|
|
|
- userName: "",
|
|
|
- contractCode: "",
|
|
|
+ isSettled: "",
|
|
|
+ salesContractCode: "",
|
|
|
customerName: "",
|
|
|
beginTime: "",
|
|
|
endTime: "",
|
|
@@ -405,63 +196,66 @@ const statConfig = computed(() => [
|
|
|
label: "统计",
|
|
|
data: [
|
|
|
//一个卡牌多数据配置
|
|
|
+
|
|
|
+ {
|
|
|
+ label: "收支统计(CNY)",
|
|
|
+ type: 1,
|
|
|
+ data: [
|
|
|
+ {
|
|
|
+ label: "总收入",
|
|
|
+ num: proxy.moneyFormat(headerData.value.totalIncome, 2),
|
|
|
+ color: "#0084ff",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "总支出",
|
|
|
+ num: proxy.moneyFormat(headerData.value.totalExpenditure, 2),
|
|
|
+ color: "#0084ff",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "总毛利",
|
|
|
+ num: proxy.moneyFormat(headerData.value.grossProfit, 2),
|
|
|
+ color: "#0084ff",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "毛利率",
|
|
|
+ num: headerData.value.grossProfitMargin + " %",
|
|
|
+ color: "#0084ff",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
{
|
|
|
label: "支出统计(CNY)",
|
|
|
type: 5,
|
|
|
data: [
|
|
|
{
|
|
|
label: "物料成本",
|
|
|
- num: proxy.moneyFormat(headerData.value.peritectoidSumAmount, 2),
|
|
|
+ num: proxy.moneyFormat(headerData.value.materialFee, 2),
|
|
|
color: "#FF6F67",
|
|
|
},
|
|
|
{
|
|
|
label: "拖车费",
|
|
|
- num: proxy.moneyFormat(headerData.value.trailerFeeSumAmount, 2),
|
|
|
+ num: proxy.moneyFormat(headerData.value.trailerFee, 2),
|
|
|
color: "#FF6F67",
|
|
|
},
|
|
|
{
|
|
|
label: "验货红包",
|
|
|
- num: proxy.moneyFormat(
|
|
|
- headerData.value.inspectionRedPackSumAmount,
|
|
|
- 2
|
|
|
- ),
|
|
|
+ num: proxy.moneyFormat(headerData.value.inspectionRedPackFee, 2),
|
|
|
color: "#FF6F67",
|
|
|
},
|
|
|
{
|
|
|
label: "佣金",
|
|
|
- num: proxy.moneyFormat(headerData.value.commissionSumAmount, 2),
|
|
|
+ num: proxy.moneyFormat(headerData.value.commissionFee, 2),
|
|
|
color: "#FF6F67",
|
|
|
},
|
|
|
{
|
|
|
- label: "其他",
|
|
|
- num: proxy.moneyFormat(headerData.value.otherSumAmount, 2),
|
|
|
+ label: "售后成本",
|
|
|
+ num: proxy.moneyFormat(headerData.value.afterSalesFee, 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",
|
|
|
+ label: "其他",
|
|
|
+ num: proxy.moneyFormat(headerData.value.otherFee, 2),
|
|
|
+ color: "#FF6F67",
|
|
|
},
|
|
|
],
|
|
|
},
|
|
@@ -508,7 +302,7 @@ const getList = async (req) => {
|
|
|
sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
loading.value = true;
|
|
|
proxy
|
|
|
- .post("/contract/getProfitBudgetPage", sourceList.value.pagination)
|
|
|
+ .post("/settlement/getProfitClearingPage", sourceList.value.pagination)
|
|
|
.then((res) => {
|
|
|
sourceList.value.data = res.rows;
|
|
|
sourceList.value.pagination.total = res.total;
|
|
@@ -517,7 +311,7 @@ const getList = async (req) => {
|
|
|
}, 200);
|
|
|
});
|
|
|
proxy
|
|
|
- .post("/contract/getProfitBudgetHeadStatistic", sourceList.value.pagination)
|
|
|
+ .post("/settlement/getProfitClearingHead", sourceList.value.pagination)
|
|
|
.then((res) => {
|
|
|
headerData.value = res;
|
|
|
});
|
|
@@ -551,7 +345,8 @@ const judgeRate = () => {
|
|
|
}
|
|
|
);
|
|
|
};
|
|
|
-getDict();
|
|
|
+getList();
|
|
|
+// getDict();
|
|
|
const handleSizeChange = (val) => {
|
|
|
sourceList.value.pagination.pageNum = 1;
|
|
|
sourceList.value.pagination.pageSize = val;
|
|
@@ -748,16 +543,19 @@ const budget = ref(null);
|
|
|
const formBudgetData = reactive({
|
|
|
data: {},
|
|
|
});
|
|
|
+const formBudgetRules = ref({
|
|
|
+ trailerFee: [{ required: true, message: "请输入拖车费", trigger: "blur" }],
|
|
|
+ inspectionRedPackFee: [
|
|
|
+ { required: true, message: "请输入验收红包", trigger: "blur" },
|
|
|
+ ],
|
|
|
+ commissionFee: [{ required: true, message: "请输入佣金", trigger: "blur" }],
|
|
|
+ otherFee: [{ required: true, message: "请输入其他费用", trigger: "blur" }],
|
|
|
+});
|
|
|
const formBudgetConfig = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
- type: "title",
|
|
|
- title: "合同信息",
|
|
|
- label: "",
|
|
|
- },
|
|
|
- {
|
|
|
type: "input",
|
|
|
- prop: "code",
|
|
|
+ prop: "salesContractCode",
|
|
|
label: "合同编号",
|
|
|
itemType: "text",
|
|
|
disabled: true,
|
|
@@ -770,59 +568,81 @@ const formBudgetConfig = computed(() => {
|
|
|
disabled: true,
|
|
|
},
|
|
|
{
|
|
|
- type: "input",
|
|
|
- prop: "userName",
|
|
|
- label: "业务员",
|
|
|
- itemType: "text",
|
|
|
- disabled: true,
|
|
|
+ type: "number",
|
|
|
+ disabled: false,
|
|
|
+ prop: "trailerFee",
|
|
|
+ label: "拖车费",
|
|
|
+ precision: 2,
|
|
|
+
|
|
|
+ controls: false,
|
|
|
+ itemWidth: 100,
|
|
|
+ style: {
|
|
|
+ width: "100%",
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
- type: "title",
|
|
|
- title: "预算金额",
|
|
|
- label: "",
|
|
|
+ type: "number",
|
|
|
+ disabled: false,
|
|
|
+ prop: "inspectionRedPackFee",
|
|
|
+ label: "验收红包",
|
|
|
+ precision: 2,
|
|
|
+
|
|
|
+ controls: false,
|
|
|
+ itemWidth: 100,
|
|
|
+ style: {
|
|
|
+ width: "100%",
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
- type: "slot",
|
|
|
- slotName: "budgetMoney",
|
|
|
- label: "",
|
|
|
+ type: "number",
|
|
|
+ disabled: false,
|
|
|
+ prop: "commissionFee",
|
|
|
+ label: "佣金",
|
|
|
+ precision: 2,
|
|
|
+
|
|
|
+ controls: false,
|
|
|
+ itemWidth: 100,
|
|
|
+ style: {
|
|
|
+ width: "100%",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "number",
|
|
|
+ disabled: false,
|
|
|
+ prop: "otherFee",
|
|
|
+ label: "其他费用",
|
|
|
+ precision: 2,
|
|
|
+
|
|
|
+ controls: false,
|
|
|
+ itemWidth: 100,
|
|
|
+ style: {
|
|
|
+ width: "100%",
|
|
|
+ },
|
|
|
},
|
|
|
];
|
|
|
});
|
|
|
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,
|
|
|
+ id: row.id,
|
|
|
+ salesContractCode: row.salesContractCode,
|
|
|
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,
|
|
|
+ inspectionRedPackFee: row.inspectionRedPackFee,
|
|
|
+ commissionFee: row.commissionFee,
|
|
|
+ otherFee: row.otherFee,
|
|
|
};
|
|
|
openBudget.value = true;
|
|
|
};
|
|
|
const submitBudgetForm = () => {
|
|
|
- proxy.post("/contractBudget/budget", formBudgetData.data).then(() => {
|
|
|
- ElMessage({
|
|
|
- message: "保存成功",
|
|
|
- type: "success",
|
|
|
+ budget.value.handleSubmit(() => {
|
|
|
+ proxy.post("/settlement/budget", formBudgetData.data).then(() => {
|
|
|
+ ElMessage({
|
|
|
+ message: "保存成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ openBudget.value = false;
|
|
|
+ getList();
|
|
|
});
|
|
|
- openBudget.value = false;
|
|
|
- getList();
|
|
|
});
|
|
|
};
|
|
|
|
|
@@ -831,7 +651,7 @@ const formSearchConfig = computed(() => {
|
|
|
{
|
|
|
type: "input",
|
|
|
label: "合同编号",
|
|
|
- prop: "contractCode",
|
|
|
+ prop: "salesContractCode",
|
|
|
itemWidth: 100,
|
|
|
},
|
|
|
{
|
|
@@ -874,9 +694,8 @@ const moreSearchReset = () => {
|
|
|
pageNum: sourceList.value.pagination.pageNum,
|
|
|
pageSize: sourceList.value.pagination.pageSize,
|
|
|
keyword: "",
|
|
|
- userId: "",
|
|
|
- userName: "",
|
|
|
- contractCode: "",
|
|
|
+ isSettled: "",
|
|
|
+ salesContractCode: "",
|
|
|
customerName: "",
|
|
|
beginTime: "",
|
|
|
endTime: "",
|