Pārlūkot izejas kodu

修改搜索订单操作订单 ,协销邮费操作处理

zhengjinyi 5 gadi atpakaļ
vecāks
revīzija
a0ccf8b8d0

+ 5 - 7
components/module/creatOrder/sellerFreight.vue

@@ -89,15 +89,11 @@
 						this.current = 1;
 						this.freightData.freePostFlag = data.freePostFlag;
 						this.freightText = '包邮'
-						this.freightMoney = 0
-						this.freightData.freight  = 0
 						break;
 					case -1:
 						this.current = 2;
 						this.freightData.freePostFlag = data.freePostFlag;
 						this.freightText = '到付'
-						this.freightMoney = 0
-						this.freightData.freight  = 0
 						break;
 				}
 			},
@@ -115,8 +111,9 @@
 				}		
 			},
 			choiceaFreightFirst(index){//校验运费形式及运费价
+				console.log(index)
 				if(index == 1){
-					if(this.freightData.freight==''){
+					if(this.freightData.freight==0 || this.freightData.freight== ''){
 						this.$util.msg('请填写运费',2000)
 						return
 					}
@@ -138,6 +135,7 @@
 			},
 			hanldOperationConfim(data){//显示选择数量确认弹窗
 				this.specClass = 'show';
+				this.freightMoney = this.freightData.freight
 			},
 			radioChange(e) {//运费选择切换
 				this.freightData.freePostFlag = parseInt(e.target.value);
@@ -147,11 +145,9 @@
 						break;
 					case 0:
 						this.freightText = '包邮'
-						this.freightMoney = 0
 						break;
 					case -1:
 						this.freightText = '到付'
-						this.freightMoney = 0
 						break;	
 				}		
 				for (let i = 0; i < this.freightList.length; i++) {
@@ -164,7 +160,9 @@
 			setFreightMoney(e){//处理邮费显示
 				if(e.detail.value == ''){
 					this.freightMoney=0
+					this.freightData.freight=0
 				}else{
+					this.freightData.freight = e.detail.value
 					this.freightMoney = this.orderPriceToFixed(e.detail.value)
 				}
 			},

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

@@ -176,7 +176,7 @@
 				this.$emit('goCartPage')
 			},
 			repurchModel(){
-				this.$util.modal('','此商品成本有变化原来的购买价已不适用','知道了','',false,() =>{})
+				this.$util.modal('','此商品的价格有变化,原来的购买价已不适用','知道了','',false,() =>{})
 			},
 			onShowClose () {//输入框失去焦点时触发
 				if(this.searchInputVal != ''){

+ 1 - 1
components/module/listTemplate/immediatelyList.vue

@@ -199,7 +199,7 @@
 				this.$emit('goCartPage')
 			},
 			repurchModel(){
-				this.$util.modal('','此商品成本有变化原来的购买价已不适用','知道了','',false,() =>{})
+				this.$util.modal('','此商品的价格有变化,原来的购买价已不适用','知道了','',false,() =>{})
 			},
 			onShowClose () {//输入框失去焦点时触发
 				if(this.searchInputVal != ''){

+ 1 - 1
components/module/listTemplate/productList.vue

@@ -188,7 +188,7 @@
 				})
 			},
 			repurchModel(){
-				this.$util.modal('','此商品成本有变化原来的购买价已不适用','知道了','',false,() =>{})
+				this.$util.modal('','此商品的价格有变化,原来的购买价已不适用','知道了','',false,() =>{})
 			}
 		}
 	}

+ 1 - 2
market/pages/order/create-order.vue

@@ -161,7 +161,6 @@
 					})
 				})
 			},
-
 			getAddressData(){//获取地址信息
 				this.$api.getComStorage('orderUserInfo').then((resolve) =>{
 					queryAddressList({pageNum:1,pageSize:1,userID:resolve.userID}).then(response =>{
@@ -183,9 +182,9 @@
 			},
 			handleChoiceaInvoiceData(data){//获取发票信息
 				this.invoiceData = data
-				console.log(data)
 			},
 			handleChoiceaFreightData(data){//获取运费信息
+				console.log(data)
 				if(data.freePostFlag == '1'){
 					this.freightData = data
 					this.payAllPrice = this.allPrice+parseInt(data.freight)

+ 12 - 14
market/pages/search/search-order.vue

@@ -296,10 +296,10 @@
 			handShowAlert(data) {//执行
 				switch(data.type){
 					case 'delete':
-						this.handOrderDetele();
+						this.handOrderDetele(data.orderId);
 						break
 					case 'cancel':
-						this.handCenceConfirm()
+						this.handCenceConfirm(data.orderId)
 						break
 					case 'confirm':
 						this.handOrderConfirm(data.orderId);
@@ -311,34 +311,32 @@
 					affirmOrder({orderID:id}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
 						setTimeout(() => {
-							this.getOrderDatainit(this.currentTab)
+							this.getOrderDatainit()
 						},2000)
 					}).catch(response =>{
 						this.$util.msg(response.msg,2000)
 					})
 				})
 			},
-			handOrderDetele(){//删除订单
+			handOrderDetele(id){//删除订单
 				this.$util.modal('提示','确认删除该订单吗?','确定','取消',true,() =>{
-					deleteOrder({orderID:this.orderID}).then(response =>{
+					deleteOrder({orderID:id}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
 						setTimeout(() => {
-							if(this.shareType ==='share'){
-								this.$api.switchTabTo('/pages/tabBar/user/user')
-							}else{
-								this.$api.redirectTo(`/pages/user/order/order-list?type=detele&state=${this.state}`)
-							}
-						},500)
+							this.getOrderDatainit()
+						},2000)
 					}).catch(response =>{
 						this.$util.msg(response.msg,2000)
 					})
 				})
 			},
-			handCenceConfirm(){//取消订单
+			handCenceConfirm(id){//取消订单
 				this.$util.modal('提示','确认取消该订单吗?','确定','取消',true,() =>{
-					cancelOrder({orderID:this.orderID}).then(response =>{
+					cancelOrder({orderID:id}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
-						this.initOrderDetaileData()
+						setTimeout(() => {
+							this.getOrderDatainit()
+						},2000)
 					}).catch(response =>{
 						this.$util.msg(response.msg,2000)
 					})

+ 13 - 18
pages/search/search-order.vue

@@ -301,10 +301,10 @@
 			handShowAlert(data) {//执行
 				switch(data.type){
 					case 'delete':
-						this.handOrderDetele();
+						this.handOrderDetele(data.orderId);
 						break
 					case 'cancel':
-						this.handCenceConfirm()
+						this.handCenceConfirm(data.orderId)
 						break
 					case 'query':
 						this.isModalLayer = true;
@@ -322,7 +322,7 @@
 				this.$util.modal('提示','是否确认收货','确定','取消',true,() =>{
 					confirmReceipt({orderID:id}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
-						this.initOrderDetaileData()
+						this.getOrderDatainit()
 					}).catch(response =>{
 						this.$util.msg(response.msg,2000)
 					})
@@ -333,42 +333,37 @@
 					affirmOrder({orderID:id}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
 						setTimeout(() => {
-							this.getOrderDatainit(this.currentTab)
+							this.getOrderDatainit()
 						},2000)
 					}).catch(response =>{
 						this.$util.msg(response.msg,2000)
 					})
 				})
 			},
-			handOrderDetele(){//删除订单
+			handOrderDetele(id){//删除订单
 				this.$util.modal('提示','确认删除该订单吗?','确定','取消',true,() =>{
-					deleteOrder({orderID:this.orderID}).then(response =>{
+					deleteOrder({orderID:id}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
 						setTimeout(() => {
-							if(this.shareType ==='share'){
-								this.$api.switchTabTo('/pages/tabBar/user/user')
-							}else{
-								this.$api.redirectTo(`/pages/user/order/order-list?type=detele&state=${this.state}`)
-							}
-						},500)
+							this.getOrderDatainit()
+						},2000)
 					}).catch(response =>{
 						this.$util.msg(response.msg,2000)
 					})
 				})
 			},
-			handCenceConfirm(){//取消订单
+			handCenceConfirm(id){//取消订单
 				this.$util.modal('提示','确认取消该订单吗?','确定','取消',true,() =>{
-					cancelOrder({orderID:this.orderID}).then(response =>{
+					cancelOrder({orderID:id}).then(response =>{
 						this.$util.msg(response.msg,2000,true,'success');
-						this.initOrderDetaileData()
+						setTimeout(() => {
+							this.getOrderDatainit()
+						},2000)
 					}).catch(response =>{
 						this.$util.msg(response.msg,2000)
 					})
 				})
 			},
-			handlSearchPath(){
-				this.$api.navigateTo('/pages/search/search-order')
-			},
 			onShareAppMessage (res){//分享转发
 				this.isShareModal = false
 				if (res.from === 'button') {// 来自页面内转发按钮