瀏覽代碼

feat:留资弹窗添加公司类型

tsz 3 年之前
父節點
當前提交
c641eb92c2

+ 60 - 2
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_strud.html

@@ -68,6 +68,8 @@
                         </div>
                         <van-field @input="entOnChange('input')" @blur="getCheckMap('company')" @focus="infoCheckMap.company = ''"
                                    :error-message="infoCheckMap.company" required v-model.trim="infoMap.company" label="公司名称" placeholder="请输入公司名称"></van-field>
+                        <van-field required v-model="infoMap.companyType" label="公司类型"
+                                   @click="openPop('公司类型')" readonly is-link placeholder="请选择公司类型"></van-field>
                         <van-field :class="{'hide-border': infoMap.position === '其他'}"  v-model="infoMap.position" required label="职位" @click="openPop('职位')" readonly is-link
                                    placeholder="请选择职位"></van-field>
                         <van-field class="other-input-group" @focus="infoCheckMap.position_other = ''"
@@ -163,6 +165,7 @@
         vercode: '',
         email: '',
         company: '',
+        companyType: '',
         position: '',
         position_other: '',
         branch: ''
@@ -184,6 +187,35 @@
         title: ''
       },
       conditionMap: {
+        '公司类型': [{
+            title: '投标企业',
+            checked: false
+          },
+          {
+            title: '招标采购单位',
+            checked: false
+          },
+          {
+            title: '厂商',
+            checked: false
+          },
+          {
+            title: '招标代理机构',
+            checked: false
+          },
+          {
+            title: '经销商',
+            checked: false
+          },
+          {
+            title: '服务提供商',
+            checked: false
+          },
+          {
+            title: '其他',
+            checked: false
+          }
+        ],
         '职位': [
           {
             title: '总裁',
@@ -239,6 +271,7 @@
         "source": utils.getParam('source'), // 推送消息点进来的
         "mail": "",
         "company": "",
+        "companyType": "",
         "position": "",
         "branch": ''
       },
@@ -282,6 +315,12 @@
         }
         return true
       },
+      checkEntType() {
+        if (this.infoMap.companyType === '') {
+          return false
+        }
+        return true
+      },
       isMoreSelect () {
         return this.popInfo.label === '公司类型'
       },
@@ -305,7 +344,7 @@
         }
       },
       isSubmitDisabled () {
-        return !this.checkName || !this.checkPhone || !this.checkEmail || !this.checkEntName || !this.vercodecor || !this.checkPosition || this.checkBranch
+        return !this.checkName || !this.checkPhone || !this.checkEmail || !this.checkEntName || !this.checkEntType || !this.vercodecor || !this.checkPosition || this.checkBranch
       },
       isNextDisabled () {
         var type = this.popInfo.label
@@ -319,6 +358,10 @@
             result = this.conditionMap[type].filter(v => v.checked).length
             break
           }
+          case '公司类型': {
+            result = this.conditionMap[type].filter(v => v.checked).length
+            break
+          }
         }
         return !result
       },
@@ -435,7 +478,7 @@
               this.setcodeShow = true
             }
             this.setEchoInfo(r.data)
-            var result = checkRequiredKeys(['name', 'phone', 'company', 'mail', 'position', 'branch'], r.data)
+            var result = checkRequiredKeys(['name', 'phone', 'company', 'companyType', 'mail', 'position', 'branch'], r.data)
             if (result) {
               var skipAuto = ['jyarticle_see3', 'article_collection', 'article_original', 'jypush_see10']
               var _this = this
@@ -482,6 +525,9 @@
         }, true)
       },
       setEchoInfo (data) {
+        if (data.companyType) {
+          this.setCheckForData('companyType', 'companyType', data.companyType, '公司类型')
+        }
         if (data.position) {
           this.setCheckForData('position', 'position', data.position, '职位')
         }
@@ -512,6 +558,9 @@
         }
         if (label) {
           var checkDatas = [cKey]
+          if (label === '公司类型') {
+            checkDatas = cKey.split(',')
+          }
           this.conditionMap[label].forEach(v => {
             if (checkDatas.indexOf(v.title) !== -1) {
               v.checked = true
@@ -532,6 +581,11 @@
             this.setCheckForData('branch', 'branch', tempData[0].title)
             break
           }
+          case '公司类型': {
+            var tempData = this.conditionMap[type].filter(v => v.checked).map(v => v.title)
+            this.setCheckForData('companyType', 'companyType', tempData.join(','))
+            break
+          }
         }
         this.popInfo.show = false
       },
@@ -545,6 +599,10 @@
             this.popInfo.title = '部门'
             break
           }
+          case '公司类型': {
+            this.popInfo.title = '公司类型'
+            break
+          }
         }
         this.popInfo.label = type
         this.popInfo.show = true

+ 29 - 0
src/web/staticres/common-module/pc-dialog/js/leave-info-dialog.js

@@ -54,6 +54,19 @@ var temp = `
                     <div class="company-list" v-for="item in companyList" :key="item" @click="selectCompany(item)" v-html="item"></div>
                   </div>
                 </div>
+                <div class="long-control" >
+                  <el-form-item label="公司类型 :" class="company-type" prop="companyType">
+                    <el-checkbox-group v-model="form.companyType">
+                      <el-checkbox label="投标企业"></el-checkbox>
+                      <el-checkbox label="招标采购单位"></el-checkbox>
+                      <el-checkbox label="厂商"></el-checkbox>
+                      <el-checkbox label="招标代理机构"></el-checkbox>
+                      <el-checkbox label="经销商"></el-checkbox>
+                      <el-checkbox label="服务提供商"></el-checkbox>
+                      <el-checkbox label="其他"></el-checkbox>
+                    </el-checkbox-group>
+                  </el-form-item>
+                </div>
                 <div class="long-control">
                   <el-form-item label="职位 :" prop="job">
                     <el-select v-model="form.job" placeholder="请选择职位"  class="item-input short-input" clearable>
@@ -209,6 +222,13 @@ var vm = new Vue({
         }
       }
     }
+    var validComType = function(rule,value,callback) {
+      if (value.length === 0) {
+        return callback(new Error('公司类型为必填项'));
+      } else {
+        callback();
+      }
+    }
     var validJob = function(rule,value,callback) {
       if(value === '') {
         return callback(new Error('职位为必填项'));
@@ -232,6 +252,7 @@ var vm = new Vue({
         mail: '', // 邮箱
         code: '', // 短信验证码
         companyName: '', // 公司名称
+        companyType: [], // 公司类型
         job: '', // 职位值
         otherJob: '', //自定义职位
         branch: ''
@@ -277,6 +298,13 @@ var vm = new Vue({
             trigger: 'blur'
           }
         ],
+        companyType: [
+          {
+            required: true,
+            validator: validComType,
+            trigger: 'blur'
+          }
+        ],
         job: [
           {
             required: true,
@@ -496,6 +524,7 @@ var vm = new Vue({
         phone: this.form.phone,
         mail: this.form.mail,
         company: this.form.companyName, // 公司名称
+        companyType: this.form.companyType.join(','),
         position: this.form.job == '其他' ?  this.form.job + '/' + this.form.otherJob : this.form.job,
         code: this.form.code,
         agree: true, // 原来留资模块的同意协议字段,,,默认传一个true 方便后端处理

+ 8 - 3
src/web/staticres/frontRouter/pc/bidedoc/js/index-pc.js

@@ -32,7 +32,8 @@ var vm = new Vue({
       ruleBide: {
         name: '',
         phone: '',
-        companyName: ''
+        companyName: '',
+        companyType: []
       },
       companyList: [],
       rules: {
@@ -45,6 +46,9 @@ var vm = new Vue({
         companyName: [
           { required: true, message: '请输入公司名称', trigger: 'blur' }
         ],
+        companyType: [
+          { required: true, message: '公司类型为必填项', trigger: 'blur' }
+        ]
       }
     }
   },
@@ -79,7 +83,7 @@ var vm = new Vue({
         },
         success:function (res) {
           // 判断当前信息否在其他页面留资  如果全部留资 直接弹窗提交成功
-          var checkKeys = ['name', 'phone', 'company']
+          var checkKeys = ['name', 'phone', 'company', 'companyType']
           var result = checkRequiredKeys(checkKeys, res.info)
           if (result) {
             _this.showSuccess = true
@@ -197,7 +201,8 @@ var vm = new Vue({
         source: source,
         name: this.ruleBide.name,
         phone: this.ruleBide.phone,
-        company: this.ruleBide.companyName
+        company: this.ruleBide.companyName,
+        companyType: this.ruleBide.companyType.join(','),
       }
       if (info) {
         params = info

+ 23 - 1
src/web/staticres/frontRouter/pc/solution/js/pc-collect-solution-info.js

@@ -48,6 +48,19 @@ var temps = `
                     <div class="company-list" v-for="item in companyList" :key="item" @click="selectCompany(item)" v-html="item"></div>
                   </div>
                 </div>
+                <div class="long-control" >
+                  <el-form-item label="公司类型 :" class="company-type" prop="companyType">
+                    <el-checkbox-group v-model="form.companyType">
+                      <el-checkbox label="投标企业"></el-checkbox>
+                      <el-checkbox label="招标采购单位"></el-checkbox>
+                      <el-checkbox label="厂商"></el-checkbox>
+                      <el-checkbox label="招标代理机构"></el-checkbox>
+                      <el-checkbox label="经销商"></el-checkbox>
+                      <el-checkbox label="服务提供商"></el-checkbox>
+                      <el-checkbox label="其他"></el-checkbox>
+                    </el-checkbox-group>
+                  </el-form-item>
+                </div>
                 <div class="long-control">
                   <el-form-item label="职位 :" prop="job">
                     <el-select v-model="form.job" placeholder="请选择职位" data-short-input clearable>
@@ -184,6 +197,7 @@ var vmSolution = new Vue({
         name: '', // 姓名
         phone: '', // 手机号
         companyName: '', // 公司名称
+        companyType: [], // 公司类型
         job: '', // 职位值
         otherJob: '', //自定义职位
         agreeChecked: true,
@@ -211,6 +225,13 @@ var vmSolution = new Vue({
             trigger: 'blur'
           }
         ],
+        companyType: [
+          {
+            required: true,
+            message:'公司类型为必填项',
+            trigger: 'blur'
+          }
+        ],
         job: [
           {
             required: true,
@@ -333,7 +354,7 @@ var vmSolution = new Vue({
           source: source
         },
         success:function (res) {
-          var checkKeys = ['name', 'phone', 'company', 'branch', 'position']
+          var checkKeys = ['name', 'phone', 'company', 'companyType', 'branch', 'position']
           var result = checkRequiredKeys(checkKeys, res.info)
           if (result) {
             callback && callback()
@@ -386,6 +407,7 @@ var vmSolution = new Vue({
         name: this.form.name,
         phone: this.form.phone,
         company: this.form.companyName, // 公司名称
+        companyType: this.form.companyType.join(','),
         platform: 'pc',
         position: this.form.job == '其他' ? ('其他/' + this.form.otherJob) : this.form.job,
         branch: this.form.branch.indexOf('总裁') > -1 || this.form.branch.indexOf('总经理') > -1 || !this.form.job?  '' : this.form.branch