From 09da0cbc1500f08e539a82295fa9114127cdab36 Mon Sep 17 00:00:00 2001 From: lijingjia Date: Mon, 30 Sep 2024 14:26:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=93=81=E5=90=8D=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CostEntry/components/historyDrawer.vue | 1 + src/components/CostEntry/feeTable.vue | 45 ++++++++++---- .../operation/seaexport/detail/index.vue | 6 +- .../seaexport/detail/modules/baseInfo.tsx | 60 +++++++++++++++++-- 4 files changed, 95 insertions(+), 17 deletions(-) diff --git a/src/components/CostEntry/components/historyDrawer.vue b/src/components/CostEntry/components/historyDrawer.vue index 3c15d380..e124e017 100644 --- a/src/components/CostEntry/components/historyDrawer.vue +++ b/src/components/CostEntry/components/historyDrawer.vue @@ -93,6 +93,7 @@ } else { data = feeTabel.value.feeData } + console.log(data) emits('submit', data) } const historyChange = (v) => { diff --git a/src/components/CostEntry/feeTable.vue b/src/components/CostEntry/feeTable.vue index bf70b48a..2a1b149e 100644 --- a/src/components/CostEntry/feeTable.vue +++ b/src/components/CostEntry/feeTable.vue @@ -260,13 +260,15 @@ width: 60, data: 'taxRate', type: 'numeric', + numericFormat: { + pattern: '0,0.00' + } }, { title: '单价', width: 70, data: 'taxUnitPrice', - type: 'numeric', - format: '0.00', + type: 'numeric' }, { title: '数量', @@ -287,14 +289,19 @@ width: 90, data: 'noTaxAmount', type: 'numeric', - format: '0.00', readOnly: true, + numericFormat: { + pattern: '0,0.00' + } }, { title: '金额', width: 90, data: 'amount', type: 'numeric', + numericFormat: { + pattern: '0,0.00' + } }, { title: '币别', @@ -330,6 +337,9 @@ width: 100, data: 'accTaxRate', type: 'numeric', + numericFormat: { + pattern: '0,0.00' + } }, { title: '销项税额', @@ -342,6 +352,9 @@ width: 100, data: 'accAmount', readOnly: true, + numericFormat: { + pattern: '0,0.00' + } }, { title: '是否公开', @@ -375,8 +388,8 @@ readOnly: true, }, { - title: '录入日期', - width: 100, + title: '录入时间', + width: 120, data: 'createTime', readOnly: true, }, @@ -385,12 +398,18 @@ width: 100, data: 'settlementAmount', readOnly: true, + numericFormat: { + pattern: '0,0.00' + } }, { title: '已开票金额', width: 100, data: 'invoiceAmount', readOnly: true, + numericFormat: { + pattern: '0,0.00' + } }, { title: '对账编号', @@ -405,8 +424,8 @@ readOnly: true, }, { - title: '修改日期', - width: 100, + title: '修改时间', + width: 120, data: 'updateTime', readOnly: true, }, @@ -415,12 +434,18 @@ width: 100, data: 'orderInvoiceAmount', readOnly: true, + numericFormat: { + pattern: '0,0.00' + } }, { title: '未开票金额', width: 100, data: 'invoiceAmountRest', readOnly: true, + numericFormat: { + pattern: '0,0.00' + } }, { title: '审核人', @@ -772,6 +797,7 @@ v.forEach((row) => { list.value.push(row) }) + save() } // 选择插入 const selectInsert = async (v) => { @@ -882,10 +908,9 @@ const { data } = res data.forEach((item, index) => { item['feeStatusText'] = feeStatusList[item.feeStatus] - if (item.createTime) item.createTime = item.createTime.split(' ')[0] + // if (item.createTime) item.createTime = item.createTime.split(' ')[0] if (item.auditDate) item.auditDate = item.auditDate.split(' ')[0] - if (item.updateTime) item.updateTime = item.updateTime.split(' ')[0] - if (item.updateTime == '1900-01-01') item.updateTime = '' + // if (item.updateTime) item.updateTime = item.updateTime.split(' ')[0] }) list.value = data // 设置原始数据,取消使用 diff --git a/src/views/operation/seaexport/detail/index.vue b/src/views/operation/seaexport/detail/index.vue index 5bac8530..4a7b8360 100644 --- a/src/views/operation/seaexport/detail/index.vue +++ b/src/views/operation/seaexport/detail/index.vue @@ -307,10 +307,12 @@ } // 获取表单设置数据 const getFormSet = (v) => { + return GetFormSetInfoByModule({ permissionId: permissionsInfo('/BookingDetail').permissionId, formNo: 10, taskStatus: route.query.status || v || 'NORMAL' }).then(res => { const { data } = res if (data && data.id) { const content = JSON.parse(data.content).columns + console.log(content) // 提单确认的时候,下列字段为必填项 const status = route.query.status if (status == 'WAIT_BILL_CONFIRM') { @@ -337,6 +339,7 @@ RefbasicInfo.value.updateSchema(content) RefmailingInfo.value.updateSchemaL(content) RefmailingInfo.value.updateSchemaR(content) + RefcargoInfo.value.updateSchema(content) // 搞清楚异步组件渲染后回调后替换这里 setTimeout(() => { if (RefcargoInfo.value) { @@ -875,7 +878,8 @@ cvisible.value = false } // 订舱审核 - const approveDc = (remark) => { + const approveDc = async (remark) => { + await save() const postData = { result: remark ? 2 : 1, ids: [id.value], diff --git a/src/views/operation/seaexport/detail/modules/baseInfo.tsx b/src/views/operation/seaexport/detail/modules/baseInfo.tsx index 1d147014..45ef90c1 100644 --- a/src/views/operation/seaexport/detail/modules/baseInfo.tsx +++ b/src/views/operation/seaexport/detail/modules/baseInfo.tsx @@ -1870,15 +1870,19 @@ export const cargoInfoFormSchema2: FormSchema[] = [ mode: 'SECRET_COMBOBOX_MODE_DO_NOT_USE', resultField: 'data', onChange: (v, obj) => { - if (v && obj) { - console.log(obj) - formModel.goodsName = obj.goodName - formModel.goodsId = obj.id + if (v && obj && obj.id) { + setTimeout(() => { + if (obj.goodName && obj.goodName.indexOf('(')) { + formModel.goodsName = obj.goodName.split('(')[0] + } else { + formModel.goodsName = obj.goodName + } + }, 100) if (obj.hsCode) { formModel.hsCode = obj.hsCode } } - if (!v && !obj) { + if (!v && !obj.id) { formModel.goodsId = null formModel.hsCode = null } @@ -1886,6 +1890,49 @@ export const cargoInfoFormSchema2: FormSchema[] = [ } }, }, + // { + // field: 'goodsName', + // label: '品名', + // component: 'ApiSelect', + // labelSlot: 'goodsName', + // required: false, + // dynamicDisabled: false, + // show: ({ values }) => { + // return !values.isPreOrder + // }, + // // defaultValue: '', + // colProps: { span: 12 }, + // componentProps: ({ formModel }) => { + // return { + // api: GetClientGoodsList, + // labelField: 'pinYinCode', + // valueField: 'pinYinCode', + // showName: 'goodName', + // immediate: false, + // mode: 'SECRET_COMBOBOX_MODE_DO_NOT_USE', + // resultField: 'data', + // onChange: (v, obj) => { + // if (v && obj) { + // setTimeout(() => { + // if (obj.goodName && obj.goodName.indexOf('(')) { + // formModel.goodsName = obj.goodName.split('(')[0] + // } else { + // formModel.goodsName = obj.goodName + // } + // }, 100) + // formModel.goodsId = obj.id + // if (obj.hsCode) { + // formModel.hsCode = obj.hsCode + // } + // } + // if (!v && !obj) { + // formModel.goodsId = null + // formModel.hsCode = null + // } + // } + // } + // }, + // }, { label: 'HS编码', field: 'hsCode', @@ -1995,7 +2042,8 @@ export const cargoInfoFormSchema3: FormSchema[] = [ }, colProps: { span: 5 }, show: ({ values }) => { - return values.cargoId == 'D' + const flag = !!(values.cargoId === 'D') + return flag }, }, {