This commit is contained in:
2026-08-07 15:44:19 +08:00
parent 56729c8cc9
commit a8c495a102
4 changed files with 710 additions and 81 deletions
+5
View File
@@ -12,8 +12,12 @@ export const config = {
exportName: '发货模板',
enableAllDept: false,
enableProjectSelect: true,
excludeVoidedProjects: true,
enableAttachmentTable: true,
enableTransportPlanForm: true,
enableShippingTemplateFreight: true,
editableRoadAddress: true,
fixedTransportAddressType: true,
enableTemplateCodePreview: true,
attachmentTitle: '附件',
defaultForm: {
@@ -178,6 +182,7 @@ export const option = {
labelWidth: '0px',
className: 'business-crud-page__full-form-item',
},
{ label: '运费信息', prop: 'freightJson', hide: true, display: false },
{
label: '',
prop: 'attachmentTitle',
+1 -1
View File
@@ -97,7 +97,7 @@ const formatGoodsInfo = row => {
const text = Object.entries(groups)
.map(([unit, group]) => {
const quantity = `${formatGoodsQuantity(group.quantity)}${unit}`;
return `${group.typeName}${group.count}货物 | ${quantity}`;
return `${group.typeName}${group.count}货物 | ${quantity}`;
})
.join('; ');
File diff suppressed because it is too large Load Diff
+25 -7
View File
@@ -1015,7 +1015,7 @@
v-for="item in scoreQuantificationOptions"
:key="item.id"
:label="item.name"
:value="item.id"
:value="String(item.id)"
/>
</el-select>
</el-form-item>
@@ -1960,14 +1960,14 @@ export default {
},
initScoreQuantificationOptions() {
this.scoreQuantificationLoading = true;
getCreditScoreQuantificationList(1, 9999, { status: 1 })
return getCreditScoreQuantificationList(1, 9999, { status: 1 })
.then(res => {
const data = res.data.data || {};
const records = Array.isArray(data) ? data : data.records || [];
this.scoreQuantificationOptions = records
.filter(item => Number(item.status) === 1)
.map(item => ({
id: item.id,
id: String(item.id),
name: item.name || item.configName || item.title || item.id,
}));
})
@@ -1975,6 +1975,21 @@ export default {
this.scoreQuantificationLoading = false;
});
},
ensureScoreQuantificationOption(quantificationId) {
if (!quantificationId) return Promise.resolve();
const id = String(quantificationId);
if (this.scoreQuantificationOptions.some(item => String(item.id) === id)) {
return Promise.resolve();
}
return getCreditScoreQuantificationDetail(quantificationId).then(res => {
const item = res.data.data || {};
if (!item.id) return;
this.scoreQuantificationOptions.push({
id: String(item.id),
name: item.name || item.configName || item.title || String(item.id),
});
});
},
loadDictOptions(code, target, fallback = [], callback) {
getDictionary({ code }).then(res => {
const options = (res.data.data || []).map(item => ({
@@ -2021,6 +2036,7 @@ export default {
const deptNames = deptIds
.map(id => this.deptOptions.find(item => String(item.value) === String(id))?.rawLabel)
.filter(Boolean);
this.archiveForm.deptId = deptIds;
this.archiveForm.deptIds = deptIds.join(',');
this.archiveForm.deptName = deptNames.join(',');
this.$refs.archiveForm?.validateField('deptName');
@@ -2691,6 +2707,7 @@ export default {
attachments: [],
details: [],
...score,
quantificationId: score.quantificationId ? String(score.quantificationId) : '',
tempApplyCreditLimit: this.normalizeOptionalAmount(score.tempApplyCreditLimit),
attachments: score.attachments || this.parseAttachments(score.proofAttachments),
details: score.details || [],
@@ -2807,7 +2824,7 @@ export default {
.map(id => this.deptOptions.find(item => String(item.value) === String(id))?.rawLabel)
.filter(Boolean);
archive.deptIds = deptIds.join(',');
archive.deptId = deptIds.length ? deptIds[0] : '';
archive.deptId = deptIds.length ? Number(deptIds[0]) : null;
archive.deptName = deptNames.length ? deptNames.join(',') : archive.deptName;
archive.registeredAddress = this.formatArchiveAddress(archive);
delete archive.registeredRegionPath;
@@ -2884,9 +2901,10 @@ export default {
this.scoreAttachmentFiles = JSON.parse(JSON.stringify(this.currentScore.attachments || []));
this.expandedScoreCategoryKeys = [];
this.scoreBox = true;
if (!this.scoreQuantificationOptions.length) {
this.initScoreQuantificationOptions();
}
const loadOptions = this.scoreQuantificationOptions.length
? Promise.resolve()
: this.initScoreQuantificationOptions();
loadOptions.then(() => this.ensureScoreQuantificationOption(this.currentScore.quantificationId));
},
resetScoreDialog() {
this.scoreRecordIndex = -1;