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 class="acea-row row-middle">
<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>
</view>
<view v-show="receipt_title_type == '2'" class="acea-row row-middle">
@ -35,7 +35,7 @@
</view>
<view class="acea-row row-middle">
<view>邮箱</view>
<input name="email" :value="email" placeholder="您的联系邮箱" />
<input name="email" :value="email" placeholder="务必准确填写,用于接收发票" />
</view>
</view>
<view v-show="receipt_title_type == '2' && receipt_type == '2'" class="panel">

View File

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

View File

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

View File

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

View File

@ -448,10 +448,11 @@
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;
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={
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();
})
},
@ -578,10 +579,17 @@
nextStep() {
let a=this.checkPhone(this.shopInfo.userPhone);
let b=this.checkPhone(this.shopInfo.EnterprisePhone);
if(!a||!b){
if(!a){
uni.showToast({
icon:'none',
title: '手机号格式有误'
title: '发起人手机号格式有误'
});
return
}
if(!b){
uni.showToast({
icon:'none',
title: '企业对接人手机号格式有误'
});
return
}else if(this.shopInfo.userPhoto.length!=1){
@ -619,6 +627,7 @@
let that = this;
that.$util.uploadImageOne('upload/image', function(res) {
item.push(res.data.path);
that.validateBtn();
// that.$set(that, 'pics', that.pics);
});
},
@ -630,6 +639,7 @@
let that = this,
pic = item[index];
item.splice(index, 1);
that.validateBtn();
// that.$set(that, 'pics', that.pics);
},
//

View File

@ -290,7 +290,8 @@
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
this.shopInfo={idCardPhoto,idCardName,idCardNumber,idCardStartTime,idCardEndTime,businessLicense,countId,countStartTime,countEndTime,businessScope,registerAddressDetail};
uni.hideLoading()
uni.hideLoading();
this.validateBtn();
},
verifyIDcard(index){
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 data2=uni.getStorageSync('updateShopInfo');
this.shopInfo=data2.bank;
uni.hideLoading()
uni.hideLoading();
this.validateBtn();
},
searchBranch(){
let val=this.shopInfo;

View File

@ -437,7 +437,8 @@
<view class="footer_count">
<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 class="coupon_price" v-if="couponData.total_coupon > 0">
优惠:¥ {{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.totalPrice = res.data.order_price
console.log('that.totalPrice: ',that.totalPrice);
that.orderStatus = res.data.status
that.proPrice = res.data.total_price
that.order_type = res.data.order_type

View File

@ -247,6 +247,7 @@
</view>
<home></home>
<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>
</view>
</template>
@ -312,12 +313,21 @@
title: '可用余额:',
number: 0,
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_order_id: '',
invoice_order_id: '',
totalPrice: '0',
integral_cash_time:1,
isReady: true,
invoice: {
invoice: false,
@ -375,7 +385,9 @@
getUserInfo: function() {
let that = this;
getUserInfo().then(res => {
that.integral_cash_time=res.data.integral_cash_time;
that.payMode[2].number = res.data.now_money;
that.payMode[3].number = res.data.integral;
});
},
/**