diff --git a/src/api/business/loading-manage.js b/src/api/business/loading-manage.js
index 6938bc3..fdb3a36 100644
--- a/src/api/business/loading-manage.js
+++ b/src/api/business/loading-manage.js
@@ -24,6 +24,12 @@ export const getDetail = id =>
},
});
+export const getCarrierContracts = () =>
+ request({
+ url: `${baseUrl}/carrier-contracts`,
+ method: 'get',
+ });
+
export const saveDraft = row =>
request({
url: `${baseUrl}/save-draft`,
diff --git a/src/api/business/master-order.js b/src/api/business/master-order.js
index ca13ae0..baa7938 100644
--- a/src/api/business/master-order.js
+++ b/src/api/business/master-order.js
@@ -5,6 +5,8 @@ const baseUrl = '/blade-transport/master-order';
export const getList = (current, size, params) =>
request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
+export const getCarriers = id =>
+ request({ url: `${baseUrl}/carriers`, method: 'get', params: { id } });
export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
export const saveDraft = data => request({ url: `${baseUrl}/draft`, method: 'post', data });
export const copy = id => request({ url: `${baseUrl}/copy`, method: 'post', params: { id } });
diff --git a/src/api/payment/billLedger.js b/src/api/payment/billLedger.js
new file mode 100644
index 0000000..706c051
--- /dev/null
+++ b/src/api/payment/billLedger.js
@@ -0,0 +1,27 @@
+import request from '@/axios';
+
+const baseUrl = '/blade-transport/bill-ledger';
+
+export const getList = (current, size, params) =>
+ request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
+export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
+export const getExpiryCounts = () => request({ url: `${baseUrl}/expiry-counts`, method: 'get' });
+export const getAvailableOptions = (keyword, deptId, selectedId) =>
+ request({
+ url: `${baseUrl}/available-options`,
+ method: 'get',
+ params: { keyword, deptId, selectedId },
+ });
+export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
+export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
+
+export const billTypeOptions = [
+ { label: '开票', value: 'issued' },
+ { label: '收票', value: 'received' },
+];
+
+export const maturityStatusOptions = [
+ { label: '未到期', value: 'unexpired' },
+ { label: '今日到期', value: 'due_today' },
+ { label: '已到期', value: 'expired' },
+];
diff --git a/src/api/payment/billPayment.js b/src/api/payment/billPayment.js
new file mode 100644
index 0000000..1b378f2
--- /dev/null
+++ b/src/api/payment/billPayment.js
@@ -0,0 +1,21 @@
+import request from '@/axios';
+
+const baseUrl = '/blade-transport/bill-payment';
+
+export const getList = (current, size, params) =>
+ request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
+export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
+export const save = data => request({ url: `${baseUrl}/save`, method: 'post', data });
+export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
+export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
+export const approve = data => request({ url: `${baseUrl}/approve`, method: 'post', data });
+export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'post', data });
+export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
+
+export const approvalStatusOptions = [
+ { label: '草稿', value: 'draft' },
+ { label: '审批中', value: 'reviewing' },
+ { label: '已驳回', value: 'returned' },
+ { label: '审批通过', value: 'approved' },
+ { label: '已作废', value: 'voided' },
+];
diff --git a/src/api/payment/invoiceApplication.js b/src/api/payment/invoiceApplication.js
new file mode 100644
index 0000000..806a89f
--- /dev/null
+++ b/src/api/payment/invoiceApplication.js
@@ -0,0 +1,38 @@
+import request from '@/axios';
+
+const baseUrl = '/blade-transport/invoice-application';
+
+export const getList = (current, size, params) =>
+ request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
+export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
+export const getSettlementCandidates = keyword =>
+ request({ url: `${baseUrl}/settlement-candidates`, method: 'get', params: { keyword } });
+export const getSettlementDetails = settlementIds =>
+ request({ url: `${baseUrl}/settlement-details`, method: 'get', params: { settlementIds } });
+export const getReceiverInformation = settlementIds =>
+ request({ url: `${baseUrl}/receiver-information`, method: 'get', params: { settlementIds } });
+export const save = data => request({ url: `${baseUrl}/save`, method: 'post', data });
+export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
+export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
+export const approve = data => request({ url: `${baseUrl}/approve`, method: 'post', data });
+export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'post', data });
+export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
+export const syncKingdee = id =>
+ request({ url: `${baseUrl}/sync-kingdee`, method: 'post', params: { id } });
+
+export const invoiceTypeOptions = [
+ { label: '电子专票', value: 'electronic_special' },
+ { label: '电子普票', value: 'electronic_normal' },
+];
+export const approvalStatusOptions = [
+ { label: '草稿', value: 'draft' },
+ { label: '审批中', value: 'reviewing' },
+ { label: '审批通过', value: 'approved' },
+ { label: '已驳回', value: 'returned' },
+ { label: '已作废', value: 'voided' },
+];
+export const kingdeeStatusOptions = [
+ { label: '未同步', value: 'unsynced' },
+ { label: '已同步', value: 'synced' },
+ { label: '同步失败', value: 'failed' },
+];
diff --git a/src/api/payment/invoiceReceipt.js b/src/api/payment/invoiceReceipt.js
new file mode 100644
index 0000000..d4cf692
--- /dev/null
+++ b/src/api/payment/invoiceReceipt.js
@@ -0,0 +1,43 @@
+import request from '@/axios';
+
+const baseUrl = '/blade-transport/invoice-receipt';
+
+export const getList = (current, size, params) =>
+ request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
+export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
+export const getInvoicePool = keyword =>
+ request({ url: `${baseUrl}/invoice-pool`, method: 'get', params: { keyword } });
+export const getSettlementCandidates = (keyword, receiptId) =>
+ request({
+ url: `${baseUrl}/settlement-candidates`,
+ method: 'get',
+ params: { keyword, receiptId },
+ });
+export const getReferenceInformation = settlementIds =>
+ request({
+ url: `${baseUrl}/reference-information`,
+ method: 'get',
+ params: { settlementIds },
+ });
+export const save = data => request({ url: `${baseUrl}/save`, method: 'post', data });
+export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
+export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
+export const approve = data => request({ url: `${baseUrl}/approve`, method: 'post', data });
+export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'post', data });
+export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
+export const syncKingdee = id =>
+ request({ url: `${baseUrl}/sync-kingdee`, method: 'post', params: { id } });
+
+export const approvalStatusOptions = [
+ { label: '草稿', value: 'draft' },
+ { label: '审批中', value: 'reviewing' },
+ { label: '审批通过', value: 'approved' },
+ { label: '已驳回', value: 'returned' },
+ { label: '已作废', value: 'voided' },
+];
+
+export const kingdeeStatusOptions = [
+ { label: '未同步', value: 'unsynced' },
+ { label: '已同步', value: 'synced' },
+ { label: '同步失败', value: 'failed' },
+];
diff --git a/src/api/payment/paymentApplication.js b/src/api/payment/paymentApplication.js
new file mode 100644
index 0000000..3031f6f
--- /dev/null
+++ b/src/api/payment/paymentApplication.js
@@ -0,0 +1,37 @@
+import request from '@/axios';
+
+const baseUrl = '/blade-transport/payment-application';
+export const getList = (current, size, params) =>
+ request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
+export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
+export const save = data => request({ url: `${baseUrl}/save`, method: 'post', data });
+export const remove = id => request({ url: `${baseUrl}/remove`, method: 'post', params: { id } });
+export const submit = data => request({ url: `${baseUrl}/submit`, method: 'post', data });
+export const approve = data => request({ url: `${baseUrl}/approve`, method: 'post', data });
+export const returnBill = data => request({ url: `${baseUrl}/return`, method: 'post', data });
+export const voidBill = data => request({ url: `${baseUrl}/void`, method: 'post', data });
+export const syncKingdee = id =>
+ request({ url: `${baseUrl}/sync-kingdee`, method: 'post', params: { id } });
+
+export const paymentTypeOptions = [
+ { label: '项目预付', value: 'project_advance' },
+ { label: '进度预付', value: 'progress_advance' },
+ { label: '结算付款', value: 'settlement_payment' },
+];
+export const paymentMethodOptions = [
+ { label: '银行转账', value: 'bank_transfer' },
+ { label: '银行承兑汇票', value: 'bank_draft' },
+ { label: '商业承兑汇票', value: 'commercial_draft' },
+];
+export const approvalStatusOptions = [
+ { label: '草稿', value: 'draft' },
+ { label: '审批中', value: 'reviewing' },
+ { label: '审批通过', value: 'approved' },
+ { label: '已驳回', value: 'returned' },
+ { label: '已作废', value: 'voided' },
+];
+export const kingdeeStatusOptions = [
+ { label: '未生成', value: 'unsynced' },
+ { label: '已生成', value: 'synced' },
+ { label: '生成失败', value: 'failed' },
+];
diff --git a/src/api/payment/receiptClaimRecord.js b/src/api/payment/receiptClaimRecord.js
new file mode 100644
index 0000000..4bda63f
--- /dev/null
+++ b/src/api/payment/receiptClaimRecord.js
@@ -0,0 +1,21 @@
+import request from '@/axios';
+
+const baseUrl = '/blade-transport/receipt-claim-record';
+
+export const getList = (current, size, params) =>
+ request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
+export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
+export const updateAttachments = data =>
+ request({ url: `${baseUrl}/attachments`, method: 'post', data });
+export const voidClaim = id => request({ url: `${baseUrl}/void`, method: 'post', params: { id } });
+
+export const claimStatusOptions = [
+ { label: '已认领', value: 'claimed' },
+ { label: '已作废', value: 'voided' },
+];
+
+export const kingdeeBillStatusOptions = [
+ { label: '未生成', value: 'none' },
+ { label: '审核通过', value: 'approved' },
+ { label: '处理失败', value: 'failed' },
+];
diff --git a/src/api/payment/receiptFlow.js b/src/api/payment/receiptFlow.js
new file mode 100644
index 0000000..64cec7b
--- /dev/null
+++ b/src/api/payment/receiptFlow.js
@@ -0,0 +1,21 @@
+import request from '@/axios';
+
+const baseUrl = '/blade-transport/receipt-flow';
+
+export const getList = (current, size, params) =>
+ request({ url: `${baseUrl}/list`, method: 'get', params: { current, size, ...params } });
+export const getDetail = id => request({ url: `${baseUrl}/detail`, method: 'get', params: { id } });
+export const getSettlementCandidates = (keyword, flowId) =>
+ request({
+ url: `${baseUrl}/settlement-candidates`,
+ method: 'get',
+ params: { keyword, flowId },
+ });
+export const claim = data => request({ url: `${baseUrl}/claim`, method: 'post', data });
+export const sync = () => request({ url: `${baseUrl}/sync`, method: 'post' });
+
+export const claimStatusOptions = [
+ { label: '未认领', value: 'unclaimed' },
+ { label: '部分认领', value: 'partial' },
+ { label: '认领完成', value: 'claimed' },
+];
diff --git a/src/api/settlement/receivable-payable-detail.js b/src/api/settlement/receivable-payable-detail.js
index 3a6e871..3e9c2e2 100644
--- a/src/api/settlement/receivable-payable-detail.js
+++ b/src/api/settlement/receivable-payable-detail.js
@@ -15,21 +15,16 @@ export const getChangeRecords = (current, size, params) =>
params: { current, size, ...params },
});
-export const updateFee = data =>
- request({ url: `${baseUrl}/update-fee`, method: 'post', data });
+export const updateFee = data => request({ url: `${baseUrl}/update-fee`, method: 'post', data });
export const getUpdateFeeContracts = params =>
request({ url: `${baseUrl}/update-fee-contracts`, method: 'get', params });
-export const adjustFee = data =>
- request({ url: `${baseUrl}/adjust-fee`, method: 'post', data });
+export const adjustFee = data => request({ url: `${baseUrl}/adjust-fee`, method: 'post', data });
export const calculateAdjustedFee = data =>
request({ url: `${baseUrl}/calculate-adjusted-fee`, method: 'post', data });
-export const transferSettlement = data =>
- request({ url: `${baseUrl}/transfer-settlement`, method: 'post', data });
-
export const getTransferCandidates = (current, size, params) =>
request({
url: `${baseUrl}/transfer-candidates`,
diff --git a/src/option/business/contract-manage.js b/src/option/business/contract-manage.js
index f1dafee..eaaae45 100644
--- a/src/option/business/contract-manage.js
+++ b/src/option/business/contract-manage.js
@@ -40,30 +40,13 @@ export const config = {
enableAllDept: true,
allDeptReadonly: false,
batchDelete: false,
- enableContractForm: true,
enableProjectSelect: true,
projectQueryParams: {
approvalStatuses: 'approved,change_approved',
},
- enableContractPeriod: true,
- enableContractFileUpload: true,
- enableCurrentUserHandler: true,
- enableBillingPlan: true,
- enableSettlementRule: true,
- enableReconciliation: false,
- enableFeeGenerationMode: true,
- enableSettlementConfigTabs: true,
- enablePaymentRatio: true,
- enableAttachmentTable: true,
- enableChangeRecord: true,
- enableOrganizationSelect: true,
- enableContractCreateActions: true,
- enableContractExpiryTags: true,
actions: ['copy'],
statusProp: 'approvalStatus',
statusTextProp: 'approvalStatusName',
- customMenuActions: true,
- contractNameDetail: true,
detailSections: [
{
title: '基本信息',
diff --git a/src/option/payment/billLedger.js b/src/option/payment/billLedger.js
new file mode 100644
index 0000000..bb320c7
--- /dev/null
+++ b/src/option/payment/billLedger.js
@@ -0,0 +1,11 @@
+export const billLedgerTableColumns = [
+ { prop: 'billNo', label: '票据编号', minWidth: 170 },
+ { prop: 'receiverName', label: '收票单位', minWidth: 170 },
+ { prop: 'issuerName', label: '出票单位', minWidth: 170 },
+ { prop: 'billTypeName', label: '汇票类型', minWidth: 110 },
+ { prop: 'faceAmount', label: '票面金额', minWidth: 130, money: true },
+ { prop: 'availableBalance', label: '可用余额', minWidth: 130, money: true },
+ { prop: 'issueDate', label: '出票日期', minWidth: 120 },
+ { prop: 'maturityDate', label: '到期日期', minWidth: 120 },
+ { prop: 'remark', label: '备注', minWidth: 180 },
+];
diff --git a/src/option/payment/billPayment.js b/src/option/payment/billPayment.js
new file mode 100644
index 0000000..b91bc55
--- /dev/null
+++ b/src/option/payment/billPayment.js
@@ -0,0 +1,12 @@
+export const billPaymentTableColumns = [
+ { prop: 'paymentNo', label: '单据号', minWidth: 160 },
+ { prop: 'deptName', label: '使用部门', minWidth: 150 },
+ { prop: 'paymentDate', label: '付款日期', minWidth: 120 },
+ { prop: 'usedAmount', label: '使用金额', minWidth: 130, money: true },
+ { prop: 'remark', label: '备注', minWidth: 180 },
+ { prop: 'approvalStatusName', label: '单据状态', minWidth: 110, status: true },
+ { prop: 'currentNode', label: '当前节点', minWidth: 120 },
+ { prop: 'currentProcessor', label: '当前处理人', minWidth: 130 },
+ { prop: 'createUserName', label: '创建人', minWidth: 110 },
+ { prop: 'createTime', label: '创建时间', minWidth: 170 },
+];
diff --git a/src/option/payment/invoiceApplication.js b/src/option/payment/invoiceApplication.js
new file mode 100644
index 0000000..40f8e17
--- /dev/null
+++ b/src/option/payment/invoiceApplication.js
@@ -0,0 +1,34 @@
+export const invoiceApplicationTableColumns = [
+ { prop: 'applicationNo', label: '单据号', minWidth: 170, link: true },
+ { prop: 'settlementNos', label: '结算单号', minWidth: 190, link: true },
+ { prop: 'projectName', label: '所属项目', minWidth: 140 },
+ { prop: 'deptName', label: '所属组织', minWidth: 140 },
+ { prop: 'issuerName', label: '开票方', minWidth: 150 },
+ { prop: 'receiverName', label: '受票方', minWidth: 150 },
+ { prop: 'invoiceAmount', label: '开票金额', minWidth: 130, money: true },
+ { prop: 'createUserName', label: '创建人', minWidth: 110 },
+ { prop: 'createTime', label: '创建时间', minWidth: 170 },
+ { prop: 'approvalStatusName', label: '状态', minWidth: 110, status: true },
+ { prop: 'currentNode', label: '当前节点', minWidth: 130 },
+ { prop: 'currentProcessor', label: '当前处理人', minWidth: 130 },
+ { prop: 'kingdeeBillNo', label: '金蝶单据号', minWidth: 150 },
+ { prop: 'kingdeeStatusName', label: '金蝶单据状态', minWidth: 140 },
+];
+
+export const invoiceApplicationDetailColumns = [
+ { prop: 'documentNo', label: '单据号', minWidth: 180, link: true },
+ { prop: 'waybillNo', label: '运单号', minWidth: 160, link: true },
+ { prop: 'vehicleNo', label: '车号', minWidth: 120 },
+ { prop: 'departureAddress', label: '发货地址', minWidth: 180 },
+ { prop: 'arrivalAddress', label: '到货地址', minWidth: 180 },
+ { prop: 'actualDepartureTime', label: '实际发货时间', minWidth: 170 },
+ { prop: 'actualCompletionTime', label: '实际完成时间', minWidth: 170 },
+ { prop: 'transportType', label: '运输类型', minWidth: 120 },
+ { prop: 'cargoName', label: '货物名称', minWidth: 140 },
+ { prop: 'cargoType', label: '货物类型', minWidth: 130 },
+ { prop: 'transportQuantity', label: '运输总量', minWidth: 120 },
+ { prop: 'mileage', label: '里程(KM)', minWidth: 120 },
+ { prop: 'batchNo', label: '批次号', minWidth: 120 },
+ { prop: 'freightAmount', label: '运费', minWidth: 120, money: true },
+ { prop: 'feeItemsJson', label: '费用项目', minWidth: 180 },
+];
diff --git a/src/option/payment/invoiceReceipt.js b/src/option/payment/invoiceReceipt.js
new file mode 100644
index 0000000..b1ca9e2
--- /dev/null
+++ b/src/option/payment/invoiceReceipt.js
@@ -0,0 +1,16 @@
+export const invoiceReceiptTableColumns = [
+ { prop: 'invoiceNo', label: '发票号', minWidth: 180, link: true },
+ { prop: 'invoiceDate', label: '开票日期', minWidth: 120 },
+ { prop: 'projectName', label: '所属项目', minWidth: 140 },
+ { prop: 'deptName', label: '所属组织', minWidth: 150 },
+ { prop: 'payerName', label: '付款方', minWidth: 150 },
+ { prop: 'payeeName', label: '收款方', minWidth: 150 },
+ { prop: 'invoiceAmount', label: '收票金额', minWidth: 130, money: true },
+ { prop: 'approvalStatusName', label: '审核状态', minWidth: 110, status: true },
+ { prop: 'currentNode', label: '当前节点', minWidth: 130 },
+ { prop: 'currentProcessor', label: '当前处理人', minWidth: 130 },
+ { prop: 'createUserName', label: '创建人', minWidth: 110 },
+ { prop: 'createTime', label: '创建时间', minWidth: 170 },
+ { prop: 'kingdeeBillNo', label: '金蝶单据号', minWidth: 150 },
+ { prop: 'kingdeeStatusName', label: '金蝶单据状态', minWidth: 140 },
+];
diff --git a/src/option/payment/paymentApplication.js b/src/option/payment/paymentApplication.js
new file mode 100644
index 0000000..ed650f7
--- /dev/null
+++ b/src/option/payment/paymentApplication.js
@@ -0,0 +1,20 @@
+export const paymentApplicationTableColumns = [
+ { prop: 'paymentNo', label: '单据号', minWidth: 140, link: true },
+ { prop: 'paymentTypeName', label: '付款类型', minWidth: 110 },
+ { prop: 'projectName', label: '所属项目', minWidth: 140 },
+ { prop: 'deptName', label: '所属组织', minWidth: 120 },
+ { prop: 'contractNo', label: '合同编号', minWidth: 130 },
+ { prop: 'contractName', label: '合同名称', minWidth: 140 },
+ { prop: 'payerName', label: '付款方', minWidth: 130 },
+ { prop: 'payeeName', label: '收款方', minWidth: 130 },
+ { prop: 'appliedAmount', label: '申请付款金额', minWidth: 140, money: true },
+ { prop: 'paidAmount', label: '已付款金额', minWidth: 130, money: true },
+ { prop: 'matchedInvoiceAmount', label: '匹配发票金额', minWidth: 130, money: true },
+ { prop: 'applicantName', label: '申请人', minWidth: 100 },
+ { prop: 'applyDate', label: '申请日期', minWidth: 120 },
+ { prop: 'approvalStatusName', label: '审核状态', minWidth: 110, status: true },
+ { prop: 'currentNode', label: '当前节点', minWidth: 120 },
+ { prop: 'currentProcessor', label: '当前处理人', minWidth: 120 },
+ { prop: 'kingdeeBillNo', label: '金蝶单据号', minWidth: 130 },
+ { prop: 'kingdeeStatusName', label: '金蝶单据状态', minWidth: 130 },
+];
diff --git a/src/option/payment/receiptClaimRecord.js b/src/option/payment/receiptClaimRecord.js
new file mode 100644
index 0000000..d1f1d96
--- /dev/null
+++ b/src/option/payment/receiptClaimRecord.js
@@ -0,0 +1,17 @@
+export const receiptClaimRecordTableColumns = [
+ { prop: 'receiptNoticeNo', label: '认领通知单', minWidth: 150, link: true },
+ { prop: 'payerName', label: '付款人', minWidth: 130 },
+ { prop: 'receiptAmount', label: '付款金额', minWidth: 130, money: true },
+ { prop: 'counterpartyName', label: '对方户名', minWidth: 150 },
+ { prop: 'counterpartyAccount', label: '对方账号', minWidth: 170 },
+ { prop: 'counterpartyBank', label: '对方开户行', minWidth: 150 },
+ { prop: 'summary', label: '摘要', minWidth: 160 },
+ { prop: 'transactionTime', label: '交易时间', minWidth: 170 },
+ { prop: 'claimAmount', label: '认领金额', minWidth: 130, money: true },
+ { prop: 'claimDate', label: '认领日期', minWidth: 120 },
+ { prop: 'claimerName', label: '认领人', minWidth: 120 },
+ { prop: 'claimerDeptName', label: '所属组织', minWidth: 150 },
+ { prop: 'claimStatusName', label: '状态', minWidth: 110, status: true },
+ { prop: 'kingdeeBillNo', label: '金蝶单据号', minWidth: 170 },
+ { prop: 'kingdeeBillStatusName', label: '金蝶单据状态', minWidth: 140 },
+];
diff --git a/src/option/payment/receiptFlow.js b/src/option/payment/receiptFlow.js
new file mode 100644
index 0000000..f54c7fe
--- /dev/null
+++ b/src/option/payment/receiptFlow.js
@@ -0,0 +1,12 @@
+export const receiptFlowTableColumns = [
+ { prop: 'receiptNoticeNo', label: '认领通知单', minWidth: 150 },
+ { prop: 'payerName', label: '付款人', minWidth: 130 },
+ { prop: 'receiptAmount', label: '付款金额', minWidth: 130, money: true },
+ { prop: 'counterpartyName', label: '对方户名', minWidth: 150 },
+ { prop: 'counterpartyAccount', label: '对方账号', minWidth: 170 },
+ { prop: 'counterpartyBank', label: '对方开户行', minWidth: 150 },
+ { prop: 'summary', label: '摘要', minWidth: 160 },
+ { prop: 'transactionTime', label: '交易时间', minWidth: 170 },
+ { prop: 'claimStatusName', label: '认领状态', minWidth: 110, status: true },
+ { prop: 'claimedAmount', label: '已认领金额', minWidth: 130, money: true },
+];
diff --git a/src/router/views/index.js b/src/router/views/index.js
index fd2018f..7149479 100644
--- a/src/router/views/index.js
+++ b/src/router/views/index.js
@@ -2,6 +2,120 @@ import Layout from '@/page/index/index.vue';
import Store from '@/store/';
export default [
+ {
+ path: '/payment/bill-payment/form',
+ component: Layout,
+ children: [
+ {
+ path: '',
+ name: '汇票付款表单',
+ meta: { keepAlive: false, activeMenu: '/payment/bill-payment' },
+ component: () => import('@/views/payment/bill-payment-form.vue'),
+ },
+ ],
+ },
+ {
+ path: '/payment/bill-ledger/form',
+ component: Layout,
+ children: [
+ {
+ path: '',
+ name: '汇票台账表单',
+ meta: { keepAlive: false, activeMenu: '/payment/bill-ledger' },
+ component: () => import('@/views/payment/bill-ledger-form.vue'),
+ },
+ ],
+ },
+ {
+ path: '/payment/receipt-claim-record/form',
+ component: Layout,
+ children: [
+ {
+ path: '',
+ name: '认领记录详情',
+ meta: { keepAlive: false, activeMenu: '/payment/receipt-claim-record' },
+ component: () => import('@/views/payment/receipt-claim-record-form.vue'),
+ },
+ ],
+ },
+ {
+ path: '/payment/receipt-flow/form',
+ component: Layout,
+ children: [
+ {
+ path: '',
+ name: '收款流水认领',
+ meta: { keepAlive: false, activeMenu: '/payment/receipt-flow' },
+ component: () => import('@/views/payment/receipt-flow-form.vue'),
+ },
+ ],
+ },
+ {
+ path: '/payment/invoice-receipt/form',
+ component: Layout,
+ children: [
+ {
+ path: '',
+ name: '收票登记',
+ meta: { keepAlive: false, activeMenu: '/payment/invoice-receipt' },
+ component: () => import('@/views/payment/invoice-receipt-form.vue'),
+ },
+ ],
+ },
+ {
+ path: '/payment/invoice-application/form',
+ component: Layout,
+ children: [
+ {
+ path: '',
+ name: '开票申请',
+ meta: { keepAlive: false, activeMenu: '/payment/invoice-application' },
+ component: () => import('@/views/payment/invoice-application-form.vue'),
+ },
+ ],
+ },
+ {
+ path: '/payment/payment-application/form',
+ component: Layout,
+ children: [
+ {
+ path: '',
+ name: '付款申请',
+ meta: { keepAlive: false, activeMenu: '/payment/payment-application' },
+ component: () => import('@/views/payment/payment-application-form.vue'),
+ },
+ ],
+ },
+ {
+ path: '/settlement/pre-settlement/form',
+ component: Layout,
+ children: [
+ {
+ path: '',
+ name: '新增编辑预结算',
+ meta: {
+ keepAlive: false,
+ activeMenu: '/settlement/pre-settlement',
+ },
+ component: () => import('@/views/settlement/pre-settlement-form.vue'),
+ },
+ ],
+ },
+ {
+ path: '/settlement/formal-settlement/form',
+ component: Layout,
+ children: [
+ {
+ path: '',
+ name: '新增编辑正式结算',
+ meta: {
+ keepAlive: false,
+ activeMenu: '/settlement/formal-settlement',
+ },
+ component: () => import('@/views/settlement/formal-settlement-form.vue'),
+ },
+ ],
+ },
{
path: '/business/contract-manage/form',
component: Layout,
diff --git a/src/utils/settlement-transfer.js b/src/utils/settlement-transfer.js
new file mode 100644
index 0000000..71003e2
--- /dev/null
+++ b/src/utils/settlement-transfer.js
@@ -0,0 +1,25 @@
+const STORAGE_PREFIX = 'settlement-transfer-';
+
+const storageKey = token => `${STORAGE_PREFIX}${token}`;
+
+export const createSettlementTransfer = payload => {
+ const token = `${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
+ window.sessionStorage.setItem(storageKey(token), JSON.stringify(payload));
+ return token;
+};
+
+export const readSettlementTransfer = token => {
+ if (!token) return null;
+ const value = window.sessionStorage.getItem(storageKey(token));
+ if (!value) return null;
+ try {
+ return JSON.parse(value);
+ } catch (error) {
+ removeSettlementTransfer(token);
+ return null;
+ }
+};
+
+export const removeSettlementTransfer = token => {
+ if (token) window.sessionStorage.removeItem(storageKey(token));
+};
diff --git a/src/views/business/components/business-crud-page.vue b/src/views/business/components/business-crud-page.vue
index 3372b81..15a178d 100644
--- a/src/views/business/components/business-crud-page.vue
+++ b/src/views/business/components/business-crud-page.vue
@@ -3,7 +3,6 @@
:class="[
'business-crud-page',
{
- 'business-crud-page--contract-form': isContractFormPage,
'business-crud-page--form-page': isStandaloneFormPage,
},
]"
@@ -29,7 +28,6 @@
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
- @search-icon-change="handleSearchIconChange"
@on-load="onLoad"
>
@@ -37,7 +35,7 @@
type="primary"
:icon="actionButtonLikeSearch ? undefined : 'el-icon-plus'"
v-if="canCreate"
- @click="openContractFormPage('add')"
+ @click="openBusinessForm('add')"
>{{ config.createText || '新增' }}
-
- {{ row.contractName }}
-
- {{ row.contractName || '-' }}
+ {{ row.contractName || '-' }}
@@ -184,34 +175,8 @@
模板信息
- 合同类型
-
项目
-
-
-
签约类型:
-
-
-
-
-
- {{ item.label }}({{ contractExpiryStats[item.statKey] || 0 }})
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
任务信息
-
- visible && loadOrganizationOptions()"
- @change="handleOrganizationChange"
- />
-
-
-
- handleAmountInput('applyLimit', value)"
- />
-
-
-
-
-
- 至
-
-
-
-
-
-
- handleIntegerInput('copyCount', value)"
- />
- 份
-
-
-
-
-
- handleIntegerInput('paymentDays', value)"
- />
- 天
-
-
-
-
- 合同文件
-
-
-
-
-
-
-
- 批量下载
-
-
-
-
-
-
-
-
- {{ row.originalName || row.name }}
-
-
-
-
- {{ formatFileSize(row.size) }}
-
-
-
-
-
-
- 删除
-
- 下载
-
-
-
-
-
-
计费信息
@@ -2039,16 +1829,8 @@
-
{{ isContractConfig ? '费用生成模式' : '自动生成费用明细' }}
-
- 系统生成
- 手动生成
-
-
+ 自动生成费用明细
+
开启
关闭
@@ -2088,10 +1870,6 @@
-
-
-
-
自动生成结算单
@@ -2196,54 +1974,6 @@
-
- 付款比例设置
-
-
-
-
-
- 非必填;配置付款比例时,合计必须等于100%。
-
-
-
-
-
-
-
- %
-
-
-
-
-
-
-
-
-
- 删除
- -
-
-
-
-
- 添加
-
-
-
-
{{ config.attachmentTitle || '其它附件' }}
@@ -2316,38 +2046,6 @@
-
- 变更记录
-
-
-
-
-
-
-
-
-
-
-
-
- 流程
-
-
-
-
-
关闭
-
-
- 保存
-
-
- 提交临时合同
-
-
- 提交正式合同
-
-
-
-
-
-
- {{ displayStatus(row, 'contractStage') }}
-
-
-
- {{ action.label }}
-
-
-
+
详情
@@ -2461,7 +2116,7 @@
>
查看
-
+
编辑
@@ -2991,122 +2646,7 @@
:key="section.title"
:title="section.title"
>
-
-
计费信息
-
-
- {{ formatDetailValue(detailRow, 'feeGenerationMode') }}
-
-
- {{ formatDetailValue(detailRow, 'settlementMode') }}
-
-
-
-
-
-
- {{ row.defaultPlan ? '是' : '否' }}
-
-
-
-
-
- 详情
-
-
-
-
-
-
结算单规则
-
-
-
-
- {{ Number(row.autoGenerate) === 1 ? '开启' : '关闭' }}
-
-
-
- {{ row.billStartDate || '-' }}
-
-
- {{ row.settlementType || '-' }}
-
-
- {{ row.billCycleType || '-' }}
-
-
-
- {{ row.billCutoffDay ? `${row.billCutoffDay}日` : '-' }}
-
-
-
-
- {{ row.cycleDays ? `${row.cycleDays}天` : '-' }}
-
-
-
-
-
付款比例设置
-
-
-
-
-
- {{
- row.ratioLimit === '' || row.ratioLimit == null ? '-' : `${row.ratioLimit}%`
- }}
-
-
-
- {{ row.remark || '-' }}
-
-
-
-
+
-
+
@@ -3860,7 +3404,9 @@
class-name="business-crud-page__dispatch-driver-column"
>
- {{ formatDispatchDriver(row) }}
+ {{
+ formatDispatchDriver(row)
+ }}
{
if (boxType === 'edit') {
- rowUpdate?.(row, undefined, hide, undefined);
+ // Avue form passes its state-reset callback as the second argument. Keep it
+ // available as the failure callback as well, otherwise a rejected request
+ // leaves the standalone form permanently disabled.
+ rowUpdate?.(row, undefined, hide, hide);
} else {
- rowSave?.(row, hide, undefined);
+ rowSave?.(row, hide, hide);
}
};
const slots = Object.fromEntries(
@@ -5652,7 +5200,11 @@ const PageAvueForm = {
children.push(h('div', { class: 'archive-page-form__title' }, this.formPageTitle));
}
children.push(h(resolveComponent('avue-form'), attrs, slots));
- return h('div', { class: attrs.option?.dialogCustomClass || 'business-crud-form-page-dialog' }, children);
+ return h(
+ 'div',
+ { class: attrs.option?.dialogCustomClass || 'business-crud-form-page-dialog' },
+ children
+ );
},
};
@@ -5736,12 +5288,6 @@ const defaultSettlementRule = () => ({
cycleDays: '',
});
-const defaultPaymentRatio = () => ({
- paymentTerm: '',
- ratioLimit: '',
- remark: '',
-});
-
const defaultReconciliation = () => ({
skipReconciliation: 1,
reconciliationMode: '明细逐行核对',
@@ -5867,10 +5413,6 @@ export default {
type: [String, Number],
default: null,
},
- contractFormPage: {
- type: Boolean,
- default: false,
- },
standaloneFormPage: {
type: Boolean,
default: false,
@@ -5946,21 +5488,14 @@ export default {
draftSaveLoading: false,
crudDialogType: '',
defaultDialogButtons: null,
- contractCreateActionLoading: '',
transportPlanCreateActionLoading: '',
option: (() => {
const opt = this.cloneOption(this.crudOption, estimateMenuButtonCount(this.config));
if (this.menuWidth != null) opt.menuWidth = this.menuWidth;
- if (
- (this.contractFormPage && this.$route.path === '/business/contract-manage/form') ||
- (this.standaloneFormPage && standaloneBusinessFormPaths.includes(this.$route.path))
- ) {
+ if (this.standaloneFormPage && standaloneBusinessFormPaths.includes(this.$route.path)) {
opt.dialogAppendToBody = false;
opt.dialogModal = false;
- opt.dialogCustomClass =
- this.contractFormPage && this.$route.path === '/business/contract-manage/form'
- ? 'contract-manage-form-dialog'
- : 'business-crud-form-page-dialog';
+ opt.dialogCustomClass = 'business-crud-form-page-dialog';
opt.dialogTop = '0';
opt.dialogWidth = '100%';
} else if (!opt.dialogCustomClass) {
@@ -5974,16 +5509,8 @@ export default {
projectLoading: false,
contractOptions: [],
contractLoading: false,
- contractPartyAOptions: [],
- contractPartyBOptions: [],
- contractPartyLoading: false,
- contractPartyRequestId: 0,
shippingPlanOptions: [],
shippingPlanLoading: false,
- selectedOrganizationId: '',
- organizationOptions: [],
- organizationFlatOptions: [],
- organizationLoading: false,
addressTypeOptions,
flowBox: false,
flowUrl: '',
@@ -6004,8 +5531,6 @@ export default {
selectedDispatchItemAttachmentRows: [],
attachmentRows: [],
selectedAttachmentRows: [],
- contractFileRows: [],
- selectedContractFileRows: [],
attachmentImagePreviewVisible: false,
attachmentImagePreviewUrls: [],
attachmentImagePreviewIndex: 0,
@@ -6104,12 +5629,7 @@ export default {
cargoImportRows: [],
billingPlanRows: [],
settlementRuleForm: defaultSettlementRule(),
- preSettlementRuleForm: defaultSettlementRule(),
- formalSettlementRuleForm: defaultSettlementRule(),
- settlementConfigTab: 'pre',
settlementRuleErrors: {},
- paymentRatioRows: [],
- changeRecordRows: [],
billingPlanBox: false,
billingPlanViewOnly: false,
billingPlanMode: 'add',
@@ -6186,17 +5706,7 @@ export default {
total: 0,
},
selectionList: [],
- contractExpiryScope: '',
- contractSignType: '',
- searchExpanded: false,
attachmentUploadMode: false,
- contractExpiryStats: {
- all: 0,
- within30: 0,
- within90: 0,
- over90: 0,
- expired: 0,
- },
standaloneFormKey: '',
};
},
@@ -6207,9 +5717,6 @@ export default {
if (this.config.enableProjectSelect) {
this.loadProjectOptions();
}
- if (this.config.enableOrganizationSelect) {
- this.loadOrganizationOptions();
- }
if (this.config.enableBillingPlan) {
this.ensureBillingFeeCategoryOptions();
this.ensureBillingUnitOptions();
@@ -6239,30 +5746,14 @@ export default {
detailSections() {
return this.config.detailSections || [];
},
- contractDetailSettlementRows() {
- if (!this.isContractConfig) return [];
- return [
- { configName: '预结算配置', ...this.preSettlementRuleForm },
- { configName: '正式结算配置', ...this.formalSettlementRuleForm },
- ];
- },
- isContractConfig() {
- return this.config.permission === 'contract_manage';
- },
isShippingTemplatePage() {
return this.config.permission === 'shipping_template';
},
- isContractFormPage() {
- return this.contractFormPage && this.$route.path === '/business/contract-manage/form';
- },
isStandaloneBusinessPage() {
return this.standaloneFormPage && standaloneBusinessFormPaths.includes(this.$route.path);
},
isStandaloneFormPage() {
- return (
- this.isContractFormPage ||
- (this.isStandaloneBusinessPage && ['add', 'edit'].includes(this.$route.query.mode))
- );
+ return this.isStandaloneBusinessPage && ['add', 'edit'].includes(this.$route.query.mode);
},
formPageTitle() {
if (
@@ -6282,8 +5773,7 @@ export default {
pageFormOption() {
if (!this.isStandaloneFormPage) return this.option;
const isTransportPlanCreate =
- this.config.enableTransportPlanCreateActions === true &&
- this.$route.query.mode === 'add';
+ this.config.enableTransportPlanCreateActions === true && this.$route.query.mode === 'add';
const base = {
...this.option,
boxType: this.$route.query.mode === 'edit' ? 'edit' : 'add',
@@ -6396,18 +5886,6 @@ export default {
actionButtonLikeSearch() {
return this.config.actionButtonLikeSearch === true;
},
- contractSignTypeOptions() {
- return this.option.column?.find(column => column.prop === 'signType')?.dicData || [];
- },
- contractExpiryTagOptions() {
- return [
- { label: '全部', value: '', statKey: 'all' },
- { label: '30天内到期', value: 'within30', statKey: 'within30' },
- { label: '90天内到期', value: 'within90', statKey: 'within90' },
- { label: '90天以上', value: 'over90', statKey: 'over90' },
- { label: '已到期', value: 'expired', statKey: 'expired' },
- ];
- },
contractSelectEnabled() {
return this.config.enableContractSelect || this.config.enableTransportPlanForm;
},
@@ -6702,13 +6180,6 @@ export default {
canCreate() {
return this.hasPermission(`${this.config.permission}_add`) && !this.readonlyScope;
},
- showContractCreateActions() {
- return (
- this.config.enableContractCreateActions &&
- this.crudDialogType === 'add' &&
- !this.dialogReadonly
- );
- },
showTransportPlanCreateActions() {
return (
this.config.enableTransportPlanCreateActions &&
@@ -6903,18 +6374,6 @@ export default {
this.$nextTick(() => this.initStandaloneFormPage());
}
},
- settlementConfigTab(tab, oldTab) {
- if (!this.isContractConfig || tab === oldTab) return;
- if (oldTab === 'formal') {
- this.formalSettlementRuleForm = { ...this.settlementRuleForm };
- } else {
- this.preSettlementRuleForm = { ...this.settlementRuleForm };
- }
- this.settlementRuleForm = {
- ...(tab === 'formal' ? this.formalSettlementRuleForm : this.preSettlementRuleForm),
- };
- this.settlementRuleErrors = {};
- },
detailId: {
immediate: true,
handler(id) {
@@ -6958,9 +6417,7 @@ export default {
'attachmentTitle',
'changeRecordTitle',
];
- const columns = [...(option.column || [])].sort(
- (a, b) => (b.order || 0) - (a.order || 0)
- );
+ const columns = [...(option.column || [])].sort((a, b) => (b.order || 0) - (a.order || 0));
const groups = [];
let current = [];
columns.forEach(col => {
@@ -6983,7 +6440,7 @@ export default {
})),
};
},
- openContractFormPage(mode, row = {}) {
+ openBusinessForm(mode, row = {}) {
if (this.isStandaloneBusinessPage) {
this.$router.push({
path: standaloneBusinessFormRoutes[this.$route.path] || this.$route.path,
@@ -6995,17 +6452,7 @@ export default {
});
return;
}
- if (!this.contractFormPage) {
- this.$refs.crud?.[mode === 'edit' ? 'rowEdit' : 'rowAdd'](row);
- return;
- }
- this.$router.push({
- path: '/business/contract-manage/form',
- query:
- mode === 'edit'
- ? { mode, id: row.id, name: '编辑合同管理' }
- : { mode, name: '新增合同管理' },
- });
+ this.$refs.crud?.[mode === 'edit' ? 'rowEdit' : 'rowAdd'](row);
},
cloneOption(option, menuButtonCount) {
const nextOption = {
@@ -7129,8 +6576,7 @@ export default {
this.hasPermission(`${this.config.permission}_delete`) &&
!this.readonlyScope &&
(!row.readonly || this.isReadonlyDeleteAllowed(row)) &&
- this.inStatus(row, this.config.deleteStatus) &&
- (!this.config.deleteStage || this.config.deleteStage.includes(row.contractStage))
+ this.inStatus(row, this.config.deleteStatus)
);
},
canCopy(row) {
@@ -7200,49 +6646,6 @@ export default {
customOperations(row) {
return (this.config.operations || []).filter(operation => this.canOperation(operation, row));
},
- menuActions(row) {
- const actions = [];
- if (this.canCopy(row)) {
- actions.push({ key: 'copy', label: '复制', action: 'copy' });
- }
- if (this.canEdit(row)) {
- actions.push({
- key: 'edit',
- label: this.editLabel(row),
- action: 'edit',
- });
- }
- this.customOperations(row).forEach(operation => {
- actions.push({
- ...operation,
- key: `${operation.action}-${operation.label}`,
- });
- });
- if (this.canDelete(row)) {
- actions.push({ key: 'delete', label: '删除', action: 'delete', type: 'danger' });
- }
- return actions;
- },
- editLabel(row) {
- const status = this.statusValue(row);
- return this.config.editLabelStatusMap?.[status] || '编辑';
- },
- handleMenuAction(action, row, index) {
- if (action.action === 'copy') {
- this.handleCopy(row);
- return;
- }
- if (action.action === 'edit' || action.action === 'attachmentUpload') {
- this.attachmentUploadMode = action.action === 'attachmentUpload';
- this.openContractFormPage('edit', row);
- return;
- }
- if (action.action === 'delete') {
- this.rowDel(row);
- return;
- }
- this.handleCustomOperation(action, row);
- },
consumeTemplateCreatePayload() {
const target = this.config.templateCreateTarget;
if (!target) return;
@@ -7342,9 +6745,6 @@ export default {
if (statusList.length && !statusList.includes(row[prop])) {
return false;
}
- if (operation.stage && !operation.stage.includes(row.contractStage)) {
- return false;
- }
return true;
},
showDetailButton(row) {
@@ -7353,9 +6753,6 @@ export default {
const status = this.statusValue(row);
return status !== 'draft';
},
- isContractBillingDetailSection(section = {}) {
- return this.isContractConfig && section.title === '计费与结算';
- },
formatDetailValue(row, prop) {
if (!row) return '-';
if (prop === 'businessStatus') return this.displayStatus(row, prop);
@@ -7539,12 +6936,11 @@ export default {
if (!this.isTransportPlanPage && !this.isWaybillDetailLayout) {
return;
}
- const transportTypes = (this.isTransportPlanPage
- ? [
- detail.transportType,
- ...this.transportPlanWaybillRows.map(row => row.transportType),
- ]
- : [this.waybillTransportMode(detail)])
+ const transportTypes = (
+ this.isTransportPlanPage
+ ? [detail.transportType, ...this.transportPlanWaybillRows.map(row => row.transportType)]
+ : [this.waybillTransportMode(detail)]
+ )
.map(value => String(value || '').trim())
.filter(Boolean);
if (transportTypes.some(value => !/[\u4e00-\u9fff]/.test(value))) {
@@ -7854,113 +7250,8 @@ export default {
? formatStatus(row, prop, defaultText)
: defaultText;
},
- syncContractNoDisabled(type) {
- if (!this.config.enableContractForm) return;
- const column = this.findColumn?.(this.option.column, 'contractNo');
- if (column) {
- column.disabled = type !== 'add';
- }
- },
- syncContractPartyDisabled() {
- if (!this.isContractConfig) return;
- const disabled = !this.form?.projectId;
- ['partyA', 'partyB'].forEach(prop => {
- const column = this.findColumn?.(this.option.column, prop);
- if (column) column.disabled = disabled;
- });
- },
- clearContractPartyOptions() {
- this.contractPartyRequestId += 1;
- this.contractPartyLoading = false;
- this.contractPartyAOptions = [];
- this.contractPartyBOptions = [];
- },
- contractPartyNames(value, type = '') {
- const names = [];
- const append = item => {
- if (item === undefined || item === null) return;
- if (Array.isArray(item)) {
- item.forEach(append);
- return;
- }
- if (typeof item === 'object') {
- append(
- item[type === 'carrier' ? 'carrier' : 'customer'] ||
- item.fullName ||
- item.shortName ||
- item.customerName ||
- item.carrierName ||
- item.name
- );
- return;
- }
- const text = String(item).trim();
- if (!text) return;
- try {
- const parsed = JSON.parse(text);
- if (parsed !== item) {
- append(parsed);
- return;
- }
- } catch (error) {
- // 普通名称字符串按项目页面使用的分隔符拆分。
- }
- text
- .split(/[、,,;;\n]/)
- .map(name => name.trim())
- .filter(Boolean)
- .forEach(name => {
- if (!names.includes(name)) names.push(name);
- });
- };
- append(value);
- return names;
- },
- contractPartyOptionsFromProject(project = {}, type = '') {
- const names = this.contractPartyNames(
- [
- project[type === 'carrier' ? 'carrierJson' : 'customerJson'],
- project[type === 'carrier' ? 'carrierNames' : 'customerNames'],
- project[type === 'carrier' ? 'carrierName' : 'customerName'],
- project[type === 'carrier' ? 'carriers' : 'customers'],
- ],
- type
- );
- return names.map(name => ({ label: name, value: name }));
- },
- syncContractPartyOptions(project = {}, preserveCurrent = true) {
- if (!this.isContractConfig) return;
- this.contractPartyAOptions = this.contractPartyOptionsFromProject(project, 'customer');
- this.contractPartyBOptions = this.contractPartyOptionsFromProject(project, 'carrier');
- if (!preserveCurrent) {
- this.form.partyA = '';
- this.form.partyB = '';
- }
- },
- loadContractPartyOptions(projectId, project = {}, preserveCurrent = true) {
- if (!this.isContractConfig || !projectId) {
- this.clearContractPartyOptions();
- return Promise.resolve();
- }
- const requestId = ++this.contractPartyRequestId;
- this.syncContractPartyOptions(project, preserveCurrent);
- this.contractPartyLoading = true;
- return getProjectDetail(projectId)
- .then(res => {
- if (requestId !== this.contractPartyRequestId) return;
- const detail = res?.data?.data || {};
- this.syncContractPartyOptions({ ...project, ...detail }, preserveCurrent);
- })
- .catch(() => {})
- .finally(() => {
- if (requestId === this.contractPartyRequestId) this.contractPartyLoading = false;
- });
- },
syncCustomCreateDialogButtons(type) {
- if (
- !this.config.enableContractCreateActions &&
- !this.config.enableTransportPlanCreateActions
- ) {
+ if (!this.config.enableTransportPlanCreateActions) {
return;
}
if (!this.defaultDialogButtons) {
@@ -7998,18 +7289,6 @@ export default {
}
return 'warning';
},
- stageTagType(stage) {
- if (stage === 'formal') {
- return 'success';
- }
- if (stage === 'temporary') {
- return 'warning';
- }
- if (stage === 'terminated') {
- return 'danger';
- }
- return 'info';
- },
isMonthlySettlement(rule = this.settlementRuleForm) {
return rule.settlementType === '月结';
},
@@ -8068,57 +7347,6 @@ export default {
[field]: '',
};
},
- syncSettlementConfig() {
- if (!this.isContractConfig) return;
- if (this.settlementConfigTab === 'formal') {
- this.formalSettlementRuleForm = { ...this.settlementRuleForm };
- } else {
- this.preSettlementRuleForm = { ...this.settlementRuleForm };
- }
- },
- switchSettlementConfig(tab) {
- this.syncSettlementConfig();
- this.settlementConfigTab = tab;
- this.settlementRuleForm = {
- ...(tab === 'formal' ? this.formalSettlementRuleForm : this.preSettlementRuleForm),
- };
- this.settlementRuleErrors = {};
- },
- addPaymentRatioRow() {
- this.paymentRatioRows.push({
- ...defaultPaymentRatio(),
- paymentTerm: `第${this.paymentRatioRows.length + 1}笔`,
- });
- },
- validatePaymentRatios() {
- const total = this.paymentRatioRows.reduce(
- (sum, row) => sum + Number(row.ratioLimit || 0),
- 0
- );
- if (this.paymentRatioRows.length && Math.abs(total - 100) > 0.0001) {
- this.$message.warning('付款比例上限合计必须等于100%');
- return false;
- }
- return true;
- },
- isDefaultBillingPlan(plan) {
- const value = plan?.defaultPlan;
- return value === true || value === 1 || ['true', '1'].includes(String(value).toLowerCase());
- },
- validateBillingPlanDefault() {
- const plans = Array.isArray(this.billingPlanRows) ? this.billingPlanRows : [];
- if (!plans.length) return true;
- const defaultCount = plans.filter(plan => this.isDefaultBillingPlan(plan)).length;
- if (defaultCount === 0) {
- this.$message.warning('请勾选一个默认计费方案');
- return false;
- }
- if (defaultCount > 1) {
- this.$message.warning('计费方案存在重复默认方案,请仅保留一个默认方案');
- return false;
- }
- return true;
- },
validateSettlementRule(source = this.settlementRuleForm, label = '') {
const rule = this.normalizeSettlementRule(source);
this.settlementRuleErrors = {};
@@ -8191,58 +7419,16 @@ export default {
if (this.config.enableAttachmentTable) {
submitRow.attachmentsJson = JSON.stringify(this.attachmentRows);
}
- if (this.config.enableContractFileUpload) {
- submitRow.contractFileJson = JSON.stringify(this.contractFileRows);
- }
if (this.config.enableBillingPlan) {
- if (
- this.isContractConfig &&
- !skipValidation &&
- !this.validateBillingPlanDefault()
- ) {
- return false;
- }
submitRow.billingPlanJson = JSON.stringify(this.billingPlanRows);
}
if (this.config.enableSettlementRule) {
- if (this.isContractConfig) {
- this.syncSettlementConfig();
- if (
- !skipValidation &&
- ((this.preSettlementRuleForm.autoGenerate === 1 &&
- !this.validateSettlementRule(this.preSettlementRuleForm, '预结算配置')) ||
- (this.formalSettlementRuleForm.autoGenerate === 1 &&
- !this.validateSettlementRule(this.formalSettlementRuleForm, '正式结算配置')))
- ) {
- return false;
- }
- submitRow.settlementRuleJson = JSON.stringify({
- preSettlementConfig: this.normalizeSettlementRule(this.preSettlementRuleForm),
- formalSettlementConfig: this.normalizeSettlementRule(this.formalSettlementRuleForm),
- });
- submitRow.preSettlementConfigJson = JSON.stringify(
- this.normalizeSettlementRule(this.preSettlementRuleForm)
- );
- submitRow.formalSettlementConfigJson = JSON.stringify(
- this.normalizeSettlementRule(this.formalSettlementRuleForm)
- );
- } else if (
- !skipValidation &&
- this.settlementRuleEnabled &&
- !this.validateSettlementRule()
- ) {
+ if (!skipValidation && this.settlementRuleEnabled && !this.validateSettlementRule()) {
return false;
} else {
submitRow.settlementRuleJson = JSON.stringify(this.normalizeSettlementRule());
}
}
- if (this.isContractConfig) {
- if (!skipValidation && !this.validatePaymentRatios()) return false;
- submitRow.paymentRatioJson = JSON.stringify(this.paymentRatioRows);
- }
- if (this.config.enableChangeRecord) {
- submitRow.changeRecordJson = JSON.stringify(this.changeRecordRows);
- }
if (this.config.saveAsDraft && saveAsDraft) {
submitRow[this.config.draftStatusProp || 'approvalStatus'] =
this.config.draftStatus || 'draft';
@@ -8634,100 +7820,6 @@ export default {
getSaveRequest() {
return this.api.submit;
},
- buildContractCreateSubmitRow(action) {
- const contractStage = action === 'draft' ? 'draft' : 'temporary';
- const submitRow = this.normalizeRow({
- ...this.form,
- contractStage,
- approvalStatus: 'draft',
- });
- return submitRow;
- },
- validateContractCreateAction(action, row) {
- if (!row) return false;
- if (this.isBillingFieldEmpty(row.contractName)) {
- this.$message.warning('请输入合同名称');
- return false;
- }
- if (this.isBillingFieldEmpty(row.contractCategory)) {
- this.$message.warning('请选择合同类别');
- return false;
- }
- if (['temporary', 'formal'].includes(action) && this.isBillingFieldEmpty(row.signType)) {
- this.$message.warning('请选择签约类型');
- return false;
- }
- if (action !== 'formal') return true;
- const formalFields = [
- ['partyA', '甲方'],
- ['partyB', '乙方'],
- ['startDate', '合同期限'],
- ['signDate', '签订日期'],
- ];
- const emptyField = formalFields.find(([prop]) => this.isBillingFieldEmpty(row[prop]));
- if (emptyField) {
- this.$message.warning(`请选择或输入${emptyField[1]}`);
- return false;
- }
- return true;
- },
- extractSavedContract(res, fallback = {}) {
- const data = res?.data?.data || res?.data || {};
- if (data && typeof data === 'object' && !Array.isArray(data)) {
- return {
- ...fallback,
- ...data,
- };
- }
- return fallback;
- },
- getSavedContractId(savedContract) {
- const id = savedContract?.id || this.form.id;
- if (!id) {
- this.$message.warning('合同保存成功但未返回主键,无法继续流转');
- return '';
- }
- return id;
- },
- handleContractCreateAction(action) {
- if (!this.config.enableContractCreateActions || this.contractCreateActionLoading) return;
- const submitRow = this.buildContractCreateSubmitRow(action);
- if (!this.validateContractCreateAction(action, submitRow)) return;
- this.contractCreateActionLoading = action;
- this.api
- .saveDraft(submitRow)
- .then(res => {
- const savedContract = this.extractSavedContract(res, submitRow);
- this.form.id = savedContract.id || this.form.id;
- if (action === 'draft') {
- return savedContract;
- }
- const id = this.getSavedContractId(savedContract);
- if (!id) return Promise.reject(new Error('合同主键为空'));
- if (action === 'formal') {
- return this.api.submitFormal(id).then(() => savedContract);
- }
- return savedContract;
- })
- .then(() => {
- const messageMap = {
- draft: '保存成功',
- temporary: '临时合同提交成功',
- formal: '正式合同提交成功',
- };
- this.$message.success(messageMap[action]);
- this.onLoad(this.page, this.query);
- this.closeCrudDialog();
- })
- .catch(error => {
- if (error?.message !== '合同主键为空') {
- window.console.log(error);
- }
- })
- .finally(() => {
- this.contractCreateActionLoading = '';
- });
- },
handleTransportPlanCreateAction(action) {
if (!this.config.enableTransportPlanCreateActions || this.transportPlanCreateActionLoading) {
return;
@@ -8776,11 +7868,6 @@ export default {
this.$router.push({ path: listPath, query: {} });
return;
}
- if (this.isContractFormPage) {
- this.$router.$avueRouter?.closeTag?.();
- this.$router.push('/business/contract-manage');
- return;
- }
const crud = this.$refs.crud;
if (crud && typeof crud.closeDialog === 'function') {
crud.closeDialog();
@@ -8833,21 +7920,14 @@ export default {
this.settlementRuleErrors = {};
this.syncCustomCreateDialogButtons(type);
this.dialogReadonly = type === 'view';
- this.syncContractNoDisabled(type);
- this.syncContractPartyDisabled();
if (type === 'add') {
this.form = {
...(this.config.defaultForm || {}),
};
- this.syncContractPartyDisabled();
this.form.taskEntryMode = 'simple';
this.selectedProjectId = '';
- this.clearContractPartyOptions();
- this.selectedOrganizationId = '';
this.attachmentRows = [];
this.selectedAttachmentRows = [];
- this.contractFileRows = [];
- this.selectedContractFileRows = [];
this.shippingPlanOptions = [];
if (this.contractSelectEnabled) {
this.contractOptions = [];
@@ -8863,19 +7943,11 @@ export default {
this.shippingTemplateFreight = defaultShippingTemplateFreight();
this.billingPlanRows = [];
this.settlementRuleForm = defaultSettlementRule();
- this.preSettlementRuleForm = defaultSettlementRule();
- this.formalSettlementRuleForm = defaultSettlementRule();
- this.settlementConfigTab = 'pre';
- this.paymentRatioRows = [];
- this.form.feeGenerationMode = this.form.feeGenerationMode || 'system';
- this.changeRecordRows = [];
- this.applyCurrentUserHandler();
this.taskCarrierRequestId += 1;
this.taskCarrierOptions = [];
this.taskCarrierLoading = false;
this.initTaskInfoForm();
this.initTransportPlanFormRows();
- this.syncContractPeriod(false);
this.syncBillingPlanJson();
if (this.config.enableTemplateCodePreview && typeof this.api.nextCode === 'function') {
this.api
@@ -8909,59 +7981,14 @@ export default {
this.suppressTransportTypeClear = false;
});
this.selectedProjectId = this.form.projectId || '';
- this.syncContractPartyDisabled();
- this.loadContractPartyOptions(this.form.projectId, {
- projectName: this.form.projectName,
- customerNames: this.form.customerNames,
- carrierNames: this.form.carrierNames,
- customerJson: this.form.customerJson,
- carrierJson: this.form.carrierJson,
- });
this.loadProjectProcessConfigState();
- this.selectedOrganizationId = this.form.organizationId || '';
this.attachmentRows = this.parseJsonArray(this.form.attachmentsJson);
this.selectedAttachmentRows = [];
- this.contractFileRows = this.parseJsonArray(this.form.contractFileJson);
- this.selectedContractFileRows = [];
this.initTransportPlanFormRows();
this.billingPlanRows = this.parseJsonArray(this.form.billingPlanJson);
- const settlementPayload = this.parseJsonObject(this.form.settlementRuleJson);
- const legacySettlementRule = Object.keys(settlementPayload).some(
- key => !['preSettlementConfig', 'formalSettlementConfig'].includes(key)
- )
- ? settlementPayload
- : {};
- this.preSettlementRuleForm = this.normalizeSettlementRule(
- settlementPayload.preSettlementConfig ||
- (Object.keys(this.parseJsonObject(this.form.preSettlementConfigJson)).length
- ? this.parseJsonObject(this.form.preSettlementConfigJson)
- : legacySettlementRule)
- );
- this.formalSettlementRuleForm = this.normalizeSettlementRule(
- settlementPayload.formalSettlementConfig ||
- (Object.keys(this.parseJsonObject(this.form.formalSettlementConfigJson)).length
- ? this.parseJsonObject(this.form.formalSettlementConfigJson)
- : legacySettlementRule)
- );
- this.settlementConfigTab = 'pre';
- this.settlementRuleForm = this.preSettlementRuleForm;
- this.paymentRatioRows = this.parseJsonArray(this.form.paymentRatioJson).map(row => ({
- ...defaultPaymentRatio(),
- ...row,
- }));
- this.form.feeGenerationMode =
- this.form.feeGenerationMode ||
- (Number(this.form.billingEnabled) === 0 ? 'manual' : 'system');
- this.changeRecordRows = this.parseJsonArray(this.form.changeRecordJson);
- this.applyCurrentUserHandler();
this.initTaskInfoForm();
- this.syncContractPeriod(false);
this.syncBillingPlanJson();
- if (this.config.enableOrganizationSelect) {
- this.syncCurrentOrganizationOption();
- }
if (this.config.enableProjectSelect) {
- this.form.remainingFundLimit = this.calculateRemainingFundLimit();
this.syncCurrentProjectOption();
}
if (this.contractSelectEnabled) {
@@ -9054,12 +8081,6 @@ export default {
});
}
},
- calculateRemainingFundLimit() {
- const projectFundLimit = Number(this.form.projectFundLimit);
- const usedFundLimit = Number(this.form.usedFundLimit);
- if (!Number.isFinite(projectFundLimit) || !Number.isFinite(usedFundLimit)) return '';
- return Math.round((projectFundLimit - usedFundLimit + Number.EPSILON) * 100) / 100;
- },
handleProjectChange(projectId) {
const project = this.projectOptions.find(item => String(item.id) === String(projectId));
if (!project) {
@@ -9067,15 +8088,6 @@ export default {
this.form.projectName = '';
this.form.projectCode = '';
this.form.undertakeDeptName = '';
- this.form.projectFundLimit = '';
- this.form.usedFundLimit = 0;
- this.form.remainingFundLimit = 0;
- if (this.isContractConfig) {
- this.form.partyA = '';
- this.form.partyB = '';
- }
- this.clearContractPartyOptions();
- this.syncContractPartyDisabled();
if (this.contractSelectEnabled) {
this.form.contractId = '';
this.form.contractName = '';
@@ -9099,20 +8111,11 @@ export default {
this.form.projectName = project.projectName || '';
this.form.projectCode = project.projectCode || '';
this.form.undertakeDeptName = project.undertakeDeptName || '';
- this.form.projectFundLimit = project.fundLimit || project.projectFundLimit || 0;
- this.form.usedFundLimit = 0;
- this.form.remainingFundLimit = this.calculateRemainingFundLimit();
if (this.isWaybillDetailLayout) {
this.form.carrierName = '';
this.form.carrierId = '';
this.loadTaskCarrierOptions(project);
}
- if (this.isContractConfig) {
- this.form.partyA = '';
- this.form.partyB = '';
- this.loadContractPartyOptions(project.id, project, false);
- }
- this.syncContractPartyDisabled();
if (this.contractSelectEnabled || this.config.enableTransportPlanForm) {
this.form.customerName =
project.customerName ||
@@ -11027,86 +10030,6 @@ export default {
downloadXls(res.data, '发货模板货物导入模板.xlsx');
});
},
- loadOrganizationOptions() {
- if (!this.config.enableOrganizationSelect || this.organizationLoading) return;
- this.organizationLoading = true;
- getDeptTree(this.userInfo?.tenantId)
- .then(res => {
- this.organizationOptions = this.normalizeOrganizationOptions(res.data.data || []);
- this.organizationFlatOptions = this.flattenOrganizationOptions(this.organizationOptions);
- this.syncOrganizationSearchDic();
- this.syncCurrentOrganizationOption();
- })
- .finally(() => {
- this.organizationLoading = false;
- });
- },
- normalizeOrganizationOptions(tree = []) {
- return (tree || []).map(item => {
- const name = item.title || item.deptName || item.name || item.label || '';
- const children = this.normalizeOrganizationOptions(item.children || []);
- return {
- ...item,
- id: String(item.id),
- label: name,
- rawLabel: name,
- children: children.length ? children : undefined,
- };
- });
- },
- flattenOrganizationOptions(tree = []) {
- const result = [];
- tree.forEach(item => {
- result.push({
- id: String(item.id),
- label: item.label,
- rawLabel: item.rawLabel || item.label,
- });
- if (item.children && item.children.length) {
- result.push(...this.flattenOrganizationOptions(item.children));
- }
- });
- return result;
- },
- syncOrganizationSearchDic() {
- const column = this.findColumn?.(this.option.column, 'organizationName');
- if (column) {
- column.dicData = this.organizationOptions;
- }
- },
- syncCurrentOrganizationOption() {
- if (!this.form.organizationId || !this.form.organizationName) return;
- const exists = this.organizationFlatOptions.some(
- item => String(item.id) === String(this.form.organizationId)
- );
- if (!exists) {
- const current = {
- id: String(this.form.organizationId),
- label: this.form.organizationName,
- rawLabel: this.form.organizationName,
- };
- this.organizationOptions.unshift(current);
- this.organizationFlatOptions.unshift(current);
- this.syncOrganizationSearchDic();
- }
- },
- findOrganizationOption(organizationId) {
- const value = Array.isArray(organizationId)
- ? organizationId[organizationId.length - 1]
- : organizationId;
- return this.organizationFlatOptions.find(item => String(item.id) === String(value));
- },
- handleOrganizationChange(organizationId) {
- const organization = this.findOrganizationOption(organizationId);
- if (!organization) {
- this.form.organizationId = '';
- this.form.organizationName = '';
- return;
- }
- this.form.organizationId = organization.id;
- this.form.organizationName = organization.rawLabel || organization.label || '';
- this.$refs.crud?.validateField?.('organizationName');
- },
handleAmountInput(prop, value) {
const text = String(value || '').replace(/[^\d.]/g, '');
const parts = text.split('.');
@@ -11116,24 +10039,6 @@ export default {
handleIntegerInput(prop, value) {
this.form[prop] = String(value || '').replace(/\D/g, '');
},
- handleContractDateChange() {
- this.syncContractPeriod(true);
- },
- syncContractPeriod(validate = true) {
- if (!this.config.enableContractPeriod) return;
- this.form.contractPeriod =
- this.form.startDate && this.form.endDate
- ? `${this.form.startDate}至${this.form.endDate}`
- : '';
- if (validate) {
- this.$refs.crud?.validateField?.('contractPeriod');
- }
- },
- applyCurrentUserHandler() {
- if (!this.config.enableCurrentUserHandler || this.form.handlerUserName) return;
- this.form.handlerUserName =
- this.userInfo?.realName || this.userInfo?.userName || this.userInfo?.account || '';
- },
handleAttachmentChange(list) {
const userName = this.userInfo?.realName || this.userInfo?.userName || '';
const uploadTime = this.$dayjs().format('YYYY-MM-DD HH:mm:ss');
@@ -11247,33 +10152,6 @@ export default {
handleDispatchItemAttachmentSelectionChange(rows) {
this.selectedDispatchItemAttachmentRows = rows || [];
},
- handleContractFileChange(list) {
- const userName = this.userInfo?.realName || this.userInfo?.userName || '';
- const uploadTime = this.$dayjs().format('YYYY-MM-DD HH:mm:ss');
- this.contractFileRows = (list || []).map(item => ({
- ...item,
- uploadUserName: item.uploadUserName || userName,
- uploadTime: item.uploadTime || uploadTime,
- }));
- this.selectedContractFileRows = [];
- this.form.contractFileJson = JSON.stringify(this.contractFileRows);
- },
- handleContractFileSelectionChange(rows) {
- this.selectedContractFileRows = rows || [];
- },
- removeContractFile(index) {
- this.contractFileRows.splice(index, 1);
- this.selectedContractFileRows = this.selectedContractFileRows.filter(item =>
- this.contractFileRows.includes(item)
- );
- this.form.contractFileJson = JSON.stringify(this.contractFileRows);
- },
- handleContractFileBatchDownload() {
- const rows = this.selectedContractFileRows.length
- ? this.selectedContractFileRows
- : this.contractFileRows;
- rows.forEach(row => this.downloadAttachment(row));
- },
cloneData(data) {
return JSON.parse(JSON.stringify(data));
},
@@ -12002,15 +10880,12 @@ export default {
},
searchReset() {
this.query = {};
- this.contractExpiryScope = '';
- this.contractSignType = '';
this.page.currentPage = 1;
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = {
...params,
- ...(this.contractSignType ? { signType: this.contractSignType } : {}),
};
this.page.currentPage = 1;
this.onLoad(this.page, params);
@@ -12034,26 +10909,6 @@ export default {
refreshChange() {
this.onLoad(this.page, this.query);
},
- handleSearchIconChange(expanded) {
- this.searchExpanded = expanded;
- },
- handleContractExpiryScopeChange(expireScope) {
- this.contractExpiryScope = expireScope;
- this.page.currentPage = 1;
- this.onLoad(this.page, this.query);
- },
- refreshContractExpiryStats(query) {
- if (!this.config.enableContractExpiryTags || typeof this.api.expireStats !== 'function')
- return;
- const statsQuery = { ...query };
- delete statsQuery.expireScope;
- this.api.expireStats(statsQuery).then(res => {
- this.contractExpiryStats = {
- ...this.contractExpiryStats,
- ...(res.data.data || {}),
- };
- });
- },
handleScopeChange() {
if (!this.canViewAllDept) {
this.allDept = 0;
@@ -12086,26 +10941,6 @@ export default {
if (Object.keys(this.config.searchRangeMap || {}).length) {
query = this.normalizeSearchRangeParams(query);
}
- if (this.config.enableOrganizationSelect && query.organizationName) {
- const organizationId = Array.isArray(query.organizationName)
- ? query.organizationName[query.organizationName.length - 1]
- : query.organizationName;
- if (!organizationId) {
- delete query.organizationId;
- delete query.organizationName;
- return query;
- }
- const organization = this.findOrganizationOption(organizationId);
- query.organizationId = organizationId;
- if (organization) {
- query.organizationName = organization.rawLabel || organization.label || '';
- } else {
- delete query.organizationName;
- }
- if (this.canViewAllDept) {
- query.allDept = 1;
- }
- }
return query;
},
onLoad(page, params = {}) {
@@ -12114,8 +10949,6 @@ export default {
...params,
...this.query,
allDept: this.allDept,
- ...(this.contractSignType ? { signType: this.contractSignType } : {}),
- ...(this.contractExpiryScope ? { expireScope: this.contractExpiryScope } : {}),
});
this.api
.getList(page.currentPage, page.pageSize, query)
@@ -12124,7 +10957,6 @@ export default {
this.page.total = result.total;
this.data = result.records;
this.selectionClear();
- this.refreshContractExpiryStats(query);
})
.finally(() => {
this.loading = false;
@@ -12524,10 +11356,6 @@ export default {
});
},
handleCustomOperation(operation, row) {
- if (operation.action === 'startChange' && this.config.permission === 'contract_manage') {
- this.$router.push({ path: '/business/contract-manage/change', query: { id: row.id } });
- return;
- }
if (operation.action === 'createFromTemplate') {
this.api.getDetail(row.id).then(res => {
const template = res.data?.data || row;
@@ -13293,9 +12121,7 @@ export default {
if (this.dispatchCarrierLoading) return Promise.resolve(this.dispatchCarrierOptions);
const projectId = plan?.projectId;
const requestId = ++this.dispatchCarrierRequestId;
- const project = this.projectOptions.find(
- item => String(item.id) === String(projectId)
- );
+ const project = this.projectOptions.find(item => String(item.id) === String(projectId));
this.dispatchCarrierOptions = this.getProjectCarrierOptions({ ...project, ...plan });
if (!projectId) return Promise.resolve(this.dispatchCarrierOptions);
this.dispatchCarrierLoading = true;
@@ -13566,9 +12392,7 @@ export default {
const quantity = Number(String(goods.quantity).replace(/,/g, ''));
if (!Number.isFinite(quantity) || quantity <= 0) {
return warn(
- detailPrefix
- ? `的${goodsPrefix}本次数量必须大于0`
- : `${goodsPrefix}本次数量必须大于0`
+ detailPrefix ? `的${goodsPrefix}本次数量必须大于0` : `${goodsPrefix}本次数量必须大于0`
);
}
if (!this.isBillingFieldEmpty(goods.unitPrice) && Number(goods.unitPrice) < 0) {
@@ -13586,9 +12410,7 @@ export default {
].find(([value]) => String(value || '').trim() && !isMobile(value));
if (invalidPhoneField) {
return warn(
- detailPrefix
- ? `的${invalidPhoneField[1]}格式不正确`
- : `${invalidPhoneField[1]}格式不正确`
+ detailPrefix ? `的${invalidPhoneField[1]}格式不正确` : `${invalidPhoneField[1]}格式不正确`
);
}
const lengthFields = roadTransport
@@ -13617,7 +12439,9 @@ export default {
);
}
if (row.mileage && (!/^\d{1,10}$/.test(String(row.mileage)) || Number(row.mileage) <= 0)) {
- return warn(detailPrefix ? '的里程必须为不超过10位的正整数' : '里程必须为不超过10位的正整数');
+ return warn(
+ detailPrefix ? '的里程必须为不超过10位的正整数' : '里程必须为不超过10位的正整数'
+ );
}
if (!this.isBillingFieldEmpty(row.otherFeeTotal) && Number(row.otherFeeTotal) < 0) {
return warn(detailPrefix ? '的其他费用合计不能小于0' : '其他费用合计不能小于0');
@@ -13628,9 +12452,7 @@ export default {
row.estimatedEndTime < row.estimatedStartTime
) {
return warn(
- detailPrefix
- ? '的预计完成日期不能早于预计发货日期'
- : '预计完成日期不能早于预计发货日期'
+ detailPrefix ? '的预计完成日期不能早于预计发货日期' : '预计完成日期不能早于预计发货日期'
);
}
if (String(row.remark || row.taskRemark || '').length > 200) {
@@ -13656,9 +12478,7 @@ export default {
const remaining = this.dispatchItemRemainingQuantity({ quantityUnit: unit });
if (quantity - remaining > 1e-8) {
this.$message.warning(
- `本次调度${unit}合计不能超过剩余数量${this.formatDispatchQuantity(
- remaining
- )}${unit}`
+ `本次调度${unit}合计不能超过剩余数量${this.formatDispatchQuantity(remaining)}${unit}`
);
return false;
}
@@ -13822,8 +12642,7 @@ export default {
return false;
}
for (const [index, row] of this.dispatchRows.entries()) {
- const goodsRows =
- row.taskEntryMode === 'full' ? this.parseJsonArray(row.goodsJson) : [row];
+ const goodsRows = row.taskEntryMode === 'full' ? this.parseJsonArray(row.goodsJson) : [row];
if (mode === 'draft') {
if (row.taskEntryMode === 'full' && !goodsRows.length) {
this.$message.warning(`第${index + 1}条调度明细的货物信息不能为空`);
@@ -13836,9 +12655,7 @@ export default {
[row.escortPhone, '押运人手机号'],
].find(([value]) => String(value || '').trim() && !isMobile(value));
if (invalidPhoneField) {
- this.$message.warning(
- `第${index + 1}条调度明细的${invalidPhoneField[1]}格式不正确`
- );
+ this.$message.warning(`第${index + 1}条调度明细的${invalidPhoneField[1]}格式不正确`);
return false;
}
continue;
@@ -14227,13 +13044,17 @@ export default {
}
:global(
- .business-crud-page--form-page .business-crud-page__task-form
- .el-form-item__content > .el-autocomplete
- ),
+ .business-crud-page--form-page
+ .business-crud-page__task-form
+ .el-form-item__content
+ > .el-autocomplete
+ ),
:global(
- .business-crud-page--form-page .business-crud-page__task-form
- .el-form-item__content > .el-date-editor
- ) {
+ .business-crud-page--form-page
+ .business-crud-page__task-form
+ .el-form-item__content
+ > .el-date-editor
+ ) {
width: 250px !important;
max-width: 100%;
}
@@ -14327,10 +13148,9 @@ export default {
}
&--shipping-template {
- grid-template-columns: 220px minmax(220px, 1fr) 58px minmax(220px, 280px) 72px minmax(
- 220px,
- 280px
- ) 40px;
+ grid-template-columns:
+ 220px minmax(220px, 1fr) 58px minmax(220px, 280px) 72px minmax(220px, 280px)
+ 40px;
.business-crud-page__map-suffix {
color: #409eff;
@@ -16358,7 +15178,7 @@ export default {
// 独立表单页(合同/运单/运输计划/运输模板):标题分块使用白底卡片,间距 12px,与 section-card 风格一致
:global(.business-crud-form-page-dialog:not(.el-dialog)) {
- //padding: 20px 24px 96px;
+ padding-bottom: 96px;
box-sizing: border-box;
}
diff --git a/src/views/business/components/master-order-dispatch.vue b/src/views/business/components/master-order-dispatch.vue
index 22fb9a0..962ebf2 100644
--- a/src/views/business/components/master-order-dispatch.vue
+++ b/src/views/business/components/master-order-dispatch.vue
@@ -131,7 +131,7 @@
- visible && loadCarrierOptions()">
+ handleCarrierContractChange(route, value)">
handleDriverSuggestionSelect(route, item)" />
@@ -140,7 +140,7 @@
- visible && loadCarrierOptions()">
+ handleCarrierContractChange(route, value)">
@@ -180,7 +180,6 @@
+
+
+
+
diff --git a/src/views/payment/bill-ledger-form.vue b/src/views/payment/bill-ledger-form.vue
new file mode 100644
index 0000000..10638b6
--- /dev/null
+++ b/src/views/payment/bill-ledger-form.vue
@@ -0,0 +1,599 @@
+
+
+
+ {{ recordId ? '编辑汇票台账' : '新增汇票台账' }}
+
+
+
+ 基本信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %
+
+
+
+
+
+
+
+
+
+
+ 附件信息
+
+
+
+
+
+ {{ row.originalName || row.name || '附件' }}
+
+ {{ row.originalName || row.name || '-' }}
+
+
+
+
+
+
+
+
+ {{ fileSize(row) }}
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+ 使用记录
+
+
+
+
+ {{ formatMoney(row.usedAmount) }}
+
+
+
+ 已审核
+
+
+
+
+
+ 确认
+ 取消
+
+
+
+
+
+
+
+
diff --git a/src/views/payment/bill-ledger.vue b/src/views/payment/bill-ledger.vue
new file mode 100644
index 0000000..1324807
--- /dev/null
+++ b/src/views/payment/bill-ledger.vue
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
diff --git a/src/views/payment/bill-payment-form.vue b/src/views/payment/bill-payment-form.vue
new file mode 100644
index 0000000..6f78fdf
--- /dev/null
+++ b/src/views/payment/bill-payment-form.vue
@@ -0,0 +1,434 @@
+
+
+
+
+ 基本信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 附件信息
+
+
+
+
+
+ {{ row.originalName || row.name || '附件' }}
+
+ {{ row.originalName || row.name || '-' }}
+
+
+
+
+
+
+
+
+ {{ fileSize(row) }}
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+ 保存
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+ {{ formatMoney(row.faceAmount) }}
+
+
+ {{ formatMoney(row.availableBalance) }}
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
diff --git a/src/views/payment/bill-payment.vue b/src/views/payment/bill-payment.vue
new file mode 100644
index 0000000..6bd741a
--- /dev/null
+++ b/src/views/payment/bill-payment.vue
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+
+ {{ flowDialog.row.paymentNo || '-' }}
+
+
+ {{ flowDialog.row.approvalStatusName || '-' }}
+
+
+ {{ flowDialog.row.currentNode || '-' }}
+
+
+ {{ flowDialog.row.currentProcessor || '-' }}
+
+
+
+
+
+
+
diff --git a/src/views/payment/components/bill-ledger-search.vue b/src/views/payment/components/bill-ledger-search.vue
new file mode 100644
index 0000000..0e090a5
--- /dev/null
+++ b/src/views/payment/components/bill-ledger-search.vue
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 到期快捷筛选
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/payment/components/bill-ledger-table.vue b/src/views/payment/components/bill-ledger-table.vue
new file mode 100644
index 0000000..86464bc
--- /dev/null
+++ b/src/views/payment/components/bill-ledger-table.vue
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
+ {{ formatMoney(row[column.prop]) }}
+ {{ displayValue(row[column.prop]) }}
+
+
+
+
+
+
+ 编辑
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/payment/components/bill-payment-search.vue b/src/views/payment/components/bill-payment-search.vue
new file mode 100644
index 0000000..819350b
--- /dev/null
+++ b/src/views/payment/components/bill-payment-search.vue
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/payment/components/bill-payment-table.vue b/src/views/payment/components/bill-payment-table.vue
new file mode 100644
index 0000000..80b5b0f
--- /dev/null
+++ b/src/views/payment/components/bill-payment-table.vue
@@ -0,0 +1,149 @@
+
+
+
+
+ 新增
+
+
+
+
+
+
+
+ {{ row[column.prop] || '-' }}
+
+ {{ formatMoney(row[column.prop]) }}
+ {{ displayValue(row[column.prop]) }}
+
+
+
+
+
+ 查看
+ 删除
+ 编辑
+ 流程
+ 作废
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/payment/invoice-application-form.vue b/src/views/payment/invoice-application-form.vue
new file mode 100644
index 0000000..0b94797
--- /dev/null
+++ b/src/views/payment/invoice-application-form.vue
@@ -0,0 +1,1044 @@
+
+
+
+ {{ readonly ? '查看开票申请' : recordId ? '编辑开票申请' : '新增开票申请' }}
+
+
+
+
+ 开票基本信息
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 受票方信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ formatMoney(row.taxAmount) }}
+
+
+
+
+
+
+
+
+
+ 添加
+ 删除
+
+
+
+
+
+
+
+
+ 结算信息
+
+
+
+
+ {{ formatMoney(row.settlementAmount) }}
+
+
+ {{ formatMoney(row.availableInvoiceAmount) }}
+
+
+
+
+
+
+
+
+
+
+ 开票明细
+
+
+
+
+
+
+ {{ row[column.prop] }}
+
+ {{ formatMoney(row[column.prop]) }}
+ {{ displayValue(row[column.prop]) }}
+
+
+
+
+
+
+ 附件信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查看
+ 删除
+
+
+
+
+
+
+
+
+
+ 同步
+ 保存
+ 提交
+ 返回
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+
+
+
+ {{ formatMoney(row.settlementAmount) }}
+
+
+ {{ formatMoney(row.availableInvoiceAmount) }}
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
diff --git a/src/views/payment/invoice-application.vue b/src/views/payment/invoice-application.vue
new file mode 100644
index 0000000..2e71f56
--- /dev/null
+++ b/src/views/payment/invoice-application.vue
@@ -0,0 +1,474 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
开票申请单列表
+
+ 批量同步
+ 新增
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row[column.prop] }}
+
+
+ {{ displayValue(row[column.prop]) }}
+
+ {{ formatMoney(row[column.prop]) }}
+ {{ displayValue(row[column.prop]) }}
+
+
+
+
+
+ 查看
+ 编辑
+ 删除
+ 提交
+ 流程
+ 通过
+ 驳回
+ 作废
+
+
+
+
+
+
+
+
+
+
+
+ {{ flowDialog.row.applicationNo || '-' }}
+
+
+ {{ flowDialog.row.approvalStatusName || '-' }}
+
+
+ {{ flowDialog.row.currentNode || '-' }}
+
+
+ {{ flowDialog.row.currentProcessor || '-' }}
+
+
+
+
+
+
+ {{ statusName(row.fromStatus) }}
+
+
+ {{ statusName(row.toStatus) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/payment/invoice-receipt-form.vue b/src/views/payment/invoice-receipt-form.vue
new file mode 100644
index 0000000..f9ea1b2
--- /dev/null
+++ b/src/views/payment/invoice-receipt-form.vue
@@ -0,0 +1,834 @@
+
+
+
+ {{ readonly ? '查看收票登记' : recordId ? '编辑收票登记' : '新增收票登记' }}
+
+
+
+
+ 收票基本信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 结算信息
+
+
+
+
+
+ {{ row.formalSettlementNo }}
+
+
+
+
+ {{ formatMoney(row.settlementAmount) }}
+
+
+ {{ formatMoney(row.receivedInvoiceAmount) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.originalName || row.name || '-' }}
+
+
+
+
+
+
+
+
+
+
+
+
+ 查看
+ 删除
+
+
+
+
+
+
+
+
+
+
+ 同步
+ 保存
+ 提交
+ 返回
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+ {{ formatMoney(row.invoiceAmount) }}
+
+
+ {{ formatRate(row.taxRate) }}
+
+
+ {{ formatMoney(row.taxAmount) }}
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+
+
+ {{ formatMoney(row.settlementAmount) }}
+
+
+ {{ formatMoney(row.receivedInvoiceAmount) }}
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
diff --git a/src/views/payment/invoice-receipt.vue b/src/views/payment/invoice-receipt.vue
new file mode 100644
index 0000000..9a11c3e
--- /dev/null
+++ b/src/views/payment/invoice-receipt.vue
@@ -0,0 +1,480 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
收票单列表
+
+ 批量同步
+ 新增
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row[column.prop] }}
+
+
+ {{ displayValue(row[column.prop]) }}
+
+ {{ formatMoney(row[column.prop]) }}
+ {{ displayValue(row[column.prop]) }}
+
+
+
+
+
+ 查看
+ 编辑
+ 删除
+ 提交
+ 流程
+ 通过
+ 驳回
+ 作废
+
+
+
+
+
+
+
+
+
+
+
+ {{ flowDialog.row.invoiceNo || '-' }}
+
+
+ {{ flowDialog.row.approvalStatusName || '-' }}
+
+
+ {{ flowDialog.row.currentNode || '-' }}
+
+
+ {{ flowDialog.row.currentProcessor || '-' }}
+
+
+
+
+
+
+ {{ statusName(row.fromStatus) }}
+
+
+ {{ statusName(row.toStatus) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/payment/payment-application-form.vue b/src/views/payment/payment-application-form.vue
new file mode 100644
index 0000000..01c8d13
--- /dev/null
+++ b/src/views/payment/payment-application-form.vue
@@ -0,0 +1,852 @@
+
+
+
+ {{ readonly ? '查看付款申请' : recordId ? '编辑付款申请' : '新增付款申请' }}
+
+
+
+ 付款基本信息
+
+
+
+ 选择
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 返回保存提交
+
+
+
+
+
+
+
+
+
diff --git a/src/views/payment/payment-application.vue b/src/views/payment/payment-application.vue
new file mode 100644
index 0000000..445afa1
--- /dev/null
+++ b/src/views/payment/payment-application.vue
@@ -0,0 +1,476 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+ 新增付款申请
+ 批量同步
+ 申请付尾款
+ 预付申请
+ 导出
+
+
+
+
+
+
+
+
+ {{
+ row[column.prop]
+ }}
+ {{
+ row[column.prop] || '-'
+ }}
+ {{ formatMoney(row[column.prop]) }}
+ {{ displayValue(row[column.prop]) }}
+
+
+
+
+ 查看
+ 编辑
+ 提交
+ 通过
+ 驳回
+ 流程
+ 作废
+ 删除
+
+
+
+
+
+
+
+
+ {{ flowDialog.row.paymentNo || '-' }}
+
+
+ {{ flowDialog.row.approvalStatusName || '-' }}
+
+
+ {{ flowDialog.row.currentNode || '-' }}
+
+
+ {{ flowDialog.row.currentProcessor || '-' }}
+
+
+
+
+
+
+
+
+
diff --git a/src/views/payment/receipt-claim-record-form.vue b/src/views/payment/receipt-claim-record-form.vue
new file mode 100644
index 0000000..42985f2
--- /dev/null
+++ b/src/views/payment/receipt-claim-record-form.vue
@@ -0,0 +1,369 @@
+
+
+
+
+ 收款信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 结算信息
+
+
+
+
+
+ {{ row.formalSettlementNo }}
+
+
+
+
+ {{ formatMoney(row.settlementAmount) }}
+
+
+ {{ formatMoney(row.claimedReceiptAmount) }}
+
+
+ {{ formatMoney(row.allocatedReceiptAmount) }}
+
+
+
+
+
+
+
+
+
+ {{ row.originalName || row.name || '-' }}
+
+
+
+ {{ displayFileSize(row.size) }}
+
+
+
+
+
+
+
+ 查看
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
diff --git a/src/views/payment/receipt-claim-record.vue b/src/views/payment/receipt-claim-record.vue
new file mode 100644
index 0000000..32d947a
--- /dev/null
+++ b/src/views/payment/receipt-claim-record.vue
@@ -0,0 +1,294 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ displayValue(row[column.prop]) }}
+
+
+ {{ displayValue(row[column.prop]) }}
+
+ {{ formatMoney(row[column.prop]) }}
+ {{ displayValue(row[column.prop]) }}
+
+
+
+
+ 作废
+ -
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/payment/receipt-flow-form.vue b/src/views/payment/receipt-flow-form.vue
new file mode 100644
index 0000000..4603156
--- /dev/null
+++ b/src/views/payment/receipt-flow-form.vue
@@ -0,0 +1,537 @@
+
+
+
+
+ 收款信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 结算信息
+
+
+ {{
+ row.formalSettlementNo
+ }}
+ {{
+ formatMoney(row.settlementAmount)
+ }}
+ {{
+ formatMoney(row.claimedReceiptAmount)
+ }}
+
+
+
+
+
+
+
+
+ {{
+ row.originalName || row.name || '-'
+ }}
+
+
+
+ 查看删除
+
+
+
+
+
+
+
+ 确认取消
+
+
+
+
+
+ 查询
+
+
+ {{
+ formatMoney(row.settlementAmount)
+ }}{{
+ formatMoney(row.claimedReceiptAmount)
+ }}
+
+ 取消确定
+
+
+
+
+
+
+
diff --git a/src/views/payment/receipt-flow.vue b/src/views/payment/receipt-flow.vue
new file mode 100644
index 0000000..a004e2e
--- /dev/null
+++ b/src/views/payment/receipt-flow.vue
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ searchExpanded ? '折叠' : '展开' }}
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+ {{ displayValue(row[column.prop]) }}
+
+ {{ displayValue(row[column.prop]) }}
+
+ {{ displayValue(row[column.prop]) }}
+
+ {{ formatMoney(row[column.prop]) }}
+ {{ displayValue(row[column.prop]) }}
+
+
+
+
+ 认领
+ -
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/settlement/components/formal-settlement-editor.vue b/src/views/settlement/components/formal-settlement-editor.vue
index 3100841..30fb91a 100644
--- a/src/views/settlement/components/formal-settlement-editor.vue
+++ b/src/views/settlement/components/formal-settlement-editor.vue
@@ -1,5 +1,9 @@
-
+
-
+
取消
提交
+
+ 取消
+
+ 提交
+
+
-
+
@@ -222,7 +238,13 @@
-
+
@@ -344,7 +366,7 @@
>
-
+
+
+
diff --git a/src/views/settlement/formal-settlement.vue b/src/views/settlement/formal-settlement.vue
index 6699062..73ae75b 100644
--- a/src/views/settlement/formal-settlement.vue
+++ b/src/views/settlement/formal-settlement.vue
@@ -41,7 +41,11 @@
-
+
@@ -336,10 +340,16 @@ export default {
this.loadTable();
},
openCreate() {
- this.editor = { visible: true, id: null, readonly: false };
+ this.$router.push({
+ path: '/settlement/formal-settlement/form',
+ query: { mode: 'add', name: '新增正式结算' },
+ });
},
openEdit(row) {
- this.editor = { visible: true, id: row.id, readonly: false };
+ this.$router.push({
+ path: '/settlement/formal-settlement/form',
+ query: { mode: 'edit', id: row.id, name: '编辑正式结算' },
+ });
},
openView(row) {
this.editor = { visible: true, id: row.id, readonly: true };
diff --git a/src/views/settlement/pre-settlement-form.vue b/src/views/settlement/pre-settlement-form.vue
new file mode 100644
index 0000000..6788b50
--- /dev/null
+++ b/src/views/settlement/pre-settlement-form.vue
@@ -0,0 +1,90 @@
+
+
+ {{ pageTitle }}
+
+
+
+
+
+
+
diff --git a/src/views/settlement/pre-settlement.vue b/src/views/settlement/pre-settlement.vue
index db14ea0..8856a1d 100644
--- a/src/views/settlement/pre-settlement.vue
+++ b/src/views/settlement/pre-settlement.vue
@@ -473,10 +473,16 @@ export default {
this.selection = rows;
},
openCreate() {
- this.editor = { visible: true, id: '', readonly: false };
+ this.$router.push({
+ path: '/settlement/pre-settlement/form',
+ query: { mode: 'add', name: '新增预结算' },
+ });
},
openEdit(row) {
- this.editor = { visible: true, id: row.id, readonly: false };
+ this.$router.push({
+ path: '/settlement/pre-settlement/form',
+ query: { mode: 'edit', id: row.id, name: '编辑预结算' },
+ });
},
openView(row) {
this.editor = { visible: true, id: row.id, readonly: true };
diff --git a/src/views/settlement/receivable-payable-detail.vue b/src/views/settlement/receivable-payable-detail.vue
index ea245a2..1081026 100644
--- a/src/views/settlement/receivable-payable-detail.vue
+++ b/src/views/settlement/receivable-payable-detail.vue
@@ -79,10 +79,18 @@
-
+
调整
-
+
关闭
-
@@ -112,12 +120,7 @@
@@ -180,12 +183,7 @@
查询
- 确认选择
@@ -477,11 +474,7 @@
取消
-
+
生成费用
@@ -513,7 +506,7 @@
取消
- 上一步
+ 上一步
提交
@@ -537,9 +530,11 @@ import {
} from '@/option/settlement/receivable-payable-detail';
import * as api from '@/api/settlement/receivable-payable-detail';
import { getList as getContractList } from '@/api/business/contract-manage';
+import { getContractOptions as getSettlementContractOptions } from '@/api/settlement/preSettlement';
import { exportBlob } from '@/api/common';
import { getDictionary } from '@/api/system/dictbiz';
import { downloadXls } from '@/utils/util';
+import { createSettlementTransfer } from '@/utils/settlement-transfer';
export default {
props: {
@@ -567,7 +562,13 @@ export default {
rows: [],
selection: [],
page: { current: 1, size: 10, total: 0 },
- detailDialog: { visible: false, title: '费用明细', activeTab: 'fee', row: null, loading: false },
+ detailDialog: {
+ visible: false,
+ title: '费用明细',
+ activeTab: 'fee',
+ row: null,
+ loading: false,
+ },
feeRows: [],
dynamicFeeColumns: [],
adjustDialog: { visible: false, loading: false, submitting: false, row: null },
@@ -664,7 +665,10 @@ export default {
if (column.prop === 'transportType') return this.transportTypeLabel(row[column.prop]);
if (column.prop === 'transportQuantity') return this.fixedTwoDecimals(row[column.prop]);
if (column.dynamic) {
- return this.money(this.normalizeFeeItems(row.feeItems)[column.feeItemName], row.currency || 'RMB');
+ return this.money(
+ this.normalizeFeeItems(row.feeItems)[column.feeItemName],
+ row.currency || 'RMB'
+ );
}
return this.formatDetailCell(row, column.prop);
},
@@ -673,7 +677,12 @@ export default {
this.tableFeeItemNames = [];
try {
const params = this.buildRequestParams(
- this.normalizeQuery(this.query, 'generateDateRange', 'generateStartDate', 'generateEndDate')
+ this.normalizeQuery(
+ this.query,
+ 'generateDateRange',
+ 'generateStartDate',
+ 'generateEndDate'
+ )
);
const res = await api.getList(this.page.current, this.page.size, params);
const data = this.unwrapPage(res);
@@ -685,8 +694,7 @@ export default {
}
},
async loadContracts() {
- const contractCategory =
- this.settlementType === 'payable' ? '承运商合同' : '客户合同';
+ const contractCategory = this.settlementType === 'payable' ? '承运商合同' : '客户合同';
this.contractLoading = true;
try {
const res = await getContractList(1, 999, {
@@ -746,7 +754,13 @@ export default {
},
async openDetailDialog(row) {
this.closeAdjustPanel();
- this.detailDialog = { ...this.detailDialog, visible: true, row, title: row.documentNo, activeTab: 'fee' };
+ this.detailDialog = {
+ ...this.detailDialog,
+ visible: true,
+ row,
+ title: row.documentNo,
+ activeTab: 'fee',
+ };
await this.loadFeeDetail();
},
async openAdjustDialog(row) {
@@ -778,13 +792,9 @@ export default {
originalAmount: Number(item.originalAmount || 0),
feeItems,
manualFee: item.billingFactor === '手工调整',
- feeItemName:
- item.billingFactor === '手工调整' ? Object.keys(feeItems)[0] || '' : '',
+ feeItemName: item.billingFactor === '手工调整' ? Object.keys(feeItems)[0] || '' : '',
feeType: item.billingType === '手工扣费' ? 'deduct' : 'charge',
- amount:
- item.billingFactor === '手工调整'
- ? Math.abs(Number(item.afterAmount || 0))
- : 0,
+ amount: item.billingFactor === '手工调整' ? Math.abs(Number(item.afterAmount || 0)) : 0,
};
if (adjusted.manualFee) this.recalculateManualAdjustRow(adjusted);
else this.recalculateAdjustRow(adjusted);
@@ -870,7 +880,9 @@ export default {
0
);
const hasFreightItem = Object.keys(row.feeItems).some(this.isFreightFeeItem);
- row.afterAmount = Number((hasFreightItem ? feeItemTotal : Number(row.freightAmount || 0) + feeItemTotal).toFixed(2));
+ row.afterAmount = Number(
+ (hasFreightItem ? feeItemTotal : Number(row.freightAmount || 0) + feeItemTotal).toFixed(2)
+ );
row.adjustAmount = Number((row.afterAmount - Number(row.originalAmount || 0)).toFixed(2));
},
isFreightFeeItem(name) {
@@ -882,7 +894,8 @@ export default {
return;
}
const invalidManualRow = this.adjustRows.find(
- row => row.manualFee && (!String(row.feeItemName || '').trim() || Number(row.amount || 0) <= 0)
+ row =>
+ row.manualFee && (!String(row.feeItemName || '').trim() || Number(row.amount || 0) <= 0)
);
if (invalidManualRow) {
this.$message.warning('请完整填写手工费用项目和金额');
@@ -1050,7 +1063,9 @@ export default {
return value !== null && value !== undefined && String(value).trim() !== '';
};
const normalizeSettlementType = value => {
- const normalized = String(value || '').trim().toLowerCase();
+ const normalized = String(value || '')
+ .trim()
+ .toLowerCase();
if (normalized === '应收') return 'receivable';
if (normalized === '应付') return 'payable';
return normalized;
@@ -1061,12 +1076,13 @@ export default {
const expectedSettlementType = normalizeSettlementType(this.settlementType);
const matchesSettlementType =
!expectedSettlementType || rowSettlementType === expectedSettlementType;
- const status = String(row.settlementStatus || '').trim().toLowerCase();
+ const status = String(row.settlementStatus || '')
+ .trim()
+ .toLowerCase();
const isClosed =
[row.closed, row.isClosed, row.closeFlag, row.closedFlag].some(
value => value === true || String(value).trim().toLowerCase() === 'true'
- ) ||
- ['closed', 'close', '已关闭'].includes(status);
+ ) || ['closed', 'close', '已关闭'].includes(status);
const hasPreSettlement = [
row.preSettlementId,
row.preSettlementIds,
@@ -1087,13 +1103,6 @@ export default {
!hasFormalSettlement
);
},
- confirmTransferSelection() {
- if (!this.transferSelection.length) {
- this.$message.warning('请选择需要转结算的明细');
- return;
- }
- this.$message.success(`已选择${this.transferSelection.length}条明细`);
- },
transferSelectionChange(selection) {
this.transferSelection = selection;
},
@@ -1102,20 +1111,57 @@ export default {
this.$message.warning('请选择需要转结算的明细');
return;
}
+ if (this.transferSelection.some(item => !item.contractId && !item.contractNo)) {
+ this.$message.warning('所选明细缺少合同信息,无法转结算');
+ return;
+ }
+ const contractKeys = new Set(
+ this.transferSelection.map(item =>
+ item.contractNo ? `no:${item.contractNo}` : `id:${item.contractId}`
+ )
+ );
+ if (contractKeys.size > 1) {
+ this.$message.warning('请选择同一合同下的明细进行转结算');
+ return;
+ }
this.transferDialog.submitting = true;
try {
- await api.transferSettlement({
- settlementType: this.settlementType || undefined,
- settlementBillType: this.transferForm.settlementBillType,
- ids: this.transferSelection.map(item => item.id),
+ const transferRows = await this.resolveTransferContractIds(this.transferSelection);
+ if (!transferRows) return;
+ const settlementBillType = this.transferForm.settlementBillType;
+ const transferToken = createSettlementTransfer({
+ settlementBillType,
+ settlementType: this.settlementType || transferRows[0]?.settlementType,
+ rows: transferRows,
});
- this.$message.success('转结算成功');
+ const isPreSettlement = settlementBillType === 'pre';
this.transferDialog.visible = false;
- this.loadTable();
+ await this.$router.push({
+ path: isPreSettlement
+ ? '/settlement/pre-settlement/form'
+ : '/settlement/formal-settlement/form',
+ query: {
+ mode: 'add',
+ transferToken,
+ name: isPreSettlement ? '新增预结算' : '新增正式结算',
+ },
+ });
} finally {
this.transferDialog.submitting = false;
}
},
+ async resolveTransferContractIds(rows) {
+ if (rows.every(item => item.contractId)) return rows;
+ const contractNo = rows.find(item => item.contractNo)?.contractNo;
+ const { data } = await getSettlementContractOptions(contractNo);
+ const contracts = data?.data || [];
+ const contract = contracts.find(item => String(item.contractNo) === String(contractNo));
+ if (!contract?.id) {
+ this.$message.warning('未找到所选明细对应的有效合同,无法转结算');
+ return null;
+ }
+ return rows.map(item => ({ ...item, contractId: item.contractId || contract.id }));
+ },
openGenerateDialog() {
this.generateDialog.visible = true;
this.generateQuery = {};
@@ -1127,8 +1173,9 @@ export default {
this.loadContracts();
},
handleGenerateContractChange(contractId) {
- this.syncBillingPlanOptions(contractId);
- this.generateQuery.billingPlanId = '';
+ const options = this.syncBillingPlanOptions(contractId);
+ const selected = options.find(item => item.defaultPlan) || options[0];
+ this.generateQuery.billingPlanId = selected?.id || '';
},
async loadGenerateWaybills() {
if (!this.generateQuery.contractId || !this.generateQuery.billingPlanId) {
@@ -1138,9 +1185,18 @@ export default {
this.generateDialog.loading = true;
try {
const params = this.buildRequestParams(
- this.normalizeQuery(this.generateQuery, 'finishDateRange', 'finishStartDate', 'finishEndDate')
+ this.normalizeQuery(
+ this.generateQuery,
+ 'finishDateRange',
+ 'finishStartDate',
+ 'finishEndDate'
+ )
+ );
+ const res = await api.getGenerateWaybills(
+ this.generatePage.current,
+ this.generatePage.size,
+ params
);
- const res = await api.getGenerateWaybills(this.generatePage.current, this.generatePage.size, params);
const data = this.unwrapPage(res);
this.generateRows = data.records || [];
this.generatePage.total = data.total || 0;
@@ -1188,12 +1244,49 @@ export default {
minWidth: 130,
align: 'right',
}));
+ const selectedWaybillsById = new Map();
+ const selectedWaybillsByNo = new Map();
+ this.generateSelection.forEach(item => {
+ [item.id, item.waybillId, item.sourceWaybillId].forEach(id => {
+ if (id !== null && id !== undefined && id !== '') {
+ selectedWaybillsById.set(String(id), item);
+ }
+ });
+ if (item.waybillNo) selectedWaybillsByNo.set(String(item.waybillNo), item);
+ });
this.previewRows = (data.records || []).map(row => {
const dynamic = {};
(data.feeItemNames || []).forEach((name, index) => {
dynamic[`feeItem${index}`] = row.feeItems?.[name] || '';
});
- return { ...row, ...dynamic };
+ const sourceWaybillId =
+ row.waybillId || row.sourceWaybillId || row.sourceId || row.businessId || row.id;
+ const sourceWaybill =
+ selectedWaybillsById.get(String(sourceWaybillId || '')) ||
+ selectedWaybillsByNo.get(String(row.waybillNo || row.waybillNumber || ''));
+ return {
+ ...row,
+ customerName:
+ row.customerName ||
+ row.customerUnitName ||
+ row.clientName ||
+ sourceWaybill?.customerName ||
+ '',
+ waybillNo:
+ row.waybillNo ||
+ row.waybillNumber ||
+ row.sourceWaybillNo ||
+ sourceWaybill?.waybillNo ||
+ '',
+ vehicleNo:
+ row.vehicleNo ||
+ row.plateNo ||
+ row.carNo ||
+ row.vehicleNumber ||
+ sourceWaybill?.vehicleNo ||
+ '',
+ ...dynamic,
+ };
});
this.previewPage.total = data.total || 0;
return true;
@@ -1207,6 +1300,12 @@ export default {
this.previewPage.current = 1;
this.loadGeneratePreview();
},
+ backToGenerateDialog() {
+ this.previewDialog.visible = false;
+ this.$nextTick(() => {
+ this.generateDialog.visible = true;
+ });
+ },
async submitGenerateFee() {
this.previewDialog.submitting = true;
try {
@@ -1227,7 +1326,12 @@ export default {
exportBlob(
'/blade-transport/receivable-payable-detail/export-receivable-payable-detail',
this.buildRequestParams(
- this.normalizeQuery(this.query, 'generateDateRange', 'generateStartDate', 'generateEndDate')
+ this.normalizeQuery(
+ this.query,
+ 'generateDateRange',
+ 'generateStartDate',
+ 'generateEndDate'
+ )
),
{ feedback: true }
).then(res => {
@@ -1254,7 +1358,9 @@ export default {
`plan-${index}`,
name: item.name || item.planName || item.billingPlanName || `计费方案${index + 1}`,
defaultPlan:
- item.defaultPlan === true || String(item.defaultPlan).toLowerCase() === 'true',
+ item.defaultPlan === true ||
+ item.defaultPlan === 1 ||
+ ['true', '1'].includes(String(item.defaultPlan).toLowerCase()),
}));
return this.billingPlanOptions;
},