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 |   41 +++++++++++++++++++++++++++++------------
 1 files changed, 29 insertions(+), 12 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 22e6397..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="璇疯緭鍏ョ墿鏂欏悕绉�"
@@ -142,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 }
@@ -161,7 +164,8 @@
       stationNameParameterData: [],
       visible: false,
       confirmLoading: false,
-      form: this.$form.createForm(this)
+      form: this.$form.createForm(this),
+      materialTypeData2:[]
     }
   },
   methods: {
@@ -207,14 +211,20 @@
     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')
+      if (record) {//缂栬緫
+        this.title = '缂栬緫鍩虹鐗╂枡淇℃伅';
+        this.$nextTick(() => {
+          this.form.setFieldsValue({
+            ...record
+          })
+        })
+     
+      } else { // 鏂板
+        this.title = '鏂板鍩虹鐗╂枡淇℃伅';
+      }
     },
     getSelects() {
       if (this.areaNameParameterData.length <= 0 || this.stationNameParameterData.length <= 0) {
@@ -274,7 +284,7 @@
             BaseCustomerList = this.$refs.addFormBaseCustomer.list
 
           }
-          console.log(6666666666666 + '瀹㈡埛妗f闆嗗悎')
+          console.log(6666666666666 + '寰�鏉ュ叧绯婚泦鍚�')
 
           // console.log(6666666666666 + '鍖呰鍏崇郴')
           // console.log(this.$refs.addFormContainerPackagingRef.list)
@@ -283,7 +293,7 @@
             MaterialInput: values,
             ControlRuleld: ControlRuleld, //鎺у埗灞炴��
             SubstituteGoodList: SubstituteGoodList, //鏇夸唬鍝�
-            BaseCustomerList: BaseCustomerList, //瀹㈡埛妗f闆嗗悎
+            BaseCustomerList: BaseCustomerList, //寰�鏉ュ叧绯婚泦鍚�
             // ContainerPackagingList: this.$refs.addFormContainerPackagingRef.list //鍖呰鍏崇郴
           }
           this.confirmLoading = true
@@ -327,3 +337,10 @@
   }
 }
 </script>
+
+<style lang="less" scoped>
+.ant-row.ant-form-item {
+  width: 50% !important;
+  display: inline-block;
+}
+</style>

--
Gitblit v1.9.3