shish 2 недель назад
Родитель
Сommit
52be17445c
1 измененных файлов с 8 добавлено и 16 удалено
  1. 8 16
      hdApp/src/admin/billing/affirmGhs.vue

+ 8 - 16
hdApp/src/admin/billing/affirmGhs.vue

@@ -51,7 +51,7 @@
 				</view>
 
 				<block v-if="ghsInfoLoaded">
-					<view class="module-com input-line-wrap" v-if="isShMethodPanelShop">
+					<view class="module-com input-line-wrap" v-if="isNewShMethod">
 						<affirm-sh-method-panel
 							v-if="ghsInfo.pfLevel == 0"
 							ref="shMethodPanel"
@@ -522,7 +522,7 @@ export default {
 			this.form.hbId = 0
 			this.hasCoupon()
 		}
-		if(this.isShMethodPanelActive && this.$refs.shMethodPanel){
+		if(this.isNewShMethod && this.$refs.shMethodPanel){
 			this.$refs.shMethodPanel.onPageShow()
 		}else{
 			if(this.form.sendType == 2){
@@ -541,14 +541,8 @@ export default {
 	computed: {
 		...mapGetters(["getMerchantInfo", "getLoginInfo","getDictionariesInfo"]),
 		/** 当前门店是否使用 getShMethod 配送业务面板 */
-		isShMethodPanelShop() {
-			return this.ghsInfo &&
-				SH_METHOD_PANEL_SHOP_IDS.includes(Number(this.ghsInfo.shopId))
-		},
-		/** 配送业务面板生效:命中门店列表且 pfLevel 为同城 */
-		isShMethodPanelActive() {
-			return this.isShMethodPanelShop &&
-				Number(this.ghsInfo.pfLevel) === 0
+		isNewShMethod() {
+			return this.ghsInfo && this.ghsInfo.useNewShMethod == 1
 		},
 		/** 确认页列表每行价格展示(与 selectList 顺序一致) */
 		affirmCommodityPriceParts() {
@@ -675,7 +669,7 @@ export default {
 		 * @returns {number}
 		 */
 		modifyPrice(){
-			if (this.isShMethodPanelActive) {
+			if (this.isNewShMethod) {
 				if (this.shMethodPanelState) {
 					return this.shMethodPanelState.totalPrice
 				}
@@ -703,7 +697,7 @@ export default {
 					price = price + this.form.packCost
 				}
 			}else{
-				if(this.isShMethodPanelShop){
+				if(this.isNewShMethod){
 					// 配送业务面板门店费用由子组件计算
 				}else{
 					//同城配送
@@ -1119,9 +1113,7 @@ export default {
 				that.lackExpend = res.data.lackExpend?parseFloat(res.data.lackExpend):0
 				that.form.wlName = res.data.customWlName ? res.data.customWlName : ''
 
-				if(SH_METHOD_PANEL_SHOP_IDS.includes(Number(that.ghsInfo.shopId))){
-
-				}else{
+				if(!that.isNewShMethod){
 					//杭州斗南鲜花批发部不需要显示免费配送
 					if(that.ghsInfo.shopId && Number(that.ghsInfo.shopId) == 4608){
 						that.form.sendType = 1
@@ -1181,7 +1173,7 @@ export default {
 			})
 
 			if(this.ghsInfo.pfLevel == 0){
-				if (this.isShMethodPanelActive) {
+				if (this.isNewShMethod) {
 					if (!this.$refs.shMethodPanel || !this.$refs.shMethodPanel.validateBeforeSubmit()) {
 						return false
 					}