瀏覽代碼

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

lihongxiao 2 年之前
父節點
當前提交
e1e0e5b374

+ 7 - 36
src/views/Letter/Letter.vue

@@ -2113,9 +2113,9 @@
         <el-button size="small" type="primary" @click="renewalCodeconfirm">确 定</el-button>
       </span>
     </el-dialog>
-    <el-dialog :title="contributingState?'选择特约':'提交核保'" :visible.sync="hbsubmitdialogVisible" width="1200px">
+    <el-dialog title="提交核保" :visible.sync="hbsubmitdialogVisible" width="1200px">
       <div style="margin-bottom: 20px;font-weight: bold;">特约选择</div>
-      <el-table size="small" :data="zijinengageListData" border v-loading="contributingLoading" @select="zijinengageChange"
+      <el-table size="small" :data="zijinengageListData" border v-loading="accidentLoading" @select="zijinengageChange"
         ref="expandTable" highlight-current-row @cell-dblclick="zijincellDblclick"  :cell-class-name="tableCellClassName"
         :header-cell-style="{ background: '#F2F7FC', fontWeight: '700', color: '#ee7000' }">
         <el-table-column type="selection" width="55"></el-table-column>
@@ -2131,9 +2131,7 @@
       </el-table>
       <span slot="footer" class="dialog-footer">
         <el-button size="small" @click="hbsubmitdialogVisible = false">取 消</el-button>
-        <el-button v-if="contributingState" size="small" type="warning" @click="hbsubmitdialogVisible=false">确定</el-button>
-        <el-button v-else size="small" type="warning" @click="hbsubmit">提交核保</el-button>
-
+        <el-button size="small" type="warning" @click="hbsubmit">提交核保</el-button>
       </span>
     </el-dialog>
     <el-image-viewer v-if="showViewer" :on-close="closeViewer" :z-index="9999" :url-list="[ProViewImg]" />
@@ -2245,7 +2243,6 @@ export default {
       accidenttableData: [],
       accidentLoading: false,
       guoRenaccidentLoading: false,
-      contributingLoading:false,
       guoRenaccidentPremium:'',
       guoRenaccidentForm: {
         quantity: "1",
@@ -2253,7 +2250,6 @@ export default {
       }, //国任意外险内容
       accidentPremium: "",
       accidentPremiumGr:'',
-      contributingState:false, //是否为国任特约
       pickerOptions: {
         disabledDate(time) {
           //若选择的日期小于当前日期(包含今天)
@@ -3443,6 +3439,7 @@ export default {
       });
     }
 
+
     //--订单编辑回显--
     this.paramsEdit = this.$route.query.data; //接收参数
     if (this.paramsEdit) {
@@ -3452,6 +3449,7 @@ export default {
       this.bbtbcarShow = false;
       this.bbczcarShow = false;
       const { carinfo, ownerinfo, applyinfo, insureinfo, quoteno, orderno } = _this.paramsEdit;
+
       _this.carInfo = carinfo;
       if( _this.carInfo.carnature=="8A"){
         _this.carInfo.carnature='02'
@@ -4109,22 +4107,6 @@ export default {
     ZADrivingRadio(row){
       this.ZADrivingChange(row)
     },
-    // 国任特约选择
-    contributingGuoRen(id){
-      this.zijinengageListData = [];
-      this.contributingLoading=true
-      this.contributingState=true
-      this.hbsubmitdialogVisible=true
-        this.$api.letter.guorenqueryClauseData
-        ({ agreementId: id }).then(res => {
-          this.contributingLoading=false
-          res.data.forEach(val=>{
-            val.clauseName=val.clauses
-            val.clauseContent=val.clausesContext
-          })
-            this.zijinengageListData = res.data;
-          });
-    },
     //紫金特约选择
     zijinengageChange(select, row) {
       this.zijinengageList = [];
@@ -4387,6 +4369,7 @@ export default {
         this.$message({ message: "发证日期早于初登日期", type: "error" });
         return;
       }
+
       this.$refs["carInfo"].validate(valid => {
         if (valid) {
           var _this = this;
@@ -5127,16 +5110,6 @@ export default {
     },
     //国任报价
     guoRen(num, id) {
-      let guoRenSpecialAgreementVo=[]
-      this.zijinengageList.forEach(val=>{
-        guoRenSpecialAgreementVo.push({
-          clauses:val.clauseName,
-          clausesContext:val.clauses,
-          clauseCode:val.clauseCode,
-          riskCode:val.riskCode,
-          riskName:val.riskName,
-        })
-      })
       let accidentalDrivingVo = {};
       if ( this.guoRenaccidentForm.goodsCode) {
         accidentalDrivingVo = {
@@ -5152,9 +5125,9 @@ export default {
         renewalCodeJq: this.renewalCodeJq,
         renewalCodeSy: this.renewalCodeSy,
         agreementId: this.totalCompanyList[num].agreementId,
-        guoRenSpecialAgreementVo
       };
       this.$api.letter.guorenquote(params).then(res => {
+
         this.totalCompanyList[num].msg = res.msg;
         if (!!res.msg && res.msg.indexOf("不存在有效协议") >= 0) {
           this.totalCompanyList[num].quoteCode = "4";
@@ -5524,7 +5497,6 @@ export default {
       this.companyId = data.result.companyId;
       this.apiType = data.apiType;
       this.hbsubmitdialogVisible = true;
-      this.contributingState=false
       if(data.namesimple=='紫金财险'){
         this.$api.letter.zijinqueryClauseData({ companyId: this.companyId }).then(res => {
             this.zijinengageListData = res.data;
@@ -5557,7 +5529,6 @@ export default {
     },
     hbsubmit() {
       this.hbsubmitdialogVisible = false;
-      this.contributingState=false
       this.$api.letter.getByCompanyId({ companyId: this.companyId }).then(async res => {
         if (res.code == 200) {
           var data = res.data;

+ 33 - 4
src/views/PeopleManage/Agent/AgentManage.vue

@@ -79,7 +79,7 @@
                 </el-form-item>
               </el-col>
               <el-col :span="8">
-                <el-form-item label="密码" prop="word">
+                <el-form-item  v-if="dialogPassword" label="密码" prop="word">
                   <el-input  v-model="formData.password" :class="isShow==true?'disc':'none'" ></el-input>
                   <i class="el-icon-view icon" @click="isShowFun()"></i>
                   <!-- <el-input style="width:200px"  v-model="formData.password" autocomplete="new-password"
@@ -90,7 +90,7 @@
              
               <el-col :span="8">
                 <el-form-item label="状态" prop="status">
-                  <el-select style="width:200px" v-model="formData.status" placeholder="请选择">
+                  <el-select style="width:200px" @change="statusChange" v-model="formData.status" placeholder="请选择">
                     <el-option v-for="val in user_statusoptions" :label="val.label" :value="val.value"
                       :key="val.id"></el-option>
                   </el-select>
@@ -116,6 +116,12 @@
                   <el-input  v-model="formData.referrerId" disabled></el-input>
                 </el-form-item>
               </el-col>
+              <el-col :span="8">
+                <el-form-item label="离职时间" prop="logoutTime">
+                  <el-date-picker style="width:200px" value-format="yyyy-MM-dd" v-model="formData.logoutTime" type="date" placeholder="选择日期">
+                  </el-date-picker>
+                </el-form-item>
+              </el-col>
             </el-row>
           </el-form>
           <div style="text-align: right;">
@@ -481,7 +487,7 @@ export default {
         identity:
         [{ required: true, message: "请填写身份证号" },
         { validator: validateSfz }], 
-        referrerId:[{ required: true, message: "请选择推荐人", trigger: "change" }]
+        referrerId:[{ required: true, message: "请选择推荐人", trigger: "change" }],
       },
       filterObject: {},
       peopleid: "",
@@ -518,6 +524,7 @@ export default {
       user_statusoptions: JSON.parse(localStorage.getItem('user_statusoptions')),
       roles: JSON.parse(localStorage.getItem('find_all')),
       option: [], //机构列表
+      dialogPassword:true, //密码是否显示
     };
   },
   created() {
@@ -545,6 +552,18 @@ export default {
     },
   },
   methods: {
+    //状态改变时
+    statusChange(e){
+      console.log(this.user_statusoptions)
+      console.log(e)
+      if(e==0){
+        this.$set( this.formDataRules,'logoutTime',[
+            { type: 'date', required: true, message: '请选择日期', trigger: 'change' }
+          ])
+      }else{
+        this.formDataRules.logoutTime = undefined
+      }
+    },
     // excel导入
     carfrontChange(file) {
       const params = new FormData(); // 声明formData数据类型
@@ -620,6 +639,7 @@ export default {
     //联级选择器触发事件
     handleChange(val) {
       if (val && val.length !== 0) {
+        this.formData.referrerId = ''
         this.formData.deptId = val.at(-1);
         this.$api.user.selectfindByreferrerId({ deptId: this.formData.deptId }).then((res) => {
           this.recommenderOptions = res.data
@@ -661,6 +681,7 @@ export default {
     },
     //编辑
     async handleTableEdit(params) {
+      this.dialogPassword = false
       this.dataForm = {
         SFZ_01: "",
         SFZ_02: "",
@@ -673,7 +694,7 @@ export default {
       this.activeName = '1'
       let res = await this.$api.user.getUserDatail(params.userId)
       if (res.code == 200) {
-        this.$api.user.selectfindByreferrerId({ deptId: res.data.deptId }).then((res) => {
+        this.$api.user.selectfindByreferrerId({ deptId: res.data.sysUser.deptId }).then((res) => {
           this.recommenderOptions = res.data
         });
         if(res.data.esmUserImageVo.length > 0) {
@@ -688,6 +709,13 @@ export default {
         }
         res.data.sysUser.status += ''
         this.formData = res.data.sysUser
+        if(this.formData.status==0){
+          this.$set( this.formDataRules,'logoutTime',[
+            { type: 'date', required: true, message: '请选择日期', trigger: 'change' }
+          ])
+        }else{
+          this.formDataRules.logoutTime = undefined
+        }
         this.formDataDetail = res.data.sysUserInfo?res.data.sysUserInfo:{}
         this.formData.password = ''
         this.dialogTitle = "编辑代理人";
@@ -726,6 +754,7 @@ export default {
         this.$message.info("请选择所属公司或部门");
         return;
       }
+      this.dialogPassword = true
       this.formData = {
         roleId: '20',
         status: '',

+ 28 - 2
src/views/PeopleManage/Staff/StaffManage.vue

@@ -155,7 +155,7 @@
                   <el-input v-model="formData.name"></el-input>
                 </el-form-item>
               </el-col>
-              <el-col :span="8">
+              <el-col v-if="dialogPassword" :span="8">
                 <el-form-item label="密码" prop="password">
                   <el-input  v-model="formData.password" :class="isShow==true?'disc':'none'" ></el-input>
                   <i class="el-icon-view icon" @click="isShowFun()"></i>
@@ -178,6 +178,12 @@
                   </el-select>
                 </el-form-item>
               </el-col>
+              <el-col :span="8">
+                <el-form-item label="离职时间" prop="logoutTime">
+                  <el-date-picker value-format="yyyy-MM-dd" style="width:200px" v-model="formData.logoutTime" type="date" placeholder="选择日期">
+                  </el-date-picker>
+                </el-form-item>
+              </el-col>
             </el-row>
           </el-form>
           <div style="text-align: right;">
@@ -553,6 +559,7 @@ export default {
       },
       //影像上传列表
       imagesIdList:[],
+      dialogPassword:false, //密码是否显示
     };
   },
   created() {
@@ -580,6 +587,16 @@ export default {
     },
   },
   methods: {
+    //状态改变时
+    statusChange(e){
+      if(e==0){
+        this.$set( this.formDataRules,'logoutTime',[
+        { type: 'date', required: true, message: '请选择日期', trigger: 'change' }
+          ])
+      }else{
+        this.formDataRules.logoutTime = undefined
+      }
+    },
     isShowFun(){
       this.isShow=!this.isShow
     },
@@ -669,7 +686,7 @@ export default {
         this.pageData.pageSize = data.pageRequest.pageSize;
       }
        let dto={
-        deptId:this.pageData.deptId,
+        deptId:this.deptId,
         mobile:this.pageData.mobile,
         name:this.pageData.name,
         userId:this.pageData.userId,
@@ -723,6 +740,13 @@ export default {
       if (res.code == 200) {
         res.data.sysUser.status += ''
         this.formData = res.data.sysUser
+        if(this.formData.status==0){
+          this.$set( this.formDataRules,'logoutTime',[
+            { type: 'date', required: true, message: '请选择日期', trigger: 'change' }
+          ])
+        }else{
+          this.formDataRules.logoutTime = undefined
+        }
         if(res.data.esmUserImageVo.length > 0) {
           this.imagesIdList = res.data.esmUserImageVo.map(item=>{
             item.path = process.env.BASE_URL + item.path
@@ -737,6 +761,7 @@ export default {
         this.formData.password = ''
         this.dialogTitle = "编辑后线人员";
         this.dialogVisible = true;
+        this.dialogPassword = false;
       }
       else {
         this.$message.error(res.msg);
@@ -785,6 +810,7 @@ export default {
       this.activeName = '1'
       this.dialogTitle = "新增后线人员";
       this.dialogVisible = true;
+      this.dialogPassword = true;
     },
     getDictItems(typeName) {
       //--数据字典--

+ 34 - 4
src/views/PeopleManage/TeamLeader/TeamLeaderManage.vue

@@ -155,7 +155,7 @@
                   <el-input v-model="formData.name"></el-input>
                 </el-form-item>
               </el-col>
-              <el-col :span="8">
+              <el-col v-if="dialogPassword" :span="8">
                 <el-form-item label="密码" prop="password">
                   <el-input  v-model="formData.password" :class="isShow==true?'disc':'none'" ></el-input>
                   <i class="el-icon-view icon" @click="isShowFun()"></i>
@@ -165,7 +165,7 @@
               </el-col>
               <el-col :span="8">
                 <el-form-item label="状态" prop="status">
-                  <el-select style="width:200px" v-model="formData.status" placeholder="请选择">
+                  <el-select style="width:200px"  @change="statusChange" v-model="formData.status" placeholder="请选择">
                     <el-option v-for="val in user_statusoptions" :label="val.label" :value="val.value"
                       :key="val.id"></el-option>
                   </el-select>
@@ -178,6 +178,12 @@
                   </el-select>
                 </el-form-item>
               </el-col>
+              <el-col :span="8">
+                <el-form-item label="离职时间" prop="logoutTime">
+                  <el-date-picker value-format="yyyy-MM-dd" style="width:200px" v-model="formData.logoutTime" type="date" placeholder="选择日期">
+                  </el-date-picker>
+                </el-form-item>
+              </el-col>
             </el-row>
           </el-form>
           <div style="text-align: right;">
@@ -424,7 +430,7 @@ export default {
         mobile:'',
       },
       formData:{
-        roleId:'21'
+        roleId:'21',
       },
       formDataRules:{
         deptId:[{ required: true, message: "请选择机构", trigger: "change" }],
@@ -533,6 +539,7 @@ export default {
       user_statusoptions: JSON.parse(localStorage.getItem('user_statusoptions')) ,
       roles: JSON.parse(localStorage.getItem('find_all')) ,
       option: [], //机构列表
+      dialogPassword:false, //密码是否显示
     };
   },
   created() {
@@ -560,6 +567,16 @@ export default {
     },
   },
   methods: {
+    //状态改变时
+    statusChange(e){
+      if(e==0){
+        this.$set( this.formDataRules,'logoutTime',[
+        { type: 'date', required: true, message: '请选择日期', trigger: 'change' }
+          ])
+      }else{
+        this.formDataRules.logoutTime = undefined
+      }
+    },
     // 查询Start
     queryStaffInfo() {
       this.findPage();
@@ -624,7 +641,7 @@ export default {
         this.pageData.pageSize = data.pageRequest.pageSize;
       }
        let dto={
-        deptId:this.pageData.deptId,
+        deptId:this.deptId,
         mobile:this.pageData.mobile,
         name:this.pageData.name,
         userId:this.pageData.userId,
@@ -692,10 +709,21 @@ export default {
       if (res.code == 200) {
         res.data.sysUser.status += ''
         this.formData = res.data.sysUser
+        if(this.formData.status==0){
+          this.$set( this.formDataRules,'logoutTime',[
+            { type: 'date', required: true, message: '请选择日期', trigger: 'change' }
+          ])
+        }else{
+          this.formDataRules.logoutTime = undefined
+        }
         this.formDataDetail = res.data.sysUserInfo?res.data.sysUserInfo:{}
         this.formData.password = ''
         this.dialogTitle = "编辑团队长";
         this.dialogVisible = true;
+        this.dialogPassword = false;
+        this.formData.referrerId = ''
+        this.formData.referrerName = ''
+
       }
       else {
         this.$message.error(res.msg);
@@ -736,6 +764,7 @@ export default {
       this.activeName = '1'
       this.dialogTitle = "新增团队长";
       this.dialogVisible = true;
+      this.dialogPassword = true;
       
     },
     // 新增或修改的弹出框Start
@@ -811,6 +840,7 @@ export default {
                 });
               }
               else{
+                console.log(this.formData)
                 this.$api.user.updateUserInfo(this.formData.id,{ sysUser: this.formData, sysUserInfo: this.formDataDetail }).then((res) => {
                   if (res.code == 200) {
                     this.$message({