shish 1 день назад
Родитель
Сommit
225f62847a

+ 1 - 0
ghsApp/src/pages.json

@@ -119,6 +119,7 @@
 				{"path": "allot","style": {"navigationBarTitleText": "分配"}},
 				{"path": "refundSuccess","style": {"navigationBarTitleText": "结果"}},
 				{"path": "refundList","style": {"navigationBarTitleText": "售后记录", "enablePullDownRefresh": true}},
+				{"path": "forwardList","style": {"navigationBarTitleText": "冲销记录", "enablePullDownRefresh": true}},
 				{"path": "refundAllList","style": {"navigationBarTitleText": "售后记录", "enablePullDownRefresh": false}},
 				{"path": "bookChange","style": {"navigationBarTitleText": "变动记录", "enablePullDownRefresh": false}},
 				{"path": "combine","style": {"navigationBarTitleText": "分配结果", "enablePullDownRefresh": false}},

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

@@ -233,14 +233,22 @@
 					<view>过期时间:</view>
 					<view>{{detailInfo.deadline?detailInfo.deadline.substr(5,11):''}}</view>
 				</view>
-				<!-- 累计退款 = 常规售后退款(tkPrice) + 冲销单退款(forwardPrice),任一有记录都展示本行;ssh 冲销单功能 -->
-				<view v-if="detailInfo.refundLog == 1 || detailInfo.hasForward == 1" class="order-info_box" style="margin-top:40upx;">
+				<!-- 累计退款:常规售后退款(tkPrice),与冲销单退款分开展示;ssh 冲销单功能 -->
+				<view v-if="detailInfo.refundLog == 1" class="order-info_box" style="margin-top:40upx;">
 					<view>累计退款:</view>
-					<view style="color:red;font-weight:bold;font-size:30upx;">{{parseFloat((Number(detailInfo.tkPrice)||0) + (Number(detailInfo.forwardPrice)||0))}}</view>
+					<view style="color:red;font-weight:bold;font-size:30upx;">{{parseFloat(detailInfo.tkPrice)}}</view>
 					<view class="price">
 						<button @click="pageTo({url: '/pagesOrder/refundList',query: {orderSn: detailInfo.orderSn}})" style="color:red;border: 1upx solid red;" class="admin-button-com">售后记录</button>
 					</view>
 				</view>
+				<!-- 累计冲销:冲销单退款(forwardPrice),独立一行 + 独立的冲销记录页;ssh 冲销单功能 -->
+				<view v-if="detailInfo.hasForward == 1" class="order-info_box" style="margin-top:40upx;">
+					<view>累计冲销:</view>
+					<view style="color:red;font-weight:bold;font-size:30upx;">{{parseFloat(detailInfo.forwardPrice || 0)}}</view>
+					<view class="price">
+						<button @click="pageTo({url: '/pagesOrder/forwardList',query: {orderSn: detailInfo.orderSn}})" style="color:red;border: 1upx solid red;" class="admin-button-com">冲销记录</button>
+					</view>
+				</view>
 			</view>
 
 			<view class="content-box shipping-address" v-if="detailInfo.expressProgress!=''">

+ 103 - 0
ghsApp/src/pagesOrder/forwardList.vue

@@ -0,0 +1,103 @@
+<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?item.addTime.substr(5,11):''}}</text>
+              <text>单号:{{item.forwardOrderSn}}</text>
+              <text>操作:{{item.shopAdminName}}</text>
+              <text>库存:{{item.forwardStock == 0 ? '已退回' : '未退回'}}</text>
+          </view>
+          <view class="flex val">-¥{{parseFloat(item.forwardPrice)}} <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>
+// 冲销记录列表页:ssh 冲销单功能,与售后记录(refundList.vue)分开展示,按原单单号查询关联的冲销单记录
+import { list } from "@/mixins";
+import { getForwardListByOrder } from "@/api/order";
+export default {
+  name: "forwardList",
+  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: {
+    init(){
+
+    },
+    goDetail(item){
+      if(!item.forwardOrderId){
+        return
+      }
+      this.$util.pageTo({url: '/pagesOrder/detail',query: {id: item.forwardOrderId}})
+    },
+    /** 冲销记录不分页,一次性拉取完(按原单关联的冲销单数量通常很少),接口未返回 moreData 字段,completes 会自动标记 finished */
+    _list() {
+      return getForwardListByOrder({
+        orderSn: this.option.orderSn
+      }).then((res) => {
+        this.completes(res);
+        if (this.$util.isEmpty(res.data.list)){
+          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;
+				color: #ff2842;
+				.iconfont{
+					margin-left: 12upx;
+					color: #999999;
+				}
+			}
+		}
+	}
+</style>

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

@@ -19,36 +19,19 @@
 			  </view>
 			</block>
 			<block v-else>
-				<app-wrapper-empty title="暂无售后记录" :is-empty="$util.isEmpty(list.data)" />
-			</block>
-
-			<!-- 冲销记录:ssh 冲销单功能,展示在售后记录下方,单独一块(关联原单的冲销单,不分页) -->
-			<block v-if="!$util.isEmpty(forwardList)">
-				<view class="forward-title">冲销记录</view>
-				<view class="flex-space list forward-item" v-for="(item, index) in forwardList" :key="'forward'+index" @click="goForwardDetail(item)">
-					<view class="label">
-						<text>日期:{{item.addTime?item.addTime.substr(5,11):''}}</text>
-						<text>单号:{{item.forwardOrderSn}}</text>
-						<text>操作:{{item.shopAdminName}}</text>
-						<text>库存:{{item.forwardStock == 0 ? '已退回' : '未退回'}}</text>
-					</view>
-					<view class="flex val">-¥{{parseFloat(item.forwardPrice)}} <view class="iconfont iconxiangyou"></view> </view>
-				</view>
+				<app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
 			</block>
   </view>
 </template>
 <script>
 import { list } from "@/mixins";
 import { refundList } from "@/api/refund";
-import { getForwardListByOrder } from "@/api/order";
 export default {
   name: "refundList",
   components: {},
   mixins: [list],
   data() {
     return {
-      //关联原单的冲销记录,ssh 冲销单功能
-      forwardList: []
     };
   },
   onPullDownRefresh() {
@@ -73,7 +56,6 @@ export default {
   onShow() {
   	this.resetList();
     this._list();
-    this._getForwardList();
   },
   methods: {
     init(){
@@ -86,12 +68,6 @@ export default {
       }
       this.$util.pageTo({url: '/pagesOrder/refundDetail',query: {id: item.id}})
     },
-    goForwardDetail(item){
-      if(!item.forwardOrderId){
-        return
-      }
-      this.$util.pageTo({url: '/pagesOrder/detail',query: {id: item.forwardOrderId}})
-    },
     _list() {
       return refundList({
         page: this.list.page,
@@ -103,17 +79,6 @@ export default {
         }
       });
     },
-    /** 拉取当前订单关联的冲销记录,ssh 冲销单功能 */
-    _getForwardList() {
-      if(this.$util.isEmpty(this.option.orderSn)){
-        return
-      }
-      getForwardListByOrder({orderSn: this.option.orderSn}).then((res) => {
-        if(res.code == 1){
-          this.forwardList = res.data.list || []
-        }
-      })
-    },
   },
 };
 </script>
@@ -138,16 +103,5 @@ export default {
 				}
 			}
 		}
-		.forward-title{
-			padding: 20upx 30upx 10upx;
-			font-size: 28upx;
-			font-weight: bold;
-			color: #999999;
-		}
-		.forward-item{
-			.val{
-				color: #ff2842;
-			}
-		}
 	}
 </style>

+ 1 - 0
hdApp/src/pages.json

@@ -555,6 +555,7 @@
 				{ "path": "bookProduct2", "style": { "navigationBarTitleText": "预订花材", "enablePullDownRefresh": false } },
 				{ "path": "bookExplain", "style": { "navigationBarTitleText": "预订说明", "enablePullDownRefresh": true } },
 				{ "path": "refundList","style": {"navigationBarTitleText": "售后记录", "enablePullDownRefresh": true } },
+				{ "path": "forwardList","style": {"navigationBarTitleText": "冲销记录", "enablePullDownRefresh": true } },
 				{ "path": "readMe","style": {"navigationBarTitleText": "购买须知", "enablePullDownRefresh": true } },
 				{ "path": "afterSale","style": {"navigationBarTitleText": "拍照示例", "enablePullDownRefresh": true } },
 				{ "path": "bookReadMe","style": {"navigationBarTitleText": "预订须知", "enablePullDownRefresh": true } },

+ 102 - 0
hdApp/src/pagesPurchase/forwardList.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?item.addTime.substr(5,11):''}}</text>
+              <text>单号:{{item.forwardOrderSn}}</text>
+              <text>库存:{{item.forwardStock == 0 ? '已退回' : '未退回'}}</text>
+          </view>
+          <view class="flex val">-{{parseFloat(item.forwardPrice)}} <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>
+// 冲销记录列表页:ssh 冲销单功能,与售后记录(refundList.vue)分开展示,按当前采购单反查关联的冲销单记录
+import { list } from "@/mixins";
+import { getForwardListByOrder } from "@/api/purchase";
+export default {
+  name: "forwardList",
+  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: {
+    init(){
+
+    },
+    goDetail(item){
+      if(!item.forwardCgId){
+        return
+      }
+      this.$util.pageTo({url: '/pagesPurchase/purDetails',query: {id: item.forwardCgId}})
+    },
+    /** 冲销记录不分页,一次性拉取完(按当前采购单关联的冲销单数量通常很少) */
+    _list() {
+      return getForwardListByOrder({
+        id: this.option.id
+      }).then((res) => {
+        this.completes(res);
+        if (this.$util.isEmpty(res.data.list)){
+          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;
+				color: #ff2842;
+				.iconfont{
+					margin-left: 12upx;
+					color: #999999;
+				}
+			}
+		}
+	}
+</style>

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

@@ -122,10 +122,10 @@
           <view>{{ getSendStatusText(detailInfo.sendStatus) }}</view>
         </view>
 
-        <!-- 累计退款 = 常规售后退款(tkPrice) + 冲销单退款(forwardPrice),任一有记录都展示本行;ssh 冲销单功能 -->
-        <view v-if="(detailInfo.refundLog && detailInfo.refundLog == 1) || detailInfo.hasForward == 1" class="order-info_box">
+        <!-- 累计退款:常规售后退款(tkPrice),与冲销单退款分开展示;ssh 冲销单功能 -->
+        <view v-if="detailInfo.refundLog && detailInfo.refundLog == 1" class="order-info_box">
           <view>累计退款:</view>
-          <view style="color:red;font-weight:bold;font-size:30upx;">¥{{parseFloat((Number(detailInfo.tkPrice)||0) + (Number(detailInfo.forwardPrice)||0))}}</view>
+          <view style="color:red;font-weight:bold;font-size:30upx;">¥{{detailInfo.tkPrice?parseFloat(detailInfo.tkPrice):0}}</view>
             <view class="price">
               <button @click="pageTo({url: '/pagesPurchase/refundList?id='+detailInfo.id})" class="admin-button-com">售后记录</button>
             </view>
@@ -134,6 +134,14 @@
           <view>退款方式:</view>
           <view style="color:red;font-weight:bold;font-size:30upx;">{{detailInfo.tkExplain||''}}</view>
         </view>
+        <!-- 累计冲销:冲销单退款(forwardPrice),独立一行 + 独立的冲销记录页;ssh 冲销单功能 -->
+        <view v-if="detailInfo.hasForward == 1" class="order-info_box">
+          <view>累计冲销:</view>
+          <view style="color:red;font-weight:bold;font-size:30upx;">¥{{parseFloat(detailInfo.forwardPrice || 0)}}</view>
+            <view class="price">
+              <button @click="pageTo({url: '/pagesPurchase/forwardList?id='+detailInfo.id})" class="admin-button-com">冲销记录</button>
+            </view>
+        </view>
 
       </view>
 

+ 1 - 45
hdApp/src/pagesPurchase/refundList.vue

@@ -14,32 +14,17 @@
 
 			  </view>
 			</block>
-			<!-- 冲销记录:ssh 冲销单功能,展示在售后记录下方,单独一块(关联原单的冲销单,不分页) -->
-			<block v-if="!$util.isEmpty(forwardList)">
-				<view class="forward-title">冲销记录</view>
-				<view class="flex-space list forward-item" v-for="(item, index) in forwardList" :key="'forward'+index" @click="goForwardDetail(item)">
-					<view class="label">
-						<text>日期:{{item.addTime?item.addTime.substr(5,11):''}}</text>
-						<text>单号:{{item.forwardOrderSn}}</text>
-						<text>库存:{{item.forwardStock == 0 ? '已退回' : '未退回'}}</text>
-					</view>
-					<view class="flex val">-{{parseFloat(item.forwardPrice)}} <view class="iconfont iconxiangyou"></view> </view>
-				</view>
-			</block>
   </view>
 </template>
 <script>
 import { list } from "@/mixins";
 import { cgRefundList } from "@/api/cg-refund";
-import { getForwardListByOrder } from "@/api/purchase";
 export default {
   name: "refundList",
   components: {},
   mixins: [list],
   data() {
     return {
-      //关联原采购单的冲销记录,ssh 冲销单功能
-      forwardList: []
     };
   },
   onPullDownRefresh() {
@@ -64,7 +49,6 @@ export default {
   onShow() {
   	this.resetList();
     this.getRefundList();
-    this.getForwardList();
   },
   methods: {
     init(){
@@ -77,12 +61,6 @@ export default {
       }
       this.$util.pageTo({url: '/pagesPurchase/refundDetail',query: {id: item.id}})
     },
-    goForwardDetail(item){
-      if(!item.forwardCgId){
-        return
-      }
-      this.$util.pageTo({url: '/pagesPurchase/purDetails',query: {id: item.forwardCgId}})
-    },
     getRefundList() {
       return cgRefundList({
         page: this.list.page,
@@ -94,17 +72,6 @@ export default {
         }
       });
     },
-    /** 拉取当前采购单关联的冲销记录,ssh 冲销单功能 */
-    getForwardList() {
-      if(this.$util.isEmpty(this.option.id)){
-        return
-      }
-      getForwardListByOrder({id: this.option.id}).then((res) => {
-        if(res.code == 1){
-          this.forwardList = res.data.list || []
-        }
-      })
-    },
   },
 };
 </script>
@@ -129,16 +96,5 @@ export default {
 				}
 			}
 		}
-		.forward-title{
-			padding: 20upx 30upx 10upx;
-			font-size: 28upx;
-			font-weight: bold;
-			color: #999999;
-		}
-		.forward-item{
-			.val{
-				color: #ff2842;
-			}
-		}
 	}
-</style>
+</style>