wzh 4 месяцев назад
Родитель
Сommit
00a40f0707

+ 1 - 1
crmeb/app/services/user/UserServices.php

@@ -584,7 +584,7 @@ class UserServices extends BaseServices
     {
         /** @var UserWechatuserServices $userWechatUser */
         $userWechatUser = app()->make(UserWechatuserServices::class);
-        $fields = 'u.*,w.country,w.province,w.city,w.sex,w.unionid,w.openid,w.user_type as w_user_type,w.groupid,w.tagid_list,w.subscribe,w.subscribe_time';
+        $fields = 'u.*,w.goods_user_type,w.country,w.province,w.city,w.sex,w.unionid,w.openid,w.user_type as w_user_type,w.groupid,w.tagid_list,w.subscribe,w.subscribe_time';
         [$list, $count] = $userWechatUser->getWhereUserList($where, $fields);
         if ($list) {
             $uids = array_column($list, 'uid');

+ 16 - 0
template/admin/src/pages/user/list/index.vue

@@ -352,6 +352,11 @@
           <template slot-scope="scope">
             <div>{{ scope.row.integral }}</div>
           </template>
+        </el-table-column>
+         <el-table-column label="用户角色" min-width="100">
+          <template slot-scope="scope">
+            <div>{{ getUserRole(scope.row.goods_user_type) }}</div>
+          </template>
         </el-table-column>
         <!--<el-table-column label="付费会员" min-width="90">
           <template slot-scope="scope">
@@ -677,6 +682,17 @@ export default {
     // this.groupLists();
   },
   methods: {
+    getUserRole(roleName){
+      if(roleName == null){
+        roleName = 0;
+      }
+      let roleMap = {
+        "0":"普通用户",
+        "1":"业务员",
+        "2":"经销商"
+      }
+      return roleMap[roleName];
+    },
     getCityList() {
       cityList().then((res) => {
         this.addresData = res.data;

+ 53 - 53
template/uni-app/pages/goods/order_confirm/index.vue

@@ -106,14 +106,14 @@
 				立即领取
 			</view>
 			<view class='wrapper' v-if="!is_gift || is_gift == 1">
-				<view class='item acea-row row-between-wrapper' @tap='couponTap'
-					v-if="!pinkId && !BargainId && !combinationId && !seckillId&& !noCoupon && !discountId && !advanceId">
-					<view>{{$t(`优惠券`)}}</view>
-					<view class='discount'>
-						{{couponTitle}}
-						<text class='iconfont icon-jiantou'></text>
-					</view>
-				</view>
+<!--				<view class='item acea-row row-between-wrapper' @tap='couponTap'-->
+<!--					v-if="!pinkId && !BargainId && !combinationId && !seckillId&& !noCoupon && !discountId && !advanceId">-->
+<!--					<view>{{$t(`优惠券`)}}</view>-->
+<!--					<view class='discount'>-->
+<!--						{{couponTitle}}-->
+<!--						<text class='iconfont icon-jiantou'></text>-->
+<!--					</view>-->
+<!--				</view>-->
 				<view class='item acea-row row-between-wrapper'
 					v-if="!pinkId && !BargainId && !combinationId && !seckillId && !advanceId && integral_open">
 					<view>{{$t(`积分抵扣`)}}</view>
@@ -515,8 +515,8 @@
 			}, {
 				tab: 3,
 				url: 1
-			});
-			if(options.is_gift){
+			});
+			if(options.is_gift){
 				this.is_gift = Number(options.is_gift);
 			}
 			this.couponId = options.couponId || 0;
@@ -542,8 +542,8 @@
 			// #endif
 			if (this.isLogin && this.toPay == false && (this.is_gift == 0 || this.is_gift == 1)) {
 				this.checkShipping();
-			}else if(this.is_gift && this.isLogin){
-				this.getOrderDetail()
+			}else if(this.is_gift && this.isLogin){
+				this.getOrderDetail()
 			} else {
 				toLogin();
 			}
@@ -665,7 +665,7 @@
 			},
 			/**
 			 * 授权回调事件
-			 * 
+			 *
 			 */
 			onLoadFun: function() {
 				this.getaddressInfo();
@@ -768,7 +768,7 @@
 							this.getList()
 						})
 					} else {
-						// #endif	
+						// #endif
 						uni.getLocation({
 							type: 'wgs84',
 							success: (res) => {
@@ -779,13 +779,13 @@
 								this.getList()
 							}
 						})
-						// #ifdef H5	
+						// #ifdef H5
 					}
 					// #endif
 				};
 				this.$nextTick(e => {
-					if(!this.is_gift){
-						this.getConfirm();
+					if(!this.is_gift){
+						this.getConfirm();
 						this.computedPrice();
 					}
 				})
@@ -809,7 +809,7 @@
 			},
 			/**
 			 * 处理点击优惠券后的事件
-			 * 
+			 *
 			 */
 			ChangCoupons: function(e) {
 				// this.usableCoupon = e
@@ -858,8 +858,8 @@
 				this.address.address = false;
 				this.getaddressInfo();
 				if(!this.is_gift){
-					this.getConfirm()
-					this.computedPrice();
+					this.getConfirm()
+					this.computedPrice();
 				}
 			},
 			bindHideKeyboard: function(e) {
@@ -868,36 +868,36 @@
 			getOrderDetail() {
 				getGiftOrderDetail(this.orderId).then(res => {
 					this.giftData = res.data
-					this.$set(this, 'cartInfo', res.data.cartInfo);
-					this.virtual_type = res.data.type
-					this.store_self_mention = res.data.store_self_mention
-					if (res.data.type == 0) {
-						this.is_shipping = true;
-						this.shippingType = 0;
-						this.getaddressInfo();
-						this.$nextTick(()=> {
-							this.$refs.addressWindow.getAddressList();
-						})
-					} else {
-						if (res.data.type == 1) {
-							this.is_shipping = false;
-							this.shippingType = 0;
-							this.getaddressInfo();
-							this.$nextTick(()=> {
-								this.$refs.addressWindow.getAddressList();
-							})
-						} else if (res.data.type == 2) {
-							this.is_shipping = false;
-							this.shippingType = 1;
-							this.addressType(1)
-							this.getList();
-						}
+					this.$set(this, 'cartInfo', res.data.cartInfo);
+					this.virtual_type = res.data.type
+					this.store_self_mention = res.data.store_self_mention
+					if (res.data.type == 0) {
+						this.is_shipping = true;
+						this.shippingType = 0;
+						this.getaddressInfo();
+						this.$nextTick(()=> {
+							this.$refs.addressWindow.getAddressList();
+						})
+					} else {
+						if (res.data.type == 1) {
+							this.is_shipping = false;
+							this.shippingType = 0;
+							this.getaddressInfo();
+							this.$nextTick(()=> {
+								this.$refs.addressWindow.getAddressList();
+							})
+						} else if (res.data.type == 2) {
+							this.is_shipping = false;
+							this.shippingType = 1;
+							this.addressType(1)
+							this.getList();
+						}
 					}
 				})
 			},
 			/**
 			 * 获取当前订单详细信息
-			 * 
+			 *
 			 */
 			getConfirm: function() {
 				let that = this;
@@ -1006,7 +1006,7 @@
 			},
 			/**
 			 * 获取当前金额可用优惠券
-			 * 
+			 *
 			 */
 			getCouponList: function() {
 				let shippingType = this.shippingType;
@@ -1079,11 +1079,11 @@
 						'&pinkId=' +
 						this.pinkId +
 						'&couponId=' +
-						this.couponId + 
-						'&is_gift=' +
-						that.is_gift + 
+						this.couponId +
+						'&is_gift=' +
+						that.is_gift +
 						'&order_id=' + that.orderId
-				} else {
+				} else {
 					let url = '/pages/users/user_address/index?cartId=' + this.cartId + '&pinkId=' + this
 							.pinkId +
 							'&couponId=' + this.couponId + '&new=' + this.news + '&is_gift=' + that.is_gift + '&order_id=' + that.orderId
@@ -1319,7 +1319,7 @@
 						address: `${e.address}-${e.detailed_address}`,
 					}).then(res => {})
 				} else {
-					// #endif	
+					// #endif
 					uni.openLocation({
 						latitude: Number(e.latitude),
 						longitude: Number(e.longitude),
@@ -1329,7 +1329,7 @@
 							Number
 						}
 					});
-					// #ifdef H5	
+					// #ifdef H5
 				}
 				// #endif
 			},
@@ -1842,4 +1842,4 @@
 	.fontC {
 		color: grey;
 	}
-</style>
+</style>