Parcourir la source

下拉选择框

sunyize il y a 2 ans
Parent
commit
9e9f20f7c9
1 fichiers modifiés avec 277 ajouts et 76 suppressions
  1. 277 76
      src/views/networkAccess/registration.vue

+ 277 - 76
src/views/networkAccess/registration.vue

@@ -46,16 +46,30 @@
               <!--                  <j-date :show-time="true"  prop="cardStartTime" date-format="YYYY-MM-DD" placeholder="请选择开始时间" class="query-group-cust" v-model="model.cardStartTime"></j-date>-->
               <!--                </a-form-item>-->
               <!--              </a-col>-->
-
-              <a-col :span="12"  >
-                <a-form-item label="身份证证件有效期"  prop="industry" @click="showCheck0('cardStartTime')" :labelCol="{ span:6 }"   :wrapperCol="{ span: 16 }"   style="margin: 0px 0px">
-                  <j-date :show-time="true" date-format="YYYY-MM-DD" placeholder="请选择开始时间" class="query-group-cust"
-                          v-model="model.cardStartTime"   id ="cardStartTime" @change="showCheck0('cardStartTime')"></j-date>
-                  <span class="query-group-split-cust"></span>
-                  <j-date :show-time="true" date-format="YYYY-MM-DD" placeholder="请选择结束时间" class="query-group-cust"
-                          v-model="model.cardEndTime"  id="cardEndTime" @change="showCheck0('cardEndTime')"></j-date>
-                  <div v-if="cardDateNull" style="color: red">请选择身份证证件有效期</div>
-                </a-form-item>
+              <a-col :span="6">
+                <a-form-model-item label="身份证地址"   prop="industry" :labelCol="{ span:8 }"   :wrapperCol="{ span: 14 }"   >
+                  <!--                  <a-radio-group v-model="model.cardName" button-style="solid" prop="cardNo">-->
+                  <a-input v-model="model.idCardAddress" placeholder="身份证地址"  id="idCardAddress"  @blur="showCheck0('idCardAddress')"></a-input>
+                  <!--                  </a-radio-group>-->
+                </a-form-model-item>
+              </a-col>
+              <a-col :span="6"  >
+<!--                <a-form-item label="身份证证件有效期"  prop="industry" @click="showCheck0('cardStartTime')" :labelCol="{ span:6 }"   :wrapperCol="{ span: 16 }"   style="margin: 0px 0px">-->
+<!--                  <j-date :show-time="true" date-format="YYYY-MM-DD" placeholder="请选择开始时间" class="query-group-cust"-->
+<!--                          v-model="model.cardStartTime"   id ="cardStartTime" @change="showCheck0('cardStartTime')"></j-date>-->
+<!--                  <span class="query-group-split-cust"></span>-->
+<!--                  <j-date :show-time="true" date-format="YYYY-MM-DD" placeholder="请选择结束时间" class="query-group-cust"-->
+<!--                          v-model="model.cardEndTime"  id="cardEndTime" @change="showCheck0('cardEndTime')"></j-date>-->
+<!--                  <div v-if="cardDateNull" style="color: red">请选择身份证证件有效期</div>-->
+<!--                </a-form-item>-->
+                <a-form-model-item label="身份证是否在有效期" prop="modelOperator" :labelCol="{ span:12 }"
+                                   :wrapperCol="{ span: 11 }" style="margin: 0px 0px">
+                  <a-radio-group v-model="model.cardStartTimeAndEnd" button-style="solid" id="cardStartTimeAndEnd" @change="showCheck0('cardStartTimeAndEnd')">
+                    <a-radio value="1"  >是</a-radio>
+                    <a-radio value="2"  >否</a-radio>
+                  </a-radio-group>
+                  <div v-if="cardStartTimeAndEndShow" style="color: red">身份证是否在有效期</div>
+                </a-form-model-item>
               </a-col>
 
             </a-row>
@@ -111,7 +125,8 @@
               <!--                </a-form-model-item>-->
               <!--              </a-col>-->
               <a-col :span="10">
-                <a-form-model-item label="运营商类型"  v-bind="labelCol2" prop="operatorType" style="margin: 0px 0px">
+                <a-form-model-item label="运营商类型" :labelCol="{ span:9 }"
+                                   :wrapperCol="{ span: 13}" prop="operatorType" style="margin: 0px 0px">
                   <a-radio-group v-model="model.operatorType" button-style="solid"  @change="showCheck0('operatorType')">
 
                     <a-radio value="1">移动</a-radio>
@@ -144,24 +159,52 @@
 <!--                  <a-radio-group v-model="model.phonePurpose" button-style="solid">-->
                     <a-input v-model="model.phonePurpose" placeholder="请输入用途" id="phonePurpose" @blur="showCheck0('phonePurpose')"></a-input>
 <!--                  </a-radio-group>-->
+
                 </a-form-model-item>
+                <a-button type="link" danger>Link</a-button>
               </a-col>
               <a-col :span="7">
 
                   <a-form-model-item label="客户所属行业"    prop="industry" :labelCol="{ span:8 }"   :wrapperCol="{ span: 12 }"style="margin: 0px 0px">
-                    <j-dict-select-tag placeholder="请选择客户所属行业" v-model="model.industry"  dictCode="custom_industry" id="industry" @change="showCheck0('industry')" />
+<!--                    <j-dict-select-tag placeholder="请选择客户所属行业" v-model="model.industry"  dictCode="custom_industry" id="industry" @change="showCheck0('industry')" />-->
+                    <div @click="handleSearch('')">
+
+                      <a-auto-complete
+                        style="width: 180px"
+                        placeholder="输入搜索关键字"
+                        option-label-prop="value"
+                        @select="handleSelect"
+                        @search="handleSearch"
+                        v-model="model.industry"
+                        :defaultActiveFirstOption="false"
+                        :allowClear="true">
+                        <a-spin v-if="fetching" class="auto-spin" slot="notFoundContent" size="small"   />
+                        <template slot="dataSource">
+                          <a-select-option v-for="(item, index) in getDataSysDictItem" :key="index" :value="item.value" @click="clickhandleSearch(item.value)"  >
+                            <a-row type="flex" justify="space-between" align="middle"  @change="showCheck0('industry')">
+                              <a-col>{{ item.value }}</a-col>
+
+                            </a-row>
+
+                          </a-select-option>
+
+                        </template>
+                      </a-auto-complete>
+                    </div>
+                    <a-input  v-if="industryNullQiTa" v-model="industryQiTa"   placeholder="请填写客户所属行业(其它)" id="" @keyup="showCheck0('industryQiTa')"></a-input>
                     <div v-if="industryNull" style="color: red"  >请选择客户所属行业</div>
                   </a-form-model-item>
 
+
               </a-col>
-              <a-col :span="8">
-                <a-form-model-item label="客户现用号码" prop="modelOperator" :labelCol="{ span:9 }"
-                                   :wrapperCol="{ span: 15 }" style="margin: 0px 0px">
-                  <a-radio-group v-model="model.operator" button-style="solid" id="operator"@change="showCheck0('operator')">
+              <a-col :span="9">
+                <a-form-model-item label="客户现用号码一证通查结果" prop="modelOperator" :labelCol="{ span:10 }"
+                                   :wrapperCol="{ span: 13}" style="margin: 0px 0px">
+                  <a-radio-group v-model="model.operator" button-style="solid" id="operator" @change="showCheck0('operator')">
                     <a-radio value="1"  >本地运营商</a-radio>
                     <a-radio value="2"  >异地运营商</a-radio>
                   </a-radio-group>
-                  <div v-if="operatorNull" style="color: red">请选择客户现用号码</div>
+                  <div v-if="operatorNull" style="color: red">请选择客户现用号码一证通查结果</div>
                 </a-form-model-item>
               </a-col>
 
@@ -176,9 +219,9 @@
               <a-col :span="15">
                 <a-form-model-item label="拨测结果" prop="calltestResultsName" :labelCol="{ span: 3 }" :wrapperCol="{ span: 15 }" style="margin: 0px 0px">
                   <a-radio-group v-model="model.calltestResults" button-style="solid" @change="showCheck0('calltestResults')">
-                    <a-radio value="1" >关机</a-radio>
-                    <a-radio value="2" >未接通</a-radio>
-                    <a-radio value="3" >可接通不知晓入网事宜</a-radio>
+                    <a-radio value="1"  style="color: red">关机</a-radio>
+                    <a-radio value="2"  style="color: red">未接通</a-radio>
+                    <a-radio value="3"  style="color: red">可接通不知晓入网事宜</a-radio>
                     <a-radio value="4"  >可接通认可办理</a-radio>
                   </a-radio-group>
                   <a-button type="link" style="color: red" v-if="this.model.calltestResults==='1' ">拨测号码关机!</a-button>
@@ -534,21 +577,29 @@
 
                 <a-row>
                   <a-col :span="24">
-                    <a-form-model-item label="" prop="userOpenState" v-bind="labelCol2" :labelCol="{span:3}"
-                                       :wrapperCol="{span:24}">
+                    <a-form-model-item label="智能地址研判" prop="userOpenState"  :labelCol="{span:7}"
+                                       :wrapperCol="{span:12}">
                       <a-radio-group v-model="model.judgmentResearch" button-style="solid"  @change="showCheck0('judgmentResearch')">
-                        <a-radio value="1" style="color: red ;margin-left: 30px">智能判研-异常</a-radio>
-                        <a-radio value="4">智能判研-正常</a-radio>
-                        <a-radio value="3" style="color: red">人工判研-异常</a-radio>
-                        <a-radio value="2">人工判研-正常</a-radio>
-
+                        <a-radio value="1" style="color: red ">智能判研-异常</a-radio>
+                        <a-radio value="2">智能判研-正常</a-radio>
                       </a-radio-group>
 
-                      <div v-if="judgmentResearchNull" style="color: red;margin-left: 40px">请选择判研结果</div>
+                      <div v-if="judgmentResearchNull" style="color: red;margin-left: 40px">请选择地址研判</div>
+                    </a-form-model-item>
+                  </a-col>
+                </a-row>
+                <a-row>
+                  <a-col :span="24">
+                    <a-form-model-item label="人工地址判研" prop="userOpenState"  :labelCol="{span:7}"
+                                       :wrapperCol="{span:12}">
+                      <a-radio-group v-model="model.judgmentResearchAddress" button-style="solid"  @change="showCheck0('judgmentResearchAddress')">
+                        <a-radio value="1" style="color: red">人工判研-异常</a-radio>
+                        <a-radio value="2">人工判研-正常</a-radio>
+                      </a-radio-group>
+                      <div v-if="judgmentResearchAddressShow" style="color: red;margin-left: 40px">请选择判研结果</div>
                     </a-form-model-item>
                   </a-col>
                 </a-row>
-
 
               </a-col>
 
@@ -569,6 +620,7 @@
 
     <a-card style="position: relative;bottom: 0;width: 100%">
       <div style="text-align: center">
+        <a-button v-if="   !this.showInfo" style="margin-right: 8px"  @click="terminatingOperation">终止</a-button>
         <a-button v-if="current < steps.length - 1 &&  !this.showInfo" type="primary" @click="nextSteps">下一步</a-button>
         <a-button
           v-if="current == steps.length - 1 &&  !this.showInfo"
@@ -578,7 +630,7 @@
           提交
         </a-button>
         <a-button v-if="current > 0 &&  !this.showInfo" style="margin-left: 8px" @click="prevSteps">上一步</a-button>
-
+        <a-button v-if="current==2 &&  this.showInfo" style="margin-left: 8px;margin-right: 8px" @click="terminatingPrevSteps">上一步</a-button>
 
         <a-button @click="continueOperation" type="primary" v-if="current==2 &&  this.showInfo ">
           继续操作
@@ -611,20 +663,25 @@ export default {
   mixins: [JeecgListMixin],
 
   data() {
-    return {
-      cardDateNull:false,
-      industryNull:false,
-      operatorTypeNull:false,
-      operatorNull:false,
-      calltestResultsNull:false,
-      sysBusinessHallNull:false,
-      judgmentResearchNull:false,
-      color:{
-        cardNoColor:'black'
-      },
-      validatorRules:{
 
+    return {
+      fetching: false,
+      randomId: '',
+      getSysDictItem: [],
+      getDataSysDictItem:[],
+      cardDateNull: false,
+      industryNull: false,
+      industryNullQiTa:false,
+      operatorTypeNull: false,
+      operatorNull: false,
+      calltestResultsNull: false,
+      sysBusinessHallNull: false,
+      judgmentResearchNull: false,
+      judgmentResearchAddressShow: false,
+      color: {
+        cardNoColor: 'black'
       },
+      validatorRules: {},
       calltestResultsName: '',
       companyName: '',
       hallName: '',
@@ -695,6 +752,7 @@ export default {
       addIng: false,
       url: {
         "querySizeByCardNo": "/businessReminderCard/querySizeByCardNo",
+        "getSysDictItem": "/sys/dict/getDictItems",
         "list": "",
         "add": "/businessReminderCard/add",
         "editById": "/businessReminderCard/editById",
@@ -755,7 +813,7 @@ export default {
         wrapperCol: {
           span: 15
         }
-      },labelCol1ProMax5A6: {
+      }, labelCol1ProMax5A6: {
         labelCol: {
           span: 14
         },
@@ -830,8 +888,8 @@ export default {
       //校验的规则
       rules: {
         cardNo: [
-          { required: true, message: '请输入身份证号码!' },
-          { validator: this.validateCardNo }
+          {required: true, message: '请输入身份证号码!'},
+          {validator: this.validateCardNo}
         ],
         cardName: [{
           required: true, message: '请输姓名!'
@@ -840,75 +898,75 @@ export default {
           {required: true, message: '请输入身份证证件有效期...'}
         ],
         phone: [
-          { required: true, message: '拨测联系电话!', trigger: 'blur'}
-          ],
-        modelAddress:[
-          { required: true, message: '请输入联电归属地!', trigger: 'blur'}
+          {required: true, message: '拨测联系电话!', trigger: 'blur'}
+        ],
+        modelAddress: [
+          {required: true, message: '请输入联电归属地!', trigger: 'blur'}
         ],
-        operatorType:[
+        operatorType: [
           {
             required: true,
             message: '请选择运营商类型',
             trigger: 'blur'
           }
         ],
-        phonePurpose:[
+        phonePurpose: [
           {
             required: true,
             message: '请选择新办号码用途',
             trigger: 'blur'
           }
         ],
-        industry:[
+        industry: [
           {
             required: true,
             message: '',
             trigger: 'blur'
           }
         ],
-        modelOperator:[
+        modelOperator: [
           {
             required: true,
             message: '请选择客户现用号码!',
             trigger: 'blur'
           }
         ],
-        calltestResultsName:[
+        calltestResultsName: [
           {
             required: true,
             message: '请选择拨测结果!',
             trigger: 'blur'
           }
         ],
-        sysBusinessHallAndSysCompany:[
+        sysBusinessHallAndSysCompany: [
           {
             required: true,
             message: '请选择营业厅地址!',
             trigger: 'blur'
           }
         ],
-        workAddress:[
+        workAddress: [
           {
             required: true,
             message: '请输入工作地址!',
             trigger: 'blur'
           }
         ],
-        currentAddress:[
+        currentAddress: [
           {
             required: true,
             message: '请输入现居住地址!',
             trigger: 'blur'
           }
         ],
-        isDxNumber:[
+        isDxNumber: [
           {
             required: true,
             message: '请选择客户名下无电信号码!',
             trigger: 'blur'
           }
         ],
-        judgmentResearch:[
+        judgmentResearch: [
           {
             required: true,
             message: '请选择判研结果结果!',
@@ -922,7 +980,7 @@ export default {
       showsearchResult: false,
       showsearchResultBusinessAddress: true,
       showsearchcurrentAddress: false,
-      numberResults:false,
+      numberResults: false,
       addressG: '',
       lnglat: {},
       distance: '20',
@@ -931,13 +989,19 @@ export default {
       distance3: '',
       showInfo: false,
       newDatas: [],
+      cardStartTimeAndEnd: '',
+      cardStartTimeAndEndShow: false,
+      industryQiTa:'',
       //表单信息
       model: {
-        value:0,
+        cardStartTimeAndEnd: '',
+
+        value: 0,
         sysBusinessHall: '',
         company: '',
         industry: '',
         judgmentResearch: '',
+        judgmentResearchAddress: '',
         isShutDownNote: '',
         isShutDown: '',
         isRefundNote: '',
@@ -1005,10 +1069,84 @@ export default {
     //DOM初始化完成进行地图初始化
     this.initMap();
     this.queryById();
-
+    this.getSysDictItems()
   },
 
   methods: {
+// 特定范围随机数
+    genRandom(min, max) {
+      return (Math.random() * (max - min + 1) | 0) + min
+    },
+    clickhandleSearch(data){
+    //  this.model.industry=data;
+      if (data!==null && data!==''){
+        this.industryNull=false;
+      }
+
+      if (data==='其它'){
+        this.industryNullQiTa=true
+        this.industryNull=true;
+      }else{
+        this.industryNullQiTa=false
+      }
+
+    },
+
+
+    handleSearch(val) {
+
+      this.fetching = false
+      this.getDataSysDictItem=this.getSysDictItem;
+      var getDataSysDictItem =[]
+      if (val !== '') {
+        for (var i in  this.getDataSysDictItem) {
+          if (this.getDataSysDictItem[i].text.match(RegExp(val))){
+            getDataSysDictItem.push(this.getDataSysDictItem[i])
+          }
+        }
+        this.getDataSysDictItem =getDataSysDictItem
+      }
+
+
+    },
+    handleSelect(val, option) {
+      console.log(val, option, 1000)
+    },
+
+
+  // 显示上传页面
+  handSubmit(record) {
+    let that = this;
+    let model = {
+      id: record.id,
+    }
+    postAction(this.url.editCheck, model)
+      .then((res) => {
+        if (res.success) {
+          that.$message.success(res.message)
+          that.loadData(that.ipagination.current);
+        } else {
+          that.$message.warning(res.message)
+        }
+      }).finally(() => {
+
+    })
+  },
+
+  //查询字典表
+  getSysDictItems() {
+
+    getAction(this.url.getSysDictItem + '/sys_dict_item,item_text,item_text,dict_id="1689217057012424706"').then((res) => {
+      if (res.success) {
+        let result = res.result;
+
+        if (result != null) {
+          this.getSysDictItem = result;
+          this.getDataSysDictItem=result;
+        }
+      }
+    })
+  },
 
     validateMobile(rule, value, callback) {
       let reg = /^1(3|4|5|7|8)\d{9}$/
@@ -1521,6 +1659,21 @@ export default {
                     that.change(result[0][key]);
                   }
                   view[key] = result[0][key];
+                  if (key==='industry'){
+
+                    var a=0;
+                    for (var s in  that.getDataSysDictItem) {
+                      if (that.getDataSysDictItem[s].text.match(RegExp(result[0][key]))){
+                          a++;
+                      }
+                    }
+                    if (a===0){
+                      view.industry='其它';
+                      that.industryQiTa= result[0][key];
+                      that.industryNullQiTa=true;
+                    }
+                  }
+
                 })
 
                 for (var item of this.sysCompany) {
@@ -1537,22 +1690,22 @@ export default {
                   }
                 }
                 this.isSizeNumberResults = result[i]["isSizeNumberResults"];
-                if (this.model.wordAddress!=='' && this.model.wordAddress!==null){
-                  this.searchKeyWordsysBusinessHall(this.model.wordAddress,'wordAddress');
-                }
-
-                if (this.hallName!=='' && this.hallName!==null){
-                  this.searchKeyWordsysBusinessHall('中国电信'+this.hallName,'businessAddress');
-                }
-                if (this.model.currentAddress!=='' && this.model.currentAddress!==null){
-                  this.searchKeyWordsysBusinessHall(this.model.currentAddress,'currentAddress');
-                }
+                // if (this.model.wordAddress!=='' && this.model.wordAddress!==null){
+                //   this.searchKeyWordsysBusinessHall(this.model.wordAddress,'wordAddress');
+                // }
+                //
+                // if (this.hallName!=='' && this.hallName!==null){
+                //   this.searchKeyWordsysBusinessHall('中国电信'+this.hallName,'businessAddress');
+                // }
+                // if (this.model.currentAddress!=='' && this.model.currentAddress!==null){
+                //   this.searchKeyWordsysBusinessHall(this.model.currentAddress,'currentAddress');
+                // }
                 if (info===''){
                   this.model.id=null;
                 }
               }
 
-
+              this.showCheck0('all');
               if (result[i]["isSizeNumberResults"] === 'is') {
                 this.$confirm({
                   title: "确认是否继续...",
@@ -1612,6 +1765,12 @@ export default {
         }else {
           document.getElementById('cardNo').style.borderColor = "#d9d9d9";
         }  }
+      if (data==='all' || data==='idCardAddress'){ if (this.model.idCardAddress==='' || this.model.idCardAddress===null){
+        document.getElementById('idCardAddress').style.borderColor = "red";
+        info=false;
+      }else {
+        document.getElementById('idCardAddress').style.borderColor = "#d9d9d9";
+      }  }
      if (data==='all' || data==="cardName"){ if (this.model.cardName==='' || this.model.cardName===null){
        document.getElementById('cardName').style.borderColor = "red";
        info=false;
@@ -1642,6 +1801,20 @@ export default {
       }else {
         this.industryNull=false
       }}
+
+         if (this.model.industry==='' || this.model.industry===null || this.model.industry==='其它'){
+           {
+             if (data === 'all' || data === "industryQiTa") {
+               if (this.industryQiTa === '' || this.industryQiTa === null) {
+                 this.industryNull = true
+                 info = false;
+               } else {
+                 this.industryNull = false
+               }
+
+             }
+           }
+        }
       if (data==='all' || data==="wordAddress"){ if (this.model.wordAddress===''||  this.model.wordAddress===null){
         document.getElementById('wordAddress').style.borderColor = "red";
         info=false;
@@ -1660,6 +1833,19 @@ export default {
       }else {
         this.calltestResultsNull=false;
       } }
+
+      if (data==='all' || data==="judgmentResearchAddress"){ if (this.model.judgmentResearchAddress===''|| this.model.judgmentResearchAddress===null){
+        this.judgmentResearchAddressShow=true;
+        info=false;
+      }else {
+        this.judgmentResearchAddressShow=false;
+      } }
+      if (data==='all' || data==="cardStartTimeAndEnd"){ if (this.model.cardStartTimeAndEnd===''|| this.model.cardStartTimeAndEnd===null){
+        this.cardStartTimeAndEndShow=true;
+        info=false;
+      }else {
+        this.cardStartTimeAndEndShow=false;
+      } }
       if (data==='all' || data==="judgmentResearch"){
             if (this.model.judgmentResearch===''|| this.model.judgmentResearch===null){
                 this.judgmentResearchNull=true;
@@ -1883,7 +2069,13 @@ export default {
         this.current = this.current - 1;
       }
     },
-
+    /**终止操作页面上一步骤*/
+    terminatingPrevSteps() {
+      this.showInfo=false;
+      if (this.current != 0) {
+        this.current = 1;
+      }
+    },
 
     getData() {
       var arr = '';
@@ -1896,6 +2088,9 @@ export default {
       if (this.model.numberResults !== undefined && this.model.numberResults !== "undefined" && this.model.numberResults !==''&& this.model.numberResults !==null && this.model.numberResults.length!==0 ) {
         arr = this.model.numberResults+'';
       }
+      if (this.industryQiTa!=='' || this.industryQiTa!==null){
+        this.model.industry = this.industryQiTa;
+      }
       let data = {
         "sysBusinessHall": this.model.sysBusinessHall,
         "company": this.model.company,
@@ -1961,7 +2156,8 @@ export default {
 
         //是否将高危号码上报蓝、紫名单或不可复开关停
         "numberResults": arr ,
-
+        "cardStartTimeAndEnd":this.model.cardStartTimeAndEnd,
+        "judgmentResearchAddress":this.model.judgmentResearchAddress,
         "cardNo": this.model.cardNo,
         "cardName": this.model.cardName,
         "cardStartTime": this.model.cardStartTime,
@@ -1982,7 +2178,12 @@ export default {
       if (data["status"] === '0') {
         mes = "终止操作 数据保存成功! "
       }
-
+      if (this.model.cardNo==='' || this.model.cardNo===null ||  this.model.cardNo===undefined){
+        this.clearModel()
+        this.$message.success('身份证信息为空,暂不保持', 7);
+        this.addIng == true;
+        return
+      }
       if (id == null) {
 
         postAction("/businessReminderCard/add", data).then((res) => {