Browse Source

Merge remote-tracking branch 'origin/master'

Z 2 years ago
parent
commit
93e4d7271f

+ 5 - 6
package.json

@@ -18,15 +18,11 @@
     "@babel/core": "^7.18.13",
     "@bytemd/plugin-gfm": "^1.17.2",
     "@bytemd/vue": "^1.17.2",
+    "@riophae/vue-treeselect": "0.4.0",
     "axios": "^0.27.2",
-
     "bpmn-js": "8.9.0",
     "bpmn-js-properties-panel": "0.46.0",
     "bpmn-js-token-simulation": "0.10.0",
-    "xml-js": "1.6.11",
-    "highlight.js": "9.18.5",
-    "@riophae/vue-treeselect": "0.4.0",
-
     "bytemd": "^1.17.2",
     "core-js": "^3.25.0",
     "countup.js": "^2.3.2",
@@ -37,8 +33,10 @@
     "ele-admin": "^1.11.2",
     "element-ui": "2.15.7",
     "github-markdown-css": "^5.1.0",
+    "highlight.js": "9.18.5",
     "jsbarcode": "^3.11.5",
     "json-bigint": "^1.0.0",
+    "mathjs": "11.11.0",
     "nprogress": "^0.2.0",
     "tinymce": "^5.10.5",
     "vue": "^2.7.10",
@@ -52,7 +50,8 @@
     "vuex": "^3.6.2",
     "vuex-persistedstate": "^4.1.0",
     "xgplayer-vue": "^1.1.5",
-    "xlsx": "^0.18.5"
+    "xlsx": "^0.18.5",
+    "xml-js": "1.6.11"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "^5.0.8",

+ 4 - 5
src/api/classifyManage/index.js

@@ -84,11 +84,10 @@ export async function getDetailById(data) {
 // 来源id查入库详情
 export async function getOutInBySourceBizNo(id) {
   const res = await request.get(`/wms/outin/getOutInBySourceBizNo/${id}`);
-  return res.data;
-  // if (res.data.code == 0) {
-  //   return res.data.data;
-  // }
-  // return Promise.reject(new Error(res.data.message));
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
 }
 // 质检
 export async function updateOutInRecord(data) {

+ 6 - 0
src/main.js

@@ -18,6 +18,12 @@ import DictSelection from '@/components/Dict/DictSelection';
 import HeaderTitle from '@/components/header-title';
 Vue.component('HeaderTitle', HeaderTitle);
 
+import { create, all } from 'mathjs'; // 引入mathjs工具并初始化
+const config = {
+  number: 'BigNumber',
+  precision: 64
+};
+Vue.prototype.$math = create(all, config);
 // // register globally
 // Vue.component('tinymce', TinymceEditor);
 import '@/icons';

+ 0 - 1
src/views/bpm/handleTask/components/purchaseOrder/invoice/detailDialog.vue

@@ -342,7 +342,6 @@
     },
     async created() {
       await this.getDetailData(this.businessId);
-
       try {
         const data = await getOutInBySourceBizNo(this.form.receiveNo);
         console.log('aa==', data);

+ 14 - 269
src/views/bpm/handleTask/components/saleOrder/customerReturnGoods/inboundDetails.vue

@@ -167,7 +167,7 @@
                 required
               >
                 <template slot-scope="{ row, $index }">
-                    <div @click="handleWareHouse(row, $index)">
+                    <div v-if="isEdit" @click="handleWareHouse(row, $index)">
                       <div
                         style="color: #ff4949"
                         v-if="row.houseList.length === 0"
@@ -189,6 +189,7 @@
                         </div>
                       </div>
                     </div>
+										<div v-else>{{ row.position }}</div>
                 </template>
               </el-table-column>
             </el-table-column>
@@ -430,7 +431,7 @@
 
     data() {
       return {
-				isEdit: true,
+				isEdit: true, // 是否可以编辑(货位和质检状态)
 				showTable: true, // 解决set数组Table不刷新问题
         title: '信息',
         qualityStatus: {
@@ -443,48 +444,14 @@
           1: '不合格',
           3: '让步接收'
         }, // 质检结果 0合格 1不合格 3让步接收
-        selectionChangeList: [],
-        selectionChangeList2: [],
-        selectionChangeList3: [],
-        metaList: [],
-        infoData: {},
-        warehousingMaterialList: [],
-        materialCodeReqList: [],
-        tableData2: [],
-        fromUserList: [],
-
-        num: 1,
-        stepsList: [
-          { status: 'Done', nodeName: '创建' },
-          { status: 'Done', nodeName: '暂存', time: '2023-01-06' },
-          { status: 'Done', nodeName: '收货中' },
-          { status: 'Processing', nodeName: '已收货' }
-        ],
-        list: [
-          {
-            name: '紧急',
-            color: 'red'
-          },
-          {
-            name: '重要',
-            color: 'blue'
-          },
-          {
-            name: '已催办',
-            color: 'red'
-          }
-        ],
-        stepsTitle: '已完成',
-        stepsStatus: 'success',
-        active: 0
+        infoData: {}, // 上传入库信息
+        warehousingMaterialList: [], // 物品列表
+        materialCodeReqList: [], // 包装列表
+				metaList: [], // 物料列表
       };
     },
-    watch: {},
     computed: {
       ...mapGetters(['getDictValue'])
-      // tableHeader() {
-      //   return tableHeader(this.infoData?.extInfo?.assetType);
-      // }
     },
     methods: {
 			// 仓库选择
@@ -522,9 +489,7 @@
       },
 			// 仓库编辑
       handleWareHouse(row, idx) {
-				if (this.isEdit) {
 					this.$refs.wareHouseDailogRef.open(row, idx);
-				}
       },
       // 物料维度修改质检改变包装维度质检(结果和状态)
       changeWrapResult() {
@@ -613,21 +578,24 @@
       async initialize() {
         // returnHandleNo 有单据来源说明已入库(被驳回状态)
 				let res = await getOutInBySourceBizNo(this.returnDetailsForm.returnHandleNo)
+				console.log(res)
 				if (this.returnDetailsForm.returnHandleNo && res.code != -1) {
 					this.isEdit = false
 					this.infoData = deepClone(res.data)
 					// 增加是否已经入库字段
 					this.infoData.isStorage = true
 					// 填充遍历数据
-					if (this.infoData.outInDetailAddPOList?.length > 0) {
+					if (this.infoData.outInDetailVOList?.length > 0) {
           this.warehousingMaterialList = []; // 物品列表
           this.materialCodeReqList = []; // 包装列表
           this.metaList = []; // 物料列表
-          this.infoData.outInDetailAddPOList.forEach((goodsiItem) => {
+          this.infoData.outInDetailVOList.forEach((goodsiItem) => {
             this.warehousingMaterialList.push(goodsiItem);
-            goodsiItem.outInDetailRecordAddPOList.forEach((wrapItem) => {
+            goodsiItem.outInDetailRecordVOList.forEach((wrapItem) => {
+							wrapItem.count =
+                wrapItem.outInDetailRecordMaterialDetailVOList.length; // 增加包装计量数量
               this.materialCodeReqList.push(wrapItem);
-              wrapItem.materialDetails.forEach((materialItem) => {
+              wrapItem.outInDetailRecordMaterialDetailVOList.forEach((materialItem) => {
                 this.metaList.push(materialItem);
               });
             });
@@ -754,19 +722,6 @@
         console.log('------------------');
         console.log(this.infoData);
       },
-      handleSave() {
-        if (
-          !this.selectionChangeList2.length &&
-          !this.selectionChangeList3.length
-        )
-          return this.$message.warning('请选择退货明细');
-        let params = [
-          ...this.selectionChangeList2,
-          ...this.selectionChangeList3
-        ];
-        this.$emit('saveDate', params);
-        this.cancel();
-      },
       ...mapActions('dict', ['requestDict'])
     }
   };
@@ -780,133 +735,6 @@
     word-break: break-all;
     white-space: nowrap;
   }
-  .stepsStatus {
-    width: 40%;
-    margin: 0 auto;
-  }
-
-  .p20 {
-    padding: 20px;
-  }
-
-  .flex {
-    display: flex;
-  }
-
-  .title {
-    justify-content: space-between;
-    border-bottom: 1px solid #ccc;
-    padding-bottom: 5px;
-
-    span {
-      font-size: 16px;
-    }
-
-    .col {
-      padding-left: 40px;
-      font-size: 14px;
-      color: #aaaaaa;
-    }
-  }
-
-  .degree {
-    margin-right: 10px;
-    padding: 0px 15px;
-    color: #fff;
-    font-size: 13px;
-    line-height: 23px;
-    border-radius: 23px;
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-
-    span {
-      width: 5px;
-      height: 5px;
-      border-radius: 100%;
-      margin-right: 6px;
-      background-color: #fff;
-    }
-  }
-
-  .red {
-    background-color: rgb(163, 0, 20);
-  }
-
-  .blue {
-    background-color: #1989fa;
-  }
-
-  .createdInfo {
-    justify-content: space-around;
-    margin-top: 10px;
-    font-size: 14px;
-
-    .col {
-      color: #6e6e6e;
-      padding-right: 10px;
-    }
-  }
-
-  .mt40 {
-    margin-top: 40px;
-  }
-
-  .custSteps {
-    margin-top: 20px;
-    margin-left: 70px;
-
-    .box {
-      width: 158px;
-      border: 1px solid #ccc;
-      padding: 10px;
-      flex-direction: row;
-      flex-wrap: wrap;
-      // justify-content: space-between;
-      font-size: 12px;
-      color: #9e9e9e;
-
-      .x {
-        width: 20px;
-        height: 15px;
-        margin-right: 5px;
-      }
-
-      .q {
-        background-color: #d0e4d5;
-      }
-
-      .b {
-        background-color: #1989fa;
-      }
-
-      .g {
-        background-color: #157a2c;
-      }
-
-      .r {
-        background-color: #a30014;
-      }
-
-      .a {
-        align-items: center;
-        margin-bottom: 10px;
-      }
-
-      .mr10 {
-        margin-right: 10px;
-      }
-
-      .mb0 {
-        margin-bottom: 0;
-      }
-    }
-
-    .stepsInfo {
-      // flex: 1;
-      width: 483px;
-    }
-  }
 
   .mt20 {
     margin-top: 20px;
@@ -915,87 +743,4 @@
   .content-detail {
     overflow: hidden;
   }
-
-  .executor {
-    font-size: 14px;
-
-    .col {
-      color: #6e6e6e;
-      padding-right: 10px;
-    }
-  }
-
-  .result {
-    justify-content: space-around;
-  }
-
-  .mr20 {
-    margin-right: 20px;
-  }
-
-  .details {
-    font-size: 14px;
-    margin-bottom: 10px;
-  }
-
-  .customSteps {
-    margin-top: 40px;
-    font-size: 14px;
-    margin-left: 80px;
-
-    .time {
-      font-size: 12px;
-      color: #6e6e6e;
-      margin-right: 20px;
-      position: relative;
-
-      &::after {
-        content: '';
-        width: 1px;
-        height: 100%;
-        background-color: #157a2c;
-        position: absolute;
-        right: -26px;
-      }
-    }
-
-    .flex:last-child {
-      .time {
-        &::after {
-          display: none;
-        }
-      }
-    }
-
-    .round {
-      margin-right: 20px;
-      width: 10px;
-      height: 10px;
-      border-radius: 100%;
-      background-color: #157a2c;
-      position: relative;
-
-      span {
-        position: absolute;
-        top: 50%;
-        left: 50%;
-        width: 4px;
-        height: 4px;
-        background-color: #fff;
-        border-radius: 100%;
-        transform: translate(-2px, -2px);
-      }
-    }
-
-    .text {
-      .info {
-        margin-top: 10px;
-        width: 955px;
-        background-color: #f0f3f3;
-        overflow: hidden;
-        padding: 10px;
-        margin-bottom: 10px;
-      }
-    }
-  }
 </style>

+ 4 - 3
src/views/bpm/handleTask/components/saleOrder/customerReturnGoods/submit.vue

@@ -131,7 +131,8 @@
         this.$refs.formRef.validate(async (validate) => {
           if ((!validate || !data) && !!pass)
             return this.$message.warning('有必填项未填,请检查');
-          if (this.permissionType == 'update') await saleReturnUpdateAPI(data);
+          if (this.permissionType == 'update' && !!pass)
+            await saleReturnUpdateAPI(data);
           let variables = {
             pass: !!pass
           };
@@ -140,7 +141,7 @@
               this.form.userId;
           }
           // 销售退货入库
-          if (this.taskDefinitionKey === 'storeman') {
+          if (this.taskDefinitionKey === 'storeman' && !!pass) {
             // 获取销售退货入库信息
             let storageData = await this.getReturnStorage();
             // 是否已经入库
@@ -158,7 +159,7 @@
                 }
               });
             } else {
-              // 入库来源storageSource 0-正常  1-外部
+              // 入库来源storageSource 0-正常  1-外部(外部跳过内部审核流程)
               storageData.storageSource = 1;
               // 获取货位信息(判断货位信息是否填写)
               let houseListLength = storageData.outInDetailAddPOList.map(

+ 7 - 3
src/views/bpm/handleTask/components/saleOrder/invoice/detailDialog.vue

@@ -323,7 +323,9 @@
             label: '质保期',
             slot: 'guaranteePeriod',
             formatter: (_row, _column, cellValue) => {
-              return (_row.guaranteePeriod||'') + _row.guaranteePeriodUnitName;
+              return (
+                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
+              );
             }
           },
           // {
@@ -350,7 +352,9 @@
             label: '技术图纸',
             slot: 'technicalDrawings',
             formatter: (_row, _column, cellValue) => {
-              return (_row.guaranteePeriod||'') + _row.guaranteePeriodUnitName;
+              return (
+                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
+              );
             }
           },
           {
@@ -373,7 +377,7 @@
       if (this.taskDefinitionKey == 'storemanApprove') {
         this.tabOptions.push({ key: 'outBound', name: '出库单' });
         this.activeComp = 'outBound';
-        this.$emit('activeCompChange','outBound');
+        this.$emit('activeCompChange', 'outBound');
         this.$nextTick(() => {
           this.$refs.add.eomSuccess(this.form);
         });

+ 284 - 73
src/views/bpm/stockManagement/add.vue

@@ -358,7 +358,7 @@
             <el-table
               v-if="isWeight"
               :header-cell-style="rowClass"
-              ref="multipleTable"
+              ref="warehousingMaterialListTable"
               :key="formData.extInfo.assetType"
               :data="warehousingMaterialList"
               tooltip-effect="dark"
@@ -480,13 +480,7 @@
                     >
                       <el-input
                         v-model="row.minPackingCount"
-                        @input="
-                          (value) =>
-                            (row.minPackingCount = value.replace(
-                              /^(0+)|[^\d]+/g,
-                              ''
-                            ))
-                        "
+                        @input="minPackingCountChange(row, $event)"
                       >
                       </el-input>
                     </el-form-item>
@@ -707,6 +701,7 @@
                       </div>
                       <div v-else>
                         <div
+                          class="fontOmitted"
                           v-for="(item, index) in row.houseList"
                           :key="index"
                         >
@@ -800,7 +795,7 @@
           </header-title>
 
           <el-table
-            ref="multipleTable"
+            ref="materialCodeReqListTable"
             :data="materialCodeReqList"
             tooltip-effect="dark"
             :key="formData.bizType"
@@ -824,11 +819,13 @@
               label="编码"
               prop="assetCode"
               width="130"
+              :show-overflow-tooltip="true"
             ></el-table-column>
             <el-table-column
               label="名称"
               prop="assetName"
               width="150"
+              :show-overflow-tooltip="true"
             ></el-table-column>
             <el-table-column
               label="批次号"
@@ -839,6 +836,7 @@
               :label="`包装编码`"
               prop="onlyCode"
               width="130"
+              :show-overflow-tooltip="true"
             ></el-table-column>
             <el-table-column
               label="包装数量"
@@ -925,29 +923,16 @@
                   clearable
                   v-model="row.result"
                   v-if="!row.isPack"
-                  @itemChange="packItem($event, row)"
+                  @updateVal="changeWrapStatus($event, row)"
                 />
-                <span v-else>
-                  <span v-if="row.result == 0">合格</span>
-                  <span v-else-if="row.result == 1">不合格</span>
-                  <span v-else-if="row.result == 3">让步接收</span>
-                  <span v-else-if="row.result == null"></span>
-                </span>
+                <span v-else>{{ qualityResults[row.result] }}</span>
               </template>
             </el-table-column>
             <el-table-column label="质检状态" prop="status" width="120">
               <template slot-scope="{ row }">
-                <DictSelection
-                  dictName="质检状态"
-                  clearable
-                  v-model="row.status"
-                  v-if="!row.isPack"
-                />
-                <span v-else>
-                  <span v-if="row.status == 0">未检</span>
-                  <span v-if="row.status == 1">已检</span>
-                  <span v-if="row.status == null"></span>
-                </span>
+                // <DictSelection // dictName="质检状态" // clearable //
+                v-model="row.status" // v-if="!row.isPack" // />
+                <span>{{ qualityStatus[row.status] }}</span>
               </template>
             </el-table-column>
 
@@ -997,7 +982,7 @@
                 width="200"
               ></el-table-column>
             </template>
-            <el-table-column label="操作" width="80">
+            <el-table-column label="操作" width="80" fixed="right">
               <template slot-scope="{ row }">
                 <el-button type="text" @click="packCout(row)">
                   {{ !row.isPack ? '保存' : '编辑' }}
@@ -1011,7 +996,7 @@
         <div class="mt20" v-if="isDetail">
           <header-title :title="`物料明细`"> </header-title>
           <el-table
-            ref="multipleTable"
+            ref="resultArrayTable"
             :data="resultArray"
             tooltip-effect="dark"
             :key="formData.bizType"
@@ -1023,11 +1008,16 @@
           >
             <el-table-column label="序号" type="index" width="50">
             </el-table-column>
-            <el-table-column label="编码" prop="assetCode"></el-table-column>
+            <el-table-column
+              label="编码"
+              prop="assetCode"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
             <el-table-column
               label="名称"
               prop="assetName"
               width="200"
+              :show-overflow-tooltip="true"
             ></el-table-column>
             <el-table-column
               label="批次号"
@@ -1038,6 +1028,7 @@
               label="物料编码"
               prop="no"
               width="200"
+              :show-overflow-tooltip="true"
             ></el-table-column>
             <el-table-column
               label="计量数量"
@@ -1057,7 +1048,7 @@
               <template slot-scope="{ row }">
                 <el-input
                   v-model="row.materielCode"
-                  v-if="!row.isMeta"
+                  v-if="!row.isPack"
                 ></el-input>
                 <span v-else>{{ row.materialCode }}</span>
               </template>
@@ -1070,7 +1061,7 @@
               <template slot-scope="{ row }">
                 <el-input
                   v-model="row.clientCode"
-                  v-if="!row.isMeta"
+                  v-if="!row.isPack"
                 ></el-input>
                 <span v-else> {{ row.clientCode }}</span>
               </template>
@@ -1081,7 +1072,7 @@
               prop="engrave"
             >
               <template slot-scope="{ row }">
-                <el-input v-model="row.engrave" v-if="!row.isMeta"></el-input>
+                <el-input v-model="row.engrave" v-if="!row.isPack"></el-input>
                 <span v-else> {{ row.engrave }}</span>
               </template>
             </el-table-column>
@@ -1092,7 +1083,7 @@
               prop="weight"
             >
               <template slot-scope="{ row }">
-                <el-input v-model="row.weight" v-if="!row.isMeta"></el-input>
+                <el-input v-model="row.weight" v-if="!row.isPack"></el-input>
                 <span v-else>{{ row.weight }}</span>
               </template>
             </el-table-column>
@@ -1100,10 +1091,8 @@
               v-if="formData.bizType == 2 || formData.bizType == 1"
               label="重量单位"
               prop="weightUnit"
+              width="100"
             >
-              <template slot-scope="{ row }">
-                {{ row.weightUnit }}
-              </template>
             </el-table-column>
             <el-table-column label="质检结果" prop="result" width="120">
               <template slot-scope="{ row }">
@@ -1111,36 +1100,21 @@
                   dictName="质检结果"
                   clearable
                   v-model="row.result"
-                  v-if="!row.isMeta"
-                  @itemChange="packItem($event, row)"
+                  v-if="!row.isPack"
+                  @updateVal="changeWrapStatus($event, row)"
                 />
-                <span v-else>
-                  <span v-if="row.result == 0">合格</span>
-                  <span v-else-if="row.result == 1">不合格</span>
-                  <span v-else-if="row.result == 3">让步接收</span>
-                  <span v-else-if="row.result == null"></span>
-                </span>
+                <span v-else>{{ qualityResults[row.result] }}</span>
               </template>
             </el-table-column>
             <el-table-column label="质检状态" prop="status" width="120">
               <template slot-scope="{ row }">
-                <DictSelection
-                  dictName="质检状态"
-                  clearable
-                  v-model="row.status"
-                  v-if="!row.isMeta"
-                />
-                <span v-else>
-                  <span v-if="row.status == 0">未检</span>
-                  <span v-if="row.status == 1">已检</span>
-                  <span v-if="row.status == null"></span>
-                </span>
+                <span>{{ qualityStatus[row.status] }}</span>
               </template>
             </el-table-column>
             <el-table-column label="操作" width="80">
               <template slot-scope="{ row }">
-                <el-button type="text" @click="packMeta(row)">
-                  {{ !row.isMeta ? '保存' : '编辑' }}
+                <el-button type="text" @click="materialBtn(row)">
+                  {{ !row.isPack ? '保存' : '编辑' }}
                 </el-button>
               </template>
             </el-table-column>
@@ -1242,6 +1216,18 @@
     },
     data() {
       return {
+        showMaterialTable: true, // 缓存包装明细列表
+        isSplit: false, // 是否拆分到物料明细
+        qualityStatus: {
+          0: '未检',
+          1: '已检',
+          2: '部分检'
+        }, // 质检状态 0未检 1已检
+        qualityResults: {
+          0: '合格',
+          1: '不合格',
+          3: '让步接收'
+        }, // 质检结果 0合格 1不合格 3让步接收
         isTask: false,
         isWeight: true,
         resultArray: [],
@@ -1335,9 +1321,25 @@
       this.initData();
     },
     methods: {
-      //包装结果
-      packItem(val, row) {
-        row.status = '1';
+      // 包装维度最小包装单元改变——>总重量
+      minPackingCountChange(row, value) {
+        row.minPackingCount = value.replace(/^(0+)|[^\d]+/g, '');
+        if (row.outInNum >= 0 && value >= 0) {
+          this.packNum(row, row.outInNum);
+        }
+      },
+      // 选择质检结果改变质检状态
+      changeWrapStatus(resultValue, row) {
+        switch (resultValue) {
+          case '':
+            // 清空质检状态
+            row.status = '0';
+            break;
+          default:
+            // 默认已检质检状态
+            row.status = '1';
+            break;
+        }
       },
       cancel() {
         this.$emit('cancel');
@@ -1358,10 +1360,14 @@
         }
       },
       handleIsDetail(event) {
+        this.isSplit = event;
+        const list = this.materialCodeReqList;
         if (event) {
-          const list = this.materialCodeReqList;
           let resultArray = [];
           list.forEach((item) => {
+            // 包装维度改成已保存状态
+            item.isPack = true;
+            // 拆分物料维度并生成列表
             for (let i = 1; i <= Number(item.minPackingCount); i++) {
               resultArray.push({
                 onlyCode: item.onlyCode,
@@ -1378,21 +1384,28 @@
                 engrave: item.engrave,
                 result: item.result,
                 status: item.status,
-                isMeta: false
+                isPack: false
               });
             }
           });
+
           this.resultArray = resultArray;
+          // 批量修改包装明细
+          this.isWeight = false;
+          this.bulkEditingWrap();
+          this.$nextTick(() => {
+            this.isWeight = true;
+          });
         } else {
+          // 包装维度改成编辑状态
+          list.forEach((item) => {
+            item.isPack = false;
+          });
+          // 清空物料维度列表
           this.resultArray = [];
         }
-        console.log('this.resultArray', this.resultArray);
       },
       //包装明细保存
-      packMeta(row) {
-        console.log(row);
-        row.isMeta = !row.isMeta;
-      },
       packCout(row) {
         //true保存==》反之
         if (!row.isPack) {
@@ -1407,7 +1420,7 @@
           //   (acc, curr) => acc + curr.weight,
           //   0
           // );
-
+          // 修改产品信息重量(包装维度累计)
           this.isWeight = false;
           this.warehousingMaterialList.forEach((item) => {
             if (item.assetCode == code && item.batchNo == batchNo) {
@@ -1420,7 +1433,11 @@
                   arr.push({ ...this.materialCodeReqList[key] });
                 }
               }
-              const count = arr.reduce((acc, curr) => acc + curr.weight, 0);
+              const count = arr.reduce(
+                (acc, curr) =>
+                  Number(this.$math.format(+acc + +curr.weight, 14)),
+                0
+              );
               this.$set(item, 'weight', count);
             }
           });
@@ -1434,16 +1451,163 @@
 
         // }, 100);
       },
+      // 批量修改包装明细
+      bulkEditingWrap() {
+        // 批量修改包装明细列表状态(已保存)
+        this.materialCodeReqList.forEach((item) => {
+          item.isPack = true;
+        });
+        // 改变产品明细重量
+        this.warehousingMaterialList.forEach((outItem) => {
+          let arr = [];
+          this.materialCodeReqList.forEach((inneritem) => {
+            if (
+              inneritem.assetCode == outItem.assetCode &&
+              inneritem.batchNo == outItem.batchNo
+            ) {
+              arr.push(inneritem);
+            }
+          });
+          const count = arr.reduce(
+            (acc, curr) => Number(this.$math.format(+acc + +curr.weight, 14)),
+            0
+          );
+          this.$set(outItem, 'weight', count);
+        });
+      },
+      // 批量修改物料明细
+      bulkEditingMaterial() {
+        // 批量修改物料明细列表状态(已保存)
+        this.resultArray.forEach((item) => {
+          item.isPack = true;
+        });
+        // 改变包装明细重量
+        this.materialCodeReqList.forEach((outItem) => {
+          let arr = [];
+          this.resultArray.forEach((inneritem) => {
+            if (
+              inneritem.assetCode == outItem.assetCode &&
+              inneritem.batchNo == outItem.batchNo
+            ) {
+              arr.push(inneritem);
+            }
+          });
+          const count = arr.reduce(
+            (acc, curr) => Number(this.$math.format(+acc + +curr.weight, 14)),
+            0
+          );
+          this.$set(outItem, 'weight', count);
+        });
+      },
+      // 物料明细保存
+      materialBtn(row) {
+        console.log(row);
+        console.log(this.resultArray);
+        console.log(this.materialCodeReqList);
+        // true保存 false编辑
+        if (!row.isPack) {
+          row.isPack = true;
+          // 物料维度修改质检改变包装维度质检(结果和状态)
+          this.materialCodeReqList.forEach((outItem) => {
+            let arr = [];
+            this.resultArray.forEach((inneritem) => {
+              if (inneritem.onlyCode == outItem.onlyCode) {
+                arr.push(inneritem);
+              }
+            });
+            console.log(arr);
+            // 首先判断是未填/合格不合格
+            let boolen = arr.every((item) => {
+              return item.result === '' || item.result === undefined;
+            });
+            // 判断只要物料全部质检结果(未填)——>包装质检结果(未填) 状态(未检)
+            if (boolen) {
+              this.$set(outItem, 'result', '');
+              this.$set(outItem, 'status', '0');
+            } else {
+              // 判断只要物料有一个质检结果(不合格)——>包装质检结果(不合格) 状态(已检)
+              let boolen = arr.some((item) => {
+                return item.result === '1';
+              });
+              if (boolen) {
+                this.$set(outItem, 'result', '1');
+                this.$set(outItem, 'status', '1');
+              } else {
+                // 判断只要物料有一个质检结果(让步接收)——>包装质检结果(让步接收) 状态(已检)
+                let boolen = arr.some((item) => {
+                  return item.result === '3';
+                });
+                if (boolen) {
+                  // 让步接收 已检
+                  this.$set(outItem, 'result', '3');
+                  this.$set(outItem, 'status', '1');
+                } else {
+                  // 判断只要物料有全部质检结果(合格)——>包装质检结果(合格) 状态(已检)
+                  let boolen = arr.every((item) => {
+                    return item.result === '0';
+                  });
+                  if (boolen) {
+                    // 合格 已检
+                    this.$set(outItem, 'result', '0');
+                    this.$set(outItem, 'status', '1');
+                  } else {
+                    // 合格 部分检
+                    this.$set(outItem, 'result', '0');
+                    this.$set(outItem, 'status', '2');
+                  }
+                }
+              }
+            }
+            // this.$set(outItem, 'result', boolen ? '1' : '0');
+          });
+          // 物料维度修改重量改变包装维度重量
+          let onlyCode = row.onlyCode;
+          this.materialCodeReqList.forEach((item) => {
+            if (item.onlyCode === onlyCode) {
+              let arr = [];
+              for (const key in this.resultArray) {
+                if (this.resultArray[key].onlyCode == item.onlyCode) {
+                  arr.push({ ...this.resultArray[key] });
+                }
+              }
+              const count = arr.reduce(
+                (acc, curr) =>
+                  Number(this.$math.format(+acc + +curr.weight, 14)),
+                0
+              );
+              this.$set(item, 'weight', count);
+            }
+          });
+          // 包装维度修改重量改变产品信息
+          this.isWeight = false;
+          // 批量修改包装明细
+          this.bulkEditingWrap();
+          this.$nextTick(() => {
+            this.isWeight = true;
+          });
+        } else {
+          row.isPack = false;
+        }
+      },
       packNum(row, value) {
         const total = {
           packingCount: Number(row.minPackingCount),
           outInNum: Number(row.outInNum)
         };
         if (row.measuringUnit == row.weightUnit) {
-          row.weight = total.packingCount * 1 * total.outInNum.toFixed(2);
+          row.weight = Number(
+            this.$math.format(
+              total.packingCount * 1 * total.outInNum.toFixed(2),
+              14
+            )
+          );
         } else {
-          const totals = total.packingCount * total.outInNum;
-          row.weight = totals * row.netWeight.toFixed(2);
+          const totals = Number(
+            this.$math.format(total.packingCount * total.outInNum, 14)
+          );
+          row.weight = Number(
+            this.$math.format(totals * row.netWeight.toFixed(2), 14)
+          );
         }
         return (row.outInNum = value.replace(/^(0+)|[^\d]+/g, ''));
       },
@@ -2267,6 +2431,35 @@
       houseData(argum, idx) {
         this.$set(this.warehousingMaterialList[idx], 'houseList', argum);
       }
+    },
+    watch: {
+      // 解决右侧悬浮操作栏不对称问题
+      warehousingMaterialList: {
+        handler() {
+          this.$nextTick(() => {
+            this.$refs.warehousingMaterialListTable.doLayout();
+          });
+        },
+        deep: true
+      },
+      // 解决右侧悬浮操作栏不对称问题
+      materialCodeReqList: {
+        handler() {
+          this.$nextTick(() => {
+            this.$refs.materialCodeReqListTable.doLayout();
+          });
+        },
+        deep: true
+      },
+      // 解决右侧悬浮操作栏不对称问题
+      resultArray: {
+        handler() {
+          this.$nextTick(() => {
+            this.$refs.resultArrayTable.doLayout();
+          });
+        },
+        deep: true
+      }
     }
   };
 </script>
@@ -2321,4 +2514,22 @@
     border-right: 1px solid rgba(222, 222, 222, 1);
     border-left: 1px solid rgba(222, 222, 222, 1);
   }
+
+  .fontOmitted {
+    text-overflow: ellipsis;
+    overflow: hidden;
+    word-break: break-all;
+    white-space: nowrap;
+  }
+  .table-fixed {
+    .el-table__fixed-right {
+      height: 100% !important;
+    }
+    .el-table__fixed-left {
+      height: 100% !important;
+    }
+    .el-table__fixed {
+      height: 100% !important;
+    }
+  }
 </style>