695593266@qq.com 11 месяцев назад
Родитель
Сommit
ef4acc524f

+ 1136 - 0
src/views/pick/pickApply/components/newPickingList.vue

@@ -0,0 +1,1136 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="visible"
+    v-if="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    append-to-body
+    width="75%"
+  >
+    <el-card shadow="never">
+      <pickingListSearch
+        @search="reload"
+        ref="searchRef"
+        @handledime="handledime"
+      />
+
+      <ele-split-layout
+        width="244px"
+        allow-collapse
+        :right-style="{ overflow: 'hidden' }"
+      >
+        <div class="ele-border-lighter split-layout-right-content">
+          <AssetTree
+            ref="assetTreeRef"
+            :treeIds="treeIds"
+            @handleNodeClick="handleNodeClick"
+            @setRootId="setRootId"
+          />
+        </div>
+        <!-- 表格 -->
+
+        <template v-slot:content>
+          <ele-pro-table
+            :initLoad="false"
+            ref="table"
+            :columns="columns"
+            :datasource="datasource"
+            :selection.sync="selection"
+            row-key="id"
+            height="calc(100vh - 350px)"
+            class="dict-table"
+            :cache-key="tableKey"
+            :row-style="rowStyle"
+            :row-click-checked="true"
+            :row-click-checked-intelligent="false"
+            @update:selection="handleSelectionChange"
+          >
+            <template v-slot:toolbar>
+              <el-alert
+                type="info"
+                :closable="false"
+                class="ele-alert-border"
+                style="width: 300px"
+              >
+                <i class="el-icon-info ele-text-info"></i>
+                <span class="ele-text">
+                  <span>
+                    已选择
+                    <b class="ele-text-info">{{ allSelection.length }}</b>
+                    项数据<em></em>
+                  </span>
+                </span>
+                <el-link type="primary" :underline="false" @click="clearChoose">
+                  清空
+                </el-link>
+              </el-alert>
+            </template>
+
+            <!-- <template v-slot:code="{ row }">
+              {{ row.rootCategoryLevelId == 4 ? row.codeNumber : row.code }}
+            </template> -->
+
+            <template v-slot:runStatus="{ row }">
+              {{ stateList[Number(row.runStatus)] }}
+            </template>
+
+            <template v-slot:vehicleLen="{ row }">
+              {{ row.extInfo.vehicleLen || '-' }}
+              {{ row.extInfo.wilde || '-' }} {{ row.extInfo.hight || '-' }}
+            </template>
+
+            <template v-slot:status="{ row }">
+              <span
+                :style="{ color: row.status == 0 ? '#157A2C' : '#FFA929' }"
+                >{{
+                  row.status == 0 ? '空闲' : row.status == 1 ? '占用' : ''
+                }}</span
+              >
+            </template>
+
+            <template v-slot:packingCountBase="{ row }">
+              {{ row.packingCountBase }} {{ row.minUnit }}
+            </template>
+
+            <template v-slot:measureQuantity="{ row }">
+              {{ row.measureQuantity }} {{ row.measureUnit }}
+            </template>
+
+            <template v-slot:weight="{ row }">
+              {{ row.weight }} {{ row.weightUnit }}
+            </template>
+
+            <!-- 库存保质期 -->
+            <template v-slot:expirationDate="{ row }">
+              <span v-if="row.expirationDate">
+                {{ row.expirationDate ? row.expirationDate : '-' }}
+                {{
+                  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-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-else-if="row.qualityResult == 1">不合格</span>
+              <span v-else-if="row.qualityResult == 3">让步接收</span>
+              <span v-else>-</span>
+            </template>
+          </ele-pro-table>
+        </template>
+      </ele-split-layout>
+    </el-card>
+
+    <div class="btns">
+      <el-button type="primary" size="small" @click="selected">选择</el-button>
+      <el-button size="small" @click="handleClose">关闭</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+  import AssetTree from '@/views/produce/components/assetTree.vue';
+  import pickingListSearch from './newPickingListSearch.vue';
+  import {
+    pageeLedgerMain,
+    assetPage,
+    listInProduct
+  } from '@/api/produce/workOrder';
+  import storageApi from '@/api/warehouseManagement';
+
+  // import { deepCopy } from '@/utils/util.js';
+
+  import { getOutindetailtwo } from '@/api/produce/picking';
+
+  export default {
+    components: { AssetTree, pickingListSearch },
+    props: {
+      isType: {
+        type: String,
+        default: '',
+        required: true
+      }
+    },
+    data() {
+      return {
+        visible: false,
+
+        id: null,
+        treeIds: null,
+        categoryLevelId: null,
+        rootCategoryLevelId: null,
+        isCategory: true,
+
+        stateList: [
+          '启动',
+          '空闲',
+          '运行',
+          '故障',
+          '检修',
+          '停机',
+          '待料',
+          '占用'
+        ],
+
+        selection: [],
+
+        allSelection: [],
+        temporaryList: [],
+        // cloumsAll: [
+        //   {
+        //     width: 45,
+        //     type: 'selection',
+        //     columnKey: 'selection',
+        //     align: 'center',
+        //     reserveSelection: true
+        //   },
+        //   {
+        //     columnKey: 'index',
+        //     label: '序号',
+        //     type: 'index',
+        //     width: 50,
+        //     align: 'center'
+        //   },
+        //   {
+        //     prop: 'code',
+        //     label: '物品编码',
+        //     slot: 'code'
+        //   },
+        //   {
+        //     prop: 'codeNumber',
+        //     label: '编号',
+        //     showOverflowTooltip: true
+        //   },
+        //   {
+        //     prop: 'name',
+        //     label: '名称',
+        //     showOverflowTooltip: true
+        //   },
+        //   {
+        //     prop: 'brandNum',
+        //     label: '牌号',
+        //     showOverflowTooltip: true
+        //   },
+        //   {
+        //     prop: 'specification',
+        //     label: '规格',
+        //     showOverflowTooltip: true
+        //   },
+        //   {
+        //     prop: 'modelType',
+        //     label: '型号',
+        //     showOverflowTooltip: true
+        //   },
+
+        //   {
+        //     prop: 'batchNo',
+        //     label: '批次号',
+        //     align: 'center'
+        //   },
+        //   // {
+        //   //   prop: 'manualBatchNo',
+        //   //   label: '批次号',
+        //   //   align: 'center'
+        //   // },
+        //   {
+        //     prop: 'availableCountBase',
+        //     label: '计量库存数量',
+        //     sortable: 'custom',
+        //     slot: 'availableCountBase',
+        //     showOverflowTooltip: true,
+        //     width: 130,
+        //     align: 'center'
+        //   },
+
+        //   ...([1, 23, 8].includes(Number(this.rootCategoryLevelId))
+        //     ? [
+        //         {
+        //           prop: 'packingCountBase',
+        //           label: '包装库存',
+        //           slot: 'packingCountBase',
+        //           showOverflowTooltip: true
+        //         }
+        //       ]
+        //     : []),
+
+        //   {
+        //     prop: 'weight',
+        //     label: '重量',
+        //     showOverflowTooltip: true,
+        //     slot: 'weight'
+        //   },
+
+        //   {
+        //     prop: 'expirationDate',
+        //     slot: 'expirationDate',
+        //     label: '库存保质期',
+        //     width: 100
+        //   },
+        //   {
+        //     prop: 'expirationTime',
+        //     label: '周期倒计时',
+        //     showOverflowTooltip: true,
+        //     width: 100
+        //   },
+        //   {
+        //     prop: 'qualityResult',
+        //     slot: 'qualityResult',
+        //     label: '质检结果',
+        //     showOverflowTooltip: true,
+        //     width: 100
+        //   },
+        //   {
+        //     prop: 'qualityStatus',
+        //     slot: 'qualityStatus',
+        //     label: '质检状态',
+        //     showOverflowTooltip: true,
+        //     width: 100
+        //   },
+        //   {
+        //     prop: 'pathName',
+        //     width: 230,
+        //     label: '仓库',
+        //     showOverflowTooltip: true
+        //   },
+
+        //   ...(this.rootCategoryLevelId == '4'
+        //     ? [
+        //         {
+        //           prop: 'workstationName',
+        //           label: '工位',
+        //           showOverflowTooltip: true
+        //         },
+
+        //         {
+        //           prop: 'runStatus',
+        //           label: '状态',
+        //           slot: 'runStatus',
+        //           showOverflowTooltip: true
+        //         }
+        //       ]
+        //     : []),
+
+        //   // ...(this.rootCategoryLevelId == '5'
+        //   //   ? [
+        //   //       {
+        //   //         prop: 'dieHoleNum',
+        //   //         label: '模孔数量',
+        //   //         showOverflowTooltip: true
+        //   //       },
+        //   //       {
+        //   //         prop: 'mandrelDiameter',
+        //   //         label: '芯棒直径',
+        //   //         showOverflowTooltip: true
+        //   //       },
+        //   //       {
+        //   //         prop: 'shrinkEffictive',
+        //   //         label: '收缩系数',
+        //   //         showOverflowTooltip: true
+        //   //       }
+        //   //     ]
+        //   //   : []),
+
+        //   // ...(this.rootCategoryLevelId == '7'
+        //   //   ? [
+        //   //       {
+        //   //         prop: 'materialQuality',
+        //   //         label: '材质',
+        //   //         showOverflowTooltip: true
+        //   //       },
+
+        //   //       {
+        //   //         prop: 'vehicleLen',
+        //   //         label: '长宽高',
+        //   //         slot: 'vehicleLen',
+        //   //         showOverflowTooltip: true
+        //   //       }
+        //   //     ]
+        //   //   : []),
+
+        //   ...(this.rootCategoryLevelId == '8'
+        //     ? [
+        //         {
+        //           prop: 'extInfo.slotNum',
+        //           label: '槽数',
+        //           showOverflowTooltip: true
+        //         }
+        //       ]
+        //     : []),
+
+        //   ...(this.rootCategoryLevelId == '11'
+        //     ? [
+        //         {
+        //           prop: 'status',
+        //           label: '状态',
+        //           slot: 'status',
+        //           showOverflowTooltip: true
+        //         },
+
+        //         {
+        //           prop: 'region',
+        //           label: '位置',
+        //           showOverflowTooltip: true
+        //         }
+        //       ]
+        //     : [])
+        // ]
+
+        cloumsAll: [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center',
+            reserveSelection: true
+          },
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 50,
+            align: 'center'
+          },
+          {
+            prop: 'categoryCode',
+            label: '物品编码'
+          },
+          {
+            prop: 'codeNumber',
+            label: '编号',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'categoryName',
+            label: '名称',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'brandNum',
+            label: '牌号',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'specification',
+            label: '规格',
+            showOverflowTooltip: true
+          },
+          // {
+          //   prop: 'modelType',
+          //   label: '型号',
+          //   showOverflowTooltip: true
+          // },
+          {
+            prop: 'categoryModel',
+            label: '型号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+          {
+            prop: 'batchNo',
+            label: '批次号',
+            align: 'center'
+          },
+          // {
+          //   prop: 'manualBatchNo',
+          //   label: '批次号',
+          //   align: 'center'
+          // },
+          {
+            prop: 'measureQuantity',
+            label: '计量库存数量',
+            sortable: 'custom',
+            slot: 'measureQuantity',
+            showOverflowTooltip: true,
+            width: 130,
+            align: 'center'
+          },
+
+          ...([1, 23, 8].includes(Number(this.rootCategoryLevelId))
+            ? [
+                {
+                  prop: 'packingCountBase',
+                  label: '包装库存',
+                  slot: 'packingCountBase',
+                  showOverflowTooltip: true
+                }
+              ]
+            : []),
+
+          {
+            prop: 'weight',
+            label: '重量',
+            showOverflowTooltip: true,
+            slot: 'weight'
+          },
+
+          {
+            prop: 'expirationDate',
+            slot: 'expirationDate',
+            label: '库存保质期',
+            width: 100
+          },
+          {
+            prop: 'expirationTime',
+            label: '周期倒计时',
+            showOverflowTooltip: true,
+            width: 100
+          },
+          {
+            prop: 'qualityResult',
+            slot: 'qualityResult',
+            label: '质检结果',
+            showOverflowTooltip: true,
+            width: 100
+          },
+          {
+            prop: 'qualityStatus',
+            slot: 'qualityStatus',
+            label: '质检状态',
+            showOverflowTooltip: true,
+            width: 100
+          },
+          {
+            prop: 'pathName',
+            width: 230,
+            label: '仓库',
+            showOverflowTooltip: true
+          },
+
+          ...(this.rootCategoryLevelId == '4'
+            ? [
+                {
+                  prop: 'workstationName',
+                  label: '工位',
+                  showOverflowTooltip: true
+                },
+
+                {
+                  prop: 'runStatus',
+                  label: '状态',
+                  slot: 'runStatus',
+                  showOverflowTooltip: true
+                }
+              ]
+            : []),
+
+          // ...(this.rootCategoryLevelId == '5'
+          //   ? [
+          //       {
+          //         prop: 'dieHoleNum',
+          //         label: '模孔数量',
+          //         showOverflowTooltip: true
+          //       },
+          //       {
+          //         prop: 'mandrelDiameter',
+          //         label: '芯棒直径',
+          //         showOverflowTooltip: true
+          //       },
+          //       {
+          //         prop: 'shrinkEffictive',
+          //         label: '收缩系数',
+          //         showOverflowTooltip: true
+          //       }
+          //     ]
+          //   : []),
+
+          // ...(this.rootCategoryLevelId == '7'
+          //   ? [
+          //       {
+          //         prop: 'materialQuality',
+          //         label: '材质',
+          //         showOverflowTooltip: true
+          //       },
+
+          //       {
+          //         prop: 'vehicleLen',
+          //         label: '长宽高',
+          //         slot: 'vehicleLen',
+          //         showOverflowTooltip: true
+          //       }
+          //     ]
+          //   : []),
+
+          ...(this.rootCategoryLevelId == '8'
+            ? [
+                {
+                  prop: 'extInfo.slotNum',
+                  label: '槽数',
+                  showOverflowTooltip: true
+                }
+              ]
+            : []),
+
+          ...(this.rootCategoryLevelId == '11'
+            ? [
+                {
+                  prop: 'status',
+                  label: '状态',
+                  slot: 'status',
+                  showOverflowTooltip: true
+                },
+
+                {
+                  prop: 'region',
+                  label: '位置',
+                  showOverflowTooltip: true
+                }
+              ]
+            : [])
+        ]
+      };
+    },
+
+    computed: {
+      tableKey() {
+        return `table-${this.rootCategoryLevelId}`;
+      },
+
+      // 表格列配置
+      columns() {
+        return this.cloumsAll;
+
+        // return [
+        //   {
+        //     width: 45,
+        //     type: 'selection',
+        //     columnKey: 'selection',
+        //     align: 'center',
+        //     reserveSelection: true
+        //   },
+        //   {
+        //     columnKey: 'index',
+        //     label: '序号',
+        //     type: 'index',
+        //     width: 50,
+        //     align: 'center'
+        //   },
+        //   {
+        //     prop: 'code',
+        //     label: '物品编码',
+        //     slot: 'code'
+        //   },
+        //   {
+        //     prop: 'codeNumber',
+        //     label: '编号',
+        //     showOverflowTooltip: true
+        //   },
+        //   {
+        //     prop: 'name',
+        //     label: '名称',
+        //     showOverflowTooltip: true
+        //   },
+        //   {
+        //     prop: 'brandNum',
+        //     label: '牌号',
+        //     showOverflowTooltip: true
+        //   },
+        //   {
+        //     prop: 'specification',
+        //     label: '规格',
+        //     showOverflowTooltip: true
+        //   },
+        //   {
+        //     prop: 'modelType',
+        //     label: '型号',
+        //     showOverflowTooltip: true
+        //   },
+
+        //   {
+        //     prop: 'batchNo',
+        //     label: '批次号',
+        //     align: 'center'
+        //   },
+        //   // {
+        //   //   prop: 'manualBatchNo',
+        //   //   label: '批次号',
+        //   //   align: 'center'
+        //   // },
+        //   {
+        //     prop: 'availableCountBase',
+        //     label: '计量库存数量',
+        //     sortable: 'custom',
+        //     slot: 'availableCountBase',
+        //     showOverflowTooltip: true,
+        //     width: 130,
+        //     align: 'center'
+        //   },
+
+        //   ...([1, 23, 8].includes(Number(this.rootCategoryLevelId))
+        //     ? [
+        //         {
+        //           prop: 'packingCountBase',
+        //           label: '包装库存',
+        //           slot: 'packingCountBase',
+        //           showOverflowTooltip: true
+        //         }
+        //       ]
+        //     : []),
+
+        //   {
+        //     prop: 'weight',
+        //     label: '重量',
+        //     showOverflowTooltip: true,
+        //     slot: 'weight'
+        //   },
+
+        //   {
+        //     prop: 'expirationDate',
+        //     slot: 'expirationDate',
+        //     label: '库存保质期',
+        //     width: 100
+        //   },
+        //   {
+        //     prop: 'expirationTime',
+        //     label: '周期倒计时',
+        //     showOverflowTooltip: true,
+        //     width: 100
+        //   },
+        //   {
+        //     prop: 'qualityResult',
+        //     slot: 'qualityResult',
+        //     label: '质检结果',
+        //     showOverflowTooltip: true,
+        //     width: 100
+        //   },
+        //   {
+        //     prop: 'qualityStatus',
+        //     slot: 'qualityStatus',
+        //     label: '质检状态',
+        //     showOverflowTooltip: true,
+        //     width: 100
+        //   },
+        //   {
+        //     prop: 'pathName',
+        //     width: 230,
+        //     label: '仓库',
+        //     showOverflowTooltip: true
+        //   },
+
+        //   ...(this.rootCategoryLevelId == '4'
+        //     ? [
+        //         {
+        //           prop: 'workstationName',
+        //           label: '工位',
+        //           showOverflowTooltip: true
+        //         },
+
+        //         {
+        //           prop: 'runStatus',
+        //           label: '状态',
+        //           slot: 'runStatus',
+        //           showOverflowTooltip: true
+        //         }
+        //       ]
+        //     : []),
+
+        //   // ...(this.rootCategoryLevelId == '5'
+        //   //   ? [
+        //   //       {
+        //   //         prop: 'dieHoleNum',
+        //   //         label: '模孔数量',
+        //   //         showOverflowTooltip: true
+        //   //       },
+        //   //       {
+        //   //         prop: 'mandrelDiameter',
+        //   //         label: '芯棒直径',
+        //   //         showOverflowTooltip: true
+        //   //       },
+        //   //       {
+        //   //         prop: 'shrinkEffictive',
+        //   //         label: '收缩系数',
+        //   //         showOverflowTooltip: true
+        //   //       }
+        //   //     ]
+        //   //   : []),
+
+        //   // ...(this.rootCategoryLevelId == '7'
+        //   //   ? [
+        //   //       {
+        //   //         prop: 'materialQuality',
+        //   //         label: '材质',
+        //   //         showOverflowTooltip: true
+        //   //       },
+
+        //   //       {
+        //   //         prop: 'vehicleLen',
+        //   //         label: '长宽高',
+        //   //         slot: 'vehicleLen',
+        //   //         showOverflowTooltip: true
+        //   //       }
+        //   //     ]
+        //   //   : []),
+
+        //   ...(this.rootCategoryLevelId == '8'
+        //     ? [
+        //         {
+        //           prop: 'extInfo.slotNum',
+        //           label: '槽数',
+        //           showOverflowTooltip: true
+        //         }
+        //       ]
+        //     : []),
+
+        //   ...(this.rootCategoryLevelId == '11'
+        //     ? [
+        //         {
+        //           prop: 'status',
+        //           label: '状态',
+        //           slot: 'status',
+        //           showOverflowTooltip: true
+        //         },
+
+        //         {
+        //           prop: 'region',
+        //           label: '位置',
+        //           showOverflowTooltip: true
+        //         }
+        //       ]
+        //     : [])
+        // ];
+      }
+    },
+    watch: {},
+    methods: {
+      /* 表格数据源 */
+      async datasource({ page, where, limit }) {
+        const dimension = this.$refs.searchRef.dimension;
+
+        let URL;
+
+        let param = {
+          ...where,
+          pageNum: page,
+          size: limit,
+          categoryLevelId: this.categoryLevelId
+        };
+        if (this.isType == 'pick') {
+          if (dimension == 1) {
+            URL = storageApi.getProductList;
+          } else if (dimension == 2) {
+            URL = storageApi.getBatchList;
+          }
+          // else if (dimension == 3) {
+          //   URL = storageApi.getPackingList;
+          // }
+          param.dimension = dimension;
+          // param.dimension = 1;
+          // param.dimension = dimension;
+
+          // URL = pageeLedgerMain;
+          // URL = getOutindetailtwo;
+        } else if (this.isType == 'feed') {
+          if ([4, 7, 14].includes(Number(this.rootCategoryLevelId))) {
+            URL = assetPage;
+          } else if (this.rootCategoryLevelId == 2) {
+            param.workOrderId = this.id;
+            delete param.taskId;
+            delete param.categoryLevelId;
+            URL = listInProduct;
+          } else if (
+            ![2, 4, 7, 14].includes(Number(this.rootCategoryLevelId))
+          ) {
+            URL = assetPage;
+          }
+        } else if (this.isType == 'job') {
+          URL = assetPage;
+        }
+
+        const res = await URL(param);
+        if (this.rootCategoryLevelId == '11') {
+          let _res = res;
+          console.log(res, 'res');
+          let _list = [];
+          _res.list.forEach((e) => {
+            if (e.aridRegionList && e.aridRegionList.length != 0) {
+              e.aridRegionList.map((i) => {
+                let obj = {
+                  name: e.name,
+                  region: e.extInfo.region,
+                  rootCategoryLevelId: e.rootCategoryLevelId,
+                  ...i,
+                  instanceId: i.id
+                };
+                _list.push(obj);
+              });
+            }
+          });
+          res.list = _list;
+          return res;
+        } else {
+          let _res = res;
+          let _list = [];
+
+          _list.push(
+            ..._res.list.map((i) => {
+              const warehouseId = i.pathIds && i.pathIds.split(',')[0];
+
+              return {
+                warehouseId,
+                ...i,
+                instanceId: i.id
+              };
+            })
+          );
+
+          res.list = _list;
+          // if (this.isType == 'pick') {
+          //   this.columns = this.cloumsPick;
+          // } else {
+          //   this.columns = this.cloumsAll
+          // }
+          return res;
+        }
+      },
+
+      handleSelectionChange(data) {
+        const selectionList = [];
+        this.allSelection.forEach((item) => {
+          if (item.warehouseIdList && item.warehouseIdList.length != 0) {
+            selectionList.push({
+              id: item.id,
+              ids: item.warehouseIdList
+            });
+          }
+        });
+        this.allSelection = data;
+
+        if (selectionList.length != 0) {
+          selectionList.forEach((item) => {
+            this.allSelection.forEach((it) => {
+              if (item.id == it.id) {
+                it.warehouseIdList = item.ids;
+              }
+            });
+          });
+        }
+
+        this.allSelection.forEach((it) => {
+          if (!it.warehouseIdList || it.warehouseIdList.length == 0) {
+            if (it.warehouseId) {
+              it.warehouseIdList = [];
+              it.warehouseIdList.push(it.warehouseId);
+            }
+          }
+        });
+
+        // this.allSelection.forEach((item) => {
+
+        // })
+        console.log(this.allSelection, 'this.allSelection22');
+      },
+
+      /* 清空选择 */
+      clearChoose() {
+        this.allSelection = [];
+        this.$refs.table.clearSelection();
+      },
+      rowStyle({ row }) {
+        return this.selection.includes(row) ? { background: '#e6f7ff' } : null;
+      },
+      handleNodeClick(data) {
+        console.log(data, 'handleNodeClick');
+        this.isCategory = true;
+        this.categoryLevelId = data.id;
+        this.rootCategoryLevelId = data.rootCategoryLevelId;
+        this.reload();
+      },
+
+      setRootId(data) {
+        this.categoryLevelId = data.id;
+        this.rootCategoryLevelId = data.rootCategoryLevelId;
+        this.reload();
+      },
+
+      handledime() {
+        this.reload(this.$refs.searchRef.where);
+      },
+
+      /* 刷新表格 */
+      reload(where) {
+        this.$nextTick(() => {
+          this.isCategory = false;
+          this.$refs.table.reload({ pageNum: 1, where: where });
+        });
+      },
+
+      onDone() {
+        this.$nextTick(() => {
+          this.allSelection.forEach((item) => {
+            this.$refs.table.toggleRowSelection(item, true);
+          });
+        });
+      },
+      open(id, item, t) {
+        this.id = id;
+
+        if (t) {
+          this.title = t;
+        } else {
+          this.title = '领料列表';
+        }
+
+        if (this.isType == 'pick') {
+          this.temporaryList = item.pickList || [];
+          this.allSelection = item.pickList || [];
+          this.visible = true;
+          this.$nextTick(() => {
+            this.allSelection.forEach((item) => {
+              this.$refs.table.toggleRowSelection(item, true);
+            });
+
+            console.log(this.allSelection, 'this.allSelection');
+          });
+        } else if (this.isType == 'feed') {
+          let feedList = [];
+          feedList = [
+            ...item.modelList,
+            ...item.equipmentList,
+            ...item.instanceList,
+            ...item.aridRegionList,
+            ...item.turnover,
+            ...item.palletList,
+            ...item.revolvingDiskList,
+            ...item.semiProductList
+          ];
+          this.temporaryList = feedList || [];
+          this.allSelection = feedList || [];
+          this.visible = true;
+
+          this.$nextTick(() => {
+            feedList.forEach((item) => {
+              this.$refs.table.toggleRowSelection(item, true);
+            });
+          });
+        } else if (this.isType == 'job') {
+          let feedList = [];
+          feedList = [...item.turnover, ...item.equipmentList];
+          this.temporaryList = feedList || [];
+          this.allSelection = feedList || [];
+          this.visible = true;
+
+          this.$nextTick(() => {
+            feedList.forEach((item) => {
+              this.$refs.table.toggleRowSelection(item, true);
+            });
+          });
+        }
+      },
+
+      handleClose() {
+        this.clearChoose();
+        this.temporaryList = [];
+        this.allSelection = [];
+        this.visible = false;
+      },
+      selected() {
+        if (this.allSelection.length == 0) {
+          this.$message.warning('请选择物料');
+          return false;
+        }
+
+        if (this.temporaryList.length > 0) {
+          // 使用Promise来“模拟”异步操作
+          new Promise((resolve) => {
+            if (this.temporaryList.length > 0) {
+              this.temporaryList.forEach((item) => {
+                this.allSelection.forEach((item2) => {
+                  if (item.id == item2.id && this.isType == 'pick') {
+                    this.$set(
+                      item2,
+                      'demandQuantity',
+                      item.demandQuantity || null
+                    );
+                  } else if (item.id == item2.id && this.isType == 'feed') {
+                    this.$set(item2, 'feedQuantity', item.feedQuantity || null);
+                  }
+                });
+              });
+            }
+            this.allSelection.sort(
+              (a, b) => a.rootCategoryLevelId - b.rootCategoryLevelId
+            );
+
+            resolve();
+          }).then(() => {
+            this.$emit('allSelection', this.id, this.allSelection);
+            this.handleClose();
+          });
+        } else {
+          console.log('456');
+          this.allSelection.sort(
+            (a, b) => a.rootCategoryLevelId - b.rootCategoryLevelId
+          );
+          this.$emit('allSelection', this.id, this.allSelection);
+          this.handleClose();
+        }
+      }
+    },
+
+    created() {
+      if (this.isType == 'pick') {
+        // this.treeIds = '1, 5, 7, 8, 10, 13, 14, 23, 26, 9, 28';
+        this.treeIds =
+          '9, 23, 2, 1, 4, 14, 5, 8, 16, 13, 15, 6, 10, 22, 1777158952502956034';
+        // this.treeIds = '9, 1, 14, 5, 8, 13, 15, 6, 10, 22';
+      } else if (this.isType == 'feed') {
+        this.treeIds = '1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 26, 9, 23,28';
+      } else if (this.isType == 'job') {
+        this.treeIds = '4, 7';
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .tree_col {
+    border: 1px solid #eee;
+    padding: 10px 0;
+    box-sizing: border-box;
+    height: 500px;
+    overflow: auto;
+  }
+
+  .table_col {
+    padding-left: 10px;
+
+    ::v-deep .el-table th.el-table__cell {
+      background: #f2f2f2;
+    }
+  }
+
+  .pagination {
+    text-align: right;
+    padding: 10px 0;
+  }
+
+  .btns {
+    text-align: center;
+    padding: 10px 0;
+  }
+
+  .topsearch {
+    margin-bottom: 15px;
+  }
+
+  ::v-deep .is-checked {
+    background: #e6f7ff;
+  }
+</style>

+ 181 - 0
src/views/pick/pickApply/components/newPickingListSearch.vue

@@ -0,0 +1,181 @@
+<!-- 搜索表单 -->
+<template>
+  <el-form
+    label-width="77px"
+    class="ele-form-search"
+    @keyup.enter.native="search"
+    @submit.native.prevent
+  >
+    <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="列表维度:" prop="dimension">
+          <template>
+            <el-select
+              style="width: 100%"
+              clearable
+              @change="$emit('handledime', $event)"
+              v-model="dimension"
+              placeholder="请选择"
+            >
+              <el-option label="物品维度" value="1" v-if="type === 'products'">
+              </el-option>
+              <el-option label="批次维度" value="2"> </el-option>
+            </el-select>
+          </template>
+        </el-form-item>
+      </el-col>
+
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="仓库:" prop="warehouseId">
+          <template>
+            <el-select
+              clearable
+              filterable
+              style="width: 100%"
+              v-model="where.warehouseId"
+              placeholder="请选择"
+            >
+              <el-option
+                v-for="item in warehouseList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              >
+              </el-option>
+            </el-select>
+          </template>
+        </el-form-item>
+      </el-col>
+
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="物品编码:" prop="categoryCode">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="where.categoryCode"
+          ></el-input>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="物品名称:" prop="categoryName">
+          <el-input
+            clearable
+            v-model="where.categoryName"
+            placeholder="请输入"
+          ></el-input>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="批次号:" prop="batchNo">
+          <el-input
+            clearable
+            v-model="where.batchNo"
+            placeholder="请输入"
+          ></el-input>
+        </el-form-item>
+      </el-col>
+
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="型号:" prop="modelType">
+          <el-input
+            clearable
+            v-model="where.modelType"
+            placeholder="请输入"
+          ></el-input>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="规格:" prop="specification">
+          <el-input
+            clearable
+            v-model="where.specification"
+            placeholder="请输入"
+          ></el-input>
+        </el-form-item>
+      </el-col>
+
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <div class="ele-form-actions">
+          <el-button
+            type="primary"
+            icon="el-icon-search"
+            class="ele-btn-icon"
+            @click="search"
+            size="small"
+          >
+            查询
+          </el-button>
+          <el-button
+            @click="reset"
+            icon="el-icon-refresh-left"
+            size="small"
+            type="primary"
+            >重置</el-button
+          >
+        </div>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+  import { getWarehouseList } from '@/api/produce/index.js';
+  export default {
+    data() {
+      // 默认表单数据
+      const defaultWhere = {
+        batchNo: '',
+
+        warehouseId: '',
+        manualBatchNo: '',
+
+        modelType: '',
+        specification: '',
+        categoryCode: '',
+
+        categoryName: ''
+      };
+      return {
+        defaultWhere,
+        // 表单数据
+        where: { ...defaultWhere },
+        warehouseList: [],
+        dimension: '2',
+        type: 'products'
+      };
+    },
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      }
+    },
+    created() {
+      this.getArguInfo();
+    },
+    methods: {
+      /* 搜索 */
+      search() {
+        this.$emit('search', this.where);
+      },
+      /*  重置 */
+      reset() {
+        this.where = { ...this.defaultWhere };
+        this.search();
+      },
+      //搜索数据源
+      async getArguInfo() {
+        const { data } = await getWarehouseList();
+        this.warehouseList = data;
+      }
+    }
+  };
+</script>
+
+<style>
+  .ele-form-actions {
+    display: inline-block;
+    transform: translate(0);
+    transition: all;
+  }
+</style>

+ 74 - 17
src/views/pick/pickApply/components/selfBuildPick.vue

@@ -43,7 +43,7 @@
         >
           <el-table-column label="序号" type="index" width="60">
             <template slot-scope="{ row, $index }">
-              {{ $index }}
+              {{ $index + 1 }}
             </template>
           </el-table-column>
 
@@ -55,7 +55,7 @@
             </template>
           </el-table-column>
 
-          <el-table-column label="编码" prop="assetCode">
+          <el-table-column label="编码" prop="assetCode" show-overflow-tooltip>
             <template slot-scope="{ row, $index }">
               <span
                 v-if="
@@ -74,7 +74,7 @@
             </template>
           </el-table-column>
 
-          <el-table-column label="名称" prop="name">
+          <el-table-column label="名称" prop="name" show-overflow-tooltip>
             <template slot-scope="{ row, $index }">
               <span
                 v-if="
@@ -87,9 +87,16 @@
               <span> {{ row.name }}</span>
             </template>
           </el-table-column>
-          <el-table-column label="型号" prop="modelType"> </el-table-column>
-          <el-table-column label="规格" prop="specification"> </el-table-column>
-          <el-table-column label="批次号" prop="batchNo"> </el-table-column>
+          <el-table-column label="型号" prop="modelType" show-overflow-tooltip>
+          </el-table-column>
+          <el-table-column
+            label="规格"
+            prop="specification"
+            show-overflow-tooltip
+          >
+          </el-table-column>
+          <el-table-column label="批次号" prop="batchNo" show-overflow-tooltip>
+          </el-table-column>
 
           <el-table-column label="数量" prop="demandQuantity">
             <template slot-scope="{ row, $index }">
@@ -97,8 +104,8 @@
                 <el-input
                   v-model="row.demandQuantity"
                   @input="
-                    row.demandQuantity > row.availableCountBase
-                      ? (row.demandQuantity = row.availableCountBase)
+                    row.demandQuantity > row.measureQuantity
+                      ? (row.demandQuantity = row.measureQuantity)
                       : row.demandQuantity
                   "
                   size="mini"
@@ -109,13 +116,17 @@
             </template>
           </el-table-column>
 
-          <el-table-column label="计量库存数量" prop="availableCountBase">
+          <el-table-column label="计量库存数量" prop="measureQuantity">
             <template slot-scope="{ row, $index }">
-              {{ row.availableCountBase }} {{ row.measuringUnit }}
+              {{ row.measureQuantity }} {{ row.measuringUnit }}
             </template>
           </el-table-column>
 
-          <el-table-column label="领料仓库" prop="warehouseId">
+          <el-table-column
+            label="领料仓库"
+            prop="warehouseId"
+            show-overflow-tooltip
+          >
             <template slot-scope="{ row, $index }">
               <div>
                 <el-select
@@ -124,7 +135,7 @@
                   filterable
                 >
                   <el-option
-                    v-for="item in row.warehouseLists"
+                    v-for="item in row.warehouseList"
                     :label="item.warehouse_name"
                     :value="item.warehouse_id"
                     :key="item.warehouse_id"
@@ -149,23 +160,31 @@
       <el-button size="mini" type="primary" @click="save()">确 定</el-button>
     </template>
 
-    <pickingList
+    <!-- <pickingList
       isType="pick"
       ref="pickingListRef"
       @allSelection="allSelection"
-    ></pickingList>
+    ></pickingList> -->
+
+    <newPickingList
+      isType="pick"
+      ref="pickingListRef"
+      @allSelection="allSelection"
+    ></newPickingList>
   </ele-modal>
 </template>
 
 <script>
   import { getCode } from '@/api/produce/workOrder';
   import pickingList from '@/views/produce/components/picking/pickingList.vue';
+  import newPickingList from './newPickingList.vue';
   import { typeName } from '@/views/produce/components/common.js';
 
   import { unproductive } from '@/api/produce/picking';
   export default {
     components: {
-      pickingList
+      pickingList,
+      newPickingList
     },
     data() {
       return {
@@ -196,9 +215,46 @@
       },
 
       allSelection(id, list) {
+        // this.objPick = {
+        //   pickList: list
+        // };
+        list.forEach((item) => {
+          item.code = item.categoryCode;
+          item.name = item.categoryName;
+          item.measuringUnit = item.measuringUnit
+            ? item.measuringUnit
+            : item.measureUnit;
+          item.unit = item.unit ? item.unit : item.measureUnit;
+        });
+
+        const newData = [];
+
+        if (list.length != 0) {
+          list.forEach((it) => {
+            newData.push(this.deepCopy(it));
+          });
+        }
+
         this.objPick = {
-          pickList: list
+          pickList: newData
         };
+        this.$forceUpdate();
+      },
+
+      deepCopy(obj, hash = new WeakMap()) {
+        if (obj === null) return null;
+        if (obj instanceof Date) return new Date(obj);
+        if (obj instanceof RegExp) return new RegExp(obj);
+        if (typeof obj !== 'object' && typeof obj !== 'function') return obj;
+        if (hash.has(obj)) return hash.get(obj);
+
+        const result = Array.isArray(obj) ? [] : {};
+        hash.set(obj, result);
+
+        return Object.keys(obj).reduce((acc, key) => {
+          acc[key] = this.deepCopy(obj[key], hash);
+          return acc;
+        }, result);
       },
 
       removeItem(index) {
@@ -218,7 +274,8 @@
           bol2 = this.objPick.pickList.every((e, i) => {
             _i = i;
             name = e.name;
-            e.categoryId = e.id;
+            // e.categoryId = e.id;
+            // e.id = e.categoryId
             return (
               Object.prototype.hasOwnProperty.call(e, 'demandQuantity') &&
               Number(e.demandQuantity) > 0 &&

+ 17 - 7
src/views/produce/components/picking/index.vue

@@ -122,7 +122,7 @@
                 >
                   {{ row.categoryCode }}
                 </span>
-                <span>
+                <span v-else>
                   {{
                     row.rootCategoryLevelId == 4 ? row.codeNumber : row.code
                   }}</span
@@ -140,7 +140,7 @@
                 >
                   {{ row.categoryName }}
                 </span>
-                <span> {{ row.name }}</span>
+                <span v-else> {{ row.name }}</span>
               </template>
             </el-table-column>
             <el-table-column
@@ -245,14 +245,22 @@
                     placeholder="请选择"
                     filterable
                     multiple
+                    @change="changeWarehouse(row, $index)"
                   >
                     <el-option
-                      v-for="item in row.warehouseLists"
+                      v-for="item in row.warehouseList"
                       :label="item.warehouse_name"
                       :value="item.warehouse_id"
                       :key="item.warehouse_id"
                     >
                     </el-option>
+                    <!-- <el-option
+                      v-for="item in row.warehouseLists"
+                      :label="item.warehouse_name"
+                      :value="item.warehouse_id"
+                      :key="item.warehouse_id"
+                    >
+                    </el-option> -->
                   </el-select>
                 </div>
               </template>
@@ -660,16 +668,18 @@
       },
 
       chooseInventoryData(item, warehouseItem, index) {
-        console.log(item, warehouseItem, index, '111111');
         this.treeId.push(item.rootCategoryLevelId);
         this.$refs.assetsRef.open(item, warehouseItem, index);
       },
 
       allSelection(id, list) {
         list.forEach((item) => {
-          item.warehouseList = item.warehouseList
-            ? item.warehouseList
-            : item.warehouseLists;
+          item.code = item.categoryCode;
+          item.name = item.categoryName;
+          item.measuringUnit = item.measuringUnit
+            ? item.measuringUnit
+            : item.measureUnit;
+          item.unit = item.unit ? item.unit : item.measureUnit;
         });
 
         this.workList.forEach((e) => {

+ 221 - 219
src/views/produce/components/picking/newPickingList.vue

@@ -97,7 +97,7 @@
             </template>
 
             <template v-slot:measureQuantity="{ row }">
-              {{ row.measureQuantity }} {{ row.measuringUnit }}
+              {{ row.measureQuantity }} {{ row.measureUnit }}
             </template>
 
             <template v-slot:weight="{ row }">
@@ -196,205 +196,6 @@
 
         allSelection: [],
         temporaryList: [],
-        cloumsAll: [
-          {
-            width: 45,
-            type: 'selection',
-            columnKey: 'selection',
-            align: 'center',
-            reserveSelection: true
-          },
-          {
-            columnKey: 'index',
-            label: '序号',
-            type: 'index',
-            width: 50,
-            align: 'center'
-          },
-          {
-            prop: 'code',
-            label: '物品编码',
-            slot: 'code'
-          },
-          {
-            prop: 'codeNumber',
-            label: '编号',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'name',
-            label: '名称',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'brandNum',
-            label: '牌号',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'specification',
-            label: '规格',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'modelType',
-            label: '型号',
-            showOverflowTooltip: true
-          },
-
-          {
-            prop: 'batchNo',
-            label: '批次号',
-            align: 'center'
-          },
-          // {
-          //   prop: 'manualBatchNo',
-          //   label: '批次号',
-          //   align: 'center'
-          // },
-          {
-            prop: 'availableCountBase',
-            label: '计量库存数量',
-            sortable: 'custom',
-            slot: 'availableCountBase',
-            showOverflowTooltip: true,
-            width: 130,
-            align: 'center'
-          },
-
-          ...([1, 23, 8].includes(Number(this.rootCategoryLevelId))
-            ? [
-                {
-                  prop: 'packingCountBase',
-                  label: '包装库存',
-                  slot: 'packingCountBase',
-                  showOverflowTooltip: true
-                }
-              ]
-            : []),
-
-          {
-            prop: 'weight',
-            label: '重量',
-            showOverflowTooltip: true,
-            slot: 'weight'
-          },
-
-          {
-            prop: 'expirationDate',
-            slot: 'expirationDate',
-            label: '库存保质期',
-            width: 100
-          },
-          {
-            prop: 'expirationTime',
-            label: '周期倒计时',
-            showOverflowTooltip: true,
-            width: 100
-          },
-          {
-            prop: 'qualityResult',
-            slot: 'qualityResult',
-            label: '质检结果',
-            showOverflowTooltip: true,
-            width: 100
-          },
-          {
-            prop: 'qualityStatus',
-            slot: 'qualityStatus',
-            label: '质检状态',
-            showOverflowTooltip: true,
-            width: 100
-          },
-          {
-            prop: 'pathName',
-            width: 230,
-            label: '仓库',
-            showOverflowTooltip: true
-          },
-
-          ...(this.rootCategoryLevelId == '4'
-            ? [
-                {
-                  prop: 'workstationName',
-                  label: '工位',
-                  showOverflowTooltip: true
-                },
-
-                {
-                  prop: 'runStatus',
-                  label: '状态',
-                  slot: 'runStatus',
-                  showOverflowTooltip: true
-                }
-              ]
-            : []),
-
-          // ...(this.rootCategoryLevelId == '5'
-          //   ? [
-          //       {
-          //         prop: 'dieHoleNum',
-          //         label: '模孔数量',
-          //         showOverflowTooltip: true
-          //       },
-          //       {
-          //         prop: 'mandrelDiameter',
-          //         label: '芯棒直径',
-          //         showOverflowTooltip: true
-          //       },
-          //       {
-          //         prop: 'shrinkEffictive',
-          //         label: '收缩系数',
-          //         showOverflowTooltip: true
-          //       }
-          //     ]
-          //   : []),
-
-          // ...(this.rootCategoryLevelId == '7'
-          //   ? [
-          //       {
-          //         prop: 'materialQuality',
-          //         label: '材质',
-          //         showOverflowTooltip: true
-          //       },
-
-          //       {
-          //         prop: 'vehicleLen',
-          //         label: '长宽高',
-          //         slot: 'vehicleLen',
-          //         showOverflowTooltip: true
-          //       }
-          //     ]
-          //   : []),
-
-          ...(this.rootCategoryLevelId == '8'
-            ? [
-                {
-                  prop: 'extInfo.slotNum',
-                  label: '槽数',
-                  showOverflowTooltip: true
-                }
-              ]
-            : []),
-
-          ...(this.rootCategoryLevelId == '11'
-            ? [
-                {
-                  prop: 'status',
-                  label: '状态',
-                  slot: 'status',
-                  showOverflowTooltip: true
-                },
-
-                {
-                  prop: 'region',
-                  label: '位置',
-                  showOverflowTooltip: true
-                }
-              ]
-            : [])
-        ]
-
         // cloumsAll: [
         //   {
         //     width: 45,
@@ -411,8 +212,9 @@
         //     align: 'center'
         //   },
         //   {
-        //     prop: 'categoryCode',
-        //     label: '物品编码'
+        //     prop: 'code',
+        //     label: '物品编码',
+        //     slot: 'code'
         //   },
         //   {
         //     prop: 'codeNumber',
@@ -420,7 +222,7 @@
         //     showOverflowTooltip: true
         //   },
         //   {
-        //     prop: 'categoryName',
+        //     prop: 'name',
         //     label: '名称',
         //     showOverflowTooltip: true
         //   },
@@ -434,15 +236,9 @@
         //     label: '规格',
         //     showOverflowTooltip: true
         //   },
-        //   // {
-        //   //   prop: 'modelType',
-        //   //   label: '型号',
-        //   //   showOverflowTooltip: true
-        //   // },
         //   {
-        //     prop: 'categoryModel',
+        //     prop: 'modelType',
         //     label: '型号',
-        //     align: 'center',
         //     showOverflowTooltip: true
         //   },
 
@@ -457,10 +253,10 @@
         //   //   align: 'center'
         //   // },
         //   {
-        //     prop: 'measureQuantity',
+        //     prop: 'availableCountBase',
         //     label: '计量库存数量',
         //     sortable: 'custom',
-        //     slot: 'measureQuantity',
+        //     slot: 'availableCountBase',
         //     showOverflowTooltip: true,
         //     width: 130,
         //     align: 'center'
@@ -598,6 +394,210 @@
         //       ]
         //     : [])
         // ]
+
+        cloumsAll: [
+          {
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center',
+            reserveSelection: true
+          },
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 50,
+            align: 'center'
+          },
+          {
+            prop: 'categoryCode',
+            label: '物品编码'
+          },
+          {
+            prop: 'codeNumber',
+            label: '编号',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'categoryName',
+            label: '名称',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'brandNum',
+            label: '牌号',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'specification',
+            label: '规格',
+            showOverflowTooltip: true
+          },
+          // {
+          //   prop: 'modelType',
+          //   label: '型号',
+          //   showOverflowTooltip: true
+          // },
+          {
+            prop: 'categoryModel',
+            label: '型号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+          {
+            prop: 'batchNo',
+            label: '批次号',
+            align: 'center'
+          },
+          // {
+          //   prop: 'manualBatchNo',
+          //   label: '批次号',
+          //   align: 'center'
+          // },
+          {
+            prop: 'measureQuantity',
+            label: '计量库存数量',
+            sortable: 'custom',
+            slot: 'measureQuantity',
+            showOverflowTooltip: true,
+            width: 130,
+            align: 'center'
+          },
+
+          ...([1, 23, 8].includes(Number(this.rootCategoryLevelId))
+            ? [
+                {
+                  prop: 'packingCountBase',
+                  label: '包装库存',
+                  slot: 'packingCountBase',
+                  showOverflowTooltip: true
+                }
+              ]
+            : []),
+
+          {
+            prop: 'weight',
+            label: '重量',
+            showOverflowTooltip: true,
+            slot: 'weight'
+          },
+
+          {
+            prop: 'expirationDate',
+            slot: 'expirationDate',
+            label: '库存保质期',
+            width: 100
+          },
+          {
+            prop: 'expirationTime',
+            label: '周期倒计时',
+            showOverflowTooltip: true,
+            width: 100
+          },
+          {
+            prop: 'qualityResult',
+            slot: 'qualityResult',
+            label: '质检结果',
+            showOverflowTooltip: true,
+            width: 100
+          },
+          {
+            prop: 'qualityStatus',
+            slot: 'qualityStatus',
+            label: '质检状态',
+            showOverflowTooltip: true,
+            width: 100
+          },
+          {
+            prop: 'pathName',
+            width: 230,
+            label: '仓库',
+            showOverflowTooltip: true
+          },
+
+          ...(this.rootCategoryLevelId == '4'
+            ? [
+                {
+                  prop: 'workstationName',
+                  label: '工位',
+                  showOverflowTooltip: true
+                },
+
+                {
+                  prop: 'runStatus',
+                  label: '状态',
+                  slot: 'runStatus',
+                  showOverflowTooltip: true
+                }
+              ]
+            : []),
+
+          // ...(this.rootCategoryLevelId == '5'
+          //   ? [
+          //       {
+          //         prop: 'dieHoleNum',
+          //         label: '模孔数量',
+          //         showOverflowTooltip: true
+          //       },
+          //       {
+          //         prop: 'mandrelDiameter',
+          //         label: '芯棒直径',
+          //         showOverflowTooltip: true
+          //       },
+          //       {
+          //         prop: 'shrinkEffictive',
+          //         label: '收缩系数',
+          //         showOverflowTooltip: true
+          //       }
+          //     ]
+          //   : []),
+
+          // ...(this.rootCategoryLevelId == '7'
+          //   ? [
+          //       {
+          //         prop: 'materialQuality',
+          //         label: '材质',
+          //         showOverflowTooltip: true
+          //       },
+
+          //       {
+          //         prop: 'vehicleLen',
+          //         label: '长宽高',
+          //         slot: 'vehicleLen',
+          //         showOverflowTooltip: true
+          //       }
+          //     ]
+          //   : []),
+
+          ...(this.rootCategoryLevelId == '8'
+            ? [
+                {
+                  prop: 'extInfo.slotNum',
+                  label: '槽数',
+                  showOverflowTooltip: true
+                }
+              ]
+            : []),
+
+          ...(this.rootCategoryLevelId == '11'
+            ? [
+                {
+                  prop: 'status',
+                  label: '状态',
+                  slot: 'status',
+                  showOverflowTooltip: true
+                },
+
+                {
+                  prop: 'region',
+                  label: '位置',
+                  showOverflowTooltip: true
+                }
+              ]
+            : [])
+        ]
       };
     },
 
@@ -825,18 +825,20 @@
           categoryLevelId: this.categoryLevelId
         };
         if (this.isType == 'pick') {
-          // if (dimension == 1) {
-          //   URL = storageApi.getProductList;
-          // } else if (dimension == 2) {
-          //   URL = storageApi.getBatchList;
-          // } else if (dimension == 3) {
+          if (dimension == 1) {
+            URL = storageApi.getProductList;
+          } else if (dimension == 2) {
+            URL = storageApi.getBatchList;
+          }
+          // else if (dimension == 3) {
           //   URL = storageApi.getPackingList;
           // }
+          param.dimension = dimension;
+          // param.dimension = 1;
           // param.dimension = dimension;
-          param.dimension = 1;
 
           // URL = pageeLedgerMain;
-          URL = getOutindetailtwo;
+          // URL = getOutindetailtwo;
         } else if (this.isType == 'feed') {
           if ([4, 7, 14].includes(Number(this.rootCategoryLevelId))) {
             URL = assetPage;

+ 18 - 28
src/views/produce/components/picking/newPickingListSearch.vue

@@ -8,45 +8,44 @@
   >
     <el-row :gutter="15">
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="仓库:" prop="warehouseId">
+        <el-form-item label="列表维度:" prop="dimension">
           <template>
             <el-select
-              clearable
-              filterable
               style="width: 100%"
-              v-model="where.warehouseId"
+              clearable
+              @change="$emit('handledime', $event)"
+              v-model="dimension"
               placeholder="请选择"
             >
-              <el-option
-                v-for="item in warehouseList"
-                :label="item.name"
-                :value="item.id"
-                :key="item.id"
-              >
+              <el-option label="物品维度" value="1" v-if="type === 'products'">
               </el-option>
+              <el-option label="批次维度" value="2"> </el-option>
             </el-select>
           </template>
         </el-form-item>
       </el-col>
 
-      <!-- <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="列表维度:" prop="dimension">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="仓库:" prop="warehouseId">
           <template>
             <el-select
-              style="width: 100%"
               clearable
-              @change="$emit('handledime', $event)"
-              v-model="dimension"
+              filterable
+              style="width: 100%"
+              v-model="where.warehouseId"
               placeholder="请选择"
             >
-              <el-option label="物品维度" value="1" v-if="type === 'products'">
+              <el-option
+                v-for="item in warehouseList"
+                :label="item.name"
+                :value="item.id"
+                :key="item.id"
+              >
               </el-option>
-              <el-option label="批次维度" value="2"> </el-option>
-              <el-option label="包装维度" value="3"> </el-option>
             </el-select>
           </template>
         </el-form-item>
-      </el-col> -->
+      </el-col>
 
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="物品编码:" prop="categoryCode">
@@ -75,15 +74,6 @@
           ></el-input>
         </el-form-item>
       </el-col>
-      <!-- <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="批次号:" prop="manualBatchNo">
-          <el-input
-            clearable
-            v-model="where.manualBatchNo"
-            placeholder="请输入"
-          ></el-input>
-        </el-form-item>
-      </el-col> -->
 
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="型号:" prop="modelType">

+ 225 - 17
src/views/produce/components/picking/pickingList.vue

@@ -67,7 +67,7 @@
             </template>
 
             <template v-slot:code="{ row }">
-              {{ row.rootCategoryLevelId == 4 ? row.categoryCode : row.code }}
+              {{ row.rootCategoryLevelId == 4 ? row.code : row.code }}
             </template>
 
             <template v-slot:runStatus="{ row }">
@@ -188,8 +188,220 @@
         selection: [],
 
         allSelection: [],
-        temporaryList: [],
-        cloumsAll: [
+        temporaryList: []
+        // cloumsAll: [
+        //   {
+        //     width: 45,
+        //     type: 'selection',
+        //     columnKey: 'selection',
+        //     align: 'center',
+        //     reserveSelection: true
+        //   },
+        //   {
+        //     columnKey: 'index',
+        //     label: '序号',
+        //     type: 'index',
+        //     width: 50,
+        //     align: 'center'
+        //   },
+        //   {
+        //     prop: 'code',
+        //     label: '编码',
+        //     slot: 'code',
+        //     showOverflowTooltip: true
+        //   },
+
+        //   {
+        //     prop: 'codeNumber',
+        //     label: '编号',
+        //     showOverflowTooltip: true
+        //   },
+        //   {
+        //     prop: 'name',
+        //     label: '名称',
+        //     showOverflowTooltip: true
+        //   },
+        //   {
+        //     prop: 'brandNum',
+        //     label: '牌号',
+        //     showOverflowTooltip: true
+        //   },
+        //   {
+        //     prop: 'specification',
+        //     label: '规格',
+        //     showOverflowTooltip: true
+        //   },
+        //   {
+        //     prop: 'modelType',
+        //     label: '型号',
+        //     showOverflowTooltip: true
+        //   },
+
+        //   {
+        //     prop: 'batchNo',
+        //     label: '批次号',
+        //     align: 'center'
+        //   },
+        //   // {
+        //   //   prop: 'manualBatchNo',
+        //   //   label: '批次号',
+        //   //   align: 'center'
+        //   // },
+        //   {
+        //     prop: 'availableCountBase',
+        //     label: '计量库存数量',
+        //     sortable: 'custom',
+        //     slot: 'availableCountBase',
+        //     showOverflowTooltip: true,
+        //     width: 130,
+        //     align: 'center'
+        //   },
+
+        //   ...([1, 23, 8].includes(Number(this.rootCategoryLevelId))
+        //     ? [
+        //         {
+        //           prop: 'packingCountBase',
+        //           label: '包装库存',
+        //           slot: 'packingCountBase',
+        //           showOverflowTooltip: true
+        //         }
+        //       ]
+        //     : []),
+
+        //   {
+        //     prop: 'weight',
+        //     label: '重量',
+        //     showOverflowTooltip: true,
+        //     slot: 'weight'
+        //   },
+
+        //   {
+        //     prop: 'expirationDate',
+        //     slot: 'expirationDate',
+        //     label: '库存保质期',
+        //     width: 100
+        //   },
+        //   {
+        //     prop: 'expirationTime',
+        //     label: '周期倒计时',
+        //     showOverflowTooltip: true,
+        //     width: 100
+        //   },
+        //   {
+        //     prop: 'qualityResult',
+        //     slot: 'qualityResult',
+        //     label: '质检结果',
+        //     showOverflowTooltip: true,
+        //     width: 100
+        //   },
+        //   {
+        //     prop: 'qualityStatus',
+        //     slot: 'qualityStatus',
+        //     label: '质检状态',
+        //     showOverflowTooltip: true,
+        //     width: 100
+        //   },
+        //   {
+        //     prop: 'pathName',
+        //     width: 230,
+        //     label: '仓库',
+        //     showOverflowTooltip: true
+        //   },
+
+        //   ...(this.rootCategoryLevelId == '4'
+        //     ? [
+        //         {
+        //           prop: 'workstationName',
+        //           label: '工位',
+        //           showOverflowTooltip: true
+        //         },
+
+        //         {
+        //           prop: 'runStatus',
+        //           label: '状态',
+        //           slot: 'runStatus',
+        //           showOverflowTooltip: true
+        //         }
+        //       ]
+        //     : []),
+
+        //   // ...(this.rootCategoryLevelId == '5'
+        //   //   ? [
+        //   //       {
+        //   //         prop: 'dieHoleNum',
+        //   //         label: '模孔数量',
+        //   //         showOverflowTooltip: true
+        //   //       },
+        //   //       {
+        //   //         prop: 'mandrelDiameter',
+        //   //         label: '芯棒直径',
+        //   //         showOverflowTooltip: true
+        //   //       },
+        //   //       {
+        //   //         prop: 'shrinkEffictive',
+        //   //         label: '收缩系数',
+        //   //         showOverflowTooltip: true
+        //   //       }
+        //   //     ]
+        //   //   : []),
+
+        //   // ...(this.rootCategoryLevelId == '7'
+        //   //   ? [
+        //   //       {
+        //   //         prop: 'materialQuality',
+        //   //         label: '材质',
+        //   //         showOverflowTooltip: true
+        //   //       },
+
+        //   //       {
+        //   //         prop: 'vehicleLen',
+        //   //         label: '长宽高',
+        //   //         slot: 'vehicleLen',
+        //   //         showOverflowTooltip: true
+        //   //       }
+        //   //     ]
+        //   //   : []),
+
+        //   ...(this.rootCategoryLevelId == '8'
+        //     ? [
+        //         {
+        //           prop: 'extInfo.slotNum',
+        //           label: '槽数',
+        //           showOverflowTooltip: true
+        //         }
+        //       ]
+        //     : []),
+
+        //   ...(this.rootCategoryLevelId == '11'
+        //     ? [
+        //         {
+        //           prop: 'status',
+        //           label: '状态',
+        //           slot: 'status',
+        //           showOverflowTooltip: true
+        //         },
+
+        //         {
+        //           prop: 'region',
+        //           label: '位置',
+        //           showOverflowTooltip: true
+        //         }
+        //       ]
+        //     : [])
+        // ]
+      };
+    },
+
+    computed: {
+      tableKey() {
+        return `table-${this.rootCategoryLevelId}`;
+      },
+
+      // 表格列配置
+      columns() {
+        // return this.cloumsAll;
+
+        return [
           {
             width: 45,
             type: 'selection',
@@ -204,12 +416,19 @@
             width: 50,
             align: 'center'
           },
+          {
+            prop: 'categoryCode',
+            label: '物品编码',
+            slot: 'categoryCode',
+            showOverflowTooltip: true
+          },
+
           {
             prop: 'code',
-            label: this.rootCategoryLevelId == '4' ? '设备编码' : '物品编码',
-            slot: 'code',
+            label: '编码',
             showOverflowTooltip: true
           },
+
           {
             prop: 'codeNumber',
             label: '编号',
@@ -387,18 +606,7 @@
                 }
               ]
             : [])
-        ]
-      };
-    },
-
-    computed: {
-      tableKey() {
-        return `table-${this.rootCategoryLevelId}`;
-      },
-
-      // 表格列配置
-      columns() {
-        return this.cloumsAll;
+        ];
 
         // return [
         //   {

+ 21 - 8
src/views/produce/components/warehousing/components/workOrderBom.vue

@@ -3,45 +3,54 @@
     <div class="material">
       <div class="content_table">
         <div class="item rx-sc">
-          <div class="rx ww50">
+          <div class="rx ww33">
             <div class="lable rx-cc">工单编号</div>
             <div class="content">
               {{ item.code }}
             </div>
           </div>
 
-          <div class="rx ww30">
+          <div class="rx ww33">
             <div class="lable rx-cc">产品编码</div>
             <div class="content">{{ item.categoryName }}</div>
           </div>
 
-          <div class="rx ww20">
+          <div class="rx ww33">
             <div class="lable rx-cc">批次号</div>
             <div class="content">{{ item.batchNo }}</div>
           </div>
         </div>
 
         <div class="item rx-sc">
-          <div class="rx ww50">
+          <div class="rx ww33">
             <div class="lable rx-cc">产品名称</div>
             <div class="content">{{ item.categoryCode }}</div>
           </div>
-          <div class="rx ww50">
+          <div class="rx ww33">
             <div class="lable rx-cc">牌号</div>
             <div class="content rx-sc">
               <div>{{ item.brandNum }}</div>
             </div>
           </div>
-        </div>
 
-        <div class="item rx-sc">
-          <div class="rx">
+          <div class="rx ww33">
             <div class="lable rx-cc">型号</div>
             <div class="content">
               {{ item.modelType }}
             </div>
           </div>
         </div>
+        <div class="item rx-sc">
+          <div class="rx ww100">
+            <div class="lable rx-cc">生产要求</div>
+            <div class="content">
+              <el-input
+                :disabled="isDetails"
+                v-model="item.productionRequirements"
+              ></el-input>
+            </div>
+          </div>
+        </div>
       </div>
     </div>
   </div>
@@ -75,4 +84,8 @@
   .material {
     margin-top: 6px;
   }
+
+  .ww100 {
+    width: 100%;
+  }
 </style>

+ 5 - 1
src/views/produce/components/warehousing/index.vue

@@ -28,7 +28,11 @@
           <div class="name">工单信息</div>
         </div>
 
-        <workOrderBom :item="item" v-if="item"></workOrderBom>
+        <workOrderBom
+          :item="item"
+          v-if="item"
+          :isReportWork="true"
+        ></workOrderBom>
 
         <!-- 报工时间 -->
         <div>

+ 5 - 8
src/views/unacceptedProduct/components/probationalGoods-search.vue

@@ -64,20 +64,18 @@
         </el-form-item>
       </el-col>
 
-      <!-- <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="状态:">
-
-          <el-select v-model="where.status" style="width:100%">
+          <el-select v-model="where.status" style="width: 100%" clearable>
             <el-option
               v-for="item in statusList"
               :key="item.code"
               :value="item.code"
               :label="item.name"
-
             ></el-option>
           </el-select>
         </el-form-item>
-      </el-col> -->
+      </el-col>
       <!-- <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="组织机构:">
           <auth-selection
@@ -124,9 +122,8 @@
         // 表单数据
         where: { ...defaultWhere },
         statusList: [
-          { name: '待处理', code: 0 },
-          { name: '处理中', code: 1 },
-          { name: '已处理', code: 2 }
+          { name: '未处理', code: 0 },
+          { name: '已处理', code: 1 }
         ]
       };
     },

+ 11 - 0
src/views/warehousing/components/tgDetails.vue

@@ -48,6 +48,17 @@
             </el-input>
           </el-form-item>
         </el-col>
+
+        <el-col :span="24">
+          <el-form-item label="生产要求:" prop="productionRequirements">
+            <el-input
+              v-model="row.productionRequirements"
+              style="width: 100%"
+              disabled
+            >
+            </el-input>
+          </el-form-item>
+        </el-col>
       </el-row>
     </el-form>