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/scrap/scrapDetails/index.vue |  159 +++++++++++++++++++++++++++++-----------------------
 1 files changed, 89 insertions(+), 70 deletions(-)

diff --git a/admin-web/src/views/stock/scrap/scrapDetails/index.vue b/admin-web/src/views/stock/scrap/scrapDetails/index.vue
index 257a248..5eb5089 100644
--- a/admin-web/src/views/stock/scrap/scrapDetails/index.vue
+++ b/admin-web/src/views/stock/scrap/scrapDetails/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>
@@ -31,17 +31,17 @@
 </template>
 
 <script>
-import MyTableV2 from "@/components/myTable/myTableV2";
-import MyButton from "@/components/myButton/myButton";
+import MyTableV2 from '@/components/myTable/myTableV2';
+import MyButton from '@/components/myButton/myButton';
 import SettingIplatform from '@/utils/settingIplatform';
-import * as finsystenant from '@/api/baseSetting/finsystenant'
-import myImport from '@/views/components/myImport'
+import myImport from '@/views/components/myImport';
 import detail from '../itemScrapping/detail';
 import {getBaseUrl} from '@/utils/base';
+import * as DateFormatter from '@/utils/DateFormatter';
 
 export default {
-  name: "index",
-  components: {MyButton, MyTableV2, myImport,detail},
+  name: 'index',
+  components: { MyButton, MyTableV2, myImport, detail },
   data() {
     return {
       // 鎼滅储妗�
@@ -51,22 +51,7 @@
           dataIndex: 'name',
           label: '鍗曞彿',
           placeholder: '璇疯緭鍏�',
-          defaultValue: ''
-        },
-        {
-          type: 'text',
-          dataIndex: 'name',
-          label: '鐗╁搧鍚嶇О',
-          placeholder: '璇疯緭鍏�',
-          defaultValue: ''
-        },
-        {
-          type: 'select',
-          dataIndex: 'warehouseId',
-          label: '瑙勬牸鍨嬪彿',
-          placeholder: '璇烽�夋嫨',
           defaultValue: '',
-          options: [],
         },
         {
           type: 'cascader',
@@ -74,15 +59,43 @@
           label: '鏈烘瀯',
           placeholder: '璇烽�夋嫨',
           optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null },
+          cascader: [{key:'goodsTemplateId',queryKey: 'agencyId'}],
           defaultValue: '',
           options: [],
+        },
+        {
+          type: 'select',
+          dataIndex: 'goodsTemplateId',
+          label: '鐗╁搧鍚嶇О',
+          placeholder: '璇疯緭鍏�',
+          defaultValue: '',
+          options: [],
+          cascader: [{ key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId' }],
+          optionsConfig: {
+            label: 'goodsName',
+            value: 'id',
+            url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/query/goodsTemplate',
+          },
+        },
+        {
+          type: 'select',
+          dataIndex: 'baseGoodsModelsId',
+          label: '瑙勬牸鍨嬪彿',
+          placeholder: '璇疯緭鍏�',
+          defaultValue: '',
+          options: [],
+          optionsConfig: {
+            label: 'modelName',
+            value: 'id',
+            url: SettingIplatform.apiBaseURL + '/pc/base/goods/models/query/goodsModel',
+          },
         },
         {
           type: 'text',
           dataIndex: 'name',
           label: '鍒涘缓浜�',
           placeholder: '璇疯緭鍏�',
-          defaultValue: ''
+          defaultValue: '',
         },
         {
           type: 'date-picker',
@@ -104,25 +117,25 @@
         tenantId: null,
         userName: null,
         userPhone: null,
-        status: 1
+        status: 1,
       },
       // 瀵煎叆
       importSetting: {
-          dialogTitle: '瀵煎叆',
-          dialogShow: false,
-          fileSettings: {
-              data: {},
-              uploadUrl: getBaseUrl()+"/pc/fin/sys/tenant/import", // 涓婁紶鍦板潃
-              accept: '.xls', // 鏍煎紡
-              type: 'text', // 鍥炴樉褰㈠紡
-              loading: false // 瀵煎叆鏁堟灉
-          },
-          /* 妯℃澘涓嬭浇 */
-          templateSettings: {
-              templateName: '瀵煎叆妯℃澘.xls', // 鍚嶇О
-              templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate' // 涓嬭浇鍦板潃
-          },
-          onSuccess: null
+        dialogTitle: '瀵煎叆',
+        dialogShow: false,
+        fileSettings: {
+          data: {},
+          uploadUrl: getBaseUrl() + '/pc/fin/sys/tenant/import', // 涓婁紶鍦板潃
+          accept: '.xls', // 鏍煎紡
+          type: 'text', // 鍥炴樉褰㈠紡
+          loading: false, // 瀵煎叆鏁堟灉
+        },
+        /* 妯℃澘涓嬭浇 */
+        templateSettings: {
+          templateName: '瀵煎叆妯℃澘.xls', // 鍚嶇О
+          templateUrl: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/getImportTemplate', // 涓嬭浇鍦板潃
+        },
+        onSuccess: null,
       },
       editSetting: {
         title: '',
@@ -134,33 +147,42 @@
       table: {
         showIndex: true, // 鏄惁鏄剧ず搴忓彿
         expand: false, // 鏄惁鏄剧ず璇︽儏鏁版嵁
-        url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 璇锋眰鍦板潃
+        url: SettingIplatform.apiBaseURL + '/pc/l/wh/form/scrapped/list/detailList', // 璇锋眰鍦板潃
         // 宸ュ叿鏉�
         tools: {
-          columnsCtrl: {// 鍒楁帶鍒舵寜閽�
-            show: false
+          columnsCtrl: {
+            // 鍒楁帶鍒舵寜閽�
+            show: false,
           },
-          generalExport: {// 閫氱敤瀵煎嚭鎸夐挳
-            show: false
+          generalExport: {
+            // 閫氱敤瀵煎嚭鎸夐挳
+            show: false,
           },
           // 鑷畾涔夊伐鍏锋潯鎸夐挳
-          custom: [
-          ]
+          custom: [],
         },
         // 鍒椾俊鎭�
         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: 'summary', align: 'left',},
-          {title: '鎿嶄綔鏃堕棿', field: 'summary', align: 'left',},
+          { title: '鍗曞彿', field: 'businessFormCode', align: 'center', width: 130 },
+          { title: '鐗╁搧鍚嶇О', field: 'goodsTemplateName', align: 'left', minWidth: 130 },
+          { title: '瑙勬牸鍨嬪彿', field: 'baseGoodsModelsName', align: 'left', minWidth: 130  },
+          { title: '鎶ュ簾鏁伴噺', field: 'counts', align: 'center' },
+          { title: '鎵�灞炴満鏋�', field: 'agencyName', align: 'left', minWidth: 130 },
+          { title: '鍒涘缓浜�', field: 'operatorName', align: 'left' },
+          {
+            title: '鎿嶄綔鏃堕棿',
+            field: 'dealTime',
+            align: 'center',
+            width: 160,
+            formatter: (row) => {
+              return { value: DateFormatter.LongToDateTime(row.dealTime) };
+            },
+          },
         ],
         // 鎿嶄綔淇℃伅
         operation: {
           show: true, // 鏄剧ず鎿嶄綔鍒�
-          width: '150', // 鍒楀
+          width: 100, // 鍒楀
           attr: [
             {
               title: '璇︽儏',
@@ -177,19 +199,18 @@
             small: false,
             pageNum: 1,
             pageSize: 10,
-            total: 0
-          }
-        }
+            total: 0,
+          },
+        },
       },
       detailSetting: {
         title: '璇︽儏',
         id: '',
         show: false,
       },
-    }
+    };
   },
-  created() {
-  },
+  created() {},
   methods: {
     showDetail(row) {
       this.detailSetting.id = row.id;
@@ -198,19 +219,17 @@
     // 鏌ヨtable鍒楄〃
     search(pageNum) {
       if (pageNum != undefined) {
-        this.$refs.myTable.search(pageNum)
+        this.$refs.myTable.search(pageNum);
       } else {
-        this.$refs.myTable.search()
+        this.$refs.myTable.search();
       }
     },
     fifterForm(params) {
-      this.filterFrom = Object.assign(this.filterFrom, params)
-      this.search(1)
-    }
-  }
-}
+      this.filterFrom = Object.assign(this.filterFrom, params);
+      this.search(1);
+    },
+  },
+};
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

--
Gitblit v1.9.1