From 2cb8775339209916fcc889dfa9d5ea7a9f63cd24 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 27 六月 2022 18:08:02 +0800
Subject: [PATCH] 仓库定义、库位定义、物料类型  实现增删查改功能

---
 src/views/template.vue |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/views/template.vue b/src/views/template.vue
index eb5b393..fc78392 100644
--- a/src/views/template.vue
+++ b/src/views/template.vue
@@ -20,9 +20,9 @@
               <el-select v-model="form.OrgType" :popper-append-to-body="false" style="width: 200px" placeholder="璇烽�夋嫨">
                 <el-option
                   v-for="item in OrgTypeArr"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
+                  :key="item.code"
+                  :label="item.name"
+                  :value="item.code"
                 />
               </el-select>
             </el-form-item>
@@ -106,7 +106,7 @@
             <template slot-scope="{row}">
               <div class="operationClass">
                 <el-button type="text" @click="edit('edit',row)">淇敼</el-button>
-                <el-button type="text" @click="del(row.id)">鍒犻櫎</el-button>
+                <el-button type="text" @click="del(row)">鍒犻櫎</el-button>
               </div>
             </template>
           </el-table-column>
@@ -150,8 +150,9 @@
           >
             <el-option
               v-for="item in SupUnitArr"
-              :label="item.org_name"
-              :value="item.id"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
             />
           </el-select>
         </el-form-item>
@@ -207,7 +208,7 @@
         prop: 'lm_date', // 鎺掑簭瀛楁
         order: 'desc', // 鎺掑簭瀛楁
         page: 1, // 绗嚑椤�
-        rows: 10 // 姣忛〉澶氬皯鏉�
+        rows: 20 // 姣忛〉澶氬皯鏉�
       },
       OrgTypeArr: [
         { label: '宸ュ巶', value: 'F' },
@@ -303,13 +304,13 @@
       })
     },
     // 鍒犻櫎鎸夐挳
-    async del(id) {
+    async del(row) {
       this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        DeleteOrganization({ orgid: id }).then(res => {
+        DeleteOrganization({ orgid: row.code }).then(res => {
           if (res.code === '200') {
             this.$message.success('鍒犻櫎鎴愬姛!')
             this.getOrganizationSearch()
@@ -336,10 +337,8 @@
       this.$refs.dialogForm.validate(valid => {
         if (valid) {
           const data = {
-            OrganType: this.dialogFormOrgTypeSelected,
             OrganCode: this.dialogForm.OrgCode,
             OrganName: this.dialogForm.OrgName,
-            SupUnit: this.dialogFormOrgTypeSelected === 'F' ? '0' : this.dialogForm.SupUnit,
             OperType: this.operation === 'add' ? 'Add' : 'Update',
             Operator: getCookie('admin')
           }

--
Gitblit v1.9.3