This commit is contained in:
xiaofajia 2024-11-21 15:15:02 +08:00
commit 27375030c1

View File

@ -196,7 +196,9 @@ export default {
safeName: null,
safeContact: null,
safeMobile: null,
}
},
//
canClick:true,
};
},
onLoad(data) {
@ -309,8 +311,8 @@ export default {
this.yesText = "通过"
this.backText = "驳回"
} else {
this.yesText = "通过全部"
this.backText = "驳回全部"
this.yesText = "通过"
this.backText = "驳回"
}
},
getWaresStatus(val) {
@ -354,28 +356,22 @@ export default {
})
},
confirmOpe(type) {
// let forSign = true
// if (type == 'yes') {
// this.repairList.map(item=>{
// if (item.wares.price == null || item.wares.price == ''){
// uni.showToast({
// title: '',
// icon: 'none'
// })
// forSign = false
// return;
// }
// })
// }
// if (!forSign) {
// return;
// }
if(this.selectWares.length==0){
uni.showToast({
title: '请选中要审核的配件!',
icon: 'none'
})
return
}
if (this.canClick) {
this.canClick = false
let url = '/admin-api/repair/tw/audit'
let dataObj = {
id: this.id,
type: "01",
status: "yes" == type ? "01" : "02"
}
try {
if (this.selectWares && this.selectWares.length > 0) {
dataObj.items = [...this.selectWares.map(item => {
return {
@ -384,9 +380,9 @@ export default {
})]
} else {
dataObj.items = []
this.repairList.map((groupItem)=>{
groupItem.twItemList.map((item)=>{
dataObj.items.push({id:item.id})
this.repairList.map((groupItem) => {
groupItem.twItemList.map((item) => {
dataObj.items.push({id: item.id})
})
})
}
@ -395,6 +391,7 @@ export default {
method: 'POST',
data: dataObj
}).then((res) => {
this.canClick = true
if (res.code == 200) {
uni.showToast({
title: '审批成功!',
@ -405,6 +402,10 @@ export default {
}, 700)
}
})
} catch (e) {
this.canClick = true
}
}
},
}
}