优化项目,增加EquipmentList组件下UserModal子组件中表单取消提交弹窗关闭的方法
| | |
| | | |
| | | |
| | | <div class="drawer-bootom-button" v-show="!disableSubmit"> |
| | | <a-popconfirm title="确定放弃操作?" @confirm="handleCancel" okText="确定" cancelText="取消"> |
| | | <a-popconfirm title="确定放弃操作?" @confirm="visible=false" okText="确定" cancelText="取消"> |
| | | <a-button style="margin-right: .8rem">取消</a-button> |
| | | </a-popconfirm> |
| | | <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">提交</a-button> |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | processQuantity:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请输入加工数量" |
| | | }, |
| | | ], |
| | | }, |
| | | unqualifiedQuantity:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请输入不合格数量" |
| | | }, |
| | | ], |
| | | }, |
| | | // mdcRepairType:{ |
| | | // rules:[ |
| | | // { |
| | |
| | | // that.$message.success("添加成功") |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:"添加成功" |
| | | description:"修改成功" |
| | | }); |
| | | // that.$message.success(res.message) |
| | | that.$emit('ok', res.result) |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | processQuantity:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请输入加工数量" |
| | | }, |
| | | ], |
| | | }, |
| | | unqualifiedQuantity:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请输入不合格数量" |
| | | }, |
| | | ], |
| | | }, |
| | | efficientDate:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请选择日期" |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | |
| | | url: { |
| | |
| | | handleEdit: function (record) { |
| | | this.$refs.modalFormedit.edit(record); |
| | | this.$refs.modalFormedit.title = "编辑"; |
| | | this.$refs.modalFormedit.disableSubmit = false; |
| | | // this.$refs.modalFormedit.disableSubmit = false; |
| | | }, |
| | | handleTableChange(pagination, filters, sorter) { |
| | | this.dataSource = [] |
| | |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | |
| | | span: 24 |
| | | }, |
| | | sm: { |
| | | span: 6 |
| | | span: 8 |
| | | } |
| | | }, |
| | | wrapperCol: { |
| | |
| | | span: 24 |
| | | }, |
| | | sm: { |
| | | span: 18 |
| | | span: 16 |
| | | } |
| | | }, |
| | | labelColLong: { |
| | |
| | | span: 24 |
| | | }, |
| | | sm: { |
| | | span: 3 |
| | | span: 4 |
| | | } |
| | | }, |
| | | wrapperColLong1: { |
| | |
| | | span: 24 |
| | | }, |
| | | sm: { |
| | | span: 21 |
| | | span: 20 |
| | | } |
| | | }, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | validatorRules: { |
| | | duration:{ |
| | | rules:[ |
| | | {required:true,message:'请选择标准加工时间'} |
| | | ] |
| | | }, |
| | | efficientDate:{ |
| | | rules:[ |
| | | {required:true,message:'请选择日期'} |
| | | ] |
| | | }, |
| | | processQuantity:{ |
| | | rules:[ |
| | | {required:true,message:'请选择加工数量'} |
| | | ] |
| | | }, |
| | | }, |
| | | |
| | | url: { |
| | | add: '/mdc/mdcProcessQuantity/add', |
| | | edit: '/mdc/mdcProcessQuantity/edit' |
| | |
| | | <template> |
| | | <a-modal :title="title" :width="800" :visible="visible" :confirmLoading="confirmLoading" |
| | | :okButtonProps="{ props: {disabled: disableSubmit} }" @ok="handleOk" @cancel="handleCancel" cancelText="关闭"> |
| | | @ok="handleOk" @cancel="handleCancel" cancelText="关闭"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <a-form :form="form"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item label="设备编号" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="disableSubmit" :readOnly="readOnly" allow-clear placeholder="请输入设备编号" |
| | | <a-input :readOnly="readOnly" allow-clear placeholder="请输入设备编号" |
| | | v-decorator="['equipmentId',validatorRules.equipmentId]"/> |
| | | </a-form-item> |
| | | |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item label="设备名称" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input :disabled="disableSubmit" :readOnly="readOnly" allow-clear placeholder="请输入设备名称" |
| | | <a-input :readOnly="readOnly" allow-clear placeholder="请输入设备名称" |
| | | v-decorator="['equipmentName',validatorRules.equipmentName]"/> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | |
| | | <a-col :span="12"> |
| | | <a-form-item label="日期" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <j-date :disabled="disableSubmit" date-format="YYYY-MM-DD" placeholder="请选择日期" |
| | | <j-date date-format="YYYY-MM-DD" placeholder="请选择日期" |
| | | v-decorator="['efficientDate', validatorRules.efficientDate]"></j-date> |
| | | </a-form-item> |
| | | |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item label='加工数量' :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | | <a-input-number :min="0" :disabled="disableSubmit" placeholder="请输入加工数量" v-decorator="['processQuantity', validatorRules.processQuantity]"></a-input-number> |
| | | <a-input-number :min="0" placeholder="请输入加工数量" v-decorator="['processQuantity', validatorRules.processQuantity]"></a-input-number> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item label="备注" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> |
| | | <a-textarea :maxLength="20" :disabled="disableSubmit" v-decorator="['remark', validatorRules.remark]" placeholder="请输入备注" ></a-textarea> |
| | | <a-textarea :maxLength="20" v-decorator="['remark', validatorRules.remark]" placeholder="请输入备注" ></a-textarea> |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | duration:{ |
| | | rules:[ |
| | | {required:true,message:'请选择标准加工时间'} |
| | | ] |
| | | }, |
| | | efficientDate:{ |
| | | rules:[ |
| | | {required:true,message:'请选择日期'} |
| | | ] |
| | | }, |
| | | processQuantity:{ |
| | | rules:[ |
| | | {required:true,message:'请选择加工数量'} |
| | | ] |
| | | }, |
| | | // mdcRepairType:{ |
| | | // rules:[ |
| | | // { |
| | |
| | | <a-input :disabled="disableSubmit" :readOnly="readOnly" allow-clear placeholder="请输入设备编号" |
| | | v-decorator="['equipmentId',validatorRules.equipmentId]"/> |
| | | </a-form-item> |
| | | |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-item label="设备名称" :labelCol="labelCol" :wrapperCol="wrapperCol"> |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | partsCode:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请输入零件号" |
| | | }, |
| | | ], |
| | | }, |
| | | batchCode:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请输入批次号" |
| | | }, |
| | | ], |
| | | }, |
| | | sequenceNumber:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请输入程序号" |
| | | }, |
| | | ], |
| | | }, |
| | | duration:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请输入时长" |
| | | }, |
| | | ], |
| | | }, |
| | | // mdcRepairType:{ |
| | | // rules:[ |
| | | // { |
| | |
| | | //重新计算分页问题 |
| | | that.reCalculatePage(1) |
| | | // that.$message.success(res.message); |
| | | that.$notification.warning({ |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | |
| | | }, |
| | | ], |
| | | }, |
| | | partsCode:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请输入零件号" |
| | | }, |
| | | ], |
| | | }, |
| | | batchCode:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请输入批次号" |
| | | }, |
| | | ], |
| | | }, |
| | | sequenceNumber:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请输入程序号" |
| | | }, |
| | | ], |
| | | }, |
| | | duration:{ |
| | | rules:[ |
| | | { |
| | | required:true, |
| | | message: "请输入时长" |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | |
| | | url: { |