|
|
|
@ -96,7 +96,6 @@ export default { |
|
|
|
this.numberOrWeight = undefined; |
|
|
|
}, |
|
|
|
startRework(){ |
|
|
|
this.saveRework.createTime = dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss") |
|
|
|
this.saveRework.createBy = this.$store.state.user.name |
|
|
|
startRework(this.saveRework).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
@ -104,13 +103,17 @@ export default { |
|
|
|
this.startReworkRecordDialog = false; |
|
|
|
this.selectRework(); |
|
|
|
}else { |
|
|
|
this.$alert(data.msg, '错误信息', { |
|
|
|
this.$confirm(data.msg, '错误信息', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}).then(()=>{ |
|
|
|
this.$refs.seqNo.focus(); |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$alert(error, '错误信息', { |
|
|
|
this.$confirm(error, '错误信息', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}).then(()=>{ |
|
|
|
this.$refs.seqNo.focus(); |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
@ -216,12 +219,14 @@ export default { |
|
|
|
getRework(params).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.seqNoReworkRecordDialog = false; |
|
|
|
this.reportWorkDialog = true |
|
|
|
this.$nextTick(()=>{ |
|
|
|
this.saveRework = data.row; |
|
|
|
this.saveRework.reworkStartDate = new Date() |
|
|
|
this.saveRework.reworkEndDate = new Date() |
|
|
|
this.saveRework.productionTime = new Decimal(dayjs(new Date()).diff(this.saveRework.createTime,'hour',true)).toFixed(2, Decimal.ROUND_HALF_UP) |
|
|
|
this.saveRework.productionTime = new Decimal(this.saveRework.productionTime).toSignificantDigits() |
|
|
|
}) |
|
|
|
this.reportWorkDialog = true |
|
|
|
}else { |
|
|
|
this.$alert(data.msg, '错误信息', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
@ -238,6 +243,8 @@ export default { |
|
|
|
seqNo: undefined, |
|
|
|
site:this.$store.state.user.site, |
|
|
|
type:"修边返工", |
|
|
|
operatorId:undefined, |
|
|
|
operatorName:undefined, |
|
|
|
} |
|
|
|
if (this.startReworkRecordDialog === true){ |
|
|
|
this.$nextTick(()=>{ |
|
|
|
@ -251,6 +258,13 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
watch:{ |
|
|
|
'saveRework.operatorId'(newVal, oldVal){ |
|
|
|
if (!newVal){ |
|
|
|
this.saveRework.operatorName = undefined; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
created () { |
|
|
|
this.selectRework(); |
|
|
|
}, |
|
|
|
@ -260,7 +274,7 @@ export default { |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<choose-list ref="baseList" @getBaseData="getBaseData"></choose-list> |
|
|
|
<el-dialog title="返工返修" @close="closeStartReworkRecordDialog" @open="openDialog" :visible.sync="startReworkRecordDialog" :close-on-click-modal="false" width="13%"> |
|
|
|
<el-dialog title="返工返修" @close="closeStartReworkRecordDialog" @open="openDialog" :visible.sync="startReworkRecordDialog" :close-on-click-modal="false" width="300px"> |
|
|
|
<el-form :model="saveRework" label-position="top" @submit.native.prevent> |
|
|
|
<el-form-item label="派工单号" prop="seqNo"> |
|
|
|
<el-input ref="seqNo" type="number" v-model="saveRework.seqNo" @keydown.native.enter="startRework"></el-input> |
|
|
|
@ -274,6 +288,19 @@ export default { |
|
|
|
<el-option value="加工返工" label="加工返工"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="10"> |
|
|
|
<el-form-item label="操作员" prop="operator"> |
|
|
|
<span slot="label" @click="getBaseList(26,1)"><a>操作员</a></span> |
|
|
|
<el-input v-model="saveRework.operatorId"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="14"> |
|
|
|
<el-form-item label="操作员姓名"> |
|
|
|
<el-input disabled v-model="saveRework.operatorName"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
<el-button type="primary" @click="startRework">确定</el-button> |
|
|
|
@ -331,8 +358,7 @@ export default { |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="操作员"> |
|
|
|
<span slot="label" v-if="saveType !== 0" @click="getBaseList(26,1)"><a>操作员</a></span> |
|
|
|
<el-input :disabled="saveType === 0" v-model="saveRework.operatorId"></el-input> |
|
|
|
<el-input disabled v-model="saveRework.operatorId"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
@ -677,7 +703,14 @@ export default { |
|
|
|
<el-table-column |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="80" |
|
|
|
min-width="100" |
|
|
|
prop="originOperatorName" |
|
|
|
label="原操作员"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="60" |
|
|
|
prop="productionTime" |
|
|
|
label="制造时间(h)"> |
|
|
|
</el-table-column> |
|
|
|
|