Commit 4bad0846 authored by 我在何方's avatar 我在何方

收款单优化

parent b62d56ea
......@@ -10,7 +10,7 @@
<el-descriptions-item :label="$t('客户')">{{ form.customerName }}</el-descriptions-item>
<el-descriptions-item :label="$t('部门')">{{ form.departmentName }}</el-descriptions-item>
<el-descriptions-item :label="$t('业务员')">{{ form.salesmanName }}</el-descriptions-item>
<el-descriptions-item :label="$t('手续费(RMB)')">{{ form.feeRate }}</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('手续费(RMB)')">{{ form.feeRate }}</el-descriptions-item> -->
<el-descriptions-item :label="$t('备注')">{{ form.remark }}</el-descriptions-item>
</el-descriptions>
</el-card>
......@@ -406,6 +406,7 @@
<script>
import { getBankAccountPage } from "@/api/ecw/bankAccount";
import { getToken } from "@/utils/auth";
import { listSimpleDepts } from "@/api/system/dept";
import { getCustomer } from '@/api/ecw/customer'
import {
getReceiptInfoByIds,
......@@ -442,6 +443,8 @@ export default {
},
addForm: {},
detailed: [],
deptData: [],
deptArr: [],
dialogTitle: this.$t('添加银行实收明细'),
saveBtnText: this.$t('添加'),
isView: false,
......@@ -523,6 +526,23 @@ export default {
async created() {
// 获取汇率
await getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
await listSimpleDepts().then((res) => {
res.data.forEach((item) => {
if (item.parentId == 0) {
this.deptArr.push(item);
} else {
this.deptData.push(item);
}
});
this.deptData.forEach((value) => {
var dept = this.deptArr.filter((itt) => itt.id == value.parentId);
if (dept.length > 0) {
value.name = dept[0].name + " | " + value.name;
}
});
// console.log(this.deptData)
});
await getBankAccountPage(this.params).then((res) => (this.bankData = res.data.list));
if (this.$route.query.id) {
this.id = this.$route.query.id;
......@@ -531,6 +551,11 @@ export default {
getCustomer(this.form.customerId).then(res => {
this.form.customerName = res?.data?.name
})
var dept = this.deptData.filter((itt) => itt.id == res.data.departmentId);
// console.log(dept)
if(dept.length>0){
this.form.departmentName = dept[0].name
}
})
await getInvoicingItem({ id: this.id }).then(res => {
this.list = [...res.data]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment