|
@@ -255,7 +255,7 @@
|
|
|
// 游客
|
|
|
if(this.userInfo.sysUserFlag == '0'){
|
|
|
// 未认证
|
|
|
- if(!storeApply.auditStatus){
|
|
|
+ if(!this.storeApply.auditStatus){
|
|
|
this.showPopup = true
|
|
|
}
|
|
|
}
|
|
@@ -271,15 +271,10 @@
|
|
|
})
|
|
|
},
|
|
|
callPhone() {
|
|
|
- // 游客未认证
|
|
|
- if(this.userInfo.sysUserFlag == '0'){
|
|
|
- this.showPopup = true
|
|
|
- }else{
|
|
|
- if(this.dealerPhone!=''){
|
|
|
- uni.makePhoneCall({
|
|
|
- phoneNumber: this.dealerPhone
|
|
|
- })
|
|
|
- }
|
|
|
+ if(this.dealerPhone!=''){
|
|
|
+ uni.makePhoneCall({
|
|
|
+ phoneNumber: this.dealerPhone
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
viewImg(item){
|
|
@@ -515,77 +510,59 @@
|
|
|
})
|
|
|
return [partList,tempList]
|
|
|
},
|
|
|
- validRz(){
|
|
|
+ // 立即提交
|
|
|
+ submitForm(){
|
|
|
// 游客去认证
|
|
|
if(this.userInfo.sysUserFlag == '0'){
|
|
|
// 未认证
|
|
|
- if(!storeApply.auditStatus){
|
|
|
+ if(this.storeApply&&!this.storeApply.auditStatus){
|
|
|
this.showPopup = true
|
|
|
- return true
|
|
|
}
|
|
|
- // 认证中
|
|
|
- if(storeApply&&storeApply.auditStatus=='WAIT'){
|
|
|
+ // 认证通过
|
|
|
+ if(this.storeApply&&(this.storeApply.auditStatus=='WAIT' || this.storeApply.auditStatus == 'REFUSE')){
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
- content: '门店认证资料审核中,请耐心等待!',
|
|
|
+ content: this.storeApply.auditStatus=='WAIT' ? '门店认证资料审核中,请耐心等待!' : '门店认证资料审核不通过,请重新提交审核!',
|
|
|
confirmText: '好的',
|
|
|
showCancel: false
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
- // 认证通过
|
|
|
- if(storeApply&&(storeApply.auditStatus=='WAIT' || storeApply.auditStatus == 'REFUSE')){
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- content: storeApply.auditStatus=='WAIT' ? '门店认证资料审核中,请耐心等待!' : '门店认证资料审核不通过,请重新提交审核!',
|
|
|
- confirmText: '好的',
|
|
|
- showCancel: false
|
|
|
+ }else{
|
|
|
+ // 已认证用户
|
|
|
+ if(this.partListData.length==0){
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '请选择配件'
|
|
|
})
|
|
|
+ return
|
|
|
}
|
|
|
|
|
|
- return true
|
|
|
- }
|
|
|
-
|
|
|
- return false
|
|
|
- },
|
|
|
- // 立即提交
|
|
|
- submitForm(){
|
|
|
- if(this.validRz()){
|
|
|
- return
|
|
|
- }
|
|
|
- if(this.partListData.length==0){
|
|
|
- uni.showToast({
|
|
|
- icon: 'none',
|
|
|
- title: '请选择配件'
|
|
|
+ // 开始提交
|
|
|
+ const params = {
|
|
|
+ shelfOrderDetailList: this.formatData()[0],
|
|
|
+ tempBillDetailList: this.formatData()[1],
|
|
|
+ vin: this.vinNumber,
|
|
|
+ vehicleModel: this.modelLabel || '',
|
|
|
+ vehicleLogo: this.carInfo.icon||'',
|
|
|
+ }
|
|
|
+ console.log(params,'立即提交')
|
|
|
+ this.saveLoading = true
|
|
|
+ saveShelfOrder(params).then(res => {
|
|
|
+ console.log(res,'saveShelfOrder')
|
|
|
+ if(res.status == 200){
|
|
|
+ // 提交成功
|
|
|
+ uni.redirectTo({
|
|
|
+ url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify(res.data))+"&state=1"
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ // 或失败
|
|
|
+ uni.redirectTo({
|
|
|
+ url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify({shelfOrder:{remindMessage:res.message}}))+"&state=0"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.saveLoading = false
|
|
|
})
|
|
|
- return
|
|
|
}
|
|
|
-
|
|
|
- // 开始提交
|
|
|
- const params = {
|
|
|
- shelfOrderDetailList: this.formatData()[0],
|
|
|
- tempBillDetailList: this.formatData()[1],
|
|
|
- vin: this.vinNumber,
|
|
|
- vehicleModel: this.modelLabel || '',
|
|
|
- vehicleLogo: this.carInfo.icon||'',
|
|
|
- }
|
|
|
- console.log(params,'立即提交')
|
|
|
- this.saveLoading = true
|
|
|
- saveShelfOrder(params).then(res => {
|
|
|
- console.log(res,'saveShelfOrder')
|
|
|
- if(res.status == 200){
|
|
|
- // 提交成功
|
|
|
- uni.redirectTo({
|
|
|
- url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify(res.data))+"&state=1"
|
|
|
- })
|
|
|
- }else{
|
|
|
- // 或失败
|
|
|
- uni.redirectTo({
|
|
|
- url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify({shelfOrder:{remindMessage:res.message}}))+"&state=0"
|
|
|
- })
|
|
|
- }
|
|
|
- this.saveLoading = false
|
|
|
- })
|
|
|
}
|
|
|
}
|
|
|
}
|