|  |  | 
 |  |  | <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> | 
 |  |  | 
 |  |  |                             <el-radio-group v-model="paramSettingOne.paramValue"> | 
 |  |  |                                 <el-radio v-model="paramSettingOne.paramValue" :label="'1'">开启分销</el-radio> | 
 |  |  |                                 <el-radio v-model="paramSettingOne.paramValue" :label="'2'">关闭分销</el-radio> | 
 |  |  |                             </el-radio-group> | 
 |  |  |                         </el-col> | 
 |  |  |                     </el-form-item > | 
 |  |  |                 </template> | 
 |  |  |             </el-col> | 
 |  |  |         </el-row> | 
 |  |  |  | 
 |  |  |         <el-row style="margin-top: 20px;"> | 
 |  |  |             <el-col> | 
 |  |  |                 <template v-for="paramSettingzgfy in zgfy"> | 
 |  |  |                     <el-form-item> | 
 |  |  |                         <span slot="label">{{paramSettingzgfy.paramName}}</span> | 
 |  |  |                         <el-col> | 
 |  |  |                             <el-radio-group v-model="paramSettingzgfy.paramValue"> | 
 |  |  |                                 <el-radio :label="'1'">是</el-radio> | 
 |  |  |                                 <el-radio :label="'2'">否</el-radio> | 
 |  |  |                             </el-radio-group> | 
 |  |  |                         </el-col> | 
 |  |  |                     </el-form-item > | 
 |  |  | 
 |  |  |             </el-col> | 
 |  |  |         </el-row> | 
 |  |  |  | 
 |  |  |         <el-row v-show="isShow" style="margin-top: 20px;"> | 
 |  |  |         <el-row style="margin-top: 20px;"> | 
 |  |  |             <el-col> | 
 |  |  |                 <template v-for="paramSettingFour in shfs"> | 
 |  |  |                     <el-form-item> | 
 |  |  | 
 |  |  |  | 
 |  |  |  | 
 |  |  |         <el-drawer | 
 |  |  |                 title="业绩设置" | 
 |  |  |                 title="分销产品" | 
 |  |  |                 :visible.sync="drawer" | 
 |  |  |                 :direction="direction" | 
 |  |  |                 size="90%" | 
 |  |  |         > | 
 |  |  |             <el-row > | 
 |  |  |             <el-row style="margin-left: 50px;"> | 
 |  |  |                 <el-col :span="24"> | 
 |  |  |                     <el-row class="vertical  "> | 
 |  |  |                         <el-input class="searchInput" @input="searchGoods()" v-model="queryKey" | 
 |  |  | 
 |  |  |                                     width="50"> | 
 |  |  |                             </el-table-column> | 
 |  |  |                             <el-table-column | 
 |  |  |                                     prop="code" | 
 |  |  |                                     label="产品编号" | 
 |  |  |                                     width="100"> | 
 |  |  |                                     prop="id" | 
 |  |  |                                     label="ID"> | 
 |  |  |                             </el-table-column> | 
 |  |  |  | 
 |  |  |                             <el-table-column | 
 |  |  |                                     prop="name" | 
 |  |  |  | 
 |  |  |                                     prop="title" | 
 |  |  |                                     label="产品名称"> | 
 |  |  |                             </el-table-column> | 
 |  |  |  | 
 |  |  |                             <el-table-column | 
 |  |  |                                     prop="sealPice" | 
 |  |  |                                     label="售价"> | 
 |  |  |                                     prop="price" | 
 |  |  |                                     label="价格"> | 
 |  |  |                             </el-table-column> | 
 |  |  |                             <el-table-column | 
 |  |  |                                     prop="goodType" | 
 |  |  |                                     label="类型"> | 
 |  |  |                                     prop="score" | 
 |  |  |                                     label="积分"> | 
 |  |  |                             </el-table-column> | 
 |  |  |                             <el-table-column | 
 |  |  |                                     prop="cateName" | 
 |  |  |                                     label="分类"> | 
 |  |  |                                     prop="attrValues" | 
 |  |  |                                     label="产品属性"> | 
 |  |  |                             </el-table-column> | 
 |  |  |                             <el-table-column | 
 |  |  |                                     label="是否上架"> | 
 |  |  |                                 <template slot-scope="scope"> | 
 |  |  |                                     <span v-if="scope.row.status == 1">是</span> | 
 |  |  |                                     <span v-if="scope.row.status == 2">否</span> | 
 |  |  |                                 </template> | 
 |  |  |                             </el-table-column> | 
 |  |  |                             <el-table-column | 
 |  |  |                                     width="150" | 
 |  |  | 
 |  |  |                                 :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="shoppingGoods.code" | 
 |  |  |                                     label="产品编号" | 
 |  |  |                                     width="100"> | 
 |  |  |                                     prop="id" | 
 |  |  |                                     width="280" | 
 |  |  |                                     label="产品ID"> | 
 |  |  |                             </el-table-column> | 
 |  |  |  | 
 |  |  |                             <el-table-column | 
 |  |  |                                     prop="shoppingGoods.name" | 
 |  |  |                                     prop="title" | 
 |  |  |                                     width="280" | 
 |  |  |                                     label="产品名称"> | 
 |  |  |                             </el-table-column> | 
 |  |  |                             <el-table-column | 
 |  |  |                                     prop="shoppingGoods.goodType" | 
 |  |  |                                     prop="attrValues" | 
 |  |  |                                     width="80" | 
 |  |  |                                     label="产品类型"> | 
 |  |  |                                     label="产品属性"> | 
 |  |  |                             </el-table-column> | 
 |  |  |                             <el-table-column | 
 |  |  |                                     prop="shoppingGoods.sealPice" | 
 |  |  |                                     prop="price" | 
 |  |  |                                     label="单价"> | 
 |  |  |                             </el-table-column> | 
 |  |  |                             <el-table-column | 
 |  |  |                                     prop="address" | 
 |  |  |                                     label="操作"> | 
 |  |  |                                 <template slot-scope="scope"> | 
 |  |  |                                     <el-button type="primary" v-if="order.statu!='欠款'" | 
 |  |  |                                     <el-button type="primary" | 
 |  |  |                                                size="mini" | 
 |  |  |                                                @click="removeItem(scope.$index, scope.row)">删除 | 
 |  |  |                                     </el-button> | 
 |  |  | 
 |  |  |             //业绩设置框 | 
 |  |  |             drawer: false, | 
 |  |  |             direction: 'rtl', | 
 |  |  |             order: { | 
 |  |  |                 items: [ | 
 |  |  |                 ], | 
 |  |  |             }, | 
 |  |  |             order: [], | 
 |  |  |             tableHeight: 500, | 
 |  |  |             /*****搜索表格数据*********/ | 
 |  |  |             //搜索关键词 | 
 |  |  | 
 |  |  |             sqfs:[], | 
 |  |  |             shfs:[], | 
 |  |  |             sqtj:[], | 
 |  |  |             zgfy:[], | 
 |  |  |         }, | 
 |  |  |         created: function () { | 
 |  |  |             this.loadInfo(); | 
 |  |  | 
 |  |  |                         _this.fxkg = data.mapInfo.fxkg; | 
 |  |  |                         _this.fxms = data.mapInfo.fxms; | 
 |  |  |                         _this.sqfs = data.mapInfo.sqfs; | 
 |  |  |                         _this.zgfy = data.mapInfo.zgfy; | 
 |  |  |                         if(_this.sqfs.length > 0){ | 
 |  |  |                             let paramssqfs = _this.sqfs[0].paramValue; | 
 |  |  |                             if(paramssqfs == 2){ | 
 |  |  | 
 |  |  |                         } | 
 |  |  |                         _this.shfs = data.mapInfo.shfs; | 
 |  |  |                         _this.sqtj = data.mapInfo.sqtj; | 
 |  |  |                         //_this.order.items = data.mapInfo.order; | 
 |  |  |                         //console.log(_this.order.items); | 
 |  |  |                         if (!data.mapInfo.order && data.mapInfo.order != null) { | 
 |  |  |                             _this.order = data.mapInfo.order; | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |                 }); | 
 |  |  |             }, | 
 |  |  | 
 |  |  |                 this.pushToSelectGoods(row); | 
 |  |  |             }, | 
 |  |  |             pushToSelectGoods(goods) { | 
 |  |  |  | 
 |  |  |                 console.log(this.order) | 
 |  |  |                 //判断是否被选中 | 
 |  |  |                 let selected = false; | 
 |  |  |                 this.order.items.forEach(item => { | 
 |  |  |                     if (item.shoppingGoods.id == goods.id) { | 
 |  |  |                 for(let i = 0; i < this.order.length; i++){ | 
 |  |  |                     if (this.order[i].id === goods.id) { | 
 |  |  |                         selected = true; | 
 |  |  |                         return; | 
 |  |  |                     } | 
 |  |  |                 }); | 
 |  |  |                 } | 
 |  |  |                 if (!selected) { | 
 |  |  |                     //未选中产品加入列表 | 
 |  |  |                     let item = {}; | 
 |  |  |                     item.shoppingGoods = goods; | 
 |  |  |                     item.ShopProduct = goods; | 
 |  |  |                     item.goodsId = goods.id; | 
 |  |  |                     item.count = 1; | 
 |  |  |                     this.order.items.push(item); | 
 |  |  |                     this.order.push(item.ShopProduct); | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |             }, | 
 |  |  | 
 |  |  |             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.goodsId; | 
 |  |  |                 for (let i = 0; i < _this.order.length; i++) { | 
 |  |  |                     let ShopProduct = _this.order[i]; | 
 |  |  |                     let goodsId = ShopProduct.id; | 
 |  |  |                     submitDate = submitDate +goodsId+","; | 
 |  |  |                 } | 
 |  |  |                 _this.cpid = submitDate; | 
 |  |  |                 _this.drawer = false | 
 |  |  |                 _this.drawer = false; | 
 |  |  |             }, | 
 |  |  |             /** | 
 |  |  |              * 批量选择产品 | 
 |  |  |              */ | 
 |  |  |             chouseGoods() { | 
 |  |  |                 let _this = this; | 
 |  |  |                 // this.multipleSelection.forEach(item => { | 
 |  |  |                 //     _this.pushToSelectGoods(item, BUY_TYPE_NOT_FREE); | 
 |  |  |                 // }); | 
 |  |  |                 this.closeXm(); | 
 |  |  |             }, | 
 |  |  |             /** | 
 |  |  |              * 行点击事件 | 
 |  |  |              */ | 
 |  |  |             handleClickTableRow(row, event, column) { | 
 |  |  |                 this.$refs.dataTable.toggleRowSelection(row); | 
 |  |  |                 this.pushToSelectGoods(row); | 
 |  |  |             }, | 
 |  |  |             /** | 
 |  |  |              * 删除组合产品 | 
 |  |  |              */ | 
 |  |  |             removeItem(index, row) { | 
 |  |  |                 this.order.items.splice(index, 1); | 
 |  |  |                 this.order.splice(index, 1); | 
 |  |  |             }, | 
 |  |  |  | 
 |  |  |  | 
 |  |  |             /** | 
 |  |  |              * 搜索项目绑定的产品信息 | 
 |  |  |              */ | 
 |  |  | 
 |  |  |                         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; | 
 |  |  |                             _this.loading = false; | 
 |  |  | 
 |  |  |                     } | 
 |  |  |                     submitDate.push(obj); | 
 |  |  |                 } | 
 |  |  |                 for (let i = 0; i < _this.zgfy.length; i++) { | 
 |  |  |                     let paramSetting = _this.zgfy[i]; | 
 |  |  |                     let paramCode = paramSetting.paramCode; | 
 |  |  |                     let paramValue = paramSetting.paramValue; | 
 |  |  |                     let paramValue1 = paramSetting.paramValue1; | 
 |  |  |                     let paramValue2 = paramSetting.paramValue2; | 
 |  |  |  | 
 |  |  |                     let obj = { | 
 |  |  |                         paramCode: paramCode, | 
 |  |  |                         paramValue: paramValue, | 
 |  |  |                         paramValue1: paramValue1, | 
 |  |  |                         paramValue2: paramValue2, | 
 |  |  |                     } | 
 |  |  |                     submitDate.push(obj); | 
 |  |  |                 } | 
 |  |  |                 for (let i = 0; i < _this.fxms.length; i++) { | 
 |  |  |                     let paramSetting = _this.fxms[i]; | 
 |  |  |                     let paramCode = paramSetting.paramCode; |