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.
 
 
 

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