haoyahui
2023-11-20 fe618973c04544c0bd169c2c4436ff5807b756f1
admin-web/src/views/stock/inventorycount/inventorytask/index.vue
@@ -42,8 +42,9 @@
import myImport from '@/views/components/myImport';
import { getBaseUrl } from '@/utils/base';
import { selectTenantWarehouse } from '@/api/baseSetting/finsystenant';
import { inventoryListApi } from '@/api/stock/inventory';
import { inventoryListApi,inventoryDel } from '@/api/stock/inventory';
import * as DateFormatter from '@/utils/DateFormatter';
import {mapGetters} from 'vuex'
export default {
  name: 'index',
@@ -154,9 +155,9 @@
        // 列信息
        columns: [
          { title: '盘点单号', field: 'businessFormCode', align: 'left' },
          { title: '任务名称', field: 'businessFormName', align: 'center' },
          { title: '盘点仓库', field: 'warehouseName', align: 'center' },
          { title: '盘点人', field: 'operatorName', align: 'center' },
          { title: '任务名称', field: 'businessFormName', align: 'left' },
          { title: '盘点仓库', field: 'warehouseName', align: 'left' },
          { title: '盘点人', field: 'operatorName', align: 'left' },
          { title: '监盘人', field: 'operatorName2', align: 'left' },
          {
            title: '盘点时间',
@@ -192,17 +193,38 @@
        // 操作信息
        operation: {
          show: true, // 显示操作列
          width: '150', // 列宽
          width: '220', // 列宽
          attr: [
            {
              title: '编辑',
              hidden:(row)=>{
                if(row.states!=0){
                  return true
                }
              },
              events: (row) => {
                this.showAudit(row);
              },
            },
            {
              title: '删除',
              hidden:(row)=>{
                if(row.states!=0){
                  return true
                }
              },
              events: (row) => {
                this.del(row);
              },
            },
            {
              title: '盘点',
              type: 'success',
              hidden:(row)=>{
                if(row.states!=0){
                  return true
                }
              },
              events: (row) => {
                this.showInventory(row);
              },
@@ -222,13 +244,16 @@
      },
    };
  },
  computed:{
    ...mapGetters(['userInfo'])
  },
  created() {
    selectTenantWarehouse().then((res) => {
    selectTenantWarehouse({agencyId: this.userInfo.tenantId}).then((res) => {
      this.items.forEach((v) => {
        if (v.label == '盘点仓库') {
          v.options = res.map((item) => {
            item.label = item.warehouseName;
            item.vlaue = item.id;
            item.value = item.id;
            return item;
          });
        }
@@ -251,9 +276,9 @@
    },
    del(row) {
      this.$modal
        .confirm('是否确认删除名称为"' + row.name + '"的机构吗?')
        .confirm('是否确认删除单号为:' + row.businessFormCode + ' 的数据吗?')
        .then(() => {
          finsystenant.del({ id: row.id }).then((res) => {
          inventoryDel({ id: row.id }).then((res) => {
            this.$message.success('删除成功!');
            this.search();
          });