zhengjinyi 5 роки тому
батько
коміт
ba75f14e43

+ 1 - 1
common/config/config.js

@@ -2,7 +2,7 @@ let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
 	// URL_CONFIG = 'http://192.168.1.33:8008'	 //俊俊联调地址
-	// URL_CONFIG = 'http://192.168.1.22:8008'	 //裴裴联调地址
+	// URL_CONFIG = 'http://192.168.1.40:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.1.10:8008'	 //本地联调地址
     URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
 	// URL_CONFIG = 'https://spi.caimei365.com'

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

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

+ 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="btnStatus == 11 || btnStatus == 111"></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>
 			<!-- 退款记录 -->

+ 16 - 8
pages/user/order/order-payment.vue

@@ -99,6 +99,8 @@
 				buttonText:'使用微信支付',
 				btnColor:'#09BB07',
 				receiptStatus:'',
+				invoiceStatus:true,
+				onlinePayFlag:'',
 				payStatusText:'使用微信和企业网银支付全部金额后,供应商会在24小时后发货(周末、节假日顺延)。若着急发货,可以选择使用线下转账进行付款。'
 			}
 		},
@@ -148,7 +150,9 @@
 					let data = response.data.order
 					this.payableAmount = (data.payableAmount - data.receiptAmount).toFixed(2)  //待付金额
 					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{
@@ -160,13 +164,17 @@
 				})
 			},
 			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,() =>{})
+				}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切换

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

@@ -187,12 +187,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(){//勾选使用余额
@@ -202,12 +201,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
@@ -221,26 +220,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(){//提交订单

+ 1 - 1
services/ajax.env.js

@@ -2,7 +2,7 @@ let URL_CONFIG = ""
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
 	// URL_CONFIG = 'http://192.168.1.24:8008'	 //俊俊联调地址
-	// URL_CONFIG = 'http://192.168.1.22:8008'	 //裴裴联调地址
+	// URL_CONFIG = 'http://192.168.1.40:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.1.10:8008'	 //本地联调地址
     URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
 	// URL_CONFIG = 'https://spi.caimei365.com'