Explorar o código

仓库定义类型还原单选

yijing hai 1 ano
pai
achega
e9414b4639

+ 378 - 414
src/views/warehouseManagement/components/outboundRequisitionDialog.vue

@@ -1,38 +1,20 @@
 <template>
   <div>
-    <el-dialog
-      :title="`选择${type == 1 ? '入库' : '出库'}申请单`"
-      :visible.sync="dialogVisible"
-      width="90%"
-      :before-close="handleClose"
-      :close-on-click-modal="false"
-      :close-on-press-escape="false"
-    >
+    <el-dialog :title="`选择${type == 1 ? '入库' : '出库'}申请单`" :visible.sync="dialogVisible" width="90%"
+      :before-close="handleClose" :close-on-click-modal="false" :close-on-press-escape="false">
       <div v-if="bizType == 10">
-        <ele-pro-table
-          ref="table"
-          :columns="columns10"
-          :datasource="datasource10"
-          cache-key="workOrderTable"
-          @cell-click="cellClick10"
-        >
+        <ele-pro-table ref="table" :columns="columns10" :datasource="datasource10" cache-key="workOrderTable"
+          @cell-click="cellClick10">
           <template v-slot:selection="{ row }">
-            <el-radio class="radio" v-model="currentRow.id" :label="row.id"
-              ><i></i
-            ></el-radio>
+            <el-radio class="radio" v-model="currentRow.id" :label="row.id"><i></i></el-radio>
           </template>
           <template v-slot:requireDeliveryTime="{ row }">
             <span v-if="row.deliveryMethod == 1">{{
               row.requireDeliveryTime
             }}</span>
 
-            <el-link
-              v-if="row.deliveryMethod == 2"
-              type="primary"
-              :underline="false"
-              @click.native="handleMethod(row)"
-              >分批时间</el-link
-            >
+            <el-link v-if="row.deliveryMethod == 2" type="primary" :underline="false"
+              @click.native="handleMethod(row)">分批时间</el-link>
           </template>
 
           <template v-slot:type="{ row }">
@@ -47,43 +29,25 @@
 
           <template v-slot:technicalDrawings="{ row }">
             <div v-if="row.technicalDrawings && row.technicalDrawings?.length">
-              <el-link
-                v-for="link in row.technicalDrawings"
-                :key="link.id"
-                type="primary"
-                :underline="false"
-                @click="downloadFile(link)"
-              >
-                {{ link.name }}</el-link
-              >
+              <el-link v-for="link in row.technicalDrawings" :key="link.id" type="primary" :underline="false"
+                @click="downloadFile(link)">
+                {{ link.name }}</el-link>
             </div>
           </template>
 
           <template v-slot:files="{ row }">
             <div v-if="row.files && row.files?.length">
-              <el-link
-                v-for="link in row.files"
-                :key="link.id"
-                type="primary"
-                :underline="false"
-                @click="downloadFile(link)"
-              >
-                {{ link.name }}</el-link
-              >
+              <el-link v-for="link in row.files" :key="link.id" type="primary" :underline="false"
+                @click="downloadFile(link)">
+                {{ link.name }}</el-link>
             </div>
           </template>
         </ele-pro-table>
       </div>
       <div class="main" v-if="bizType != 10">
         <!-- @cell-click="cellClick" -->
-        <ele-pro-table
-          ref="table"
-          :columns="columns"
-          :datasource="datasource"
-          @select="selectChange"
-          @select-all="changeSelectAll"
-          cache-key="workOrderTable"
-        >
+        <ele-pro-table ref="table" :columns="columns" :datasource="datasource" @select="selectChange"
+          @select-all="changeSelectAll" cache-key="workOrderTable">
           <!-- 表头工具栏 -->
           <!-- <template v-slot:action="{ row }">
             <el-radio class="radio" v-model="currentId" :label="row.id"
@@ -118,413 +82,413 @@
 </template>
 
 <script>
-  import { outputSceneState, sceneState } from '@/utils/dict/index';
-  import storageApi from '@/api/warehouseManagement';
-  import { getCode } from '@/api/codeManagement/index.js';
-  export default {
-    props: {
-      // 1入库 2出库
-      type: {
-        type: String,
-        default: '1'
-      },
-      bizType: {
-        type: String,
-        default: ''
-      }
+import { outputSceneState, sceneState } from '@/utils/dict/index';
+import storageApi from '@/api/warehouseManagement';
+import { getCode } from '@/api/codeManagement/index.js';
+export default {
+  props: {
+    // 1入库 2出库
+    type: {
+      type: String,
+      default: '1'
     },
-    data() {
-      return {
-        outputSceneState,
-        sceneState,
-        dialogVisible: false,
-        currentRow: {},
-        checkRadioData: [],
-        currentId: '',
-        statusOpt: [
-          { label: '待处理', value: 0 },
-          { label: '已处理', value: 1 },
-          { label: '已撤销', value: 2 }
-        ],
-        currentRow10: {}
-      };
-    },
-    computed: {
-      // 表格列配置
-      columns() {
-        return [
-          // {
-          //   action: 'action',
-          //   slot: 'action',
-          //   align: 'center',
-          //   label: '选择'
-          // },
-          {
-            width: 45,
-            type: 'selection',
-            columnKey: 'selection',
-            align: 'center'
-          },
-          {
-            columnKey: 'index',
-            label: '序号',
-            type: 'index',
-            width: 55,
-            align: 'center',
-            showOverflowTooltip: true,
-            fixed: 'left'
-          },
-          {
-            prop: 'code',
-            label: '编码',
-            align: 'center',
-            minWidth: 100
-          },
-          {
-            prop: 'categoryNames',
-            label: '名称',
-            align: 'center'
-          },
-          { label: '型号', prop: 'modelType', width: '150' },
-          { label: '规格', prop: 'specification', width: '150' },
-          { label: '牌号', prop: 'brandNum', width: '100' },
-          {
-            prop: 'sourceType',
-            label: '出入库类型',
-            align: 'center',
-            formatter: (row, column, cellValue) => {
-              switch (this.type) {
-                case '1':
-                  // 入库
-                  return this.sceneState.filter(
-                    (item) => item.code == row.sourceType
-                  )[0].label;
-                case '2':
-                  // 出库
-                  return this.outputSceneState.filter(
-                    (item) => item.code == row.sourceType
-                  )[0].label;
-              }
+    bizType: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      outputSceneState,
+      sceneState,
+      dialogVisible: false,
+      currentRow: {},
+      checkRadioData: [],
+      currentId: '',
+      statusOpt: [
+        { label: '待处理', value: 0 },
+        { label: '已处理', value: 1 },
+        { label: '已撤销', value: 2 }
+      ],
+      currentRow10: {}
+    };
+  },
+  computed: {
+    // 表格列配置
+    columns() {
+      return [
+        // {
+        //   action: 'action',
+        //   slot: 'action',
+        //   align: 'center',
+        //   label: '选择'
+        // },
+        {
+          width: 45,
+          type: 'selection',
+          columnKey: 'selection',
+          align: 'center'
+        },
+        {
+          columnKey: 'index',
+          label: '序号',
+          type: 'index',
+          width: 55,
+          align: 'center',
+          showOverflowTooltip: true,
+          fixed: 'left'
+        },
+        {
+          prop: 'code',
+          label: '编码',
+          align: 'center',
+          minWidth: 100
+        },
+        {
+          prop: 'categoryNames',
+          label: '名称',
+          align: 'center'
+        },
+        { label: '型号', prop: 'modelType', width: '150' },
+        { label: '规格', prop: 'specification', width: '150' },
+        { label: '牌号', prop: 'brandNum', width: '100' },
+        {
+          prop: 'sourceType',
+          label: '出入库类型',
+          align: 'center',
+          formatter: (row, column, cellValue) => {
+            switch (this.type) {
+              case '1':
+                // 入库
+                return this.sceneState.filter(
+                  (item) => item.code == row.sourceType
+                )[0].label;
+              case '2':
+                // 出库
+                return this.outputSceneState.filter(
+                  (item) => item.code == row.sourceType
+                )[0].label;
             }
-          },
-          {
-            prop: 'approvalUserName',
-            label: '审核人',
-            align: 'center'
-          },
-          {
-            prop: 'createUserName',
-            label: '申请人',
-            align: 'center'
-          },
-          {
-            prop: 'createTime',
-            label: '创建时间',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 110
-          },
-          {
-            slot: 'status',
-            label: '状态',
-            align: 'center'
           }
-        ];
-      },
-      columns10() {
-        return [
-          {
-            slot: 'selection',
-            label: '选择',
-            width: 50,
-            align: 'center'
-          },
-          {
-            columnKey: 'index',
-            label: '序号',
-            type: 'index',
-            width: 55,
-            align: 'center',
-            showOverflowTooltip: true,
-            fixed: 'left'
-          },
+        },
+        {
+          prop: 'approvalUserName',
+          label: '审核人',
+          align: 'center'
+        },
+        {
+          prop: 'createUserName',
+          label: '申请人',
+          align: 'center'
+        },
+        {
+          prop: 'createTime',
+          label: '创建时间',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 110
+        },
+        {
+          slot: 'status',
+          label: '状态',
+          align: 'center'
+        }
+      ];
+    },
+    columns10() {
+      return [
+        {
+          slot: 'selection',
+          label: '选择',
+          width: 50,
+          align: 'center'
+        },
+        {
+          columnKey: 'index',
+          label: '序号',
+          type: 'index',
+          width: 55,
+          align: 'center',
+          showOverflowTooltip: true,
+          fixed: 'left'
+        },
 
-          {
-            prop: 'code',
-            label: '委外单编码',
-            align: 'center'
-          },
-          {
-            prop: 'name',
-            label: '委外单名称',
-            align: 'center'
-          },
+        {
+          prop: 'code',
+          label: '委外单编码',
+          align: 'center'
+        },
+        {
+          prop: 'name',
+          label: '委外单名称',
+          align: 'center'
+        },
 
-          {
-            prop: 'workOrderCode',
-            label: '工单编码',
-            align: 'center'
-          },
+        {
+          prop: 'workOrderCode',
+          label: '工单编码',
+          align: 'center'
+        },
 
-          {
-            prop: 'taskName',
-            label: '工序',
-            align: 'center'
-          },
+        {
+          prop: 'taskName',
+          label: '工序',
+          align: 'center'
+        },
 
-          {
-            prop: 'totalCount',
-            label: '委外数量',
-            align: 'center'
-          },
+        {
+          prop: 'totalCount',
+          label: '委外数量',
+          align: 'center'
+        },
 
-          {
-            prop: 'totalWeight',
-            label: '委外重量',
-            align: 'center'
-          },
+        {
+          prop: 'totalWeight',
+          label: '委外重量',
+          align: 'center'
+        },
 
-          {
-            slot: 'type',
-            label: '委外类型',
-            align: 'center'
-          },
+        {
+          slot: 'type',
+          label: '委外类型',
+          align: 'center'
+        },
 
-          {
-            prop: 'remark',
-            label: '备注',
-            align: 'center'
-          },
+        {
+          prop: 'remark',
+          label: '备注',
+          align: 'center'
+        },
 
-          {
-            slot: 'requireDeliveryTime',
-            label: '预计到货日期',
-            align: 'center',
-            minWidth: 70
-          },
+        {
+          slot: 'requireDeliveryTime',
+          label: '预计到货日期',
+          align: 'center',
+          minWidth: 70
+        },
 
-          {
-            prop: 'produceRoutingName',
-            label: '工艺路线',
-            align: 'center'
-          },
+        {
+          prop: 'produceRoutingName',
+          label: '工艺路线',
+          align: 'center'
+        },
 
-          {
-            prop: 'warehouseName',
-            label: '仓库',
-            align: 'center'
-          },
+        {
+          prop: 'warehouseName',
+          label: '仓库',
+          align: 'center'
+        },
 
-          {
-            prop: 'createTime',
-            label: '创建时间',
-            align: 'center',
-            minWidth: 70
-          },
+        {
+          prop: 'createTime',
+          label: '创建时间',
+          align: 'center',
+          minWidth: 70
+        },
 
-          {
-            slot: 'status',
-            label: '状态',
-            align: 'center'
-          },
+        {
+          slot: 'status',
+          label: '状态',
+          align: 'center'
+        },
 
-          {
-            label: '图片附件',
-            slot: 'technicalDrawings',
-            action: 'technicalDrawings',
-            minWidth: 100
-          },
+        {
+          label: '图片附件',
+          slot: 'technicalDrawings',
+          action: 'technicalDrawings',
+          minWidth: 100
+        },
 
-          {
-            label: '附件',
-            slot: 'files',
-            action: 'files',
-            minWidth: 100
-          }
-        ];
-      }
+        {
+          label: '附件',
+          slot: 'files',
+          action: 'files',
+          minWidth: 100
+        }
+      ];
+    }
+  },
+  created() {
+    console.log(this.type, 'this.typethis.typethis.typethis.type')
+  },
+  methods: {
+    /* 表格数据源 */
+    datasource({ page, limit, where }) {
+      return storageApi.getinboundRequestsList({
+        pageNum: page,
+        size: limit,
+        status: 0,
+        type: this.type,
+        ...where
+      });
+    },
+    /* 表格数据源 委外入库 */
+    datasource10({ page, limit, where }) {
+      return storageApi.getApplyoutsource({
+        pageNum: page,
+        size: limit,
+        ...where
+      });
+    },
+    cellClick10(row) {
+      this.currentRow10 = row;
+    },
+    downloadFile(file) {
+      getFile({ objectName: file.storePath }, file.name);
     },
-    methods: {
-      /* 表格数据源 */
-      datasource10({ page, limit, where }) {
-        return storageApi.getApplyoutsource({
-          pageNum: page,
-          size: limit,
-          ...where
-        });
-      },
-      cellClick10(row) {
-        this.currentRow10 = row;
-      },
-      downloadFile(file) {
-        getFile({ objectName: file.storePath }, file.name);
-      },
 
-      handleFlow(row) {
-        this.$refs.flowRef.open(row.processInstanceId);
-      },
+    handleFlow(row) {
+      this.$refs.flowRef.open(row.processInstanceId);
+    },
 
-      handleDetails(row) {
-        this.$refs.detailsRef.open(row);
-      },
+    handleDetails(row) {
+      this.$refs.detailsRef.open(row);
+    },
 
-      handleMethod(row) {
-        this.$refs.timeDialogRef.open(row, 'details');
-      },
+    handleMethod(row) {
+      this.$refs.timeDialogRef.open(row, 'details');
+    },
 
-      handleRelease(row) {
-        this.$refs.releaseRef.open(row);
-      },
-      // 全选
-      changeSelectAll(arr) {
-        console.log('changeSelectAll---------', arr);
-        let isBoolean = arr.every(
-          (item) => arr[0].sourceType == item.sourceType
+    handleRelease(row) {
+      this.$refs.releaseRef.open(row);
+    },
+    // 全选
+    changeSelectAll(arr) {
+      console.log('changeSelectAll---------', arr);
+      let isBoolean = arr.every(
+        (item) => arr[0].sourceType == item.sourceType
+      );
+      if (!isBoolean) {
+        this.checkRadioData = [];
+        this.$refs.table.clearSelection();
+        return this.$message.error(
+          `所选${this.type == 1 ? '入库' : '出库'
+          }申请单出入库类型不一致,请重新选择`
         );
-        if (!isBoolean) {
-          this.checkRadioData = [];
-          this.$refs.table.clearSelection();
+      }
+      if (arr.length != 0) {
+        this.checkRadioData = arr;
+      } else {
+        this.checkRadioData = [];
+      }
+    },
+    selectChange(arr, row) {
+      console.log('selectChange---------', arr);
+      let isBoolean = arr.every(
+        (item) => arr[0].sourceType == item.sourceType
+      );
+      if (!isBoolean) {
+        this.checkRadioData = [];
+        this.$refs.table.clearSelection();
+        return this.$message.error(
+          `所选${this.type == 1 ? '入库' : '出库'
+          }申请单出入库类型不一致,请重新选择`
+        );
+      }
+      if (arr.length != 0) {
+        this.checkRadioData = arr;
+      } else {
+        this.checkRadioData = [];
+      }
+    },
+    handleMine(val) {
+      console.log(val, 'valvalvalvalvalvalvalvalvalvalvalvalvalval确认按钮');
+      console.log(this.bizType, 'this.bizType');
+      if (this.bizType != 10) {
+        let checkRadioData = val ? val : this.checkRadioData;
+        if (checkRadioData.length < 1) {
           return this.$message.error(
-            `所选${
-              this.type == 1 ? '入库' : '出库'
-            }申请单出入库类型不一致,请重新选择`
+            `请选择${this.type == 1 ? '入库' : '出库'}申请单`
           );
         }
-        if (arr.length != 0) {
-          this.checkRadioData = arr;
-        } else {
-          this.checkRadioData = [];
-        }
-      },
-      selectChange(arr, row) {
-        console.log('selectChange---------', arr);
-        let isBoolean = arr.every(
-          (item) => arr[0].sourceType == item.sourceType
+        let isBoolean = checkRadioData.every(
+          (item) => checkRadioData[0].sourceType == item.sourceType
         );
         if (!isBoolean) {
-          this.checkRadioData = [];
-          this.$refs.table.clearSelection();
           return this.$message.error(
-            `所选${
-              this.type == 1 ? '入库' : '出库'
+            `所选${this.type == 1 ? '入库' : '出库'
             }申请单出入库类型不一致,请重新选择`
           );
         }
-        if (arr.length != 0) {
-          this.checkRadioData = arr;
-        } else {
-          this.checkRadioData = [];
-        }
-      },
-      handleMine(val) {
-        console.log(val, 'valvalvalvalvalvalvalvalvalvalvalvalvalval确认按钮');
-        console.log(this.bizType, 'this.bizType');
-        if (this.bizType != 10) {
-          let checkRadioData = val ? val : this.checkRadioData;
-          if (checkRadioData.length < 1) {
-            return this.$message.error(
-              `请选择${this.type == 1 ? '入库' : '出库'}申请单`
-            );
-          }
-          let isBoolean = checkRadioData.every(
-            (item) => checkRadioData[0].sourceType == item.sourceType
-          );
-          if (!isBoolean) {
-            return this.$message.error(
-              `所选${
-                this.type == 1 ? '入库' : '出库'
-              }申请单出入库类型不一致,请重新选择`
-            );
-          }
-          let aaa = checkRadioData.map((item) => item.id);
-          storageApi.getApplystoragedetails(aaa).then(async (res) => {
-            if (this.type == 2) {
-              // 出库
-              let data = await storageApi.getHierarchyFifo({
-                type: 1,
-                builders: res.map((item) => {
-                  return {
-                    categoryId: item.categoryId,
-                    num: item.measureQuantity
-                  };
-                })
-              });
-              if (data?.length > 0) {
-                this.$emit('detailData', data, 1, {
-                  sourceBizNo: checkRadioData
-                    .map((item) => item.code)
-                    .join(','),
-                  bizType: checkRadioData[0].sourceType,
-                  assetType: Array.from(
-                    new Set(res.map((item) => item.rootCategoryLevelId))
-                  ).join(',')
-                });
-                this.dialogVisible = false;
-              } else {
-                this.$message.warning('该出库申请单无库存');
-              }
-            } else {
-              // 入库
-              const batchNo = await getCode('lot_number_code');
-              let data = res.map((item, index) => {
+        let aaa = checkRadioData.map((item) => item.id);
+        storageApi.getApplystoragedetails(aaa).then(async (res) => {
+          if (this.type == 2) {
+            // 出库
+            let data = await storageApi.getHierarchyFifo({
+              type: 1,
+              builders: res.map((item) => {
                 return {
-                  ...item,
-                  index,
-                  packingQuantity: 1,
-                  minPackingQuantity: item.measureQuantity,
-                  measureUnit: item.measuringUnit,
-                  batchNo,
-                  id: '',
-                  warehouseIds: [item.warehouseId],
-                  warehouseNames: [item.warehouseName]
+                  categoryId: item.categoryId,
+                  num: item.measureQuantity
                 };
-              });
-
+              })
+            });
+            if (data?.length > 0) {
               this.$emit('detailData', data, 1, {
-                sourceBizNo: checkRadioData.map((item) => item.code).join(','),
+                sourceBizNo: checkRadioData
+                  .map((item) => item.code)
+                  .join(','),
                 bizType: checkRadioData[0].sourceType,
                 assetType: Array.from(
                   new Set(res.map((item) => item.rootCategoryLevelId))
                 ).join(',')
               });
               this.dialogVisible = false;
+            } else {
+              this.$message.warning('该出库申请单无库存');
             }
-          });
-        } else {
-          console.log(this.currentRow10, '10');
-          this.$emit('detailData', [], 1, {
-            sourceBizNo: this.currentRow10.code,
-            taskId: this.currentRow10.taskId,
-            workOrderId: this.currentRow10.workOrderId
-          });
-          this.dialogVisible = false;
-        }
-      },
-      // 单击获取id
-      cellClick(row) {
-        this.currentRow = row;
-        this.currentId = row.id;
-      },
-      statusFormatter(status) {
-        const obj = this.statusOpt.find((i) => i.value == status);
-        return obj && obj.label;
-      },
-      /* 表格数据源 */
-      datasource({ page, limit, where }) {
-        return storageApi.getinboundRequestsList({
-          pageNum: page,
-          size: limit,
-          status: 0,
-          type: this.type,
-          ...where
+          } else {
+            // 入库
+            const batchNo = await getCode('lot_number_code');
+            let data = res.map((item, index) => {
+              return {
+                ...item,
+                index,
+                packingQuantity: 1,
+                minPackingQuantity: item.measureQuantity,
+                measureUnit: item.measuringUnit,
+                batchNo,
+                id: '',
+                warehouseIds: [item.warehouseId],
+                warehouseNames: [item.warehouseName]
+              };
+            });
+
+            this.$emit('detailData', data, 1, {
+              sourceBizNo: checkRadioData.map((item) => item.code).join(','),
+              bizType: checkRadioData[0].sourceType,
+              assetType: Array.from(
+                new Set(res.map((item) => item.rootCategoryLevelId))
+              ).join(',')
+            });
+            this.dialogVisible = false;
+          }
+        });
+      } else {
+        console.log(this.currentRow10, '10');
+        this.$emit('detailData', [], 1, {
+          sourceBizNo: this.currentRow10.code,
+          taskId: this.currentRow10.taskId,
+          workOrderId: this.currentRow10.workOrderId
         });
-      },
-      open() {
-        this.dialogVisible = true;
-      },
-      handleClose() {
         this.dialogVisible = false;
       }
+    },
+    // 单击获取id
+    cellClick(row) {
+      this.currentRow = row;
+      this.currentId = row.id;
+    },
+    statusFormatter(status) {
+      const obj = this.statusOpt.find((i) => i.value == status);
+      return obj && obj.label;
+    },
+    open() {
+      this.dialogVisible = true;
+    },
+    handleClose() {
+      this.dialogVisible = false;
     }
-  };
+  }
+};
 </script>

+ 498 - 549
src/views/warehouseManagement/stockLedger/components/item-list.vue

@@ -1,34 +1,14 @@
 <template>
   <div class="itemList">
     <!-- 数据表格 -->
-    <item-search
-      @search="reload"
-      ref="refSeavch"
-      :type="type"
-      @handledime="handledime"
-    ></item-search>
-    <ele-pro-table
-      ref="table"
-      class="table"
-      :columns="columns"
-      :datasource="datasource"
-      height="calc(100vh - 325px)"
-      full-height="calc(100vh - 116px)"
-      tool-class="ele-toolbar-form"
-      :pageSize="20"
-      @select="selectChange"
-      @select-all="changeSelectAll"
-    >
+    <item-search @search="reload" ref="refSeavch" :type="type" @handledime="handledime"></item-search>
+    <ele-pro-table ref="table" class="table" :columns="columns" :datasource="datasource" height="calc(100vh - 325px)"
+      full-height="calc(100vh - 116px)" tool-class="ele-toolbar-form" :pageSize="20" @select="selectChange"
+      @select-all="changeSelectAll">
       <!-- 表头工具栏 -->
       <template v-slot:toolbar="{ row }">
-        <el-button
-          v-if="selectedDime == 3"
-          size="small"
-          :disabled="checkRadioData.length == 0"
-          icon="el-icon-set-up"
-          class="ele-btn-icon"
-          @click="allPrinting()"
-        >
+        <el-button v-if="selectedDime == 3" size="small" :disabled="checkRadioData.length == 0" icon="el-icon-set-up"
+          class="ele-btn-icon" @click="allPrinting()">
           打印条码
         </el-button>
         <!-- <el-button
@@ -52,46 +32,14 @@
       <template v-slot:batchNo="{ row }">
         <el-popover placement="right-start" width="800" trigger="hover">
           <el-table :data="row.outInBatchDetailsVOList">
-            <el-table-column
-              width="150"
-              property="bizNo"
-              label="入库单号"
-            ></el-table-column>
-            <el-table-column
-              width="100"
-              property="bizType"
-              label="入库场景"
-            ></el-table-column>
-            <el-table-column
-              width="120"
-              property="count"
-              label="入库数量"
-            ></el-table-column>
-            <el-table-column
-              width="80"
-              property="measuringUnit"
-              label="计量单位"
-            ></el-table-column>
-            <el-table-column
-              width="100"
-              property="packageCount"
-              label="包装数量"
-            ></el-table-column>
-            <el-table-column
-              width="80"
-              property="packingUnit"
-              label="包装单位"
-            ></el-table-column>
-            <el-table-column
-              width="330"
-              property="position"
-              label="库位"
-            ></el-table-column>
-            <el-table-column
-              width="160"
-              property="createTime"
-              label="入库时间"
-            ></el-table-column>
+            <el-table-column width="150" property="bizNo" label="入库单号"></el-table-column>
+            <el-table-column width="100" property="bizType" label="入库场景"></el-table-column>
+            <el-table-column width="120" property="count" label="入库数量"></el-table-column>
+            <el-table-column width="80" property="measuringUnit" label="计量单位"></el-table-column>
+            <el-table-column width="100" property="packageCount" label="包装数量"></el-table-column>
+            <el-table-column width="80" property="packingUnit" label="包装单位"></el-table-column>
+            <el-table-column width="330" property="position" label="库位"></el-table-column>
+            <el-table-column width="160" property="createTime" label="入库时间"></el-table-column>
           </el-table>
           <span slot="reference"> {{ row.batchNo }}</span>
         </el-popover>
@@ -111,25 +59,21 @@
             row.expirationDateUnit == 'year'
               ? '年'
               : row.expirationDateUnit == 'month'
-              ? '月'
-              : '日'
+                ? '月'
+                : '日'
           }}
         </span>
       </template>
       <!-- 质检状态 -->
       <template v-slot:qualityStatus="{ row }">
-        <span v-if="row.qualityResult == 0 || row.qualityResult == 1"
-          >已检</span
-        >
+        <span v-if="row.qualityResult == 0 || row.qualityResult == 1">已检</span>
         <span v-else-if="row.qualityStatus == 1">已检</span>
         <span v-else-if="row.qualityStatus == 0">未检</span>
         <span v-else>-</span>
       </template>
       <!-- 质检结果 -->
       <template v-slot:qualityResult="{ row }">
-        <span v-if="row.qualityResult == 0 || row.qualityResult == ''"
-          >合格</span
-        >
+        <span v-if="row.qualityResult == 0 || row.qualityResult == ''">合格</span>
         <span v-else-if="row.qualityResult == 1">不合格</span>
         <span v-else-if="row.qualityResult == 3">让步接收</span>
         <span v-else>-</span>
@@ -144,525 +88,530 @@
 </template>
 
 <script>
-  import print from '@/components/print/indexMultiple.vue';
-  import allot from './allot.vue';
-  // import print from './print.vue';
-  // import printSr from './printSr.vue';
-  // import printTg from './printTg.vue';
-  import ItemSearch from './item-search.vue';
-  // import {
-  //   getUserPage,
-  //   removePersonnel,
-  //   unbindLoginName
-  // } from '@/api/system/organization';
-  import {
-    pageeLedgerMain,
-    removeItem,
-    getWarehouseList
-  } from '@/api/classifyManage/itemInformation';
-  import barCode from '@/api/main/barCode';
-  import storageApi from '@/api/warehouseManagement';
-  import { getBatchDetails } from '@/api/classifyManage/index';
+import print from '@/components/print/indexMultiple.vue';
+import allot from './allot.vue';
+// import print from './print.vue';
+// import printSr from './printSr.vue';
+// import printTg from './printTg.vue';
+import ItemSearch from './item-search.vue';
+// import {
+//   getUserPage,
+//   removePersonnel,
+//   unbindLoginName
+// } from '@/api/system/organization';
+import {
+  pageeLedgerMain,
+  removeItem,
+  getWarehouseList
+} from '@/api/classifyManage/itemInformation';
+import barCode from '@/api/main/barCode';
+import storageApi from '@/api/warehouseManagement';
+import { getBatchDetails } from '@/api/classifyManage/index';
 
-  export default {
-    components: { ItemSearch, print, allot },
-    props: {
-      // 机构id
-      organizationId: [Number, String],
-      // 全部机构
-      organizationList: Array,
-      current: {
-        type: Object,
-        default: () => ({})
-      },
-      type: {
-        type: String,
-        default: ''
-      }
+export default {
+  components: { ItemSearch, print, allot },
+  props: {
+    // 机构id
+    organizationId: [Number, String],
+    // 全部机构
+    organizationList: Array,
+    current: {
+      type: Object,
+      default: () => ({})
     },
-    data() {
-      return {
-        config: [],
-        openWindows: false,
-        newColumns: [],
-        checkRadioData: [],
-        searchForm: {
-          dimension: '1'
+    type: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      config: [],
+      openWindows: false,
+      newColumns: [],
+      checkRadioData: [],
+      searchForm: {
+        dimension: '1'
+      },
+      selectedDime: '1'
+    };
+  },
+  created() {
+    this.getFieldModel();
+  },
+  computed: {
+    // 表格列配置
+    columns() {
+      // selectedDime 1物品维度 2批次维度 3包装维度 4物料维度
+      let arr = [
+        this.selectedDime == 3
+          ? {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center'
+          }
+          : '',
+        {
+          columnKey: 'index',
+          type: 'index',
+          width: 50,
+          align: 'center',
+          label: '序号',
+          showOverflowTooltip: true,
+          fixed: 'left'
         },
-        selectedDime: '1'
-      };
-    },
-    created() {
-      this.getFieldModel();
-    },
-    computed: {
-      // 表格列配置
-      columns() {
-        // selectedDime 1物品维度 2批次维度 3包装维度 4物料维度
-        let arr = [
-          this.selectedDime == 3
-            ? {
-                width: 45,
-                type: 'selection',
-                columnKey: 'selection',
-                align: 'center'
-              }
-            : '',
-          {
-            columnKey: 'index',
-            type: 'index',
-            width: 50,
-            align: 'center',
-            label: '序号',
-            showOverflowTooltip: true,
-            fixed: 'left'
-          },
-          this.selectedDime != 1
-            ? {
-                prop: 'batchNo',
-                label: '批次号',
-                align: 'center'
-              }
-            : '',
-          {
-            prop: 'categoryCode',
-            label: '物品编码',
-            align: 'center',
-            showOverflowTooltip: true
-          },
-          {
-            slot: 'categoryName',
-            prop: 'categoryName',
-            label: '物品名称',
-            align: 'center',
-            showOverflowTooltip: true,
-            minWidth: 200
-          },
-          this.selectedDime != 1
-            ? {
-                prop: 'inventoryCycle',
-                label: '存货周期(天)',
-                align: 'center',
-                width: 120,
-                showOverflowTooltip: true
-              }
-            : '',
-          {
-            prop: 'brandNum',
-            label: '牌号',
-            align: 'center',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'categoryModel',
-            label: '型号',
-            align: 'center',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'specification',
-            label: '规格',
+        this.selectedDime != 1
+          ? {
+            prop: 'batchNo',
+            label: '批次号',
+            align: 'center'
+          }
+          : '',
+        {
+          prop: 'categoryCode',
+          label: '物品编码',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          slot: 'categoryName',
+          prop: 'categoryName',
+          label: '物品名称',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 200
+        },
+        this.selectedDime != 1
+          ? {
+            prop: 'inventoryCycle',
+            label: '存货周期(天)',
             align: 'center',
+            width: 120,
             showOverflowTooltip: true
-          },
-          this.selectedDime == 2
-            ? {
-                prop: 'supplierName',
-                label: '供应商',
-                showOverflowTooltip: true,
-                width: 130,
-                align: 'center'
-              }
-            : '',
-          {
-            prop: 'level',
-            label: '级别',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'measureQuantity',
-            label: '计量数量',
-            sortable: 'custom',
+          }
+          : '',
+        {
+          prop: 'brandNum',
+          label: '牌号',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'categoryModel',
+          label: '型号',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'specification',
+          label: '规格',
+          align: 'center',
+          showOverflowTooltip: true
+        },
+        this.selectedDime == 2
+          ? {
+            prop: 'supplierName',
+            label: '供应商',
             showOverflowTooltip: true,
             width: 130,
             align: 'center'
-          },
-          // {
-          //   prop: 'supplierName',
-          //   label: '供应商',
-          //   showOverflowTooltip: true,
-          //   width: 130,
-          //   align: 'center'
-          // },
-          {
-            prop: 'measureUnit',
-            label: '计量单位',
-            align: 'center'
-          },
-          {
-            prop: 'weight',
-            label: '重量',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'weightUnit',
-            label: '重量单位',
-            showOverflowTooltip: true
-          },
-          this.selectedDime == 1?
+          }
+          : '',
+        {
+          prop: 'level',
+          label: '级别',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'measureQuantity',
+          label: '计量数量',
+          sortable: 'custom',
+          showOverflowTooltip: true,
+          width: 130,
+          align: 'center'
+        },
+        // {
+        //   prop: 'supplierName',
+        //   label: '供应商',
+        //   showOverflowTooltip: true,
+        //   width: 130,
+        //   align: 'center'
+        // },
+        {
+          prop: 'measureUnit',
+          label: '计量单位',
+          align: 'center'
+        },
+        {
+          prop: 'weight',
+          label: '重量',
+          showOverflowTooltip: true
+        },
+        {
+          prop: 'weightUnit',
+          label: '重量单位',
+          showOverflowTooltip: true
+        },
+        this.selectedDime == 1 ?
           {
             prop: 'secureInventory',
             label: '安全库存',
             showOverflowTooltip: true
-          }:'',
-          this.selectedDime == 1?
+          } : '',
+        this.selectedDime == 1 ?
           {
             prop: 'minInventory',
             label: '最小库存',
             showOverflowTooltip: true
-          }:'', 
-          this.selectedDime == 1?
+          } : '',
+        this.selectedDime == 1 ?
           {
             prop: 'maxInventory',
             label: '最大库存',
             showOverflowTooltip: true
-          }:'',
-          this.selectedDime == 3
-            ? {
-                prop: 'packageNo',
-                label: '包装编码',
-                showOverflowTooltip: true
-              }
-            : '',
-          this.selectedDime == 3
-            ? {
-                prop: 'packingQuantity',
-                label: '包装数量	',
-                showOverflowTooltip: true
-              }
-            : '',
-          this.selectedDime == 3
-            ? {
-                prop: 'packingUnit',
-                label: '包装单位	',
-                showOverflowTooltip: true
-              }
-            : '',
-          this.selectedDime == 3
-            ? {
-                prop: 'warehouseName',
-                label: '仓库	',
-                showOverflowTooltip: true
-              }
-            : '',
-          this.selectedDime == 3
-            ? {
-                prop: 'areaName',
-                label: '货区	',
-                showOverflowTooltip: true
-              }
-            : '',
-          this.selectedDime == 3
-            ? {
-                prop: 'goodsAllocationName',
-                label: '货架',
-                showOverflowTooltip: true
-              }
-            : '',
-          this.selectedDime == 3
-            ? {
-                prop: 'goodsShelfName',
-                label: '货位',
-                showOverflowTooltip: true
-              }
-            : '',
-          this.selectedDime == 3
-            ? {
-                prop: 'productionDate',
-                label: '生产日期',
-                showOverflowTooltip: true
-              }
-            : '',
-          this.selectedDime == 3
-            ? {
-                prop: 'purchaseDate',
-                label: '采购日期',
-                showOverflowTooltip: true
-              }
-            : '',
-          this.selectedDime == 3 || this.selectedDime == 4
-            ? {
-                prop: 'barcodes',
-                label: '发货条码	',
-                showOverflowTooltip: true
-              }
-            : '',
-          this.selectedDime == 3 || this.selectedDime == 4
-            ? {
-                prop: 'clientCode',
-                label: '客户代号',
-                showOverflowTooltip: true
-              }
-            : '',
-          this.selectedDime == 3 || this.selectedDime == 4
-            ? {
-                prop: 'engrave',
-                label: '刻码	',
-                showOverflowTooltip: true
-              }
-            : '',
-          this.selectedDime == 3 || this.selectedDime == 4
-            ? {
-                prop: 'materielDesignation',
-                label: '物料代号',
-                width: 120,
-                showOverflowTooltip: true
-              }
-            : '',
-          this.selectedDime == 3 || this.selectedDime == 4
-            ? {
-                prop: 'supplierCode',
-                label: '供应商代号',
-                width: 120,
+          } : '',
+        this.selectedDime == 3
+          ? {
+            prop: 'packageNo',
+            label: '包装编码',
+            showOverflowTooltip: true
+          }
+          : '',
+        this.selectedDime == 3
+          ? {
+            prop: 'packingQuantity',
+            label: '包装数量	',
+            showOverflowTooltip: true
+          }
+          : '',
+        this.selectedDime == 3
+          ? {
+            prop: 'packingUnit',
+            label: '包装单位	',
+            showOverflowTooltip: true
+          }
+          : '',
+        this.selectedDime == 3
+          ? {
+            prop: 'warehouseName',
+            label: '仓库	',
+            showOverflowTooltip: true
+          }
+          : '',
+        this.selectedDime == 3
+          ? {
+            prop: 'areaName',
+            label: '货区	',
+            showOverflowTooltip: true
+          }
+          : '',
+        this.selectedDime == 3
+          ? {
+            prop: 'goodsAllocationName',
+            label: '货架',
+            showOverflowTooltip: true
+          }
+          : '',
+        this.selectedDime == 3
+          ? {
+            prop: 'goodsShelfName',
+            label: '货位',
+            showOverflowTooltip: true
+          }
+          : '',
+        this.selectedDime == 3
+          ? {
+            prop: 'productionDate',
+            label: '生产日期',
+            showOverflowTooltip: true
+          }
+          : '',
+        this.selectedDime == 3
+          ? {
+            prop: 'purchaseDate',
+            label: '采购日期',
+            showOverflowTooltip: true
+          }
+          : '',
+        this.selectedDime == 3 || this.selectedDime == 4
+          ? {
+            prop: 'barcodes',
+            label: '发货条码	',
+            showOverflowTooltip: true
+          }
+          : '',
+        this.selectedDime == 3 || this.selectedDime == 4
+          ? {
+            prop: 'clientCode',
+            label: '客户代号',
+            showOverflowTooltip: true
+          }
+          : '',
+        this.selectedDime == 3 || this.selectedDime == 4
+          ? {
+            prop: 'engrave',
+            label: '刻码	',
+            showOverflowTooltip: true
+          }
+          : '',
+        this.selectedDime == 3 || this.selectedDime == 4
+          ? {
+            prop: 'materielDesignation',
+            label: '物料代号',
+            width: 120,
+            showOverflowTooltip: true
+          }
+          : '',
+        this.selectedDime == 3 || this.selectedDime == 4
+          ? {
+            prop: 'supplierCode',
+            label: '供应商代号',
+            width: 120,
 
-                showOverflowTooltip: true
-              }
-            : ''
-        ];
-        if (this.selectedDime == 1) {
-          return arr.filter((item) => item != '').concat(this.newColumns);
-        } else {
-          return arr.filter((item) => item != '');
-        }
-      },
-      clientEnvironmentId() {
-        return this.$store.state.user.info.clientEnvironmentId;
+            showOverflowTooltip: true
+          }
+          : '',
+        this.selectedDime != 1 ? {
+          prop: 'provenance',
+          label: '产地',
+          showOverflowTooltip: true
+        } : '',
+      ];
+      if (this.selectedDime == 1) {
+        return arr.filter((item) => item != '').concat(this.newColumns);
+      } else {
+        return arr.filter((item) => item != '');
       }
     },
-    methods: {
-      getFieldModel() {
-        storageApi.fieldModel({ relevance: 't_main_category' }).then((res) => {
-          let newRes = res.map((m) => {
-            return {
-              prop: 'extField.' + m.prop,
-              label: m.label,
-              align: 'center',
-              showOverflowTooltip: true
-            };
-          });
-          this.newColumns = [...newRes];
+    clientEnvironmentId() {
+      return this.$store.state.user.info.clientEnvironmentId;
+    }
+  },
+  methods: {
+    getFieldModel() {
+      storageApi.fieldModel({ relevance: 't_main_category' }).then((res) => {
+        let newRes = res.map((m) => {
+          return {
+            prop: 'extField.' + m.prop,
+            label: m.label,
+            align: 'center',
+            showOverflowTooltip: true
+          };
         });
-      },
-      // 调拨
-      showAllot() {
-        this.$refs.allotRef.open(this.checkRadioData);
-      },
-      // 全选
-      changeSelectAll(arr) {
-        console.log(arr);
-        if (arr.length != 0) {
-          this.checkRadioData = arr;
-        } else {
-          this.checkRadioData = [];
-        }
-      },
-      selectChange(selection, row) {
-        if (selection.length != 0) {
-          this.checkRadioData = selection;
-        } else {
-          this.checkRadioData = [];
-        }
-      },
-      allPrinting() {
-        if (this.checkRadioData?.length > 0) {
-          let params = this.checkRadioData.map((m) => {
-            return {
-              bizId: m.id,
-              qrcodeType: 6
+        this.newColumns = [...newRes];
+      });
+    },
+    // 调拨
+    showAllot() {
+      this.$refs.allotRef.open(this.checkRadioData);
+    },
+    // 全选
+    changeSelectAll(arr) {
+      console.log(arr);
+      if (arr.length != 0) {
+        this.checkRadioData = arr;
+      } else {
+        this.checkRadioData = [];
+      }
+    },
+    selectChange(selection, row) {
+      if (selection.length != 0) {
+        this.checkRadioData = selection;
+      } else {
+        this.checkRadioData = [];
+      }
+    },
+    allPrinting() {
+      if (this.checkRadioData?.length > 0) {
+        let params = this.checkRadioData.map((m) => {
+          return {
+            bizId: m.id,
+            qrcodeType: 6
+          };
+        });
+        barCode.batchBarPrint(params).then((res) => {
+          console.log('--------res---------------');
+          console.log(res);
+          this.config = [];
+          res.map((item, index) => {
+            let obj = {
+              putType: item.putType,
+              sizeWide: item.sizeWide,
+              sizeLong: item.sizeLong,
+              value: this.checkRadioData[index].packageNo + '/6',
+              useModeList: item.useModeList
             };
-          });
-          barCode.batchBarPrint(params).then((res) => {
-            console.log('--------res---------------');
-            console.log(res);
-            this.config = [];
-            res.map((item, index) => {
-              let obj = {
-                putType: item.putType,
-                sizeWide: item.sizeWide,
-                sizeLong: item.sizeLong,
-                value: this.checkRadioData[index].packageNo + '/6',
-                useModeList: item.useModeList
-              };
-              obj.useModeList = obj.useModeList.sort((a, b) => {
-                return a.barAvg.substr(4) - b.barAvg.substr(4);
-              });
-              this.config.push(obj);
+            obj.useModeList = obj.useModeList.sort((a, b) => {
+              return a.barAvg.substr(4) - b.barAvg.substr(4);
             });
-            console.log('this.config--------', this.config);
-            this.openWindows = true;
+            this.config.push(obj);
           });
-        } else {
-          return this.$message.warning('请选择要打印的数据!');
-        }
+          console.log('this.config--------', this.config);
+          this.openWindows = true;
+        });
+      } else {
+        return this.$message.warning('请选择要打印的数据!');
+      }
 
-        // if (this.clientEnvironmentId == 2) {
-        //   this.$refs.printSrRef.open(this.checkRadioData);
-        // } else if (this.clientEnvironmentId == 3) {
-        //   this.$refs.printTgRef.open(this.checkRadioData);
-        // } else {
-        //   this.$refs.printRef.open(this.checkRadioData);
-        // }
-      },
-      handledime(val) {
-        console.log(val, 'val');
-        this.selectedDime = val;
-        this.reload();
-      },
-      /* 表格数据源 */
-      datasource({ page, limit, where, order }) {
-        console.log('this.selectedDime-----------', this.selectedDime);
-        const dimension = this.$refs.refSeavch.dimension;
-        console.log('this.dimension-----------', dimension);
-        const treeId = this.$parent.$parent.$parent.current.id;
-        if (dimension == 1) {
-          // 物品维度
-          const data = storageApi.getProductList({
-            ...where,
-            ...order,
-            pageNum: page,
-            size: limit
-          });
-          return data;
-        } else if (dimension == 2) {
-          // 批次维度
-          const params = {
+      // if (this.clientEnvironmentId == 2) {
+      //   this.$refs.printSrRef.open(this.checkRadioData);
+      // } else if (this.clientEnvironmentId == 3) {
+      //   this.$refs.printTgRef.open(this.checkRadioData);
+      // } else {
+      //   this.$refs.printRef.open(this.checkRadioData);
+      // }
+    },
+    handledime(val) {
+      console.log(val, 'val');
+      this.selectedDime = val;
+      this.reload();
+    },
+    /* 表格数据源 */
+    datasource({ page, limit, where, order }) {
+      console.log('this.selectedDime-----------', this.selectedDime);
+      const dimension = this.$refs.refSeavch.dimension;
+      console.log('this.dimension-----------', dimension);
+      const treeId = this.$parent.$parent.$parent.current.id;
+      if (dimension == 1) {
+        // 物品维度
+        const data = storageApi.getProductList({
+          ...where,
+          ...order,
+          pageNum: page,
+          size: limit
+        });
+        return data;
+      } else if (dimension == 2) {
+        // 批次维度
+        const params = {
+          categoryLevelId: treeId,
+          ...where,
+          ...order
+        };
+        const data = storageApi.getBatchList({
+          ...params,
+          pageNum: page,
+          size: limit
+        });
+        return data;
+      } else if (dimension == 4) {
+        // 物料维度
+        const params = {
+          categoryLevelId: treeId,
+          ...where,
+          ...order
+        };
+        const data = storageApi.getMaterialList({
+          ...params,
+          pageNum: page,
+          size: limit
+        });
+        return data;
+      } else {
+        // 包装维度
+        let params = {};
+        if (this.type === 'products') {
+          params = {
             categoryLevelId: treeId,
             ...where,
             ...order
           };
-          const data = storageApi.getBatchList({
-            ...params,
-            pageNum: page,
-            size: limit
-          });
-          return data;
-        } else if (dimension == 4) {
-          // 物料维度
-          const params = {
-            categoryLevelId: treeId,
+        } else {
+          console.log('this.current----', this.current.data);
+          params = {
+            warehouseId:
+              this.current.data?.level == 0 ? this.current.data.id : '',
+            warehouseAreaId:
+              this.current.data?.level == 1 ? this.current.data.id : '',
+            warehouseAreaGoodsId:
+              this.current.data?.level == 2 ? this.current.data.id : '',
+            warehouseAreaGoodsShelvesId:
+              this.current.data?.level == 3 ? this.current.data.id : '',
             ...where,
             ...order
           };
-          const data = storageApi.getMaterialList({
-            ...params,
-            pageNum: page,
-            size: limit
-          });
-          return data;
+        }
+        const data = storageApi.getPackingList({
+          ...params,
+          pageNum: page,
+          size: limit
+        });
+        return data;
+      }
+    },
+    /* 刷新表格 */
+    reload(where) {
+      this.$nextTick(() => {
+        console.log('this.current----', this.current);
+        let params = {};
+        if (this.type === 'products') {
+          params = {
+            ...where,
+            categoryLevelId: this.current.data?.id || this.current?.id
+          };
         } else {
-          // 包装维度
-          let params = {};
-          if (this.type === 'products') {
-            params = {
-              categoryLevelId: treeId,
-              ...where,
-              ...order
-            };
-          } else {
-            console.log('this.current----', this.current.data);
-            params = {
-              warehouseId:
-                this.current.data?.level == 0 ? this.current.data.id : '',
-              warehouseAreaId:
-                this.current.data?.level == 1 ? this.current.data.id : '',
-              warehouseAreaGoodsId:
-                this.current.data?.level == 2 ? this.current.data.id : '',
-              warehouseAreaGoodsShelvesId:
-                this.current.data?.level == 3 ? this.current.data.id : '',
-              ...where,
-              ...order
-            };
-          }
-          const data = storageApi.getPackingList({
-            ...params,
-            pageNum: page,
-            size: limit
-          });
-          return data;
+          params = {
+            ...where,
+            warehouseId:
+              this.current.data?.level == 0 ? this.current.data.id : '',
+            warehouseAreaId:
+              this.current.data?.level == 1 ? this.current.data.id : '',
+            warehouseAreaGoodsId:
+              this.current.data?.level == 2 ? this.current.data.id : ''
+          };
         }
-      },
-      /* 刷新表格 */
-      reload(where) {
-        this.$nextTick(() => {
-          console.log('this.current----', this.current);
-          let params = {};
-          if (this.type === 'products') {
-            params = {
-              ...where,
-              categoryLevelId: this.current.data?.id || this.current?.id
-            };
-          } else {
-            params = {
-              ...where,
-              warehouseId:
-                this.current.data?.level == 0 ? this.current.data.id : '',
-              warehouseAreaId:
-                this.current.data?.level == 1 ? this.current.data.id : '',
-              warehouseAreaGoodsId:
-                this.current.data?.level == 2 ? this.current.data.id : ''
-            };
-          }
-          this.$refs.table.reload({
-            pageNum: 1,
-            where: params
-          });
+        this.$refs.table.reload({
+          pageNum: 1,
+          where: params
         });
-      },
+      });
+    },
 
-      details(row) {
-        const key = Date.now();
-        this.$store.commit('stockManagement/CLEAR_BASEINFO');
-        this.$store.commit('stockManagement/CHANGE_BASEINFO', {
-          key,
-          value: row
-        });
+    details(row) {
+      const key = Date.now();
+      this.$store.commit('stockManagement/CLEAR_BASEINFO');
+      this.$store.commit('stockManagement/CHANGE_BASEINFO', {
+        key,
+        value: row
+      });
 
-        const url =
-          this.$refs.refSeavch.dimension == 1
-            ? '/warehouseManagement/stockLedger/allBatchDetails'
-            : '/warehouseManagement/stockLedger/batchDetails';
+      const url =
+        this.$refs.refSeavch.dimension == 1
+          ? '/warehouseManagement/stockLedger/allBatchDetails'
+          : '/warehouseManagement/stockLedger/batchDetails';
 
-        this.$router.push({
-          path: url,
-          query: {
-            key,
-            dimension: this.$refs.refSeavch.dimension,
-            // id: this.$refs.refSeavch.dimension != 3 ? row.id : row.categoryId,
-            id: row.categoryId,
-            assetId: row.assetId,
-            batchNo: row.batchNo
-          }
-        });
+      this.$router.push({
+        path: url,
+        query: {
+          key,
+          dimension: this.$refs.refSeavch.dimension,
+          // id: this.$refs.refSeavch.dimension != 3 ? row.id : row.categoryId,
+          id: row.categoryId,
+          assetId: row.assetId,
+          batchNo: row.batchNo
+        }
+      });
+    }
+  },
+
+  watch: {
+    // 监听机构id变化
+    current: {
+      handler() {
+        this.reload();
       }
     },
-
-    watch: {
-      // 监听机构id变化
-      current: {
-        handler() {
-          this.reload();
-        }
-      },
-      type: {
-        handler() {
-          if (this.type === 'warehouse') {
-            this.selectedDime = '3';
-          } else {
-            this.selectedDime = '1';
-          }
-          this.reload();
+    type: {
+      handler() {
+        if (this.type === 'warehouse') {
+          this.selectedDime = '3';
+        } else {
+          this.selectedDime = '1';
         }
+        this.reload();
       }
     }
-  };
+  }
+};
 </script>

+ 2 - 1
src/views/warehouseManagement/warehouseDefinition/components/WarehouseEdit.vue

@@ -13,7 +13,7 @@
           clearable
           v-model="formData.inventoryType"
         /> -->
-        <el-select multiple filterable size="small" class="w100" v-model="formData.inventoryType" placeholder="请选择"
+        <el-select filterable size="small" class="w100" v-model="formData.inventoryType" placeholder="请选择"
           @visible-change="changeInventoryType">
           <el-option v-for="item in inventoryTypeList" :key="item.id" :label="item.name" :value="item.id">
           </el-option>
@@ -321,6 +321,7 @@ export default {
       // this.$forceUpdate();
     },
     changeLocation(val) {
+      console.log(val, '1')
       this.$set(this.formData, 'province', val[0]); //省
       this.$set(this.formData, 'city', val[1]); //市
       this.$set(this.formData, 'area', val[2]); //区