|
|
@@ -80,7 +80,8 @@ |
|
|
|
<image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view>、 |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 提交按钮 --> |
|
|
@@ -100,6 +101,11 @@ |
|
|
|
<u-modal v-model="show" :mask-close-able="true" :title="'代接待提醒'" :confirm-text="confirmtext" |
|
|
|
:cancel-text='canceltext' @cancel="confirmA" @confirm="confirmB" :show-cancel-button='true' |
|
|
|
:content="content"></u-modal> |
|
|
|
|
|
|
|
<!-- 多接待间隔超时提示窗 --> |
|
|
|
<u-modal v-model="showBeyound" :mask-close-able="true" title="接待提醒" :confirm-text="beyoundConfirmText" |
|
|
|
:cancel-text="beyoundCancelText" @cancel="beyoundCancel" @confirm="beyoundConfirm" |
|
|
|
:show-cancel-button="true" :content="beyondContent"></u-modal> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
@@ -125,6 +131,7 @@ |
|
|
|
projectId: '', |
|
|
|
replaceReception: 0, |
|
|
|
marketingBusiness: '', // 销讲业务默认为第一个 |
|
|
|
endRecordFlag: 1, // 0:结束,1:一起接待 |
|
|
|
}, |
|
|
|
showSourceName: '', // 展示文字 |
|
|
|
shifoinfo: 0, // 高级权限 项目是否能指派顾问 |
|
|
@@ -141,8 +148,12 @@ |
|
|
|
fdFlag: null, |
|
|
|
isPass: false, // 当前顾问是否正在接待 |
|
|
|
fromBack: false, // 从选择顾问页面跳回 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
beyoundConfirmText: '结束', // 多接待间隔确定文字 |
|
|
|
beyoundCancelText: '一起接待', // 多接待间隔确定文字 |
|
|
|
beyondContent: '', // 文字描述内容 |
|
|
|
showBeyound: false, // 展示多接待间隔超时提示窗 |
|
|
|
|
|
|
|
templateList: [], // 销讲业务 |
|
|
|
showTemplate: false, // 展示选择销讲业务弹窗 |
|
|
|
templateName: '', // 销讲业务类型文字 |
|
|
@@ -172,12 +183,23 @@ |
|
|
|
|
|
|
|
onShow() { |
|
|
|
this.parames.projectId = uni.getStorageSync('buildingID').id; |
|
|
|
console.log(this.$u) |
|
|
|
this.init() |
|
|
|
this.getFreeList(); |
|
|
|
this.getFromSource(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 确认的方法(结束) |
|
|
|
beyoundConfirm() { |
|
|
|
this.parames.endRecordFlag = 0 |
|
|
|
this.saveAddreception() |
|
|
|
}, |
|
|
|
|
|
|
|
// 取消的方法(取消) |
|
|
|
beyoundCancel() { |
|
|
|
this.parames.endRecordFlag = 1 |
|
|
|
this.saveAddreception() |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取销讲业务 |
|
|
|
getMarketingBusiness() { |
|
|
|
this.$u.get('/customer/marketingBusiness', { |
|
|
@@ -202,7 +224,6 @@ |
|
|
|
'Access-Token': uni.getStorageSync('weapp_session_login_data').token |
|
|
|
}, |
|
|
|
success: (data) => { |
|
|
|
console.log(data) |
|
|
|
if (data.data.code == 10000) { |
|
|
|
this.list = data.data.data |
|
|
|
} |
|
|
@@ -229,13 +250,23 @@ |
|
|
|
this.parames.replaceReception = 1; |
|
|
|
this.baochunfun() |
|
|
|
}, |
|
|
|
btnSave() { |
|
|
|
if (this.isBand) return |
|
|
|
this.save() |
|
|
|
}, |
|
|
|
|
|
|
|
save() { |
|
|
|
this.$u.get('/customer/findByAgentIdNotEnd', { |
|
|
|
agentId: this.parames.agentId |
|
|
|
}).then(res => { |
|
|
|
console.log(res, 'asdaskljdalksjdlksajdksl') |
|
|
|
if (res > 0) { |
|
|
|
this.beyondContent = `【${this.text}】正在接待客户,是否要结束现有的接待?` |
|
|
|
this.showBeyound = true |
|
|
|
} else { |
|
|
|
this.saveAddreception() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 新增接待 |
|
|
|
saveAddreception() { |
|
|
|
// 校验当前登录人是否是顾问 |
|
|
|
let obj = this.freeList.find(item => { |
|
|
|
return item.agentId == this.userInfo.accountId |
|
|
@@ -273,7 +304,8 @@ |
|
|
|
this.$u.post("customer/daitiReception", { |
|
|
|
phone: that.parames.phone, |
|
|
|
projectId: that.parames.projectId, |
|
|
|
agentId: that.parames.agentId |
|
|
|
agentId: that.parames.agentId, |
|
|
|
endRecordFlag: that.parames.endRecordFlag |
|
|
|
}).then(res => { |
|
|
|
if (res.unchecked == 0) { |
|
|
|
that.baochunfun() |
|
|
@@ -284,7 +316,6 @@ |
|
|
|
that.baochunfun() |
|
|
|
this.tap = false; |
|
|
|
} else { |
|
|
|
console.log("zo") |
|
|
|
if (res.assign == null && res.replacement == null) { |
|
|
|
that.baochunfun() |
|
|
|
this.tap = false; |
|
|
@@ -299,7 +330,6 @@ |
|
|
|
this.isBand = false |
|
|
|
} else { |
|
|
|
that.daitiReceptionobj = res; |
|
|
|
console.log(that.daitiReceptionobj) |
|
|
|
that.content = "此客户的顾问为【" + res.owner.name + "】,确认让【" + res.replacement.name + |
|
|
|
"】代接待吗?" |
|
|
|
that.confirmtext = res.replacement.name + "代接待", //确认文字 |
|
|
@@ -314,7 +344,9 @@ |
|
|
|
that.show = true; |
|
|
|
this.isBand = false |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
baochunfun() { |
|
|
|
const { |
|
|
|
dataCode |
|
|
@@ -393,7 +425,7 @@ |
|
|
|
Buildingselection() { |
|
|
|
this.Showhiddenunits = true; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
showTemplateSelect() { |
|
|
|
this.showTemplate = true; |
|
|
|
}, |
|
|
@@ -401,12 +433,11 @@ |
|
|
|
this.Showhiddenunits = false; |
|
|
|
}, |
|
|
|
confirm(e) { |
|
|
|
console.log(e) |
|
|
|
this.showSourceName = e[0].label; |
|
|
|
this.parames.sourceId = e[0].value; |
|
|
|
this.Showhiddenunits = false; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 销讲业务方法 |
|
|
|
templateCancel() { |
|
|
|
this.showTemplate = false; |
|
|
@@ -416,7 +447,7 @@ |
|
|
|
this.templateName = e[0].label; |
|
|
|
this.parames.marketingBusiness = e[0].value; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
init() { |
|
|
|
uni.request({ |
|
|
|
url: config.service.getSelfAssignedByHouseId + "?houseId=" + this.parames.projectId, |
|
|
@@ -453,8 +484,8 @@ |
|
|
|
this.parames.agentId = item.agentId; |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
} |
|
|
|
}; |
|
|
@@ -501,7 +532,7 @@ |
|
|
|
min-height: 100vh; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
|
|
|
|
.cented-boxs { |
|
|
|
flex-grow: 1; |
|
|
|
} |
|
|
|