Explorar o código

Merge branch 'dev' of http://www.baoxianzhanggui.com:8090/sxzgd/vue-insagent-pc into dev

yaoyao %!s(int64=2) %!d(string=hai) anos
pai
achega
2e10c78542

+ 0 - 2
src/components/TemplateTable/index.vue

@@ -511,8 +511,6 @@ export default {
       });
     },
     statMaps(list) {
-      console.log(list,9999999);
-
       if (!list) return;
       let obj = {};
       list.forEach((item) => {

+ 6 - 0
src/http/moudules/insCompany.js

@@ -835,4 +835,10 @@ export const sysPartnerEdit = (data) => {
     method: "post",
     data
   })
+}
+export const getPartnerDeptTree = (id) => {
+  return axios({
+    url: '/dept/getPartnerDeptTree',
+    method: "get",
+  })
 }

+ 166 - 201
src/views/PeopleManage/Institutional.vue

@@ -6,136 +6,100 @@
         <SplitArea :size="leftSplitWidth" :minSize="240">
           <div>
             <div>
-              <kt-button
-                style="background-color: #ffc000; border: #ffc000"
-                icon="fa fa-plus"
-                label="新增"
-                type="primary"
-                perms="sys:teamchannel:add"
-                @click="handleAddButton"
-              />
+              <kt-button style="background-color: #ffc000; border: #ffc000" icon="fa fa-plus" label="新增" type="primary"
+                perms="sys:teamchannel:add" @click="handleAddButton" />
             </div>
             <el-divider></el-divider>
-            <el-tree
-              :data="ztreeNodes"
-              :props="{ children: 'children', label: 'name' }"
-              node-key="id"
-              :default-expanded-keys="['9']"
-              @node-click="onZTreeClick"
-            ></el-tree>
+            <el-tree :data="ztreeNodes" :props="{ children: 'children', label: 'name' }" node-key="id"
+              :default-expanded-keys="['9']" @node-click="onZTreeClick"></el-tree>
           </div>
         </SplitArea>
         <!-- 左侧树End -->
 
         <!-- 右侧列表页面Start -->
         <SplitArea :size="rightSplitWidth">
-          <templateTable
-            :searchData.sync="queryFrom"
-            :tableConfig="tableConfig"
-            :data="pageResult"
-            @getList="findPage"
-            @handleSearchList="handleSearchList"
-            :pagination="pageData"
-          >
-          <!-- <template slot="source" slot-scope="scope">
+          <templateTable :searchData.sync="queryFrom" :tableConfig="tableConfig" :data="pageResult" @getList="findPage"
+            @handleSearchList="handleSearchList" :pagination="pageData">
+            <!-- <template slot="source" slot-scope="scope">
               <span>
                     {{ statMaps(scope.row.source) }}</span
                   >
             </template> -->
           </templateTable>
-  </SplitArea>
+        </SplitArea>
         <!-- 右侧列表页面End -->
       </Split>
     </el-main>
     <!-- 新增修改界面 -->
-    <el-dialog
-      :title="dialogTitle"
-      width="40%"
-      :visible.sync="dialogVisible"
-      :close-on-click-modal="false"
-      :before-close="handleDialogBefore"
-      @close="closeDialog"
-      v-dialogDrag
-    >
-          <el-form
-            :model="formData"
-            :rules="rules"
-            ref="formData"
-            :inline="true"
-            label-width="110px"
-            size="small"
-          >
-            <el-row>
-             
-              <el-col :span="12">
-                <el-form-item label="机构编码" prop="deptId">
-                  <el-input v-model="formData.deptId" disabled></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="机构名称" prop="deptName">
-                  <el-input v-model="formData.deptName" disabled></el-input>
-                  <!-- <el-select v-model="formData.deptName" clearable filterable :disabled="dialogTitle=='编辑'" placeholder="选择机构名称" @change="deptChange">
+    <el-dialog :title="dialogTitle" width="40%" :visible.sync="dialogVisible" :close-on-click-modal="false"
+      :before-close="handleDialogBefore" @close="closeDialog" v-dialogDrag>
+      <el-form :model="formData" :rules="rules" ref="formData" :inline="true" label-width="110px" size="small">
+        <el-row>
+
+          <el-col :span="12">
+            <el-form-item label="机构编码" prop="deptId">
+              <el-input v-model="formData.deptId" disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="机构名称" prop="deptName">
+              <el-input v-model="formData.deptName" disabled></el-input>
+              <!-- <el-select v-model="formData.deptName" clearable filterable :disabled="dialogTitle=='编辑'" placeholder="选择机构名称" @change="deptChange">
                 <el-option v-for="(item, index) in deptoption" :key="index" :label="item.name"
                   :value="item.name"></el-option>
               </el-select> -->
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="管理员工号" prop="userId">
-                  <el-input v-model="formData.userId" disabled></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="管理员名称" prop="userName">
-                  <el-select v-model="formData.userName" style="width: 200px;" clearable filterable  placeholder="选择管理员名称" @change="userChange">
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="管理员工号" prop="userId">
+              <el-input v-model="formData.userId" disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="管理员名称" prop="userName">
+              <el-select v-model="formData.userName" style="width: 200px;" clearable filterable placeholder="选择管理员名称"
+                @change="userChange">
                 <el-option v-for="(item, index) in useroption" :key="index" :label="item.name"
                   :value="item.name"></el-option>
               </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="抽成比例" prop="proportional">
-                  <el-input v-model="formData.proportional" placeholder="请输入抽成比例"></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="机构等级" prop="comlevel">
-                  <el-input v-model="formData.comlevel" disabled></el-input>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="业务来源" prop="source">
-                  <!-- <el-input v-model="formData.source" disabled></el-input> -->
-                  <el-select v-model="formData.source" style="width: 200px;"  clearable  placeholder="请选择业务来源" disabled>
-                    <el-option
-                      v-for="val in organizationSourceoptions"
-                      :key="val.dictValue"
-                      :label="val.dictTag"
-                      :value="val.dictValue">
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="12">
-                <el-form-item label="推荐人" prop="suggestId">
-                  <el-select v-model="formData.suggestId" style="width: 200px;" :disabled="isdisabled" @change="suggestChange" clearable  placeholder="请选择推荐人">
-                    <el-option
-                      v-for="val in sysPartnerOption"
-                      :key="val.userId"
-                      :label="val.userName"
-                      :value="val.userId">
-                    </el-option>
-                  </el-select>
-                  
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </el-form>
-        <span slot="footer" class="dialog-footer">
-           <el-button size="small" @click="dialogVisible = false">取 消</el-button>
-          <el-button  type="primary" size="small" @click="submitForm">提交</el-button>
-        </span>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="抽成比例" prop="proportional">
+              <el-input v-model="formData.proportional" placeholder="请输入抽成比例"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="机构等级" prop="comlevel">
+              <el-input v-model="formData.comlevel" disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="业务来源" prop="source">
+              <!-- <el-input v-model="formData.source" disabled></el-input> -->
+              <el-select v-model="formData.source" style="width: 200px;" clearable placeholder="请选择业务来源" disabled>
+                <el-option v-for="val in organizationSourceoptions" :key="val.dictValue" :label="val.dictTag"
+                  :value="val.dictValue">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="推荐人" prop="suggestId">
+              <el-select v-model="formData.suggestId" style="width: 200px;" :disabled="isdisabled" @change="suggestChange"
+                clearable placeholder="请选择推荐人">
+                <el-option v-for="val in sysPartnerOption" :key="val.userId" :label="val.userName" :value="val.userId">
+                </el-option>
+              </el-select>
+
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="submitForm">提交</el-button>
+      </span>
     </el-dialog>
   </div>
 </template>
@@ -150,7 +114,7 @@ export default {
   },
   data() {
     return {
-      isdisabled:false,
+      isdisabled: false,
       ztreeNodes: [],
       leftSplitWidth: 20,
       rightSplitWidth: 80,
@@ -165,7 +129,7 @@ export default {
           label: "名称",
           prop: "userId",
           type: "select",
-          options:[]
+          options: []
         },
         // {
         //   label: "机构id",
@@ -192,7 +156,7 @@ export default {
 
       //   },
       // ],
-      useroption:[],
+      useroption:  [],
       tableConfig: {
         columns: [
           // 数据列
@@ -215,14 +179,14 @@ export default {
             prop: "source",
             label: "业务来源",
             type: "statMap",
-            options:[]
+            options: []
           },
           // { name: "source", label: "业务来源", type: "slot" },
         ],
         loading: true,
         isPaginationShow: true,
         isShowIndex: true,
-        operationWidth:150,
+        operationWidth: 150,
         optBtns: [
           {
             type: "primary",
@@ -243,17 +207,17 @@ export default {
           },
         ],
       },
-      rules:{
+      rules: {
         proportional: [
-            { required: true, message: '请输入抽成比例', trigger: 'blur' },
-          ],
-          userName: [
-            { required: true, message: '请选择名称', trigger: 'change' }
-          ],
-          deptName: [
-            { required: true, message: '请选择机构名称', trigger: 'change' }
-          ],
-         
+          { required: true, message: '请输入抽成比例', trigger: 'blur' },
+        ],
+        userName: [
+          { required: true, message: '请选择名称', trigger: 'change' }
+        ],
+        deptName: [
+          { required: true, message: '请选择机构名称', trigger: 'change' }
+        ],
+
       },
       pageData: {
         pageNum: 1,
@@ -267,69 +231,69 @@ export default {
       pageResult: [],
       dialogTitle: "",
       dialogVisible: false, // 新增编辑界面是否显示
-      sysPartnerOption:[],
-      organizationSourceoptions:[],
-      currentTreeNodeId:""
+      sysPartnerOption: [],
+      organizationSourceoptions: [],
+      currentTreeNodeId: ""
     };
   },
   created() {
     this.findPage();
     this.findLeftTreeData(); // 获取机构树的数据
     this.$api.insCompany.dicType('organizationSource').then((res) => {
-        if (res.code == 200) {
-          this.tableConfig.columns.forEach(e=>{
-          if(e.prop=='source'){
-            e.options=res.data.ddList
+      if (res.code == 200) {
+        this.tableConfig.columns.forEach(e => {
+          if (e.prop == 'source') {
+            e.options = res.data.ddList
           }
         })
-          this.organizationSourceoptions = res.data.ddList;
-        }
-      });
-  
+        this.organizationSourceoptions = res.data.ddList;
+      }
+    });
+
   },
   methods: {
     findLeftTreeData: function () {
-        this.$api.insCompany.getSysDeptTree().then((res) => {
-          // this.treeDataRecursion(res.data, treeTypeNum);
-          this.ztreeNodes = res.data;
-        });
-      },
-      //添加人员
-      handleAddButton() {
+      this.$api.insCompany.getSysDeptTree().then((res) => {
+        // this.treeDataRecursion(res.data, treeTypeNum);
+        this.ztreeNodes = res.data;
+      });
+    },
+    //添加人员
+    handleAddButton() {
       if (this.currentTreeNode == null) {
         this.$message.info("请选择所属公司或部门");
         return;
       }
       if (
         this.currentTreeNode.comlevel != null &&
-          this.currentTreeNode.comlevel !== "5"
+        this.currentTreeNode.comlevel !== "5"
       ) {
         this.$message.info("请选择第五级机构");
         return;
       }
-      this.$api.insCompany.agencyGetUserInfo(this.currentTreeNode.parentId).then(res=>{
-      if(res.code==200){
-        this.formList.forEach(e=>{
-          if(e.prop=='userId'){
-            e.options=res.data
-          }
-        })
-        this.useroption=res.data
-      }
-    })
-    this.$api.insCompany.queryRecommendAndPartner(this.currentTreeNode.parentId).then(res=>{
-      this.sysPartnerOption=res.data
-    })
-    
+      this.$api.insCompany.agencyGetUserInfo(this.currentTreeNode.parentId).then(res => {
+        if (res.code == 200) {
+          this.formList.forEach(e => {
+            if (e.prop == 'userId') {
+              e.options = res.data
+            }
+          })
+          this.useroption = res.data
+        }
+      })
+      this.$api.insCompany.queryRecommendAndPartner(this.currentTreeNode.parentId).then(res => {
+        this.sysPartnerOption = res.data
+      })
+
       this.dialogTitle = "新增";
-      this.formData={
-        deptName:this.currentTreeNode.name,
-        deptId:this.currentTreeNode.id,
-        comlevel:this.currentTreeNode.comlevel,
-        source:this.currentTreeNode.managementSource,
+      this.formData = {
+        deptName: this.currentTreeNode.name,
+        deptId: this.currentTreeNode.id,
+        comlevel: this.currentTreeNode.comlevel,
+        source: this.currentTreeNode.managementSource,
       }
       this.dialogVisible = true;
-      if(this.$refs["formData"]){
+      if (this.$refs["formData"]) {
         this.$refs["formData"].resetFields();
       }
     },
@@ -338,21 +302,21 @@ export default {
       this.currentTreeNode = evt;
       this.pageData.pageNum = 1;
       this.pageData.pageSize = 10;
-      this.currentTreeNodeId=this.currentTreeNode.id
+      this.currentTreeNodeId = this.currentTreeNode.id
       this.findPage();
     },
-    suggestChange(e){
-      this.formData.suggestName=''
-      if(e){
-        this.formData.suggestName=this.sysPartnerOption.find(val=>val.userId==e).userName
+    suggestChange(e) {
+      this.formData.suggestName = ''
+      if (e) {
+        this.formData.suggestName = this.sysPartnerOption.find(val => val.userId == e).userName
       }
     },
-    userChange(val){
-      if(val){
-        this.formData.userId= this.useroption.find(e=>e.name==val).id
+    userChange(val) {
+      if (val) {
+        this.formData.userId = this.useroption.find(e => e.name == val).id
       }
-      else{
-        this.formData.userId=''
+      else {
+        this.formData.userId = ''
       }
     },
     // 查询Start
@@ -360,7 +324,7 @@ export default {
       this.findPage();
     },
 
-    
+
     // 右侧列表的方法Start
     findPage(data) {
       this.tableConfig.loading = true;
@@ -368,7 +332,7 @@ export default {
         .agencyQueryPage({
           ...this.pageData,
           ...data,
-          deptId:this.currentTreeNodeId
+          deptId: this.currentTreeNodeId
         })
         .then((res) => {
           this.tableConfig.loading = false;
@@ -381,12 +345,12 @@ export default {
     statMaps(val) {
       if (!val) return '-';
       let arr = [];
-      val.forEach(item1=>{
+      val.forEach(item1 => {
         this.organizationSourceoptions.forEach((item) => {
-        if(item.dictValue==item1){
-           arr.push(item.dictTag)
-        }
-      });
+          if (item.dictValue == item1) {
+            arr.push(item.dictTag)
+          }
+        });
       })
       return arr.join(',')
 
@@ -396,37 +360,35 @@ export default {
     },
     //编辑
     async handleTableEdit(params) {
-      this.$api.insCompany.agencyGetUserInfo(params.parentId).then(res=>{
-      if(res.code==200){
-        this.formList.forEach(e=>{
-          if(e.prop=='userId'){
-            e.options=res.data
-          }
-        })
-        this.useroption=res.data
-      }
-    })
-    this.$api.insCompany.queryRecommendAndPartner(params.parentId).then(res=>{
-      this.sysPartnerOption=res.data
-    })
+      this.$api.insCompany.agencyGetUserInfo(params.parentId).then(res => {
+        if (res.code == 200) {
+          this.formList.forEach(e => {
+            if (e.prop == 'userId') {
+              e.options = res.data
+            }
+          })
+          this.useroption = res.data
+        }
+      })
+      this.$api.insCompany.queryRecommendAndPartner(params.parentId).then(res => {
+        this.sysPartnerOption = res.data
+      })
       this.$api.insCompany
         .agencyQueryById(params.id)
         .then((res) => {
-          if(res.code==200){
-            this.isdisabled=res.data.suggestId?true:false
+          if (res.code == 200) {
+            this.isdisabled = res.data.suggestId ? true : false
             this.dialogTitle = "编辑";
-            this.dialogVisible= true
-            this.formData=res.data
-            console.log(res.data,33333333);
+            this.dialogVisible = true
+            this.formData = res.data
           }
-
         });
     },
     // 删除单个人员
     handleTableDeleteFlag(data) {
       this.$confirm("确认删除?")
         .then(() => {
-          this.$api.insCompany.agencydel(data.id ).then((res) => {
+          this.$api.insCompany.agencydel(data.id).then((res) => {
             if (res.code == 200) {
               this.$message({
                 message: "删除成功",
@@ -438,7 +400,7 @@ export default {
             }
           });
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     handleDialogBefore(done) {
       // 退出对话框之前确认提示
@@ -446,7 +408,7 @@ export default {
         .then((_) => {
           done();
         })
-        .catch((_) => {});
+        .catch((_) => { });
     },
     closeDialog() {
       // 清空数据
@@ -502,7 +464,7 @@ export default {
       });
     },
     // 下一步
-    
+
   },
 };
 </script>
@@ -524,14 +486,17 @@ export default {
 .queryFrom .queryButton .el-form-item__content {
   margin-left: 0px !important;
 }
+
 .disc {
   -webkit-text-security: disc;
   position: relative;
 }
+
 .none {
   -webkit-text-security: none;
   position: relative;
 }
+
 .icon {
   color: #ccc;
   position: absolute;

+ 243 - 225
src/views/PeopleManage/InstitutionalPremium.vue

@@ -1,113 +1,95 @@
 <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">
+
+      <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>
+      </templateTable>
     </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
+    <el-dialog title="审核" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
+      <div>
+        <el-form :model="ruleForm" ref="ruleForm" label-width="120px" class="demo-ruleForm">
+          <el-form-item label="上传转账截图" prop="imageUrl">
+            <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>
+          </el-form-item>
+          <el-form-item label="驳回原因" prop="remark">
+            <el-input v-model="ruleForm.remark" style="width: 220px;" size="small" placeholder="请输入驳回原因"></el-input>
+          </el-form-item>
+        </el-form>
+
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="onDrivingupload('2')">审核驳回</el-button>
+        <el-button size="small" type="primary" @click="onDrivingupload('1')">审核通过</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog title="操作记录" :visible.sync="operationdialogVisible" width="50%" :before-close="handleCloseopera">
+      <div>
+        <el-table :data="operationtableData" border style="width: 100%">
+          <el-table-column prop="userId" label="工号">
+          </el-table-column>
+
+          <el-table-column prop="userName" 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
+      </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>
+      </el-table-column> -->
+          <el-table-column prop="cashFee" label="提现金额">
+          </el-table-column>
+          <el-table-column prop="createBy" label="操作人">
+          </el-table-column>
+          <el-table-column prop="createTime" label="操作时间">
+          </el-table-column>
+          <el-table-column prop="status" :formatter="formatter" 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";
+import CommonUtil from "@/utils/comutil.js";
+
 export default {
   components: {
     templateTable,
   },
   data() {
     return {
-      imageUrl:'',
-      operationdialogVisible:false,
-      operationtableData:[],
+      ruleForm: {},
+      operationdialogVisible: false,
+      operationtableData: [],
       formList: [
         {
           label: "工号",
@@ -127,22 +109,24 @@ export default {
 
         },
       ],
-      statusoption:[
+      statusoption: [
         {
-          label:'未审核',
-          value:0
-        },{
-          label:'审核通过',
-          value:'1'
-        },{
-          label:'审核驳回',
-          value:'2'
+          label: '未审核',
+          value: '0'
+        }, {
+          label: '审核通过',
+          value: '1'
+        }, {
+          label: '审核驳回',
+          value: '2'
         },
       ],
+      imageUrl: '',
       tableConfig: {
         columns: [
           // 数据列
           { prop: "userId", label: "工号", type: "text" },
+          { prop: "number", label: "单号", type: "text" },
           {
             prop: "userName",
             label: "名称",
@@ -153,40 +137,42 @@ export default {
           { 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: "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: "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',
+        operationWidth: '150',
         optBtns: [
-            // {
-            //   type: "primary",
-            //   label: "编辑",
-            //   perm: "sys:agent:edit",
-            //   icon: "fa fa-edit",
-            //   click: (row, index) => {
-            //     return this.handleTableEdit(row);
-            //   },
-            // },
+          // {
+          //   type: "primary",
+          //   label: "编辑",
+          //   perm: "sys:agent:edit",
+          //   icon: "fa fa-edit",
+          //   click: (row, index) => {
+          //     return this.handleTableEdit(row);
+          //   },
+          // },
           // {
           //   type: "primary",
           //   label: "删除",
@@ -195,19 +181,19 @@ export default {
           //     return this.handleTableDeleteFlag(row);
           //   },
           // },
-          {
-            label: "确认转账",
-            type:'text',
-            click: (row, index) => {
-               this.dialogVisible=true;
-               this.imageUrl='';
-                this.rowId=row.id
-            },
-          },
+          // {
+          //   label: "确认转账",
+          //   type:'text',
+          //   click: (row, index) => {
+          //      this.dialogVisible=true;
+          //      this.imageUrl='';
+          //       this.rowId=row.id
+          //   },
+          // },
           {
             type: "primary",
             label: "审核",
-            type:'text',
+            type: 'text',
             hide:(row)=>{
               return row.status=='0'
             },
@@ -218,24 +204,22 @@ export default {
           {
             type: "primary",
             label: "操作记录",
-            type:'text',
+            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' }
-          ],
-         
+      rules: {
+        imageUrl: [
+          { message: '请上传转账截图', trigger: 'blur' },
+        ],
+        remark: [
+          { required: true, message: '请输入驳回原因', trigger: 'blur' },
+        ],
+
+
       },
       pageData: {
         pageNum: 1,
@@ -249,37 +233,57 @@ export default {
       pageResult: [],
       dialogTitle: "",
       dialogVisible: false, // 新增编辑界面是否显示
-      rowId:''
+      rowId: ''
     };
   },
   created() {
     this.findPage();
-  
+
   },
   methods: {
+    formatter(row, column) {
+      let status = row.status;
+      return CommonUtil.getDataName({
+        dataList: this.statusoption,
+        value: "value",
+        label: "label",
+        data: status,
+      });
+    },
     handleClose(done) {
-       this.dialogVisible=false
+      this.dialogVisible = false
+    },
+    handleCloseopera(done) {
+      this.operationdialogVisible = false
     },
-    userChange(val){
-      if(val){
-        this.formData.userId= this.useroption.find(e=>e.name==val).id
+    userChange(val) {
+      if (val) {
+        this.formData.userId = this.useroption.find(e => e.name == val).id
       }
-      else{
-        this.formData.userId=''
+      else {
+        this.formData.userId = ''
       }
     },
     // 查询Start
     queryStaffInfo() {
       this.findPage();
     },
-    
-    operation(row){
+
+    operation(row) {
       this.$api.insCompany
         .sysAgencyFeeApprovalOperate(row.id)
         .then((res) => {
-          if(res.code==200){
-           this.operationdialogVisible=true
-           this.operationtableData=res.data
+          if (res.code == 200) {
+            this.operationdialogVisible = true
+            res.data.forEach(e => {
+              if (e.auditUser) {
+                e.createBy = e.auditUser
+              }
+              if (e.auditTime) {
+                e.createTime = e.auditTime
+              }
+            })
+            this.operationtableData = res.data
           }
         });
     },
@@ -293,8 +297,8 @@ export default {
         })
         .then((res) => {
           this.tableConfig.loading = false;
-          res.data.content.forEach(val=>{
-            val.picture= val.picture?process.env.BASE_URL+val.picture:null
+          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;
@@ -302,70 +306,74 @@ export default {
           this.pageData.totalSize = res.data.totalSize;
         });
     },
-   
+
     handleSearchList(data) {
       this.findPage(data);
     },
     // 提现
-    handleWithdrawal(params){
+    handleWithdrawal(params) {
       this.$api.sysAgencyFeeApprovalCon
         .agencyQueryById(params.id)
         .then((res) => {
-          if(res.code==200){
+          if (res.code == 200) {
             this.dialogTitle = "编辑";
-            this.dialogVisible= true
-            this.formData=res.data
+            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)
-                        }
-                    })
-                }
-            });
+    examine(params) {
+      this.dialogVisible = true;
+      this.imageUrl = '';
+      this.ruleForm = {}
+      this.rowId = params.id
+      //  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){
+          if (res.code == 200) {
             this.dialogTitle = "编辑";
-            this.dialogVisible= true
-            this.formData=res.data
+            this.dialogVisible = true
+            this.formData = res.data
           }
 
         });
@@ -374,7 +382,7 @@ export default {
     handleTableDeleteFlag(data) {
       this.$confirm("确认删除?")
         .then(() => {
-          this.$api.insCompany.sysPartnerDel(data.id ).then((res) => {
+          this.$api.insCompany.sysPartnerDel(data.id).then((res) => {
             if (res.code == 200) {
               this.$message({
                 message: "删除成功",
@@ -386,14 +394,14 @@ export default {
             }
           });
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     //添加人员
     handleAddButton() {
       this.dialogTitle = "新增";
-      this.formData={}
+      this.formData = {}
       this.dialogVisible = true;
-      if(this.$refs["formData"]){
+      if (this.$refs["formData"]) {
         this.$refs["formData"].resetFields();
       }
     },
@@ -403,14 +411,14 @@ export default {
         .then((_) => {
           done();
         })
-        .catch((_) => {});
+        .catch((_) => { });
     },
     closeDialog() {
       // 清空数据
       this.deptInfo = {};
       this.dialogVisible = false;
     },
-    drivingupload(file,row) {
+    drivingupload(file, row) {
       let file1 = file.raw;
       let files = window.URL.createObjectURL(file1); //转临时路径
       this.imageUrl = files;
@@ -419,42 +427,52 @@ export default {
       params.append("type", "image");
       this.$api.letter.uploadFile(params).then((res) => {
         if (res.code == "200") {
-          this.pictureUrl=res.data.url
+          this.ruleForm.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);
-              }
+    onDrivingupload(status) {
+      if (status == 2 && !this.ruleForm.remark ) {
+        this.$message.error('请输入驳回原因!')
+        return
+      }
+      if (status == 1 && !this.ruleForm.pictureUrl) {
+        this.$message.error('请上传转账截图!')
+        return
+      }
+      this.$api.insCompany
+        .sysAgencyFeeApprovalCon({ id: this.rowId, status, ...this.ruleForm })
+        .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{
+.upload-demo {
   display: inline-block;
   margin-left: 5px;
 }
-.avatar{
+
+.avatar {
   width: 100%;
-    height: 100%;
+  height: 100%;
 }
 </style>

+ 2 - 2
src/views/PeopleManage/Partner.vue

@@ -205,8 +205,8 @@ export default {
   },
   methods: {
     findLeftTreeData: function () {
-      this.$api.dept.findTree().then((res) => {
-        this.treeDataRecursion(res.data, '1');
+      this.$api.insCompany.getPartnerDeptTree().then((res) => {
+        // this.treeDataRecursion(res.data, '1');
         this.ztreeNodes = res.data;
       });
     },