| | |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <!-- </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="codeDisable" |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请输入点检项目编号'" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-col> --> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="点检项目名称" |
| | |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="计量单位" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请选择计量单位'" |
| | | :triggerChange="true" |
| | | dictCode="mom_base_unit,name,id,status!='0' and del_flag!='1'" |
| | | v-decorator="['unitId', validatorRules.unitId]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="检验值类型" |
| | |
| | | dictCode="test_value_type" |
| | | v-decorator="['testValueType', validatorRules.testValueType]" |
| | | @change="(e)=>handleChange(e)" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | v-if="testValueType == '2'" |
| | | :span="12" |
| | | > |
| | | <a-form-item |
| | | label="检测标准" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请输入检测标准'" |
| | | v-decorator="['detectionStandard', validatorRules.detectionStandard ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | /> |
| | | </a-form-item> |
| | | </a-col> --> |
| | | |
| | | <a-col |
| | | v-if="analysisMethod == '2'" |
| | | :span="12" |
| | | > |
| | | <a-form-item |
| | | label="待定" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <a-input |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请输入待定值'" |
| | | v-decorator="['surfaceValue1', validatorRules.surfaceValue1 ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col |
| | | v-if="analysisMethod == '1'" |
| | | v-if="testValueType == '1'" |
| | | :span="12" |
| | | > |
| | | <a-form-item |
| | |
| | | </a-col> |
| | | </a-row> |
| | | <a-row |
| | | v-if="analysisMethod == '1'" |
| | | v-if="testValueType == '1'" |
| | | :gutter="24" |
| | | > |
| | | <a-col :span="12"> |
| | |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | label="计量单位" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | > |
| | | <j-dict-select-tag |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请选择计量单位'" |
| | | :triggerChange="true" |
| | | dictCode="mom_base_unit,name,id,status!='0' and del_flag!='1'" |
| | | v-decorator="['unitId', validatorRules.unitId]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <!-- <a-col :span="12"> |
| | | <a-form-item |
| | | label="点检工具" |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | |
| | | v-decorator="['inspectionTool', validatorRules.inspectionTool ]" |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-col> --> |
| | | </a-row> |
| | | |
| | | <a-row :gutter="24"> |
| | |
| | | codeDisable: true, |
| | | disableSubmit: false, |
| | | inspectionProjectCategoryId: '', |
| | | analysisMethod: null, |
| | | testValueType: null, |
| | | model: {}, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | |
| | | { validator: this.validateName }, |
| | | ] |
| | | }, |
| | | analysisMethod: { |
| | | // analysisMethod: { |
| | | // rules: [ |
| | | // { required: true, message: '请选择分析方法!' }, |
| | | // ] |
| | | // }, |
| | | detectionStandard: { |
| | | rules: [ |
| | | { required: true, message: '请选择分析方法!' }, |
| | | { required: true, message: '请输入检测标准!' }, |
| | | // { validator: this.validateSurfaceValue }, |
| | | ] |
| | | }, |
| | | surfaceValue: { |
| | |
| | | this.model = Object.assign({}, record); |
| | | this.visible = true; |
| | | this.disableSubmit = false; |
| | | this.analysisMethod = record.analysisMethod |
| | | this.testValueType = record.testValueType |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'inspectionProjectCategoryNumName', |
| | | 'num', 'name', 'unitId', 'testValueType', 'analysisMethod', 'inspectionMethod', 'inspectionTool', 'remark')) |
| | | 'num', 'name', 'unitId', 'detectionStandard', 'testValueType', 'inspectionMethod', 'inspectionTool', 'remark')) |
| | | }); |
| | | if (record.analysisMethod == '1') { |
| | | if (record.testValueType == '1') { |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'surfaceValue', 'upValue', 'downValue')) |
| | | }); |
| | |
| | | if (record.id) { |
| | | this.codeDisable = true; |
| | | } else { |
| | | debugger |
| | | this.codeDisable = false; |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue({ "testValueType": '2' }) |
| | | this.testValueType = '2' |
| | | }); |
| | | } |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | handleChange(val) { |
| | | this.analysisMethod = val |
| | | this.testValueType = val |
| | | }, |
| | | |
| | | validateDownValue(rule, value, callback) { |