Browse Source

2022-08-17 查询-生产排产单 取消排产操作

master
Rui_Li 3 years ago
parent
commit
7261c5a5c0
  1. 3
      src/api/shopOrder/shopOrder.js
  2. 81
      src/views/modules/shopOrder/productionOrderScheduling/searchProductionDispatchList.vue

3
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)

81
src/views/modules/shopOrder/productionOrderScheduling/searchProductionDispatchList.vue

@ -71,6 +71,7 @@
<el-input v-model="searchData.site" style="width: 80px"></el-input>
<el-checkbox style="margin-left: 2px;margin-top: 0px" v-model="searchData.checked">仅显示当前排产的派工单</el-checkbox>
<el-button @click="getData()" type="primary" style="margin-left: 100px;margin-top: 0px">{{'查询'}}</el-button>
<el-button @click="warnCancelScheduleConfirm" type="primary" style="margin-left: 30px; margin-top: 0px; margin-right: 20px;">{{'取消排产'}}</el-button>
<download-excel
:fields="fields()"
:data="exportData"
@ -91,6 +92,10 @@
:height="height"
:data="dataList"
border
highlight-current-row
@row-click="setCurrentSchedulingRow"
@row-dblclick="warnCancelScheduleConfirm"
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
@ -118,7 +123,8 @@
<script>
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() {

Loading…
Cancel
Save