Parcourir la source

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

lihongxiao il y a 2 ans
Parent
commit
04ab7185df

+ 16 - 5
src/views/AgreementManage/CarInsurance/AgreementEntry.vue

@@ -632,8 +632,9 @@
             maxlength="100" show-word-limit></el-input>
         </el-form-item>
       </el-form>
-      <Product-Cost-Form v-if="underwritingRulesAddVehicleFactorVisible" :form="dynamicFormArray" :operator="operatorlist" over-size="small"
-        @saveForm="underwritingRulesSaveForm" @cancelForm="underwritingRulesCancelForm"></Product-Cost-Form>
+      <Product-Cost-Form v-if="underwritingRulesAddVehicleFactorVisible" :form="dynamicFormArray" :operator="operatorlist"
+        over-size="small" @saveForm="underwritingRulesSaveForm"
+        @cancelForm="underwritingRulesCancelForm"></Product-Cost-Form>
     </el-dialog>
 
     <el-dialog title="产品历史记录" :visible.sync="productHistoryRecordDialogVisible" width="70%" :fullscreen="true">
@@ -1687,13 +1688,18 @@ export default {
         if (res.code == '200') {
           let obj = Object.assign({}, res.data);
           obj.costsAttrLinks.map(val => {
+            switch (val.attrType) {
+              case 'inputNumber':
+                val.operator = '1';
+                break;
+            }
             if (val.attrCode == 'LicenseNo') {
               val.dictLabal = this.areanumberplateList;
             }
             return val;
           })
           this.$nextTick(() => {
-            this.dynamicFormArray=obj.costsAttrLinks;
+            this.dynamicFormArray = obj.costsAttrLinks;
             this.productCostForm = obj;
           });
           this.productCostAddDialogType = "edit";
@@ -1713,6 +1719,11 @@ export default {
         if (res.code == '200') {
           let obj = Object.assign({}, res.data);
           obj.costsAttrLinks.map(val => {
+            switch (val.attrType) {
+              case 'inputNumber':
+                val.operator = '1';
+                break;
+            }
             if (val.attrCode == 'LicenseNo') {
               val.dictLabal = this.areanumberplateList;
             }
@@ -1721,7 +1732,7 @@ export default {
           this.$nextTick(() => {
             this.dynamicFormArray = obj.costsAttrLinks;
             this.underwritingRulesForm = {
-              id:obj.id,
+              id: obj.id,
               agreementId: obj.agreementId, //协议id
               ruleDescription: obj.ruleDescription, //规则描述
               validInd: obj.validInd, //是否有效
@@ -2061,7 +2072,7 @@ export default {
           this.underwritingRulesForm[key] = "";
         }
       }
-      if(this.underwritingRulesAddDialogType=='edit'){
+      if (this.underwritingRulesAddDialogType == 'edit') {
         this.getFactorTemplate();
       }
     },

+ 75 - 45
src/views/PeopleManage/Player/PlayerManageteam.vue

@@ -45,7 +45,6 @@
       </Split>
     </el-main>
 
-    <!-- 新增修改界面 -->
     <el-dialog
       :title="dialogTitle"
       width="60%"
@@ -55,13 +54,14 @@
       @close="closeDialog"
       v-dialogDrag
     >
-      <el-tabs v-model="activeName">
+      <el-tabs v-model="activeName" :before-leave="beforeTabLeave">
         <el-tab-pane label="基本信息" name="1">
           <el-form
             :model="formData"
             :rules="formDataRules"
             ref="formData"
             :inline="true"
+            @keyup.enter.native="nextStep()"
             label-width="130px"
             size="small"
           >
@@ -94,28 +94,36 @@
                   <el-input v-model="formData.mobile"></el-input>
                 </el-form-item>
               </el-col>
+              <el-col :span="8">
+                <el-form-item label="身份证号" prop="identity">
+                  <el-input
+                    v-model="formData.identity"
+                    :maxlength="18"
+                    @change="identityChange"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
               <el-col :span="8">
                 <el-form-item label="名称" prop="name">
                   <el-input v-model="formData.name"></el-input>
                 </el-form-item>
               </el-col>
-              <el-col :span="8">
-                <el-form-item  label="密码" prop="password">
+              <el-col  :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()" v-if="dialogPassword"></i>
-                  <!-- <el-input style="width:200px"  v-model="formData.password" autocomplete="new-password"
-                      show-password></el-input> -->
+                  <!-- <el-input style="width:200px" v-model="formData.password" autocomplete="new-password" -->
+                  <!-- show-password></el-input> -->
                 </el-form-item>
               </el-col>
-
               <el-col :span="8">
                 <el-form-item label="状态" prop="status">
                   <el-select
-                    :disabled="dialogTitle == '新增渠道信息'"
                     style="width: 200px"
+                    @change="statusChange"
                     v-model="formData.status"
                     placeholder="请选择"
                   >
@@ -153,42 +161,23 @@
                 </el-form-item>
               </el-col>
               <el-col :span="8">
-                <el-form-item label="业务员" prop="referrerId">
-                  <el-select
+                <el-form-item label="离职时间" prop="logoutTime">
+                  <el-date-picker
+                    value-format="yyyy-MM-dd"
                     style="width: 200px"
-                    v-model="formData.referrerId"
-                    placeholder="请选择"
+                    v-model="formData.logoutTime"
+                    type="date"
+                    placeholder="选择日期"
                   >
-                    <el-option
-                      v-for="val in recommenderOptions"
-                      :label="val.name"
-                      :value="val.id"
-                      :key="val.id"
-                    ></el-option>
-                  </el-select>
-                </el-form-item>
-              </el-col>
-              <el-col :span="8">
-                <el-form-item label="业务员工号" prop="referrerName">
-                  <el-input v-model="formData.referrerId" disabled></el-input>
+                  </el-date-picker>
                 </el-form-item>
               </el-col>
             </el-row>
           </el-form>
-          <!-- <div style="text-align: right">
-            <el-button
-              size="small"
-              type="primary"
-              style="background-color: #ffc000; border: 1px solid #ffc000"
-              @click="closeDialog"
-              >取消</el-button
-            >
-            <el-button size="small" type="primary" @click="submitForm"
-              >提交</el-button
+          <div style="text-align: right">
+            <el-button size="small" type="primary" @click="nextStep"
+              >下一步</el-button
             >
-          </div> -->
-          <div style="text-align: right;">
-            <el-button size="small" type="primary" @click="nextStep">下一步</el-button>
           </div>
         </el-tab-pane>
         <el-tab-pane label="详细信息" name="2">
@@ -290,7 +279,7 @@
                     v-model="formDataDetail.bloodType"
                     placeholder="请选择"
                   >
-                    <el-option v-for="val in bloodOption" :key="val.value" :label="val.label" :value="val.value"></el-option>
+                  <el-option v-for="val in bloodOption" :key="val.value" :label="val.label" :value="val.value"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
@@ -301,13 +290,7 @@
                     v-model="formDataDetail.education"
                     placeholder="请选择"
                   >
-                    <el-option label="小学" value="小学"></el-option>
-                    <el-option label="初中" value="初中"></el-option>
-                    <el-option label="高中" value="高中"></el-option>
-                    <el-option label="专科" value="专科"></el-option>
-                    <el-option label="本科" value="本科"></el-option>
-                    <el-option label="硕士" value="硕士"></el-option>
-                    <el-option label="博士" value="博士"></el-option>
+                  <el-option v-for="val in educationOption" :key="val.value" :label="val.label" :value="val.value"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
@@ -541,6 +524,53 @@ export default {
     },
   },
   methods: {
+    beforeTabLeave() {
+      // let p = new Promise((resolve, reject) => {
+      //   this.$refs.formData.validate(async (valid) => {
+      //     valid ? resolve() : reject();
+      //     if (valid !== resolve()) {
+      //       // this.$message.error("请完善基本信息!");
+      //     }
+      //   });
+      // });
+      // return p;
+    },
+     //状态改变时
+     statusChange(e) {
+      if (e == 0) {
+        this.$set(this.formDataRules, "logoutTime", [
+          { required: true, message: "请选择日期", trigger: "change" },
+        ]);
+      } else {
+        this.formDataRules.logoutTime = undefined;
+      }
+    },
+    identityChange(iden) {
+      let sex = null;
+      let birth = null;
+      let myDate = new Date();
+      let month = myDate.getMonth() + 1;
+      let day = myDate.getDate();
+      sex = iden.substring(16, 17);
+      birth =
+        iden.substring(6, 10) +
+        "-" +
+        iden.substring(10, 12) +
+        "-" +
+        iden.substring(12, 14);
+      let age = 0;
+      if (
+        iden.substring(10, 12) < month ||
+        (iden.substring(10, 12) == month && iden.substring(12, 14) <= day)
+      )
+        age++;
+      if (sex % 2 === 0) sex = "女";
+      else sex = "男";
+      this.formDataDetail.birthday = birth;
+      this.formDataDetail.sex = this.sexoptions.find(
+        (val) => sex == val.label
+      ).value;
+    },
       // 下一步
       nextStep() {
         this.$refs.formData.validate((valid) => {