Explorar el Código

店铺数据关联

suochencheng hace 6 años
padre
commit
8907ff12cd

+ 40 - 10
src/main/java/com/izouma/awesomeadmin/dao/HomeProductMapper.xml

@@ -13,11 +13,13 @@
         <result column="product_id" property="productId" jdbcType="INTEGER"/>
         <result column="rank" property="rank" jdbcType="INTEGER"/>
         <!--generatedEnd-->
+        <result column="store_id" property="storeId" jdbcType="INTEGER"/>
     </resultMap>
 
     <sql id="Base_Column_List">
         <!--generatedStart-->
-        id, del_flag, update_time, update_user, create_time, create_user, type_id, product_id, rank        <!--generatedEnd-->
+        id, del_flag, update_time, update_user, create_time, create_user, type_id, product_id, rank
+        ,store_id       <!--generatedEnd-->
     </sql>
 
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
@@ -33,7 +35,8 @@
         WHERE id = #{id,jdbcType=INTEGER}
     </delete>
 
-    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.HomeProduct" useGeneratedKeys="true" keyProperty="id">
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.HomeProduct" useGeneratedKeys="true"
+            keyProperty="id">
         INSERT INTO home_product
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <!--generatedStart-->
@@ -64,6 +67,9 @@
             <if test="rank!= null">
                 rank,
             </if>
+            <if test="storeId!= null">
+                store_id,
+            </if>
             <!--generatedEnd-->
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -95,6 +101,9 @@
             <if test="rank != null">
                 #{rank,jdbcType=INTEGER},
             </if>
+            <if test="storeId != null">
+                #{storeId,jdbcType=INTEGER},
+            </if>
             <!--generatedEnd-->
         </trim>
     </insert>
@@ -130,6 +139,9 @@
             <if test="rank != null">
                 rank= #{rank,jdbcType=INTEGER},
             </if>
+            <if test="storeId != null">
+                store_id= #{storeId,jdbcType=INTEGER},
+            </if>
             <!--generatedEnd-->
         </set>
         WHERE
@@ -142,7 +154,9 @@
     </update>
 
     <select id="queryHomeProductByPage" parameterType="java.util.Map" resultMap="HomeResult">
-        SELECT <include refid="Base_Column_List"/> FROM home_product
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM home_product
         <where>
             AND del_flag = 'N'
             <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
@@ -176,6 +190,9 @@
             <if test="record.rank != null and !&quot;&quot;.equals(record.rank)">
                 AND rank = #{record.rank}
             </if>
+            <if test="record.storeId != null and !&quot;&quot;.equals(record.storeId)">
+                AND store_id = #{record.storeId}
+            </if>
             <!--generatedEnd-->
             <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
                 <trim prefix="and (" suffix=")" prefixOverrides="OR">
@@ -228,8 +245,11 @@
         rank DESC, id DESC
     </select>
 
-    <select id="queryAllHomeProduct" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.HomeProduct">
-        SELECT <include refid="Base_Column_List"/> FROM home_product
+    <select id="queryAllHomeProduct" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.HomeProduct">
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM home_product
         <where>
             AND del_flag = 'N'
             <if test="idStr != null and !&quot;&quot;.equals(idStr)">
@@ -263,6 +283,9 @@
             <if test="rank != null and !&quot;&quot;.equals(rank)">
                 AND rank = #{rank}
             </if>
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                AND store_id = #{storeId}
+            </if>
             <!--generatedEnd-->
             <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
                 <trim prefix="and (" suffix=")" prefixOverrides="OR">
@@ -315,7 +338,9 @@
     </select>
 
     <select id="queryHomeProduct" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.HomeProduct">
-        SELECT <include refid="Base_Column_List"/> FROM home_product
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM home_product
         <where>
             AND del_flag = 'N'
             <!--generatedStart-->
@@ -376,7 +401,9 @@
 
 
     <select id="queryForHome" parameterType="java.util.Map" resultMap="HomeResult">
-        SELECT <include refid="Base_Column_List"/> FROM home_product
+        SELECT
+        <include refid="Base_Column_List"/>
+        FROM home_product
         <where>
             AND del_flag = 'N'
             <if test="idStr != null and !&quot;&quot;.equals(idStr)">
@@ -410,6 +437,9 @@
             <if test="rank != null and !&quot;&quot;.equals(rank)">
                 AND rank = #{rank}
             </if>
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                AND store_id = #{storeId}
+            </if>
             <!--generatedEnd-->
             <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
                 <trim prefix="and (" suffix=")" prefixOverrides="OR">
@@ -468,9 +498,9 @@
 
 
         <association property="productInfo"
-                    javaType="com.izouma.awesomeadmin.model.ProductInfo"
-                    select="com.izouma.awesomeadmin.dao.ProductInfoMapper.queryProductInfo"
-                    column="{ id = product_id }"/>
+                     javaType="com.izouma.awesomeadmin.model.ProductInfo"
+                     select="com.izouma.awesomeadmin.dao.ProductInfoMapper.queryProductInfo"
+                     column="{ id = product_id }"/>
 
     </resultMap>
 

+ 22 - 0
src/main/java/com/izouma/awesomeadmin/dao/MemberCoinMapper.xml

@@ -14,6 +14,7 @@
         <result column="balance" property="balance" jdbcType="VARCHAR"/>
         <result column="type_flag" property="typeFlag" jdbcType="INTEGER"/>
         <result column="remark" property="remark" jdbcType="VARCHAR"/>
+        <result column="store_id" property="storeId" jdbcType="INTEGER"/>
     </resultMap>
     <sql id="Base_Column_List">
         <trim suffixOverrides=",">
@@ -40,6 +41,7 @@
             type_flag,
 
             remark,
+            store_id,
 
         </trim>
     </sql>
@@ -93,6 +95,9 @@
             <if test="remark!= null">
                 remark,
             </if>
+            <if test="storeId!= null">
+                store_id,
+            </if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">
@@ -131,6 +136,9 @@
             <if test="remark != null">
                 #{remark,jdbcType=VARCHAR},
             </if>
+            <if test="storeId != null">
+                #{storeId},
+            </if>
         </trim>
     </insert>
     <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.MemberCoin">
@@ -172,6 +180,9 @@
             <if test="remark != null">
                 remark= #{remark,jdbcType=VARCHAR},
             </if>
+            <if test="storeId != null">
+                store_id= #{storeId},
+            </if>
         </set>
         where id = #{id,jdbcType=INTEGER}
     </update>
@@ -218,6 +229,9 @@
             <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
                 and remark = #{record.remark}
             </if>
+            <if test="record.storeId != null and !&quot;&quot;.equals(record.storeId)">
+                and store_id = #{record.storeId}
+            </if>
             <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
                 <trim prefix="and (" suffix=")" prefixOverrides="OR">
                     OR user_id LIKE concat('%',#{record.searchKey},'%')
@@ -323,6 +337,9 @@
             <if test="remark != null and !&quot;&quot;.equals(remark)">
                 and remark = #{remark}
             </if>
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
             <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
                 <trim prefix="and (" suffix=")" prefixOverrides="OR">
                     OR user_id LIKE concat('%',#{searchKey},'%')
@@ -428,6 +445,11 @@
                 and remark = #{remark}
             </if>
 
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+
+
         </where>
         LIMIT 1
     </select>

+ 3 - 2
src/main/java/com/izouma/awesomeadmin/dao/StoreServiceTypeMapper.xml

@@ -250,7 +250,8 @@
                 AND user_id = #{record.userId}
             </if>
             <if test="record.storeId != null and !&quot;&quot;.equals(record.storeId)">
-                AND store_id = #{record.storeId}
+                AND (store_id = #{record.storeId} or sys_flag = 'Y')
+
             </if>
             <if test="record.miniId != null and !&quot;&quot;.equals(record.miniId)">
                 AND mini_id = #{record.miniId}
@@ -360,7 +361,7 @@
                 AND user_id = #{userId}
             </if>
             <if test="storeId != null and !&quot;&quot;.equals(storeId)">
-                AND store_id = #{storeId}
+                AND (store_id = #{storeId} or sys_flag = 'Y')
             </if>
             <if test="miniId != null and !&quot;&quot;.equals(miniId)">
                 AND mini_id = #{miniId}

+ 10 - 0
src/main/java/com/izouma/awesomeadmin/model/HomeProduct.java

@@ -37,6 +37,8 @@ public class HomeProduct {
 
     private ProductInfo productInfo;
 
+    private Integer storeId;
+
     /*generatedStart*/
     public Integer getId() {
         return this.id;
@@ -150,5 +152,13 @@ public class HomeProduct {
     public void setProductInfo(ProductInfo productInfo) {
         this.productInfo = productInfo;
     }
+
+    public Integer getStoreId() {
+        return storeId;
+    }
+
+    public void setStoreId(Integer storeId) {
+        this.storeId = storeId;
+    }
 }
 

+ 72 - 52
src/main/java/com/izouma/awesomeadmin/model/MemberCoin.java

@@ -8,7 +8,7 @@ import java.util.Date;
 
 @JsonAutoDetect
 @JsonInclude(JsonInclude.Include.NON_NULL)
-public class MemberCoin{
+public class MemberCoin {
     private Integer id;
     private String delFlag;
     private Date updateTime;
@@ -22,126 +22,146 @@ public class MemberCoin{
     private Integer typeFlag;
     private String remark;
 
-private String searchKey;
+    private String searchKey;
 
-/**
-* and,test_name,like,value;or,remark,=,123
-*/
-private String advancedQuery;
+    /**
+     * and,test_name,like,value;or,remark,=,123
+     */
+    private String advancedQuery;
 
-/**
-* column_name_,desc_;column_name_,asc
-*/
-private String orderByStr;
+    /**
+     * column_name_,desc_;column_name_,asc
+     */
+    private String orderByStr;
 
-    public Integer getId(){
+    private Integer storeId;
+
+    public Integer getId() {
         return this.id;
     }
 
-    public void setId(Integer id){
+    public void setId(Integer id) {
         this.id = id;
     }
-    public String getDelFlag(){
+
+    public String getDelFlag() {
         return this.delFlag;
     }
 
-    public void setDelFlag(String delFlag){
+    public void setDelFlag(String delFlag) {
         this.delFlag = delFlag;
     }
-    public Date getUpdateTime(){
+
+    public Date getUpdateTime() {
         return this.updateTime;
     }
 
-    public void setUpdateTime(Date updateTime){
+    public void setUpdateTime(Date updateTime) {
         this.updateTime = updateTime;
     }
-    public String getUpdateUser(){
+
+    public String getUpdateUser() {
         return this.updateUser;
     }
 
-    public void setUpdateUser(String updateUser){
+    public void setUpdateUser(String updateUser) {
         this.updateUser = updateUser;
     }
-    public Date getCreateTime(){
+
+    public Date getCreateTime() {
         return this.createTime;
     }
 
-    public void setCreateTime(Date createTime){
+    public void setCreateTime(Date createTime) {
         this.createTime = createTime;
     }
-    public String getCreateUser(){
+
+    public String getCreateUser() {
         return this.createUser;
     }
 
-    public void setCreateUser(String createUser){
+    public void setCreateUser(String createUser) {
         this.createUser = createUser;
     }
-    public String getUserId(){
+
+    public String getUserId() {
         return this.userId;
     }
 
-    public void setUserId(String userId){
+    public void setUserId(String userId) {
         this.userId = userId;
     }
-    public String getOrderId(){
+
+    public String getOrderId() {
         return this.orderId;
     }
 
-    public void setOrderId(String orderId){
+    public void setOrderId(String orderId) {
         this.orderId = orderId;
     }
-    public String getMoney(){
+
+    public String getMoney() {
         return this.money;
     }
 
-    public void setMoney(String money){
+    public void setMoney(String money) {
         this.money = money;
     }
-    public String getBalance(){
+
+    public String getBalance() {
         return this.balance;
     }
 
-    public void setBalance(String balance){
+    public void setBalance(String balance) {
         this.balance = balance;
     }
-    public Integer getTypeFlag(){
+
+    public Integer getTypeFlag() {
         return this.typeFlag;
     }
 
-    public void setTypeFlag(Integer typeFlag){
+    public void setTypeFlag(Integer typeFlag) {
         this.typeFlag = typeFlag;
     }
-    public String getRemark(){
+
+    public String getRemark() {
         return this.remark;
     }
 
-    public void setRemark(String remark){
+    public void setRemark(String remark) {
         this.remark = remark;
     }
 
-public String getSearchKey() {
-    return searchKey;
-}
+    public String getSearchKey() {
+        return searchKey;
+    }
 
-public void setSearchKey(String searchKey) {
-    this.searchKey = searchKey;
-}
+    public void setSearchKey(String searchKey) {
+        this.searchKey = searchKey;
+    }
 
-public String getAdvancedQuery() {
-    return advancedQuery;
-}
+    public String getAdvancedQuery() {
+        return advancedQuery;
+    }
 
-public void setAdvancedQuery(String advancedQuery) {
-    this.advancedQuery = advancedQuery;
-}
+    public void setAdvancedQuery(String advancedQuery) {
+        this.advancedQuery = advancedQuery;
+    }
 
-public String getOrderByStr() {
-    return orderByStr;
-}
+    public String getOrderByStr() {
+        return orderByStr;
+    }
 
-public void setOrderByStr(String orderByStr) {
-    this.orderByStr = orderByStr;
-}
+    public void setOrderByStr(String orderByStr) {
+        this.orderByStr = orderByStr;
+    }
 
+    public Integer getStoreId() {
+        return storeId;
+    }
+
+    public void setStoreId(Integer storeId) {
+        this.storeId = storeId;
+    }
 }
 

+ 8 - 0
src/main/java/com/izouma/awesomeadmin/service/impl/MemberCoinServiceImpl.java

@@ -101,6 +101,12 @@ public class MemberCoinServiceImpl implements MemberCoinService {
         logger.info("createMemberCoin");
         try {
 
+            UserInfo userInfo = new UserInfo();
+            userInfo.setId(Integer.valueOf(record.getUserId()));
+            userInfo = userInfoService.getSingleUserInfo(userInfo);
+
+            record.setStoreId(userInfo != null ? userInfo.getStoreId() : null);
+
             int updates = memberCoinMapper.insertSelective(record);
 
             if (updates > 0) {
@@ -174,6 +180,7 @@ public class MemberCoinServiceImpl implements MemberCoinService {
 
                     MemberCoin memberCoin = new MemberCoin();
 
+                    memberCoin.setStoreId(userInfo.getStoreId());
                     memberCoin.setCreateUser("支付宝充值");
                     memberCoin.setUserId(alipayTemp.getOrderId());
                     memberCoin.setMoney(String.valueOf(alipayTemp.getTotalAmount()));
@@ -224,6 +231,7 @@ public class MemberCoinServiceImpl implements MemberCoinService {
             double balance = userInfo.getMoneyCoin();
             double moneyCoin = balance + money;
 
+            memberCoin.setStoreId(userInfo.getStoreId());
             memberCoin.setCreateUser("管理员");
             memberCoin.setBalance(String.valueOf(moneyCoin));
             memberCoin.setTypeFlag(AppConstant.CoinType.SONG);

+ 7 - 0
src/main/java/com/izouma/awesomeadmin/service/impl/UserInfoServiceImpl.java

@@ -621,9 +621,14 @@ public class UserInfoServiceImpl implements UserInfoService {
             userInfo.setOpenId(openId);
             userInfo = getUserInfo(userInfo);
 
+            StoreInfo storeInfo = new StoreInfo();
+            storeInfo.setMiniId(String.valueOf(miniId));
+            storeInfo = storeInfoMapper.queryStoreInfo(storeInfo);
+
             if (userInfo != null) {
                 userInfo.setSessionKey(sessionKey);
                 userInfo.setMiniId(miniId);
+                userInfo.setStoreId(storeInfo != null ? storeInfo.getId() : null);
                 updateUserInfo(userInfo);
                 return userInfo;
             }
@@ -634,6 +639,7 @@ public class UserInfoServiceImpl implements UserInfoService {
             userInfo.setIcon("https://microball.oss-cn-hangzhou.aliyuncs.com/awesomeAdmin/user.png");
             userInfo.setSessionKey(sessionKey);
             userInfo.setMiniId(miniId);
+            userInfo.setStoreId(storeInfo != null ? storeInfo.getId() : null);
 
             userInfo.setMoneyCoin(Double.valueOf(9999));//小程序注册测试赠送一千
 
@@ -646,6 +652,7 @@ public class UserInfoServiceImpl implements UserInfoService {
             memberCoin.setBalance(String.valueOf(9999));
             memberCoin.setTypeFlag(AppConstant.CoinType.SONG);
             memberCoin.setRemark("小程序注册测试:" + 9999 + "余额");
+            memberCoin.setStoreId(storeInfo != null ? storeInfo.getId() : null);
             memberCoinMapper.insertSelective(memberCoin);
 
             return userInfo;

+ 426 - 409
src/main/vue/src/pages/BannerInfos.vue

@@ -1,7 +1,7 @@
 <template>
     <div>
         <div class="filters-container">
-        
+
             <el-input placeholder="关键字" size="small" v-model="filter1" clearable class="filter-item"></el-input>
             <el-button @click="searchData" type="primary" size="small" icon="el-icon-search" class="filter-item">搜索
             </el-button>
@@ -19,7 +19,7 @@
             </el-button>
             <el-dropdown trigger="click" size="medium" class="table-column-filter">
                 <span>
-                  筛选数据<i class="el-icon-arrow-down el-icon--right"></i>
+                    筛选数据<i class="el-icon-arrow-down el-icon--right"></i>
                 </span>
                 <el-dropdown-menu slot="dropdown" class="table-column-filter-wrapper">
                     <el-checkbox v-for="item in tableColumns" :key="item.value" v-model="item.show">{{item.label}}
@@ -28,63 +28,61 @@
             </el-dropdown>
         </div>
         <el-table
-                :data="tableData"
-                :height="tableHeight"
-                row-key="id"
-                ref="table">
+                  :data="tableData"
+                  :height="tableHeight"
+                  row-key="id"
+                  ref="table">
             <el-table-column
-                    v-if="multipleMode"
-                    align="center"
-                    type="selection"
-                    width="50">
+                             v-if="multipleMode"
+                             align="center"
+                             type="selection"
+                             width="50">
             </el-table-column>
             <el-table-column
-                    type="index"
-                    min-width="50"
-                    align="center">
+                             type="index"
+                             min-width="50"
+                             align="center">
             </el-table-column>
-                            
-                                            <el-table-column
-                                v-if="isColumnShow('id')"
-                                prop="id"
-                                label="ID"
-                                min-width="100">
-                        </el-table-column>
-                                                                                                                                                                                                            
-                                            <!-- <el-table-column
+
+            <el-table-column
+                             v-if="isColumnShow('id')"
+                             prop="id"
+                             label="ID"
+                             min-width="100">
+            </el-table-column>
+
+            <!-- <el-table-column
                                 v-if="isColumnShow('userId')"
                                 prop="userId"
                                 label="用户Id"
                                 min-width="100">
                         </el-table-column> -->
-                                                                
-                                            <!-- <el-table-column
+
+            <!-- <el-table-column
                                 v-if="isColumnShow('miniId')"
                                 prop="miniId"
                                 label="小程序"
                                 min-width="100">
                         </el-table-column> -->
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('storeId')"
-                                prop="storeId"
-                                label="店铺Id"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                     
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('typeFlag')"
-                                prop="typeFlag"
-                                label="类型"
-                                min-width="100">
-                                   <template slot-scope="{row}">
-                                {{row.typeFlag==0?'商品':'小程序页面'}}
-                            </template>
-                        </el-table-column>
-                                                                
-                                            <!-- <el-table-column
+
+            <el-table-column
+                             v-if="isColumnShow('storeId')"
+                             prop="storeId"
+                             label="店铺Id"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('typeFlag')"
+                             prop="typeFlag"
+                             label="类型"
+                             min-width="100">
+                <template slot-scope="{row}">
+                    {{row.typeFlag==0?'商品':'小程序页面'}}
+                </template>
+            </el-table-column>
+
+            <!-- <el-table-column
                                 v-if="isColumnShow('title')"
                                 prop="title"
                                 label="标题"
@@ -97,59 +95,58 @@
                                 label="子标题"
                                 min-width="100">
                         </el-table-column> -->
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('imageUrl')"
-                                prop="imageUrl"
-                                label="图片"
-                                min-width="140">
-                            <template slot-scope="{row}">
-                                <img :src="row.imageUrl" @click="showImg(row.imageUrl)" style="width: 100px;height: 100px;vertical-align: middle;" />
-                            </template>
 
-                        </el-table-column>
-                                                  <el-table-column
-                                prop="productId"
-                                label="商品Id"
-                                min-width="100">
-                        </el-table-column>                   
-                                            <el-table-column
-                                v-if="isColumnShow('pathUrl')"
-                                prop="pathUrl"
-                                label="地址"
-                                min-width="100">
-                        </el-table-column>
+            <el-table-column
+                             v-if="isColumnShow('imageUrl')"
+                             prop="imageUrl"
+                             label="图片"
+                             min-width="140">
+                <template slot-scope="{row}">
+                    <img :src="row.imageUrl" @click="showImg(row.imageUrl)" style="width: 100px;height: 100px;vertical-align: middle;" />
+                </template>
 
-                               <el-table-column
-                                v-if="isColumnShow('statusFlag')"
-                                prop="statusFlag"
-                                label="状态"
-                                min-width="100">
-                             
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('remark')"
-                                prop="remark"
-                                label="备注"
-                                min-width="100">
-                        </el-table-column>
-                                                                
-                                            <el-table-column
-                                v-if="isColumnShow('rank')"
-                                prop="rank"
-                                label="排序"
-                                min-width="100">
-                        </el-table-column>
+            </el-table-column>
+            <el-table-column
+                             prop="productId"
+                             label="商品Id"
+                             min-width="100">
+            </el-table-column>
+            <el-table-column
+                             v-if="isColumnShow('pathUrl')"
+                             prop="pathUrl"
+                             label="地址"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('statusFlag')"
+                             prop="statusFlag"
+                             label="状态"
+                             min-width="100">
+
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('remark')"
+                             prop="remark"
+                             label="备注"
+                             min-width="100">
+            </el-table-column>
+
+            <el-table-column
+                             v-if="isColumnShow('rank')"
+                             prop="rank"
+                             label="排序"
+                             min-width="100">
+            </el-table-column>
 
-                                                            <el-table-column
-                    label="操作"
-                    align="center"
-                    fixed="right"
-                    min-width="150"
-            >
+            <el-table-column
+                             label="操作"
+                             align="center"
+                             fixed="right"
+                             min-width="150">
                 <template slot-scope="scope">
-                                        <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
+                    <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
                     <el-button @click="deleteRow(scope.row)" type="danger" size="mini" plain>删除</el-button>
                 </template>
             </el-table-column>
@@ -164,14 +161,14 @@
                 </el-button-group>
             </div>
             <el-pagination
-                    background
-                    @size-change="pageSizeChange"
-                    @current-change="currentPageChange"
-                    :current-page="currentPage"
-                    :page-sizes="[10, 20, 30, 40, 50]"
-                    :page-size="pageSize"
-                    layout="total, sizes, prev, pager, next, jumper"
-                    :total="totalNumber">
+                           background
+                           @size-change="pageSizeChange"
+                           @current-change="currentPageChange"
+                           :current-page="currentPage"
+                           :page-sizes="[10, 20, 30, 40, 50]"
+                           :page-size="pageSize"
+                           layout="total, sizes, prev, pager, next, jumper"
+                           :total="totalNumber">
             </el-pagination>
         </div>
         <el-dialog title="高级查询" :visible.sync="showAdvancedQueryDialog">
@@ -266,343 +263,363 @@
     </div>
 </template>
 <script>
-    import {mapState} from 'vuex'
-    import {format} from 'date-fns'
-    import zh from 'date-fns/locale/zh_cn'
-
-    export default {
-        name: 'BannerInfos',
-        created() {
+import { mapState } from 'vuex';
+import { format } from 'date-fns';
+import zh from 'date-fns/locale/zh_cn';
+
+export default {
+    name: 'BannerInfos',
+    created() {
+        this.getData();
+    },
+    data() {
+        return {
+            totalNumber: 0,
+            totalPage: 10,
+            currentPage: 1,
+            pageSize: 20,
+            tableData: [],
+            filter1: '',
+            filter2: '',
+            tableColumns: [
+                {
+                    label: 'ID',
+                    value: 'id',
+                    show: true,
+                },
+                {
+                    label: '用户Id',
+                    value: 'userId',
+                    show: true,
+                },
+                {
+                    label: '小程序',
+                    value: 'miniId',
+                    show: true,
+                },
+                {
+                    label: '店铺',
+                    value: 'storeId',
+                    show: true,
+                },
+                {
+                    label: '状态',
+                    value: 'statusFlag',
+                    show: true,
+                },
+                {
+                    label: '类型',
+                    value: 'typeFlag',
+                    show: true,
+                },
+                {
+                    label: '标题',
+                    value: 'title',
+                    show: true,
+                },
+                {
+                    label: '子标题',
+                    value: 'subtitle',
+                    show: true,
+                },
+                {
+                    label: '图片',
+                    value: 'imageUrl',
+                    show: true,
+                },
+                {
+                    label: '地址',
+                    value: 'pathUrl',
+                    show: true,
+                },
+                {
+                    label: '备注',
+                    value: 'remark',
+                    show: true,
+                },
+                {
+                    label: '排序',
+                    value: 'rank',
+                    show: true,
+                },
+                {
+                    label: '商品',
+                    value: 'productId',
+                    show: true,
+                },
+            ],
+            multipleMode: false,
+            showAdvancedQueryDialog: false,
+            advancedQueryFields: [],
+            showTableSortDialog: false,
+            tableSortFields: [],
+            searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
+            advancedQueryColumns: [
+                {
+                    label: 'ID',
+                    value: 'id',
+                },
+                {
+                    label: '用户Id',
+                    value: 'user_id',
+                },
+                {
+                    label: '小程序',
+                    value: 'mini_id',
+                },
+                {
+                    label: '店铺',
+                    value: 'store_id',
+                },
+                {
+                    label: '状态',
+                    value: 'status_flag',
+                },
+                {
+                    label: '类型',
+                    value: 'type_flag',
+                },
+                {
+                    label: '标题',
+                    value: 'title',
+                },
+                {
+                    label: '子标题',
+                    value: 'subtitle',
+                },
+                {
+                    label: '图片',
+                    value: 'image_url',
+                },
+                {
+                    label: '地址',
+                    value: 'path_url',
+                },
+                {
+                    label: '备注',
+                    value: 'remark',
+                },
+                {
+                    label: '排序',
+                    value: 'rank',
+                },
+                {
+                    label: '商品',
+                    value: 'product_id',
+                },
+            ],
+            advancedQuerySearchKey: '',
+            orderByStr: '',
+            imgSrc: '',
+            imageDialogVisible: false,
+        };
+    },
+    computed: {
+        ...mapState(['tableHeight','storeId']),
+        selection() {
+            return this.$refs.table.selection.map(i => i.id);
+        },
+    },
+    watch: {
+        storeId() {
+            this.searchData();
+        },
+    },
+    methods: {
+        pageSizeChange(size) {
+            this.currentPage = 1;
+            this.pageSize = size;
             this.getData();
         },
-        data() {
-            return {
-                totalNumber: 0,
-                totalPage: 10,
-                currentPage: 1,
-                pageSize: 20,
-                tableData: [],
-                filter1: '',
-                filter2: '',
-                tableColumns: [
-                                                                        {
-                                label: 'ID',
-                                value: 'id',
-                                show: true
-                            },
-                                                                                                                                                                                                                                                                                                                            {
-                                label: '用户Id',
-                                value: 'userId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '小程序',
-                                value: 'miniId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '店铺',
-                                value: 'storeId',
-                                show: true
-                            },
-                                                                                                {
-                                label: '状态',
-                                value: 'statusFlag',
-                                show: true
-                            },
-                                                                                                {
-                                label: '类型',
-                                value: 'typeFlag',
-                                show: true
-                            },
-                                                                                                {
-                                label: '标题',
-                                value: 'title',
-                                show: true
-                            },
-                                                                                                {
-                                label: '子标题',
-                                value: 'subtitle',
-                                show: true
-                            },
-                                                                                                {
-                                label: '图片',
-                                value: 'imageUrl',
-                                show: true
-                            },
-                                                                                                {
-                                label: '地址',
-                                value: 'pathUrl',
-                                show: true
-                            },
-                                                                                                {
-                                label: '备注',
-                                value: 'remark',
-                                show: true
-                            },
-                                                                                                {
-                                label: '排序',
-                                value: 'rank',
-                                show: true
-                            },
-                                                                                                {
-                                label: '商品',
-                                value: 'productId',
-                                show: true
-                            },
-                                                            ],
-                multipleMode: false,
-                showAdvancedQueryDialog: false,
-                advancedQueryFields: [],
-                showTableSortDialog: false,
-                tableSortFields: [],
-                searchMethods: ['=', '!=', '>', '>=', '<', '<=', 'like'],
-                advancedQueryColumns: [
-                                                                        {
-                                label: 'ID',
-                                value: 'id'
-                            },
-                                                                                                                                                                                                                                                                                                                            {
-                                label: '用户Id',
-                                value: 'user_id'
-                            },
-                                                                                                {
-                                label: '小程序',
-                                value: 'mini_id'
-                            },
-                                                                                                {
-                                label: '店铺',
-                                value: 'store_id'
-                            },
-                                                                                                {
-                                label: '状态',
-                                value: 'status_flag'
-                            },
-                                                                                                {
-                                label: '类型',
-                                value: 'type_flag'
-                            },
-                                                                                                {
-                                label: '标题',
-                                value: 'title'
-                            },
-                                                                                                {
-                                label: '子标题',
-                                value: 'subtitle'
-                            },
-                                                                                                {
-                                label: '图片',
-                                value: 'image_url'
-                            },
-                                                                                                {
-                                label: '地址',
-                                value: 'path_url'
-                            },
-                                                                                                {
-                                label: '备注',
-                                value: 'remark'
-                            },
-                                                                                                {
-                                label: '排序',
-                                value: 'rank'
-                            },
-                                                                                                {
-                                label: '商品',
-                                value: 'product_id'
-                            },
-                                                            ],
-                advancedQuerySearchKey: '',
-                orderByStr: '',
-                imgSrc: '',
-                imageDialogVisible: false,
-            }
+        currentPageChange(page) {
+            this.currentPage = page;
+            this.getData();
         },
-        computed: {
-            ...mapState(['tableHeight']),
-            selection() {
-                return this.$refs.table.selection.map(i => i.id);
+        getData() {
+            var data = {
+                currentPage: this.currentPage,
+                pageNumber: this.pageSize,
+                searchKey: this.filter1,
+                advancedQuery: this.advancedQuerySearchKey,
+                orderByStr: this.orderByStr,
+                storeId: this.storeId || '',
+            };
+
+            if (this.$route.query.column) {
+                var tempColumn = this.$route.query.column;
+                data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
             }
-        },
-        methods: {
-            pageSizeChange(size) {
-                this.currentPage = 1;
-                this.pageSize = size;
-                this.getData();
-            },
-            currentPageChange(page) {
-                this.currentPage = page;
-                this.getData();
-            },
-            getData() {
-
-                var data = {
-                    currentPage: this.currentPage,
-                    pageNumber: this.pageSize,
-                    searchKey: this.filter1,
-                    advancedQuery: this.advancedQuerySearchKey,
-                    orderByStr: this.orderByStr,
-                }
-
-                if (this.$route.query.column) {
-                    var tempColumn = this.$route.query.column;
-                    data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
-                }
 
-                this.$http.get({
+            this.$http
+                .get({
                     url: '/bannerInfo/page',
-                    data: data
-                }).then(res => {
+                    data: data,
+                })
+                .then(res => {
                     if (res.success) {
                         this.totalNumber = res.data.page.totalNumber;
                         this.tableData = res.data.pp;
                     }
-                })
-            },
-            isColumnShow(column) {
-                var row = this.tableColumns.find(i => i.value === column);
-                return row ? row.show : false;
-            },
-            toggleMultipleMode(multipleMode) {
-                this.multipleMode = multipleMode;
-                if (!multipleMode) {
-                    this.$refs.table.clearSelection();
-                }
-            },
-            editRow(row) {
-                this.$router.push({
-                    path: '/bannerInfo',
-                    query: {
-                        id: row.id,
-                        column: this.$route.query.column,
-                    }
-                })
-            },
-            operation1() {
-                this.$notify({
-                    title: '提示',
-                    message: this.selection
                 });
-            },
-            operation2() {
-                this.$message('操作2');
-            },
-            addField() {
-                this.advancedQueryFields.push({
-                    link: 'AND',
-                    name: '',
-                    searchMethod: '=',
-                    value: '',
+        },
+        isColumnShow(column) {
+            var row = this.tableColumns.find(i => i.value === column);
+            return row ? row.show : false;
+        },
+        toggleMultipleMode(multipleMode) {
+            this.multipleMode = multipleMode;
+            if (!multipleMode) {
+                this.$refs.table.clearSelection();
+            }
+        },
+        editRow(row) {
+            this.$router.push({
+                path: '/bannerInfo',
+                query: {
+                    id: row.id,
+                    column: this.$route.query.column,
+                },
+            });
+        },
+        operation1() {
+            this.$notify({
+                title: '提示',
+                message: this.selection,
+            });
+        },
+        operation2() {
+            this.$message('操作2');
+        },
+        addField() {
+            this.advancedQueryFields.push({
+                link: 'AND',
+                name: '',
+                searchMethod: '=',
+                value: '',
+            });
+        },
+        removeField(i) {
+            if (this.advancedQueryFields.length > 0) {
+                this.advancedQueryFields.splice(i, 1);
+            }
+        },
+        advancedQuery() {
+            this.advancedQuerySearchKey = '';
+
+            if (this.advancedQueryFields.length > 0) {
+                var templist = [];
+
+                this.advancedQueryFields.forEach(item => {
+                    if (
+                        item.link &&
+                        item.name &&
+                        item.searchMethod &&
+                        item.value
+                    ) {
+                        var tempItem =
+                            item.link +
+                            '_,' +
+                            item.name +
+                            '_,' +
+                            item.searchMethod +
+                            '_,' +
+                            item.value;
+                        templist.push(tempItem);
+                    }
                 });
-            },
-            removeField(i) {
-                if (this.advancedQueryFields.length > 0) {
-                    this.advancedQueryFields.splice(i, 1);
-                }
-            },
-            advancedQuery() {
 
-                this.advancedQuerySearchKey = '';
-
-                if (this.advancedQueryFields.length > 0) {
-
-                    var templist = [];
+                if (templist.length > 0) {
+                    this.advancedQuerySearchKey = templist.join('_;');
+                }
+            }
 
-                    this.advancedQueryFields.forEach(item => {
-                        if (item.link && item.name && item.searchMethod && item.value) {
-                            var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
-                            templist.push(tempItem);
-                        }
-                    })
+            this.getData();
+            this.showAdvancedQueryDialog = false;
+        },
+        addSortField() {
+            this.tableSortFields.push({
+                name: '',
+                order: 'asc',
+            });
+        },
+        removeSortField(i) {
+            if (this.tableSortFields.length > 0) {
+                this.tableSortFields.splice(i, 1);
+            }
+        },
+        tableSortQuery() {
+            this.orderByStr = '';
 
-                    if (templist.length > 0) {
+            if (this.tableSortFields.length > 0) {
+                var templist = [];
 
-                        this.advancedQuerySearchKey = templist.join('_;');
+                this.tableSortFields.forEach(item => {
+                    if (item.name && item.order) {
+                        var tempItem = item.name + '_,' + item.order;
+                        templist.push(tempItem);
                     }
-                }
-
-                this.getData();
-                this.showAdvancedQueryDialog = false;
-            },
-            addSortField() {
-                this.tableSortFields.push({
-                    name: '',
-                    order: 'asc',
                 });
-            },
-            removeSortField(i) {
-                if (this.tableSortFields.length > 0) {
-                    this.tableSortFields.splice(i, 1);
-                }
-            },
-            tableSortQuery() {
-
-                this.orderByStr = '';
-
-                if (this.tableSortFields.length > 0) {
-
-                    var templist = [];
-
-                    this.tableSortFields.forEach(item => {
-                        if (item.name && item.order) {
-                            var tempItem = item.name + '_,' + item.order;
-                            templist.push(tempItem);
-                        }
-                    })
 
-                    if (templist.length > 0) {
-
-                        this.orderByStr = templist.join('_;');
-                    }
+                if (templist.length > 0) {
+                    this.orderByStr = templist.join('_;');
                 }
+            }
 
-                this.getData();
-                this.showTableSortDialog = false;
-            },
-            exportExcel() {
-                window.location.href = this.$baseUrl + "/bannerInfo/exportExcel?searchKey="
-                        + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey+"&orderByStr=" + this.orderByStr;
-            },
-            searchData() {
-                this.currentPage = 1;
-                this.getData();
-            },
-            deleteRow(row) {
-                this.$alert('删除将无法恢复,确认要删除么?', '警告', {type: 'error'}).then(() => {
+            this.getData();
+            this.showTableSortDialog = false;
+        },
+        exportExcel() {
+            window.location.href =
+                this.$baseUrl +
+                '/bannerInfo/exportExcel?searchKey=' +
+                this.filter1 +
+                '&advancedQuery=' +
+                this.advancedQuerySearchKey +
+                '&orderByStr=' +
+                this.orderByStr;
+        },
+        searchData() {
+            this.currentPage = 1;
+            this.getData();
+        },
+        deleteRow(row) {
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', {
+                type: 'error',
+            })
+                .then(() => {
                     return this.$http.post({
                         url: '/bannerInfo/del',
-                        data: {id: row.id}
-                    })
-                }).then(() => {
+                        data: { id: row.id },
+                    });
+                })
+                .then(() => {
                     this.$message.success('删除成功');
                     this.getData();
-                }).catch(action => {
+                })
+                .catch(action => {
                     if (action === 'cancel') {
                         this.$message.info('删除取消');
                     } else {
                         this.$message.error('删除失败');
                     }
-                })
-            },
-            DateTimeFormatter(row, column, cellValue) {
-                if (cellValue) {
-                    return format(cellValue, 'YYYY/MM/DD HH:mm', {locale: zh})
-                }
-
-            },
-            DateFormatter(row, column, cellValue) {
-                if (cellValue) {
-                    return format(cellValue, 'YYYY/MM/DD', {locale: zh})
-                }
-
-            },
-            showImg(img) {
-                this.imgSrc = img;
-                this.imageDialogVisible = true;
-            },
-
-        }
-    }
+                });
+        },
+        DateTimeFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh });
+            }
+        },
+        DateFormatter(row, column, cellValue) {
+            if (cellValue) {
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh });
+            }
+        },
+        showImg(img) {
+            this.imgSrc = img;
+            this.imageDialogVisible = true;
+        },
+    },
+};
 </script>
 <style lang="less" scoped>
-
 </style>

+ 7 - 1
src/main/vue/src/pages/HomeAds.vue

@@ -435,11 +435,16 @@ export default {
         };
     },
     computed: {
-        ...mapState(['tableHeight']),
+        ...mapState(['tableHeight','storeId']),
         selection() {
             return this.$refs.table.selection.map(i => i.id);
         },
     },
+    watch: {
+        storeId() {
+            this.searchData();
+        },
+    },
     methods: {
         pageSizeChange(size) {
             this.currentPage = 1;
@@ -457,6 +462,7 @@ export default {
                 searchKey: this.filter1,
                 advancedQuery: this.advancedQuerySearchKey,
                 orderByStr: this.orderByStr,
+                storeId: this.storeId || '',
             };
 
             if (this.$route.query.column) {

+ 51 - 4
src/main/vue/src/pages/HomeProduct.vue

@@ -3,7 +3,11 @@
         <el-form :model="formData" :rules="rules" ref="form" label-width="120px" label-position="right" size="small"
                  style="max-width: 500px;">
             <el-form-item prop="typeId" label="类型">
-                <el-input v-model="formData.typeId" :disabled="'typeId'==subColumn"></el-input>
+                <el-select v-model="formData.typeId" filterable placeholder="请选择" size="small" :disabled="'typeId'==subColumn">
+                    <el-option v-for="item in homeProductTypes" :key="item.id" :label="item.typeName" :value="item.id">
+                    </el-option>
+                </el-select>
+
             </el-form-item>
             <el-form-item prop="productId" label="商品Id">
                 <el-input v-model="formData.productId" disabled style="width:120px"></el-input>
@@ -13,6 +17,9 @@
             <el-form-item prop="rank" label="排序">
                 <el-input type="number" v-model="formData.rank" :disabled="'rank'==subColumn"></el-input>
             </el-form-item>
+            <el-form-item prop="storeId" label="店铺">
+                <el-input v-model="formData.storeId" disabled></el-input>
+            </el-form-item>
             <el-form-item>
                 <el-button @click="onSave" :loading="$store.state.fetchingData" type="primary">保存</el-button>
                 <el-button @click="onDelete" v-if="formData.id" type="danger">删除</el-button>
@@ -39,6 +46,9 @@ export default {
         if (this.$route.query.column) {
             this.subColumn = this.$route.query.column.split(',')[1];
             this.subValue = this.$route.query.column.split(',')[0];
+            if ('typeId' == this.subColumn) {
+                this.subValue = Number(this.subValue);
+            }
         }
 
         if (this.$route.query.id) {
@@ -62,19 +72,42 @@ export default {
                 this.formData[this.subColumn] = this.subValue;
             }
         }
+        this.getHomeProductTypes();
     },
     data() {
         return {
             saving: false,
-            formData: {},
-            rules: {},
+            formData: {
+                storeId: '',
+            },
+            rules: {
+                storeId: [
+                    { required: true, message: '请选择店铺', trigger: 'blur' },
+                ],
+                typeId: [
+                    { required: true, message: '请选择类型', trigger: 'blur' },
+                ],
+                productId: [
+                    { required: true, message: '请选择商品', trigger: 'blur' },
+                ],
+            },
             subColumn: '',
             subValue: '',
             showChoose: false,
+            homeProductTypes: [],
         };
     },
     computed: {
-        ...mapState(['userInfo']),
+        ...mapState(['userInfo', 'storeId']),
+    },
+    watch: {
+        storeId() {
+            if (this.storeId) {
+                this.formData.storeId = this.storeId;
+            }
+
+            this.getHomeProductTypes();
+        },
     },
     methods: {
         chooseId(id) {
@@ -170,6 +203,20 @@ export default {
                     }
                 });
         },
+        getHomeProductTypes() {
+            this.$http
+                .get({
+                    url: '/homeProductType/all',
+                    data: {
+                        storeId: this.storeId || '',
+                    },
+                })
+                .then(res => {
+                    if (res.success) {
+                        this.homeProductTypes = res.data;
+                    }
+                });
+        },
     },
     components: {
         ChooseProductInfo,

+ 7 - 1
src/main/vue/src/pages/HomeProductTypes.vue

@@ -333,11 +333,16 @@ export default {
         };
     },
     computed: {
-        ...mapState(['tableHeight']),
+        ...mapState(['tableHeight','storeId']),
         selection() {
             return this.$refs.table.selection.map(i => i.id);
         },
     },
+    watch: {
+        storeId() {
+            this.searchData();
+        },
+    },
     methods: {
         pageSizeChange(size) {
             this.currentPage = 1;
@@ -355,6 +360,7 @@ export default {
                 searchKey: this.filter1,
                 advancedQuery: this.advancedQuerySearchKey,
                 orderByStr: this.orderByStr,
+                storeId: this.storeId || '',
             };
 
             if (this.$route.query.column) {

+ 12 - 1
src/main/vue/src/pages/HomeProducts.vue

@@ -74,6 +74,11 @@
                              label="排序"
                              min-width="100">
             </el-table-column>
+            <el-table-column
+                             prop="storeId"
+                             label="店铺"
+                             min-width="100">
+            </el-table-column>
             <el-table-column
                              label="操作"
                              align="center"
@@ -268,10 +273,15 @@ export default {
         };
     },
     computed: {
-        ...mapState(['tableHeight']),
+        ...mapState(['tableHeight','storeId']),
         selection() {
             return this.$refs.table.selection.map(i => i.id);
         },
+    },
+     watch: {
+        storeId() {
+            this.searchData();
+        },
     },
     methods: {
         pageSizeChange(size) {
@@ -290,6 +300,7 @@ export default {
                 searchKey: this.filter1,
                 advancedQuery: this.advancedQuerySearchKey,
                 orderByStr: this.orderByStr,
+                storeId: this.storeId || '',
             };
 
             if (this.$route.query.column) {

+ 97 - 73
src/main/vue/src/pages/MemberCoins.vue

@@ -54,6 +54,8 @@
 
             <el-table-column v-if="isColumnShow('remark')" prop="remark" label="备注" min-width="100">
             </el-table-column>
+            <el-table-column prop="storeId" label="店铺" min-width="100">
+            </el-table-column>
             <el-table-column label="操作" align="center" fixed="right" min-width="150">
                 <template slot-scope="scope">
                     <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
@@ -162,20 +164,21 @@
     </div>
 </template>
 <script>
-import { mapState } from 'vuex'
-import { format } from 'date-fns'
-import zh from 'date-fns/locale/zh_cn'
+import { mapState } from 'vuex';
+import { format } from 'date-fns';
+import zh from 'date-fns/locale/zh_cn';
 
 export default {
     created() {
-        this.$http.get({
-            url: '/userInfo/all'
-        }).then(res => {
-            if (res.success) {
-                this.userInfos = res.data;
-
-            }
-        });
+        this.$http
+            .get({
+                url: '/userInfo/all',
+            })
+            .then(res => {
+                if (res.success) {
+                    this.userInfos = res.data;
+                }
+            });
 
         this.getData();
     },
@@ -192,32 +195,32 @@ export default {
                 {
                     label: '用户',
                     value: 'userId',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '订单',
                     value: 'orderId',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '变动金额',
                     value: 'money',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '剩余金额',
                     value: 'balance',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '类型',
                     value: 'typeFlag',
-                    show: true
+                    show: true,
                 },
                 {
                     label: '备注',
                     value: 'remark',
-                    show: true
+                    show: true,
                 },
             ],
             multipleMode: false,
@@ -229,27 +232,27 @@ export default {
             advancedQueryColumns: [
                 {
                     label: '用户',
-                    value: 'user_id'
+                    value: 'user_id',
                 },
                 {
                     label: '订单',
-                    value: 'order_id'
+                    value: 'order_id',
                 },
                 {
                     label: '变动金额',
-                    value: 'money'
+                    value: 'money',
                 },
                 {
                     label: '剩余金额',
-                    value: 'balance'
+                    value: 'balance',
                 },
                 {
                     label: '类型',
-                    value: 'type_flag'
+                    value: 'type_flag',
                 },
                 {
                     label: '备注',
-                    value: 'remark'
+                    value: 'remark',
                 },
             ],
             advancedQuerySearchKey: '',
@@ -258,13 +261,18 @@ export default {
             imageDialogVisible: false,
             userInfos: [],
             userId: '',
-        }
+        };
     },
     computed: {
-        ...mapState(['tableHeight']),
+        ...mapState(['tableHeight', 'storeId']),
         selection() {
             return this.$refs.table.selection.map(i => i.id);
-        }
+        },
+    },
+    watch: {
+        storeId() {
+            this.searchData();
+        },
     },
     methods: {
         pageSizeChange(size) {
@@ -277,7 +285,6 @@ export default {
             this.getData();
         },
         getData() {
-
             var data = {
                 currentPage: this.currentPage,
                 pageNumber: this.pageSize,
@@ -285,22 +292,25 @@ export default {
                 advancedQuery: this.advancedQuerySearchKey,
                 orderByStr: this.orderByStr,
                 userId: this.userId,
-            }
+                storeId: this.storeId || '',
+            };
 
             if (this.$route.query.column) {
                 var tempColumn = this.$route.query.column;
                 data[tempColumn.split(',')[1]] = tempColumn.split(',')[0];
             }
 
-            this.$http.get({
-                url: '/memberCoin/page',
-                data: data
-            }).then(res => {
-                if (res.success) {
-                    this.totalNumber = res.data.page.totalNumber;
-                    this.tableData = res.data.pp;
-                }
-            })
+            this.$http
+                .get({
+                    url: '/memberCoin/page',
+                    data: data,
+                })
+                .then(res => {
+                    if (res.success) {
+                        this.totalNumber = res.data.page.totalNumber;
+                        this.tableData = res.data.pp;
+                    }
+                });
         },
         isColumnShow(column) {
             var row = this.tableColumns.find(i => i.value === column);
@@ -318,13 +328,13 @@ export default {
                 query: {
                     id: row.id,
                     column: this.$route.query.column,
-                }
-            })
+                },
+            });
         },
         operation1() {
             this.$notify({
                 title: '提示',
-                message: this.selection
+                message: this.selection,
             });
         },
         operation2() {
@@ -344,22 +354,31 @@ export default {
             }
         },
         advancedQuery() {
-
             this.advancedQuerySearchKey = '';
 
             if (this.advancedQueryFields.length > 0) {
-
                 var templist = [];
 
                 this.advancedQueryFields.forEach(item => {
-                    if (item.link && item.name && item.searchMethod && item.value) {
-                        var tempItem = item.link + '_,' + item.name + '_,' + item.searchMethod + '_,' + item.value;
+                    if (
+                        item.link &&
+                        item.name &&
+                        item.searchMethod &&
+                        item.value
+                    ) {
+                        var tempItem =
+                            item.link +
+                            '_,' +
+                            item.name +
+                            '_,' +
+                            item.searchMethod +
+                            '_,' +
+                            item.value;
                         templist.push(tempItem);
                     }
-                })
+                });
 
                 if (templist.length > 0) {
-
                     this.advancedQuerySearchKey = templist.join('_;');
                 }
             }
@@ -379,11 +398,9 @@ export default {
             }
         },
         tableSortQuery() {
-
             this.orderByStr = '';
 
             if (this.tableSortFields.length > 0) {
-
                 var templist = [];
 
                 this.tableSortFields.forEach(item => {
@@ -391,10 +408,9 @@ export default {
                         var tempItem = item.name + '_,' + item.order;
                         templist.push(tempItem);
                     }
-                })
+                });
 
                 if (templist.length > 0) {
-
                     this.orderByStr = templist.join('_;');
                 }
             }
@@ -403,41 +419,50 @@ export default {
             this.showTableSortDialog = false;
         },
         exportExcel() {
-            window.location.href = this.$baseUrl + "/memberCoin/exportExcel?searchKey="
-                + this.filter1 + "&advancedQuery=" + this.advancedQuerySearchKey + "&orderByStr=" + this.orderByStr;
+            window.location.href =
+                this.$baseUrl +
+                '/memberCoin/exportExcel?searchKey=' +
+                this.filter1 +
+                '&advancedQuery=' +
+                this.advancedQuerySearchKey +
+                '&orderByStr=' +
+                this.orderByStr;
         },
         searchData() {
             this.currentPage = 1;
             this.getData();
         },
         deleteRow(row) {
-            this.$alert('删除将无法恢复,确认要删除么?', '警告', { type: 'error' }).then(() => {
-                return this.$http.post({
-                    url: '/memberCoin/del',
-                    data: { id: row.id }
-                })
-            }).then(() => {
-                this.$message.success('删除成功');
-                this.getData();
-            }).catch(action => {
-                if (action === 'cancel') {
-                    this.$message.info('删除取消');
-                } else {
-                    this.$message.error('删除失败');
-                }
+            this.$alert('删除将无法恢复,确认要删除么?', '警告', {
+                type: 'error',
             })
+                .then(() => {
+                    return this.$http.post({
+                        url: '/memberCoin/del',
+                        data: { id: row.id },
+                    });
+                })
+                .then(() => {
+                    this.$message.success('删除成功');
+                    this.getData();
+                })
+                .catch(action => {
+                    if (action === 'cancel') {
+                        this.$message.info('删除取消');
+                    } else {
+                        this.$message.error('删除失败');
+                    }
+                });
         },
         DateTimeFormatter(row, column, cellValue) {
             if (cellValue) {
-                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh })
+                return format(cellValue, 'YYYY/MM/DD HH:mm', { locale: zh });
             }
-
         },
         DateFormatter(row, column, cellValue) {
             if (cellValue) {
-                return format(cellValue, 'YYYY/MM/DD', { locale: zh })
+                return format(cellValue, 'YYYY/MM/DD', { locale: zh });
             }
-
         },
         showImg(img) {
             this.imgSrc = img;
@@ -447,9 +472,8 @@ export default {
             this.currentPage = 1;
             this.getData();
         },
-
-    }
-}
+    },
+};
 </script>
 <style lang="less" scoped>
 </style>

+ 10 - 8
src/main/vue/src/pages/OrderServices.vue

@@ -2,9 +2,9 @@
     <div>
         <div class="filters-container">
 
-            <el-select v-model="storeId" size="small" clearable filterable placeholder="店铺" @change="searchData" style="width:120px">
+            <!-- <el-select v-model="storeId" size="small" clearable filterable placeholder="店铺" @change="searchData" style="width:120px">
                 <el-option v-for="item in storeInfos" :key="item.id" :label="item.storeName" :value="item.id"></el-option>
-            </el-select>
+            </el-select> -->
             <el-select v-model="userId" size="small" clearable filterable placeholder="用户" @change="searchData" style="width:120px">
                 <el-option v-for="item in userInfos" :key="item.id" :label="item.nickname" :value="item.id"></el-option>
             </el-select>
@@ -264,7 +264,6 @@ export default {
                 }
             });
 
-
         this.$http
             .get({
                 url: '/storeInfo/all',
@@ -389,20 +388,23 @@ export default {
             orderByStr: '',
             imgSrc: '',
             imageDialogVisible: false,
-            typeFlagOptions: [
-            ],
+            typeFlagOptions: [],
             storeInfos: [],
-            storeId: '',
             userInfos: [],
             userId: '',
         };
     },
     computed: {
-        ...mapState(['tableHeight']),
+        ...mapState(['tableHeight', 'storeId']),
         selection() {
             return this.$refs.table.selection.map(i => i.id);
         },
     },
+    watch: {
+        storeId() {
+            this.searchData();
+        },
+    },
     methods: {
         pageSizeChange(size) {
             this.currentPage = 1;
@@ -420,7 +422,7 @@ export default {
                 searchKey: this.filter1,
                 advancedQuery: this.advancedQuerySearchKey,
                 orderByStr: this.orderByStr,
-                storeId: this.storeId,
+                storeId: this.storeId || '',
                 userId: this.userId,
             };
 

+ 18 - 14
src/main/vue/src/pages/ProductInfos.vue

@@ -2,10 +2,10 @@
     <div>
         <div class="filters-container">
 
-            <el-select v-model="storeId" clearable filterable placeholder="店铺" @change="storeIdChange" size="small" style="width:120px">
+            <!-- <el-select v-model="storeId" clearable filterable placeholder="店铺" @change="storeIdChange" size="small" style="width:120px">
                 <el-option v-for="item in storeInfos" :key="item.id" :label="item.storeName" :value="item.id">
                 </el-option>
-            </el-select>
+            </el-select> -->
             <el-select v-model="onShelfFlag" clearable filterable placeholder="上下架" @change="storeIdChange" size="small" style="width:120px">
                 <el-option key="N" label="下架" value="N">
                 </el-option>
@@ -244,15 +244,15 @@ export default {
         //     }
         // });
 
-        this.$http
-            .get({
-                url: '/storeInfo/all',
-            })
-            .then(res => {
-                if (res.success) {
-                    this.storeInfos = res.data;
-                }
-            });
+        // this.$http
+        //     .get({
+        //         url: '/storeInfo/all',
+        //     })
+        //     .then(res => {
+        //         if (res.success) {
+        //             this.storeInfos = res.data;
+        //         }
+        //     });
 
         this.$http
             .get({
@@ -418,18 +418,22 @@ export default {
             serviceTypes: [],
             serviceTypeDetails: {},
             storeInfos: [],
-            storeId: '',
             onShelfFlag: '',
             itemType: '',
             itemTypes: [],
         };
     },
     computed: {
-        ...mapState(['tableHeight']),
+        ...mapState(['tableHeight', 'storeId']),
         selection() {
             return this.$refs.table.selection.map(i => i.id);
         },
     },
+    watch: {
+        storeId() {
+            this.searchData();
+        },
+    },
     methods: {
         pageSizeChange(size) {
             this.currentPage = 1;
@@ -447,7 +451,7 @@ export default {
                 searchKey: this.filter1,
                 advancedQuery: this.advancedQuerySearchKey,
                 orderByStr: this.orderByStr,
-                storeId: this.storeId,
+                storeId: this.storeId || '',
                 onShelf: this.onShelfFlag,
                 serviceType: this.itemType,
             };

+ 7 - 1
src/main/vue/src/pages/ShoppingCarts.vue

@@ -345,11 +345,16 @@ export default {
         };
     },
     computed: {
-        ...mapState(['tableHeight']),
+        ...mapState(['tableHeight','storeId']),
         selection() {
             return this.$refs.table.selection.map(i => i.id);
         },
     },
+    watch: {
+        storeId() {
+            this.searchData();
+        },
+    },
     methods: {
         pageSizeChange(size) {
             this.currentPage = 1;
@@ -367,6 +372,7 @@ export default {
                 searchKey: this.filter1,
                 advancedQuery: this.advancedQuerySearchKey,
                 orderByStr: this.orderByStr,
+                storeId: this.storeId || '',
             };
 
             if (this.$route.query.column) {

+ 7 - 1
src/main/vue/src/pages/StoreCases.vue

@@ -365,10 +365,15 @@ export default {
         };
     },
     computed: {
-        ...mapState(['tableHeight']),
+        ...mapState(['tableHeight','storeId']),
         selection() {
             return this.$refs.table.selection.map(i => i.id);
         },
+    },
+     watch: {
+        storeId() {
+            this.searchData();
+        },
     },
     methods: {
         pageSizeChange(size) {
@@ -387,6 +392,7 @@ export default {
                 searchKey: this.filter1,
                 advancedQuery: this.advancedQuerySearchKey,
                 orderByStr: this.orderByStr,
+                storeId: this.storeId || '',
             };
 
             if (this.$route.query.column) {

+ 7 - 1
src/main/vue/src/pages/StoreInfos.vue

@@ -429,11 +429,16 @@ export default {
         };
     },
     computed: {
-        ...mapState(['tableHeight']),
+        ...mapState(['tableHeight','storeId']),
         selection() {
             return this.$refs.table.selection.map(i => i.id);
         },
     },
+    watch: {
+        storeId() {
+            this.searchData();
+        },
+    },
     methods: {
         pageSizeChange(size) {
             this.currentPage = 1;
@@ -451,6 +456,7 @@ export default {
                 searchKey: this.filter1,
                 advancedQuery: this.advancedQuerySearchKey,
                 orderByStr: this.orderByStr,
+                id: this.storeId || '',
             };
 
             if (this.$route.query.column) {

+ 7 - 1
src/main/vue/src/pages/StoreIntroductions.vue

@@ -377,11 +377,16 @@ export default {
         };
     },
     computed: {
-        ...mapState(['tableHeight']),
+        ...mapState(['tableHeight','storeId']),
         selection() {
             return this.$refs.table.selection.map(i => i.id);
         },
     },
+    watch: {
+        storeId() {
+            this.searchData();
+        },
+    },
     methods: {
         pageSizeChange(size) {
             this.currentPage = 1;
@@ -399,6 +404,7 @@ export default {
                 searchKey: this.filter1,
                 advancedQuery: this.advancedQuerySearchKey,
                 orderByStr: this.orderByStr,
+                storeId: this.storeId || '',
             };
 
             if (this.$route.query.column) {

+ 8 - 2
src/main/vue/src/pages/StoreServiceLevels.vue

@@ -111,7 +111,7 @@
                              fixed="right"
                              min-width="220">
                 <template slot-scope="scope">
-                     <el-button @click="$router.push({path:'/storeServices',query:{column:scope.row.id+',typeLevel'}})" type="primary" size="small" plain>服务
+                    <el-button @click="$router.push({path:'/storeServices',query:{column:scope.row.id+',typeLevel'}})" type="primary" size="small" plain>服务
                     </el-button>
                     <el-button @click="editRow(scope.row)" type="primary" size="mini" plain>编辑</el-button>
                     <el-button @click="deleteRow(scope.row)" type="danger" size="mini" plain>删除</el-button>
@@ -348,10 +348,15 @@ export default {
         };
     },
     computed: {
-        ...mapState(['tableHeight']),
+        ...mapState(['tableHeight','storeId']),
         selection() {
             return this.$refs.table.selection.map(i => i.id);
         },
+    },
+     watch: {
+        storeId() {
+            this.searchData();
+        },
     },
     methods: {
         pageSizeChange(size) {
@@ -371,6 +376,7 @@ export default {
                 advancedQuery: this.advancedQuerySearchKey,
                 orderByStr: this.orderByStr,
                 typeFlag: this.typeFlag,
+                storeId: this.storeId || '',
             };
 
             if (this.$route.query.column) {

+ 7 - 1
src/main/vue/src/pages/StoreServiceTypes.vue

@@ -377,11 +377,16 @@ export default {
         };
     },
     computed: {
-        ...mapState(['tableHeight']),
+        ...mapState(['tableHeight', 'storeId']),
         selection() {
             return this.$refs.table.selection.map(i => i.id);
         },
     },
+    watch: {
+        storeId() {
+            this.searchData();
+        },
+    },
     methods: {
         pageSizeChange(size) {
             this.currentPage = 1;
@@ -399,6 +404,7 @@ export default {
                 searchKey: this.filter1,
                 advancedQuery: this.advancedQuerySearchKey,
                 orderByStr: this.orderByStr,
+                storeId: this.storeId || '',
             };
 
             if (this.$route.query.column) {

+ 7 - 1
src/main/vue/src/pages/StoreServices.vue

@@ -522,11 +522,16 @@ export default {
         };
     },
     computed: {
-        ...mapState(['tableHeight']),
+        ...mapState(['tableHeight','storeId']),
         selection() {
             return this.$refs.table.selection.map(i => i.id);
         },
     },
+    watch: {
+        storeId() {
+            this.searchData();
+        },
+    },
     methods: {
         pageSizeChange(size) {
             this.currentPage = 1;
@@ -546,6 +551,7 @@ export default {
                 orderByStr: this.orderByStr,
                 typeFlag: this.typeFlag,
                 typeLevel: this.typeLevel,
+                storeId: this.storeId || '',
             };
 
             if (this.$route.query.column) {

+ 1 - 1
src/main/vue/src/pages/UserOrderDetails.vue

@@ -830,7 +830,7 @@ export default {
     },
     watch: {
         storeId() {
-            this.getData();
+            this.searchData();
         }
     },
     methods: {

+ 1 - 1
src/main/vue/src/pages/UserOrders.vue

@@ -674,7 +674,7 @@ export default {
     },
     watch: {
         storeId() {
-            this.getData();
+            this.searchData();
         }
     },
     methods: {