shish 12 часов назад
Родитель
Сommit
e8c766839d

+ 1 - 1
hdApp/src/admin/cg/me.vue

@@ -387,7 +387,7 @@ export default {
       } else if (item.key == "book") {
         this.$util.pageTo({ url: "/admin/book/index" });
       } else if (item.key == "shopInvite") {
-        // 与 home/me「邀请店」一致:进入分佣 / 邀请 hub
+        // 与 home/me「邀请店」一致:进入分佣 / 邀请 hub
         this.$util.pageTo({ url: "/admin/home/shopInviteHub" });
       } else if (item.key == "modifyName") {
         this.$util.pageTo({ url: "/admin/home/edit" });

+ 2 - 2
hdApp/src/admin/home/components/mall-home-panel.vue

@@ -10,7 +10,7 @@
             </view>
             <view class="brand-info">
               <view class="brand-name">{{ shopInfo.merchantName || '' }}</view>
-              <view class="brand-desc">{{ shopInfo.shopName||'' }} · 店铺管理</view>
+              <view class="brand-desc">{{ shopInfo.shopName||'' }}</view>
             </view>
           </view>
           <view class="hero-actions">
@@ -467,7 +467,7 @@ export default {
 
 .brand-desc {
   margin-top: 6upx;
-  font-size: 20upx;
+  font-size: 22upx;
   color: rgba(255, 255, 255, 0.88);
   white-space: nowrap;
   overflow: hidden;

+ 1 - 1
hdApp/src/admin/home/me.vue

@@ -297,7 +297,7 @@ export default {
       outAmountShow: false,
       inAmountShow: false,
       menuList: [
-        { key: "shopInvite", name: "邀请店", icon: "member-level" },
+        { key: "shopInvite", name: "邀请店", icon: "member-level" },
         { key: "address", name: "修改门店", icon: "shop_modify" },
         { key: "book", name: "使用教程", icon: "book" },
         { key: "lakala", name: "收款账户", icon: "pay-code" },

+ 6 - 1
hdApp/src/admin/home/order.vue

@@ -194,7 +194,12 @@
             </view>
 
             <view class="action-more-wrap">
-              <view class="outline-action" @click.stop="toggleActionMore(index)">更多</view>
+              <!-- 已取消订单:「更多」与状态文案同为灰色 -->
+              <view
+                class="outline-action"
+                :class="{ disabled: item.status == 5 }"
+                @click.stop="toggleActionMore(index)"
+              >更多</view>
             </view>
           </view>
         </view>

+ 29 - 50
hdApp/src/admin/order/refund.vue

@@ -57,20 +57,10 @@
 										placeholder="0" 
 										v-model="res.refundCount" 
 										placeholder-style="color:#ccc"
-										@focus="clearRefundCount(res)" />
+										@focus="clearRefundCount(res)"
+										@input="onRefundCountInput" />
 									<text class="unit-label">份</text>
 								</view>
-								<view class="input-item">
-									<text class="input-label">单价</text>
-									<input 
-										class="refund-input-compact" 
-										type="digit" 
-										placeholder="0.00" 
-										v-model="res.perPrice" 
-										placeholder-style="color:#ccc"
-										@focus="clearPerPrice(res)" />
-									<text class="unit-label">元</text>
-								</view>
 							</view>
 						</view>
 					</view>
@@ -94,20 +84,10 @@
 										placeholder="0" 
 										v-model="res.refundCount" 
 										placeholder-style="color:#ccc"
-										@focus="clearRefundCount(res)" />
+										@focus="clearRefundCount(res)"
+										@input="onRefundCountInput" />
 									<text class="unit-label">{{res.unitName}}</text>
 								</view>
-								<view class="input-item">
-									<text class="input-label">单价</text>
-									<input 
-										class="refund-input-compact" 
-										type="digit" 
-										placeholder="0.00" 
-										v-model="res.perPrice" 
-										placeholder-style="color:#ccc"
-										@focus="clearPerPrice(res)" />
-									<text class="unit-label">元</text>
-								</view>
 							</view>
 						</view>
 					</view>
@@ -229,6 +209,10 @@
 	</view>
 </template>
 <script>
+/**
+ * 花店订单售后页:选择退货商品、填写退款金额并提交。
+ * 退货单价直接取订单原单价,只需填数量。
+ */
 import { getDetail,refund } from "@/api/order/index";
 import ModalModule from "@/components/plugin/modal";
 export default {
@@ -260,28 +244,26 @@ export default {
 			// 金额比较按 2 位小数对齐,避免浮点误差
 			return refundMoney.toFixed(2) === couldRefund.toFixed(2)
 		},
+		/**
+		 * 按退货数量 × 商品原单价汇总金额,并回填退款金额。
+		 * 单价不再手填,避免漏填导致退款金额为 0。
+		 */
 		refundPrice(){
 			let price = 0
 			if(!this.$util.isEmpty(this.goodsInfoList)){
 				for (const item of this.goodsInfoList) {
 					if(Number(item.refundCount)>0){
-						let currentPrice = Number(item.refundCount)*Number(item.perPrice)
-						currentPrice.toFixed(2)
+						let currentPrice = Number(item.refundCount)*Number(item.unitPrice)
 						price = Number(price) + Number(currentPrice)
-						price.toFixed(2)
 					}
-
 				}
 			}
 			if(!this.$util.isEmpty(this.itemInfoList)){
 				for (const item of this.itemInfoList) {
 					if(Number(item.refundCount)>0){
-						let currentPrice = Number(item.refundCount)*Number(item.perPrice)
-						currentPrice.toFixed(2)
+						let currentPrice = Number(item.refundCount)*Number(item.unitPrice)
 						price = Number(price) + Number(currentPrice)
-						price.toFixed(2)
 					}
-
 				}
 			}
 			this.refundMoney = parseFloat(price.toFixed(2))
@@ -309,9 +291,16 @@ export default {
 		},
 		clearRefundCount(item) {
 			this.$set(item, 'refundCount', '');
+			this.onRefundCountInput()
 		},
-		clearPerPrice(item) {
-			this.$set(item, 'perPrice', '');
+		/**
+		 * 退货数量变化后读取 refundPrice,按原单价回填退款金额。
+		 * 计算属性默认懒求值,不主动读取就不会更新退款金额。
+		 */
+		onRefundCountInput() {
+			this.$nextTick(() => {
+				void this.refundPrice
+			})
 		},
 		clearRefundMoney() {
 			this.refundMoney = '';
@@ -354,12 +343,7 @@ export default {
 						return false
 					}
 					if(Number(ele.refundCount)>0){
-						if(Number(ele.perPrice)>Number(ele.unitPrice)){
-							uni.showToast({title:ele.name+' 退款单价不能大于原价',icon:'none'})
-							hasError = true;
-							return false
-						}
-						selectProduct.push({"productId":ele.goodsId,"num":ele.refundCount,"unitType":ele.unitType,unitName:ele.unitName,unitPrice:ele.perPrice || ele.unitPrice,property:0})
+						selectProduct.push({"productId":ele.goodsId,"num":ele.refundCount,"unitType":ele.unitType,unitName:ele.unitName,unitPrice:ele.unitPrice,property:0})
 					}
 				})
 			}
@@ -377,12 +361,7 @@ export default {
 						return false
 					}
 					if(Number(ele.refundCount)>0){
-						if(Number(ele.perPrice)>Number(ele.unitPrice)){
-							uni.showToast({title:ele.name+' 退款单价不能大于原价',icon:'none'})
-							hasError = true;
-							return false
-						}
-						selectProduct.push({"productId":ele.itemId,"num":ele.refundCount,"unitType":ele.unitType,unitName:ele.unitName,unitPrice:ele.perPrice || ele.unitPrice,property:1})
+						selectProduct.push({"productId":ele.itemId,"num":ele.refundCount,"unitType":ele.unitType,unitName:ele.unitName,unitPrice:ele.unitPrice,property:1})
 					}
 				})
 			}
@@ -416,14 +395,14 @@ export default {
 			if(!this.$util.isEmpty(this.goodsInfoList)){
 				this.goodsInfoList.forEach(ele=>{
 					if(Number(ele.refundCount)>0){
-						selectProduct.push({"productId":ele.goodsId,"num":ele.refundCount,"unitType":ele.unitType,unitName:ele.unitName,unitPrice:ele.perPrice || ele.unitPrice,property:0})
+						selectProduct.push({"productId":ele.goodsId,"num":ele.refundCount,"unitType":ele.unitType,unitName:ele.unitName,unitPrice:ele.unitPrice,property:0})
 					}
 				})
 			}
 			if(!this.$util.isEmpty(this.itemInfoList)){
 				this.itemInfoList.forEach(ele=>{
 					if(Number(ele.refundCount)>0){
-						selectProduct.push({"productId":ele.itemId,"num":ele.refundCount,"unitType":ele.unitType,unitName:ele.unitName,unitPrice:ele.perPrice || ele.unitPrice,property:1})
+						selectProduct.push({"productId":ele.itemId,"num":ele.refundCount,"unitType":ele.unitType,unitName:ele.unitName,unitPrice:ele.unitPrice,property:1})
 					}
 				})
 			}
@@ -499,10 +478,10 @@ export default {
 			this.coundRefundPrice = parseFloat(this.coundRefundPrice)
 
 			this.goodsInfoList = res.data.goodsInfoList.map(ele=>{
-				return {...ele,refundCount:null,perPrice:''}
+				return {...ele,refundCount:null}
 			})
 			this.itemInfoList = res.data.itemInfoList.map(ele=>{
-				return {...ele,refundCount:null,perPrice:''}
+				return {...ele,refundCount:null}
 			})
 		}
 	}