shish пре 3 година
родитељ
комит
6a3339c4fe

+ 8 - 0
ghsApp/src/api/cg-refund/index.js

@@ -2,4 +2,12 @@ import https from "@/plugins/luch-request_0.0.7/request";
 
 export const createOrder = data => {
 	return https.post('/cg-refund/create-order', data)
+}
+
+export const getRefundList = data => {
+	return https.get('/cg-refund/get-refund-list', data)
+}
+
+export const getRefundFullInfo = data => {
+	return https.get('/cg-refund/get-refund-full-info', data)
 }

+ 2 - 1
ghsApp/src/pages.json

@@ -301,7 +301,8 @@
 				{ "path": "info", "style": { "navigationBarTitleText": "订单详情", "enablePullDownRefresh": true } },
 				{ "path": "refundList", "style": { "navigationBarTitleText": "记录", "enablePullDownRefresh": true } },
 				{ "path": "refundDetail", "style": { "navigationBarTitleText": "详情", "enablePullDownRefresh": true } },
-				{ "path": "refund", "style": { "navigationBarTitleText": "申请退款", "enablePullDownRefresh": true } }
+				{ "path": "refund", "style": { "navigationBarTitleText": "申请退款", "enablePullDownRefresh": true } },
+				{ "path": "refundSuccess", "style": { "navigationBarTitleText": "状态", "enablePullDownRefresh": true } }
 			]
 		},
 		{

+ 1 - 1
ghsApp/src/pagesPurchase/info.vue

@@ -51,7 +51,7 @@
 					<view>累计退款:</view>
 					<view style="color:red;font-weight:bold;font-size:30upx;">{{parseFloat(detailInfo.tkPrice)}}</view>
 					<view class="price" v-if="detailInfo.refund==2">
-						<button @click="pageTo({url: '/pagesPurchase/refundList',query: {orderSn: detailInfo.orderSn}})" class="admin-button-com">退款记录</button>
+						<text @click="pageTo({url: '/pagesPurchase/refundList',query: {orderSn: detailInfo.orderSn}})" style="font-weight:normal;color:#3385FF;">退款记录</text>
 					</view>
 				</view>
 

+ 1 - 1
ghsApp/src/pagesPurchase/refund.vue

@@ -145,7 +145,7 @@ export default {
 				createOrder(refundParams).then(res => {
 					if(res.code == 1){
 						uni.hideLoading()
-						uni.navigateTo({url:'/common/success',query:{titleType:1}})
+						that.$util.pageTo({url:'/pagesPurchase/refundSuccess',type:2})
 					}
 				})
 			})

+ 4 - 5
ghsApp/src/pagesPurchase/refundDetail.vue

@@ -11,7 +11,7 @@
 			<view>
 				<view class="list" v-for="(res,i) in product" :key="i">
 				<view class="flex list-title" >
-					{{res.name}} ¥{{parseFloat(res.xhUnitPrice)}}*{{res.xhNum}}{{res.xhUnitName}}=¥{{parseFloat(res.xhPrice)}}
+					{{res.name}} ¥{{parseFloat(res.unitPrice)}}*{{res.num}}{{res.unitName}}=¥{{parseFloat(res.price)}}
 				</view>
 			</view>
 			</view>
@@ -27,7 +27,7 @@
 	</view>
 </template>
 <script>
-import { refundDetail } from "@/api/refund/index";
+import { getRefundFullInfo } from "@/api/cg-refund";
 export default {
 	data() {
 		return {
@@ -41,13 +41,12 @@ export default {
 	},
 	methods: {
 		init() {
-			refundDetail({ id: this.option.id }).then(res=>{
+			getRefundFullInfo({ id: this.option.id }).then(res=>{
 				this.product = res.data.itemList||[];
 				this.refundType = res.data.info.refundType||0;
 				this.refundPrice = res.data.info.refundPrice||0;
-				this.remark = res.data.remark;
+				this.remark = res.data.info.remark;
 			})
-
 		},
 	}
 };

+ 10 - 22
ghsApp/src/pagesPurchase/refundList.vue

@@ -5,12 +5,10 @@
 
           <view class="label">
               <text>日期:{{item.addTime.substr(5,11)}}</text>
-              <text>单号:{{item.orderSn}}</text>
+              <text>单号:{{item.refundSn}}</text>
               <text>操作:{{item.shopAdminName}}</text>
-              <text>类型:{{item.book == 1 ? '预订单多退少补' :'普通'}}</text>
-
-              <text style="position:absolute;right:-425upx;top:0upx;">{{ item.status==0?'退款中':item.status==1?'已完成':'退款中' }}</text>    
-
+              <text>备注:{{item.remark}}</text>
+              <text style="position:absolute;right:-465upx;top:0upx;">{{ item.status==0?'退款中':item.status==1?'已完成':'退款中' }}</text>
           </view>
           <view class="flex val">¥{{parseFloat(item.refundPrice)}} <view class="iconfont iconxiangyou"></view> </view>
 
@@ -23,7 +21,7 @@
 </template>
 <script>
 import { list } from "@/mixins";
-import { refundList } from "@/api/refund";
+import { getRefundList } from "@/api/cg-refund";
 export default {
   name: "refundList",
   components: {},
@@ -34,13 +32,13 @@ export default {
   },
   onPullDownRefresh() {
     this.resetList();
-    this._list().then((res) => {
+    this.getRefundData().then((res) => {
       uni.stopPullDownRefresh();
     });
   },
   onReachBottom() {
     if (!this.list.finished) {
-      this._list().then((res) => {
+      this.getRefundData().then((res) => {
         uni.stopPullDownRefresh();
       });
     } else {
@@ -53,25 +51,15 @@ export default {
   },
   onShow() {
   	this.resetList();
-    this._list();
+    this.getRefundData();
   },
   methods: {
     goDetail(item){
-      if(item.book == 1){
-        this.$msg('预订单多退少补')
-        return false
-      }
       this.$util.pageTo({url: '/pagesPurchase/refundDetail',query: {id: item.id}})
     },
-    _list() {
-      return refundList({
-        page: this.list.page,
-        orderSn:this.option.orderSn
-      }).then((res) => {
-        this.completes(res);
-        if (this.$util.isEmpty(res.data)){
-          return false
-        }
+    getRefundData() {
+      return getRefundList({page: this.list.page,relateOrderSn:this.option.orderSn}).then((res) => {
+        this.completes(res)
       });
     },
   },

+ 35 - 0
ghsApp/src/pagesPurchase/refundSuccess.vue

@@ -0,0 +1,35 @@
+<template>
+  <appResult :title="title">
+	<button class="admin-button-com big blue" style="width:80%;margin-top:50upx;" @click="goBack">返回</button>
+  </appResult>
+</template>
+<script>
+import appResult from "@/components/app-result";
+export default {
+  name: "commonSuccess",
+  components: {
+    appResult
+  },
+	data() {
+		return {
+			title:'操作成功',
+		};
+	},
+	onShow(){
+
+	},
+	onUnload(){
+	},
+	methods: {
+        goBack() {
+            uni.navigateBack()
+        }
+  },
+};
+</script>
+<style lang="scss" scoped>
+.admin-button-com {
+	margin-bottom: 20upx;
+	width: 100%;
+}
+</style>