xiaoshushu 3 年之前
父节点
当前提交
f84d5e63a1

+ 8 - 4
smart-admin/src/main/java/com/huijy/web/controller/api/ApiIndexController.java

@@ -275,11 +275,15 @@ public class ApiIndexController extends ApiAbstractController {
             return AjaxResult.error("提交数据为空");
         }
         //未审核时才允许更新门店信息
-        if (!shop.getAuditFlag().equals("0")) {
-            return AjaxResult.error("店铺信息不允许更新");
+        if (shop.getAuditFlag().equals("0")||shop.getAuditFlag().equals("2")) {
+            //审核不通过重新提交材料,把审核状态改为待审核
+            if(shop.getAuditFlag().equals("2")){
+                shop.setAuditFlag("0");
+            }
+            shopService.updateShop(shop);
+            return AjaxResult.success();
         }
-        shopService.updateShop(shop);
-        return AjaxResult.success();
+        return AjaxResult.error("店铺信息不允许更新");
     }
 
     //更新门店坐标

+ 24 - 0
smart-system/src/main/java/com/huijy/management/domain/Shop.java

@@ -63,6 +63,14 @@ public class Shop extends BaseEntity
     @Excel(name = "详情")
     private String content;
 
+    /** 审核不通过原因 */
+    @Excel(name = "审核不通过原因")
+    private String msg;
+
+    /** 营业执照 */
+    @Excel(name = "营业执照")
+    private String pic;
+
     /** 状态 */
     @Excel(name = "状态")
     private String enableFlag;
@@ -248,6 +256,22 @@ public class Shop extends BaseEntity
         this.shopType = shopType;
     }
 
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public String getPic() {
+        return pic;
+    }
+
+    public void setPic(String pic) {
+        this.pic = pic;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)

+ 39 - 30
smart-system/src/main/resources/mapper/management/ShopMapper.xml

@@ -1,44 +1,47 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.huijy.management.mapper.ShopMapper">
 
     <resultMap type="Shop" id="ShopResult">
-        <result property="shopId"    column="shop_id"    />
-        <result property="name"    column="name"    />
-        <result property="addres"    column="addres"    />
-        <result property="lat"    column="lat"    />
-        <result property="lng"    column="lng"    />
-        <result property="bossName"    column="boss_name"    />
-        <result property="bossPhone"    column="boss_phone"    />
-        <result property="showPictures"    column="show_pictures"    />
-        <result property="labelText"    column="label_text"    />
-        <result property="businessHours"    column="business_hours"    />
-        <result property="briefContent"    column="brief_content"    />
-        <result property="content"    column="content"    />
-        <result property="enableFlag"    column="enable_flag"    />
-        <result property="auditFlag"    column="audit_flag"    />
-        <result property="auditAt"    column="audit_at"    />
-        <result property="auditTime"    column="audit_time"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="memberId"    column="member_id"    />
-        <result property="shopType"    column="shop_type"    />
+        <result property="shopId" column="shop_id"/>
+        <result property="name" column="name"/>
+        <result property="addres" column="addres"/>
+        <result property="lat" column="lat"/>
+        <result property="lng" column="lng"/>
+        <result property="bossName" column="boss_name"/>
+        <result property="bossPhone" column="boss_phone"/>
+        <result property="showPictures" column="show_pictures"/>
+        <result property="labelText" column="label_text"/>
+        <result property="businessHours" column="business_hours"/>
+        <result property="briefContent" column="brief_content"/>
+        <result property="content" column="content"/>
+        <result property="pic" column="pic"/>
+        <result property="enableFlag" column="enable_flag"/>
+        <result property="msg" column="msg"/>
+        <result property="auditFlag" column="audit_flag"/>
+        <result property="auditAt" column="audit_at"/>
+        <result property="auditTime" column="audit_time"/>
+        <result property="createTime" column="create_time"/>
+        <result property="memberId" column="member_id"/>
+        <result property="shopType" column="shop_type"/>
     </resultMap>
 
+
     <sql id="selectShopVo">
-        select shop_id, name, addres, lat, lng, boss_name, boss_phone, show_pictures, label_text, business_hours, brief_content, content, enable_flag, audit_flag, audit_at, audit_time, create_time,
+        select shop_id, name,pic,msg,addres, lat, lng, boss_name, boss_phone, show_pictures, label_text, business_hours, brief_content, content, enable_flag, audit_flag, audit_at, audit_time, create_time,
         member_id,shop_type from t_shop
     </sql>
 
     <select id="selectShopList" parameterType="Shop" resultMap="ShopResult">
         <include refid="selectShopVo"/>
         <where>
-            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
-            <if test="bossName != null  and bossName != ''"> and boss_name like concat('%', #{bossName}, '%')</if>
-            <if test="bossPhone != null  and bossPhone != ''"> and boss_phone = #{bossPhone}</if>
-            <if test="enableFlag != null  and enableFlag != ''"> and enable_flag = #{enableFlag}</if>
-            <if test="auditFlag != null  and auditFlag != ''"> and audit_flag = #{auditFlag}</if>
+            <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
+            <if test="bossName != null  and bossName != ''">and boss_name like concat('%', #{bossName}, '%')</if>
+            <if test="bossPhone != null  and bossPhone != ''">and boss_phone = #{bossPhone}</if>
+            <if test="enableFlag != null  and enableFlag != ''">and enable_flag = #{enableFlag}</if>
+            <if test="auditFlag != null  and auditFlag != ''">and audit_flag = #{auditFlag}</if>
         </where>
     </select>
 
@@ -61,14 +64,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="businessHours != null">business_hours,</if>
             <if test="briefContent != null">brief_content,</if>
             <if test="content != null">content,</if>
+            <if test="pic != null">pic,</if>
             <if test="enableFlag != null">enable_flag,</if>
+            <if test="msg != null">msg,</if>
             <if test="auditFlag != null">audit_flag,</if>
             <if test="auditAt != null">audit_at,</if>
             <if test="auditTime != null">audit_time,</if>
             <if test="createTime != null">create_time,</if>
             <if test="memberId != null">member_id,</if>
             <if test="shopType != null">shop_type,</if>
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="name != null">#{name},</if>
             <if test="addres != null">#{addres},</if>
@@ -81,14 +86,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="businessHours != null">#{businessHours},</if>
             <if test="briefContent != null">#{briefContent},</if>
             <if test="content != null">#{content},</if>
+            <if test="pic != null">#{pic},</if>
             <if test="enableFlag != null">#{enableFlag},</if>
+            <if test="msg != null">#{msg},</if>
             <if test="auditFlag != null">#{auditFlag},</if>
             <if test="auditAt != null">#{auditAt},</if>
             <if test="auditTime != null">#{auditTime},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="memberId != null">#{memberId},</if>
             <if test="shopType != null">#{shopType},</if>
-         </trim>
+        </trim>
     </insert>
 
     <update id="updateShop" parameterType="Shop">
@@ -105,7 +112,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="businessHours != null">business_hours = #{businessHours},</if>
             <if test="briefContent != null">brief_content = #{briefContent},</if>
             <if test="content != null">content = #{content},</if>
+            <if test="pic != null">pic = #{pic},</if>
             <if test="enableFlag != null">enable_flag = #{enableFlag},</if>
+            <if test="msg != null">msg = #{msg},</if>
             <if test="auditFlag != null">audit_flag = #{auditFlag},</if>
             <if test="auditAt != null">audit_at = #{auditAt},</if>
             <if test="auditTime != null">audit_time = #{auditTime},</if>
@@ -130,6 +139,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectListByMemberId" parameterType="Long" resultMap="ShopResult">
         <include refid="selectShopVo"/>
         where member_id = #{memberId}
-
+        order by create_time desc
     </select>
 </mapper>

+ 5 - 0
smart-ui-app/common/common.scss

@@ -119,6 +119,7 @@
 	text-align: center;
 	.f {
 		flex: 1;
+		overflow: hidden;
 	}
 }
 .hr {
@@ -210,6 +211,10 @@
 	.u-upload {
 		margin-left: 20px;
 	}
+	.u-radio-group{
+		position: absolute;
+		padding-left: 12px;
+	}
 	.u-numberbox {
 		position: absolute;
 	}

+ 57 - 19
smart-ui-app/pages.json

@@ -4,6 +4,33 @@
 	},
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 		{
+		    "path" : "pages/index/index2",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "",
+		        "enablePullDownRefresh": false,
+				"navigationStyle": "custom"
+		    }
+		    
+		},
+		{
+			"path": "pages/shop/list",
+			"style": {
+				"navigationBarTitleText": "我的店铺",
+				"enablePullDownRefresh": true,
+				"backgroundTextStyle": "dark"
+			}
+		
+		},
+		{
+			"path": "pages/shop/apply",
+			"style": {
+				"navigationBarTitleText": "店铺开通申请",
+				"enablePullDownRefresh": false
+			}
+		
+		},
+		{
 			"path": "pages/index/index",
 			"style": {
 				"navigationBarTitleText": "",
@@ -58,15 +85,6 @@
 			}
 		},
 		{
-			"path": "pages/shop/list",
-			"style": {
-				"navigationBarTitleText": "我的店铺",
-				"enablePullDownRefresh": true,
-				"backgroundTextStyle": "dark"
-			}
-
-		},
-		{
 			"path": "pages/shop/up",
 			"style": {
 				"navigationBarTitleText": "数据上报",
@@ -75,14 +93,6 @@
 
 		},
 		{
-			"path": "pages/shop/apply",
-			"style": {
-				"navigationBarTitleText": "店铺开通申请",
-				"enablePullDownRefresh": false
-			}
-
-		},
-		{
 			"path": "pages/travel/detail",
 			"style": {
 				"navigationBarTitleText": "内容详情",
@@ -119,14 +129,42 @@
 			}
 
 		}
-	],
+	    
+        ,{
+            "path" : "pages/hotel/index",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "酒店列表",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/hotel/appointment",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "酒店预约",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/hotel/my",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "我的预约",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+    ],
 	"tabBar": {
 		"color": "#7A7E83",
 		"selectedColor": "#c74547",
 		"borderStyle": "black",
 		"backgroundColor": "#F8F8F8",
 		"list": [{
-				"pagePath": "pages/index/index",
+				"pagePath": "pages/index/index2",
 				"iconPath": "static/tab/home.png",
 				"selectedIconPath": "static/tab/home_select.png",
 				"text": "首页"

+ 19 - 0
smart-ui-app/pages/hotel/appointment.vue

@@ -0,0 +1,19 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 19 - 0
smart-ui-app/pages/hotel/index.vue

@@ -0,0 +1,19 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 19 - 0
smart-ui-app/pages/hotel/my.vue

@@ -0,0 +1,19 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 72 - 27
smart-ui-app/pages/shop/apply.vue

@@ -1,10 +1,17 @@
 <template>
 	<view>
 		<view class="cn">
-			<u-steps :list="numList" mode="number" :current="num" active-color="#c74547"></u-steps>
-			<u-subsection :list="subsection" :current="current" @change="section" button-color="#c74547" active-color="#ffffff"></u-subsection>
+			<u-steps :list="numList" mode="number" :current="item.auditFlag + 1" active-color="#c74547"></u-steps>
+			<view class="btg" v-if="item.auditFlag == 2">{{ item.msg }}</view>
 			<view class="info">
 				<view class="form_group hr">
+					<view class="lable">商铺类型</view>
+					<u-radio-group v-model="item.shopType" active-color="#c74547">
+						<u-radio :name="1">商铺</u-radio>
+						<u-radio :name="2">酒店</u-radio>
+					</u-radio-group>
+				</view>
+				<view class="form_group hr">
 					<view class="lable">商铺名称</view>
 					<input type="text" placeholder="请输入商铺名称" v-model="item.name" />
 				</view>
@@ -25,7 +32,31 @@
 					<view class="lable">老板电话</view>
 					<input type="number" placeholder="请输入老板电话" v-model="item.bossPhone" />
 				</view>
-				<view class="form_group"><view class="lable">商铺展示</view></view>
+				<view class="form_group">
+					<view class="lable">营业执照</view>
+					<view class="text">请上传1张营业执照</view>
+				</view>
+				<view class="pl5">
+					<u-upload
+						:ip="ip"
+						:action="upload.action"
+						:header="upload.header"
+						:size-type="upload.size"
+						:max-count="1"
+						:name="upload.name"
+						:file-list="item.pic"
+						:deletable="item.auditFlag != 1"
+						:show-progress="item.auditFlag != 1"
+						:custom-btn="item.auditFlag == 1"
+						ref="pic"
+						width="140"
+						height="140"
+					></u-upload>
+				</view>
+				<view class="form_group">
+					<view class="lable">商铺展示</view>
+					<view class="text">最多上传5张展示图片</view>
+				</view>
 				<view class="pl5">
 					<u-upload
 						:ip="ip"
@@ -46,8 +77,9 @@
 				<view class="form_group"><view class="lable">商铺简介</view></view>
 				<textarea placeholder="请输入商铺简介(200字以内)" v-model="item.briefContent" maxlength="200" />
 			</view>
-			<button class="btn" @click="up()" v-if="!item.auditFlag">申请开通</button>
-			<button class="btn" @click="up()" v-if="item.auditFlag == 0">更新资料</button>
+			<button class="btn" @click="up()" v-if="item.auditFlag == -1">申请开通</button>
+			<button class="btn" @click="up()" v-if="item.shopId && item.auditFlag == 0">更新资料</button>
+			<button class="btn" @click="up()" v-if="item.auditFlag == 2">重新提交资料</button>
 		</view>
 	</view>
 </template>
@@ -57,11 +89,8 @@ export default {
 	data() {
 		return {
 			ip: this.$http.urls.ip,
-			subsection: [{ name: '商铺', value: 1 }, { name: '酒店', value: 2 }],
 			numList: [{ name: '资料填写' }, { name: '资料审核' }, { name: '审核通过' }],
-			num: 0,
-			current: 0,
-			item: { showPictures: [] },
+			item: { showPictures: [],auditFlag: -1,pic:[]},
 			zb: '', //坐标
 			upload: {
 				header: { apiToken: this.$getUser().apiToken },
@@ -78,24 +107,12 @@ export default {
 			if (this.item.lat) {
 				this.zb = '纬度:' + this.item.lat + ' 经度:' + this.item.lng;
 			}
-			this.subsection.forEach((item, index) => {
-				if (item.value == this.item.shopType) {
-					this.current = index;
-				}
-			});
-			this.item.shopType = this.subsection[this.current].value;
-			if (this.item.auditFlag == 0) {
-				this.num = 1;
-			}
-			if (this.item.auditFlag == 1) {
-				this.num = 2;
+			if (this.item.auditFlag == 2) {
+				this.numList[2].name = '审核不通过';
 			}
 		}
 	},
 	methods: {
-		section(current) {
-			this.current = current;
-		},
 		//定位
 		wz(index) {
 			uni.chooseLocation({
@@ -112,14 +129,27 @@ export default {
 		},
 		up() {
 			this.item.showPictures = [];
+			this.item.pic = [];
+			let pic = this.$refs.pic.lists.filter(val => {
+				return val.progress == 100;
+			});
 			let files = this.$refs.uUpload.lists.filter(val => {
 				return val.progress == 100;
 			});
+			//营业执照
+			pic.forEach(item => {
+				if (item.response) {
+					this.item.pic.push(item.response.fileName); //获取上传成功的网络地址
+				} else {
+					this.item.pic.push(item.url); //原来的地址
+				}
+			});
+			//商铺展示图片
 			files.forEach(item => {
 				if (item.response) {
-					this.item.showPictures.push({ url: item.response.fileName }); //获取上传成功的网络地址
+					this.item.showPictures.push(item.response.fileName); //获取上传成功的网络地址
 				} else {
-					this.item.showPictures.push({ url: item.url }); //原来的地址
+					this.item.showPictures.push(item.url); //原来的地址
 				}
 			});
 			let rule = [
@@ -128,15 +158,16 @@ export default {
 				{ name: 'bossName', checkType: 'notnull', errorMsg: '请输入老板名称' },
 				{ name: 'bossPhone', checkType: 'notnull', errorMsg: '请输入老板电话' },
 				{ name: 'lat', checkType: 'notnull', errorMsg: '请在地图上选择坐标' },
+				{ name: 'pic', checkType: 'notnull', errorMsg: '请上传营业执照' },
 				{ name: 'showPictures', checkType: 'notnull', errorMsg: '请上传至少1张展示图' }
 			];
 			if (!this.$verify.check(this.item, rule)) {
 				uni.showModal({ content: this.$verify.error, showCancel: false });
 				return;
 			}
-			this.item.shopType = this.subsection[this.current].value;
 			this.item.memberId = this.$getUser().memberId;
-			this.item.showPictures = JSON.stringify(this.item.showPictures);
+ 			this.item.showPictures =this.item.showPictures.toString();
+			this.item.pic =this.item.pic.toString();
 			this.$http.request({
 				method: 'POST',
 				url: this.item.shopId ? this.$http.urls.updateShop : this.$http.urls.shopApply,
@@ -159,6 +190,13 @@ export default {
 	text-align: center;
 	margin-top: 20px;
 }
+.btg {
+	padding: 15px;
+	background-color: #fef0f0;
+	color: #f56c6c;
+	margin-top: 15px;
+	border-radius: 5px;
+}
 .u-subsection {
 	margin-top: 20px;
 }
@@ -190,4 +228,11 @@ export default {
 		margin-top: 25px;
 	}
 }
+.text {
+	font-size: 11px;
+	font-weight: normal;
+	color: $dar;
+	flex: 0.8;
+	text-align: right;
+}
 </style>

+ 9 - 4
smart-ui-app/pages/shop/list.vue

@@ -3,7 +3,7 @@
 		<view class="list">
 			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
 				<view class="lef">
-					<image :src="ip + item.showPictures[0].url" mode="aspectFill" class="pic"></image>
+					<image :src="ip + item.showPictures[0]" mode="aspectFill" class="pic"></image>
 					 <view class="tag">{{ item.shopType == 1 ? '门店' : '酒店' }}</view>
 				</view>
 				<view class="con">
@@ -12,12 +12,16 @@
 						<view class="wz">{{ item.addres }}</view>
 						<view class="audit" v-if="item.auditFlag == 0">
 							<text class="icon">&#xe82e;</text>
-							<text>审核</text>
+							<text>审核</text>
 						</view>
 						<view class="audit" v-if="item.auditFlag == 1" style="color: #18B566;">
 							<text class="icon">&#xe82e;</text>
 							<text>审核通过</text>
 						</view>
+						<view class="audit" v-if="item.auditFlag == 2" style="color: #F44336;">
+							<text class="icon">&#xe82e;</text>
+							<text>审核不通过</text>
+						</view>
 					</view>
 					<view class="lx" @click.stop="up(item)" v-if="item.auditFlag == 1">
 						<text class="icon">&#xec1d;</text>
@@ -40,7 +44,7 @@ export default {
 		return {
 			ip: this.$http.urls.ip,
 			list: [],
-			param: { pageNum: 1, pageSize: 10, memberId: this.$getUser().memberId }
+			param: { pageNum: 1, pageSize: 10, memberId: this.$getUser().memberId}
 		};
 	},
 	onLoad() {
@@ -58,7 +62,8 @@ export default {
 				success: res => {
 					this.list = res.data.data.list;
 					this.list.forEach(item => {
-						item.showPictures = JSON.parse(item.showPictures);
+						item.showPictures =item.showPictures.split(",");
+						item.pic=item.pic.split(",");
 					});
 				}
 			});

+ 2 - 2
smart-ui-app/uview-ui/components/u-upload/u-upload.vue

@@ -277,10 +277,10 @@ export default {
 					// 时,会触发watch,导致重新把原来的图片再次添加到this.lists
 					// 数组的some方法意思是,只要数组元素有任意一个元素条件符合,就返回true,而另一个数组的every方法的意思是数组所有元素都符合条件才返回true
 					let tmp = this.lists.some(val => {
-						return val.url == value.url;
+						return val.url == value;
 					});
 					// 如果内部没有这个图片(tmp为false),则添加到内部
-					!tmp && this.lists.push({blob:false,url: value.url, error: false, progress: 100 });
+					!tmp && this.lists.push({blob:false,url: value, error: false, progress: 100 });
 				});
 			}
 		},

二进制
smart-ui/src/assets/images/pc.jpg


+ 10 - 0
smart-ui/src/assets/styles/ruoyi.scss

@@ -264,3 +264,13 @@
 	position: relative;
 	float: right;
 }
+.el-dialog__header {
+  background-color: aliceblue !important;
+  border-radius: 5px 5px 0px 0px;
+  padding-bottom: 13px;
+}
+.el-dialog__footer {
+  border-top: 1px solid #e8eaec;
+  background-color: #f8f8f8;
+  padding-top: 20px;
+}

+ 2 - 2
smart-ui/src/views/index.vue

@@ -17,9 +17,9 @@
     <el-row :gutter="32">
       <el-col :span="8">
         <div class="chart-wrapper">
-          <a class="pop" href="https://xdmly.qiyiiot.com/pc/" target="_blank" title="点击跳转到大屏数据展示">
+          <a class="pop" style="display: block;overflow: hidden;" href="https://xdmly.qiyiiot.com/desk/" target="_blank" title="点击跳转到大屏数据展示">
             <div class="lab">大屏数据展示</div>
-            <img :src="pc" />
+            <img :src="pc" style="width: 100%;" />
           </a>
         </div>
       </el-col>

+ 1 - 1
smart-ui/src/views/management/content/index.vue

@@ -134,7 +134,7 @@
         <el-form-item label="点击量" prop="browseNum" v-if="serviceInfo == 2 || serviceInfo == 3">
           <el-input-number v-model="form.browseNum" :min="1" :step="10" placeholder="请输入点击量" />
         </el-form-item>
-        <el-form-item label="展示图片" v-if="serviceInfo == 2 || serviceInfo == 3"><imageUpload v-model="form.showPictures" /></el-form-item>
+        <el-form-item label="展示图片" v-if="serviceInfo == 2 || serviceInfo == 3"><imageUpload :limit="1" v-model="form.showPictures" /></el-form-item>
         <el-form-item label="详情" prop="content"><editor v-model="form.content" :min-height="200" /></el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer" v-if="form.auditFlag == null || form.auditFlag == 0">

+ 39 - 89
smart-ui/src/views/management/shop/index.vue

@@ -35,10 +35,8 @@
       <el-table-column label="老板名称" align="center" prop="bossName" />
       <el-table-column label="老板电话" align="center" prop="bossPhone" />
       <el-table-column label="地址" align="center" prop="addres" />
-      <el-table-column label="状态" align="center" prop="enableFlag" :formatter="enableFlagFormat" />
       <el-table-column label="审核状态" align="center" prop="auditFlag" :formatter="auditFlagFormat" />
       <el-table-column label="申请时间" align="center" prop="createTime" width="180" />
-      <!-- <el-table-column label="审核人" align="center" prop="auditAt" /> -->
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['management:shop:edit']">修改</el-button>
@@ -48,79 +46,32 @@
     </el-table>
 
     <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
-
     <!-- 添加或修改商铺管理对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="70%" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" width="70%" :close-on-click-modal="false" append-to-body>
+      <el-steps :active="parseInt(form.auditFlag )+2" simple style="margin-bottom: 20px;">
+        <el-step title="待审核" icon="el-icon-edit"></el-step>
+        <el-step title="审核资料" icon="el-icon-s-check"></el-step>
+        <el-step title="审核通过" icon="el-icon-success" v-if="form.auditFlag != 2"></el-step>
+        <el-step title="审核不通过" icon="el-icon-error" v-if="form.auditFlag == 2" style="color: red;"></el-step>
+      </el-steps>
+      <el-alert v-if="form.auditFlag == 2" title="审核不通过" type="error" :description="form.msg" show-icon effect="dark" style="margin-bottom: 20px;"></el-alert>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-tabs v-model="activeName">
-          <el-tab-pane label="基础信息" name="first">
-            <el-form-item label="商铺名称" prop="name"><el-input v-model="form.name" placeholder="请输入商铺名称" /></el-form-item>
-
-            <el-form-item label="坐标" prop="lat">
-              <el-input v-model="form.lat" style="width: 180px" placeholder="请输入坐标lat" />
-              ~
-              <el-input v-model="form.lng" style="width: 180px" placeholder="请输入坐标lng" />
-            </el-form-item>
-            <el-form-item label="老板名称" prop="bossName"><el-input v-model="form.bossName" placeholder="请输入老板名称" /></el-form-item>
-            <el-form-item label="老板电话" prop="bossPhone"><el-input v-model="form.bossPhone" placeholder="请输入老板电话" /></el-form-item>
-            <el-form-item label="展示图片"><imageUpload v-model="form.showPictures" /></el-form-item>
-            <!-- <el-form-item label="标签" prop="labelText">
-              <el-input v-model="form.labelText" placeholder="请输入标签" />
-            </el-form-item> -->
-            <el-form-item label="营业时间">
-              <!-- <el-input v-model="form.businessHours" placeholder="请输入营业时间" /> -->
-              <el-time-select
-                placeholder="起始时间"
-                v-model="startTime"
-                :picker-options="{
-                  start: '00:00',
-                  step: '00:15',
-                  end: '23:45'
-                }"
-                style="width: 180px"
-              ></el-time-select>
-              ~
-              <el-time-select
-                placeholder="结束时间"
-                v-model="endTime"
-                :picker-options="{
-                  start: '00:00',
-                  step: '00:15',
-                  end: '23:45',
-                  minTime: startTime
-                }"
-                style="width: 180px"
-              ></el-time-select>
-            </el-form-item>
-            <el-form-item label="地址" prop="addres"><el-input v-model="form.addres" type="textarea" placeholder="请输入内容" /></el-form-item>
-            <el-form-item label="状态">
-              <el-radio-group v-model="form.enableFlag">
-                <el-radio v-for="dict in enableFlagOptions" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
-              </el-radio-group>
-            </el-form-item>
-            <el-form-item label="审核状态">
-              <el-radio-group v-model="form.auditFlag">
-                <el-radio v-for="dict in auditFlagOptions" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
-              </el-radio-group>
-            </el-form-item>
-            <!-- <el-form-item label="审核人" prop="auditAt">
-          <el-input v-model="form.auditAt" placeholder="请输入审核人" />
-        </el-form-item> -->
-            <el-form-item label="审核时间" prop="auditTime">
-              <el-input v-model="form.auditTime" disabled placeholder="请输入审核时间" />
-              <!-- <el-date-picker clearable size="small"
-            v-model="form.auditTime"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择审核时间">
-          </el-date-picker> -->
-            </el-form-item>
-          </el-tab-pane>
-          <el-tab-pane label="简介详情" name="second">
-            <el-form-item label="简介"><editor v-model="form.briefContent" :min-height="192" /></el-form-item>
-            <el-form-item label="详情"><editor v-model="form.content" :min-height="192" /></el-form-item>
-          </el-tab-pane>
-        </el-tabs>
+        <el-form-item label="商铺名称" prop="name"><el-input v-model="form.name" placeholder="请输入商铺名称" /></el-form-item>
+        <el-form-item label="老板名称" prop="bossName"><el-input v-model="form.bossName" placeholder="请输入老板名称" /></el-form-item>
+        <el-form-item label="老板电话" prop="bossPhone"><el-input v-model="form.bossPhone" placeholder="请输入老板电话" /></el-form-item>
+        <el-form-item label="营业执照"><el-image v-if="form.pic" class="lsw_square" :fit="'contain'" :src="baseUrl + form.pic.split(',')[0]" :preview-src-list="[baseUrl + form.pic.split(',')[0]]"></el-image></el-form-item>
+        <el-form-item label="商铺图片"><imageUpload v-model="form.showPictures" :limit="5" /></el-form-item>
+        <el-form-item label="地址" prop="addres"><el-input v-model="form.addres" type="textarea" placeholder="请输入内容" /></el-form-item>
+        <el-form-item label="简介"><el-input type="textarea" rows="6" v-model="form.briefContent"></el-input></el-form-item>
+        <el-form-item label="审核状态" prop="auditFlag">
+          <el-radio-group v-model="form.auditFlag">
+            <el-radio-button v-for="dict in auditFlagOptions" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio-button>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="驳回原因" v-if="form.auditFlag == 2">
+          <el-input type="textarea" rows="3" v-model="form.msg" placeholder="请输入审核不通过原因"></el-input>
+        </el-form-item>
+        <el-form-item label="审核时间" prop="auditTime" v-if="form.auditFlag != 0"><el-input v-model="form.auditTime" disabled placeholder="请输入审核时间" /></el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -157,8 +108,6 @@ export default {
       title: '',
       // 是否显示弹出层
       open: false,
-      // 状态字典
-      enableFlagOptions: [],
       // 审核状态字典
       auditFlagOptions: [],
       // 查询参数
@@ -177,19 +126,20 @@ export default {
       form: {},
       // 表单校验
       rules: {
-        businessHours: [{ required: true, message: '营业时间不能为空' }]
+        name: [{ required: true, message: '商铺名称不能为空' }],
+        bossName: [{ required: true, message: '老板名称不能为空' }],
+        bossPhone: [{ required: true, message: '老板电话不能为空' }],
+        auditFlag: [{ required: true, message: '审核状态不能为空' }]
       },
       startTime: null,
       endTime: null,
-      activeName: 'first'
+      activeName: 'first',
+      baseUrl: process.env.VUE_APP_BASE_API
     };
   },
   created() {
     this.getList();
-    this.getDicts('sys_job_status').then(response => {
-      this.enableFlagOptions = response.data;
-    });
-    this.getDicts('audit_flag').then(response => {
+    this.getDicts('shop_audit').then(response => {
       this.auditFlagOptions = response.data;
     });
   },
@@ -273,14 +223,6 @@ export default {
         this.form = response.data;
         this.open = true;
         this.title = '修改商铺管理';
-        if (this.form.businessHours) {
-          var dhours = this.form.businessHours.split('~');
-          console.log(dhours);
-          if (dhours && dhours.length == 2) {
-            this.startTime = dhours[0];
-            this.endTime = dhours[1];
-          }
-        }
       });
     },
     /** 提交按钮 */
@@ -344,3 +286,11 @@ export default {
   }
 };
 </script>
+<style lang="scss">
+.lsw_square {
+  img{
+    border-radius: 5px;
+    width: 146px;
+  }
+}
+</style>