tremble преди 5 години
родител
ревизия
52d00ed6c0
променени са 65 файла, в които са добавени 1219 реда и са изтрити 287 реда
  1. BIN
      WEB-INF/classes/com/platform/controller/BrandController.class
  2. BIN
      WEB-INF/classes/com/platform/controller/GoodsController.class
  3. BIN
      WEB-INF/classes/com/platform/controller/OrderController.class
  4. BIN
      WEB-INF/classes/com/platform/dao/BrandDao.class
  5. 20 0
      WEB-INF/classes/com/platform/dao/BrandDao.xml
  6. 15 4
      WEB-INF/classes/com/platform/dao/GoodsDao.xml
  7. BIN
      WEB-INF/classes/com/platform/dao/GoodsSpecificationDao.class
  8. 29 7
      WEB-INF/classes/com/platform/dao/GoodsSpecificationDao.xml
  9. 9 3
      WEB-INF/classes/com/platform/dao/OrderDao.xml
  10. 1 1
      WEB-INF/classes/com/platform/dao/OrderGoodsDao.xml
  11. 4 1
      WEB-INF/classes/com/platform/dao/OrderShippingDao.xml
  12. BIN
      WEB-INF/classes/com/platform/dao/ProductDao.class
  13. 9 0
      WEB-INF/classes/com/platform/dao/ProductDao.xml
  14. BIN
      WEB-INF/classes/com/platform/entity/GoodsEntity.class
  15. BIN
      WEB-INF/classes/com/platform/entity/GoodsSpecificationEntity.class
  16. BIN
      WEB-INF/classes/com/platform/entity/ProductEntity.class
  17. BIN
      WEB-INF/classes/com/platform/service/BrandService.class
  18. BIN
      WEB-INF/classes/com/platform/service/GoodsSpecificationService.class
  19. BIN
      WEB-INF/classes/com/platform/service/impl/BrandServiceImpl.class
  20. BIN
      WEB-INF/classes/com/platform/service/impl/GoodsServiceImpl.class
  21. BIN
      WEB-INF/classes/com/platform/service/impl/GoodsSpecificationServiceImpl.class
  22. BIN
      WEB-INF/classes/com/platform/service/impl/OrderServiceImpl.class
  23. BIN
      WEB-INF/classes/com/platform/service/impl/ProductServiceImpl.class
  24. BIN
      WEB-INF/lib/platform-api-1.0.0.jar
  25. BIN
      WEB-INF/lib/platform-common-1.0.0.jar
  26. 41 28
      WEB-INF/page/shop/brand.html
  27. 6 2
      WEB-INF/page/shop/cart.html
  28. 2 2
      WEB-INF/page/shop/category.html
  29. 8 3
      WEB-INF/page/shop/collect.html
  30. 7 3
      WEB-INF/page/shop/feedback.html
  31. 134 42
      WEB-INF/page/shop/goods.html
  32. 7 3
      WEB-INF/page/shop/goodshistory.html
  33. 8 3
      WEB-INF/page/shop/goodshotspot.html
  34. 14 10
      WEB-INF/page/shop/goodsspecification.html
  35. 33 31
      WEB-INF/page/shop/order.html
  36. 19 12
      WEB-INF/page/shop/orderPrint.html
  37. 7 3
      WEB-INF/page/shop/product.html
  38. 9 5
      WEB-INF/page/shop/specification.html
  39. 8 2
      WEB-INF/page/sys/config.html
  40. 5 0
      WEB-INF/page/sys/header.html
  41. 16 6
      WEB-INF/page/sys/log.html
  42. 21 5
      WEB-INF/page/sys/region.html
  43. 9 5
      WEB-INF/page/sys/role.html
  44. 9 5
      WEB-INF/page/sys/user.html
  45. BIN
      excel/订单数据-2020-03-31.xls
  46. BIN
      excel/订单数据-2020-04-02.xls
  47. 19 2
      index.html
  48. 19 4
      js/shop/brand.js
  49. 1 1
      js/shop/cart.js
  50. 11 0
      js/shop/category.js
  51. 340 11
      js/shop/goods.js
  52. 7 7
      js/shop/goodshotspot.js
  53. 3 2
      js/shop/goodsspecification.js
  54. 50 33
      js/shop/order.js
  55. 6 7
      js/shop/product.js
  56. 2 2
      js/shop/specification.js
  57. 1 1
      js/sys/dept.js
  58. 1 1
      js/sys/region.js
  59. 2 1
      js/sys/role.js
  60. 67 27
      js/sys/user.js
  61. 190 1
      statics/css/main.css
  62. 16 0
      statics/libs/contabs.js
  63. 1 1
      statics/plugins/froala_editor/js/froala_editor.min.js
  64. 16 0
      test.html
  65. 17 0
      test_czg.html

BIN
WEB-INF/classes/com/platform/controller/BrandController.class


BIN
WEB-INF/classes/com/platform/controller/GoodsController.class


BIN
WEB-INF/classes/com/platform/controller/OrderController.class


BIN
WEB-INF/classes/com/platform/dao/BrandDao.class


+ 20 - 0
WEB-INF/classes/com/platform/dao/BrandDao.xml

@@ -40,6 +40,26 @@
 		where id = #{id}
 	</select>
 
+    <select id="findByBrandName" resultType="com.platform.entity.BrandEntity">
+        select
+        `id`,
+        `name`,
+        `list_pic_url`,
+        `simple_desc`,
+        `pic_url`,
+        `sort_order`,
+        `is_show`,
+        `floor_price`,
+        `app_list_pic_url`,
+        `is_new`,
+        `new_pic_url`,
+        `new_sort_order`,
+        `type`,
+        `scene_url`
+        from nideshop_brand
+        where name = #{brandName}
+    </select>
+
     <select id="queryList" resultType="com.platform.entity.BrandEntity">
         select
         `id`,

+ 15 - 4
WEB-INF/classes/com/platform/dao/GoodsDao.xml

@@ -39,6 +39,9 @@
         <result property="createUserId" column="create_user_id"/>
         <result property="createUserDeptId" column="create_user_dept_id"/>
         <result property="updateUserId" column="update_user_id"/>
+        <result property="guigeArr" column="guige_arr"/>
+        <result property="ggContent" column="gg_content"/>
+
     </resultMap>
 
     <select id="queryObject" resultType="com.platform.entity.GoodsEntity">
@@ -82,6 +85,8 @@
         nideshop_goods.create_user_id,
         nideshop_goods.create_user_dept_id,
         nideshop_goods.update_user_id,
+        nideshop_goods.guige_arr,
+        nideshop_goods.gg_content,
         nideshop_category.name category_name,
         nideshop_attribute_category.name attribute_category_name,
         nideshop_brand.name brand_name
@@ -96,7 +101,7 @@
         <if test="name != null and name != ''">
             AND nideshop_goods.name LIKE concat('%',#{name},'%')
         </if>
-        <if test="brandId != null and brandId != ''">
+        <if test="brandId != null and brandId.trim() != ''">
             AND nideshop_goods.brand_id = #{brandId}
         </if>
         <if test="brandIdList != null and brandIdList.size() > 0">
@@ -126,7 +131,7 @@
         <if test="name != null and name != ''">
             AND name LIKE concat('%',#{name},'%')
         </if>
-        <if test="brandId != null and brandId != ''">
+        <if test="brandId != null and brandId.trim() != ''">
             AND nideshop_goods.brand_id = #{brandId}
         </if>
         <if test="brandIdList != null and brandIdList.size() > 0">
@@ -175,7 +180,9 @@
         `market_price`,
         `create_user_id`,
         `create_user_dept_id`,
-        `update_user_id`
+        `update_user_id`,
+        guige_arr,
+        gg_content
         )
         values
         (
@@ -213,7 +220,9 @@
         #{marketPrice},
         #{createUserId},
         #{createUserDeptId},
-        #{updateUserId}
+        #{updateUserId},
+        #{guigeArr},
+        #{ggContent}
         )
     </insert>
 
@@ -254,6 +263,8 @@
             <if test="createUserId != null">`create_user_id` = #{createUserId},</if>
             <if test="createUserId != null">`create_user_dept_id` = #{createUserDeptId},</if>
             <if test="updateUserId != null">`update_user_id` = #{updateUserId},</if>
+            <if test="guigeArr != null">`guige_arr` = #{guigeArr},</if>
+            <if test="ggContent != null">`gg_content` = #{ggContent},</if>
         </set>
         where id = #{id}
     </update>

BIN
WEB-INF/classes/com/platform/dao/GoodsSpecificationDao.class


+ 29 - 7
WEB-INF/classes/com/platform/dao/GoodsSpecificationDao.xml

@@ -9,6 +9,7 @@
         <result property="specificationId" column="specification_id"/>
         <result property="value" column="value"/>
         <result property="picUrl" column="pic_url"/>
+        <result property="uuid" column="uuid"/>
     </resultMap>
 
     <select id="queryObject" resultType="com.platform.entity.GoodsSpecificationEntity">
@@ -17,11 +18,24 @@
 			`goods_id`,
 			`specification_id`,
 			`value`,
-			`pic_url`
+			`pic_url`,
+			uuid
 		from nideshop_goods_specification
 		where id = #{id}
 	</select>
 
+    <select id="queryObjectBykeyAndGoodsId" resultType="com.platform.entity.GoodsSpecificationEntity">
+        select
+        `id`,
+        `goods_id`,
+        `specification_id`,
+        `value`,
+        `pic_url`,
+        uuid
+        from nideshop_goods_specification
+        where uuid = #{uuid} AND goods_id = #{goodsId}
+    </select>
+
     <select id="queryList" resultType="com.platform.entity.GoodsSpecificationEntity">
         select
         nideshop_goods_specification.id,
@@ -29,6 +43,7 @@
         nideshop_goods_specification.specification_id,
         nideshop_goods_specification.value,
         nideshop_goods_specification.pic_url,
+        nideshop_goods_specification.uuid,
         nideshop_goods.name goods_name,
         nideshop_specification.name specification_name,
         nideshop_brand.name brandName
@@ -37,8 +52,8 @@
         LEFT JOIN nideshop_specification ON nideshop_specification.id = nideshop_goods_specification.specification_id
         LEFT JOIN nideshop_brand ON nideshop_brand.id = nideshop_goods.brand_id
         WHERE 1=1
-        <if test="goodsName != null and goodsName.trim() != ''">
-            AND nideshop_goods.name LIKE concat('%',#{goodsName},'%')
+        <if test="name != null and name.trim() != ''">
+            AND nideshop_goods.name LIKE concat('%',#{name},'%')
         </if>
         <if test="goodsId != null">
             AND nideshop_goods_specification.goods_id = #{goodsId}
@@ -46,7 +61,7 @@
         <if test="specificationId != null">
             AND nideshop_goods_specification.specification_id = #{specificationId}
         </if>
-        <if test="brandId != null and brandId != ''">
+        <if test="brandId != null and brandId.trim() != ''">
             AND nideshop_goods.brand_id = #{brandId}
         </if>
         <if test="brandIdList != null and brandIdList.size() > 0">
@@ -81,7 +96,7 @@
         <if test="specificationId != null">
             AND nideshop_goods_specification.specification_id = #{specificationId}
         </if>
-        <if test="brandId != null and brandId != ''">
+        <if test="brandId != null and brandId.trim() != ''">
             AND nideshop_goods.brand_id = #{brandId}
         </if>
         <if test="brandIdList != null and brandIdList.size() > 0">
@@ -98,12 +113,14 @@
 			`goods_id`,
 			`specification_id`,
 			`value`,
-			`pic_url`)
+			`pic_url`,
+			uuid)
 		values(
 			#{goodsId},
 			#{specificationId},
 			#{value},
-			#{picUrl})
+			#{picUrl},
+			#{uuid})
 	</insert>
 
     <update id="update" parameterType="com.platform.entity.GoodsSpecificationEntity">
@@ -113,6 +130,7 @@
             <if test="specificationId != null">`specification_id` = #{specificationId},</if>
             <if test="value != null">`value` = #{value},</if>
             <if test="picUrl != null">`pic_url` = #{picUrl}</if>
+            <if test="uuid != null">`uuid` = #{uuid}</if>
         </set>
         where id = #{id}
     </update>
@@ -121,6 +139,10 @@
 		delete from nideshop_goods_specification where id = #{value}
 	</delete>
 
+    <delete id="deleteByGoodsId">
+        delete from nideshop_goods_specification where goods_id = #{value}
+    </delete>
+
     <delete id="deleteBatch">
         delete from nideshop_goods_specification where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">

+ 9 - 3
WEB-INF/classes/com/platform/dao/OrderDao.xml

@@ -43,7 +43,7 @@
     </resultMap>
 
     <select id="queryObject" resultType="com.platform.entity.OrderEntity">
-		select o.*,u.username as username
+		select o.*,u.username as username, u.nickname as nickName
         from nideshop_order o
         left join nideshop_user u on o.user_id = u.id
         where o.id = #{value}
@@ -102,16 +102,19 @@
             AND o.pay_status = #{payStatus}
         </if>
         <if test="orderStatus != null and orderStatus.trim() != ''">
-            <if test="orderStstus == 1 or orderStstus == 2">
+            <if test="orderStatus == 1 or orderStatus == 2">
                 AND os.shipping_status = #{orderStatus}
             </if>
-            <if test="orderStstus != 1 and orderStstus == 2">
+            <if test="orderStatus != 1 and orderStatus != 2">
                 AND o.order_status = #{orderStatus}
             </if>
         </if>
         <if test="orderType != null and orderType.trim() != ''">
             AND o.order_type = #{orderType}
         </if>
+        <if test="brandId != null and brandId.trim() != ''">
+            AND b.id = #{brandId}
+        </if>
         <if test="brandIdList != null and brandIdList.size() > 0">
             AND b.id in
             <foreach item="brandId" collection="brandIdList" open="(" separator="," close=")">
@@ -154,6 +157,9 @@
         <if test="orderType != null and orderType.trim() != ''">
             AND order_type = #{orderType}
         </if>
+        <if test="brandId != null and brandId.trim() != ''">
+            AND b.id = #{brandId}
+        </if>
         <if test="brandIdList != null and brandIdList.size() > 0">
             AND b.id in
             <foreach item="brandId" collection="brandIdList" open="(" separator="," close=")">

+ 1 - 1
WEB-INF/classes/com/platform/dao/OrderGoodsDao.xml

@@ -32,7 +32,7 @@
 		<if test="orderId != null and orderId != ''">
 			AND og.order_id = #{orderId}
 		</if>
-		<if test="brandId != null ">
+		<if test="brandId != null and brandId.trim() != ''">
 			AND b.id = #{brandId}
 		</if>
         <choose>

+ 4 - 1
WEB-INF/classes/com/platform/dao/OrderShippingDao.xml

@@ -27,7 +27,7 @@
 		<if test="orderId != null and orderId != ''">
 			AND order_id = #{orderId}
 		</if>
-		<if test="brandId != null ">
+		<if test="brandId != null and brandId.trim() != ''">
 			AND brand_id = #{brandId}
 		</if>
         <choose>
@@ -49,6 +49,9 @@
 		<if test="orderId != null and orderId != ''">
 			AND order_id = #{orderId}
 		</if>
+		<if test="brandId != null and brandId.trim() != ''">
+			AND brand_id = #{brandId}
+		</if>
 	</select>
 	 
 	<insert id="save" parameterType="com.platform.entity.OrderShippingEntity" useGeneratedKeys="true" keyProperty="id">

BIN
WEB-INF/classes/com/platform/dao/ProductDao.class


+ 9 - 0
WEB-INF/classes/com/platform/dao/ProductDao.xml

@@ -33,6 +33,7 @@
 			goods_specification_ids,
 			goods_sn,
 			goods_number,
+			uuid_link,
 			retail_price,
 			market_price
 		from nideshop_product
@@ -46,6 +47,7 @@
         nideshop_product.goods_specification_ids,
         nideshop_product.goods_sn,
         nideshop_product.goods_number,
+        nideshop_product.uuid_link,
         nideshop_product.retail_price,
         nideshop_product.market_price,
         nideshop_goods.name goods_name,
@@ -103,6 +105,7 @@
 			`goods_specification_ids`,
 			`goods_sn`,
 			`goods_number`,
+			`uuid_link`,
 			`retail_price`,
 			`market_price`)
 		values(
@@ -110,6 +113,7 @@
 			#{goodsSpecificationIds},
 			#{goodsSn},
 			#{goodsNumber},
+			#{uuidLink},
 			#{retailPrice},
 			#{marketPrice})
 	</insert>
@@ -121,6 +125,7 @@
             <if test="goodsSpecificationIds != null">`goods_specification_ids` = #{goodsSpecificationIds},</if>
             <if test="goodsSn != null">`goods_sn` = #{goodsSn},</if>
             <if test="goodsNumber != null">`goods_number` = #{goodsNumber},</if>
+            <if test="uuidLink != null">`uuid_link` = #{uuidLink},</if>
             <if test="retailPrice != null">`retail_price` = #{retailPrice},</if>
             <if test="marketPrice != null">`market_price` = #{marketPrice}</if>
         </set>
@@ -131,6 +136,10 @@
 		delete from nideshop_product where id = #{value}
 	</delete>
 
+    <delete id="deleteByGoodsId">
+        delete from nideshop_product where goods_id = #{value}
+    </delete>
+
     <delete id="deleteBatch">
         delete from nideshop_product where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">

BIN
WEB-INF/classes/com/platform/entity/GoodsEntity.class


BIN
WEB-INF/classes/com/platform/entity/GoodsSpecificationEntity.class


BIN
WEB-INF/classes/com/platform/entity/ProductEntity.class


BIN
WEB-INF/classes/com/platform/service/BrandService.class


BIN
WEB-INF/classes/com/platform/service/GoodsSpecificationService.class


BIN
WEB-INF/classes/com/platform/service/impl/BrandServiceImpl.class


BIN
WEB-INF/classes/com/platform/service/impl/GoodsServiceImpl.class


BIN
WEB-INF/classes/com/platform/service/impl/GoodsSpecificationServiceImpl.class


BIN
WEB-INF/classes/com/platform/service/impl/OrderServiceImpl.class


BIN
WEB-INF/classes/com/platform/service/impl/ProductServiceImpl.class


BIN
WEB-INF/lib/platform-api-1.0.0.jar


BIN
WEB-INF/lib/platform-common-1.0.0.jar


+ 41 - 28
WEB-INF/page/shop/brand.html

@@ -9,19 +9,24 @@
     <div v-show="showList">
         <Row :gutter="16">
             <div class="search-group">
-                <i-col span="4">
-                    <i-input v-model="q.name" @on-enter="query" placeholder="店铺名称"/>
-                </i-col>
-                <i-col span="4">
-                    <i-select v-model="q.type" >
-                        <i-option value=" ">全部</i-option>
-                        <i-option value="0">其他</i-option>
-                        <i-option value="1">美食</i-option>
-                        <i-option value="2">服饰</i-option>
-                        <i-option value="3">丽人</i-option>
-                    </i-select>
+                <i-col span="8" >
+                    <div style="display: inline-block;">
+                        <i-input v-model="q.name" @on-enter="query" placeholder="店铺名称"/>
+                    </div>
+                    <div style="display: inline-block;">
+                        <i-select v-model="q.type" >
+                            <i-option value=" ">全部</i-option>
+                            <i-option value="0">其他</i-option>
+                            <i-option value="1">美食</i-option>
+                            <i-option value="2">服饰</i-option>
+                            <i-option value="3">丽人</i-option>
+                        </i-select>
+                    </div>
+                    <div style="display: inline-block;">
+                        <i-button @click="query">查询</i-button>
+                    </div>
                 </i-col>
-                <i-button @click="query">查询</i-button>
+            
             </div>
             <div class="buttons-group">
                 #if($shiro.hasPermission("brand:save"))
@@ -62,7 +67,9 @@
                         </Upload>
                     </div>
                     <div class="c-btn">
-                        <i-button icon="eye" @click="eyeImageListPicUrl">预览图片</i-button>
+                        <div class="c-winput">
+                         <i-button icon="eye" @click="eyeImageListPicUrl">预览图片</i-button>
+                        </div>
                     </div>
                 </Form-item>
                    
@@ -95,26 +102,32 @@
                     </i-col>
                 </Row> -->
                 <Form-item label="排序" prop="sortOrder">
-                    <Input-number :min="0" :step="1" v-model="brand.sortOrder" placeholder="排序" style="width: 188px;"/>
+                    <div class="c-winput">
+                        <Input-number :min="0" :step="1" v-model="brand.sortOrder" placeholder="排序" style="width: 188px;"/>
+                    </div>
                 </Form-item>
                 <Form-item label="显示" prop="isShow">
-                    <Radio-group v-model="brand.isShow">
-                        <Radio label="1">
-                            <span>是</span>
-                        </Radio>
-                        <Radio label="0">
-                            <span>否</span>
-                        </Radio>
-                    </Radio-group>
+                    <div class="c-winput">
+                        <Radio-group v-model="brand.isShow">
+                            <Radio label="1">
+                                <span>是</span>
+                            </Radio>
+                            <Radio label="0">
+                                <span>否</span>
+                            </Radio>
+                        </Radio-group>
+                    </div>
                 </Form-item>
     
                 <Form-item label="店铺类型" prop="type" style="width: 288px;">
-                    <i-select v-model="brand.type">
-                        <i-option value="" key="">请选择</i-option>
-                        <i-option v-for="typeitem in typeList" :value="typeitem.id"
-                                  :key="typeitem.id">{{typeitem.name}}
-                        </i-option>
-                    </i-select>
+                    <div class="c-winput">
+                        <i-select v-model="brand.type">
+                            <i-option v-for="typeitem in typeList" :value="typeitem.id"
+                                    :key="typeitem.id">{{typeitem.name}}
+                            </i-option>
+                        </i-select>
+                    </div>
+
                 </Form-item>
     
                 <Form-item label="店铺场景链接" prop="sceneUrl">

+ 6 - 2
WEB-INF/page/shop/cart.html

@@ -10,9 +10,13 @@
         <Row :gutter="16">
             <div class="search-group">
                 <i-col span="4">
-                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
+                    <div style="display: inline-block;">
+                        <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
+                    </div>
+                    <div style="display: inline-block;">
+                        <i-button @click="query">查询</i-button>
+                    </div>
                 </i-col>
-                <i-button @click="query">查询</i-button>
             </div>
             <div class="buttons-group">
                 #if($shiro.hasPermission("cart:save"))

+ 2 - 2
WEB-INF/page/shop/category.html

@@ -45,10 +45,10 @@
                 <Form-item label="级别" prop="level">
                     <Radio-group v-model="category.level">
                         <Radio label="L1">
-                            <span>L1</span>
+                            <span>一级分类</span>
                         </Radio>
                         <Radio label="L2">
-                            <span>L2</span>
+                            <span>二级分类</span>
                         </Radio>
                     </Radio-group>
                 </Form-item>

+ 8 - 3
WEB-INF/page/shop/collect.html

@@ -9,10 +9,15 @@
     <div v-show="showList">
         <Row :gutter="16">
             <div class="search-group">
-                <i-col span="4">
-                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
+                <i-col span="8">
+                    <div style="display: inline-block;">
+                        <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
+                    </div>
+                    <div style="display: inline-block;">
+                        <i-button @click="query">查询</i-button>
+                    </div>
+
                 </i-col>
-                <i-button @click="query">查询</i-button>
             </div>
             <div class="buttons-group">
                 #if($shiro.hasPermission("collect:save"))

+ 7 - 3
WEB-INF/page/shop/feedback.html

@@ -9,10 +9,14 @@
     <div v-show="showList">
         <Row :gutter="16">
             <div class="search-group">
-                <i-col span="4">
-                    <i-input v-model="q.userName" @on-enter="query" placeholder="名称"/>
+                <i-col span="8">
+                    <div style="display: inline-block;">
+                        <i-input v-model="q.userName" @on-enter="query" placeholder="名称"/>
+                    </div>
+                    <div style="display: inline-block;">
+                        <i-button @click="query">查询</i-button>
+                    </div>
                 </i-col>
-                <i-button @click="query">查询</i-button>
             </div>
             <!--#if($shiro.hasPermission("feedback:save"))-->
             <!--<i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>-->

+ 134 - 42
WEB-INF/page/shop/goods.html

@@ -44,23 +44,34 @@
             cursor: pointer;
             margin: 0 2px;
         }
+
     </style>
+
+
+    <!-- <script type="text/javascript" src = "https://cdn.polyfill.io/v2/polyfill.min.js?features=es6"></script> -->
 </head>
 <body>
 <div id="rrapp" v-cloak>
     <div v-show="showList">
         <Row :gutter="16">
             <div class="search-group">
-                <i-col span="4">
-                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
-                </i-col>
-                <i-col span="4">
+                <i-col span="8">
+                <div style="display: inline-block;">
+
+                    <i-input v-model="q.name" @on-enter="query" placeholder="商品名称"/>
+                </div>
+                <div style="display: inline-block; width: 200px;">
                     <i-select v-model="q.brandId">
                         <i-option value=" ">全部</i-option>
                         <i-option v-for="(item,i) in brands" :key="i" :value="item.id">{{item.name}}</i-option>
                     </i-select>
+                </div>
+                <div style="display: inline-block;">
+                    <i-button @click="query">查询</i-button>
+                </div>
+
                 </i-col>
-                <i-button @click="query">查询</i-button>
+                
             </div>
             <div class="buttons-group">
                 #if($shiro.hasPermission("goods:save"))
@@ -102,50 +113,130 @@
                                 <i-input v-model="goods.name" placeholder="名称"/>
                             </div>
                         </Form-item>
+                        
                         <Form-item label="店铺" prop="brandId" style="width: 268px;">
                             <i-select v-model="goods.brandId" filterable>
                                 <i-option v-for="brand in brands" :value="brand.id" :key="brand.id">{{brand.name}}
                                 </i-option>
                             </i-select>
                         </Form-item>
-                        <!-- <Form-item label="类别" prop="attributeCategory" style="width: 268px;">
-                            <i-select v-model="goods.attributeCategory" filterable label-in-value>
-                                <i-option v-for="attributeCategory in attributeCategories" :value="attributeCategory.id"
-                                          :key="attributeCategory.id">{{attributeCategory.name}}
-                                </i-option>
-                            </i-select>
-                        </Form-item> -->
-                        <Form-item label="商品库存" prop="goodsNumber">
-                            <Input-number :min="0" :step="1" v-model="goods.goodsNumber" placeholder="商品库存"
-                                          style="width: 188px;"/>
+                        
+                        <!-- <Form-item label="商品库存" prop="goodsNumber">
+                            <div class="c-winput">
+                                <Input-number :min="1" :step="1" v-model="goods.goodsNumber" placeholder="商品库存" style="width: 188px;"/>
+                            </div>
                         </Form-item>
-                        <!--<Form-item label="商品单位" prop="goodsUnit" style="width: 268px;">-->
-                        <!--<i-select v-model="goods.goodsUnit" filterable>-->
-                        <!--<i-option v-for="macro in macros" :value="macro.value" :key="macro.value">{{macro.name}}-->
-                        <!--</i-option>-->
-                        <!--</i-select>-->
-                        <!--</Form-item>-->
-                        <!--<Form-item label="单价" prop="unitPrice">-->
-                        <!--<Input-number :min="0" :step="1" v-model="goods.unitPrice" placeholder="单价"-->
-                        <!--style="width: 188px;"/>-->
-                        <!--</Form-item>-->
+                  
                         <Form-item label="零售价格" prop="retailPrice">
-                            <Input-number :min="0" :step="1" v-model="goods.retailPrice" placeholder="零售价格"
-                                          style="width: 188px;"/>
+                            <div class="c-winput">
+                                <Input-number :min="1" :step="1" v-model="goods.retailPrice" placeholder="零售价格" style="width: 188px;"/>
+                            </div>
                         </Form-item>
+                        
                         <Form-item label="市场价" prop="marketPrice">
-                            <Input-number :min="0" :step="1" v-model="goods.marketPrice" placeholder="市场价"
-                                          style="width: 188px;"/>
+                            <div class="c-winput">
+                                <Input-number :min="1" :step="1" v-model="goods.marketPrice" placeholder="市场价" style="width: 188px;"/>
+                            </div>
+
+                        </Form-item> -->
+
+                        <Form-item label="商品规格">
+                            <div class="items-ge">
+                                <div class="item-ge" v-for="(item,i) in guigeArr" :key="i">
+                                    <div @click="handleBigItem(i)" class="item-close">
+                                        <i class="fa fa-times-circle"></i>
+                                    </div>
+                                    <div class="t-name">
+                                        <span>规格名:</span>
+                                        <div class="c-winput-sm">
+                                            <i-input @on-focus="onfocus(i)" @on-enter="onblur(i)" v-model="item.name" placeholder="规格名"  />
+                                        </div>
+                                        <ul class="sp-list" v-if="item.show">
+                                            <li @click.stop="handleItem(i,sub)" v-for="(sub,idx) in specifications" :key="idx">
+                                                {{sub.name}}
+                                            </li>
+                                        </ul>
+                                    </div>
+                                    <div class="t-val">
+                                        <span class="v-name">规格值:</span>
+                                        <!-- {{item.val}} -->
+                                        <div class="c-winput-sm c-winput-bm" v-for="(gg,idx) in item.val" :key="idx">
+                                            <div style="width: 30%;margin-bottom: 10px;">
+                                                <i-input v-model="gg.name" placeholder="规格值" />
+                                            </div>
+                                            <i @click="delguige(idx,item.val)" class="fa fa-times-circle"></i>
+                                            <div class="upload">
+                                                <div class="c-winput">
+                                                    <i-input v-model="gg.picUrl" placeholder="规格图" readonly/>
+                                                </div>
+                                                <div class="c-btn">
+                                                    <Upload action="../sys/oss/upload" :format="['jpg','jpeg','png']"
+                                                                max-size="2048"
+                                                                :on-success="handleItemPicUrl" :on-format-error="handleFormatError"
+                                                                :show-upload-list="false"
+                                                                :on-exceeded-size="handleMaxSize">
+                                                            <i-button @click="handleCurrentIdx(i,idx)" icon="ios-cloud-upload-outline">上传图片</i-button>
+                                                        </Upload>
+                                                </div>
+                                                <div class="c-btn">
+                                                    <i-button icon="eye" @click="eyeImageItemPicUrl(gg.picUrl)">预览图片</i-button>
+                                                </div>
+                                            </div>
+                                        </div>
+
+                                        <span class="add-s" @click="addguige(item)">添加属性值</span>
+                                        
+                                    </div>
+                                </div>
+                                <i-button @click="addGoodsItem">添加规格项目</i-button>
+                                <i-button @click="showArr">生成规格明细</i-button>
+                            </div>
                         </Form-item>
-                        <!--<Form-item label="专柜价格" prop="counterPrice">-->
-                        <!--<Input-number :min="0" :step="1" v-model="goods.counterPrice" placeholder="专柜价格"-->
-                        <!--style="width: 188px;"/>-->
-                        <!--</Form-item>-->
-                        <!--<Form-item label="附加价格" prop="extraPrice">-->
-                        <!--<Input-number :min="0" :step="1" v-model="goods.extraPrice" placeholder="附加价格"-->
-                        <!--style="width: 188px;"/>-->
-                        <!--</Form-item>-->
-                
+
+                        <Form-item label="规格明细">
+                            <div class="c-table">
+                                <div class="">
+                                    <div class="t-header">
+                                        <ul class="h-val">
+                                            <li v-for="(item,i) in ggname">{{item.name}}</li>
+                                        </ul>
+                                        <ul>
+                                            <li v-for="(item,i) in ggheader">
+                                                {{item.name}}
+                                            </li>
+                                        </ul>
+                                    </div>
+                                    <div class="t-content">
+                                        <ul class="tc-content">
+                                            <li v-for="(item,i) in ggContent">
+                                                <span>{{item.value}}</span>
+                                                <ul class="secend-ul" v-if="item.subItems">
+                                                    <li v-for="sub in item.subItems">
+                                                        <span>{{sub.value}}</span>
+                                                        <ul v-if="sub.subItems">
+                                                            <li v-for="children in sub.subItems">
+                                                                <span>{{children.value}}</span>
+                                                            </li>
+                                                        </ul>
+                                                    </li>
+                                                </ul>
+                                            </li>
+                                        </ul>
+                                        <ul class="ip-layout" v-if="inputArr.length>0">
+                                            <li v-for="(item,i) in inputArr">
+                                                <div style="display: flex">
+                                                    <div><i-input v-model="item.goodsNumber"/></div>
+                                                    <div><i-input v-model="item.goodsSn"/></div>
+                                                    <div><i-input v-model="item.marketPrice"/></div>
+                                                    <div><i-input v-model="item.retailPrice"/></div>
+                                                </div>
+                                            </li>
+                                        </ul>
+                                    </div>
+                                </div>
+                            </div>
+                        </Form-item>
+
                         <Form-item label="主图" prop="primaryPicUrl">
                             <div class="c-winput">
                                 <i-input v-model="goods.primaryPicUrl" placeholder="商品主图" readonly/>
@@ -238,8 +329,8 @@
 
             <!-- <Tab-Pane label="详细描述" name="name2">
                 
-            </Tab-Pane>
-            <Tab-Pane label="其他信息" name="name3">
+            </Tab-Pane> -->
+            <!-- <Tab-Pane label="其他信息" name="name3">
                 <i-form ref="formValidate1" :model="goods" :rules="ruleValidate" :label-width="80">
                     <Form-item label="排序" prop="sortOrder">
                         <Input-number :min="0" :step="1" v-model="goods.sortOrder" placeholder="排序"
@@ -277,12 +368,13 @@
                     </Form-item>
                 </i-form>
             </Tab-Pane> -->
-        </Tabs>
-        <div style="padding-left: 20px; margin-bottom: 30px">
+        <!-- </Tabs> -->
+        <div style="padding-left: 20px; margin-bottom: 30px" v-show="!showList">
             <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
             <i-button type="warning" @click="reload" style="margin-left: 8px"/>
             返回</i-button>
             <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
+            <!-- <i-button @click="showArrsds">确定呀</i-button> -->
         </div>
     </Card>
 </div>

+ 7 - 3
WEB-INF/page/shop/goodshistory.html

@@ -9,10 +9,14 @@
     <div v-show="showList">
         <Row :gutter="16">
             <div class="search-group">
-                <i-col span="4">
-                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
+                <i-col span="8">
+                    <div style="display: inline-block;">
+                        <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
+                    </div>
+                    <div style="display: inline-block;">
+                        <i-button @click="query">查询</i-button>
+                    </div>
                 </i-col>
-                <i-button @click="query">查询</i-button>
             </div>
             <div class="buttons-group">
                 #if($shiro.hasPermission("goods:back"))

+ 8 - 3
WEB-INF/page/shop/goodshotspot.html

@@ -51,10 +51,15 @@
     <div v-show="showList">
         <Row :gutter="16">
             <div class="search-group">
-                <i-col span="4">
-                    <i-input v-model="q.name" @on-enter="query" placeholder="店铺名称"/>
+                <i-col span="8">
+                    <div style="display: inline-block;">
+                        <i-input v-model="q.name" @on-enter="query" placeholder="店铺名称"/>
+                    </div>
+                    <div style="display: inline-block;">
+                        <i-button @click="query">查询</i-button>
+                    </div>
+
                 </i-col>
-                <i-button @click="query">查询</i-button>
             </div>
             <div class="buttons-group">
                 <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>

+ 14 - 10
WEB-INF/page/shop/goodsspecification.html

@@ -9,16 +9,21 @@
     <div v-show="showList">
         <Row :gutter="16">
             <div class="search-group">
-                <i-col span="4">
-                    <i-input v-model="q.name" @on-enter="query" placeholder="商品名称/店铺名称"/>
+                <i-col span="8">
+                    <div style="display: inline-block;">
+                        <i-input v-model="q.name" @on-enter="query" placeholder="商品名称/店铺名称"/>
+                    </div>
+                    <div style="display: inline-block; width: 200px;">
+                        <i-select v-model="q.brandId">
+                            <i-option value=" ">全部</i-option>
+                            <i-option v-for="(item,i) in brands" :key="i" :value="item.id">{{item.name}}</i-option>
+                        </i-select>
+                    </div>
+                    <div style="display: inline-block;">
+                        <i-button @click="query">查询</i-button>
+                    </div>
                 </i-col>
-                <i-col span="4">
-                    <i-select v-model="q.brandId">
-                        <i-option value=" ">全部</i-option>
-                        <i-option v-for="(item,i) in brands" :key="i" :value="item.id">{{item.name}}</i-option>
-                    </i-select>
-                </i-col>
-                <i-button @click="query">查询</i-button>
+              
             </div>
             <div class="buttons-group">
                 #if($shiro.hasPermission("goodsspecification:save"))
@@ -57,7 +62,6 @@
                     <i-input type="textarea" v-model="goodsSpecification.value" placeholder="规格说明"/>
                 </div>
             </Form-item>
-           
                     <Form-item label="规格图片" prop="picUrl">
                         <div class="c-winput">
                             <i-input v-model="goodsSpecification.picUrl" placeholder="规格图片" readonly/>

+ 33 - 31
WEB-INF/page/shop/order.html

@@ -9,33 +9,34 @@
     <div v-show="!detail&&showList">
         <Row :gutter="16">
             <div class="search-group">
-                <i-col span="4">
-                    <i-input v-model="q.orderSn" @on-enter="query" placeholder="订单号"/>
-                </i-col>
-                <i-col span="4">
-                    <i-select v-model="q.orderStatus">
-                        <i-option value=" ">全部订单</i-option>
-                        <i-option value="0">待付款</i-option>
-                        <i-option value="101">订单已取消</i-option>
-                        <!-- <i-option value="102">订单已删除</i-option> -->
-                        <i-option value="201">订单已付款</i-option>
-                        <i-option value="1">订单已发货</i-option>
-                        <i-option value="2">订单已收货</i-option>
-                        <!-- <i-option value="401">退款(未发货)</i-option> -->
-                        <!-- <i-option value="402">退款(已收货)</i-option> -->
-                        <i-option value="501">完成</i-option>
-                    </i-select>
-                </i-col>
-                <i-col span="4">
-                    <i-select v-model="q.orderType">
-                        <i-option value=" ">全部订单</i-option>
-                        <i-option value="1">普通订单</i-option>
-                        <i-option value="2">团购订单</i-option>
-                        <i-option value="3">砍价订单</i-option>
-                        <i-option value="4">立即购买</i-option>
-                    </i-select>
+                <i-col span="12">
+                    <div style="display: inline-block;">
+                        <i-input v-model="q.orderSn" @on-enter="query" placeholder="订单号"/>
+                    </div>
+                    <div style="display: inline-block;width: 200px;">
+                        <i-select v-model="q.orderStatus" placeholder="请选择订单状态">
+                            <i-option value=" ">全部订单</i-option>
+                            <i-option value="0">待付款</i-option>
+                            <i-option value="101">订单已取消</i-option>
+                            <!-- <i-option value="102">订单已删除</i-option> -->
+                            <i-option value="201">订单已付款</i-option>
+                            <i-option value="1">订单已发货</i-option>
+                            <i-option value="2">订单已收货</i-option>
+                            <!-- <i-option value="401">退款(未发货)</i-option> -->
+                            <!-- <i-option value="402">退款(已收货)</i-option> -->
+                            <i-option value="501">完成</i-option>
+                        </i-select>
+                    </div>
+                    <div style="display: inline-block;width: 200px;">
+                        <i-select v-model="q.brandId" placeholder="请选择店铺">
+                            <i-option value=" ">全部</i-option>
+                            <i-option v-for="(item,i) in brands" :key="i" :value="item.id">{{item.name}}</i-option>
+                        </i-select>
+                    </div>
+                    <div style="display: inline-block;">
+                        <i-button @click="query">查询</i-button>
+                    </div>
                 </i-col>
-                <i-button @click="query">查询</i-button>
             </div>
             <div class="buttons-group">
                 #if($shiro.hasPermission("order:exports"))
@@ -157,9 +158,9 @@
                         <Radio label="0" disabled>
                             <span>待付款</span>
                         </Radio>
-                        <Radio label="1" disabled>
+                        <!-- <Radio label="1" disabled>
                             <span>付款中</span>
-                        </Radio>
+                        </Radio> -->
                         <Radio label="2" disabled>
                             <span>已付款</span>
                         </Radio>
@@ -215,7 +216,7 @@
                     <!-- <i-input v-model="order.payName" readonly/> -->
                 </Form-item>
                 <Form-item label="快递费用:" prop="shippingFee">
-                    {{order.shippingFee}}
+                    {{order.freightPrice}}
                     <!-- <i-input v-model="order.shippingFee" readonly/> -->
                 </Form-item>
                 <Form-item label="实际支付:" prop="actualPrice">
@@ -231,11 +232,12 @@
                     <!-- <i-input v-model="order.goodsPrice" readonly/> -->
                 </Form-item>
                 <Form-item label="下单时间:" prop="addTime">
-                    {{order.addTime}}
+                    {{transDate(order.addTime, 'yyyy-MM-dd')}}
+
                     <!-- <Date-picker v-model="order.addTime" placeholder="使用时间" readonly/> -->
                 </Form-item>
                 <Form-item label="付款时间:" prop="payTime">
-                    {{order.payTime}}
+                    {{transDate(order.payTime, 'yyyy-MM-dd')}}
                     <!-- <Date-picker v-model="order.payTime" placeholder="使用时间" readonly/> -->
                 </Form-item>
                 <!-- <Form-item label="配送费用" prop="freightPrice">

+ 19 - 12
WEB-INF/page/shop/orderPrint.html

@@ -45,7 +45,7 @@
                             </td>
                             <td>{{goods.number}}</td>
                             <td>&yen;{{goods.retailPrice}}</td>
-                            <td>&yen;{{goods.retailPrice*goods.number}}</td>
+                            <td>&yen;{{(goods.retailPrice*goods.number).toFixed(1)}}</td>
                         </tr>
                         </tbody>
                     </table>
@@ -80,7 +80,7 @@
             order: {},
             orderGoods: {},
             sumRetailPrice: 0,
-            nowDate: transDate(new Date())
+            nowDate: transDate((new Date()).getTime())
         },
         methods: {
             print: function () {
@@ -97,18 +97,25 @@
                 async: true,
                 successCallback: function (r) {
                     vm.order = r.order;
+                    console.log(vm.order)
+
+                    vm.orderGoods = r.order.goodsList;
+                    vm.sumRetailPrice = r.order.orderPrice
+                    // for (let i = 0; i < r.order.goodsList.length; i++) {
+                    //     vm.sumRetailPrice += r.order.goodsList[i].retailPrice.toFixed(1) * r.order.goodsList[i].number.toFixed(1)
+                    // }
                 }
             });
-            Ajax.request({
-                url: "../ordergoods/queryAll?orderId=" + orderId,
-                async: true,
-                successCallback: function (r) {
-                    vm.orderGoods = r.list;
-                    for (let i = 0; i < r.list.length; i++) {
-                        vm.sumRetailPrice += r.list[i].retailPrice * r.list[i].number
-                    }
-                }
-            });
+            // Ajax.request({
+            //     url: "../ordergoods/queryAll?orderId=" + orderId,
+            //     async: true,
+            //     successCallback: function (r) {
+            //         vm.orderGoods = r.list;
+            //         for (let i = 0; i < r.list.length; i++) {
+            //             vm.sumRetailPrice += r.list[i].retailPrice * r.list[i].number
+            //         }
+            //     }
+            // });
         }
     });
 </script>

+ 7 - 3
WEB-INF/page/shop/product.html

@@ -9,10 +9,14 @@
     <div v-show="showList">
         <Row :gutter="16">
             <div class="search-group" v-if="!onlyOne">
-                <i-col span="4">
-                    <i-input v-model="q.goodsName" @on-enter="query" placeholder="商品名称"/>
+                <i-col span="8">
+                    <div style="display: inline-block;">
+                        <i-input v-model="q.goodsName" @on-enter="query" placeholder="商品名称"/>
+                    </div>
+                    <div style="display: inline-block;">
+                        <i-button @click="query">查询</i-button>
+                    </div>
                 </i-col>
-                <i-button @click="query">查询</i-button>
             </div>
             <div class="buttons-group">
                 #if($shiro.hasPermission("product:save"))

+ 9 - 5
WEB-INF/page/shop/specification.html

@@ -9,10 +9,14 @@
     <div v-show="showList">
         <Row :gutter="16">
             <div class="search-group">
-                <i-col span="4">
-                    <i-input v-model="q.name" @on-enter="query" placeholder="规格名称"/>
+                <i-col span="8">
+                    <div style="display: inline-block;">
+                        <i-input v-model="q.name" @on-enter="query" placeholder="规格名称"/>
+                    </div>
+                    <div style="display: inline-block;">
+                        <i-button @click="query">查询</i-button>
+                    </div>
                 </i-col>
-                <i-button @click="query">查询</i-button>
             </div>
             <div class="buttons-group">
                 #if($shiro.hasPermission("specification:save"))
@@ -33,9 +37,9 @@
     <Card v-show="!showList">
         <p slot="title">{{title}}</p>
         <i-form ref="formValidate" :model="specification" :rules="ruleValidate" :label-width="80">
-            <Form-item label="规格名称" prop="name">
+            <Form-item label="商品属性" prop="name">
                 <div class="c-winput">
-                    <i-input v-model="specification.name" placeholder="规格名称"/>
+                    <i-input v-model="specification.name" placeholder="商品属性"/>
                 </div>
             </Form-item>
             <Form-item label="排序" prop="sortOrder">

+ 8 - 2
WEB-INF/page/sys/config.html

@@ -9,9 +9,15 @@
     <div v-show="showList">
         <Row :gutter="16">
             <i-col span="4">
-                <i-input v-model="q.key" @on-enter="query" placeholder="参数名"/>
+
+                <div style="display: inline-block;">
+                    <i-input v-model="q.key" @on-enter="query" placeholder="参数名"/>
+                </div>
+                <div style="display: inline-block;">
+                    <i-button @click="query">查询</i-button>
+                </div>
+
             </i-col>
-            <i-button @click="query">查询</i-button>
             <div class="buttons-group">
                 <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                 <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>

+ 5 - 0
WEB-INF/page/sys/header.html

@@ -1,6 +1,9 @@
 <meta charset="UTF-8">
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
+<!--polyfill-->
+<!-- <script src="https://cdn.bootcss.com/jquery-browser/0.1.0/jquery.browser.min.js"></script>
+<script src="https://cdn.bootcss.com/babel-polyfill/7.8.7/polyfill.min.js"></script> -->
 <!--bootstrap-->
 <link rel="stylesheet" href="${rc.contextPath}/statics/css/bootstrap.min.css">
 <link rel="stylesheet" href="${rc.contextPath}/statics/css/font-awesome.min.css">
@@ -53,6 +56,8 @@
 
 <script src="${rc.contextPath}/statics/libs/jquery-extend.js"></script>
 <script src="${rc.contextPath}/js/common.js"></script>
+
+
 <script>
     var _hmt = _hmt || [];
     (function() {

+ 16 - 6
WEB-INF/page/sys/log.html

@@ -8,13 +8,23 @@
 <div id="rrapp" v-cloak>
     <Row :gutter="16">
         <div class="search-group">
-            <i-col span="4">
-                <i-input v-model="q.key" @on-enter="query" placeholder="用户名、用户操作"/>
+            <i-col span="8">
+                <div style="display: inline-block;">
+                    <i-input v-model="q.key" @on-enter="query" placeholder="用户名、用户操作"/>
+                </div>
+
+                <div style="display: inline-block;">
+                    <Checkbox-group v-model="isLogin" @on-change="query" class="inline">
+                        <Checkbox label="登录"><span>登录日志</span></Checkbox>
+                    </Checkbox-group>
+                </div>
+
+                <div style="display: inline-block;">
+                    <i-button @click="query">查询</i-button>
+                </div>
+
             </i-col>
-            <Checkbox-group v-model="isLogin" @on-change="query" class="inline">
-                <Checkbox label="登录"><span>登录日志</span></Checkbox>
-            </Checkbox-group>
-            <i-button @click="query">查询</i-button>
+            
         </div>
     </Row>
     <table id="jqGrid"></table>

+ 21 - 5
WEB-INF/page/sys/region.html

@@ -8,10 +8,27 @@
 <div id="rrapp" v-cloak>
     <div v-show="showList">
         <Row :gutter="16">
-            <i-col span="4">
-                <i-input v-model="q.parentName" @on-enter="query" placeholder="上级区域"/>
+            <i-col span="8" >
+                <div style="display: inline-block;">
+                    <i-input v-model="q.parentName" @on-enter="query" placeholder="上级区域"/>
+                </div>
+                <div style="display: inline-block;">
+                    <i-input v-model="q.name" @on-enter="query" placeholder="区域"/>
+                </div>
+                <div style="display: inline-block;">
+                    <i-select v-model="q.type">
+                        <i-option value="">请选择</i-option>
+                        <i-option value="0">国家</i-option>
+                        <i-option value="1">省份</i-option>
+                        <i-option value="2">地市</i-option>
+                        <i-option value="3">区县</i-option>
+                    </i-select>
+                </div>
+                <div style="display: inline-block;">
+                    <i-button @click="query">查询</i-button>
+                </div>
             </i-col>
-            <i-col span="4">
+            <!-- <i-col span="4">
                 <i-input v-model="q.name" @on-enter="query" placeholder="区域"/>
             </i-col>
             <i-col span="4">
@@ -22,8 +39,7 @@
                     <i-option value="2">地市</i-option>
                     <i-option value="3">区县</i-option>
                 </i-select>
-            </i-col>
-            <i-button @click="query">查询</i-button>
+            </i-col> -->
             <div class="buttons-group">
                 #if($shiro.hasPermission("sys:region:save"))
                 <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>

+ 9 - 5
WEB-INF/page/sys/role.html

@@ -9,10 +9,14 @@
     <div v-show="showList">
         <Row :gutter="16">
             <div class="search-group">
-                <i-col span="4">
-                    <i-input v-model="q.roleName" @on-enter="query" placeholder="角色名称"/>
+                <i-col span="8">
+                    <div style="display: inline-block;">
+                        <i-input v-model="q.roleName" @on-enter="query" placeholder="角色名称"/>
+                    </div>
+                    <div style="display: inline-block;">
+                        <i-button @click="query">查询</i-button>
+                    </div>
                 </i-col>
-                <i-button @click="query">查询</i-button>
             </div>
             <div class="buttons-group">
                 #if($shiro.hasPermission("sys:role:save"))
@@ -51,12 +55,12 @@
                     </div>
                 </Form-item>
                 <Form-item label="功能权限">
-                    <div style="overflow-y: auto;max-height: 250px;width: 60%;">
+                    <div style="overflow-y: auto;width: 60%;">
                         <ul id="menuTree" class="ztree"></ul>
                     </div>
                 </Form-item>
                 <Form-item label="数据权限">
-                    <div style="overflow-y: auto;max-height: 250px;width: 60%;">
+                    <div style="overflow-y: auto;width: 60%;">
                         <ul id="dataTree" class="ztree"></ul>
                     </div>
                 </Form-item>

+ 9 - 5
WEB-INF/page/sys/user.html

@@ -9,10 +9,14 @@
     <div v-show="showList">
         <Row :gutter="16">
             <div class="search-group">
-                <i-col span="4">
-                    <i-input v-model="q.username" @on-enter="query" placeholder="用户名"/>
+                <i-col span="8">
+                    <div style="display: inline-block;">
+                        <i-input v-model="q.username" @on-enter="query" placeholder="用户名"/>
+                    </div>
+                    <div style="display: inline-block;">
+                        <i-button @click="query">查询</i-button>
+                    </div>
                 </i-col>
-                <i-button @click="query">查询</i-button>
             </div>
             <div class="buttons-group">
                 #if($shiro.hasPermission("sys:user:save"))
@@ -34,7 +38,7 @@
         v-model="modal1"
         title="添加店铺关联"
         @on-ok="ok"
-        @on-cancel="modal1 = false">
+        @on-cancel="cancel">
         <!-- 
            <CheckboxGroup v-model="social" @on-change="checkAllGroupChange">
             <Checkbox  :label="brand.name" v-for="(brand,idx) in brandsList" :key='idx'>
@@ -78,7 +82,7 @@
                 </div>
             </Form-item>
 
-            <Form-item label="店铺关联" prop="mobile">
+            <Form-item label="店铺关联">
                 <i-button  @click="getBrandList">添加店铺</i-button>
 
                 <div v-if="user.brandList">

BIN
excel/订单数据-2020-03-31.xls


BIN
excel/订单数据-2020-04-02.xls


+ 19 - 2
index.html

@@ -22,6 +22,7 @@
     <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
     <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
     <![endif]-->
+    <script src="https://cdn.bootcss.com/babel-polyfill/7.8.7/polyfill.min.js"></script>
     <script>
         var _hmt = _hmt || [];
         (function() {
@@ -31,6 +32,20 @@
             s.parentNode.insertBefore(hm, s);
         })();
     </script>
+    <style>
+        .navbar-header div{
+            position: absolute;
+            top: 53%;
+            left: 4%;
+            transform: translate(-50%, -50%);
+            font-size: 22px;
+        }
+
+        .navbar-header div span{
+            margin-left: 20px;
+        }
+
+    </style>
 </head>
 <!-- ADD THE CLASS layout-boxed TO GET A BOXED LAYOUT -->
 <body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
@@ -59,6 +74,7 @@
         <div class="border-bottom">
             <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                 <div class="navbar-header">
+                    <div><i class="iconfont iconmy"></i><span>{{user.username}}</span></div>
                     <!-- <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i
                         class="fa fa-bars"></i> </a> -->
                     <!-- <form role="search" class="navbar-form-custom" method="post" action="#">
@@ -98,8 +114,9 @@
 
                 </button>
                 <ul role="menu" class="dropdown-menu dropdown-menu-right">
-                    <li class="J_tabShowActive"><a>定位当前选项卡</a></li>
-                    <li class="divider"></li>
+                    <!-- <li class="J_tabShowActive"><a>定位当前选项卡</a></li> -->
+                    <!-- <li class="divider"></li> -->
+                    <li class="J_tabCloseItem"><a>关闭当前选项卡</a></li>
                     <li class="J_tabCloseAll"><a>关闭全部选项卡</a></li>
                     <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
                     </li>

+ 19 - 4
js/shop/brand.js

@@ -72,12 +72,27 @@ $(function () {
     });
 });
 
+
+const validateSceneUrlCheck = function (rule, value, callback){
+    console.log(value)
+    var link1 ='https://test.4dkankan.com/showProPC.html?m='
+    var link2 ='https://www.4dkankan.com/showProPC.html?m='
+
+    if (value === ''||!value) {
+        callback(new Error('场景地址不能为空'));
+    } else if(!~value.indexOf(link1)&&!~value.indexOf(link2)){
+        callback(new Error('场景地址需为'+link2+'或'+link1));
+    } else {
+        callback();
+    }
+};
+
 var vm = new Vue({
     el: '#rrapp',
     data: {
         showList: true,
         title: null,
-        brand: {listPicUrl: '', picUrl: '', appListPicUrl: '', newPicUrl: '', isShow: 1, isNew: 0},
+        brand: {listPicUrl: '',type:0, picUrl: '', appListPicUrl: '', newPicUrl: '', isShow: 1, isNew: 0},
         ruleValidate: {
             name: [
                 {required: true, message: '店铺名称不能为空', trigger: 'blur'}
@@ -89,7 +104,7 @@ var vm = new Vue({
                 {required: true, message: '描述不能为空', trigger: 'blur'}
             ],
             sceneUrl: [
-                {required: true, message: '场景地址不能为空', trigger: 'blur'}
+                {required: true, validator: validateSceneUrlCheck, trigger: 'blur'}
             ],
             picUrl: [
                 {required: true, message: '缩略图不能为空', trigger: 'blur'}
@@ -125,7 +140,7 @@ var vm = new Vue({
         add: function () {
             vm.showList = false;
             vm.title = "新增";
-            vm.brand = {listPicUrl: '', picUrl: '', appListPicUrl: '', newPicUrl: '', isShow: 1, isNew: 0};
+            vm.brand = {listPicUrl: '',type:0, picUrl: '', appListPicUrl: '', newPicUrl: '', isShow: 1, isNew: 0};
         },
         update: function (event) {
             var id = getSelectedRow("#jqGrid");
@@ -139,7 +154,6 @@ var vm = new Vue({
         },
         saveOrUpdate: function (event) {
             var url = vm.brand.id == null ? "../brand/save" : "../brand/update";
-
             Ajax.request({
                 type: "POST",
                 url: url,
@@ -193,6 +207,7 @@ var vm = new Vue({
         },
         handleSuccessListPicUrl: function (res, file) {
             vm.brand.listPicUrl = file.response.url;
+            vm.brand.appListPicUrl = file.response.url;
         },
         handleSuccessPicUrl: function (res, file) {
             vm.brand.picUrl = file.response.url;

+ 1 - 1
js/shop/cart.js

@@ -16,7 +16,7 @@ $(function () {
             {label: '商品序列号', name: 'goodsSn', index: 'goods_sn', width: 30},
             // {label: '产品Id', name: 'productId', index: 'product_id', width: 80 },
             {label: '产品名称', name: 'goodsName', index: 'goods_name', width: 80},
-            {label: '市场价', name: 'marketPrice', index: 'market_price', width: 20},
+            {label: '市场价', name: 'marketPrice', index: 'market_price', width: 30},
             {label: '零售价格', name: 'retailPrice', index: 'retail_price', width: 30},
             {label: '数量', name: 'number', index: 'number', width: 20},
             {label: '规格属性', name: 'goodsSpecifitionNameValue', index: 'goods_specifition_name_value', width: 100}

+ 11 - 0
js/shop/category.js

@@ -76,6 +76,17 @@ var vm = new Vue({
         },
         categoryList: []
     },
+    watch:{
+        'category.level':function (newVal) {
+            let temp = []
+            vm.categoryList.forEach(function(item){
+                if (vm.category.name!==item.name) {
+                    temp.push(item)
+                }
+            })
+            vm.categoryList = temp
+        }
+    },
     methods: {
         query: function () {
             vm.reload();

+ 340 - 11
js/shop/goods.js

@@ -7,7 +7,6 @@ $(function () {
             {label: '商品名称', name: 'name', index: 'name', width: 160},
             {label: '商品分类', name: 'categoryName', index: 'category_id', width: 80},
             {label: '店铺名称', name: 'brandName', index: 'brand_id', width: 120},
-            
             {
                 label: '录入日期', name: 'addTime', index: 'add_time', width: 80, formatter: function (value) {
                     return transDate(value, 'yyyy-MM-dd');
@@ -62,10 +61,67 @@ var setting = {
         }
     }
 };
+
+var guigeDetailHeader = [
+    {
+        name:'库存',
+        id:'goodsNumber'
+    },
+    {
+        name:'规格编码',
+        id:'goodsSn'
+    },
+    {
+        name:'市场价',
+        id:'marketPrice'
+    },
+    {
+        name:'销售价',
+        id:'retailPrice'
+    },
+   
+]
+
+var val1 = [
+    {
+        val:'20码',
+        id:'20m'
+    },
+    {
+        val:'30码',
+        id:'30m'
+    }
+]
+
+var val2 = [
+    {
+        val:'10寸',
+        id:'10c'
+    },
+    {
+        val:'20寸',
+        id:'20c'
+    },
+]
+
+var val3 = [
+    {
+        val:'毛坯房',
+        id:'mp'
+    },
+    {
+        val:'精装房',
+        id:'jz'
+    }
+]
+
+var isFrist = true
+
+
 var vm = new Vue({
     el: '#rrapp',
-    data(){ 
-        const validateBrandIdCheck = (rule, value, callback) => {
+    data: function () {
+        const validateBrandIdCheck =function (rule, value, callback)  {
             if (value === '' || !value) {
                 callback(new Error('店铺不能为空'));
             }else {
@@ -73,7 +129,12 @@ var vm = new Vue({
             }
         };
 
-        const validateCategoryNameCheck = (rule, value, callback) => {
+
+        const validateCategoryNameCheck =function (rule, value, callback) {
+            if (isFrist) {
+                isFrist = false
+                return
+            }
             if (value === '' || !value || value==='一级分类') {
                 callback(new Error('请选择商品类型'));
             } else {
@@ -81,6 +142,8 @@ var vm = new Vue({
             }
         };
         return {
+            ggheader:guigeDetailHeader,
+            ggContent:'',
             showList: true,
             title: null,
             uploadList: [],
@@ -99,7 +162,7 @@ var vm = new Vue({
             },
             ruleValidate: {
                 categoryName: [
-                    {required: true, validator: validateCategoryNameCheck, trigger: 'blur'}
+                    {required: true, validator: validateCategoryNameCheck, trigger: 'change'}
                 ],
                 goodsSn: [
                     {required: true, message: '商品序列号不能为空', trigger: 'blur'}
@@ -123,13 +186,226 @@ var vm = new Vue({
             },
             brands: [],//品牌
             macros: [],//商品单位
-            attributeCategories: []//属性类别
+            attributeCategories: [],//属性类别
+            specifications: [],
+            ggname:[],
+            guigeArr:[{
+                name:'',
+                val:[
+                    {
+                        name:'',
+                        picUrl:''
+                    }
+                ]
+            }],
+            currenIdx:'',
+            currenI:'',
+            inputArr:[],
+            goodsSpecificationList:[]
         }
     },
     methods: {
+        getInputArr:function(){
+            let uuidLink = []
+            var arr = []
+            this.ggContent.forEach(function (item){
+                uuidLink = []
+                uuidLink.push(item.uuid)
+                if (item.subItems) {
+                    item.subItems.forEach(function(sub){
+                        uuidLink.push(sub.uuid)
+                        if (sub.subItems) {
+                            sub.subItems.forEach(function(last){
+                                uuidLink.push(last.uuid)
+                                if (!last.subItems) {
+                                    arr.push(Object.assign({},{
+                                        uuidLink:uuidLink.join('_')
+                                    },last.inputVal))
+                                    uuidLink.pop()
+                                }
+                            })
+                        }
+                        else{
+                            arr.push(Object.assign({},{
+                                uuidLink:uuidLink.join('_')
+                            },sub.inputVal))
+                            uuidLink.pop()
+                        }
+                    })
+                }else{
+                    arr.push(Object.assign({},{
+                        uuidLink:uuidLink.join('_')
+                    },item.inputVal))
+                    uuidLink.pop()
+                }
+            })
+
+            // console.log(this.ggContent)
+
+            this.inputArr = arr
+        },
+        showArrsds:function () {
+            // console.log(this.inputArr)
+            // console.log(this.guigeArr)
+        },
+        transToGuigeArr:function (arr) {
+            let temp = []
+            let tepName = arr.map(function (item) {
+                return item.specificationName
+            })
+            tepName = []
+            arr.forEach(function (item) {
+                if (!~tepName.indexOf(item.specificationName)) {
+                    tepName.push(item.specificationName)
+                    temp.push({
+                        name: item.specificationName,
+                        val:[
+                            {
+                                name:item.value,
+                                picUrl:item.picUrl,
+                                uuid:item.uuid,
+                                id:item.id
+                            }
+                        ]
+                    })
+                }else{
+                     temp.forEach(function (sub) {
+                        //  console.log(sub)
+                        if (sub.name === item.specificationName) {
+                            sub.val.push(
+                                {
+                                    name:item.value,
+                                    picUrl:item.picUrl,
+                                    uuid:item.uuid,
+                                    id:item.id
+                                }
+                            )
+                        }
+                    })
+                    
+                }
+                
+            })
+
+            this.guigeArr = temp
+            this.showArr()
+            // guigeArr:[{
+            //     name:'',
+            //     val:[
+            //         {
+            //             name:'',
+            //             picUrl:''
+            //         }
+            //     ]
+            // }]
+        },
+        showArr:function () {
+            let tmp = []
+            let itm = []
+            let goodsSpecificationList = []
+            this.ggname = []
+            this.guigeArr.forEach(function(item,idx){
+                itm = []
+                item.val.forEach(function(sub,i){
+                    let tt= {
+                        value:sub.name,
+                        picUrl:sub.picUrl||'',
+                        uuid:sub.uuid||((idx+1)+'-'+(i+1)),
+                        specificationId: item.specificationId,
+                        inputVal:{
+                            goodsNumber:'',
+                            goodsSn:'',
+                            retailPrice:'',
+                            marketPrice:''
+                        }
+                    }
+                    itm.push(tt)
+                    goodsSpecificationList.push(tt)
+                })
+                vm.ggname.push({
+                    name:item.name
+                })
+                tmp.push(itm)
+            })
+
+            tmp[0].forEach(function (i1){
+                if (tmp[1]) {
+                    i1['subItems'] = tmp[1]
+                    i1['subItems'].forEach(function (i2){
+                        if (tmp[2]) {
+                            i2['subItems'] = tmp[2]
+                        }
+                    })
+                }
+                
+            })
+    
+            this.ggContent = tmp[0]
+            // console.log(this.guigeArr)
+            this.goodsSpecificationList = goodsSpecificationList
+            this.getInputArr()
+        },
+        handleItem: function (idx,sub) {
+            this.$set(this.guigeArr[idx],'name',sub.name)
+            this.$set(this.guigeArr[idx],'picUrl','')
+            this.$set(this.guigeArr[idx],'specificationId',sub.id)
+            this.$set(this.guigeArr[idx],'show',false)
+        },
+
+        handleBigItem:function (item) {
+            this.guigeArr.splice(item,1)
+        },
+        handleCurrentIdx: function (i,idx) {
+            vm.currenIdx = idx
+            vm.currenI = i
+
+        },
+        handleItemPicUrl: function (res, file) {
+            console.log('currenIdx',vm.currenIdx)
+            vm.$set(vm.guigeArr[vm.currenI]['val'][vm.currenIdx],'picUrl',file.response.url)
+            this.guigeArr = vm.guigeArr
+        },
+        onfocus:function (idx) {
+            this.$set(this.guigeArr[idx],'show',true)
+        },
+        onblur:function (idx) {
+            this.$set(this.guigeArr[idx],'show',false)
+        },
+        delguige:function (item,parent) {
+            parent.splice(item,1)
+        },
+        addguige:function (item) {
+            item.val.push({
+                name:'',
+                picUrl:''
+            })
+            
+        },
+        addGoodsItem:function () {
+            if (this.guigeArr.length<3) {
+                this.guigeArr.push({
+                    name:'',
+                    val:[
+                        {
+                            name:'',
+                            picUrl:''
+                        }
+                    ]
+                })
+            }
+        },
         query: function () {
             vm.reload();
         },
+        getSpecification: function () {
+            Ajax.request({
+                url: "../specification/queryAll",
+                async: true,
+                successCallback: function (r) {
+                    vm.specifications = r.list;
+                }
+            });
+        },
         add: function () {
             vm.showList = false;
             vm.title = "新增";
@@ -143,6 +419,9 @@ var vm = new Vue({
                 isAppExclusive: 0,
                 isLimited: 0,
                 isHot: 0,
+                goodsNumber:1,
+                retailPrice:1,
+                marketPrice:1,
                 categoryName: ''
             };
             $('#goodsDesc').editable('setHTML', '');
@@ -150,10 +429,26 @@ var vm = new Vue({
             vm.brands = [];
             vm.macros = [];
             vm.attributeCategories = [];
+            vm.ggname=[]
+            vm.guigeArr=[{
+                name:'',
+                val:[
+                    {
+                        name:'',
+                        picUrl:''
+                    }
+                ]
+            }]
+            vm.ggContent='',
+            vm.currenIdx=''
+            vm.currenI=''
+            vm.inputArr=[]
+            vm.goodsSpecificationList=[]
             // vm.attribute = [];
             vm.getBrands();
             vm.getMacro();
             vm.getAttributeCategories();
+            vm.getSpecification();
             // vm.getAttributes('');
         },
         update: function (event) {
@@ -215,8 +510,17 @@ var vm = new Vue({
         saveOrUpdate: function (event) {
             var url = vm.goods.id == null ? "../goods/save" : "../goods/update";
             vm.goods.goodsDesc = $('#goodsDesc').editable('getHTML');
+
             vm.goods.goodsImgList = vm.uploadList;
 
+            vm.goods['goodsSpecificationList'] = vm.goodsSpecificationList
+            
+            vm.goods['productList'] = vm.inputArr
+
+            vm.goods['guigeArr'] = JSON.stringify(vm.guigeArr)
+            
+            vm.goods['ggContent'] = JSON.stringify(vm.ggContent)
+
             Ajax.request({
                 type: "POST",
                 url: url,
@@ -323,8 +627,28 @@ var vm = new Vue({
                 async: true,
                 successCallback: function (r) {
                     vm.goods = r.goods;
+                    // vm.goodsSpecificationList = r.goods.goodsSpecificationList
+                    vm.inputArr = r.goods.productList
+
+                    vm.guigeArr = JSON.parse(r.goods.guigeArr)
+                    vm.ggContent = JSON.parse(r.goods.ggContent)
+
+
+                    vm.ggname = []
+
+                    vm.guigeArr.forEach(function (item){
+                        vm.ggname.push({
+                            name:item.name
+                        })
+                    })
+                    // vm.showArr()
+                    // console.log(vm.guigeArr)
+                    // console.log(vm.ggContent)
+
                     $('#goodsDesc').editable('setHTML', vm.goods.goodsDesc);
                     vm.getCategory();
+                    vm.getSpecification();
+                    // vm.transToGuigeArr(r.goods.goodsSpecificationList)   
                 }
             });
         },
@@ -373,22 +697,22 @@ var vm = new Vue({
                 }
             });
         },
-        handleView(name) {
+        handleView:function(name) {
             this.imgName = name;
             this.visible = true;
         },
-        handleRemove(file) {
+        handleRemove:function(file) {
             // 从 upload 实例删除数据
             const fileList = this.uploadList;
             this.uploadList.splice(fileList.indexOf(file), 1);
         },
-        handleSuccess(res, file) {
+        handleSuccess:function(res, file) {
             // 因为上传过程为实例,这里模拟添加 url
             file.imgUrl = res.url;
             file.name = res.url;
             vm.uploadList.add(file);
         },
-        handleBeforeUpload() {
+        handleBeforeUpload:function() {
             const check = this.uploadList.length < 5;
             if (!check) {
                 this.$Notice.warning({
@@ -423,6 +747,10 @@ var vm = new Vue({
         handleSuccessListPicUrl: function (res, file) {
             vm.goods.listPicUrl = file.response.url;
         },
+
+        eyeImageItemPicUrl: function (url) {
+            eyeImage(url);
+        },
         eyeImagePicUrl: function () {
             var url = vm.goods.primaryPicUrl;
             eyeImage(url);
@@ -435,7 +763,8 @@ var vm = new Vue({
             eyeImage($(e.target).attr('src'));
         }
     },
-    mounted() {
+    mounted:function() {
+        // this.transToGuigeArr()
         this.uploadList = this.$refs.upload.fileList;
         this.getBrands()
     }

+ 7 - 7
js/shop/goodshotspot.js

@@ -113,11 +113,11 @@ var vm = new Vue({
             vm.reload();
         },
         linkHotspot: function (id) {
-            let {sid,sceneNum,pageSid} = linkHotData[id]
+            var sid = linkHotData[id].sid,sceneNum=linkHotData[id].sceneNum,pageSid=linkHotData[id].pageSid
             openWindow({
                 type: 2,
                 title: '关联商品',
-                content: `../shop/linkhotspot.html?sid=${sid}&sceneNum=${sceneNum}&pageSid=${pageSid}`,
+                content: '../shop/linkhotspot.html?sid='+sid+'&sceneNum='+sceneNum+'&pageSid='+pageSid,
                 end:function () {
                     vm.reload();
                 }
@@ -364,22 +364,22 @@ var vm = new Vue({
                 }
             });
         },
-        handleView(name) {
+        handleView: function(name) {
             this.imgName = name;
             this.visible = true;
         },
-        handleRemove(file) {
+        handleRemove: function(file) {
             // 从 upload 实例删除数据
             const fileList = this.uploadList;
             this.uploadList.splice(fileList.indexOf(file), 1);
         },
-        handleSuccess(res, file) {
+        handleSuccess: function(res, file) {
             // 因为上传过程为实例,这里模拟添加 url
             file.imgUrl = res.url;
             file.name = res.url;
             vm.uploadList.add(file);
         },
-        handleBeforeUpload() {
+        handleBeforeUpload: function() {
             const check = this.uploadList.length < 5;
             if (!check) {
                 this.$Notice.warning({
@@ -426,7 +426,7 @@ var vm = new Vue({
             eyeImage($(e.target).attr('src'));
         }
     },
-    mounted() {
+    mounted:function() {
         this.uploadList = this.$refs.upload.fileList;
     }
 });

+ 3 - 2
js/shop/goodsspecification.js

@@ -40,7 +40,7 @@ var vm = new Vue({
         specifications: [],
         brands:[]
     },
-    mounted(){
+    mounted:function(){
         this.getBrands()
     },
     methods: {
@@ -164,7 +164,8 @@ var vm = new Vue({
             });
         },
         handleSuccess: function (res, file) {
-            vm.goodsSpecification.picUrl = file.response.url;
+            this.goodsSpecification.picUrl = ''
+            this.goodsSpecification.picUrl = file.response.url;
         },
         eyeImage: function () {
             var url = vm.goodsSpecification.picUrl;

+ 50 - 33
js/shop/order.js

@@ -27,6 +27,7 @@ $(function () {
             {label: '订单号', name: 'orderSn', index: 'order_sn', width: 150},
             // {label: '会员', name: 'userName', index: 'user_name', width: 80,sortable:false},
             {label: '会员昵称', name: 'nickName', index: 'nick_name', width: 80,sortable:false},
+            {label: '店铺', name: 'brandName', index: 'brand_name', width: 80,sortable:false},
             {
                 label: '订单类型', name: 'orderType', index: 'order_type', width: 80, formatter: function (value) {
                     if (value == '1') {
@@ -100,7 +101,6 @@ $(function () {
             },
             {label: '快递公司', name: 'shippingName', index: 'shipping_name', width: 80},
             {label: '快递单号', name: 'shippingNo', index: 'shipping_No', width: 80},
-            {label: '店铺', name: 'brandName', index: 'brand_name', width: 80,sortable:false},
             // {label: '商品信息', name: 'goodsList', index: 'goods_list', width: 80,sortable:false},
             {label: '实际支付金额', name: 'actualPrice', index: 'actual_price', width: 80},
             // {label: '订单总价', name: 'orderPrice', index: 'order_price', width: 60},
@@ -133,42 +133,56 @@ let vm = new Vue({
         q: {
             orderSn: '',
             orderStatus: '',
-            orderType: ''
-        }
+            brandId: ''
+        },
+        brands:[]
     },
     methods: {
         query: function () {
             vm.reload();
         },
-        exports:function () {
-            // alert('asdasdasdasd')
+        exports: function () {
+            confirm('确定要导出订单记录?', function () {
+                Ajax.request({
+                    type: "POST",
+                    url: "../order/export",
+                    params: {
+                        '_search': false,
+                        'nd': Math.random(),
+                        'sidx': '',
+                        'order': 'asc',
+                        '_': Math.random(),
+                        'orderSn': vm.q.orderSn,
+                        'orderStatus': vm.q.orderStatus,
+                        'brandId': vm.q.brandId
+                    },
+                    successCallback: function (r) {
+                        if (r.code == 0) {
+                            alert('导出成功', function (index) {
+                                vm.reload();
+                                window.open('/platform-framework/'+r.url,"_blank")
+                            });
+                        } else {
+                        }
+                    }
+                });
+            });
+        },
+        /**
+         * 获取品牌
+         */
+        getBrands: function () {
             Ajax.request({
-                type: "POST",
-                url: "../order/export",
-                params: {
-                    '_search': false,
-                    'nd': Math.random(),
-                    'sidx': '',
-                    'order': 'asc',
-                    '_': Math.random(),
-                    'orderSn': vm.q.orderSn,
-                    'orderStatus': vm.q.orderStatus,
-                    'orderType': vm.q.orderType
-                },
+                url: "../brand/queryAll",
+                async: true,
                 successCallback: function (r) {
-                    if (r.code == 0) {
-                        alert('操作成功', function (index) {
-                            window.open(`/platform-framework/${r.msg}`,"_blank")
-                            vm.reload();
-                        });
-                    } else {
-                    }
+                    vm.brands = r.list;
                 }
             });
         },
         sendGoods: function (event) {
             let rowId = getSelectedRow("#jqGrid");
-            let {id,brandId} = cacheData[rowId]
+            let id = cacheData[rowId].id,brandId = cacheData[rowId].brandId
 
             if (rowId == null) {
                 return;
@@ -185,8 +199,7 @@ let vm = new Vue({
         },
         confirm: function (event) {
             let rowId = getSelectedRow("#jqGrid");
-            console.log(cacheData[rowId].shippingStatus)
-            let {id} = cacheData[rowId]
+            let id = cacheData[rowId].id,brandId = cacheData[rowId].brandId
 
             if (parseInt(cacheData[rowId].shippingStatus) === 2) {
                 return alert('该订单已收货', function (index) {
@@ -200,9 +213,12 @@ let vm = new Vue({
             confirm('确定收货?', function () {
                 Ajax.request({
                     type: "POST",
-                    url: "../order/confirm",
+                    url: "../order/confirm/",
                     contentType: "application/json",
-                    params: JSON.stringify(id),
+                    params: JSON.stringify({
+                        id,
+                        brandId
+                    }),
                     successCallback: function (r) {
                         if (r.code == 0) {
                             alert('操作成功', function (index) {
@@ -240,14 +256,14 @@ let vm = new Vue({
                 postData: {
                     'orderSn': vm.q.orderSn,
                     'orderStatus': vm.q.orderStatus,
-                    'orderType': vm.q.orderType
+                    'brandId': vm.q.brandId
                 },
                 page: page
             }).trigger("reloadGrid");
         },
         lookDetail: function (rowId) { //第三步:定义编辑操作
-            let {id,brandId} = cacheData[rowId]
-
+            let id = cacheData[rowId].id, brandId = cacheData[rowId].brandId
+            console.log(brandId)
             vm.detail = true;
             vm.title = "订单详情";
             Ajax.request({
@@ -259,7 +275,7 @@ let vm = new Vue({
             });
         },
         printDetail: function (rowId) {
-            let {id,brandId} = cacheData[rowId]
+            let id = cacheData[rowId].id,brandId = cacheData[rowId].brandId
 
             openWindow({
                 type: 2,
@@ -270,6 +286,7 @@ let vm = new Vue({
     },
     created: function () {
         let vue = this;
+        this.getBrands()
         Ajax.request({
             url: "../shipping/queryAll",
             async: true,

+ 6 - 7
js/shop/product.js

@@ -31,9 +31,8 @@ $(function () {
 
 let vm = new Vue({
     el: '#rrapp',
-    data() {
-        const validateGoodsIdCheck = (rule, value, callback) => {
-            console.log('-----------',value)
+    data:function() {
+        const validateGoodsIdCheck = function (rule, value, callback)  {
             if (value === '' || !value) {
                 callback(new Error('商品不能为空'));
             }else {
@@ -96,11 +95,11 @@ let vm = new Vue({
 
             vm.getInfo(id)
         },
-         changeGoods: async function (opt) {
+         changeGoods: function (opt) {
             let goodsId = opt.value;
             if(!goodsId)return;
 
-            await Ajax.request({
+             Ajax.request({
                 url: "../goods/info/" + goodsId,
                 async: true,
                 successCallback: function (r) {
@@ -191,8 +190,8 @@ let vm = new Vue({
                 successCallback: function (r) {
                     vm.product = r.product;
                     let goodsSpecificationIds = vm.product.goodsSpecificationIds.split("_");
-                    goodsSpecificationIds.forEach((goodsSpecificationId, index) => {
-                        let specificationIds = goodsSpecificationId.split(",").filter(id => !!id).map(id => Number(id));
+                    goodsSpecificationIds.forEach(function (goodsSpecificationId, index) {
+                        let specificationIds = goodsSpecificationId.split(",").filter(function (id){return !!id}).map(function (id) {return Number(id) });
 
                         if (index == 0) {
                             vm.color = specificationIds;

+ 2 - 2
js/shop/specification.js

@@ -4,7 +4,7 @@ $(function () {
         rownumWidth:60,
         colModel: [
             {label: 'id', name: 'id', index: 'id', key: true, hidden: true},
-            {label: '规格名称', name: 'name', index: 'name', width: 80},
+            {label: '商品属性', name: 'name', index: 'name', width: 80},
             {label: '排序', name: 'sortOrder', index: 'sort_order', width: 80}]
     });
 });
@@ -17,7 +17,7 @@ var vm = new Vue({
         specification: {},
         ruleValidate: {
             name: [
-                {required: true, message: '规格名称不能为空', trigger: 'blur'}
+                {required: true, message: '商品属性不能为空', trigger: 'blur'}
             ]
         },
         q: {

+ 1 - 1
js/sys/dept.js

@@ -106,7 +106,7 @@ var vm = new Vue({
         },
         update: function () {
             var deptId = getDeptId();
-            if (deptId == null) {
+            if (!deptId) {
                 return;
             }
             Ajax.request({

+ 1 - 1
js/sys/region.js

@@ -4,7 +4,7 @@ $(function () {
         rownumWidth:60,
         colModel: [
             {label: 'id', name: 'id', index: 'id', key: true, hidden: true},
-            {label: '上级区域', name: 'parentName', index: 'parent_id', width: 80},
+            {label: '上级区域', name: 'parentName', index: 'parent_id', width: 180},
             {label: '区域', name: 'name', index: 'name', width: 80},
             {
                 label: '类型', name: 'type', index: 'type', width: 80,

+ 2 - 1
js/sys/role.js

@@ -5,7 +5,7 @@ $(function () {
         colModel: [
             {label: '角色ID', name: 'roleId', index: "role_id", key: true, hidden: true},
             {label: '角色名称', name: 'roleName', index: "role_name", width: 75},
-            {label: '所属部门', name: 'deptName', width: 75},
+            {label: '所属部门', name: 'deptName', width: 75,sortable:false},
             {label: '备注', name: 'remark', width: 100},
             {
                 label: '创建时间', name: 'createTime', index: "create_time", width: 80, formatter: function (value) {
@@ -192,6 +192,7 @@ var vm = new Vue({
                 url: "../sys/menu/perms",
                 async: true,
                 successCallback: function (r) {
+                    console.log('menuId')
                     menu_ztree = $.fn.zTree.init($("#menuTree"), menu_setting, r.menuList);
                     //展开所有节点
                     menu_ztree.expandAll(true);

+ 67 - 27
js/sys/user.js

@@ -5,9 +5,21 @@ $(function () {
         colModel: [
             {label: '用户ID', name: 'userId', index: "user_id", key: true, hidden: true},
             {label: '用户名', name: 'username', width: 75},
-            {label: '所属部门', name: 'deptName', width: 75},
-            {label: '邮箱', name: 'email', width: 90},
+            // {label: '所属部门', name: 'deptName', width: 75},
+            // {label: '邮箱', name: 'email', width: 90},
             {label: '手机号', name: 'mobile', width: 100},
+            {label: '店铺关联', name: 'brandList', width: 100,sortable:false,formatter:function (value) {
+                let temp = []
+                value.forEach(function (item) {
+                    temp.push(item.brandName||item.name)
+                })
+
+                return temp.join('、')
+            }},
+            {label: '角色', name: 'roleList', width: 100,sortable:false,formatter:function (value,row,col) {
+                let roleList = col.roleList
+                return  roleList[0]? roleList[0].roleName:'-'
+            }},
             {
                 label: '状态', name: 'status', width: 80, formatter: function (value) {
                     return value === 0 ?
@@ -38,6 +50,16 @@ var setting = {
 };
 var ztree;
 
+const validatePhoneCheck = function (rule, value, callback){
+    if (value === ''||!value) {
+        callback(new Error('手机号不能为空'));
+    } else if(!(/^1[3456789]\d{9}$/.test(value))){
+        callback(new Error('手机号不正确'));
+    } else {
+        callback();
+    }
+};
+
 var vm = new Vue({
     el: '#rrapp',
     data: {
@@ -64,7 +86,7 @@ var vm = new Vue({
                 {type: 'email', message: '邮箱格式不正确', trigger: 'blur'}
             ],
             mobile: [
-                {required: true, message: '手机号不能为空', trigger: 'blur'}
+                {required: true, validator: validatePhoneCheck, trigger: 'blur'}
             ]
         },
         brandsList:[],
@@ -73,36 +95,37 @@ var vm = new Vue({
         brandTotal:0,
         brandSeleced:[],
         social:[],
-        cacheData:{}
+        cacheData:{},
+        cacheDataFirst:{}
     },
     watch:{
-        brandPage(newVal){
+        brandPage:function name(newVal) {
             this.getBrandList()
         }
     },
     methods: {
-        clickCheck(item,idx){
+        clickCheck:function(item,idx){
             item['checked'] = !item['checked']
             this.$set(this.brandsList,idx,item)
         },
-        ok () {
+        ok: function() {
             let temp = []
             let tempid = []
-
-            Object.keys(this.cacheData).forEach(item=>{
-                this.cacheData[item].page.list.forEach(sub=>{
+            var that = this
+            Object.keys(vm.cacheData).forEach(function(item){
+                that.cacheData[item].page.list.forEach(function(sub){
                     if (sub['checked']) {
                         temp.push(sub)
                         tempid.push(sub.id)
-
                     }
                 })
             })
-            this.user.brandList = temp
-            this.user.brandIdList = tempid
+            vm.user.brandList = temp
+            vm.user.brandIdList = tempid
         },
-        cancel () {
-            this.$Message.info('Clicked cancel');
+        cancel:function () {
+            this.cacheData={}
+            this.modal1 = false
         },
         query: function () {
             vm.reload();
@@ -133,12 +156,11 @@ var vm = new Vue({
                 }
             });
         },
-        pageChange(page){
+        pageChange:function(page){
             this.brandPage = page
         },
         getBrandList: function () {
             this.modal1 = true
-
             if (this.cacheData[this.brandPage]) {
                 let temp = this.cacheData[this.brandPage]
                 this.brandsList = temp.page.list
@@ -146,19 +168,29 @@ var vm = new Vue({
                 this.brandTotal = temp.page.totalCount
                 return
             }
+            let that = this
+
             Ajax.request({
-                url: `../brand/list?_search=false&limit=${this.brandPerPage}&page=${this.brandPage}&sidx=&order=asc`,
+                url: '../brand/list?_search=false&limit='+that.brandPerPage+'&page='+that.brandPage+'&sidx=&order=asc',
                 async: true,
-                successCallback:  res => {
+                successCallback: function (res) {
+                    res.page.list.forEach(function (item,index){
+                            item['checked'] = false
+                            if (that.user.brandList) {
+                                that.user.brandList.forEach(function(sub){
+                                    // item['checked'] = false
+                                    if (item.id===sub.brandId) {
+                                    item['checked'] = true
+                                        return
+                                    }
+                                })
+                            }
+                        })
 
-                    res.page.list.forEach((item,index)=>{
-                        item['checked'] = false
-                    })
-
-                    this.cacheData[res.page.currPage] = res
-                    this.brandsList = res.page.list
-                    this.brandPage = res.page.currPage
-                    this.brandTotal = res.page.totalCount
+                        that.cacheData[res.page.currPage] = res
+                        that.brandsList = res.page.list
+                        that.brandPage = res.page.currPage
+                        that.brandTotal = res.page.totalCount
                 }
             });
         },
@@ -258,6 +290,14 @@ var vm = new Vue({
         },
         handleReset: function (name) {
             handleResetForm(this, name);
+            this.cacheData = {}
+            this.user= {
+                status: 1,
+                deptName: '',
+                roleIdList: [],
+                brandIdList: [],
+                brandList: []
+            }
         }
     }
 });

+ 190 - 1
statics/css/main.css

@@ -2,6 +2,14 @@ html {
     overflow-x: hidden;
 }
 
+input::-webkit-outer-spin-button,
+input::-webkit-inner-spin-button {
+  -webkit-appearance: none;
+}
+input[type="number"]{
+  -moz-appearance: textfield;
+}
+
 .content-header {
     position: relative;
     padding: 0 0 0px 0px;
@@ -176,8 +184,189 @@ tbody > tr > th {
     display: inline-block;
 }
 
+.c-winput-sm{
+    width :20%;
+    display: inline-block;
+    margin-right: 10px;
+    margin-bottom: 10px;
+    position: relative;
+}
+
+.c-winput-bm{
+    width :80%;
+    display: block;
+}
+
+.fa-times-circle{
+    display: none;
+}
+.c-winput-sm:hover .fa-times-circle{
+    position: absolute;
+    right: -5px;
+    top: -5px;
+    display: inline-block;
+    cursor: pointer;
+    z-index: 55;
+}
+
 .c-btn{
     display: inline-block;
     text-align: center;
     margin-left: 6px;
-}
+}
+
+
+.card-label {
+    text-align: right;
+    vertical-align: middle;
+    float: left;
+    font-size: 12px;
+    color: #495060;
+    line-height: 1;
+    padding: 10px 12px 10px 0;
+    box-sizing: border-box;
+}
+
+.items-ge{
+    width: 60%;
+    border: 1px solid #dddee1;
+    padding: 20px;
+    padding-bottom: 10px;
+}
+
+.item-ge{
+    border-bottom: 1px solid #fafafa;
+    padding-bottom: 10px;
+    margin-bottom: 10px;
+    position: relative;
+}
+
+.item-close{
+    position: absolute;
+    cursor: pointer;
+    right: 0;
+    z-index: 999;
+}
+.item-close .fa-times-circle{
+    display: inline-block;
+    cursor: pointer;
+    width: 20px;
+    height: 20px;
+    font-size: 20px;
+}
+
+
+.t-name{
+    position: relative;
+}
+
+.sp-list{
+    position: absolute;
+    z-index: 9999;
+    left: 52px;
+    top: 37px;
+    background: #fff;
+    min-width: 210px;
+    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
+    border-radius: 4px;
+}
+
+.sp-list li{
+    padding-left: 10px;
+}
+
+.sp-list li:hover{
+    background: #f3f3f3;
+}
+
+.t-val{
+    margin-top: 10px;
+    display: block;
+    position: relative;
+    padding-left: 51px;
+}
+
+.v-name{
+    position: absolute;
+    left: 0;
+}
+
+.add-s{
+    color: #155bd4;
+    cursor: pointer;
+}
+
+.c-table{
+    width: 60%;
+    border: 1px solid #dddee1;
+}
+
+.t-header{
+    display: flex;
+    justify-content: space-around;
+    align-items: center;
+    border-bottom: 1px solid #dddee1;
+    width: 100%;
+}
+
+.t-header>ul{
+    display: flex;
+    justify-content: space-around;
+    align-items: center;
+    width: 60%;
+}
+.t-header .h-val{
+    width: 40%;
+}
+
+.t-content{
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.tc-content{
+    width: 40%;
+    border-right: 1px solid #dddee1;
+}
+
+.tc-content ul{
+    border-left: 1px solid #dddee1;
+    width: 100%;
+}
+
+.tc-content li{
+    display: flex;
+    justify-content: space-around;
+    align-items: center;
+}
+
+.tc-content li:not(:last-of-type){
+    border-bottom: 1px solid #dddee1;
+}
+
+
+.tc-content li span{
+    flex: 1;
+    text-align: center;
+}
+
+.tc-content li>ul{
+    flex: 2;
+}
+
+.tc-content .secend-ul li>ul{
+    flex: 1;
+}
+
+.ip-layout .sub-input{
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+}
+
+.ip-layout .sub-input div{
+    width: 90%;
+}
+

+ 16 - 0
statics/libs/contabs.js

@@ -309,6 +309,22 @@ $(function () {
     // 右移按扭
     $('.J_tabRight').on('click', scrollTabRight);
 
+    // 关闭当前选项卡
+    $('.J_tabCloseItem').on('click',function (e) {
+            $('.page-tabs-content').children("[data-id]").not(":first").each(function (idx,item) {
+                    var target = $('.active.J_menuTab');
+                    console.log(target[0].dataset.id)
+                    if (target[0].dataset.id !=='main') {
+                        target.remove();
+                    }
+            });
+
+            $('.page-tabs-content').children("[data-id]:first").each(function () {
+                $('.J_iframe[data-id="' + $(this).data('id') + '"]').show();
+                $(this).addClass("active");
+            });
+    })
+
     // 关闭全部
     $('.J_tabCloseAll').on('click', function () {
         $('.page-tabs-content').children("[data-id]").not(":first").each(function () {

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
statics/plugins/froala_editor/js/froala_editor.min.js


+ 16 - 0
test.html

@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>Document</title>
+  <style>
+    html,body{
+      width: 100%;
+    }
+  </style>
+</head>
+<body>
+  <video src="https://4dscene.4dage.com/new4dkk/mobile/video/homevideo/v2.mp4" style="width: 100%;" autoplay></video>
+</body>
+</html>

+ 17 - 0
test_czg.html

@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>Document</title>
+  <style>
+    html,body{
+      width: 100%;
+      background: black;
+    }
+  </style>
+</head>
+<body>
+  <video src="https://4dscene.4dage.com/new4dkk/mobile/video/homevideo/v2.mp4" style="width: 100%;" autoplay></video>
+</body>
+</html>