shish 1 год назад
Родитель
Сommit
5be3b41151
1 измененных файлов с 17 добавлено и 7 удалено
  1. 17 7
      ghsApp/src/pagesOrder/refundDetail.vue

+ 17 - 7
ghsApp/src/pagesOrder/refundDetail.vue

@@ -24,7 +24,16 @@
 			<view class="refund-label"><text></text>申请原因:</view>
 			<view class="list" style="font-size:28upx;">
 				{{ info.cause==0?'质量问题' : info.cause==1 ?'多开错开': info.cause==2 ? '打包原因' : info.cause==3 ? '物流原因' : '其它'}}
-				<text style="margin-left:60upx;color:#3385FF;" @click="changeCause(info)">修改</text>
+				<text style="margin-left:60upx;color:#3385FF;" @click="showChoice=true">修改</text>
+			</view>
+		</view>
+		<view class="flex refund-item" v-if="showChoice==true">
+			<view class="refund-label"><text></text>选择原因:</view>
+			<view class="list">
+				<button class="admin-button-com mini-btn" @click="changeCause(0)">质量</button>
+				<button class="admin-button-com mini-btn" style="margin-left:12upx;" @click="changeCause(1)">多开错开</button>
+				<button class="admin-button-com mini-btn" style="margin-left:12upx;" @click="changeCause(2)">打包</button>
+				<button class="admin-button-com mini-btn" style="margin-left:12upx;" @click="changeCause(3)">物流</button>
 			</view>
 		</view>
 		<view class="flex refund-item">
@@ -113,7 +122,8 @@ export default {
 			info:[],
 			rejectReason:'',
 			from:0,
-			refundAmount:''
+			refundAmount:'',
+			showChoice:false
 		};
 	},
 	onLoad() {
@@ -145,13 +155,13 @@ export default {
 		changeAmount(){
 			this.$refs.modifyAmountRef.open('center')
 		},
-		changeCause(info){
-			this.$util.confirmModal({content:'确认变更?'},() => {
+		changeCause(cause){
+			this.$util.confirmModal({content:'确认修改?'},() => {
 				let that = this
-				let cause = info.cause == 0 ? 1 : 0
-				modifyCause({id:info.id,cause:cause}).then(res=>{
+				modifyCause({id:this.info.id,cause:cause}).then(res=>{
 					if(res.code == 1){
-						info.cause = cause
+						this.showChoice = false
+						this.info.cause = cause
 						that.$msg(res.msg)
 					}
 				})