开票休息
This commit is contained in:
@@ -21,6 +21,7 @@ if (env == "d") {
|
||||
}
|
||||
api = {
|
||||
baseUrl: baseUrl,
|
||||
upImg: baseUrl + "upimg", //上传图片
|
||||
appUserUkey: "app/user/ukey", //登录/退出登录
|
||||
appUser: "app/user", //用户信息
|
||||
appSms: "app/sms", //获取验证码
|
||||
@@ -30,6 +31,7 @@ api = {
|
||||
appCustomers: "app/customers", //获取客户列表 /新建客户 /修改状态和到店次数、试驾次数 /获取客户详情
|
||||
appCustomersFilter: "app/customers/filter", //获取列表筛选条件
|
||||
appSmsCustomer: "app/sms/customer", //发短信
|
||||
appSmsCusorder: "app/sms/cusorder", //发短信
|
||||
appCustomerlogs: "app/customerlogs", //获取日志
|
||||
appCustomerData: "app/customers/data", //获取客户详细信息
|
||||
|
||||
@@ -39,6 +41,9 @@ api = {
|
||||
appEmployees: "app/employees", //获取客户详细信息 /获取店员列表 /更新店员信息 /删除店员
|
||||
|
||||
appLoan: "app/loan", //获取贷款产品信息 /创建贷款信息 /修改贷款信息
|
||||
|
||||
appIdcard: "app/idcard", //创建申请开票信息
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -257,4 +257,18 @@ apiQuery.putAppLoan = function (params) {
|
||||
})
|
||||
}
|
||||
|
||||
//创建申请开票信息
|
||||
apiQuery.postAppIdcard = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(true, Config.api.appIdcard, 2, params, "POST", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
//修改申请开票信息
|
||||
apiQuery.putAppIdcard = function (params) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
HttpRequest(true, Config.api.appIdcard, 2, params, "PUT", resolve, reject)
|
||||
})
|
||||
}
|
||||
|
||||
export default apiQuery;
|
||||
@@ -108,7 +108,7 @@ function HttpRequest(loading, url, sessionChoose, params, method, callBack, reje
|
||||
url: '/pages/login/index'
|
||||
})
|
||||
//}
|
||||
} else{
|
||||
}else{
|
||||
if (res.data.code==200){
|
||||
callBack(res.data);
|
||||
}else{
|
||||
@@ -117,10 +117,12 @@ function HttpRequest(loading, url, sessionChoose, params, method, callBack, reje
|
||||
if (Config.white401UrlList[url] === url) {//接口白名单
|
||||
return
|
||||
}
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: "none"
|
||||
});
|
||||
if(res.data.msg){
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
+127
-13
@@ -19,9 +19,17 @@ Page({
|
||||
yearsIndex:-1,//分期年限
|
||||
money:'',//首付金额
|
||||
submitFlag:false,
|
||||
stempFront:'',
|
||||
stempBack:'',
|
||||
frontUrl:{},
|
||||
backUrl:{},
|
||||
isShowCode:false,
|
||||
caridErr:[
|
||||
{
|
||||
caridA:true,
|
||||
},
|
||||
{
|
||||
caridB:true,
|
||||
},
|
||||
],
|
||||
},
|
||||
onLoad: function (options) {
|
||||
for (let key in options) {
|
||||
@@ -260,17 +268,38 @@ Page({
|
||||
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
||||
success(res) {
|
||||
console.log(res)
|
||||
if(e.currentTarget.dataset.face == 'front'){
|
||||
that.setData({
|
||||
stempFront:res.tempFilePaths[0],
|
||||
})
|
||||
}
|
||||
if(e.currentTarget.dataset.face == 'back'){
|
||||
that.setData({
|
||||
stempBack:res.tempFilePaths[0],
|
||||
})
|
||||
}
|
||||
|
||||
wx.showLoading();
|
||||
wx.uploadFile({
|
||||
url:_.config.api.upImg,
|
||||
filePath:res.tempFilePaths[0],
|
||||
name: 'img',
|
||||
formData: {
|
||||
'app': 'liche'
|
||||
},
|
||||
success: (resp) => {
|
||||
resp.data = JSON.parse(resp.data);
|
||||
wx.hideLoading();
|
||||
if (resp.data.code == 200) {
|
||||
|
||||
if(e.currentTarget.dataset.face == 'front'){
|
||||
that.setData({
|
||||
frontUrl:resp.data.data,
|
||||
'caridErr[0].caridA':true,
|
||||
})
|
||||
}
|
||||
if(e.currentTarget.dataset.face == 'back'){
|
||||
that.setData({
|
||||
backUrl:resp.data.data,
|
||||
'caridErr[1].caridB':true,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
fail: res => {
|
||||
wx.showToast({
|
||||
@@ -282,6 +311,91 @@ 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;
|
||||
params['cardidA'] = that.data.frontUrl.url;
|
||||
params['cardidB'] = that.data.backUrl.url;
|
||||
_.apiQuery.postAppIdcard(params).then(res => {
|
||||
this.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
this.getAppCusorderDetails()
|
||||
|
||||
wx.showToast({
|
||||
title: '已提交申请',
|
||||
icon: 'success'
|
||||
})
|
||||
|
||||
}).catch(res=>{
|
||||
if(res.code==418){
|
||||
this.setData({
|
||||
caridErr:res.data,
|
||||
})
|
||||
}
|
||||
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;
|
||||
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()
|
||||
|
||||
wx.showToast({
|
||||
title: '已提交修改',
|
||||
icon: 'success'
|
||||
})
|
||||
|
||||
}).catch(res=>{
|
||||
if(res.code==418){
|
||||
this.setData({
|
||||
caridErr:res.data,
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
submitFlag: false,
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
//客服微信码
|
||||
optShowCode() {
|
||||
this.setData({
|
||||
|
||||
@@ -106,16 +106,16 @@
|
||||
</view>
|
||||
<view class="fn-flex mt30 text-center">
|
||||
<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="{{stempFront}}">
|
||||
<view class="absolute left-0 right-0 box-middle pl20 pr20 font-22 color-fff"><i class="iconfont icon-jinggao"></i>系统识别失败请重新上传</view>
|
||||
<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>
|
||||
</view>
|
||||
<image class='block wp100 bg-f8 img-h-200' lazy-load="{{true}}" mode="aspectFit" src="{{stempFront || imgUrl + 'order/defaultidcard-front.jpg'}}"></image>
|
||||
<image class='block wp100 bg-f8 img-h-200' lazy-load="{{true}}" mode="aspectFit" src="{{frontUrl.full_url || info.bill_data.carid_a || imgUrl + 'order/defaultidcard-front.jpg'}}"></image>
|
||||
</view>
|
||||
<view class="fn-flex-item relative ml10 ulib-r10 overflowhidden" bindtap="chooseImg" data-face="back">
|
||||
<view class="absolute top-0 left-0 bottom-0 right-0 bg-f00-op50 z-index-4" wx:if="{{stempBack}}">
|
||||
<view class="absolute left-0 right-0 box-middle pl20 pr20 font-22 color-fff"><i class="iconfont icon-jinggao"></i>系统识别失败请重新上传</view>
|
||||
<view class="absolute top-0 left-0 bottom-0 right-0 bg-f00-op50 z-index-4" wx:if="{{!caridErr[1].caridB}}">
|
||||
<view class="absolute left-0 right-0 box-middle pl20 pr20 text-break font-22 color-fff"><i class="iconfont icon-jinggao"></i>{{caridErr[1].errmsg}}</view>
|
||||
</view>
|
||||
<image class='block wp100 bg-f8 img-h-200' lazy-load="{{true}}" mode="aspectFit" src="{{stempBack || imgUrl + 'order/defaultidcard-back.jpg'}}"></image>
|
||||
<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>
|
||||
@@ -126,19 +126,19 @@
|
||||
</view>
|
||||
<view class="fn-flex mt30 text-center">
|
||||
<view class="fn-flex-item relative mr10">
|
||||
<image class='wp100 img-h-200' lazy-load="{{true}}" mode="aspectFit" src="{{imgUrl}}order/defaultidcard-front.jpg"></image>
|
||||
<image class='wp100 img-h-200' lazy-load="{{true}}" mode="aspectFit" src="{{info.bill_data.carid_a}}"></image>
|
||||
</view>
|
||||
<view class="fn-flex-item relative ml10 bg-f8 ulib-r10">
|
||||
<image class='wp100 img-h-200' lazy-load="{{true}}" mode="aspectFit" src="{{imgUrl}}order/defaultidcard-back.jpg"></image>
|
||||
<image class='wp100 img-h-200' lazy-load="{{true}}" mode="aspectFit" src="{{info.bill_data.carid_b}}"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="mt60 pl60 pr60" wx:if="{{info.loan_status == 1}}">
|
||||
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="{{info.loan_data.id?'putAppLoan':'postAppLoan'}}">保存信息</button>
|
||||
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="{{info.loan_data.id?'putAppLoan':'postAppLoan'}}">{{info.loan_data.id?'修改信息':'保存信息'}}</button>
|
||||
</view>
|
||||
<view class="mt60 pl60 pr60" wx:elif="{{info.bill_status == 1}}">
|
||||
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="putaddStaff">申请开票</button>
|
||||
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="{{info.bill_data.id?'putAppIdcard':'postAppIdcard'}}">{{info.bill_data.id?'重新上传申请':'申请开票'}}</button>
|
||||
</view>
|
||||
<view class="mt60 pl60 pr60" wx:elif="{{info.loan_status == 1}}">
|
||||
<button class="wp100 btn-36afa2 pt10 pb10 text-center font-32 color-fff ulib-r750" hover-class="btn-36afa2-hover" disabled="{{submitFlag}}" bindtap="putaddStaff">确认交付</button>
|
||||
|
||||
Reference in New Issue
Block a user