lhl 1 year ago
parent
commit
01432e93e3

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

@@ -4,8 +4,7 @@
 			<view class='apply-return'>
 				<view class='goodsStyle acea-row row-between' v-for="(item,index) in refundCartInfo" :key="index">
 					<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 class='text acea-row row-between'>
 						<view class='name line2'>{{item.productInfo.store_name}}</view>
@@ -21,8 +20,7 @@
 						<view class='num' v-if="refundCartInfo.length !== 1 || refund_total_num == 1">
 							{{refund_total_num}}
 						</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='reason'>{{refundNumData[refund_num_index]}}</view>
 								<text class='iconfont icon-jiantou'></text>
@@ -30,13 +28,14 @@
 						</picker>
 						<!-- <input type="number" v-model="refund_num" @input="inputNumber" v-else /> -->
 					</view>
-					<!-- 		<view class='item acea-row row-between-wrapper'>
+			<!-- 		<view class='item acea-row row-between-wrapper'>
 						<view>退款金额</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>
 					</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>
 						<picker class='num' @change="returnGoodsChange" :value="returnGoods" :range="returnGoodsData">
 							<view class="picker acea-row row-between-wrapper">
@@ -105,8 +104,8 @@
 		mixins: [colors],
 		data() {
 			return {
-				id: 0,
-				cartIds: [],
+				id:0,
+				cartIds:[],
 				refund_reason_wap_img: [],
 				status: {},
 				RefundArray: [],
@@ -118,7 +117,7 @@
 				orderId: 0,
 				refundNumData: [],
 				refund_num_index: 0,
-				productType: 0,
+				productType:0,
 				isShowAuth: false,
 				buttonDisabled: false
 			};
@@ -139,7 +138,7 @@
 			this.orderId = options.orderId;
 			this.id = options.id;
 			this.productType = parseInt(options.productType) || 0;
-			if (options.cartIds) {
+			if(options.cartIds){
 				this.cartIds = JSON.parse(options.cartIds) || []
 			}
 			if (this.isLogin) {
@@ -153,28 +152,25 @@
 			uni.removeStorageSync('form_type_cart');
 		},
 		methods: {
-			onLoadFun() {
+			onLoadFun(){
 				this.refundGoodsInfo();
 				this.getRefundReason();
 				this.isShowAuth = false
 			},
 			// 授权关闭
 			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;
 					this.status = data._status;
 					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.refundNumData = Array(this.refund_total_num).fill(0).map((e, i) => i + 1)
-				}).catch(err => {
+				}).catch(err=>{
 					return this.$util.Tips({
 						title: err
 					});
@@ -208,20 +204,9 @@
 			 */
 			uploadpic: function() {
 				let that = this;
-				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);
-							});
-						}
-					},
+				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);
 				});
 			},
 
@@ -240,11 +225,13 @@
 					});
 				}
 				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, {
 					text: that.RefundArray[that.index] || '',
@@ -394,4 +381,4 @@
 	.list /deep/ .uni-input-input {
 		text-align: right;
 	}
-</style>
+</style>

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

@@ -659,21 +659,10 @@
 			 */
 			uploadpic: function(index) {
 				let that = this;
-				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);
-							});
-						}
-					},
+				this.$util.uploadImageOne('upload/image', function(res) {
+					that.newImg.push(res.data.url);
+					that.$set(that.confirm[index], 'value', that.newImg);
 				});
-				
 			},
 			// 不开发票
 			invCancel() {

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

@@ -955,21 +955,10 @@
 			 */
 			uploadpic: function(index) {
 				let that = this;
-				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);
-							});
-						}
-					},
+				this.$util.uploadImageOne('upload/image', function(res) {
+					that.newImg.push(res.data.url);
+					that.$set(that.confirm[index], 'value', that.newImg);
 				});
-				
 			},
 			// 不开发票
 			invCancel() {

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

@@ -699,19 +699,9 @@
 			 */
 			uploadpic: function(index) {
 				let that = this;
-				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);
-							});
-						}
-					},
+				this.$util.uploadImageOne('upload/image', function(res) {
+					that.newImg.push(res.data.url);
+					that.$set(that.confirm[index], 'value', that.newImg);
 				});
 			},
 			// 不开发票

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

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