Преглед изворни кода

Merge branches 'developerB' and 'master' of git.caimei365.com:caimei-repository/caimei-applets-caimei into developerB

# Conflicts:
#	common/config/config.js
#	pages/user/order/order-pay.vue
#	pages/user/order/order-payment.vue
#	services/ajax.env.js
jun.li@caimei365.com пре 4 година
родитељ
комит
4ba14ca974

+ 1 - 1
components/cm-custom/cu-custom.vue

@@ -2,7 +2,7 @@
 	<!-- 自定义导航栏 -->
 	<view class='navbar-wrap' :style="{height:CustomBar+'px',paddingTop:StatusBar+'px',background:navbarData.bgColor ? navbarData.bgColor : '#FFFFFF'}"> 
 	  	<view class="navbar-text" 
-			  :style="{color:navbarData.textColor ? navbarData.textColor:'',lineHeight:(CustomBar - StatusBar)+'px;',fontSize:fontSizeSetting+'px;',paddingLeft:navbarData.textLeft ? '' : capsule.height+'px'}" :class="platformClass">
+			  :style="{color:navbarData.textColor ? navbarData.textColor:'',lineHeight:(CustomBar - StatusBar)+'px;',fontSize:fontSizeSetting+'px;',paddingLeft:navbarData.textLeft ? '' : (capsule.height+10)+'px'}" :class="platformClass">
 	    	  {{navbarData.title ? navbarData.title : " "}}
 	  	</view>
 	  	<view class="navbar-icon" v-if="navbarData.showCapsule == 1 ? true : false" 

+ 3 - 5
components/cm-module/modelAlert/supplierShareAlert.vue

@@ -6,7 +6,7 @@
 				<view class="text-content">
 					<view class="text-t">分享码</view>
 					<view class="text-c">{{shareCode}} <text class="clipboard" @click.stop="clipboard(shareCode)">复制</text></view>
-					<view class="text-h1">有效期为72小时。如果对方不是您公司的运营人员,需要输入该分享码才能查看本订单</view>
+					<view class="text-h1">有效期为72小时。如果对方还么有绑定采美账号,需要输入该分享码才能查看本订单</view>
 				</view>
 				<view class="text-btn">
 					<!-- #ifdef MP-WEIXIN -->
@@ -52,13 +52,11 @@
 			},
 			clipboard(data) {
 				thorui.getClipboardData(data, (res) => {
-					// #ifdef H5
 					if (res) {
-						this.$util.msg("复制成功",2000);
+						this.$util.msg("复制成功",2000,true,'success');
 					} else {
-						this.$util.msg("复制失败",2000);
+						this.$util.msg("复制失败",2000,true,'none');
 					}
-					// #endif
 				})
 			},
 			hideConfirm(){

+ 2 - 4
components/cm-module/orderDetails/logisticsRecord.vue

@@ -60,13 +60,11 @@
 			},
 			clipboard(data) {
 				thorui.getClipboardData(data, (res) => {
-					// #ifdef H5
 					if (res) {
-						this.$util.msg("复制成功",2000);
+						this.$util.msg("复制成功",2000,true,'success');
 					} else {
-						this.$util.msg("复制失败",2000);
+						this.$util.msg("复制失败",2000,true,'none');
 					}
-					// #endif
 				})
 			}
 		}

+ 2 - 4
components/cm-module/orderDetails/orderInformation.vue

@@ -118,13 +118,11 @@
 			},
 			clipboard(data) {
 				thorui.getClipboardData(data, (res) => {
-					// #ifdef H5
 					if (res) {
-						this.$util.msg("复制成功",2000);
+						this.$util.msg("复制成功",2000,true,'success');
 					} else {
-						this.$util.msg("复制失败",2000);
+						this.$util.msg("复制失败",2000,true,'none');
 					}
-					// #endif
 				})
 			},
 			toFiexdFn(n){

+ 35 - 10
components/cm-module/orderDetails/paymentRecord.vue

@@ -9,12 +9,13 @@
 				</view>
 			</view>
 			<view class="record-empty" v-if="isEmpty">
-			 	<text>无</text>
+			 	<text>支付记录</text>
 			</view>
 			<view class="record-list" v-else>
 				<view class="record-item" v-for="(item,index) in discernReceiptList" :key="index">
-					<view class="item-time">{{item.receiptDate}}</view>
-					<view class="item-nums">¥{{item.associateAmount.toFixed(2)}}</view>
+					<view class="item-time mm">¥{{item.associateAmount.toFixed(2)}}</view>
+					<view class="item-time pp">{{payTypeText(item.payType)}}</view>
+					<view class="item-time tt">{{item.receiptDate}}</view>
 				</view>
 			</view>
 		</view>
@@ -55,6 +56,22 @@
 					this.isEmpty = true
 				}
 			},
+			payTypeText (state){//处理支付记录文字
+				let stateText = '',
+					stateTextObject={
+						12:'企业网银',
+						13:'微信支付',
+						14:'支付宝',
+						15:'微信支付',
+						16:'余额抵扣',
+					}
+				Object.keys(stateTextObject).forEach(key => {
+					if(key == state){
+						stateText = stateTextObject[key]
+					}
+				})
+				return stateText;
+			},
 		}
 	}
 </script>
@@ -108,14 +125,22 @@
 					font-size: $font-size-28;
 					line-height: 40rpx;
 					float: left;
+					display: flex;
+					justify-content: center;
+					flex-direction: row;
 					.item-time{
-						float: left;
-						color: #999999;
-					}
-					.item-nums{
-						font-weight: bold;
-						float: right;
-						color: $text-color;
+						&.mm{
+							flex: 3;
+							color: $text-color;
+						}
+						&.pp{
+							flex: 3;
+							color: $text-color;
+						}
+						&.tt{
+							flex: 4;
+							color: #999999;
+						}
 					}
 				}
 			}

+ 1 - 1
components/cm-module/orderDetails/transfeRecord.vue

@@ -1,7 +1,7 @@
 <template name="transfe">
 	<view class="transfe-template">
 		 <!-- 转账信息 -->
-		 <view class="transfe-content">
+		 <view class="transfe-content" >
 			<view class="transfe-top" @click="showTransfe">
 				<text class="name">转账信息</text>
 				<text class="iconfont icon-web_xiangxiazhankai" :class="{'icon-web_xiangxiazhankai-active':isOpen}"></text>

+ 13 - 2
pages/login/apply.vue

@@ -47,7 +47,7 @@
 				</view>
 			</view>
 			<view class="register-row text-textarea clearfix">
-				<view class="textarea show" v-if="isShowInput">{{addressData.addressDetail ? addressData.addressDetail :'详细地址:如道路、门牌号、小区等'}}</view>
+				<view class="textarea show" v-if="isShowInput" @click="showTextareaFocus">{{addressData.addressDetail ? addressData.addressDetail :'详细地址:如道路、门牌号、小区等'}}</view>
 				<textarea 	v-else
 							class="textarea" 
 							type="text" 
@@ -56,6 +56,8 @@
 							placeholder-class="placeholder"
 							maxlength="25"
 							@input="onTextareaInput"
+							@focus="textareaFocus"
+							@blur="hideTextareaFocus"
 							:class="isShowInput ? '':''"
 				/>
 			</view>
@@ -237,7 +239,8 @@ import { mapMutations } from 'vuex';
 				abbreviation:'',	 	//机构简称
 				socialCreditCode:'',	//统一社会信用代码
 				isDisabled:true,
-				isShowInput:false,
+				isShowInput:true,
+				textareaFocus:false,
 				uploadBusinessImage:'',	//营业执照图片
 				uploadMentuzImage:'',  	//门头照图片
 				uploadMedicalImage:'', 	//资质照图片
@@ -447,6 +450,14 @@ import { mapMutations } from 'vuex';
 			onTextareaInput(e){
 			   this.addressData.addressDetail = e.detail.value;
 			},
+			showTextareaFocus(){//文本框获取焦点
+				this.isShowInput = false
+				this.textareaFocus = true
+			},
+			hideTextareaFocus(){//文本框失去焦点
+				this.isShowInput = true
+				this.textareaFocus = false
+			},
 			chooseBusinessImage() {//营业执照图片上传
 				uploadFileImage().then(res =>{
 					this.uploadBusinessImage = JSON.parse(res.data).data

+ 14 - 3
pages/login/information.vue

@@ -50,7 +50,7 @@
 				</view>
 			</view>
 			<view class="register-row text-textarea clearfix">
-				<view class="textarea show" v-if="isShowInput">{{addressData.addressDetail ? addressData.addressDetail :'详细地址:如道路、门牌号、小区等'}}</view>
+				<view class="textarea show" v-if="isShowInput" @click="showTextareaFocus">{{addressData.addressDetail ? addressData.addressDetail :'详细地址:如道路、门牌号、小区等'}}</view>
 				<textarea 	v-else
 							class="textarea" 
 							type="text" 
@@ -59,6 +59,8 @@
 							placeholder-class="placeholder"
 							maxlength="25"
 							@input="onTextareaInput"
+							@focus="textareaFocus"
+							@blur="hideTextareaFocus"
 							:class="isShowInput ? '':''"
 				/>
 			</view>
@@ -270,7 +272,8 @@
 				socialCreditCode:'',	//统一社会信用代码
 				isAgreed:1,				//是否勾选协议
 				isDisabled:true,
-				isShowInput:false,
+				isShowInput:true,
+				textareaFocus:false,
 				uploadBusinessImage:'',	//营业执照图片
 				uploadMentuzImage:'',  	//门头照图片
 				uploadMedicalImage:'', 	//资质照图片
@@ -462,9 +465,17 @@
 				this.addressData.cityID = e.cityCode;
 				this.addressData.provinceID = e.provinceCode;
 			},	
-			onTextareaInput(e){
+			onTextareaInput(e){//文本框获取焦点
 			   this.addressData.addressDetail = e.detail.value;
 			},
+			showTextareaFocus(){//文本框获取焦点
+				this.isShowInput = false
+				this.textareaFocus = true
+			},
+			hideTextareaFocus(){//文本框失去焦点
+				this.isShowInput = true
+				this.textareaFocus = false
+			},
 			onTextareaInputInfo(e){
 			   this.companyPprofile = e.detail.value;
 			},

+ 1 - 0
pages/search/search-order.vue

@@ -76,6 +76,7 @@
 							<order-button ref="orderButton" 
 										  :status="order.status" 
 										  :orderID="order.orderID" 
+										  :onlinePayFlag = "order.onlinePayFlag"
 										  @buttonConfirm="handButtonConfirm">
 							</order-button>
 						</view>

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

@@ -301,7 +301,6 @@
 			},
 			showTost(){
 				this.$util.msg("正在开发中,敬请期待~",2000)
-				// this.$api.navigateTo(`/supplier/pages/login/share-info?scene=scene`)
 				// this.$api.navigateTo(`/seller/pages/login/login`)
 				// uni.navigateToMiniProgram({
 				// 	appId: 'wx5a5cda32926f55ac',

+ 4 - 0
pages/user/order/create-order.vue

@@ -159,8 +159,10 @@
 					this.hanldFreight = response.data.freight
 					if(this.hanldFreePostFlag == 1){
 						this.payAllPrice = this.allPrice + response.data.freight
+						this.attributePallPrice()
 					}else{
 						this.payAllPrice = this.allPrice
+						this.attributePallPrice()
 					}
 				})
 			},
@@ -192,11 +194,13 @@
 						this.hanldFreight = this.freightData.freight
 						this.hanldFreePostFlag = data
 						this.payAllPrice =this.allPrice + this.hanldFreight
+						this.attributePallPrice()
 						break
 					case -1:
 						this.hanldFreight = 0
 						this.hanldFreePostFlag = data
 						this.payAllPrice = this.allPrice
+						this.attributePallPrice()
 						break
 				}
 			},

+ 2 - 4
pages/user/order/order-cashier.vue

@@ -135,13 +135,11 @@
 			},
 			clipboard(data) {
 				thorui.getClipboardData(data, (res) => {
-					// #ifdef H5
 					if (res) {
-						this.$util.msg("复制成功",2000);
+						this.$util.msg("复制成功",2000,true,'success');
 					} else {
-						this.$util.msg("复制失败",2000);
+						this.$util.msg("复制失败",2000,true,'none');
 					}
-					// #endif
 				})
 			},
 			onShareCode(){

+ 1 - 1
pages/user/order/order-details.vue

@@ -12,7 +12,7 @@
 			<!-- 发票信息 -->
 			<invoice-tent ref="invoice" v-if="isRequest" :orderInvoice="orderInvoice"></invoice-tent>
 			<!-- 转账信息 -->
-			<transfe-record ref="transfe" v-if="isRequest"></transfe-record>
+			<transfe-record ref="transfe" v-if="receiptAmount == 0 || onlinePayFlag == '1'"></transfe-record>
 			<!-- 支付记录 -->
 			<payment-record ref="payment" v-if="isRequest" :discernReceiptList="discernReceiptList" :receiptAmount="receiptAmount"></payment-record>
 			<!-- 退款记录 -->

+ 2 - 4
pages/user/order/order-logistics.vue

@@ -87,13 +87,11 @@
 			},
 			clipboard(data) {
 				thorui.getClipboardData(data, (res) => {
-					// #ifdef H5
 					if (res) {
-						this.$util.msg("复制成功",2000);
+						this.$util.msg("复制成功",2000,true,'success');
 					} else {
-						this.$util.msg("复制失败",2000);
+						this.$util.msg("复制失败",2000,true,'none');
 					}
-					// #endif
 				})
 			},
 			getData() {

+ 86 - 40
pages/user/order/order-pay.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="container cashier"  @touchmove.stop.prevent="discard" @tap="hideKeyboard" v-show="isRepuest">
+	<view class="container cashier"  v-show="isRepuest">
 		<cu-custom :navbar-data='nvabarData' @navigateBack="hanldNavigateBack"></cu-custom>
 		<view class="container-cash clearfix" :style="{marginTop:CustomBar+'px'}">
 			<view class="container-wrapper">
@@ -7,16 +7,16 @@
 					<view class="pay-top">
 						<view class="pay-paid">
 							<text class="txt-m">待付金额</text>
-							<text class="txt-b"><text class="small">¥</text>{{payableAmount.toFixed(2)}}</text>
+							<text class="txt-b"><text class="small">¥</text>{{payableAmount | NumFormat}}</text>
 						</view>
 						<view class="pay-payd">
 							<view class="pay-paids">
 								<text class="txt-m">应付总额</text>
-								<text class="txt-b">¥{{payTotalFee.toFixed(2)}}</text>
+								<text class="txt-b">¥{{payableAmount | NumFormat}}</text>
 							</view>
 							<view class="pay-paids">
 								<text class="txt-m">已支付金额</text>
-								<text class="txt-b">¥{{receiptAmount.toFixed(2)}}</text>
+								<text class="txt-b">¥{{receiptAmount | NumFormat}}</text>
 							</view>
 						</view>
 					</view>
@@ -30,23 +30,23 @@
 							</view> -->
 							<input  class="input"
 									type="digit"
-									v-model="payAmount" 
-									@focus="focusInput" 
-									@blur="blurInput" 
+									v-model="payAmount"
+									@focus="focusInput"
+									@blur="blurInput"
 									placeholder="输入金额不能大于待付金额"
 									placeholder-class="placeholder"/>
 						</view>
 						<view class="bot-resid">
-							<text>应付剩余¥{{balanceAmount.toFixed(2)}}</text>
+							<text>应付剩余¥{{balanceAmount|NumFormat}}</text>
 						</view>
 					</view>
 				</view>
-				<view class="pay-record">
+				<view class="pay-record" :style="{paddingBottom:isIphoneX ? '156rpx' : '112rpx'}">
 					<view class="record-title"><text>支付记录</text></view>
 					<view class="record-list">
 						<view class="list-main" v-if="discernReceipt.length>0">
 							<view class="list-item" v-for="(item,index) in discernReceipt" :key="index">
-								<text class="text row-1">¥{{item.receiptAmount}}</text>
+								<text class="text row-1">¥{{item.receiptAmount | NumFormat}}</text>
 								<text class="text row-2">{{payTypeText(item.payType)}}</text>
 								<text class="text row-3">{{item.receiptDate}}</text>
 							</view>
@@ -55,7 +55,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="pay-button">
+			<view class="pay-button" :style="{paddingBottom:isIphoneX ? '68rpx' : '24rpx'}">
 				<view class="btn" @click.stop="buttonSubMit" :style="{'background':btnColor}">{{buttonText}}</view>
 			</view>
 		</view>
@@ -64,7 +64,7 @@
 			<view class="freight-alert"  @tap="hideTips">
 				<view class="content">
 					<view class="title">
-						<text>生成链接</text>
+						<text>支付链接</text>
 						<text class="iconfont icon-iconfontguanbi" @click.stop="hideTips"></text>
 					</view>
 					<view class="text-content">
@@ -77,10 +77,10 @@
 			</view>
 		</view>
 		<!-- 数字键盘 -->
-<!-- 	<keyboard v-if="showDigitKeyboard"  
-				  @confirmEvent="confirmEvent" 
-				  :money.sync="payAmount" 
-				  btn-color='linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%)' 
+<!-- 	<keyboard v-if="showDigitKeyboard"
+				  @confirmEvent="confirmEvent"
+				  :money.sync="payAmount"
+				  btn-color='linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%)'
 				  title="完成">
 		</keyboard> -->
 	</view>
@@ -98,6 +98,7 @@
 			return{
 				orderID:'',
 				payType:'',
+				payWay:'',
 				isRepuest:false,
 				payableAmount:0,
 				receiptAmount:0,
@@ -126,6 +127,28 @@
 		onLoad(option) {
 			this.initData(option)
 		},
+		filters: {
+			NumFormat(value) {
+				if(!value) return '0.00';
+				/*原来用的是Number(value).toFixed(0),这样取整时有问题,例如0.51取整之后为1,感谢Nils指正*/
+				/*后来改成了 Number(value)|0,但是输入超过十一位就为负数了,具体见评论 */
+				var intPart = Number(value) - Number(value)%1; //获取整数部分(这里是windy93的方法)
+				var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,'); //将整数部分逢三一断
+				var floatPart = ".00"; //预定义小数部分
+				var value2Array = value.toString().split(".");
+				//=2表示数据有小数位
+				if(value2Array.length == 2) {
+					floatPart = value2Array[1].toString(); //拿到小数部分
+					if(floatPart.length == 1) { //补0,实际上用不着
+						return intPartFormat + "." + floatPart + '0';
+					} else {
+						return intPartFormat + "." + floatPart;
+					}
+				} else {
+					return intPartFormat + floatPart;
+				}
+			}
+		},
 		methods:{
 			initData(e){
 				this.payType = e.type
@@ -133,10 +156,12 @@
 				this.orderID = e.orderID
 				switch(this.payType){
 					case '0':
+						this.payWay = 'WEIXIN'
 						this.btnColor="#09BB07"
 						this.buttonText = '去支付'
 						break;
 					case '1':
+						this.payWay = 'UNIONPAY'
 						this.btnColor="#034582"
 						this.buttonText = '生成支付链接'
 						break;
@@ -147,10 +172,10 @@
 				this.PayService.PayOrderCheckoutCounter({orderId:this.orderID}).then(response =>{
 					this.isRepuest = true
 					this.discernReceipt = response.data.discernReceipt 		//支付记录
-					this.payTotalFee = response.data.order.payTotalFee  //已付金
+					this.payTotalFee = response.data.order.payTotalFee  //订单总
 					this.receiptAmount = response.data.order.receiptAmount  //已付金额
-					this.payableAmount = response.data.order.payableAmount - this.receiptAmount  //待付金额
-					this.payAmount = this.payableAmount.toFixed(2)	//自定义金额
+					this.payableAmount = response.data.order.payableAmount - this.receiptAmount//已付金额
+					this.payAmount = this.toFixedFn(this.payableAmount)	//自定义金额
 					this.balanceAmount = this.payableAmount - this.payAmount// 计算剩余支付金额
 				}).catch(error =>{
 					this.$util.msg(error.msg,2000)
@@ -167,6 +192,10 @@
 				}
 			},
 			BuildCatenate(){
+				if(this.payAmount == 0){
+					this.$util.msg("请输入本次支付的金额",2000)
+					return
+				}
 				if(this.payAmount <=10){
 					this.$util.msg("企业网银支付的金额必须大于¥10.00",2000)
 					return
@@ -177,8 +206,11 @@
 				})
 			},
 			MiniWxPayFor(){
-				let self = this
 				authorize.getCode('weixin').then(wechatcode =>{
+					if(this.payAmount > 50000){
+						this.$util.modal('','本次支付金额已超出微信支付限额,请输入小于5万的金额进行支付','知道了','',false,() =>{})
+						return
+					}
 					if(this.payAmount == 0){
 						this.$util.msg("请输入本次支付的金额",2000)
 						return
@@ -202,6 +234,7 @@
 				})
 			},
 			WxRequestPayment(data){
+				let self = this
 				wx.requestPayment({
 					'timeStamp': data.timeStamp,
 					'nonceStr': data.nonceStr,
@@ -212,10 +245,10 @@
 						wx.reLaunch({url: '/pages/tabBar/user/user'});
 					},
 					'fail':function(res){
-						self.$util.msg('订单支付已取消')
+						self.$util.msg('用户取消支付~')
 					},
 					'complete':function(res){
-						
+
 					}
 				})
 			},
@@ -233,15 +266,19 @@
 				this.showDigitKeyboard = false
 			},
 			chechValue(value){
-				if(value == 0){
-					this.payAmount = this.payableAmount.toFixed(2)
-					this.balanceAmount = this.payableAmount-this.payAmount
-				}else if(parseInt(value)>this.payableAmount){
-					this.payAmount = this.payableAmount.toFixed(2)
-					this.balanceAmount = this.payableAmount - this.payAmount
+				let patern = /\d+\.\d+/g;
+				if(value && value.split('.').length > 2) {
+					value= patern.exec(value);
+				}
+				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)
 				}else{
-					this.payAmount =Number(value).toFixed(2)
-					this.balanceAmount = this.payableAmount - this.payAmount
+					this.payAmount = this.toFixedFn(value)
+					this.balanceAmount = this.toFixedFn(this.payableAmount - this.payAmount)
 				}
 			},
 			hanldNavigateBack(){//页面返回
@@ -252,9 +289,9 @@
 			payTypeText (state){//处理支付记录文字
 				let stateText = '',
 					stateTextObject={
-						12:'网银支付',
+						12:'企业网银',
 						13:'微信支付',
-						14:'支付宝支付',
+						14:'支付宝',
 						15:'微信支付',
 						16:'余额抵扣',
 					}
@@ -268,15 +305,20 @@
 			hideTips(){//隐藏弹窗
 				this.isShowTip = false
 			},
+			toFixedFn(text){//处理小数点后两位数
+				return Number(text).toFixed(2);
+			},
 			clipboard(data) {//复制链接
 				thorui.getClipboardData(data, (res) => {
-					// #ifdef H5
 					if (res) {
-						this.$util.msg("复制成功",2000);
+						this.isShowTip = false;
+						this.$util.msg("复制成功",2000,true,'success');
+						setTimeout(()=>{
+							this.$api.navigateTo(`/pages/user/order/order-details?state=0&orderID=${this.orderID}`)
+						},2000)
 					} else {
-						this.$util.msg("复制失败",2000);
+						this.$util.msg("复制失败",2000,true,'none');
 					}
-					// #endif
 				})
 			},
 			discard(){
@@ -284,7 +326,7 @@
 			}
 		},
 		onShow() {
-			
+
 		}
 	}
 </script>
@@ -300,7 +342,7 @@
 				width: 662rpx;
 				height: 420rpx;
 				padding: 64rpx 44rpx 0 44rpx;
-				background: url(https://admin-b.caimei365.com/userfiles/1/images/photo/2020/07/icon-kdnakdj.png) no-repeat;
+				background: url(https://img.caimei365.com/group1/M00/03/BD/Cmis218elN6AY6VeAAqw4n3n4nw186.png) no-repeat;
 				background-size: cover;
 				float: left;
 				position: relative;
@@ -461,6 +503,7 @@
 								&.row-3{
 									flex: 4;
 									text-align: right;
+									color: #999999;
 								}
 							}
 						}
@@ -470,8 +513,11 @@
 		}
 		.pay-button{
 			width: 100%;
+			background-color: #FFFFFF;
 			position: fixed;
-			bottom: 80rpx;
+			height: 88rpx;
+			padding-top: 24rpx;
+			bottom: 0;
 			.btn{
 				width: 702rpx;
 				height: 88rpx;
@@ -495,7 +541,7 @@
 		z-index: 8888;
 		transition: all 0.4s;
 		&.none{
-			display: none;			
+			display: none;
 		}
 		&.show{
 			display: block;

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

@@ -8,7 +8,7 @@
 					<view class="pay-p"><text>待付金额</text></view>
 					<view class="pay-money">
 						<text class="pay-sm">¥</text>
-						<text class="pay-bg">{{payableAmount.toFixed(2)}}</text>
+						<text class="pay-bg">{{payableAmount | NumFormat}}</text>
 					</view>
 				</view>
 				<view class="pay-check">
@@ -51,7 +51,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="pay-bring clearfix" :style="{bottom:isIphoneX ? '68rpx' : '24rpx'}" @click.stop="showTips" v-if="isReceiptStatus">
+			<view class="pay-bring clearfix" :style="{paddingBottom:isIphoneX ? '68rpx' : '24rpx'}" @click.stop="showTips" v-if="isReceiptStatus">
 				<view class="pay-bring-line"><text class="line"></text></view>
 				<view class="pay-bring-content" v-if="!isShowTip">
 					<view class="text bg-color">查看转账信息</view>
@@ -81,12 +81,13 @@
 				payableAmount:0,
 				emptyWrapperH: '',
 				bankNumber:'6217 6803 0362 0897',
-				payOrderId:'#10226#',
+				payOrderId:'',
 				nvabarData: {		//顶部自定义导航
 					showCapsule:1, // 是否显示左上角图标  1表示显示  0表示不显示,
 					showSearch: 0,
 					title: '选择支付方式',  // 导航栏 中间的标题
 					haveBack:false,
+					haveHome:true,
 					textLeft:this.$store.state.isIphone
 				},
 				isIphoneX:this.$store.state.isIphoneX,
@@ -98,31 +99,60 @@
 				buttonText:'使用微信支付',
 				btnColor:'#09BB07',
 				receiptStatus:'',
+				invoiceStatus:false,
+				onlinePayFlag:'',
 				payStatusText:'使用微信和企业网银支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。若着急发货,可以选择使用线下转账进行付款。'
 			}
 		},
 		onLoad(option) {
 			this.initData(option)
 		},
+		filters: {
+			NumFormat(value) {
+				if(!value) return '0.00';
+				/*原来用的是Number(value).toFixed(0),这样取整时有问题,例如0.51取整之后为1,感谢Nils指正*/
+				/*后来改成了 Number(value)|0,但是输入超过十一位就为负数了,具体见评论 */
+				var intPart = Number(value) - Number(value)%1; //获取整数部分(这里是windy93的方法)
+				var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,'); //将整数部分逢三一断
+				var floatPart = ".00"; //预定义小数部分
+				var value2Array = value.toString().split(".");
+				//=2表示数据有小数位
+				if(value2Array.length == 2) {
+					floatPart = value2Array[1].toString(); //拿到小数部分
+
+					if(floatPart.length == 1) { //补0,实际上用不着
+						return intPartFormat + "." + floatPart + '0';
+					} else {
+						return intPartFormat + "." + floatPart;
+					}
+				} else {
+					return intPartFormat + floatPart;
+				}
+			}
+		},
 		methods:{
 			initData(e){
-				console.log(this.orderID)
 				switch(e.type){
 					case 'confirm':
 						this.isConfirm = true
 						this.nvabarData.haveBack = false
+						this.nvabarData.haveHome = true
 						break;
 					case 'payfirm':
 						this.isConfirm = false
 						this.nvabarData.haveBack = true
+						this.nvabarData.haveHome = false
 						break;
 				}
 				this.orderID = e.orderID
+				this.payOrderId ='#'+e.orderID+'#';
 				this.PayService.PayOrderCheckoutCounter({orderId:this.orderID}).then(response =>{
 					let data = response.data.order
 					this.payableAmount = data.payableAmount - data.receiptAmount  //待付金额
 					this.receiptStatus =  data.receiptStatus
-					if(this.receiptStatus =='2'){
+					this.invoiceStatus = data.invoiceStatus
+					this.onlinePayFlag = data.onlinePayFlag
+					if(data.receiptAmount>0){
 						this.payStatusText = '使用微信和企业网银支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。'
 						this.isReceiptStatus = false
 					}else{
@@ -134,13 +164,19 @@
 				})
 			},
 			goOrderCash(){
-				switch(this.tabCurrentIndex){
-					case 0:
-						this.$api.navigateTo(`/pages/user/order/order-pay?type=0&orderID=${this.orderID}`)
-						break;
-					case 1:
-						this.$api.navigateTo(`/pages/user/order/order-pay?type=1&orderID=${this.orderID}`)
-						break;
+				if(this.invoiceStatus){
+					this.$util.modal('','本次交易暂不支持线上支付开票,请使用线下转账的方式付款','知道了','',false,() =>{})
+					this.payStatusText = '使用微信和企业网银支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。若着急发货,可以选择使用线下转账进行付款。'
+					this.isReceiptStatus = true
+				}else{
+					switch(this.tabCurrentIndex){
+						case 0:
+							this.$api.navigateTo(`/pages/user/order/order-pay?type=0&orderID=${this.orderID}`)
+							break;
+						case 1:
+							this.$api.navigateTo(`/pages/user/order/order-pay?type=1&orderID=${this.orderID}`)
+							break;
+					}
 				}
 			},
 			tabClick(index) {//tab切换
@@ -166,18 +202,16 @@
 			},
 			clipboard(data) {
 				thorui.getClipboardData(data, (res) => {
-					// #ifdef H5
 					if (res) {
-						this.$util.msg("复制成功",2000);
+						this.$util.msg("复制成功",2000,true,'success');
 					} else {
-						this.$util.msg("复制失败",2000);
+						this.$util.msg("复制失败",2000,true,'none');
 					}
-					// #endif
 				})
 			},
 		},
 		onShow() {
-			
+
 		}
 	}
 </script>
@@ -205,7 +239,7 @@
 				width: 574rpx;
 				height: 136rpx;
 				padding: 52rpx 44rpx;
-				background: url(https://admin-b.caimei365.com/userfiles/1/images/photo/2020/07/icon-monen.png) no-repeat;
+				background: url(https://img.caimei365.com/group1/M00/03/BD/Cmis218ekFyAHoAzAALhR3oBpDI049.png) no-repeat;
 				background-size: cover;
 				float: left;
 				margin-top: 40rpx;
@@ -371,15 +405,15 @@
 			}
 		}
 		.pay-bring{
-			width: 702rpx;
+			width: 100%;
 			min-height: 190rpx;
 			padding: 24rpx 0;
 			background-color: #FFFFFF;
 			box-shadow:0px 3px 6px rgba(0,0,0,0.16);
 			position: fixed;
-			bottom: 24rpx;
-			left: 24rpx;
-			border-radius: 14rpx;
+			bottom: 0;
+			left: 0;
+			border-radius: 30rpx 30rpx 0 0;
 			display: flex;
 			align-items: center;
 			flex-direction: column;
@@ -399,7 +433,7 @@
 				padding: 0 24rpx;
 				.text{
 					font-size: $font-size-24;
-					color: #999;
+					color: #666;
 					line-height: 44rpx;
 					text-align: center;
 					&.bg-color{
@@ -446,7 +480,7 @@
 		z-index: 8888;
 		transition: all 0.4s;
 		&.none{
-			display: none;			
+			display: none;
 		}
 		&.show{
 			display: block;

+ 2 - 0
pages/user/order/orderShareLogin.vue

@@ -50,9 +50,11 @@
 							serviceProviderId:this.serviceProviderId
 						}
 					orderShareCode(params).then(response =>{
+						console.log(response.code)
 						if(response.code === 2){
 							this.$api.navigateTo(`/seller/pages/order/order-details?type=share&orderID=${this.orderID}`)
 						}else if(response.code === 0) {
+							console.log(response.data)
 							if(response.data == true){//同为会所运营人员查看订单详情
 								this.$api.navigateTo(`/pages/user/order/order-details?type=share&orderID=${this.orderID}`)
 							}else{//游客第二次查看订单详情

+ 13 - 2
seller/pages/login/apply.vue

@@ -112,7 +112,7 @@
 				</view>
 			</view>
 			<view class="register-row text-textarea clearfix">
-				<view class="textarea show" v-if="isShowInput">{{addressData.addressDetail ? addressData.addressDetail :'详细地址:如道路、门牌号、小区等'}}</view>
+				<view class="textarea show" v-if="isShowInput" @click="showTextareaFocus">{{addressData.addressDetail ? addressData.addressDetail :'详细地址:如道路、门牌号、小区等'}}</view>
 				<textarea 	v-else
 							class="textarea" 
 							type="text" 
@@ -121,6 +121,8 @@
 							placeholder-class="placeholder"
 							maxlength="25"
 							@input="onTextareaInput"
+							@focus="textareaFocus"
+							@blur="hideTextareaFocus"
 							:class="isShowInput ? '':''"
 				/>
 			</view>
@@ -298,7 +300,8 @@ import { mapMutations } from 'vuex';
 				abbreviation:'',	 	//机构简称
 				socialCreditCode:'',	//统一社会信用代码
 				isDisabled:true,
-				isShowInput:false,
+				isShowInput:true,
+				textareaFocus:false,
 				isUpgrade:false,
 				isShowUpgrade:false,
 				isDownUpgrade:true,
@@ -553,6 +556,14 @@ import { mapMutations } from 'vuex';
 			onTextareaInput(e){
 			   this.addressData.addressDetail = e.detail.value;
 			},
+			showTextareaFocus(){//文本框获取焦点
+				this.isShowInput = false
+				this.textareaFocus = true
+			},
+			hideTextareaFocus(){//文本框失去焦点
+				this.isShowInput = true
+				this.textareaFocus = false
+			},
 			chooseBusinessImage() {//营业执照图片上传
 				uploadFileImage().then(res =>{
 					this.uploadBusinessImage = JSON.parse(res.data).data

+ 14 - 3
seller/pages/login/information.vue

@@ -92,7 +92,7 @@
 				</view>
 			</view>
 			<view class="register-row text-textarea clearfix">
-				<view class="textarea show" v-if="isShowInput">{{addressData.addressDetail ? addressData.addressDetail :'详细地址:如道路、门牌号、小区等'}}</view>
+				<view class="textarea show" v-if="isShowInput" @click="showTextareaFocus">{{addressData.addressDetail ? addressData.addressDetail :'详细地址:如道路、门牌号、小区等'}}</view>
 				<textarea 	v-else
 							class="textarea" 
 							type="text" 
@@ -101,6 +101,8 @@
 							placeholder-class="placeholder"
 							maxlength="35"
 							@input="onTextareaInput"
+							@focus="textareaFocus"
+							@blur="hideTextareaFocus"
 							:class="isShowInput ? '':''"
 				/>
 			</view>
@@ -277,7 +279,8 @@
 				socialCreditCode:'',	//统一社会信用代码
 				isAgreed:1,				//是否勾选协议
 				isDisabled:true,
-				isShowInput:false,
+				isShowInput:true,
+				textareaFocus:false,
 				isCheck:true,			//是否勾选协议
 				uploadBusinessImage:'',	//营业执照图片
 				uploadMentuzImage:'',  	//门头照图片
@@ -462,6 +465,14 @@
 			onTextareaInput(e){
 			   this.addressData.addressDetail = e.detail.value;
 			},
+			showTextareaFocus(){//文本框获取焦点
+				this.isShowInput = false
+				this.textareaFocus = true
+			},
+			hideTextareaFocus(){//文本框失去焦点
+				this.isShowInput = true
+				this.textareaFocus = false
+			},
 			onTextareaInputInfo(e){
 			   this.companyPprofile = e.detail.value;
 			},
@@ -982,7 +993,7 @@
 				position: fixed;
 				bottom: 0;
 				left: 0;
-				z-index: 99;
+				z-index: 9999;
 				background: #FFFFFF;
 				.register-agree{
 					display: flex;

+ 14 - 3
seller/pages/login/register.vue

@@ -29,7 +29,7 @@
 					<text>展开信息填写<text class="iconfont icon-xiangxiajiantou"></text></text>
 				</view>
 			</view>	
-			<view class="register-fiexd clearfix" :style="{bottom:isIphoneX?'40rpx':''}">
+			<view class="register-fiexd clearfix" :style="{paddingBottom:isIphoneX ? '68rpx':''}">
 				<view class="register-bet" @tap.stop="hideUpgrade()" v-if="isUpgrade">
 					<text>收起<text class="iconfont icon-xiangshangjiantou"></text></text>
 				</view>
@@ -79,7 +79,7 @@
 				</view>
 			</view>
 			<view class="register-row text-textarea clearfix">
-				<view class="textarea show" v-if="isShowInput">{{addressData.addressDetail ? addressData.addressDetail :'详细地址:如道路、门牌号、小区等'}}</view>
+				<view class="textarea show" v-if="isShowInput" @click="showTextareaFocus">{{addressData.addressDetail ? addressData.addressDetail :'详细地址:如道路、门牌号、小区等'}}</view>
 				<textarea 	v-else
 							class="textarea" 
 							type="text" 
@@ -88,6 +88,8 @@
 							placeholder-class="placeholder"
 							maxlength="35"
 							@input="onTextareaInput"
+							@focus="textareaFocus"
+							@blur="hideTextareaFocus"
 							:class="isShowInput ? '':''"
 				/>
 			</view>
@@ -265,7 +267,8 @@
 				socialCreditCode:'',	//统一社会信用代码
 				isAgreed:0,				//是否勾选协议
 				isDisabled:true,
-				isShowInput:false,
+				isShowInput:true,
+				textareaFocus:false,
 				isUpgrade:false,
 				isDownUpgrade:true,
 				isCheck:false,			//是否勾选协议
@@ -444,6 +447,14 @@
 			onTextareaInput(e){//地址详细信息
 			   this.addressData.addressDetail = e.detail.value;
 			},
+			showTextareaFocus(){//文本框获取焦点
+				this.isShowInput = false
+				this.textareaFocus = true
+			},
+			hideTextareaFocus(){//文本框失去焦点
+				this.isShowInput = true
+				this.textareaFocus = false
+			},
 			onTextareaInputInfo(e){//公司简介
 			   this.companyPprofile = e.detail.value;
 			},

+ 30 - 18
seller/pages/order/create-order.vue

@@ -206,12 +206,11 @@
 				if(data.freePostFlag == '1'){
 					this.freightData = data
 					this.payAllPrice = this.allPrice+parseInt(data.freight)
-					if(this.balanceDeductionFlag ==1){
-						this.attributeHashfreight(this.freightData.freight)
-					}
+					this.attributePallPrice()
 				}else{
 					this.freightData = data
 					this.payAllPrice = this.allPrice
+					this.attributePallPrice()
 				}
 			},
 			checkedBalabce(){//勾选使用余额
@@ -221,12 +220,12 @@
 						this.balanceDeductionFlag =1
 						this.attributePallPrice()
 					}else{
+						this.balanceDeductionFlag = 2
 						if(this.freightData.freePostFlag == 1 || this.freightData.freePostFlag == '1'){
 							this.payAllPrice = this.allPrice+parseInt(this.freightData.freight)
 						}else{
 							this.payAllPrice = this.allPrice
 						}
-						this.balanceDeductionFlag = 2
 					}
 				}else{
 					return
@@ -240,26 +239,39 @@
 				}
 			},
 			attributeNofreight(){//计算没有邮费的支付价格
-				if(this.userMoney>this.payAllPrice){
-					this.payAllPrice = 0.00
-					this.deductMoney = this.allPrice							//勾选后使用抵余额
-					this.surplusMoney = this.userMoney - this.deductMoney	    //勾选后的剩余抵扣
+				console.log(this.ischecked)
+				if(this.ischecked){
+					if(this.userMoney>this.payAllPrice){
+						this.payAllPrice = 0.00
+						this.deductMoney = this.allPrice							//勾选后使用抵余额
+						this.surplusMoney = this.userMoney - this.deductMoney	    //勾选后的剩余抵扣
+					}else{
+						this.payAllPrice = this.allPrice - this.userMoney       	//勾选后的总价
+						this.deductMoney = this.userMoney				            //勾选后使用抵余额
+						this.surplusMoney = this.userMoney - this.deductMoney	    //勾选后的剩余抵扣
+					}
 				}else{
-					this.payAllPrice = this.allPrice - this.userMoney       	//勾选后的总价
-					this.deductMoney = this.userMoney				            //勾选后使用抵余额
-					this.surplusMoney = this.userMoney - this.deductMoney	    //勾选后的剩余抵扣
+					this.payAllPrice = this.allPrice;
+					this.deductMoney = 0.00;
+					this.surplusMoney = this.userMoney;
 				}
 			},
 			attributeHashfreight(freight){//计算需要邮费的支付价格
 				this.payAllPrice = this.allPrice+parseInt(freight)//计算不包邮的价格 总价等于商品价格+邮费
-				if(this.userMoney>this.payAllPrice){							//余额大于支付金额
-					this.payAllPrice =0.00
-					this.deductMoney = this.allPrice+parseInt(freight)			//勾选后使用抵余额
-					this.surplusMoney = this.userMoney - this.deductMoney	    //勾选后的剩余抵扣
+				if(this.ischecked){
+					if(this.userMoney>this.payAllPrice){							//余额大于支付金额
+						this.payAllPrice =0.00
+						this.deductMoney = this.allPrice+parseInt(freight)			//勾选后使用抵余额
+						this.surplusMoney = this.userMoney - this.deductMoney	    //勾选后的剩余抵扣
+					}else{
+						this.payAllPrice = this.allPrice+parseInt(freight) - this.userMoney       	//勾选后的总价
+						this.deductMoney = this.userMoney				            //勾选后使用抵余额
+						this.surplusMoney = this.userMoney - this.deductMoney	    //勾选后的剩余抵扣
+					}
 				}else{
-					this.payAllPrice = this.allPrice+parseInt(freight) - this.userMoney       	//勾选后的总价
-					this.deductMoney = this.userMoney				            //勾选后使用抵余额
-					this.surplusMoney = this.userMoney - this.deductMoney	    //勾选后的剩余抵扣
+					this.payAllPrice = this.allPrice+parseInt(freight)
+					this.deductMoney = 0.00
+					this.surplusMoney = this.userMoney
 				}
 			},
 			orderSubmitMit(){//提交订单