项目、合同fix
This commit is contained in:
@@ -206,7 +206,8 @@
|
||||
<el-form-item label="客商类型" prop="customerType">
|
||||
<el-select
|
||||
v-model="archiveForm.customerType"
|
||||
placeholder="请输入"
|
||||
multiple
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
clearable
|
||||
>
|
||||
@@ -237,7 +238,11 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="营业期限" prop="businessEndDate" required>
|
||||
<el-form-item
|
||||
label="营业期限"
|
||||
prop="businessEndDate"
|
||||
:required="archiveForm.businessTermType === '固定期限'"
|
||||
>
|
||||
<div class="business-term-field">
|
||||
<el-date-picker
|
||||
v-model="archiveForm.businessEndDate"
|
||||
@@ -1691,7 +1696,7 @@ export default {
|
||||
deptId: [],
|
||||
deptIds: '',
|
||||
deptName: '',
|
||||
customerType: '',
|
||||
customerType: [],
|
||||
businessScope: [],
|
||||
businessTermType: '固定期限',
|
||||
registeredRegionPath: [],
|
||||
@@ -2020,7 +2025,12 @@ export default {
|
||||
if (checked) {
|
||||
this.archiveForm.businessEndDate = '';
|
||||
}
|
||||
this.$refs.archiveForm?.validateField('businessEndDate');
|
||||
this.$nextTick(() => {
|
||||
this.$refs.archiveForm?.clearValidate('businessEndDate');
|
||||
if (!checked) {
|
||||
this.$refs.archiveForm?.validateField('businessEndDate');
|
||||
}
|
||||
});
|
||||
},
|
||||
handleBusinessEndDateChange(value) {
|
||||
if (value) {
|
||||
@@ -2635,7 +2645,9 @@ export default {
|
||||
...this.emptyArchive(),
|
||||
...detail,
|
||||
deptId: this.normalizeDeptIds(detail),
|
||||
customerType: detail.customerType || '',
|
||||
customerType: this.splitValue(detail.customerType),
|
||||
invoiceTaxRate: this.normalizeOptionalAmount(detail.invoiceTaxRate),
|
||||
registeredCapital: this.normalizeOptionalAmount(detail.registeredCapital),
|
||||
businessScope,
|
||||
businessTermType: detail.businessTermType || '固定期限',
|
||||
registeredRegionPath: Array.isArray(detail.registeredRegionPath)
|
||||
@@ -2674,10 +2686,15 @@ export default {
|
||||
attachments: [],
|
||||
details: [],
|
||||
...score,
|
||||
tempApplyCreditLimit: this.normalizeOptionalAmount(score.tempApplyCreditLimit),
|
||||
attachments: score.attachments || this.parseAttachments(score.proofAttachments),
|
||||
details: score.details || [],
|
||||
};
|
||||
},
|
||||
normalizeOptionalAmount(value) {
|
||||
const amount = Number(value);
|
||||
return Number.isFinite(amount) && amount < 0 ? '' : value ?? '';
|
||||
},
|
||||
getScoreTimeValue(value) {
|
||||
if (!value) return 0;
|
||||
const time = this.$dayjs(value).valueOf();
|
||||
@@ -2763,6 +2780,13 @@ export default {
|
||||
},
|
||||
normalizeArchive() {
|
||||
const archive = JSON.parse(JSON.stringify(this.archiveForm));
|
||||
if (archive.businessTermType === '长期') {
|
||||
archive.businessEndDate = null;
|
||||
}
|
||||
const invoiceTaxRate = this.normalizeOptionalAmount(archive.invoiceTaxRate);
|
||||
const registeredCapital = this.normalizeOptionalAmount(archive.registeredCapital);
|
||||
archive.invoiceTaxRate = invoiceTaxRate === '' ? null : invoiceTaxRate;
|
||||
archive.registeredCapital = registeredCapital === '' ? null : registeredCapital;
|
||||
archive.customerType = Array.isArray(archive.customerType)
|
||||
? archive.customerType.join(',')
|
||||
: archive.customerType;
|
||||
|
||||
Reference in New Issue
Block a user