AI销管
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

634 satır
16 KiB

  1. <template>
  2. <view class="cented-box">
  3. <view v-if="waitCustomList.length==0" style="width: 100%;height: 100%;display: flex;align-items: center;">
  4. <view style="width: 100%;padding-top: 200rpx;">
  5. <view style="width: 100%;text-align: center;">
  6. <image style="width: 220rpx;height: 200rpx;"
  7. src="https://static.quhouse.com/zhikong_xcx_img/nodatalist.png" mode=""></image>
  8. </view>
  9. <view style="text-align: center;width: 100%;margin-top: 20rpx;color: #999999;">暂无数据</view>
  10. </view>
  11. </view>
  12. <!-- <view class="customer" v-if="waitCustomList.length!=0" v-for="(item,index) in waitCustomList" :key='index'
  13. @click="tapThevisiting(item)">
  14. <view class="title">
  15. <view class="zuo">
  16. <view class="zuoimg">A</view>
  17. <view class="zuoname">{{item.name}}</view>
  18. </view>
  19. <view class="you">
  20. <view class="youimg1" v-if="item.status!=0"></view>
  21. <view class="youimg1-1" v-if="item.status==0"></view>
  22. <view class="youtext">{{item.status==0?"排队中":item.status==1?"接待中":"已完成"}}</view>
  23. </view>
  24. </view>
  25. <view class="centerbox" v-if="item.status!=0">
  26. <view class="centerbox-che">手机号码:<text class="shizai">{{item.phone || "--"}}</text></view>
  27. <view class="centerbox-che">开始时间:<text class="shizai">{{item.createTime}}</text></view>
  28. <view class="centerbox-che">顾问姓名:<text class="shizai" style="color: #333333;">{{item.agentName}}</text>
  29. </view>
  30. <view class="centerbox-che2" v-if="item.status==1">
  31. <view class="Workcard" v-if="item.status==1&&item.zkEquipmentState.onLine==0">设备状态:<text
  32. class="shizai" style="color: red;">离线</text></view>
  33. <view class="Workcard" v-if="item.status==1&&item.zkEquipmentState.onLine!=0">工牌电量:<text
  34. class="shizai" style="color: #333333;">{{item.zkEquipmentState.electricity}}%</text></view>
  35. <view class="Workcard" v-if="item.status==1&&item.zkEquipmentState.onLine==1">录音状态:
  36. <text v-if="item.zkEquipmentState.simAudioStatus=='true'" class="shizai"
  37. style="color: #333333;">使用中</text>
  38. <text v-if="item.zkEquipmentState.simAudioStatus=='false'" class="shizai"
  39. style="color: #333333;">未使用</text>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="footer-button" v-if="item.status!=0">
  44. <view v-if="permissions.commonly3" class="footer1" @click.stop="addTime(item)">接待延时</view>
  45. <view v-if="permissions.commonly4" class="footer1" @click.stop="assign(item)">重新指派</view>
  46. <view v-if="permissions.commonly5" class="footer3" @click.stop="changeEnd(item.id)">结束接待</view>
  47. </view>
  48. <view class="centerbox" v-if="item.status==0">
  49. <view class="centerbox-che">手机号码:<text class="shizai">{{item.phone || "--"}}</text></view>
  50. </view>
  51. <view class="footer-button" v-if="item.status==0">
  52. <view class="footer3" @click.stop="assign(item)">指派顾问</view>
  53. </view>
  54. </view> -->
  55. <view class="customer" v-if="waitCustomList.length!=0" v-for="(item,index) in waitCustomList" :key='index'
  56. @click="tapThevisiting(item)">
  57. <view class="title">
  58. <view class="zuo">
  59. <view class="zuoimg">顾</view>
  60. <view class="zuoname">{{item.agentName}}</view>
  61. </view>
  62. <view class="cen">
  63. 自动结束 <u-count-down :timestamp="timestamp(item.createTime)" color="#E7483C"></u-count-down>
  64. </view>
  65. <view class="you">
  66. <!-- <view class="youimg1" v-if="item.status!=0"></view>
  67. <view class="youimg1-1" v-if="item.status==0"></view>
  68. <view class="youtext">{{item.status==0?"排队中":item.status==1?"接待中":"已完成"}}</view> -->
  69. <view class="" v-if="item.status!=0" style="display: flex;">
  70. <!-- 接待中 -->
  71. <view class="">
  72. <!-- 工牌标示 -->
  73. <image class="you-img"
  74. src="../../static/images/cus1.png" mode=""></image>
  75. </view>
  76. <!-- 未离线 -->
  77. <view class="" v-if="item.zkEquipmentState.onLine!=0" style="display: flex;">
  78. <view class="">
  79. <!-- 电量 -->
  80. <image v-if="item.zkEquipmentState.electricity>=80" class="you-img"
  81. src="../../static/images/cus2.png" mode=""></image>
  82. <image v-else class="you-img"
  83. src="../../static/images/cus5.png" mode=""></image>
  84. </view>
  85. <view class="">
  86. <!-- 录音 -->
  87. <image v-if="item.zkEquipmentState.simAudioStatus=='true'" class="you-img"
  88. src="../../static/images/cus3.png" mode=""></image>
  89. <image v-else class="you-img"
  90. src="../../static/images/cus6.png" mode=""></image>
  91. </view>
  92. </view>
  93. <!-- 离线 -->
  94. <view class="" v-else>
  95. <view class="">
  96. <!-- 录音 -->
  97. <image class="you-img"
  98. src="../../static/images/cus4.png" mode=""></image>
  99. </view>
  100. </view>
  101. </view>
  102. <view class="youtext" v-else>
  103. <!--排队中 -->
  104. 排队中
  105. </view>
  106. </view>
  107. </view>
  108. <view class="centerbox" v-if="item.status!=0">
  109. <view class="content-sec">
  110. <view class="left">
  111. <view class="adviser">客</view>
  112. <view class="cus">{{item.name || '--'}}</view>
  113. <!-- <view class="arriveNum">第{{item.visitRecord || "--"}}次接待</view> -->
  114. <view class="arriveNum">{{ item.phone ||'--' }}</view>
  115. </view>
  116. </view>
  117. <view class="content-last">
  118. <view class="c-items">
  119. <image src="../../static/images/people.png" class="c-items-img" mode=""></image>
  120. {{ item.visitRecord || "--" }}次到访
  121. </view>
  122. <view class="c-items">
  123. <image src="../../static/images/time.png" class="c-items-img" mode=""></image>
  124. {{ item.createTime }}
  125. </view>
  126. <!-- <view class="c-items">
  127. <image src="../../static/images/voice.png" class="c-items-img" mode=""></image>
  128. {{ item.mm || '0' }}min
  129. </view> -->
  130. </view>
  131. </view>
  132. <view class="footer-button" v-if="item.status!=0">
  133. <view v-if="permissions.commonly3" class="footer1" @click.stop="addTime(item)">接待延时</view>
  134. <view v-if="permissions.commonly4" class="footer1" @click.stop="assign(item)">重新指派</view>
  135. <view v-if="permissions.commonly5" class="footer3" @click.stop="changeEnd(item.id)">结束接待</view>
  136. </view>
  137. <view class="footer-button" v-if="item.status==0">
  138. <view class="footer3" @click.stop="assign(item)">指派顾问</view>
  139. </view>
  140. </view>
  141. <image v-if="permissions.commonly2" @click="addreception()" class="add" src="/static/images/add.png" mode="">
  142. </image>
  143. <image class="add2" @click="reshCustom()" src="https://static.quhouse.com/zhikong_xcx_img/refresh.png" mode="">
  144. </image>
  145. <!-- 底部导航栏 -->
  146. <u-tabbar :mid-button="true" activeColor="#1296db" inactiveColor="#999999" v-model="current" :list="tabbarList"></u-tabbar>
  147. </view>
  148. </template>
  149. <script>
  150. import tabbarList from '@/utils/tabbar.js'
  151. export default {
  152. data() {
  153. return {
  154. // tabbar配置项
  155. current: 0,
  156. tabbarList: tabbarList,
  157. //--- end --- tabbar配置项
  158. buildingID: '',
  159. waitCustomList: [],
  160. isAdd: '',
  161. dataCode: '',
  162. addAccount: '',
  163. permissions: {
  164. commonly1: false, //查看
  165. commonly2: false, //添加
  166. commonly3: false, //指派
  167. commonly4: false,
  168. commonly5: false,
  169. },
  170. };
  171. },
  172. onLoad() {
  173. uni.hideTabBar();
  174. },
  175. computed:{
  176. timestamp(){
  177. return (e)=>{
  178. let totalTime = new Date(e).getTime()/1000 + 60*60*2
  179. let nowTime = new Date().getTime()/1000
  180. return totalTime - nowTime
  181. }
  182. }
  183. },
  184. onShow() {
  185. this.buildingID = uni.getStorageSync('buildingID').id;
  186. let newmenulist = uni.getStorageSync('weapp_session_Menu_data');
  187. this.permissions.commonly1 = newmenulist.jd_ck;
  188. this.permissions.commonly2 = newmenulist.jd_xz;
  189. this.permissions.commonly3 = newmenulist.jd_zp;
  190. this.permissions.commonly4 = newmenulist.jdys;
  191. this.permissions.commonly5 = newmenulist.jsjd;
  192. const {
  193. addAccount,
  194. dataCode
  195. } = uni.getStorageSync("weapp_session_userInfo_data");
  196. this.addAccount = addAccount;
  197. this.dataCode = dataCode;
  198. this.init()
  199. this.queryHaveDept()
  200. },
  201. methods: {
  202. reshCustom() {
  203. this.init()
  204. },
  205. tapThevisiting(item) {
  206. if (this.permissions.commonly1 != true) {
  207. return
  208. }
  209. uni.showLoading({
  210. title: '加载中',
  211. mask: true
  212. });
  213. if (item.status == 0) {
  214. setTimeout(function() {
  215. uni.hideLoading();
  216. }, 2000);
  217. uni.showToast({
  218. icon: "none",
  219. title: "排队中"
  220. })
  221. return
  222. } else {
  223. const parames = {
  224. pageNum: 1,
  225. pageSize: 100,
  226. query: {
  227. customerId: item.id,
  228. }
  229. }
  230. var itemsd = {
  231. bg: 0,
  232. customerId: item.id,
  233. id: '',
  234. onebest: ''
  235. }
  236. this.$u.post("/corpus/findByPage", parames).then(res => {
  237. setTimeout(function() {
  238. uni.hideLoading();
  239. }, 2000);
  240. if (res) {
  241. let newobj = res[0];
  242. uni.navigateTo({
  243. url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(itemsd)}&stateisshow=${"1"}`
  244. })
  245. } else {
  246. uni.showToast({
  247. icon: "none",
  248. title: "暂无音频"
  249. })
  250. return
  251. }
  252. })
  253. }
  254. },
  255. queryHaveDept() {
  256. return new Promise((resolve, reject) => {
  257. this.$u.get("/user/queryHaveDept?houseId=" + this.buildingID).then(res => {
  258. this.isAdd = res;
  259. resolve();
  260. })
  261. })
  262. },
  263. init() {
  264. this.waitCustomList = []
  265. let parames = {
  266. itemId: this.buildingID
  267. }
  268. this.$u.post("/customer/reception", parames).then(data => {
  269. this.waitCustomList = data;
  270. });
  271. },
  272. //延时接待
  273. addTime(item) {
  274. uni.showModal({
  275. content: "确定延长半小时接待时间?",
  276. cancelColor: "#999999",
  277. success: res => {
  278. if (res.confirm) {
  279. this.$u.post("/customer/delayed", {
  280. cusId: item.id
  281. }).then(res => {
  282. uni.showToast({
  283. icon: "none",
  284. title: "操作成功"
  285. })
  286. });
  287. }
  288. }
  289. })
  290. },
  291. //结束接待
  292. changeEnd(id) {
  293. uni.showModal({
  294. content: "确定更改当前客户接待状态为结束?",
  295. cancelColor: "#999999",
  296. success: res => {
  297. if (res.confirm) {
  298. this.$u.post("/customer/endReception", {
  299. id: id,
  300. houseId: this.buildingID
  301. }).then(res => {
  302. uni.showToast({
  303. icon: "none",
  304. title: "操作成功"
  305. })
  306. this.init();
  307. });
  308. }
  309. }
  310. })
  311. },
  312. //新增接待
  313. addreception() {
  314. const {
  315. dataCode,
  316. addAccount
  317. } = uni.getStorageSync("weapp_session_userInfo_data");
  318. if (dataCode == 6) {
  319. if (addAccount != 0) {
  320. uni.showToast({
  321. title: '不允许自建客户!',
  322. duration: 2000
  323. });
  324. return
  325. }
  326. if (this.waitCustomList.length == 0) {
  327. uni.navigateTo({
  328. url: '/pages/mine/reception/addreception'
  329. })
  330. return
  331. } else {
  332. for (var i = 0; i < this.waitCustomList.length; i++) {
  333. if (this.waitCustomList[i].status == 1) {
  334. uni.showLoading({
  335. title: '当前还有未完成的客户项'
  336. });
  337. setTimeout(function() {
  338. uni.hideLoading();
  339. }, 1000);
  340. return
  341. } else {
  342. uni.navigateTo({
  343. url: '/pages/mine/reception/addreception'
  344. })
  345. return
  346. }
  347. }
  348. }
  349. } else {
  350. uni.navigateTo({
  351. url: '/pages/mine/reception/addreception'
  352. });
  353. }
  354. },
  355. assign(item) {
  356. let url = `/pages/mine/reception/consultant?id=${item.id}`
  357. if (item.beforeAgentId) {
  358. url += `&beforeAgentId=${item.beforeAgentId}`;
  359. }
  360. uni.navigateTo({
  361. url: url
  362. })
  363. },
  364. },
  365. };
  366. </script>
  367. <style lang="scss" scoped>
  368. .cented-box {
  369. background: #F8F8F8;
  370. width: 100%;
  371. height: 100vh;
  372. padding-bottom: 30rpx;
  373. }
  374. .customer {
  375. margin-top: 30rpx;
  376. width: 100%;
  377. background: #FFFFFF;
  378. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  379. .title {
  380. height: 90rpx;
  381. border-bottom: 1px solid #E0E0E0;
  382. display: flex;
  383. align-items: center;
  384. justify-content: space-between;
  385. .zuo {
  386. // width: 25%;
  387. height: 100%;
  388. display: flex;
  389. align-items: center;
  390. .zuoimg {
  391. width: 52rpx;
  392. height: 52rpx;
  393. border-radius: 50%;
  394. // border: 1px solid #C9C9C9;
  395. border: 1px solid #2671E2;
  396. font-size: 30rpx;
  397. color: #2671E2;
  398. font-weight: 400;
  399. line-height: 48rpx;
  400. text-align: center;
  401. margin-left: 30rpx;
  402. }
  403. .zuoname {
  404. font-size: 30rpx;
  405. font-weight: bold;
  406. color: #333333;
  407. line-height: 30rpx;
  408. margin-left: 20rpx;
  409. }
  410. }
  411. .cen{
  412. // width:50%;
  413. color: #E7483C;
  414. text-align: center;
  415. }
  416. .you {
  417. // width: 25%;
  418. height: 100%;
  419. display: flex;
  420. align-items: center;
  421. margin-right: 30rpx;
  422. .youimg1 {
  423. width: 12rpx;
  424. height: 12rpx;
  425. border-radius: 50%;
  426. background: #2B6EFF;
  427. }
  428. .you-img{
  429. width: 24rpx;
  430. height: 32rpx;
  431. margin-left: 24rpx;
  432. }
  433. .youimg1-1 {
  434. width: 12rpx;
  435. height: 12rpx;
  436. border-radius: 50%;
  437. background: #F2A269;
  438. }
  439. .youtext {
  440. font-size: 30rpx;
  441. font-weight: 400;
  442. color: #292929;
  443. line-height: 30rpx;
  444. margin-left: 10rpx;
  445. }
  446. }
  447. }
  448. .centerbox {
  449. .centerbox-che {
  450. width: 100%;
  451. margin-top: 30rpx;
  452. height: 30rpx;
  453. font-size: 30rpx;
  454. font-weight: 400;
  455. color: #666666;
  456. line-height: 30rpx;
  457. text-indent: 30rpx;
  458. .shizai {
  459. color: #333333;
  460. }
  461. }
  462. .centerbox-che2 {
  463. width: 100%;
  464. margin-top: 30rpx;
  465. height: 30rpx;
  466. font-size: 30rpx;
  467. font-weight: 400;
  468. color: #666666;
  469. line-height: 30rpx;
  470. text-indent: 30rpx;
  471. display: flex;
  472. .Workcard {
  473. width: 50%;
  474. }
  475. }
  476. }
  477. .footer-button {
  478. // margin-top: 30rpx;
  479. width: 100%;
  480. height: 108rpx;
  481. display: flex;
  482. font-size: 30rpx;
  483. font-weight: 400;
  484. color: #333333;
  485. border-top: 1rpx solid #E0E0E0;
  486. justify-content:flex-end;
  487. line-height: 58rpx;
  488. .footer1 {
  489. // flex: 1;
  490. text-align: center;
  491. margin-top: 24rpx;
  492. // line-height: 90rpx;
  493. // border-right: 1rpx solid #E0E0E0;
  494. width: 156rpx;
  495. height: 60rpx;
  496. background: #FFFFFF;
  497. border-radius: 30rpx;
  498. border: 1px solid #999999;
  499. margin-left: 30rpx;
  500. }
  501. .footer3 {
  502. // flex: 1;
  503. text-align: center;
  504. margin-top: 24rpx;
  505. // line-height: 90rpx;
  506. width: 156rpx;
  507. height: 60rpx;
  508. background: #FFFFFF;
  509. border-radius: 30rpx;
  510. border: 1px solid #999999;
  511. margin-left: 30rpx;
  512. margin-right: 30rpx;
  513. }
  514. }
  515. }
  516. .add {
  517. width: 90upx;
  518. height: 90upx;
  519. position: fixed;
  520. bottom: 220upx;
  521. right: 44upx;
  522. }
  523. .add2 {
  524. width: 90upx;
  525. height: 90upx;
  526. position: fixed;
  527. bottom: 100upx;
  528. right: 44upx;
  529. }
  530. .content-sec {
  531. padding: 28rpx 30rpx 32rpx;
  532. display: flex;
  533. justify-content: space-between;
  534. .left {
  535. display: flex;
  536. align-items: center;
  537. .adviser {
  538. margin-right: 10rpx;
  539. padding: 5rpx 11rpx;
  540. border-radius: 50%;
  541. border: 1rpx solid #2671E2;
  542. background: #2671E2;
  543. font-size: 30rpx;
  544. color: #fff;
  545. }
  546. .cus {
  547. font-size: 30rpx;
  548. font-weight: 400;
  549. color: #666666;
  550. // line-height: 30rpx;
  551. }
  552. .arriveNum {
  553. font-size: 30rpx;
  554. font-weight: 400;
  555. margin-left: 10rpx;
  556. }
  557. }
  558. .right {
  559. font-size: 28rpx;
  560. font-weight: 400;
  561. color: #2671E2;
  562. display: flex;
  563. align-items: center;
  564. .img {
  565. margin-right: 10rpx;
  566. width: 32rpx;
  567. height: 32rpx;
  568. }
  569. }
  570. }
  571. .content-last {
  572. padding: 0 30rpx 34rpx;
  573. font-size: 30rpx;
  574. font-weight: 400;
  575. color: #666666;
  576. display: flex;
  577. align-items: center;
  578. justify-content: space-between;
  579. .c-items {
  580. flex-shrink: 0;
  581. display: flex;
  582. align-items: center;
  583. font-size: 28rpx;
  584. .c-items-img {
  585. margin-right: 10rpx;
  586. width: 32rpx;
  587. height: 32rpx;
  588. }
  589. }
  590. }
  591. </style>