shish 3 лет назад
Родитель
Сommit
e65d3e2916

+ 62 - 61
hdApp/src/admin/billing/affirmGhs.vue

@@ -57,6 +57,7 @@
 
 				<view class="module-com input-line-wrap">
 
+
 <block v-if="ghsInfo.pfLevel && ghsInfo.pfLevel == 1">
 	<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
 		<button class="admin-button-com middle" :class="[form.transType == 0 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;"  @click="changeTransType(0)">德邦空运</button>
@@ -66,70 +67,70 @@
 	</tui-list-cell>
 </block>
 <block v-else>
-					<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
-						<button v-if="ghsInfo.shopId != 4608" class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:30upx;"  @click="changeSendType(0)">送货上门</button>
-						<button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;"  @click="changeSendType(1)">自取</button>
-						<button class="admin-button-com middle" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeSendType(2)">跑腿</button>
-						<button class="admin-button-com middle" :class="[form.sendType == 4 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeSendType(4)">快递</button>
-						<button class="admin-button-com middle" :class="[form.sendType == 3 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeSendType(3)">物流</button>
-					</tui-list-cell>
-
-					<tui-list-cell class="line-cell" :hover="false" :arrow="false">
-
-						<view v-if="form.sendType == 0">
-							<block v-if="ghsInfo.shopId == 4804">
-								<text style="color:red;width:100%;font-weight:bold;">市区满500元免费送货上门,其它情况请选自取、跑腿或物流</text>
-							</block>
-							<block v-else-if="ghsInfo.shopId == 4608">
-								<view style="color:red;width:100%;font-weight:bold;">满500元,10公里内免费配送</view>
-								<view style="color:red;width:100%;font-weight:bold;">满1000元,20公里内免费配送</view>
-								<view style="color:#3385FF;width:100%;font-weight:bold;">请自行查询距离是否符合要求,符合要求再下单哦!</view>
-							</block>
-							<block v-else>
-								<text style="color: #3385FF;width:100%;">在本店配送范围的,免费送货上门</text>
-								<view><text style="color:#3385FF;">首次下单,请联系客服确认您是否在配送范围</text></view>
-								<view v-if="ghsInfo.shopId && ghsInfo.shopId == 520"><text style="color:red;font-weight:bold">免费配送每天晚23:30发车,其它时间请用跑腿或自取</text></view>
-								<view v-if="ghsInfo.shopId && ghsInfo.shopId == 520"><text style="color:red;font-weight:bold">免费配送仅送货到楼下,不支持送货上楼</text></view>
-							</block>
-						</view>
-						<view v-if="form.sendType == 1">
-							<text style="color: #3385FF;width:100%;">到店自取,没有配送费</text>
-						</view>
-						<view v-if="form.sendType == 2">
-							<text style="color: #3385FF;width:100%;">请跑腿送货,有配送费</text>
-						</view>
-						<view v-if="form.sendType == 3">
-							<text style="color: #3385FF;width:100%;">发物流,运费到付</text>
-						</view>
-						<view v-if="form.sendType == 4">
-							<text style="color: #3385FF;width:100%;">运费到付或另付</text>
-						</view>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false" :arrow="false" v-if="needAddPackCost == true">
-						<view>
-							<text style="color: red;width:100%;">
-							当天订单不满{{lackExpend}}元,加纸箱冰块包装费{{ form.packCost }}元
-							</text>
-						</view>
-					</tui-list-cell>
+	<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
+		<button v-if="ghsInfo.shopId != 4608" class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:30upx;"  @click="changeSendType(0)">送货上门</button>
+		<button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;"  @click="changeSendType(1)">自取</button>
+		<button class="admin-button-com middle" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeSendType(2)">跑腿</button>
+		<button class="admin-button-com middle" :class="[form.sendType == 4 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeSendType(4)">快递</button>
+		<button class="admin-button-com middle" :class="[form.sendType == 3 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeSendType(3)">物流</button>
+	</tui-list-cell>
 
-					<block v-if="$util.isEmpty(wlList)">
-						<tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 3">
-							<view class="tui-title">配送物流</view>
-							<input type="text" placeholder="请填选物流" v-model="form.wlName" @focus="form.wlName=''" placeholder-class="tui-placeholder"/>
-						</tui-list-cell>
-						</block>
-						<block v-else>
-						<tui-list-cell class="line-cell" :arrow="true" v-if="form.sendType == 3">
-							<div class="tui-title">配送物流</div>
-							<picker mode="selector" :value="form.wlId" :range="wlList" range-key="name" @change="changeWlFn" class="tui-input" >
-								<div v-if="form.wlId">{{ wlSelData.name }}</div>
-								<div class="tui-placeholder" v-else>请选择</div>
-							</picker>
-						</tui-list-cell>
-					</block>
+	<tui-list-cell class="line-cell" :hover="false" :arrow="false">
+
+		<view v-if="form.sendType == 0">
+			<block v-if="ghsInfo.shopId == 4804">
+				<text style="color:red;width:100%;font-weight:bold;">市区满500元免费送货上门,其它情况请选自取、跑腿或物流</text>
+			</block>
+			<block v-else-if="ghsInfo.shopId == 4608">
+				<view style="color:red;width:100%;font-weight:bold;">满500元,10公里内免费配送</view>
+				<view style="color:red;width:100%;font-weight:bold;">满1000元,20公里内免费配送</view>
+				<view style="color:#3385FF;width:100%;font-weight:bold;">请自行查询距离是否符合要求,符合要求再下单哦!</view>
+			</block>
+			<block v-else>
+				<text style="color: #3385FF;width:100%;">在本店配送范围的,免费送货上门</text>
+				<view><text style="color:#3385FF;">首次下单,请联系客服确认您是否在配送范围</text></view>
+				<view v-if="ghsInfo.shopId && ghsInfo.shopId == 520"><text style="color:red;font-weight:bold">免费配送每天晚23:30发车,其它时间请用跑腿或自取</text></view>
+				<view v-if="ghsInfo.shopId && ghsInfo.shopId == 520"><text style="color:red;font-weight:bold">免费配送仅送货到楼下,不支持送货上楼</text></view>
+			</block>
+		</view>
+		<view v-if="form.sendType == 1">
+			<text style="color: #3385FF;width:100%;">到店自取,没有配送费</text>
+		</view>
+		<view v-if="form.sendType == 2">
+			<text style="color: #3385FF;width:100%;">请跑腿送货,有配送费</text>
+		</view>
+		<view v-if="form.sendType == 3">
+			<text style="color: #3385FF;width:100%;">发物流,运费到付</text>
+		</view>
+		<view v-if="form.sendType == 4">
+			<text style="color: #3385FF;width:100%;">运费到付</text>
+		</view>
+	</tui-list-cell>
+	<tui-list-cell class="line-cell" :hover="false" :arrow="false" v-if="needAddPackCost == true">
+		<view>
+			<text style="color: red;width:100%;">
+			当天订单不满{{lackExpend}}元,加纸箱冰块包装费{{ form.packCost }}元
+			</text>
+		</view>
+	</tui-list-cell>
+	<block v-if="$util.isEmpty(wlList)">
+		<tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 3">
+			<view class="tui-title">配送物流</view>
+			<input type="text" placeholder="请填选物流" v-model="form.wlName" @focus="form.wlName=''" placeholder-class="tui-placeholder"/>
+		</tui-list-cell>
+		</block>
+		<block v-else>
+		<tui-list-cell class="line-cell" :arrow="true" v-if="form.sendType == 3">
+			<div class="tui-title">配送物流</div>
+			<picker mode="selector" :value="form.wlId" :range="wlList" range-key="name" @change="changeWlFn" class="tui-input" >
+				<div v-if="form.wlId">{{ wlSelData.name }}</div>
+				<div class="tui-placeholder" v-else>请选择</div>
+			</picker>
+		</tui-list-cell>
+	</block>
 </block>
 
+
 					<tui-list-cell class="line-cell" :hover="false" :arrow="true" v-if="displayAddress == true" @click="modifyAddress">
 						<view class="tui-title">收花地址</view>
 						<view v-if="!$util.isEmpty(shopInfo.lat) && !$util.isEmpty(shopInfo.long)">

+ 205 - 36
hdApp/src/admin/billing/affirmGhsBook.vue

@@ -39,37 +39,94 @@
 							<view class="operate-view" @click="gobackEvent">
 								<text class="iconfont icongouwuche"></text>返回列表
 							</view>
-							<view class="describe-view">共{{ allCountFun.bigLength }}扎,合计 ¥<text class="price">{{ allPriceFun }}</text></view>
+							<view class="describe-view">
+								<text class="price">共{{ allCountFun.bigLength }}扎,{{ allCountFun.weight }}公斤,合计 ¥{{ allPriceFun }}</text>
+							</view>
 						</view>
 					</view>
 				</view>
 
 				<view class="module-com input-line-wrap">
 
-					<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
-						<button class="admin-button-com big" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:180upx;"  @click="changeSendType(0)">送货上门</button>
-						<button class="admin-button-com big" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:180upx;"  @click="changeSendType(1)">到店自取</button>
-						<button class="admin-button-com big" :class="[form.sendType == 3 ? 'blue' : 'default']" style="width:180upx;" @click="changeSendType(3)">物流</button>
-					</tui-list-cell>
 
-					<tui-list-cell class="line-cell" :hover="false" :arrow="false">
-						<view v-if="form.sendType == 0">
-							<text style="color: #3385FF;width:100%;">在本店配送范围的,免费送货上门</text>
-							<view><text style="color:red;">首次下单,请联系客服确认是否在配送范围</text></view>
-							<view v-if="ghsInfo.shopId && ghsInfo.shopId == 520"><text style="color:red;font-weight:bold">免费配送每天晚23:30发车,其它时间请用跑腿或自取</text></view>
-							<view v-if="ghsInfo.shopId && ghsInfo.shopId == 520"><text style="color:red;font-weight:bold">免费配送仅送货到楼下,不支持送货上楼</text></view>
-						</view>
-						<view v-if="form.sendType == 1">
-							<text style="color: #3385FF;width:100%;">您自己来店里取,没有配送费</text>
+<block v-if="ghsInfo.pfLevel && ghsInfo.pfLevel == 1">
+	<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
+		<button class="admin-button-com middle" :class="[form.transType == 0 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;"  @click="changeTransType(0)">德邦空运</button>
+		<button class="admin-button-com middle" :class="[form.transType == 1 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;"  @click="changeTransType(1)">顺丰空运</button>
+		<button class="admin-button-com middle" :class="[form.transType == 2 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeTransType(2)">冷链物流</button>
+		<button class="admin-button-com middle" :class="[form.transType == 3 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeTransType(3)">航空物流</button>
+	</tui-list-cell>
+</block>
+<block v-else>
+	<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
+		<button v-if="ghsInfo.shopId != 4608" class="admin-button-com middle" :class="[form.sendType == 0 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:30upx;"  @click="changeSendType(0)">送货上门</button>
+		<button class="admin-button-com middle" :class="[form.sendType == 1 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;"  @click="changeSendType(1)">自取</button>
+		<button class="admin-button-com middle" :class="[form.sendType == 2 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeSendType(2)">跑腿</button>
+		<button class="admin-button-com middle" :class="[form.sendType == 4 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeSendType(4)">快递</button>
+		<button class="admin-button-com middle" :class="[form.sendType == 3 ? 'blue' : 'default']" style="width:160upx;height:100upx;line-height:52upx;" @click="changeSendType(3)">物流</button>
+	</tui-list-cell>
+
+	<tui-list-cell class="line-cell" :hover="false" :arrow="false">
+		<view v-if="form.sendType == 0">
+			<text style="color: #3385FF;width:100%;">在本店配送范围的,免费送货上门</text>
+			<view><text style="color:red;">首次下单,请联系客服确认是否在配送范围</text></view>
+			<view v-if="ghsInfo.shopId && ghsInfo.shopId == 520"><text style="color:red;font-weight:bold">免费配送每天晚23:30发车,其它时间请用跑腿或自取</text></view>
+			<view v-if="ghsInfo.shopId && ghsInfo.shopId == 520"><text style="color:red;font-weight:bold">免费配送仅送货到楼下,不支持送货上楼</text></view>
+		</view>
+		<view v-if="form.sendType == 1">
+			<text style="color: #3385FF;width:100%;">到店自取,没有运费</text>
+		</view>
+		<view v-if="form.sendType == 3">
+			<text style="color: #3385FF;width:100%;">发物流,运费到付</text>
+		</view>
+		<view v-if="form.sendType == 4">
+			<text style="color: #3385FF;width:100%;">运费到付</text>
+		</view>
+	</tui-list-cell>
+
+	<block v-if="$util.isEmpty(wlList)">
+		<tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 3">
+			<view class="tui-title">配送物流</view>
+			<input type="text" placeholder="请填选物流" v-model="form.wlName" @focus="form.wlName=''" placeholder-class="tui-placeholder"/>
+		</tui-list-cell>
+		</block>
+		<block v-else>
+		<tui-list-cell class="line-cell" :arrow="true" v-if="form.sendType == 3">
+			<div class="tui-title">配送物流</div>
+			<picker mode="selector" :value="form.wlId" :range="wlList" range-key="name" @change="changeWlFn" class="tui-input" >
+				<div v-if="form.wlId">{{ wlSelData.name }}</div>
+				<div class="tui-placeholder" v-else>请选择</div>
+			</picker>
+		</tui-list-cell>
+	</block>
+
+</block>
+
+
+					<tui-list-cell class="line-cell" :hover="false" :arrow="true" v-if="displayAddress == true" @click="modifyAddress">
+						<view class="tui-title">收花地址</view>
+						<view v-if="!$util.isEmpty(shopInfo.lat) && !$util.isEmpty(shopInfo.long)">
+							<view><text>{{shopInfo.fullAddress}}</text></view>
+							<view><text>{{shopInfo.showAddress}}</text></view>
 						</view>
-						<view v-if="form.sendType == 3">
-							<text style="color: #3385FF;width:100%;">发物流,运费到付</text>
+						<view v-else>
+							<view><text style="color:#CCCCCC;">请完善门店地址</text></view>
 						</view>
 					</tui-list-cell>
 
-					<tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 3">
-						<view class="tui-title ">配送物流</view>
-						<input type="text" placeholder="请填写物流" v-model="form.wlName" @focus="form.wlName=''" placeholder-class="tui-placeholder"/>
+					<tui-list-cell class="line-cell" :hover="false" v-if="displaySendCost == true">
+					<view class="tui-title">运费</view>
+					<text style="color: #3385FF">¥{{ form.sendCost }}</text>
+					</tui-list-cell>
+
+					<tui-list-cell class="line-cell" :hover="false" v-if="needAddPackCost == true">
+					<view class="tui-title">包装费</view>
+					<text style="color: #3385FF">¥{{ form.packCost }}</text>
+					</tui-list-cell>
+
+					<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
+						<view class="tui-title">总金额</view>
+						<text style="color: #3385FF">¥{{ modifyPrice }}</text>
 					</tui-list-cell>
 
 					<tui-list-cell class="line-cell" :hover="false" :arrow="true">
@@ -80,11 +137,6 @@
                     	</picker>
 					</tui-list-cell>
 
-					<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
-						<view class="tui-title">合计</view>
-						<text style="color: #3385FF">¥{{ modifyPrice }}</text>
-					</tui-list-cell>
-
 					<tui-list-cell class="line-cell" :hover="false" :arrow="false">
 						<textarea style="height: 100upx" v-model="remark" placeholder="这里写备注..."/>
 					</tui-list-cell>
@@ -115,10 +167,11 @@ import appFormSend from "@/components/app-form-send";
 import appSendTime from "@/components/app-send-time";
 const formUtil = require("@/utils/formValidation.js");
 import AppDatePicker from "@/components/app-date-picker";
-import { getGhsDataApi } from "@/api/ghs/index";
-import { freight,createOrder } from "@/api/purchase/index";
+import { getGhsDataApi,getWlList } from "@/api/ghs";
+import { freight,createOrder } from "@/api/purchase";
 import { mapActions, mapGetters } from "vuex";
 import { shopHouponHas } from '@/api/coupon'
+import {currentShop} from "@/api/shop"
 export default {
 	name: "affirmGhsBook",
 	components: {
@@ -167,25 +220,69 @@ export default {
 			today:'',
 			monthLater:'',
 			hasHb:0,
-			selectedHb:{couponAmount:0,hbId:0,couponSelInx:0}
+			selectedHb:{couponAmount:0,hbId:0,couponSelInx:0},
+			needAddPackCost:false,
+			lackExpend:0,
+			wlList:[],
+			wlSelData: {id:0,name:''},
+			shopInfo:{
+				lat:'',
+				long:'',
+				fullAddress:'',
+				showAddress:''
+			}
 		};
 	},
 	onLoad(e) {
 		this.getGhsData(e.id);
+		this.changeTransType(0)
 	},
 	onShow() {
-
+		if(this.form.sendType == 2){
+			//计算运费
+			this.calcFreight()
+		}
 	},
 	computed: {
-		...mapGetters(["getMerchantInfo", "getLoginInfo"]),
+		...mapGetters(["getMerchantInfo", "getLoginInfo","getDictionariesInfo"]),
+		displayAddress(){
+			if(this.form.sendType == 2){
+				return true
+			}
+			if(this.ghsInfo.pfLevel && this.ghsInfo.pfLevel == 1){
+				return true
+			}
+			return false
+		},
+		displaySendCost(){
+			if(this.form.sendType == 2){
+				return true
+			}
+			if(this.ghsInfo.pfLevel && this.ghsInfo.pfLevel == 1){
+				return true
+			}
+			return false
+		},
 		modifyPrice(){
 			let allPrice = this.allPrice.toFixed(2)
 			let price = Number(allPrice)
-			if(this.form.sendType == 2){
+			if(this.displaySendCost == true){
 				price = price + this.form.sendCost
 			}
-			if(this.form.sendType == 2 || this.form.sendType == 0){
+			this.needAddPackCost = false
+			if(this.ghsInfo.pfLevel && this.ghsInfo.pfLevel == 1){
+				//昆明发全国
+				this.needAddPackCost = true
 				price = price + this.form.packCost
+			}else{
+				//同城配送
+				if(this.form.sendType == 4){
+					//设置了订单金额低200需要付包装费,当前只付一次
+					if(Number(this.lackExpend) > 0 && allPrice < Number(this.lackExpend)){
+						price = price + this.form.packCost
+						this.needAddPackCost = true
+					}
+				}
 			}
 			price = parseFloat(price)
 			return price
@@ -193,8 +290,80 @@ export default {
 	},
 	methods: {
 		...mapActions(["initMerchantInfo"]),
+		modifyAddress(){
+      		this.$util.pageTo({ url: '/admin/shop/add?id='+this.getLoginInfo.admin.currentShopId})
+		},
 		init() {
-			this._getDet()
+			let that = this
+
+			this.getDetailData()
+
+			currentShop().then(res=>{
+				if(res.code == 1){
+					that.shopInfo = res.data
+				}
+			})
+
+			getWlList({id:this.option.id}).then(res=>{
+				if(res.code == 1){
+					that.wlList = res.data.list ? res.data.list : []
+				}
+			})
+
+		},
+		calcFreight() {
+			let weight = 0
+			if(!this.$util.isEmpty(this.selectList)){
+				this.selectList.forEach((item,idx,arr) => {
+					if(Number(item.bigCount)>0){
+						let add = Number(item.weight)*Number(item.bigCount)
+						weight = Number(weight) + Number(add)
+					}else{
+						let unitWeight = item.weight/item.ratio
+						let add = Number(unitWeight)*Number(item.smallCount)
+						weight = Number(weight) + Number(add)
+					}
+				})
+			}
+			weight = Number(weight).toFixed(2)
+
+			let params = {
+				ghsId: this.options.id,
+				weight:weight
+			};
+			freight(params).then(res => {
+				if(res.code == 1){
+					this.form.sendCost = res.data.fee?parseFloat(res.data.fee):0
+				}
+			});
+		},
+		changeTransType(num){
+			let that = this
+			this.form.transType = num
+			if(this.getDictionariesInfo.transCost && !this.$util.isEmpty(this.getDictionariesInfo.transCost)){
+				let weight = this.allCountFun.weight ? Number(this.allCountFun.weight) : 0
+				for (const ele of this.getDictionariesInfo.transCost) {
+					if(ele.sign == num){
+						if(num == 2){
+							let llOption = ele.option ? ele.option : ''
+							if(!this.$util.isEmpty(llOption)){
+								for (const llEle of llOption) {
+									if(Number(llEle.num)>=weight){
+										this.form.sendCost = llEle.amount?llEle.amount:0
+										break
+									}
+								}
+							}
+						}else{
+							let perKiloCost = ele.perKiloCost?Number(ele.perKiloCost):0
+							let sendCost = weight*perKiloCost
+							sendCost = parseFloat(sendCost.toFixed(2))
+							this.form.sendCost = sendCost
+						}
+						break
+					}
+				}
+			}
 		},
 		changeSendType(num){
 			this.form.sendType = num
@@ -225,12 +394,13 @@ export default {
 			getGhsDataApi({id:id}).then(res => {
 				that.ghsInfo = res.data;
 				that.form.wlName = res.data.customWlName ? res.data.customWlName : ''
+				that.lackExpend = res.data.lackExpend?parseFloat(res.data.lackExpend):0
 			});
 		},
 		countAllPrices(e){
 			this.allPrices = this.allPrices+Number(this.form.sendCost)
 		},
-		_getDet() {
+		getDetailData() {
 			let data = uni.getStorageSync("modifyShopB")
 			if (this.$util.isEmpty(data)){
 				return
@@ -482,13 +652,12 @@ export default {
 				}
 				.describe-view {
 					display: flex;
-
 					align-items: center;
 					color: #333;
 					font-size: 24upx;
 					.price {
 						font-weight: bold;
-						font-size: 36upx;
+						font-size: 30upx;
 					}
 				}
 			}

+ 152 - 87
hdApp/src/pagesPurchase/bookProduct.vue

@@ -1,19 +1,22 @@
 <!--姜枫 2021.04.11-->
 <template>
 	<view class="billing_box_bg">
-    <view class="c_header" :class="myClass">
-      <view class="header_inside">
-        <image :src="ghsInfo.avatar"></image>
-        <view class="shop_info">
-			<view class="shop_title" @click="pageTo({url:'/pagesPurchase/level?id='+ghsInfo.id})">
-				{{ghsInfo.name}}
+		<view class="c_header" :class="myClass">
+			<view class="header_inside">
+				<image :src="ghsInfo.avatar"></image>
+				<view class="shop_info">
+					<view class="shop_title" @click="pageTo({url:'/pagesPurchase/level?id='+ghsInfo.id})">
+						{{ghsInfo.name}}
+						<block v-if="ghsInfo.name && ghsInfo.name.length <= 12">
+							<text class="level" v-if="ghsInfo.giveLevel && ghsInfo.giveLevel == 2">超级会员</text>
+						</block>
+					</view>
+				</view>
 			</view>
-			<view class="shop_intro">
-				<text @click="pageTo('/pagesPurchase/bookExplain?id='+ghsInfo.id)" style="margin-left:5upx;font-weight:bold;text-decoration:underline;color:red;">预订说明</text>
+			<view>
+			<image v-if="buyNotice == 1" :src="`${constant.imgUrl}/cg/buy_look2.png`" @click.stop="getReadMe(ghsInfo)" style="border-radius:10upx;margin-top:9upx;" mode="widthFix"></image>
 			</view>
-        </view>
-      </view>
-    </view>
+		</view>
 		<view class="input-wrap" >
 			<view style="padding:0upx 0upx 0upx 0upx;margin-right:10upx;" >
 				<button class="admin-button-com middle blue" @click="selectFlowerNumFn()">图片分类</button>
@@ -78,6 +81,7 @@
 
 		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent" @showCartItem="showCartItem"></FooterCart>
 		<wangCg :show.sync="notOpenShop" @bthClick="goToCg()"></wangCg>
+		<personComponent :isHd.sync="isHd" @goToMall="goToMall()"></personComponent>
     	<sel-popup :show="popupShow" :info="infoData" @close="hidePopup" />
 		<app-activily-coupon :show.sync="isNewCustom" :info="newCustomGift" :ghsId="ghsId" />
 
@@ -131,7 +135,7 @@
 		<view v-if="ghsInfo.black && ghsInfo.black == 2" style="position:fixed;bottom:180upx;z-index:99999;
 		font-weight:bold;font-size:36upx;
 		color:red;width:100%;text-align:center;">
-		您没有权限查看
+		您已被列入黑名单
 		</view>
 
 	</view>
@@ -153,6 +157,8 @@ import { getGhsDataApi, ghsInfo,visitMall } from "@/api/ghs/index";
 import SelPopup from "@/components/sel-popup.vue";
 import AppActivilyCoupon from "@/components/module/app-activily-coupon";
 import { mapGetters } from "vuex";
+import personComponent from "./components/person";
+import { getWeixinId } from "@/api/invite";
 export default {
 	name: "bookProduct",
 	components: {
@@ -165,7 +171,8 @@ export default {
 		allMoreSelectInput,
 		wangCg,
 		SelPopup,
-		AppActivilyCoupon
+		AppActivilyCoupon,
+		personComponent
 	},
 	props: {
 		ghsShopAdminId:{
@@ -198,7 +205,7 @@ export default {
 				expendAmount:'0.00',
 				debtAmount:'0.00'
 			},
-			myClass: 'fadeIn',
+			myClass: 'fadeInSmall',
 			shopId:0,
 			infoData:{},
 			xjData:{},
@@ -215,7 +222,10 @@ export default {
 			//每公斤服务费
 			kiloFee:0,
 			cartItemShow:false,
-			offVerifyRepertory:true
+			offVerifyRepertory:true,
+			buyNotice:0,
+			isHd:1,
+			getappIdList: {}
 		};
 	},
 	onPullDownRefresh() {
@@ -438,6 +448,14 @@ export default {
 					this.ghsInfo = res.data
 					let id = res.data.id
 					this.ghsId = id
+					this.buyNotice = res.data.buyNotice
+					if(this.buyNotice == 1){
+						this.myClass = 'fadeIn'
+					}
+					//只有注册了才判断他是不是花店身份
+					if(Number(id)>0){
+						this.isHd = Number(res.data.isHd)
+					}
 					//获取供货商花材
 					if(id>0){
 						this.visitMall(id)
@@ -460,6 +478,16 @@ export default {
 				getGhsDataApi({id: this.option.id}).then(res => {
 					this.ghsInfo = res.data
 					this.shopId = res.data.shopId
+
+					this.buyNotice = res.data.buyNotice
+					//只有注册了才判断他是不是花店身份
+					if(this.option.id && Number(this.option.id)>0){
+						this.isHd = Number(res.data.isHd)
+					}
+					if(this.buyNotice == 1){
+						this.myClass = 'fadeIn'
+					}
+
 					this.visitMall(this.option.id)
 					//不是新人或者已经下过单的或者活动没有开启不显示新人红
 					if(this.ghsInfo.hasCg == 1 || this.ghsInfo.new == 0 || this.ghsInfo.xrFl == 0 || this.ghsInfo.sendNewGift == 1){
@@ -474,6 +502,11 @@ export default {
 					this.kiloFee = res.data.kiloFee || 0
 				})
 			}
+
+			getWeixinId().then(res => {
+				this.getappIdList = res.data
+			})
+
 		},
 		visitMall(ghsId){
 			//访客记录
@@ -492,6 +525,32 @@ export default {
 				this.myClass = 'fadeOut'
 			}
 		},
+		goToMall(){
+			// #ifdef MP-WEIXIN
+			let self = this
+			let url = 'pages/item/item'
+			let lsShopId = self.ghsInfo.lsShopId ? self.ghsInfo.lsShopId : 0
+			if(lsShopId == 0){
+				this.$msg('系统异常')
+				return false
+			}
+			console.log(url + '?account=' + lsShopId)
+			uni.showLoading({mask:true})
+			uni.navigateToMiniProgram({
+				appId: this.getappIdList.mall.miniAppId,
+				path: url + '?account=' + lsShopId,
+				//develop 开发版 trial 体验版 release 正式版
+				envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
+				extraData: {},
+				success (res) {
+					uni.hideLoading()
+				}
+			})
+			// #endif
+			// #ifdef APP-PLUS
+			this.$msg('开发中...')
+			// #endif
+		},
 		//自定义数量
 		customNum(info) {
 			this.isModel = true;
@@ -622,86 +681,86 @@ export default {
 	height: 100%;
 	display: flex;
 	flex-direction: column;
-  .c_header{
-    // height: 240upx;
-    width: 100vw;
-    padding: 0 15upx;
-    box-sizing: border-box;
-    background: linear-gradient(to bottom,#3385FF, #fff);
-    &>.header_inside{
-      position: relative;
-      height: 190upx;
-      margin-top: 30upx;
-      background: #fff;
-      box-shadow: 0upx 1px 21px 0upx rgba(161, 166, 173, 0.4);
-      border-radius: 20upx;
-      padding: 30upx;
-      box-sizing: border-box;
-      &>image{
-        height: 110upx;
-        width: 110upx;
-        display: inline-block;
-        border-radius: 10upx;
-        background-color: #eee;
-        vertical-align: top;
-      }
-      &>.shop_info{
-        vertical-align: top;
-        display: inline-block;
-        height: 100%;
-        margin-left: 20upx;
-        &>.shop_title{
-          font-size: 37upx;
-          font-weight: 600;
-          color: #060606;
-		  width: 523upx;
-		  overflow: hidden;
-		  white-space: nowrap;
-		  .level{
-            margin-left:20upx;
-            color:white;
-            background:#6da3f5;
-            border:1px solid #6da3f5;
-            border-radius:50upx;
-            font-size:22upx;
-            padding:6upx 10upx;
+	.c_header{
+	width: 100vw;
+	padding: 0 15upx;
+	box-sizing: border-box;
+	background: linear-gradient(to bottom,#3385FF, #fff);
+	&>.header_inside{
+	position: relative;
+	height: 124upx;
+	margin-top: 15upx;
+	background: #fff;
+	box-shadow: 0upx 1px 21px 0upx rgba(161, 166, 173, 0.4);
+	border-radius: 20upx;
+	padding: 35upx 30upx 30upx 30upx;
+	box-sizing: border-box;
+	&>image{
+		height: 62upx;
+		width: 62upx;
+		display: inline-block;
+		border-radius: 10upx;
+		background-color: #eee;
+		vertical-align: top;
+	}
+	&>.shop_info{
+		vertical-align: top;
+		display: inline-block;
+		height: 100%;
+		margin-left: 20upx;
+		&>.shop_title{
+		margin-top:0upx;
+		font-size: 38upx;
+		font-weight: 600;
+		color: #060606;
+		width: 580upx;
+		overflow: hidden;
+		white-space: nowrap;
+		.level{
+			margin-left:20upx;
+			color:white;
+			background:#3385FF;
+			border:1px solid #3385FF;
+			border-radius:50upx;
+			font-size:26upx;
+			padding:6upx 15upx;
 			position:absolute;
-		  }
-		  .level-common{
-            margin-left:30upx;
-            color:white;
-            background:#76a9f5;
-            border:1px solid #76a9f5;
-            border-radius:50upx;
-            font-size:20upx;
-            padding:5upx 10upx;
+		}
+		.level-common{
+			margin-left:30upx;
+			color:white;
+			background:#76a9f5;
+			border:1px solid #76a9f5;
+			border-radius:50upx;
+			font-size:20upx;
+			padding:5upx 10upx;
 			position:absolute;
-		  }
-        }
-        &>.shop_intro{
-          margin-top:18upx;
-          font-size:32upx;
-          font-weight:bold;
-          color: #666666;
-        }
-      }
-      .hbInfo{
-        font-size:20upx;
+		}
+		}
+		&>.shop_intro{
+		margin-top: 15upx;
+		font-size: 26upx;
+		font-weight: 400;
+		color: #666666;
+		}
+	}
+	.hbInfo{
+		font-size:20upx;
 		position: absolute;
-        right:15upx;
+		right:15upx;
 		top: 120upx;
 		color: #3385FF;
-      }
-	  .hbImg{
+	}
+	.hbImg{
 		width:120upx;
 		height:120upx;
 		position: absolute;
-        right:0;
+		right:0;
 		top: 10upx;
 		background: white;
-	  }
-    }
-  }
+	}
+	}
+}
 	.input-wrap {
 		display: flex;
 		padding: 22upx 20upx 22upx 30upx;
@@ -827,14 +886,20 @@ export default {
 	.PxClass-box{
 		width: 100%;
 	}
-  .fadeOut{
+.fadeOut{
     height: 0;
     overflow: hidden;
     animation-name: fadeOutFrames;
     animation-duration:.3s;
   }
   .fadeIn{
-    height: 240upx;
+	height: 290upx;
+    overflow: hidden;
+    animation-name: fadeInFrames;
+    animation-duration:.3s;
+  }
+  .fadeInSmall{
+	height: 148upx;
     overflow: hidden;
     animation-name: fadeInFrames;
     animation-duration:.3s;

+ 1 - 2
hdApp/src/pagesPurchase/components/person.vue

@@ -1,8 +1,7 @@
 <template>
   <view class="model" v-if="isHd == 0">
-    <view style="color:white;font-size:38upx;">此为花店采购入口</view>
     <view style="color:white;font-size:38upx;margin-top:40upx;">您不是花店,没有权限查看哦</view>
-    <view style="color:white;font-size:38upx;margin-top:40upx;">您可以点下方去零售商城买花</view>
+    <view style="color:white;font-size:38upx;margin-top:40upx;">您可以点下方去零售买花</view>
     <view class="open-mall" @click="goToMall">去买花</view>
   </view>
 </template>

+ 0 - 2
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -164,8 +164,6 @@
 		</view>
 		</uni-popup>
 
-		<!-- <image v-if="showClassRemind" @click="hideClassRemind" style="position:absolute;width:610upx;height:699upx;top:225upx;left:80upx;z-index:9999;" :src="`${constant.imgUrl}/class_remind.png`"></image> -->
-
 		<view v-if="ghsInfo.black && ghsInfo.black == 2" style="position:fixed;bottom:180upx;z-index:99999;
 		font-weight:bold;font-size:36upx;
 		color:red;width:100%;text-align:center;">