shish 2 лет назад
Родитель
Сommit
6212d3b12d

+ 2 - 1
ghsApp/src/admin/home/apply.vue

@@ -75,7 +75,8 @@ export default {
                         {name: "预订汇总",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/order/statBook"},
                         {name: "运费设置",img: `${this.$constant.imgUrl}/ghs/home/shop.png`,url: "/admin/order/freight"},
                         {name: "物流",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/shop/wl"},
-                        {name: "结账记录",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/clear/customList"}
+                        {name: "结账记录",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/admin/clear/customList"},
+                        {name: "退款记录",img: `${this.$constant.imgUrl}/ghs/home/kcyjs.png`,url: "/pagesOrder/refundAllList"}
                     ]
                 },
                 {

+ 2 - 1
ghsApp/src/admin/item/detail.vue

@@ -441,7 +441,8 @@ export default {
       this.form.classId = info.id ? info.id : 0
       this.form.className = info.name ? info.name : ''
       this.$forceUpdate()
-    },		onStockChange(info){
+    },
+    onStockChange(info){
 			this.closeMoreDoPop()
 			this.pageTo({url: '/pagesStorehouse/stockWarn/onStockChange?id='+info.id+'&name='+info.name})
 		},

+ 4 - 0
ghsApp/src/api/refund/index.js

@@ -20,3 +20,7 @@ export const refundDetail = data => {
 export const refundList = data => {
 	return https.get('/refund/list', data)
 }
+
+export const getRefundListByItem = data => {
+	return https.get('/refund/get-list-by-item', data)
+}

+ 2 - 1
ghsApp/src/pages.json

@@ -103,7 +103,8 @@
 				{"path": "print","style": {"navigationBarTitleText": "连接蓝牙"}},
 				{"path": "allot","style": {"navigationBarTitleText": "分配工作"}},
 				{"path": "refundSuccess","style": {"navigationBarTitleText": "结果"}},
-				{"path": "refundList","style": {"navigationBarTitleText": "退款记录", "enablePullDownRefresh": true}}
+				{"path": "refundList","style": {"navigationBarTitleText": "退款记录", "enablePullDownRefresh": true}},
+				{"path": "refundAllList","style": {"navigationBarTitleText": "退款记录", "enablePullDownRefresh": true}}
 			]
 		},
 		{

+ 194 - 0
ghsApp/src/pagesOrder/refundAllList.vue

@@ -0,0 +1,194 @@
+<template>
+  <view class="app-content">
+      <view style="padding:20upx 0 20upx 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>
+      <view style="margin-left:50upx;margin-bottom:10upx;"><DateSelect class="bar" top="0" @selectDateFn="selectDateFn" /></view>
+			<block v-if="!$util.isEmpty(list.data)">
+
+<template v-for="(item, index) in list.data" :key="index">
+
+				<view class="flex-space list" v-if="!$util.isEmpty(item.refundInfo)">
+          
+          <view class="label" @click="goDetail(item.refundInfo)">
+              <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 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>    
+
+          </view>
+          <view class="flex val">¥{{parseFloat(item.refundInfo.refundPrice)}} <view class="iconfont iconxiangyou"></view> </view>
+          
+			  </view>
+
+</template>
+
+        
+			</block>
+			<block v-else>
+				<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+			</block>
+
+      <uni-popup ref="classRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+        <view style="margin-left:30upx;margin-top:19upx;font-size:27upx;font-weight:bold;">请选择分类:</view>
+          <view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
+            <view v-for="(item, index) in itemClassData" :key="index" @tap.stop="setClass(index)" style="margin-bottom:20upx;margin-left:3upx;">
+            <image :src="item.cover" style="width:120upx;height:120upx;border-radius:10upx;"></image>
+            <view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;" v-if="item.select == 0">{{item.name}}</view>
+            <view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;color:red;font-weight:bold;" v-else>{{item.name}}</view>
+          </view>
+        </view>
+        <view style="text-align:center;padding:10upx 0 10upx 0;">
+          <button class="admin-button-com big blue" @click="cancelClass()">取消</button>
+          <button class="admin-button-com big blue" style="margin-left:30upx;" @click="confirmClass()">确认</button>
+        </view>
+      </uni-popup>
+
+  </view>
+</template>
+<script>
+import { list } from "@/mixins";
+import { getRefundListByItem } from "@/api/refund"
+import { getAllItemClass } from "@/api/item-class"
+import DateSelect from "@/components/module/dateSelect";
+export default {
+  name: "refundAllList",
+  components: {DateSelect},
+  mixins: [list],
+  data() {
+    return {
+      itemClassData:[],
+      status:'',
+      totalAmount:0,
+      searchTime:'',
+      startTime:'',
+      endTime:''
+    };
+  },
+  onPullDownRefresh() {
+    this.resetList();
+    this.getRefundData().then((res) => {
+      uni.stopPullDownRefresh();
+    });
+  },
+  onReachBottom() {
+    if (!this.list.finished) {
+      this.getRefundData().then((res) => {
+        uni.stopPullDownRefresh();
+      });
+    } else {
+      uni.stopPullDownRefresh();
+    }
+  },
+  mounted() {
+  },
+  onLoad(option) {
+  	this.resetList();
+    this.getRefundData();
+  },
+  methods: {
+    selectDateFn(val) {
+      this.searchTime = val.searchTime
+      this.startTime = val.startTime
+      this.endTime = val.endTime
+      this.resetList()
+      this.getRefundData()
+    },
+    cancelClass(){
+      this.$refs.classRef.close()
+    },
+    confirmClass(){
+      this.$refs.classRef.close()
+      this.resetList()
+      this.getRefundData()
+    },
+    setPass(){
+      this.status = this.status == 0 ? 1 : 0
+      this.resetList()
+      this.getRefundData()
+    },
+    changeClass(){
+      this.$refs.classRef.open('center')
+    },
+    setClass(index){
+      this.itemClassData[index].select = this.itemClassData[index].select == 0 ? 1 : 0
+      this.$forceUpdate()
+    },
+    init(){
+      getAllItemClass().then(res => {
+        if (!this.$util.isEmpty(res.data)){
+          let list = res.data
+          this.itemClassData = list.map(ele => { 
+	          return { ...ele,select:0}
+          })
+        }
+      })
+    },
+    goDetail(item){
+      if(item.book == 1){
+        this.$msg('预订单多退少补')
+        return false
+      }
+      this.$util.pageTo({url: '/pagesOrder/refundDetail',query: {id: item.id}})
+    },
+    getRefundData() {
+      let ids = []
+      this.itemClassData.forEach((item) => {
+        if(item.select == 1){
+          ids.push(item.id)
+        }
+      })
+      getRefundListByItem({
+        page: this.list.page,
+        status:this.status,
+        ids:JSON.stringify(ids),
+        searchTime: this.searchTime,
+        startTime: this.startTime,
+        endTime: this.endTime
+      }).then((res) => {
+        this.completes(res)
+        this.totalAmount = res.data.totalAmount ? parseFloat(res.data.totalAmount) : 0
+        if (this.$util.isEmpty(res.data)){
+          return false
+        }
+      });
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+	.app-content{
+		.list{
+			padding: 20upx 30upx;
+			margin-bottom: 20upx;
+			background: #FFFFFF;
+			.label{
+        position: relative;
+				line-height: 50upx;
+				text{
+					display: block;
+				}
+			}
+			.val{
+				font-size: 25upx;
+				.iconfont{
+					margin-left: 12upx;
+					color: #999999;
+				}
+			}
+		}
+	}
+  .pass-red{
+    font-weight:bold;
+    color:red;
+  }
+  .cancel-pass{
+    font-weight: normal;
+    color:black;
+  }
+</style>