[update] 国内标准新车型实施日期备注和在产车实施日期备注,修改新车型实施日期和在产车实施日期时同步更新这两个字段
This commit is contained in:
@@ -42,7 +42,7 @@ export default {
|
|||||||
this.checkedValue = []
|
this.checkedValue = []
|
||||||
this.firstValue = null
|
this.firstValue = null
|
||||||
document.getElementById(this.fieldName).children[0].children[0].value = ''
|
document.getElementById(this.fieldName).children[0].children[0].value = ''
|
||||||
this.$emit('change', '')
|
this.$emit('change', '', this.fieldName)
|
||||||
} else {
|
} else {
|
||||||
this.checkedValue = val.split(',')
|
this.checkedValue = val.split(',')
|
||||||
this.firstValue = this.checkedValue[0]
|
this.firstValue = this.checkedValue[0]
|
||||||
@@ -105,7 +105,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.checkedValue = []
|
this.checkedValue = []
|
||||||
}
|
}
|
||||||
this.$emit('change', this.checkedValue.join(','))
|
this.$emit('change', this.checkedValue.join(','), this.fieldName)
|
||||||
}
|
}
|
||||||
this.$refs[this.fieldName].blur()
|
this.$refs[this.fieldName].blur()
|
||||||
this.open = open
|
this.open = open
|
||||||
@@ -121,7 +121,7 @@ export default {
|
|||||||
if (!val) {
|
if (!val) {
|
||||||
this.firstValue = null
|
this.firstValue = null
|
||||||
this.checkedValue = []
|
this.checkedValue = []
|
||||||
this.$emit('change', this.checkedValue.join(','))
|
this.$emit('change', this.checkedValue.join(','), this.fieldName)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getCurrentStyle (current) {
|
getCurrentStyle (current) {
|
||||||
@@ -157,7 +157,7 @@ export default {
|
|||||||
inputDom.addEventListener('focus', this.focusInput)
|
inputDom.addEventListener('focus', this.focusInput)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.$emit('change', this.checkedValue.join(','))
|
this.$emit('change', this.checkedValue.join(','), this.fieldName)
|
||||||
}
|
}
|
||||||
// 点击日期弹出框中的确定按钮
|
// 点击日期弹出框中的确定按钮
|
||||||
// handleOk () {
|
// handleOk () {
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
class="box-input"
|
class="box-input"
|
||||||
v-model="formInline[item.dbFieldName]"
|
v-model="formInline[item.dbFieldName]"
|
||||||
:fieldName="item.dbFieldName"
|
:fieldName="item.dbFieldName"
|
||||||
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)" />
|
:disabled="disabled || disabledFieldList.includes(item.dbFieldName)"
|
||||||
|
@change="multipleDateChange"/>
|
||||||
<!-- 5, 多行文本 -->
|
<!-- 5, 多行文本 -->
|
||||||
<a-textarea v-else-if="item.fieldShowType === FieldType.TEXTAREA.value"
|
<a-textarea v-else-if="item.fieldShowType === FieldType.TEXTAREA.value"
|
||||||
:placeholder="$t('pleaseEnter')+item.dbFieldTxt"
|
:placeholder="$t('pleaseEnter')+item.dbFieldTxt"
|
||||||
@@ -322,6 +323,14 @@ export default {
|
|||||||
default: () => {
|
default: () => {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 数据修改后需要同步更新该字段名后面加_remarks的字段的数据
|
||||||
|
needSyncRemarksDataField: {
|
||||||
|
type: Array,
|
||||||
|
required: false,
|
||||||
|
default: () => {
|
||||||
|
return []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
@@ -764,6 +773,14 @@ export default {
|
|||||||
// this.formInline[value + '_by'] = id
|
// this.formInline[value + '_by'] = id
|
||||||
this.formInline = { ...this.formInline }
|
this.formInline = { ...this.formInline }
|
||||||
},
|
},
|
||||||
|
// 多选日期改变
|
||||||
|
multipleDateChange (value, fieldName) {
|
||||||
|
if (this.needSyncRemarksDataField.includes(fieldName)) {
|
||||||
|
// 有关联字段需要更新
|
||||||
|
this.formInline[fieldName + '_remarks'] = value
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
}
|
||||||
|
},
|
||||||
// 选择用户得到用户名
|
// 选择用户得到用户名
|
||||||
userSelectNameChange (value, fieldName) {
|
userSelectNameChange (value, fieldName) {
|
||||||
this.formInline[fieldName + '_dictText'] = value
|
this.formInline[fieldName + '_dictText'] = value
|
||||||
|
|||||||
@@ -94,6 +94,13 @@ const warningColumns = [
|
|||||||
dataIndex: 'newModelImplementationDate',
|
dataIndex: 'newModelImplementationDate',
|
||||||
width: 100,
|
width: 100,
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '新车型实施日期备注',
|
||||||
|
align: 'left',
|
||||||
|
dataIndex: 'newModelImplementationDateRemarks',
|
||||||
|
width: 140,
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -182,6 +189,13 @@ export default {
|
|||||||
dataIndex: 'newModelImplementationDate',
|
dataIndex: 'newModelImplementationDate',
|
||||||
width: 100,
|
width: 100,
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '新车型实施日期备注',
|
||||||
|
align: 'left',
|
||||||
|
dataIndex: 'newModelImplementationDateRemarks',
|
||||||
|
width: 140,
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
@@ -257,10 +271,14 @@ export default {
|
|||||||
this.columns.splice(1, this.columns.length - 1, ...warningColumns)
|
this.columns.splice(1, this.columns.length - 1, ...warningColumns)
|
||||||
this.columns[4].title = '新车型实施日期'
|
this.columns[4].title = '新车型实施日期'
|
||||||
this.columns[4].dataIndex = 'newModelImplementationDate'
|
this.columns[4].dataIndex = 'newModelImplementationDate'
|
||||||
|
this.columns[5].title = '新车型实施日期备注'
|
||||||
|
this.columns[5].dataIndex = 'newModelImplementationDateRemarks'
|
||||||
} else if (value === 'carInProduction') {
|
} else if (value === 'carInProduction') {
|
||||||
this.columns.splice(1, this.columns.length - 1, ...warningColumns)
|
this.columns.splice(1, this.columns.length - 1, ...warningColumns)
|
||||||
this.columns[4].title = '在产车实施日期'
|
this.columns[4].title = '在产车实施日期'
|
||||||
this.columns[4].dataIndex = 'onTheProductionDate'
|
this.columns[4].dataIndex = 'onTheProductionDate'
|
||||||
|
this.columns[5].title = '在产车实施日期备注'
|
||||||
|
this.columns[5].dataIndex = 'onTheProductionDateRemarks'
|
||||||
} else {
|
} else {
|
||||||
// 是企标实施预警或企标发布预警
|
// 是企标实施预警或企标发布预警
|
||||||
this.columns.splice(1, this.columns.length - 1, ...enStandardColumns)
|
this.columns.splice(1, this.columns.length - 1, ...enStandardColumns)
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
:exclude-standard-fields="excludeStandardFields"
|
:exclude-standard-fields="excludeStandardFields"
|
||||||
domestic-special-check
|
domestic-special-check
|
||||||
:flag-by-field="{associated_foreign_standards: StandardSource.OVERSEAS.value}"
|
:flag-by-field="{associated_foreign_standards: StandardSource.OVERSEAS.value}"
|
||||||
|
:needSyncRemarksDataField="['new_model_implementation_date', 'on_the_production_date']"
|
||||||
:process-is-allow-upload-doc="false"
|
:process-is-allow-upload-doc="false"
|
||||||
@submitFormData="submitFormData" />
|
@submitFormData="submitFormData" />
|
||||||
</a-spin>
|
</a-spin>
|
||||||
|
|||||||
Reference in New Issue
Block a user