Merge branch 'master' of http://122.51.230.86:3000/dianliang/lanan-repair-app
This commit is contained in:
commit
27375030c1
@ -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,57 +356,56 @@ 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;
|
||||
// }
|
||||
let url = '/admin-api/repair/tw/audit'
|
||||
let dataObj = {
|
||||
id: this.id,
|
||||
type: "01",
|
||||
status: "yes" == type ? "01" : "02"
|
||||
}
|
||||
if (this.selectWares && this.selectWares.length > 0) {
|
||||
dataObj.items = [...this.selectWares.map(item => {
|
||||
return {
|
||||
id: item.id
|
||||
}
|
||||
})]
|
||||
} else {
|
||||
dataObj.items = []
|
||||
this.repairList.map((groupItem)=>{
|
||||
groupItem.twItemList.map((item)=>{
|
||||
dataObj.items.push({id:item.id})
|
||||
})
|
||||
if(this.selectWares.length==0){
|
||||
uni.showToast({
|
||||
title: '请选中要审核的配件!',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
request({
|
||||
url: url,
|
||||
method: 'POST',
|
||||
data: dataObj
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '审批成功!',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 700)
|
||||
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 {
|
||||
id: item.id
|
||||
}
|
||||
})]
|
||||
} else {
|
||||
dataObj.items = []
|
||||
this.repairList.map((groupItem) => {
|
||||
groupItem.twItemList.map((item) => {
|
||||
dataObj.items.push({id: item.id})
|
||||
})
|
||||
})
|
||||
}
|
||||
request({
|
||||
url: url,
|
||||
method: 'POST',
|
||||
data: dataObj
|
||||
}).then((res) => {
|
||||
this.canClick = true
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '审批成功!',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 700)
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
this.canClick = true
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user