shish 2 лет назад
Родитель
Сommit
11549361b9

+ 13 - 1
ghsApp/src/pagesOrder/refund.vue

@@ -28,6 +28,16 @@
 			</view>
 			</view>
 		</view>
+		<view class="flex refund-item">
+			<view class="refund-label">退款原因:</view>
+			<view class="flex list">
+				<view class="flex" @tap="cause=0" >
+					<view class="flex-center radioBtn" :class="cause==0? 'active' : ''">
+					</view>质量问题</view>
+				<view style="margin-left: 30upx" class="flex" @tap="cause=1">
+					<view class="flex-center radioBtn" :class="cause==1 ? 'active' : ''">
+				</view>多开错开</view></view>
+		</view>
 		<view class="flex refund-item">
 			<view class="refund-label">{{orderInfo.book==0?'订单金额':'预付金额'}}:</view>
 			<view class="list">
@@ -92,6 +102,7 @@ export default {
 			product:[],
 			refundMoney:0,
 			refundType:1,
+			cause:0,
 			remark:'',
 			orderInfo:{},
 			couldRefundPrice:0,
@@ -162,7 +173,8 @@ export default {
 				price:this.refundMoney,
 				remark:this.remark,
 				refundType:this.refundType,
-				getOriginalItem:1
+				getOriginalItem:1,
+				cause:this.cause
 			};
 			that.$util.confirmModal({content:'确认退款?'},() => {
 				uni.showLoading({title: "提交中",mask:true})

+ 53 - 11
ghsApp/src/pagesOrder/refundAllList.vue

@@ -1,9 +1,10 @@
 <template>
   <view class="app-content">
-      <view style="padding:20upx 0 25upx 50upx;font-size:29upx;">
-        <text @click="setPass()" :class="[status==0?'cancel-pass':'pass-red']">选已通过</text>
-        <text style="margin-left:50upx;" @click="changeClass()">选分类</text>
-        <text style="margin-left:50upx;">总金额:¥{{ totalAmount }}</text>
+      <view style="padding:20upx 0 25upx 40upx;font-size:27upx;">
+        <text @click="changeStatus()">{{ status == -1 ? '选类型' : status == 0 ? '处理中' : status == 1 ? '已通过' : status == 2 ? '已驳回' : '已取消' }}</text>
+        <text style="margin-left:40upx;" @click="changeClass()">选分类</text>
+        <text style="margin-left:40upx;" @click="changeCause()">{{ cause == -1 ? '选择原因' : cause == 0 ? '质量问题' : '多开错开' }}</text>
+        <text style="margin-left:40upx;">总金额:¥{{ totalAmount }}</text>
       </view>
       <view style="margin-left:50upx;margin-bottom:26upx;"><DateSelect class="bar" top="0" @selectDateFn="selectDateFn" /></view>
 			<block v-if="!$util.isEmpty(list.data)">
@@ -14,7 +15,7 @@
               <text>日期:{{item.refundInfo.addTime.substr(5,11)}}</text>
               <text>单号:{{item.refundInfo.orderSn}}</text>
               <text>操作:{{item.refundInfo.shopAdminName}}</text>
-              <text>类型:{{item.refundInfo.book == 1 ? '预订单多退少补' :'普通'}}</text>
+              <text>类型:{{item.refundInfo.book == 1 ? '预订单多退少补' :'售后'}}</text>
               <text v-if="!$util.isEmpty(item.refundInfo.remark)">备注:{{item.refundInfo.remark}}</text>
 
               <text style="position:absolute;right:-425upx;top:0upx;">{{ item.refundInfo.status==0?'待审核':item.refundInfo.status==1?'已通过':item.refundInfo.status==2?'已驳回':item.refundInfo.status==3 ? '已取消':'' }}</text>    
@@ -58,7 +59,8 @@ export default {
   data() {
     return {
       itemClassData:[],
-      status:'',
+      status:-1,
+      cause:-1,
       totalAmount:0,
       searchTime:'',
       startTime:'',
@@ -102,10 +104,49 @@ export default {
       this.resetList()
       this.getRefundData()
     },
-    setPass(){
-      this.status = this.status == 0 ? 1 : 0
-      this.resetList()
-      this.getRefundData()
+    changeCause(){
+      let that = this
+      uni.showActionSheet({
+        itemList: ['质量问题', '多开错开', '取消选择'],
+        success: function (res) {
+          if(res.tapIndex == 0){
+            that.cause = 0
+          }
+          if(res.tapIndex == 1){
+            that.cause = 1
+          }
+          if(res.tapIndex == 2){
+            that.cause = -1
+          }
+          that.resetList()
+          that.getRefundData()
+        }
+      })
+    },
+    changeStatus(){
+      let that = this
+      uni.showActionSheet({
+        itemList: ['处理中', '已通过', '已驳回','已取消','取消选择'],
+        success: function (res) {
+          if(res.tapIndex == 0){
+            that.status = 0
+          }
+          if(res.tapIndex == 1){
+            that.status = 1
+          }
+          if(res.tapIndex == 2){
+            that.status = 2
+          }
+          if(res.tapIndex == 3){
+            that.status = 3
+          }
+          if(res.tapIndex == 4){
+            that.status = -1
+          }
+          that.resetList()
+          that.getRefundData()
+        }
+      })
     },
     changeClass(){
       this.$refs.classRef.open('center')
@@ -144,7 +185,8 @@ export default {
         ids:JSON.stringify(ids),
         searchTime: this.searchTime,
         startTime: this.startTime,
-        endTime: this.endTime
+        endTime: this.endTime,
+        cause:this.cause
       }).then((res) => {
         this.completes(res)
         this.totalAmount = res.data.totalAmount ? parseFloat(res.data.totalAmount) : 0

+ 4 - 0
ghsApp/src/pagesOrder/refundDetail.vue

@@ -20,6 +20,10 @@
 			<view class="refund-label"><text></text>申请时间:</view>
 			<view class="list" style="font-size:28upx;">{{ info.addTime ? info.addTime.substr(5,11):'' }}</view>
 		</view>
+		<view class="flex refund-item">
+			<view class="refund-label"><text></text>申请原因:</view>
+			<view class="list" style="font-size:28upx;">{{ info.cause == 0 ? '质量原因' : '多开错开'}}</view>
+		</view>
 		<view class="flex refund-item">
 			<view class="refund-label"><text></text>退款金额:</view>
 			<view class="list" style="font-size:28upx;">¥{{refundPrice}}</view>

+ 1 - 0
ghsApp/src/pagesOrder/refundList.vue

@@ -7,6 +7,7 @@
               <text>日期:{{item.addTime.substr(5,11)}}</text>
               <text>单号:{{item.orderSn}}</text>
               <text>操作:{{item.shopAdminName}}</text>
+              <text>原因:{{item.cause == 0 ? '质量问题' : '多开错开'}}</text>
               <text>类型:{{item.book == 1 ? '预订单多退少补' :'普通'}}</text>
               <text v-if="!$util.isEmpty(item.remark)">备注:{{item.remark}}</text>