jyy
2021-03-19 382794b20c47d0f74317b2ac5bb7b6849986166f
积分商城7
6 files modified
138 ■■■■ changed files
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java 8 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSku.java 22 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/config/db/increment/推广员.sql 4 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/config/db/increment/美度业绩升级.sql 2 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopSkuDao.xml 22 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-form.html 80 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java
@@ -69,12 +69,4 @@
    }
}
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSku.java
@@ -64,10 +64,13 @@
    private Integer score;
    /**
     * 积分兑换价格
     * 积分兑换所需支付金额
     */
    private Integer scorePrice;
    private BigDecimal scorePrice;
    /**
     * 积分兑换所需支付积分
     */
    private Integer scoreCount;
    /**
@@ -96,6 +99,15 @@
    @Extend
    private String goodsName;
    public Integer getScoreCount() {
        return scoreCount;
    }
    public void setScoreCount(Integer scoreCount) {
        this.scoreCount = scoreCount;
    }
    public BigDecimal getSealesPrice() {
        return sealesPrice;
@@ -256,11 +268,11 @@
        this.goodsName = goodsName;
    }
    public Integer getScorePrice() {
    public BigDecimal getScorePrice() {
        return scorePrice;
    }
    public void setScorePrice(Integer scorePrice) {
    public void setScorePrice(BigDecimal scorePrice) {
        this.scorePrice = scorePrice;
    }
zq-erp/src/main/resources/config/db/increment/推广员.sql
@@ -194,5 +194,7 @@
update shop_product set able_score_pay=1;
update shop_product set able_sales=2;
ALTER TABLE `shop_sku`
    MODIFY COLUMN `score_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '兑换所需支付价格' AFTER `invitation_price`,
    ADD COLUMN `score_count` decimal(10, 2) NULL COMMENT '兑换所需积分数量' AFTER `score_price`;
zq-erp/src/main/resources/config/db/increment/美度业绩升级.sql
@@ -11,3 +11,5 @@
ALTER TABLE `sys_order_item`
    ADD COLUMN `refundCount` int(11) NULL COMMENT '退款数量' AFTER `pay_method_detail`;
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopSkuDao.xml
@@ -25,6 +25,7 @@
        <result property="sealesPrice" column="seales_price"/>
        <result property="invitationPrice" column="invitation_price"/>
        <result property="scorePrice" column="score_price"/>
        <result property="scoreCount" column="score_count"/>
@@ -52,6 +53,7 @@
        <result property="sealesPrice" column="seales_price"/>
        <result property="invitationPrice" column="invitation_price"/>
        <result property="scorePrice" column="score_price"/>
        <result property="scoreCount" column="score_count"/>
    </resultMap>
    <!-- 字段sql -->
@@ -75,7 +77,9 @@
            shop_id,
seales_price,
invitation_price,
        score_price
        score_price,
score_count
    </sql>
@@ -100,7 +104,8 @@
            #{item.shopId},
            #{item.sealesPrice},
            #{item.invitationPrice},
            #{item.scorePrice}
            #{item.scorePrice},
            #{item.scoreCount}
    </sql>
@@ -145,6 +150,11 @@
            <if test="(record.scorePrice!=null and record.scorePrice!='') or  (record.scorePrice!='' and record.scorePrice==0)  ">
                and score_price = #{record.scorePrice}
            </if>
            <if test="(record.scoreCount!=null and record.scoreCount!='') or  (record.scoreCount!='' and record.scoreCount==0)  ">
                and score_count = #{record.scoreCount}
            </if>
@@ -220,6 +230,10 @@
                score_price = #{scorePrice},
            </if>
            <if test="_parameter.containsKey('scoreCount')">
                score_count = #{scoreCount},
            </if>
        </set>
        WHERE id=#{id}
@@ -275,6 +289,10 @@
                score_price = #{record.scorePrice},
            </if>
            <if test="record.scoreCount != null ">
                score_count = #{record.scoreCount},
            </if>
        </set>
        WHERE id=#{record.id}
zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-form.html
@@ -144,42 +144,7 @@
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">是否为服务项目
                                </label>
                                <div class="col-sm-4">
                                    <select th:field="${obj.isService}" class="form-control " size="1"
                                            name="isService"
                                            id="isService" style="width: 100%">
                                        <option value="2" th:selected="${obj.isService == '2'}">否</option>
                                        <option value="1" th:selected="${obj.isService == '1'}">是</option>
                                        </option>
                                    </select>
                                </div>
                                <label class="col-sm-2 control-label">服务时长
                                </label>
                                <div class="col-sm-4">
                                    <input autocomplete="off"   type="text" class="form-control" name="serviceTime"
                                           maxLength="50"
                                           th:value="${obj.serviceTime}" >
                                </div>
                            </div>
                            <!--<div class="form-group">
                                <label class="col-sm-2 control-label">真实销量
                                </label>
                                <div class="col-sm-4">
                                    <input autocomplete="off"   type="text" class="form-control" name="rsVolume"
                                           th:value="${obj.rsVolume}" errormsg="请填写数字">
                                </div>
                            </div>-->
                            <div class="form-group">
                                <label class="col-sm-2 control-label">属性设置 </label>
                                <input autocomplete="off"     name="attrs" id="attrs" type="hidden" >
@@ -258,6 +223,7 @@
                                    <th>排序</th>
                                    <th>推广提成</th>
                                    <th>邀请提成</th>
                                    <th>兑换所需金额</th>
                                    <th>兑换所需积分</th>
                                    <th>操作</th>
                                </tr>
@@ -387,6 +353,8 @@
        <input autocomplete="off"   type="hidden" class="form-control" name="erpGoodsCode">
    </div></td>
    <td><input autocomplete="off"   type="text" class="form-control" name=""></td>
        <td><input autocomplete="off"   type="text" class="form-control" name=""></td>
        <td><input autocomplete="off"   type="text" class="form-control" name=""></td>
        <td><input autocomplete="off"   type="text" class="form-control" name=""></td>
        <td><input autocomplete="off"   type="text" class="form-control" name=""></td>
    <td><i class="fa fa-trash form-control-static" onclick="delThis('trId')"></i></td>
@@ -573,6 +541,10 @@
            if (scorePrice == null || typeof scorePrice == 'undefined') {
                scorePrice = "";
            }
 var scoreCount = shopSkus[c].scoreCount;
            if (scoreCount == null || typeof scoreCount == 'undefined') {
                scoreCount = "";
            }
            var html=
@@ -590,6 +562,7 @@
                +'<td><input autocomplete="off"   type="text" class="form-control"  value="'+sealesPrice+'" name=""></td>'
                +'<td><input autocomplete="off"   type="text" class="form-control"  value="'+invitationPrice+'" name=""></td>'
                +'<td><input autocomplete="off"   type="text" class="form-control"  value="'+scorePrice+'" name=""></td>'
                +'<td><input autocomplete="off"   type="text" class="form-control"  value="'+scoreCount+'" name=""></td>'
                +'<td><i class="fa fa-trash form-control-static"    onclick="delThis(\''+trId+'\')"></i></td>'
                +'</tr>';
            $("#skutable").find("tbody").append(html);
@@ -653,10 +626,6 @@
                    layer.msg(result.info, {
                        icon : 2,
                        time : 1000,
                        end:function(){
                            parent.myGrid.serchData();
                            MTools.closeForm()
                        }
                    });
                    return null;
                }
@@ -776,72 +745,75 @@
            if (i != 0) {
                var tds = $(this).find("td");
                var length = tds.length - 1;
                var id = tds.eq(length - 11).find("input").val();
                var id = tds.eq(length - 12).find("input").val();
                if(id == null){
                    id ="";
                }
                sku.id = id;
                //规格名称
                var name = tds.eq(length - 10).find("input").val();
                var name = tds.eq(length - 11).find("input").val();
                if(name == null){
                    name = "";
                }
                sku.name = name;
                //图片地址
                var path = tds.eq(length - 9).find("img").attr("src");
                var path = tds.eq(length - 10).find("img").attr("src");
                if(path == null){
                    path = "";
                }
                sku.imgPath = path;
                //库存
                var stock = tds.eq(length - 8).find("input").val();
                var stock = tds.eq(length - 9).find("input").val();
                if(stock == ""){
                    stock = 0;
                }
                sku.stock = stock;
                //价格
                var price = tds.eq(length -7).find("input").val();
                var price = tds.eq(length -8).find("input").val();
                if(price == ""){
                    price =0;
                }
                sku.price = price;
                //积分
                var score = tds.eq(length - 6).find("input").val();
                var score = tds.eq(length - 7).find("input").val();
                if(score == ""){
                    score = 0;
                }
                sku.score = score;
                //品种编码
                var stockCode = tds.eq(length - 5).find("input").val();
                var stockCode = tds.eq(length - 6).find("input").val();
                if(stockCode == null || typeof stockCode == 'undefined'){
                    stockCode = '';
                }
                sku.stockCode = stockCode;
                //排序
                var sort = tds.eq(length - 4).find("input").val();
                var sort = tds.eq(length - 5).find("input").val();
                if(sort == ""){
                    sort = 0;
                }
                sku.sort = sort;
                //推广提成
                var sealesPrice = tds.eq(length - 3).find("input").val();
                var sealesPrice = tds.eq(length - 4).find("input").val();
                sku.sealesPrice = sealesPrice;
                //邀请提成
                var invitationPrice = tds.eq(length - 2).find("input").val();
                var invitationPrice = tds.eq(length - 3).find("input").val();
                sku.invitationPrice = invitationPrice;
                //兑换所需积分
                var scorePrice = tds.eq(length - 1).find("input").val();
                //兑换所需金额
                var scorePrice = tds.eq(length - 2).find("input").val();
                sku.scorePrice = scorePrice;
                //兑换所需积分
                var scoreCount = tds.eq(length - 1).find("input").val();
                sku.scoreCount = scoreCount;
                skus.push(sku);
            }
@@ -860,7 +832,7 @@
            if (i != 0) {
                var tds = $(this).find("td");
                var length = tds.length - 1;
                var name = tds.eq(length - 10).find("input").val();
                var name = tds.eq(length - 11).find("input").val();
                if(name == ""){
                    layer.msg("请填写规格名称",{
                        icon : 2,
@@ -878,7 +850,7 @@
                    return false;
                }
                var stock = tds.eq(length -8).find("input").val();
                var stock = tds.eq(length -9).find("input").val();
                if(stock == ""){
                    layer.msg("请填写库存",{
                        icon : 2,
@@ -887,7 +859,7 @@
                    flag = true;
                    return false;
                }
                var price = tds.eq(length - 7 ).find("input").val();
                var price = tds.eq(length - 8 ).find("input").val();
                if(price == ""){
                    layer.msg("请填写价格",{
                        icon : 2,