Merge remote-tracking branch 'origin/master'

This commit is contained in:
2026-08-11 12:15:15 +08:00
21 changed files with 408 additions and 107 deletions
@@ -564,7 +564,7 @@
</el-link>
<el-link
v-if="!dialogReadonly"
type="primary"
type="danger"
@click="removeTransportCargoRow($index)"
>
删除
@@ -1378,7 +1378,7 @@
</el-link>
<el-link
v-if="!dialogReadonly"
type="primary"
type="danger"
@click="removeTransportCargoRow($index)"
>
删除
@@ -1627,8 +1627,21 @@
button-text="上传附件"
@change="handleContractFileChange"
/>
<el-button
type="primary"
:disabled="!contractFileRows.length"
@click="handleContractFileBatchDownload"
>
批量下载
</el-button>
</div>
<el-table :data="contractFileRows" border class="business-crud-page__attachment-table">
<el-table
:data="contractFileRows"
border
class="business-crud-page__attachment-table"
@selection-change="handleContractFileSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="70" align="center" />
<el-table-column label="文件名" min-width="240" align="center" show-overflow-tooltip>
<template #default="{ row }">{{ row.originalName || row.name }}</template>
@@ -1638,11 +1651,11 @@
</el-table-column>
<el-table-column prop="uploadUserName" label="上传人" width="140" align="center" />
<el-table-column prop="uploadTime" label="上传时间" width="170" align="center" sortable/>
<el-table-column label="操作" width="120" align="center">
<el-table-column label="操作" width="120" align="center" fixed="right">
<template #default="{ row, $index }">
<el-link
v-if="!dialogReadonly"
type="primary"
type="danger"
@click="removeContractFile($index)"
>
删除
@@ -1687,14 +1700,14 @@
align="center"
show-overflow-tooltip
/>
<el-table-column label="操作" width="180" align="center">
<el-table-column label="操作" width="180" align="center" fixed="right">
<template #default="{ row, $index }">
<el-link type="primary" @click="openBillingPlan(row, $index)">
编辑
</el-link>
<el-link
v-if="!dialogReadonly"
type="primary"
type="danger"
@click="removeBillingPlan($index)"
>
删除
@@ -1882,7 +1895,13 @@
批量下载
</el-button>
</div>
<el-table :data="attachmentRows" border class="business-crud-page__attachment-table">
<el-table
:data="attachmentRows"
border
class="business-crud-page__attachment-table"
@selection-change="handleAttachmentSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="70" align="center" />
<el-table-column label="文件名" min-width="200" align="center" show-overflow-tooltip>
<template #default="{ row }">{{ row.originalName || row.name }}</template>
@@ -1901,11 +1920,11 @@
</el-table-column>
<el-table-column prop="uploadUserName" label="上传人" width="140" align="center" />
<el-table-column prop="uploadTime" label="上传时间" width="160" align="center" sortable/>
<el-table-column label="操作" width="100" align="center">
<el-table-column label="操作" width="100" align="center" fixed="right">
<template #default="{ row, $index }">
<el-link
v-if="!dialogReadonly"
type="primary"
type="danger"
@click="removeAttachment($index)"
>
删除
@@ -1937,7 +1956,7 @@
show-overflow-tooltip
/>
<el-table-column prop="statusName" label="状态" min-width="140" align="center" />
<el-table-column label="操作" width="120" align="center">
<el-table-column label="操作" width="120" align="center" fixed="right">
<template #default="{ row }">
<el-link type="primary" @click="handleChangeRecordFlow(row)"> 流程 </el-link>
</template>
@@ -2095,7 +2114,7 @@
>
{{ operation.label }}
</el-link>
<el-link type="primary" v-if="canDelete(row)" @click="rowDel(row)">
<el-link type="danger" v-if="canDelete(row)" @click="rowDel(row)">
删除
</el-link>
</template>
@@ -3124,7 +3143,9 @@
:data="dispatchItemAttachmentRows"
border
class="business-crud-page__attachment-table"
@selection-change="handleDispatchItemAttachmentSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="70" align="center" />
<el-table-column label="文件名" min-width="200" align="center" show-overflow-tooltip>
<template #default="{ row }">{{ row.originalName || row.name }}</template>
@@ -3139,7 +3160,7 @@
</el-table-column>
<el-table-column prop="uploadUserName" label="上传人" width="140" align="center" />
<el-table-column prop="uploadTime" label="上传时间" width="160" align="center" sortable/>
<el-table-column label="操作" width="100" align="center">
<el-table-column label="操作" width="100" align="center" fixed="right">
<template #default="{ $index }">
<el-link type="danger" @click="removeDispatchItemAttachment($index)">删除</el-link>
</template>
@@ -3364,7 +3385,7 @@
</el-link>
<el-button
v-if="canEditBillingLimit(row) && getBillingLimitRanges(row).length > 1"
type="primary"
type="danger"
text
@click="removeBillingLimitRange(row, rangeIndex)"
>
@@ -3409,7 +3430,7 @@
</el-link>
<el-link
v-if="!dialogReadonly"
type="primary"
type="danger"
@click="removeBillingRule($index)"
>
删除
@@ -4304,8 +4325,11 @@ export default {
dispatchItemIndex: -1,
dispatchItemForm: defaultDispatchRow(),
dispatchItemAttachmentRows: [],
selectedDispatchItemAttachmentRows: [],
attachmentRows: [],
selectedAttachmentRows: [],
contractFileRows: [],
selectedContractFileRows: [],
transportCargoRows: [],
shippingTemplateFreight: defaultShippingTemplateFreight(),
shippingTemplateCurrencyOptions: [],
@@ -5107,6 +5131,7 @@ export default {
this.form.planName = this.form.planName || this.form.templateName || '';
this.selectedProjectId = this.form.projectId || '';
this.attachmentRows = this.parseJsonArray(this.form.attachmentsJson);
this.selectedAttachmentRows = [];
if (this.contractSelectEnabled) {
this.syncCurrentContractOption();
this.loadContractOptionsForProject();
@@ -5810,7 +5835,9 @@ export default {
this.selectedProjectId = '';
this.selectedOrganizationId = '';
this.attachmentRows = [];
this.selectedAttachmentRows = [];
this.contractFileRows = [];
this.selectedContractFileRows = [];
this.shippingPlanOptions = [];
if (this.contractSelectEnabled) {
this.contractOptions = [];
@@ -5861,7 +5888,9 @@ export default {
this.selectedProjectId = this.form.projectId || '';
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);
this.settlementRuleForm = this.normalizeSettlementRule({
@@ -7630,10 +7659,17 @@ export default {
uploadUserName: item.uploadUserName || userName,
uploadTime: item.uploadTime || uploadTime,
}));
this.selectedAttachmentRows = [];
this.form.attachmentsJson = JSON.stringify(this.attachmentRows);
},
handleAttachmentSelectionChange(rows) {
this.selectedAttachmentRows = rows || [];
},
removeAttachment(index) {
this.attachmentRows.splice(index, 1);
this.selectedAttachmentRows = this.selectedAttachmentRows.filter(item =>
this.attachmentRows.includes(item)
);
this.form.attachmentsJson = JSON.stringify(this.attachmentRows);
},
formatFileSize(size) {
@@ -7652,7 +7688,10 @@ export default {
downloadFileByUrl(url, row.originalName || row.name || '附件');
},
handleBatchDownload() {
this.attachmentRows.forEach(row => this.downloadAttachment(row));
const rows = this.selectedAttachmentRows.length
? this.selectedAttachmentRows
: this.attachmentRows;
rows.forEach(row => this.downloadAttachment(row));
},
handleDispatchItemAttachmentChange(list) {
const userName = this.userInfo?.realName || this.userInfo?.userName || '';
@@ -7663,12 +7702,22 @@ export default {
uploadUserName: item.uploadUserName || userName,
uploadTime: item.uploadTime || uploadTime,
}));
this.selectedDispatchItemAttachmentRows = [];
},
removeDispatchItemAttachment(index) {
this.dispatchItemAttachmentRows.splice(index, 1);
this.selectedDispatchItemAttachmentRows = this.selectedDispatchItemAttachmentRows.filter(item =>
this.dispatchItemAttachmentRows.includes(item)
);
},
handleDispatchItemBatchDownload() {
this.dispatchItemAttachmentRows.forEach(row => this.downloadAttachment(row));
const rows = this.selectedDispatchItemAttachmentRows.length
? this.selectedDispatchItemAttachmentRows
: this.dispatchItemAttachmentRows;
rows.forEach(row => this.downloadAttachment(row));
},
handleDispatchItemAttachmentSelectionChange(rows) {
this.selectedDispatchItemAttachmentRows = rows || [];
},
handleContractFileChange(list) {
const userName = this.userInfo?.realName || this.userInfo?.userName || '';
@@ -7678,12 +7727,25 @@ export default {
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));
},
@@ -8999,6 +9061,7 @@ export default {
this.dispatchItemIndex = -1;
this.dispatchItemForm = defaultDispatchRow();
this.dispatchItemAttachmentRows = [];
this.selectedDispatchItemAttachmentRows = [];
},
buildDispatchRows(plan = {}) {
const goodsRows = this.parseJsonArray(plan.goodsJson);
@@ -9128,6 +9191,7 @@ export default {
this.dispatchItemAttachmentRows = this.parseJsonArray(
index >= 0 ? row.attachmentsJson : this.dispatchRow.attachmentsJson
);
this.selectedDispatchItemAttachmentRows = [];
this.dispatchItemBox = true;
},
handleDispatchCarrierTypeChange(value) {
@@ -9219,11 +9283,13 @@ export default {
this.dispatchItemIndex = -1;
this.dispatchItemForm = defaultDispatchRow();
this.dispatchItemAttachmentRows = [];
this.selectedDispatchItemAttachmentRows = [];
},
resetDispatchItemDialog() {
this.dispatchItemIndex = -1;
this.dispatchItemForm = defaultDispatchRow();
this.dispatchItemAttachmentRows = [];
this.selectedDispatchItemAttachmentRows = [];
},
removeDispatchRow(index) {
this.$confirm('确定删除该调度明细?', '提示', {