This commit is contained in:
2023-04-26 10:49:31 +08:00
parent 084b3fc797
commit 431b7b404e
2 changed files with 251 additions and 69 deletions

View File

@@ -1896,71 +1896,253 @@ export const productionStatistics = () => post('api/cockpit/productionStatistics
}) })
// export const productionStatistics = () => { // export const productionStatistics = () => {
// let res = { // let res = {
// 'finishedTask': [ // "code": 200,
// { // "desc": "操作成功",
// 'workorder_procedure': '今日压制量', // "result": {
// 'real_qty': 130 // "planRes": [
// }, // {
// { // "workorder_procedure": "压制",
// 'workorder_procedure': '今日干燥量', // "label": "2",
// 'real_qty': 160 // "plan_qty": 20000,
// }, // "real_qty": 480
// { // },
// 'workorder_procedure': '今日成品量', // {
// 'real_qty': 70 // "workorder_procedure": "原料",
// } // "label": "1",
// ], // "plan_qty": 0,
// 'planRes': [ // "real_qty": 0
// { // },
// 'workorder_procedure': '压制', // {
// 'plan_qty': 300, // "workorder_procedure": "压制",
// 'real_qty': 130 // "label": "2",
// }, // "plan_qty": 0,
// { // "real_qty": 0
// 'workorder_procedure': '干燥', // },
// 'plan_qty': 200, // {
// 'real_qty': 160 // "workorder_procedure": "干燥",
// }, // "label": "3",
// { // "plan_qty": 0,
// 'workorder_procedure': '包装', // "real_qty": 0
// 'plan_qty': 100, // },
// 'real_qty': 70 // {
// } // "workorder_procedure": "包装",
// ], // "label": "4",
// 'materialTask': [ // "plan_qty": 0,
// { // "real_qty": 0
// 'plan_qty': '600', // }
// 'real_qty': '360' // ],
// } // "materialTask": [],
// ], // "finishedRes": [
// 'productionTask': [ // {
// { // "workorder_procedure": "压制",
// 'workorder_id': '1597564588067524613', // "label": "2",
// 'label': '烧制', // "plan_qty": 20000,
// 'device_name': '混料机3', // "real_qty": 480
// 'material_code': 'HW00001', // },
// 'material_name': '木质花纹2cm', // {
// 'cust_name': '新余钢铁', // "workorder_procedure": "原料",
// 'plan_qty': 100, // "label": "1",
// 'real_qty': 80, // "plan_qty": 0,
// 'order_status': '完成', // "real_qty": 0
// 'shift_type': '烧制白班', // },
// 'realproducestart_date': '2023-2-27 12:40:00' // {
// }, // "workorder_procedure": "压制",
// { // "label": "2",
// 'workorder_id': '1597564588067524608', // "plan_qty": 0,
// 'label': '压制', // "real_qty": 0
// 'device_name': '混料机3', // },
// 'material_code': 'HW00001', // {
// 'material_name': '木质花纹2cm', // "workorder_procedure": "干燥",
// 'cust_name': '新余钢铁', // "label": "3",
// 'plan_qty': 100, // "plan_qty": 0,
// 'real_qty': 0, // "real_qty": 0
// 'order_status': '暂停', // },
// 'shift_type': '压制白班', // {
// 'realproducestart_date': '2023-2-27 09:15:00' // "workorder_procedure": "包装",
// } // "label": "4",
// ] // "plan_qty": 0,
// "real_qty": 0
// }
// ],
// "productionTask": [
// {
// "workorder_id": "1650768844706480128",
// "label": null,
// "device_name": "压机5",
// "material_code": "ZLMCZ1001C111122GM001BD20-8",
// "material_name": null,
// "cust_name": null,
// "plan_qty": 1000000,
// "real_qty": 0,
// "qualified_qty": 0,
// "unqualified_qty": 0,
// "order_status": "3",
// "order_status_name": "生产中",
// "shift_type": null,
// "realproducestart_date": "2023-04-25 15:51:44"
// },
// {
// "workorder_id": "1650404416467193856",
// "label": null,
// "device_name": "压机3",
// "material_code": "ZLMCZ1001C111122GM001BD20-8",
// "material_name": null,
// "cust_name": null,
// "plan_qty": 1000000,
// "real_qty": 0,
// "qualified_qty": 0,
// "unqualified_qty": 0,
// "order_status": "3",
// "order_status_name": "生产中",
// "shift_type": null,
// "realproducestart_date": "2023-04-24 15:42:59"
// },
// {
// "workorder_id": "1650040960085835776",
// "label": null,
// "device_name": "压机3",
// "material_code": "ZLMCZ1001C111122GM001BD20-8",
// "material_name": null,
// "cust_name": null,
// "plan_qty": 100000,
// "real_qty": 100004,
// "qualified_qty": 99807,
// "unqualified_qty": 197,
// "order_status": "5",
// "order_status_name": "完成",
// "shift_type": null,
// "realproducestart_date": "2023-04-23 15:38:03"
// },
// {
// "workorder_id": "1649612373595746304",
// "label": null,
// "device_name": "压机7",
// "material_code": "ZLMCZ1001C122211GM001BD20-8",
// "material_name": null,
// "cust_name": null,
// "plan_qty": 100000,
// "real_qty": 0,
// "qualified_qty": 0,
// "unqualified_qty": 0,
// "order_status": "3",
// "order_status_name": "生产中",
// "shift_type": null,
// "realproducestart_date": "2023-04-22 11:29:10"
// },
// {
// "workorder_id": "1649231836326563840",
// "label": null,
// "device_name": "压机3",
// "material_code": "ZLMCZ1001C122211GM001BD20-8",
// "material_name": null,
// "cust_name": null,
// "plan_qty": 100000,
// "real_qty": 276285,
// "qualified_qty": 263808,
// "unqualified_qty": 12477,
// "order_status": "5",
// "order_status_name": "完成",
// "shift_type": null,
// "realproducestart_date": "2023-04-21 10:10:40"
// },
// {
// "workorder_id": "1648878346865606656",
// "label": null,
// "device_name": "压机4",
// "material_code": "ZLMCZ1001C122211GM001BD20-8",
// "material_name": null,
// "cust_name": null,
// "plan_qty": 100000,
// "real_qty": 0,
// "qualified_qty": 0,
// "unqualified_qty": 0,
// "order_status": "3",
// "order_status_name": "生产中",
// "shift_type": null,
// "realproducestart_date": "2023-04-20 10:43:55"
// },
// {
// "workorder_id": "1648871924408909824",
// "label": null,
// "device_name": "压机3",
// "material_code": "ZLMCZ1001C111122GM001BD20-8",
// "material_name": null,
// "cust_name": null,
// "plan_qty": 100000,
// "real_qty": 0,
// "qualified_qty": 0,
// "unqualified_qty": 0,
// "order_status": "5",
// "order_status_name": "完成",
// "shift_type": null,
// "realproducestart_date": "2023-04-20 10:11:33"
// },
// {
// "workorder_id": "1648869698739240960",
// "label": null,
// "device_name": "压机3",
// "material_code": "ZLMCZ1001C111122GM001BD20-8",
// "material_name": null,
// "cust_name": null,
// "plan_qty": 100000,
// "real_qty": 1652528,
// "qualified_qty": 1549371,
// "unqualified_qty": 103157,
// "order_status": "5",
// "order_status_name": "完成",
// "shift_type": null,
// "realproducestart_date": "2023-04-20 10:03:54"
// },
// {
// "workorder_id": "1648860718914801664",
// "label": null,
// "device_name": "压机3",
// "material_code": "ZLMCZ1001C111122GM001BD20-8",
// "material_name": null,
// "cust_name": null,
// "plan_qty": 10000,
// "real_qty": 1652528,
// "qualified_qty": 1549371,
// "unqualified_qty": 103157,
// "order_status": "5",
// "order_status_name": "完成",
// "shift_type": null,
// "realproducestart_date": ""
// },
// {
// "workorder_id": "1648195777525485568",
// "label": null,
// "device_name": "压机2",
// "material_code": "ZLMCZ1001C111122GM001BD20-8",
// "material_name": null,
// "cust_name": null,
// "plan_qty": 10000,
// "real_qty": 0,
// "qualified_qty": 0,
// "unqualified_qty": 0,
// "order_status": "3",
// "order_status_name": "生产中",
// "shift_type": null,
// "realproducestart_date": "2023-04-18 13:34:36"
// },
// {
// "workorder_id": "1647845461961498624",
// "label": null,
// "device_name": "压机1",
// "material_code": "ZLMCZ1001C111122GM001BD20-8",
// "material_name": null,
// "cust_name": null,
// "plan_qty": 10000,
// "real_qty": 0,
// "qualified_qty": 0,
// "unqualified_qty": 0,
// "order_status": "3",
// "order_status_name": "生产中",
// "shift_type": null,
// "realproducestart_date": "2023-04-17 14:18:58"
// }
// ]
// }
// } // }
// return res // return res
// } // }

View File

@@ -123,14 +123,14 @@ export default {
async initData () { async initData () {
let res = await productionStatistics() let res = await productionStatistics()
this.resData = res.result this.resData = res.result
this.taskData = [...res.result.productionTask]
this.realqty = res.result.materialTask[0].real_qty
this.planqty = res.result.materialTask[0].plan_qty
this.showNum1 = (res.result.finishedRes[0].real_qty + '').split('') this.showNum1 = (res.result.finishedRes[0].real_qty + '').split('')
this.showNum2 = (res.result.finishedRes[1].real_qty + '').split('') this.showNum2 = (res.result.finishedRes[1].real_qty + '').split('')
this.showNum3 = (res.result.finishedRes[2].real_qty + '').split('') this.showNum3 = (res.result.finishedRes[2].real_qty + '').split('')
this.setEchart01() this.taskData = [...res.result.productionTask]
this.setEchart05() this.setEchart05()
this.realqty = res.result.materialTask[0].real_qty
this.planqty = res.result.materialTask[0].plan_qty
this.setEchart01()
// 五种状态:未成产、已下发、生产中、停止、完成 // 五种状态:未成产、已下发、生产中、停止、完成
}, },
setEchart01 () { setEchart01 () {