From aef2a705884dbb25b24d23fc886c563327f4753e Mon Sep 17 00:00:00 2001
From: 石广澎 <shiguangpeng@163.com>
Date: 星期一, 27 十一月 2023 17:34:07 +0800
Subject: [PATCH] feat:

---
 admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue |  184 ++++++++++++++++++++++++---------------------
 1 files changed, 97 insertions(+), 87 deletions(-)

diff --git a/admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue b/admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue
index 27f95d1..2ba53aa 100644
--- a/admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue
+++ b/admin-web/src/views/stock/inventorycount/exceptionDetails/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>
@@ -23,15 +23,12 @@
 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 { getBaseUrl } from '@/utils/base';
-import { mapGetters } from 'vuex';
-import { selectTenantWarehouse,goodsModel } from '@/api/baseSetting/finsystenant';
-import { getDicts } from '@/api/system/dict/data';
+import {mapGetters} from 'vuex';
+import * as DateFormatter from '@/utils/DateFormatter';
 
 export default {
   name: 'index',
-  components: { MyButton, MyTableV2 },
+  components: {MyButton, MyTableV2},
   data() {
     return {
       // 鎼滅储妗�
@@ -41,7 +38,7 @@
           dataIndex: 'agencyId',
           label: '鏈烘瀯',
           placeholder: '璇烽�夋嫨',
-          optionsConfig: { url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null },
+          optionsConfig: {url: '/pc/fin/sys/tenant/select/tree_fin_tenant', props: null},
           defaultValue: '',
           options: [],
         },
@@ -52,21 +49,38 @@
           placeholder: '璇烽�夋嫨',
           defaultValue: '',
           options: [],
-        },
-        {
-          type: 'text',
-          dataIndex: 'name',
-          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 +88,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,40 +109,44 @@
           label: '鍑哄叆搴撶被鍨�',
           placeholder: '璇烽�夋嫨',
           defaultValue: '',
-          options: [{
-            label:'鍏ㄩ儴',
-            value:''
-          },{
-            label:'鐩樼泩鍏ュ簱',
-            value:'1'
-          },{
-            label:'鐩樹簭鍑哄簱',
-            value:'2'
-          }],
+          options: [
+            {
+              label: '鍏ㄩ儴',
+              value: '',
+            },
+            {
+              label: '鐩樼泩鍏ュ簱',
+              value: '1',
+            },
+            {
+              label: '鐩樹簭鍑哄簱',
+              value: '2',
+            },
+          ],
         },
         {
           type: 'text',
-          dataIndex: 'name',
+          dataIndex: 'businessFormCode',
           label: '鍗曞彿',
           placeholder: '璇疯緭鍏�',
           defaultValue: '',
         },
         {
           type: 'text',
-          dataIndex: 'name',
+          dataIndex: 'operatorName',
           label: '鎿嶄綔浜�',
           placeholder: '璇疯緭鍏�',
           defaultValue: '',
         },
         {
           type: 'date-picker',
-          dataIndex: 'incomeTimeStart',
+          dataIndex: 'startTime',
           label: '鏃堕棿',
           defaultValue: '',
         },
         {
           type: 'date-picker',
-          dataIndex: 'incomeTimeEnd',
+          dataIndex: 'endTime',
           label: '鑷�',
           defaultValue: '',
         },
@@ -132,17 +154,12 @@
       // 鏍戞暟鎹�
       treeDataList: [],
       // 鎼滅储鏉′欢
-      filterFrom: {
-        tenantId: null,
-        userName: null,
-        userPhone: null,
-        status: 1,
-      },
+      filterFrom: {},
       // 琛ㄦ牸鏁版嵁
       table: {
         showIndex: true, // 鏄惁鏄剧ず搴忓彿
         expand: false, // 鏄惁鏄剧ず璇︽儏鏁版嵁
-        url: SettingIplatform.apiBaseURL + '/pc/fin/sys/tenant/select/list', // 璇锋眰鍦板潃
+        url: SettingIplatform.apiBaseURL + '/pc/l/wh/form/inventory/list/PdDetail', // 璇锋眰鍦板潃
         // 宸ュ叿鏉�
         tools: {
           columnsCtrl: {
@@ -158,18 +175,37 @@
         },
         // 鍒椾俊鎭�
         columns: [
-          { title: '浠撳簱', field: 'name', align: 'left' },
-          { title: '鐗╁搧鍚嶇О', field: 'WAREHOUSE_NAME', 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: 'summary', align: 'left' },
-          { title: '鎿嶄綔浜�', field: 'summary', align: 'left' },
-          { title: '鎿嶄綔鏃堕棿', field: 'summary', align: 'left' },
+          {title: '浠撳簱', field: 'warehouseName', align: 'left', width: 140},
+          {title: '鐗╁搧鍚嶇О', field: 'goodsTemplateName', align: 'left', minWidth: 130},
+          {title: '瑙勬牸鍨嬪彿', field: 'baseGoodsModelsName', align: 'left', width: 120},
+          {title: '绫诲瀷', field: 'inventoryResultType', align: 'center'},
+          {title: '搴撳瓨鏁伴噺', field: 'initCounts', align: 'left'},
+          {title: '鐩樼偣鏁伴噺', field: 'inventoryCounts', align: 'left'},
+          {title: '寮傚父鏁伴噺', field: 'errorCounts', align: 'left'},
+          {
+            title: '鍑哄叆搴撶被鍨�',
+            field: 'inventoryType',
+            align: 'center',
+            width: 100,
+            formatter: (row) => {
+              return {
+                value: row.inventoryType,
+                type: row.inventoryType && row.inventoryType.includes('鐩樼泩') ? 'success' : 'danger'
+              };
+            },
+          },
+          {title: '鍑哄叆搴撳崟鍙�', field: 'warehouseFormCode', align: 'center', width: 130},
+          {title: '鏈烘瀯', field: 'agencyName', align: 'left', width: 130},
+          {title: '鎿嶄綔浜�', field: 'operatorName', align: 'center', width: 90},
+          {
+            title: '鎿嶄綔鏃堕棿',
+            field: 'operatorTime',
+            align: 'center',
+            width: 160,
+            formatter: (row) => {
+              return {value: row.operatorTime ? DateFormatter.LongToDateTime(row.operatorTime) : '-'};
+            },
+          },
         ],
         // 鎿嶄綔淇℃伅
         operation: {
@@ -195,34 +231,8 @@
     ...mapGetters(['userInfo']),
   },
   created() {
-    this.initQuery();
   },
   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