修改工单审核
This commit is contained in:
parent
4f1510d67a
commit
3ae57dfba0
@ -340,25 +340,18 @@ export default {
|
||||
if(res.code == 200){
|
||||
this.$refs.table.refresh();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.dialog.companyWf = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.companyWfDialog.open('review');
|
||||
})
|
||||
})
|
||||
},
|
||||
async reviewSave(data) {
|
||||
}).catch(async () => {
|
||||
let params = {
|
||||
order_ids: this.selection.map(em => em.id),
|
||||
status: true,
|
||||
is_verify_erp_inventory: false,
|
||||
maintenance_vendor:data.company_id
|
||||
}
|
||||
const res = await this.$API.orders.order.maintenance.review.post(params);
|
||||
if (res.code == 200) {
|
||||
this.$refs.companyWfDialog.hideVisible();
|
||||
this.$refs.table.refresh();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
save_maintenance() {
|
||||
@ -381,8 +374,6 @@ export default {
|
||||
this.$refs.companyWfDialog.hideVisible();
|
||||
this.$refs.table.refresh();
|
||||
}
|
||||
}else if(mode === 'review'){
|
||||
await this.reviewSave(data);
|
||||
}
|
||||
},
|
||||
// 工单设置
|
||||
|
||||
@ -37,24 +37,18 @@
|
||||
</el-scrollbar>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<manufacturer-dialog v-if="dialog.companyWf" ref="companyWfDialog" @success="handleWfSuccess" @closed="dialog.companyWf=false"></manufacturer-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import detailView from "@/views/order/orderList/detailView";
|
||||
import manufacturerDialog from "@/views/order/orderList/components/manufacturer"
|
||||
export default {
|
||||
name: "",
|
||||
components:{
|
||||
detailView,
|
||||
manufacturerDialog
|
||||
detailView
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
size:'small',
|
||||
dialog: {
|
||||
companyWf:false
|
||||
},
|
||||
loading:false,
|
||||
confirmLoading:false,
|
||||
cancelLoading:false,
|
||||
@ -114,21 +108,6 @@ export default {
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
async handleWfSuccess(data, mode) {
|
||||
if (mode === 'review') {
|
||||
let params = {
|
||||
order_ids: [this.params.order_id],
|
||||
status: true,
|
||||
opinion: this.opinion,
|
||||
maintenance_vendor: data.company_id
|
||||
}
|
||||
const res = await this.$API.orders.order.maintenance.review.post(params);
|
||||
if (res.code == 200) {
|
||||
this.$refs.companyWfDialog.hideVisible();
|
||||
await this.getData();
|
||||
}
|
||||
}
|
||||
},
|
||||
async save(type) {
|
||||
let params = {
|
||||
order_ids: [this.params.order_id],
|
||||
@ -138,18 +117,13 @@ export default {
|
||||
if (type == 1) {
|
||||
delete params.opinion
|
||||
this.confirmLoading = true;
|
||||
this.dialog.companyWf = true;
|
||||
this.$nextTick(() => {
|
||||
this.saveLoading = false;
|
||||
this.$refs.companyWfDialog.open('review');
|
||||
})
|
||||
}else{
|
||||
this.cancelLoading = true;
|
||||
}
|
||||
const res = await this.$API.orders.order.maintenance.review.post(params);
|
||||
if (res.code == 200) {
|
||||
await this.getData();
|
||||
}
|
||||
}
|
||||
this.confirmLoading = false;
|
||||
this.cancelLoading = false;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user