From 35738d1b2c095b2eca0211efdc4fa59507189e6f Mon Sep 17 00:00:00 2001
From: zhy <luhan1008611>
Date: 星期一, 30 十月 2023 09:33:34 +0800
Subject: [PATCH] feat: 基础信息

---
 admin-web/src/views/foundation/material/index.vue |   93 +++++++++++++++++++---------------------------
 1 files changed, 38 insertions(+), 55 deletions(-)

diff --git a/admin-web/src/views/foundation/material/index.vue b/admin-web/src/views/foundation/material/index.vue
index 167fd9a..e79fab4 100644
--- a/admin-web/src/views/foundation/material/index.vue
+++ b/admin-web/src/views/foundation/material/index.vue
@@ -27,6 +27,7 @@
 </template>
 
 <script>
+import * as DateFormatter from '@/utils/DateFormatter';
 import myTree from '@/components/myTree/index'
 import MyTableV2 from "@/components/myTable/myTableV2";
 import MyButton from "@/components/myButton/myButton";
@@ -45,63 +46,42 @@
       items: [
         {
           type: 'text',
-          dataIndex: 'goods_Name',
+          dataIndex: 'goodsName',
           label: '鐗╁搧鍚嶇О',
           placeholder: '璇疯緭鍏�',
           defaultValue: ''
         },
         {
           type: 'text',
-          dataIndex: 'goods_Code',
+          dataIndex: 'goodsCode',
           label: '鐗╁搧缂栧彿',
           placeholder: '璇疯緭鍏�',
           defaultValue: ''
         },
         {
           type: 'select',
-          dataIndex: 'status',
+          dataIndex: 'classification',
           label: '绫诲埆',
           placeholder: '璇烽�夋嫨',
-          defaultValue: '1',
+          defaultValue: '',
           options: [
             {
               label: 'A',
-              value: '1'
+              value: 'A'
             },
             {
               label: 'B',
-              value: '2'
+              value: 'B'
             },
             {
               label: 'C',
-              value: '3'
+              value: 'C'
             }
           ]
         },
         {
           type: 'select',
-          dataIndex: 'status',
-          label: '閲囪喘绫诲埆',
-          placeholder: '璇烽�夋嫨',
-          defaultValue: '1',
-          options: [
-            {
-              label: '鍏ㄩ儴',
-              value: '1'
-            },
-            {
-              label: '鑷噰',
-              value: '2'
-            },
-            {
-              label: '闆嗛噰',
-              value: '3'
-            }
-          ]
-        },
-        {
-          type: 'select',
-          dataIndex: 'status',
+          dataIndex: 'states',
           label: '鐘舵��',
           placeholder: '璇烽�夋嫨',
           defaultValue: '1',
@@ -122,7 +102,7 @@
         tenantId: null,
         userName: null,
         userPhone: null,
-        status: 1
+        states: 1
       },
       // 瀵煎叆
       importSetting: {
@@ -152,7 +132,7 @@
       table: {
         showIndex: true, // 鏄惁鏄剧ず搴忓彿
         expand: false, // 鏄惁鏄剧ず璇︽儏鏁版嵁
-        url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 璇锋眰鍦板潃
+        url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/list', // 璇锋眰鍦板潃
         // 宸ュ叿鏉�
         tools: {
           columnsCtrl: {// 鍒楁帶鍒舵寜閽�
@@ -179,19 +159,19 @@
         },
         // 鍒椾俊鎭�
         columns: [
-          {title: '鐗╁搧缂栧彿', field: 'goods_Code', align: 'center'},
-          {title: '鐗╁搧鍚嶇О', field: 'goods_Name', align: 'center'},
-          {title: '鍒嗙被', field: 'classification', align: 'center'},
-          {title: '绫诲埆', field: 'states', align: 'center'},
-          {title: '閲囪喘绫诲瀷', field: 'category_id', align: 'center'},
-          {title: '鎵�灞炴満鏋�', field: 'agency_Name', align: 'center'},
+          {title: '鐗╁搧缂栧彿', field: 'goodsCode', align: 'center'},
+          {title: '鐗╁搧鍚嶇О', field: 'goodsName', align: 'center'},
+          {title: '鍒嗙被', field: 'categoryName', align: 'center'},
+          {title: '绫诲埆', field: 'classification', align: 'center'},
+          // {title: '閲囪喘绫诲瀷', field: 'categoryId', align: 'center'},
+          {title: '鎵�灞炴満鏋�', field: '', align: 'center'},
           {
             title: '鍒涘缓鏃堕棿',
-            field: 'create_Date',
+            field: 'createDate',
             align: 'center',
             width: 160,
             formatter: (row) => {
-              return {value: DateFormatter.LongToDateTime(row.create_Date)};
+              return {value: DateFormatter.LongToDateTime(row.createDate)};
             },
           },
           {
@@ -201,7 +181,7 @@
             width: 100,
             switch: row => {
               const result = {}
-              if (row.status == 1) {
+              if (row.states == 1) {
                 Object.assign(result, {
                   value: true, // 寮�
                   label: '鏄�', // 寮�鐨勬弿杩�
@@ -225,7 +205,7 @@
         // 鎿嶄綔淇℃伅
         operation: {
           show: true, // 鏄剧ず鎿嶄綔鍒�
-          width: '150', // 鍒楀
+          width: '250', // 鍒楀
           attr: [
             {
               title: '缂栬緫',
@@ -239,12 +219,12 @@
                 this.del(row);
               },
             },
-            {
-              title: '瑙勬牸鍨嬪彿',
-              events: (row) => {
-                this.showAudit(row);
-              },
-            },
+            // {
+            //   title: '瑙勬牸鍨嬪彿',
+            //   events: (row) => {
+            //     this.showAudit(row);
+            //   },
+            // },
           ],
         },
         paging: {
@@ -279,10 +259,10 @@
     updState(row) {
       let vm = this
       let text = row.status == 0 ? "鍚敤" : "绂佺敤";
-      vm.$modal.confirm('纭瑕�' + text + '"' + row.name + '"鍚楋紵').then(function () {
+      vm.$modal.confirm('纭瑕�' + text + '"' + row.goodsName + '"鍚楋紵').then(function () {
         let params = Object.assign({}, row)
         params.status = row.status == 1 ? 0 : 1
-        finsystenant.edit(params).then(res => {
+        finsystenant.editcode(params).then(res => {
           if (res) {
             row.status = row.status === 1 ? 0 : 1
             vm.$modal.msgSuccess(text + "鎴愬姛");
@@ -293,9 +273,9 @@
     },
     del(row) {
       this.$modal
-        .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.name + '"鐨勬満鏋勫悧锛�')
+        .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.goodsName + '"鐨勬満鏋勫悧锛�')
         .then(function () {
-          finsystenant.del({id: row.id}).then((res) => {
+          finsystenant.delCode({id: row.id}).then((res) => {
           });
         })
         .then((res) => {
@@ -316,10 +296,13 @@
       // }
     },
     showAudit(row) {
-      this.editSetting.id = row.id;
-      this.editSetting.info = JSON.stringify(row);
-      this.editSetting.title = '缂栬緫';
-      this.editSetting.show = true;
+      finsystenant.editmaterial(row.id).then(res => {
+        // console.log(res,'res');
+        this.editSetting.id = res.id;
+        this.editSetting.info = JSON.stringify(res);
+        this.editSetting.title = '缂栬緫';
+        this.editSetting.show = true;
+      })
     },
     // 鏌ヨtable鍒楄〃
     search(pageNum) {

--
Gitblit v1.9.1