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
+1 -1
View File
@@ -163,7 +163,7 @@
编辑
</el-link>
<el-link
type="primary"
type="danger"
v-if="hasPermission('common_cargo_delete') && !row.readonly"
@click="rowDel(row)"
>
+1 -1
View File
@@ -132,7 +132,7 @@
编辑
</el-link>
<el-link
type="primary"
type="danger"
v-if="hasPermission('common_route_delete') && !row.readonly"
@click="rowDel(row)"
>
@@ -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('确定删除该调度明细?', '提示', {
+1 -1
View File
@@ -318,7 +318,7 @@
<el-link
v-for="action in rowActions(row)"
:key="action.type"
type="primary"
:type="action.type === 'delete' ? 'danger' : 'primary'"
@click="handleRowAction(action.type, row)"
>{{ action.label }}</el-link>
</div>
+33 -3
View File
@@ -46,6 +46,27 @@
</el-button>
</template>
<template #menu-form-before="{ disabled }">
<template v-if="!dialogReadonly">
<el-button
plain
:loading="disabled"
:disabled="disabled"
@click="handleProcessConfigSave('draft')"
>
保存草稿
</el-button>
<el-button
type="primary"
:loading="disabled"
:disabled="disabled"
@click="handleProcessConfigSave('enabled')"
>
保存并启用
</el-button>
</template>
</template>
<template #status="{ row }">
<el-tag :type="statusTagType(row.status)">
{{ row.statusName || displayStatus(row.status) }}
@@ -382,7 +403,7 @@
停用
</el-link>
<el-link
type="primary"
type="danger"
v-if="canDelete(row)"
@click="rowDel(row)"
>
@@ -502,6 +523,7 @@ export default {
total: 0,
},
selectionList: [],
submitStatus: 1,
};
},
computed: {
@@ -870,9 +892,10 @@ export default {
}
);
},
submitRow(row, done, loading) {
submitRow(row, done, loading, status = this.submitStatus) {
this.submitStatus = 1;
this.syncNodeFields();
const submitRow = this.normalizeRow(row);
const submitRow = this.normalizeRow({ ...row, status });
if (!this.validateRow(submitRow)) {
this.stopSubmitLoading(loading);
return;
@@ -897,6 +920,12 @@ export default {
rowUpdate(row, index, done, loading) {
this.submitRow(row, done, loading);
},
handleProcessConfigSave(mode) {
this.submitStatus = mode === 'draft' ? 2 : 1;
if (this.$refs.crud && typeof this.$refs.crud.rowSave === 'function') {
this.$refs.crud.rowSave();
}
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
@@ -941,6 +970,7 @@ export default {
},
beforeOpen(done, type) {
this.dialogReadonly = type === 'view';
this.submitStatus = 1;
if (type === 'add') {
this.form = {
configName: '',
+20 -6
View File
@@ -78,7 +78,7 @@
>
{{ operation.label }}
</el-link>
<el-link type="primary" v-if="canDelete(row)" @click="rowDel(row)"> 删除 </el-link>
<el-link type="danger" v-if="canDelete(row)" @click="rowDel(row)"> 删除 </el-link>
</template>
</avue-crud>
@@ -481,7 +481,13 @@
show-icon
:title="`缺少必需材料:${missingRequiredAttachmentTypes.join('、')}`"
/>
<el-table :data="attachmentRows" border class="project-apply-form__material-table">
<el-table
:data="attachmentRows"
border
class="project-apply-form__material-table"
@selection-change="handleAttachmentSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="80" align="center" />
<el-table-column label="附件类型" min-width="160" align="center">
<template #default="{ row }">
@@ -515,7 +521,7 @@
<el-table-column label="操作" width="110" align="center">
<template #default="{ row, $index }">
<el-link type="primary" @click="downloadAttachment(row)">下载</el-link>
<el-link v-if="!dialogReadonly" type="primary" @click="removeAttachment($index)"
<el-link v-if="!dialogReadonly" type="danger" @click="removeAttachment($index)"
>删除</el-link
>
</template>
@@ -910,11 +916,9 @@ export default {
},
],
changeContent: [
{ required: true, message: '请输入变更内容', trigger: 'blur' },
{ max: 2000, message: '变更内容不能超过2000个字符', trigger: 'blur' },
],
changeReason: [
{ required: true, message: '请输入变更原因', trigger: 'blur' },
{ max: 2000, message: '变更原因不能超过2000个字符', trigger: 'blur' },
],
},
@@ -937,6 +941,7 @@ export default {
customerRows: [],
carrierRows: [],
attachmentRows: [],
selectedAttachmentRows: [],
attachmentFileTypes: [
'pdf',
'bmp',
@@ -1285,6 +1290,7 @@ export default {
this.customerRows = [];
this.carrierRows = [];
this.attachmentRows = [];
this.selectedAttachmentRows = [];
this.changeRows = [];
this.selectedCustomerId = [];
this.selectedCarrierIds = [];
@@ -1324,6 +1330,7 @@ export default {
this.customerRows = customerRows;
this.carrierRows = carrierRows;
this.attachmentRows = this.parseJsonArray(displayRow.attachmentsJson);
this.selectedAttachmentRows = [];
this.changeRows = this.buildChangeRows(displayRow);
this.selectedCustomerId = this.customerRows
.map(item => this.getCustomerRowId(item))
@@ -1791,6 +1798,10 @@ export default {
uploadUserName: item.uploadUserName || userName,
uploadTime: item.uploadTime || uploadTime,
}));
this.selectedAttachmentRows = [];
},
handleAttachmentSelectionChange(rows) {
this.selectedAttachmentRows = rows || [];
},
removeAttachment(index) {
this.attachmentRows.splice(index, 1);
@@ -1811,7 +1822,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));
},
handleChangeRecordAction() {
this.$message.info('变更记录详情由后端明细能力生成后展示');