AI销管
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 

626 wiersze
15 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. 自动结束 18:12
  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. onShow() {
  176. this.buildingID = uni.getStorageSync('buildingID').id;
  177. let newmenulist = uni.getStorageSync('weapp_session_Menu_data');
  178. this.permissions.commonly1 = newmenulist.jd_ck;
  179. this.permissions.commonly2 = newmenulist.jd_xz;
  180. this.permissions.commonly3 = newmenulist.jd_zp;
  181. this.permissions.commonly4 = newmenulist.jdys;
  182. this.permissions.commonly5 = newmenulist.jsjd;
  183. const {
  184. addAccount,
  185. dataCode
  186. } = uni.getStorageSync("weapp_session_userInfo_data");
  187. this.addAccount = addAccount;
  188. this.dataCode = dataCode;
  189. this.init()
  190. this.queryHaveDept()
  191. },
  192. methods: {
  193. reshCustom() {
  194. this.init()
  195. },
  196. tapThevisiting(item) {
  197. if (this.permissions.commonly1 != true) {
  198. return
  199. }
  200. uni.showLoading({
  201. title: '加载中',
  202. mask: true
  203. });
  204. if (item.status == 0) {
  205. setTimeout(function() {
  206. uni.hideLoading();
  207. }, 2000);
  208. uni.showToast({
  209. icon: "none",
  210. title: "排队中"
  211. })
  212. return
  213. } else {
  214. const parames = {
  215. pageNum: 1,
  216. pageSize: 100,
  217. query: {
  218. customerId: item.id,
  219. }
  220. }
  221. var itemsd = {
  222. bg: 0,
  223. customerId: item.id,
  224. id: '',
  225. onebest: ''
  226. }
  227. this.$u.post("/corpus/findByPage", parames).then(res => {
  228. setTimeout(function() {
  229. uni.hideLoading();
  230. }, 2000);
  231. if (res) {
  232. let newobj = res[0];
  233. uni.navigateTo({
  234. url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(itemsd)}&stateisshow=${"1"}`
  235. })
  236. } else {
  237. uni.showToast({
  238. icon: "none",
  239. title: "暂无音频"
  240. })
  241. return
  242. }
  243. })
  244. }
  245. },
  246. queryHaveDept() {
  247. return new Promise((resolve, reject) => {
  248. this.$u.get("/user/queryHaveDept?houseId=" + this.buildingID).then(res => {
  249. this.isAdd = res;
  250. resolve();
  251. })
  252. })
  253. },
  254. init() {
  255. this.waitCustomList = []
  256. let parames = {
  257. itemId: this.buildingID
  258. }
  259. this.$u.post("/customer/reception", parames).then(data => {
  260. this.waitCustomList = data;
  261. });
  262. },
  263. //延时接待
  264. addTime(item) {
  265. uni.showModal({
  266. content: "确定延长半小时接待时间?",
  267. cancelColor: "#999999",
  268. success: res => {
  269. if (res.confirm) {
  270. this.$u.post("/customer/delayed", {
  271. cusId: item.id
  272. }).then(res => {
  273. uni.showToast({
  274. icon: "none",
  275. title: "操作成功"
  276. })
  277. });
  278. }
  279. }
  280. })
  281. },
  282. //结束接待
  283. changeEnd(id) {
  284. uni.showModal({
  285. content: "确定更改当前客户接待状态为结束?",
  286. cancelColor: "#999999",
  287. success: res => {
  288. if (res.confirm) {
  289. this.$u.post("/customer/endReception", {
  290. id: id,
  291. houseId: this.buildingID
  292. }).then(res => {
  293. uni.showToast({
  294. icon: "none",
  295. title: "操作成功"
  296. })
  297. this.init();
  298. });
  299. }
  300. }
  301. })
  302. },
  303. //新增接待
  304. addreception() {
  305. const {
  306. dataCode,
  307. addAccount
  308. } = uni.getStorageSync("weapp_session_userInfo_data");
  309. if (dataCode == 6) {
  310. if (addAccount != 0) {
  311. uni.showToast({
  312. title: '不允许自建客户!',
  313. duration: 2000
  314. });
  315. return
  316. }
  317. if (this.waitCustomList.length == 0) {
  318. uni.navigateTo({
  319. url: '/pages/mine/reception/addreception'
  320. })
  321. return
  322. } else {
  323. for (var i = 0; i < this.waitCustomList.length; i++) {
  324. if (this.waitCustomList[i].status == 1) {
  325. uni.showLoading({
  326. title: '当前还有未完成的客户项'
  327. });
  328. setTimeout(function() {
  329. uni.hideLoading();
  330. }, 1000);
  331. return
  332. } else {
  333. uni.navigateTo({
  334. url: '/pages/mine/reception/addreception'
  335. })
  336. return
  337. }
  338. }
  339. }
  340. } else {
  341. uni.navigateTo({
  342. url: '/pages/mine/reception/addreception'
  343. });
  344. }
  345. },
  346. assign(item) {
  347. let url = `/pages/mine/reception/consultant?id=${item.id}`
  348. if (item.beforeAgentId) {
  349. url += `&beforeAgentId=${item.beforeAgentId}`;
  350. }
  351. uni.navigateTo({
  352. url: url
  353. })
  354. },
  355. },
  356. };
  357. </script>
  358. <style lang="scss" scoped>
  359. .cented-box {
  360. background: #F8F8F8;
  361. width: 100%;
  362. height: 100vh;
  363. padding-bottom: 30rpx;
  364. }
  365. .customer {
  366. margin-top: 30rpx;
  367. width: 100%;
  368. background: #FFFFFF;
  369. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  370. .title {
  371. height: 90rpx;
  372. border-bottom: 1px solid #E0E0E0;
  373. display: flex;
  374. align-items: center;
  375. justify-content: space-between;
  376. .zuo {
  377. // width: 25%;
  378. height: 100%;
  379. display: flex;
  380. align-items: center;
  381. .zuoimg {
  382. width: 52rpx;
  383. height: 52rpx;
  384. border-radius: 50%;
  385. // border: 1px solid #C9C9C9;
  386. border: 1px solid #2671E2;
  387. font-size: 30rpx;
  388. color: #2671E2;
  389. font-weight: 400;
  390. line-height: 48rpx;
  391. text-align: center;
  392. margin-left: 30rpx;
  393. }
  394. .zuoname {
  395. font-size: 30rpx;
  396. font-weight: bold;
  397. color: #333333;
  398. line-height: 30rpx;
  399. margin-left: 20rpx;
  400. }
  401. }
  402. .cen{
  403. // width:50%;
  404. color: #E7483C;
  405. text-align: center;
  406. }
  407. .you {
  408. // width: 25%;
  409. height: 100%;
  410. display: flex;
  411. align-items: center;
  412. margin-right: 30rpx;
  413. .youimg1 {
  414. width: 12rpx;
  415. height: 12rpx;
  416. border-radius: 50%;
  417. background: #2B6EFF;
  418. }
  419. .you-img{
  420. width: 24rpx;
  421. height: 32rpx;
  422. margin-left: 24rpx;
  423. }
  424. .youimg1-1 {
  425. width: 12rpx;
  426. height: 12rpx;
  427. border-radius: 50%;
  428. background: #F2A269;
  429. }
  430. .youtext {
  431. font-size: 30rpx;
  432. font-weight: 400;
  433. color: #292929;
  434. line-height: 30rpx;
  435. margin-left: 10rpx;
  436. }
  437. }
  438. }
  439. .centerbox {
  440. .centerbox-che {
  441. width: 100%;
  442. margin-top: 30rpx;
  443. height: 30rpx;
  444. font-size: 30rpx;
  445. font-weight: 400;
  446. color: #666666;
  447. line-height: 30rpx;
  448. text-indent: 30rpx;
  449. .shizai {
  450. color: #333333;
  451. }
  452. }
  453. .centerbox-che2 {
  454. width: 100%;
  455. margin-top: 30rpx;
  456. height: 30rpx;
  457. font-size: 30rpx;
  458. font-weight: 400;
  459. color: #666666;
  460. line-height: 30rpx;
  461. text-indent: 30rpx;
  462. display: flex;
  463. .Workcard {
  464. width: 50%;
  465. }
  466. }
  467. }
  468. .footer-button {
  469. // margin-top: 30rpx;
  470. width: 100%;
  471. height: 108rpx;
  472. display: flex;
  473. font-size: 30rpx;
  474. font-weight: 400;
  475. color: #333333;
  476. border-top: 1rpx solid #E0E0E0;
  477. justify-content:flex-end;
  478. line-height: 58rpx;
  479. .footer1 {
  480. // flex: 1;
  481. text-align: center;
  482. margin-top: 24rpx;
  483. // line-height: 90rpx;
  484. // border-right: 1rpx solid #E0E0E0;
  485. width: 156rpx;
  486. height: 60rpx;
  487. background: #FFFFFF;
  488. border-radius: 30rpx;
  489. border: 1px solid #999999;
  490. margin-left: 30rpx;
  491. }
  492. .footer3 {
  493. // flex: 1;
  494. text-align: center;
  495. margin-top: 24rpx;
  496. // line-height: 90rpx;
  497. width: 156rpx;
  498. height: 60rpx;
  499. background: #FFFFFF;
  500. border-radius: 30rpx;
  501. border: 1px solid #999999;
  502. margin-left: 30rpx;
  503. margin-right: 30rpx;
  504. }
  505. }
  506. }
  507. .add {
  508. width: 90upx;
  509. height: 90upx;
  510. position: fixed;
  511. bottom: 220upx;
  512. right: 44upx;
  513. }
  514. .add2 {
  515. width: 90upx;
  516. height: 90upx;
  517. position: fixed;
  518. bottom: 100upx;
  519. right: 44upx;
  520. }
  521. .content-sec {
  522. padding: 28rpx 30rpx 32rpx;
  523. display: flex;
  524. justify-content: space-between;
  525. .left {
  526. display: flex;
  527. align-items: center;
  528. .adviser {
  529. margin-right: 10rpx;
  530. padding: 5rpx 11rpx;
  531. border-radius: 50%;
  532. border: 1rpx solid #2671E2;
  533. background: #2671E2;
  534. font-size: 30rpx;
  535. color: #fff;
  536. }
  537. .cus {
  538. font-size: 30rpx;
  539. font-weight: 400;
  540. color: #666666;
  541. // line-height: 30rpx;
  542. }
  543. .arriveNum {
  544. font-size: 30rpx;
  545. font-weight: 400;
  546. margin-left: 10rpx;
  547. }
  548. }
  549. .right {
  550. font-size: 28rpx;
  551. font-weight: 400;
  552. color: #2671E2;
  553. display: flex;
  554. align-items: center;
  555. .img {
  556. margin-right: 10rpx;
  557. width: 32rpx;
  558. height: 32rpx;
  559. }
  560. }
  561. }
  562. .content-last {
  563. padding: 0 30rpx 34rpx;
  564. font-size: 30rpx;
  565. font-weight: 400;
  566. color: #666666;
  567. display: flex;
  568. align-items: center;
  569. justify-content: space-between;
  570. .c-items {
  571. flex-shrink: 0;
  572. display: flex;
  573. align-items: center;
  574. font-size: 28rpx;
  575. .c-items-img {
  576. margin-right: 10rpx;
  577. width: 32rpx;
  578. height: 32rpx;
  579. }
  580. }
  581. }
  582. </style>