| | |
| | | <template> |
| | | <a-modal title="新增基础物料信息" :width="1200" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit" |
| | | <a-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit" |
| | | @cancel="handleCancel"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <!-- tab --> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | title: '', |
| | | labelCol: { |
| | | // xs: { span: 24 }, |
| | | // sm: { span: 5 } |
| | |
| | | handleOk() { }, |
| | | // 初始化方法 |
| | | add(record) { |
| | | this.visible = true |
| | | // this.$nextTick(() => { |
| | | // // this.getSelects() |
| | | // }) |
| | | const materialTypeOption = this.$options |
| | | this.materialTypeData2 = materialTypeOption.filters['dictData']('abc_class') |
| | | // const inspectionMethodOption = this.$options |
| | | // this.inspectionMethodData = inspectionMethodOption.filters['dictData']('material_inspection') |
| | | this.materialTypeData2 = materialTypeOption.filters['dictData']('abc_class') |
| | | |
| | | this.visible = true |
| | | if (record) {//编辑 |
| | | this.title = '编辑基础物料信息'; |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue({ |
| | | ...record |
| | | }) |
| | | }) |
| | | |
| | | } else { // 新增 |
| | | this.title = '新增基础物料信息'; |
| | | } |
| | | }, |
| | | getSelects() { |
| | | if (this.areaNameParameterData.length <= 0 || this.stationNameParameterData.length <= 0) { |
| | |
| | | </script> |
| | | |
| | | <style lang="less" scoped> |
| | | .ant-row.ant-form-item { |
| | | width: 50% !important; |
| | | display: inline-block; |
| | | } |
| | | .ant-row.ant-form-item { |
| | | width: 50% !important; |
| | | display: inline-block; |
| | | } |
| | | </style> |