From 6457ceb58e843f1e8a0210d68c527361d2536eeb Mon Sep 17 00:00:00 2001 From: lijingjia Date: Thu, 20 Jun 2024 20:06:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BB=98=E8=B4=B9=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/common/index.ts | 19 +- src/components/CostEntry/actionBar.vue | 2 +- src/components/CostEntry/feeTable.vue | 51 +-- src/components/CostEntry/index.vue | 8 +- src/store/modules/configOptions.ts | 7 + src/store/modules/options.ts | 2 + src/views/approve/fee/api.ts | 27 +- .../approve/fee/components/AlterNewValue.vue | 90 +++++ .../approve/fee/components/Statistic.vue | 334 ++++++++++++++++++ src/views/approve/fee/components/feeTable.vue | 78 ++-- src/views/approve/fee/index.vue | 3 +- src/views/operation/paidApply/api.ts | 37 ++ src/views/operation/paidApply/columns.tsx | 306 ++++++++++++++++ .../paidApply/components/tableActionBar.vue | 208 +++++++++++ src/views/operation/paidApply/index.vue | 111 ++++++ .../operation/seaexport/detail/index.vue | 2 +- src/views/operation/seaexport/index copy.vue | 4 +- src/views/operation/seaexport/index.vue | 4 +- 18 files changed, 1231 insertions(+), 62 deletions(-) create mode 100644 src/views/approve/fee/components/AlterNewValue.vue create mode 100644 src/views/approve/fee/components/Statistic.vue create mode 100644 src/views/operation/paidApply/api.ts create mode 100644 src/views/operation/paidApply/columns.tsx create mode 100644 src/views/operation/paidApply/components/tableActionBar.vue create mode 100644 src/views/operation/paidApply/index.vue diff --git a/src/api/common/index.ts b/src/api/common/index.ts index d11585e2..17eff369 100644 --- a/src/api/common/index.ts +++ b/src/api/common/index.ts @@ -79,6 +79,10 @@ enum Api { GetServiceSelectList = '/mainApi/ClientCommon/GetServiceSelectList', // 船名下拉数据 GetVesselSelectList = '/mainApi/ClientCommon/GetVesselSelectList', + // 根据往来单位取出关联的费用对象 + GetClientSelectInfoByCode = '/mainApi/ClientCommon/GetClientSelectInfoByCode', + // 根据箱型获取数量信息 + GetUnitSelectInfo = '/mainApi/ClientCommon/GetUnitSelectInfo', } // 船名下拉数据列表 @@ -406,7 +410,20 @@ export function changePassword(data: any) { data, }) } - +export function GetClientSelectInfoByCode(data: any) { + return request({ + url: Api.GetClientSelectInfoByCode, + method: 'post', + data, + }) +} +export function GetUnitSelectInfo(data: any) { + return request({ + url: Api.GetUnitSelectInfo, + method: 'post', + data, + }) +} // 往来单位下拉列表集合 export function GetMultiClientList() { return request({ diff --git a/src/components/CostEntry/actionBar.vue b/src/components/CostEntry/actionBar.vue index 32860051..75bf961b 100644 --- a/src/components/CostEntry/actionBar.vue +++ b/src/components/CostEntry/actionBar.vue @@ -123,7 +123,7 @@ - + { + list.value[changes[0][0]]['customerCode'] = res.data.clientId + list.value[changes[0][0]]['customerName'] = res.data.clientName + }) }) } // 修改单位 @@ -515,24 +521,27 @@ if (item) dict = item[0] list.value[changes[0][0]]['unit'] = dict?.value list.value[changes[0][0]]['unitText'] = changes[0][3].split('-')[1] + GetUnitSelectInfo({ code: dict?.value, businessId: props.id, businessType: props.type }).then(res => { + list.value[changes[0][0]]['quantity'] = res.data.quantity + }) // 业务数据有件数,修改单位,带出件数 - const text = list.value[changes[0][0]]['unitText'] - if (text == '单票') { - list.value[changes[0][0]]['quantity'] = 1 - } else if (text == '件数') { - list.value[changes[0][0]]['quantity'] = props.details.pkgs - } else if (text == '重量') { - list.value[changes[0][0]]['quantity'] = props.details.kgs - } else if (text == '尺码') { - list.value[changes[0][0]]['quantity'] = props.details.cbm - } else if (text == '计费吨') { - let r = props.details.kgs - const k = (props.details.pkgs || 0) / 1000 - if (k > r) { - r = k - } - list.value[changes[0][0]]['quantity'] = r - } + // const text = list.value[changes[0][0]]['unitText'] + // if (text == '单票') { + // list.value[changes[0][0]]['quantity'] = 1 + // } else if (text == '件数') { + // list.value[changes[0][0]]['quantity'] = props.details.pkgs + // } else if (text == '重量') { + // list.value[changes[0][0]]['quantity'] = props.details.kgs + // } else if (text == '尺码') { + // list.value[changes[0][0]]['quantity'] = props.details.cbm + // } else if (text == '计费吨') { + // let r = props.details.kgs + // const k = (props.details.pkgs || 0) / 1000 + // if (k > r) { + // r = k + // } + // list.value[changes[0][0]]['quantity'] = r + } // 修改币别 if (changes[0][1] === 'currencyName') { diff --git a/src/components/CostEntry/index.vue b/src/components/CostEntry/index.vue index a8922183..6d81e23b 100644 --- a/src/components/CostEntry/index.vue +++ b/src/components/CostEntry/index.vue @@ -8,9 +8,9 @@ - + - + @@ -23,7 +23,9 @@ // 表格统计组件 import FeeStatistic from './feeStatistic.vue' const props = defineProps({ - details: { type: [Object, Array] } + details: { type: [Object, Array] }, + // 业务类型 + type: { type: [String, Number] } }) const data = ref(null) // data.value = props.details diff --git a/src/store/modules/configOptions.ts b/src/store/modules/configOptions.ts index c6634562..ba2f290b 100644 --- a/src/store/modules/configOptions.ts +++ b/src/store/modules/configOptions.ts @@ -19,6 +19,7 @@ import { GetServiceSelectList, GetPackageSelectList, } from '/@/views/operation/seaexport/api/BookingLedger' +import { getList } from '/@/views/flowcenter/flowInstances/api' import { GetFeeCurrencySelectList } from '/@/api/common/index' export default { // 业务来源 @@ -111,4 +112,10 @@ export default { return res.data }) }, + // 用户 + GetUserList: () => { + return getList().then((res) => { + return res.data + }) + }, } diff --git a/src/store/modules/options.ts b/src/store/modules/options.ts index 74aacae6..ddebac63 100644 --- a/src/store/modules/options.ts +++ b/src/store/modules/options.ts @@ -40,6 +40,8 @@ export const useOptionsStore = defineStore({ GetPackageSelectList: null, // 币别 GetFeeCurrencySelectList: null, + // 用户表 + GetUserList: null }), getters: { // 通过code获取下拉字典(code)就是接口尾部单词 diff --git a/src/views/approve/fee/api.ts b/src/views/approve/fee/api.ts index 39ea2a92..f65de710 100644 --- a/src/views/approve/fee/api.ts +++ b/src/views/approve/fee/api.ts @@ -6,7 +6,9 @@ enum Api { AuditByBiz = '/feeApi/FeeAudit/AuditByBiz', Audit = '/feeApi/FeeAudit/Audit', SetInvoiceEnabled = '/feeApi/FeeRecord/SetInvoiceEnabled', - GetFees = '/feeApi/FeeAudit/GetFees' + GetFees = '/feeApi/FeeAudit/GetFees', + GetModifyValue = '/feeApi/FeeRecord/GetModifyValue', + GetStat = '/feeApi/FeeAudit/GetStat' } // 业务列表 @@ -54,9 +56,20 @@ export function GetFees(data: PageRequest) { }) } -// export function getThermometryWarningCount() { -// return request({ -// url: Api.getThermometryWarningCount, -// method: 'get', -// }) -// } +// 根据费用id查询修改后的新值 +export function GetModifyValue(params) { + return request({ + url: Api.GetModifyValue, + method: 'get', + params + }) +} + +// 根据业务id查询关联的统计 +export function GetStat(data: PageRequest) { + return request({ + url: Api.GetStat, + method: 'post', + data + }) +} \ No newline at end of file diff --git a/src/views/approve/fee/components/AlterNewValue.vue b/src/views/approve/fee/components/AlterNewValue.vue new file mode 100644 index 00000000..4ae87cc8 --- /dev/null +++ b/src/views/approve/fee/components/AlterNewValue.vue @@ -0,0 +1,90 @@ + + + + + + \ No newline at end of file diff --git a/src/views/approve/fee/components/Statistic.vue b/src/views/approve/fee/components/Statistic.vue new file mode 100644 index 00000000..508f5de6 --- /dev/null +++ b/src/views/approve/fee/components/Statistic.vue @@ -0,0 +1,334 @@ + + + + + + \ No newline at end of file diff --git a/src/views/approve/fee/components/feeTable.vue b/src/views/approve/fee/components/feeTable.vue index 5393ddd4..970e0620 100644 --- a/src/views/approve/fee/components/feeTable.vue +++ b/src/views/approve/fee/components/feeTable.vue @@ -5,29 +5,40 @@ -->