申请开票
This commit is contained in:
@@ -24,4 +24,5 @@
|
||||
|
||||
.img-h-200{height:200rpx;box-sizing:border-box;}
|
||||
.img-w-260{width:260rpx;box-sizing:border-box;}
|
||||
.img-w-280{width:280rpx;box-sizing:border-box;}
|
||||
.img-w-280{width:280rpx;box-sizing:border-box;}
|
||||
.img-h-400{height:400rpx;box-sizing:border-box;}
|
||||
+106
-57
@@ -22,6 +22,7 @@ Page({
|
||||
submitFlag:false,
|
||||
frontUrl:{},
|
||||
backUrl:{},
|
||||
businessUrl:{},
|
||||
isShowCode:false,
|
||||
isShowOrderCode:false,
|
||||
caridErr:[
|
||||
@@ -31,6 +32,12 @@ Page({
|
||||
{
|
||||
caridB:true,
|
||||
},
|
||||
|
||||
],
|
||||
businessErr:[
|
||||
{
|
||||
business_licence:true,
|
||||
},
|
||||
],
|
||||
isChangePayway:false,//合同付款方式是否修改
|
||||
remark:'',//补充说明
|
||||
@@ -481,6 +488,12 @@ Page({
|
||||
'caridErr[1].caridB':true,
|
||||
})
|
||||
}
|
||||
if(e.currentTarget.dataset.face == 'business'){
|
||||
that.setData({
|
||||
businessUrl:resp.data.data,
|
||||
'businessErr[0].business_licence':true,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
@@ -501,86 +514,122 @@ Page({
|
||||
//创建申请开票信息
|
||||
postAppIdcard(){
|
||||
let that = this
|
||||
if (!that.data.frontUrl.url || !that.data.caridErr[0].caridA){
|
||||
wx.showToast({
|
||||
title: '请上传身份证正面照',
|
||||
icon: 'none'
|
||||
})
|
||||
}else if(!that.data.backUrl.url || !that.data.caridErr[1].caridB){
|
||||
wx.showToast({
|
||||
title: '请上传身份证背面照',
|
||||
icon: 'none'
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
submitFlag: true,
|
||||
})
|
||||
let params = {};
|
||||
params['oid'] = that.data.id;
|
||||
let params = {};
|
||||
params['oid'] = that.data.id;
|
||||
if(that.data.info.main_type == 0){
|
||||
if (!that.data.frontUrl.url || !that.data.caridErr[0].caridA){
|
||||
wx.showToast({
|
||||
title: '请上传身份证正面照',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}else if(!that.data.backUrl.url || !that.data.caridErr[1].caridB){
|
||||
wx.showToast({
|
||||
title: '请上传身份证背面照',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
params['cardidA'] = that.data.frontUrl.url;
|
||||
params['cardidB'] = that.data.backUrl.url;
|
||||
_.apiQuery.postAppIdcard(params).then(res => {
|
||||
this.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
this.getAppCusorderDetails()
|
||||
|
||||
} else if(that.data.info.main_type == 1){
|
||||
if (!that.data.businessUrl.url || !that.data.businessErr[0].business_licence){
|
||||
wx.showToast({
|
||||
title: '已提交申请',
|
||||
icon: 'success'
|
||||
title: '请上传营业执照',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
params['business_licence'] = that.data.businessUrl.url;
|
||||
}
|
||||
that.setData({
|
||||
submitFlag: true,
|
||||
})
|
||||
_.apiQuery.postAppIdcard(params).then(res => {
|
||||
this.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
this.getAppCusorderDetails()
|
||||
|
||||
}).catch(res=>{
|
||||
if(res.code==418){
|
||||
wx.showToast({
|
||||
title: '已提交申请',
|
||||
icon: 'success'
|
||||
})
|
||||
|
||||
}).catch(res=>{
|
||||
if(res.code==418){
|
||||
if(this.data.info.main_type == 0){
|
||||
this.setData({
|
||||
caridErr:res.data,
|
||||
})
|
||||
}else if(this.data.info.main_type == 1){
|
||||
this.setData({
|
||||
businessErr:res.data,
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
//修改申请开票信息
|
||||
putAppIdcard() {
|
||||
let that = this
|
||||
if (!that.data.frontUrl.url&&!that.data.backUrl.url) {
|
||||
wx.showToast({
|
||||
title: '请上传新照片',
|
||||
icon: 'none'
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
submitFlag: true,
|
||||
})
|
||||
let params = {};
|
||||
params['id'] = that.data.info.bill_data.id;
|
||||
let params = {};
|
||||
params['id'] = that.data.info.bill_data.id;
|
||||
if(that.data.info.main_type == 0){
|
||||
if (!that.data.frontUrl.url&&!that.data.backUrl.url) {
|
||||
wx.showToast({
|
||||
title: '请上传新照片',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
params['cardidA'] = that.data.frontUrl.url || that.data.info.bill_data.carid_a_path;
|
||||
params['cardidB'] = that.data.backUrl.url || that.data.info.bill_data.carid_b_path;
|
||||
_.apiQuery.putAppIdcard(params).then(res => {
|
||||
this.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
this.getAppCusorderDetails()
|
||||
|
||||
} else if(that.data.info.main_type == 1){
|
||||
if (!that.data.businessUrl.url) {
|
||||
wx.showToast({
|
||||
title: '已提交修改',
|
||||
icon: 'success'
|
||||
title: '请上传新照片',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
params['business_licence'] = that.data.businessUrl.url || that.data.info.bill_data.business_licence_path;
|
||||
}
|
||||
|
||||
}).catch(res=>{
|
||||
if(res.code==418){
|
||||
that.setData({
|
||||
submitFlag: true,
|
||||
})
|
||||
_.apiQuery.putAppIdcard(params).then(res => {
|
||||
this.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
this.getAppCusorderDetails()
|
||||
|
||||
wx.showToast({
|
||||
title: '已提交修改',
|
||||
icon: 'success'
|
||||
})
|
||||
|
||||
}).catch(res=>{
|
||||
if(res.code==418){
|
||||
if(this.data.info.main_type == 0){
|
||||
this.setData({
|
||||
caridErr:res.data,
|
||||
})
|
||||
}else if(this.data.info.main_type == 1){
|
||||
this.setData({
|
||||
businessErr:res.data,
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
//确认交付
|
||||
|
||||
@@ -134,7 +134,8 @@
|
||||
<!--开票信息修改-->
|
||||
<view class="pl30 pr30" wx:if="{{info.bill_status == 1}}">
|
||||
<view class="mt40 font-32">开票信息</view>
|
||||
<view class="fn-flex mt30 text-center">
|
||||
|
||||
<view class="fn-flex mt30 text-center" wx:if="{{info.main_type == 0}}">
|
||||
<view class="fn-flex-item relative mr10 ulib-r10 overflowhidden" bindtap="chooseImg" data-face="front">
|
||||
<view class="absolute top-0 left-0 bottom-0 right-0 bg-f00-op50 z-index-4" wx:if="{{!caridErr[0].caridA}}">
|
||||
<view class="absolute left-0 right-0 box-middle pl20 pr20 text-break font-22 color-fff"><i class="iconfont icon-jinggao"></i>{{caridErr[0].errmsg}}</view>
|
||||
@@ -148,6 +149,14 @@
|
||||
<image class='block wp100 bg-f8 img-h-200' lazy-load="{{true}}" mode="aspectFit" src="{{backUrl.full_url || info.bill_data.carid_b || imgUrl + 'order/defaultidcard-back.jpg'}}"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt30 text-center" wx:elif="{{info.main_type == 1}}">
|
||||
<view class="wp50 relative ulib-r10 overflowhidden" bindtap="chooseImg" data-face="business">
|
||||
<view class="absolute top-0 left-0 bottom-0 right-0 bg-f00-op50 z-index-4" wx:if="{{!businessErr[0].business_licence}}">
|
||||
<view class="absolute left-0 right-0 box-middle pl20 pr20 text-break font-22 color-fff"><i class="iconfont icon-jinggao"></i>{{businessErr[0].errmsg}}</view>
|
||||
</view>
|
||||
<image class='block wp100 bg-f8 img-h-200' lazy-load="{{true}}" mode="aspectFit" src="{{businessUrl.full_url || info.bill_data.business_licence || imgUrl + 'order/defaultidcard-business.jpg'}}"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--开票信息展示-->
|
||||
<view class="pl30 pr30" wx:elif="{{info.bill_status == 2}}">
|
||||
|
||||
Reference in New Issue
Block a user