Просмотр исходного кода

Merge branch 'redesign‌-260706' of http://git.huaml.com/zhh/front-end into redesign‌-260706

ouyang 12 часов назад
Родитель
Сommit
739e953ee1

+ 2 - 23
ghsApp/src/pagesClient/official/apply.vue

@@ -1,7 +1,7 @@
 <!--
   供货商申请开店页
   谁用:未注册用户在 ghsApp 提交批发店申请(审核通过后会同步开零售店)
-  解决问题:收集门店/申请人信息;可勾选「给零售店生成一套样例模板」,随申请落库供审核后复制
+  解决问题:收集门店/申请人信息;样例模板默认勾选且对用户隐藏,随申请落库供审核后复制
 -->
 <template>
   <view class="apply-page app-content">
@@ -58,15 +58,6 @@
               <input v-model="form.floor" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="floor" placeholder="选填" @input="modifyShow" />
             </tui-list-cell>
           </view>
-          <!-- 是否给同步创建的零售店复制样例模板;默认勾选,提交时以 genTemplate 传给 /apply/register -->
-          <view class="apply-agreement apply-template">
-            <checkbox-group @change="genTemplateItem">
-              <label class="apply-agreement-label">
-                <checkbox value="1" class="apply-checkbox" :checked="genTemplate == 1" />
-                <text class="apply-agreement-text">给零售店生成一套样例模板</text>
-              </label>
-            </checkbox-group>
-          </view>
         </view>
 
         <view class="apply-section">
@@ -202,7 +193,7 @@ export default {
     return {
       merchantData: {},
       agree:0,
-      // 默认勾选:审核通过后给同步创建的零售店复制一套样例模板
+      // 对用户隐藏勾选框,固定为勾选:审核通过后给同步创建的零售店复制一套样例模板
       genTemplate: 1,
       form: {
         name: "",
@@ -466,14 +457,6 @@ export default {
 		agreeItem(e){
 			this.agree = e.detail.value && e.detail.value.length > 0 ? 1 : 0
 		},
-		/**
-		 * 样例模板勾选变更
-		 * 入参:checkbox-group 的 change 事件,detail.value 为已选中项数组
-		 * 返回:无;把 genTemplate 写成 1/0,落库后供平台审核通过时复制模板
-		 */
-		genTemplateItem(e){
-			this.genTemplate = e.detail.value && e.detail.value.length > 0 ? 1 : 0
-		},
     requestAuthCode(){
       let that = this
       let mobile = this.form.mobile
@@ -845,10 +828,6 @@ export default {
   padding: 0 8upx;
 }
 
-.apply-template {
-  margin-top: 8upx;
-}
-
 .apply-agreement-label {
   display: flex;
   flex-direction: row;

+ 3 - 3
hdApp/src/admin/goods/result.vue

@@ -320,7 +320,7 @@ export default {
 <style lang="scss" scoped>
 .billing_box_bg {
 	position: relative;
-	padding: 30upx 30upx 50upx 30upx;
+	padding: 30upx 30upx;
 	display: flex;
 	background: white;
 	flex-direction: column;
@@ -339,7 +339,7 @@ export default {
 		display: flex;
 		flex-direction: column;
 		align-items: center;
-		padding:25upx 0 30upx;
+		padding:30upx 0 60upx;
 		width: 100%;
 		background: #ffffff;
 		border-radius: 20upx;
@@ -349,7 +349,7 @@ export default {
 			color: $mainColor1;
 		}
 		.result-title {
-			margin: 10upx 0 10upx;
+			margin: 10upx 0 20upx;
 			font-size: 32upx;
 		}
 		.form-container {

+ 1 - 89
hdApp/src/admin/home/apply.vue

@@ -1,20 +1,9 @@
-  <!--
+<!--
   应用 Tab:全量功能入口
   用途:按业务域分组展示门店功能;菜单写死在本页,不依赖 homeMenus 配置。
 -->
 <template>
   <view class="app-content">
-    <!-- 有待审核才出现:点进待审核 Tab;宫格「退款记录」始终进全部 -->
-    <view v-if="pendingRefundCount > 0" class="refund-todo-wrap" @click="goPendingRefund">
-      <view class="refund-todo-row">
-        <view class="refund-todo-left">
-          <text class="refund-todo-title">售后待审核</text>
-          <text class="refund-todo-stat">有{{ pendingRefundCount }}笔待处理</text>
-        </view>
-        <text class="refund-todo-action">去处理</text>
-        <text class="refund-todo-arrow">›</text>
-      </view>
-    </view>
     <view class="apply-content_box">
       <view v-for="item in applyMenuList" :key="item.title" class="apply-list_box">
         <view class="section-header">
@@ -51,15 +40,12 @@
 import { mapGetters } from 'vuex'
 import NotLogin from '@/components/not-login'
 import { iconSrc } from '@/utils/iconSrc'
-import { refundList } from '@/api/refund'
 
 export default {
   name: 'apply',
   components: { NotLogin },
   data() {
     return {
-      /** 售后待审核条数,供应用页待办条;宫格入口不跟这个数跳转 */
-      pendingRefundCount: 0,
       /** 应用页菜单分组(按业务域拆细,避免单组入口过多) */
       applyMenuList: [
         {
@@ -185,30 +171,9 @@ export default {
   computed: {
     ...mapGetters({ loginInfo: 'getLoginInfo', myShopInfo: 'getMyShopInfo' })
   },
-  onShow() {
-    // 从售后详情返回时刷新待办条数量
-    this.loadPendingRefundCount()
-  },
   methods: {
     iconSrc,
     init() {},
-    /**
-     * 拉取待审核售后条数,用于应用页待办条。
-     * 参数与 freeRefundList 待审核 Tab 一致:近30天 + status=0,避免条上数量与列表对不上。
-     */
-    loadPendingRefundCount() {
-      refundList({
-        page: 1,
-        useDefaultLast30: 1,
-        refundSearchTime: 'last30Days',
-        sameDay: -1,
-        status: 0
-      }).then(res => {
-        if (res.code == 1 && res.data) {
-          this.pendingRefundCount = Number(res.data.totalNum) || 0
-        }
-      }).catch(() => {})
-    },
     goItemKjKd() {
       if (this.myShopInfo && Number(this.myShopInfo.defaultCustomId) > 0) {
         this.$util.pageTo({ url: '/admin/billing/index2?customId=' + this.myShopInfo.defaultCustomId })
@@ -219,10 +184,6 @@ export default {
     goItemKd() {
       this.$util.pageTo({ url: '/admin/custom/selectCustom' })
     },
-    /** 待办条:只进待审核,和宫格「退款记录」进全部区分开 */
-    goPendingRefund() {
-      this.$util.pageTo({ url: '/admin/billing/freeRefundList?tab=pending' })
-    },
     /** 应用菜单跳转 */
     goPage(item) {
       if (item.action && typeof this[item.action] === 'function') {
@@ -235,10 +196,6 @@ export default {
       }
       this.$util.pageTo(item)
     }
-  },
-  onPullDownRefresh() {
-    this.loadPendingRefundCount()
-    uni.stopPullDownRefresh()
   }
 }
 </script>
@@ -250,51 +207,6 @@ export default {
   padding-bottom: 28upx;
 }
 
-/* 应用页顶待办条:有待审核才出现,点进待审核列表 */
-.refund-todo-wrap {
-  margin: 20upx 12upx 0;
-  border-radius: 18upx;
-  overflow: hidden;
-  box-shadow: 0 8upx 26upx rgba(20, 48, 36, 0.06);
-}
-.refund-todo-row {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  padding: 28upx 24upx;
-  background: #fff7f0;
-}
-.refund-todo-left {
-  display: flex;
-  align-items: center;
-  flex: 1;
-  min-width: 0;
-  font-size: 32upx;
-  color: #333;
-}
-.refund-todo-title {
-  font-weight: bold;
-  color: #d4380d;
-}
-.refund-todo-stat {
-  color: #d4380d;
-  margin-left: 20upx;
-  font-size: 30upx;
-}
-.refund-todo-action {
-  flex-shrink: 0;
-  font-size: 28upx;
-  color: #d4380d;
-  font-weight: 700;
-  margin-right: 8upx;
-}
-.refund-todo-arrow {
-  flex-shrink: 0;
-  font-size: 40upx;
-  color: #d4380d;
-  line-height: 1;
-}
-
 .apply-content_box {
   padding-top: 8upx;
   padding-bottom: 20upx;

+ 19 - 6
mallApp/src/pages/order/refund.vue

@@ -2,7 +2,7 @@
   商城订单申请售后页
   供订单详情「申请售后」进入;顾客勾选商品/金额、可选上传照片后提交待审核申请,商家在 hdApp 审核可见图片
   仅当存在待审核申请时锁进度页不可再提交;无待审核则直接进表单(含已取消/通过/驳回后再申)
-  退货并退款金额:普通商品按勾选原价分摊会员折/满减;秒杀、团购按活动单价退,不再叠整单优惠
+  退货并退款金额:普通商品按勾选原价分摊会员折/满减/红包(跑腿费不参与分摊);秒杀、团购按活动单价退
   红包全额抵扣导致实付为 0 时仍可申请:提交 0 元,审核通过后退回红包
 -->
 <template>
@@ -263,7 +263,7 @@ export default {
 			goodsInfoList: [],
 			itemInfoList: [],
 			couldRefundPrice: 0,
-			refundType: 1,
+			refundType: 1, // 1.退货并退款  2.只退款
 			remark: '',
 			apply: null,
 			canApply: 0,
@@ -419,18 +419,31 @@ export default {
 			return parseFloat(price.toFixed(2))
 		},
 		/**
-		 * 整单优惠分摊基数:会员折/满减按「商品+运费包装-红包」后的应付计算,
-		 * prePrice 已扣红包,这里加回红包得到扣优惠前的应付,与下单口径一致
+		 * 跑腿费(sendType=2 的 sendCost):下单时红包不抵运费、会员折/满减也不打在跑腿费上
+		 * 退货分摊时要从基数里剔除,否则会把优惠摊到跑腿费上,商品应退被抬高
+		 */
+		getRunnerSendCost() {
+			const info = this.orderInfo || {}
+			if (Number(info.sendType) !== 2) {
+				return 0
+			}
+			return Number(info.sendCost) || 0
+		},
+		/**
+		 * 整单优惠分摊基数:红包只抵商品;会员折/满减按「商品+非跑腿运费/包装-红包」
+		 * prePrice 已扣红包且含跑腿费,这里加回红包再剔除跑腿费,与下单 wholeDiscount 口径一致
 		 */
 		getDiscountAllocBase() {
 			const info = this.orderInfo || {}
 			const hb = Number(info.hbAmount) || 0
 			const pre = Number(info.prePrice) || 0
+			const runnerCost = this.getRunnerSendCost()
 			if (pre > 0) {
-				return parseFloat((pre + hb).toFixed(2))
+				const base = pre + hb - runnerCost
+				return parseFloat((base > 0 ? base : 0).toFixed(2))
 			}
 			const goods = Number(info.goodsPrice) || 0
-			const send = Number(info.sendCost) || 0
+			const send = Number(info.sendType) === 2 ? 0 : (Number(info.sendCost) || 0)
 			const pack = Number(info.packingFee) || 0
 			const labour = Number(info.labourCost) || 0
 			const service = Number(info.serviceFee) || 0