| | |
| | | <template> |
| | | <a-modal title="新增基础物料信息" :width="900" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit" |
| | | <a-modal title="新增基础物料信息" :width="1200" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit" |
| | | @cancel="handleCancel"> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <!-- tab --> |
| | | <a-tabs default-active-key="1" @change="callbacktab"> |
| | | <a-tab-pane key="1" tab="基本信息"> |
| | | <!-- <add-form ref="addFormRef" @ok="handleOk" /> --> |
| | | <!-- 基本信息 --> |
| | | <!-- 基本信息 layout="inline" layout="vertical" --> |
| | | <a-form :form="form"> |
| | | <a-form-item label="物料名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入物料名称" |
| | |
| | | </a-select> |
| | | </a-form-item> |
| | | |
| | | <!-- <a-col :md="8" :sm="24"> |
| | | |
| | | </a-col> --> |
| | | |
| | | |
| | | |
| | | <a-form-item label="物料组" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入物料组" v-decorator="['materialGroup']" /> |
| | | </a-form-item> |
| | |
| | | <a-input placeholder="请输入ABC分类名称" v-decorator="['aBCClassName']" /> |
| | | </a-form-item> --> |
| | | <a-form-item label="ABC分类" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input-number placeholder="请输入ABC分类" style="width: 100%" v-decorator="['aBCClass']" /> |
| | | <!-- <a-input-number placeholder="请输入ABC分类" style="width: 100%" v-decorator="['aBCClass']" /> --> |
| | | |
| | | <a-select style="width: 100%" placeholder="请选择ABC分类" v-decorator="['factoryCode']"> |
| | | <a-select-option v-for="(item, index) in materialTypeData2" :key="index" :value="Number(item.code)">{{ |
| | | item.name }}</a-select-option> |
| | | </a-select> |
| | | |
| | | |
| | | |
| | | </a-form-item> |
| | | <a-form-item label="物料规格" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入物料规格" v-decorator="['materialSpec']" /> |
| | |
| | | <a-input placeholder="请输入默认入库库位" v-decorator="['inPlaceCode']" /> |
| | | </a-form-item> |
| | | <a-form-item label="库存单位" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入库存单位" v-decorator="['materialUnit']" /> |
| | | <!-- <a-input placeholder="请输入库存单位" v-decorator="['materialUnit']" /> --> |
| | | |
| | | <a-select style="width: 100%" placeholder="请选择库存单位" v-decorator="['materialUnit']"> |
| | | <a-select-option v-for="(item, index) in selectTypeData1" :key="index" :value="Number(item.unitCode)">{{ |
| | | item.unitName }}</a-select-option> |
| | | </a-select> |
| | | |
| | | |
| | | </a-form-item> |
| | | <a-form-item label="采购单位" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入采购单位" v-decorator="['pOUnit']" /> |
| | | <!-- <a-input placeholder="请输入采购单位" v-decorator="['pOUnit']" /> --> |
| | | |
| | | <a-select style="width: 100%" placeholder="请选择采购单位" v-decorator="['pOUnit']"> |
| | | <a-select-option v-for="(item, index) in selectTypeData2" :key="index" :value="Number(item.unitCode)">{{ |
| | | item.unitName }}</a-select-option> |
| | | </a-select> |
| | | |
| | | |
| | | </a-form-item> |
| | | <a-form-item label="颜色" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> |
| | | <a-input placeholder="请输入颜色" v-decorator="['color']" /> |
| | |
| | | import addFormContainerPackaging from './tabItem/WmsContainerPackaging/addFormContainerPackaging.vue' |
| | | import addFormSub from './tabItem/WmsSubstituteGood/addFormWmsSubstituteGood.vue' |
| | | import addControlRule from './tabItem/WmsControlRule/addForm.vue' |
| | | |
| | | import { WmsUnitPage, WmsUnitDelete, WmsUnitToExcel } from '@/api/modular/main/WmsBase/WmsUnitManage' |
| | | export default { |
| | | components: { |
| | | addForm, |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | // 物料类型 |
| | | materialTypeDataList() { |
| | | materialTypeDataList().then((d) => { |
| | | this.materialTypeData = d.data || [] |
| | | }).catch(() => { |
| | | |
| | | }) |
| | | // 库存单位 |
| | | WmsUnitPage().then((d) => { |
| | | this.selectTypeData1 = d.data.rows || [] |
| | | }).catch(() => { |
| | | |
| | | }) |
| | | |
| | | // 采购单位 |
| | | WmsUnitPage().then((d) => { |
| | | this.selectTypeData2 = d.data.rows || [] |
| | | }).catch(() => { |
| | | |
| | | }) |
| | | |
| | | }, |
| | | callbacktab(e) { |
| | | |
| | |
| | | // 初始化方法 |
| | | add(record) { |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | // this.getSelects() |
| | | }) |
| | | // const materialTypeOption = this.$options |
| | | // this.materialTypeData = materialTypeOption.filters['dictData']('material_type') |
| | | const inspectionMethodOption = this.$options |
| | | this.inspectionMethodData = inspectionMethodOption.filters['dictData']('material_inspection') |
| | | // 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') |
| | | }, |
| | | getSelects() { |
| | | if (this.areaNameParameterData.length <= 0 || this.stationNameParameterData.length <= 0) { |
| | |
| | | let BaseCustomerList = []; |
| | | if (this.$refs.addFormBaseCustomer && this.$refs.addFormBaseCustomer.list.length > 0) { |
| | | BaseCustomerList = this.$refs.addFormBaseCustomer.list |
| | | |
| | | |
| | | } |
| | | console.log(6666666666666 + '客户档案集合') |
| | | |
| | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="less"> |
| | | .ant-row.ant-form-item { |
| | | width: 50% !important; |
| | | display: inline-block; |
| | | } |
| | | </style> |