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