|
@@ -57,7 +57,7 @@ var vm = new Vue({
|
|
|
if (!dom.contains((e.target))) {
|
|
|
that.showSearchResult = false
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
@@ -66,7 +66,6 @@ var vm = new Vue({
|
|
|
openLoginDig()
|
|
|
} else {
|
|
|
this.isNeedSubmit()
|
|
|
- this.isShow = true
|
|
|
}
|
|
|
},
|
|
|
// 是否留资
|
|
@@ -80,33 +79,22 @@ var vm = new Vue({
|
|
|
},
|
|
|
success:function (res) {
|
|
|
// 判断当前信息否在其他页面留资 如果全部留资 直接弹窗提交成功
|
|
|
- if( res.info.name && res.info.phone){
|
|
|
- _this.showSuccess=true
|
|
|
- return true
|
|
|
- }
|
|
|
- if (res.data) {
|
|
|
+ var checkKeys = ['name', 'phone', 'company']
|
|
|
+ var result = checkRequiredKeys(checkKeys, res.info)
|
|
|
+ if (result) {
|
|
|
+ _this.showSuccess = true
|
|
|
+ } else if (res.data){
|
|
|
window.isRetained = res.data.retainedCapital
|
|
|
if (res.data.retainedCapital) {
|
|
|
- _this.showForm = true
|
|
|
- _this.getOldInfo()
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 查询表单回显信息
|
|
|
- getOldInfo: function() {
|
|
|
- var _this = this
|
|
|
- $.ajax({
|
|
|
- type:'POST',
|
|
|
- url:'/salesLeads/echoInfo?t=' + Date.now(),
|
|
|
- success:function (res) {
|
|
|
- if (res.data) {
|
|
|
- _this.ruleBide.name = res.data.name ? res.data.name : ''
|
|
|
- _this.ruleBide.phone = res.data.phone ? res.data.phone : ''
|
|
|
- _this.ruleBide.companyName = res.data.company ? res.data.company : ''
|
|
|
- if (res.data.company) {
|
|
|
- _this.showSearchResult = false
|
|
|
+ _this.isShow = true
|
|
|
+ if (res.info) {
|
|
|
+ echoRequiredValues(_this.ruleBide, res.info, checkKeys)
|
|
|
+ if (res.info.company) {
|
|
|
+ _this.showSearchResult = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ _this.showSuccess = true
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -207,7 +195,7 @@ var vm = new Vue({
|
|
|
var params = {
|
|
|
source: source,
|
|
|
name: this.ruleBide.name,
|
|
|
- phone: this.ruleBide.phone,
|
|
|
+ phone: this.ruleBide.phone,
|
|
|
company: this.ruleBide.companyName
|
|
|
}
|
|
|
var _this = this
|