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