Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/option/business/shipping-template.js
#	src/option/business/transport-plan.js
#	src/option/business/waybill-manage.js
#	src/views/business/components/business-crud-page.vue
#	src/views/business/components/master-order-detail.vue
#	src/views/business/components/master-order-editor.vue
#	src/views/business/components/waybill-import-dialog.vue
This commit is contained in:
2026-08-13 19:11:34 +08:00
39 changed files with 9092 additions and 1841 deletions
+60 -35
View File
@@ -532,6 +532,7 @@
<el-table :data="invoiceTableData" border class="invoice-table">
<el-table-column label="序号" prop="__index" width="90" align="center" />
<el-table-column label="收票方名称" prop="invoiceTitle" min-width="180" />
<el-table-column label="发票类型" prop="invoiceType" min-width="150" />
<el-table-column label="纳税人识别号" prop="taxNo" min-width="180" />
<el-table-column label="开户行名称" prop="bankName" min-width="180" />
<el-table-column label="注册电话" prop="registeredPhone" min-width="150" />
@@ -892,6 +893,12 @@
<el-form-item label="收票方名称" prop="invoiceTitle">
<el-input v-model="invoiceForm.invoiceTitle" maxlength="100" />
</el-form-item>
<el-form-item label="发票类型" prop="invoiceType">
<el-select v-model="invoiceForm.invoiceType" clearable placeholder="请选择">
<el-option label="增值税专用发票" value="增值税专用发票" />
<el-option label="普通发票" value="普通发票" />
</el-select>
</el-form-item>
<el-form-item label="开户行名称" prop="bankName">
<el-select v-model="invoiceForm.bankName" filterable clearable>
<el-option
@@ -919,14 +926,16 @@
<div class="invoice-form__address">
<el-input
v-model="invoiceForm.receiverRegionName"
readonly
maxlength="100"
placeholder="地址控件选择"
placeholder="点击后弹出地图组件"
@click="handleInvoiceReceiverMapPick"
/>
<el-input
v-model="invoiceForm.receiverDetailAddress"
maxlength="255"
placeholder="请输入详细地址"
/>
><template #suffix><el-icon class="invoice-form__address-location" @click="handleInvoiceReceiverMapPick"><Location /></el-icon></template></el-input>
</div>
</el-form-item>
</el-col>
@@ -1220,7 +1229,7 @@ import { downloadXls } from '@/utils/util';
import { getToken } from '@/utils/auth';
import { getUploadHeaders } from '@/utils/upload';
import { normalizeSearchRangeParams } from '@/utils/search-range';
import { ArrowRight } from '@element-plus/icons-vue';
import { ArrowRight, Location } from '@element-plus/icons-vue';
import { ElImageViewer } from 'element-plus';
import { OpenFileViewer } from '@open-file-viewer/vue';
import { fallbackPlugin, imagePlugin, officePlugin, pdfPlugin, textPlugin } from '@open-file-viewer/core';
@@ -1248,6 +1257,7 @@ const qualificationViewerPlugins = [
export default {
components: {
ArrowRight,
Location,
ElImageViewer,
OpenFileViewer,
},
@@ -1308,6 +1318,7 @@ export default {
receiptBox: false,
invoiceBox: false,
readonly: false,
originalAccessType: '',
activeTab: 'scores',
archiveForm: this.emptyArchive(),
currentScore: { details: [] },
@@ -1458,6 +1469,7 @@ export default {
invoiceRules: {
taxNo: [{ required: true, message: '请输入纳税人识别号', trigger: 'blur' }],
invoiceTitle: [{ required: true, message: '请输入收票方名称', trigger: 'blur' }],
invoiceType: [{ required: true, message: '请选择发票类型', trigger: 'change' }],
registeredPhone: [{ required: true, message: '请输入注册电话', trigger: 'blur' }],
bankName: [{ required: true, message: '请输入开户行名称', trigger: 'blur' }],
registeredRegionName: [
@@ -1573,6 +1585,7 @@ export default {
type: 'select',
search: true,
searchOrder: 8,
searchPlaceholder: '请选择',
minWidth: 120,
dicData: [
{ label: '临时', value: 'temporary' },
@@ -1678,8 +1691,11 @@ export default {
invoiceDialogTitle() {
return this.invoiceIndex > -1 ? '编辑发票信息' : '新增发票信息';
},
isTemporaryToFormal() {
return Boolean(this.archiveForm.id) && this.originalAccessType === 'temporary' && this.archiveForm.accessType === 'formal';
},
missingQualificationText() {
if (this.archiveForm.accessType !== 'formal') return '';
if (this.archiveForm.accessType !== 'formal' || this.isTemporaryToFormal) return '';
const types = this.qualificationFiles
.filter(item => item.url)
.map(item => item.type || item.name)
@@ -1909,6 +1925,7 @@ export default {
emptyInvoice() {
return {
invoiceTitle: '',
invoiceType: '',
taxNo: '',
bankName: '',
registeredPhone: '',
@@ -1938,27 +1955,12 @@ export default {
value: item.rawLabel,
})),
];
this.applyDefaultDeptSearch(deptColumn);
})
.finally(() => {
this.deptSearchInitialized = true;
this.$nextTick(() => this.onLoad(this.page, this.query));
});
},
applyDefaultDeptSearch(deptColumn) {
if (this.isAdmin) return;
const currentDeptId = this.userInfo.deptId || this.userInfo.dept_id;
const currentDept = this.deptOptions.find(
item => String(item.value) === String(currentDeptId)
);
const deptName = currentDept?.rawLabel || this.userInfo.deptName || this.userInfo.dept_name;
if (!deptName) return;
deptColumn.searchValue = deptName;
this.query = { ...this.query, deptName };
if (this.$refs.crud?.searchForm) {
this.$refs.crud.searchForm.deptName = deptName;
}
},
initRegionOptions() {
getLazyTree().then(res => {
const regions = this.buildRegionTree(res.data.data || []);
@@ -2220,13 +2222,11 @@ export default {
);
},
formatInvoiceReceiverAddress(row = {}) {
return (
row.receiverAddress ||
[row.receiverRegionName, row.receiverDetailAddress]
.map(item => String(item || '').trim())
.filter(Boolean)
.join('')
);
const address = [row.receiverRegionName, row.receiverDetailAddress]
.map(item => String(item || '').trim())
.filter(Boolean)
.join('');
return address || row.receiverAddress || '';
},
normalizeContact(contact = {}) {
const contactAddress =
@@ -2307,6 +2307,17 @@ export default {
this.contactMapStatus = '可搜索地址或点击地图选点';
this.contactMapBox = true;
},
handleInvoiceReceiverMapPick() {
this.contactMapTarget = 'invoiceReceiver';
this.contactMapKeyword =
this.invoiceForm.receiverDetailAddress || this.invoiceForm.receiverRegionName || '';
this.contactMapSelected = this.buildContactMapSelection({
address: this.invoiceForm.receiverDetailAddress,
regionName: this.invoiceForm.receiverRegionName,
});
this.contactMapStatus = '可搜索地址或点击地图选点';
this.contactMapBox = true;
},
loadAmap() {
if (window.AMap && window.AMap.Map) {
return Promise.resolve();
@@ -2462,6 +2473,18 @@ export default {
this.contactMapBox = false;
return;
}
if (this.contactMapTarget === 'invoiceReceiver') {
this.invoiceForm.receiverRegionName =
this.contactMapSelected.regionName || this.invoiceForm.receiverRegionName;
this.invoiceForm.receiverDetailAddress = this.formatMapDetailAddress(
this.contactMapSelected.detailAddress || this.invoiceForm.receiverDetailAddress,
this.invoiceForm.receiverRegionName
);
this.invoiceForm.receiverAddress = this.formatInvoiceReceiverAddress(this.invoiceForm);
this.$refs.invoiceForm?.validateField('receiverRegionName');
this.contactMapBox = false;
return;
}
this.contactForm.detailAddress =
this.contactMapSelected.detailAddress || this.contactForm.detailAddress;
this.contactForm.regionName =
@@ -2948,6 +2971,7 @@ export default {
if (row && row.id) {
getDetail(row.id).then(res => {
this.archiveForm = this.normalizeDetail(res.data.data);
this.originalAccessType = this.archiveForm.accessType || '';
this.qualificationFiles = this.parseAttachments(
this.archiveForm.qualificationAttachments
);
@@ -2958,6 +2982,7 @@ export default {
return;
}
this.archiveForm = this.emptyArchive();
this.originalAccessType = '';
this.qualificationFiles = [];
this.qualificationUploadFiles = [];
this.selectedQualificationFiles = [];
@@ -2966,6 +2991,7 @@ export default {
resetArchive() {
this.readonly = false;
this.archiveForm = this.emptyArchive();
this.originalAccessType = '';
this.qualificationFiles = [];
this.qualificationUploadFiles = [];
this.selectedQualificationFiles = [];
@@ -2986,7 +3012,8 @@ export default {
},
validateFormalForApproval(archive) {
if (archive.accessType !== 'formal') return true;
if (!archive.qualificationAttachments) {
const isTemporaryToFormal = Boolean(archive.id) && this.originalAccessType === 'temporary';
if (!isTemporaryToFormal && !archive.qualificationAttachments) {
this.$message.warning('正式客商提交审核前必须维护客商材料');
return false;
}
@@ -3592,7 +3619,7 @@ export default {
});
},
searchReset() {
this.query = this.isAdmin ? {} : { deptName: this.getCurrentDeptName() };
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
@@ -3661,13 +3688,6 @@ export default {
buildQuery(params = {}) {
return normalizeSearchRangeParams({ ...params, ...this.query }, createTimeRangeMap);
},
getCurrentDeptName() {
const currentDeptId = this.userInfo.deptId || this.userInfo.dept_id;
const currentDept = this.deptOptions.find(
item => String(item.value) === String(currentDeptId)
);
return currentDept?.rawLabel || this.userInfo.deptName || this.userInfo.dept_name || '';
},
},
};
</script>
@@ -4029,6 +4049,11 @@ export default {
}
}
.invoice-form__address-location {
cursor: pointer;
color: #909399;
}
.score-detail-table {
width: 100%;
margin-top: 12px;