From 13b0bad30ef1df53492cbab1c1b99dfc02dee63f Mon Sep 17 00:00:00 2001
From: haoyahui <2032914783@qq.com>
Date: 星期二, 21 十一月 2023 17:51:16 +0800
Subject: [PATCH] 台账管理,盘点任务开发

---
 admin-web/src/views/stock/inventorycount/inventorytask/index.vue |   73 +++++++++++++++++++++++++++++-------
 1 files changed, 58 insertions(+), 15 deletions(-)

diff --git a/admin-web/src/views/stock/inventorycount/inventorytask/index.vue b/admin-web/src/views/stock/inventorycount/inventorytask/index.vue
index dbe6bdf..c137a58 100644
--- a/admin-web/src/views/stock/inventorycount/inventorytask/index.vue
+++ b/admin-web/src/views/stock/inventorycount/inventorytask/index.vue
@@ -42,9 +42,9 @@
 import myImport from '@/views/components/myImport';
 import { getBaseUrl } from '@/utils/base';
 import { selectTenantWarehouse } from '@/api/baseSetting/finsystenant';
-import { inventoryListApi,inventoryDel } from '@/api/stock/inventory';
+import { inventoryListApi, inventoryDel } from '@/api/stock/inventory';
 import * as DateFormatter from '@/utils/DateFormatter';
-import {mapGetters} from 'vuex'
+import { mapGetters } from 'vuex';
 
 export default {
   name: 'index',
@@ -193,13 +193,14 @@
         // 鎿嶄綔淇℃伅
         operation: {
           show: true, // 鏄剧ず鎿嶄綔鍒�
+          align: 'left',
           width: '220', // 鍒楀
           attr: [
             {
               title: '缂栬緫',
-              hidden:(row)=>{
-                if(row.states!=0){
-                  return true
+              hidden: (row) => {
+                if (row.states != 0) {
+                  return true;
                 }
               },
               events: (row) => {
@@ -208,9 +209,9 @@
             },
             {
               title: '鍒犻櫎',
-              hidden:(row)=>{
-                if(row.states!=0){
-                  return true
+              hidden: (row) => {
+                if (row.states != 0) {
+                  return true;
                 }
               },
               events: (row) => {
@@ -220,13 +221,49 @@
             {
               title: '鐩樼偣',
               type: 'success',
-              hidden:(row)=>{
-                if(row.states!=0){
-                  return true
+              hidden: (row) => {
+                if (row.states != 0) {
+                  return true;
                 }
               },
               events: (row) => {
                 this.showInventory(row);
+              },
+            },
+            {
+              title: '缁х画鐩樼偣',
+              type: 'success',
+              hidden: (row) => {
+                if (row.states != 1) {
+                  return true;
+                }
+              },
+              events: (row) => {
+                this.showInventory(row);
+              },
+            },
+            {
+              title: '鐩樼偣璇︽儏',
+              type: 'info',
+              hidden: (row) => {
+                if (row.states != 2) {
+                  return true;
+                }
+              },
+              events: (row) => {
+                this.showInventoryDetail(row);
+              },
+            },
+            {
+              title: '鐢熶骇鐩樼偣琛�',
+              type: 'primary',
+              hidden: (row) => {
+                if (row.states != 2) {
+                  return true;
+                }
+              },
+              events: (row) => {
+                this.showInventoryDetail(row);
               },
             },
           ],
@@ -244,11 +281,11 @@
       },
     };
   },
-  computed:{
-    ...mapGetters(['userInfo'])
+  computed: {
+    ...mapGetters(['userInfo']),
   },
   created() {
-    selectTenantWarehouse({agencyId: this.userInfo.tenantId}).then((res) => {
+    selectTenantWarehouse({ agencyId: this.userInfo.tenantId }).then((res) => {
       this.items.forEach((v) => {
         if (v.label == '鐩樼偣浠撳簱') {
           v.options = res.map((item) => {
@@ -304,6 +341,12 @@
       this.inventorySetting.title = '鐩樼偣';
       this.inventorySetting.show = true;
     },
+    showInventoryDetail(row) {
+      this.inventorySetting.id = row.id;
+      this.inventorySetting.info = JSON.stringify(row);
+      this.inventorySetting.title = '鐩樼偣';
+      this.inventorySetting.show = true;
+    },
     // 鏌ヨtable鍒楄〃
     search(pageNum) {
       if (pageNum != undefined) {
@@ -314,7 +357,7 @@
     },
     fifterForm(params) {
       this.filterFrom = Object.assign(this.filterFrom, params);
-      
+
       if (this.filterFrom.startTime) {
         this.filterFrom.startTime = this.filterFrom.startTime.replace(/\-/g, '');
       }

--
Gitblit v1.9.1