|
|
|
@ -273,14 +273,50 @@ |
|
|
|
<el-button type="primary" @click="startModalFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog title="派工单暂停" :close-on-click-modal="false" v-drag :visible.sync="stopModalFlag" width="215px"> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;" @submit.native.prevent> |
|
|
|
<!-- <el-dialog title="派工单暂停" :close-on-click-modal="false" v-drag :visible.sync="stopModalFlag" width="215px">--> |
|
|
|
<!-- <el-form :inline="true" label-position="top" style="margin-left: 22px;margin-top: -5px;" @submit.native.prevent>--> |
|
|
|
<!-- <el-form-item :label="'派工单号:'">--> |
|
|
|
<!-- <el-input v-model="scanSeqNo" ref="stop" type="number" style="width: 130px;" @keyup.enter.native="stopWork()"></el-input>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- </el-form>--> |
|
|
|
<!-- <el-footer style="height:40px;margin-top: 20px;text-align:center">--> |
|
|
|
<!-- <el-button type="primary" @click="stopWork()">开始</el-button>--> |
|
|
|
<!-- <el-button type="primary" @click="stopModalFlag = false">关闭</el-button>--> |
|
|
|
<!-- </el-footer>--> |
|
|
|
<!-- </el-dialog>--> |
|
|
|
<el-dialog title="派工单暂停" :close-on-click-modal="false" v-drag :visible.sync="stopModalFlag" width="620px" > |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item :label="'派工单号:'"> |
|
|
|
<el-input v-model="scanSeqNo" ref="stop" type="number" style="width: 130px;" @keyup.enter.native="stopWork()"></el-input> |
|
|
|
<el-input v-model="stopData.seqNo" ref="stop" type="number" @blur="seqNoCheck()" @keyup.enter.native="seqNoCheck()" style="width: 85px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'生产订单:'"> |
|
|
|
<el-input v-model="stopData.orderNo" disabled style="width: 100px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'机台:'"> |
|
|
|
<el-input v-model="stopData.resourceDesc" disabled style="width: 100px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'班次:'"> |
|
|
|
<el-input v-model="stopData.shiftNo" disabled style="width: 100px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'异常原因:'"> |
|
|
|
<el-select v-model="stopData.abnormalCode" style="width: 120px"> |
|
|
|
<el-option |
|
|
|
v-for="(item,index) in abnormalList" |
|
|
|
:key="index" |
|
|
|
:label="item.abnormalDesc" |
|
|
|
:value="item.abnormalCode" |
|
|
|
> |
|
|
|
</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="stopWork()">开始</el-button> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> |
|
|
|
<el-form-item label="异常情况描述"> |
|
|
|
<el-input v-model="stopData.abnormalRemark" type="textarea" :rows="3" resize='none' style="width: 562px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:30px;margin-top: 50px;text-align:center"> |
|
|
|
<el-button type="primary" @click="stopWork()" >保存</el-button> |
|
|
|
<el-button type="primary" @click="stopModalFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
@ -504,6 +540,10 @@ |
|
|
|
import { |
|
|
|
getPhotoAddressData |
|
|
|
} from '@/api/pad.js' |
|
|
|
import { |
|
|
|
getAbnormalCodeList, |
|
|
|
getShopOrderData, |
|
|
|
} from "@/api/abnormal.js" |
|
|
|
export default { |
|
|
|
name: 'generateReport', |
|
|
|
components: { |
|
|
|
@ -523,6 +563,7 @@ |
|
|
|
KGApprove:'', |
|
|
|
KGRework:'', |
|
|
|
approveFlag:false, |
|
|
|
abnormalList:[], |
|
|
|
saveHeaderData: { |
|
|
|
boxWeight:0, |
|
|
|
qtyRequire:'', |
|
|
|
@ -625,6 +666,16 @@ |
|
|
|
height2:600, |
|
|
|
tagNo2:'', |
|
|
|
startModalFlag:false, |
|
|
|
stopData:{ |
|
|
|
site:'', |
|
|
|
seqNo:'', |
|
|
|
orderNo:'', |
|
|
|
shiftNo:'', |
|
|
|
resourceDesc:'', |
|
|
|
feedbackBy:this.$store.state.user.name, |
|
|
|
abnormalCode:'', |
|
|
|
abnormalRemark:'', |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
@ -635,6 +686,11 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
getAllAbnormalItem(){ |
|
|
|
getAbnormalCodeList().then(({data}) => { |
|
|
|
this.abnormalList = data.rows; |
|
|
|
}) |
|
|
|
}, |
|
|
|
saveReport () { |
|
|
|
this.saveHeaderData.qtyReported=Number(this.saveHeaderData.qtyUnApprove)+Number(this.saveHeaderData.qtyApprove); |
|
|
|
if (this.saveHeaderData.qtyUnApprove == null || this.saveHeaderData.qtyUnApprove < 0) { |
|
|
|
@ -872,8 +928,39 @@ |
|
|
|
this.startModalFlag=true; |
|
|
|
this.$nextTick(() => { this.$refs.start.focus();}) |
|
|
|
}, |
|
|
|
seqNoCheck(){ |
|
|
|
let inData={ |
|
|
|
seqNo:this.stopData.seqNo |
|
|
|
} |
|
|
|
getShopOrderData(inData).then(({data}) => { |
|
|
|
let rows=data.rows; |
|
|
|
if(rows.length==0){ |
|
|
|
this.stopData.seqNo='', |
|
|
|
this.stopData.shiftNo='', |
|
|
|
this.stopData.site='', |
|
|
|
this.stopData.resourceDesc='', |
|
|
|
this.stopData.orderNo='', |
|
|
|
this.$alert('该派工单不存在!', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false |
|
|
|
}else { |
|
|
|
this.stopData.shiftNo=data.rows[0].sShiftNo |
|
|
|
this.stopData.site=data.rows[0].site |
|
|
|
this.stopData.resourceDesc=data.rows[0].resourceDesc |
|
|
|
this.stopData.orderNo=data.rows[0].orderNo |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
stopScan(){ |
|
|
|
this.scanSeqNo=''; |
|
|
|
this.getAllAbnormalItem(); |
|
|
|
this.stopData.seqNo='', |
|
|
|
this.stopData.shiftNo='', |
|
|
|
this.stopData.site='', |
|
|
|
this.stopData.resourceDesc='', |
|
|
|
this.stopData.orderNo='', |
|
|
|
this.stopData.abnormalRemark='', |
|
|
|
this.stopData.abnormalCode='', |
|
|
|
this.stopModalFlag=true; |
|
|
|
this.$nextTick(() => { this.$refs.stop.focus();}) |
|
|
|
}, |
|
|
|
@ -1073,13 +1160,30 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
stopWork(){ |
|
|
|
let inData={ |
|
|
|
username:this.$store.state.user.name, |
|
|
|
seqNo:this.scanSeqNo |
|
|
|
if( this.stopData.seqNo==null||this.stopData.seqNo==''){ |
|
|
|
this.$alert("请输入派工单号", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
stopWork(inData).then(({data}) => { |
|
|
|
if( this.stopData.abnormalCode==null||this.stopData.abnormalCode==''){ |
|
|
|
this.$alert("请选择异常原因", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
if( this.stopData.abnormalRemark==null||this.stopData.abnormalRemark==''){ |
|
|
|
this.$alert("请输入描述", '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
// let inData={ |
|
|
|
// username:this.$store.state.user.name, |
|
|
|
// seqNo:this.scanSeqNo |
|
|
|
// } |
|
|
|
stopWork(this.stopData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.scanSeqNo=''; |
|
|
|
this.stopModalFlag=false; |
|
|
|
this.$message({ |
|
|
|
message: '派工单已暂停', |
|
|
|
|