|
|
@@ -1,7 +1,7 @@ |
|
|
|
<!-- |
|
|
|
* @Author: zhp |
|
|
|
* @Date: 2024-04-15 10:49:13 |
|
|
|
* @LastEditTime: 2024-07-09 10:17:41 |
|
|
|
* @LastEditTime: 2024-07-09 11:08:43 |
|
|
|
* @LastEditors: zhp |
|
|
|
* @Description: |
|
|
|
--> |
|
|
@@ -338,7 +338,7 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
async otherMethods(val) { |
|
|
|
otherMethods(val) { |
|
|
|
console.log(val) |
|
|
|
if (val.type === 'detail') { |
|
|
|
this.detailOrUpdateVisible = true; |
|
|
@@ -347,33 +347,37 @@ export default { |
|
|
|
this.$refs.detailOrUpdate.init(val.data.id); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
const res = await getWorkOrderDetail(val.data.id) |
|
|
|
if (res.code === 0) { |
|
|
|
// this.loading = false |
|
|
|
;const data = res.data.prodWorkOrderDO |
|
|
|
const barList = [data.targetProduction, data.plannedInvestment, data.actualInvestment, data.actualProduction, data.wasteNum, data.reworkNum] |
|
|
|
const seriesList = [] |
|
|
|
const dateList = [] |
|
|
|
res.data.his.forEach(element => { |
|
|
|
seriesList.push(element.actualProduction) |
|
|
|
dateList.push(element.recordTime[0] + '-' + element.recordTime[1] + '-' + element.recordTime[2]) |
|
|
|
getWorkOrderDetail(val.data.id).then((res) => { |
|
|
|
if (res.code === 0) { |
|
|
|
// this.loading = false |
|
|
|
|
|
|
|
const xAxisList = Object.keys(res.data.inProcessDis) |
|
|
|
const yAxisList = Object.values(res.data.inProcessDis) |
|
|
|
this.beProcessObj.xAxisList = xAxisList |
|
|
|
this.beProcessObj.yAxisList = yAxisList |
|
|
|
// console.log(this.beProcessObj) |
|
|
|
; const data = res.data.prodWorkOrderDO |
|
|
|
const barList = [data.targetProduction, data.plannedInvestment, data.actualInvestment, data.actualProduction, data.wasteNum, data.reworkNum] |
|
|
|
const seriesList = [] |
|
|
|
const dateList = [] |
|
|
|
res.data.his.forEach(element => { |
|
|
|
seriesList.push(element.actualProduction) |
|
|
|
dateList.push(element.recordTime[0] + '-' + element.recordTime[1] + '-' + element.recordTime[2]) |
|
|
|
}) |
|
|
|
this.hisObj.seriesList = seriesList |
|
|
|
this.hisObj.dateList = dateList |
|
|
|
this.produceData = barList |
|
|
|
this.pieList = [ |
|
|
|
{ value: data.actualProduction ? data.actualProduction : 0, name: '实际产出' }, |
|
|
|
{ value: data.wasteNum ? data.wasteNum : 0, name: '废品数量' }, |
|
|
|
{ value: data.reworkNum ? data.reworkNum : 0, name: '待再加工数量' } |
|
|
|
] |
|
|
|
} |
|
|
|
this.$nextTick(() => { |
|
|
|
this.exportPDF() |
|
|
|
}) |
|
|
|
this.hisObj.seriesList = seriesList |
|
|
|
this.hisObj.dateList = dateList |
|
|
|
const xAxisList = Object.keys(res.data.inProcessDis) |
|
|
|
const yAxisList = Object.values(res.data.inProcessDis) |
|
|
|
this.beProcessObj.xAxisList = xAxisList |
|
|
|
this.beProcessObj.yAxisList = yAxisList |
|
|
|
this.produceData = barList |
|
|
|
this.pieList = [ |
|
|
|
{ value: data.actualProduction ? data.actualProduction : 0, name: '实际产出' }, |
|
|
|
{ value: data.wasteNum ? data.wasteNum : 0, name: '废品数量' }, |
|
|
|
{ value: data.reworkNum ? data.reworkNum : 0, name: '待再加工数量' } |
|
|
|
] |
|
|
|
} |
|
|
|
this.$nextTick(() => { |
|
|
|
this.exportPDF() |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
async getDataList() { |
|
|
|