Browse Source

修改订单模块问题

zhengjinyi 3 years ago
parent
commit
e50b02de3a

+ 5 - 5
components/cm-module/orderDetails/paymentRecord.vue

@@ -24,7 +24,7 @@
 
 <script>
 	export default{
-		name:"record",
+		name:'record',
 		props:{
 			discernReceiptList:{
 				type:Array
@@ -51,7 +51,7 @@
 			initData(res) {
 				if(res!=''){
 					this.isEmpty = false
-					this.paymentData = res;
+					this.paymentData = res
 				}else{
 					this.isEmpty = true
 				}
@@ -70,7 +70,7 @@
 						stateText = stateTextObject[key]
 					}
 				})
-				return stateText;
+				return stateText
 			},
 		}
 	}
@@ -134,11 +134,11 @@
 							color: $text-color;
 						}
 						&.pp{
-							flex: 3;
+							flex: 2;
 							color: $text-color;
 						}
 						&.tt{
-							flex: 4;
+							flex: 5;
 							color: #999999;
 						}
 					}

+ 33 - 33
pages/user/order/order-payment.vue

@@ -134,7 +134,7 @@
 </template>
 
 <script>
-	const thorui = require("@/components/clipboard/clipboard.thorui.js")
+	const thorui = require('@/components/clipboard/clipboard.thorui.js')
 	export default{
 		data(){
 			return{
@@ -142,7 +142,7 @@
 				payableAmount:0,
 				emptyWrapperH: '',
 				bankNumber:'6217 6803 0362 0897',
-				payorderId:'',
+				payOrderId:'',
 				nvabarData: {		//顶部自定义导航
 					showCapsule:1, // 是否显示左上角图标  1表示显示  0表示不显示,
 					showSearch: 0,
@@ -173,33 +173,33 @@
 		},
 		filters: {
 			NumFormat(value) {
-				if(!value) return '0.00';
+				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(".");
+				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(); //拿到小数部分
+					floatPart = value2Array[1].toString() //拿到小数部分
 
 					if(floatPart.length == 1) { //补0,实际上用不着
-						return intPartFormat + "." + floatPart + '0';
+						return intPartFormat + '.' + floatPart + '0'
 					} else {
-						return intPartFormat + "." + floatPart;
+						return intPartFormat + '.' + floatPart
 					}
 				} else {
-					return intPartFormat + floatPart;
+					return intPartFormat + floatPart
 				}
 			}
 		},
 		methods:{
 			initData(e){
 				console.log(e)
-				this.orderId = e.orderId;
-				this.payOrderId ='#'+e.orderId+'#';
-				this.optionType = e.type;
+				this.orderId = e.orderId
+				this.payOrderId ='#'+e.orderId+'#'
+				this.optionType = e.type
 				switch(e.type){
 					case 'confirm':
 						this.nvabarData.haveBack = false
@@ -207,14 +207,14 @@
 						this.nvabarData.title = '支付'
 						this.PayOrderOnLineSwitch()
 						this.PayOrderCheckoutCounter(this.orderId)
-						break;
+						break
 					case 'payfirm':
 						this.nvabarData.haveBack = true
 						this.nvabarData.haveHome = false
 						this.nvabarData.title = '选择支付方式'
 						this.PayOrderOnLineSwitch()
 						this.PayOrderCheckoutCounter(this.orderId)
-						break;
+						break
 					case 'onlinePay':
 						this.invoiceStatus = true
 						this.isPaySwitch = false
@@ -223,7 +223,7 @@
 						this.nvabarData.title = '付款提示'
 						this.payableAmount = e.Amount
 						this.payBringTitle = '您已通过线下转账的方式支付了订单部分款项,剩余款项依然需要使用线下转账方式,给您带来的不便敬请谅解'
-						break;
+						break
 				}
 			},
 			PayOrderOnLineSwitch(){
@@ -278,37 +278,37 @@
 					switch(this.tabCurrentIndex){
 						case 0:
 							this.$api.navigateTo(`/pages/user/order/order-pay?type=0&orderId=${this.orderId}`)
-							break;
+							break
 						case 1:
 							this.$api.navigateTo(`/pages/user/order/order-pay?type=1&orderId=${this.orderId}`)
-							break;
+							break
 						case 2:
 							this.$api.navigateTo(`/pages/user/order/order-pay?type=2&orderId=${this.orderId}`)
-							break;
+							break
 					}
 				}
 			},
 			tabClick(index) {//tab切换
-				this.tabCurrentIndex = index;
+				this.tabCurrentIndex = index
 				switch(index){
 					case 0:
-						this.btnColor="#09BB07"
-						this.buttonText='使用微信支付';
-						break;
+						this.btnColor='#09BB07'
+						this.buttonText='使用微信支付'
+						break
 					case 1:
-						this.btnColor="#034582"
-						this.buttonText='使用企业网银支付';
-						break;
+						this.btnColor='#034582'
+						this.buttonText='使用企业网银支付'
+						break
 					case 2:
-						this.btnColor="#034582"
-						this.buttonText='使用个人网银支付';
-						break;
+						this.btnColor='#034582'
+						this.buttonText='使用个人网银支付'
+						break
 				}
 			},
 			hanldNavigateBack(){//页面返回
 				uni.navigateBack({
 					delta: 1
-				});
+				})
 			},
 			showTips(){
 				this.isShowTip=!this.isShowTip
@@ -316,9 +316,9 @@
 			clipboard(data) {
 				thorui.getClipboardData(data, (res) => {
 					if (res) {
-						this.$util.msg("复制成功",2000,true,'success');
+						this.$util.msg('复制成功',2000,true,'success')
 					} else {
-						this.$util.msg("复制失败",2000,true,'none');
+						this.$util.msg('复制失败',2000,true,'none')
 					}
 				})
 			},