|
|
@@ -0,0 +1,489 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div>
|
|
|
+
|
|
|
+ <templateTable
|
|
|
+ :formList="formList"
|
|
|
+ :searchData.sync="queryFrom"
|
|
|
+ :tableConfig="tableConfig"
|
|
|
+ :data="pageResult"
|
|
|
+ @getList="findPage"
|
|
|
+ @handleSearchList="handleSearchList"
|
|
|
+ :pagination="pageData"
|
|
|
+ >
|
|
|
+ <template slot="picture" slot-scope="scope">
|
|
|
+ <img v-if="scope.row.picture" :src='scope.row.picture' class="imageclass" />
|
|
|
+ <span v-else>无</span>
|
|
|
+ </template>
|
|
|
+ <!-- <template slot="operate" slot-scope="scope">
|
|
|
+ <el-button type="primary" size="small" @click="examine(scope.row)">审核</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="examine(scope.row)">上传</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="examine(scope.row)">操作记录</el-button>
|
|
|
+ </template> -->
|
|
|
+ </templateTable>
|
|
|
+ </div>
|
|
|
+ <el-dialog
|
|
|
+ title="上传转账截图"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="30%"
|
|
|
+ :before-close="handleClose">
|
|
|
+ <div>
|
|
|
+ <el-upload
|
|
|
+ class="upload-demo"
|
|
|
+ action="#"
|
|
|
+ :auto-upload="false"
|
|
|
+ :show-file-list="false"
|
|
|
+ list-type="picture-card"
|
|
|
+ ref="upload1"
|
|
|
+ :on-change="drivingupload"
|
|
|
+ :limit="1"
|
|
|
+ accept=".png, .jpg, .jpeg">
|
|
|
+ <!-- <i class="el-icon-plus"></i> -->
|
|
|
+ <img v-if="imageUrl" :src="imageUrl" class="avatar">
|
|
|
+ <i v-else class="el-icon-plus"></i>
|
|
|
+ <div slot="tip" class="el-upload__tip">请上传线下转账记录</div>
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="small" @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="onDrivingupload">确 定</el-button>
|
|
|
+ </span>
|
|
|
+</el-dialog>
|
|
|
+<el-dialog
|
|
|
+ title="操作记录"
|
|
|
+ :visible.sync="operationdialogVisible"
|
|
|
+ width="50%"
|
|
|
+ :before-close="handleClose">
|
|
|
+ <div>
|
|
|
+ <el-table
|
|
|
+ :data="operationtableData"
|
|
|
+ border
|
|
|
+ style="width: 100%">
|
|
|
+ <el-table-column
|
|
|
+ prop="userId"
|
|
|
+ label="工号">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="createBy"
|
|
|
+ label="操作人">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="deptName"
|
|
|
+ label="机构名称"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="sumpremium"
|
|
|
+ label="总保费">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="extractFee"
|
|
|
+ label="总保费抽成费用">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="historyFee"
|
|
|
+ label="已提现抽成费用">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="cashFee"
|
|
|
+ label="可提现抽成费用">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="small" @click="operationdialogVisible = false">取 消</el-button>
|
|
|
+ </span>
|
|
|
+</el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import templateTable from "../../components/TemplateTable/index.vue";
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ templateTable,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ imageUrl:'',
|
|
|
+ operationdialogVisible:false,
|
|
|
+ operationtableData:[],
|
|
|
+ formList: [
|
|
|
+
|
|
|
+ {
|
|
|
+ label: "名称",
|
|
|
+ prop: "userId",
|
|
|
+ type: "select",
|
|
|
+ options:[]
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ btnGroup: [
|
|
|
+ {
|
|
|
+ name: "新增",
|
|
|
+ click: (row, index) => { return this.handleAddButton() },
|
|
|
+
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ useroption:[],
|
|
|
+ deptoption:[],
|
|
|
+ statusoption:[
|
|
|
+ {
|
|
|
+ label:'未审核',
|
|
|
+ value:0
|
|
|
+ },{
|
|
|
+ label:'审核通过',
|
|
|
+ value:'1'
|
|
|
+ },{
|
|
|
+ label:'审核驳回',
|
|
|
+ value:'2'
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ tableConfig: {
|
|
|
+ columns: [
|
|
|
+ // 数据列
|
|
|
+ { prop: "userId", label: "工号", type: "text" },
|
|
|
+ {
|
|
|
+ prop: "userName",
|
|
|
+ label: "名称",
|
|
|
+ type: "text",
|
|
|
+ },
|
|
|
+ { prop: "deptId", label: "机构id", type: "text" },
|
|
|
+
|
|
|
+ { prop: "deptName", label: "机构名称", type: "text" },
|
|
|
+ { name: "picture", label: "转账图片", type: "slot" },
|
|
|
+ { prop: "proportional", label: "抽成比例", type: "text" },
|
|
|
+ { prop: "status", label: "审核状态", type: "statMap",options:[
|
|
|
+ {
|
|
|
+ label:'未审核',
|
|
|
+ value:'0'
|
|
|
+ },{
|
|
|
+ label:'审核通过',
|
|
|
+ value:'1'
|
|
|
+ },{
|
|
|
+ label:'审核驳回',
|
|
|
+ value:'2'
|
|
|
+ },
|
|
|
+ ] },
|
|
|
+ { prop: "remark", label: "审批意见", type: "text" },
|
|
|
+ { prop: "sumpremium", label: "总保费", type: "text" },
|
|
|
+ { prop: "extractFee", label: "总保费抽成费用", type: "text" },
|
|
|
+ { prop: "historyFee", label: "已提现抽成费用", type: "text" },
|
|
|
+ { prop: "cashFee", label: "可提现抽成费用", type: "text" },
|
|
|
+ { prop: "startTime", label: "提层计算开始时间", type: "text" },
|
|
|
+ ],
|
|
|
+ loading: true,
|
|
|
+ isPaginationShow: true,
|
|
|
+ isShowIndex: true,
|
|
|
+ // operateShow:true,
|
|
|
+ operationWidth:'150',
|
|
|
+ optBtns: [
|
|
|
+ // {
|
|
|
+ // type: "primary",
|
|
|
+ // label: "编辑",
|
|
|
+ // perm: "sys:agent:edit",
|
|
|
+ // icon: "fa fa-edit",
|
|
|
+ // click: (row, index) => {
|
|
|
+ // return this.handleTableEdit(row);
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type: "primary",
|
|
|
+ // label: "删除",
|
|
|
+ // icon: "el-icon-delete",
|
|
|
+ // click: (row, index) => {
|
|
|
+ // return this.handleTableDeleteFlag(row);
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: "确认转账",
|
|
|
+ type:'text',
|
|
|
+ click: (row, index) => {
|
|
|
+ this.dialogVisible=true;
|
|
|
+ this.imageUrl='';
|
|
|
+ this.rowId=row.id
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "primary",
|
|
|
+ label: "审核",
|
|
|
+ type:'text',
|
|
|
+ hide:(row)=>{
|
|
|
+ return row.status=='0'
|
|
|
+ },
|
|
|
+ click: (row, index) => {
|
|
|
+ return this.examine(row);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "primary",
|
|
|
+ label: "操作记录",
|
|
|
+ type:'text',
|
|
|
+ click: (row, index) => {
|
|
|
+ return this.operation(row);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ rules:{
|
|
|
+ proportional: [
|
|
|
+ { required: true, message: '请输入抽成比例', trigger: 'blur' },
|
|
|
+ ],
|
|
|
+ userName: [
|
|
|
+ { required: true, message: '请选择名称', trigger: 'change' }
|
|
|
+ ],
|
|
|
+ suggestId: [
|
|
|
+ { required: true, message: '请选择推荐人', trigger: 'change' }
|
|
|
+ ],
|
|
|
+
|
|
|
+ },
|
|
|
+ pageData: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ totalSize: 0,
|
|
|
+ },
|
|
|
+ formData: {
|
|
|
+ roleId: "20",
|
|
|
+ },
|
|
|
+ queryFrom: {},
|
|
|
+ pageResult: [],
|
|
|
+ dialogTitle: "",
|
|
|
+ dialogVisible: false, // 新增编辑界面是否显示
|
|
|
+ rowId:''
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.findPage();
|
|
|
+
|
|
|
+ this.$api.insCompany.getDeptInfo().then(res=>{
|
|
|
+ if(res.code==200){
|
|
|
+ this.formList.forEach(e=>{
|
|
|
+ if(e.prop=='deptId'){
|
|
|
+ e.options=res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.deptoption=res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.$api.insCompany.getUserInfo().then(res=>{
|
|
|
+ if(res.code==200){
|
|
|
+ this.formList.forEach(e=>{
|
|
|
+ if(e.prop=='userId'){
|
|
|
+ e.options=res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.useroption=res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleClose(done) {
|
|
|
+ this.dialogVisible=false
|
|
|
+ },
|
|
|
+ userChange(val){
|
|
|
+ if(val){
|
|
|
+ this.formData.userId= this.useroption.find(e=>e.name==val).id
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.formData.userId=''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deptChange(val){
|
|
|
+ if(val){
|
|
|
+ this.formData.deptId= this.deptoption.find(e=>e.name==val).id
|
|
|
+ this.formData.comlevel= this.deptoption.find(e=>e.name==val).comlevel
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ this.formData.comlevel=''
|
|
|
+ this.formData.deptId=''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 查询Start
|
|
|
+ queryStaffInfo() {
|
|
|
+ this.findPage();
|
|
|
+ },
|
|
|
+
|
|
|
+ operation(row){
|
|
|
+ this.$api.insCompany
|
|
|
+ .sysAgencyFeeApprovalOperate(row.id)
|
|
|
+ .then((res) => {
|
|
|
+ if(res.code==200){
|
|
|
+ this.operationdialogVisible=true
|
|
|
+ this.operationtableData=res.data
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 右侧列表的方法Start
|
|
|
+ findPage(data) {
|
|
|
+ this.tableConfig.loading = true;
|
|
|
+ this.$api.insCompany
|
|
|
+ .sysAgencyFeeApprovalPage({
|
|
|
+ ...this.pageData,
|
|
|
+ ...data,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.tableConfig.loading = false;
|
|
|
+ res.data.content.forEach(val=>{
|
|
|
+ val.picture= val.picture?process.env.BASE_URL+val.picture:null
|
|
|
+ })
|
|
|
+ this.pageResult = res.data.content;
|
|
|
+ this.pageData.pageNum = res.data.pageNum;
|
|
|
+ this.pageData.pageSize = res.data.pageSize;
|
|
|
+ this.pageData.totalSize = res.data.totalSize;
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ handleSearchList(data) {
|
|
|
+ this.findPage(data);
|
|
|
+ },
|
|
|
+ // 提现
|
|
|
+ handleWithdrawal(params){
|
|
|
+ this.$api.sysAgencyFeeApprovalCon
|
|
|
+ .agencyQueryById(params.id)
|
|
|
+ .then((res) => {
|
|
|
+ if(res.code==200){
|
|
|
+ this.dialogTitle = "编辑";
|
|
|
+ this.dialogVisible= true
|
|
|
+ this.formData=res.data
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ examine(params){
|
|
|
+ this.$prompt('是否审核通过,输入驳回原因', '提示', {
|
|
|
+ confirmButtonText: '审核驳回',
|
|
|
+ cancelButtonText: '审核通过',
|
|
|
+ inputPattern: /^.+$/,
|
|
|
+ distinguishCancelAndClose: true,
|
|
|
+ inputErrorMessage: '输入驳回原因!'
|
|
|
+ }).then(({ value }) => {
|
|
|
+ this.$api.insCompany
|
|
|
+ .sysAgencyFeeApprovalEdit({ id: params.id, status: '2', remark: value }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.findPage();
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '审核驳回通过'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch((action) => {
|
|
|
+ if (action === 'cancel') {
|
|
|
+ this.$api.insCompany
|
|
|
+ .sysAgencyFeeApprovalEdit({id: params.id, status: '1', }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.findPage();
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '审核通过'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //编辑
|
|
|
+ async handleTableEdit(params) {
|
|
|
+ this.$api.insCompany
|
|
|
+ .agencyQueryById(params.id)
|
|
|
+ .then((res) => {
|
|
|
+ if(res.code==200){
|
|
|
+ this.dialogTitle = "编辑";
|
|
|
+ this.dialogVisible= true
|
|
|
+ this.formData=res.data
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 删除单个人员
|
|
|
+ handleTableDeleteFlag(data) {
|
|
|
+ this.$confirm("确认删除?")
|
|
|
+ .then(() => {
|
|
|
+ this.$api.insCompany.sysPartnerDel(data.id ).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: "删除成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.findPage();
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+ //添加人员
|
|
|
+ handleAddButton() {
|
|
|
+ this.dialogTitle = "新增";
|
|
|
+ this.formData={}
|
|
|
+ this.dialogVisible = true;
|
|
|
+ if(this.$refs["formData"]){
|
|
|
+ this.$refs["formData"].resetFields();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleDialogBefore(done) {
|
|
|
+ // 退出对话框之前确认提示
|
|
|
+ this.$confirm("确认关闭?")
|
|
|
+ .then((_) => {
|
|
|
+ done();
|
|
|
+ })
|
|
|
+ .catch((_) => {});
|
|
|
+ },
|
|
|
+ closeDialog() {
|
|
|
+ // 清空数据
|
|
|
+ this.deptInfo = {};
|
|
|
+ this.dialogVisible = false;
|
|
|
+ },
|
|
|
+ drivingupload(file,row) {
|
|
|
+ let file1 = file.raw;
|
|
|
+ let files = window.URL.createObjectURL(file1); //转临时路径
|
|
|
+ this.imageUrl = files;
|
|
|
+ const params = new FormData(); // 声明formData数据类型
|
|
|
+ params.append("multipartFile", file1);
|
|
|
+ params.append("type", "image");
|
|
|
+ this.$api.letter.uploadFile(params).then((res) => {
|
|
|
+ if (res.code == "200") {
|
|
|
+ this.pictureUrl=res.data.url
|
|
|
+ this.$refs.upload1.clearFiles();
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onDrivingupload(){
|
|
|
+ this.$api.insCompany
|
|
|
+ .sysAgencyFeeApprovalCon( {id:this.rowId, picture:this.pictureUrl})
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg || "保存成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ this.dialogVisible=false;
|
|
|
+ this.findPage();
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 下一步
|
|
|
+
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.upload-demo{
|
|
|
+ display: inline-block;
|
|
|
+ margin-left: 5px;
|
|
|
+}
|
|
|
+.avatar{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+</style>
|