Parcourir la source

Merge remote-tracking branch 'origin/dev' into dev

001295 il y a 1 an
Parent
commit
ea2b09192d

+ 8 - 0
src/components/popover-select/components/MATERIAL_PARAM.js

@@ -16,6 +16,14 @@ export default [
     attr: {},
   },
   {
+    item: { key: "packExplain", title: "包装", width: "auto" },
+    attr: {},
+  },
+  {
+    item: { key: "model", title: "型号", width: "auto" },
+    attr: {},
+  },
+  {
     item: { key: "unitIdName", title: "单位", width: "auto" },
     attr: {},
   },

+ 82 - 62
src/views/WMS/historical-route/index.vue

@@ -638,86 +638,90 @@
       listSplitting(dataCar, dataBox) {
         let differenceValueCar;
         let arr2 = [];
-        for (let i = 0; i < dataCar.length; i++) {
-          let arr3 = [];
-          // 向上取整差值
-          differenceValueCar = Math.ceil(dataCar[i].length / 5);
-          for (let j = 0; j < dataCar[i].length; j++) {
-            if (j == differenceValueCar) {
-              for (let z = 0; z < differenceValueCar; z++) {
-                dataCar[i][z].temperature1 = dataCar[i][j + z].temperature;
-                dataCar[i][z].hisDate1 = dataCar[i][j + z].hisDate;
+        if (dataCar != null && dataCar != '') {
+          for (let i = 0; i < dataCar.length; i++) {
+            let arr3 = [];
+            // 向上取整差值
+            differenceValueCar = Math.ceil(dataCar[i].length / 5);
+            for (let j = 0; j < dataCar[i].length; j++) {
+              if (j == differenceValueCar) {
+                for (let z = 0; z < differenceValueCar; z++) {
+                  dataCar[i][z].temperature1 = dataCar[i][j + z].temperature;
+                  dataCar[i][z].hisDate1 = dataCar[i][j + z].hisDate;
+                }
               }
-            }
-            if (j == differenceValueCar * 2) {
-              for (let z = 0; z < differenceValueCar; z++) {
-                dataCar[i][z].temperature2 = dataCar[i][j + z].temperature;
-                dataCar[i][z].hisDate2 = dataCar[i][j + z].hisDate;
+              if (j == differenceValueCar * 2) {
+                for (let z = 0; z < differenceValueCar; z++) {
+                  dataCar[i][z].temperature2 = dataCar[i][j + z].temperature;
+                  dataCar[i][z].hisDate2 = dataCar[i][j + z].hisDate;
+                }
               }
-            }
-            if (j == differenceValueCar * 3) {
-              for (let z = 0; z < differenceValueCar; z++) {
-                dataCar[i][z].temperature3 = dataCar[i][j + z].temperature;
-                dataCar[i][z].hisDate3 = dataCar[i][j + z].hisDate;
+              if (j == differenceValueCar * 3) {
+                for (let z = 0; z < differenceValueCar; z++) {
+                  dataCar[i][z].temperature3 = dataCar[i][j + z].temperature;
+                  dataCar[i][z].hisDate3 = dataCar[i][j + z].hisDate;
+                }
               }
-            }
-            if (j == differenceValueCar * 4) {
-              for (let z = 0; z < differenceValueCar; z++) {
-                if (j + z < dataCar[i].length) {
-                  dataCar[i][z].temperature4 = dataCar[i][j + z].temperature;
-                  dataCar[i][z].hisDate4 = dataCar[i][j + z].hisDate;
+              if (j == differenceValueCar * 4) {
+                for (let z = 0; z < differenceValueCar; z++) {
+                  if (j + z < dataCar[i].length) {
+                    dataCar[i][z].temperature4 = dataCar[i][j + z].temperature;
+                    dataCar[i][z].hisDate4 = dataCar[i][j + z].hisDate;
+                  }
                 }
               }
+              if (j < differenceValueCar) {
+                arr3.push(dataCar[i][j]);
+                console.log(arr3, 'arr3')
+              }
             }
-            if (j < differenceValueCar) {
-              arr3.push(dataCar[i][j]);
-              console.log(arr3, 'arr3')
-            }
+            arr2.push(arr3);
+            this.queryEnd(arr2[i], differenceValueCar);
           }
-          arr2.push(arr3);
-          this.queryEnd(arr2[i], differenceValueCar);
         }
         this.dataCar = arr2;
         let differenceValueBox;
         let arr = [];
-        for (let i = 0; i < dataBox.length; i++) {
-          let arr1 = [];
-          // 向上取整差值
-          differenceValueBox = Math.ceil(dataBox[i].length / 5);
-          for (let j = 0; j < dataBox[i].length; j++) {
-            if (j == differenceValueBox) {
-              for (let z = 0; z < differenceValueBox; z++) {
-                dataBox[i][z].temperature1 = dataBox[i][j + z].temperature;
-                dataBox[i][z].hisDate1 = dataBox[i][j + z].hisDate;
+        if (dataBox != null && dataBox != '') {
+          for (let i = 0; i < dataBox.length; i++) {
+            let arr1 = [];
+            // 向上取整差值
+            differenceValueBox = Math.ceil(dataBox[i].length / 5);
+            for (let j = 0; j < dataBox[i].length; j++) {
+              if (j == differenceValueBox) {
+                for (let z = 0; z < differenceValueBox; z++) {
+                  dataBox[i][z].temperature1 = dataBox[i][j + z].temperature;
+                  dataBox[i][z].hisDate1 = dataBox[i][j + z].hisDate;
+                }
               }
-            }
-            if (j == differenceValueBox * 2) {
-              for (let z = 0; z < differenceValueBox; z++) {
-                dataBox[i][z].temperature2 = dataBox[i][j + z].temperature;
-                dataBox[i][z].hisDate2 = dataBox[i][j + z].hisDate;
+              if (j == differenceValueBox * 2) {
+                for (let z = 0; z < differenceValueBox; z++) {
+                  dataBox[i][z].temperature2 = dataBox[i][j + z].temperature;
+                  dataBox[i][z].hisDate2 = dataBox[i][j + z].hisDate;
+                }
               }
-            }
-            if (j == differenceValueBox * 3) {
-              for (let z = 0; z < differenceValueBox; z++) {
-                dataBox[i][z].temperature3 = dataBox[i][j + z].temperature;
-                dataBox[i][z].hisDate3 = dataBox[i][j + z].hisDate;
+              if (j == differenceValueBox * 3) {
+                for (let z = 0; z < differenceValueBox; z++) {
+                  dataBox[i][z].temperature3 = dataBox[i][j + z].temperature;
+                  dataBox[i][z].hisDate3 = dataBox[i][j + z].hisDate;
+                }
               }
-            }
-            if (j == differenceValueBox * 4) {
-              for (let z = 0; z < differenceValueBox; z++) {
-                if (j + z < dataBox[i].length) {
-                  dataBox[i][z].temperature4 = dataBox[i][j + z].temperature;
-                  dataBox[i][z].hisDate4 = dataBox[i][j + z].hisDate;
+              if (j == differenceValueBox * 4) {
+                for (let z = 0; z < differenceValueBox; z++) {
+                  if (j + z < dataBox[i].length) {
+                    dataBox[i][z].temperature4 = dataBox[i][j + z].temperature;
+                    dataBox[i][z].hisDate4 = dataBox[i][j + z].hisDate;
+                  }
                 }
               }
+              if (j < differenceValueBox) {
+                arr1.push(dataBox[i][j]);
+              }
             }
-            if (j < differenceValueBox) {
-              arr1.push(dataBox[i][j]);
-            }
+            arr.push(arr1);
+            console.log(arr, 'arr')
+            this.queryEnd(arr[i], differenceValueBox);
           }
-          arr.push(arr1);
-          console.log(arr, 'arr')
-          this.queryEnd(arr[i], differenceValueBox);
         }
         this.dataBox = arr;
       },
@@ -728,6 +732,22 @@
             arr[differenceValue - 1].end = arr[j].hisDate4;
             return;
           }
+          if (arr[j].hisDate3 != null && arr[j].hisDate3 != '' && arr[j].hisDate3 != undefined) {
+            arr[differenceValue - 1].end = arr[j].hisDate3;
+            return;
+          }
+          if (arr[j].hisDate2 != null && arr[j].hisDate2 != '' && arr[j].hisDate2 != undefined) {
+            arr[differenceValue - 1].end = arr[j].hisDate2;
+            return;
+          }
+          if (arr[j].hisDate1 != null && arr[j].hisDate1 != '' && arr[j].hisDate1 != undefined) {
+            arr[differenceValue - 1].end = arr[j].hisDate1;
+            return;
+          }
+          if (arr[j].hisDate != null && arr[j].hisDate != '' && arr[j].hisDate != undefined) {
+            arr[differenceValue - 1].end = arr[j].hisDate;
+            return;
+          }
         }
       },
       //获取当前时间

+ 9 - 6
src/views/business/spd/target/MonthSaleGoal.vue

@@ -316,12 +316,15 @@
                 </el-table-column>
                 <el-table-column label="物料" align="center" width="180" :render-header="addRedStar">
                   <template slot-scope="scope">
-                    <el-popover-select-v2 v-model="monthSaleGoalDetailsList[scope.$index].material" title="物料"
-                      valueKey="name" referName="MATERIAL_PARAM"
-                      @change="setClassify(scope.row.oneLevelClassify, scope.row.twoLevelClassify, monthSaleGoalDetailsList[scope.$index])"
-                      :dataMapping="{ materialCode: 'code', material: 'name', oneLevelClassify: 'oneClass', twoLevelClassify: 'twoClass'}"
-                      :source.sync="monthSaleGoalDetailsList[scope.$index]" placeholder="请输入物料">
-                    </el-popover-select-v2>
+                    <el-tooltip class="item" effect="dark" placement="top-start">
+                      <div slot="content">{{ scope.row.memo }}</div>
+                      <el-popover-select-v2 v-model="monthSaleGoalDetailsList[scope.$index].material" title="物料"
+                        valueKey="name" referName="MATERIAL_PARAM"
+                        @change="setClassify(scope.row.oneLevelClassify, scope.row.twoLevelClassify, monthSaleGoalDetailsList[scope.$index])"
+                        :dataMapping="{ materialCode: 'code', material: 'name', oneLevelClassify: 'oneClass', twoLevelClassify: 'twoClass'}"
+                        :source.sync="monthSaleGoalDetailsList[scope.$index]" placeholder="请输入物料">
+                      </el-popover-select-v2>
+                    </el-tooltip>
                   </template>
                 </el-table-column>
                 <el-table-column label="科室" align="center" width="180">

+ 1 - 1
src/views/purchase/catalogue/index.vue

@@ -93,7 +93,7 @@ export default {
     // 导出全部
     exportAll() {
       this.$modal.loading("正在导出数据,请稍后...");
-      exportAll().then(res => {
+      exportAll(this.params).then(res => {
         this.$modal.closeLoading();
         const blob = new Blob([res], {
           type: "application/vnd.ms-excel;charset=UTF-8",

+ 10 - 5
src/views/purchase/purchase-order/add/index.vue

@@ -683,6 +683,7 @@ export default {
 
         let tabList = {
           puOrderItemList: [...this.params.puOrderItemList],
+          warehouse: this.params.warehouse,
           // puOrderExecuteList: [...this.params.puOrderExecuteList],
         };
 
@@ -694,13 +695,17 @@ export default {
 
         this.$modal.loading("正在上传文件,请稍候...");
 
-        let { code, data } = await orderApi.orderImport(formData);
+        let {
+          code,
+          data: { puOrderItemList, puOrderExecuteList },
+        } = await orderApi.orderImport(formData);
 
         if (code == 200) {
-          for (const key in data) {
-            this.params[key].push(...data[key]);
-          }
-
+          // for (const key in data) {
+          //   this.params[key].push(...data[key]);
+          // }
+          this.params["puOrderItemList"] = [...puOrderItemList];
+          this.params["puOrderExecuteList"] = [...puOrderExecuteList];
           let { setVisible } = this.$refs.batchImport;
 
           setVisible(false);

+ 10 - 5
src/views/purchase/purchase-order/edit/index.vue

@@ -641,6 +641,7 @@ export default {
 
         let tabList = {
           puOrderItemList: [...this.params.puOrderItemList],
+          warehouse: this.params.warehouse,
           // puOrderExecuteList: [...this.params.puOrderExecuteList],
         };
 
@@ -652,13 +653,17 @@ export default {
 
         this.$modal.loading("正在上传文件,请稍候...");
 
-        let { code, data } = await orderApi.orderImport(formData);
+        let {
+          code,
+          data: { puOrderItemList, puOrderExecuteList },
+        } = await orderApi.orderImport(formData);
 
         if (code == 200) {
-          for (const key in data) {
-            this.params[key].push(...data[key]);
-          }
-
+          // for (const key in data) {
+          //   this.params[key].push(...data[key]);
+          // }
+          this.params["puOrderItemList"] = [...puOrderItemList];
+          this.params["puOrderExecuteList"] = [...puOrderExecuteList];
           let { setVisible } = this.$refs.batchImport;
 
           setVisible(false);