| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { WmsMaterialAdd, GetAreas, GetStations, materialTypeDataList } from '@/api/modular/main/WmsMaterialManage' |
| | | |
| | | import { |
| | | WmsMaterialAdd, WmsMaterialEdit, WmsMaterialDetailList,materialTypeDataList |
| | | } from '@/api/modular/main/WmsBase/WmsMaterialManage' |
| | | import addForm from './tabItem/addForm.vue' |
| | | import addFormBaseCustomer from './tabItem/addFormBaseCustomer/addFormBaseCustomer.vue' |
| | | 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' |
| | | import { WmsUnitPage} from '@/api/modular/main/WmsBase/WmsUnitManage' |
| | | export default { |
| | | components: { |
| | | addForm, |
| | |
| | | visible: false, |
| | | confirmLoading: false, |
| | | form: this.$form.createForm(this), |
| | | materialTypeData2:[] |
| | | materialTypeData2: [], |
| | | selectTypeData2:[], |
| | | selectTypeData1:[] |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | handleOk() { }, |
| | | // 初始化方法 |
| | | add(record) { |
| | | |
| | | |
| | | add(record, type) { |
| | | this.visible = true |
| | | if (record) {//编辑 |
| | | if (type == '详情') { |
| | | this.title = '详情物料信息详情';// 详情 |
| | | } else { |
| | | this.title = '编辑基础物料信息'; |
| | | } |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue({ |
| | | ...record |
| | | }) |
| | | }) |
| | | WmsMaterialDetailList({ |
| | | id: record.id |
| | | }) |
| | | .then(res => { |
| | | if (res.success) { |
| | | console.log("666666666666") |
| | | console.log(res) |
| | | this.$refs.WmsControlRule.list = res.data.baseCustomerList || [] |
| | | this.$refs.addFormBaseCustomer.list = res.data.controlRuleDetailList || [] |
| | | this.$refs.addFormWmsSubstituteGoodRef.list = res.data.substituteGoodList || [] |
| | | // this.$message.success('编辑成功') |
| | | // this.confirmLoading = false |
| | | // this.$emit('ok', values) |
| | | // this.handleCancel() |
| | | } else { |
| | | this.$message.error('详情失败:' + JSON.stringify(res.message)) |
| | | } |
| | | }) |
| | | .finally(res => { |
| | | this.confirmLoading = false |
| | | }) |
| | | |
| | | } else { // 新增 |
| | | this.title = '新增基础物料信息'; |
| | | } else { |
| | | this.title = '新增基础物料信息';// 新增 |
| | | } |
| | | }, |
| | | getSelects() { |
| | |
| | | // ContainerPackagingList: this.$refs.addFormContainerPackagingRef.list //包装关系 |
| | | } |
| | | this.confirmLoading = true |
| | | if (this.title == '新增基础物料信息') { |
| | | WmsMaterialAdd(param) |
| | | .then(res => { |
| | | if (res.success) { |
| | |
| | | this.confirmLoading = false |
| | | }) |
| | | } else { |
| | | WmsMaterialEdit(param) |
| | | .then(res => { |
| | | if (res.success) { |
| | | this.$message.success('编辑成功') |
| | | this.confirmLoading = false |
| | | this.$emit('ok', values) |
| | | this.handleCancel() |
| | | } else { |
| | | this.$message.error('编辑失败:' + JSON.stringify(res.message)) |
| | | } |
| | | }) |
| | | .finally(res => { |
| | | this.confirmLoading = false |
| | | }) |
| | | } |
| | | |
| | | } else { |
| | | this.confirmLoading = false |
| | | } |
| | | }) |