From 6665ddbc6dd0fe82ea3d47cd2bb5e48a5a27a712 Mon Sep 17 00:00:00 2001
From: cy <1664593601@qq.com>
Date: 星期六, 09 十二月 2023 17:46:57 +0800
Subject: [PATCH] feat: 报废明细

---
 admin-web/src/views/stock/ledger/ledgerQuery/index.vue |   54 +++++++++++++++++++-----------------------------------
 1 files changed, 19 insertions(+), 35 deletions(-)

diff --git a/admin-web/src/views/stock/ledger/ledgerQuery/index.vue b/admin-web/src/views/stock/ledger/ledgerQuery/index.vue
index 59c1aac..b1e2ef9 100644
--- a/admin-web/src/views/stock/ledger/ledgerQuery/index.vue
+++ b/admin-web/src/views/stock/ledger/ledgerQuery/index.vue
@@ -30,10 +30,9 @@
 import SettingIplatform from '@/utils/settingIplatform';
 import * as finsystenant from '@/api/baseSetting/finsystenant';
 import myImport from '@/views/components/myImport';
-import { getBaseUrl } from '@/utils/base';
-import { getCategorySelectTree, goodsModel } from '@/api/baseSetting/finsystenant';
-import { getDicts } from '@/api/system/dict/data';
+import {getBaseUrl} from '@/utils/base';
 import * as DateFormatter from '@/utils/DateFormatter';
+import stockType from '@/utils/stockType'
 
 export default {
   name: 'index',
@@ -75,7 +74,7 @@
           placeholder: '璇疯緭鍏�',
           defaultValue: '',
           options: [],
-          cascader: [{ key: 'categoryId', queryKey: 'goodsTemplatesId' }],
+          cascader: [{ key: 'baseGoodsModelsId', queryKey: 'goodsTemplatesId' }],
           optionsConfig: {
             label: 'goodsName',
             value: 'id',
@@ -110,20 +109,20 @@
         },
         {
           type: 'text',
-          dataIndex: 'name',
+          dataIndex: 'businessFormCode',
           label: '鍗曞彿',
           placeholder: '璇疯緭鍏�',
           defaultValue: '',
         },
         {
           type: 'date-picker',
-          dataIndex: 'val1',
+          dataIndex: 'dealTimeStart',
           label: '鏃堕棿',
           defaultValue: '',
         },
         {
           type: 'date-picker',
-          dataIndex: 'val2',
+          dataIndex: 'dealTimeEnd',
           label: '鑷�',
           defaultValue: '',
         },
@@ -181,44 +180,29 @@
         },
         // 鍒椾俊鎭�
         columns: [
-          { title: '鏈烘瀯', field: 'agencyName', align: 'left' },
-          { title: '浠撳簱', field: 'warehouseName', align: 'center' },
-          { title: '鐗╁搧鍚嶇О', field: 'goodsTemplateName', align: 'center' },
-          { title: '瑙勬牸鍨嬪彿', field: 'baseGoodsModelsName', align: 'center' },
+          { title: '鏈烘瀯', field: 'agencyName', align: 'left', width: 130 },
+          { title: '浠撳簱', field: 'warehouseName', align: 'left', width: 130 },
+          { title: '鐗╁搧鍚嶇О', field: 'goodsTemplateName', align: 'left', minWidth: 130 },
+          { title: '瑙勬牸鍨嬪彿', field: 'baseGoodsModelsName', align: 'left', width: 130 },
           {
             title: '绫诲瀷',
             field: 'summary',
-            align: 'left',
+            align: 'center',
             formatter: (row) => {
-              let result = '';
-              let arr = ['閲囪喘鍏ュ簱', '璋冩嫧', '鍏朵粬鍑哄簱', '閮ㄩ棬鍒嗗彂', '鎶ュ簾鍑哄簱', '閮ㄩ棬鐗╁搧鍥為��浠撳簱', '鐗╁搧鐩樼偣'];
-              if (row.businessType == 7) {
-                if (this.thisType == 1) {
-                  result = '鐩樼泩鍏ュ簱';
-                } else {
-                  result = '鐩樹簭鍑哄簱';
-                }
-              }else if(this.businessType == 2) {
-                if (this.thisType == 1) {
-                  result = '璋冩嫧鍏ュ簱';
-                } else {
-                  result = '璋冩嫧鍑哄簱';
-                }
-              }else {
-                result = arr[row.businessType - 1];
-              }
+              let result = stockType(row)
               return { value: result };
             },
           },
-          { title: '鍗曞彿', field: 'businessFormCode', align: 'left' },
-          { title: '鏁伴噺', field: 'thisCount', align: 'left' },
-          { title: '鎿嶄綔鍓嶆暟閲�', field: 'initialCount', align: 'left' },
-          { title: '鎿嶄綔鍚庢暟閲�', field: 'endCount', align: 'left' },
-          { title: '鍦ㄩ��', field: 'zaiTuCount', align: 'left' },
+          { title: '鍗曞彿', field: 'businessFormCode', align: 'center', width: 130 },
+          { title: '鏁伴噺', field: 'thisCount', align: 'center', width: 100 },
+          { title: '鎿嶄綔鍓嶆暟閲�', field: 'initialCount', align: 'center', width: 100 },
+          { title: '鎿嶄綔鍚庢暟閲�', field: 'endCount', align: 'center', width: 100 },
+          { title: '鍦ㄩ��', field: 'zaiTuCount', align: 'center', width: 100 },
           {
             title: '鎿嶄綔鏃堕棿',
             field: 'dealTime',
-            align: 'left',
+            align: 'center',
+            width: 160,
             formatter: (row) => {
               return { value: DateFormatter.LongToDateTime(row.dealTime) };
             },

--
Gitblit v1.9.1