Jelajahi Sumber

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

shish 12 jam lalu
induk
melakukan
c4efd8696e

+ 2 - 2
ghsApp/src/pagesClient/member/detail.vue

@@ -48,10 +48,10 @@
             <!-- 按钮操作区域:邀请结账 & 下载结账码 -->
             <view class="member-action-row">
               <!-- #ifdef MP-WEIXIN -->
-              <button class="admin-button-com middle blue member-action-btn member-action-btn--invite" open-type="share">邀请结账</button>
+              <button class="admin-button-com middle blue member-action-btn member-action-btn--invite" open-type="share">微信结账</button>
               <!-- #endif -->
               <!-- #ifdef APP-PLUS -->
-              <button class="admin-button-com middle blue member-action-btn member-action-btn--invite" @click="inviteToPay()">邀请结账</button>
+              <button class="admin-button-com middle blue member-action-btn member-action-btn--invite" @click="inviteToPay()">微信结账</button>
               <!-- #endif -->
               <button class="admin-button-com middle blue member-action-btn" @click="downloadCode()">支付宝结账</button>
             </view>

+ 1 - 1
hdApp/src/admin/clear/info.vue

@@ -224,7 +224,7 @@ export default {
 			const clearSn = bill && bill.clearSn ? String(bill.clearSn).trim() : ''
 			if (clearSn) {
 				const suffix = clearSn.length > 4 ? clearSn.slice(-4) : clearSn
-				return '单' + suffix
+				return '结账单' + suffix
 			}
 			return '结账单' + this.getOrderClearBillDisplayIndex(rowIndex, billIndex)
 		},

+ 35 - 11
hdApp/src/admin/ghs/pay.vue

@@ -5,8 +5,8 @@
 			<view class="pay-header-main">
 				<image class="pay-header-logo" :src="`${constant.imgUrl}/logo4.png`" mode="aspectFill" />
 				<view class="pay-header-text">
-					<view class="pay-header-name">{{ ghsName || '供货商' }}</view>
-					<view class="pay-header-sub">向供货商付款</view>
+					<view class="pay-header-name">{{ ghsName || '' }}</view>
+					<view class="pay-header-sub">向批发店付款</view>
 				</view>
 			</view>
 		</view>
@@ -179,7 +179,27 @@
 		methods: {
 			init() {
 			},
-			// 解析路由参数 id/salt
+			/**
+			 * 把 query/scene 字符串解析成键值(供货商收款页用)
+			 * 小程序码扫入时只有 scene=id=xx&salt=yy,普通码可能是完整 URL 的 q
+			 */
+			parseQueryPairs(queryStr) {
+				const sceneArray = {}
+				if (!queryStr) {
+					return sceneArray
+				}
+				const sceneItem = String(queryStr).split('&')
+				for (let i = 0, l = sceneItem.length; i < l; i++) {
+					const arr = sceneItem[i].split('=')
+					const key = arr[0]
+					if (!key) {
+						continue
+					}
+					sceneArray[key] = arr.length > 1 ? arr.slice(1).join('=') : ''
+				}
+				return sceneArray
+			},
+			// 解析路由参数 id/salt:直链 / 小程序码 scene / 普通二维码 q
 			parsePayPageParams() {
 				let id = 0
 				let salt = ''
@@ -187,15 +207,19 @@
 				if (option.id && option.salt) {
 					id = option.id || 0
 					salt = option.salt || ''
+				} else if (option.scene) {
+					// 无数量限制小程序码:参数在 scene 里,需 decode 后再拆
+					const sceneArray = this.parseQueryPairs(decodeURIComponent(option.scene))
+					if (sceneArray.id) {
+						id = sceneArray.id
+					}
+					if (sceneArray.salt) {
+						salt = sceneArray.salt
+					}
 				} else if (option.q) {
 					const currentUrl = decodeURIComponent(option.q)
 					const str = currentUrl.substring(currentUrl.lastIndexOf('?') + 1)
-					const sceneItem = str.split('&')
-					const sceneArray = {}
-					for (let i = 0, l = sceneItem.length; i < l; i++) {
-						const arr = sceneItem[i].split('=')
-						sceneArray[arr[0]] = arr[1]
-					}
+					const sceneArray = this.parseQueryPairs(str)
 					if (sceneArray.id) {
 						id = sceneArray.id
 					}
@@ -502,7 +526,7 @@
 
 	.pay-entry-btn {
 		flex: 1;
-		height: 72upx;
+		height: 82upx;
 		display: flex;
 		align-items: center;
 		justify-content: center;
@@ -522,7 +546,7 @@
 	}
 
 	.pay-entry-btn__text {
-		font-size: 26upx;
+		font-size: 30upx;
 		color: #3385ff;
 		line-height: 36upx;
 	}

+ 1 - 1
hdApp/src/admin/home/components/purchase-ghs-panel.vue

@@ -106,7 +106,7 @@
                 <view class="box_6 flex-row box_6--settle" v-if="Number(ghsInfo.balance) < 0" @click.stop="settleAccounts(ghsInfo)">
                   <view class="show_clear_area flex-row justify-between show_clear_area--inline-settle">
                     <text class="waite_clear_order">
-                      待结 ¥{{ Math.abs(parseFloat(ghsInfo.balance)) }}<text style="font-size: 28upx;margin-left:18upx;">查看明细 &gt;</text>
+                      待结 ¥{{ Math.abs(parseFloat(ghsInfo.balance)) }}<text style="font-size: 28upx;margin-left:18upx;">查看订单 &gt;</text>
                     </text>
                   </view>
                 </view>

+ 41 - 4
hdApp/src/pagesPurchase/purDetails.vue

@@ -150,13 +150,18 @@
 
         <view class="order-info_box order-clear-bills" v-if="!$util.isEmpty(detailInfo.orderClearList)" style="margin-top:20upx;">
           <view>账单信息:</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>
 
@@ -554,6 +559,15 @@ export default {
       let salt = item.salt ? item.salt : ''
       this.pageTo({ url: '/admin/clear/info?id='+item.clearId+'&salt='+salt})
     },
+    /**
+     * 结账单短文案:前缀「结账单」+ clearSn 后四位。
+     * 完整单号过长不利于行内展示,后四位足够区分同页多笔账单。
+     */
+    formatClearBillLabel(bill) {
+      const sn = bill && bill.clearSn != null ? String(bill.clearSn) : '';
+      const tail = sn ? sn.slice(-4) : '';
+      return '结账单' + tail;
+    },
     copy (val) {
       const self = this;
       uni.setClipboardData({
@@ -698,19 +712,42 @@ export default {
         justify-content: flex-end;
       }
     }
+    /* 账单信息:右侧每行约两个,金额用红色突出 */
+    .order-clear-bills {
+      align-items: flex-start;
+    }
     .order-clear-bills__links {
       flex: 1;
       display: flex;
+      flex-direction: row;
       flex-wrap: wrap;
+      min-width: 0;
     }
     .order-clear-bills__link {
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+      box-sizing: border-box;
+      width: 50%;
       color: #3385ff;
-      margin-right: 20upx;
+      line-height: 1.4;
+      margin-top: 12upx;
+      padding-right: 12upx;
+    }
+    /* 首行两项顶对齐,去掉多余上边距 */
+    .order-clear-bills__link--first,
+    .order-clear-bills__link:nth-child(2) {
+      margin-top: 0;
+    }
+    .order-clear-bills__sn {
+      color: #3385ff;
+      font-size: 28upx;
     }
     .order-clear-bills__amt {
+      color: red;
       font-weight: normal;
       font-size: 28upx;
-      margin-left:10upx;
+      margin-left: 8upx;
     }
   }
   .content-box {