This commit is contained in:
yangtao 2024-04-13 18:32:44 +08:00
parent f203f6aac7
commit 1060399bc7
9 changed files with 96 additions and 21 deletions

View File

@ -26,7 +26,7 @@
</view> </view>
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<view>发票抬头</view> <view>发票抬头</view>
<input name="receipt_title" :value="receipt_title" :maxlength="20" placeholder="需要开具发票的企业名称"/> <input name="receipt_title" :value="receipt_title" :maxlength="20" placeholder="需要开具发票的企业名称或个人名称"/>
<text class="iconfont icon-xiangyou" @click="callTitle" ></text> <text class="iconfont icon-xiangyou" @click="callTitle" ></text>
</view> </view>
<view v-show="receipt_title_type == '2'" class="acea-row row-middle"> <view v-show="receipt_title_type == '2'" class="acea-row row-middle">
@ -35,7 +35,7 @@
</view> </view>
<view class="acea-row row-middle"> <view class="acea-row row-middle">
<view>邮箱</view> <view>邮箱</view>
<input name="email" :value="email" placeholder="您的联系邮箱" /> <input name="email" :value="email" placeholder="务必准确填写,用于接收发票" />
</view> </view>
</view> </view>
<view v-show="receipt_title_type == '2' && receipt_type == '2'" class="panel"> <view v-show="receipt_title_type == '2' && receipt_type == '2'" class="panel">

View File

@ -38,7 +38,7 @@
type: Boolean, type: Boolean,
default: false default: false
}, },
price:String, price:Number,
show_subTitle:{ show_subTitle:{
default:true default:true
}, },

View File

@ -11,7 +11,12 @@
<view class="text"> <view class="text">
<view class="name">{{item.name}}</view> <view class="name">{{item.name}}</view>
<view class="info" v-if="item.number"> <view class="info" v-if="item.number">
{{item.title}} <span class="money">{{ item.number }}</span> {{item.title}} <span class="money" >
<text v-if="item.value=='balance'"></text>
{{ item.number }}
</span>
</view> </view>
<view class="info" v-else>{{item.title}}</view> <view class="info" v-else>{{item.title}}</view>
</view> </view>
@ -19,6 +24,7 @@
<view class="iconfont icon-xiangyou"></view> <view class="iconfont icon-xiangyou"></view>
</view> </view>
</view> </view>
<pay :show_key="payShow" :price="totalPrice" :show_subTitle="true" :mix="true" @payFunc="payFunc" @closeFuc="closePay"></pay>
<view class="mask" ref="close" @click='close' v-if="pay_close"></view> <view class="mask" ref="close" @click='close' v-if="pay_close"></view>
</view> </view>
</template> </template>
@ -30,7 +36,11 @@
integralOrderPay, integralOrderPay,
presellOrderPay presellOrderPay
} from '@/api/order.js'; } from '@/api/order.js';
import pay from '@/components/pay/index.vue';
export default { export default {
components: {
pay
},
props: { props: {
payMode: { payMode: {
type: Array, type: Array,
@ -65,19 +75,33 @@
}, },
data() { data() {
return { return {
payShow:false,
payInfo:{},
number:0,
}; };
}, },
mounted:function(){ mounted:function(){
}, },
methods: { methods: {
closePay(){
this.payShow=false;
},
payFunc(val){
let data1=this.payInfo;
let that=this;
if(data1.balance_vert){
this.$delete(data1,'balance_vert')
}
this.goPay(this.number,data1.type,val.password);
},
close: function() { close: function() {
this.$emit('onChangeFun', { this.$emit('onChangeFun', {
action: 'payClose' action: 'payClose'
}); });
}, },
goPay: function(number, paytype) { goPay: function(number, paytype,password) {
this.number=number;
if (this.isCall) { if (this.isCall) {
return this.$emit('onChangeFun', { return this.$emit('onChangeFun', {
action: 'payCheck', action: 'payCheck',
@ -98,6 +122,8 @@
// #endif // #endif
} else if (paytype == 'balance') { } else if (paytype == 'balance') {
type = 'balance'; type = 'balance';
}else if (paytype == 'integral') {
type = 'integral';
}else if(paytype == 'alipay'){ }else if(paytype == 'alipay'){
// #ifndef MP // #ifndef MP
type = 'alipay'; type = 'alipay';
@ -109,19 +135,27 @@
if (!that.order_id) return that.$util.Tips({ if (!that.order_id) return that.$util.Tips({
title: '请选择要支付的订单' title: '请选择要支付的订单'
}); });
if (paytype == 'balance' && parseFloat(number) < parseFloat(that.totalPrice)) return that.$util.Tips({ if (paytype == 'balance' && parseFloat(number) < parseFloat(that.totalPrice)) return that.$util.Tips({title: '余额不足!'});
title: '余额不足!' if (paytype == 'integral' && parseFloat(number/100) < parseFloat(that.totalPrice)) return that.$util.Tips({title: '积分不足!'});
});
uni.showLoading({ uni.showLoading({
title: '支付中' title: '支付中'
}); });
let orderApi = that.order_type === 1 ? presellOrderPay : that.order_type === 2 ? integralOrderPay : orderPay let orderApi = that.order_type === 1 ? presellOrderPay : that.order_type === 2 ? integralOrderPay : orderPay
orderApi(that.order_id, { let data1= {
type: type, type: type,
// #ifdef H5 // #ifdef H5
return_url: that.returnUrl!=='' ? 'http://'+window.location.host+that.returnUrl : 'http://'+window.location.host+'/pages/users/order_list/index', return_url: that.returnUrl!=='' ? 'http://'+window.location.host+that.returnUrl : 'http://'+window.location.host+'/pages/users/order_list/index',
// #endif // #endif
}).then(res => { }
if(!password){
data1.balance_vert=1;
this.payInfo=data1;
}else{
this.$delete(data1,'balance_vert');
data1.pay_password=password;
}
orderApi(that.order_id,data1).then(res => {
let status = res.data.status, let status = res.data.status,
orderId = res.data.result.order_id, orderId = res.data.result.order_id,
jsConfig = res.data.result.config, jsConfig = res.data.result.config,
@ -131,6 +165,10 @@
case 'ORDER_EXIST': case 'ORDER_EXIST':
case 'EXTEND_ORDER': case 'EXTEND_ORDER':
case 'PAY_ERROR': case 'PAY_ERROR':
case 'continue':
uni.hideLoading();
this.payShow=true;
break;
case 'error': case 'error':
uni.hideLoading(); uni.hideLoading();
this.$emit('onChangeFun', { this.$emit('onChangeFun', {
@ -140,8 +178,15 @@
title: res.message title: res.message
}); });
break; break;
case 'pay_error':
uni.hideLoading();
return that.$util.Tips({
title: res.message
});
break;
case 'success': case 'success':
uni.hideLoading(); uni.hideLoading();
this.closePay();
this.$emit('onChangeFun', { this.$emit('onChangeFun', {
action: 'payClose' action: 'payClose'
}); });
@ -370,7 +415,7 @@
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%; width: 100%;
max-height: 600rpx; // max-height: 600rpx;
border-radius: 16rpx 16rpx 0 0; border-radius: 16rpx 16rpx 0 0;
background-color: #fff; background-color: #fff;
padding-bottom: 60rpx; padding-bottom: 60rpx;
@ -450,6 +495,9 @@
.payment .item .left .iconfont.icon-yuezhifu1 { .payment .item .left .iconfont.icon-yuezhifu1 {
color: #eb6623; color: #eb6623;
} }
.payment .item .left .haiyue-jifenduihuan {
color: #fe960f ;
}
.payment .item .iconfont { .payment .item .iconfont {
font-size: 0.3rpx; font-size: 0.3rpx;

View File

@ -188,11 +188,12 @@
} }
.btn { .btn {
width: 70%; width: 70%;
position: absolute;
text-align: center; text-align: center;
color: #999999; color: #999999;
font-size: 24rpx; font-size: 24rpx;
bottom: 80rpx color: red ;
// position: absolute;
// bottom: 80rpx
} }
} }
</style> </style>

View File

@ -448,10 +448,11 @@
uni.setStorageSync('updateShopInfo',resData); uni.setStorageSync('updateShopInfo',resData);
let {shopName,mer_classification,classification,businessAddress,businessAddressDetail,EnterpriseType,EnterpriseName,EnterpriseJoinName,EnterprisePhone,EnterpriseId,EnterpriseRooter,userName,userPhone,userId,userPhoto,isVeteran,isVeteranPhoto,isFlagshipStore,isFlagshipStorePhoto,mer_type,mer_storeType} = this.shopInfo; let {shopName,mer_classification,classification,businessAddress,businessAddressDetail,EnterpriseType,EnterpriseName,EnterpriseJoinName,EnterprisePhone,EnterpriseId,EnterpriseRooter,userName,userPhone,userId,userPhoto,isVeteran,isVeteranPhoto,isFlagshipStore,isFlagshipStorePhoto,mer_type,mer_storeType} = this.shopInfo;
mer_classification=this.array[resData.mer_type_id]['category_name'],classification=resData.mer_type_id,mer_storeType=this.storeTypeArr[resData.merchant_category_id]['type_name'],mer_type=resData.merchant_category_id,EnterprisePhone=com.mobile,shopName=resData.mer_name,userPhone=resData.phone,EnterpriseName=com.name,userName=resData.name,mer_type=resData.merchant_category_id,classification=resData.mer_type_id,EnterpriseType=com.type,EnterpriseName=com.name,EnterpriseJoinName=com.contact,EnterpriseId=com.number,userName=com.initiator,userPhone=com.inti_mobile,userId=com.inti_number,userPhoto=com.init_image,isVeteran=com.is_huimei,isVeteranPhoto=com.image_huimei,isFlagshipStore=com.is_soldier,isFlagshipStorePhoto=com.image_soldier,businessAddress=biz.province+'/'+biz.city,businessAddressDetail=biz.address_true; mer_classification=this.array[resData.mer_type_id],classification=resData.mer_type_id,mer_storeType=this.storeTypeArr[resData.merchant_category_id]['type_name'],mer_type=resData.merchant_category_id,EnterprisePhone=com.mobile,shopName=resData.mer_name,userPhone=resData.phone,EnterpriseName=com.name,userName=resData.name,mer_type=resData.merchant_category_id,classification=resData.mer_type_id,EnterpriseType=com.type,EnterpriseName=com.name,EnterpriseJoinName=com.contact,EnterpriseId=com.number,userName=com.initiator,userPhone=com.inti_mobile,userId=com.inti_number,userPhoto=com.init_image,isVeteran=com.is_huimei,isVeteranPhoto=com.image_huimei,isFlagshipStore=com.is_soldier,isFlagshipStorePhoto=com.image_soldier,businessAddress=biz.province+'/'+biz.city,businessAddressDetail=biz.address_true;
this.shopInfo={ this.shopInfo={
shopName,mer_classification,classification,businessAddress,businessAddressDetail,EnterpriseType,EnterpriseName,EnterpriseJoinName,EnterprisePhone,EnterpriseId,EnterpriseRooter,userName,userPhone,userId,userPhoto,isVeteran,isVeteranPhoto,isFlagshipStore,isFlagshipStorePhoto,mer_type,mer_storeType shopName,mer_classification,classification,businessAddress,businessAddressDetail,EnterpriseType,EnterpriseName,EnterpriseJoinName,EnterprisePhone,EnterpriseId,EnterpriseRooter,userName,userPhone,userId,userPhoto,isVeteran,isVeteranPhoto,isFlagshipStore,isFlagshipStorePhoto,mer_type,mer_storeType
} }
this.validateBtn();
uni.hideLoading(); uni.hideLoading();
}) })
}, },
@ -578,10 +579,17 @@
nextStep() { nextStep() {
let a=this.checkPhone(this.shopInfo.userPhone); let a=this.checkPhone(this.shopInfo.userPhone);
let b=this.checkPhone(this.shopInfo.EnterprisePhone); let b=this.checkPhone(this.shopInfo.EnterprisePhone);
if(!a||!b){ if(!a){
uni.showToast({ uni.showToast({
icon:'none', icon:'none',
title: '手机号格式有误' title: '发起人手机号格式有误'
});
return
}
if(!b){
uni.showToast({
icon:'none',
title: '企业对接人手机号格式有误'
}); });
return return
}else if(this.shopInfo.userPhoto.length!=1){ }else if(this.shopInfo.userPhoto.length!=1){
@ -619,6 +627,7 @@
let that = this; let that = this;
that.$util.uploadImageOne('upload/image', function(res) { that.$util.uploadImageOne('upload/image', function(res) {
item.push(res.data.path); item.push(res.data.path);
that.validateBtn();
// that.$set(that, 'pics', that.pics); // that.$set(that, 'pics', that.pics);
}); });
}, },
@ -630,6 +639,7 @@
let that = this, let that = this,
pic = item[index]; pic = item[index];
item.splice(index, 1); item.splice(index, 1);
that.validateBtn();
// that.$set(that, 'pics', that.pics); // that.$set(that, 'pics', that.pics);
}, },
// //

View File

@ -290,7 +290,8 @@
let biz=data2.biz; let biz=data2.biz;
idCardPhoto=[idcard.image1,idcard.image2],idCardName=idcard.name,idCardNumber=idcard.number,idCardStartTime=idcard.start,idCardEndTime=idcard.end,businessLicense=biz.image,countId=biz.number,countStartTime=biz.start,countEndTime=biz.end,registerAddressDetail=biz.address,businessScope=biz.businessScope idCardPhoto=[idcard.image1,idcard.image2],idCardName=idcard.name,idCardNumber=idcard.number,idCardStartTime=idcard.start,idCardEndTime=idcard.end,businessLicense=biz.image,countId=biz.number,countStartTime=biz.start,countEndTime=biz.end,registerAddressDetail=biz.address,businessScope=biz.businessScope
this.shopInfo={idCardPhoto,idCardName,idCardNumber,idCardStartTime,idCardEndTime,businessLicense,countId,countStartTime,countEndTime,businessScope,registerAddressDetail}; this.shopInfo={idCardPhoto,idCardName,idCardNumber,idCardStartTime,idCardEndTime,businessLicense,countId,countStartTime,countEndTime,businessScope,registerAddressDetail};
uni.hideLoading() uni.hideLoading();
this.validateBtn();
}, },
verifyIDcard(index){ verifyIDcard(index){
let img={image:this.shopInfo.idCardPhoto[index],type:index+2}; let img={image:this.shopInfo.idCardPhoto[index],type:index+2};

View File

@ -234,7 +234,8 @@
let {bankCardImg,bankCardUserName,bankCard,bankName,bankBranchName,CNAPS}=this.shopInfo; let {bankCardImg,bankCardUserName,bankCard,bankName,bankBranchName,CNAPS}=this.shopInfo;
let data2=uni.getStorageSync('updateShopInfo'); let data2=uni.getStorageSync('updateShopInfo');
this.shopInfo=data2.bank; this.shopInfo=data2.bank;
uni.hideLoading() uni.hideLoading();
this.validateBtn();
}, },
searchBranch(){ searchBranch(){
let val=this.shopInfo; let val=this.shopInfo;

View File

@ -437,7 +437,8 @@
<view class="footer_count"> <view class="footer_count">
<view> <view>
合计: 合计:
<text class='pColor'>{{totalPrice || 0}}</text> <text class='pColor' v-if="payType=='integral'">扣除积分{{totalPrice*userInfo.integral_cash_time}}</text>
<text class='pColor' v-else>{{totalPrice || 0}}</text>
</view> </view>
<view class="coupon_price" v-if="couponData.total_coupon > 0"> <view class="coupon_price" v-if="couponData.total_coupon > 0">
优惠:¥ {{couponData.total_coupon}} 优惠:¥ {{couponData.total_coupon}}
@ -1167,6 +1168,7 @@
that.$set(that, 'order_form', (that.order_form && that.order_form.length>0) ? that.order_form : formData); that.$set(that, 'order_form', (that.order_form && that.order_form.length>0) ? that.order_form : formData);
} }
that.totalPrice = res.data.order_price that.totalPrice = res.data.order_price
console.log('that.totalPrice: ',that.totalPrice);
that.orderStatus = res.data.status that.orderStatus = res.data.status
that.proPrice = res.data.total_price that.proPrice = res.data.total_price
that.order_type = res.data.order_type that.order_type = res.data.order_type

View File

@ -247,6 +247,7 @@
</view> </view>
<home></home> <home></home>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment> <payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
<addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing> <addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing>
</view> </view>
</template> </template>
@ -312,12 +313,21 @@
title: '可用余额:', title: '可用余额:',
number: 0, number: 0,
payStatus: this.$store.getters.globalData.yue_pay_status payStatus: this.$store.getters.globalData.yue_pay_status
} },
{
name: "积分兑付",
icon: "haiyuefont haiyue-jifenduihuan",
value: 'integral',
title: '可用积分:',
number: 0,
payStatus: this.$store.getters.globalData.integration_pay_open,
},
], ],
pay_close: false, pay_close: false,
pay_order_id: '', pay_order_id: '',
invoice_order_id: '', invoice_order_id: '',
totalPrice: '0', totalPrice: '0',
integral_cash_time:1,
isReady: true, isReady: true,
invoice: { invoice: {
invoice: false, invoice: false,
@ -375,7 +385,9 @@
getUserInfo: function() { getUserInfo: function() {
let that = this; let that = this;
getUserInfo().then(res => { getUserInfo().then(res => {
that.integral_cash_time=res.data.integral_cash_time;
that.payMode[2].number = res.data.now_money; that.payMode[2].number = res.data.now_money;
that.payMode[3].number = res.data.integral;
}); });
}, },
/** /**