cmy 1 year ago
parent
commit
2a511a065d

+ 39 - 26
pages/goods/goods_return/index.vue

@@ -4,7 +4,8 @@
 			<view class='apply-return'>
 			<view class='apply-return'>
 				<view class='goodsStyle acea-row row-between' v-for="(item,index) in refundCartInfo" :key="index">
 				<view class='goodsStyle acea-row row-between' v-for="(item,index) in refundCartInfo" :key="index">
 					<view class='pictrue'>
 					<view class='pictrue'>
-						<image :src='item.productInfo.attrInfo?item.productInfo.attrInfo.image:item.productInfo.image'></image>
+						<image :src='item.productInfo.attrInfo?item.productInfo.attrInfo.image:item.productInfo.image'>
+						</image>
 					</view>
 					</view>
 					<view class='text acea-row row-between'>
 					<view class='text acea-row row-between'>
 						<view class='name line2'>{{item.productInfo.store_name}}</view>
 						<view class='name line2'>{{item.productInfo.store_name}}</view>
@@ -20,7 +21,8 @@
 						<view class='num' v-if="refundCartInfo.length !== 1 || refund_total_num == 1">
 						<view class='num' v-if="refundCartInfo.length !== 1 || refund_total_num == 1">
 							{{refund_total_num}}
 							{{refund_total_num}}
 						</view>
 						</view>
-						<picker v-else class='num' @change="returnGoodsNum" :value="refund_num_index" :range="refundNumData">
+						<picker v-else class='num' @change="returnGoodsNum" :value="refund_num_index"
+							:range="refundNumData">
 							<view class="picker acea-row row-between-wrapper">
 							<view class="picker acea-row row-between-wrapper">
 								<view class='reason'>{{refundNumData[refund_num_index]}}</view>
 								<view class='reason'>{{refundNumData[refund_num_index]}}</view>
 								<text class='iconfont icon-jiantou'></text>
 								<text class='iconfont icon-jiantou'></text>
@@ -28,14 +30,13 @@
 						</picker>
 						</picker>
 						<!-- <input type="number" v-model="refund_num" @input="inputNumber" v-else /> -->
 						<!-- <input type="number" v-model="refund_num" @input="inputNumber" v-else /> -->
 					</view>
 					</view>
-			<!-- 		<view class='item acea-row row-between-wrapper'>
+					<!-- 		<view class='item acea-row row-between-wrapper'>
 						<view>退款金额</view>
 						<view>退款金额</view>
 						<view class='num' v-if="refundCartInfo.length !== 1">¥{{refund_pay_price.toFixed(2)}}</view>
 						<view class='num' v-if="refundCartInfo.length !== 1">¥{{refund_pay_price.toFixed(2)}}</view>
 						<view class='num' v-else>¥{{refund_Money.toFixed(2)}}
 						<view class='num' v-else>¥{{refund_Money.toFixed(2)}}
 						</view>
 						</view>
 					</view> -->
 					</view> -->
-					<view class='item acea-row row-between-wrapper'
-						v-if="status && status._type !== 1 && !productType">
+					<view class='item acea-row row-between-wrapper' v-if="status && status._type !== 1 && !productType">
 						<view>退款类型</view>
 						<view>退款类型</view>
 						<picker class='num' @change="returnGoodsChange" :value="returnGoods" :range="returnGoodsData">
 						<picker class='num' @change="returnGoodsChange" :value="returnGoods" :range="returnGoodsData">
 							<view class="picker acea-row row-between-wrapper">
 							<view class="picker acea-row row-between-wrapper">
@@ -104,8 +105,8 @@
 		mixins: [colors],
 		mixins: [colors],
 		data() {
 		data() {
 			return {
 			return {
-				id:0,
-				cartIds:[],
+				id: 0,
+				cartIds: [],
 				refund_reason_wap_img: [],
 				refund_reason_wap_img: [],
 				status: {},
 				status: {},
 				RefundArray: [],
 				RefundArray: [],
@@ -117,7 +118,7 @@
 				orderId: 0,
 				orderId: 0,
 				refundNumData: [],
 				refundNumData: [],
 				refund_num_index: 0,
 				refund_num_index: 0,
-				productType:0,
+				productType: 0,
 				isShowAuth: false,
 				isShowAuth: false,
 				buttonDisabled: false
 				buttonDisabled: false
 			};
 			};
@@ -138,7 +139,7 @@
 			this.orderId = options.orderId;
 			this.orderId = options.orderId;
 			this.id = options.id;
 			this.id = options.id;
 			this.productType = parseInt(options.productType) || 0;
 			this.productType = parseInt(options.productType) || 0;
-			if(options.cartIds){
+			if (options.cartIds) {
 				this.cartIds = JSON.parse(options.cartIds) || []
 				this.cartIds = JSON.parse(options.cartIds) || []
 			}
 			}
 			if (this.isLogin) {
 			if (this.isLogin) {
@@ -152,25 +153,28 @@
 			uni.removeStorageSync('form_type_cart');
 			uni.removeStorageSync('form_type_cart');
 		},
 		},
 		methods: {
 		methods: {
-			onLoadFun(){
+			onLoadFun() {
 				this.refundGoodsInfo();
 				this.refundGoodsInfo();
 				this.getRefundReason();
 				this.getRefundReason();
 				this.isShowAuth = false
 				this.isShowAuth = false
 			},
 			},
 			// 授权关闭
 			// 授权关闭
 			authColse: function(e) {
 			authColse: function(e) {
-			  this.isShowAuth = e
+				this.isShowAuth = e
 			},
 			},
-			refundGoodsInfo(){
-				postRefundGoods({id:this.id,cart_ids:this.cartIds}).then(res=>{
+			refundGoodsInfo() {
+				postRefundGoods({
+					id: this.id,
+					cart_ids: this.cartIds
+				}).then(res => {
 					let data = res.data;
 					let data = res.data;
 					this.status = data._status;
 					this.status = data._status;
 					this.refundCartInfo = data.cartInfo;
 					this.refundCartInfo = data.cartInfo;
-					this.refundCartInfo.forEach(item=>{
+					this.refundCartInfo.forEach(item => {
 						this.refund_total_num = this.$util.$h.Add(this.refund_total_num, item.cart_num)
 						this.refund_total_num = this.$util.$h.Add(this.refund_total_num, item.cart_num)
 					})
 					})
 					this.refundNumData = Array(this.refund_total_num).fill(0).map((e, i) => i + 1)
 					this.refundNumData = Array(this.refund_total_num).fill(0).map((e, i) => i + 1)
-				}).catch(err=>{
+				}).catch(err => {
 					return this.$util.Tips({
 					return this.$util.Tips({
 						title: err
 						title: err
 					});
 					});
@@ -204,9 +208,20 @@
 			 */
 			 */
 			uploadpic: function() {
 			uploadpic: function() {
 				let that = this;
 				let that = this;
-				this.$util.uploadImageOne('upload/image', function(res) {
-					that.refund_reason_wap_img.push(res.data.url);
-					that.$set(that, 'refund_reason_wap_img', that.refund_reason_wap_img);
+				uni.showModal({
+					title: '请求相机权限',
+					content: '是否允许访问相册用于上传凭证信息?',
+					cancelText: '拒绝',
+					confirmText: '允许',
+					success: res => {
+						if (res.confirm) {
+							that.$util.uploadImageOne('upload/image', function(res) {
+								that.refund_reason_wap_img.push(res.data.url);
+								that.$set(that, 'refund_reason_wap_img', that
+									.refund_reason_wap_img);
+							});
+						}
+					},
 				});
 				});
 			},
 			},
 
 
@@ -225,13 +240,11 @@
 					});
 					});
 				}
 				}
 				let cartInfo = this.refundCartInfo;
 				let cartInfo = this.refundCartInfo;
-				if(cartInfo.length === 1){
-					this.cartIds = [
-						{
-							cart_id:cartInfo[0].id,
-							cart_num: this.refund_num_index + 1
-						}
-					]
+				if (cartInfo.length === 1) {
+					this.cartIds = [{
+						cart_id: cartInfo[0].id,
+						cart_num: this.refund_num_index + 1
+					}]
 				}
 				}
 				returnGoodsSubmit(this.id, {
 				returnGoodsSubmit(this.id, {
 					text: that.RefundArray[that.index] || '',
 					text: that.RefundArray[that.index] || '',
@@ -381,4 +394,4 @@
 	.list /deep/ .uni-input-input {
 	.list /deep/ .uni-input-input {
 		text-align: right;
 		text-align: right;
 	}
 	}
-</style>
+</style>

+ 14 - 3
pages/goods/lottery/grids/order.vue

@@ -659,10 +659,21 @@
 			 */
 			 */
 			uploadpic: function(index) {
 			uploadpic: function(index) {
 				let that = this;
 				let that = this;
-				this.$util.uploadImageOne('upload/image', function(res) {
-					that.newImg.push(res.data.url);
-					that.$set(that.confirm[index], 'value', that.newImg);
+				uni.showModal({
+					title: '请求相机权限',
+					content: '是否允许访问相册用于上传图片信息?',
+					cancelText: '拒绝',
+					confirmText: '允许',
+					success: res => {
+						if(res.confirm){
+							that.$util.uploadImageOne('upload/image', function(res) {
+								that.newImg.push(res.data.url);
+								that.$set(that.confirm[index], 'value', that.newImg);
+							});
+						}
+					},
 				});
 				});
+				
 			},
 			},
 			// 不开发票
 			// 不开发票
 			invCancel() {
 			invCancel() {

+ 14 - 3
pages/goods/order_confirm/index.vue

@@ -955,10 +955,21 @@
 			 */
 			 */
 			uploadpic: function(index) {
 			uploadpic: function(index) {
 				let that = this;
 				let that = this;
-				this.$util.uploadImageOne('upload/image', function(res) {
-					that.newImg.push(res.data.url);
-					that.$set(that.confirm[index], 'value', that.newImg);
+				uni.showModal({
+					title: '申请相机权限',
+					content: '是否允许访问相册用于上传图片?',
+					cancelText: '拒绝',
+					confirmText: '允许',
+					success: res => {
+						if(res.confirm){
+							that.$util.uploadImageOne('upload/image', function(res) {
+								that.newImg.push(res.data.url);
+								that.$set(that.confirm[index], 'value', that.newImg);
+							});
+						}
+					},
 				});
 				});
+				
 			},
 			},
 			// 不开发票
 			// 不开发票
 			invCancel() {
 			invCancel() {

+ 13 - 3
pages/goods/order_confirm/yuyue.vue

@@ -699,9 +699,19 @@
 			 */
 			 */
 			uploadpic: function(index) {
 			uploadpic: function(index) {
 				let that = this;
 				let that = this;
-				this.$util.uploadImageOne('upload/image', function(res) {
-					that.newImg.push(res.data.url);
-					that.$set(that.confirm[index], 'value', that.newImg);
+				uni.showModal({
+					title: '申请相机权限',
+					content: '是否允许访问相册用于上传图片?',
+					cancelText: '拒绝',
+					confirmText: '允许',
+					success: res => {
+						if(res.confirm){
+							that.$util.uploadImageOne('upload/image', function(res) {
+								that.newImg.push(res.data.url);
+								that.$set(that.confirm[index], 'value', that.newImg);
+							});
+						}
+					},
 				});
 				});
 			},
 			},
 			// 不开发票
 			// 不开发票

+ 12 - 7
pages/goods/order_list/serve.vue

@@ -71,7 +71,6 @@
 								<view class="money">
 								<view class="money">
 									<view>¥{{ items.pay_price }}</view>
 									<view>¥{{ items.pay_price }}</view>
 									<view>x1</view>
 									<view>x1</view>
-									<!-- <view v-if="items.refund_num && item._status._type != -2" class="return">{{ items.refund_num }}件退款中</view> -->
 								</view>
 								</view>
 							</view>
 							</view>
 						</view>
 						</view>
@@ -100,8 +99,8 @@
 						</view>
 						</view>
 
 
 						<view class="totalPrice">
 						<view class="totalPrice">
-							共{{ item.info.length || 0 }}件商品,总金额
-							<text class="money">¥{{ showTolPrice(item.info) }}</text>
+							共{{ item.info.length || 0 }}件商品,<text class="money" v-if="item.coupon_price">¥优惠{{ item.coupon_price }}</text>总金额
+							<text class="money">¥{{ showTolPrice(item.info,item.coupon_price) }}</text>
 						</view>
 						</view>
 					</view>
 					</view>
 					<view class="bottom acea-row row-right row-middle" v-if="item.status != 2">
 					<view class="bottom acea-row row-right row-middle" v-if="item.status != 2">
@@ -290,12 +289,15 @@
 				}
 				}
 				// #endif
 				// #endif
 			},
 			},
-			showTolPrice(list) {
+			showTolPrice(list,money) {
 				let price = 0;
 				let price = 0;
 				list.forEach(item => {
 				list.forEach(item => {
-					price += item.pay_price * 1
+					price += item.pay_price * 1;
 				})
 				})
-				return price.toFixed(2)
+				if(money){
+					price = price-money
+				}
+				return  price.toFixed(2);
 			},
 			},
 			getFun() {
 			getFun() {
 				// this.getOrderData();
 				// this.getOrderData();
@@ -534,7 +536,10 @@
 							that.orderData.received_count = res.data.count;
 							that.orderData.received_count = res.data.count;
 						}
 						}
 						let loadend = list.length < that.limit;
 						let loadend = list.length < that.limit;
-						that.orderList = that.$util.SplitArray(list, that.orderList);
+						that.orderList = (that.$util.SplitArray(list, that.orderList)).map(re=>{
+							re.coupon_price = +re.coupon_price;
+							return re;
+						});
 						that.$set(that, 'orderList', that.orderList);
 						that.$set(that, 'orderList', that.orderList);
 						that.loadend = loadend;
 						that.loadend = loadend;
 						that.loading = false;
 						that.loading = false;