xiaoyong931011
2021-03-17 2eb5989cc052af1537d82e819248fa929fd14d52
分销订单0317
3 files modified
59 ■■■■ changed files
zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoSettingAction.java 12 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-order.html 2 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-setting.html 45 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoSettingAction.java
@@ -15,11 +15,9 @@
import com.matrix.system.fenxiao.service.FenXiaoSettingService;
import com.matrix.system.fenxiao.vo.FenXiaoSettingVo;
import com.matrix.system.hive.action.util.QueryUtil;
import com.matrix.system.hive.bean.ShoppingGoods;
import com.matrix.system.hive.dao.ShoppingGoodsDao;
import com.matrix.system.shopXcx.bean.ShopProduct;
import com.matrix.system.shopXcx.dao.ShopProductDao;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -96,10 +94,14 @@
                               idsList.add(parseInt);
                           }
                       }
                       List<ShoppingGoods> list = shoppingGoodsDao.selectByIds(idsList);
                       result.putInMap("order", list);
                       //List<ShoppingGoods> list = shoppingGoodsDao.selectByIds(idsList);
                       List<ShopProduct> shopProducts = shopProductDao.selectByIds(idsList);
                       result.putInMap("order", shopProducts);
                   }
               }
               }else{
                   List<ShopProduct> shopProducts = new ArrayList<>();
                   result.putInMap("order", shopProducts);
               }
           }
       }
       return result;
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-order.html
@@ -468,6 +468,7 @@
                    callback: function (data) {
                        _this.orderLevelList.rows = data.rows;
                        _this.orderLevelList.total = data.total;
                        _this.loadFenxiaoOrderBasic();
                    }
                });
            },
@@ -518,6 +519,7 @@
                    callback: function (data) {
                        _this.fxyList.rows = data.rows;
                        _this.fxyList.total = data.total;
                        _this.loadFenxiaoOrderBasic();
                    }
                });
            },
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-setting.html
@@ -19,7 +19,7 @@
<div class="ibox-content" id="app" v-cloak>
    <el-form label-width="120px" >
        <el-row>
            <p class="el-big-title">分享设置</p>
            <p class="el-big-title">分销设置</p>
        </el-row>
        <el-row style="margin-top: 20px;">
            <el-col>
@@ -118,7 +118,7 @@
        <el-drawer
                title="业绩设置"
                title="分销产品"
                :visible.sync="drawer"
                :direction="direction"
                size="90%"
@@ -199,29 +199,29 @@
                                :stripe="true"
                                :border="true"
                                :height="tableHeight"
                                :data="order.items"
                                :data="order"
                                style="width: 100%">
                            <el-table-column
                                    type="index"
                                    width="50">
                            </el-table-column>
                            <el-table-column
                                    prop="ShopProduct.id"
                                    prop="id"
                                    width="280"
                                    label="产品ID">
                            </el-table-column>
                            <el-table-column
                                    prop="ShopProduct.title"
                                    prop="title"
                                    width="280"
                                    label="产品名称">
                            </el-table-column>
                            <el-table-column
                                    prop="ShopProduct.attrValues"
                                    prop="attrValues"
                                    width="80"
                                    label="产品属性">
                            </el-table-column>
                            <el-table-column
                                    prop="ShopProduct.price"
                                    prop="price"
                                    label="单价">
                            </el-table-column>
                            <el-table-column
@@ -268,10 +268,7 @@
            //业绩设置框
            drawer: false,
            direction: 'rtl',
            order: {
                items: [
                ],
            },
            order: [],
            tableHeight: 500,
            /*****搜索表格数据*********/
            //搜索关键词
@@ -328,8 +325,7 @@
                        }
                        _this.shfs = data.mapInfo.shfs;
                        _this.sqtj = data.mapInfo.sqtj;
                        //_this.order.items = data.mapInfo.order;
                        //console.log(_this.order.items);
                        _this.order = data.mapInfo.order;
                    }
                });
            },
@@ -345,19 +341,20 @@
                //判断是否被选中
                let selected = false;
                this.order.items.forEach(item => {
                    if (item.ShopProduct.id == goods.id) {
                for(let i = 0; i < this.order.length; i++){
                    if (this.order[i].id === goods.id) {
                        selected = true;
                        return;
                    }
                });
                }
                alert(selected);
                if (!selected) {
                    //未选中产品加入列表
                    let item = {};
                    item.ShopProduct = goods;
                    item.goodsId = goods.id;
                    item.count = 1;
                    this.order.items.push(item);
                    this.order.push(item.ShopProduct);
                }
            },
@@ -375,9 +372,9 @@
            submitOrder(submitType) {
                let _this = this;
                let submitDate ="";
                for (let i = 0; i < _this.order.items.length; i++) {
                    let goods = _this.order.items[i];
                    let goodsId = goods.id;
                for (let i = 0; i < _this.order.length; i++) {
                    let ShopProduct = _this.order[i];
                    let goodsId = ShopProduct.id;
                    submitDate = submitDate +goodsId+",";
                }
                alert(submitDate);
@@ -389,9 +386,6 @@
             */
            chouseGoods() {
                let _this = this;
                // this.multipleSelection.forEach(item => {
                //     _this.pushToSelectGoods(item, BUY_TYPE_NOT_FREE);
                // });
                this.closeXm();
            },
            /**
@@ -404,10 +398,8 @@
             * 删除组合产品
             */
            removeItem(index, row) {
                this.order.items.splice(index, 1);
                this.order.splice(index, 1);
            },
            /**
             * 搜索项目绑定的产品信息
             */
@@ -421,7 +413,6 @@
                        contentType: 'application/x-www-form-urlencoded',
                        //TODO 优化下拉加载
                        data: {name: _this.queryKey, limit: 10000},
                        //url: basePath + "/admin/shoppinggoods/showList",
                        url: basePath + "/fenXiao/ruleSetting/selectProduct",
                        callback: function (data) {
                            _this.searchTableData = data.rows;