shish 8 hours ago
parent
commit
e996fea034

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

@@ -1,3 +1,6 @@
+<!--
+  上游采购售后详情:展示退款信息;sameDay=0 时显示「隔天售后」(对齐销售侧)
+-->
 <template>
 <template>
 	<view class="app-content">
 	<view class="app-content">
 		<view class="flex refund-item">
 		<view class="flex refund-item">
@@ -20,6 +23,12 @@
 			<view class="refund-label"><text></text>退款金额:</view>
 			<view class="refund-label"><text></text>退款金额:</view>
 			<view class="list">¥{{refundPrice}}</view>
 			<view class="list">¥{{refundPrice}}</view>
 		</view>
 		</view>
+		<!-- 仅隔天展示,与销售侧 refundDetail「售后类型」一致 -->
+		<view class="flex refund-item" v-if="isNextDayRefund">
+			<view class="refund-label">售后类型:</view>
+			<!-- 与列表页隔天售后同色 #e67e22 -->
+			<view class="list" style="color:#e67e22;font-weight:bold;">隔天售后</view>
+		</view>
 		<view class=" refund-item" v-if="!$util.isEmpty(remark)">
 		<view class=" refund-item" v-if="!$util.isEmpty(remark)">
 			<view class="refund-label" style="color:red;font-weight:bold;">备注信息:</view>
 			<view class="refund-label" style="color:red;font-weight:bold;">备注信息:</view>
 			<view class="list" style="color:red;font-weight:bold;">{{remark}}</view>
 			<view class="list" style="color:red;font-weight:bold;">{{remark}}</view>
@@ -34,18 +43,28 @@ export default {
 			product:'',
 			product:'',
 			refundPrice:0,
 			refundPrice:0,
 			refundType:1,
 			refundType:1,
-			remark:''
+			remark:'',
+			sameDay: 1
 		};
 		};
 	},
 	},
+	computed: {
+		/** sameDay=0 为隔天售后 */
+		isNextDayRefund() {
+			return Number(this.sameDay) === 0
+		}
+	},
 	onShow() {
 	onShow() {
 	},
 	},
 	methods: {
 	methods: {
 		init() {
 		init() {
 			getRefundFullInfo({ id: this.option.id }).then(res=>{
 			getRefundFullInfo({ id: this.option.id }).then(res=>{
 				this.product = res.data.itemList||[];
 				this.product = res.data.itemList||[];
-				this.refundType = res.data.info.refundType||0;
-				this.refundPrice = res.data.info.refundPrice?parseFloat(res.data.info.refundPrice):0
-				this.remark = res.data.info.remark?res.data.info.remark:''
+				const info = res.data.info || {}
+				this.refundType = info.refundType||0;
+				this.refundPrice = info.refundPrice?parseFloat(info.refundPrice):0
+				this.remark = info.remark?info.remark:''
+				// 缺省按当天,避免历史单无字段时误标隔天
+				this.sameDay = info.sameDay != null ? info.sameDay : 1
 			})
 			})
 		},
 		},
 	}
 	}
@@ -128,4 +147,4 @@ export default {
 			}
 			}
 		}
 		}
 	}
 	}
-</style>
+</style>

+ 8 - 1
ghsApp/src/pagesPurchase/refundList.vue

@@ -8,6 +8,10 @@
               <text>单号:{{item.refundSn}}</text>
               <text>单号:{{item.refundSn}}</text>
               <text>操作:{{item.shopAdminName}}</text>
               <text>操作:{{item.shopAdminName}}</text>
               <text style="color:#3385FF;">状态:{{ item.status==0?'退款中':item.status==1?'已完成':'已取消' }}</text>
               <text style="color:#3385FF;">状态:{{ item.status==0?'退款中':item.status==1?'已完成':'已取消' }}</text>
+              <!-- sameDay=0 隔天售后,否则当天售后(对齐销售侧/花店采购售后列表) -->
+              <text :style="Number(item.sameDay) === 0 ? 'color:#e67e22;font-weight:bold;' : ''">
+                时间:{{ Number(item.sameDay) === 0 ? '隔天售后' : '当天售后' }}
+              </text>
               <text v-if="!$util.isEmpty(item.remark)" style="color:red;font-weight:bold;">备注:{{item.remark}}</text>
               <text v-if="!$util.isEmpty(item.remark)" style="color:red;font-weight:bold;">备注:{{item.remark}}</text>
           </view>
           </view>
           <view class="flex val">¥{{parseFloat(item.refundPrice)}} <view class="iconfont iconxiangyou"></view> </view>
           <view class="flex val">¥{{parseFloat(item.refundPrice)}} <view class="iconfont iconxiangyou"></view> </view>
@@ -20,6 +24,9 @@
   </view>
   </view>
 </template>
 </template>
 <script>
 <script>
+/**
+ * 上游采购售后列表:展示当天/隔天售后标记(sameDay)
+ */
 import { list } from "@/mixins";
 import { list } from "@/mixins";
 import { getRefundList } from "@/api/cg-refund";
 import { getRefundList } from "@/api/cg-refund";
 export default {
 export default {
@@ -89,4 +96,4 @@ export default {
 			}
 			}
 		}
 		}
 	}
 	}
-</style>
+</style>