From 9834dbff448908d2008d8c52a2544aad00c099b1 Mon Sep 17 00:00:00 2001
From: haoyahui <2032914783@qq.com>
Date: 星期三, 22 十一月 2023 17:34:26 +0800
Subject: [PATCH] 库存盘点, 异常明细,报废管理

---
 admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue |  155 +++++++++++++++++++++++++++------------------------
 1 files changed, 82 insertions(+), 73 deletions(-)

diff --git a/admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue b/admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue
index bcaf8ee..3c1b726 100644
--- a/admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue
+++ b/admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue
@@ -26,8 +26,9 @@
 import * as finsystenant from '@/api/baseSetting/finsystenant';
 import { getBaseUrl } from '@/utils/base';
 import { mapGetters } from 'vuex';
-import { selectTenantWarehouse,goodsModel } from '@/api/baseSetting/finsystenant';
+import { selectTenantWarehouse, goodsModel } from '@/api/baseSetting/finsystenant';
 import { getDicts } from '@/api/system/dict/data';
+import * as DateFormatter from '@/utils/DateFormatter';
 
 export default {
   name: 'index',
@@ -52,21 +53,38 @@
           placeholder: '璇烽�夋嫨',
           defaultValue: '',
           options: [],
-        },
-        {
-          type: 'text',
-          dataIndex: 'goodsTemplateName',
-          label: '鐗╁搧鍚嶇О',
-          placeholder: '璇疯緭鍏�',
-          defaultValue: '',
+          optionsConfig: {
+            label: 'warehouseName',
+            value: 'id',
+            url: SettingIplatform.apiBaseURL + '/pc/base/warehouse/select/tenant_warehouse',
+          },
         },
         {
           type: 'select',
-          dataIndex: 'warehouseId',
-          label: '瑙勬牸鍨嬪彿',
-          placeholder: '璇烽�夋嫨',
+          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: 'select',
@@ -74,16 +92,20 @@
           label: '绫诲瀷',
           placeholder: '璇烽�夋嫨',
           defaultValue: '',
-          options: [{
-            label:'鍏ㄩ儴',
-            value:''
-          },{
-            label:'鐩樼泩',
-            value:'1'
-          },{
-            label:'鐩樹簭',
-            value:'2'
-          }],
+          options: [
+            {
+              label: '鍏ㄩ儴',
+              value: '',
+            },
+            {
+              label: '鐩樼泩',
+              value: '1',
+            },
+            {
+              label: '鐩樹簭',
+              value: '2',
+            },
+          ],
         },
         {
           type: 'select',
@@ -91,20 +113,24 @@
           label: '鍑哄叆搴撶被鍨�',
           placeholder: '璇烽�夋嫨',
           defaultValue: '',
-          options: [{
-            label:'鍏ㄩ儴',
-            value:''
-          },{
-            label:'鐩樼泩鍏ュ簱',
-            value:'1'
-          },{
-            label:'鐩樹簭鍑哄簱',
-            value:'2'
-          }],
+          options: [
+            {
+              label: '鍏ㄩ儴',
+              value: '',
+            },
+            {
+              label: '鐩樼泩鍏ュ簱',
+              value: '1',
+            },
+            {
+              label: '鐩樹簭鍑哄簱',
+              value: '2',
+            },
+          ],
         },
         {
           type: 'text',
-          dataIndex: 'baseGoodsModelsId',
+          dataIndex: 'businessFormCode',
           label: '鍗曞彿',
           placeholder: '璇疯緭鍏�',
           defaultValue: '',
@@ -133,10 +159,6 @@
       treeDataList: [],
       // 鎼滅储鏉′欢
       filterFrom: {
-        tenantId: null,
-        userName: null,
-        userPhone: null,
-        status: 1,
       },
       // 琛ㄦ牸鏁版嵁
       table: {
@@ -158,18 +180,32 @@
         },
         // 鍒椾俊鎭�
         columns: [
-          { title: '浠撳簱', field: 'warehouseFormCode', align: 'left' },
+          { title: '浠撳簱', field: 'warehouseName', align: 'left' },
           { title: '鐗╁搧鍚嶇О', field: 'goodsTemplateName', 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: 'summary', align: 'left' },
-          { title: '鍑哄叆搴撳崟鍙�', field: 'summary', align: 'left' },
+          { title: '瑙勬牸鍨嬪彿', field: 'baseGoodsModelsName', align: 'center' },
+          { title: '绫诲瀷', field: 'inventoryResultType', align: 'center' },
+          { title: '搴撳瓨鏁伴噺', field: 'initCounts', align: 'left' },
+          { title: '鐩樼偣鏁伴噺', field: 'inventoryCounts', align: 'left' },
+          { title: '寮傚父鏁伴噺', field: 'errorCounts', align: 'left' },
+          {
+            title: '鍑哄叆搴撶被鍨�',
+            field: 'inventoryType',
+            align: 'left',
+            formatter: (row) => {
+              return { value: row.inventoryType, type: row.inventoryType && row.inventoryType.includes('鐩樼泩') ? 'success' : 'danger' };
+            },
+          },
+          { title: '鍑哄叆搴撳崟鍙�', field: 'warehouseFormCode', align: 'left' },
           { title: '鏈烘瀯', field: 'agencyName', align: 'left' },
           { title: '鎿嶄綔浜�', field: 'operatorName', align: 'left' },
-          { title: '鎿嶄綔鏃堕棿', field: 'summary', align: 'left' },
+          {
+            title: '鎿嶄綔鏃堕棿',
+            field: 'operatorTime',
+            align: 'center',
+            formatter: (row) => {
+              return { value: row.operatorTime ? DateFormatter.LongToDateTime(row.operatorTime) : '-' };
+            },
+          },
         ],
         // 鎿嶄綔淇℃伅
         operation: {
@@ -194,35 +230,8 @@
   computed: {
     ...mapGetters(['userInfo']),
   },
-  created() {
-    this.initQuery();
-  },
+  created() {},
   methods: {
-    initQuery() {
-      selectTenantWarehouse({ agencyId: this.userInfo.tenantId }).then((res) => {
-        this.items.forEach((v) => {
-          if (v.label == '鐩樼偣浠撳簱') {
-            v.options = res.map((item) => {
-              item.label = item.warehouseName;
-              item.value = item.id;
-              return item;
-            });
-          }
-        });
-      });
-      goodsModel().then((res) => {
-        this.items.forEach((v) => {
-          if (v.label == '瑙勬牸鍨嬪彿') {
-            v.options = res.map((item) => {
-              item.label = item.modelName;
-              item.value = item.id;
-              return item;
-            });
-          }
-        });
-      });
-
-    },
     showAudit(row) {
       this.editSetting.id = row.id;
       this.editSetting.info = JSON.stringify(row);

--
Gitblit v1.9.1