shish 11 месяцев назад
Родитель
Сommit
4f419b7d03

+ 6 - 1
hdApp/src/api/clear/index.js

@@ -25,4 +25,9 @@ export const cancel = data => {
 //花店给客户结清尾款
 export const confirmClear = data => {
 	return https.get('/order-clear/confirm-clear', data)
-}
+}
+
+//微信线下已经付款结账
+export const hasWxPay = data => {
+	return https.get("/clear/has-wx-pay", data);
+};

+ 99 - 124
hdApp/src/pagesPurchase/addCg.vue

@@ -1,60 +1,75 @@
-<!--姜枫 2021.04.11-->
 <template>
+<view class="app-content">
 	<view class="billing_box_bg">
 		<view class="input-wrap" >
+			<view style="padding:0upx 0upx 0upx 0upx;margin-right:15upx;" >
+				<button class="admin-button-com middle blue" @click="selectFlowerNumFn()">图片分类</button>
+			</view>
 			<view class="search-bar">
-				<app-search-module v-model="py" placeholder="输入拼音首字母搜索" @input="searchFn" />
+				<app-search-module ref="globalSearchRef" v-model="globalPy" placeholder="这里搜索" @input="globalSearch" />
 			</view>
-			<view style="float:right">
-				<button class="admin-button-com middle blue" @click="removeFromSave(0)">清除花材</button>
+			<view style="float:right;margin-left:15upx;">
+				<button class="admin-button-com middle blue" @click="removeFromSave(option.customId)">清空购物车</button>
 			</view>
 		</view>
-		<view class="scroll-middle_bx">
 
+		<button class="admin-button-com middle blue" @click="confirmToSave" style="position: absolute;top:120upx;right:24upx;z-index:99;">选好了</button>
+
+		<view class="scroll-middle_bx">
 			<scroll-view scroll-y scroll-with-animation class="tab-view">
-				<div v-for="(item, index) in globalClassItemList" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass(index)">
-					<text>{{ item.className || "" }}</text>
+				<!--分类-->
+				<div v-for="(item, index) in globalClassData" :key="index" class="tab-bar-item" :class="globalClassIndex == index ? 'active' : ''" :data-current="index" @tap.stop="globalSwitchClass(index,item)">
+					<text style="text-align: center;">{{ item.name || "" }}</text>
 				</div>
 				<view style="height: 120upx"></view>
 			</scroll-view>
-			<scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" 
-									scroll-with-animation="true"
-									@scroll="scroll_detail"
-									lower-threshold="100"
-									@scrolltolower="scroll_bottom">
-				<block v-if="!$util.isEmpty(globalClassItemList)">
-					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in globalClassItemList" :key="classIndex" :id="`class_${classIndex}`">
-						<view class="item_list_title">
-							{{ classItem.className }}
+			<scroll-view scroll-y class="right-box" :scroll-top="globalScrollTopPlace" @scroll="globalGetScroll" 
+			:scroll-into-view="scroll_into_view" scroll-with-animation="true" lower-threshold="100" @scrolltolower="globalScrollBottom">
+				<!--花材列表-->
+				<block v-if="!$util.isEmpty(globalItemData)">
+					<view class="item_list_bx selectAll">
+						<view v-if="!$util.isEmpty(globalItemData)">
+							<template v-for="(productItem, productIndex) in globalItemData">
+								<view class="item_list_title" v-if="productItem.className && productItem.className!=''">{{ productItem.className }}</view>
+								<view style="height: 175upx" :key="productIndex">
+									<Commondity
+										:selectJobType="selectJobType"
+										:info="productItem"
+										@showAddModelFn="showAddModelFn"
+										@replaceItemFn="replaceItemFn"
+									></Commondity>
+								</view>
+							</template>
 						</view>
-						<template v-for="(productItem, productIndex) in classItem.child">
-							<view style="height: 160upx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
-								<Commondity v-if="classItem.isActive"
-									:offVerifyRepertory = 'true'
-									:info="productItem"
-									:checkStock="true"
-									:selectJobType="selectJobType"
-									@showAddModelFn="showAddModelFn"
-									@replaceItemFn="replaceItemFn"
-								></Commondity>
+						<view v-else>
+							<view style="height:260upx;text-align:center;color:#CCCCCC;position: relative;">
+								<view style="position: absolute;margin:auto;top:130upx;left:0;right:0;bottom:0;">暂无花材</view>
 							</view>
-						</template>
+						</view>
 					</view>
 				</block>
 				<block v-else>
-					<app-wrapper-empty title="加载中..." :is-empty="$util.isEmpty(globalClassItemList)" />
+					<app-wrapper-empty title="加载中" :is-empty="$util.isEmpty(globalItemData)" />
 				</block>
 			</scroll-view>
+
 		</view>
 
-		<modal-module :show="isAddModel" @cancel="addItemModelHidden" @click="confirmAddItemModel" :title="customData.name" color="#333" :size="32" padding="30rpx 30rpx">
+		<modal-module :show="isAddModel" @cancel="addItemModelHidden" @click="confirmAddItemModel" :title="customData.name" color="#333" :size="32" padding="30rpx 30rpx" >
 			<template slot="customContent">
 				<view class="select-cmd_bx" v-if="customData">
 					<view class="kc">
-						<text class="unit_price">库存 {{ parseFloat(customData.stock) }}</text>
-						<text>{{customData.ratio}}{{customData.smallUnit}}/{{customData.bigUnit}}</text>
+						<text>库存 {{ customData.stock?parseFloat(customData.stock):0 }}</text>
+						<text style="margin-left:14upx;">¥{{ parseFloat(customData.price) }}</text>
+						<text style="margin-left:14upx;">{{customData.ratio}}{{customData.smallUnit}}/{{customData.bigUnit}}</text>
+					</view>
+					<view class="num_bx">
+						<input style="width:280upx" v-model="customData.userPrice" @focus="customData.userPrice = null" :class="[Number(customData.cost) > Number(customData.userPrice) ? 'warning-price' : '']"
+						:disabled="false" type="digit" placeholder="单价" />
+						<text style="font-size:35upx;font-weight:bold;color:#666666;">元</text>
 					</view>
 					<view class="num_bx">
+
 						<!-- #ifdef APP-PLUS -->
 						<input style="width: 280upx" v-model="customData.bigCount" v-if="globalUnitType == 0" type="number" />
 						<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 0">{{customData.bigUnit}}</text>
@@ -63,45 +78,46 @@
 						<!-- #endif -->
 
 						<!-- #ifdef MP-WEIXIN -->
-						<input style="width: 280upx" v-model="customData.bigCount" v-if="globalUnitType == 0" :focus="isAddInputFocus" type="number" />
+						<input style="width: 280upx" v-model="customData.bigCount" v-if="globalUnitType == 0" type="number" />
 						<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 0">{{customData.bigUnit}}</text>
-						<input style="width: 280upx" v-model="customData.smallCount" v-if="globalUnitType == 1" :focus="isAddInputFocus" type="number" />
+						<input style="width: 280upx" v-model="customData.smallCount" v-if="globalUnitType == 1" type="number" />
 						<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 1">{{customData.smallUnit}}</text>
 						<!-- #endif -->
 
-						<image @click="switchGlobalUnitType" :src="`${constant.imgUrl}/icon/switch/switch128.png`" 
-						style="width:86upx;height:86upx;position:relative;top:60upx;right:0upx;" mode="widthFix"></image>
-
 					</view>
 					<view class="num_bx">
-						<input style="width: 280upx" v-model="customData.userPrice" @focus="customData.userPrice = null" 
-						:disabled="false" type="digit" placeholder="单价" />
-						<text style="font-size:35upx;font-weight:bold;color:#666666;">元</text>
+						<input style="width: 280upx;height:40upx;font-size:25upx;" v-model="customData.remark" type="text" placeholder="备注" />
 					</view>
-                    <view style="text-align:center;margin-bottom:30upx;font-size:33upx;">¥{{calcPrice}}</view>
 				</view>
 			</template>
 		</modal-module>
 
-		<FooterCart :price="allPrice" :count="allCount" @confirm="confirmSelectEvent"></FooterCart>
-
-   		<sel-popup :show="popupShow" :info="infoData" @close="hidePopup" />
+		<footer-cart :price="allPrice" :count="allCount" @confirm="confirmToSave" ></footer-cart>
 
+		<uni-popup ref="globalClassImgRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
+			<view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
+				<view v-for="(item, index) in globalClassData" :key="index" @tap.stop="globalChangeClass(index,item)" style="margin-bottom:20upx;margin-left:3upx;">
+				<image :src="item.cover" style="width:120upx;height:120upx;border-radius:10upx;"></image>
+				<view style="margin-top:5upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;">{{item.name}}</view>
+				</view>
+			</view>
+		</uni-popup>
 	</view>
+</view>
 </template>
 
-<script>
+<script>	
 import AppSearchModule from "@/components/module/app-search";
 import AppTabs from "@/components/plugin/tabs";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
-import Commondity from "@/components/module/app-cg-commodity";
+import Commondity from "./components/cgItem";
 import FooterCart from "@/components/module/app-footer-cart";
 import ModalModule from "@/components/plugin/modal";
-import SelPopup from "@/components/sel-popup.vue";
 import { COMMODITY_TYPE } from "@/utils/declare";
-import productMins from "@/mixins/product";
+import productMins from "@/mixins/product2";
+import { mapGetters } from "vuex";
 export default {
-	name: "addCg",
+	name: "index",
 	components: {
 		AppTabs,
 		AppSearchModule,
@@ -109,91 +125,44 @@ export default {
 		Commondity,
 		ModalModule,
 		FooterCart,
-		SelPopup
 	},
 	mixins: [productMins],
 	data() {
 		return {
 			COMMODITY_TYPE,
 			isSmallCount:false,
-			isFocus: false,
-			offVerifyRepertory: true,
-			customData: {
-				bigCount: 0,
-				smallCount: 0
-			},
-			showSubmitModel: false,
-			popupShow:false,
-			infoData:{},
-            selectJobType:'cgItem',
-            checkStock:false
+			globalCheckStock:false,
+			autoLoad: false,
+			selectJobType: "cg",
 		};
 	},
 	computed: {
-        calcPrice() {
-			if(Number(this.customData.userPrice)>0 && (Number(this.customData.bigCount)>0 || Number(this.customData.smallCount)>0)){
-                let num = Number(this.customData.bigCount)>0 ? this.customData.bigCount : this.customData.smallCount
-                return parseFloat((this.customData.userPrice*num).toFixed(2))
-            }
-			return 0
-		}
+		...mapGetters(["getLoginInfo"]),
 	},
-	onLoad(){
-        if(this.option.ghsId){
-            this.selectJobId = this.option.ghsId
-        }
+	onShow() {
+
+	},
+	onLoad () {
+		if(this.option.ghsName){
+			uni.setNavigationBarTitle({ title: this.option.ghsName })
+		}
+		if (this.option.ghsId){
+			this.selectJobId = this.option.ghsId
+		}
+		this.globalRequestType = 'cg'
 		this.initData()
 	},
 	methods: {
-	    showPopup() {
-	        this.popupShow = true;
-	    },
-	    hidePopup() {
-	      this.popupShow = false;
-	    },
-		modalCancel() {
-			this.isAddModel = false;
-			this.customData = {};
-		},
-		cancelEvent() {
-			this.showSubmitModel = false;
+		selectFlowerNumFn(){
+			this.$refs.globalClassImgRef.open('top')
 		},
-		submitEvent(val) {
-			if (val.index === 0) {
-				this.cancelEvent();
-			} else {
-				console.log(444, this.selectList);
-				uni.navigateTo({
-					url: "/admin/billing/affirm"
-				});
-				this.cancelEvent();
-			}
-		},
-		confirmSelectGoodsEvent() {
-			if (this.selectList.length > 0) {
-				uni.navigateTo({
-					url: "/admin/billing/affirmGoods"
-				});
-			} else {
-				this.$msg("请选择花材");
-			}
-		},
-		confirmSelectEvent() {
+		confirmToSave() {
 			if(this.$util.isEmpty(this.selectList)){
 				this.$msg('请选择花材')
 				return false
 			}
-			//因历史遗留原因,打开花材页马上点花材出现数量0或null的情况,需要过滤 shish 20210716
-			let selectList = this.selectList;
-			let list = [];
-			for (let i=0;i<selectList.length;i++){
-				if(/(^[1-9]\d*$)/.test(selectList[i].bigCount) == false && /(^[1-9]\d*$)/.test(selectList[i].smallCount) == false){
-					continue
-				}
-				list.push(selectList[i])
-			}
-			if(list.length <= 0){
-				this.$msg("请选择花材")
+			if (this.$util.isEmpty(this.option.ghsId)){
+				this.$msg("请选择供货商")
 				return
 			}
 			let ghsName = this.option.ghsName ? this.option.ghsName : '';
@@ -203,16 +172,18 @@ export default {
 	}
 };
 </script>
+
 <style lang="scss" scoped>
 .billing_box_bg {
+	background: white;
 	height: 100%;
 	display: flex;
 	flex-direction: column;
 	.input-wrap {
-		padding: 22upx 20upx 22upx 30upx;
+		display: flex;
+		padding: 22upx 20upx 22upx 13upx;
 		.search-bar {
-			display:inline-block;
-			width:530upx;
+			flex: 1;
 		}
 	}
 	.scroll-middle_bx {
@@ -223,6 +194,7 @@ export default {
 		overflow: hidden;
 	}
 	.tab-view {
+		position: relative;
 		height: calc(100vh - 140upx);
 		width: 170upx;
 		flex-shrink: 0;
@@ -255,14 +227,12 @@ export default {
         margin-bottom: 110upx;
       }
 		}
-
 		.active {
 			position: relative;
 			color: $mainColor;
 			font-size: 26upx;
 			background: #fff;
 		}
-
 		.active::before {
 			content: "";
 			position: absolute;
@@ -278,6 +248,7 @@ export default {
 	}
 	.item_list_bx {
 		padding: 40upx 16upx;
+		//padding: 0 16upx;
     &:last-child{
       margin-bottom: 70upx;
     }
@@ -303,7 +274,7 @@ export default {
 		& .num_bx {
 			display: flex;
 			align-items: center;
-			margin-bottom:30upx;
+			margin-bottom: 40upx;
 			padding-left:110upx;
 			& > input {
 				width: 212upx;
@@ -316,8 +287,12 @@ export default {
 			}
 		}
 	}
-	.PxClass-box{
-		width: 100%;
-	}
+}
+.class-popup-style{
+	z-index:999999;
+}
+.warning-price{
+	color:red;
+	font-weight:bold;
 }
 </style>

+ 7 - 29
hdApp/src/pagesPurchase/addCgConfirm.vue

@@ -9,12 +9,10 @@
 								<image class="item-icon" :src="item.cover" />
 								<view class="item-info">
 									<view class="info-line">
-										<text class="item-name">{{ item.itemName }}</text>
+										<text class="item-name">{{ item.name }}</text>
 										<text class="item-price">
 											<text class="price">
-												¥
-												<text v-if="Number(item.bigCount) > 0">{{ parseFloat((Number(item.bigCount)*Number(item.userPrice)).toFixed(2)) }}</text>
-												<text v-if="Number(item.smallCount) > 0">{{ parseFloat((Number(item.smallCount)*Number(item.userPrice)).toFixed(2)) }}</text>
+												¥<text>{{ parseFloat((Number(item.bigCount)*Number(item.userPrice)).toFixed(2)) }}</text>
 											</text>
 										</text>
 									</view>
@@ -22,9 +20,7 @@
 										<text class="item-type" v-if="item.ratioType == 0">{{item.ratio}}{{item.smallUnit}}/{{item.bigUnit}}</text>
 										<text class="item-type" v-else>若干{{item.smallUnit}}/{{item.bigUnit}}</text>
 										<text class="item-count">
-											¥{{ item.userPrice ? parseFloat(item.userPrice) : 0 }}&nbsp;x&nbsp;
-											<text v-if="Number(item.bigCount) > 0">{{ item.bigCount }}{{item.bigUnit}}</text>
-											<text v-if="Number(item.smallCount) > 0">{{ item.smallCount }}{{item.smallUnit}}</text>
+											¥{{ item.userPrice ? parseFloat(item.userPrice) : 0 }} x <text>{{ item.bigCount }}{{item.bigUnit}}</text>
 										</text>
 									</view>
 								</view>
@@ -45,22 +41,12 @@
 				<view class="module-com input-line-wrap">
 					<tui-list-cell class="line-cell" :hover="false" :arrow="false">
 						<view class="tui-title ">供货商</view>
-						<view class="tui-input" v-if="Number(ghsId)>0" @click="showCustomer = true">{{ ghsName }}</view>
-						<view class="tui-placeholder" style="width: 100%" v-else @click="showCustomer = true">没有供货商</view>
+						<view class="tui-input">{{ ghsName }}</view>
 					</tui-list-cell>
 
 					<tui-list-cell class="line-cell" :hover="false" :arrow="false">
 						<view class="tui-title">付款方式</view>
-						<button @click="payMode = 0" class="admin-button-com middle" :class="payMode == 0 ? 'blue' : 'default'">欠款</button>
-						<button @tap="payMode = 1" class="admin-button-com middle" :class="payMode == 1 ? 'blue' : 'default'">更多</button>
-					</tui-list-cell>
-
-					<tui-list-cell class="line-cell" :arrow="true" v-if="payMode == 1">
-						<div class="tui-title">更多方式</div>
-						<picker mode="selector" :value="payWay" :range="payWayList" range-key="name" @change="payWayChange" class="tui-input" >
-						<input v-model="payWay" name="payWay" type="text" hidden />
-						<div style="padding:6upx 0 6upx 0;">{{payWayList[payWayindex].name}}</div>
-						</picker>
+						<button @click="payMode = 0" class="admin-button-com middle" :class="payMode == 0 ? 'blue' : 'default'">记账</button>
 					</tui-list-cell>
 
 					<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
@@ -91,7 +77,7 @@
 </template>
 <script>
 import TuiListCell from "@/components/plugin/list-cell";
-import productMins from "@/mixins/product";
+import productMins from "@/mixins/product2";
 import { addVirtualCg } from "@/api/purchase";
 import { mapActions, mapGetters } from "vuex";
 export default {
@@ -107,8 +93,7 @@ export default {
 			payWay:0,
 			autoLoad: false,
 			sendCost:'',
-			showCustomer: false,
-			selectJobType:'cgItem',
+			selectJobType:'cg',
 			ghsId:0,
 			payWayList:[{name:"本机微信",id:0},{name:"现金",id:4},{name:"支付宝",id:1},{name:"银行卡",id:5}],
 			payWayindex:0,
@@ -119,13 +104,6 @@ export default {
         this.selectJobId = this.option.ghsId ? this.option.ghsId : 0
 		this.ghsId = this.option.ghsId ? this.option.ghsId : 0
 		this.ghsName = this.option.ghsName ? this.option.ghsName : ''
-		if (!this.getMerchantInfo) {
-			this.initMerchantInfo().then(data => {
-				uni.setNavigationBarTitle({title:data.name})
-			})
-		} else {
-			uni.setNavigationBarTitle({ title: this.getMerchantInfo.name })
-		}
 	},
 	computed: {
 		...mapGetters(["getMerchantInfo", "getLoginInfo"]),

+ 250 - 0
hdApp/src/pagesPurchase/components/cgItem.vue

@@ -0,0 +1,250 @@
+<template>
+	<view class="item-cmd_bx" @click.stop="showAddModelFn()">
+		<view class="img_bx" style="background:#eeeeee">
+			<image :src="info.cover" lazy-load="true" :lazy-load-margin="0"></image>
+		</view>
+		<view class="cmd-info_bx">
+			<view class="tit" >
+				<text style="font-size:22upx;border:1upx solid #3385ff;color:white;background-color:#3385ff;margin-right:5upx;padding-left:5upx;padding-right:5upx;" 
+				v-if="info.frontHide && info.frontHide == 1">隐</text>
+				<text style="font-size:22upx;border:1upx solid #3385ff;color:white;background-color:#3385ff;margin-right:5upx;padding-left:5upx;padding-right:5upx;" 
+				v-if="info.presell == 1">预售</text>
+				{{ info.name || "" }}
+				<text v-if="info.variety && info.variety ==1" class="show-color"></text>
+			</view>
+			<view class="kc" style="position:absolute;top:55upx;z-index:99">		
+				<block v-if="info.ratioType == 0">{{info.ratio}}{{info.smallUnit}}/{{info.bigUnit}}</block>
+				<block v-else>若干{{info.smallUnit}}/{{info.bigUnit}}</block>
+			</view>
+			<view class="kc num-open_bx flex-end">
+				<view class="price" style="position:absolute;top:55upx;font-weight:bold;">
+					¥{{ parseFloat(info.price) }}
+					<text v-if="info.reachNum && info.reachNum>0 && info.reachNumDiscount && info.reachNumDiscount>0" style="font-weight:normal;color:#3385FF;margin-left:20upx;">
+						满{{info.reachNum}}↓{{info.reachNumDiscount?parseFloat(info.reachNumDiscount):0}}
+					</text>
+				</view>
+				<view style="text-align: right;margin-right:20upx;" >
+					<view class="open-bx" >
+						<i class="iconfont iconjian" @click.stop="delItemFn()" v-if="bigCount > 0 || smallCount > 0"></i>
+						<text class="num" >
+							<text style="font-weight:bold;color:#3385ff;" v-if="bigCount > 0">{{ `${bigCount}` }}</text>
+							<text v-if="smallCount > 0">{{ `${smallCount}` }}</text>
+						</text>
+						<i class="iconfont iconzeng" @click.stop="addItemFn()"></i>
+					</view>
+					<text v-if="parseFloat((Number(info.stock)+Number(info.onStock)).toFixed(2)) > Number(info.stockWarning)" style="color:#333;margin-right:65upx;">还剩 {{ parseFloat(info.stock) }}</text>
+					<text v-else style="color:red;font-weight:bold;margin-right:65upx;">还剩 {{ parseFloat(info.stock) }}</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+export default {
+	name: "Commodity",
+	components: {},
+	mixins: [],
+	props: {
+		info: {
+			required: true,
+			type: Object,
+			default() {
+				return {};
+			}
+		},
+		scrollTop: {
+			type: Number,
+			default: 0
+		},
+		autoPrice: {},
+		isActive: {
+			type: Boolean,
+			default: false
+		},
+		checkStock: {
+			type: Boolean,
+			default: false
+		},
+		isAlterPrice: {
+			type: Boolean,
+			default: false
+		},
+		selectJobType:{
+			type: String,
+			default: ''
+		}
+	},
+	data() {
+		return {
+			ifFocus:false,
+			bigCount:0,
+			smallCount:0,
+			userPrice:0,
+			remark:''
+		};
+	},
+	watch:{
+		info:{
+			handler(newValue){
+				this.bigCount = newValue.bigCount
+				this.smallCount = newValue.smallCount
+				this.userPrice = newValue.userPrice
+				this.remark = newValue.remark||''
+			},
+			deep:true
+		}
+	},
+	created() {},
+	computed: {
+	},
+	mounted() {
+		this.bigCount = this.info.bigCount
+		this.smallCount = this.info.smallCount
+		this.userPrice = this.info.userPrice
+		this.remark = this.info.remark||''
+	},
+	methods: {
+		addItemFn () {
+			this.$emit("showAddModelFn", { ...this.info, bigCount: this.bigCount, smallCount: this.smallCount, userPrice: this.userPrice,remark:this.remark})
+		},
+		delItemFn() {
+            this.info.bigCount = 0
+            this.info.smallCount = 0
+            this.$emit("replaceItemFn", this.info,1)
+		},
+		showAddModelFn() {
+			this.$emit("showAddModelFn", { ...this.info, bigCount: this.bigCount, smallCount: this.smallCount, userPrice: this.userPrice,remark:this.remark})
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.item-cmd_bx {
+	position: relative;
+	margin-bottom: 20upx;
+	.img_bx {
+		height: 140upx;
+		width: 140upx;
+		position: absolute;
+		left: 0upx;
+		top: 0upx;
+		image{
+			width: 100%;
+			height: 100%;
+		}
+		.sold-out{
+			z-index:10;
+			width:140upx;
+			height:140upx;
+			background-color:black;
+			position:absolute;
+			top:0;
+			left:0;
+			opacity: 0.6;
+			color:white;
+			text-align:center;
+			.sold-out-xj{
+				line-height:160upx;
+				font-size:28upx;
+			}
+			.hide{
+				line-height:160upx;
+				font-size:30upx;
+			}
+		}
+	}
+	.cmd-info_bx {
+		padding-left: 160upx;
+		padding-bottom: 30upx;
+		& .tit {
+			font-size: 32upx;
+			font-weight: 700;
+			color: #333333;
+			overflow: hidden;
+			white-space: nowrap;
+			text-overflow: ellipsis;
+			width:380upx;
+		}
+		.show-color{
+			display:inline-block;
+			width:25upx;
+			height:25upx;
+			background-color:rgb(9, 199, 9);
+			border-radius:15upx;
+			border:none;
+			margin-left:16upx;
+		}
+		& .kc {
+			position: relative;
+			color: #999999;
+			font-size: 24upx;
+			.price{
+				position: absolute;
+				left: 0;
+				bottom: 0;
+			}
+		}
+		& .num-open_bx {
+			display: flex;
+			align-items: center;
+			& .price {
+				font-size: 28upx;
+				color: #ff2842;
+				flex: 1;
+			}
+			& .open-bx {
+				display: flex;
+				align-items: center;
+				& .iconfont {
+					color: #3385ff;
+					font-size: 55upx;
+				}
+				.position{
+					display: block;
+					width: 70upx;
+					text-align: center;
+				}
+				.iconcachu {
+					margin: 0 6upx 0 20upx;
+					color: #ccc;
+					&.edit {
+						color: #3385ff;
+					}
+				}
+				& > .num {
+					display: inline-block;
+					width: 100upx;
+					height:50upx;
+					line-height:50upx;
+					text-align:center;
+					margin: 0 20upx;
+					color: #868686;
+					border-radius: 22upx;
+					background-color: #f5f5f5;
+					font-size: 28upx;
+				}
+				.change-input {
+					width: 164upx;
+					height: 60upx;
+					line-height: 60upx;
+					text-align: center;
+					background: #ffffff;
+					border: 1upx solid #dddddd;
+					border-radius: 4upx;
+					font-size: 25upx;
+				}
+				.btn-box{
+					width: 100upx;
+					height: 60upx;
+					line-height: 60upx;
+					color: #ffffff;
+					background: #3385ff;
+					text-align: center;
+					border-radius: 10upx;
+				}
+			}
+		}
+	}
+}
+</style>

+ 17 - 3
hdApp/src/pagesPurchase/gatherPay.vue

@@ -28,13 +28,15 @@
               <button class="button-com green pay-wx" @click="wxPayFn(1)" style="height:100upx;line-height:50upx;">微信支付</button>
 
               <!-- #ifdef MP-WEIXIN -->
-              <button class="button-com ali-btn" @click="useAliPay" style="margin-top:65upx;">用支付宝付款</button>
+              <button class="button-com ali-btn" @click="useAliPay" style="margin-top:65upx;height:100upx;line-height:50upx;">用支付宝付款</button>
               <!-- #endif -->
 
               <!-- #ifdef APP-PLUS -->
               <button class="button-com green pay-wx ali-btn" @click="aliPay()">支付宝支付</button>
               <!-- #endif -->
 
+              <button class="button-com green pay-wx" @click="wxHasPay()" v-if="live == 0" style="height:100upx;line-height:50upx;margin-top:50upx;">微信线下已付</button>
+
             </block>
             <block v-else>
               <button class="button-com disable pay-wx">微信支付</button>
@@ -48,7 +50,7 @@
 </template>
 <script>
 import { purchaseClearWxPay,purchaseClearAliPay } from "@/api/purchase";
-import { detail } from "@/api/clear";
+import { detail,hasWxPay } from "@/api/clear";
 import wexinPay from "@/utils/pay/wxPay";
 import { mapGetters } from "vuex";
 import { postWxCode } from '@/api/mini'
@@ -67,7 +69,8 @@ export default {
       actPrice: '',
       hasRequestApi:false,
       needCheck:0,
-      remainSecond:0
+      remainSecond:0,
+      live:1
     };
   },
   onLoad (options) {
@@ -79,6 +82,7 @@ export default {
           this.remainSecond = res.data.remainSecond?res.data.remainSecond:0
           this.orderTime = this.remainSecond - 15 > 0 ? (this.remainSecond - 15) : 0
           this.orderTimeFun()
+          this.live = res.data.live
 				}
 		})
   },
@@ -121,6 +125,16 @@ export default {
         this.orderTimeFun()
       },1000)
     },
+    wxHasPay(){
+      let that = this
+      that.$util.confirmModal({content:'确认线下微信已付款?'},() => {
+        hasWxPay({ id: that.id}).then(res=>{
+          if(res.code == 1){
+            that.pageTo({ url: '/pagesPurchase/gatherResult?id='+that.id, type: 2 })
+          }
+        })
+      })
+    },
     aliPay(){
       let that = this
       //解决重复提交问题