From 7985764aa551ca2a74041e35f76e86ab67f0b3b3 Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期一, 22 十二月 2025 16:30:08 +0800
Subject: [PATCH] 1.新增 控制指定车间是否末道工序报工
---
src/views/workOrder/workOrderList.vue | 41 ++++++++++++++++++++++++++++-------------
1 files changed, 28 insertions(+), 13 deletions(-)
diff --git a/src/views/workOrder/workOrderList.vue b/src/views/workOrder/workOrderList.vue
index f9ed3a2..9ff67f5 100644
--- a/src/views/workOrder/workOrderList.vue
+++ b/src/views/workOrder/workOrderList.vue
@@ -505,6 +505,7 @@
<div class="elTableDiv">
<el-table
+ ref="tableDataRef2"
:data="tableDataDetail"
border
height="210px"
@@ -513,18 +514,18 @@
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
>
- <!-- <el-table-column-->
- <!-- width="50"-->
- <!-- type="index"-->
- <!-- prop="搴忓彿"-->
- <!-- fixed-->
- <!-- /> -->
<el-table-column
width="50"
- prop="seq"
- label="搴忓彿"
+ type="index"
+ prop="搴忓彿"
fixed
/>
+ <!-- <el-table-column-->
+ <!-- width="50"-->
+ <!-- prop="seq"-->
+ <!-- label="搴忓彿"-->
+ <!-- fixed-->
+ <!-- />-->
<el-table-column
prop="wo_code"
show-tooltip-when-overflow
@@ -856,6 +857,7 @@
class="stepSelectedValueClass"
style="width: 930px;"
multiple
+ filterable
placeholder="璇烽�夋嫨鐩稿搴斿伐搴�"
@change="stepSelectedValueChange"
>
@@ -2560,6 +2562,7 @@
class="stepSelectedValueClass"
style="width: 930px;"
multiple
+ filterable
placeholder="璇烽�夋嫨鐩稿搴斿伐搴�"
@change="val=>stepSelectedValueChangeBatchUpdate(val,index)"
>
@@ -3004,7 +3007,9 @@
// do something with the new and old value of stepSelectedValue
console.log(val, 1)
console.log(this.stepTableData, 3)
+
const arr = JSON.parse(JSON.stringify(this.stepTableData))
+ console.log(arr, 33, this.dialogForm.mesqty)
const arrStepcode = arr.map(i => i.stepcode)
this.stepTableData = []
val.forEach(i => {
@@ -3119,7 +3124,8 @@
if (i.stepdata.length > 0) {
i.stepdata.forEach(j => {
j.ratio = parseFloat(j.ratio) > 0 ? parseFloat(j.ratio) : 0
- j.sumqty = Math.round(parseFloat(i.canupdate_qty) * (1 + (parseFloat(j.ratio) > 0 ? parseFloat(j.ratio) / 100 : 0)))
+ // j.sumqty = Math.round(parseFloat(i.canupdate_qty) * (1 + (parseFloat(j.ratio) > 0 ? parseFloat(j.ratio) / 100 : 0)))
+ j.sumqty = Math.round(parseFloat(this.formData3[index].mesqty) * (1 + (parseFloat(j.ratio) > 0 ? parseFloat(j.ratio) / 100 : 0)))
})
this.formData3[index].stepTableData = i.stepdata
this.formData3[index].stepSelectedValue = i.stepdata.map(j => j.stepcode)
@@ -3700,7 +3706,8 @@
stepname: i.stepname,
stepprice: i.stepprice,
ratio: parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) : 0,
- sumqty: Math.round(parseFloat(res.canupdate_qty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0)))
+ // sumqty: Math.round(parseFloat(res.canupdate_qty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0)))
+ sumqty: Math.round(parseFloat(this.dialogForm.mesqty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0)))
}
)
})
@@ -3734,7 +3741,8 @@
stepname: i.stepname,
stepprice: i.stepprice,
ratio: parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) : 0,
- sumqty: Math.round(parseFloat(res.canupdate_qty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0)))
+ // sumqty: Math.round(parseFloat(res.canupdate_qty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0)))
+ sumqty: Math.round(parseFloat(this.dialogForm.mesqty) * (1 + (parseFloat(i.ratio) > 0 ? parseFloat(i.ratio) / 100 : 0)))
}
)
})
@@ -4009,6 +4017,7 @@
}
this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
this.$refs.tableDataRef.doLayout()
+ this.$refs.tableDataRef2.doLayout()
})
},
// 宸ヨ壓璺嚎鏀惧ぇ闀滅偣鍑�
@@ -4454,7 +4463,12 @@
data_sources: row.data_sources
}
const { data: res } = await UpdateMesOrderStepSearch(data)
- this.tableDataDetail = res.stepdata
+
+ if (row.islastreport === 'Y') {
+ this.tableDataDetail = res.stepdata.filter(i => i.isend === 'Y')
+ } else {
+ this.tableDataDetail = res.stepdata
+ }
},
// 宸ュ簭鍒犻櫎
stepDel(row) {
@@ -4530,7 +4544,7 @@
getSummaries(param) {
const { columns, data } = param
const sums = []
- const i = 9
+ const i = 11
columns.forEach((column, index) => {
if (index === i) {
sums[index] = '鎬绘暟'
@@ -4552,6 +4566,7 @@
this.$nextTick(() => {
this.$refs.tableDataRef.doLayout()
+ this.$refs.tableDataRef2.doLayout()
})
return sums
}
--
Gitblit v1.9.3