|
|
|
@ -1,6 +1,6 @@ |
|
|
|
<template> |
|
|
|
<div class="mod-config"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -20px;"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
|
<el-form-item :label="'生产订单号'"> |
|
|
|
<el-input v-model="searchData.orderNo" style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -63,6 +63,13 @@ |
|
|
|
<el-option label="晚班" value="晚班"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'是否关闭'"> |
|
|
|
<el-select v-model="searchData.closedFlag" style="width: 120px"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option label="是" value="Y"></el-option> |
|
|
|
<el-option label="否" value="N"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button @click="search()" style="margin-left: 0px;margin-top:0px" type="primary">查询</el-button> |
|
|
|
<download-excel |
|
|
|
@ -154,6 +161,13 @@ |
|
|
|
min-width="80" |
|
|
|
label="合格数量"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="closedFlag" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="80" |
|
|
|
label="是否关闭"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="timeRequired" |
|
|
|
header-align="center" |
|
|
|
@ -210,16 +224,100 @@ |
|
|
|
min-width="100" |
|
|
|
label="加工中心编码"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="circulationSeqNo" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="90" |
|
|
|
label="流转派工单号"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="circulationQty" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="80" |
|
|
|
label="流转数量"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-dialog title="流转派工单" :close-on-click-modal="false" v-drag :visible.sync="circulationFlag" width="600px"> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 0px;margin-top: -5px;"> |
|
|
|
<el-form-item :label="'派工单号:'"> |
|
|
|
<el-input v-model="circulationData.seqNo" ref="start" type="number" style="width: 130px;" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'派工日期:'"> |
|
|
|
<!-- <el-input v-model="circulationData.sScheduledDate" ref="start" type="number" style="width: 130px;" readonly></el-input>--> |
|
|
|
<el-date-picker |
|
|
|
style="width: 130px" |
|
|
|
v-model="circulationData.sScheduledDate" |
|
|
|
type="date" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
readonly |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'未完成数量:'"> |
|
|
|
<el-input v-model="circulationData.circulationQty" ref="start" type="number" style="width: 130px;" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 0px;margin-top: 5px;"> |
|
|
|
<el-form-item :label="'流转日期:'"> |
|
|
|
<el-date-picker |
|
|
|
style="width: 130px" |
|
|
|
v-model="circulationData.circulationDate" |
|
|
|
type="date" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="派工机台:"> |
|
|
|
<el-select v-model="circulationData.sResourceID" style="width: 130px" |
|
|
|
placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="(item,index) in availableResourceList" |
|
|
|
:key="index" |
|
|
|
:label="item.ResouceDesc" |
|
|
|
:value="item.ResourceID" |
|
|
|
> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="派工班次:"> |
|
|
|
<el-select v-model="circulationData.sShiftNo" style="width: 130px" |
|
|
|
placeholder="请选择"> |
|
|
|
<el-option label="白班" value="白班"></el-option> |
|
|
|
<el-option label="晚班" value="晚班"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="派工人员:"> |
|
|
|
<el-select v-model="circulationData.operatorId" style="width: 130px" |
|
|
|
placeholder="请选择"> |
|
|
|
<el-option v-for="item in operatorIdList " :key="index" :label="item.operatorName" |
|
|
|
:value="item.operatorID"> |
|
|
|
|
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
<el-button type="primary" @click="doCirculation()">流转</el-button> |
|
|
|
<el-button type="primary" @click="circulationFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { |
|
|
|
getWorkCenterOperatorList, |
|
|
|
getAvailableResourceList, |
|
|
|
} from "@/api/production.js" |
|
|
|
import { |
|
|
|
getSOScheduleRoutingData |
|
|
|
, cancelJob |
|
|
|
, cancelJob, |
|
|
|
circulationSchedule, |
|
|
|
closeSchedule |
|
|
|
} from '@/api/production/generateReport.js' |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
|
import { |
|
|
|
@ -238,6 +336,18 @@ |
|
|
|
readonlyFlag: false, |
|
|
|
disabled: false |
|
|
|
}, |
|
|
|
circulationData:{ |
|
|
|
site:'', |
|
|
|
seqNo:'', |
|
|
|
sScheduledDate:'', |
|
|
|
circulationQty:'', |
|
|
|
circulationDate:'', |
|
|
|
sResourceID:'', |
|
|
|
sShiftNo:'', |
|
|
|
operatorId:'', |
|
|
|
}, |
|
|
|
availableResourceList:[], |
|
|
|
operatorIdList:[], |
|
|
|
saveHeaderData: { |
|
|
|
site: '', |
|
|
|
seqNo: '', |
|
|
|
@ -311,6 +421,7 @@ |
|
|
|
operatorName:'', |
|
|
|
sResourceID:'', |
|
|
|
sShiftNo:'', |
|
|
|
closedFlag:'', |
|
|
|
}, |
|
|
|
photoUrl:'', |
|
|
|
sopData:{ |
|
|
|
@ -327,6 +438,7 @@ |
|
|
|
showviewer: false, |
|
|
|
url: '', |
|
|
|
height2:600, |
|
|
|
circulationFlag:false, |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
@ -397,23 +509,70 @@ |
|
|
|
return Y + M + D + H + MM + S |
|
|
|
}, |
|
|
|
circulation(row){ |
|
|
|
|
|
|
|
this.getWorkCenterOperatorList(row); |
|
|
|
this.getAvailableResourceList(row); |
|
|
|
this.circulationData.seqNo=row.seqNo; |
|
|
|
this.circulationData.sScheduledDate=row.sScheduledDate; |
|
|
|
this.circulationData.circulationQty=row.qtyRequired-row.qtyApprove; |
|
|
|
this.circulationData.site=row.site; |
|
|
|
this.circulationData.circulationDate=''; |
|
|
|
this.circulationData.sResourceID=''; |
|
|
|
this.circulationData.sShiftNo=''; |
|
|
|
this.circulationData.operatorId=''; |
|
|
|
this.circulationFlag=true; |
|
|
|
}, |
|
|
|
cancelJob(row){ |
|
|
|
if(row.qtyReported>0){ |
|
|
|
this.$alert('该派工单已经有报工无法取消!', '错误', { |
|
|
|
doCirculation(){ |
|
|
|
if(this.circulationData.circulationDate==''||this.circulationData.circulationDate==null){ |
|
|
|
this.$alert('请选择流转日期!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.circulationData.sResourceID==''||this.circulationData.sResourceID==null){ |
|
|
|
this.$alert('请选择机台!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.$confirm(`确定取消此派工单`, '提示', { |
|
|
|
if(this.circulationData.sShiftNo==''||this.circulationData.sShiftNo==null){ |
|
|
|
this.$alert('请选择班次!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if(this.circulationData.operatorId==''||this.circulationData.operatorId==null){ |
|
|
|
this.$alert('请选择操作员!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
circulationSchedule(this.circulationData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.circulationFlag=false; |
|
|
|
this.search (); |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
closeSchedule(row){ |
|
|
|
this.$confirm(`确定关闭此派工单`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
cancelJob(row).then(({data}) => { |
|
|
|
closeSchedule(row).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.search (); |
|
|
|
this.search(); |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
@ -421,18 +580,34 @@ |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
toPrint(row){ |
|
|
|
let array=[]; |
|
|
|
let data={ |
|
|
|
seqNo:row.seqNo, |
|
|
|
getWorkCenterOperatorList(row){ |
|
|
|
let inData={ |
|
|
|
site:row.site, |
|
|
|
workCenterNo:row.sWorkCenterNo, |
|
|
|
} |
|
|
|
array.push(data) |
|
|
|
printSeqNoLabel(array) |
|
|
|
getWorkCenterOperatorList(inData).then(({data}) => { |
|
|
|
this.operatorIdList = data.rows; |
|
|
|
}) |
|
|
|
}, |
|
|
|
getAvailableResourceList(row){ |
|
|
|
let inData={ |
|
|
|
site:row.site, |
|
|
|
orderNo:row.orderNo, |
|
|
|
itemNo:row.itemNo, |
|
|
|
} |
|
|
|
getAvailableResourceList(inData).then(({data}) => { |
|
|
|
this.availableResourceList = data.rows; |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
created () { |
|
|
|
} |
|
|
|
|