From 07562e1627ef14d4a946d352739d2f8d17d6360b Mon Sep 17 00:00:00 2001 From: liuying <1427574514@qq.com> Date: 周四, 25 4月 2024 13:42:29 +0800 Subject: [PATCH] 细节 --- iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue | 99 ++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 76 insertions(+), 23 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 2e2fd21..6da1ac1 100644 --- a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue +++ b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsMaterial/tabForm.vue @@ -1,12 +1,12 @@ <template> - <a-modal title="鏂板鍩虹鐗╂枡淇℃伅" :width="900" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit" + <a-modal :title="title" :width="1300" :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="璇疯緭鍏ョ墿鏂欏悕绉�" @@ -34,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> @@ -47,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']" /> @@ -56,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']" /> @@ -115,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, @@ -126,9 +142,12 @@ }, created() { this.materialTypeDataList() + const materialTypeOption = this.$options + this.materialTypeData2 = materialTypeOption.filters['dictData']('abc_class_type') }, data() { return { + title: '', labelCol: { // xs: { span: 24 }, // sm: { span: 5 } @@ -145,16 +164,32 @@ stationNameParameterData: [], visible: false, confirmLoading: false, - form: this.$form.createForm(this) + form: this.$form.createForm(this), + materialTypeData2:[] } }, 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) { @@ -176,14 +211,20 @@ 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') + if (record) {//缂栬緫 + this.title = '缂栬緫鍩虹鐗╂枡淇℃伅'; + this.$nextTick(() => { + this.form.setFieldsValue({ + ...record + }) + }) + + } else { // 鏂板 + this.title = '鏂板鍩虹鐗╂枡淇℃伅'; + } }, getSelects() { if (this.areaNameParameterData.length <= 0 || this.stationNameParameterData.length <= 0) { @@ -230,15 +271,20 @@ let SubstituteGoodList = [] 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 + BaseCustomerList = this.$refs.addFormBaseCustomer.list + } - console.log(6666666666666 + '瀹㈡埛妗f闆嗗悎') + console.log(6666666666666 + '寰�鏉ュ叧绯婚泦鍚�') // console.log(6666666666666 + '鍖呰鍏崇郴') // console.log(this.$refs.addFormContainerPackagingRef.list) @@ -247,7 +293,7 @@ MaterialInput: values, ControlRuleld: ControlRuleld, //鎺у埗灞炴�� SubstituteGoodList: SubstituteGoodList, //鏇夸唬鍝� - BaseCustomerList: BaseCustomerList, //瀹㈡埛妗f闆嗗悎 + BaseCustomerList: BaseCustomerList, //寰�鏉ュ叧绯婚泦鍚� // ContainerPackagingList: this.$refs.addFormContainerPackagingRef.list //鍖呰鍏崇郴 } this.confirmLoading = true @@ -291,3 +337,10 @@ } } </script> + +<style lang="less" scoped> +.ant-row.ant-form-item { + width: 50% !important; + display: inline-block; +} +</style> -- Gitblit v1.9.3