|
|
|
@ -435,6 +435,7 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
getCascadeProOrder,
|
|
|
|
|
getProEquipment,
|
|
|
|
|
getProRoutes,
|
|
|
|
|
getProShifts,
|
|
|
|
@ -631,62 +632,70 @@ export default {
|
|
|
|
|
}, `order_${new Date().getTime()}.xlsx`)
|
|
|
|
|
},
|
|
|
|
|
/** 拆分按钮操作 */
|
|
|
|
|
splitBtn(row) {
|
|
|
|
|
//数据初始化
|
|
|
|
|
function setAtrr1(row) {
|
|
|
|
|
row.atrr1 = 0
|
|
|
|
|
if (row.children !== undefined) {
|
|
|
|
|
for (let i = 0; i < row.children.length; i++) {
|
|
|
|
|
setAtrr1(row.children[i])
|
|
|
|
|
splitBtn(e) {
|
|
|
|
|
var row;
|
|
|
|
|
getCascadeProOrder(e.orderCode).then(response => {
|
|
|
|
|
row = response.data
|
|
|
|
|
|
|
|
|
|
//数据初始化
|
|
|
|
|
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.resetBatch()
|
|
|
|
|
//将数据放入到productData中
|
|
|
|
|
this.productData.push(row)
|
|
|
|
|
//存放id
|
|
|
|
|
this.splitForm.id = row.id
|
|
|
|
|
this.refreshProTable = false // 先将refreshProTable设置为false,隐藏表格
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
// 使用$nextTick来等待DOM更新完成
|
|
|
|
|
this.refreshProTable = true // 立即将refreshProTable设置为true,显示表格
|
|
|
|
|
this.proLoading = false // 设置加载状态为false,表示加载完成
|
|
|
|
|
})
|
|
|
|
|
//初始化日期为默认今天
|
|
|
|
|
this.splitForm.productDate = new Date()
|
|
|
|
|
// 在获取到新的数据后执行以下代码
|
|
|
|
|
this.proLoading = true // 设置加载状态为true,表示正在加载
|
|
|
|
|
// 发送请求或执行异步操作获取最新的数据
|
|
|
|
|
//重置表单
|
|
|
|
|
this.resetBatch()
|
|
|
|
|
//将数据放入到productData中
|
|
|
|
|
this.productData.push(row)
|
|
|
|
|
//存放id
|
|
|
|
|
this.splitForm.id = row.id
|
|
|
|
|
this.refreshProTable = false // 先将refreshProTable设置为false,隐藏表格
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
// 使用$nextTick来等待DOM更新完成
|
|
|
|
|
this.refreshProTable = true // 立即将refreshProTable设置为true,显示表格
|
|
|
|
|
this.proLoading = false // 设置加载状态为false,表示加载完成
|
|
|
|
|
})
|
|
|
|
|
//初始化日期为默认今天
|
|
|
|
|
this.splitForm.productDate = new Date()
|
|
|
|
|
|
|
|
|
|
// 获取班次信息
|
|
|
|
|
getProShifts().then(response => {
|
|
|
|
|
this.workShift = response.data
|
|
|
|
|
})
|
|
|
|
|
// 获取工艺信息
|
|
|
|
|
getProRoutes(row.prodCode).then(response => {
|
|
|
|
|
this.routes = response.data
|
|
|
|
|
})
|
|
|
|
|
// 获取班次信息
|
|
|
|
|
getProShifts().then(response => {
|
|
|
|
|
this.workShift = response.data
|
|
|
|
|
})
|
|
|
|
|
// 获取工艺信息
|
|
|
|
|
getProRoutes(row.prodCode).then(response => {
|
|
|
|
|
this.routes = response.data
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.workerLoading = true // 设置加载状态为true,表示正在加载
|
|
|
|
|
// 获取工单
|
|
|
|
|
getWorkOrderList(row.id).then(response => {
|
|
|
|
|
var data = response.data
|
|
|
|
|
this.splitData = data
|
|
|
|
|
this.workerLoading = true // 设置加载状态为true,表示正在加载
|
|
|
|
|
// 获取工单
|
|
|
|
|
getWorkOrderList(row.id).then(response => {
|
|
|
|
|
var data = response.data
|
|
|
|
|
this.splitData = data
|
|
|
|
|
|
|
|
|
|
this.refreshWorkerTable = false // 先将refreshProTable设置为false,隐藏表格
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
// 使用$nextTick来等待DOM更新完成
|
|
|
|
|
this.refreshWorkerTable = true // 立即将refreshProTable设置为true,显示表格
|
|
|
|
|
this.workerLoading = false // 设置加载状态为false,表示加载完成
|
|
|
|
|
this.refreshWorkerTable = false // 先将refreshProTable设置为false,隐藏表格
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
// 使用$nextTick来等待DOM更新完成
|
|
|
|
|
this.refreshWorkerTable = true // 立即将refreshProTable设置为true,显示表格
|
|
|
|
|
this.workerLoading = false // 设置加载状态为false,表示加载完成
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.splitOpen = true
|
|
|
|
|
this.title = '拆分'
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.splitOpen = true
|
|
|
|
|
this.title = '拆分'
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
/** 拆分数量方法 */
|
|
|
|
|
splitNumChange(e) {
|
|
|
|
|