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() {