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.
 
 
 

272 rader
6.2 KiB

  1. <template>
  2. <view class="cented-box">
  3. <view class="customer" v-for="(item,index) in waitCustomList" :key='index'>
  4. <view class="title">
  5. <view class="zuo">
  6. <view class="zuoimg">A</view>
  7. <view class="zuoname">{{item.name}}</view>
  8. </view>
  9. <view class="you">
  10. <view class="youimg1" v-if="item.status!=0"></view>
  11. <view class="youimg1-1" v-if="item.status==0"></view>
  12. <view class="youtext">{{item.status==0?"排队中":item.status==1?"接待中":"已完成"}}</view>
  13. </view>
  14. </view>
  15. <view class="centerbox" v-if="item.status!=0">
  16. <view class="centerbox-che">手机号码:<text class="shizai">{{item.phone || "--"}}</text></view>
  17. <view class="centerbox-che">开始时间:<text class="shizai">{{item.createTime}}</text></view>
  18. <view class="centerbox-che">顾问姓名:<text class="shizai">{{item.agentName}}</text></view>
  19. <view class="centerbox-che2" v-if="item.zkEquipmentState.audioStatus!=''">
  20. <view class="Workcard">工牌电量:<text class="shizai">{{item.zkEquipmentState.electricity}}%</text></view>
  21. <view class="Workcard">录音状态:
  22. <text v-if="item.zkEquipmentState.audioStatus=='true'" class="shizai">使用中</text>
  23. <text v-if="item.zkEquipmentState.audioStatus=='false'" class="shizai">未使用</text>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="footer-button" v-if="item.status!=0">
  28. <view class="footer1">接待延时</view>
  29. <view class="footer1" @click="goConsultant">重新指派</view>
  30. <view class="footer3">结束接待</view>
  31. </view>
  32. <view class="centerbox" v-if="item.status==0">
  33. <view class="centerbox-che">手机号码:<text class="shizai">{{item.phone || "--"}}</text></view>
  34. </view>
  35. <view class="footer-button" v-if="item.status==0">
  36. <view class="footer3">指派顾问</view>
  37. </view>
  38. </view>
  39. <image v-if="isAdd == 0&&(dataCode!=6||(dataCode==6&&addAccount==0))" @click="addreception()" class="add" src="/static/images/add.png" mode=""></image>
  40. </view>
  41. </template>
  42. <script>
  43. export default {
  44. data() {
  45. return {
  46. buildingID:'',
  47. waitCustomList:[],
  48. isAdd:'',
  49. dataCode:''
  50. };
  51. },
  52. components: {},
  53. onLoad() {},
  54. onShow() {
  55. this.buildingID = uni.getStorageSync('buildingID').id;
  56. const {
  57. addAccount,
  58. dataCode
  59. } = uni.getStorageSync("weapp_session_userInfo_data");
  60. this.addAccount=addAccount
  61. this.dataCode=dataCode
  62. this.init()
  63. this.queryHaveDept()
  64. },
  65. methods: {
  66. queryHaveDept() {
  67. return new Promise((resolve, reject) => {
  68. this.$u.get("/user/queryHaveDept?houseId="+this.buildingID).then(res => {
  69. this.isAdd=res;
  70. resolve();
  71. })
  72. })
  73. },
  74. init(){
  75. this.waitCustomList=[]
  76. let parames={
  77. itemId:this.buildingID
  78. }
  79. this.$u.post("/customer/reception", parames).then(data => {
  80. console.log(data)
  81. this.waitCustomList=data;
  82. });
  83. },
  84. //新增接待
  85. addreception(){
  86. const {
  87. dataCode,addAccount
  88. } = uni.getStorageSync("weapp_session_userInfo_data");
  89. if(dataCode==6){
  90. if(addAccount!=0){
  91. uni.showToast({
  92. title: '不允许自建客户!',
  93. duration: 2000
  94. });
  95. return
  96. }
  97. console.log(this.waitCustomList.length)
  98. if(this.waitCustomList.length==0){
  99. uni.navigateTo({
  100. url: "/pages/customer/add/add"
  101. })
  102. return
  103. }else{
  104. for(var i=0; i<this.waitCustomList.length; i++){
  105. if(this.waitCustomList[i].status==1){
  106. uni.showLoading({
  107. title: '当前还有未完成的客户项'
  108. });
  109. setTimeout(function () {
  110. uni.hideLoading();
  111. }, 1000);
  112. return
  113. }else{
  114. uni.navigateTo({
  115. url: "/pages/customer/add/add"
  116. })
  117. return
  118. }
  119. }
  120. }
  121. }else{
  122. uni.navigateTo({
  123. url: "/pages/customer/add/add"
  124. })
  125. }
  126. // uni.navigateTo({
  127. // url: '/pages/mine/reception/addreception'
  128. // });
  129. },
  130. goConsultant(){
  131. uni.navigateTo({
  132. url: '/pages/mine/reception/consultant'
  133. });
  134. },
  135. },
  136. };
  137. </script>
  138. <style lang="scss" scoped>
  139. .cented-box{
  140. background: #F8F8F8;
  141. width: 100%;
  142. height: 100vh;
  143. padding-bottom: 30rpx;
  144. }
  145. .customer{
  146. margin-top: 30rpx;
  147. width: 100%;
  148. background: #FFFFFF;
  149. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  150. .title{
  151. height: 90rpx;
  152. border-bottom: 1px solid #E0E0E0;
  153. display: flex;
  154. align-items: center;
  155. .zuo{
  156. width: 80%;
  157. height: 100%;
  158. display: flex;
  159. align-items: center;
  160. .zuoimg{
  161. width: 52rpx;
  162. height: 52rpx;
  163. border-radius: 50%;
  164. border: 1px solid #C9C9C9;
  165. font-size: 30rpx;
  166. color: #292929;
  167. font-weight: 400;
  168. line-height: 52rpx;
  169. text-align: center;
  170. margin-left: 30rpx;
  171. }
  172. .zuoname{
  173. font-size: 30rpx;
  174. font-weight: 500;
  175. color: #333333;
  176. line-height: 30rpx;
  177. margin-left: 20rpx;
  178. }
  179. }
  180. .you{
  181. width: 20%;
  182. height: 100%;
  183. display: flex;
  184. align-items: center;
  185. .youimg1{
  186. width: 12rpx;
  187. height: 12rpx;
  188. border-radius: 50%;
  189. background: #2B6EFF;
  190. }
  191. .youimg1-1{
  192. width: 12rpx;
  193. height: 12rpx;
  194. border-radius: 50%;
  195. background: #F2A269;
  196. }
  197. .youtext{
  198. font-size: 30rpx;
  199. font-weight: 400;
  200. color: #292929;
  201. line-height: 30rpx;
  202. margin-left: 10rpx;
  203. }
  204. }
  205. }
  206. .centerbox{
  207. .centerbox-che{
  208. width: 100%;
  209. margin-top: 30rpx;
  210. height: 30rpx;
  211. font-size: 30rpx;
  212. font-weight: 400;
  213. color: #666666;
  214. line-height: 30rpx;
  215. text-indent: 30rpx;
  216. .shizai{
  217. color: #333333;
  218. }
  219. }
  220. .centerbox-che2{
  221. width: 100%;
  222. margin-top: 30rpx;
  223. height: 30rpx;
  224. font-size: 30rpx;
  225. font-weight: 400;
  226. color: #666666;
  227. line-height: 30rpx;
  228. text-indent: 30rpx;
  229. display: flex;
  230. .Workcard{
  231. width: 50%;
  232. }
  233. }
  234. }
  235. .footer-button{
  236. margin-top: 30rpx;
  237. width: 100%;
  238. height: 90rpx;
  239. display: flex;
  240. font-size: 30rpx;
  241. font-weight: 400;
  242. color: #333333;
  243. border-top: 1rpx solid #E0E0E0;
  244. .footer1{
  245. flex: 1;
  246. text-align: center;
  247. line-height: 90rpx;
  248. border-right: 1rpx solid #E0E0E0;
  249. }
  250. .footer3{
  251. flex: 1;
  252. text-align: center;
  253. line-height: 90rpx;
  254. }
  255. }
  256. }
  257. .add {
  258. width: 90rpx;
  259. height: 90rpx;
  260. position: fixed;
  261. bottom: 70rpx;
  262. right: 44rpx;
  263. }
  264. </style>