|
|
|
|
@ -23,7 +23,8 @@ |
|
|
|
|
</template> |
|
|
|
|
<template #menu-left="row"> |
|
|
|
|
<el-button type="primary" @click="handleAdd" v-if="permission.material_demand_declaration">需求申报</el-button> |
|
|
|
|
<el-button type="primary" @click="handleApprove" v-if="permission.material_batch_audit">批量审核</el-button> |
|
|
|
|
<el-button type="primary" @click="handleApprove" v-if="permission.material_batch_audit">批量一级审核</el-button> |
|
|
|
|
<el-button type="primary" @click="secondHandleApprove" v-if="permission.material_batch_audit">批量二级审核</el-button> |
|
|
|
|
</template> |
|
|
|
|
<template #menu-right> |
|
|
|
|
<el-button type="warning" @click="pendingReviewFn()" >待审核</el-button> |
|
|
|
|
@ -32,21 +33,26 @@ |
|
|
|
|
<el-button type="text" @click="handleView(row)" v-if="permission.material_details">详情</el-button> |
|
|
|
|
<el-button type="text" @click="closeRow(row)" v-show="row.status != 10006 && (row.status == 10000 || row.status == 10005)" v-if="permission.material_close">关闭</el-button> |
|
|
|
|
<el-button type="text" v-show="row.status == 10006 || row.status == 10000 || row.status == 10005" @click="deleteRow(row)" v-if="permission.material_del">删除</el-button> |
|
|
|
|
<el-button type="text" v-show="row.status == 10000" @click="approveRow(row)" v-if="permission.material_audit">审核</el-button> |
|
|
|
|
<el-button type="text" v-show="row.status == 10000" @click="approveRow(row)" v-if="permission.material_audit">一级审核</el-button> |
|
|
|
|
<el-button type="text" v-show="row.status == 10001" @click="approveRow(row)" v-if="permission.material_audit">二级审核</el-button> |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
<coating-add-dialog v-if="showDialog" :show-dialog="showDialog" @closeDialog="closeDialog"></coating-add-dialog> |
|
|
|
|
<material-detail :material-dialog="materialDialog" @closeDialog="closeDialog" :id="id"></material-detail> |
|
|
|
|
<!-- <add-quantity :add-quantity="addQuantity" @closeDialog="closeDialog"></add-quantity> |
|
|
|
|
<add-dialog :add-dialog="addDialog" @closeDialog="closeDialog"></add-dialog> --> |
|
|
|
|
|
|
|
|
|
<el-dialog append-to-body width="550px" title="审核" v-model="approveDialog"> |
|
|
|
|
<!-- 一级审核 --> |
|
|
|
|
<el-dialog append-to-body width="550px" title="审核" v-model="approveDialog" v-if="approveDialog"> |
|
|
|
|
<el-form ref="approveForm" :model="approveForm" :rules="approveRules"> |
|
|
|
|
<el-form-item label="审核结果" prop="approvalStatus"> |
|
|
|
|
<el-radio-group v-model="approveForm.approvalStatus" @input="changeType"> |
|
|
|
|
<el-radio-group v-model="approveForm.approvalStatus" v-if="rowItem.status==10000"> |
|
|
|
|
<el-radio :label="10001">审批通过</el-radio> |
|
|
|
|
<el-radio :label="10005">审批不通过</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
<el-radio-group v-model="approveForm.approvalStatus" v-if="rowItem.status==10001"> |
|
|
|
|
<el-radio :label="10007">审批通过</el-radio> |
|
|
|
|
<el-radio :label="10008">审批不通过</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="审核意见" prop="approvalMemo"> |
|
|
|
|
<el-input type="textarea" v-model="approveForm.approvalMemo"></el-input> |
|
|
|
|
@ -59,6 +65,7 @@ |
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
@ -68,7 +75,8 @@ import { |
|
|
|
|
confirmBatch, |
|
|
|
|
closeBatchs, |
|
|
|
|
removeByIds, |
|
|
|
|
getOrderMoldPlanCaDeatils |
|
|
|
|
getOrderMoldPlanCaDeatils, |
|
|
|
|
secondConfirmBatch |
|
|
|
|
} from '@/api/productionManagement/coatingMaterial'; |
|
|
|
|
import coatingAddDialog from '../coatingAddDialog.vue'; |
|
|
|
|
import coatingColumnData from '../../js/coatingColumnData'; |
|
|
|
|
@ -339,10 +347,12 @@ export default { |
|
|
|
|
// { label: '已关闭', value: '3' }, |
|
|
|
|
// { label: '审核通过', value: '4' }, |
|
|
|
|
// { label: '已过期', value: '5' }, |
|
|
|
|
{ label: '待审核', value: 10000 }, |
|
|
|
|
{ label: '审核通过', value: 10001 }, |
|
|
|
|
{ label: '待一级审核', value: 10000 }, |
|
|
|
|
{ label: '一级审核通过', value: 10001 }, |
|
|
|
|
{ label: "使用中", value:10002}, |
|
|
|
|
{ label: '审核不通过', value: 10005 }, |
|
|
|
|
{ label: '一级审核不通过', value: 10005 }, |
|
|
|
|
{ label: '二级审核通过', value: 10007 }, |
|
|
|
|
{ label: '二级审核不通过', value: 10008 }, |
|
|
|
|
{ label: '已完成',value:10004}, |
|
|
|
|
{ label: '已超期', value: 10003 }, |
|
|
|
|
{ label: '已关闭', value: 10006 }, |
|
|
|
|
@ -413,7 +423,8 @@ export default { |
|
|
|
|
}, |
|
|
|
|
selectionList: [], |
|
|
|
|
confirmBatchId: null, |
|
|
|
|
query:{} |
|
|
|
|
query:{}, |
|
|
|
|
rowItem:{} |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
@ -501,17 +512,34 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
approveRow(val) { |
|
|
|
|
this.rowItem = val |
|
|
|
|
this.selectionList = [] |
|
|
|
|
this.selectionList.push(val); |
|
|
|
|
this.approveDialog = true; |
|
|
|
|
}, |
|
|
|
|
// 一级批量审核 |
|
|
|
|
handleApprove() { |
|
|
|
|
if (this.selectionList.length != 0) { |
|
|
|
|
let tmp = this.selectionList.find(item => item.status != 10000) |
|
|
|
|
if(tmp){ |
|
|
|
|
this.$message.error("请选择状态为【待审核】的数据") |
|
|
|
|
this.$message.error("请选择状态为【待一级审核】的数据") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
this.rowItem = this.selectionList[0] |
|
|
|
|
this.approveDialog = true; |
|
|
|
|
} else { |
|
|
|
|
this.$message.error('请至少选择一条数据!'); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 二级批量审核 |
|
|
|
|
secondHandleApprove(){ |
|
|
|
|
if (this.selectionList.length != 0) { |
|
|
|
|
let tmp = this.selectionList.find(item => item.status != 10001) |
|
|
|
|
if(tmp){ |
|
|
|
|
this.$message.error("请选择状态为【待二级审核】的数据") |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
this.rowItem = this.selectionList[0] |
|
|
|
|
this.approveDialog = true; |
|
|
|
|
} else { |
|
|
|
|
this.$message.error('请至少选择一条数据!'); |
|
|
|
|
@ -521,17 +549,33 @@ export default { |
|
|
|
|
this.$refs.approveForm.validate(valid => { |
|
|
|
|
if (valid) { |
|
|
|
|
const ids = this.selectionList.map(item => item.id).join(','); |
|
|
|
|
confirmBatch({ |
|
|
|
|
ids:ids, |
|
|
|
|
...this.approveForm |
|
|
|
|
}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success('审核成功'); |
|
|
|
|
this.approveDialog = false; |
|
|
|
|
this.selectionList = [] |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
if(this.rowItem.status === 10000){ |
|
|
|
|
confirmBatch({ |
|
|
|
|
ids:ids, |
|
|
|
|
...this.approveForm |
|
|
|
|
}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success('审核成功'); |
|
|
|
|
this.approveDialog = false; |
|
|
|
|
this.selectionList = [] |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
if(this.rowItem.status === 10001){ |
|
|
|
|
secondConfirmBatch({ |
|
|
|
|
ids:ids, |
|
|
|
|
...this.approveForm |
|
|
|
|
}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success('审核成功'); |
|
|
|
|
this.approveDialog = false; |
|
|
|
|
this.selectionList = [] |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// confirmBatch({ ...{ ids }, ...this.approveForm }).then(res => { |
|
|
|
|
// if (res.code === 200) { |
|
|
|
|
// this.$message.success('审核成功'); |
|
|
|
|
|