Explorar el Código

Merge branch 'purchaseDev' of http://172.16.100.139/new-business/drp-web into purchaseDev

002390 hace 1 año
padre
commit
025f44378b

+ 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;
+          }
         }
       },
       //获取当前时间

+ 1 - 1
src/views/business/ehr/pm/mark/detail.vue

@@ -39,7 +39,7 @@
         <!-- <div style="float:right">
           <el-button size="mini" @click="btnUnfold">{{isUnfold == true ? "收起" : "展开"}}</el-button>
         </div> -->
-        <el-table size="mini"  :data="form.performanceItem" show-summary :summary-method="getSummaries">
+        <el-table size="mini"  :data="form.performanceItem" show-summary :summary-method="getSummaries" border>
           <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估方面" align="center" prop="aspect">
             <template slot-scope="scope">
               <dict-tag :options="dict.type.ehr_pm_aspect" :value="scope.row.aspect"/>

+ 1 - 1
src/views/business/ehr/pm/verify/detail.vue

@@ -30,7 +30,7 @@
         <!-- <div style="float:right">
           <el-button size="mini" @click="btnUnfold">{{isUnfold == true ? "收起" : "展开"}}</el-button>
         </div> -->
-        <el-table size="mini"  :data="form.performanceItem" show-summary :summary-method="getSummaries">
+        <el-table size="mini"  :data="form.performanceItem" show-summary :summary-method="getSummaries" border>
           <el-table-column width="100" :show-overflow-tooltip="!isUnfold" label="评估方面" align="center" prop="aspect">
             <template slot-scope="scope">
               <dict-tag :options="dict.type.ehr_pm_aspect" :value="scope.row.aspect"/>

+ 2 - 2
src/views/purchase/PurchaseDemandList/add.vue

@@ -299,12 +299,12 @@
           </ux-table-column> -->
           <ux-table-column resizable title="预留周期" align="center" field="reservedPeriod" width="120px" edit-render>
             <template v-slot:edit="scope">
-                <el-input type="number" min="0" clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedPeriod"></el-input>
+                <el-input type="number" min="0" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedPeriod"></el-input>
             </template>
           </ux-table-column>
           <ux-table-column resizable title="预留数量" align="center"  field="reservedQty" width="120px" edit-render>
             <template v-slot:edit="scope">
-                <el-input type="number" min="0" @input="scope.row.reservedQty=Math.ceil(scope.row.reservedQty)" clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedQty"></el-input>
+                <el-input type="number" min="0" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"  @input="scope.row.reservedQty=Math.ceil(scope.row.reservedQty)" clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedQty"></el-input>
             </template>
           </ux-table-column>
           <ux-table-column resizable title="集团预测分类" align="center"  field="forecastClassify" width="120px"/>

+ 0 - 20
src/views/purchase/PurchaseDemandList/reserved.vue

@@ -48,24 +48,6 @@
         </template>
         {{ resData.createTime }}
       </el-descriptions-item>
-      <el-descriptions-item>
-        <template slot="label">
-          更新人
-        </template>
-        {{ resData.updateBy }}
-      </el-descriptions-item>
-      <el-descriptions-item>
-        <template slot="label">
-          更新人名称
-        </template>
-        {{ resData.updateByName }}
-      </el-descriptions-item>
-      <el-descriptions-item>
-        <template slot="label">
-          更新时间
-        </template>
-        {{ resData.updateTime }}
-      </el-descriptions-item>
     </el-descriptions>
     
       <el-table style="margin-top: 50px" :data="tableList2">
@@ -83,7 +65,6 @@
         <el-table-column show-overflow-tooltip prop="qty" label="可用量" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="usedQty" label="已用量" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="createTime" label="创建时间" width="200"></el-table-column>
-        <el-table-column show-overflow-tooltip prop="updateTime" label="更新时间" width="200"></el-table-column>
       </el-table>
       <el-table style="margin-top: 50px" :data="tableList3">
         <el-table-column show-overflow-tooltip prop="materialCode" label="物料编码" width="150"></el-table-column>
@@ -103,7 +84,6 @@
         <!-- <el-table-column show-overflow-tooltip prop="storageAllocation" label="调入货位" width="150"></el-table-column> -->
         <el-table-column show-overflow-tooltip prop="storageAllocationName" label="调入货位名称" width="150"></el-table-column>
         <el-table-column show-overflow-tooltip prop="createTime" label="创建时间" width="200"></el-table-column>
-        <el-table-column show-overflow-tooltip prop="updateTime" label="更新时间" width="200"></el-table-column>
       </el-table>
     </el-dialog>
   </div>

+ 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",