AI销管
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

consultant.vue 5.8 KiB

pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
pirms 2 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. <template>
  2. <view class="box">
  3. <!-- 顾问选择 -->
  4. <view class="nextcon">
  5. 下一位接待顾问:{{textcdhSKJ}}
  6. </view>
  7. <view class="content" style="padding-bottom: 200rpx;">
  8. <radio-group @change="radioChange">
  9. <view v-for="(item,index) in freeList" :key="index" class="content-tips">
  10. <view class="left">
  11. <view class="img">
  12. {{item.name.slice(0,1)}}
  13. </view>
  14. <view class="text">
  15. <view class="name">
  16. {{item.name}}
  17. </view>
  18. <view class="num">
  19. 今日接待: {{item.todayNum}}
  20. </view>
  21. </view>
  22. </view>
  23. <view class="right">
  24. <radio :value="item.agentId" :checked="index == current" style="transform:scale(0.9)"
  25. color="#2671E2"></radio>
  26. </view>
  27. </view>
  28. </radio-group>
  29. </view>
  30. <view class="empty" v-if="freeList.length == 0">
  31. <image class="image" src="@/static/images/customerEmpty.png" mode=""></image>
  32. <view class="tips">
  33. 暂无空闲顾问
  34. </view>
  35. </view>
  36. <view class="save" @click="save" :class="{active:chosedAgentId}">
  37. 保存
  38. </view>
  39. <u-modal v-model="show" :mask-close-able="true" :title="'代接待提醒'" :confirm-text="confirmtext"
  40. :cancel-text='canceltext' @cancel="confirmA" @confirm="confirmB" :show-cancel-button='true'
  41. :content="content"></u-modal>
  42. </view>
  43. </template>
  44. <script>
  45. export default {
  46. data() {
  47. return {
  48. customerId: '',
  49. buildingID: '',
  50. freeList: [],
  51. current: null,
  52. chosedAgentId: '',
  53. textcdhSKJ: '',
  54. show: false,
  55. content: '东临碣石,以观沧海',
  56. confirmtext: '1', //确认文字
  57. canceltext: '2', //取消文字
  58. daitiReceptionobj: {},
  59. replaceReception: 0
  60. }
  61. },
  62. onLoad(option) {
  63. this.customerId = option.id;
  64. this.freeList = []
  65. },
  66. onShow() {
  67. this.buildingID = uni.getStorageSync('buildingID').id;
  68. this.getFreeList();
  69. },
  70. methods: {
  71. //取消
  72. confirmA() {
  73. if (this.daitiReceptionobj.assign != null) {
  74. this.baochunfun()
  75. } else {
  76. uni.showToast({
  77. icon: "none",
  78. title: "【" + this.daitiReceptionobj.owner.name + "】正在接待中"
  79. })
  80. return;
  81. }
  82. },
  83. // 确认
  84. confirmB() {
  85. this.replaceReception = 1;
  86. this.baochunfun()
  87. },
  88. save() {
  89. console.log(this.chosedAgentId)
  90. if (!this.chosedAgentId) {
  91. uni.showToast({
  92. icon: "none",
  93. title: "未选择指派顾问"
  94. })
  95. return
  96. }
  97. const that = this;
  98. this.$u.post("customer/daitiReception", {
  99. agentId: that.chosedAgentId,
  100. id: that.customerId,
  101. projectId: this.buildingID
  102. }).then(res => {
  103. if (res.unchecked == 0) {
  104. that.baochunfun()
  105. } else {
  106. if (res.zs == 0) {
  107. that.baochunfun()
  108. } else {
  109. if (res.assign == null && res.replacement == null) {
  110. that.baochunfun()
  111. } else {
  112. if (res.assign == null) {
  113. that.daitiReceptionobj = res;
  114. that.content = "此客户的顾问为【" + res.owner.name + "】,确认让【" + res.replacement.name +
  115. "】代接待吗?"
  116. that.confirmtext = res.replacement.name + "代接待", //确认文字
  117. that.canceltext = res.owner.name + '接待', //取消文字
  118. that.show = true;
  119. } else {
  120. that.daitiReceptionobj = res;
  121. that.content = "此客户的顾问为【" + res.owner.name + "】,确认让【" + res.replacement.name +
  122. "】代接待吗?"
  123. that.confirmtext = res.replacement.name + "代接待", //确认文字
  124. that.canceltext = res.assign.name + '接待', //取消文字
  125. that.show = true;
  126. }
  127. }
  128. }
  129. }
  130. });
  131. },
  132. baochunfun() {
  133. uni.showLoading({
  134. title: "保存中",
  135. mask: true
  136. })
  137. const that = this;
  138. this.$u.post("customer/assign", {
  139. agentId: that.chosedAgentId,
  140. id: that.customerId,
  141. replaceReception: this.replaceReception
  142. }).then(res => {
  143. uni.showToast({
  144. icon: "none",
  145. title: "分配成功"
  146. })
  147. uni.navigateBack();
  148. uni.hideLoading();
  149. });
  150. },
  151. getFreeList() {
  152. this.$u.get("/zkAgentPool/freeList?itemId=" + this.buildingID).then(res => {
  153. if (res.length == 0) {
  154. this.freeList = []
  155. } else {
  156. this.freeList = res;
  157. this.textcdhSKJ = res[0].name
  158. }
  159. })
  160. },
  161. radioChange: function(evt) {
  162. this.chosedAgentId = '';
  163. this.chosedAgentId = evt.detail.value;
  164. },
  165. }
  166. }
  167. </script>
  168. <style lang="scss" scoped>
  169. .empty {
  170. flex: 1;
  171. display: flex;
  172. flex-direction: column;
  173. justify-content: center;
  174. align-items: center;
  175. .image {
  176. width: 478upx;
  177. height: 478upx;
  178. }
  179. .tips {
  180. font-size: 36upx;
  181. color: #242424;
  182. line-height: 1;
  183. margin-top: 50upx;
  184. }
  185. }
  186. .save {
  187. position: fixed;
  188. width: calc(100vw - 60upx);
  189. bottom: 50upx;
  190. left: 30rpx;
  191. color: #FFFFFF;
  192. font-size: 30upx;
  193. height: 98upx;
  194. border-radius: 8upx;
  195. display: flex;
  196. justify-content: center;
  197. align-items: center;
  198. background: rgba(42, 111, 255, 1);
  199. }
  200. .box {
  201. background: #F8F8F8;
  202. width: 100%;
  203. height: 100%;
  204. font-size: 30rpx;
  205. font-weight: 400;
  206. // line-height: 30px;
  207. .nextcon {
  208. height: 78rpx;
  209. background: #F4F8FD;
  210. color: #2671E2;
  211. text-align: center;
  212. line-height: 78rpx;
  213. }
  214. .content-tips {
  215. display: flex;
  216. justify-content: space-between;
  217. background: #fff;
  218. padding: 0 30rpx;
  219. height: 148rpx;
  220. margin-bottom: 20rpx;
  221. .left {
  222. display: flex;
  223. margin-top: 30rpx;
  224. .img {
  225. width: 72rpx;
  226. height: 72rpx;
  227. background: #FFFFFF;
  228. border: 1px solid #C9C9C9;
  229. line-height: 64rpx;
  230. text-align: center;
  231. border-radius: 50%;
  232. margin-right: 20rpx;
  233. }
  234. .text {
  235. .name {
  236. margin-top: 4rpx;
  237. font-weight: 600;
  238. color: #333333;
  239. line-height: 30rpx;
  240. margin-bottom: 24rpx;
  241. }
  242. }
  243. }
  244. .right {
  245. margin: 54rpx 0;
  246. }
  247. }
  248. }
  249. </style>