|
|
@ -1,6 +1,6 @@ |
|
|
<script> |
|
|
<script> |
|
|
import chooseList from '../common/Chooselist.vue' |
|
|
import chooseList from '../common/Chooselist.vue' |
|
|
import {selectRework,startRework,saveRework} from '../../../api/production/generateReport' |
|
|
|
|
|
|
|
|
import {selectRework,startRework,saveRework,getRework} from '../../../api/production/generateReport' |
|
|
import dayjs from 'dayjs' |
|
|
import dayjs from 'dayjs' |
|
|
import decimal, {Decimal} from 'decimal.js' |
|
|
import decimal, {Decimal} from 'decimal.js' |
|
|
export default { |
|
|
export default { |
|
|
@ -33,6 +33,7 @@ export default { |
|
|
reportWorkDialog:false, |
|
|
reportWorkDialog:false, |
|
|
saveType:undefined, |
|
|
saveType:undefined, |
|
|
numberOrWeight:undefined,//0数量,1重量 |
|
|
numberOrWeight:undefined,//0数量,1重量 |
|
|
|
|
|
seqNoReworkRecordDialog:false, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods:{ |
|
|
methods:{ |
|
|
@ -199,6 +200,23 @@ export default { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
getRework(){ |
|
|
|
|
|
getRework(this.saveRework).then(({data})=>{ |
|
|
|
|
|
if (data && data.code === 0){ |
|
|
|
|
|
this.saveRework = data.row; |
|
|
|
|
|
this.seqNoReworkRecordDialog = false; |
|
|
|
|
|
this.reportWorkDialog = true |
|
|
|
|
|
}else { |
|
|
|
|
|
this.$alert(data.msg, '错误信息', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}).error((error)=>{ |
|
|
|
|
|
this.$alert(error, '错误信息', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created () { |
|
|
created () { |
|
|
@ -210,10 +228,10 @@ export default { |
|
|
<template> |
|
|
<template> |
|
|
<div> |
|
|
<div> |
|
|
<choose-list ref="baseList" @getBaseData="getBaseData"></choose-list> |
|
|
<choose-list ref="baseList" @getBaseData="getBaseData"></choose-list> |
|
|
<el-dialog title="开始返修" @close="closeStartReworkRecordDialog" :visible.sync="startReworkRecordDialog" :close-on-click-modal="false" width="10%"> |
|
|
|
|
|
<el-form :model="saveRework" label-position="top"> |
|
|
|
|
|
|
|
|
<el-dialog title="开始返修" @close="closeStartReworkRecordDialog" :visible.sync="startReworkRecordDialog" :close-on-click-modal="false" width="13%"> |
|
|
|
|
|
<el-form :model="saveRework" label-position="top" @submit.native.prevent> |
|
|
<el-form-item label="派工单号" prop="seqNo"> |
|
|
<el-form-item label="派工单号" prop="seqNo"> |
|
|
<el-input type="number" v-model="saveRework.seqNo"></el-input> |
|
|
|
|
|
|
|
|
<el-input type="number" v-model="saveRework.seqNo" @keydown.native.enter="startRework"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
@ -221,6 +239,17 @@ export default { |
|
|
<el-button type="primary" @click="startReworkRecordDialog = false">取消</el-button> |
|
|
<el-button type="primary" @click="startReworkRecordDialog = false">取消</el-button> |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
<el-dialog title="派工单返修" @close="closeStartReworkRecordDialog" :visible.sync="seqNoReworkRecordDialog" :close-on-click-modal="false" width="13%"> |
|
|
|
|
|
<el-form :model="saveRework" label-position="top" @submit.native.prevent> |
|
|
|
|
|
<el-form-item label="派工单号" prop="seqNo"> |
|
|
|
|
|
<el-input type="number" v-model="saveRework.seqNo" @keydown.native.enter="getRework"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
|
|
<el-button type="primary" @click="getRework">确定</el-button> |
|
|
|
|
|
<el-button type="primary" @click="seqNoReworkRecordDialog = false">取消</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
<el-dialog title="返工信息" @close="closeStartReworkRecordDialog" top="15vh" :close-on-click-modal="false" :visible.sync="reportWorkDialog" width="40%"> |
|
|
<el-dialog title="返工信息" @close="closeStartReworkRecordDialog" top="15vh" :close-on-click-modal="false" :visible.sync="reportWorkDialog" width="40%"> |
|
|
<el-form :model="saveRework" style="padding: 5px" label-position="top"> |
|
|
<el-form :model="saveRework" style="padding: 5px" label-position="top"> |
|
|
<el-row :gutter="20"> |
|
|
<el-row :gutter="20"> |
|
|
@ -477,6 +506,7 @@ export default { |
|
|
</el-form> |
|
|
</el-form> |
|
|
<div style="margin: 8px 0"> |
|
|
<div style="margin: 8px 0"> |
|
|
<el-button size="small" icon="el-icon-edit" type="primary" @click="startReworkRecordDialog = true"> 开 始 返 修</el-button> |
|
|
<el-button size="small" icon="el-icon-edit" type="primary" @click="startReworkRecordDialog = true"> 开 始 返 修</el-button> |
|
|
|
|
|
<el-button size="small" type="primary" @click="seqNoReworkRecordDialog = true">派工单返修</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<el-table |
|
|
<el-table |
|
|
height="76vh" |
|
|
height="76vh" |
|
|
|