|
|
|
@ -78,7 +78,7 @@ |
|
|
|
</el-checkbox> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<!-- 查询时间和产品 --> |
|
|
|
<!-- 右键操作菜单 --> |
|
|
|
<el-form :inline="true"> |
|
|
|
<el-form-item label="生产工单列表"> |
|
|
|
<el-dropdown style="margin-top: 3px" class="customer-dropdown" @command="handleCommand"> |
|
|
|
@ -88,9 +88,10 @@ |
|
|
|
<el-dropdown-menu slot="dropdown"> |
|
|
|
<el-dropdown-item class="customer-li" command="0" :disabled="menuButton.prdButton">生产订单</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="1" :disabled="menuButton.closedButton">关闭</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="1" :disabled="menuButton.openButton">打开</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="1" :disabled="menuButton.pauseButton">暂停</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="1" :disabled="menuButton.openReverseButton">重新开工</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="2" :disabled="menuButton.openButton">打开</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="3" :disabled="menuButton.pauseButton">暂停</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="4" :disabled="menuButton.openReverseButton">重新开工 |
|
|
|
</el-dropdown-item> |
|
|
|
</el-dropdown-menu> |
|
|
|
</el-dropdown> |
|
|
|
</el-form-item> |
|
|
|
@ -161,7 +162,10 @@ |
|
|
|
|
|
|
|
import { |
|
|
|
getProduceScheduleList, |
|
|
|
reportCheck |
|
|
|
reportCheck, |
|
|
|
getUserSpecialSecurity, |
|
|
|
closeOrOpenProduceOrder, |
|
|
|
pauseOrOpenProduceOrder |
|
|
|
} from '@/api/yieldReport/produce_order.js'; |
|
|
|
|
|
|
|
/*引入组件*/ |
|
|
|
@ -1016,11 +1020,50 @@ export default { |
|
|
|
this.menuButton.pauseButton = true |
|
|
|
this.menuButton.openReverseButton = true |
|
|
|
} else { |
|
|
|
// 前往生产订单按钮 |
|
|
|
this.menuButton.prdButton = false |
|
|
|
|
|
|
|
// 获取用户权限 |
|
|
|
if (this.currentRow.closedFlag == 'N'){ |
|
|
|
this.menuButton.closedButton = false |
|
|
|
// 关闭按钮 |
|
|
|
if (this.currentRow.closedFlag == 'N') { |
|
|
|
let data = { |
|
|
|
userSpecialSecurityNo: 230, |
|
|
|
username: this.$store.state.user.name, |
|
|
|
} |
|
|
|
getUserSpecialSecurity(data).then(({data}) => { |
|
|
|
if (data.userSpecialSecurity == 'Y') { |
|
|
|
this.menuButton.closedButton = false |
|
|
|
} else { |
|
|
|
this.menuButton.closedButton = true |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.menuButton.closedButton = true |
|
|
|
} |
|
|
|
|
|
|
|
// 打开按钮 |
|
|
|
if (this.currentRow.closedFlag == 'Y') { |
|
|
|
this.menuButton.closedButton = true |
|
|
|
let data = { |
|
|
|
userSpecialSecurityNo: 231, |
|
|
|
username: this.$store.state.user.name, |
|
|
|
} |
|
|
|
getUserSpecialSecurity(data).then(({data}) => { |
|
|
|
if (data.userSpecialSecurity == 'Y') { |
|
|
|
this.menuButton.openButton = false |
|
|
|
} else { |
|
|
|
this.menuButton.openButton = true |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
// 暂停 |
|
|
|
if (this.currentRow.closedFlag == 'N' && this.currentRow.parkFlag == 'N') { |
|
|
|
this.menuButton.pauseButton = false |
|
|
|
this.menuButton.openReverseButton = true |
|
|
|
} |
|
|
|
// 重开 |
|
|
|
if (this.currentRow.closedFlag == 'N' & this.currentRow.parkFlag == 'Y') { |
|
|
|
this.menuButton.openReverseButton = false |
|
|
|
this.menuButton.pauseButton = true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1028,6 +1071,7 @@ export default { |
|
|
|
/*区分不同的菜单 调用不同的方法 调用不同的方法*/ |
|
|
|
handleCommand(val) { |
|
|
|
//区分是哪一个方法调用 |
|
|
|
//页面跳转 |
|
|
|
if ('0' == val) { |
|
|
|
if (JSON.stringify(this.currentRow) == '{}') { |
|
|
|
this.$message.error('请先选择派工单!'); |
|
|
|
@ -1035,11 +1079,106 @@ export default { |
|
|
|
} |
|
|
|
this.$router.push('/shopOrder-shopOrder/shopOrder', this.currentRow.orderNo) |
|
|
|
} |
|
|
|
// 关闭 |
|
|
|
if ('1' == val) { |
|
|
|
//调用提示的方法 |
|
|
|
this.warnReScheduleConfirm(); |
|
|
|
this.$confirm(`确定要关闭当前派工单吗?`, `关闭派工单`, { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let data = { |
|
|
|
username: this.$store.state.user.name, |
|
|
|
itemNo: this.currentRow.itemNo, |
|
|
|
site: this.currentRow.site, |
|
|
|
orderNo: this.currentRow.orderNo, |
|
|
|
seqNo: this.currentRow.seqNo, |
|
|
|
closedFlag: 'Y', |
|
|
|
} |
|
|
|
closeOrOpenProduceOrder(data).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
this.$message.success(data.msg) |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
} |
|
|
|
// 打开 |
|
|
|
if ('2' == val) { |
|
|
|
//调用提示的方法 |
|
|
|
this.$confirm(`确定要打开当前派工单吗?`, `关闭派工单`, { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let data = { |
|
|
|
username: this.$store.state.user.name, |
|
|
|
itemNo: this.currentRow.itemNo, |
|
|
|
site: this.currentRow.site, |
|
|
|
orderNo: this.currentRow.orderNo, |
|
|
|
seqNo: this.currentRow.seqNo, |
|
|
|
closedFlag: 'N', |
|
|
|
} |
|
|
|
closeOrOpenProduceOrder(data).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
this.$message.success(data.msg) |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
} |
|
|
|
// 暂停 |
|
|
|
if ('3' == val) { |
|
|
|
//调用提示的方法 |
|
|
|
this.$confirm(`确定要暂停当前派工单吗?`, `关闭派工单`, { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let data = { |
|
|
|
username: this.$store.state.user.name, |
|
|
|
itemNo: this.currentRow.itemNo, |
|
|
|
site: this.currentRow.site, |
|
|
|
orderNo: this.currentRow.orderNo, |
|
|
|
seqNo: this.currentRow.seqNo, |
|
|
|
parkFlag: 'Y', |
|
|
|
} |
|
|
|
pauseOrOpenProduceOrder(data).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
this.$message.success(data.msg) |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
} |
|
|
|
// 重开 |
|
|
|
if ('4' == val) { |
|
|
|
//调用提示的方法 |
|
|
|
this.$confirm(`确定要重开当前派工单吗?`, `关闭派工单`, { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let data = { |
|
|
|
username: this.$store.state.user.name, |
|
|
|
itemNo: this.currentRow.itemNo, |
|
|
|
site: this.currentRow.site, |
|
|
|
orderNo: this.currentRow.orderNo, |
|
|
|
seqNo: this.currentRow.seqNo, |
|
|
|
parkFlag: 'N', |
|
|
|
} |
|
|
|
pauseOrOpenProduceOrder(data).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
this.$message.success(data.msg) |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
// FQC 报工 |
|
|
|
fqcReportModal() { |
|
|
|
|