Sfoglia il codice sorgente

首页改字-报工单回显时间

longfenglin 1 anno fa
parent
commit
176eeca939

+ 6 - 6
src/views/home/index.vue

@@ -97,25 +97,25 @@ export default {
           name: '在制工单数',
           num: '188',
           imgUrl: require('../../assets/Group1.png'),
-          unit: ''
+          unit: ''
         },
         {
-          name: '在制工单计划生产数',
+          name: '在制工单生产数',
           num: '188',
           imgUrl: require('../../assets/Group2.png'),
-          unit: 'pcs'
+          unit: ''
         },
         {
-          name: '在制工单已入库数',
+          name: '已入库数',
           num: '188',
           imgUrl: require('../../assets/Group3.png'),
-          unit: 'pcs'
+          unit: ''
         },
         {
           name: '在制工单延期生产数',
           num: '188',
           imgUrl: require('../../assets/Group4.png'),
-          unit: 'pcs',
+          unit: '',
           color: '#f97876'
         }
       ],

+ 7 - 4
src/views/produce/components/feeding/index.vue

@@ -8,7 +8,7 @@
           <div class="rx-bc">
             <div class="name">批量投料时间:</div>
           </div>
-          <el-date-picker v-model="executorTime" type="datetime" value-format="yyyy-MM-dd HH:dd:ss" placeholder="选择日期"
+          <el-date-picker v-model="executorTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期"
             @change="handleCreate">
           </el-date-picker>
         </div>
@@ -36,7 +36,7 @@
             <div class="title_box rx-bc">
               <div class="name">投料时间 </div>
             </div>
-            <el-date-picker v-model="item.executorTime" type="datetime" value-format="yyyy-MM-dd HH:dd:ss"
+            <el-date-picker v-model="item.executorTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
               placeholder="选择日期">
             </el-date-picker>
             <!--  -->
@@ -113,6 +113,7 @@ import aridRegion from './components/aridRegion.vue';
 import palletBom from './components/palletBom.vue';
 import revolvingDiskBom from './components/revolvingDiskBom.vue';
 import { deepClone } from '@/utils';
+import { timestampToDateTime } from '@/utils/index.js';
 export default {
   name: 'feeding',
   components: {
@@ -163,7 +164,7 @@ export default {
       idsList: [],
       executorTime: '',
       isLoad: false,
-      isShow: true
+      isShow: true,
     };
   },
 
@@ -329,7 +330,7 @@ export default {
           return false;
         }
         let objList = res[0].extInfo.objList;
-        this.List.forEach((f) => {
+        this.List.forEach((f,index) => {
           objList.forEach((o) => {
             if (f.workOrderId == o.workOrderId && f.currentTaskDiagram.taskId == o.taskId) {
               f['instanceList'] = o.instanceList || [];
@@ -340,12 +341,14 @@ export default {
               f['palletList'] = o.palletList || [];
               f['revolvingDiskList'] = o.revolvingDiskList || [];
               f['semiProductList'] = o.semiProductList || [];
+              this.$set(this.List[index],'executorTime',timestampToDateTime(o.executorTime))
               this.$forceUpdate();
             }
           });
         });
       });
     },
+ 
 
     async save(type, index) {
 

+ 23 - 6
src/views/produce/components/jobBooking/index.vue

@@ -6,7 +6,7 @@
         <div class="rx-bc">
           <div class="name">批量报工时间:</div>
         </div>
-        <el-date-picker v-model="executorTime" type="datetime" value-format="yyyy-MM-dd HH:dd:ss"
+        <el-date-picker v-model="executorTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
           placeholder="选择日期" @change="handleCreate">
         </el-date-picker>
       </div>
@@ -36,7 +36,7 @@
           <div class="title_box rx-bc">
             <div class="name">报工时间</div>
           </div>
-          <el-date-picker v-model="item.executorTime" type="datetime" value-format="yyyy-MM-dd HH:dd:ss"
+          <el-date-picker v-model="item.workReportInfo.executorTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
             placeholder="选择日期">
           </el-date-picker>
         </div>
@@ -184,6 +184,7 @@ import turnoverBom from './components/turnoverBom.vue';
 import aridRegion from '../feeding/components/aridRegion.vue';
 import packingBom from './components/packingBom.vue';
 import packingTgBom from './components/packingTgBom';
+import { timestampToDateTime } from '@/utils/index.js';
 
 export default {
   components: {
@@ -273,7 +274,6 @@ export default {
         })
 
         this.$set(this, 'List', list);
-        console.log(this.List);
 
       }
     },
@@ -368,6 +368,7 @@ export default {
               return item
             })
             obj.workReportInfo = {
+              executorTime: null,
               formingNum: null,
               formingWeight: null,
               formedNum: null,
@@ -395,6 +396,7 @@ export default {
             obj.workReportInfo.unit = obj.unit;
             obj.workReportInfo.weightUnit = obj.weightUnit;
             obj.workReportInfo.workOrderId = obj.workOrderId;
+            obj.workReportInfo.executorTime = obj.executorTime
 
             obj.paramDetailList.map((m) => {
               if (m.extInfo.textType == 5) {
@@ -410,7 +412,7 @@ export default {
               ...obj
             };
           });
-
+          
         })
         .finally(() => {
           this.isLoad = true;
@@ -538,7 +540,7 @@ export default {
         // 	return false
         // }
       }
-
+console.log('4444444444',this.List)
       if (this.taskObj.type == 1) {
         const isCache = await this.checkCache(type);
 
@@ -623,7 +625,22 @@ export default {
       };
 
       getCache(parma).then((res) => {
-        console.log(res);
+        this.List.forEach((f,index)=>{
+          res.forEach((o)=>{
+            if(f.workOrderId==o.workOrderId){
+              f['product'] = o.extInfo.product
+              f['workReportInfo'] = o.extInfo.workReportInfo
+              f['notFormedList'] = o.extInfo.notFormedList
+              f['turnover'] = o.extInfo.turnover
+              f['productRecycleList'] = o.extInfo.productRecycleList
+              f['semiProductList'] = o.extInfo.semiProductList
+              f['modelList'] = o.extInfo.modelList
+              this.$set(this.List[index].workReportInfo,'executorTime',timestampToDateTime(o.extInfo.workReportInfo.executorTime))
+              this.$forceUpdate();
+            }
+          })
+        })
+        
       });
     },