From 98425764fe0fbbdc57bb9fe71be483fc4b43cb39 Mon Sep 17 00:00:00 2001 From: lijingjia Date: Mon, 30 Sep 2024 10:04:22 +0800 Subject: [PATCH] =?UTF-8?q?9.30=E7=A6=85=E9=81=93bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CostEntry/feeTable.vue | 22 +++++-------- src/components/CostEntry/index.vue | 5 +-- .../operation/seaexport/detail/index.vue | 33 +++++++++---------- src/views/operation/seaexport/index.vue | 2 +- 4 files changed, 29 insertions(+), 33 deletions(-) diff --git a/src/components/CostEntry/feeTable.vue b/src/components/CostEntry/feeTable.vue index 9ef3fe73..bf70b48a 100644 --- a/src/components/CostEntry/feeTable.vue +++ b/src/components/CostEntry/feeTable.vue @@ -133,8 +133,7 @@ feeEnName: '', quantity: 1, exchangeRate: 1, - taxRate: 0.00, - accTaxRate: 0.00, + taxRate: 0, feeType: props.tbType == 'receive' ? 1 : 2, } // 表格绑定数据 @@ -222,19 +221,22 @@ data: 'customerName', type: 'dropdown', source: async (query, process) => { + if (query && query.indexOf('-') > -1) query = query.split('-')[1] // 获取当前选中行 const rowIndex = hotTb.value.hotInstance.getActiveEditor().row const code = list.value[rowIndex]?.customerType || null - GetClientListByCode({ code }).then((res) => { + GetClientListByCode({ code, queryKey: query }).then((res) => { const { data } = res data.forEach((item) => { item['label'] = item.shortName item['value'] = item.codeName }) companyDict.value = data + console.log(companyDict) const dict = data.map((item) => { return item.codeName + '-' + item.shortName }) + console.log(dict) process(dict) }) }, @@ -258,18 +260,13 @@ width: 60, data: 'taxRate', type: 'numeric', - numericFormat: { - pattern: '0,0.00' - } }, { title: '单价', width: 70, data: 'taxUnitPrice', type: 'numeric', - numericFormat: { - pattern: '0,0.00' - } + format: '0.00', }, { title: '数量', @@ -333,9 +330,6 @@ width: 100, data: 'accTaxRate', type: 'numeric', - numericFormat: { - pattern: '0,0.00' - } }, { title: '销项税额', @@ -561,11 +555,13 @@ // 修改费用英文名称 if (changes[0][1] === 'feeEnName') { } - // 修改费用对象 + // 修改结算对象 if (changes[0][1] === 'customerName') { + console.log(companyDict.value) const item = companyDict.value.filter((item) => { return changes[0][3].includes(item.label) }) + console.log(item) if (item) dict = item[0] console.log(dict) list.value[changes[0][0]]['customerId'] = dict?.id diff --git a/src/components/CostEntry/index.vue b/src/components/CostEntry/index.vue index 2fff302b..0a9af2d1 100644 --- a/src/components/CostEntry/index.vue +++ b/src/components/CostEntry/index.vue @@ -14,7 +14,7 @@ :height="height" :type="type" :broData="broPayData" - :id="data.id" + :id="details.id" :details="details" @broInsert="broReceive" > @@ -26,7 +26,7 @@ :height="height" :broData="broReceiveData" :type="type" - :id="data.id" + :id="details.id" :details="details" @broInsert="broPay" > @@ -69,6 +69,7 @@ watch( () => props.details, (val) => { + console.log(val) data.value = val }, { immediate: true, deep: true } diff --git a/src/views/operation/seaexport/detail/index.vue b/src/views/operation/seaexport/detail/index.vue index 2f6cd5ee..5bac8530 100644 --- a/src/views/operation/seaexport/detail/index.vue +++ b/src/views/operation/seaexport/detail/index.vue @@ -119,23 +119,22 @@ -
- + -
@@ -196,7 +195,7 @@ const cargoInfo = defineAsyncComponent(() => import("./modules/cargoInfo.vue")) const goodsTable = defineAsyncComponent(() => import("./modules/goodsTable.vue")) const ediMore = defineAsyncComponent(() => import("./modules/ediMore.vue")) - const rightContent = defineAsyncComponent(() => import("./modules/rightContent.vue")) + import rightContent from './modules/rightContent.vue' // 费用录入组件 import costEntry from '/@/components/CostEntry/index.vue' // 审批组件 diff --git a/src/views/operation/seaexport/index.vue b/src/views/operation/seaexport/index.vue index 0c17150c..8905807d 100644 --- a/src/views/operation/seaexport/index.vue +++ b/src/views/operation/seaexport/index.vue @@ -590,7 +590,7 @@ function compareSuccess(){ setLoading(false); reload() } -onActivated(() => { +onMounted(() => { //初始化 reload() // createdInit()