|
|
@ -51,27 +51,30 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
<el-form-item > |
|
|
|
|
|
|
|
|
<el-form-item> |
|
|
<span slot="label" style="" @click="getBaseList(24)"><a herf="#">加工中心编码:</a></span> |
|
|
<span slot="label" style="" @click="getBaseList(24)"><a herf="#">加工中心编码:</a></span> |
|
|
<el-input v-model="searchData.workCenterNo" style="width: 130px"></el-input> |
|
|
<el-input v-model="searchData.workCenterNo" style="width: 130px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item > |
|
|
|
|
|
|
|
|
<el-form-item> |
|
|
<span slot="label" style="" @click="getBaseList(88)"><a herf="#">机台编号:</a></span> |
|
|
<span slot="label" style="" @click="getBaseList(88)"><a herf="#">机台编号:</a></span> |
|
|
<el-input v-model="searchData.sResourceID" style="width: 130px"></el-input> |
|
|
<el-input v-model="searchData.sResourceID" style="width: 130px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item > |
|
|
|
|
|
|
|
|
<el-form-item> |
|
|
<span slot="label" style="" @click="getBaseList(5)"><a herf="#">产成品编码:</a></span> |
|
|
<span slot="label" style="" @click="getBaseList(5)"><a herf="#">产成品编码:</a></span> |
|
|
<el-input v-model="searchData.partNo" style="width: 130px"></el-input> |
|
|
<el-input v-model="searchData.partNo" style="width: 130px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="'生产订单号:'"> |
|
|
<el-form-item :label="'生产订单号:'"> |
|
|
<el-input v-model="searchData.orderNo" style="width: 130px"></el-input> |
|
|
<el-input v-model="searchData.orderNo" style="width: 130px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item > |
|
|
|
|
|
|
|
|
<el-form-item> |
|
|
<span slot="label" style="" @click="getBaseList(18)"><a herf="#">工厂编码:</a></span> |
|
|
<span slot="label" style="" @click="getBaseList(18)"><a herf="#">工厂编码:</a></span> |
|
|
<el-input v-model="searchData.site" style="width: 80px"></el-input> |
|
|
<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> |
|
|
|
|
|
|
|
|
<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 |
|
|
<download-excel |
|
|
:fields="fields()" |
|
|
:fields="fields()" |
|
|
:data="exportData" |
|
|
:data="exportData" |
|
|
@ -111,7 +114,7 @@ |
|
|
:width="item.columnWidth" |
|
|
:width="item.columnWidth" |
|
|
:label="item.columnLabel"> |
|
|
:label="item.columnLabel"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span> |
|
|
|
|
|
|
|
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|
|
style="width: 100px; height: 80px"/></span> |
|
|
style="width: 100px; height: 80px"/></span> |
|
|
</template> |
|
|
</template> |
|
|
@ -126,53 +129,40 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import Chooselist from '@/views/modules/common/Chooselist'; |
|
|
|
|
|
import column from '@/views/modules/common/column';/*动态表头*/ |
|
|
|
|
|
|
|
|
import Chooselist from '@/views/modules/common/Chooselist'; |
|
|
|
|
|
import column from '@/views/modules/common/column';/*动态表头*/ |
|
|
|
|
|
|
|
|
/*动态表头*/ |
|
|
|
|
|
import { |
|
|
|
|
|
|
|
|
/*动态表头*/ |
|
|
|
|
|
import { |
|
|
saveTableDefaultList, |
|
|
saveTableDefaultList, |
|
|
getTableDefaultListLanguage, |
|
|
getTableDefaultListLanguage, |
|
|
getTableUserListLanguage, |
|
|
getTableUserListLanguage, |
|
|
removerDefault, |
|
|
removerDefault, |
|
|
removerUser |
|
|
removerUser |
|
|
} from "@/api/table.js"; |
|
|
|
|
|
|
|
|
} from "@/api/table.js"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
|
|
|
import { |
|
|
searchProductionDispatchList, |
|
|
searchProductionDispatchList, |
|
|
cancelScheduleWithScheduleQuery, |
|
|
cancelScheduleWithScheduleQuery, |
|
|
} from "@/api/shopOrder/shopOrder.js" |
|
|
|
|
|
|
|
|
} from "@/api/shopOrder/shopOrder.js" |
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
|
//查询-生产派工单 |
|
|
|
|
|
name: "searchProductionDispatchList", |
|
|
|
|
|
watch: { |
|
|
|
|
|
searchData: { |
|
|
|
|
|
deep: true, |
|
|
|
|
|
handler: function (newV, oldV) { |
|
|
|
|
|
this.searchData.partNo = this.searchData.partNo.toUpperCase() |
|
|
|
|
|
this.searchData.sResourceID = this.searchData.sResourceID.toUpperCase() |
|
|
|
|
|
this.searchData.orderNo = this.searchData.orderNo.toUpperCase() |
|
|
|
|
|
this.searchData.workCenterNo = this.searchData.workCenterNo.toUpperCase() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
tagNo:'', |
|
|
|
|
|
|
|
|
tagNo: '', |
|
|
showDefault: false, |
|
|
showDefault: false, |
|
|
visible: false, |
|
|
visible: false, |
|
|
// 导出 start |
|
|
// 导出 start |
|
|
exportData: [], |
|
|
exportData: [], |
|
|
exportName: "生产派工单"+this.dayjs().format('YYYYMMDDHHmmss'), |
|
|
|
|
|
|
|
|
exportName: "生产派工单" + this.dayjs().format('YYYYMMDDHHmmss'), |
|
|
exportHeader: ["生产派工单"], |
|
|
exportHeader: ["生产派工单"], |
|
|
exportFooter: [], |
|
|
exportFooter: [], |
|
|
// 导出 end |
|
|
// 导出 end |
|
|
height: 200, |
|
|
height: 200, |
|
|
modelFlag:false, |
|
|
|
|
|
modelInputFlag:true, |
|
|
|
|
|
selectList:[], |
|
|
|
|
|
|
|
|
modelFlag: false, |
|
|
|
|
|
modelInputFlag: true, |
|
|
|
|
|
selectList: [], |
|
|
scheduleRow: {}, |
|
|
scheduleRow: {}, |
|
|
pageData: { |
|
|
pageData: { |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
@ -187,21 +177,21 @@ |
|
|
planStartTime: '', |
|
|
planStartTime: '', |
|
|
}, |
|
|
}, |
|
|
searchData: { |
|
|
searchData: { |
|
|
site:'', |
|
|
|
|
|
orderNo:this.$route.query.orderNo, |
|
|
|
|
|
|
|
|
site: '', |
|
|
|
|
|
orderNo: this.$route.query.orderNo, |
|
|
checked: true, |
|
|
checked: true, |
|
|
partNo:'', |
|
|
|
|
|
sResourceID:'', |
|
|
|
|
|
workCenterNo:'', |
|
|
|
|
|
date1:'', |
|
|
|
|
|
date2:'', |
|
|
|
|
|
date3:'', |
|
|
|
|
|
date4:'', |
|
|
|
|
|
date5:'', |
|
|
|
|
|
date6:'', |
|
|
|
|
|
user:this.$store.state.user.name |
|
|
|
|
|
}, |
|
|
|
|
|
dataList:[], |
|
|
|
|
|
|
|
|
partNo: '', |
|
|
|
|
|
sResourceID: '', |
|
|
|
|
|
workCenterNo: '', |
|
|
|
|
|
date1: '', |
|
|
|
|
|
date2: '', |
|
|
|
|
|
date3: '', |
|
|
|
|
|
date4: '', |
|
|
|
|
|
date5: '', |
|
|
|
|
|
date6: '', |
|
|
|
|
|
user: this.$store.state.user.name |
|
|
|
|
|
}, |
|
|
|
|
|
dataList: [], |
|
|
dataListLoading: false, |
|
|
dataListLoading: false, |
|
|
buttons: { |
|
|
buttons: { |
|
|
settingLanguageList: '按语言设置', |
|
|
settingLanguageList: '按语言设置', |
|
|
@ -939,7 +929,7 @@ |
|
|
columnWidth: 100 |
|
|
columnWidth: 100 |
|
|
} |
|
|
} |
|
|
], |
|
|
], |
|
|
queryTable:{ |
|
|
|
|
|
|
|
|
queryTable: { |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: this.$route.meta.menuId, |
|
|
functionId: this.$route.meta.menuId, |
|
|
tableId: "6023Table", |
|
|
tableId: "6023Table", |
|
|
@ -961,48 +951,72 @@ |
|
|
Chooselist, |
|
|
Chooselist, |
|
|
column,/*动态列*/ |
|
|
column,/*动态列*/ |
|
|
}, |
|
|
}, |
|
|
|
|
|
watch: { |
|
|
|
|
|
searchData: { |
|
|
|
|
|
deep: true, |
|
|
|
|
|
handler: function (newV, oldV) { |
|
|
|
|
|
this.searchData.partNo = this.searchData.partNo.toUpperCase() |
|
|
|
|
|
this.searchData.sResourceID = this.searchData.sResourceID.toUpperCase() |
|
|
|
|
|
this.searchData.orderNo = this.searchData.orderNo.toUpperCase() |
|
|
|
|
|
this.searchData.workCenterNo = this.searchData.workCenterNo.toUpperCase() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
$route: { |
|
|
|
|
|
handler: function (val, oldVal) { |
|
|
|
|
|
this.$router.onReady(() => { |
|
|
|
|
|
if (this.$route.query.orderNo) { |
|
|
|
|
|
this.searchData.orderNo = this.$route.query.orderNo, |
|
|
|
|
|
this.getData() |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 深度观察监听 |
|
|
|
|
|
deep: true |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.height = window.innerHeight - 180; |
|
|
this.height = window.innerHeight - 180; |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
getBaseData(val){ |
|
|
|
|
|
if (this.tagNo === 24){ |
|
|
|
|
|
|
|
|
getBaseData(val) { |
|
|
|
|
|
if (this.tagNo === 24) { |
|
|
this.searchData.workCenterNo = val.WorkCenterNo |
|
|
this.searchData.workCenterNo = val.WorkCenterNo |
|
|
} |
|
|
} |
|
|
if (this.tagNo === 88){ |
|
|
|
|
|
|
|
|
if (this.tagNo === 88) { |
|
|
this.searchData.sResourceID = val.ResourceID |
|
|
this.searchData.sResourceID = val.ResourceID |
|
|
} |
|
|
} |
|
|
if (this.tagNo === 5){ |
|
|
|
|
|
|
|
|
if (this.tagNo === 5) { |
|
|
this.searchData.partNo = val.PartNo |
|
|
this.searchData.partNo = val.PartNo |
|
|
} |
|
|
} |
|
|
if (this.tagNo === 18){ |
|
|
|
|
|
|
|
|
if (this.tagNo === 18) { |
|
|
this.searchData.site = val.Site |
|
|
this.searchData.site = val.Site |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 获取基础数据列表 |
|
|
// 获取基础数据列表 |
|
|
getBaseList(val){ |
|
|
|
|
|
|
|
|
getBaseList(val) { |
|
|
this.tagNo = val |
|
|
this.tagNo = val |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
let strVal = ""; |
|
|
let strVal = ""; |
|
|
if (val === 24){ |
|
|
|
|
|
|
|
|
if (val === 24) { |
|
|
strVal = this.searchData.workCenterNo |
|
|
strVal = this.searchData.workCenterNo |
|
|
} |
|
|
} |
|
|
if (val === 88){ |
|
|
|
|
|
|
|
|
if (val === 88) { |
|
|
strVal = this.searchData.sResourceID |
|
|
strVal = this.searchData.sResourceID |
|
|
} |
|
|
} |
|
|
if (val === 5){ |
|
|
|
|
|
|
|
|
if (val === 5) { |
|
|
strVal = this.searchData.partNo |
|
|
strVal = this.searchData.partNo |
|
|
} |
|
|
} |
|
|
if (val === 18){ |
|
|
|
|
|
|
|
|
if (val === 18) { |
|
|
strVal = this.searchData.site |
|
|
strVal = this.searchData.site |
|
|
} |
|
|
} |
|
|
this.$refs.baseList.init(val,strVal) |
|
|
|
|
|
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
getData(){ |
|
|
|
|
|
|
|
|
getData() { |
|
|
searchProductionDispatchList(this.searchData).then(({data}) => { |
|
|
searchProductionDispatchList(this.searchData).then(({data}) => { |
|
|
this.dataList = data.rows |
|
|
this.dataList = data.rows |
|
|
}); |
|
|
}); |
|
|
@ -1043,17 +1057,17 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/*当前值发生变化的时候修改*/ |
|
|
/*当前值发生变化的时候修改*/ |
|
|
currentSchedulingRow(row, oldRow){ |
|
|
|
|
|
|
|
|
currentSchedulingRow(row, oldRow) { |
|
|
//判断是否是获取焦点的事件 |
|
|
//判断是否是获取焦点的事件 |
|
|
if(row){ |
|
|
|
|
|
|
|
|
if (row) { |
|
|
this.scheduleRow = JSON.parse(JSON.stringify(row)); |
|
|
this.scheduleRow = JSON.parse(JSON.stringify(row)); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/*提示取消派工单*/ |
|
|
/*提示取消派工单*/ |
|
|
warnCancelScheduleConfirm(row, $event, column){ |
|
|
|
|
|
|
|
|
warnCancelScheduleConfirm(row, $event, column) { |
|
|
//先判断是否已经选好了行要操作 |
|
|
//先判断是否已经选好了行要操作 |
|
|
if(!this.scheduleRow){ |
|
|
|
|
|
|
|
|
if (!this.scheduleRow) { |
|
|
this.$message.warning('请先选择派工单!'); |
|
|
this.$message.warning('请先选择派工单!'); |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
@ -1062,14 +1076,14 @@ |
|
|
confirmButtonText: '确认', |
|
|
confirmButtonText: '确认', |
|
|
celButtonText: '取消', |
|
|
celButtonText: '取消', |
|
|
type: 'warning' |
|
|
type: 'warning' |
|
|
}).then(() =>{ |
|
|
|
|
|
|
|
|
}).then(() => { |
|
|
//执行创建新卷的操作 |
|
|
//执行创建新卷的操作 |
|
|
this.cancelScheduleBun(); |
|
|
this.cancelScheduleBun(); |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/*取消派工单的操作*/ |
|
|
/*取消派工单的操作*/ |
|
|
cancelScheduleBun(){ |
|
|
|
|
|
|
|
|
cancelScheduleBun() { |
|
|
//设置参数 |
|
|
//设置参数 |
|
|
this.pageData.orderNo = this.scheduleRow.orderNo; |
|
|
this.pageData.orderNo = this.scheduleRow.orderNo; |
|
|
this.pageData.itemNo = this.scheduleRow.itemNo; |
|
|
this.pageData.itemNo = this.scheduleRow.itemNo; |
|
|
@ -1082,9 +1096,9 @@ |
|
|
this.pageData.planStartTime = this.scheduleRow.planStartTime; |
|
|
this.pageData.planStartTime = this.scheduleRow.planStartTime; |
|
|
//取消排产 |
|
|
//取消排产 |
|
|
cancelScheduleWithScheduleQuery(this.pageData).then(({data}) => { |
|
|
cancelScheduleWithScheduleQuery(this.pageData).then(({data}) => { |
|
|
if(data.code == 500){ |
|
|
|
|
|
|
|
|
if (data.code == 500) { |
|
|
this.$message.error(data.msg); |
|
|
this.$message.error(data.msg); |
|
|
}else{ |
|
|
|
|
|
|
|
|
} else { |
|
|
this.$message.success(data.msg); |
|
|
this.$message.success(data.msg); |
|
|
//刷新排产的数据 |
|
|
//刷新排产的数据 |
|
|
this.getData(); |
|
|
this.getData(); |
|
|
@ -1184,11 +1198,11 @@ |
|
|
this.getTableUserColumn(); |
|
|
this.getTableUserColumn(); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style > |
|
|
|
|
|
.el-textarea__inner { |
|
|
|
|
|
|
|
|
<style> |
|
|
|
|
|
.el-textarea__inner { |
|
|
padding: 5px 5px; |
|
|
padding: 5px 5px; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |