haoyahui
2023-11-21 13b0bad30ef1df53492cbab1c1b99dfc02dee63f
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, '');
      }