瀏覽代碼

修改批次号和解决BUG

huang_an 2 年之前
父節點
當前提交
ef7ac314c6

+ 1 - 1
src/views/warehouseManagement/components/AssetsDialog.vue

@@ -221,7 +221,7 @@
           ></el-table-column>
           <el-table-column
             v-if="dimension == 4"
-            prop="meterielCode"
+            prop="materielCode"
             label="物料代号"
             min-width="100"
           ></el-table-column>

+ 9 - 1
src/views/warehouseManagement/outgoingManagement/add.vue

@@ -290,6 +290,7 @@
                   prop="manualBatchNo"
                 ></el-table-column>
                 <el-table-column
+                  v-if="clientEnvironmentId != 2"
                   label="批次号"
                   prop="batchNo"
                 ></el-table-column>
@@ -373,7 +374,11 @@
                 </el-table-column>
                 <el-table-column label="批号" prop="manualBatchNo">
                 </el-table-column>
-                <el-table-column label="批次号" prop="batchNo">
+                <el-table-column
+                  v-if="clientEnvironmentId != 2"
+                  label="批次号"
+                  prop="batchNo"
+                >
                 </el-table-column>
                 <el-table-column
                   v-if="dimension == 4"
@@ -616,6 +621,9 @@
     computed: {
       tableHeader() {
         return tableHeader(this.formData.extInfo.assetType);
+      },
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
       }
       // 条码信息
       // materialCodeReqList() {

+ 8 - 1
src/views/warehouseManagement/outgoingManagement/components/batchDetail.vue

@@ -25,7 +25,11 @@
         prop="manualBatchNo"
         width="100"
       ></el-table-column>
-      <el-table-column label="批次号" prop="batchNo"></el-table-column>
+      <el-table-column
+        v-if="clientEnvironmentId != 2"
+        label="批次号"
+        prop="batchNo"
+      ></el-table-column>
       <el-table-column
         label="发货条码"
         prop="barcodes"
@@ -69,6 +73,9 @@
     computed: {
       tableHeader() {
         return tableHeader(this.assetType);
+      },
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
       }
     }
   };

+ 15 - 2
src/views/warehouseManagement/outgoingManagement/details.vue

@@ -158,6 +158,7 @@
                   width="100"
                 ></el-table-column>
                 <el-table-column
+                  v-if="clientEnvironmentId != 2"
                   label="批次号"
                   prop="batchNo"
                 ></el-table-column>
@@ -242,7 +243,11 @@
               prop="manualBatchNo"
               width="100"
             ></el-table-column>
-            <el-table-column label="批次号" prop="batchNo"></el-table-column>
+            <el-table-column
+              v-if="clientEnvironmentId != 2"
+              label="批次号"
+              prop="batchNo"
+            ></el-table-column>
             <el-table-column
               label="发货条码"
               prop="barcodes"
@@ -358,7 +363,12 @@
               prop="manualBatchNo"
               width="100"
             ></el-table-column>
-            <el-table-column label="批次号" prop="batchNo"> </el-table-column>
+            <el-table-column
+              v-if="clientEnvironmentId != 2"
+              label="批次号"
+              prop="batchNo"
+            >
+            </el-table-column>
             <el-table-column
               label="发货条码"
               prop="barcodes"
@@ -476,6 +486,9 @@
       ...mapGetters(['getDictValue']),
       tableHeader() {
         return tableHeader(this.infoData?.extInfo?.assetType);
+      },
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
       }
     },
 

+ 44 - 21
src/views/warehouseManagement/stockLedger/components/item-list.vue

@@ -158,6 +158,8 @@
     computed: {
       // 表格列配置
       columns() {
+        let arr = [];
+        console.log(this.clientEnvironmentId);
         // selectedDime 1物品维度 2批次维度 3包装维度 4物料维度
         switch (this.selectedDime) {
           // 物品维度
@@ -270,7 +272,7 @@
             ];
           // 批次维度
           case '2':
-            return [
+            arr = [
               {
                 columnKey: 'index',
                 type: 'index',
@@ -280,12 +282,6 @@
                 showOverflowTooltip: true,
                 fixed: 'left'
               },
-              {
-                slot: 'batchNo',
-                prop: 'batchNo',
-                label: '批次号',
-                showOverflowTooltip: true
-              },
               {
                 prop: 'code',
                 label: '物品编码',
@@ -397,9 +393,21 @@
                 fixed: 'right'
               }
             ];
+            // 1本地 2索尔 3碳谷
+            if (this.clientEnvironmentId != 2) {
+              arr.splice(1, 0, {
+                slot: 'batchNo',
+                prop: 'batchNo',
+                label: '批次号',
+                showOverflowTooltip: true
+              });
+              return arr;
+            } else {
+              return arr;
+            }
           // 包装维度
           case '3':
-            return [
+            arr = [
               {
                 columnKey: 'index',
                 type: 'index',
@@ -409,12 +417,6 @@
                 showOverflowTooltip: true,
                 fixed: 'left'
               },
-              {
-                slot: 'batchNum',
-                prop: 'batchNum',
-                label: '批次号',
-                showOverflowTooltip: true
-              },
               {
                 prop: 'packagingCode',
                 label: '包装编码',
@@ -551,9 +553,21 @@
                 fixed: 'right'
               }
             ];
+            // 1本地 2索尔 3碳谷
+            if (this.clientEnvironmentId != 2) {
+              arr.splice(1, 0, {
+                slot: 'batchNo',
+                prop: 'batchNo',
+                label: '批次号',
+                showOverflowTooltip: true
+              });
+              return arr;
+            } else {
+              return arr;
+            }
           // 物料维度
           default:
-            return [
+            arr = [
               {
                 columnKey: 'index',
                 type: 'index',
@@ -563,12 +577,6 @@
                 showOverflowTooltip: true,
                 fixed: 'left'
               },
-              {
-                slot: 'batchNo',
-                prop: 'batchNo',
-                label: '批次号',
-                showOverflowTooltip: true
-              },
               {
                 prop: 'no',
                 label: '物料编码',
@@ -690,7 +698,22 @@
                 fixed: 'right'
               }
             ];
+            // 1本地 2索尔 3碳谷
+            if (this.clientEnvironmentId != 2) {
+              arr.splice(1, 0, {
+                slot: 'batchNo',
+                prop: 'batchNo',
+                label: '批次号',
+                showOverflowTooltip: true
+              });
+              return arr;
+            } else {
+              return arr;
+            }
         }
+      },
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
       }
     },
     methods: {

+ 348 - 13
src/views/warehouseManagement/stockManagement/add.vue

@@ -67,6 +67,7 @@
                 size="medium"
                 style="width: 100%"
                 clearable
+                :value="formData.extInfo.assetType"
                 :options="codeList"
                 :props="{
                   value: 'id',
@@ -98,6 +99,16 @@
                 ></el-option>
               </el-select> </el-form-item
           ></el-col>
+          <el-col v-if="formData.bizType == 12" :span="8">
+            <el-form-item label="关联出库单" prop="documentSource">
+              <el-input
+                placeholder="请输入"
+                v-model="stockOutOrders"
+                @click.native="handleStockOutOrder()"
+              >
+              </el-input>
+            </el-form-item>
+          </el-col>
           <el-col :span="8">
             <el-form-item
               v-if="formData.bizType == 12"
@@ -362,7 +373,9 @@
 
       <div class="material">
         <header-title title="产品信息">
-          <el-button type="primary" @click="addStock">添加</el-button>
+          <el-button v-if="!isOutsourcing" type="primary" @click="addStock"
+            >添加</el-button
+          >
         </header-title>
 
         <div class="mt10 form-table">
@@ -488,6 +501,7 @@
                 </template>
               </el-table-column>
               <el-table-column
+                v-if="clientEnvironmentId != 2"
                 label="批次号"
                 prop="batchNo"
                 width="70"
@@ -865,7 +879,7 @@
             >批量保存</el-button
           >
           <el-table
-            v-if="showMaterialTable"
+            v-if="isWrapTable"
             ref="materialCodeReqListTable"
             :data="materialCodeReqList"
             tooltip-effect="dark"
@@ -904,6 +918,7 @@
               width="100"
             ></el-table-column>
             <el-table-column
+              v-if="clientEnvironmentId != 2"
               label="批次号"
               prop="batchNo"
               width="70"
@@ -1062,13 +1077,20 @@
             <el-table-column
               v-if="!isSplit"
               label="操作"
-              width="80"
+              width="120"
               fixed="right"
             >
-              <template slot-scope="{ row }">
+              <template slot-scope="{ row, $index }">
                 <el-button type="text" @click="packCout(row)">
                   {{ !row.isPack ? '保存' : '编辑' }}
                 </el-button>
+                <el-button
+                  v-if="isOutsourcing"
+                  type="text"
+                  @click="wrapDelete(row, $index)"
+                >
+                  删除
+                </el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -1087,6 +1109,7 @@
             >批量保存</el-button
           >
           <el-table
+            v-if="isMaterialTable"
             ref="resultArrayTable"
             :data="resultArray"
             tooltip-effect="dark"
@@ -1117,6 +1140,7 @@
               width="100"
             ></el-table-column>
             <el-table-column
+              v-if="clientEnvironmentId != 2"
               label="批次号"
               prop="batchNo"
               width="80"
@@ -1211,11 +1235,18 @@
                 <span>{{ qualityStatus[row.status] }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="操作" width="80" fixed="right">
-              <template slot-scope="{ row }">
+            <el-table-column label="操作" width="120" fixed="right">
+              <template slot-scope="{ row, $index }">
                 <el-button type="text" @click="materialBtn(row)">
                   {{ !row.isPack ? '保存' : '编辑' }}
                 </el-button>
+                <el-button
+                  v-if="isOutsourcing"
+                  type="text"
+                  @click="materialDelete(row, $index)"
+                >
+                  删除
+                </el-button>
               </template>
             </el-table-column>
           </el-table>
@@ -1264,7 +1295,8 @@
         >
       </div>
     </el-dialog>
-
+    <!-- 出库单 -->
+    <stockOutOrder ref="stockOutOrderRef" @success="stockOutOrderSuccess" />
     <!-- 销售订单 -->
     <picker ref="pickerRef" @success="pickerSuccess" />
     <!-- 委外订单 -->
@@ -1278,6 +1310,7 @@
 <script>
   import { add, bignumber } from 'mathjs';
   import picker from './components/picker.vue';
+  import stockOutOrder from './components/stockOutOrder.vue';
   import outsourcedOrders from './components/outsourcedOrders.vue';
   import outin from '@/api/warehouseManagement/outin';
   import {
@@ -1315,11 +1348,15 @@
       upload,
       ReturnSelect,
       picker,
-      outsourcedOrders
+      outsourcedOrders,
+      stockOutOrder
     },
     data() {
       return {
-        showMaterialTable: true, // 缓存包装明细列表
+        isWrapTable: true, // 包装表格显隐
+        isMaterialTable: true, // 物料表格显隐
+        isOutsourcing: false, // 是否委外
+        stockOutOrders: '',
         isSplit: false, // 是否拆分到物料明细
         qualityStatus: {
           0: '未检',
@@ -1407,6 +1444,9 @@
       },
       tableHeader() {
         return tableHeader(this.selectEquiType);
+      },
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
       }
     },
     created() {
@@ -1736,9 +1776,12 @@
         } else {
           row.isPack = false;
         }
-        // setTimeout(() => {
-
-        // }, 100);
+        this.$nextTick(() => {
+          this.isWrapTable = false;
+          this.$nextTick(() => {
+            this.isWrapTable = true;
+          });
+        });
       },
       // 批量修改包装明细
       bulkEditingWrap() {
@@ -1888,6 +1931,14 @@
         } else {
           row.isPack = false;
         }
+        this.$nextTick(() => {
+          this.isWrapTable = false;
+          this.isMaterialTable = false;
+          this.$nextTick(() => {
+            this.isWrapTable = true;
+            this.isMaterialTable = true;
+          });
+        });
       },
       packNum(row, value) {
         const total = {
@@ -1923,6 +1974,273 @@
       outsourcedOrdersSuccess(row) {
         this.outsourcedOrdersRow = row;
         this.formData.extInfo.documentSource = row.code;
+        this.$forceUpdate();
+      },
+      // 包装删除
+      wrapDelete(row, index) {
+        // 删除包装
+        this.materialCodeReqList.splice(index, 1);
+        let outIndex = 0;
+        let arr = this.warehousingMaterialList.filter((item, index) => {
+          if (item.assetCode == row.assetCode && item.batchNo == row.batchNo) {
+            outIndex = index;
+            return true;
+          }
+        });
+        // 修改产品
+        if (arr[0].minPackingCount * arr[0].outInNum === row.minPackingCount) {
+          this.warehousingMaterialList.splice(outIndex, 1);
+        } else {
+          this.$set(
+            this.warehousingMaterialList[outIndex],
+            'outInNum',
+            this.warehousingMaterialList[outIndex].outInNum - 1
+          );
+        }
+        // 删除物料
+        if (this.resultArray.length > 0) {
+          let indexs = [];
+          let arr = this.resultArray.filter((item, index) => {
+            if (
+              item.assetCode == row.assetCode &&
+              item.batchNo == row.batchNo
+            ) {
+              indexs.push(index);
+              return true;
+            }
+          });
+          console.log(indexs);
+          console.log(arr);
+          this.resultArray = this.resultArray.filter((item, index) => {
+            return !indexs.includes(index);
+          });
+        }
+      },
+      // 物料删除
+      materialDelete(row, index) {
+        console.log('row---------------');
+        console.log(index);
+        console.log(row);
+        let isBoolen = false;
+        // 删除物料
+        this.resultArray.splice(index, 1);
+        // 过滤物料对应包装
+        let wrapOutIndex = 0;
+        let wrapArr = this.materialCodeReqList.filter((item, index) => {
+          if (
+            item.assetCode == row.assetCode &&
+            item.batchNo == row.batchNo &&
+            item.onlyCode == row.onlyCode
+          ) {
+            wrapOutIndex = index;
+            return true;
+          }
+        });
+        console.log('wrapArr------------------');
+        console.log(wrapArr);
+        // 包装和物料数量一致(相同删除列/不同-1)
+        if (wrapArr[0].minPackingCount === row.minPackingCount) {
+          isBoolen = true;
+          // 修改产品
+          let materialOutIndex = 0;
+          let materialArr = this.warehousingMaterialList.filter(
+            (item, index) => {
+              console.log(wrapOutIndex);
+              console.log(this.materialCodeReqList);
+              console.log(item.assetCode);
+              console.log(this.materialCodeReqList[wrapOutIndex]);
+              console.log(this.materialCodeReqList[wrapOutIndex].assetCode);
+              console.log('----------------');
+              if (
+                item.assetCode ==
+                  this.materialCodeReqList[wrapOutIndex].assetCode &&
+                item.batchNo == this.materialCodeReqList[wrapOutIndex].batchNo
+              ) {
+                materialOutIndex = index;
+                return true;
+              }
+            }
+          );
+          // 产品和包装数量一致(相同删除列/不同-1)———— 产品
+          if (
+            materialArr[0].minPackingCount * materialArr[0].outInNum ===
+            this.materialCodeReqList[wrapOutIndex].minPackingCount
+          ) {
+            this.warehousingMaterialList.splice(materialOutIndex, 1);
+          } else {
+            this.$set(
+              this.warehousingMaterialList[materialOutIndex],
+              'outInNum',
+              this.warehousingMaterialList[materialOutIndex].outInNum - 1
+            );
+          }
+          this.materialCodeReqList.splice(wrapOutIndex, 1);
+        } else {
+          // 包装数量-1
+          this.$set(
+            this.materialCodeReqList[wrapOutIndex],
+            'minPackingCount',
+            this.materialCodeReqList[wrapOutIndex].minPackingCount - 1
+          );
+        }
+        if (!isBoolen) {
+          // 修改产品
+          let materialOutIndex = 0;
+          // 找到包装对应产品
+          let materialArr = this.warehousingMaterialList.filter(
+            (item, index) => {
+              console.log(wrapOutIndex);
+              console.log(this.materialCodeReqList);
+              console.log(item.assetCode);
+              console.log(this.materialCodeReqList[wrapOutIndex]);
+              console.log(this.materialCodeReqList[wrapOutIndex].assetCode);
+              console.log('----------------');
+              if (
+                item.assetCode ==
+                  this.materialCodeReqList[wrapOutIndex].assetCode &&
+                item.batchNo == this.materialCodeReqList[wrapOutIndex].batchNo
+              ) {
+                materialOutIndex = index;
+                return true;
+              }
+            }
+          );
+          // 产品和包装数量一致(相同删除列/不同-1)———— 产品
+          if (
+            materialArr[0].minPackingCount * materialArr[0].outInNum ===
+            this.materialCodeReqList[wrapOutIndex].minPackingCount
+          ) {
+            this.warehousingMaterialList.splice(materialOutIndex, 1);
+          } else {
+            this.$set(
+              this.warehousingMaterialList[materialOutIndex],
+              'outInNum',
+              this.warehousingMaterialList[materialOutIndex].outInNum - 1
+            );
+          }
+        }
+      },
+      async stockOutOrderSuccess(row) {
+        console.log('--------------------------');
+        console.log(row);
+        this.stockOutOrders = row.bizNo;
+        this.formData.bizType = '2';
+        this.formData.extInfo = row.extInfo;
+        this.selectEquiType = row.categoryLevelTopId;
+        this.formData.sourceBizNo = row.receiveNo;
+        this.formData.fromId = row.id;
+        this.formData.clientName = row.partaName;
+        this.formData.clientCode = row.partaId;
+        // const data = await oneId(row.id);
+        // if (this.warehousingMaterialList.length == 0) {
+        //   let list = data.productList.map((item) => {
+        //     return {
+        //       ...item,
+        //       assetName: item.productName,
+        //       assetCode: item.productCode,
+        //       categoryId: item.productCategoryId,
+        //       minPackUnit: item.packingUnit
+        //     };
+        //   });
+        //   await this.onSelectTableData(await this.serachMainCode(list));
+        // }
+        // // 委外发货入库(出库再入库)
+        // if (row.outsourceSendCode) {
+        this.isOutsourcing = true;
+        this.formData.bizType = '12';
+        this.title = '委外入库(非采购)';
+        console.log('-------this.formData----');
+        console.log(this.formData);
+        outin.getById(row.id).then(async (res) => {
+          console.log('-------res--------res-------');
+          console.log(res);
+          if (res.outInDetailVOList && res.outInDetailVOList.length > 0) {
+            const batchNo = await getCode('lot_number_code');
+            this.warehousingMaterialList = [];
+            this.resultArray = [];
+            let arr = res.outInDetailVOList.map(async (goodsiItem) => {
+              return new Promise(async (outResolve) => {
+                goodsiItem.isSave = true;
+                goodsiItem.houseList = [];
+                goodsiItem.batchNo = batchNo;
+                goodsiItem.assetName = goodsiItem.name;
+                goodsiItem.assetCode = goodsiItem.categoryCode;
+                goodsiItem.outInNum =
+                  goodsiItem.packingCount < 1 ? 1 : goodsiItem.packingCount;
+                goodsiItem.minPackingCount = goodsiItem.minPackingCount;
+                goodsiItem.minPackUnit = goodsiItem.packingUnit;
+                this.warehousingMaterialList.push(goodsiItem);
+                let res = await outin.getAssetNum({
+                  assetCode: goodsiItem.assetCode,
+                  batchNum: goodsiItem.batchNo,
+                  num: goodsiItem.outInNum < 1 ? 1 : goodsiItem.outInNum
+                });
+                let arr = goodsiItem.outInDetailRecordVOList.map(
+                  (wrapItem, index) => {
+                    return new Promise(async (resolve) => {
+                      wrapItem.onlyCode = res.shift().onlyCode;
+                      wrapItem.packingCount =
+                        wrapItem.packingCount < 1 ? 1 : wrapItem.packingCount;
+                      wrapItem.isPack = true;
+                      wrapItem.minPackingCount = wrapItem.totalCount;
+                      wrapItem.assetName = goodsiItem.name;
+                      wrapItem.assetCode = goodsiItem.categoryCode;
+                      wrapItem.batchNo = batchNo;
+                      wrapItem.result =
+                        wrapItem.result === null ? '' : String(wrapItem.result);
+                      // wrapItem.count =
+                      //   wrapItem.outInDetailRecordMaterialDetailVOList.length; // 增加包装计量数量
+                      // 增加内部重量(解决重量未保存同时参与计算问题)
+                      wrapItem.initWeight = wrapItem.weight;
+                      if (
+                        wrapItem.outInDetailRecordMaterialDetailVOList?.length >
+                        0
+                      ) {
+                        wrapItem.outInDetailRecordMaterialDetailVOList.forEach(
+                          (materialItem, index) => {
+                            materialItem.id = '';
+                            materialItem.onlyCode = wrapItem.onlyCode;
+                            materialItem.no =
+                              materialItem.onlyCode +
+                              index.toString().padStart(4, '0');
+                            materialItem.result =
+                              materialItem.result === null
+                                ? ''
+                                : String(materialItem.result);
+                            materialItem.batchNo = batchNo;
+                            materialItem.minPackingCount = 1;
+                            materialItem.isPack = true;
+                            // 增加内部重量(解决重量未保存同时参与计算问题)
+                            materialItem.initWeight = materialItem.weight;
+                            this.resultArray.push(materialItem);
+                          }
+                        );
+                      }
+                      resolve(wrapItem);
+                    });
+                  }
+                );
+                Promise.all(arr).then((data) => {
+                  console.log(goodsiItem);
+                  goodsiItem.warehouseLedgerDetails = data;
+                  outResolve(goodsiItem);
+                });
+              });
+            });
+            Promise.all(arr).then((data) => {
+              console.log(this.warehousingMaterialList);
+              console.log(this.resultArray);
+              this.warehousingMaterialList = data;
+              if (this.resultArray.length > 0) {
+                this.isSplit = true;
+              }
+            });
+          }
+        });
+        // } else {
+        //   this.formData.bizType = '2';
+        //   this.title = '采购入库';
+        // }
       },
       async pickerSuccess(row) {
         this.pickerRow = row;
@@ -1986,6 +2304,10 @@
         this.formData.extInfo.supplierId = '';
         this.$forceUpdate();
       },
+
+      handleStockOutOrder() {
+        this.$refs.stockOutOrderRef.open();
+      },
       handleOutsourcedOrders() {
         this.$refs.outsourcedOrdersRef.open();
       },
@@ -2538,6 +2860,19 @@
       },
 
       handleSave() {
+        if (this.isOutsourcing) {
+          if (!this.formData.extInfo.documentSource) {
+            this.$message.error('请选择委外申请单!');
+            return false;
+          }
+          let boolen = this.warehousingMaterialList.every(
+            (item) => item.houseList.length > 0
+          );
+          if (!boolen) {
+            this.$message.error('请选择产品仓库!');
+            return false;
+          }
+        }
         this.$refs.formName.validate(async (valid) => {
           if (valid) {
             if (!this.warehousingMaterialList?.length) {
@@ -2564,7 +2899,7 @@
                 manualBatchNo: item.manualBatchNo,
                 batchNo: item.batchNo,
                 categoryId:
-                  this.formData.bizType == 2
+                  this.formData.bizType == 2 || this.formData.bizType == 12
                     ? item.categoryId
                       ? item.categoryId
                       : item.id

+ 189 - 0
src/views/warehouseManagement/stockManagement/components/stockOutOrder.vue

@@ -0,0 +1,189 @@
+<template>
+  <div>
+    <el-dialog
+      title="选择采购订单"
+      :visible.sync="dialogVisible"
+      width="80%"
+      :before-close="handleClose"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+    >
+      <div class="main">
+        <ele-pro-table
+          ref="table"
+          :initLoad="false"
+          :columns="columns"
+          :current.sync="current"
+          highlight-current-row
+          :datasource="datasource"
+          tool-class="ele-toolbar-form"
+          cache-key="systemOrgUserTable"
+          @row-click="chooseRow"
+        >
+          <template v-slot:bizType="{ row }">
+            {{ handleBizType(row.bizType) }}
+          </template>
+          <template v-slot:verifyStatus="{ row }">
+            <span :class="status[row.verifyStatus].class">
+              {{ status[row.verifyStatus].label }}
+            </span>
+          </template>
+          <template v-slot:action="{ row }">
+            <el-radio class="radio" v-model="radio" :label="row.id"
+              ><i></i
+            ></el-radio>
+          </template>
+        </ele-pro-table>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="handleMine">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import { outputSceneState } from '@/utils/dict/index';
+  import outin from '@/api/warehouseManagement/outin';
+  import { purchaseorderreceive } from '@/api/mes';
+  export default {
+    data() {
+      return {
+        status: [
+          { label: '未审核', class: 'ele-text-info' },
+          { label: '审核中', class: 'ele-text-primary' },
+          { label: '审核通过', class: 'ele-text-success' },
+          { label: '驳回', class: 'ele-text-danger' }
+        ],
+        outputSceneState,
+        dataSource: {},
+        dialogVisible: false,
+        pages: {
+          pageNum: 1,
+          size: 10
+        },
+        total: 0,
+        tableData: [],
+        current: {},
+        radio: null,
+        columns: [
+          {
+            type: 'index',
+            label: '序号',
+            width: 50,
+            align: 'center'
+          },
+
+          {
+            prop: 'bizNo',
+            label: '单号',
+            align: 'center',
+            slot: 'bizNo',
+            showOverflowTooltip: true,
+            width: 160
+          },
+          {
+            prop: 'bizType',
+            slot: 'bizType',
+            label: '出库场景',
+            align: 'center',
+            showOverflowTooltip: true,
+            width: 150
+          },
+          {
+            prop: 'sourceBizNo',
+            label: '来源单据',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+          {
+            prop: 'createUserName',
+            label: '领料人',
+            align: 'center',
+            slot: 'createUserName',
+            showOverflowTooltip: true,
+            width: 200
+          },
+          {
+            prop: 'createTime',
+            label: '出库时间',
+            align: 'center',
+            showOverflowTooltip: true,
+            width: 200
+          },
+          {
+            prop: 'verifyStatus',
+            slot: 'verifyStatus',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            width: 120
+          },
+          {
+            prop: 'verifyName',
+            slot: 'verifyName',
+            label: '审核人',
+            align: 'center',
+            showOverflowTooltip: true,
+            width: 120
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 300,
+            align: 'center',
+            slot: 'action',
+            showOverflowTooltip: true
+          }
+        ]
+      };
+    },
+    methods: {
+      handleBizType(code) {
+        for (const key in this.outputSceneState) {
+          if (this.outputSceneState[key].code == code) {
+            return this.outputSceneState[key].label;
+          }
+        }
+      },
+      async handleMine() {
+        if (!this.current) {
+          this.$message.error('请选择出库单');
+        }
+        this.$emit('success', this.current);
+        this.dialogVisible = false;
+      },
+      datasource({ page, limit, where }) {
+        const data = outin.list({
+          pageNum: page,
+          size: limit,
+          bizStatus: 2,
+          type: 2,
+          ...where
+        });
+        this.dataSource = data;
+        return data;
+      },
+      async open() {
+        this.dialogVisible = true;
+        this.$nextTick(() => {
+          this.$refs.table.reload({
+            pageNum: 1,
+            size: 10,
+            where: {}
+          });
+        });
+      },
+      chooseRow(row) {
+        console.log(row);
+        this.current = row;
+        this.radio = row.id;
+      },
+      handleClose(done) {
+        this.dialogVisible = false;
+      }
+    }
+  };
+</script>

+ 10 - 1
src/views/warehouseManagement/stockManagement/details.vue

@@ -172,6 +172,7 @@
                 >
                 </el-table-column>
                 <el-table-column
+                  v-if="clientEnvironmentId != 2"
                   label="批次号"
                   prop="batchNo"
                   width="70"
@@ -334,7 +335,11 @@
             ></el-table-column>
             <el-table-column label="批号" prop="manualBatchNo" width="100">
             </el-table-column>
-            <el-table-column label="批次号" prop="batchNo"></el-table-column>
+            <el-table-column
+              v-if="clientEnvironmentId != 2"
+              label="批次号"
+              prop="batchNo"
+            ></el-table-column>
             <el-table-column
               label="发货条码"
               prop="barcodes"
@@ -442,6 +447,7 @@
             <el-table-column label="批号" prop="manualBatchNo" width="100">
             </el-table-column>
             <el-table-column
+              v-if="clientEnvironmentId != 2"
               label="批次号"
               prop="batchNo"
               width="80"
@@ -620,6 +626,9 @@
       },
       emergencyState() {
         return useDict(emergencyState)(this.infoData.emergencyState);
+      },
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
       }
       // 条码信息
       // materialCodeReqList() {