From 774e6e650b6235a9e34dfecab65c4322c1767714 Mon Sep 17 00:00:00 2001
From: 石广澎 <shiguangpeng@163.com>
Date: 星期五, 01 十二月 2023 16:48:15 +0800
Subject: [PATCH] feat: 库存管理 查询条件梳理

---
 admin-web/src/views/stock/ledger/alertQuery/index.vue |   67 ++++++++++++++++++---------------
 1 files changed, 36 insertions(+), 31 deletions(-)

diff --git a/admin-web/src/views/stock/ledger/alertQuery/index.vue b/admin-web/src/views/stock/ledger/alertQuery/index.vue
index 0c53e12..9ae6e63 100644
--- a/admin-web/src/views/stock/ledger/alertQuery/index.vue
+++ b/admin-web/src/views/stock/ledger/alertQuery/index.vue
@@ -10,7 +10,7 @@
           <el-row style="margin-top: 15px">
             <el-col>
               <!--鍒楄〃-->
-              <my-table-v2 ref="myTable" :filter="filterFrom" :table="table" />
+              <my-table-v2 ref="myTable" :filter="filterFrom" :table="table"/>
             </el-col>
           </el-row>
         </el-card>
@@ -24,13 +24,11 @@
 import MyButton from '@/components/myButton/myButton';
 import SettingIplatform from '@/utils/settingIplatform';
 import * as finsystenant from '@/api/baseSetting/finsystenant';
-import { goodsModel, getCategorySelectTree } from '@/api/baseSetting/finsystenant';
-import { getDicts } from '@/api/system/dict/data';
 import * as DateFormatter from '@/utils/DateFormatter';
 
 export default {
   name: 'index',
-  components: { MyButton, MyTableV2 },
+  components: {MyButton, MyTableV2},
   data() {
     return {
       // 鎼滅储妗�
@@ -42,12 +40,12 @@
           placeholder: '璇烽�夋嫨',
           defaultValue: '',
           options: [],
-          cascader: [{key:'baseGoodsModelsId',queryKey: 'goodsTemplatesId'}],
+          cascader: [{key: 'goodsTemplateId', queryKey: 'categoryId'}],
           optionsConfig: {
             label: 'label',
             value: 'id',
             url: SettingIplatform.apiBaseURL + '/pc/base/category/select/tree',
-            props:{checkStrictly:false}
+            props: {checkStrictly: false, emitPath: false, value: 'id'}
           },
         },
         {
@@ -57,7 +55,7 @@
           placeholder: '璇疯緭鍏�',
           defaultValue: '',
           options: [],
-          cascader: [{key:'baseGoodsModelsId',queryKey: 'goodsTemplatesId'}],
+          cascader: [{key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId'}],
           optionsConfig: {
             label: 'goodsName',
             value: 'id',
@@ -83,12 +81,16 @@
           label: '绫诲埆',
           placeholder: '璇烽�夋嫨',
           defaultValue: '',
-          options: [],
-          optionsConfig: {
-            label: 'dict_label',
-            value: 'dict_value',
-            url: SettingIplatform.apiBaseURL + '/permit/dict/data/type/GOODS_PRICE',
-          },
+          options: [{
+            label: 'A',
+            value: '1'
+          }, {
+            label: 'B',
+            value: '2'
+          }, {
+            label: 'C',
+            value: '3'
+          }],
         },
       ],
       // 鏍戞暟鎹�
@@ -126,16 +128,17 @@
         },
         // 鍒椾俊鎭�
         columns: [
-          { title: '鐗╁搧鍚嶇О', field: 'baseGoodsTemplateName', align: 'left' },
-          { title: '瑙勬牸鍨嬪彿', field: 'baseGoodsModelsName', align: 'center' },
-          { title: '鍗曚綅', field: 'unit', align: 'center' },
-          { title: '褰撳墠搴撳瓨', field: 'warehouseCount', align: 'center' },
-          { title: '淇濆簳搴撳瓨', field: 'lowerLimit', align: 'left' },
-          { title: '灏侀《搴撳瓨', field: 'upperLimit', align: 'left' },
+          {title: '鐗╁搧鍚嶇О', field: 'baseGoodsTemplateName', align: 'left', minWidth: 140},
+          {title: '瑙勬牸鍨嬪彿', field: 'baseGoodsModelsName', align: 'left', minWidth: 130},
+          {title: '鍗曚綅', field: 'unit', align: 'center', width: 80},
+          {title: '褰撳墠搴撳瓨', field: 'warehouseCount', align: 'center', width: 130},
+          {title: '淇濆簳搴撳瓨', field: 'lowerLimit', align: 'center', width: 130},
+          {title: '灏侀《搴撳瓨', field: 'upperLimit', align: 'center', width: 130},
           {
             title: '鐘舵��',
             field: 'warningType',
-            align: 'left',
+            align: 'center',
+            width: 90,
             formatter: (row) => {
               return {
                 type: row.warningType == 1 ? 'warning' : 'danger',
@@ -146,10 +149,10 @@
           {
             title: '棰勮鏃堕棿',
             field: 'warningTime',
-            align: 'left',
+            align: 'center',
             width: 160,
             formatter: (row) => {
-              return { value: DateFormatter.LongToDateTime(row.warningTime) };
+              return {value: DateFormatter.LongToDateTime(row.warningTime)};
             },
           },
         ],
@@ -171,15 +174,17 @@
   methods: {
     del(row) {
       this.$modal
-        .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.name + '"鐨勬満鏋勫悧锛�')
-        .then(function () {
-          finsystenant.del({ id: row.id }).then((res) => {});
-        })
-        .then((res) => {
-          this.$message.success('鍒犻櫎鎴愬姛锛�');
-          this.search();
-        })
-        .catch(() => {});
+          .confirm('鏄惁纭鍒犻櫎鍚嶇О涓�"' + row.name + '"鐨勬満鏋勫悧锛�')
+          .then(function () {
+            finsystenant.del({id: row.id}).then((res) => {
+            });
+          })
+          .then((res) => {
+            this.$message.success('鍒犻櫎鎴愬姛锛�');
+            this.search();
+          })
+          .catch(() => {
+          });
     },
     // 鏌ヨtable鍒楄〃
     search(pageNum) {

--
Gitblit v1.9.1