選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

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