Browse Source

退货退款

shish 3 năm trước cách đây
mục cha
commit
152d522b53

+ 2 - 0
ghsApp/src/pages.json

@@ -299,6 +299,8 @@
        			{ "path": "supplier", "style": { "navigationBarTitleText": "供应商", "enablePullDownRefresh": true } },
         		{ "path": "suppAdd", "style": { "navigationBarTitleText": "添加供应商", "enablePullDownRefresh": true } },
 				{ "path": "info", "style": { "navigationBarTitleText": "订单详情", "enablePullDownRefresh": true } },
+				{ "path": "refundList", "style": { "navigationBarTitleText": "记录", "enablePullDownRefresh": true } },
+				{ "path": "refundDetail", "style": { "navigationBarTitleText": "详情", "enablePullDownRefresh": true } },
 				{ "path": "refund", "style": { "navigationBarTitleText": "申请退款", "enablePullDownRefresh": true } }
 			]
 		},

+ 13 - 0
ghsApp/src/pagesPurchase/info.vue

@@ -46,6 +46,15 @@
 						:'已退款'
 						 }}</view>
 				</view>
+
+				<view v-if="detailInfo.refund == 2" class="order-info_box">
+					<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>
+					</view>
+				</view>
+
 			</view>
 
 			<view class="bills-info_box content-box" style="margin-top:18upx;">
@@ -131,6 +140,10 @@
 						<div class="tui-title">总金额</div>
 						<div class="detail-price_box" style="font-size: 30upx;">¥{{ detailInfo.prePrice || 0.00 }}</div>
 					</tui-list-cell>
+					<tui-list-cell v-if="detailInfo.refundPrice > 0" class="line-cell" :hover="false">
+						<div class="tui-title">退款金额</div>
+						<div class="detail-price_box" style="font-size: 28upx">-¥{{ parseFloat(detailInfo.refundPrice) }}</div>
+					</tui-list-cell>
 					<tui-list-cell v-if="detailInfo.discountAmount > 0" class="line-cell" :hover="false">
 						<div class="tui-title">减免</div>
 						<div class="detail-price_box" style="font-size: 30upx;">¥{{ detailInfo.discountAmount || 0.00 }}</div>

+ 132 - 0
ghsApp/src/pagesPurchase/refundDetail.vue

@@ -0,0 +1,132 @@
+<template>
+	<view class="app-content">
+		<view class="flex refund-item">
+			<view class="refund-label">退款方式:</view>
+			<view class="flex list">
+				<view class="flex" >{{refundType==1?'退货并退款':'仅退款'}}</view>
+			</view>
+		</view>
+		<view class="refund-item-list" v-if="refundType==1">
+			<view class="refund-label">退货商品:</view>
+			<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)}}
+				</view>
+			</view>
+			</view>
+		</view>
+		<view class="flex refund-item">
+			<view class="refund-label"><text></text>退款金额:</view>
+			<view class="list">{{refundPrice}}</view>
+		</view>
+		<view class=" refund-item">
+			<view class="refund-label">备注信息:</view>
+			<view class="list">{{remak}}</view>
+		</view>
+	</view>
+</template>
+<script>
+import { refundDetail } from "@/api/refund/index";
+export default {
+	data() {
+		return {
+			product:'',
+			refundPrice:0,
+			refundType:1,
+			remark:''
+		};
+	},
+	onShow() {
+	},
+	methods: {
+		init() {
+			refundDetail({ 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;
+			})
+
+		},
+	}
+};
+</script>
+<style lang="scss" scoped>
+	.app-content{
+		height: calc(100vh - 30upx * 2);
+		padding: 30upx;
+		background: #FFFFFF;
+		.radioBtn{
+			width: 30upx;
+			height: 30upx;
+			margin-right: 10upx;
+			border: 1upx solid #ddd;
+			border-radius: 50%;
+			&.active{
+				position: relative;
+				border: 1upx solid #3385ff;
+				&:after{
+					content: '';
+					position: absolute;
+					width: 18upx;
+					height: 18upx;
+					background: #3385ff;
+					border-radius: 50%;
+				}
+			}
+		}
+		.refund-item-list{
+			display: flex;
+			padding-bottom: 30upx;
+			border-bottom: 1upx solid #dddddd;
+			.refund-label{
+				width: 200upx;
+				text{color: red;}
+			}
+			.list{
+				margin-bottom: 10upx;
+				.list-title{
+					height: 60upx;
+					padding-bottom: 20upx;
+
+				}
+				.list-val{
+					input{
+						width: 150upx;
+						border: 1upx solid #ddd;
+					}
+					text{
+						padding: 0 30upx;
+					}
+				}
+			}
+		}
+		.refund-item{
+			display: flex;
+			padding: 20upx 0;
+			.refund-label{width: 200upx;text{color: red;}}
+			input{
+				border: 1upx solid #ddd;
+			}
+			textarea{
+				width: calc(100% - 210upx);
+				border: 1upx solid #ddd;
+				height:150upx;
+			}
+		}
+		.btn-box{
+			.btn{
+				width: 200upx;
+				height: 60upx;
+				border: 1upx solid #666666;
+				border-radius: 10upx;
+				&.active{
+					background: #3385ff;
+					color: #fff;
+					border: 1upx solid #3385ff;
+				}
+			}
+		}
+	}
+</style>

+ 102 - 0
ghsApp/src/pagesPurchase/refundList.vue

@@ -0,0 +1,102 @@
+<template>
+  <view class="app-content">
+			<block v-if="!$util.isEmpty(list.data)">
+				<view class="flex-space list" v-for="(item, index) in list.data" :key="index" @click="goDetail(item)">
+
+          <view class="label">
+              <text>日期:{{item.addTime.substr(5,11)}}</text>
+              <text>单号:{{item.orderSn}}</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>    
+
+          </view>
+          <view class="flex val">¥{{parseFloat(item.refundPrice)}} <view class="iconfont iconxiangyou"></view> </view>
+
+			  </view>
+			</block>
+			<block v-else>
+				<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+			</block>
+  </view>
+</template>
+<script>
+import { list } from "@/mixins";
+import { refundList } from "@/api/refund";
+export default {
+  name: "refundList",
+  components: {},
+  mixins: [list],
+  data() {
+    return {
+    };
+  },
+  onPullDownRefresh() {
+    this.resetList();
+    this._list().then((res) => {
+      uni.stopPullDownRefresh();
+    });
+  },
+  onReachBottom() {
+    if (!this.list.finished) {
+      this._list().then((res) => {
+        uni.stopPullDownRefresh();
+      });
+    } else {
+      uni.stopPullDownRefresh();
+    }
+  },
+  mounted() {
+  },
+  onLoad(option) {
+  },
+  onShow() {
+  	this.resetList();
+    this._list();
+  },
+  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
+        }
+      });
+    },
+  },
+};
+</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;
+				}
+			}
+		}
+	}
+</style>