From 46cb9508bf390f5144861f7dbe56967ae1919e99 Mon Sep 17 00:00:00 2001 From: sunzehua Date: Sat, 2 Nov 2024 17:55:32 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E5=8F=91=E7=A5=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/finance/feeSettlement/columns.tsx | 85 +++++++++++-------- src/views/finance/feeSettlement/index.vue | 2 +- .../paymentSettlementFree/index.vue | 0 src/views/operation/invoiceApply/columns.tsx | 6 ++ .../invoiceApply/detail/InvoiceDetails.vue | 21 ++++- .../operation/invoiceApply/detail/index.vue | 41 +++++---- src/views/operation/invoiceIssue/api.js | 8 ++ .../operation/invoiceIssue/detail/index.vue | 53 +++++++++++- src/views/operation/invoiceIssue/index.vue | 2 +- 9 files changed, 162 insertions(+), 56 deletions(-) create mode 100644 src/views/finance/paymentSettlement/paymentSettlementFree/index.vue diff --git a/src/views/finance/feeSettlement/columns.tsx b/src/views/finance/feeSettlement/columns.tsx index 7ebdb911..60b379d9 100644 --- a/src/views/finance/feeSettlement/columns.tsx +++ b/src/views/finance/feeSettlement/columns.tsx @@ -2,15 +2,17 @@ import { BasicColumn, FormSchema } from '/@/components/Table' import { ref, } from 'vue' -import { GetClientListByCode, GetFeeCurrencySelectList,GetFeeCodeSelectList } from '/@/api/common' +import { GetClientListByCode, GetFeeCurrencySelectList, GetFeeCodeSelectList } from '/@/api/common' const feeDict = ref([]) +import { getBankList } from '/@/api/system/org' import { GetVesselSelectList, } from '/@/views/operation/seaexport/api/BookingLedger' -import { GetOrgList, ClientCommonGetStlMode, GetClientBankList,GetOrgBankList } from './api' +import { GetOrgList, ClientCommonGetStlMode, GetClientBankList, GetOrgBankList } from './api' let businessType: any = [ { value: 1, label: '海运出口' }, ] +const bankList = ref([]) import { Tag } from 'ant-design-vue' export const columns: BasicColumn[] = [ { @@ -264,12 +266,14 @@ export const detailForm: FormSchema[] = [ { field: 'id', label: '', + component: 'Input', colProps: { span: 4 }, show: false }, { field: 'mode', label: '', + component: 'Input', colProps: { span: 4 }, show: false }, @@ -316,6 +320,7 @@ export const detailForm: FormSchema[] = [ { field: 'settlementTypeId', label: '', + component: 'Input', colProps: { span: 4 }, show: false }, @@ -357,12 +362,14 @@ export const detailForm: FormSchema[] = [ { field: 'customerBankId', label: '', + component: 'Input', colProps: { span: 4 }, show: false }, { field: 'orgBankId', label: '', + component: 'Input', colProps: { span: 4 }, show: false }, @@ -370,7 +377,7 @@ export const detailForm: FormSchema[] = [ field: 'customerBankName', label: '客户银行', show: ({ values }) => { - return values.mode=='free'; + return values.mode == 'free'; }, colProps: { span: 4 }, component: 'ApiSelect', @@ -394,7 +401,7 @@ export const detailForm: FormSchema[] = [ queryCondition: JSON.stringify(queryStr), } GetClientBankList(data).then((res) => { - res.data.forEach(item=>{ + res.data.forEach(item => { item.showName = item.bankName + ' ' + item.bankAccountNo }) resolve(res) @@ -422,33 +429,20 @@ export const detailForm: FormSchema[] = [ field: 'customerAccount', label: '客户账号', show: ({ values }) => { - return values.mode=='free'; + return values.mode == 'free'; }, colProps: { span: 4 }, - dynamicDisabled:true, + dynamicDisabled: true, component: 'Input' }, { field: 'orgBankName', label: '收款账号', colProps: { span: 4 }, - component: 'ApiSelect', + component: 'Select', componentProps: ({ formModel }) => { return { - api: () => { - return new Promise((resolve) => { - GetOrgBankList().then((res) => { - res.data.forEach(item=>{ - item.showName = item.bankName + ' ' + item.bankAccountNo - }) - resolve(res) - }) - }) - }, - immediate: false, - labelField: 'showName', - valueField: 'showName', - resultField: 'data', + options:bankList.value, onChange: (e, obj) => { if (obj) { formModel.orgBankId = obj.id @@ -460,17 +454,12 @@ export const detailForm: FormSchema[] = [ } }, }, - { - field: 'relativeNO', - label: '相关号码', - colProps: { span: 4 }, - component: 'Input' - }, { field: 'saleDeptId', label: '', colProps: { span: 4 }, - show: false + show: false, + component: 'Input' }, { field: 'saleDeptName', @@ -486,19 +475,47 @@ export const detailForm: FormSchema[] = [ onChange: (e, obj) => { if (obj) { formModel.saleDeptId = obj.id + const queryobj = [{ + FieldName:'linkId', + FieldValue:obj.id, + ConditionalType:'1', + }] + const data = { + "queryCondition": JSON.stringify(queryobj), + "pageCondition": { + "pageIndex": 1, + "pageSize": 100, + "sortConditions": [] + }, + } + getBankList(data).then(res => { + res.data.forEach(item=>{ + item.label = item.bankName + ' ' + item.bankAccountNo + item.value = item.bankName + ' ' + item.bankAccountNo + }) + bankList.value = res.data + }) } if (!obj && !e) { formModel.saleDeptId = '' + bankList.value = [] } }, } }, }, + { + field: 'relativeNO', + label: '相关号码', + colProps: { span: 4 }, + component: 'Input' + }, { field: 'category', label: '', colProps: { span: 4 }, - show: false + show: false, + component: 'Input' }, { field: 'categoryText', @@ -557,7 +574,7 @@ export const markForm: FormSchema[] = [ component: 'InputTextArea', ifShow: ({ values }) => { console.log(values) - if(values.mode == '4'){ + if (values.mode == '4') { return true } else { return false @@ -1143,12 +1160,12 @@ export const freeSearchFormSchema: FormSchema[] = [ return { options: [ { - label:'应收', - value:'1' + label: '应收', + value: '1' }, { - label:'应付', - value:'2' + label: '应付', + value: '2' }, ], } diff --git a/src/views/finance/feeSettlement/index.vue b/src/views/finance/feeSettlement/index.vue index 7b9e82b4..16a4cff0 100644 --- a/src/views/finance/feeSettlement/index.vue +++ b/src/views/finance/feeSettlement/index.vue @@ -69,7 +69,7 @@ icon: 'clarity:note-edit-line', tooltip: '编辑', onClick: () => { - GoDetailed(true, record) + GoDetailed(record) }, }, ]" /> diff --git a/src/views/finance/paymentSettlement/paymentSettlementFree/index.vue b/src/views/finance/paymentSettlement/paymentSettlementFree/index.vue new file mode 100644 index 00000000..e69de29b diff --git a/src/views/operation/invoiceApply/columns.tsx b/src/views/operation/invoiceApply/columns.tsx index 18c4f3c8..305210e8 100644 --- a/src/views/operation/invoiceApply/columns.tsx +++ b/src/views/operation/invoiceApply/columns.tsx @@ -387,6 +387,12 @@ export const detailColumns: BasicColumn[] = [ ] export const detailSearchFormSchema: FormSchema[] = [ + { + field: 'number', + label: '编号', + component: 'Input', + colProps: { span: 4 }, + }, { label: '', field: 'customerId', diff --git a/src/views/operation/invoiceApply/detail/InvoiceDetails.vue b/src/views/operation/invoiceApply/detail/InvoiceDetails.vue index 7d8a1cd1..1b35de0a 100644 --- a/src/views/operation/invoiceApply/detail/InvoiceDetails.vue +++ b/src/views/operation/invoiceApply/detail/InvoiceDetails.vue @@ -203,8 +203,27 @@ const [registerTable, { getForm, setSelectedRowKeys, getSelectRows, setProps, ge }, beforeFetch: (p) => { const data = formatParams(p) - data.otherQueryCondition = getForm().getFieldsValue().FeeRange + data.otherQueryCondition = {} + if (getForm().getFieldsValue().FeeRange) { + data.otherQueryCondition.FeeRange = getForm().getFieldsValue().FeeRange + } + if (getForm().getFieldsValue().number) { + data.otherQueryCondition.number = getForm().getFieldsValue().number + } queryData.value = JSON.parse(JSON.stringify(formatParams(p))) + let queryData1 = [] as any + if(formatParams(p).queryCondition){ + queryData1 = JSON.parse(formatParams(p).queryCondition) + } + let i = queryData1.length + while (i--) { + if (queryData1[i].FieldName === 'number') { + queryData1.splice(i, 1) + } else if (queryData1[i].FieldName === 'FeeRange') { + queryData1.splice(i, 1) + } + } + data.queryCondition = JSON.stringify(queryData1) return data }, columns: detailColumns, diff --git a/src/views/operation/invoiceApply/detail/index.vue b/src/views/operation/invoiceApply/detail/index.vue index 272cdef8..519f6ed4 100644 --- a/src/views/operation/invoiceApply/detail/index.vue +++ b/src/views/operation/invoiceApply/detail/index.vue @@ -63,11 +63,11 @@ -
+
{{ form.statusText }}
-
+
{{ form.statusText }}
@@ -163,7 +163,7 @@ {{ item.name - }} + }} @@ -219,7 +219,7 @@ const form = ref({ invoiceNO: '', category: 0, statusText: '未提交', - status:0, + status: 0, applicationNO: '', isRMB: false, isYB: false @@ -293,9 +293,17 @@ const bankForm = [ onChange: (e, obj) => { if (obj) { formModel.customerBankId = obj.id + setFieldsValue({ + invoiceHeader: obj.invoiceHeader, + customerAddTel: obj.invoiceAddress + ' ' + obj.invoiceTel + }) } if (!obj && !e) { formModel.customerBankId = '' + setFieldsValue({ + invoiceHeader: '', + customerAddTel: '' + }) } }, } @@ -511,14 +519,14 @@ const bottomForm = [ customerBankId: res.data[0].id, customerBankName: res.data[0].name, }) - if (res.data[0].invoiceHeaders.length > 0) { + if (res.data[0].invoiceHeader) { setFieldsValue({ - invoiceHeader: res.data[0].invoiceHeaders[0].header, - customerAddTel: res.data[0].invoiceHeaders[0].addressTel + invoiceHeader: res.data[0].invoiceHeader, + customerAddTel: res.data[0].invoiceAddress + ' ' + res.data[0].invoiceTel }) } else { setFieldsValue({ - invoiceHeaders: '', + invoiceHeader: '', customerAddTel: '' }) } @@ -526,7 +534,7 @@ const bottomForm = [ setFieldsValue({ customerBankId: '', customerBankName: '', - invoiceHeaders: '', + invoiceHeader: '', customerAddTel: '' }) } @@ -886,7 +894,7 @@ function handleWithdraw() { } else { loading.value = false } - }).catch(()=>{ + }).catch(() => { loading.value = false }) } @@ -1023,14 +1031,14 @@ function changeCust(id, name) { customerBankId: res.data[0].id, customerBankName: res.data[0].name, }) - if (res.data[0].invoiceHeaders && res.data[0].invoiceHeaders.length > 0) { + if (res.data[0].invoiceHeader) { setFieldsValue({ - invoiceHeader: res.data[0].invoiceHeaders[0].header, - customerAddTel: res.data[0].invoiceHeaders[0].addressTel + invoiceHeader: res.data[0].invoiceHeader, + customerAddTel: res.data[0].invoiceAddress + ' ' + res.data[0].invoiceTel }) } else { setFieldsValue({ - invoiceHeaders: '', + invoiceHeader: '', customerAddTel: '' }) } @@ -1038,7 +1046,7 @@ function changeCust(id, name) { setFieldsValue({ customerBankId: '', customerBankName: '', - invoiceHeaders: '', + invoiceHeader: '', customerAddTel: '' }) } @@ -1325,7 +1333,8 @@ function handleSelect(value) { /deep/ .ant-checkbox-wrapper-checked .ant-checkbox-disabled+span { color: #257afa; } -.orange{ + +.orange { color: #ffa500; } diff --git a/src/views/operation/invoiceIssue/api.js b/src/views/operation/invoiceIssue/api.js index c850acb9..6bf21128 100644 --- a/src/views/operation/invoiceIssue/api.js +++ b/src/views/operation/invoiceIssue/api.js @@ -190,4 +190,12 @@ export function GetClientBankList(parameter) { method: 'post', data: parameter, }) +} + +export function Reverse(parameter) { + return request({ + url: '/feeApi/GeneralInvoice/Reverse', + method: 'post', + data: parameter, + }) } \ No newline at end of file diff --git a/src/views/operation/invoiceIssue/detail/index.vue b/src/views/operation/invoiceIssue/detail/index.vue index 8030df45..c2728ab9 100644 --- a/src/views/operation/invoiceIssue/detail/index.vue +++ b/src/views/operation/invoiceIssue/detail/index.vue @@ -63,7 +63,7 @@ 开票 - + 冲红 @@ -380,6 +380,30 @@ + + + + + + 直接冲红 + 开票有误 + 销货退回 + 服务中止 + 销售折让 + + + + + 销方 + 购方 + + + + + + + +
@@ -392,7 +416,7 @@ import invoiceFile from './invoiceFile.vue' import { DownOutlined } from '@ant-design/icons-vue' import { GetInvoiceCodeList, GetUserListAll, DeleteInvoiceDetail, - GeneralInvoiceSave, GeneralInvoiceGet, FreeInvoiceSave, + GeneralInvoiceSave, GeneralInvoiceGet, FreeInvoiceSave, Reverse, GeneralInvoiceGetList, GeneralInvoiceInitiate, GetClientBankList } from '../api' import { useMessage } from '/@/hooks/web/useMessage' @@ -418,7 +442,7 @@ defineComponent({ HotTable, }) registerAllModules() - +const redForm = ref({}) as any const detailForm = [ { field: 'divider-selects', @@ -648,6 +672,10 @@ const applyInvoiceRef = ref(null) as any function open() { applyInvoiceRef.value.init() } +const redFlag = ref(false) +function openRed() { + redFlag.value = true +} function handleSelectAccount(val) { accountList.value.forEach(item => { if (item.bankName == val) { @@ -794,6 +822,7 @@ function openFile() { } const router = useRouter() const go = useGo() +const redloading = ref(false) // 自由开票左边 发票开出整体逻辑和发票申请差不多 按费用开需要将原始币别 原始金额处理(如果不是rmb) 按业务开就是处理好汇率就行 function updateListFreeLeft(val) { const data = { @@ -826,6 +855,24 @@ function updateListFreeLeft(val) { loading.value = false }) } +function sureRed() { + const data = { + invoiceId: route.query.id, + orderNo: form.value.billNO, + ...redForm.value + } + redloading.value = true + Reverse(data).then(res => { + if (res.succeeded) { + createMessage.success('操作成功') + redFlag.value = false + getDetail() + } + redloading.value = false + }).catch(() => { + redloading.value = false + }) +} // 申请开票 function handleUpdate(val) { const data = { diff --git a/src/views/operation/invoiceIssue/index.vue b/src/views/operation/invoiceIssue/index.vue index 11a77141..bb6fff28 100644 --- a/src/views/operation/invoiceIssue/index.vue +++ b/src/views/operation/invoiceIssue/index.vue @@ -72,7 +72,7 @@ icon: 'clarity:note-edit-line', tooltip: '编辑', onClick: () => { - GoDetailed(true, record) + GoDetailed(record) }, }, ]" /> From eca7acc45d42383d53a4e48106d1d555f183e4d7 Mon Sep 17 00:00:00 2001 From: sunzehua Date: Sat, 2 Nov 2024 17:58:01 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E5=8F=91=E7=A5=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../paymentSettlement/paymentSettlementFree/index.vue | 3 +++ src/views/operation/invoiceApply/columns.tsx | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/views/finance/paymentSettlement/paymentSettlementFree/index.vue b/src/views/finance/paymentSettlement/paymentSettlementFree/index.vue index e69de29b..e1a03f04 100644 --- a/src/views/finance/paymentSettlement/paymentSettlementFree/index.vue +++ b/src/views/finance/paymentSettlement/paymentSettlementFree/index.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/views/operation/invoiceApply/columns.tsx b/src/views/operation/invoiceApply/columns.tsx index 305210e8..3f739d85 100644 --- a/src/views/operation/invoiceApply/columns.tsx +++ b/src/views/operation/invoiceApply/columns.tsx @@ -270,6 +270,12 @@ export const detailColumns: BasicColumn[] = [ width: 100, align: 'left', }, + { + title: '主提单号', + dataIndex: 'mblno', + width: 100, + align: 'left', + }, { title: '订舱编号', dataIndex: 'bookingNO', From 77dbee2dd634f4040cb6a8d00cf3de58ab834be5 Mon Sep 17 00:00:00 2001 From: sunzehua Date: Sat, 2 Nov 2024 18:29:13 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E5=8F=91=E7=A5=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../finance/feeSettlement/detail/index.vue | 4 + .../feeSettlement/detail/invoiceTable.vue | 4 + src/views/finance/feeSettlement/index.vue | 4 +- .../finance/paymentSettlement/columns.tsx | 2 +- src/views/finance/paymentSettlement/index.vue | 16 +- .../paymentSettlementFree/api.js | 159 ++ .../paymentSettlementFree/columns.tsx | 1500 +++++++++++++++++ .../paymentSettlementFree/index.vue | 556 +++++- .../paymentSettlementFree/invoiceTable.vue | 674 ++++++++ 9 files changed, 2911 insertions(+), 8 deletions(-) create mode 100644 src/views/finance/paymentSettlement/paymentSettlementFree/api.js create mode 100644 src/views/finance/paymentSettlement/paymentSettlementFree/columns.tsx create mode 100644 src/views/finance/paymentSettlement/paymentSettlementFree/invoiceTable.vue diff --git a/src/views/finance/feeSettlement/detail/index.vue b/src/views/finance/feeSettlement/detail/index.vue index 9b2b7e37..ecabcdc6 100644 --- a/src/views/finance/feeSettlement/detail/index.vue +++ b/src/views/finance/feeSettlement/detail/index.vue @@ -106,6 +106,10 @@ +
diff --git a/src/views/finance/feeSettlement/detail/invoiceTable.vue b/src/views/finance/feeSettlement/detail/invoiceTable.vue index 16abf7d9..ebc3a5fa 100644 --- a/src/views/finance/feeSettlement/detail/invoiceTable.vue +++ b/src/views/finance/feeSettlement/detail/invoiceTable.vue @@ -103,6 +103,10 @@ + diff --git a/src/views/finance/feeSettlement/index.vue b/src/views/finance/feeSettlement/index.vue index 16a4cff0..2d4d4cc2 100644 --- a/src/views/finance/feeSettlement/index.vue +++ b/src/views/finance/feeSettlement/index.vue @@ -49,10 +49,10 @@ 新建自由结算 - + 新建发票结算 diff --git a/src/views/finance/paymentSettlement/columns.tsx b/src/views/finance/paymentSettlement/columns.tsx index 7fb207a7..fe1eab3f 100644 --- a/src/views/finance/paymentSettlement/columns.tsx +++ b/src/views/finance/paymentSettlement/columns.tsx @@ -35,7 +35,7 @@ export const columns: BasicColumn[] = [ }, { title: '结算方式', - dataIndex: 'settlementTypeName', + dataIndex: 'modeText', sorter: true, width: 80 }, diff --git a/src/views/finance/paymentSettlement/index.vue b/src/views/finance/paymentSettlement/index.vue index 4a736dd8..2abf0f60 100644 --- a/src/views/finance/paymentSettlement/index.vue +++ b/src/views/finance/paymentSettlement/index.vue @@ -22,7 +22,7 @@ class="action-divider" />
- + 新建自由结算 @@ -129,11 +129,21 @@ } // 编辑 const handleEdit = (row) => { - go(`/payment-settlement/detail?id=${row.id}`) + if(row.mode==1){ + go(`/payment-settlement/create?type=1&id=`+row.id) + } + if(row.mode==3){ + go(`/paymentSettlementFree?type=free&id=`+row.id) + } } // 新建 const create = (v) => { - go(`/payment-settlement/create?type=${v}`) + if(v==1){ + go(`/payment-settlement/create?type=${v}`) + } + if(v=='free'){ + go(`/paymentSettlementFree?type=${v}`) + } } onMounted(() => { //初始化字典选项 diff --git a/src/views/finance/paymentSettlement/paymentSettlementFree/api.js b/src/views/finance/paymentSettlement/paymentSettlementFree/api.js new file mode 100644 index 00000000..debd5bbd --- /dev/null +++ b/src/views/finance/paymentSettlement/paymentSettlementFree/api.js @@ -0,0 +1,159 @@ +import { request } from '/@/utils/request' + +// 获取列表 (Auth) +export function PaymentSettlementGetList(parameter) { + return request({ + url: '/feeApi/PaymentSettlement/GetList', + method: 'post', + data: parameter, + }) +} +export function GetOrgList() { + return request({ + url: '/mainApi/Common/GetOrgList', + method: 'get', + }) +} +export function InvoiceSettlementGetInvoiceList(parameter) { + return request({ + url: '/feeApi/InvoiceSettlement/GetInvoiceList', + method: 'post', + data: parameter, + }) +} +export function InvoiceSettlementGetInvoiceDetails(parameter) { + return request({ + url: '/feeApi/InvoiceSettlement/GetInvoiceDetails', + method: 'post', + data: parameter, + }) +} +export function InvoiceSettlementGetExchanges(parameter) { + return request({ + url: '/feeApi/InvoiceSettlement/GetExchanges', + method: 'post', + data: parameter, + }) +} + +export function GetExchangeRate(params) { + return request({ + url: '/feeApi/FeeCurrencyExchange/GetExchangeRate', + method: 'get', + params + }) +} + + +export function InvoiceSettlementSave(parameter) { + return request({ + url: '/feeApi/InvoiceSettlement/Save', + method: 'post', + data: parameter, + }) +} + +export function InvoiceSettlementGet(params) { + return request({ + url: '/feeApi/InvoiceSettlement/Get', + method: 'get', + params + }) +} + +export function ClientCommonGetStlMode(params) { + return request({ + url: '/mainApi/ClientCommon/GetStlMode', + method: 'get', + params + }) +} + +export function GetClientBankList(parameter) { + return request({ + url: '/mainApi/ClientBank/GetClientBankList', + method: 'post', + data: parameter, + }) +} + +export function PaymentSettlementDelete(parameter) { + return request({ + url: '/feeApi/PaymentSettlement/Delete', + method: 'post', + data: parameter, + }) +} + +export function GeneralInvoiceGet(params) { + return request({ + url: '/feeApi/GeneralInvoice/Get', + method: 'get', + params + }) +} + +export function PaymentSettlementSetLock(parameter) { + return request({ + url: '/feeApi/PaymentSettlement/SetLock', + method: 'post', + data: parameter, + }) +} + +export function PaymentSettlementDeleteDetail(parameter) { + return request({ + url: '/feeApi/PaymentSettlement/DeleteDetail', + method: 'post', + data: parameter, + }) +} + +export function PaymentFreeSettlementGetBizList(parameter) { + return request({ + url: '/feeApi/PaymentFreeSettlement/GetBizList', + method: 'post', + data: parameter, + }) +} + +export function PaymentFreeSettlementGetFees(parameter) { + return request({ + url: '/feeApi/PaymentFreeSettlement/GetFees', + method: 'post', + data: parameter, + }) +} + + +export function PaymentFreeSettlementSave(parameter) { + return request({ + url: '/feeApi/PaymentFreeSettlement/Save', + method: 'post', + data: parameter, + }) +} + +export function PaymentFreeSettlementGet(parameter) { + return request({ + url: '/feeApi/PaymentFreeSettlement/Get', + method: 'get', + params: parameter, + }) +} + +export function PaymentFreeSettlementGetExchangesAsync(parameter) { + return request({ + url: '/feeApi/PaymentFreeSettlement/GetCurrencies', + method: 'post', + data: parameter, + }) +} + +export function GetOrgBankList(parameter) { + return request({ + url: '/mainApi/ClientCommon/GetOrgBankList', + method: 'get', + data: parameter, + }) +} \ No newline at end of file diff --git a/src/views/finance/paymentSettlement/paymentSettlementFree/columns.tsx b/src/views/finance/paymentSettlement/paymentSettlementFree/columns.tsx new file mode 100644 index 00000000..d3232d01 --- /dev/null +++ b/src/views/finance/paymentSettlement/paymentSettlementFree/columns.tsx @@ -0,0 +1,1500 @@ +import { BasicColumn, FormSchema } from '/@/components/Table' +import { + ref, +} from 'vue' +import { GetClientListByCode, GetFeeCurrencySelectList, GetFeeCodeSelectList } from '/@/api/common' +const feeDict = ref([]) +import { getBankList } from '/@/api/system/org' +import { + GetVesselSelectList, +} from '/@/views/operation/seaexport/api/BookingLedger' +import { GetOrgList, ClientCommonGetStlMode, GetClientBankList, GetOrgBankList } from './api' +let businessType: any = [ + { value: 1, label: '海运出口' }, +] +const bankList = ref([]) +import { Tag } from 'ant-design-vue' +export const columns: BasicColumn[] = [ + { + title: '结算单号', + dataIndex: 'applicationNO', + width: 100, + }, + { + title: '状态', + dataIndex: 'isLocked', + width: 100, + }, + { + title: '结算单位', + dataIndex: 'customerName', + width: 100, + }, + { + title: '结算类别', + dataIndex: 'billType', + sorter: true, + width: 80, + customRender: ({ text }) => { + if (text === 1) { + return '收费' + } else if (text === 2) { + return '付费' + } + return text + } + }, + { + title: '结算方式', + dataIndex: 'modeText', + width: 100, + }, + { + title: '币别', + dataIndex: 'currency', + width: 100, + }, + { + title: 'RMB', + dataIndex: 'rmbAmount', + width: 100, + }, + { + title: 'USD', + dataIndex: 'usdAmount', + width: 100, + }, + { + title: '其他币别', + dataIndex: 'otherAmount', + width: 100, + }, + { + title: '未开票', + dataIndex: 'unInvoiceAmount', + width: 100, + }, + { + title: '结算日期', + dataIndex: 'settlementDate', + width: 100, + }, + { + title: '结算人', + dataIndex: 'createByName', + width: 100, + }, + { + title: '结算账户', + dataIndex: 'customerAccount', + width: 100, + }, + { + title: '银行账户', + dataIndex: 'customerBank', + width: 100, + }, + { + title: '是否导出凭证', + dataIndex: 'isExportVoucher', + width: 100, + }, + { + title: '禁止生成凭证', + dataIndex: 'isVoucherDisabled', + width: 100, + }, + { + title: '备注', + dataIndex: 'note', + width: 100, + }, + { + title: '发票号', + dataIndex: 'invoiceNO', + width: 100, + }, + { + title: '相关号码', + dataIndex: 'relativeNO', + width: 100, + }, + { + title: '原始金额', + dataIndex: 'originalAmount', + width: 100, + }, + { + title: '总账凭证号', + dataIndex: 'ledgerVoucherNO', + width: 100, + }, + { + title: '所属分部', + dataIndex: 'saleDeptName', + width: 100, + }, + { + title: '记账资料', + dataIndex: 'accountAmount', + width: 100, + }, + { + title: '预收支资料', + dataIndex: 'advanceAmount', + width: 100, + }, + { + title: '实收支资料', + dataIndex: 'ahsrAmount', + width: 100, + }, + { + title: '财务费用', + dataIndex: 'financialAmount', + width: 100, + }, + { + title: '预收支取用资料', + dataIndex: 'advanceAmount', + width: 100, + }, + { + title: '创建日期', + dataIndex: 'createTime', + width: 100, + }, + { + title: '申请单号', + dataIndex: 'applicationNO2', + width: 100, + }, + { + title: '发票申请单号', + dataIndex: 'applicationNO1', + width: 100, + }, + { + title: '结算单位银行', + dataIndex: 'customerBank', + width: 100, + }, + { + title: '结算单位账户', + dataIndex: 'customerAccount', + width: 100, + }, + { + title: '锁定时间', + dataIndex: 'lockTime', + width: 100, + }, + { + title: '锁定人', + dataIndex: 'lockUser', + width: 100, + }, + { + title: '撤销锁定时间', + dataIndex: 'unlockTime', + width: 100, + }, + { + title: '撤销锁定人', + dataIndex: 'unlockUser', + width: 100, + }, +] + +export const searchFormSchema: FormSchema[] = [ + { + field: 'billType', + label: '', + colProps: { span: 4 }, + component: 'Input', + show: false, + defaultValue: 1 + }, + { + field: 'settlementNO', + label: '结算单号', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'customerId', + label: '结算单位', + component: 'ApiSelect', + colProps: { span: 4 }, + componentProps: () => { + return { + api: GetClientListByCode, + labelField: 'pinYinCode', + valueField: 'shortName', + showName: 'shortName', + resultField: 'data', + immediate: false + } + } + }, + { + field: 'applicationNO', + label: '申请单号', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'ledgerVoucherNO', + label: '总账凭证号', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'settlementDate', + label: '结算日期', + component: 'DatePicker', + required: false, + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: { + allowClear: true + } + }, +] + +export const detailForm: FormSchema[] = [ + { + field: 'id', + label: '', + component: 'Input', + colProps: { span: 4 }, + show: false + }, + { + field: 'mode', + label: '', + component: 'Input', + colProps: { span: 4 }, + show: false + }, + { + field: 'customerId', + label: '', + colProps: { span: 4 }, + show: false, + component: 'Input' + }, + { + field: 'customerName', + label: '结算单位', + colProps: { span: 4 }, + dynamicDisabled: true, + component: 'Input' + }, + { + field: 'settlementDate', + label: '结算日期', + colProps: { span: 4 }, + component: 'DatePicker', + componentProps: { + showTime: true, + allowClear: true, + valueFormat: 'YYYY-MM-DD HH:00', + format: 'YYYY-MM-DD HH:00', + }, + }, + { + field: 'createByName', + label: '结算人', + colProps: { span: 4 }, + dynamicDisabled: true, + component: 'Input' + }, + { + field: 'currencyAmount', + label: '币别/金额', + colProps: { span: 4 }, + dynamicDisabled: true, + component: 'Input' + }, + { + field: 'settlementTypeId', + label: '', + component: 'Input', + colProps: { span: 4 }, + show: false + }, + { + field: 'settlementTypeName', + label: '结算方式', + colProps: { span: 4 }, + component: 'ApiSelect', + componentProps: ({ formModel }) => { + return { + api: ClientCommonGetStlMode, + resultField: 'data', + labelField: 'stlName', + valueField: 'stlName', + onChange: (e, obj) => { + if (obj) { + formModel.settlementTypeId = obj.id + } + if (!obj && !e) { + formModel.settlementTypeId = '' + } + }, + } + }, + }, + { + field: 'exchangeRate', + label: '汇率', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'line2', + component: 'Divider', + colProps: { + span: 24 + } + }, + { + field: 'customerBankId', + label: '', + component: 'Input', + colProps: { span: 4 }, + show: false + }, + { + field: 'orgBankId', + label: '', + component: 'Input', + colProps: { span: 4 }, + show: false + }, + { + field: 'customerBankName', + label: '客户银行', + show: ({ values }) => { + return values.mode == 'free'; + }, + colProps: { span: 4 }, + component: 'ApiSelect', + componentProps: ({ formModel }) => { + return { + api: () => { + return new Promise((resolve) => { + const queryStr = [ + { + FieldName: 'ClientId', + FieldValue: formModel.customerId, + ConditionalType: '0', + }, + ] + const data = { + pageCondition: { + pageIndex: 1, + pageSize: 20, + sortConditions: [], + }, + queryCondition: JSON.stringify(queryStr), + } + GetClientBankList(data).then((res) => { + res.data.forEach(item => { + item.showName = item.bankName + ' ' + item.bankAccountNo + }) + resolve(res) + }) + }) + }, + immediate: false, + labelField: 'showName', + valueField: 'bankName', + resultField: 'data', + onChange: (e, obj) => { + if (obj) { + formModel.customerBankId = obj.id + formModel.customerAccount = obj.bankAccountNo + } + if (!obj && !e) { + formModel.customerBankId = '' + formModel.customerAccount = '' + } + }, + } + }, + }, + { + field: 'customerAccount', + label: '客户账号', + show: ({ values }) => { + return values.mode == 'free'; + }, + colProps: { span: 4 }, + dynamicDisabled: true, + component: 'Input' + }, + { + field: 'orgBankName', + label: '收款账号', + colProps: { span: 4 }, + component: 'Select', + componentProps: ({ formModel }) => { + return { + options:bankList.value, + onChange: (e, obj) => { + if (obj) { + formModel.orgBankId = obj.id + } + if (!obj && !e) { + formModel.orgBankId = '' + } + }, + } + }, + }, + { + field: 'saleDeptId', + label: '', + colProps: { span: 4 }, + show: false, + component: 'Input' + }, + { + field: 'saleDeptName', + label: '所属分部', + colProps: { span: 4 }, + component: 'ApiSelect', + componentProps: ({ formModel }) => { + return { + api: GetOrgList, + resultField: 'data', + labelField: 'label', + valueField: 'label', + onChange: (e, obj) => { + if (obj) { + formModel.saleDeptId = obj.id + const queryobj = [{ + FieldName:'linkId', + FieldValue:obj.id, + ConditionalType:'1', + }] + const data = { + "queryCondition": JSON.stringify(queryobj), + "pageCondition": { + "pageIndex": 1, + "pageSize": 100, + "sortConditions": [] + }, + } + getBankList(data).then(res => { + res.data.forEach(item=>{ + item.label = item.bankName + ' ' + item.bankAccountNo + item.value = item.bankName + ' ' + item.bankAccountNo + }) + bankList.value = res.data + }) + } + if (!obj && !e) { + formModel.saleDeptId = '' + bankList.value = [] + } + }, + } + }, + }, + { + field: 'relativeNO', + label: '相关号码', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'category', + label: '', + colProps: { span: 4 }, + show: false, + component: 'Input' + }, + { + field: 'categoryText', + label: '业务类别', + colProps: { span: 4 }, + component: 'Select', + componentProps: ({ formModel }) => { + return { + options: [ + { + label: '货运收入', + value: '1' + }, + { + label: '利息收入', + value: '2' + }, + ], + onChange: (e, obj) => { + if (obj) { + formModel.category = obj.value + } + if (!obj && !e) { + formModel.category = '' + } + }, + } + }, + }, + { + field: 'ledgerVoucherNO', + label: '总账凭证号', + colProps: { span: 4 }, + component: 'Input' + }, +] + +export const markForm: FormSchema[] = [ + { + field: 'mode', + label: '', + colProps: { span: 4 }, + show: false + }, + { + field: 'line3', + component: 'Divider', + colProps: { + span: 24 + } + }, + { + field: 'voucherRemark', + label: '凭证备注', + colProps: { span: 8 }, + component: 'InputTextArea', + ifShow: ({ values }) => { + console.log(values) + if (values.mode == '4') { + return true + } else { + return false + } + }, + }, + { + field: 'note', + label: '备注', + colProps: { span: 8 }, + component: 'InputTextArea' + }, + { + field: 'line2', + component: 'Divider', + colProps: { + span: 24 + } + }, +] + +export const invoiceColum: BasicColumn[] = [ + { + title: '发票业务编号', + dataIndex: 'billNO', + width: 100, + }, + { + title: '发票号', + dataIndex: 'invoiceNO', + width: 100, + }, + { + title: '发票申请单号', + dataIndex: 'applicationNO', + width: 100, + }, + { + title: '开票单位', + dataIndex: 'customerName', + width: 100, + }, + { + title: '币别', + dataIndex: 'originalCurrency', + width: 100, + }, + { + title: '结算金额', + dataIndex: 'settlementAmount', + width: 100, + }, + { + title: '开票金额', + dataIndex: 'invoiceAmount', + width: 100, + }, + { + title: 'RMB申请金额', + dataIndex: 'rmbApplyAmount', + width: 100, + }, + { + title: 'USD申请金额', + dataIndex: 'usdApplyAmount', + width: 100, + }, + { + title: '发票抬头', + dataIndex: 'invoiceHeader', + width: 100, + }, + { + title: '开票日期', + dataIndex: 'invoiceDate', + width: 100, + }, +] + +export const invoiceDetailColum: BasicColumn[] = [ + { + title: '委托编号', + dataIndex: 'customerNo', + width: 100, + }, + { + title: '主提单号', + dataIndex: 'mblno', + width: 100, + }, + { + title: '委托单位', + dataIndex: 'clientName', + width: 100, + }, + { + title: '开船日期', + dataIndex: 'etd', + width: 100, + }, + { + title: '业务来源', + dataIndex: 'sourceName', + width: 100, + }, + { + title: '费用名称', + dataIndex: 'feeName', + width: 100, + }, + { + title: '收付', + dataIndex: 'feeType', + width: 100, + }, + { + title: '结算金额', + dataIndex: 'settlementAmount', + width: 100, + }, + { + title: '原始币别', + dataIndex: 'originalCurrency', + width: 100, + }, + { + title: '原始汇率', + dataIndex: 'originalRate', + width: 100, + }, + { + title: '折算汇率', + dataIndex: 'exchangeRate', + width: 100, + }, + { + title: '发票折算汇率', + dataIndex: 'applicationNO', + width: 100, + }, + { + title: '原始金额', + dataIndex: 'originalAmount', + width: 100, + }, + { + title: '揽货人', + dataIndex: 'saleName', + width: 100, + }, + { + title: '录入方式', + dataIndex: 'inputMethod', + width: 100, + }, + { + title: '会计期间', + dataIndex: 'accountDate', + width: 100, + }, + { + title: '更改单', + dataIndex: 'changeOrder', + width: 100, + }, +] + +export const invoiceTableColums: BasicColumn[] = [ + { + title: '发票类别', + dataIndex: 'category', + width: 100, + }, + { + title: '发票锁定', + dataIndex: 'isLocked', + width: 80, + }, + { + title: '发票业务编号', + dataIndex: 'billNO', + width: 100, + }, + { + title: '开票单位', + dataIndex: 'customerName', + width: 100, + }, + { + title: '币别', + dataIndex: 'currency', + width: 60, + }, + { + title: '开票金额', + dataIndex: 'invoiceAmount', + width: 80, + }, + { + title: '申请金额', + dataIndex: 'applyAmount', + width: 80, + }, + { + title: '未结金额', + dataIndex: 'unsettledAmountText', + width: 100, + }, + { + title: '本次结算金额', + dataIndex: 'originalCurrency', + width: 100, + }, + { + title: '原币金额', + dataIndex: 'originalAmountText', + width: 100, + }, + { + title: '发票抬头', + dataIndex: 'invoiceHeader', + width: 100, + }, + { + title: '开票日期', + dataIndex: 'invoiceDate', + width: 100, + }, + { + title: '开票人', + dataIndex: 'operatorName', + width: 100, + }, + { + title: '所属分部', + dataIndex: 'saleDeptName', + width: 100, + }, + { + title: '备注', + dataIndex: 'note', + width: 100, + }, + { + title: '发票类型', + dataIndex: 'modeText', + width: 100, + }, + { + title: '发票税率', + dataIndex: 'taxRate', + width: 100, + }, + + + +] + +export const invoiceSearchFormSchema: FormSchema[] = [ + { + field: 'customerId', + label: '开票单位', + component: 'ApiSelect', + colProps: { span: 6 }, + componentProps: () => { + return { + api: GetClientListByCode, + labelField: 'pinYinCode', + valueField: 'id', + showName: 'shortName', + resultField: 'data', + immediate: true + } + } + }, + { + field: 'billNO', + label: '编号检索', + colProps: { span: 6 }, + component: 'Input' + }, + { + field: 'invoiceHeader', + label: '发票抬头', + colProps: { span: 6 }, + component: 'Input' + }, + { + field: 'currency', + label: '币别', + colProps: { span: 6 }, + component: 'ApiSelect', + componentProps: () => { + return { + api: GetFeeCurrencySelectList, + labelField: 'codeName', + valueField: 'codeName', + resultField: 'data' + } + } + }, + { + field: 'invoiceDate', + label: '开票日期', + component: 'DatePicker', + required: false, + dynamicDisabled: false, + colProps: { span: 6 }, + componentProps: { + allowClear: true + } + }, + { + field: 'saleDeptId', + label: '所属分部', + component: 'ApiSelect', + colProps: { span: 6 }, + componentProps: () => { + return { + api: GetOrgList, + resultField: 'data', + labelField: 'label', + valueField: 'label', + } + } + }, +] + +export const invoiceTableDetailColums: BasicColumn[] = [ + { + title: '委托编号', + dataIndex: 'customerNo', + width: 100, + }, + { + title: '主提单号', + dataIndex: 'mblno', + width: 100, + }, + { + title: '委托单位', + dataIndex: 'clientName', + width: 100, + }, + { + title: '开船日期', + dataIndex: 'etd', + width: 100, + }, + { + title: '业务来源', + dataIndex: 'sourceName', + width: 100, + }, + { + title: '费用名称', + dataIndex: 'feeName', + width: 100, + }, + { + title: '收付', + dataIndex: 'feeType', + width: 100, + }, + { + title: '申请金额', + dataIndex: 'applyAmount', + width: 100, + }, + { + title: '结算金额', + dataIndex: 'orderSettlementAmount', + width: 100, + }, + { + title: '原始币别', + dataIndex: 'originalCurrency', + width: 100, + }, + { + title: '原始金额', + dataIndex: 'originalAmount', + width: 100, + }, + { + title: '揽货人', + dataIndex: 'saleName', + width: 100, + }, +] + +export const freeTableColums: BasicColumn[] = [ + { + title: '委托编号', + dataIndex: 'customerNo', + width: 100, + }, + { + title: '主提单号', + dataIndex: 'mblno', + width: 100, + }, + { + title: '委托单位', + dataIndex: 'clientName', + width: 100, + }, + { + title: '结费单位', + dataIndex: 'customerName', + width: 100, + }, + { + title: 'RMB未收', + dataIndex: 'unchargedRMB', + width: 100, + }, + { + title: 'USD未收', + dataIndex: 'unchargedUSD', + width: 100, + }, + { + title: '其他未收', + dataIndex: 'unchargedOther', + width: 100, + }, + { + title: 'RMB收未开票', + dataIndex: 'unpaidInvoiceRMB', + width: 100, + }, + { + title: 'USD收未开票', + dataIndex: 'unpaidInvoiceUSD', + width: 100, + }, + { + title: 'RMB未付', + dataIndex: 'unpaidRMB', + width: 100, + }, + { + title: 'USD未付', + dataIndex: 'unpaidUSD', + width: 100, + }, + { + title: '其他未付', + dataIndex: 'unpaidOther', + width: 100, + }, + { + title: '业务类别', + dataIndex: 'businessType', + width: 100, + }, + { + title: '开船日期', + dataIndex: 'etd', + width: 100, + }, + { + title: '报关单号', + dataIndex: 'customNo', + width: 100, + }, + { + title: '订舱编号', + dataIndex: 'bookingNo', + width: 100, + }, + { + title: '经营单位', + dataIndex: 'enterprise', + width: 100, + }, + { + title: '揽货人', + dataIndex: 'operator', + width: 100, + }, + { + title: '会计期间', + dataIndex: 'accountDate', + width: 100, + }, + { + title: '操作', + dataIndex: 'operator', + width: 100, + }, + { + title: '录入人', + dataIndex: 'createByName', + width: 100, + }, + { + title: '起运港', + dataIndex: 'loadPort', + width: 100, + }, + { + title: '目的港', + dataIndex: 'dischargePort', + width: 100, + }, + { + title: '船 名', + dataIndex: 'vessel', + width: 100, + }, + { + title: '航次', + dataIndex: 'voyage', + width: 100, + }, + { + title: '更改单', + dataIndex: 'changeOrder', + width: 100, + }, + { + title: '备注', + dataIndex: 'note', + width: 100, + }, + { + title: '分提单号', + dataIndex: 'hblno', + width: 100, + }, + { + title: '所属分部', + dataIndex: 'saleDeptName', + width: 100, + }, +] + +export const freeSearchFormSchema: FormSchema[] = [ + { + label: '费用对象', + field: 'customerId', + component: 'ApiSelect', + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: () => { + return { + api: GetClientListByCode, + labelField: 'pinYinCode', + showName: 'shortName', + valueField: 'id', + resultField: 'data', + immediate: false + } + } + }, + { + field: 'mblno:hblno:bookingNO:customerNo', + label: '编号检索', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'businessDate', + label: '业务日期', + component: 'DatePicker', + required: false, + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: { + allowClear: true + } + }, + { + field: 'feeType', + label: '收/付', + component: 'Select', + required: true, + colProps: { span: 4 }, + defaultValue: '2', + componentProps: () => { + return { + options: [ + { + label: '应收', + value: '1' + }, + { + label: '应付', + value: '2' + }, + ], + } + }, + }, + { + label: '费用名称', + field: 'feeName', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: () => { + return { + api: () => { + return new Promise((resolve) => { + GetFeeCodeSelectList().then((res) => { + res.data.forEach((item) => { + item.label = item.code + '-' + item.name + }) + resolve(res) + }) + }) + }, + immediate: false, + valueField: 'id', + resultField: 'data', + // mode: 'multiple', + filterOption: (input: string, option: any) => { + return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 + }, + } + }, + }, + { + field: 'businessType', + label: '业务类型', + component: 'Select', + colProps: { span: 4 }, + componentProps: () => { + return { + options: businessType, + } + }, + }, + { + field: 'invoiceNO', + label: '发票号', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'currency', + label: '币别', + colProps: { span: 4 }, + component: 'ApiSelect', + componentProps: () => { + return { + api: GetFeeCurrencySelectList, + labelField: 'codeName', + valueField: 'codeName', + resultField: 'data' + } + } + }, + { + field: 'debitNo', + label: '对账编号', + colProps: { span: 4 }, + component: 'Input' + }, + { + field: 'accountDate', + label: '会计期间', + component: 'DatePicker', + required: false, + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: { + allowClear: true + } + }, + { + label: '船名', + field: 'vesselId', + component: 'ApiSelect', + required: false, + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: () => { + return { + api: GetVesselSelectList, + immediate: false, + labelField: 'vesselName', + valueField: 'id', + resultField: 'data' + } + } + }, + { + field: 'voyage', + label: '航次', + colProps: { span: 4 }, + component: 'Input' + }, + { + label: '核算单位', + field: 'enterprise', + component: 'ApiSelect', + dynamicDisabled: false, + colProps: { span: 4 }, + componentProps: () => { + return { + api: GetClientListByCode, + labelField: 'pinYinCode', + showName: 'shortName', + valueField: 'id', + resultField: 'data', + immediate: false + } + } + }, +] + +export const freeTableDetailColums: BasicColumn[] = [ + { + title: '客户名称', + dataIndex: 'customerName', + width: 100, + }, + { + title: '收付', + dataIndex: 'feeType', + width: 100, + }, + { + title: '费用名称', + dataIndex: 'feeName', + width: 100, + }, + { + title: '金额', + dataIndex: 'totalAmount', + width: 100, + }, + { + title: '币别', + dataIndex: 'currency', + width: 100, + }, + { + title: '未结金额', + dataIndex: 'restAmount', + width: 100, + }, + { + title: '本次结算金额', + dataIndex: 'amount', + width: 100, + }, + { + title: '原始汇率', + dataIndex: 'originalRate', + width: 100, + }, + { + title: '开票金额', + dataIndex: 'invoiceAmount', + width: 100, + }, + { + title: '发票号', + dataIndex: 'invoiceNO', + width: 100, + }, + { + title: '备注', + dataIndex: 'remark', + width: 100, + }, + { + title: '录入方式', + dataIndex: 'inputMethod', + width: 100, + }, +] + +export const freeColum: BasicColumn[] = [ + { + title: '委托编号', + dataIndex: 'customerNo', + width: 100, + }, + { + title: '主提单号', + dataIndex: 'mblno', + width: 100, + }, + { + title: '分提单号', + dataIndex: 'hblno', + width: 100, + }, + { + title: '委托单位', + dataIndex: 'clientName', + width: 100, + }, + { + title: '开船日期', + dataIndex: 'etd', + width: 100, + }, + { + title: '业务来源', + dataIndex: 'sourceName', + width: 100, + }, + { + title: '费用名称', + dataIndex: 'feeName', + width: 100, + }, + { + title: '收付', + dataIndex: 'feeType', + width: 100, + }, + { + title: '费用对象', + dataIndex: 'customerName', + width: 100, + }, + { + title: '结算金额', + dataIndex: 'settlementAmount', + width: 100, + }, + { + title: '原始币别', + dataIndex: 'originalCurrency', + width: 100, + }, + { + title: '原始汇率', + dataIndex: 'originalRate', + width: 100, + }, + { + title: '折算汇率', + dataIndex: 'exchangeRate', + width: 100, + }, + { + title: '原始金额', + dataIndex: 'originalAmount', + width: 100, + }, + { + title: '揽货人', + dataIndex: 'saleName', + width: 100, + }, + { + title: '经营单位', + dataIndex: 'enterprise', + width: 100, + }, + { + title: '报关单号', + dataIndex: 'customNo', + width: 100, + }, + { + title: '会计期间', + dataIndex: 'accountDate', + width: 100, + }, + { + title: '更改单', + dataIndex: 'changeOrder', + width: 100, + }, + { + title: '备注', + dataIndex: 'note', + width: 100, + }, + { + title: '录入方式', + dataIndex: 'inputMethod', + width: 100, + }, + { + title: '所属分部', + dataIndex: 'saleDeptName', + width: 100, + }, + { + title: '船名', + dataIndex: 'changeOrder', + width: 100, + }, + { + title: '航次', + dataIndex: 'vesselName', + width: 100, + }, + { + title: '船公司', + dataIndex: 'carrierName', + width: 100, + }, +] + +export const freeDetailColum: BasicColumn[] = [ + { + title: '收付', + dataIndex: 'feeType', + width: 100, + }, + { + title: '币别', + dataIndex: 'currency', + width: 100, + }, + { + title: '金额', + dataIndex: 'amount', + width: 100, + }, +] \ No newline at end of file diff --git a/src/views/finance/paymentSettlement/paymentSettlementFree/index.vue b/src/views/finance/paymentSettlement/paymentSettlementFree/index.vue index e1a03f04..b4984094 100644 --- a/src/views/finance/paymentSettlement/paymentSettlementFree/index.vue +++ b/src/views/finance/paymentSettlement/paymentSettlementFree/index.vue @@ -1,3 +1,555 @@ \ No newline at end of file +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+ 锁定 +
+
+ 未锁定 +
+
+ 自由结算 + 申请结算 + 发票结算 +
+
+
+ 结算单号:{{ form.settlementNO }} +
+
+
+ + + + + + + + + + + +
+
+ + +
+ + + + \ No newline at end of file diff --git a/src/views/finance/paymentSettlement/paymentSettlementFree/invoiceTable.vue b/src/views/finance/paymentSettlement/paymentSettlementFree/invoiceTable.vue new file mode 100644 index 00000000..d18202fd --- /dev/null +++ b/src/views/finance/paymentSettlement/paymentSettlementFree/invoiceTable.vue @@ -0,0 +1,674 @@ + + + + + \ No newline at end of file From aa5496e8f2ecff231aa0959ab3c4150262aa98ed 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: Sat, 2 Nov 2024 18:33:49 +0800 Subject: [PATCH 04/10] 11/02 --- src/hooks/dict/index.ts | 22 ++++++-- src/views/baseinfo/infoclient/EditColumns.tsx | 14 ++++- .../FeeCustTemplate/TenantAuditStepModal.vue | 10 ++-- .../infoclient/FeeCustTemplate/columns.tsx | 39 +++++++++---- .../infoclient/FeeCustTemplate/feeField.vue | 6 +- src/views/baseinfo/infoclient/columns.tsx | 16 +++++- .../FeeCustTemplate/TenantAuditStepModal.vue | 10 ++-- src/views/fee/FeeCustTemplate/columns.tsx | 55 ++++++++++++++----- src/views/fee/FeeCustTemplate/feeField.vue | 6 +- src/views/system/org/columns.tsx | 5 +- .../taskList/BLConfirmation/index.vue | 41 +++++++------- 11 files changed, 149 insertions(+), 75 deletions(-) diff --git a/src/hooks/dict/index.ts b/src/hooks/dict/index.ts index e91e87dd..6bfa4c06 100644 --- a/src/hooks/dict/index.ts +++ b/src/hooks/dict/index.ts @@ -1,5 +1,5 @@ /* - * @Desc: + * @Desc: * @Author: lijj * @Date: 2024-07-17 08:39:50 */ @@ -15,7 +15,7 @@ export async function feeUnitDict() { let feeUnitDict = [] const ctnDict = await GetCtnSelectList() if (ctnDict.data && ctnDict.data.length) { - const ctn = ctnDict.data.map(item => { + const ctn = ctnDict.data.map((item) => { return { value: item.ediCode, label: item.ctnName, name: item.ctnName } }) feeUnitDict = [...ctn] @@ -25,6 +25,20 @@ export async function feeUnitDict() { return feeUnitDict } +// 费用标准字典 name=>code +export async function feeUnitDict2() { + // 计费标准下拉框数据 + let feeUnitDict = [] + const ctnDict = await GetCtnSelectList() + if (ctnDict.data && ctnDict.data.length) { + const ctn = ctnDict.data.map((item) => { + return { value: item.ctnName, label: item.ctnName, name: item.ctnName } + }) + feeUnitDict = [...ctn] + } + const unitDict = await getDictOption('fee_unit') + feeUnitDict = feeUnitDict.concat(unitDict) + return feeUnitDict +} // 往来单位相关的下拉数据 -export function getOptions(code) { -} \ No newline at end of file +export function getOptions(code) {} diff --git a/src/views/baseinfo/infoclient/EditColumns.tsx b/src/views/baseinfo/infoclient/EditColumns.tsx index 25d9c732..7526f933 100644 --- a/src/views/baseinfo/infoclient/EditColumns.tsx +++ b/src/views/baseinfo/infoclient/EditColumns.tsx @@ -60,11 +60,15 @@ if (res13.succeeded) { }) } let rmbAccountData: any = [] -const res14: API.DataResult = await GetTenantBanks({ currency: 'CNY' }) +const res14: API.DataResult = await GetTenantBanks({ currency: 'RMB' }) if (res14.succeeded) { rmbAccountData = [] res14.data.forEach((e) => { - rmbAccountData.push({ label: `${e.bankName}-${e.bankAccountNo}`, value: e.id, ...e }) + rmbAccountData.push({ + label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}`, + value: e.id, + ...e, + }) }) } let usdAccountData: any = [] @@ -72,7 +76,11 @@ const res15: API.DataResult = await GetTenantBanks({ currency: 'USD' }) if (res15.succeeded) { usdAccountData = [] res15.data.forEach((e) => { - usdAccountData.push({ label: `${e.bankName}-${e.bankAccountNo}`, value: e.id, ...e }) + usdAccountData.push({ + label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}`, + value: e.id, + ...e, + }) }) } export const EditformSchema: FormSchema[] = [ diff --git a/src/views/baseinfo/infoclient/FeeCustTemplate/TenantAuditStepModal.vue b/src/views/baseinfo/infoclient/FeeCustTemplate/TenantAuditStepModal.vue index f0cea9a9..578a667b 100644 --- a/src/views/baseinfo/infoclient/FeeCustTemplate/TenantAuditStepModal.vue +++ b/src/views/baseinfo/infoclient/FeeCustTemplate/TenantAuditStepModal.vue @@ -53,7 +53,7 @@ import { formSchema } from './columns' // 相关接口 import { ApiEdit, ApiBulkEdit, ApiBulkEditDetails, ApiInfo } from './api' - import { feeUnitDict } from '/@/hooks/dict/index' + import { feeUnitDict2 } from '/@/hooks/dict/index' // 提升消息混入 import { useMessage } from '/@/hooks/web/useMessage' import { useUserStore } from '/@/store/modules/user' @@ -110,7 +110,7 @@ setFieldsValue({ ...res.data, }) - const UnitList = await feeUnitDict() + const UnitList = await feeUnitDict2() res.data.details.forEach((item) => { UnitList.forEach((e: any) => { if (e.value == item.unit) { @@ -131,7 +131,7 @@ ...res.data, id: '', }) - const UnitList = await feeUnitDict() + const UnitList = await feeUnitDict2() res.data.details.forEach((item) => { delete item.id UnitList.forEach((e: any) => { @@ -152,7 +152,7 @@ isBulk: true, }) // 添加 对应单位 单票输入 - const UnitList = await feeUnitDict() + const UnitList = await feeUnitDict2() unitArr.value.splice(0) BulkInfoArr.value.splice(0) ids.value.forEach(async (e) => { @@ -207,7 +207,7 @@ setFieldsValue({ ...res.data, }) - const UnitList = await feeUnitDict() + const UnitList = await feeUnitDict2() res.data.details.forEach((item) => { UnitList.forEach((e: any) => { if (e.value == item.unit) { diff --git a/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx b/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx index 452b84eb..e9747d1d 100644 --- a/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx +++ b/src/views/baseinfo/infoclient/FeeCustTemplate/columns.tsx @@ -149,21 +149,26 @@ export const columns: BasicColumn[] = [ }, }, { - dataIndex: 'carrierId', + dataIndex: 'carrier', title: '船公司', - sorter: true, width: 200, - customRender: ({ record }) => { - let name = '' - carrierIdList.value.some((item: any) => { - if (record.carrierId == item.id) { - name = item.cnName - return true - } - }) - return name - }, }, + // { + // dataIndex: 'carrierId', + // title: '船公司', + // sorter: true, + // width: 200, + // customRender: ({ record }) => { + // let name = '' + // carrierIdList.value.some((item: any) => { + // if (record.carrierId == item.id) { + // name = item.cnName + // return true + // } + // }) + // return name + // }, + // }, { dataIndex: 'forwarderId', title: '订舱口', @@ -977,6 +982,16 @@ export const formSchema: FormSchema[] = [ showName: 'cnName', valueField: 'id', resultField: 'data', + onChange: (e, obj) => { + if (e && obj) { + formModel.carrier = obj.label + formModel.carrierId = obj.value + } + if (!e && !obj) { + formModel.carrier = '' + formModel.carrierId = '' + } + }, } }, }, diff --git a/src/views/baseinfo/infoclient/FeeCustTemplate/feeField.vue b/src/views/baseinfo/infoclient/FeeCustTemplate/feeField.vue index 85bf45c1..b9574104 100644 --- a/src/views/baseinfo/infoclient/FeeCustTemplate/feeField.vue +++ b/src/views/baseinfo/infoclient/FeeCustTemplate/feeField.vue @@ -77,7 +77,7 @@ import { getColumns, DeleteDetails, ApiBulkEditDetails } from './api' // import { GetFeeTemplateDetailList, BatchDelFeeTemplateDetail } from '../api' // 引入计费标准字典 - import { feeUnitDict } from '/@/hooks/dict/index' + import { feeUnitDict2 } from '/@/hooks/dict/index' // 引入字典数据 import { getDictOption } from '/@/utils/dictUtil' import AdvancedSearch from '/@/components/Form/src/components/AdvancedSearch.vue' @@ -222,7 +222,7 @@ const SetData = async (data) => { list.value.splice(0) const customerTypeList: any = await getDictOption('djy_cust_prop') - const unitList: any = await feeUnitDict() + const unitList: any = await feeUnitDict2() const unitList2: any = await getDictOption('fee_unit') console.log(unitList, unitList2) @@ -347,7 +347,7 @@ }) process(dict) } else { - const results = await feeUnitDict() + const results = await feeUnitDict2() unitDict.value = results const dict = results.map((item) => { return item.name diff --git a/src/views/baseinfo/infoclient/columns.tsx b/src/views/baseinfo/infoclient/columns.tsx index 952265a6..a5e43b43 100644 --- a/src/views/baseinfo/infoclient/columns.tsx +++ b/src/views/baseinfo/infoclient/columns.tsx @@ -63,12 +63,18 @@ if (res13.succeeded) { }) } let rmbAccountData: any = [] -const res14: API.DataResult = await GetTenantBanks({ currency: 'CNY' }) +const res14: API.DataResult = await GetTenantBanks({ currency: 'RMB' }) if (res14.succeeded) { rmbAccountData = [] res14.data.forEach((e) => { + console.log(e) + if (e.accountName && e.id) { - rmbAccountData.push({ label: `${e.bankName}-${e.bankAccountNo}`, value: e.id, ...e }) + rmbAccountData.push({ + label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}`, + value: e.id, + ...e, + }) } }) } @@ -78,7 +84,11 @@ if (res15.succeeded) { usdAccountData = [] res15.data.forEach((e) => { if (e.accountName && e.id) { - usdAccountData.push({ label: `${e.bankName}-${e.bankAccountNo}`, value: e.id, ...e }) + usdAccountData.push({ + label: `${e.bankName}-${e.accountName}-${e.bankAccountNo}`, + value: e.id, + ...e, + }) } }) } diff --git a/src/views/fee/FeeCustTemplate/TenantAuditStepModal.vue b/src/views/fee/FeeCustTemplate/TenantAuditStepModal.vue index 58abf45a..034f18f1 100644 --- a/src/views/fee/FeeCustTemplate/TenantAuditStepModal.vue +++ b/src/views/fee/FeeCustTemplate/TenantAuditStepModal.vue @@ -53,7 +53,7 @@ import { formSchema } from './columns' // 相关接口 import { ApiEdit, ApiBulkEdit, ApiBulkEditDetails, ApiInfo } from './api' - import { feeUnitDict } from '/@/hooks/dict/index' + import { feeUnitDict2 } from '/@/hooks/dict/index' // 提升消息混入 import { useMessage } from '/@/hooks/web/useMessage' import { useUserStore } from '/@/store/modules/user' @@ -112,7 +112,7 @@ setFieldsValue({ ...res.data, }) - const UnitList = await feeUnitDict() + const UnitList = await feeUnitDict2() res.data.details.forEach((item) => { UnitList.forEach((e: any) => { if (e.value == item.unit) { @@ -154,7 +154,7 @@ ...res.data, id: '', }) - const UnitList = await feeUnitDict() + const UnitList = await feeUnitDict2() res.data.details.forEach((item) => { delete item.id UnitList.forEach((e: any) => { @@ -175,7 +175,7 @@ isBulk: true, }) // 添加 对应单位 单票输入 - const UnitList = await feeUnitDict() + const UnitList = await feeUnitDict2() unitArr.value.splice(0) BulkInfoArr.value.splice(0) ids.value.forEach(async (e) => { @@ -229,7 +229,7 @@ setFieldsValue({ ...res.data, }) - const UnitList = await feeUnitDict() + const UnitList = await feeUnitDict2() res.data.details.forEach((item) => { UnitList.forEach((e: any) => { if (e.value == item.unit) { diff --git a/src/views/fee/FeeCustTemplate/columns.tsx b/src/views/fee/FeeCustTemplate/columns.tsx index e13adf11..faf31b61 100644 --- a/src/views/fee/FeeCustTemplate/columns.tsx +++ b/src/views/fee/FeeCustTemplate/columns.tsx @@ -169,21 +169,26 @@ export const columns: BasicColumn[] = [ }, }, { - dataIndex: 'carrierId', + dataIndex: 'carrier', title: '船公司', - sorter: true, width: 200, - customRender: ({ record }) => { - let name = '' - carrierIdList.value.some((item: any) => { - if (record.carrierId == item.id) { - name = item.cnName - return true - } - }) - return name - }, }, + // { + // dataIndex: 'carrierId', + // title: '船公司', + // sorter: true, + // width: 200, + // customRender: ({ record }) => { + // let name = '' + // carrierIdList.value.some((item: any) => { + // if (record.carrierId == item.id) { + // name = item.cnName + // return true + // } + // }) + // return name + // }, + // }, { dataIndex: 'forwarderId', title: '订舱口', @@ -612,7 +617,7 @@ export const searchFormSchema: FormSchema[] = [ labelSlot: 'carrierId', component: 'ApiSelect', colProps: { span: 4 }, - componentProps: () => { + componentProps: ({ formModel }) => { return { api: GetCarrierSelectList, labelField: 'pinYinCode', @@ -884,13 +889,23 @@ export const viewSearchFormSchema: FormSchema[] = [ labelSlot: 'carrierId', component: 'ApiSelect', colProps: { span: 4 }, - componentProps: () => { + componentProps: ({ formModel }) => { return { api: GetCarrierSelectList, labelField: 'pinYinCode', showName: 'cnName', valueField: 'id', resultField: 'data', + onChange: (e, obj) => { + if (e && obj) { + formModel.carrier = obj.label + formModel.carrierId = obj.value + } + if (!e && !obj) { + formModel.carrier = '' + formModel.carrierId = '' + } + }, } }, }, @@ -1275,13 +1290,23 @@ export const formSchema: FormSchema[] = [ labelSlot: 'carrierId', component: 'ApiSelect', colProps: { span: 6 }, - componentProps: () => { + componentProps: ({ formModel }) => { return { api: GetCarrierSelectList, labelField: 'pinYinCode', showName: 'cnName', valueField: 'id', resultField: 'data', + onChange: (e, obj) => { + if (e && obj) { + formModel.carrier = obj.label + formModel.carrierId = obj.value + } + if (!e && !obj) { + formModel.carrier = '' + formModel.carrierId = '' + } + }, } }, }, diff --git a/src/views/fee/FeeCustTemplate/feeField.vue b/src/views/fee/FeeCustTemplate/feeField.vue index 234b40cc..1575f1bd 100644 --- a/src/views/fee/FeeCustTemplate/feeField.vue +++ b/src/views/fee/FeeCustTemplate/feeField.vue @@ -77,7 +77,7 @@ import { getColumns, DeleteDetails, ApiBulkEditDetails } from './api' // import { GetFeeTemplateDetailList, BatchDelFeeTemplateDetail } from '../api' // 引入计费标准字典 - import { feeUnitDict } from '/@/hooks/dict/index' + import { feeUnitDict2 } from '/@/hooks/dict/index' // 引入字典数据 import { getDictOption } from '/@/utils/dictUtil' import AdvancedSearch from '/@/components/Form/src/components/AdvancedSearch.vue' @@ -222,7 +222,7 @@ const SetData = async (data) => { list.value.splice(0) const customerTypeList: any = await getDictOption('djy_cust_prop') - const unitList: any = await feeUnitDict() + const unitList: any = await feeUnitDict2() const unitList2: any = await getDictOption('fee_unit') console.log(unitList, unitList2) @@ -351,7 +351,7 @@ }) process(dict) } else { - const results = await feeUnitDict() + const results = await feeUnitDict2() unitDict.value = results const dict = results.map((item) => { return item.name diff --git a/src/views/system/org/columns.tsx b/src/views/system/org/columns.tsx index 27843ede..7c7a1708 100644 --- a/src/views/system/org/columns.tsx +++ b/src/views/system/org/columns.tsx @@ -597,7 +597,7 @@ export const BankformSchema: FormSchema[] = [ field: 'currency', label: '币别', component: 'ApiSelect', - defaultValue: 'CNY', + defaultValue: 'RMB', colProps: { span: 12 }, componentProps: () => { return { @@ -609,6 +609,9 @@ export const BankformSchema: FormSchema[] = [ filterOption: (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, + onChange: (e, obj) => { + console.log(e, obj) + }, } }, }, diff --git a/src/views/taskmanage/taskList/BLConfirmation/index.vue b/src/views/taskmanage/taskList/BLConfirmation/index.vue index e12688e5..a056c701 100644 --- a/src/views/taskmanage/taskList/BLConfirmation/index.vue +++ b/src/views/taskmanage/taskList/BLConfirmation/index.vue @@ -39,25 +39,10 @@
- + + 主单确认 +
@@ -69,6 +54,7 @@ GetSeaExportBillManageInfo, BookingOrderGet, SetSteps, + SetTaskStatus, } from '../../api' import Info from './info.vue' import { useMessage } from '/@/hooks/web/useMessage' @@ -105,9 +91,15 @@ } } const RefInfo = ref(null) + const isMainBL = ref(false) async function ClickTasksUnit(data) { activeSteps.value = null activeId.value = data.id + isMainBL.value = false + activeStepsArr.value.splice(0) + if (data.isMainBL) { + isMainBL.value = true + } activeStepsArr.value = data.steps data.steps.forEach((item, index) => { if (!item.isCompleted && activeSteps.value == null) { @@ -156,16 +148,23 @@ ApiData = { ...item } } }) - - ApiData.steps[activeSteps.value].isCompleted = true + if (!isMainBL.value) { + ApiData.steps[activeSteps.value].isCompleted = true + } // 是否自动同步更新主任务状态 (嵇工 说 最好是手动设置一下确保万无一失) ApiData.autoSync = true - const res = await SetSteps(ApiData) + let res: any = null + if (isMainBL.value) { + res = await SetTaskStatus(ApiData) + } else { + res = await SetSteps(ApiData) + } if (res.succeeded) { createMessage.success(res.message) init(true) } } + function FnSetTaskStatus() {}