diff --git a/components/addInvoicing/index.vue b/components/addInvoicing/index.vue index 74c6f9a..05b0f46 100644 --- a/components/addInvoicing/index.vue +++ b/components/addInvoicing/index.vue @@ -26,7 +26,7 @@ 发票抬头 - + @@ -35,7 +35,7 @@ 邮箱 - + diff --git a/components/pay/index.vue b/components/pay/index.vue index 29f5e30..462c57b 100644 --- a/components/pay/index.vue +++ b/components/pay/index.vue @@ -38,7 +38,7 @@ type: Boolean, default: false }, - price:String, + price:Number, show_subTitle:{ default:true }, diff --git a/components/payment/index.vue b/components/payment/index.vue index b49ca5a..9ca78f4 100644 --- a/components/payment/index.vue +++ b/components/payment/index.vue @@ -11,7 +11,12 @@ {{item.name}} - {{item.title}} ¥{{ item.number }} + {{item.title}} + + {{ item.number }} + + + {{item.title}} @@ -19,6 +24,7 @@ + @@ -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; diff --git a/pages/store/merchantDetails/index.vue b/pages/store/merchantDetails/index.vue index 16f75bf..97e60b4 100644 --- a/pages/store/merchantDetails/index.vue +++ b/pages/store/merchantDetails/index.vue @@ -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 } } diff --git a/pages/store/settled/index.vue b/pages/store/settled/index.vue index 11f3376..394ce61 100644 --- a/pages/store/settled/index.vue +++ b/pages/store/settled/index.vue @@ -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); }, // 图片预览 diff --git a/pages/store/settled/step2.vue b/pages/store/settled/step2.vue index 3b8e133..5d71cd8 100644 --- a/pages/store/settled/step2.vue +++ b/pages/store/settled/step2.vue @@ -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}; diff --git a/pages/store/settled/step3.vue b/pages/store/settled/step3.vue index dd6d1c6..fed3622 100644 --- a/pages/store/settled/step3.vue +++ b/pages/store/settled/step3.vue @@ -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; diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue index 22fc5c6..0a0667e 100644 --- a/pages/users/order_confirm/index.vue +++ b/pages/users/order_confirm/index.vue @@ -437,7 +437,8 @@ 合计: - ¥{{totalPrice || 0}} + 扣除积分{{totalPrice*userInfo.integral_cash_time}} + ¥{{totalPrice || 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 diff --git a/pages/users/order_list/index.vue b/pages/users/order_list/index.vue index a287d7b..974e5ef 100644 --- a/pages/users/order_list/index.vue +++ b/pages/users/order_list/index.vue @@ -247,6 +247,7 @@ + @@ -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; }); }, /**