فهرست منبع

Merge branch 'master' of https://git.7in6.com/Minong/mes-admin-backend-ui

Lexie 1 سال پیش
والد
کامیت
3d3fa34829
2فایلهای تغییر یافته به همراه24 افزوده شده و 6 حذف شده
  1. 4 2
      src/view/performance/chejianbaogong.vue
  2. 20 4
      src/view/yunyin/shengchanguanli/gongdanshengchan.vue

+ 4 - 2
src/view/performance/chejianbaogong.vue

@@ -2774,8 +2774,10 @@ const complaintshandle = (val, row) => {
 };
 //设置机台状态
 function onstatus() {
-	dialogSbyxgl.value=true
-	 SetMachineStatus()
+  FacilityProduction().then(()=>{
+    dialogSbyxgl.value=true
+  })
+	 // SetMachineStatus()
 	 // ReportProduceInfo()
 }
 function onClear() {

+ 20 - 4
src/view/yunyin/shengchanguanli/gongdanshengchan.vue

@@ -1226,9 +1226,9 @@ const paichengColumns = ref(
     [
       { label: '优先次序', prop: '优先次序', width: '105' },
       { label: '工单编号', prop: '工单编号', width: '100' },
-      { label: '印件名称', prop: '印件名称', width: '200' },
-      { label: '接货数', prop: '计划接货数', width: '105' },
-      { label: '已完成', prop: '已完成', width: '105' },
+      // { label: '印件名称', prop: '印件名称', width: '200' },
+      { label: '接货数', prop: '计划接货数', width: '90' },
+      { label: '已完成', prop: '已完成', width: '90' },
       { label: '小时产能', prop: '小时产能', width: '100' },
       { label: '生产工时', prop: '生产工时', width: '100' },
       { label: '辅助工时', prop: '辅助工时', width: '100' },
@@ -1253,6 +1253,16 @@ const handleDataSortAndSettingDate = () => {
   });
 
   paichengData.value.map((item, index) => {
+    console.log(Math.round(((item['计划接货数'] ?? 0) - Number(item['已完成'] ?? 0)) / item['小时产能']).toFixed(1))
+
+
+    if(item['小时产能'] !== '' && item['小时产能'] !== 0){
+      item['生产工时'] = Math.round(((item['计划接货数'] ?? 0) - Number(item['已完成'] ?? 0)) / item['小时产能']).toFixed(1);
+    }
+    if(item['生产工时'] === 'Infinity' || item['生产工时'] === '-Infinity'){
+      item['生产工时'] = 0;
+    }
+
     let hour = parseFloat(item['生产工时']) + parseFloat(item['辅助工时'])
     if ( ((Math.floor(hour) * 10) % 10) !== 5) {
       hour = Math.round(hour)
@@ -1274,11 +1284,17 @@ const handleDataSortAndSettingDate = () => {
 }
 
 const handleBlur = (name, item) => {
+  console.log(name)
+  console.log(item)
   if (name === '优先次序' || name === '计划开工时间' || name === '生产工时' || name === '辅助工时' || name === '最早开工时间') {
     handleDataSortAndSettingDate()
   }
   if (name === '小时产能') {
-    item['生产工时'] = Math.round( ( (item['计划接货数'] ?? 0) - Number(item['已完成'] ?? 0) ) / item['小时产能'] ).toFixed(1)
+    // console.log(item)
+    // item['生产工时'] = Math.round( ( (item['计划接货数'] ?? 0) - Number(item['已完成'] ?? 0) ) / item['小时产能'] ).toFixed(1)
+    // console.log(item['计划接货数'])
+    // console.log(item['已完成'])
+    // console.log(item['生产工时'])
     handleDataSortAndSettingDate()
   }
 }