Explorar el Código

添加mathjs、入库修改

huang_an hace 2 años
padre
commit
281959ad30

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 14205 - 1
package-lock.json


+ 1 - 0
package.json

@@ -27,6 +27,7 @@
     "github-markdown-css": "^5.1.0",
     "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",

+ 6 - 0
src/main.js

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

+ 5 - 1
src/utils/request.js

@@ -45,7 +45,11 @@ service.interceptors.response.use(
   (res) => {
     // token 自动续期
     if (res.data.code == '-1' && res.config?.showErrorToast !== false) {
-      Message.error(res.data.message);
+      Message({
+        showClose: true,
+        message: res.data.message,
+        type: 'error'
+      });
     }
     const token = res.headers[TOKEN_HEADER_NAME.toLowerCase()];
     if (token) {

+ 2 - 2
src/views/warehouseManagement/outgoingManagement/add.vue

@@ -1451,8 +1451,8 @@
           (item) => item.id === info.deptId[info.deptId.length - 1]
         );
         console.log('obj=====', obj);
-        this.formData.extInfo.deptName = obj.name;
-        this.formData.extInfo.deptCode = obj.id;
+        this.formData.extInfo.deptName = obj?.name;
+        this.formData.extInfo.deptCode = obj?.id;
         this.formData.extInfo.createUserName = info.name;
         this.formData.createUserId = info.userId;
       },

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

@@ -151,265 +151,519 @@
     data() {
       return {
         searchForm: {
-          dimension: 1
+          dimension: '1'
         },
-        isShow: false,
-        isPack: false,
-        isMeta: false,
-        selectedDime: 1
+        selectedDime: '1'
       };
     },
     computed: {
       // 表格列配置
       columns() {
-        let obj = [
-          {
-            columnKey: 'index',
-            type: 'index',
-            width: 50,
-            align: 'center',
-            label: '序号',
-            showOverflowTooltip: true,
-            fixed: 'left'
-          },
-
-          {
-            prop: 'code',
-            label: '编码',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'name',
-            label: '名称',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'brandNum',
-            label: '牌号',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'modelType',
-            label: '型号',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'specification',
-            label: '规格',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'packingCountBase',
-            label: '包装库存数量',
-            sortable: 'custom',
-            showOverflowTooltip: true,
-            width: 130,
-            align: 'center'
-          },
-          {
-            prop: 'minUnit',
-            label: '包装单位',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'minPackingCount',
-            slot: 'minPackingCount',
-            label: '最小包装单元',
-            showOverflowTooltip: true,
-            width: 120
-          },
-          {
-            prop: 'availableCountBase',
-            label: '计量库存数量',
-            sortable: 'custom',
-            showOverflowTooltip: true,
-            width: 130,
-            align: 'center'
-          },
-          {
-            prop: 'measuringUnit',
-            label: '计量单位',
-            align: 'center'
-          },
-          {
-            prop: 'expirationDate',
-            slot: 'expirationDate',
-            label: '库存保质期',
-            showOverflowTooltip: true,
-            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: 'paths',
-            width: 230,
-            label: '仓库',
-            showOverflowTooltip: true
-          },
-          // {
-          //   prop: '',
-          //   label: '安全库存',
-          //   showOverflowTooltip: true
-          // },
-          // {
-          //   prop: '',
-          //   label: '质保期',
-          //   showOverflowTooltip: true
-          // },
-          {
-            columnKey: 'action',
-            label: '操作',
-            width: 100,
-            align: 'left',
-            resizable: false,
-            slot: 'action',
-            fixed: 'right'
-          }
-        ];
-        if (this.isShow) {
-          obj.splice(1, 0, {
-            slot: 'batchNo',
-            prop: 'batchNo',
-            label: '批次号',
-            showOverflowTooltip: true
-          });
-          let index = obj.findIndex((item) => item.label == '仓库');
-          if (index !== -1) {
-            obj.splice(index, 1);
-          }
+        // selectedDime 1物品维度 2批次维度 3包装维度 4物料维度
+        switch (this.selectedDime) {
+          // 物品维度
+          case '1':
+            return [
+              {
+                columnKey: 'index',
+                type: 'index',
+                width: 50,
+                align: 'center',
+                label: '序号',
+                showOverflowTooltip: true,
+                fixed: 'left'
+              },
+              {
+                prop: 'code',
+                label: '编码',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'name',
+                label: '名称',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'brandNum',
+                label: '牌号',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'modelType',
+                label: '型号',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'specification',
+                label: '规格',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'availableCountBase',
+                label: '计量库存数量',
+                sortable: 'custom',
+                showOverflowTooltip: true,
+                width: 130,
+                align: 'center'
+              },
+              {
+                prop: 'measuringUnit',
+                label: '计量单位',
+                align: 'center'
+              },
+              {
+                prop: 'weight',
+                label: '重量',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'weightUnit',
+                label: '重量单位',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'expirationDate',
+                slot: 'expirationDate',
+                label: '库存保质期',
+                showOverflowTooltip: true,
+                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: 'paths',
+                width: 230,
+                label: '仓库',
+                showOverflowTooltip: true
+              },
+              {
+                columnKey: 'action',
+                label: '操作',
+                width: 100,
+                align: 'left',
+                resizable: false,
+                slot: 'action',
+                fixed: 'right'
+              }
+            ];
+          // 批次维度
+          case '2':
+            return [
+              {
+                columnKey: 'index',
+                type: 'index',
+                width: 50,
+                align: 'center',
+                label: '序号',
+                showOverflowTooltip: true,
+                fixed: 'left'
+              },
+              {
+                slot: 'batchNo',
+                prop: 'batchNo',
+                label: '批次号',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'code',
+                label: '编码',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'name',
+                label: '名称',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'brandNum',
+                label: '牌号',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'modelType',
+                label: '型号',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'specification',
+                label: '规格',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'packingCountBase',
+                label: '包装库存数量',
+                sortable: 'custom',
+                showOverflowTooltip: true,
+                width: 130,
+                align: 'center'
+              },
+              {
+                prop: 'minUnit',
+                label: '包装单位',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'minPackingCount',
+                slot: 'minPackingCount',
+                label: '最小包装单元',
+                showOverflowTooltip: true,
+                width: 120
+              },
+              {
+                prop: 'availableCountBase',
+                label: '计量库存数量',
+                sortable: 'custom',
+                showOverflowTooltip: true,
+                width: 130,
+                align: 'center'
+              },
+              {
+                prop: 'measuringUnit',
+                label: '计量单位',
+                align: 'center'
+              },
+              {
+                prop: 'weight',
+                label: '重量',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'weightUnit',
+                label: '重量单位',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'expirationDate',
+                slot: 'expirationDate',
+                label: '库存保质期',
+                showOverflowTooltip: true,
+                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
+              },
+              {
+                columnKey: 'action',
+                label: '操作',
+                width: 100,
+                align: 'left',
+                resizable: false,
+                slot: 'action',
+                fixed: 'right'
+              }
+            ];
+          // 包装维度
+          case '3':
+            return [
+              {
+                columnKey: 'index',
+                type: 'index',
+                width: 50,
+                align: 'center',
+                label: '序号',
+                showOverflowTooltip: true,
+                fixed: 'left'
+              },
+              {
+                slot: 'batchNo',
+                prop: 'batchNo',
+                label: '批次号',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'packagingCode',
+                label: '包装编码',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'codeNumber',
+                label: '编号',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'name',
+                label: '名称',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'brandNum',
+                label: '牌号',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'modelType',
+                label: '型号',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'specification',
+                label: '规格',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'packingCountBase',
+                label: '包装库存数量',
+                sortable: 'custom',
+                showOverflowTooltip: true,
+                width: 130,
+                align: 'center'
+              },
+              {
+                prop: 'minUnit',
+                label: '包装单位',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'minPackingCount',
+                slot: 'minPackingCount',
+                label: '最小包装单元',
+                showOverflowTooltip: true,
+                width: 120
+              },
+              {
+                prop: 'availableCountBase',
+                label: '计量库存数量',
+                sortable: 'custom',
+                showOverflowTooltip: true,
+                width: 130,
+                align: 'center'
+              },
+              {
+                prop: 'measuringUnit',
+                label: '计量单位',
+                align: 'center'
+              },
+              {
+                prop: 'weight',
+                label: '重量',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'weightUnit',
+                label: '重量单位',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'expirationDate',
+                slot: 'expirationDate',
+                label: '库存保质期',
+                showOverflowTooltip: true,
+                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: 'paths',
+                width: 230,
+                label: '仓库',
+                showOverflowTooltip: true
+              },
+              {
+                columnKey: 'action',
+                label: '操作',
+                width: 100,
+                align: 'left',
+                resizable: false,
+                slot: 'action',
+                fixed: 'right'
+              }
+            ];
+          // 物料维度
+          default:
+            return [
+              {
+                columnKey: 'index',
+                type: 'index',
+                width: 50,
+                align: 'center',
+                label: '序号',
+                showOverflowTooltip: true,
+                fixed: 'left'
+              },
+              {
+                slot: 'batchNo',
+                prop: 'batchNo',
+                label: '批次号',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'no',
+                label: '物料编码',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'codeNumber',
+                label: '编号',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'name',
+                label: '名称',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'brandNum',
+                label: '牌号',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'modelType',
+                label: '型号',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'specification',
+                label: '规格',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'meterielCode',
+                label: '物料代号',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'clientCode',
+                label: '客户代号',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'engrave',
+                label: '刻码',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'availableCountBase',
+                label: '计量库存数量',
+                sortable: 'custom',
+                showOverflowTooltip: true,
+                width: 130,
+                align: 'center'
+              },
+              {
+                prop: 'measuringUnit',
+                label: '计量单位',
+                align: 'center'
+              },
+              {
+                prop: 'weight',
+                label: '重量',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'weightUnit',
+                label: '重量单位',
+                showOverflowTooltip: true
+              },
+              {
+                prop: 'expirationDate',
+                slot: 'expirationDate',
+                label: '库存保质期',
+                showOverflowTooltip: true,
+                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: 'paths',
+                width: 230,
+                label: '仓库',
+                showOverflowTooltip: true
+              },
+              {
+                columnKey: 'action',
+                label: '操作',
+                width: 100,
+                align: 'left',
+                resizable: false,
+                slot: 'action',
+                fixed: 'right'
+              }
+            ];
         }
-        if (this.isPack) {
-          obj.splice(1, 0, {
-            slot: 'batchNum',
-            prop: 'batchNum',
-            label: '批次号',
-            showOverflowTooltip: true
-          });
-          // 寻找现有的 'code' 对象的索引
-          let codeIndex = obj.findIndex((item) => item.prop === 'code');
-
-          if (codeIndex !== -1) {
-            // 删除现有的 'code' 对象
-            obj.splice(codeIndex, 1, {
-              prop: 'packagingCode',
-              label: '包装编码',
-              showOverflowTooltip: true
-            });
-          }
-        }
-        if (this.isMeta) {
-          obj.splice(1, 0, {
-            slot: 'batchNum',
-            prop: 'batchNum',
-            label: '批次号',
-            showOverflowTooltip: true
-          });
-          obj.splice(10, 0, {
-            prop: 'weight',
-            label: '重量',
-            showOverflowTooltip: true
-          });
-          obj.splice(11, 0, {
-            prop: 'weightUnit',
-            label: '重量单位',
-            showOverflowTooltip: true
-          });
-          obj.splice(7, 0, {
-            prop: 'meterielCode',
-            label: '物料代号',
-            showOverflowTooltip: true
-          });
-          obj.splice(8, 0, {
-            prop: 'clientCode',
-            label: '客户代号',
-            showOverflowTooltip: true
-          });
-
-          obj.splice(9, 0, {
-            prop: 'engrave',
-            label: '刻码',
-            showOverflowTooltip: true
-          });
-          // 寻找现有的 'code' 对象的索引
-          let codeIndex = obj.findIndex((item) => item.prop === 'code');
-
-          if (codeIndex !== -1) {
-            // 删除现有的 'code' 对象
-            obj.splice(codeIndex, 1, {
-              prop: 'no',
-              label: '物料编码',
-              showOverflowTooltip: true
-            });
-          }
-        }
-        return obj;
       }
     },
     methods: {
       handledime(val) {
-        this.$set(this, 'isShow', val == 2);
-        this.$set(this, 'isPack', val == 3);
-        this.$set(this, 'isMeta', val == 4);
-        // this.reload({
-        //   ...this.$refs.refSeavch.params,
-        //   dimension: this.$refs.refSeavch.dimension
-        // });
-        // if (val == 2) {
-        //   // this.handleBatchDimension(val);
-        //   this.reload();
-        // } else if (val == 3) {
-        //   this.handleInventoryDimension(val);
-        // }else{}
-        this.reload();
         this.selectedDime = val;
-      },
-      //批次维度
-      async handleBatchDimension(event) {
-        // const treeId = this.$parent.$parent.$parent.current.id;
-        // const params = {
-        //   page: 1,
-        //   size: 10,
-        //   categoryLevelId: treeId
-        // };
-        // const res = await getBatchDetails(params);
-        // console.log(res);
-        // 待完善
-      },
-      //库存维度
-      async handleInventoryDimension(val) {
-        // const treeId = this.$parent.$parent.$parent.current.id;
-        // const rep = await ouint.getInventoryDetails({
-        //   pageNum: 1,
-        //   size: 10,
-        //   categoryLevelId: treeId
-        // });
-        // console.log(rep);
-        //待完善
+        this.reload();
       },
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
         const dimension = this.$refs.refSeavch.dimension;
         const treeId = this.$parent.$parent.$parent.current.id;
         if (this.selectedDime == 1) {
+          // 物品维度
           const data = ouint.getRealTimeInventory({
             ...where,
             ...order,
@@ -434,6 +688,7 @@
           });
           return result;
         } else if (this.selectedDime == 2) {
+          // 物品维度
           const params = {
             categoryLevelId: treeId,
             ...where,
@@ -463,6 +718,7 @@
           });
           return result;
         } else if (this.selectedDime == 4) {
+          // 物料维度
           const params = {
             categoryLevelId: treeId,
             ...where,
@@ -498,6 +754,7 @@
           console.log(result);
           return result;
         } else {
+          // 包装维度
           const params = {
             categoryLevelId: treeId,
             ...where,

+ 122 - 23
src/views/warehouseManagement/stockManagement/add.vue

@@ -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>
@@ -1144,6 +1138,7 @@
 </template>
 
 <script>
+  import { add, bignumber } from 'mathjs';
   import picker from './components/picker.vue';
   import outin from '@/api/warehouseManagement/outin';
   import {
@@ -1186,8 +1181,16 @@
       return {
         showMaterialTable: true, // 缓存包装明细列表
         isSplit: false, // 是否拆分到物料明细
-        qualityStatus: ['未检', '已检'], // 质检状态 0未检 1已检
-        qualityResults: ['合格', '不合格', '让步接收'], // 质检结果 0合格 1不合格 2让步接收
+        qualityStatus: {
+          0: '未检',
+          1: '已检',
+          2: '部分检'
+        }, // 质检状态 0未检 1已检
+        qualityResults: {
+          0: '合格',
+          1: '不合格',
+          3: '让步接收'
+        }, // 质检结果 0合格 1不合格 3让步接收
         isWeight: true,
         resultArray: [],
         isDetail: false,
@@ -1280,6 +1283,13 @@
       this.initData();
     },
     methods: {
+      // 包装维度最小包装单元改变——>总重量
+      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) {
@@ -1382,7 +1392,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);
             }
           });
@@ -1413,7 +1427,10 @@
               arr.push(inneritem);
             }
           });
-          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(outItem, 'weight', count);
         });
       },
@@ -1434,7 +1451,10 @@
               arr.push(inneritem);
             }
           });
-          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(outItem, 'weight', count);
         });
       },
@@ -1442,10 +1462,63 @@
       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) => {
@@ -1456,13 +1529,15 @@
                   arr.push({ ...this.resultArray[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);
             }
           });
           // 包装维度修改重量改变产品信息
-          console.log(this.warehousingMaterialList);
-          console.log(this.materialCodeReqList);
           this.isWeight = false;
           // 批量修改包装明细
           this.bulkEditingWrap();
@@ -1479,10 +1554,19 @@
           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, ''));
       },
@@ -1840,13 +1924,15 @@
         );
         const num = list.reduce((num, pre) => {
           num += row.isUnpack
-            ? pre.outInNum * pre.minPackingCount
+            ? Number(this.$math.format(pre.outInNum * pre.minPackingCount, 14))
             : pre.outInNum - 0;
           return num;
         }, 0);
 
         const nums = list.reduce((num, pre) => {
-          num += pre.outInNum * pre.minPackingCount;
+          num += Number(
+            this.$math.format(pre.outInNum * pre.minPackingCount, 14)
+          );
 
           return num;
         }, 0);
@@ -1870,7 +1956,12 @@
               Array.from(
                 new Array(
                   item.isUnpack
-                    ? item.outInNum * item.minPackingCount
+                    ? Number(
+                        this.$math.format(
+                          item.outInNum * item.minPackingCount,
+                          14
+                        )
+                      )
                     : // : item.measuringUnit == 'PCS'
                       // ? +item.outInNum * parseInt(item.minPackingCount)
                       +item.outInNum
@@ -1914,7 +2005,12 @@
                     this.$set(
                       i,
                       'weight',
-                      1 * item.minPackingCount * item.netWeight
+                      Number(
+                        this.$math.format(
+                          1 * item.minPackingCount * item.netWeight,
+                          14
+                        )
+                      )
                     );
                   }
 
@@ -2057,7 +2153,10 @@
             ) {
               return this.$message.error('请保存入库明细!');
             }
-
+            console.log(
+              'this.warehousingMaterialList---',
+              this.warehousingMaterialList
+            );
             this.formatWarehouseMaterialList();
 
             let arr = this.warehousingMaterialList.map((item) => {

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio