计划模块(订单拆分搜索后拆分BUG解决)

master
wws 1 year ago
parent 8e66818077
commit 9cbe8c9902

@ -1,5 +1,13 @@
import request from '@/utils/request' import request from '@/utils/request'
// 通过木订单code获取级联订单信息并封装
export function getCascadeProOrder(orderCode) {
return request({
url: '/plan/order/getCascadeProOrder/' + orderCode,
method: 'get'
})
}
// 获取班次信息 // 获取班次信息
export function getProShifts() { export function getProShifts() {
return request({ return request({

@ -435,6 +435,7 @@
<script> <script>
import { import {
getCascadeProOrder,
getProEquipment, getProEquipment,
getProRoutes, getProRoutes,
getProShifts, getProShifts,
@ -631,62 +632,70 @@ export default {
}, `order_${new Date().getTime()}.xlsx`) }, `order_${new Date().getTime()}.xlsx`)
}, },
/** 拆分按钮操作 */ /** 拆分按钮操作 */
splitBtn(row) { splitBtn(e) {
// var row;
function setAtrr1(row) { getCascadeProOrder(e.orderCode).then(response => {
row.atrr1 = 0 row = response.data
if (row.children !== undefined) {
for (let i = 0; i < row.children.length; i++) { //
setAtrr1(row.children[i]) function setAtrr1(row) {
row.atrr1 = 0
if (row.children !== undefined) {
for (let i = 0; i < row.children.length; i++) {
setAtrr1(row.children[i])
}
} }
} }
}
setAtrr1(row) setAtrr1(row)
// //
this.proLoading = true // true this.proLoading = true // true
// //
// //
this.resetBatch() this.resetBatch()
//productData //productData
this.productData.push(row) this.productData.push(row)
//id //id
this.splitForm.id = row.id this.splitForm.id = row.id
this.refreshProTable = false // refreshProTablefalse this.refreshProTable = false // refreshProTablefalse
this.$nextTick(() => { this.$nextTick(() => {
// 使$nextTickDOM // 使$nextTickDOM
this.refreshProTable = true // refreshProTabletrue this.refreshProTable = true // refreshProTabletrue
this.proLoading = false // false this.proLoading = false // false
}) })
// //
this.splitForm.productDate = new Date() this.splitForm.productDate = new Date()
// //
getProShifts().then(response => { getProShifts().then(response => {
this.workShift = response.data this.workShift = response.data
}) })
// //
getProRoutes(row.prodCode).then(response => { getProRoutes(row.prodCode).then(response => {
this.routes = response.data this.routes = response.data
}) })
this.workerLoading = true // true this.workerLoading = true // true
// //
getWorkOrderList(row.id).then(response => { getWorkOrderList(row.id).then(response => {
var data = response.data var data = response.data
this.splitData = data this.splitData = data
this.refreshWorkerTable = false // refreshProTablefalse this.refreshWorkerTable = false // refreshProTablefalse
this.$nextTick(() => { this.$nextTick(() => {
// 使$nextTickDOM // 使$nextTickDOM
this.refreshWorkerTable = true // refreshProTabletrue this.refreshWorkerTable = true // refreshProTabletrue
this.workerLoading = false // false this.workerLoading = false // false
})
}) })
this.splitOpen = true
this.title = '拆分'
}) })
this.splitOpen = true
this.title = '拆分'
}, },
/** 拆分数量方法 */ /** 拆分数量方法 */
splitNumChange(e) { splitNumChange(e) {

Loading…
Cancel
Save