diff --git a/src/components/JMultipleDatePicker.vue b/src/components/JMultipleDatePicker.vue index 37c9269c..05edb429 100644 --- a/src/components/JMultipleDatePicker.vue +++ b/src/components/JMultipleDatePicker.vue @@ -42,7 +42,7 @@ export default { this.checkedValue = [] this.firstValue = null document.getElementById(this.fieldName).children[0].children[0].value = '' - this.$emit('change', '') + this.$emit('change', '', this.fieldName) } else { this.checkedValue = val.split(',') this.firstValue = this.checkedValue[0] @@ -105,7 +105,7 @@ export default { } else { this.checkedValue = [] } - this.$emit('change', this.checkedValue.join(',')) + this.$emit('change', this.checkedValue.join(','), this.fieldName) } this.$refs[this.fieldName].blur() this.open = open @@ -121,7 +121,7 @@ export default { if (!val) { this.firstValue = null this.checkedValue = [] - this.$emit('change', this.checkedValue.join(',')) + this.$emit('change', this.checkedValue.join(','), this.fieldName) } }, getCurrentStyle (current) { @@ -157,7 +157,7 @@ export default { inputDom.addEventListener('focus', this.focusInput) }) }) - this.$emit('change', this.checkedValue.join(',')) + this.$emit('change', this.checkedValue.join(','), this.fieldName) } // 点击日期弹出框中的确定按钮 // handleOk () { diff --git a/src/components/customField/AddForm.vue b/src/components/customField/AddForm.vue index 33fa1e09..746eb947 100644 --- a/src/components/customField/AddForm.vue +++ b/src/components/customField/AddForm.vue @@ -43,7 +43,8 @@ class="box-input" v-model="formInline[item.dbFieldName]" :fieldName="item.dbFieldName" - :disabled="disabled || disabledFieldList.includes(item.dbFieldName)" /> + :disabled="disabled || disabledFieldList.includes(item.dbFieldName)" + @change="multipleDateChange"/> { return [] } + }, + // 数据修改后需要同步更新该字段名后面加_remarks的字段的数据 + needSyncRemarksDataField: { + type: Array, + required: false, + default: () => { + return [] + } } }, mounted () { @@ -764,6 +773,14 @@ export default { // this.formInline[value + '_by'] = id this.formInline = { ...this.formInline } }, + // 多选日期改变 + multipleDateChange (value, fieldName) { + if (this.needSyncRemarksDataField.includes(fieldName)) { + // 有关联字段需要更新 + this.formInline[fieldName + '_remarks'] = value + this.formInline = { ...this.formInline } + } + }, // 选择用户得到用户名 userSelectNameChange (value, fieldName) { this.formInline[fieldName + '_dictText'] = value diff --git a/src/views/dashboard/modules/SearchAndWarningCard.vue b/src/views/dashboard/modules/SearchAndWarningCard.vue index d5ac9b70..c53c2250 100644 --- a/src/views/dashboard/modules/SearchAndWarningCard.vue +++ b/src/views/dashboard/modules/SearchAndWarningCard.vue @@ -94,6 +94,13 @@ const warningColumns = [ dataIndex: 'newModelImplementationDate', width: 100, scopedSlots: { customRender: 'text' } + }, + { + title: '新车型实施日期备注', + align: 'left', + dataIndex: 'newModelImplementationDateRemarks', + width: 140, + scopedSlots: { customRender: 'text' } } ] @@ -182,6 +189,13 @@ export default { dataIndex: 'newModelImplementationDate', width: 100, scopedSlots: { customRender: 'text' } + }, + { + title: '新车型实施日期备注', + align: 'left', + dataIndex: 'newModelImplementationDateRemarks', + width: 140, + scopedSlots: { customRender: 'text' } } ], dataSource: [], @@ -257,10 +271,14 @@ export default { this.columns.splice(1, this.columns.length - 1, ...warningColumns) this.columns[4].title = '新车型实施日期' this.columns[4].dataIndex = 'newModelImplementationDate' + this.columns[5].title = '新车型实施日期备注' + this.columns[5].dataIndex = 'newModelImplementationDateRemarks' } else if (value === 'carInProduction') { this.columns.splice(1, this.columns.length - 1, ...warningColumns) this.columns[4].title = '在产车实施日期' this.columns[4].dataIndex = 'onTheProductionDate' + this.columns[5].title = '在产车实施日期备注' + this.columns[5].dataIndex = 'onTheProductionDateRemarks' } else { // 是企标实施预警或企标发布预警 this.columns.splice(1, this.columns.length - 1, ...enStandardColumns) diff --git a/src/views/standardRegulationLibrary/domesticStandard/modules/DomesticStandardModal.vue b/src/views/standardRegulationLibrary/domesticStandard/modules/DomesticStandardModal.vue index 8c6ec6e8..c7b4e36c 100644 --- a/src/views/standardRegulationLibrary/domesticStandard/modules/DomesticStandardModal.vue +++ b/src/views/standardRegulationLibrary/domesticStandard/modules/DomesticStandardModal.vue @@ -23,6 +23,7 @@ :exclude-standard-fields="excludeStandardFields" domestic-special-check :flag-by-field="{associated_foreign_standards: StandardSource.OVERSEAS.value}" + :needSyncRemarksDataField="['new_model_implementation_date', 'on_the_production_date']" :process-is-allow-upload-doc="false" @submitFormData="submitFormData" />