Commit 1605a3a9 authored by qipeng's avatar qipeng

添加抬头回显

parent 4602fd47
...@@ -144,6 +144,7 @@ export default { ...@@ -144,6 +144,7 @@ export default {
this.checkOrderMoney+=item.orderMoney this.checkOrderMoney+=item.orderMoney
}) })
this.checkOrderMoney = this.checkOrderMoney.toFixed(2) this.checkOrderMoney = this.checkOrderMoney.toFixed(2)
this.loadInvoiceHeadFun()//抬头查询
}, },
methods: { methods: {
radioChange(evt){//点击radio radioChange(evt){//点击radio
...@@ -162,7 +163,7 @@ export default { ...@@ -162,7 +163,7 @@ export default {
}) })
return false return false
} }
if(this.uploadMes.headType==1&&this.uploadMes.taxNumber){ if(this.uploadMes.headType==1&&this.uploadMes.taxNumber==''){
uni.showToast({ uni.showToast({
title: '公司税号不可为空', title: '公司税号不可为空',
icon: 'none' icon: 'none'
...@@ -189,6 +190,36 @@ export default { ...@@ -189,6 +190,36 @@ export default {
} }
}) })
}, },
loadInvoiceHeadFun(){
var data={
companyId:this.uploadMes.companyId,
merchantId:this.uploadMes.merchantId,
phone:this.uploadMes.phone,
openid:this.uploadMes.openid,
}
this.$request('wechatUser/invoice/loadInvoiceHead',data).then((res)=>{
if(res.code=='00'){
var messageData = res.data
this.uploadMes.headType = messageData.headType||''
this.uploadMes.buyerName = messageData.buyerName||''
this.uploadMes.emailAddress = messageData.emailAddress||''
if(messageData.headType==1){
this.uploadMes.taxNumber = messageData.taxNumber||''
this.uploadMes.buyerAddress = messageData.buyerAddress||''
this.uploadMes.bankAccount = messageData.bankAccount||''
}
}else{
if(res.code=='04'){
console.log('无历史抬头')
}else{
uni.showToast({
title: res.message,
icon: 'none'
})
}
}
})
},
} }
} }
</script> </script>
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
</view> </view>
</view> </view>
<view class="record-bottom"> <view class="record-bottom">
<view class="bottom-name" v-if="item.invoiceStatus==0">未开票</view>
<view class="bottom-name" v-if="item.invoiceStatus==1">开票中</view> <view class="bottom-name" v-if="item.invoiceStatus==1">开票中</view>
<view class="bottom-name bottom-name2" v-else-if="item.invoiceStatus==2">已开票</view> <view class="bottom-name bottom-name2" v-else-if="item.invoiceStatus==2">已开票</view>
<view class="bottom-name" v-if="item.invoiceStatus==3">开票失败</view> <view class="bottom-name" v-if="item.invoiceStatus==3">开票失败</view>
...@@ -107,7 +108,7 @@ export default { ...@@ -107,7 +108,7 @@ export default {
height: 260rpx; height: 260rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 8rpx; border-radius: 8rpx;
margin-bottom: 20rpx; margin: 0 auto 20rpx auto;
.record-title{ .record-title{
padding: 36rpx 36rpx 26rpx 36rpx; padding: 36rpx 36rpx 26rpx 36rpx;
border-bottom: solid 2rpx #F5F5F5; border-bottom: solid 2rpx #F5F5F5;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment