shish %!s(int64=4) %!d(string=hai) anos
pai
achega
6d745cbb78

+ 1 - 11
mallApp/src/components/app-delivery.vue

@@ -90,19 +90,12 @@
           placeholder-class="phcolor"
           placeholder-style="color:#ccc"
           style="width:330upx;"
-          disabled
           class="tui-input"
           name="bookMobile"
           placeholder="如有问题方便联系您"
           type="number"
         />
-        <button
-          class="button-com mini-btn"
-          open-type="getPhoneNumber"
-          @getphonenumber="getWxMobile"
-          v-if="shopUser.mobile == ''"
-          style="padding:12upx 25upx;font-size:22upx;"
-        >帮我填</button>
+        <!-- <button class="button-com mini-btn" open-type="getPhoneNumber" @getphonenumber="getWxMobile" style="padding:12upx 25upx;font-size:22upx;" >帮我填</button> -->
         <!-- #endif -->
         <!-- #ifndef MP-WEIXIN -->
         <input
@@ -259,8 +252,6 @@ export default {
         : "";
     }
     this.form.anonymity = "0"
-    //自动填写已有手机号
-    this.$set(this.form, "bookMobile", this.shopUser.mobile);
   },
   methods: {
     selTimeFn(e) {
@@ -306,7 +297,6 @@ export default {
     },
     // 获取微信手机号
     getWxMobile(e) {
-      console.log(e);
       if (e.detail.errMsg === "getPhoneNumber:ok") {
         getWxPhone({
           iv: e.detail.iv,

+ 25 - 30
mallApp/src/components/module/app-order-list.vue

@@ -3,13 +3,10 @@
 		<block v-if="!$util.isEmpty(info)">
 			<div class="list-left">
 				<div class="image">
-					<img :src="imgUrl | default_img" mode="aspectFill" style="width:68upx;height:68upx;" />
+					<image :src="imgUrl | default_img" mode="aspectFill" style="width:68upx;height:68upx;"></image>
 				</div>
 				<div class="list-msg">
-					<div class="title">{{ info.goodsName || info.title }}</div>
-					<block v-if="(info.goodsStyle && info.goodsStyle != '0') || (info.goodsStyleName  && info.goodsStyleName != '0')">
-						<div class="desc">{{ info.goodsStyle || info.goodsStyleName }}</div>
-					</block>
+					<div class="title">{{ info.name}}</div>
 				</div>
 			</div>
 			<div class="list-right">
@@ -19,7 +16,6 @@
 		</block>
 	</div>
 </template>
-
 <script>
 export default {
 	name: 'list-module',
@@ -59,33 +55,32 @@ export default {
 	methods: {}
 }
 </script>
-
 <style lang="scss" scoped>
-	.list-module {
-		@include disFlex(center, space-between);
-		padding: 20upx 0;
-		border-bottom: 1upx solid $borderColor;
-		.list-left {
-			@include disFlex(flex-start, space-between);
-			.list-msg {
-				margin-left: 30upx;
-				.title {
-					font-size: 28upx;
-					color: $fontColor2;
-					margin-bottom: 10upx;
-				}
-				.desc {
-					color: $fontColor3;
-				}
+.list-module {
+	@include disFlex(center, space-between);
+	padding: 20upx 0;
+	border-bottom: 1upx solid $borderColor;
+	.list-left {
+		@include disFlex(flex-start, space-between);
+		.list-msg {
+			margin-left: 30upx;
+			.title {
+				font-size: 28upx;
+				color: $fontColor2;
+				margin-bottom: 10upx;
 			}
-		}
-		.list-right {
-			text-align: right;
-			color: $fontColor2;
-			.price {
-				margin-bottom: 70upx;
-				color: #333;
+			.desc {
+				color: $fontColor3;
 			}
 		}
 	}
+	.list-right {
+		text-align: right;
+		color: $fontColor2;
+		.price {
+			margin-bottom: 70upx;
+			color: #333;
+		}
+	}
+}
 </style>

+ 0 - 6
mallApp/src/mixins/cgProduct.js

@@ -622,12 +622,8 @@ export default {
 				}
 			}
 
-			console.log('花材列表',list)
-
 			this.setSelectInfoByType({ type: this.pageType, info: list });
 
-			console.log('this.selectList',this.selectList)
-
 			//记忆已经选择的花材
 			this.rememberProduct()
 
@@ -689,7 +685,6 @@ export default {
 				}
 			}
 			this.setSelectInfoByType({type: this.pageType, info: list});
-			console.log('this.selectList','减少花材之后:',this.selectList)
 			//记忆已经选择的花材
 			this.rememberProduct()
 		},
@@ -704,7 +699,6 @@ export default {
 			}
 			this.setSelectInfoByType({ type: this.pageType, info: list });
 
-			console.log('this.selectList','减少花材之后:',this.selectList)
 			//记忆已经选择的花材
 			this.rememberProduct()
 		},

+ 24 - 188
mallApp/src/pages/billing/affirmGhs.vue

@@ -27,7 +27,7 @@
 							</view>
 						</view>
 						<view class="summary-bar">
-							<view class="operate-view" @click="gobackEvent">
+							<view class="operate-view" @click="modifyItem">
 								<text class="iconfont icongouwuche"></text>修改花材
 							</view>
 							<view class="describe-view">共{{ allCountFun.bigLength }}扎,合计 ¥<text class="price">{{ allPriceFun }}</text></view>
@@ -45,12 +45,9 @@
 </template>
 <script>
 import productMins from "@/mixins/cgProduct";
-const formUtil = require("@/utils/formValidation.js");
-//import { freight,createOrder } from "@/api/purchase/index";
 import { mapActions, mapGetters } from "vuex";
-import { shopHouponHas } from '@/api/coupon'
 export default {
-	name: "BillingAffirm", // 开单确认
+	name: "BillingAffirm",
 	components: {
 	},
 	mixins: [productMins],
@@ -63,7 +60,7 @@ export default {
 			sendTimeWant:'',
 			remark:'',
 			form: {
-				debt:1,//结算方式 1欠款订单 0正常订单
+				debt:1,
 				shopId: "",
 				shopName: "",
 				receiveProvince: "",
@@ -78,19 +75,13 @@ export default {
 				sendTimeWant: "",
 				sendCost: "",
 				customId: "",
-				product: "",
-        hbId: '0'
+				product: ""
 			},
 			showCustomer: false,
 			today:'',
 			monthLater:'',
-			modifyPrice:0,
-			hasHb:0,
-			selectedHb:{couponAmount:0,hbId:0,couponSelInx:0}
+			modifyPrice:0
 		};
-	},
-	onLoad(e) {
-		
 	},
 	onShow() {
 		let selectList = this.$util.copyObject(this.selectList);
@@ -112,197 +103,42 @@ export default {
 				}
 			}
 		}
-		this.list = list;
-		if(this.selectedHb.hbId && this.selectedHb.hbId > 0) {
-			this.form.hbId = this.selectedHb.hbId
-			this.calcPrice()
-		}else{
-			this.form.hbId = 0
-			this.hasCoupon()
-			this.calcPrice()
-		}
+		this.list = list
+		this.calcPrice()
 	},
 	computed: {
-		...mapGetters(["getMerchantInfo", "getLoginInfo"])
+		...mapGetters(["getLoginInfo"])
 	},
 	methods: {
 		...mapActions(["initMerchantInfo"]),
+		init(){
+
+		},
 		calcPrice(){
 			let allPrice = this.allPrice.toFixed(2)
 			this.modifyPrice = Number(allPrice)
-			if(this.selectedHb.hbId && this.selectedHb.hbId > 0) {
-				this.modifyPrice = (this.modifyPrice - Number(this.selectedHb.couponAmount)).toFixed(2)
-			}
 			this.modifyPrice = parseFloat(this.modifyPrice)
 		},
-		init() {
-			this._getDet()
-		},
-		bindDateChange(e){
-			let date = e.detail.value
-			this.sendTimeWant = date
-		},
-		toPhone(phone){
-			uni.makePhoneCall({
-				phoneNumber: phone
-			});
-		},
-		goSelectCoupon() {
-			let amount = this.form.sendType == 1 ? this.numberAdd(this.allPrice, Number(this.form.sendCost)) : this.allPrice
-			let query = {amount:amount,ghsId:this.option.id,...this.selectedHb}
-			this.pageTo({url: '/admin/coupon/selectCouponList',query:query})
-		},
-		// 是否有可用红包
-		hasCoupon() {
-			let amount = this.allPrice
-			shopHouponHas({amount:amount,ghsId:this.option.id}).then(res => {
-				this.hasHb = res.data.has
-			}).catch(err => {})
-		},
-		countAllPrices(e){
-			this.allPrices = this.allPrices+Number(this.form.sendCost)
-		},
-		_getDet() {
-			let data = uni.getStorageSync("modifyShopB")
-			if (this.$util.isEmpty(data)){
-				return
-			}
-			Object.keys(this.form).forEach((i, index) => {
-				this.form[i] = data[i];
-			});
-		},
-		purchaseFreight(info) {
+		confirmForm() {
+			let that = this
 			const product = this.selectList.map(ele => {
-				return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount,classId:ele.classId,itemId:ele.itemId };
-			});
-			let params = {
-				ghsId: this.options.id,
-				product: JSON.stringify(product),
-				province: info.province,
-				city:info.city,
-				address:info.address,
-				floor:info.floor,
-				long: info.long,
-				lat: info.lat,
-				sendTimeWant: this.sendTimeWant,
-			};
-			freight(params).then(res => {
-				this.form.sendCost = res.data.sedCost;
-			});
-		},
-		confirmFn(options) {
-			createOrder(options).then(res => {
-				this.resetSelectInfoByType(this.pageType);
-				const {
-					data: { id, orderSn }
-				} = res;
-				let url = `/admin/billing/result?orderId=${id}&orderSn=${orderSn}`;
-				uni.redirectTo({
-					url: url,
-					success: result => {},
-					fail: () => {},
-					complete: () => {}
-				});
-			});
-		},
-		confirmForm(){
-			this.$msg('开发中')
-			return false
-			const product = this.list.map(ele => {
-				return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount,classId:ele.classId,itemId:ele.itemId };
-			});
-			let xj = uni.getStorageSync("ghsXj"+this.ghsInfo.id)
-			let params = {
-				getType:this.form.sendType,
-				sendTimeWant:this.sendTimeWant,
-				sendCost:this.form.sendType==2?'':this.form.sendCost,
-				remark:this.remark,
-				product:JSON.stringify(product),
-				ghsId:this.ghsInfo.id,
-				hbId: this.form.hbId,
-				xj:JSON.stringify(xj)
-			}
-			let self = this;
-			uni.showModal({
-				title: '提示',
-				content: '确认提交?',
-				success: function (res) {
-					if (res.confirm) {
-						uni.showLoading({title: '加载中',mask:true})
-						createOrder(params).then(res => {
-							if(res.code == 1){
-								uni.hideLoading()
-								const {orderSn,realPrice,id} = res.data
-								self.pageTo({url: '/pagesPurchase/wechatPay',query:{orderSn,realPrice,id}, type: 2})
-								setTimeout(() => {
-									self.removeMemory(self.ghsInfo.id)
-								}, 600)
-							}
-						});
-					}
+				let unitType = 0
+				let num = ele.bigCount
+				if(Number(ele.smallCount) > 0){
+					unitType = 1
+					num = (ele.smallCount/ele.ratio).toFixed(2)
 				}
+				return { productId: ele.id, num:num,ptItemId:ele.itemId,property:1,unitType:unitType,property:1};
 			});
-		},
-		numberAdd(arg1, arg2) {
-			var r1, r2, m, n;
-			try {
-				r1 = arg1.toString().split(".")[1].length
-			} catch (e) {
-				r1 = 0
-			}
-			try {
-				r2 = arg2.toString().split(".")[1].length
-			} catch (e) { 
-				r2 = 0 
-			} 
-			m = Math.pow(10, Math.max(r1, r2))
-			n = (r1 >= r2) ? r1 : r2;
-			return ((arg1 * m + arg2 * m) / m).toFixed(n);
-		},
-		NumberSub(arg1, arg2) {
-			var re1, re2, m, n;
-			try {
-				re1 = arg1.toString().split(".")[1].length;
-			} catch (e) {
-			re1 = 0;
-			}
-			try {
-				re2 = arg2.toString().split(".")[1].length;
-			} catch (e) {
-				re2 = 0;
-			}
-			m = Math.pow(10, Math.max(re1, re2)); 
-			n = (re1 >= re2) ? re1 : re2;
-			return ((arg1 * m - arg2 * m) / m).toFixed(n);
-		},
-		// 表单验证
-		async formSubmit(e) {
-			try {
-				// 进行表单检查
-				let formData = this.form;
+			let params = { product: JSON.stringify(product) }
+			createOrder(params).then(res => {
+				if(res.code && res.code == 1){
 
-				const product = this.selectList.map(ele => {
-					return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount };
-				});
-				formData.product = JSON.stringify(product);
-				if (!this.getMerchantInfo) {
-					await this.initMerchantInfo();
-				}
-				formData.shopId = this.getMerchantInfo.id;
-				let checkRes = formUtil.validation(formData, []);
-				// 验证通过!
-				if (!checkRes) {
-					this.confirmFn(formData);
-				} else {
-					this.$msg(checkRes);
 				}
-			} catch (error) {
-				console.log(999999, error);
-			}
+			});
 		},
-		gobackEvent() {
+		modifyItem() {
 			this.$msg('开发中')
-			//this.$util.pageTo({url: "/pagesPurchase/ghsProduct",query: {id:this.options.id},type: 2})
 		}
 	}
 };

+ 1 - 1
mallApp/src/pages/goods/components/buy-foot.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="app-footer">
         <div class="btn-left">
-            <div class="btn-wrap" @click="$msg('开发中...');return false;pageTo('/pages/chat/index')">
+            <div class="btn-wrap" @click="$msg('开发中');">
                 <i class="iconfont iconxiaoxi"></i>
                 <div class="btn-text">客服</div>
             </div>

+ 3 - 17
mallApp/src/pages/goods/components/sel-popup.vue

@@ -49,7 +49,6 @@
     </bottom-popup>
   </div>
 </template>
-
 <script>
 import BottomPopup from "@/components/plugin/bottom-popup";
 import NumberBox from "@/components/plugin/number-box";
@@ -62,7 +61,6 @@ export default {
     AppClose
   },
   props: {
-    // 信息
     info: {
       type: Object,
       default: () => {
@@ -92,7 +90,7 @@ export default {
       }
     },
     maxStock() {
-      return this.info.stock == -1 ? 99999 : this.info.stock;
+      return 9999
     }
   },
   methods: {
@@ -100,8 +98,6 @@ export default {
       this.$emit("change", e);
     },
     close() {
-
-
       this.$emit("close");
     },
     changeStyleFn(index) {
@@ -109,18 +105,8 @@ export default {
     },
     nextFn() {
       uni.setStorageSync("buyGoodsDetil", this.info);
-      this.$util.pageTo({
-        url: "/pages/order/buy",
-        type: 2,
-        query: {
-          goodsId: this.info.id,
-          goodsStyleId: this.$util.isEmpty(this.info.goodsStyleList)
-            ? ""
-            : this.info.goodsStyleList[this.selIndex].id,
-          goodsNum: this.buyNum,
-          selIndex: this.selIndex
-        }
-      });
+      this.$util.pageTo({ url: "/pages/order/buy", type: 2,
+      query: { goodsId: this.info.id, goodsStyleId: this.$util.isEmpty(this.info.goodsStyleList) ? "" : this.info.goodsStyleList[this.selIndex].id, goodsNum: this.buyNum, selIndex: this.selIndex } })
     }
   }
 };

+ 1 - 7
mallApp/src/pages/goods/detail.vue

@@ -51,7 +51,6 @@
     </view>
     <sel-popup :show="popupShow" :info="data" :buyNum="buyNum" @change="changeNum" @close="hidePopup" />
     <buy-foot @buy="showPopup" @goShop="goToShop" :stock="data.stock" />
-    <go-login :show.sync="loginShow" />
     <app-share-mask :show="showShare" text="分享商品" @click="hideShare" />
   </view>
 </template>
@@ -67,7 +66,6 @@ import AppShareMask from "@/components/module/app-share-mask";
 import { share } from "@/mixins";
 import { mapGetters } from "vuex";
 import { getDetail } from "@/api/goods";
-import { getShopUser } from "@/utils/auth";
 export default {
   name: "goods-detail",
   mixins: [share],
@@ -142,11 +140,7 @@ export default {
       this.$util.pageTo({ url: '/pages/home/shop', type: 4, query: { account: account } })
     },
     showPopup() {
-      if (this.$util.isLogin()) {
-        this.popupShow = true;
-      } else {
-        this.loginShow = true;
-      }
+        this.popupShow = true
     },
     hidePopup() {
       this.popupShow = false;

+ 0 - 1
mallApp/src/pages/item/item.vue

@@ -90,7 +90,6 @@ import AppActivilyCoupon from "@/components/item/module/app-activily-coupon";
 import ModalModule from "@/components/item/plugin/modal";
 import allMoreSelectInputMins from "@/mixins/allMoreSelectInput";
 import productMins from "@/mixins/cgProduct";
-//import { getGhsDataApi, ghsInfo,visitMall } from "@/api/ghs/index";
 import { COMMODITY_TYPE } from "@/utils/declare";
 import { mapGetters } from "vuex";
 export default {

+ 1 - 3
mallApp/src/pages/order/buy.vue

@@ -174,9 +174,7 @@ export default {
       this.totalPrice = price.toFixed(2);
     }
   },
-  onLoad(option) {
-    //已有手机号则自动补全
-    this.$set(this.mentionForm, "bookMobile", this.shopUser.mobile);
+  onLoad() {
   },
   created() {},
   methods: {