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