Просмотр исходного кода

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-mes into dev

liujt 3 месяцев назад
Родитель
Сommit
71d68be662

+ 8 - 2
src/views/pick/pickApply/components/addPick.vue

@@ -184,7 +184,7 @@
               <el-table-column
                 label="计量库存数量"
                 prop="availableCountBase"
-                width="220"
+                width="300"
                 show-overflow-tooltip
               >
                 <template slot-scope="{ row, $index }">
@@ -195,7 +195,13 @@
                       >{{ it.name ? it.name : it.warehouse_name }}库存数:<span
                         style="color: green"
                         >{{ it.availableCountBase }}</span
-                      >{{ row.measuringUnit }}</span
+                      >{{ row.measuringUnit }},
+                      <span v-if="it.lockQuantity || it.lockQuantity == 0"
+                        >锁库数:<span style="color: red">{{
+                          it.lockQuantity
+                        }}</span
+                        >{{ row.measuringUnit }}
+                      </span></span
                     >
                   </div>
                 </template>

+ 15 - 8
src/views/produce/components/feeding/index.vue

@@ -364,6 +364,7 @@
         teamName: '',
         isDefaultExecutor: false,
         checked: false,
+        useDefaultFeedDate: false,
         pickerOptions: {
           disabledDate(time) {
             // 禁止选择大于当前时间的日期
@@ -536,6 +537,7 @@
               // }
             });
             this.List = deepClone(arr);
+            this.applyDefaultExecutorTime();
           })
           .finally(() => {
             this.isLoad = true;
@@ -559,6 +561,16 @@
         return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
       },
 
+      applyDefaultExecutorTime() {
+        if (!this.useDefaultFeedDate || !this.List || this.List.length === 0) {
+          return;
+        }
+        const dateTime = this.getNowTime();
+        this.List.forEach((item) => {
+          this.$set(item, 'executorTime', dateTime);
+        });
+      },
+
       async getChooseEngrave() {
         await parameterGetByCode({
           code: 'choose_engrave'
@@ -569,14 +581,9 @@
         await parameterGetByCode({
           code: 'mes_order_feed_by_default_date'
         }).then((res) => {
-          if (res.value == '1') {
-            const dateTime = this.getNowTime();
-
-            this.$nextTick(() => {
-              this.List.forEach((item) => {
-                this.$set(item, 'executorTime', dateTime);
-              });
-            });
+          this.useDefaultFeedDate = res.value == '1';
+          if (this.useDefaultFeedDate) {
+            this.applyDefaultExecutorTime();
           }
         });
 

+ 14 - 3
src/views/produce/components/jobBooking/index.vue

@@ -912,9 +912,7 @@
           this.isReportTime = res.value == '1' ? true : false;
 
           if (this.isReportTime && this.idsList.length == 1) {
-            this.List.forEach((item) => {
-              item.workReportInfo.executorStartTime = item.feedLastTime;
-            });
+            this.applyDefaultReportTimeWhenSingle();
           }
         });
 
@@ -977,6 +975,16 @@
         });
       },
 
+      applyDefaultReportTimeWhenSingle() {
+        if (!this.isReportTime || this.idsList.length !== 1 || !this.List || this.List.length === 0) return;
+        const dateTime = this.getNowTime();
+        this.List.forEach((item, index) => {
+          item.workReportInfo.executorStartTime = item.feedLastTime;
+          this.$set(item.workReportInfo, 'executorTime', dateTime);
+          this.calculateWorkTimeByStartEnd(index);
+        });
+      },
+
       setDefaultIdList() {
         if (this.teamList.length != 0) {
           this.teamId = this.teamList[0].id;
@@ -1462,6 +1470,9 @@
                   }
                 });
               }
+              if (this.isReportTime && this.idsList.length == 1 && this.List.length > 0) {
+                this.applyDefaultReportTimeWhenSingle();
+              }
             })
             .finally(() => {
               this.isLoad = true;

+ 1 - 1
src/views/produce/components/picking/index.vue

@@ -205,7 +205,7 @@
                     >{{ it.name ? it.name : it.warehouse_name }}库存数:<span
                       style="color: green"
                       >{{ it.availableCountBase }}</span
-                    >{{ row.measuringUnit }}
+                    >{{ row.measuringUnit }}
                     <span v-if="it.lockQuantity || it.lockQuantity == 0"
                       >锁库数:<span style="color: red">{{
                         it.lockQuantity

+ 4 - 0
src/views/produce/components/workPlan/components/addSample.vue

@@ -821,6 +821,10 @@
         });
         this.packingSpecificationOption = listArr;
         this.tableList = res.list;
+        this.selection = res.list;
+        this.$nextTick(() => {
+          this.$refs.sourceTable.toggleAllSelection();
+        });
         return res;
       },
 

+ 5 - 0
src/views/produce/components/workPlan/edit.vue

@@ -1480,6 +1480,7 @@
         });
         let addStatus = res.list.map((item) => {
           item.isValid = true;
+          item.status = item.status || 1;
           // item.disposeTime = item.disposeTime
           //   ? item.disposeTime.split(' ')[0]
           //   : null;
@@ -1497,6 +1498,10 @@
         } else {
           this.getProSamList(this.packingList);
         }
+
+        if (this.form.recordingMethod != 1) {
+          this.countQualityResults();
+        }
       },
       async queryQualityTempleContent() {
         const res = await queryQualityTempleContent({