From 494fbb222f0ec270f764f84f13987984fad09b82 Mon Sep 17 00:00:00 2001
From: futian.liu <liufutianyoo@163.com>
Date: 星期三, 13 十二月 2023 11:22:08 +0800
Subject: [PATCH] 规格型号管理

---
 admin-web/src/views/foundation/store/index.vue |   57 ++++++++++++++++++++++++++++++++++++---------------------
 1 files changed, 36 insertions(+), 21 deletions(-)

diff --git a/admin-web/src/views/foundation/store/index.vue b/admin-web/src/views/foundation/store/index.vue
index 3f7a463..0578ce5 100644
--- a/admin-web/src/views/foundation/store/index.vue
+++ b/admin-web/src/views/foundation/store/index.vue
@@ -15,6 +15,7 @@
           </el-row>
           <!--娣诲姞/缂栬緫寮圭獥-->
           <edit v-if="editSetting.show" :setting="editSetting" @close="editSetting.show = false" @search="search"/>
+          <person v-if="personSetting.show" :setting="personSetting" @close="personSetting.show = false" @search="search"/>
         </el-card>
       </el-container>
     </el-container>
@@ -31,27 +32,28 @@
 import MyButton from "@/components/myButton/myButton";
 import SettingIplatform from '@/utils/settingIplatform';
 import edit from './edit'
+import person from './person'
 import * as finsystenant from '@/api/baseSetting/finsystenant'
 import myImport from '@/views/components/myImport'
 import {getBaseUrl} from '@/utils/base';
 
 export default {
   name: "index",
-  components: {MyButton, MyTableV2, edit, myImport},
+  components: {MyButton, MyTableV2, edit, myImport, person},
   data() {
     return {
       // 鎼滅储妗�
       items: [
         {
           type: 'text',
-          dataIndex: 'name',
+          dataIndex: 'warehouseName',
           label: '浠撳簱鍚嶇О',
           placeholder: '璇疯緭鍏�',
           defaultValue: ''
         },
         {
           type: 'select',
-          dataIndex: 'status',
+          dataIndex: 'states',
           label: '鐘舵��',
           placeholder: '璇烽�夋嫨',
           defaultValue: '1',
@@ -100,11 +102,17 @@
         orgId: '',
         show: false,
       },
+      personSetting: {
+        title: '',
+        id: '',
+        orgId: '',
+        show: false,
+      },
       // 琛ㄦ牸鏁版嵁
       table: {
         showIndex: true, // 鏄惁鏄剧ず搴忓彿
         expand: false, // 鏄惁鏄剧ず璇︽儏鏁版嵁
-        url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 璇锋眰鍦板潃
+        url: SettingIplatform.apiBaseURL + '/pc/base/warehouse/list', // 璇锋眰鍦板潃
         // 宸ュ叿鏉�
         tools: {
           columnsCtrl: {// 鍒楁帶鍒舵寜閽�
@@ -125,19 +133,19 @@
         },
         // 鍒椾俊鎭�
         columns: [
-          {title: '鍚嶇О浠撳簱', field: 'name', align: 'left',},
-          {title: '缂栧彿', field: 'code', align: 'center'},
-          {title: '绫诲瀷', field: 'lv', align: 'center', },
-          {title: '鍦板潃', field: 'lv', align: 'center', },
-          {title: '鎵�灞炴満鏋�', field: 'summary', align: 'left',},
+          {title: '浠撳簱鍚嶇О', field: 'warehouseName', align: 'left', minWidth: 140},
+          {title: '缂栧彿', field: 'warehouseCode', align: 'center', width: 120},
+          {title: '绫诲瀷', field: 'classificationName', align: 'center', width: 120 },
+          {title: '鍦板潃', field: 'adress', align: 'left', minWidth: 140 },
+          // {title: '鎵�灞炴満鏋�', field: 'summary', align: 'left',},
           {
-            field: 'belongProvince',
+            field: 'states',
             title: '鐘舵��',
             align: 'center',
             width: 100,
             switch: row => {
               const result = {}
-              if (row.status == 1) {
+              if (row.states == 1) {
                 Object.assign(result, {
                   value: true, // 寮�
                   label: '鏄�', // 寮�鐨勬弿杩�
@@ -161,7 +169,7 @@
         // 鎿嶄綔淇℃伅
         operation: {
           show: true, // 鏄剧ず鎿嶄綔鍒�
-          width: '150', // 鍒楀
+          width: 240, // 鍒楀
           attr: [
             {
               title: '缂栬緫',
@@ -176,9 +184,10 @@
               },
             },
             {
-              title: '浠撳簱鍛�',
+              title: '搴撶鍛�',
+              type:'primary',
               events: (row) => {
-                this.showAudit(row);
+                this.showPerson(row);
               },
             }
           ],
@@ -227,13 +236,13 @@
     },
     updState(row) {
       let vm = this
-      let text = row.status == 0 ? "鍚敤" : "绂佺敤";
-      vm.$modal.confirm('纭瑕�' + text + '"' + row.name + '"鍚楋紵').then(function () {
+      let text = row.states == 0 ? "鍚敤" : "绂佺敤";
+      vm.$modal.confirm('纭瑕�' + text + '"' + row.warehouseName + '"鍚楋紵').then(function () {
         let params = Object.assign({}, row)
-        params.status = row.status == 1 ? 0 : 1
-        finsystenant.edit(params).then(res => {
+        params.states = row.states == 1 ? 0 : 1
+        finsystenant.editstore(params).then(res => {
           if (res) {
-            row.status = row.status === 1 ? 0 : 1
+            row.states = row.states === 1 ? 0 : 1
             vm.$modal.msgSuccess(text + "鎴愬姛");
             vm.search()
           }
@@ -242,9 +251,9 @@
     },
     del(row) {
       this.$modal
-        .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.name + '"鐨勬満鏋勫悧锛�')
+        .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.warehouseName + '"鐨勬満鏋勫悧锛�')
         .then(function () {
-          finsystenant.del({id: row.id}).then((res) => {
+          finsystenant.delstore({id: row.id}).then((res) => {
           });
         })
         .then((res) => {
@@ -270,6 +279,12 @@
       this.editSetting.title = '缂栬緫';
       this.editSetting.show = true;
     },
+    showPerson(row) {
+      this.personSetting.id = row.id;
+      this.personSetting.info = JSON.stringify(row);
+      this.personSetting.title = '閫夋嫨搴撶鍛�';
+      this.personSetting.show = true;
+    },
     nodeClick(param) {
       param = param || {}
       this.p = Object.assign({}, {

--
Gitblit v1.9.1