Kaynağa Gözat

Merge branch 'after-sale' into redesign‌-260706

shish 1 gün önce
ebeveyn
işleme
7413ec88c4

+ 1 - 1
ghsApp/src/admin/billing/result.vue

@@ -12,7 +12,7 @@
     分享给<text style="font-weight:bold;margin-left:12upx;">{{customName}}</text>
   </button>
   <!-- #endif -->
-  <button v-if="option.title != '报损成功'" class="admin-button-com big" style="background-color: green;border-color: green;color:white;" @click="printOrder()">打印(无价格)</button>
+  <button v-if="option.title != '报损成功'" class="admin-button-com big" style="background-color: green;border-color: green;color:white;" @click="printOrder()">无价打印</button>
   	<button v-if="option.title != '报损成功'" class="admin-button-com big" @click="gotoOrderDetail()">订单详情</button>
 	<button class="admin-button-com big" @click="goBackHome">返回首页</button>
 

+ 84 - 6
ghsApp/src/admin/home/components/OrderItem.vue

@@ -165,12 +165,23 @@
 
     <uni-popup ref="morePopup" background-color="#fff" type="center" :animation="true" class="class-popup-style">
       <view class="more-popup-body">
-        <view class="text-center"><button class="admin-button-com" @click="openPrintLog(item)">打印时间</button></view>
         <view class="text-center"><button class="admin-button-com" @click="openRemarkEdit(item)">备注</button></view>
         <!-- 待付款/已取消不可发起售后,其余跳转售后页 -->
         <view class="text-center" v-if="item.status != 1 && item.status != 5">
           <button class="admin-button-com" @click="goRefund(item)">发起售后</button>
         </view>
+        <!-- 跳转该订单售后记录列表 -->
+        <view class="text-center">
+          <button class="admin-button-com" @click="goRefundList(item)">售后记录</button>
+        </view>
+        <!-- 与订单详情一致:待付款/已取消外可无价打印 -->
+        <view class="text-center" v-if="item.status != 1 && item.status != 5">
+          <button class="admin-button-com" @click="printNoPrice(item)">无价打印</button>
+        </view>
+        <!-- 复制客户地址,文案格式对齐详情页 -->
+        <view class="text-center">
+          <button class="admin-button-com" @click="copyCustom(item)">复制地址</button>
+        </view>
         <block v-if="item.sendStatus == -4 && item.status == 2">
           <view class="text-center"><button class="admin-button-com" @click="callIntraCity(item)">呼叫跑腿</button></view>
         </block>
@@ -180,11 +191,7 @@
         <block v-else-if="[-1, -2].includes(Number(item.sendStatus)) && [2, 3].includes(Number(item.status))">
           <view class="text-center"><button class="admin-button-com" @click="callIntraCity(item)">重叫跑腿</button></view>
         </block>
-        <!--
-        <view class="text-center"><button class="admin-button-com" @click="addExpress(item)">顺丰下单</button></view>
-        <view class="text-center"><button class="admin-button-com" @click="cancelExpress(item)">取消顺丰订单</button></view>
-        <view class="text-center"><button class="admin-button-com" @click="fillNoFh(item)">填单发货</button></view>
-        -->
+        <view class="text-center"><button class="admin-button-com" @click="openPrintLog(item)">打印时间</button></view>
         <view class="text-center"><button class="admin-button-com default" @click="closeMore">取消</button></view>
       </view>
     </uni-popup>
@@ -455,6 +462,77 @@ export default {
       }
       this.$util.pageTo({ url: '/pagesOrder/refund?id=' + item.id });
     },
+    /**
+     * 列表「更多」→ 无价打印。
+     * 与详情页一致传 showPrice:0,不打印金额;已打印过则二次确认补打。
+     */
+    printNoPrice(item) {
+      this.closeMore();
+      if (!item || !item.id) {
+        return;
+      }
+      const that = this;
+      const doPrint = () => {
+        uni.showLoading({ title: '打印中...' });
+        cloudPrintOrder({ id: item.id, showPrice: 0 }).then((res) => {
+          uni.hideLoading();
+          if (res.code == 1) {
+            if (res.data && res.data.hasNoPrint == 1) {
+              that.$util.confirmModal({ content: '请先设置打印机' }, () => {
+                that.$util.pageTo({ url: '/admin/shop/print' });
+              });
+            } else {
+              that.bumpItemCount(item, 'printNum');
+            }
+          }
+        }).catch(() => {
+          uni.hideLoading();
+        });
+      };
+      if (item.printNum && Number(item.printNum) > 0) {
+        this.$util.confirmModal({ content: '确认补打小票?' }, doPrint);
+      } else {
+        doPrint();
+      }
+    },
+    /** 列表「更多」→ 售后记录:按订单号进入售后列表 */
+    goRefundList(item) {
+      this.closeMore();
+      if (!item || !item.orderSn) {
+        return;
+      }
+      this.$util.pageTo({
+        url: '/pagesOrder/refundList',
+        query: { orderSn: item.orderSn }
+      });
+    },
+    /**
+     * 列表「更多」→ 复制地址。
+     * 文案与详情 copyCustom 一致:地址(+展示地址) 客户名 / 店长 手机号。
+     */
+    copyCustom(item) {
+      this.closeMore();
+      if (!item) {
+        return;
+      }
+      const customName = item.customName || '';
+      const customMobile = item.customMobile || '';
+      const customSuper = (item.customSuper && item.customSuper.name)
+        ? item.customSuper.name
+        : (item.customSuperName || '');
+      let address = item.customAddress || item.fullAddress || '';
+      if (!this.$util.isEmpty(item.showAddress) && address != item.showAddress) {
+        address += '(' + item.showAddress + ')';
+      }
+      const val = address + ' ' + customName + '\n' + customSuper + ' ' + customMobile;
+      const self = this;
+      uni.setClipboardData({
+        data: val,
+        success() {
+          self.$msg('复制成功');
+        }
+      });
+    },
     openPrintLog(item) {
       this.closeMore();
       uni.showLoading({ title: '加载中...' });

+ 6 - 6
ghsApp/src/components/forward-options-popup.vue

@@ -7,7 +7,7 @@
 		<view class="panel" @click.stop>
 			<view class="title">退款确认</view>
 			<view class="tip">{{ tipText }}</view>
-			<view class="label">资金处理</view>
+			<view class="label">资金退回方式</view>
 			<view
 				v-for="(opt, idx) in fundOptions"
 				:key="idx"
@@ -50,9 +50,9 @@ export default {
 				return '无关联销售单:退货回库;资金按下方选择处理。'
 			}
 			if (this.orderCleared) {
-				return '订单已结账,按隔天售后处理:不扣减订单实付,金额记入隔天累计退款。'
+				return '订单已结账,本次售后不减订单实付,只会算作今天退款'
 			}
-			return '隔天售后不扣减订单实付,金额记入隔天累计退款。'
+			return '本次售后不减订单实付,只会算作今天退款'
 		},
 		fundOptions() {
 			if (this.forceBalance) {
@@ -113,21 +113,21 @@ export default {
 }
 .tip {
 	margin-top: 12upx;
-	font-size: 28upx;
+	font-size: 30upx;
 	color: #999;
 }
 .label {
 	margin-top: 28upx;
 	margin-bottom: 12upx;
 	font-size: 28upx;
-	color: #666;
+	color: black;
 }
 .opt {
 	padding: 22upx 24upx;
 	margin-top: 12upx;
 	border: 1upx solid #e5e5e5;
 	border-radius: 12upx;
-	font-size: 28upx;
+	font-size: 38upx;
 	color: #333;
 }
 .opt.active {

+ 65 - 21
ghsApp/src/pagesOrder/detail.vue

@@ -156,21 +156,22 @@
 						<i class="iconfont icondagou" style="font-size:35upx;"></i>
 					</view>
 				</view>
-				<view class="order-info_box" v-if="detailInfo.status != 1 && detailInfo.status!=5">
-					<view>在线支付:</view>
-					<view v-if="detailInfo.onlinePay == 1" style="color:red;font-weight:bold;">否</view>
-					<view v-else style="color:#3385ff;font-weight:bold;">是</view>
-				</view>
 				<view class="order-info_box" v-if="detailInfo.status != 1 && detailInfo.status!=5">
 					<view>付款方式:</view>
 					<view>
 						<block v-if="detailInfo.onlinePay == 2">
-							<text :class="[detailInfo.payWay==3 && detailInfo.clearId == 0 ? 'red-mind' : 'normal-mind']">
-								{{ detailInfo.payWay==0?'微信':detailInfo.payWay==1?'支付宝':detailInfo.payWay==2?'余额':detailInfo.payWay==4?'现金':detailInfo.payWay==5?'银行卡':detailInfo.payWay==3?'挂账':'--' }}
+							<!-- 挂账固定红色;线上微信/支付宝蓝色;其余黑色 -->
+							<text :class="[
+								Number(detailInfo.payWay) === 3
+									? 'red-mind'
+									: (Number(detailInfo.payWay) === 0 || Number(detailInfo.payWay) === 1 ? 'normal-mind' : 'pay-way-black')
+							]">
+								{{ detailInfo.payWay==0?'线上微信':detailInfo.payWay==1?'线上支付宝':detailInfo.payWay==2?'余额':detailInfo.payWay==4?'现金':detailInfo.payWay==5?'银行卡':detailInfo.payWay==3?'挂账':'--' }}
 							</text>
 						</block>
 						<block v-else>
-							<text :class="[detailInfo.payWay==3 && detailInfo.clearId == 0 ? 'red-mind' : 'normal-mind']">
+							<!-- 挂账固定红色;线下分支其余黑色(避免行内 color 盖掉红色) -->
+							<text :class="[Number(detailInfo.payWay) === 3 ? 'red-mind' : 'pay-way-black']">
 								{{ detailInfo.payWay==0?'线下微信':detailInfo.payWay==1?'线下支付宝':detailInfo.payWay==2?'余额':detailInfo.payWay==4?'现金':detailInfo.payWay==5?'银行卡':detailInfo.payWay==3?'挂账':'--' }}
 							</text>
 						</block>
@@ -184,15 +185,20 @@
 						<button @click='pageTo({url:"/pagesArrears/details",query: {id: detailInfo.customId}})' class="admin-button-com" style="border:1upx solid red;color:red;">全部挂账</button>
 					</view>
 				</view>
-				<view class="order-info_box" v-if="detailInfo.status != 1 && detailInfo.status!=5 && !$util.isEmpty(detailInfo.orderClearList)">
-					<view>账单信息:</view>
+				<!-- 结账信息:每行一条,首条与左侧「结账信息」水平对齐 -->
+				<view class="order-info_box order-clear-bills" v-if="detailInfo.status != 1 && detailInfo.status!=5 && !$util.isEmpty(detailInfo.orderClearList)">
+					<view class="order-clear-bills__label">结账信息:</view>
 					<view class="order-clear-bills__links">
-						<text
+						<view
 							v-for="(bill, billIndex) in detailInfo.orderClearList"
 							:key="billIndex"
 							class="order-clear-bills__link"
+							:class="{ 'order-clear-bills__link--first': billIndex === 0 }"
 							@click.stop="goClearBill(bill)"
-						>{{ bill.clearSn ? bill.clearSn : ('结账单' + (billIndex + 1)) }}<text v-if="Number(bill.amount)>0" class="order-clear-bills__amt"> 本单销¥{{ parseFloat(bill.amount) }}</text></text>
+						>
+							<text class="order-clear-bills__sn">{{ formatClearBillLabel(bill) }}</text>
+							<text v-if="Number(bill.amount) > 0" class="order-clear-bills__amt">¥{{ parseFloat(bill.amount) }}</text>
+						</view>
 					</view>
 				</view>
 				<view class="order-info_box" style="margin-top:40upx;">
@@ -472,7 +478,7 @@
 			<!-- #endif -->
 			<button class="admin-button-com middle blue" v-if="detailInfo.sendStatus == -4 && detailInfo.status== 2 && detailInfo.payStatus == 1" @click.stop="openExpressPage()">呼叫跑腿</button>
 			<button class="admin-button-com middle blue" v-if="[-1, -2].includes(Number(detailInfo.sendStatus)) && [2].includes(Number(detailInfo.status))" @click.stop="openExpressPage()">重叫跑腿</button>
-			<button class="admin-button-com middle blue" style="background-color: green;border-color: green;" v-if="detailInfo.status != 1 && detailInfo.status != 5" @click="printOrder(detailInfo)">打印(无价格)</button>
+			<button class="admin-button-com middle blue" style="background-color: green;border-color: green;" v-if="detailInfo.status != 1 && detailInfo.status != 5" @click="printOrder(detailInfo)">无价打印</button>
 
 			<template v-for="s in detailInfo.buttonList">
 				<button :key="s.type" @click="clickBtn(s, detailInfo)" v-if="s.show == 1" :disabled="s.disable === 1" class="admin-button-com middle blue" :class="s.disable === 1?'active':''">
@@ -1273,6 +1279,15 @@ export default {
 			}
 			this.pageTo({ url: '/admin/clear/customInfo', query: { id } })
 		},
+		/**
+		 * 结账单短文案:前缀「结账单」+ clearSn 后四位。
+		 * 完整单号过长,后四位便于列表内区分多笔结账。
+		 */
+		formatClearBillLabel(bill) {
+			const sn = bill && bill.clearSn != null ? String(bill.clearSn) : ''
+			const tail = sn ? sn.slice(-4) : ''
+			return '结账单' + tail
+		},
 		modifyAddress(){
 			this.$util.pageTo({url: '/pagesOrder/modify?id='+this.detailInfo.id})
 		},
@@ -1982,24 +1997,53 @@ export default {
 				color:#3385ff;
 				font-weight:bold;
 			}
+			.pay-way-black{
+				color:#000000;
+				font-weight:bold;
+			}
 		}
 	}
+	/* 覆盖父级 align-items:center,保证「结账信息」与第一条水平顶对齐 */
+	.bills-info_box > .order-info_box.order-clear-bills {
+		align-items: flex-start;
+		margin-top: 16upx;
+	}
+	.order-clear-bills__label {
+		font-size: 26upx;
+		line-height: 40upx;
+		font-weight: 400;
+	}
 	.order-clear-bills__links {
 		flex: 1;
 		display: flex;
-		flex-wrap: wrap;
+		flex-direction: column;
+		min-width: 0;
 	}
 	.order-clear-bills__link {
+		display: flex;
+		flex-direction: row;
+		align-items: center;
+		box-sizing: border-box;
+		width: 100%;
 		color: #3385ff;
-		font-weight: bold;
-		margin-right: 20upx;
-		margin-bottom: 15upx;
+		line-height: 40upx;
+		margin-top: 12upx;
+	}
+	.order-clear-bills__link--first {
+		margin-top: 0;
+	}
+	.order-clear-bills__sn {
+		color: #3385ff;
+		font-size: 28upx;
+		font-weight: 400;
+		line-height: 40upx;
 	}
 	.order-clear-bills__amt {
-		font-weight: normal;
-		font-size: 26upx;
-		margin-left: 20upx;
-		font-weight: bold;
+		color: red;
+		font-size: 28upx;
+		margin-left: 8upx;
+		font-weight: 400;
+		line-height: 40upx;
 	}
 	.content-box {
 		background-color: #ffffff;

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

@@ -324,7 +324,7 @@ export default {
 			} else if (this.orderInfo.onlinePay == 2) {
 				title = '此单线上付款,审核通过后钱会原路退回,确认提交?'
 			} else if (Number(this.orderInfo.debt) != 1) {
-				title = '此单线下付款,钱不会原路退回,请与供货商协商,确认提交?'
+				title = '此单线下付款,钱不会原路退回,请与批发店协商,确认提交?'
 				topTitle = '特别注意'
 			}
 			that.$util.confirmModal({ title: topTitle, content: title }, () => {