From 264795ac21be1ef5e36ec431005acb84777dad79 Mon Sep 17 00:00:00 2001
From: liuying <1427574514@qq.com>
Date: 周四, 25 4月 2024 14:07:46 +0800
Subject: [PATCH] css

---
 iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsContainerPackaging/editForm.vue |  182 ++++++++++++++++++++++-----------------------
 1 files changed, 89 insertions(+), 93 deletions(-)

diff --git a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsContainerPackaging/editForm.vue b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsContainerPackaging/editForm.vue
index fc14202..386cb6d 100644
--- a/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsContainerPackaging/editForm.vue
+++ b/iWare_RawMaterialWarehouse_Web/src/views/main/WmsBase/WmsContainerPackaging/editForm.vue
@@ -1,10 +1,5 @@
 锘�<template>
-  <a-modal
-    title="缂栬緫瀹瑰櫒鍏崇郴"
-    :width="900"
-    :visible="visible"
-    :confirmLoading="confirmLoading"
-    @ok="handleSubmit"
+  <a-modal title="缂栬緫瀹瑰櫒鍏崇郴" :width="900" :visible="visible" :confirmLoading="confirmLoading" @ok="handleSubmit"
     @cancel="handleCancel">
     <a-spin :spinning="confirmLoading">
       <a-form :form="form">
@@ -12,8 +7,8 @@
           <!-- <a-input placeholder="璇疯緭鍏ュ鍣ㄧ被鍨婭D" v-decorator="['containerTypeId', {rules: [{required: true, message: '璇疯緭鍏ュ鍣ㄧ被鍨婭D锛�'}]}]" /> -->
 
           <a-select style="width: 100%" placeholder="璇烽�夋嫨瀹瑰櫒绫诲瀷鍚嶇О" v-decorator="['containerTypeId']">
-            <a-select-option v-for="(item, index) in selectTypeData" :key="index"
-              :value="item.typeCode">{{ item.typeName }}</a-select-option>
+            <a-select-option v-for="(item, index) in selectTypeData" :key="index" :value="item.typeCode">{{ item.typeName
+            }}</a-select-option>
           </a-select>
 
         </a-form-item>
@@ -24,8 +19,8 @@
           <!-- <a-input placeholder="璇疯緭鍏ョ墿鏂欑被鍨婭D" v-decorator="['materialTypeId', {rules: [{required: true, message: '璇疯緭鍏ョ墿鏂欑被鍨婭D锛�'}]}]" /> -->
 
           <a-select style="width: 100%" placeholder="璇烽�夋嫨鐗╂枡绫诲瀷鍚嶇О" v-decorator="['materialTypeId']">
-            <a-select-option v-for="(item, index) in selectTypeData2" :key="index"
-              :value="item.materialTypeCode">{{ item.materialTypeName }}</a-select-option>
+            <a-select-option v-for="(item, index) in selectTypeData2" :key="index" :value="item.materialTypeCode">{{
+              item.materialTypeName }}</a-select-option>
           </a-select>
 
         </a-form-item>
@@ -36,7 +31,7 @@
           <a-input placeholder="璇疯緭鍏ョ墿鏂欑被鍨嬪悕绉�" v-decorator="['materialTypeName', {rules: [{required: true, message: '璇疯緭鍏ョ墿鏂欑被鍨嬪悕绉帮紒'}]}]" />
         </a-form-item> -->
         <a-form-item label="鐗╂枡瀹瑰櫒瀹归噺" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
-          <a-input placeholder="璇疯緭鍏ョ墿鏂欏鍣ㄥ閲�" v-decorator="['boxQty', {rules: [{required: true, message: '璇疯緭鍏ョ墿鏂欏鍣ㄥ閲忥紒'}]}]" />
+          <a-input placeholder="璇疯緭鍏ョ墿鏂欏鍣ㄥ閲�" v-decorator="['boxQty', { rules: [{ required: true, message: '璇疯緭鍏ョ墿鏂欏鍣ㄥ閲忥紒' }] }]" />
         </a-form-item>
       </a-form>
     </a-spin>
@@ -45,98 +40,99 @@
 
 <script>
 import moment from 'moment'
-  import {
+import {
   WmsContainerPackagingEdit
-  } from '@/api/modular/main/WmsBase/WmsContainerPackagingManage'
+} from '@/api/modular/main/WmsBase/WmsContainerPackagingManage'
 
 
-  import { WmsContainerTypePage, WmsContainerTypeDelete, WmsContainerTypeToExcel } from '@/api/modular/main/WmsBase/WmsContainerTypeManage'
-	import { WmsMaterialTypePage,} from '@/api/modular/main/WmsBase/WmsMaterialTypeManage'
+import { WmsContainerTypePage, WmsContainerTypeDelete, WmsContainerTypeToExcel } from '@/api/modular/main/WmsBase/WmsContainerTypeManage'
+import { WmsMaterialTypePage, } from '@/api/modular/main/WmsBase/WmsMaterialTypeManage'
 
-  export default {
-  data () {
-  return {
-  Id: 0,
-  labelCol: {
-  xs: { span: 24 },
-  sm: { span: 5 }
+export default {
+  data() {
+    return {
+      Id: 0,
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 }
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 15 }
+      },
+      record: {},
+      visible: false,
+      confirmLoading: false,
+      form: this.$form.createForm(this),
+      selectTypeData2:[]
+    }
   },
-  wrapperCol: {
-  xs: { span: 24 },
-  sm: { span: 15 }
+  created() {
+    WmsContainerTypePage().then((d) => {
+      this.selectTypeData = d.data.rows || []
+    }).catch(() => {
+
+    })
+    WmsMaterialTypePage().then((d) => {
+      this.selectTypeData2 = d.data.rows || []
+    }).catch(() => {
+
+    })
   },
-  record: {},
-        visible: false,
-        confirmLoading: false,
-        form: this.$form.createForm(this)
-      }
+  methods: {
+    moment,
+    // 鍒濆鍖栨柟娉�
+    edit(record) {
+      this.visible = true;
+      this.Id = record.id;
+      this.$nextTick(() => {
+      });
+      //娣卞害鎷疯礉 绉婚櫎VUE鐨勭洃鍚紝闃叉INDEX椤甸潰鍊煎彉鍔�
+      this.record = JSON.parse(JSON.stringify(record))
+      this.$nextTick(() => {
+        this.form.setFieldsValue(
+          {
+            ...record
+          }
+        )
+
+      })
     },
-    created() {
-      WmsContainerTypePage().then((d) => {
-        this.selectTypeData = d.data.rows || []
-      }).catch(() => {
-
-      })
-      WmsMaterialTypePage().then((d) => {
-        this.selectTypeData2 = d.data.rows || []
-      }).catch(() => {
-
-      })
-  },
-    methods: {
-	moment,
-      // 鍒濆鍖栨柟娉�
-      edit (record) {
-        this.visible = true;
-		this.Id = record.id;
-        this.$nextTick(() => {
-        });
-        //娣卞害鎷疯礉 绉婚櫎VUE鐨勭洃鍚紝闃叉INDEX椤甸潰鍊煎彉鍔�
-        this.record = JSON.parse(JSON.stringify(record))
-        this.$nextTick(() => {
-          this.form.setFieldsValue(
-            {
-              ...record
+    handleSubmit() {
+      const { form: { validateFields } } = this
+      this.confirmLoading = true
+      validateFields((errors, values) => {
+        if (!errors) {
+          for (const key in values) {
+            if (values[key] == null) continue
+            if (typeof (values[key]) === 'object') {
+              values[key] = JSON.stringify(values[key])
+              this.record[key] = values[key]
+            } else {
+              this.record[key] = values[key]
             }
-          )
-
-        })
-      },
-      handleSubmit () {
-        const { form: { validateFields } } = this
-        this.confirmLoading = true
-        validateFields((errors, values) => {
-          if (!errors) {
-            for (const key in values) {
-              if (values[key] == null) continue
-              if (typeof (values[key]) === 'object') {
-                values[key] = JSON.stringify(values[key])
-                 this.record[key] = values[key]
-              } else {
-                 this.record[key] = values[key]
-              }
-            }
-            WmsContainerPackagingEdit(this.record).then((res) => {
-              if (res.success) {
-                this.$message.success('缂栬緫鎴愬姛')
-                this.confirmLoading = false
-                this.$emit('ok', this.record)
-                this.handleCancel()
-              } else {
-                this.$message.error('缂栬緫澶辫触锛�' + JSON.stringify(res.message))
-              }
-            }).finally((res) => {
+          }
+          WmsContainerPackagingEdit(this.record).then((res) => {
+            if (res.success) {
+              this.$message.success('缂栬緫鎴愬姛')
               this.confirmLoading = false
-            })
-          }else{
+              this.$emit('ok', this.record)
+              this.handleCancel()
+            } else {
+              this.$message.error('缂栬緫澶辫触锛�' + JSON.stringify(res.message))
+            }
+          }).finally((res) => {
             this.confirmLoading = false
-          } 
-        });
-      },
-      handleCancel () {
-        this.form.resetFields()
-        this.visible = false
-      }
+          })
+        } else {
+          this.confirmLoading = false
+        }
+      });
+    },
+    handleCancel() {
+      this.form.resetFields()
+      this.visible = false
     }
   }
+}
 </script>

--
Gitblit v1.9.3