Browse Source

feat:留资职位调整、增加部门选项

yangfeng 3 years ago
parent
commit
4ff98c723f

+ 68 - 29
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info.html

@@ -72,6 +72,7 @@
                                    placeholder="请选择职位"></van-field>
                                    placeholder="请选择职位"></van-field>
                         <van-field class="other-input-group" @focus="infoCheckMap.position_other = ''" @blur="getCheckMap('position')"
                         <van-field class="other-input-group" @focus="infoCheckMap.position_other = ''" @blur="getCheckMap('position')"
                                    :error-message="infoCheckMap.position_other" v-model.trim="infoMap.position_other" v-show="infoMap.position === '其他' && moduleShow.position" label="职位" placeholder="请输入职位"></van-field>
                                    :error-message="infoCheckMap.position_other" v-model.trim="infoMap.position_other" v-show="infoMap.position === '其他' && moduleShow.position" label="职位" placeholder="请输入职位"></van-field>
+                        <van-field v-if="showBranch" v-model="infoMap.branch" required label="部门" @click="openPop('部门')" readonly is-link placeholder="请选择部门"></van-field>
                         <van-field v-if="moduleShow.company_size" v-model="infoMap.company_size" label="公司规模" @click="openPop('公司规模')" readonly is-link
                         <van-field v-if="moduleShow.company_size" v-model="infoMap.company_size" label="公司规模" @click="openPop('公司规模')" readonly is-link
                                    placeholder="请选择公司规模"></van-field>
                                    placeholder="请选择公司规模"></van-field>
                         <van-field v-if="moduleShow.workScope" maxlength="200" v-model="infoMap.workScope" label="业务范围" rows="2" type="textarea"
                         <van-field v-if="moduleShow.workScope" maxlength="200" v-model="infoMap.workScope" label="业务范围" rows="2" type="textarea"
@@ -379,7 +380,8 @@
         company_size: '',
         company_size: '',
         workScope: '',
         workScope: '',
         partnerNeeds: '',
         partnerNeeds: '',
-        position_other: ''
+        position_other: '',
+        branch: ''
       },
       },
       infoCheckMap: {
       infoCheckMap: {
         name: '',
         name: '',
@@ -387,7 +389,8 @@
         email: '',
         email: '',
         company: '',
         company: '',
         position: '',
         position: '',
-        position_other: ''
+        position_other: '',
+        branch: ''
       },
       },
       isEchoInfoLoading: true,
       isEchoInfoLoading: true,
       popInfo: {
       popInfo: {
@@ -442,43 +445,27 @@
         ],
         ],
         '职位': [
         '职位': [
           {
           {
-            title: '总裁/总经理/总监',
+            title: '总裁',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '市场经理/主管',
+            title: '总经理',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '销售经理/主管',
+            title: '总监',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '渠道经理/主管',
+            title: '经理',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '投标经理/专员',
+            title: '主管',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '采购经理/专员',
-            checked: false
-          },
-          {
-            title: '数据分析师',
-            checked: false
-          },
-          {
-            title: '招标师',
-            checked: false
-          },
-          {
-            title: '项目经理',
-            checked: false
-          },
-          {
-            title: '其他',
+            title: '职员',
             checked: false
             checked: false
           }
           }
         ],
         ],
@@ -508,6 +495,24 @@
             checked: false
             checked: false
           }
           }
         ],
         ],
+        '部门': [
+          {
+            title: '市场',
+            checked: false
+          },
+          {
+            title: '产品',
+            checked: false
+          },
+          {
+            title: '销售',
+            checked: false
+          },
+          {
+            title: '渠道',
+            checked: false
+          }
+        ]
       },
       },
       ajaxParams: {
       ajaxParams: {
         "name": "",
         "name": "",
@@ -524,7 +529,8 @@
         "position": "",
         "position": "",
         "company_size": "",
         "company_size": "",
         "workScope": "",
         "workScope": "",
-        "partnerNeeds": ""
+        "partnerNeeds": "",
+        "branch": ''
       },
       },
       // 默认为隐藏,需要展示则需判断
       // 默认为隐藏,需要展示则需判断
       moduleShow: {
       moduleShow: {
@@ -537,7 +543,7 @@
         company_size: false,
         company_size: false,
         workScope: true,
         workScope: true,
         partnerNeeds: true,
         partnerNeeds: true,
-        agree: true,
+        agree: true
       }
       }
     },
     },
     created() {
     created() {
@@ -648,7 +654,7 @@
         return namereg.test(this.infoMap.position_other)
         return namereg.test(this.infoMap.position_other)
       },
       },
       isSubmitDisabled () {
       isSubmitDisabled () {
-        return !this.checkName || !this.checkPhone || !this.checkEmail || !this.checkEntName || !this.checkPosition
+        return !this.checkName || !this.checkPhone || !this.checkEmail || !this.checkEntName || !this.checkPosition || (this.showBranch && !this.infoMap.branch)
       },
       },
       isMoreSelect () {
       isMoreSelect () {
         return this.popInfo.label === '公司类型'
         return this.popInfo.label === '公司类型'
@@ -683,8 +689,25 @@
             result = this.conditionMap[type].filter(v => v.checked).length
             result = this.conditionMap[type].filter(v => v.checked).length
             break
             break
           }
           }
+          case '部门': {
+            result = this.conditionMap[type].filter(v => v.checked).length
+            break
+          }
         }
         }
         return !result
         return !result
+      },
+      showBranch () {
+        // 切换到总裁或总经理之后 把之前选择的部门清空
+        if (this.infoMap.position.indexOf('总裁') > -1 || this.infoMap.position.indexOf('总经理') > -1) {
+          this.infoMap.branch = ''
+          this.conditionMap['部门'].forEach(v => {
+            v.checked = false
+          })
+        }
+        var zc = this.infoMap.position.indexOf('总裁') > -1
+        var zjl = this.infoMap.position.indexOf('总经理') > -1
+        var source = this.ajaxParams.source !== 'article_original' &&  this.ajaxParams.source !== 'article_collection'
+        return !(zc || zjl) && source && this.infoMap.position
       }
       }
     },
     },
     methods: {
     methods: {
@@ -817,13 +840,19 @@
           this.ajaxParams.agree = data.agree
           this.ajaxParams.agree = data.agree
           this.isRead = data.agree
           this.isRead = data.agree
         }
         }
+        // 部门
+        if (data.branch) {
+          this.setCheckForData('branch', 'branch', data.branch, '部门')
+        }
       },
       },
       setCheckForData (aKey, iKey, cKey, label) {
       setCheckForData (aKey, iKey, cKey, label) {
         this.ajaxParams[aKey] = cKey
         this.ajaxParams[aKey] = cKey
         this.infoMap[iKey] = cKey
         this.infoMap[iKey] = cKey
         if (label === '职位' && cKey.indexOf('其他') !== -1) {
         if (label === '职位' && cKey.indexOf('其他') !== -1) {
-            this.infoMap[iKey] = '其他'
-            this.infoMap.position_other = cKey.split('/')[1]
+            // this.infoMap[iKey] = '其他'
+            // this.infoMap.position_other = cKey.split('/')[1]
+            this.infoMap[iKey] = ''
+            this.infoMap.position_other = ''
         }
         }
         if (label) {
         if (label) {
           var checkDatas = [cKey]
           var checkDatas = [cKey]
@@ -881,6 +910,11 @@
             this.setCheckForData('company_size', 'company_size', tempData[0].title)
             this.setCheckForData('company_size', 'company_size', tempData[0].title)
             break
             break
           }
           }
+          case '部门': {
+            var tempData = this.conditionMap[type].filter(v => v.checked)
+            this.setCheckForData('branch', 'branch', tempData[0].title)
+            break
+          }
         }
         }
         this.popInfo.show = false
         this.popInfo.show = false
       },
       },
@@ -910,6 +944,10 @@
             this.popInfo.title = '公司规模'
             this.popInfo.title = '公司规模'
             break
             break
           }
           }
+          case '部门': {
+            this.popInfo.title = '部门'
+            break
+          }
         }
         }
         this.popInfo.label = type
         this.popInfo.label = type
         this.popInfo.show = true
         this.popInfo.show = true
@@ -992,6 +1030,7 @@
         this.ajaxParams.workScope = this.infoMap.workScope
         this.ajaxParams.workScope = this.infoMap.workScope
         this.ajaxParams.partnerNeeds = this.infoMap.partnerNeeds
         this.ajaxParams.partnerNeeds = this.infoMap.partnerNeeds
         this.ajaxParams.agree = this.isRead
         this.ajaxParams.agree = this.isRead
+        this.ajaxParams.branch = this.infoMap.branch.indexOf('总裁') > -1 || this.infoMap.branch.indexOf('总经理') > -1 ?  '' : this.infoMap.branch
         console.log(this.ajaxParams)
         console.log(this.ajaxParams)
         
         
         var _this = this
         var _this = this

+ 54 - 17
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_push.html

@@ -63,6 +63,7 @@
                                    placeholder="请选择职位"></van-field>
                                    placeholder="请选择职位"></van-field>
                         <van-field class="other-input-group" @focus="infoCheckMap.position_other = ''" @blur="getCheckMap('position')"
                         <van-field class="other-input-group" @focus="infoCheckMap.position_other = ''" @blur="getCheckMap('position')"
                                    :error-message="infoCheckMap.position_other" v-model.trim="infoMap.position_other" v-show="infoMap.position === '其他'" label="职位" placeholder="请输入职位"></van-field>
                                    :error-message="infoCheckMap.position_other" v-model.trim="infoMap.position_other" v-show="infoMap.position === '其他'" label="职位" placeholder="请输入职位"></van-field>
+                        <van-field v-if="showBranch" v-model="infoMap.branch" required label="部门" @click="openPop('部门')" readonly is-link placeholder="请选择部门"></van-field>
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
@@ -127,7 +128,8 @@
         email: '',
         email: '',
         company: '',
         company: '',
         position: '',
         position: '',
-        position_other: ''
+        position_other: '',
+        branch: ''
       },
       },
       infoCheckMap: {
       infoCheckMap: {
         name: '',
         name: '',
@@ -135,7 +137,8 @@
         email: '',
         email: '',
         company: '',
         company: '',
         position: '',
         position: '',
-        position_other: ''
+        position_other: '',
+        branch: ''
       },
       },
       isEchoInfoLoading: true,
       isEchoInfoLoading: true,
       popInfo: {
       popInfo: {
@@ -146,43 +149,45 @@
       conditionMap: {
       conditionMap: {
         '职位': [
         '职位': [
           {
           {
-            title: '总裁/总经理/总监',
+            title: '总裁',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '市场经理/主管',
+            title: '总经理',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '销售经理/主管',
+            title: '总监',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '渠道经理/主管',
+            title: '经理',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '投标经理/专员',
+            title: '主管',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '采购经理/专员',
+            title: '员',
             checked: false
             checked: false
-          },
+          }
+        ],
+        '部门': [
           {
           {
-            title: '数据分析师',
+            title: '市场',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '招标师',
+            title: '产品',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '项目经理',
+            title: '销售',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '其他',
+            title: '渠道',
             checked: false
             checked: false
           }
           }
         ]
         ]
@@ -194,6 +199,7 @@
         "mail": "",
         "mail": "",
         "company": "",
         "company": "",
         "position": "",
         "position": "",
+        "branch": ""
       }
       }
     },
     },
     mounted() {
     mounted() {
@@ -241,7 +247,7 @@
         return namereg.test(this.infoMap.position_other)
         return namereg.test(this.infoMap.position_other)
       },
       },
       isSubmitDisabled () {
       isSubmitDisabled () {
-        return !this.checkName || !this.checkPhone || !this.checkEmail || !this.checkEntName || !this.checkPosition
+        return !this.checkName || !this.checkPhone || !this.checkEmail || !this.checkEntName || !this.checkPosition || (this.showBranch && !this.infoMap.branch)
       },
       },
       isNextDisabled () {
       isNextDisabled () {
         var type = this.popInfo.label
         var type = this.popInfo.label
@@ -251,8 +257,25 @@
             result = this.conditionMap[type].filter(v => v.checked).length
             result = this.conditionMap[type].filter(v => v.checked).length
             break
             break
           }
           }
+          case '部门': {
+            result = this.conditionMap[type].filter(v => v.checked).length
+            break
+          }
         }
         }
         return !result
         return !result
+      },
+      showBranch () {
+        // 切换到总裁或总经理之后 把之前选择的部门清空
+        if (this.infoMap.position.indexOf('总裁') > -1 || this.infoMap.position.indexOf('总经理') > -1) {
+          this.infoMap.branch = ''
+          this.conditionMap['部门'].forEach(v => {
+            v.checked = false
+          })
+        }
+        var zc = this.infoMap.position.indexOf('总裁') > -1
+        var zjl = this.infoMap.position.indexOf('总经理') > -1
+        var source = this.ajaxParams.source !== 'article_original' &&  this.ajaxParams.source !== 'article_collection'
+        return !(zc || zjl) && source  && this.infoMap.position
       }
       }
     },
     },
     methods: {
     methods: {
@@ -325,14 +348,18 @@
         if (data.company) {
         if (data.company) {
           this.setCheckForData('company', 'company', data.company)
           this.setCheckForData('company', 'company', data.company)
         }
         }
-  
+        if (data.branch) {
+          this.setCheckForData('branch', 'branch', data.branch, '部门')
+        }
       },
       },
       setCheckForData (aKey, iKey, cKey, label) {
       setCheckForData (aKey, iKey, cKey, label) {
         this.ajaxParams[aKey] = cKey
         this.ajaxParams[aKey] = cKey
         this.infoMap[iKey] = cKey
         this.infoMap[iKey] = cKey
         if (label === '职位' && cKey.indexOf('其他') !== -1) {
         if (label === '职位' && cKey.indexOf('其他') !== -1) {
-            this.infoMap[iKey] = '其他'
-            this.infoMap.position_other = cKey.split('/')[1]
+            // this.infoMap[iKey] = '其他'
+            // this.infoMap.position_other = cKey.split('/')[1]
+            this.infoMap[iKey] = ''
+            this.infoMap.position_other = ''
         }
         }
         if (label) {
         if (label) {
           var checkDatas = [cKey]
           var checkDatas = [cKey]
@@ -351,6 +378,11 @@
             this.setCheckForData('position', 'position', tempData[0].title)
             this.setCheckForData('position', 'position', tempData[0].title)
             break
             break
           }
           }
+          case '部门': {
+            var tempData = this.conditionMap[type].filter(v => v.checked)
+            this.setCheckForData('branch', 'branch', tempData[0].title)
+            break
+          }
         }
         }
         this.popInfo.show = false
         this.popInfo.show = false
       },
       },
@@ -360,6 +392,10 @@
             this.popInfo.title = '职位'
             this.popInfo.title = '职位'
             break
             break
           }
           }
+          case '部门': {
+            this.popInfo.title = '部门'
+            break
+          }
         }
         }
         this.popInfo.label = type
         this.popInfo.label = type
         this.popInfo.show = true
         this.popInfo.show = true
@@ -429,6 +465,7 @@
         this.ajaxParams.mail = this.infoMap.email
         this.ajaxParams.mail = this.infoMap.email
         this.ajaxParams.company = this.infoMap.company
         this.ajaxParams.company = this.infoMap.company
         this.ajaxParams.position = this.infoMap.position
         this.ajaxParams.position = this.infoMap.position
+        this.ajaxParams.branch = this.infoMap.branch.indexOf('总裁') > -1 || this.infoMap.branch.indexOf('总经理') > -1 ?  '' : this.infoMap.branch
         if (this.infoMap.position === '其他') {
         if (this.infoMap.position === '其他') {
           this.ajaxParams.position = '其他/' + this.infoMap.position_other
           this.ajaxParams.position = '其他/' + this.infoMap.position_other
         }
         }

+ 10 - 24
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_solution.html

@@ -154,43 +154,27 @@
       conditionMap: {
       conditionMap: {
         '职位': [
         '职位': [
           {
           {
-            title: '总裁/总经理/总监',
+            title: '总裁',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '市场经理/主管',
+            title: '总经理',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '销售经理/主管',
+            title: '总监',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '渠道经理/主管',
+            title: '经理',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '投标经理/专员',
+            title: '主管',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '采购经理/专员',
-            checked: false
-          },
-          {
-            title: '数据分析师',
-            checked: false
-          },
-          {
-            title: '招标师',
-            checked: false
-          },
-          {
-            title: '项目经理',
-            checked: false
-          },
-          {
-            title: '其他',
+            title: '职员',
             checked: false
             checked: false
           }
           }
         ]
         ]
@@ -331,8 +315,10 @@
         this.ajaxParams[aKey] = cKey
         this.ajaxParams[aKey] = cKey
         this.infoMap[iKey] = cKey
         this.infoMap[iKey] = cKey
         if (label === '职位' && cKey.indexOf('其他') !== -1) {
         if (label === '职位' && cKey.indexOf('其他') !== -1) {
-            this.infoMap[iKey] = '其他'
-            this.infoMap.position_other = cKey.split('/')[1]
+            // this.infoMap[iKey] = '其他'
+            // this.infoMap.position_other = cKey.split('/')[1]
+            this.infoMap[iKey] = ''
+            this.infoMap.position_other = ''
         }
         }
         if (label) {
         if (label) {
           var checkDatas = [cKey]
           var checkDatas = [cKey]

+ 10 - 24
src/jfw/modules/app/src/web/templates/frontRouter/bigmember/free/perfect_info_strud.html

@@ -183,43 +183,27 @@
       conditionMap: {
       conditionMap: {
         '职位': [
         '职位': [
           {
           {
-            title: '总裁/总经理/总监',
+            title: '总裁',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '市场经理/主管',
+            title: '总经理',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '销售经理/主管',
+            title: '总监',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '渠道经理/主管',
+            title: '经理',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '投标经理/专员',
+            title: '主管',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '采购经理/专员',
-            checked: false
-          },
-          {
-            title: '数据分析师',
-            checked: false
-          },
-          {
-            title: '招标师',
-            checked: false
-          },
-          {
-            title: '项目经理',
-            checked: false
-          },
-          {
-            title: '其他',
+            title: '职员',
             checked: false
             checked: false
           }
           }
         ]
         ]
@@ -449,8 +433,10 @@
         this.ajaxParams[aKey] = cKey
         this.ajaxParams[aKey] = cKey
         this.infoMap[iKey] = cKey
         this.infoMap[iKey] = cKey
         if (label === '职位' && cKey.indexOf('其他') !== -1) {
         if (label === '职位' && cKey.indexOf('其他') !== -1) {
-            this.infoMap[iKey] = '其他'
-            this.infoMap.position_other = cKey.split('/')[1]
+            // this.infoMap[iKey] = '其他'
+            // this.infoMap.position_other = cKey.split('/')[1]
+            this.infoMap[iKey] = ''
+            this.infoMap.position_other = ''
         }
         }
         if (label) {
         if (label) {
           var checkDatas = [cKey]
           var checkDatas = [cKey]

+ 10 - 12
src/web/staticres/common-module/pc-dialog/js/leave-info-dialog.js

@@ -111,16 +111,12 @@ var temp = `
   `
   `
   */
   */
 var jobJson = [
 var jobJson = [
-  '总裁/总经理/总监', 
-  '市场经理/主管',
-  '销售经理/主管',
-  '渠道经理/主管',
-  '投标经理/专员',
-  '采购经理/专员',
-  '数据分析师',
-  '招标师', 
-  '项目经理', 
-  '其他'
+  '总裁', 
+  '总经理',
+  '总监',
+  '经理',
+  '主管',
+  '职员'
 ]
 ]
 var jobData = jobJson.map(function (item) {
 var jobData = jobJson.map(function (item) {
   return {
   return {
@@ -484,8 +480,10 @@ var vm = new Vue({
             _this.form.companyName = res.data.company ? res.data.company : ''
             _this.form.companyName = res.data.company ? res.data.company : ''
             if (res.data.position) {
             if (res.data.position) {
               if (res.data.position.indexOf('其他') > -1 || jobJson.indexOf(res.data.position.replace('其他/', '')) == -1) {
               if (res.data.position.indexOf('其他') > -1 || jobJson.indexOf(res.data.position.replace('其他/', '')) == -1) {
-                _this.form.job = '其他'
-                _this.form.otherJob = res.data.position.replace('其他/', '')
+                // _this.form.job = '其他'
+                // _this.form.otherJob = res.data.position.replace('其他/', '')
+                _this.form.job = ''
+                _this.form.otherJob = ''
               } else {
               } else {
                 _this.form.job = res.data.position
                 _this.form.job = res.data.position
               }
               }

+ 12 - 10
src/web/staticres/common-module/selector/js/static-data.js

@@ -200,16 +200,18 @@ var industryJson = [
   }
   }
 ]
 ]
 var jobJson = [
 var jobJson = [
-  '总裁/总经理/总监', 
-  '市场经理/主管',
-  '销售经理/主管',
-  '渠道经理/主管',
-  '投标经理/专员',
-  '采购经理/专员',
-  '数据分析师',
-  '招标师', 
-  '项目经理', 
-  '其他'
+  '总裁', 
+  '总经理',
+  '总监',
+  '经理',
+  '主管',
+  '职员'
+]
+var branchJson = [
+  '市场',
+  '产品',
+  '销售',
+  '渠道'
 ]
 ]
 var companyScaleJson = [
 var companyScaleJson = [
   '0-19人',
   '0-19人',

+ 6 - 0
src/web/staticres/css/collect-user-info.css

@@ -317,3 +317,9 @@
 .el-popper ul li{
 .el-popper ul li{
   float: none!important;
   float: none!important;
 }
 }
+.bid-dialog .el-form-item__error{
+  padding: 0px;
+}
+.bid-dialog .el-form-item{
+  margin-bottom: 14px;
+}

+ 49 - 17
src/web/staticres/js/pc-collect-bid-info.js

@@ -54,14 +54,14 @@ var temps = `
                       <el-option v-for="item in jobData" :key="item.value" :label="item.label" :value="item.value">
                       <el-option v-for="item in jobData" :key="item.value" :label="item.label" :value="item.value">
                       </el-option>
                       </el-option>
                     </el-select>
                     </el-select>
-                    <el-input 
-                    class="other_job" 
-                    v-if="showOtherJob"
-                    v-model.trim="form.otherJob" 
-                    data-short-input
-                    @focus="otherFocus"
-                    placeholder="请输入职位名称">
-                    </el-input>
+                  </el-form-item>
+                </div>
+                <div class="long-control" v-show="showBranch">
+                  <el-form-item label="部门 :" prop="branch">
+                    <el-select v-model="form.branch" placeholder="请选择部门" data-short-input clearable>
+                      <el-option v-for="item in branchData" :key="item.value" :label="item.label" :value="item.value">
+                      </el-option>
+                    </el-select>
                   </el-form-item>
                   </el-form-item>
                 </div>
                 </div>
               </div>
               </div>
@@ -97,6 +97,13 @@ var companyScaleData = companyScaleJson.map(function (item) {
     label: item
     label: item
   }
   }
 })
 })
+// 部门数据处理
+var branchData = branchJson.map(function(item) {
+  return {
+    value: item,
+    label: item
+  }
+})
 // 防抖
 // 防抖
 function debounce(fn, delay) {
 function debounce(fn, delay) {
   var timer
   var timer
@@ -149,11 +156,14 @@ var vmbid = new Vue({
       if(value === '') {
       if(value === '') {
         return callback(new Error('职位不能为空'));
         return callback(new Error('职位不能为空'));
       } else {
       } else {
-        if (value === '其他' && vmbid.form.otherJob === '') {
-          return callback(new Error('请输入职位'));
-        } else {
-          callback();
-        }
+        callback()
+      }
+    }
+    var validBranch = function(rule,value,callback) {
+      if ((vmbid.form.job.indexOf('总裁') === -1 || vmbid.form.indexOf('总经理') === -1) && !value) {
+        return callback(new Error('部门不能为空'));
+      } else {
+        callback();
       }
       }
     }
     }
     return {
     return {
@@ -163,6 +173,7 @@ var vmbid = new Vue({
       industryData: industryJson, // 行业数据
       industryData: industryJson, // 行业数据
       jobData: jobData, // 职位数据
       jobData: jobData, // 职位数据
       scaleData: companyScaleData, // 公司规模数据
       scaleData: companyScaleData, // 公司规模数据
+      branchData: branchData, // 部门数据
       moldData: [{ // 公司类型数据
       moldData: [{ // 公司类型数据
         label: '公司',
         label: '公司',
         value: '公司'
         value: '公司'
@@ -179,7 +190,8 @@ var vmbid = new Vue({
         companyName: '', // 公司名称
         companyName: '', // 公司名称
         job: '', // 职位值
         job: '', // 职位值
         otherJob: '', //自定义职位
         otherJob: '', //自定义职位
-        agreeChecked: true
+        agreeChecked: true,
+        branch: ''
       },
       },
       rules: {
       rules: {
         name: [
         name: [
@@ -208,6 +220,12 @@ var vmbid = new Vue({
             required: true,
             required: true,
             validator: validJob
             validator: validJob
           }
           }
+        ],
+        branch: [
+          {
+            required: true,
+            validator: validBranch
+          }
         ]
         ]
       },
       },
       showSearchResult: false,
       showSearchResult: false,
@@ -241,6 +259,17 @@ var vmbid = new Vue({
     },
     },
     showCompany: function() {
     showCompany: function() {
       return this.form.mold === '公司'
       return this.form.mold === '公司'
+    },
+    showBranch: function () {
+      // 切换到总裁或总经理之后 把之前选择的部门清空
+      if (this.form.job.indexOf('总裁') > -1 || this.form.job.indexOf('总经理') > -1) {
+        this.form.branch = ''
+      }
+      var zc = this.form.job.indexOf('总裁') > -1
+      var zjl = this.form.job.indexOf('总经理') > -1
+      var source = this.source !== 'article_original' &&  this.source !== 'article_collection'
+      console.log(!(zc || zjl), source, this.form.job)
+      return !(zc || zjl) && source && this.form.job
     }
     }
   },
   },
   mounted() {
   mounted() {
@@ -346,7 +375,8 @@ var vmbid = new Vue({
         name: this.form.name,
         name: this.form.name,
         phone: this.form.phone,
         phone: this.form.phone,
         company: this.form.companyName, // 公司名称
         company: this.form.companyName, // 公司名称
-        position: this.form.job == '其他' ? ('其他/' + this.form.otherJob) : this.form.job
+        position: this.form.job == '其他' ? ('其他/' + this.form.otherJob) : this.form.job,
+        branch: this.form.branch
       }
       }
       var _this = this
       var _this = this
       $.ajax({
       $.ajax({
@@ -381,8 +411,10 @@ var vmbid = new Vue({
             _this.form.companyName = res.data.company ? res.data.company : ''
             _this.form.companyName = res.data.company ? res.data.company : ''
             if (res.data.position) {
             if (res.data.position) {
               if (jobJson.indexOf(res.data.position) == -1) {
               if (jobJson.indexOf(res.data.position) == -1) {
-                _this.form.job = '其他'
-                _this.form.otherJob = res.data.position.replace('其他/', '')
+                // _this.form.job = '其他'
+                // _this.form.otherJob = res.data.position.replace('其他/', '')
+                _this.form.job = ''
+                _this.form.otherJob = ''
               } else {
               } else {
                 _this.form.job = res.data.position
                 _this.form.job = res.data.position
               }
               }

+ 38 - 16
src/web/staticres/js/pc-collect-user-info.js

@@ -86,14 +86,10 @@ var temp = `
                       <el-option v-for="item in jobData" :key="item.value" :label="item.label" :value="item.value">
                       <el-option v-for="item in jobData" :key="item.value" :label="item.label" :value="item.value">
                       </el-option>
                       </el-option>
                     </el-select>
                     </el-select>
-                    <el-input 
-                    v-if="showOtherJob"
-                    v-model.trim="form.otherJob" 
-                    data-short-input
-                    class="item-input"
-                    @focus="otherFocus"
-                    placeholder="请输入职位名称">
-                    </el-input>
+                    <el-select v-show="showBranch" v-model="form.branch" placeholder="请选择部门" data-short-input class="item-input" clearable>
+                      <el-option v-for="item in branchData" :key="item.value" :label="item.label" :value="item.value">
+                      </el-option>
+                    </el-select>
                   </el-form-item>
                   </el-form-item>
                 </div>
                 </div>
                 <div class="long-control" v-if="moduleShow.scale">
                 <div class="long-control" v-if="moduleShow.scale">
@@ -182,6 +178,13 @@ var companyScaleData = companyScaleJson.map(function (item) {
     label: item
     label: item
   }
   }
 })
 })
+// 部门数据处理
+var branchData = branchJson.map(function(item) {
+  return {
+    value: item,
+    label: item
+  }
+})
 // 防抖
 // 防抖
 function debounce(fn, delay) {
 function debounce(fn, delay) {
   var timer
   var timer
@@ -232,6 +235,7 @@ var vm = new Vue({
       }
       }
     }
     }
     var validCompany = function(rule,value,callback) {
     var validCompany = function(rule,value,callback) {
+      console.log(value, 'gognsi')
       if (value === '') {
       if (value === '') {
         return callback(new Error('公司名称为必填项'));
         return callback(new Error('公司名称为必填项'));
       } else {
       } else {
@@ -244,10 +248,10 @@ var vm = new Vue({
     }
     }
     var validJob = function(rule,value,callback) {
     var validJob = function(rule,value,callback) {
       if(value === '') {
       if(value === '') {
-        return callback(new Error('职位不能为空'));
+        return callback();
       } else {
       } else {
-        if (value === '其他' && vm.form.otherJob === '') {
-          return callback(new Error('请输入职位'));
+        if ((value.indexOf('总裁') === -1 || value.indexOf('总经理') === -1) && vm.showBranch && !vm.form.branch) {
+          return callback(new Error('部门不能为空'));
         } else {
         } else {
           callback();
           callback();
         }
         }
@@ -261,6 +265,7 @@ var vm = new Vue({
       industryData: industryJson, // 行业数据
       industryData: industryJson, // 行业数据
       jobData: jobData, // 职位数据
       jobData: jobData, // 职位数据
       scaleData: companyScaleData, // 公司规模数据
       scaleData: companyScaleData, // 公司规模数据
+      branchData: branchData,
       moldData: [{ // 公司类型数据
       moldData: [{ // 公司类型数据
         label: '公司',
         label: '公司',
         value: '公司'
         value: '公司'
@@ -285,7 +290,8 @@ var vm = new Vue({
         scale: '', // 公司规模
         scale: '', // 公司规模
         business: '', // 业务范围
         business: '', // 业务范围
         need: '', // 合作需求
         need: '', // 合作需求
-        agreeChecked: true
+        agreeChecked: true,
+        branch: ''
       },
       },
       rules: {
       rules: {
         name: [
         name: [
@@ -319,7 +325,8 @@ var vm = new Vue({
         job: [
         job: [
           {
           {
             required: true,
             required: true,
-            validator: validJob
+            validator: validJob,
+            trigger: 'change'
           }
           }
         ]
         ]
       },
       },
@@ -360,6 +367,17 @@ var vm = new Vue({
     },
     },
     showCompany: function() {
     showCompany: function() {
       return this.form.mold === '公司'
       return this.form.mold === '公司'
+    },
+    showBranch: function () {
+      // 切换到总裁或总经理之后 把之前选择的部门清空
+      if (this.form.job.indexOf('总裁') > -1 || this.form.job.indexOf('总经理') > -1) {
+        this.form.branch = ''
+      }
+      var zc = this.form.job.indexOf('总裁') > -1
+      var zjl = this.form.job.indexOf('总经理') > -1
+      var source = this.source !== 'article_original' &&  this.source !== 'article_collection'
+      console.log(!(zc || zjl), source, this.form.job)
+      return !(zc || zjl) && source && this.form.job
     }
     }
   },
   },
   mounted() {
   mounted() {
@@ -492,7 +510,8 @@ var vm = new Vue({
         // company_size: this.form.scale,
         // company_size: this.form.scale,
         workScope: this.form.business,
         workScope: this.form.business,
         partnerNeeds: this.form.need, 
         partnerNeeds: this.form.need, 
-        agree: this.form.agreeChecked
+        agree: this.form.agreeChecked,
+        branch: this.form.branch.indexOf('总裁') > -1 || this.form.branch.indexOf('总经理') > -1 ?  '' : this.form.branch
       }
       }
       var _this = this
       var _this = this
       $.ajax({
       $.ajax({
@@ -554,8 +573,10 @@ var vm = new Vue({
             _this.form.companyType = res.data.companyType ? res.data.companyType.split(',') : []
             _this.form.companyType = res.data.companyType ? res.data.companyType.split(',') : []
             if (res.data.position) {
             if (res.data.position) {
               if (jobJson.indexOf(res.data.position) == -1) {
               if (jobJson.indexOf(res.data.position) == -1) {
-                _this.form.job = '其他'
-                _this.form.otherJob = res.data.position.replace('其他/', '')
+                // _this.form.job = '其他'
+                // _this.form.otherJob = res.data.position.replace('其他/', '')
+                _this.form.job = ''
+                _this.form.otherJob = ''
               } else {
               } else {
                 _this.form.job = res.data.position
                 _this.form.job = res.data.position
               }
               }
@@ -566,6 +587,7 @@ var vm = new Vue({
             _this.form.business = res.data.workScope ? res.data.workScope : ''
             _this.form.business = res.data.workScope ? res.data.workScope : ''
             _this.form.need = res.data.partnerNeeds ? res.data.partnerNeeds : ''
             _this.form.need = res.data.partnerNeeds ? res.data.partnerNeeds : ''
             _this.form.agreeChecked = res.data.agree == undefined ?  true : res.data.agree
             _this.form.agreeChecked = res.data.agree == undefined ?  true : res.data.agree
+            _this.form.branch = res.data.branch
           }
           }
         }
         }
       })
       })

+ 67 - 29
src/web/templates/frontRouter/wx/bigmember/free/perfect_info.html

@@ -83,6 +83,7 @@
                                    placeholder="请选择职位"></van-field>
                                    placeholder="请选择职位"></van-field>
                         <van-field class="other-input-group" @focus="infoCheckMap.position_other = ''" @blur="getCheckMap('position')"
                         <van-field class="other-input-group" @focus="infoCheckMap.position_other = ''" @blur="getCheckMap('position')"
                                    :error-message="infoCheckMap.position_other" v-model.trim="infoMap.position_other" v-show="infoMap.position === '其他' && moduleShow.position" label="职位" placeholder="请输入职位"></van-field>
                                    :error-message="infoCheckMap.position_other" v-model.trim="infoMap.position_other" v-show="infoMap.position === '其他' && moduleShow.position" label="职位" placeholder="请输入职位"></van-field>
+                        <van-field v-if="showBranch" v-model="infoMap.branch" required label="部门" @click="openPop('部门')" readonly is-link placeholder="请选择部门"></van-field>
                         <van-field v-if="moduleShow.company_size" v-model="infoMap.company_size" label="公司规模" @click="openPop('公司规模')" readonly is-link
                         <van-field v-if="moduleShow.company_size" v-model="infoMap.company_size" label="公司规模" @click="openPop('公司规模')" readonly is-link
                                    placeholder="请选择公司规模"></van-field>
                                    placeholder="请选择公司规模"></van-field>
                         <van-field v-if="moduleShow.workScope" maxlength="200" v-model="infoMap.workScope" label="业务范围" rows="2" type="textarea"
                         <van-field v-if="moduleShow.workScope" maxlength="200" v-model="infoMap.workScope" label="业务范围" rows="2" type="textarea"
@@ -390,7 +391,8 @@
         company_size: '',
         company_size: '',
         workScope: '',
         workScope: '',
         partnerNeeds: '',
         partnerNeeds: '',
-        position_other: ''
+        position_other: '',
+        branch: ''
       },
       },
       infoCheckMap: {
       infoCheckMap: {
         name: '',
         name: '',
@@ -398,7 +400,8 @@
         email: '',
         email: '',
         company: '',
         company: '',
         position: '',
         position: '',
-        position_other: ''
+        position_other: '',
+        branch: ''
       },
       },
       isEchoInfoLoading: true,
       isEchoInfoLoading: true,
       popInfo: {
       popInfo: {
@@ -452,44 +455,28 @@
           }
           }
         ],
         ],
         '职位': [
         '职位': [
-          {
-            title: '总裁/总经理/总监',
-            checked: false
-          },
-          {
-            title: '市场经理/主管',
-            checked: false
-          },
-          {
-            title: '销售经理/主管',
-            checked: false
-          },
-          {
-            title: '渠道经理/主管',
-            checked: false
-          },
-          {
-            title: '投标经理/专员',
+        {
+            title: '总裁',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '采购经理/专员',
+            title: '总经理',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '数据分析师',
+            title: '总监',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '招标师',
+            title: '经理',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '项目经理',
+            title: '主管',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '其他',
+            title: '职员',
             checked: false
             checked: false
           }
           }
         ],
         ],
@@ -519,6 +506,24 @@
             checked: false
             checked: false
           }
           }
         ],
         ],
+        '部门': [
+          {
+            title: '市场',
+            checked: false
+          },
+          {
+            title: '产品',
+            checked: false
+          },
+          {
+            title: '销售',
+            checked: false
+          },
+          {
+            title: '渠道',
+            checked: false
+          }
+        ]
       },
       },
       ajaxParams: {
       ajaxParams: {
         "name": "",
         "name": "",
@@ -535,7 +540,8 @@
         "position": "",
         "position": "",
         "company_size": "",
         "company_size": "",
         "workScope": "",
         "workScope": "",
-        "partnerNeeds": ""
+        "partnerNeeds": "",
+        "branch": ''
       },
       },
       // 默认为隐藏,需要展示则需判断
       // 默认为隐藏,需要展示则需判断
       moduleShow: {
       moduleShow: {
@@ -664,7 +670,7 @@
         return namereg.test(this.infoMap.position_other)
         return namereg.test(this.infoMap.position_other)
       },
       },
       isSubmitDisabled () {
       isSubmitDisabled () {
-        return !this.checkName || !this.checkPhone || !this.checkEmail || !this.checkEntName || !this.checkPosition
+        return !this.checkName || !this.checkPhone || !this.checkEmail || !this.checkEntName || !this.checkPosition || (this.showBranch && !this.infoMap.branch)
       },
       },
       isMoreSelect () {
       isMoreSelect () {
         return this.popInfo.label === '公司类型'
         return this.popInfo.label === '公司类型'
@@ -699,8 +705,25 @@
             result = this.conditionMap[type].filter(v => v.checked).length
             result = this.conditionMap[type].filter(v => v.checked).length
             break
             break
           }
           }
+          case '部门': {
+            result = this.conditionMap[type].filter(v => v.checked).length
+            break
+          }
         }
         }
         return !result
         return !result
+      },
+      showBranch () {
+        // 切换到总裁或总经理之后 把之前选择的部门清空
+        if (this.infoMap.position.indexOf('总裁') > -1 || this.infoMap.position.indexOf('总经理') > -1) {
+          this.infoMap.branch = ''
+          this.conditionMap['部门'].forEach(v => {
+            v.checked = false
+          })
+        }
+        var zc = this.infoMap.position.indexOf('总裁') > -1
+        var zjl = this.infoMap.position.indexOf('总经理') > -1
+        var source = this.ajaxParams.source !== 'article_original' &&  this.ajaxParams.source !== 'article_collection'
+        return !(zc || zjl) && source && this.infoMap.position
       }
       }
     },
     },
     methods: {
     methods: {
@@ -853,13 +876,18 @@
         this.ajaxParams.agree = data.agree
         this.ajaxParams.agree = data.agree
         this.isRead = data.agree
         this.isRead = data.agree
         }
         }
+        if (data.branch) {
+          this.setCheckForData('branch', 'branch', data.branch, '部门')
+        }
       },
       },
       setCheckForData (aKey, iKey, cKey, label) {
       setCheckForData (aKey, iKey, cKey, label) {
         this.ajaxParams[aKey] = cKey
         this.ajaxParams[aKey] = cKey
         this.infoMap[iKey] = cKey
         this.infoMap[iKey] = cKey
         if (label === '职位' && cKey.indexOf('其他') !== -1) {
         if (label === '职位' && cKey.indexOf('其他') !== -1) {
-            this.infoMap[iKey] = '其他'
-            this.infoMap.position_other = cKey.split('/')[1]
+            // this.infoMap[iKey] = '其他'
+            // this.infoMap.position_other = cKey.split('/')[1]
+            this.infoMap[iKey] = ''
+            this.infoMap.position_other = ''
         }
         }
         if (label) {
         if (label) {
           var checkDatas = [cKey]
           var checkDatas = [cKey]
@@ -917,6 +945,11 @@
             this.setCheckForData('company_size', 'company_size', tempData[0].title)
             this.setCheckForData('company_size', 'company_size', tempData[0].title)
             break
             break
           }
           }
+          case '部门': {
+            var tempData = this.conditionMap[type].filter(v => v.checked)
+            this.setCheckForData('branch', 'branch', tempData[0].title)
+            break
+          }
         }
         }
         this.popInfo.show = false
         this.popInfo.show = false
       },
       },
@@ -946,6 +979,10 @@
             this.popInfo.title = '公司规模'
             this.popInfo.title = '公司规模'
             break
             break
           }
           }
+          case '部门': {
+            this.popInfo.title = '部门'
+            break
+          }
         }
         }
         this.popInfo.label = type
         this.popInfo.label = type
         this.popInfo.show = true
         this.popInfo.show = true
@@ -1029,6 +1066,7 @@
         this.ajaxParams.workScope = this.infoMap.workScope
         this.ajaxParams.workScope = this.infoMap.workScope
         this.ajaxParams.partnerNeeds = this.infoMap.partnerNeeds
         this.ajaxParams.partnerNeeds = this.infoMap.partnerNeeds
         this.ajaxParams.agree = this.isRead
         this.ajaxParams.agree = this.isRead
+        this.ajaxParams.branch = this.infoMap.branch.indexOf('总裁') > -1 || this.infoMap.branch.indexOf('总经理') > -1 ?  '' : this.infoMap.branch
         console.log(this.ajaxParams)
         console.log(this.ajaxParams)
 
 
         var _this = this
         var _this = this

+ 12 - 26
src/web/templates/frontRouter/wx/bigmember/free/perfect_info_solution.html

@@ -129,7 +129,7 @@
 <script rel="preload" as="script" src=//cdn-common.jianyu360.com/cdn/lib/vant/2.8.2/vant.min.js></script>
 <script rel="preload" as="script" src=//cdn-common.jianyu360.com/cdn/lib/vant/2.8.2/vant.min.js></script>
 <script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
 <script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js></script>
 <script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.8.2/vant.min.js></script>
 <script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.8.2/vant.min.js></script>
-<script src='{{Msg "seo" "cdn"}}/common-module/mainSearch/js/utils.js'></script>
+<script src='{{Msg "seo" "cdn"}}/common-module/public/js/utils.js'></script>
 {{include "/big-member/commonjs.html"}}
 {{include "/big-member/commonjs.html"}}
 
 
 <script>
 <script>
@@ -164,44 +164,28 @@
       },
       },
       conditionMap: {
       conditionMap: {
         '职位': [
         '职位': [
-          {
-            title: '总裁/总经理/总监',
-            checked: false
-          },
-          {
-            title: '市场经理/主管',
-            checked: false
-          },
-          {
-            title: '销售经理/主管',
-            checked: false
-          },
-          {
-            title: '渠道经理/主管',
-            checked: false
-          },
-          {
-            title: '投标经理/专员',
+        {
+            title: '总裁',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '采购经理/专员',
+            title: '总经理',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '数据分析师',
+            title: '总监',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '招标师',
+            title: '经理',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '项目经理',
+            title: '主管',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '其他',
+            title: '职员',
             checked: false
             checked: false
           }
           }
         ]
         ]
@@ -347,8 +331,10 @@
         this.ajaxParams[aKey] = cKey
         this.ajaxParams[aKey] = cKey
         this.infoMap[iKey] = cKey
         this.infoMap[iKey] = cKey
         if (label === '职位' && cKey.indexOf('其他') !== -1) {
         if (label === '职位' && cKey.indexOf('其他') !== -1) {
-            this.infoMap[iKey] = '其他'
-            this.infoMap.position_other = cKey.split('/')[1]
+            // this.infoMap[iKey] = '其他'
+            // this.infoMap.position_other = cKey.split('/')[1]
+            this.infoMap[iKey] = ''
+            this.infoMap.position_other = ''
         }
         }
         if (label) {
         if (label) {
           var checkDatas = [cKey]
           var checkDatas = [cKey]

+ 10 - 24
src/web/templates/frontRouter/wx/bigmember/free/perfect_info_strud.html

@@ -194,43 +194,27 @@
       conditionMap: {
       conditionMap: {
         '职位': [
         '职位': [
           {
           {
-            title: '总裁/总经理/总监',
+            title: '总裁',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '市场经理/主管',
+            title: '总经理',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '销售经理/主管',
+            title: '总监',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '渠道经理/主管',
+            title: '经理',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '投标经理/专员',
+            title: '主管',
             checked: false
             checked: false
           },
           },
           {
           {
-            title: '采购经理/专员',
-            checked: false
-          },
-          {
-            title: '数据分析师',
-            checked: false
-          },
-          {
-            title: '招标师',
-            checked: false
-          },
-          {
-            title: '项目经理',
-            checked: false
-          },
-          {
-            title: '其他',
+            title: '职员',
             checked: false
             checked: false
           }
           }
         ]
         ]
@@ -460,8 +444,10 @@
         this.ajaxParams[aKey] = cKey
         this.ajaxParams[aKey] = cKey
         this.infoMap[iKey] = cKey
         this.infoMap[iKey] = cKey
         if (label === '职位' && cKey.indexOf('其他') !== -1) {
         if (label === '职位' && cKey.indexOf('其他') !== -1) {
-            this.infoMap[iKey] = '其他'
-            this.infoMap.position_other = cKey.split('/')[1]
+            // this.infoMap[iKey] = '其他'
+            // this.infoMap.position_other = cKey.split('/')[1]
+            this.infoMap[iKey] = ''
+            this.infoMap.position_other = ''
         }
         }
         if (label) {
         if (label) {
           var checkDatas = [cKey]
           var checkDatas = [cKey]