From 0632e972f30627c5bd6c5a84373bab8e54a4c3ed Mon Sep 17 00:00:00 2001
From: payne <bzrlw2012@163.com>
Date: 周三, 24 4月 2024 23:29:39 +0800
Subject: [PATCH] 往来关系增加枚举、种子数据
---
iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue | 111 +++++++++++++++++++++++++++++++++++++------------------
1 files changed, 74 insertions(+), 37 deletions(-)
diff --git a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue
index b8f8f15..22e6397 100644
--- a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue
+++ b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue
@@ -6,7 +6,6 @@
<a-tabs default-active-key="1" @change="callbacktab">
<a-tab-pane key="1" tab="鍩烘湰淇℃伅">
<!-- <add-form ref="addFormRef" @ok="handleOk" /> -->
-
<!-- 鍩烘湰淇℃伅 -->
<a-form :form="form">
<a-form-item label="鐗╂枡鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
@@ -35,12 +34,6 @@
</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>
@@ -48,7 +41,15 @@
<a-input placeholder="璇疯緭鍏BC鍒嗙被鍚嶇О" v-decorator="['aBCClassName']" />
</a-form-item> -->
<a-form-item label="ABC鍒嗙被" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
- <a-input-number placeholder="璇疯緭鍏BC鍒嗙被" style="width: 100%" v-decorator="['aBCClass']" />
+ <!-- <a-input-number placeholder="璇疯緭鍏BC鍒嗙被" 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']" />
@@ -57,10 +58,24 @@
<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']" />
@@ -89,16 +104,16 @@
</a-form>
</a-tab-pane>
<a-tab-pane key="2" tab="鎺у埗灞炴��" force-render>
- <add-control-rule ref="WmsControlRule" />
+ <add-control-rule v-if="visible" ref="WmsControlRule" />
</a-tab-pane>
<a-tab-pane key="3" tab="鎵规灞炴��">
闇�姹傚緟瀹�
</a-tab-pane>
<a-tab-pane key="4" tab="鏇夸唬鍝佺鐞�">
- <add-form-sub ref="addFormWmsSubstituteGoodRef" />
+ <add-form-sub v-if="visible" ref="addFormWmsSubstituteGoodRef" />
</a-tab-pane>
<a-tab-pane key="5" tab="瀹㈡埛">
- <add-form-base-customer ref="addFormBaseCustomer" />
+ <add-form-base-customer v-if="visible" ref="addFormBaseCustomer" />
</a-tab-pane>
<!-- <a-tab-pane key="6" tab="鍖呰鍏崇郴">
@@ -116,7 +131,7 @@
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,
@@ -150,42 +165,56 @@
}
},
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) {
//鍖呰鍏崇郴
- if (e == 6) {
- this.$nextTick(() => {
- let materialType = this.form.getFieldValue('materialType');
- // 璋冩帴鍙� 浼犵墿鏂欑被鍨�
- this.$refs.addFormContainerPackagingRef.initShow(materialType)
-
- })
- }
+ // if (e == 6) {
+ // this.$nextTick(() => {
+ // let materialType = this.form.getFieldValue('materialType');
+ // // 璋冩帴鍙� 浼犵墿鏂欑被鍨�
+ // this.$refs.addFormContainerPackagingRef.initShow(materialType)
+ // })
+ // }
// 鏇夸唬鍝�
if (e == 4) {
- let materialCode = this.form.getFieldValue('materialCode');
- let materialName = this.form.getFieldValue('materialName');
- this.$refs.addFormWmsSubstituteGoodRef.initShow(materialCode, materialName)
+ // let materialCode = this.form.getFieldValue('materialCode');
+ // let materialName = this.form.getFieldValue('materialName');
+ this.$refs.addFormWmsSubstituteGoodRef.initShowSubstituteGood()
}
},
handleOk() { },
// 鍒濆鍖栨柟娉�
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) {
@@ -208,7 +237,7 @@
const {
form: { validateFields }
} = this
-
+
validateFields((errors, values) => {
if (!errors) {
// if (this.$getObjectType(values.areas) === 'array') {
@@ -227,19 +256,23 @@
// }
console.log(6666666666666 + '鎺у埗灞炴��')
-
var ControlRuleld = this.$refs.WmsControlRule.form.getFieldValue('id') || ''
let SubstituteGoodList = []
- if(this.$refs.addFormWmsSubstituteGoodRef && this.$refs.addFormWmsSubstituteGoodRef.list.length>0){
+ if (this.$refs.addFormWmsSubstituteGoodRef && this.$refs.addFormWmsSubstituteGoodRef.list.length > 0) {
SubstituteGoodList = this.$refs.addFormWmsSubstituteGoodRef.list
+ SubstituteGoodList.forEach(item => {
+ item.materialName = this.form.getFieldValue('materialName')
+ item.materialCode = this.form.getFieldValue('materialCode')
+ })
}
console.log(6666666666666 + '鏇夸唬鍝�')
let BaseCustomerList = [];
- if(this.$refs.addFormBaseCustomer && this.$refs.addFormBaseCustomer.list.length>0){
- BaseCustomerList = this.$refs.addFormWmsSubstituteGoodRef.list
+ if (this.$refs.addFormBaseCustomer && this.$refs.addFormBaseCustomer.list.length > 0) {
+ BaseCustomerList = this.$refs.addFormBaseCustomer.list
+
}
console.log(6666666666666 + '瀹㈡埛妗f闆嗗悎')
@@ -286,6 +319,10 @@
handleCancel() {
this.form.resetFields()
this.visible = false
+ // this.$refs.WmsControlRule.form.resetFields()
+ // this.$refs.addFormWmsSubstituteGoodRef.list =[]
+ // this.$refs.addFormWmsSubstituteGoodRef.list =[]
+
}
}
}
--
Gitblit v1.9.3