Jelajahi Sumber

退款流程

shish 4 tahun lalu
induk
melakukan
173877f7f8

+ 4 - 3
ghsApp/src/admin/home/components/OrderItem.vue

@@ -9,9 +9,9 @@
         <image style="width: 38upx;height:38upx;border-radius:38upx;" mode="aspectFit" :src="item.customAvatarUrl"></image>
           <view class="tit"> {{ item.customName || "" }}</view>
 
-          <text class="other-book" v-if="item.book == 1" >预订单</text>
           <view class="other-refund" v-if="item.refund==2">有退款</view>
           <view class="other-status" v-if="item.debt == 1">欠款</view>
+          <text class="other-book" v-if="item.book == 1" >预订单</text>
           <view :class="['status',item.status == '3' ? 'buleColor' : item.status == '6' ? 'defColor' : '']">{{ statusFormat(item.status) }}</view>
         </view>
         <view class="order-list_info">
@@ -152,6 +152,7 @@ export default {
     padding:5upx 10upx;
     font-size:20upx;
     background:#657cac;
+    margin-right:20upx;
   }
   & > .other-refund{
     flex: 1.5;
@@ -161,7 +162,7 @@ export default {
     border-radius:30upx;
     padding:5upx 12upx;
     font-size:20upx;
-    margin-left:20upx;
+    margin-right:20upx;
   }
   & > .other-status{
     flex: 1;
@@ -171,7 +172,7 @@ export default {
     border-radius:30upx;
     padding:5upx 12upx;
     font-size:20upx;
-    margin-left:20upx;
+    margin-right:20upx;
   }
   & > .status {
     flex: 2;

+ 0 - 5
ghsApp/src/admin/item/components/ItemStock.vue

@@ -54,12 +54,7 @@ export default {
 	},
 	methods: {
 		moreToDo(item){
-			// #ifdef MP-WEIXIN
-			this.$msg('请在app上操作')
-			// #endif
-			// #ifdef APP-PLUS
 			this.$emit('moreToDo', item)
-			// #endif
 		},
 		goToOrderDetail(id){
 			this.$util.pageTo({url: "/admin/order/itemOrder?id="+id})

+ 6 - 6
ghsApp/src/admin/item/list.vue

@@ -98,17 +98,17 @@ export default {
 		})
 	},
 	methods: {
-		// #ifdef APP-PLUS
+		
 		moreToDo(item){
 			//查询是否已经连接蓝牙
 			let that=this;
-			let doList = ['打印条形', '打印条形2个', '打印条形5个','打印条形10个','打印条形20个']
-			let doNum = [1,2,5,10,20]
+			let doList = ['采购记录','打印1个条形', '打印条形2个', '打印条形5个','打印条形10个','打印条形20个']
+			let doNum = [0,1,2,5,10,20]
 			uni.showActionSheet({
 				itemList: doList,
 				success: function (respond) {
 					let index = respond.tapIndex
-
+					// #ifdef APP-PLUS
 					plug.state({},ret=>{
 						if(ret.code == 1){
 
@@ -126,12 +126,12 @@ export default {
 							}
 						}
 					})
-
+					// #endif
 				}
 			})
 
 		},
-		// #endif
+		
 		OrderLable(itemName,itemId){
 			
 			//制作标签格式, 

+ 7 - 3
ghsApp/src/pagesOrder/detail.vue

@@ -70,7 +70,7 @@
 					<view>{{detailInfo.deadline}}</view>
 				</view>
 				<view v-if="detailInfo.refund == 2" class="order-info_box">
-					<view>退款金额:</view>
+					<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: '/pagesOrder/refundList',query: {orderSn: detailInfo.orderSn}})" class="admin-button-com">退款记录</button>
@@ -168,11 +168,15 @@
 					</tui-list-cell>
 					<tui-list-cell v-if="detailInfo.discountAmount > 0" class="line-cell" :hover="false">
 						<div class="tui-title"><text v-if="detailInfo.discountType == 4">红包</text><text v-else>优惠金额</text></div>
-						<div class="detail-price_box red" style="font-size: 28upx">-¥{{ parseFloat(detailInfo.discountAmount) }}</div>
+						<div class="detail-price_box" style="font-size: 28upx">-¥{{ parseFloat(detailInfo.discountAmount) }}</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.orderPrice) }}</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 red" style="font-size: 28upx">-¥{{ parseFloat(detailInfo.refundPrice) }}</div>
+						<div class="detail-price_box" style="font-size: 28upx">-¥{{ parseFloat(detailInfo.refundPrice) }}</div>
 					</tui-list-cell>
 					<tui-list-cell class="line-cell" :hover="false">
 						<div class="tui-title">实际金额</div>

+ 9 - 3
ghsApp/src/pagesOrder/refund.vue

@@ -31,13 +31,13 @@
 		<view class="flex refund-item">
 			<view class="refund-label">订单金额:</view>
 			<view class="list">
-				¥{{parseFloat(orderInfo.prePrice)||0}}
+				¥{{parseFloat(orderInfo.orderPrice)||0}}
 				<text style="margin-left:25upx;font-size:25upx;color:green;" v-if="Number(orderInfo.tkPrice)>0">已退¥{{orderInfo.tkPrice}}</text>
 			</view>
 		</view>
 		<view class="flex refund-item">
 			<view class="refund-label">可退金额:</view>
-			<view class="list">¥{{parseFloat(orderInfo.prePrice)||0}}</view>
+			<view class="list">¥{{coundRefundPrice}}</view>
 		</view>
 		<view class="flex refund-item">
 			<view class="refund-label"><text></text>退款金额:</view>
@@ -71,7 +71,8 @@ export default {
 			refundMoney:0,
 			refundType:1,
 			remark:'',
-			orderInfo:{}
+			orderInfo:{},
+			coundRefundPrice:0
 		};
 	},
 	onShow() {
@@ -139,6 +140,11 @@ export default {
 			//getOriginalItem 取原有的花材结构(小菊的花材结构有变化)
 			const res = await getDetail({ id: this.option.id,getOriginalItem:1 })
 			this.orderInfo = res.data
+			
+			this.coundRefundPrice = Number(res.data.orderPrice) - Number(res.data.tkPrice)
+			this.coundRefundPrice = this.coundRefundPrice.toFixed(2)
+			this.coundRefundPrice = parseFloat(this.coundRefundPrice)
+
 			this.product = res.data.product.map(ele=>{
 				return {...ele,refundCount:null}
 			})

+ 4 - 8
ghsApp/src/pagesOrder/refundList.vue

@@ -3,20 +3,16 @@
 			<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>类型:{{item.book == 1 ? '预订单多退少补' :'普通'}}</text>
 
               <text style="position:absolute;right:-425upx;top:0upx;">{{ item.status==0?'退款中':item.status==1?'已完成':'退款中' }}</text>    
 
           </view>
-          <view class="flex val">{{item.refundPrice}} <view class="iconfont iconxiangyou"></view> </view>
-
-
+          <view class="flex val">¥{{parseFloat(item.refundPrice)}} <view class="iconfont iconxiangyou"></view> </view>
 
 			  </view>
 			</block>
@@ -62,10 +58,10 @@ export default {
   methods: {
     goDetail(item){
       if(item.book == 1){
-        this.$msg('预订单多付退款')
+        this.$msg('预订单多退少补')
         return false
       }
-      this.$util.pageTo({url: '/pagesOrder/refundMsg',query: {orderSn: item.relateOrderSn}})
+      this.$util.pageTo({url: '/pagesOrder/refundMsg',query: {id: item.id}})
     },
     _list() {
       return refundList({

+ 55 - 95
ghsApp/src/pagesOrder/refundMsg.vue

@@ -1,3 +1,57 @@
+<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);
@@ -75,98 +129,4 @@
 			}
 		}
 	}
-</style>
-<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.itemName}}  {{`¥${res.itemPrice}`}}
-						</view>
-						<view class="flex list-val">
-							<input type="text" @focus="isMonitor = true" disabled v-model="res.bigNum"><text>扎</text>
-							<input type="text" @focus="isMonitor = true" disabled v-model="res.smallNum"><text>支</text>
-						</view>
-					</view>
-					</view>
-				</view>
-				<view class="flex refund-item">
-					<view class="refund-label">订单原价:</view>
-					<view class="list">{{parseFloat(prePrice)||0}}</view>
-				</view>
-
-				<view class="flex refund-item" v-if="discountType == 4">
-					<view class="refund-label">红包优惠:</view>
-					<view class="list">
-						<text style="color:red;margin-right:20upx;">-{{parseFloat(discountAmount) || 0}}</text>
-						<text v-if="parseFloat(realPrice) == parseFloat(refundMoney)" style="color:red;">红包已退还</text>
-					</view>
-				</view>
-
-				<view class="flex refund-item">
-					<view class="refund-label">实付金额:</view>
-					<view class="list">{{parseFloat(realPrice)||0}}</view>
-				</view>
-
-				<view class="flex refund-item">
-					<view class="refund-label"><text></text>退款金额:</view>
-					<input type="text" disabled v-model="refundMoney">
-				</view>
-		<view class=" refund-item">
-			<view class="refund-label">备注:</view>
-			<textarea disabled v-model="remark" />
-		</view>
-	</view>
-</template>
-<script>
-import { refundDetail } from "@/api/refund/index";
-export default {
-	data() {
-		return {
-			isMonitor:true,
-			product:'',
-			refundMoney:0,
-			refundType:1,
-			remark:'',
-			refundInfo:{},
-			realPrice:0,
-			prePrice:0,
-			discountType:0,
-			discountAmount:0
-		};
-	},
-	onShow() {
-	},
-	methods: {
-		init() {
-			refundDetail({
-				orderSn: this.option.orderSn
-			}).then(res=>{
-				this.refundInfo = res.data
-				this.product = res.data.itemInfo;
-				this.refundType = res.data.refundType;
-				this.refundMoney = res.data.refundPrice;
-				this.remark = res.data.remark;
-				this.prePrice = res.data.orderInfo.prePrice
-				this.discountType = res.data.orderInfo.discountType || 0
-				this.discountAmount = res.data.orderInfo.discountAmount || 0
-				if(this.discountType == 4){
-					let realPrice = (Number(res.data.orderInfo.prePrice) - Number(res.data.orderInfo.discountAmount)).toFixed(2)
-					this.realPrice = parseFloat(realPrice)
-				}else{
-					this.realPrice = parseFloat(res.data.orderInfo.realPrice)
-				}
-			})
-
-		},
-	}
-};
-</script>
+</style>

+ 1 - 2
hdApp/src/pagesPurchase/orderItem.vue

@@ -7,10 +7,9 @@
           <text>{{ info.ghsName}}</text>
         </text>
       </view>
-      <text v-if="info.book == 1" class="status" 
-      style="color:white;border:1px solid #657cac;border-radius:20upx;font-size:20upx;padding:5upx 12upx;margin-right:40upx;background:#657cac;">预订单</text>
       <view v-if="info.refund == 2" class="status" style="color:red;border:1px solid red;border-radius:20upx;font-size:20upx;padding:5upx 12upx;margin-right:40upx;">有退款 </view>
       <view v-if="info.debt == 1" class="status" style="color:red;border:1px solid red;border-radius:20upx;font-size:20upx;padding:5upx 12upx;margin-right:40upx;">欠款 </view>
+      <text v-if="info.book == 1" class="status"  style="color:white;border:1px solid #657cac;border-radius:20upx;font-size:20upx;padding:5upx 12upx;margin-right:40upx;background:#657cac;">预订单</text>
       <view class="status">{{ getStatusName }} </view>
     </view>
     <view class="item-main" >

+ 7 - 3
hdApp/src/pagesPurchase/purDetails.vue

@@ -62,7 +62,7 @@
         </view>
 
         <view v-if="detailInfo.refund == 2" class="order-info_box">
-          <view>退款金额:</view>
+          <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: {id: detailInfo.id}})" class="admin-button-com">退款记录</button>
@@ -155,11 +155,15 @@
           </tui-list-cell>
           <tui-list-cell class="line-cell" :hover="false" v-if="detailInfo.discountAmount > 0">
             <div class="tui-title"><text v-if="detailInfo.discountType == 4">红包优惠</text><text v-else>优惠</text></div>
-            <div class="detail-price_box red" style="font-size: 28upx;">-¥{{ parseFloat(detailInfo.discountAmount)||0}}</div>
+            <div class="detail-price_box" style="font-size: 28upx;">-¥{{ parseFloat(detailInfo.discountAmount)||0}}</div>
+          </tui-list-cell>
+          <tui-list-cell class="line-cell" :hover="false" v-if="detailInfo.refundPrice > 0">
+            <div class="tui-title">订单金额</div>
+            <div class="detail-price_box" style="font-size: 28upx;">¥{{ parseFloat(detailInfo.orderPrice)||0}}</div>
           </tui-list-cell>
           <tui-list-cell class="line-cell" :hover="false" v-if="detailInfo.refundPrice > 0">
             <div class="tui-title">退款金额</div>
-            <div class="detail-price_box red" style="font-size: 28upx;">-¥{{ parseFloat(detailInfo.refundPrice)||0}}</div>
+            <div class="detail-price_box" style="font-size: 28upx;">-¥{{ parseFloat(detailInfo.refundPrice)||0}}</div>
           </tui-list-cell>
           <tui-list-cell class="line-cell" :hover="false">
             <div class="tui-title">实际金额</div>

+ 6 - 38
hdApp/src/pagesPurchase/refundDetail.vue

@@ -15,7 +15,7 @@
                   <text class="item-name">{{ s.name }}</text>
                   <text class="item-price">
                     <text class="unit"></text>
-                    <text class="price"><text>{{s.itemNum}}扎</text></text>
+                    <text class="price"><text>¥{{parseFloat(s.xhUnitPrice)}}*{{s.xhNum}}{{s.xhUnitName}}</text></text>
                   </text>
                 </view>
                 <view class="info-line">
@@ -36,34 +36,17 @@
             <div class="detail-price_box red">¥{{ refundPrice }}</div>
 					</tui-list-cell>
 
-					<tui-list-cell class="line-cell" :hover="false" v-if="hbRefund == 1">
-						<div class="tui-title">红包</div>
-            <div class="detail-price_box red">已退回</div>
-					</tui-list-cell>
-
 				</div>
 			</view>
 
       <view v-if="detailInfo.remark !=''" class="content-box price-detail">
         <div class="module-com input-line-wrap">
-          <tui-list-cell
-            class="line-cell"
-            :hover="false"
-          >
+          <tui-list-cell class="line-cell" :hover="false" >
             <div class="tui-title">备注</div>
-            <input
-              :disabled="true"
-              v-model="refundData.info.remark"
-              placeholder-class="phcolor"
-              class="tui-input"
-              name="name"
-              maxlength="50"
-              type="text"
-            />
+            <input :disabled="true" v-model="refundData.info.remark" placeholder-class="phcolor" class="tui-input" name="name" maxlength="50" type="text" />
           </tui-list-cell>
         </div>
       </view>
-      <view v-if="refundData.cgInfo.discountType == 4" style="margin-top:30upx;color:red;font-weight:400;font-size:30upx;">此单使用红包,红包抵扣部分不能退款。</view>
 
     </view>
   </view>
@@ -80,12 +63,7 @@ export default {
   data () {
     return {
       refundData:{},
-      prePrice:0,
-      actPrice:0,
-      discountType:0,
-      discountAmount:0,
-      refundPrice:0,
-      hbRefund:0
+      refundPrice:0
     };
   },
   onPullDownRefresh() {
@@ -100,16 +78,6 @@ export default {
     initData () {
       getRefundData({ id: this.option.id }).then(res => {
         this.refundData = res.data
-        this.prePrice = res.data.cgInfo.prePrice
-        this.discountType = res.data.cgInfo.discountType
-        this.discountAmount = res.data.cgInfo.discountAmount
-        if(this.discountType == 4){
-          let actPrice = (Number(res.data.cgInfo.prePrice) - Number(res.data.cgInfo.discountAmount)).toFixed(2)
-          this.actPrice = parseFloat(actPrice)
-        }else{
-          this.actPrice = parseFloat(res.data.cgInfo.actPrice)
-        }
-        this.hbRefund = res.data.info.hbRefund
         this.refundPrice = parseFloat(res.data.info.refundPrice)
       })
     }
@@ -224,9 +192,9 @@ export default {
             }
             .item-price {
               color: #333;
-              font-size: 22upx;
+              font-size: 25upx;
               .price {
-                font-size: 30upx;
+                font-size: 22upx;
                 font-weight: bold;
               }
             }

+ 2 - 2
hdApp/src/pagesPurchase/refundList.vue

@@ -9,7 +9,7 @@
               <text>日期:{{item.addTime.substr(5,11)}}</text>
               <text>单号:{{item.orderSn}}</text>
               <text>操作:{{item.shopAdminName}}</text>
-              <text>类型:{{item.book == 1 ? '预订单多付退款' :'普通'}}</text>
+              <text>类型:{{item.book == 1 ? '预订单多退少补' :'普通'}}</text>
 
               <text style="position:absolute;right:-425upx;top:0upx;">{{ item.status==0?'退款中':item.status==1?'已完成':'退款中' }}</text>    
 
@@ -62,7 +62,7 @@ export default {
   methods: {
     goDetail(item){
       if(item.book == 1){
-        this.$msg('预订单多付退款')
+        this.$msg('预订单多退少补')
         return false
       }
       this.$util.pageTo({url: '/pagesPurchase/refundDetail',query: {id: item.id}})