[update] 国内标准新车型实施日期备注和在产车实施日期备注,修改新车型实施日期和在产车实施日期时同步更新这两个字段

This commit is contained in:
lideqin
2024-08-01 16:16:30 +08:00
parent 811f797986
commit 9461e6bbd9
4 changed files with 41 additions and 5 deletions
+4 -4
View File
@@ -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 () {
+18 -1
View File
@@ -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"/>
<!-- 5, 多行文本 -->
<a-textarea v-else-if="item.fieldShowType === FieldType.TEXTAREA.value"
:placeholder="$t('pleaseEnter')+item.dbFieldTxt"
@@ -322,6 +323,14 @@ export default {
default: () => {
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
@@ -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)
@@ -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" />
</a-spin>