xiaoyong931011
2021-03-14 000e2719d57fd6cfc94fb340730ab3722d6c47cb
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html
@@ -74,14 +74,11 @@
                                        type="selection">
                                </el-table-column>
                                <el-table-column
                                        label="头像" width="100">
                                        label="分销员">
                                    <template slot-scope="scope">
                                        <img :src="scope.row.avatarUrl" width="40" height="40" class="head_pic"/>
                                        {{scope.row.nickname}}
                                    </template>
                                </el-table-column>
                                <el-table-column
                                        prop="nickname"
                                        label="分销员" width="100">
                                </el-table-column>
                                <el-table-column
                                        prop="parentUser"
@@ -114,6 +111,7 @@
                                        <span v-if="scope.row.applyStatus == 1">待审核</span>
                                        <span v-if="scope.row.applyStatus == 2">通过</span>
                                        <span v-if="scope.row.applyStatus == 3">未通过</span>
                                        <span v-if="scope.row.applyStatus == 4">系统删除</span>
                                    </template>
                                </el-table-column>
                                <el-table-column
@@ -128,8 +126,10 @@
                                <el-table-column label="操作" width="240">
                                    <template slot-scope="scope">
                                        <el-row style="display:flex;">
                                            <el-button type="primary" size="mini" @click="openExamineSaleManApply(scope.row)">审核</el-button>
                                            <el-button type="primary" size="mini" @click="openUpdateSaleManGrade(scope.row)">修改等级</el-button>
                                            <el-button type="primary" v-if="scope.row.applyStatus == 1" size="mini" @click="openExamineSaleManApply(scope.row)">审核</el-button>
                                            <el-button type="primary" v-if="scope.row.applyStatus == 2" size="mini" @click="openUpdateSaleManGrade(scope.row)">修改等级</el-button>
                                            <el-button type="primary" size="mini" @click="openUpdateSaleManGrade(scope.row)">详情</el-button>
                                            <el-button type="primary" v-if="scope.row.applyStatus == 2" size="mini" @click="delSaleManGradeApply(scope.row)">删除</el-button>
                                        </el-row>
                                    </template>
                                </el-table-column>
@@ -147,6 +147,7 @@
                        </el-pagination>
                    </el-row>
                </el-tab-pane>
                <el-tab-pane label="分佣方案" name="second">
                    <template>
                        <el-table
@@ -185,6 +186,7 @@
                        </el-table>
                    </template>
                </el-tab-pane>
                <el-tab-pane label="推广文案" name="third">
                    <el-row>
                        <script style="width: 100%; height: 500px" id="description" name="description"
@@ -348,7 +350,7 @@
            },
            search:function(){
                this.fxyList.currentPage=1;
                this.loadInfo();
                this.loadParamSetting();
            },
            keydown(evt){
                if(evt.keyCode==13) {
@@ -366,16 +368,16 @@
                        this.form.order="asc";
                    }
                    this.form.sort=column.prop;
                    this.loadInfo();
                    this.loadParamSetting();
                }
            },
            changePageSize(val) {
                this.table.pageSize = val;
                this.loadData();
                this.loadParamSetting();
            },
            changeCurrentPage(val) {
                this.table.currentPage = val;
                this.loadData();
                this.loadParamSetting();
            },
            //时间格式化
            formatDate(row,column){
@@ -396,7 +398,46 @@
                    content : [ basePath + '/admin/redirect/fenxiao/fenxiao-apply']
                }));
            },
            //修改等级
            //删除
            delSaleManGradeApply(row){
                this.$confirm('是否删除?', '删除', {
                    distinguishCancelAndClose: true,//设置关闭按钮和不通过按钮的区别
                    confirmButtonText: '确认',
                    cancelButtonText: '取消',
                    type: 'info'
                }).then(() => {
                    //通过
                    this.examineDelSaleManGradeApply(row);
                }).catch(action => {
                    //不通过
                    if(action === 'cancel'){
                        console.log("cancel");
                    }else{
                        //关闭按钮
                        console.log("close");
                        //this.$message({type: 'info',message: ''})
                    }
                });
            },
            examineDelSaleManGradeApply(row){
                let _this = this;
                let userId = row.userId;
                let id = row.id;
                let obj = {
                    userId: userId,
                    applyId: id,
                }
                AjaxProxy.requst({
                    app: _this,
                    data:obj,
                    url: basePath + '/fenXiao/fenXiaoUser/delSaleManGradeApply',
                    callback: function (data) {
                        _this.$message.success(data.info);
                        this.loadParamSetting();
                    }
                });
            },
            //修改等级跳转
            openUpdateSaleManGrade(row){
                layer.full(layer.open({
                    type: 2,
@@ -440,7 +481,7 @@
                    url: basePath + '/fenXiao/fenXiaoUser/examineSaleManApply',
                    callback: function (data) {
                        _this.$message.success(data.info);
                        this.loadData();
                        this.loadParamSetting();
                    }
                });
            },