|
|
@@ -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()
|
|
|
}
|
|
|
}
|