|
|
@@ -15,9 +15,18 @@ export default {
|
|
|
}
|
|
|
// 2工单超节损统计(按工序)
|
|
|
import service from '@/utils/request'
|
|
|
-const getOrderSuperLossCount = (params) => {
|
|
|
+const ProcessLoss = (params) => {
|
|
|
return service({
|
|
|
- url: '/mes_server/order_super_loss/getOrderSuperLossCount',
|
|
|
+ url: '/mes_server/Order_Super_Loss/ProcessLoss',
|
|
|
+ method: 'get',
|
|
|
+ params
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+// 2工单超节损统计(按班组)
|
|
|
+const ClassLossData = (params) => {
|
|
|
+ return service({
|
|
|
+ url: '/mes_server/order_super_loss/ClassLossData',
|
|
|
method: 'get',
|
|
|
params
|
|
|
})
|
|
|
@@ -54,9 +63,8 @@ const handlePrint1 = async() => {
|
|
|
const params = {
|
|
|
order: input.value,
|
|
|
yjno:yjno.value,
|
|
|
- type: '1',
|
|
|
}
|
|
|
- const res = await getOrderSuperLossCount(params)
|
|
|
+ const res = await ProcessLoss(params)
|
|
|
if (res['code'] === 0) {
|
|
|
console.log(res['data'])
|
|
|
const { data } = res
|
|
|
@@ -81,13 +89,13 @@ const handlePrint1 = async() => {
|
|
|
'wff': data['外发废'],
|
|
|
'ltcl': data['零头处理'],
|
|
|
'zcf': data['zcfp'],
|
|
|
- 'zjf': data['工单质检废'],
|
|
|
+ 'zjf': data['班组分摊质检废品'],
|
|
|
'wxs': data['intangible_loss'],
|
|
|
'mbhgl': data['target_rate'],
|
|
|
'sjhgl': data['real_rate'],
|
|
|
'total1': data['total']['plan_loss'],
|
|
|
'total2': data['total']['total_fp'],
|
|
|
- 'total3': data['total']['waste_quality'],
|
|
|
+ 'total3': data['total']['total_zjfp'],
|
|
|
'total4': data['total']['waste_intangible'],
|
|
|
'total5': data['total']['total_waste'],
|
|
|
'total6': data['total']['loss'],
|
|
|
@@ -98,14 +106,14 @@ const handlePrint1 = async() => {
|
|
|
'jhsh': item['Gy0_计划损耗'],
|
|
|
'zcf': item['total_fp'],
|
|
|
'zjf': item['waste_quality'],
|
|
|
- 'wxs': item['intangible_loss'],
|
|
|
+ 'wxs': item['Gy0_无形损'],
|
|
|
'bfhj': item['total_waste'],
|
|
|
'jss': item['loss'],
|
|
|
'tlbfl': item['loss_rate'],
|
|
|
'mbbfl': item['target_loss_rate'],
|
|
|
'sjbfl': item['actual_loss_rate'],
|
|
|
'cdbl': item['超节损承担比例'],
|
|
|
- 'gxcjsje': item['工序超节损金额'].substring(0, item['工序超节损金额'].length - 2),
|
|
|
+ 'gxcjsje': item['工序超节损金额'].substring(0, item['工序超节损金额'].length),
|
|
|
'zgqr': '',
|
|
|
})),
|
|
|
}
|
|
|
@@ -123,9 +131,8 @@ const handlePrint2 = async() => {
|
|
|
const params = {
|
|
|
order: input.value,
|
|
|
yjno:yjno.value,
|
|
|
- type: '2',
|
|
|
}
|
|
|
- const res = await getOrderSuperLossCount(params)
|
|
|
+ const res = await ClassLossData(params)
|
|
|
if (res['code'] === 0) {
|
|
|
console.log(res['data'])
|
|
|
const { data } = res
|
|
|
@@ -147,13 +154,13 @@ const handlePrint2 = async() => {
|
|
|
'wff': data['外发废'],
|
|
|
'ltcl': data['零头处理'],
|
|
|
'zcf': data['zcfp'],
|
|
|
- 'zjf': data['工单质检废'],
|
|
|
+ 'zjf': data['班组分摊质检废品'],
|
|
|
'wxs': data['intangible_loss'],
|
|
|
'mbhgl': data['target_rate'],
|
|
|
'sjhgl': data['real_rate'],
|
|
|
'plan_loss': data['total']['plan_loss'],
|
|
|
'total_fp': data['total']['total_fp'],
|
|
|
- 'waste_quality': data['total']['waste_quality'],
|
|
|
+ 'waste_quality': data['total']['total_zjfp'],
|
|
|
'waste_intangible': data['total']['waste_intangible'],
|
|
|
'total_jsj': data['total']['reward'],
|
|
|
'table': data['gy_data'].map(item => ({
|