From 7261c5a5c0af3b12495354db9c764e0fbd678adf Mon Sep 17 00:00:00 2001
From: Rui_Li <877258667@qq.com>
Date: Wed, 17 Aug 2022 16:43:52 +0800
Subject: [PATCH] =?UTF-8?q?2022-08-17=20=E6=9F=A5=E8=AF=A2-=E7=94=9F?=
=?UTF-8?q?=E4=BA=A7=E6=8E=92=E4=BA=A7=E5=8D=95=20=E5=8F=96=E6=B6=88?=
=?UTF-8?q?=E6=8E=92=E4=BA=A7=E6=93=8D=E4=BD=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/shopOrder/shopOrder.js | 3 +
.../searchProductionDispatchList.vue | 81 ++++++++++++++++++-
2 files changed, 82 insertions(+), 2 deletions(-)
diff --git a/src/api/shopOrder/shopOrder.js b/src/api/shopOrder/shopOrder.js
index b51c45e..2d5f910 100644
--- a/src/api/shopOrder/shopOrder.js
+++ b/src/api/shopOrder/shopOrder.js
@@ -77,5 +77,8 @@ export const getOrderNoRouteInMaxItemNo = data => createAPI('/shopOrder/getOrder
// 获取订单可用机台
export const getOrderNoItemNoCenter = data => createAPI('/shopOrder/getOrderNoItemNoCenter', 'post', data)
+//查询--生产派工单 ---》取消派工单操作
+export const cancelScheduleWithScheduleQuery = data => createAPI('/scheduling/cancelScheduleWithScheduleQuery', 'post', data)
+
diff --git a/src/views/modules/shopOrder/productionOrderScheduling/searchProductionDispatchList.vue b/src/views/modules/shopOrder/productionOrderScheduling/searchProductionDispatchList.vue
index 70a17b9..edee995 100644
--- a/src/views/modules/shopOrder/productionOrderScheduling/searchProductionDispatchList.vue
+++ b/src/views/modules/shopOrder/productionOrderScheduling/searchProductionDispatchList.vue
@@ -71,6 +71,7 @@
仅显示当前排产的派工单
{{'查询'}}
+ {{'取消排产'}}
import Chooselist from '@/views/modules/common/Chooselist'
import {
- searchProductionDispatchList
+ searchProductionDispatchList,
+ cancelScheduleWithScheduleQuery,
} from "@/api/shopOrder/shopOrder.js"
export default {
@@ -148,6 +154,19 @@
modelFlag:false,
modelInputFlag:true,
selectList:[],
+ scheduleRow: {},
+ pageData: {
+ site: this.$store.state.user.site,
+ username: this.$store.state.user.name,
+ orderNo: '',
+ itemNo: '',
+ seqNo: 0,
+ resourceId: '',
+ workCenterNo: '',
+ lotSize: 0,
+ scheduleSeqNo: 0,
+ planStartTime: '',
+ },
searchData: {
site:'',
orderNo:'',
@@ -935,10 +954,12 @@
this.$refs.baseList.init(val,strVal)
})
},
+
getData(){
searchProductionDispatchList(this.searchData).then(({data}) => {
this.dataList = data.rows
- })
+ });
+ this.scheduleRow = null;
},
//导出excel
createExportData() {
@@ -968,6 +989,62 @@
return s
},
// 导出 end
+
+ /*设置派工单的行*/
+ setCurrentSchedulingRow(row, column, event) {
+ this.scheduleRow = JSON.parse(JSON.stringify(row));
+ },
+
+ /*当前值发生变化的时候修改*/
+ currentSchedulingRow(row, oldRow){
+ //判断是否是获取焦点的事件
+ if(row){
+ this.scheduleRow = JSON.parse(JSON.stringify(row));
+ }
+ },
+
+ /*提示取消派工单*/
+ warnCancelScheduleConfirm(row, $event, column){
+ //先判断是否已经选好了行要操作
+ if(!this.scheduleRow){
+ this.$message.warning('请先选择派工单!');
+ return false;
+ }
+ //提示操作
+ this.$confirm('确实要取消该派工单吗?', '提示', {
+ confirmButtonText: '确认',
+ celButtonText: '取消',
+ type: 'warning'
+ }).then(() =>{
+ //执行创建新卷的操作
+ this.cancelScheduleBun();
+ });
+ },
+
+ /*取消派工单的操作*/
+ cancelScheduleBun(){
+ //设置参数
+ this.pageData.orderNo = this.scheduleRow.orderNo;
+ this.pageData.itemNo = this.scheduleRow.itemNo;
+ this.pageData.seqNo = this.scheduleRow.seqNo;
+ this.pageData.scheduledQty = this.scheduleRow.qtyRequired;
+ this.pageData.workCenterNo = this.scheduleRow.workCenterNo;
+ this.pageData.resourceId = this.scheduleRow.sResourceID;
+ this.pageData.scheduleSeqNo = this.scheduleRow.sScheduledSeqNo;
+ this.pageData.lotSize = this.scheduleRow.lotSize;
+ this.pageData.planStartTime = this.scheduleRow.planStartTime;
+ //取消排产
+ cancelScheduleWithScheduleQuery(this.pageData).then(({data}) => {
+ if(data.code == 500){
+ this.$message.error(data.msg);
+ }else{
+ this.$message.success(data.msg);
+ //刷新排产的数据
+ this.getData();
+ }
+ });
+ },
+
},
created() {