Przeglądaj źródła

机构合伙人

lihongxiao 2 lat temu
rodzic
commit
efe9c2efa1

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

@@ -828,4 +828,11 @@ export const queryRecommendAndPartner = (id) => {
     url: '/sysPartner/queryRecommendAndPartner/'+id,
     method: "get",
   })
+}
+export const sysPartnerEdit = (data) => {
+  return axios({
+    url: '/sysPartner/edit',
+    method: "post",
+    data
+  })
 }

+ 1 - 1
src/views/Core/components/imageDialog.vue

@@ -560,7 +560,7 @@ export default {
             imageUploaddialogVisible: false,
             tabLiIndex: 0,
             tabLimenu: [
-                {
+                { 
                     name: "车辆信息",
                     scroll: "vehicle",
                 },

+ 60 - 35
src/views/Letter/Signature.vue

@@ -1,14 +1,17 @@
 <template>
-    <div >
+    <div style="background: #F4F5F7;height:100vh;padding: 30px 20px">
         <div class="box">
-            <span>手机验证码:</span>
-            <el-input size="small" style="width: 220px;" v-model="input" placeholder="请输入验证码"></el-input>
-            <el-button size="small" type="primary"  @click.prevent="onClick" :disabled="countdown > 0">
-                {{ countdown > 0 ? `${countdown}秒后重新获取` : '获取验证码' }}
-            </el-button>
+            <p>手机验证码</p>
+            <div class="flex j-s">
+                <el-input size="small" style="width: 220px;" v-model="input" placeholder="请输入验证码"></el-input>
+                <el-button size="mini" type="primary" style="background: #FE6402;border: none" @click.prevent="onClick"
+                    :disabled="countdown > 0">
+                    {{ countdown > 0 ? `${countdown}秒后重新获取` : '获取验证码' }}
+                </el-button>
+            </div>
         </div>
-        <div  class="box"  style="margin-top:20px">
-            <el-button style="width: 65%;" plain  type="primary"  @click.prevent="next">下一步</el-button>
+        <div class="footer">
+            <el-button @click.prevent="next">下一步</el-button>
         </div>
     </div>
 </template>
@@ -24,24 +27,24 @@ export default {
     },
     methods: {
         startCountdown(seconds) {
-        this.countdown = seconds;
-        this.intervalId = setInterval(() => {
-            if (this.countdown > 0) {
-            this.countdown -= 1;
-            } else {
-            clearInterval(this.intervalId);
-            }
-        }, 1000);
+            this.countdown = seconds;
+            this.intervalId = setInterval(() => {
+                if (this.countdown > 0) {
+                    this.countdown -= 1;
+                } else {
+                    clearInterval(this.intervalId);
+                }
+            }, 1000);
         },
-        onClick(){
+        onClick() {
             this.startCountdown(60); // 假设倒计时60秒
-            axios.get(process.env.BASE_URL+'/order/pingAnApi/getApplyVerifyCodeAndRecoverApplyVerifyCode',{
-                params:{
-                    companyId:this.$route.query.companyId
+            axios.get(process.env.BASE_URL + '/order/pingAnApi/getApplyVerifyCodeAndRecoverApplyVerifyCode', {
+                params: {
+                    companyId: this.$route.query.companyId
                 }
             })
-            .then(response => {
-            })
+                .then(response => {
+                })
             // this.$api.letter.getApplyVerifyCodeAndRecoverApplyVerifyCode({companyId:this.$route.query.companyId}).then(res=>{
             //     //if(res.code==200 && res.data.resultCode==='0'){
             //         // this.$message({
@@ -60,14 +63,14 @@ export default {
         },
         next() {
             if (this.input) {
-                axios.post (process.env.BASE_URL+'/order/pingAnApi/recoverApplyVerifyCode', {
-                    companyId:this.$route.query.companyId,
-                    msgCode:this.input
-                    }) .then (res=> {
-                    if(res.data.code==200){
-                         window.location.href=res.data.msg
+                axios.post(process.env.BASE_URL + '/order/pingAnApi/recoverApplyVerifyCode', {
+                    companyId: this.$route.query.companyId,
+                    msgCode: this.input
+                }).then(res => {
+                    if (res.data.code == 200) {
+                        window.location.href = res.data.msg
                     }
-                    else{
+                    else {
                         this.$message.error(res.data.msg)
                     }
                 })
@@ -87,10 +90,32 @@ export default {
     }
 }
 </script>
-<style scoped>
-.box{
-    display: flex;
-    justify-content: center;
-    margin-top:50px
+<style lang="scss" scoped>
+.box {
+    /* display: flex;
+    justify-content: center; */
+    /* margin-top:50px; */
+    background: #FFFFFF;
+    border-radius: 16px 16px 16px 16px;
+    padding: 10px;
+}
+
+/deep/ .el-button--primary.is-disabled,
+.el-button--primary.is-disabled:hover {
+    color: #FFFFFF;
 }
-</style>
+
+.footer {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    box-sizing: border-box;
+    background: #FFFFFF;
+    padding: 20px;
+    button {
+        width: 100%;
+        background: #FE6402;
+        color: #fff;
+    }
+}</style>

+ 3 - 1
src/views/PeopleManage/Institutional.vue

@@ -119,7 +119,7 @@
               </el-col>
               <el-col :span="12">
                 <el-form-item label="推荐人" prop="suggestId">
-                  <el-select v-model="formData.suggestId" style="width: 200px;" @change="suggestChange" clearable  placeholder="请选择推荐人">
+                  <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"
@@ -150,6 +150,7 @@ export default {
   },
   data() {
     return {
+      isdisabled:false,
       ztreeNodes: [],
       leftSplitWidth: 20,
       rightSplitWidth: 80,
@@ -411,6 +412,7 @@ export default {
         .agencyQueryById(params.id)
         .then((res) => {
           if(res.code==200){
+            this.isdisabled=res.data.suggestId?true:false
             this.dialogTitle = "编辑";
             this.dialogVisible= true
             this.formData=res.data

+ 43 - 57
src/views/PeopleManage/Partner.vue

@@ -88,7 +88,7 @@
               </el-col>
               <el-col :span="12">
                 <el-form-item label="推荐人" prop="suggestId">
-                  <el-select v-model="formData.suggestId" @change="suggestChange" clearable  placeholder="请选择推荐人">
+                  <el-select v-model="formData.suggestId" @change="suggestChange" :disabled="dialogTitle=='编辑'" clearable  placeholder="请选择推荐人">
                     <el-option
                       v-for="val in sysPartnerOption"
                       :key="val.userId"
@@ -163,23 +163,37 @@ export default {
         loading: true,
         isPaginationShow: true,
         isShowIndex: true,
-        operationWidth:150,
+        operationWidth:180,
         optBtns: [
             {
               type: "primary",
-              label: "编辑",
+              label: "编辑合伙人",
               perm: "sys:agent:edit",
               icon: "fa fa-edit",
               hide:(row)=>{
                 return row.type!=='1'
               },
               click: (row, index) => {
-                return this.handleTableEdit(row);
+                return this.handleTableEdit(row,'2');
+              },
+            },
+            {
+              type: "primary",
+              label: "编辑",
+              icon: "fa fa-edit",
+              hide:(row)=>{
+                return row.type=='1'
+              },
+              click: (row, index) => {
+                return this.handleTableEdit(row,'1');
               },
             },
           {
             type: "primary",
             label: "删除",
+            hide:(row)=>{
+                return row.type=='1'
+              },
             icon: "el-icon-delete",
             click: (row, index) => {
               return this.handleTableDeleteFlag(row);
@@ -277,26 +291,15 @@ export default {
       this.findPage(data);
     },
     //编辑
-    async handleTableEdit(params) {
+    async handleTableEdit(params,type) {
       this.$api.insCompany.queryRecommendAndPartner(params.parentId).then(res=>{
         this.sysPartnerOption=res.data
       })
-      this.dialogTitle = "编辑";
+      this.dialogTitle =type=='1'?'编辑': "编辑合伙人";
       this.dialogVisible= true
       params.userName=params.name
       params.userId=params.id
       this.formData= JSON.parse(JSON.stringify(params)) 
-
-      // this.$api.insCompany
-      //   .agencyQueryById(params.id)
-      //   .then((res) => {
-      //     if(res.code==200){
-      //       this.dialogTitle = "编辑";
-      //       this.dialogVisible= true
-      //       this.formData=res.data
-      //     }
-
-      //   });
     },
     // 删除单个人员
     handleTableDeleteFlag(data) {
@@ -398,7 +401,9 @@ export default {
       this.$refs.formData.validate((valid) => {
         if (valid) {
           this.$confirm("确认提交吗?", "提示", {}).then(() => {
-            this.$api.insCompany
+          
+            if (this.dialogTitle == "编辑合伙人") {
+              this.$api.insCompany
                 .sysPartnerAdd(this.formData)
                 .then((res) => {
                   if (res.code == 200) {
@@ -416,45 +421,26 @@ export default {
                     });
                   }
                 });
-            // if (this.dialogTitle == "新增") {
-            //   this.$api.insCompany
-            //     .sysPartnerAdd(this.formData)
-            //     .then((res) => {
-            //       if (res.code == 200) {
-            //         this.$message({
-            //           message: "保存成功",
-            //           type: "success",
-            //         });
-            //         this.dialogVisible = false;
-            //         this.$refs["formData"].resetFields();
-            //         this.findPage();
-            //       } else {
-            //         this.$message({
-            //           message: `保存失败,请重新添加,(${res.msg})`,
-            //           type: "error",
-            //         });
-            //       }
-            //     });
-            // } else {
-            //   this.$api.insCompany
-            //     .agencyEdit(this.formData)
-            //     .then((res) => {
-            //       if (res.code == 200) {
-            //         this.$message({
-            //           message: "编辑成功",
-            //           type: "success",
-            //         });
-            //         this.dialogVisible = false;
-            //         this.$refs["formData"].resetFields();
-            //         this.findPage();
-            //       } else {
-            //         this.$message({
-            //           message: `编辑失败,请重新添加,(${res.msg})`,
-            //           type: "error",
-            //         });
-            //       }
-            //     });
-            // }
+            } else {
+              this.$api.insCompany
+                .sysPartnerEdit(this.formData)
+                .then((res) => {
+                  if (res.code == 200) {
+                    this.$message({
+                      message: "编辑成功",
+                      type: "success",
+                    });
+                    this.dialogVisible = false;
+                    this.$refs["formData"].resetFields();
+                    this.findPage();
+                  } else {
+                    this.$message({
+                      message: `编辑失败,请重新添加,(${res.msg})`,
+                      type: "error",
+                    });
+                  }
+                });
+            }
           });
         }
       });