|
|
|
@ -1,6 +1,13 @@ |
|
|
|
<script> |
|
|
|
import chooseList from '../common/Chooselist.vue' |
|
|
|
import {selectRework,startRework,saveRework,getRework} from '../../../api/production/generateReport' |
|
|
|
import { |
|
|
|
selectRework, |
|
|
|
startRework, |
|
|
|
saveRework, |
|
|
|
getRework, |
|
|
|
removeRework, |
|
|
|
cancelRework |
|
|
|
} from '../../../api/production/generateReport' |
|
|
|
import dayjs from 'dayjs' |
|
|
|
import decimal, {Decimal} from 'decimal.js' |
|
|
|
export default { |
|
|
|
@ -22,6 +29,7 @@ export default { |
|
|
|
resourceId:undefined, |
|
|
|
shiftNo:"", |
|
|
|
type:"", |
|
|
|
reworkStatus:"", |
|
|
|
}, |
|
|
|
tagNo:undefined, |
|
|
|
type:undefined, |
|
|
|
@ -257,6 +265,42 @@ export default { |
|
|
|
this.$refs.seqNoR.focus() |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
removeReportWork(row){ |
|
|
|
this.$confirm('是否删除该返工信息?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(()=>{ |
|
|
|
let params = { |
|
|
|
reworkNo: row.reworkNo, |
|
|
|
} |
|
|
|
removeRework(params).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.$message.success(data.msg) |
|
|
|
this.selectRework() |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
cancelReportWork(row){ |
|
|
|
let params = { |
|
|
|
reworkNo: row.reworkNo, |
|
|
|
} |
|
|
|
cancelRework(params).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.$message.success(data.msg) |
|
|
|
this.selectRework() |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
watch:{ |
|
|
|
@ -578,6 +622,15 @@ export default { |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="返修状态" prop="reworkStatus"> |
|
|
|
<el-select v-model="searchData.reworkStatus"> |
|
|
|
<el-option value="" label="全部"></el-option> |
|
|
|
<el-option value="已结束" label="已结束"></el-option> |
|
|
|
<el-option value="返工中" label="返工中"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-button type="primary" @click="selectRework">查 询</el-button> |
|
|
|
@ -598,10 +651,12 @@ export default { |
|
|
|
<el-table-column |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="80" |
|
|
|
width="100" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope" class="foo_container"> |
|
|
|
<a style="cursor: pointer;" v-if="scope.row.reworkStatus === '返工中'" @click="clickReportWork(scope.row)">报工</a> |
|
|
|
<a style="cursor: pointer;" v-if="scope.row.reworkStatus === '已结束'" @click="cancelReportWork(scope.row)">取消</a> |
|
|
|
<a style="cursor: pointer;" @click="removeReportWork(scope.row)">删除</a> |
|
|
|
<a style="cursor: pointer;" @click="clickReportWork(scope.row,0)">详情</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|