|
|
@ -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 // 先将refreshProTable设置为false,隐藏表格
|
|
|
|
this.refreshProTable = false // 先将refreshProTable设置为false,隐藏表格
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
// 使用$nextTick来等待DOM更新完成
|
|
|
|
// 使用$nextTick来等待DOM更新完成
|
|
|
|
this.refreshProTable = true // 立即将refreshProTable设置为true,显示表格
|
|
|
|
this.refreshProTable = true // 立即将refreshProTable设置为true,显示表格
|
|
|
|
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 // 先将refreshProTable设置为false,隐藏表格
|
|
|
|
this.refreshWorkerTable = false // 先将refreshProTable设置为false,隐藏表格
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
// 使用$nextTick来等待DOM更新完成
|
|
|
|
// 使用$nextTick来等待DOM更新完成
|
|
|
|
this.refreshWorkerTable = true // 立即将refreshProTable设置为true,显示表格
|
|
|
|
this.refreshWorkerTable = true // 立即将refreshProTable设置为true,显示表格
|
|
|
|
this.workerLoading = false // 设置加载状态为false,表示加载完成
|
|
|
|
this.workerLoading = false // 设置加载状态为false,表示加载完成
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.splitOpen = true
|
|
|
|
|
|
|
|
this.title = '拆分'
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
this.splitOpen = true
|
|
|
|
|
|
|
|
this.title = '拆分'
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 拆分数量方法 */
|
|
|
|
/** 拆分数量方法 */
|
|
|
|
splitNumChange(e) {
|
|
|
|
splitNumChange(e) {
|
|
|
|