guhongwei 2 years ago
parent
commit
e0b2c1e964
1 changed files with 14 additions and 17 deletions
  1. 14 17
      pagesMy/order/service.vue

+ 14 - 17
pagesMy/order/service.vue

@@ -8,8 +8,7 @@
 				<view class="one_2">
 					<view class="list" v-for="(item,index) in info.goods" :key="index">
 						<view class="list_1">
-							<image class="image"
-								:src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''" mode="">
+							<image class="image" :src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''" mode="">
 							</image>
 						</view>
 						<view class="list_2">
@@ -37,27 +36,23 @@
 				<view class="two_1" v-if="status=='3'">
 					<uni-forms ref="thrform" :rules="thrrules" :model="thrform" label-width="auto">
 						<uni-forms-item label="售后商品" name="goods_id">
-							<picker class="picker" mode="selector" :range="info.goods" @change="goodsChange"
-								range-key="goods_name">
+							<picker class="picker" mode="selector" :range="info.goods" @change="goodsChange" range-key="goods_name">
 								<view>{{thrform.goods_name||'请选择退款商品'}}</view>
 							</picker>
 						</uni-forms-item>
 						<uni-forms-item label="售后类型" name="type">
-							<picker class="picker" mode="selector" :range="typeList" @change="typeChange"
-								range-key="label">
+							<picker class="picker" mode="selector" :range="typeList" @change="typeChange" range-key="label">
 								<view>{{thrform.type_name||'请选择售后类型'}}</view>
 							</picker>
 						</uni-forms-item>
 						<uni-forms-item label="退款金额" name="money" v-if="thrform.type=='1'||thrform.type=='2'">
-							<uni-easyinput type="digit" v-model="thrform.money" @input="toMoney"
-								placeholder="请输入退款金额" />
+							<uni-easyinput type="digit" v-model="thrform.money" @input="toMoney" placeholder="请输入退款金额" />
 							<view class="money">
 								最大退款金额不能超过 <text>{{moneyInfo.payTotal||0}}</text>,<text @tap="toAll">全部提现</text>
 							</view>
 						</uni-forms-item>
 						<uni-forms-item label="申请理由" name="reason">
-							<picker class="picker" mode="selector" :range="reasonList" @change="reasonChange"
-								range-key="label">
+							<picker class="picker" mode="selector" :range="reasonList" @change="reasonChange" range-key="label">
 								<view>{{thrform.reason_name||'请选择申请理由'}}</view>
 							</picker>
 						</uni-forms-item>
@@ -65,7 +60,7 @@
 							<uni-easyinput type="textarea" v-model="thrform.desc" placeholder="请输入申请售后描述" />
 						</uni-forms-item>
 						<uni-forms-item label="附件" name="icon">
-							<upload :list="icon" name="icon" :count="1" @uplSuc="uplSuc" @uplDel="uplDel"></upload>
+							<upload :list="thrform.file" name="file" :count="1" @uplSuc="uplSuc" @uplDel="uplDel"></upload>
 						</uni-forms-item>
 						<view class="btn">
 							<button type="primary" size="mini" @click="onSubmit('thrform')">提交保存</button>
@@ -112,9 +107,11 @@
 					},
 				},
 				// 已收到货
-				thrform: {},
+				thrform: {
+					file: []
+				},
 				// 附件
-				icon: [],
+				// icon: [],
 				// 最大退款数
 				moneyInfo: {},
 				thrrules: {
@@ -251,14 +248,14 @@
 			// 图片上传
 			uplSuc(e) {
 				const that = this;
-				that.$set(that, `${e.name}`, [...that[e.name], e.data]);
+				that.$set(that.thrform, `${e.name}`, [...that.thrform[e.name], e.data]);
 			},
 			// 图片删除
 			uplDel(e) {
 				const that = this;
-				let data = that[e.name];
+				let data = that.thrform[e.name];
 				let arr = data.filter((i, index) => index != e.data.index);
-				that.$set(that, `${e.name}`, arr)
+				that.$set(that.thrform, `${e.name}`, arr)
 			},
 			// 全部提现
 			toAll() {
@@ -281,7 +278,7 @@
 			// 已收到货
 			async Receip(e) {
 				const that = this;
-				e.file = that.icon;
+				e.file = that.thrform.file;
 				e.order_detail = that.id;
 				let money = that.moneyInfo.payTotal;
 				if (e.type != '3') {