Browse Source

合利宝支付联调

zhengjinyi 3 years ago
parent
commit
6adcbef185

+ 6 - 0
components/cm-module/cm-seller/home.vue

@@ -8,6 +8,8 @@
 			<banner :list="bannerImageList" v-if="isNavRequest"></banner>
 			<!-- 金刚区菜单 -->
 			<navbars :list="navBarsList" v-if="isNavRequest"></navbars>
+			<!-- 轮播公告 -->
+			<notice :list="newsList" v-if="isNavRequest && newsList.length>0 "></notice>
 			<!-- 直播 -->
 			<page-special :templateData="templateData" v-if="isLiveRequest"></page-special>
 		</view>	
@@ -29,6 +31,7 @@
 	import customer from '@/components/cm-module/homeIndex/customer.vue'
 	import banner from '@/components/cm-module/homeIndex/banner.vue'
 	import navbars from '@/components/cm-module/homeIndex/navbars.vue'
+	import notice from '@/components/cm-module/homeIndex/notice.vue'
 	import pageFloor from '@/components/cm-module/homeIndex/pageFloor.vue'
 	import pageSpecial from '@/components/cm-module/homeIndex/pageSpecial.vue'
 	import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
@@ -39,6 +42,7 @@
 			customer,
 			banner,
 			navbars,
+			notice,
 			pageFloor,
 			pageSpecial,
 			supplierList
@@ -65,6 +69,7 @@
 				flootData:[],//楼层
 				bannerImageList:[],//轮播
 				navBarsList:[],//导航分类
+				newsList:[],				// 公告
 				templateData:{},
 				pageList:[],//楼层
 				supplierObj:{},//供应商列表
@@ -116,6 +121,7 @@
 					this.mallPageModules = data.mallPageModules
 					this.skeletonShow = false
 					this.navBarsList = data.topMenuList
+					this.newsList = data.annlist
 					this.isNavRequest = true
 					this.GetHomeTopDataInfo()
 					this.GetHomeFloorInfo()

+ 1 - 0
components/cm-module/homeIndex/notice.vue

@@ -102,6 +102,7 @@
 	}
 	
 	.tui-news-item {
+		width: 480rpx;
 		line-height: 28rpx;
 		white-space: nowrap;
 		overflow: hidden;

+ 1 - 1
components/cm-module/listTemplate/buyagainList.vue

@@ -19,7 +19,7 @@
 					@click.stop="navToDetailPage(item.productId)"
 				>
 					<view class="list-details-image">
-						<image mode="widthFix" :src="pros.image" class="list-img" alt="list-img"></image>
+						<image mode="widthFix" :src="item.image" class="list-img" alt="list-img"></image>
 						<view class="list-details-type">医疗器械</view>
 					</view>
 					<view class="list-details-info">

+ 16 - 10
components/cm-module/supplier/home.vue

@@ -8,6 +8,8 @@
 			<banner :list="bannerImageList" v-if="isNavRequest"></banner>
 			<!-- 金刚区菜单 -->
 			<navbars :list="navBarsList" v-if="isNavRequest"></navbars>
+			<!-- 轮播公告 -->
+			<notice :list="newsList" v-if="isNavRequest && newsList.length>0"></notice>
 			<!-- 直播 -->
 			<page-special :templateData="templateData" v-if="isLiveRequest"></page-special>
 		</view>	
@@ -24,21 +26,23 @@
 </template>
 
 <script>
-	import tuiSkeleton from "@/components/tui-skeleton/tui-skeleton"
+	import tuiSkeleton from '@/components/tui-skeleton/tui-skeleton'
 	import authorize from '@/common/config/authorize.js'
 	import customer from '@/components/cm-module/homeIndex/customer.vue'
 	import banner from '@/components/cm-module/homeIndex/banner.vue'
 	import navbars from '@/components/cm-module/homeIndex/navbars.vue'
+	import notice from '@/components/cm-module/homeIndex/notice.vue'
 	import pageFloor from '@/components/cm-module/homeIndex/pageFloor.vue'
 	import pageSpecial from '@/components/cm-module/homeIndex/pageSpecial.vue'
 	import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
-	import { mapState,mapMutations} from 'vuex';
+	import { mapState,mapMutations} from 'vuex'
 	export default {
 		components:{
 			tuiSkeleton,
 			customer,
 			banner,
 			navbars,
+			notice,
 			pageFloor,
 			pageSpecial,
 			supplierList
@@ -65,6 +69,7 @@
 				flootData:[],//楼层
 				bannerImageList:[],//轮播
 				navBarsList:[],//导航分类
+				newsList:[],				// 公告
 				templateData:{},
 				pageList:[],//楼层
 				supplierObj:{},//供应商列表
@@ -83,7 +88,7 @@
 		},
 		filters: {
 			NumFormat:function(text) {//处理金额
-				return Number(text).toFixed(2);
+				return Number(text).toFixed(2)
 			},
 		},
 		computed: {
@@ -101,21 +106,22 @@
 			},
 			GetHomeFloorInfo(){//初始化首页楼层数据
 				this.CommonService.GetHomeDataInfo({userId:this.userID,soure:2}).then(response =>{
-					let data = response.data;
-					this.pageList = data.homePageFloor;
-					this.supplierObj = data.supplierImage;
-					this.isRequest = true;
+					let data = response.data
+					this.pageList = data.homePageFloor
+					this.supplierObj = data.supplierImage
+					this.isRequest = true
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
 			},
 			getHomeInformation(){//初始化首页数据	
 				this.CommonService.GetHomeModulesDataInfo({ source:2 }).then(res =>{
-					let data = res.data;
+					let data = res.data
 					this.bannerImageList = data.bannerList
 					this.mallPageModules = data.mallPageModules
-					this.skeletonShow = false;
+					this.skeletonShow = false
 					this.navBarsList = data.topMenuList
+					this.newsList = data.annlist
 					this.isNavRequest = true
 					this.GetHomeTopDataInfo()
 					this.GetHomeFloorInfo()
@@ -130,7 +136,7 @@
                 })
             },
 			handleClick(data){
-				this.$api.navigateTo(`/pages/h5/activity/meobohui`)
+				this.$api.navigateTo('/pages/h5/activity/meobohui')
 				this.$store.commit('setActivity',data)
 			},
 			handleCancelClick(data){

+ 1 - 0
pages/goods/product.vue

@@ -1634,6 +1634,7 @@ page {
 		position: absolute;
 		right: 30rpx;
 		top: 0;
+		z-index: 999;
 	}
 	.cm-product-type{
 		width: 64rpx;

+ 1 - 1
pages/tabBar/home/index.vue

@@ -9,7 +9,7 @@
 			<!-- 金刚区菜单 -->
 			<navbars :list="navBarsList" v-if="isNavRequest"></navbars>
 			<!-- 轮播公告 -->
-			<notice :list="newsList" v-if="isNavRequest"></notice>
+			<notice :list="newsList" v-if="isNavRequest && newsList.length>0"></notice>
 			<!-- 优惠券入口 -->
 			<coupon v-if="isNavRequest && couponEntry == 1"></coupon>
 			<!-- 直播 -->

+ 1 - 17
pages/user/coupon/coupon-activity.vue

@@ -368,27 +368,11 @@ export default {
 				userId: this.listQuery.userId,
 				couponId: coupon.couponId,
 				couponRecordId:couponRecordId,
-				payWay:'WEIXIN',
+				payType:'XCX',
 				code: wechatcode,
 				source: 1 //支付来源 1 小程序 2 WWW
 			}
 			this.weChatMiniCouponWxPay(params,'Um_Event_meibohuiCouponPay','美博会优惠券活动页','线上支付优惠券',coupon.couponId,this.userId)
-				// .then(response => {
-				// 	// 友盟埋点收集微信支付
-				// 	if (process.env.NODE_ENV != 'development') {
-				// 		this.$uma.trackEvent('Um_Event_meibohuiCouponPay', {
-				// 			Um_Key_PageName: '美博会优惠券活动页',
-				// 			Um_Key_SourcePage: '线上支付优惠券',
-				// 			Um_Key_CouponId: `${coupon.couponId}`,
-				// 			Um_Key_userId: `${this.userId}`
-				// 		})
-				// 	}
-				// 	let PayInfo = JSON.parse(response.data.rt10_payInfo)
-				// 	this.WxRequestPayment(PayInfo)
-				// })
-				// .catch(error => {
-				// 	this.$util.msg(error.msg, 2000)
-				// })
 		},
 		hideMobel(){
 			this.modal = false

+ 1 - 1
pages/user/coupon/coupon-collection.vue

@@ -346,7 +346,7 @@ export default {
 				userId: this.listQuery.userId,
 				couponId: coupon.couponId,
 				couponRecordId:couponRecordId,
-				payWay:'WEIXIN',
+				payType:'XCX',
 				code: wechatcode,
 				source: 1 //支付来源 1 小程序 2 WWW
 			}

+ 5 - 1
pages/user/order/create-order.vue

@@ -607,7 +607,11 @@
 						this.$util.msg('订单提交成功',3000,true,'success')
 						setTimeout(()=>{
 							this.isSubLoading = false
-							this.$api.redirectTo(`/pages/user/order/order-payment?type=${this.submitState}&orderId=${data.orderId}`)
+							if(data.onlinePayFlag === 1){
+								this.$api.redirectTo(`/pages/user/order/order-payunder?orderId=${data.orderId}`)
+							}else{
+								this.$api.redirectTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
+							}
 						},3000)
 					}
 				}).catch(error =>{

+ 3 - 9
pages/user/order/order-details.vue

@@ -313,16 +313,10 @@ export default {
 							this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
 							break
 						default:
-							if (response.data.onlinePayFlag == 1) {
-								this.$api.navigateTo(
-									`/pages/user/order/order-payment?type=onlinePay&Amount=${
-										response.data.pendingPayments
-									}&orderId=${data.orderId}`
-								)
+							if (response.data.onlinePayFlag == 1) {// 只能线下
+								this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${data.orderId}`)
 							} else {
-								this.$api.navigateTo(
-									`/pages/user/order/order-payment?type=payfirm&orderId=${data.orderId}`
-								)
+								this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
 							}
 					}
 				})

+ 3 - 9
pages/user/order/order-list.vue

@@ -538,16 +538,10 @@ export default {
 							this.$util.modal('', '订单已申请全部退款,无需再付款!', '确定', '', false, () => {})
 							break
 						default:
-							if (response.data.onlinePayFlag == 1) {
-								this.$api.navigateTo(
-									`/pages/user/order/order-payment?type=onlinePay&Amount=${
-										response.data.pendingPayments
-									}&orderId=${data.orderId}`
-								)
+							if (response.data.onlinePayFlag == 1) {// 只能线下
+								this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${data.orderId}`)
 							} else {
-								this.$api.navigateTo(
-									`/pages/user/order/order-payment?type=payfirm&orderId=${data.orderId}`
-								)
+								this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${data.orderId}`)
 							}
 					}
 				})

+ 17 - 91
pages/user/order/order-pay-list.vue

@@ -9,11 +9,11 @@
 		<view class="pay-content">
 			<view class="pay-list" v-for="(list, index) in list" :key="index">
 				<view class="pay-list-title">{{ list.shopName }}</view>
-				<view class="pay-list-goods" v-for="(pros, prosIndex) in list.cartList" :key="prosIndex">
+				<view class="pay-list-goods" v-for="(pros, prosIndex) in list.orderProductList" :key="prosIndex">
 					<view class="pay-list-image"> <image :src="pros.image" class="image" mode=""></image> </view>
 					<view class="pay-list-info">
 						<view class="info-title">{{ pros.name }}</view>
-						<view class="info-view" v-if="pros.unit != ''"> 规格:{{ pros.unit ? pros.unit : '' }} </view>
+						<view class="info-view" v-if="pros.productUnit != ''"> 规格:{{ pros.productUnit ? pros.productUnit : '' }} </view>
 						<view class="info-view" v-if="pros.productCode != '' && pros.productCode != null">
 							商品编码:{{ pros.productCode ? pros.productCode : '' }}
 						</view>
@@ -24,17 +24,17 @@
 					</view>
 				</view>
 				<view class="pay-list-msg">
-					<view class="list-msg" v-if="list.paidAmount > 0"
-						>已付:<text class="text">¥{{ list.paidAmount | NumFormat }}</text></view
+					<view class="list-msg" v-if="list.receiptAmount > 0"
+						>已付:<text class="text">¥{{ list.receiptAmount | NumFormat }}</text></view
 					>
-					<view class="list-msg" v-if="list.coupon > 0"
-						>优惠:<text class="text">¥{{ list.coupon | NumFormat }}</text></view
+					<view class="list-msg" v-if="list.eachDiscount > 0"
+						>优惠:<text class="text">¥{{ list.eachDiscount | NumFormat }}</text></view
 					>
 				</view>
 				<view class="pay-list-btn">
-					<view class="btn" v-if="list.paystaut == 0">付款</view>
-					<view class="list-msg" v-if="list.payAmount > 0"
-						>待付:<text class="text red">¥{{ list.payAmount | NumFormat }}</text></view
+					<view class="btn" v-if="list.receiptStatus != 3" @click="handlePayOrder(list.shopOrderId)">付款</view>
+					<view class="list-msg" v-if="list.obligation > 0"
+						>待付:<text class="text red">¥{{ list.obligation | NumFormat }}</text></view
 					>
 				</view>
 			</view>
@@ -47,75 +47,7 @@ export default {
 	data() {
 		return {
 			orderId: 0,
-			list: [
-				{
-					shopName: '浙江瑞琪',
-					coupon: 20000,
-					paidAmount: 2000,
-					payAmount: 1000,
-					paystaut: 0,
-					cartList: [
-						{
-							name: '韩国恩盛进口氢洁气小气泡清韩国恩盛盛进口氢洁气小气泡清气小气泡清气小气泡清',
-							unit: '10ml/盒',
-							num: 1,
-							price: 500000,
-							productCode: 'SXSASDADA',
-							image: 'https://img.caimei365.com/group1/M00/00/16/rB-lF2JOpeWARn0MAAk4fk2riSg966.png'
-						},
-						{
-							name: '韩国恩盛进口氢洁气小气泡清韩国恩盛盛进口氢洁气小气泡清气小气泡清气小气泡清',
-							unit: '10ml/盒',
-							num: 1,
-							price: 500000,
-							productCode: 'SXSASDADA',
-							image: 'https://img.caimei365.com/group1/M00/00/16/rB-lF2JOpeWARn0MAAk4fk2riSg966.png'
-						}
-					]
-				},
-				{
-					shopName: '华熙生物',
-					coupon: 20000,
-					paidAmount: 2000,
-					payAmount: 1000,
-					paystaut: 0,
-					cartList: [
-						{
-							name: '韩国恩盛进口氢洁气小气泡清韩国恩盛盛进口氢洁气小气泡清气小气泡清气小气泡清',
-							unit: '10ml/盒',
-							num: 1,
-							price: 500000,
-							productCode: 'SXSASDADA',
-							image: 'https://img.caimei365.com/group1/M00/00/16/rB-lF2JOpeWARn0MAAk4fk2riSg966.png'
-						},
-						{
-							name: '韩国恩盛进口氢洁气小气泡清韩国恩盛盛进口氢洁气小气泡清气小气泡清气小气泡清',
-							unit: '10ml/盒',
-							num: 1,
-							price: 500000,
-							productCode: 'SXSASDADA',
-							image: 'https://img.caimei365.com/group1/M00/00/16/rB-lF2JOpeWARn0MAAk4fk2riSg966.png'
-						}
-					]
-				},
-				{
-					shopName: '采美快递物流商',
-					coupon: 0,
-					paidAmount: 0,
-					payAmount: 10,
-					paystaut: 1,
-					cartList: [
-						{
-							name: '运费',
-							unit: '',
-							num: 1,
-							price: 10,
-							image:
-								'https://www.caimei365.com/uploadFile/product/2020-04-16/DV8ZXHKHIA20200416112227.jpg'
-						}
-					]
-				}
-			]
+			list: []
 		}
 	},
 	onLoad(option) {
@@ -136,26 +68,20 @@ export default {
 			console.log(e)
 			this.orderId = e.orderId
 			this.payOrderId = '#' + e.orderId + '#'
-			this.PayOrderCheckoutCounter(this.orderId)
+			this.PayOrderShoporders(this.orderId)
 		},
-		PayOrderCheckoutCounter(orderId) {
-			this.PayService.PayOrderCheckoutCounter({ orderId: orderId })
+		PayOrderShoporders(orderId) {
+			this.PayService.PayOrderShoporders({ orderId: orderId })
 				.then(response => {
-					let data = response.data.order
-					this.payableAmount = data.payableAmount - data.receiptAmount //待付金额
-					this.receiptStatus = data.receiptStatus
-					this.onlinePayFlag = data.onlinePayFlag
-					//判断线上线下显示
-					if (this.optionType == 'onlinePay') {
-						this.onlinePay = 2
-					} else {
-						this.onlinePay = response.data.onlinePay
-					}
+					this.list = response.data
 				})
 				.catch(error => {
 					this.$util.msg(error.msg, 2000)
 				})
 		},
+		handlePayOrder(shopOrderId){
+			this.$api.navigateTo(`/pages/user/order/order-payment?shopOrderId=${shopOrderId}`)
+		},
 		handlePayunder(){
 			this.$api.navigateTo(`/pages/user/order/order-payunder?orderId=${this.orderId}`)
 		}

+ 26 - 112
pages/user/order/order-payhlb.vue

@@ -7,7 +7,7 @@
 					<view class="pay-top">
 						<view class="pay-paid">
 							<text class="txt-m">待付金额</text>
-							<text class="txt-b"><text class="small">¥</text>{{payableAmount | NumFormat}}</text>
+							<text class="txt-b"><text class="small">¥</text>{{obligation | NumFormat}}</text>
 						</view>
 						<view class="pay-payd">
 							<view class="pay-paids">
@@ -76,41 +76,6 @@
 				</view>
 			</view>
 		</view>
-		<!--大额转账弹窗  -->
-		<tui-modal :show="modal" :padding="'30rpx 30rpx'" @cancel="hideMobel(0)" :custom="true" fadeIn >
-			<view class="tui-modal-custom">
-				<view class="tui-prompt-title">大额银联转账信息</view>
-				<view class="tui-prompt-text">
-					<view class="tui-prompt-tips">请使用银行手机app或者网银输入以下信息进行转账。每次发起支付请求,收款账号都会变化,请使用最新的收款账号进行转账。</view>
-					<view class="tui-prompt-item">
-						<text class="text">户名:</text>
-						{{ bigPayInfo.receiveName }}
-						<view class="copy" @click.stop="copyClipboard(bigPayInfo.receiveName)"><text class="iconfont icon-fuzhi_o"></text></view>
-					</view>
-					<view class="tui-prompt-item">
-						<text class="text">收款账号:</text>
-						{{ bigPayInfo.receiveAccountNo }}
-						<view class="copy" @click.stop="copyClipboard(bigPayInfo.receiveAccountNo)"><text class="iconfont icon-fuzhi_o"></text></view>
-					</view>
-					<view class="tui-prompt-item">
-						<text class="text">银行:</text>
-						{{ bigPayInfo.accountName }}
-					</view>
-					<view class="tui-prompt-item">
-						<text class="text">收款方开户地:</text>
-						{{ bigPayInfo.areaInfo }}
-					</view>
-					<view class="tui-prompt-item">
-						<text class="text">收款网点:</text>
-						{{ bigPayInfo.accountName }}
-					</view>
-				</view>
-				<view class="tui-prompt-flex">
-					<view class="btn btn-confirm" @click="handleClick">已完成转账,请点击</view>
-					<view class="btn btn-cancel" @click="hideMobel">关闭</view>
-				</view>	
-			</view>
-		</tui-modal>	
 	</view>
 </template>
 
@@ -122,14 +87,15 @@
 		mixins: [wechatPay],
 		data(){
 			return{
-				orderId:'',
+				orderId:0,
+				shopOrderId:0,
 				payType:'',
 				payWay:'',
 				isRepuest:false,
-				payableAmount:0,
-				receiptAmount:0,
+				realPay:0,//应付金额
+				receiptAmount:0,// 已付金额
+				obligation:0,//待付金额
 				balanceAmount:0,
-				payTotalFee:0,
 				payAmount:0,
 				nvabarData: {		//顶部自定义导航
 					showCapsule:1, // 是否显示左上角图标  1表示显示  0表示不显示,
@@ -148,7 +114,6 @@
 				discernReceipt:[],
 				showDigitKeyboard:false,
 				payHttpUrl:'',
-				bigPayInfo:{},// 大额网银转账
 				mbOrderId:0, // 支付记录订单Id
 				modal:false,
 			}
@@ -182,7 +147,7 @@
 			initData(e){
 				this.payType = e.type
 				console.log(this.payType)
-				this.orderId = e.orderId
+				this.shopOrderId = e.shopOrderId
 				switch(this.payType){
 					case '0':
 						this.payWay = 'WEIXIN'
@@ -199,24 +164,19 @@
 						this.btnColor='#034582'
 						this.buttonText = '生成个人网银支付链接'
 						break
-					case '3':
-						this.payWay = 'UNIONPAY'
-						this.btnColor='#034582'
-						this.buttonText = '去转账'
-						break
 				}
 				this.GetPayOrderInfo()
 			},
 			GetPayOrderInfo(){//初始化支付信息
-				this.PayService.PayOrderCheckoutCounter({orderId:this.orderId}).then(response =>{
-					this.isRepuest = true
-					this.discernReceipt = response.data.discernReceipt 			// 支付记录
-					this.payTotalFee = response.data.order.payTotalFee  		// 订单总
-					this.receiptAmount = response.data.order.receiptAmount  	// 已付金额
-					this.payableAmount = (response.data.order.payableAmount*100 - this.receiptAmount*100)/100// 已付金额
+				this.PayService.PayOrderCheckoutShoporders({shopOrderId:this.shopOrderId}).then(response =>{
+					let data = response.data
+					this.discernReceipt = data.discernReceipt 	// 支付记录
+					this.obligation = data.shopOrder.obligation  	// 待付金
+					this.receiptAmount = data.shopOrder.receiptAmount  	// 已付金额
+					this.payableAmount = data.shopOrder.realPay // 应付金额
 					this.payAmount = this.toFixedFn(this.payableAmount)			// 自定义金额
-					console.log('this.payAmount',this.payAmount)
-					this.balanceAmount = this.payableAmount - this.payAmount	// 计算剩余支付金额
+					this.balanceAmount = this.obligation - this.payAmount	// 计算剩余支付金额
+					this.isRepuest = true
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
 				})
@@ -230,7 +190,7 @@
 								Um_Key_PageName: '微信支付',
 								Um_Key_SourcePage: '线上支付',
 								Um_Key_PayName:`${this.buttonText}`,
-								Um_Key_PayOrderID:`${this.orderId}`
+								Um_Key_PayOrderID:`${this.shopOrderId}`
 							})
 						}
 						this.MiniWxPayFor()
@@ -242,7 +202,7 @@
 								Um_Key_PageName: '企业网银',
 								Um_Key_SourcePage: '线上支付',
 								Um_Key_PayName:`${this.buttonText}`,
-								Um_Key_PayOrderID:`${this.orderId}`
+								Um_Key_PayOrderID:`${this.shopOrderId}`
 							})
 						}
 						this.BuildCatenate()
@@ -254,58 +214,12 @@
 								Um_Key_PageName: '个人网银',
 								Um_Key_SourcePage: '线上支付',
 								Um_Key_PayName:`${this.buttonText}`,
-								Um_Key_PayOrderID:`${this.orderId}`
+								Um_Key_PayOrderID:`${this.shopOrderId}`
 							})
 						}
 						this.BuildCatenate()
 						break
-					case '3':// 大额支付
-						// 友盟埋点收集大额支付
-						if(process.env.NODE_ENV != 'development'){
-							this.$uma.trackEvent('Um_Event_ConfirmBigbankPay', {
-								Um_Key_PageName: '大额支付',
-								Um_Key_SourcePage: '线上支付',
-								Um_Key_PayName:`${this.buttonText}`,
-								Um_Key_PayOrderID:`${this.orderId}`
-							})
-						}
-						this.LargePayment()
-						break
-				}
-			},
-			LargePayment(){// 大额银联
-				if(this.payAmount == 0){
-					this.$util.msg('请输入本次支付的金额',2000)
-					return
 				}
-				if(this.payAmount <=12){
-					this.$util.msg('网银支付的金额必须大于¥12.00',2000)
-					return
-				}
-				this.PayService.PayOrderTransferUnion({payAmount:this.accMul(this.payAmount,100),orderId:this.orderId}).then(response =>{
-					this.bigPayInfo = JSON.parse(response.data.data.payInfo)
-					this.mbOrderId = response.data.data.mbOrderId
-					this.modal = true
-					console.log('PayInfo',this.bigPayInfo)
-				})
-			},
-			handleClick(){// 查询是否支付成功
-				this.PayService.PayOrderFindOrderStatus({mbOrderId:this.mbOrderId}).then(response =>{
-					const data = response.data.data
-					const linkData =  {
-							  payAmount:this.payAmount,
-							  orderId:this.orderId,
-							  type:data.status === '1' ? 'success' : 'error'
-						}
-					if(data.status === '1'){
-						this.$api.navigateTo(`/pages/user/order/order-success?data=${JSON.stringify({ data: linkData })}`)
-					}else{
-						this.$api.navigateTo(`/pages/user/order/order-success-tips?data=${JSON.stringify({ data: linkData })}`)
-					}	
-				})
-			},
-			hideMobel(){
-				this.modal = false
 			},
 			BuildCatenate(){// 企业网银  个人网银
 				if(this.payAmount == 0){
@@ -316,7 +230,7 @@
 					this.$util.msg('网银支付的金额必须大于¥10.00',2000)
 					return
 				}
-				this.PayService.PayOrderPayLink({unpaidAmount:this.payAmount,orderId:this.orderId,payType:this.payType}).then(response =>{
+				this.PayService.PayOrderPayLink({unpaidAmount:this.payAmount,shopOrderId:this.shopOrderId,payType:this.payType}).then(response =>{
 					this.payHttpUrl = response.data
 					this.isShowTip = true
 				})
@@ -340,7 +254,7 @@
 						payAmount:this.payAmount,
 						payType:'XCX',
 						code:wechatCode,
-						orderId:this.orderId
+						shopOrderId:this.shopOrderId
 				}
 				this.weChatMiniOrderWxPay(params)
 			},
@@ -364,13 +278,13 @@
 				}
 				if(value == '' || value <0 ){
 					this.payAmount = ''
-					this.balanceAmount = this.payableAmount
-				}else if( value > this.payableAmount){
-					this.payAmount = this.toFixedFn(this.payableAmount)
-					this.balanceAmount = this.toFixedFn(this.payableAmount - this.payAmount)
+					this.balanceAmount = this.obligation
+				}else if( value > this.obligation){
+					this.payAmount = this.toFixedFn(this.obligation)
+					this.balanceAmount = this.toFixedFn(this.obligation - this.payAmount)
 				}else{
 					this.payAmount = this.toFixedFn(value)
-					this.balanceAmount = this.toFixedFn(this.payableAmount - this.payAmount)
+					this.balanceAmount = this.toFixedFn(this.obligation - this.payAmount)
 				}
 			},
 			hanldNavigateBack(){//页面返回
@@ -422,7 +336,7 @@
 								Um_Key_PageName: '网银支付',
 								Um_Key_SourcePage: '线上支付',
 								Um_Key_PayName:`${this.buttonText}`,
-								Um_Key_PayOrderID:`${this.orderId}`
+								Um_Key_PayOrderID:`${this.shopOrderId}`
 							})
 						}
 					} else {

+ 24 - 28
pages/user/order/order-payment.vue

@@ -95,7 +95,7 @@
 									<text class="iconfont icon-duigou"></text>
 								</view>
 							</view>
-							<view  class="pay-item" :class="{ 'current' : tabCurrentIndex === 3}"   @click="tabClick(3)" >
+<!-- 							<view  class="pay-item" :class="{ 'current' : tabCurrentIndex === 3}"   @click="tabClick(3)" >
 								<view class="item-l">
 									<view class="item-icon"><text class="iconfont icon-daewangyinzhuanzhang"></text></view>
 									<view class="item-text">
@@ -107,7 +107,7 @@
 									<text class="iconfont icon-duigou"></text>
 								</view>
 							</view>
-							
+ -->							
 						</view>
 					</view>
 				</view>
@@ -121,7 +121,6 @@
 						</view>
 						<view class="pay-text">
 							<view>1.{{payStatusText}}</view>
-							<view>2.大额支付请使用大额银联转账方式进行付款。</view>
 						</view>
 					</view>
 				</view>
@@ -135,7 +134,8 @@
 	export default{
 		data(){
 			return{
-				orderId:'',
+				orderId:0,
+				shopOrderId:0,
 				payableAmount:0,
 				emptyWrapperH: '',
 				bankNumber:'6217 6803 0362 0897',
@@ -151,14 +151,11 @@
 				isIphoneX:this.$store.state.isIphoneX,
 				CustomBar:this.CustomBar,// 顶部导航栏高度
 				tabCurrentIndex:0,
-				isReceiptStatus:false,
 				buttonText:'使用微信支付',
 				btnColor:'#09BB07',
-				receiptStatus:'',
 				onlinePay:1,
 				isPaySwitch:false,
 				optionType:'',
-				onlinePayFlag:'',
 				payBringTitle:'本次交易暂不支持线上支付,请使用线下转账方式付款',
 				payStatusText:'使用任何一种线上支付方式支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。',
 				pageType:''
@@ -193,23 +190,27 @@
 		methods:{
 			initData(e){
 				console.log(e)
-				this.orderId = e.orderId
-				this.payOrderId ='#'+e.orderId+'#'
-				this.optionType = e.type
+				this.shopOrderId = e.shopOrderId
+				this.payOrderId ='#'+e.shopOrderId+'#'
+				this.nvabarData.haveBack = true
+				this.nvabarData.haveHome = false
+				this.nvabarData.title = '选择支付方式'
+				this.PayOrderOnLineSwitch()
+				this.PayOrderCheckoutCounter(this.shopOrderId)
 				switch(e.type){
 					case 'confirm':
 						this.nvabarData.haveBack = false
 						this.nvabarData.haveHome = true
 						this.nvabarData.title = '支付'
 						this.PayOrderOnLineSwitch()
-						this.PayOrderCheckoutCounter(this.orderId)
+						this.PayOrderCheckoutCounter(this.shopOrderId)
 						break
 					case 'payfirm':
 						this.nvabarData.haveBack = true
 						this.nvabarData.haveHome = false
 						this.nvabarData.title = '选择支付方式'
 						this.PayOrderOnLineSwitch()
-						this.PayOrderCheckoutCounter(this.orderId)
+						this.PayOrderCheckoutCounter(this.shopOrderId)
 						break
 					case 'onlinePay':
 						this.onlinePay = 2
@@ -233,24 +234,20 @@
 					this.$util.msg(error.msg,2000)
 				})
 			},
-			PayOrderCheckoutCounter(orderId){
-				this.PayService.PayOrderCheckoutCounter({orderId:orderId}).then(response =>{
-					let data = response.data.order
-					this.payableAmount = data.payableAmount - data.receiptAmount  //待付金额
-					this.receiptStatus =  data.receiptStatus
-					this.onlinePayFlag = data.onlinePayFlag					
+			PayOrderCheckoutCounter(shopOrderId){
+				this.PayService.PayOrderCheckoutShoporders({shopOrderId:shopOrderId}).then(response =>{
+					let data = response.data.shopOrder
+					this.payableAmount = data.obligation  //待付金额
 					//判断线上线下显示
 					if(this.optionType == 'onlinePay'){
 						this.onlinePay = 2
 					}else{
-						this.onlinePay = response.data.onlinePay
+						this.onlinePay = data.onlinePay
 					}
-					if(data.receiptAmount>0){
+					if(data.obligation>0){
 						this.payStatusText = '使用任何一种线上支付方式支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。'
-						this.isReceiptStatus = false
 					}else{
 						this.payStatusText = '使用任何一种线上支付方式支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。'
-						this.isReceiptStatus = true
 					}
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
@@ -260,7 +257,6 @@
 				if(this.onlinePay == 2){
 					this.$util.modal('','本次交易暂不支持线上支付开票,请使用线下转账的方式付款','知道了','',false,() =>{})
 					this.payStatusText = '使用微信和网银支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。若着急发货,可以选择使用线下转账进行付款。'
-					this.isReceiptStatus = true
 				}else{
 					// 友盟埋点收集选择支付方式
 					if(process.env.NODE_ENV != 'development'){
@@ -268,21 +264,21 @@
 							Um_Key_PageName: '线上支付',
 							Um_Key_SourcePage: '选择支付',
 							Um_Key_PayName:`${this.buttonText}`,
-							Um_Key_PayOrderID:`${this.orderId}`
+							Um_Key_PayOrderID:`${this.shopOrderId}`
 						})
 					}
 					switch(this.tabCurrentIndex){
 						case 0:
-							this.$api.navigateTo(`/pages/user/order/order-payhlb?type=0&orderId=${this.orderId}`)
+							this.$api.navigateTo(`/pages/user/order/order-payhlb?type=0&shopOrderId=${this.shopOrderId}`)
 							break
 						case 1:
-							this.$api.navigateTo(`/pages/user/order/order-payhlb?type=1&orderId=${this.orderId}`)
+							this.$api.navigateTo(`/pages/user/order/order-payhlb?type=1&shopOrderId=${this.shopOrderId}`)
 							break
 						case 2:
-							this.$api.navigateTo(`/pages/user/order/order-payhlb?type=2&orderId=${this.orderId}`)
+							this.$api.navigateTo(`/pages/user/order/order-payhlb?type=2&shopOrderId=${this.shopOrderId}`)
 							break
 						case 3:
-							this.$api.navigateTo(`/pages/user/order/order-payhlb?type=3&orderId=${this.orderId}`)
+							this.$api.navigateTo(`/pages/user/order/order-payhlb?type=3&shopOrderId=${this.shopOrderId}`)
 							break
 					}
 				}

+ 18 - 0
services/pay.service.js

@@ -15,6 +15,15 @@ export default class PayService {
               
         })
     }
+    /* 根据主订单查询子订单信息 */
+    PayOrderShoporders (data = {}) {
+	    return this.AjaxService.get({ 
+	        url:'/order/pay/shoporders', 
+	        data, 
+	        isLoading: true ,
+	          
+	    })
+    }
     /* 小程序支付-初始化收银台 */
     PayOrderCheckoutCounter (data = {}) {
         return this.AjaxService.get({ 
@@ -24,6 +33,15 @@ export default class PayService {
               
         })
     }
+    /* 小程序支付-初始化子订单收银台 shopOrderId*/
+    PayOrderCheckoutShoporders (data = {}) {
+        return this.AjaxService.get({ 
+            url:'/order/pay/checkout/shoporders', 
+            data, 
+            isLoading: true ,
+              
+        })
+    }
     /**
 	 *小程序支付-米花微信支付
 	 *@param  amount支付金额,单位分,必须大于2