Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

398 rader
9.8 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;" src="https://static.quhouse.com/zhikong_xcx_img/nodatalist.png" mode=""></image>
  7. </view>
  8. <view style="text-align: center;width: 100%;margin-top: 20rpx;color: #999999;">暂无数据</view>
  9. </view>
  10. </view>
  11. <view class="customer" v-if="waitCustomList.length!=0" v-for="(item,index) in waitCustomList" :key='index' @click="tapThevisiting(item)">
  12. <view class="title">
  13. <view class="zuo">
  14. <!-- <view class="zuoimg">A</view> -->
  15. <view class="zuoname">{{item.name}}</view>
  16. </view>
  17. <view class="you">
  18. <view class="youimg1" v-if="item.status!=0"></view>
  19. <view class="youimg1-1" v-if="item.status==0"></view>
  20. <view class="youtext">{{item.status==0?"排队中":item.status==1?"接待中":"已完成"}}</view>
  21. </view>
  22. </view>
  23. <view class="centerbox" v-if="item.status!=0">
  24. <view class="centerbox-che">手机号码:<text class="shizai">{{item.phone || "--"}}</text></view>
  25. <view class="centerbox-che">开始时间:<text class="shizai">{{item.createTime}}</text></view>
  26. <view class="centerbox-che">顾问姓名:<text class="shizai" style="color: #333333;">{{item.agentName}}</text></view>
  27. <view class="centerbox-che2" v-if="item.status==1">
  28. <view class="Workcard" v-if="item.status==1&&item.zkEquipmentState.onLine==0">设备状态:<text class="shizai" style="color: red;">离线</text></view>
  29. <view class="Workcard" v-if="item.status==1&&item.zkEquipmentState.onLine!=0">工牌电量:<text class="shizai" style="color: #333333;">{{item.zkEquipmentState.electricity}}%</text></view>
  30. <view class="Workcard" v-if="item.status==1&&item.zkEquipmentState.onLine==1">录音状态:
  31. <text v-if="item.zkEquipmentState.simAudioStatus=='true'" class="shizai" style="color: #333333;">使用中</text>
  32. <text v-if="item.zkEquipmentState.simAudioStatus=='false'" class="shizai" style="color: #333333;">未使用</text>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="footer-button" v-if="item.status!=0">
  37. <view v-if="permissions.commonly3" class="footer1" @click.stop="addTime(item)">接待延时</view>
  38. <view v-if="permissions.commonly4" class="footer1" @click.stop="assign(item)">重新指派</view>
  39. <view v-if="permissions.commonly5" class="footer3" @click.stop="changeEnd(item.id)">结束接待</view>
  40. </view>
  41. <view class="centerbox" v-if="item.status==0">
  42. <view class="centerbox-che">手机号码:<text class="shizai">{{item.phone || "--"}}</text></view>
  43. </view>
  44. <view class="footer-button" v-if="item.status==0">
  45. <view class="footer3" @click.stop="assign(item)">指派顾问</view>
  46. </view>
  47. </view>
  48. <image v-if="permissions.commonly2" @click="addreception()" class="add" src="/static/images/add.png" mode=""></image>
  49. <image class="add2" @click="reshCustom()" src="https://static.quhouse.com/zhikong_xcx_img/refresh.png" mode=""></image>
  50. </view>
  51. </template>
  52. <script>
  53. export default {
  54. data() {
  55. return {
  56. buildingID:'',
  57. waitCustomList:[],
  58. isAdd:'',
  59. dataCode:'',
  60. addAccount:'',
  61. permissions:{
  62. commonly1:false,//查看
  63. commonly2:false,//添加
  64. commonly3:false,//指派
  65. commonly4:false,
  66. commonly5:false,
  67. },
  68. };
  69. },
  70. onShow() {
  71. this.buildingID = uni.getStorageSync('buildingID').id;
  72. let newmenulist= uni.getStorageSync('weapp_session_Menu_data');
  73. this.permissions.commonly1=newmenulist.jd_ck;
  74. this.permissions.commonly2=newmenulist.jd_xz;
  75. this.permissions.commonly3=newmenulist.jd_zp;
  76. this.permissions.commonly4=newmenulist.jdys;
  77. this.permissions.commonly5=newmenulist.jsjd;
  78. const {
  79. addAccount,
  80. dataCode
  81. } = uni.getStorageSync("weapp_session_userInfo_data");
  82. this.addAccount=addAccount;
  83. this.dataCode=dataCode;
  84. this.init()
  85. this.queryHaveDept()
  86. },
  87. methods: {
  88. reshCustom(){
  89. this.init()
  90. },
  91. tapThevisiting(item) {
  92. if(this.permissions.commonly1!=true){
  93. return
  94. }
  95. uni.showLoading({
  96. title: '加载中',
  97. mask:true
  98. });
  99. if(item.status==0){
  100. setTimeout(function () {
  101. uni.hideLoading();
  102. }, 2000);
  103. uni.showToast({
  104. icon: "none",
  105. title: "排队中"
  106. })
  107. return
  108. }else{
  109. const parames = {
  110. pageNum: 1,
  111. pageSize: 100,
  112. query: {
  113. customerId: item.id,
  114. }
  115. }
  116. var itemsd={
  117. bg:0,
  118. customerId:item.id,
  119. id:'',
  120. onebest:''
  121. }
  122. this.$u.post("/corpus/findByPage", parames).then(res => {
  123. setTimeout(function () {
  124. uni.hideLoading();
  125. }, 2000);
  126. if(res){
  127. let newobj = res[0];
  128. uni.navigateTo({
  129. url: `/pages/mine/details?customerId=${newobj.customerId}&status=${newobj.status}&itemobj=${JSON.stringify(itemsd)}&stateisshow=${"1"}`
  130. })
  131. }else{
  132. uni.showToast({
  133. icon: "none",
  134. title: "暂无音频"
  135. })
  136. return
  137. }
  138. })
  139. }
  140. },
  141. queryHaveDept() {
  142. return new Promise((resolve, reject) => {
  143. this.$u.get("/user/queryHaveDept?houseId="+this.buildingID).then(res => {
  144. this.isAdd=res;
  145. resolve();
  146. })
  147. })
  148. },
  149. init(){
  150. this.waitCustomList=[]
  151. let parames={
  152. itemId:this.buildingID
  153. }
  154. this.$u.post("/customer/reception", parames).then(data => {
  155. this.waitCustomList=data;
  156. });
  157. },
  158. //延时接待
  159. addTime(item) {
  160. uni.showModal({
  161. content: "确定延长半小时接待时间?",
  162. cancelColor: "#999999",
  163. success: res => {
  164. if (res.confirm) {
  165. this.$u.post("/customer/delayed", {
  166. cusId: item.id
  167. }).then(res => {
  168. uni.showToast({
  169. icon: "none",
  170. title: "操作成功"
  171. })
  172. });
  173. }
  174. }
  175. })
  176. },
  177. //结束接待
  178. changeEnd(id) {
  179. uni.showModal({
  180. content: "确定更改当前客户接待状态为结束?",
  181. cancelColor: "#999999",
  182. success: res => {
  183. if (res.confirm) {
  184. this.$u.post("/customer/endReception", {
  185. id:id,
  186. houseId:this.buildingID
  187. }).then(res => {
  188. uni.showToast({
  189. icon: "none",
  190. title: "操作成功"
  191. })
  192. this.init();
  193. });
  194. }
  195. }
  196. })
  197. },
  198. //新增接待
  199. addreception(){
  200. const {
  201. dataCode,addAccount
  202. } = uni.getStorageSync("weapp_session_userInfo_data");
  203. if(dataCode==6){
  204. if(addAccount!=0){
  205. uni.showToast({
  206. title: '不允许自建客户!',
  207. duration: 2000
  208. });
  209. return
  210. }
  211. if(this.waitCustomList.length==0){
  212. uni.navigateTo({
  213. url: '/pages/mine/reception/addreception'
  214. })
  215. return
  216. }else{
  217. for(var i=0; i<this.waitCustomList.length; i++){
  218. if(this.waitCustomList[i].status==1){
  219. uni.showLoading({
  220. title: '当前还有未完成的客户项'
  221. });
  222. setTimeout(function () {
  223. uni.hideLoading();
  224. }, 1000);
  225. return
  226. }else{
  227. uni.navigateTo({
  228. url: '/pages/mine/reception/addreception'
  229. })
  230. return
  231. }
  232. }
  233. }
  234. }else{
  235. uni.navigateTo({
  236. url: '/pages/mine/reception/addreception'
  237. });
  238. }
  239. },
  240. assign(item) {
  241. let url = `/pages/mine/reception/consultant?id=${item.id}`
  242. if (item.beforeAgentId) {
  243. url += `&beforeAgentId=${item.beforeAgentId}`;
  244. }
  245. uni.navigateTo({
  246. url: url
  247. })
  248. },
  249. },
  250. };
  251. </script>
  252. <style lang="scss" scoped>
  253. .cented-box{
  254. background: #F8F8F8;
  255. width: 100%;
  256. height: 100vh;
  257. padding-bottom: 30rpx;
  258. }
  259. .customer{
  260. margin-top: 30rpx;
  261. width: 100%;
  262. background: #FFFFFF;
  263. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  264. .title{
  265. height: 90rpx;
  266. border-bottom: 1px solid #E0E0E0;
  267. display: flex;
  268. align-items: center;
  269. .zuo{
  270. width: 80%;
  271. height: 100%;
  272. display: flex;
  273. align-items: center;
  274. .zuoimg{
  275. width: 52rpx;
  276. height: 52rpx;
  277. border-radius: 50%;
  278. border: 1px solid #C9C9C9;
  279. font-size: 30rpx;
  280. color: #292929;
  281. font-weight: 400;
  282. line-height: 52rpx;
  283. text-align: center;
  284. margin-left: 30rpx;
  285. }
  286. .zuoname{
  287. font-size: 30rpx;
  288. font-weight: 500;
  289. color: #333333;
  290. line-height: 30rpx;
  291. margin-left: 20rpx;
  292. }
  293. }
  294. .you{
  295. width: 20%;
  296. height: 100%;
  297. display: flex;
  298. align-items: center;
  299. .youimg1{
  300. width: 12rpx;
  301. height: 12rpx;
  302. border-radius: 50%;
  303. background: #2B6EFF;
  304. }
  305. .youimg1-1{
  306. width: 12rpx;
  307. height: 12rpx;
  308. border-radius: 50%;
  309. background: #F2A269;
  310. }
  311. .youtext{
  312. font-size: 30rpx;
  313. font-weight: 400;
  314. color: #292929;
  315. line-height: 30rpx;
  316. margin-left: 10rpx;
  317. }
  318. }
  319. }
  320. .centerbox{
  321. .centerbox-che{
  322. width: 100%;
  323. margin-top: 30rpx;
  324. height: 30rpx;
  325. font-size: 30rpx;
  326. font-weight: 400;
  327. color: #666666;
  328. line-height: 30rpx;
  329. text-indent: 30rpx;
  330. .shizai{
  331. color: #333333;
  332. }
  333. }
  334. .centerbox-che2{
  335. width: 100%;
  336. margin-top: 30rpx;
  337. height: 30rpx;
  338. font-size: 30rpx;
  339. font-weight: 400;
  340. color: #666666;
  341. line-height: 30rpx;
  342. text-indent: 30rpx;
  343. display: flex;
  344. .Workcard{
  345. width: 50%;
  346. }
  347. }
  348. }
  349. .footer-button{
  350. margin-top: 30rpx;
  351. width: 100%;
  352. height: 90rpx;
  353. display: flex;
  354. font-size: 30rpx;
  355. font-weight: 400;
  356. color: #333333;
  357. border-top: 1rpx solid #E0E0E0;
  358. .footer1{
  359. flex: 1;
  360. text-align: center;
  361. line-height: 90rpx;
  362. border-right: 1rpx solid #E0E0E0;
  363. }
  364. .footer3{
  365. flex: 1;
  366. text-align: center;
  367. line-height: 90rpx;
  368. }
  369. }
  370. }
  371. .add {
  372. width: 90upx;
  373. height: 90upx;
  374. position: fixed;
  375. bottom: 180upx;
  376. right: 44upx;
  377. }
  378. .add2{
  379. width: 90upx;
  380. height: 90upx;
  381. position: fixed;
  382. bottom: 60upx;
  383. right: 44upx;
  384. }
  385. </style>