From 29129c44c4c0754566e3b2a5baab826d7fd093a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <14166000+zhangtonghai@user.noreply.gitee.com> Date: Tue, 8 Oct 2024 17:32:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=AF=B9=E8=B4=A6=20?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E8=B4=B9=E7=94=A8=E6=A8=A1=E6=9D=BF=EF=BC=88?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/fee/FeeCustTemplate/columns.tsx | 214 ++++++++++++++++-- .../CustomerReconciliation/columns.tsx | 21 +- .../CustomerReconciliation/detail/index.vue | 183 ++++++++------- .../detail/info/index.vue | 104 +++++---- .../CustomerReconciliation/index.vue | 36 ++- 5 files changed, 410 insertions(+), 148 deletions(-) diff --git a/src/views/fee/FeeCustTemplate/columns.tsx b/src/views/fee/FeeCustTemplate/columns.tsx index caf6eeed..1fa0dec3 100644 --- a/src/views/fee/FeeCustTemplate/columns.tsx +++ b/src/views/fee/FeeCustTemplate/columns.tsx @@ -4,9 +4,17 @@ import { Tag } from 'ant-design-vue' // 引入字典数据 import { getDictOption } from '/@/utils/dictUtil' -import { getOrgList } from '/@/api/common' +import { getOrgList, GetClientPortSelectList, GetCarrierSelectList } from '/@/api/common' +import { + GetClientLanesSelectList, + GetAgentCnClientList, + GetClientFrtSelectList, + GetClientSourceSelectList, +} from '/@/views/operation/seaexport/api/BookingLedger' // 往来单位下拉框数据 const companyDict = ref([]) +import { useOptionsStore } from '/@/store/modules/options' +const optionsStore = useOptionsStore() let businessType: any = [ { value: 1, label: '海运出口' }, { value: 2, label: '海运进口' }, @@ -28,18 +36,23 @@ export const columns: BasicColumn[] = [ width: 200, }, { - title: '费用类别', - dataIndex: 'feeCategory', + title: '费用类型', + dataIndex: 'feeType', width: 120, customRender: ({ text }) => { - if (text == '1') { + if (text == 1) { return '收' - } else if (text == '2') { + } else if (text == 2) { return '付' } return text }, }, + { + title: '费用类别', + dataIndex: 'feeCategoryName', + width: 200, + }, { title: '是否停用', dataIndex: 'isDisabled', @@ -93,14 +106,14 @@ export const searchFormSchema: FormSchema[] = [ colProps: { span: 4 }, }, { - field: 'feeCategory', - label: '费用类别', + field: 'feeType', + label: '费用类型', component: 'Select', colProps: { span: 4 }, componentProps: { options: [ - { label: '收', value: '1' }, - { label: '付', value: '2' }, + { label: '收', value: 1 }, + { label: '付', value: 2 }, ], }, }, @@ -239,17 +252,192 @@ export const formSchema: FormSchema[] = [ // show: false, // }, { - field: 'feeCategory', - label: '费用类别', + field: 'feeType', + label: '费用类型', component: 'Select', colProps: { span: 6 }, componentProps: { options: [ - { label: '收', value: '1' }, - { label: '付', value: '2' }, + { label: '收', value: 1 }, + { label: '付', value: 2 }, ], }, }, + { + label: '费用类别名称', + field: 'feeCategoryName', + component: 'Input', + defaultValue: '', + show: false, + }, + { + field: 'feeCategoryId', + label: '费用类别', + defaultValue: '', + component: 'ApiSelect', + colProps: { span: 6 }, + componentProps: ({ formModel }) => { + return { + api: () => { + return new Promise((resolve) => { + getDictOption('Fee_FeeCategoryId').then((res) => { + resolve(res) + }) + }) + }, + labelField: 'label', + valueField: 'value', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + onChange: (e, obj) => { + console.log(e, obj) + if (e && obj) { + formModel.feeCategoryName = obj.label + formModel.feeCategoryId = obj.value + } + if (!e && !obj) { + formModel.feeCategoryName = '' + formModel.feeCategoryId = '' + } + }, + } + }, + }, + { + label: '起运港', + field: 'polCode', + component: 'ApiSelect', + dynamicDisabled: false, + colProps: { span: 6 }, + componentProps: () => { + return { + api: GetClientPortSelectList, + resultField: 'data', + allowClear: true, + showSearch: true, + labelField: 'pinYinCode', + showName: 'pinYinCode', + valueField: 'ediCode', + immediate: true, + getPopupContainer: () => document.body, + } + }, + }, + { + label: '卸货港', + field: 'podCode', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 6 }, + componentProps: () => { + return { + api: GetClientPortSelectList, + resultField: 'data', + allowClear: true, + showSearch: true, + labelField: 'pinYinCode', + showName: 'pinYinCode', + valueField: 'ediCode', + immediate: true, + getPopupContainer: () => document.body, + } + }, + }, + { + field: 'laneId', + label: '航线', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 6 }, + componentProps: ({ formModel }) => { + return { + api: GetClientLanesSelectList, + labelField: 'laneName', + valueField: 'id', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } + }, + }, + { + label: '业务来源', + field: 'sourceId', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 6 }, + componentProps: ({ formModel }) => { + return { + api: GetClientSourceSelectList, + labelField: 'sourceName', + valueField: 'id', + resultField: 'data', + } + }, + }, + { + label: '船公司', + field: 'carrierId', + labelSlot: 'carrierId', + component: 'ApiSelect', + colProps: { span: 6 }, + componentProps: ({ formModel }) => { + return { + api: GetCarrierSelectList, + labelField: 'pinYinCode', + showName: 'cnName', + valueField: 'id', + resultField: 'data', + } + }, + }, + { + label: '订舱口', + field: 'forwarderId', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 6 }, + componentProps: ({ formModel }) => { + return { + api: GetAgentCnClientList, + labelField: 'shortName', + valueField: 'id', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } + }, + }, + { + field: 'mblFrtCode', + label: '付费方式', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + defaultValue: null, + colProps: { span: 6 }, + componentProps: ({ formModel, formActionType }) => { + return { + api: GetClientFrtSelectList, + allowClear: true, + showSearch: true, + labelField: 'frtName', + valueField: 'ediCode', + resultField: 'data', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } + }, + }, { field: 'isDisabled', label: '是否停用', diff --git a/src/views/operation/CustomerReconciliation/columns.tsx b/src/views/operation/CustomerReconciliation/columns.tsx index 11a13c4c..9fa0c8de 100644 --- a/src/views/operation/CustomerReconciliation/columns.tsx +++ b/src/views/operation/CustomerReconciliation/columns.tsx @@ -144,8 +144,25 @@ export const columns: BasicColumn[] = [ return RData }, }, - { title: '账单状态', dataIndex: 'isLocking', align: 'left' }, - { title: '是否不含税', dataIndex: 'isNoTax', align: 'left' }, + { + title: '账单状态', + dataIndex: 'isLocking', + align: 'left', + }, + { + title: '是否不含税', + dataIndex: 'isNoTax', + align: 'left', + customRender: ({ text }) => { + let RData = '-' + if (text) { + RData = '是' + } else { + RData = '否' + } + return RData + }, + }, { title: '应收RMB', dataIndex: 'rmbdr', align: 'left' }, { title: '未收RMB', dataIndex: 'balrmbdr', align: 'left' }, { title: '应收USD', dataIndex: 'usddr', align: 'left' }, diff --git a/src/views/operation/CustomerReconciliation/detail/index.vue b/src/views/operation/CustomerReconciliation/detail/index.vue index f1248e10..a26484f1 100644 --- a/src/views/operation/CustomerReconciliation/detail/index.vue +++ b/src/views/operation/CustomerReconciliation/detail/index.vue @@ -117,7 +117,7 @@ @@ -162,7 +162,7 @@ - + - - + + @@ -28,10 +28,15 @@ - - + + - + 账单费用明细 @@ -40,8 +45,8 @@ - - + + + + + + {{ record.billNo }} + + + + + + + + @@ -121,7 +137,7 @@ import * as XLSX from 'xlsx' import DsPrint from '/@/components/Print/index.vue' import { useMessage } from '/@/hooks/web/useMessage' - const { notification } = useMessage() + const { notification, createMessage } = useMessage() import { SvgIcon } from '/@/components/Icon' import { useGo } from '/@/hooks/web/usePage' const go = useGo() @@ -210,6 +226,16 @@ fixed: 'right', }, }) + // 复制对账编号 + function FnCopy(data) { + const el = document.createElement('input') + el.setAttribute('value', data) + document.body.appendChild(el) + el.select() + document.execCommand('copy') + document.body.removeChild(el) + createMessage.success('复制成功!') + } // 新增 编辑 function GoDetailed(type, data) { if (type) { @@ -237,6 +263,8 @@ } }) } + // 生成发票申请 + function generated() {} // 解除锁定 function UnLock() { let ApiData: any = { @@ -422,6 +450,10 @@ const calcData = ref([])
账单费用明细