浏览代码

修改bug

695593266@qq.com 6 月之前
父节点
当前提交
eb1b4b3882

+ 10 - 1
src/api/produce/index.js

@@ -209,7 +209,7 @@ export async function queryProductLicense(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-//获取任务报工的报工数和损耗数
+//获取任务报工的报工数和损耗数
 export async function getTaskReport(data) {
   const res = await request.get(`/aps/assign/allReportQt`, {
     params: data
@@ -219,3 +219,12 @@ export async function getTaskReport(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+//获取过程监控的报工数和损耗数
+export async function getProcessMonitoring(data) {
+  const res = await request.post(`/mes/workreport/checkCourseReport`, data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

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

@@ -242,14 +242,21 @@
             align: 'center',
             showOverflowTooltip: true
           },
-          // {
-          //   minWidth: 120,
-          //   prop: 'feedQuantity',
-          //   slot: 'feedQuantity',
-          //   label: '投料数量',
-          //   align: 'center',
-          //   showOverflowTooltip: true
-          // },
+          {
+            prop: 'colorKey',
+            label: '颜色',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+
+          {
+            prop: 'modelKey',
+            label: '机型',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
           {
             minWidth: 140,
             prop: 'newWeight',

+ 89 - 24
src/views/produce/components/feeding/components/workOrderBom.vue

@@ -76,11 +76,39 @@
           </div>
 
           <div class="rx ww33">
-            <div class="lable rx-cc ww60">报工类型</div>
+            <div class="lable rx-cc ww60">请托状态</div>
+            <div v-if="item.entrustStatus">
+              <div class="content" v-if="item.entrustStatus == 1">未请托</div>
+              <div class="content" v-if="item.entrustStatus == 2">请托中</div>
+              <div class="content" v-if="item.entrustStatus == 3">完成请托</div>
+            </div>
+            <div v-else>
+              <div class="content">未请托</div>
+            </div>
+          </div>
+        </div>
+
+        <div class="item rx-sc" v-if="isOrder">
+          <div class="rx ww33">
+            <div class="lable rx-cc">报工类型</div>
             <div class="content content_num">
               <div>{{ item.singleReport == 1 ? '单个报工' : '批量报工' }}</div>
             </div>
           </div>
+
+          <div class="rx ww33">
+            <div class="lable rx-cc">颜色</div>
+            <div class="content" :title="item.colorKey">{{
+              item.colorKey
+            }}</div>
+          </div>
+
+          <div class="rx ww33">
+            <div class="lable rx-cc ww60">机型</div>
+            <div class="content" :title="item.modelKey">{{
+              item.modelKey
+            }}</div>
+          </div>
         </div>
 
         <div class="item rx-sc" v-if="isOrder">
@@ -112,7 +140,7 @@
         </div>
 
         <div class="item rx-sc" v-if="isOrder">
-          <div class="rx ww50">
+          <div class="rx ww45">
             <div class="lable rx-cc">任务报工</div>
             <div class="content">
               报工数:{{ taskReoportNum || 0 }}{{ item.unit }},损耗数:{{
@@ -121,15 +149,13 @@
             </div>
           </div>
 
-          <div class="rx ww50">
-            <div class="lable rx-cc">请托状态</div>
-            <div v-if="item.entrustStatus">
-              <div class="content" v-if="item.entrustStatus == 1">未请托</div>
-              <div class="content" v-if="item.entrustStatus == 2">请托中</div>
-              <div class="content" v-if="item.entrustStatus == 3">完成请托</div>
-            </div>
-            <div v-else>
-              <div class="content">未请托</div>
+          <div class="rx ww55">
+            <div class="lable rx-cc">过程监控</div>
+            <div class="content">
+              报工数:{{ sumReportQuantity || 0 }}{{ item.unit }},合格数:{{
+                sumQualifiedQuantity || 0
+              }}{{ item.unit }},不合格数{{ sumNoQualifiedQuantity || 0
+              }}{{ item.unit }}
             </div>
           </div>
         </div>
@@ -151,7 +177,7 @@
 </template>
 
 <script>
-  import { getTaskReport } from '@/api/produce';
+  import { getTaskReport, getProcessMonitoring } from '@/api/produce';
   export default {
     name: 'workOrderBom',
     props: {
@@ -178,13 +204,16 @@
     data() {
       return {
         taskReoportNum: '',
-        taskLossNum: ''
+        taskLossNum: '',
+        sumNoQualifiedQuantity: '',
+        sumQualifiedQuantity: '',
+        sumReportQuantity: ''
       };
     },
 
     mounted() {
-      console.log(this.item, '返回的数据777777');
       this.getTaskReportNum();
+      this.getProcessMonitoringNum();
     },
 
     methods: {
@@ -202,7 +231,34 @@
           workOrderId: this.item.workOrderId,
           taskId: this.item.currentTaskDiagram.sourceTaskId
         }).then((res) => {
-          console.log(res, '任务报工信息');
+          if (Object.keys(res.data).length != 0) {
+            this.taskReoportNum = res.data.reportQuantity
+              ? res.data.reportQuantity
+              : 0;
+            this.taskLossNum = res.data.lossQuantity
+              ? res.data.lossQuantity
+              : 0;
+          }
+        });
+      },
+
+      async getProcessMonitoringNum() {
+        await getProcessMonitoring({
+          workOrderId: this.item.workOrderId,
+          taskId: this.item.currentTaskDiagram.sourceTaskId
+        }).then((res) => {
+          if (Object.keys(res.data).length != 0) {
+            this.sumNoQualifiedQuantity = res.data.sumNoQualifiedQuantity
+              ? res.data.sumNoQualifiedQuantity
+              : 0;
+            this.sumQualifiedQuantity = res.data.sumQualifiedQuantity
+              ? res.data.sumQualifiedQuantity
+              : 0;
+
+            this.sumReportQuantity = res.data.sumReportQuantity
+              ? res.data.sumReportQuantity
+              : 0;
+          }
         });
       }
     }
@@ -248,19 +304,28 @@
         }
 
         .content {
-          width: 250px;
+          // width: 250px;
+          // min-height: 32px;
+          // font-size: 13px;
+          // line-height: 13px;
+          // font-style: normal;
+          // font-weight: 400;
+          // padding: 9px 3px;
+          // box-sizing: border-box;
+          // word-wrap: break-word;
+          // white-space: nowrap;
+          // overflow: hidden;
+          // text-overflow: ellipsis;
+          // flex-grow: 1 !important;
+
+          width: 100%;
           min-height: 32px;
-          font-size: 14px;
-          line-height: 14px;
-          font-style: normal;
-          font-weight: 400;
-          padding: 9px 4px;
-          box-sizing: border-box;
-          word-wrap: break-word;
+          font-size: 13px;
+          line-height: 13px;
+          padding: 9px 3px;
           white-space: nowrap;
           overflow: hidden;
           text-overflow: ellipsis;
-          flex-grow: 1 !important;
 
           .unit {
             padding: 0 2px;

+ 8 - 7
src/views/produce/components/jobBooking/components/batchSemiProductJobBom.vue

@@ -1112,20 +1112,21 @@
           },
 
           {
-            prop: 'modelKey',
-            label: '机型',
+            prop: 'colorKey',
+            label: '颜色',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 110
           },
+
           {
-            width: 150,
-            prop: 'modelType',
-            label: '型号',
-            slot: 'modelType',
+            prop: 'modelKey',
+            label: '机型',
             align: 'center',
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            minWidth: 110
           },
+
           {
             width: 150,
             prop: 'specification',

+ 1 - 0
src/views/produce/components/jobBooking/components/semiProductJobBom.vue

@@ -891,6 +891,7 @@
             showOverflowTooltip: true,
             minWidth: 110
           },
+
           {
             width: 110,
             prop: 'position',

+ 357 - 194
src/views/produce/components/outsourcing/new_outsourceList.vue

@@ -1474,224 +1474,387 @@
         });
       },
 
+      // chooseTime(current, clonedTimeList, currentIndex) {
+      //   if (clonedTimeList.length === 0) {
+      //     this.timeList = [];
+      //     this.attributeData.formedNumLast = 0;
+      //     this.pickOutInListSelect = [];
+
+      //     this.$nextTick(() => {
+      //       if (this.$refs.pickOutRef) {
+      //         this.$refs.pickOutRef.clearSelection();
+      //       }
+      //     });
+
+      //     return;
+      //   }
+
+      //   if (
+      //     this.workData.list[0].singleReport == 1 ||
+      //     this.pickOutInList.length > 1
+      //   ) {
+      //     this.timeList = clonedTimeList.map((item) => item);
+      //     const selectedIds = new Set();
+      //     for (let item of this.timeList) {
+      //       for (let it of item.pickOutInList) {
+      //         selectedIds.add(it.id);
+      //       }
+      //     }
+
+      //     this.attributeData.formedNumLast = this.timeList.reduce(
+      //       (acc, pro) => {
+      //         const num = parseFloat(pro.purchaseQuantity);
+      //         return acc + (isNaN(num) ? 0 : num);
+      //       },
+      //       0
+      //     );
+
+      //     const unassignedList = this.pickOutInList.filter(
+      //       (item) => !selectedIds.has(item.id)
+      //     );
+
+      //     const totalNum = this.pickOutInList.reduce(
+      //       (sum, item) => sum + Number(item.feedQuantity || 0),
+      //       0
+      //     );
+
+      //     if (unassignedList.length > 0) {
+      //       const number = unassignedList.reduce(
+      //         (sum, item) => sum + Number(item.feedQuantity || 0),
+      //         0
+      //       );
+
+      //       const data = {
+      //         batchNo: '一次性到货',
+      //         requireDeliveryTime: null,
+      //         purchaseQuantity: number,
+      //         pickOutInList: unassignedList,
+      //         bomMaterialList: [],
+      //         standardOutputList: [],
+      //         isParent: 1
+      //       };
+
+      //       const exists = this.timeList.some((t) => t.batchNo == '一次性到货');
+
+      //       if (!exists) {
+      //         this.timeList.unshift(data);
+      //       } else {
+      //         const index = this.timeList.findIndex(
+      //           (t) => t.batchNo == '一次性到货'
+      //         );
+      //         this.timeList.splice(index, 1, data);
+      //       }
+      //     }
+
+      //     if (this.bomMaterialList.length != 0) {
+      //       for (let item of this.bomMaterialList) {
+      //         for (let it of this.timeList) {
+      //           const proportion = this.div(it.purchaseQuantity, totalNum);
+      //           const allocatedQuantity = this.mul(
+      //             proportion,
+      //             item.demandQuantity
+      //           );
+
+      //           const materialItem = {
+      //             ...item,
+      //             demandQuantity: allocatedQuantity
+      //           };
+
+      //           it.bomMaterialList.push(materialItem);
+      //         }
+      //       }
+      //     }
+
+      //     if (this.standardOutputList.length != 0) {
+      //       for (let item of this.standardOutputList) {
+      //         for (let it of this.timeList) {
+      //           const proportion = this.div(it.purchaseQuantity, totalNum);
+      //           const allocatedQuantity = this.mul(
+      //             proportion,
+      //             item.demandQuantity
+      //           );
+
+      //           const materialItem = {
+      //             ...item,
+      //             demandQuantity: allocatedQuantity
+      //           };
+
+      //           it.standardOutputList.push(materialItem);
+      //         }
+      //       }
+      //     }
+
+      //     this.timeList[0].innerActive = '0';
+      //     this.activeBatch = this.timeList[0].batchNo;
+      //     this.pickOutInListSelect = [];
+      //   } else {
+      //     if (this.pickOutInList.length == 1) {
+      //       this.timeList = clonedTimeList.map((item) => {
+      //         item.pickOutInList = [this.deepCopy(this.pickOutInListSelect[0])];
+
+      //         return item;
+      //       });
+
+      //       this.attributeData.formedNumLast = this.timeList.reduce(
+      //         (acc, pro) => {
+      //           const num = parseFloat(pro.purchaseQuantity);
+      //           return acc + (isNaN(num) ? 0 : num);
+      //         },
+      //         0
+      //       );
+      //       const totalNum = this.pickOutInList.reduce(
+      //         (sum, item) => sum + Number(item.feedQuantity || 0),
+      //         0
+      //       );
+      //       const batchNum = this.timeList.reduce(
+      //         (sum, item) => sum + Number(item.purchaseQuantity || 0),
+      //         0
+      //       );
+
+      //       let singleWeight = 0;
+
+      //       if (
+      //         this.pickOutInList[0].newWeight ||
+      //         this.pickOutInList[0].newWeight == 0
+      //       ) {
+      //         singleWeight = this.div(
+      //           this.pickOutInList[0].newWeight,
+      //           totalNum
+      //         );
+      //       }
+      //       const remainderNum = this.sub(totalNum, batchNum);
+      //       if (remainderNum != 0) {
+      //         const data = {
+      //           batchNo: '一次性到货',
+      //           requireDeliveryTime: null,
+      //           purchaseQuantity: remainderNum,
+      //           pickOutInList: [this.deepCopy(this.pickOutInListSelect[0])],
+      //           bomMaterialList: [],
+      //           standardOutputList: [],
+      //           isParent: 1
+      //         };
+      //         const exists = this.timeList.some(
+      //           (t) => t.batchNo == '一次性到货'
+      //         );
+      //         if (!exists) {
+      //           this.timeList.unshift(data);
+      //         } else {
+      //           const index = this.timeList.findIndex(
+      //             (t) => t.batchNo == '一次性到货'
+      //           );
+      //           this.timeList.splice(index, 1, data);
+      //         }
+      //       }
+      //       if (this.bomMaterialList.length != 0) {
+      //         for (let item of this.bomMaterialList) {
+      //           for (let it of this.timeList) {
+      //             const proportion = this.div(it.purchaseQuantity, totalNum);
+      //             const allocatedQuantity = this.mul(
+      //               proportion,
+      //               item.demandQuantity
+      //             );
+      //             const materialItem = {
+      //               ...item,
+      //               demandQuantity: allocatedQuantity
+      //             };
+      //             it.bomMaterialList.push(materialItem);
+      //           }
+      //         }
+      //       }
+      //       if (this.standardOutputList.length != 0) {
+      //         for (let item of this.standardOutputList) {
+      //           for (let it of this.timeList) {
+      //             const proportion = this.div(it.purchaseQuantity, totalNum);
+      //             const allocatedQuantity = this.mul(
+      //               proportion,
+      //               item.demandQuantity
+      //             );
+      //             const materialItem = {
+      //               ...item,
+      //               demandQuantity: allocatedQuantity
+      //             };
+      //             it.standardOutputList.push(materialItem);
+      //           }
+      //         }
+      //       }
+
+      //       this.timeList = this.timeList.map((it) => {
+      //         it.pickOutInList.forEach((item) => {
+      //           item.feedQuantity = it.purchaseQuantity;
+      //           item.newWeight = this.mul(singleWeight, it.purchaseQuantity);
+      //         });
+
+      //         return it;
+      //       });
+
+      //       this.timeList[0].innerActive = '0';
+      //       this.activeBatch = this.timeList[0].batchNo;
+      //       this.pickOutInListSelect = [];
+      //     }
+      //   }
+      // },
+
       chooseTime(current, clonedTimeList, currentIndex) {
         if (clonedTimeList.length === 0) {
-          this.timeList = [];
-          this.attributeData.formedNumLast = 0;
-          this.pickOutInListSelect = [];
+          this.resetAll();
+          return;
+        }
 
-          this.$nextTick(() => {
-            if (this.$refs.pickOutRef) {
-              this.$refs.pickOutRef.clearSelection();
-            }
-          });
+        const isSingleReport = this.workData.list[0].singleReport == 1;
+        const isMultiSelect = this.pickOutInList.length > 1;
 
-          return;
+        if (isSingleReport || isMultiSelect) {
+          this.handleMulti(clonedTimeList);
+        } else {
+          this.handleSingle(clonedTimeList);
         }
+      },
 
-        if (
-          this.workData.list[0].singleReport == 1 ||
-          this.pickOutInList.length > 1
-        ) {
-          this.timeList = clonedTimeList.map((item) => item);
-          const selectedIds = new Set();
-          for (let item of this.timeList) {
-            for (let it of item.pickOutInList) {
-              selectedIds.add(it.id);
-            }
-          }
+      resetAll() {
+        this.timeList = [];
+        this.attributeData.formedNumLast = 0;
+        this.pickOutInListSelect = [];
 
-          this.attributeData.formedNumLast = this.timeList.reduce(
-            (acc, pro) => {
-              const num = parseFloat(pro.purchaseQuantity);
-              return acc + (isNaN(num) ? 0 : num);
-            },
-            0
-          );
+        this.$nextTick(() => {
+          this.$refs.pickOutRef && this.$refs.pickOutRef.clearSelection();
+        });
+      },
 
-          const unassignedList = this.pickOutInList.filter(
-            (item) => !selectedIds.has(item.id)
-          );
+      calcTotal(list, key) {
+        return list.reduce((sum, item) => sum + Number(item[key] || 0), 0);
+      },
 
-          const totalNum = this.pickOutInList.reduce(
-            (sum, item) => sum + Number(item.feedQuantity || 0),
-            0
-          );
+      insertOrUpdateOnce(timeList, data) {
+        const index = timeList.findIndex((t) => t.batchNo === '一次性到货');
+        if (index === -1) {
+          timeList.unshift(data);
+        } else {
+          timeList.splice(index, 1, data);
+        }
+      },
 
-          if (unassignedList.length > 0) {
-            const number = unassignedList.reduce(
-              (sum, item) => sum + Number(item.feedQuantity || 0),
-              0
-            );
+      assignMaterialLists(timeList, totalNum, bomList, outputList) {
+        for (let it of timeList) {
+          it.bomMaterialList = [];
+          it.standardOutputList = [];
+        }
 
-            const data = {
-              batchNo: '一次性到货',
-              requireDeliveryTime: null,
-              purchaseQuantity: number,
-              pickOutInList: unassignedList,
-              bomMaterialList: [],
-              standardOutputList: [],
-              isParent: 1
-            };
-
-            const exists = this.timeList.some((t) => t.batchNo == '一次性到货');
-
-            if (!exists) {
-              this.timeList.unshift(data);
-            } else {
-              const index = this.timeList.findIndex(
-                (t) => t.batchNo == '一次性到货'
-              );
-              this.timeList.splice(index, 1, data);
-            }
-          }
+        const assign = (sourceList, targetKey) => {
+          if (!sourceList.length) return;
 
-          if (this.bomMaterialList.length != 0) {
-            for (let item of this.bomMaterialList) {
-              for (let it of this.timeList) {
-                const proportion = this.div(it.purchaseQuantity, totalNum);
-                const allocatedQuantity = this.mul(
-                  proportion,
-                  item.demandQuantity
-                );
-
-                const materialItem = {
-                  ...item,
-                  demandQuantity: allocatedQuantity
-                };
-
-                it.bomMaterialList.push(materialItem);
-              }
-            }
-          }
+          for (let item of sourceList) {
+            for (let it of timeList) {
+              const proportion = this.div(it.purchaseQuantity, totalNum);
+              const allocated = this.mul(proportion, item.demandQuantity);
 
-          if (this.standardOutputList.length != 0) {
-            for (let item of this.standardOutputList) {
-              for (let it of this.timeList) {
-                const proportion = this.div(it.purchaseQuantity, totalNum);
-                const allocatedQuantity = this.mul(
-                  proportion,
-                  item.demandQuantity
-                );
-
-                const materialItem = {
-                  ...item,
-                  demandQuantity: allocatedQuantity
-                };
-
-                it.standardOutputList.push(materialItem);
-              }
+              it[targetKey].push({
+                ...item,
+                demandQuantity: allocated
+              });
             }
           }
+        };
 
-          this.timeList[0].innerActive = '0';
-          this.activeBatch = this.timeList[0].batchNo;
-          this.pickOutInListSelect = [];
-        } else {
-          if (this.pickOutInList.length == 1) {
-            this.timeList = clonedTimeList.map((item) => {
-              item.pickOutInList = [this.deepCopy(this.pickOutInListSelect[0])];
+        assign(bomList, 'bomMaterialList');
+        assign(outputList, 'standardOutputList');
+      },
 
-              return item;
-            });
+      setActive() {
+        this.timeList[0].innerActive = '0';
+        this.activeBatch = this.timeList[0].batchNo;
+        this.pickOutInListSelect = [];
+      },
 
-            this.attributeData.formedNumLast = this.timeList.reduce(
-              (acc, pro) => {
-                const num = parseFloat(pro.purchaseQuantity);
-                return acc + (isNaN(num) ? 0 : num);
-              },
-              0
-            );
-            const totalNum = this.pickOutInList.reduce(
-              (sum, item) => sum + Number(item.feedQuantity || 0),
-              0
-            );
-            const batchNum = this.timeList.reduce(
-              (sum, item) => sum + Number(item.purchaseQuantity || 0),
-              0
-            );
+      handleSingle(clonedTimeList) {
+        const selected = this.deepCopy(this.pickOutInListSelect[0]);
+
+        this.timeList = clonedTimeList.map((item) => ({
+          ...item,
+          pickOutInList: [selected]
+        }));
+
+        const totalNum = this.calcTotal(this.pickOutInList, 'feedQuantity');
+        const batchNum = this.calcTotal(this.timeList, 'purchaseQuantity');
+
+        this.attributeData.formedNumLast = batchNum;
+
+        const remain = this.sub(totalNum, batchNum);
+        if (remain != 0) {
+          const data = {
+            batchNo: '一次性到货',
+            requireDeliveryTime: null,
+            purchaseQuantity: remain,
+            pickOutInList: [{ ...selected, selected: false }],
+            bomMaterialList: [],
+            standardOutputList: [],
+            isParent: 1
+          };
+          this.insertOrUpdateOnce(this.timeList, data);
+        }
 
-            let singleWeight = 0;
+        this.assignMaterialLists(
+          this.timeList,
+          totalNum,
+          this.bomMaterialList,
+          this.standardOutputList
+        );
 
-            if (
-              this.pickOutInList[0].newWeight ||
-              this.pickOutInList[0].newWeight == 0
-            ) {
-              singleWeight = this.div(
-                this.pickOutInList[0].newWeight,
-                totalNum
-              );
-            }
-            const remainderNum = this.sub(totalNum, batchNum);
-            if (remainderNum != 0) {
-              const data = {
-                batchNo: '一次性到货',
-                requireDeliveryTime: null,
-                purchaseQuantity: remainderNum,
-                pickOutInList: [this.deepCopy(this.pickOutInListSelect[0])],
-                bomMaterialList: [],
-                standardOutputList: [],
-                isParent: 1
-              };
-              const exists = this.timeList.some(
-                (t) => t.batchNo == '一次性到货'
-              );
-              if (!exists) {
-                this.timeList.unshift(data);
-              } else {
-                const index = this.timeList.findIndex(
-                  (t) => t.batchNo == '一次性到货'
-                );
-                this.timeList.splice(index, 1, data);
-              }
-            }
-            if (this.bomMaterialList.length != 0) {
-              for (let item of this.bomMaterialList) {
-                for (let it of this.timeList) {
-                  const proportion = this.div(it.purchaseQuantity, totalNum);
-                  const allocatedQuantity = this.mul(
-                    proportion,
-                    item.demandQuantity
-                  );
-                  const materialItem = {
-                    ...item,
-                    demandQuantity: allocatedQuantity
-                  };
-                  it.bomMaterialList.push(materialItem);
-                }
-              }
-            }
-            if (this.standardOutputList.length != 0) {
-              for (let item of this.standardOutputList) {
-                for (let it of this.timeList) {
-                  const proportion = this.div(it.purchaseQuantity, totalNum);
-                  const allocatedQuantity = this.mul(
-                    proportion,
-                    item.demandQuantity
-                  );
-                  const materialItem = {
-                    ...item,
-                    demandQuantity: allocatedQuantity
-                  };
-                  it.standardOutputList.push(materialItem);
-                }
-              }
-            }
+        let singleWeight = 0;
+        if (selected.newWeight || selected.newWeight === 0) {
+          singleWeight = this.div(selected.newWeight, totalNum);
+        }
 
-            this.timeList = this.timeList.map((it) => {
-              it.pickOutInList.forEach((item) => {
-                item.feedQuantity = it.purchaseQuantity;
-                item.newWeight = this.mul(singleWeight, it.purchaseQuantity);
-              });
+        this.timeList = this.timeList.map((it) => {
+          it.pickOutInList.forEach((item) => {
+            item.feedQuantity = it.purchaseQuantity;
+            item.newWeight = this.mul(singleWeight, it.purchaseQuantity);
+          });
+          return it;
+        });
 
-              return it;
-            });
+        this.setActive();
+      },
 
-            this.timeList[0].innerActive = '0';
-            this.activeBatch = this.timeList[0].batchNo;
-            this.pickOutInListSelect = [];
-          }
+      handleMulti(clonedTimeList) {
+        this.timeList = clonedTimeList.map((i) => i);
+
+        const selectedIds = new Set();
+        this.timeList.forEach((t) =>
+          t.pickOutInList.forEach((i) => selectedIds.add(i.id))
+        );
+
+        const totalNum = this.calcTotal(this.pickOutInList, 'feedQuantity');
+        this.attributeData.formedNumLast = this.calcTotal(
+          this.timeList,
+          'purchaseQuantity'
+        );
+
+        const unassigned = this.pickOutInList.filter(
+          (i) => !selectedIds.has(i.id)
+        );
+
+        if (unassigned.length > 0) {
+          const number = this.calcTotal(unassigned, 'feedQuantity');
+          const data = {
+            batchNo: '一次性到货',
+            requireDeliveryTime: null,
+            purchaseQuantity: number,
+            pickOutInList: unassigned.map((i) => ({ ...i, selected: false })),
+            bomMaterialList: [],
+            standardOutputList: [],
+            isParent: 1
+          };
+          this.insertOrUpdateOnce(this.timeList, data);
         }
+
+        this.assignMaterialLists(
+          this.timeList,
+          totalNum,
+          this.bomMaterialList,
+          this.standardOutputList
+        );
+
+        this.setActive();
       },
 
       getDecimalLength(num) {

+ 35 - 1
src/views/produceOrder/info.vue

@@ -148,11 +148,45 @@
             >
           </div>
           <div v-else>
-            <div class="content">{{ '' }}</div>
+            <div class="content">未委外</div>
           </div>
         </div>
       </div>
 
+      <div class="item rx-sc">
+        <div class="rx ww25">
+          <div class="lable rx-cc">请托状态</div>
+          <div v-if="workOrderInfo.entrustStatus">
+            <div class="content" v-if="workOrderInfo.entrustStatus == 1"
+              >未请托</div
+            >
+            <div class="content" v-if="workOrderInfo.entrustStatus == 2"
+              >请托中</div
+            >
+            <div class="content" v-if="workOrderInfo.entrustStatus == 3"
+              >完成请托</div
+            >
+          </div>
+          <div v-else>
+            <div class="content">未请托</div>
+          </div>
+        </div>
+      </div>
+
+      <div class="item rx-sc">
+        <div class="rx ww25">
+          <div class="lable rx-cc">颜色</div>
+          <div class="content">{{ workOrderInfo.colorKey }}</div>
+        </div>
+      </div>
+
+      <div class="item rx-sc">
+        <div class="rx ww25">
+          <div class="lable rx-cc">机型</div>
+          <div class="content">{{ workOrderInfo.modelKey }}</div>
+        </div>
+      </div>
+
       <div class="item rx-sc">
         <div class="rx ww25">
           <div class="lable rx-cc">计划开始时间</div>

+ 15 - 0
src/views/warehousing/index.vue

@@ -199,6 +199,21 @@
             align: 'center',
             showOverflowTooltip: true
           },
+          {
+            prop: 'colorKey',
+            label: '颜色',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+
+          {
+            prop: 'modelKey',
+            label: '机型',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
 
           {
             prop: 'produceRoutingName',