customer-reception.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. /*******************************************************************************
  2. * Copyright(c) 2022 dongke All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:
  5. * 2.新增接待
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * yjb 2022-0-12 1.00
  9. *******************************************************************************/
  10. const Constants = require('@/utils/Constants.js');
  11. const util = require('@/utils/util.js')
  12. const mixins = require('@/mixins/index.js')
  13. const app = getApp()
  14. Page({
  15. mixins: [mixins],
  16. /**
  17. * 页面的初始数据
  18. */
  19. data: {
  20. tagList: [{ title: "所有接待", code: 'all' }, { title: "跟进任务", code: '跟进状态-跟进' }, { title: "邀约进店", code: '跟进状态-邀约' }, { title: "预约量尺", code: '跟进状态-约尺' }],
  21. buttonSaveList: [{ code: 'add', title: '新建', width: '120rpx', color: '#1B365D' }],
  22. contentSaveList: [{ code: 'need', title: '共', type: 'count', color: '#1B365D', tail: '条接待信息', bill: 1, fontSize: '15px' }],
  23. // 查询条件
  24. searchContent: [{
  25. code: 'createtime',
  26. title: '近30天',
  27. defaultValue: 5,
  28. searchType: Constants.searchType.date
  29. }, {
  30. code: 'staff',
  31. title: '业务员',
  32. dropType: 'staff'
  33. }, {
  34. code: 'orderStatus',
  35. title: '订单状态',
  36. searchType: Constants.searchType.switch,
  37. list: [
  38. {
  39. checked: true,
  40. text: "异常",
  41. value: "审-异常"
  42. },
  43. {
  44. checked: true,
  45. text: "待审",
  46. value: "审-待审"
  47. },
  48. {
  49. checked: true,
  50. text: "审批中",
  51. value: "审-审中"
  52. },
  53. {
  54. checked: true,
  55. text: "通过",
  56. value: "审-通过"
  57. },
  58. {
  59. checked: true,
  60. text: "拒绝",
  61. value: "审-拒绝"
  62. },
  63. {
  64. checked: false,
  65. text: "冲正",
  66. value: "订单状态-冲正"
  67. }
  68. ]
  69. }, {
  70. code: 'choose',
  71. title: '筛选',
  72. searchType: Constants.searchType.pick
  73. }],
  74. // 查询条件-筛选
  75. pullMenuList: [{
  76. code: 'customerFrom',
  77. pullType: 'mSelect',
  78. typeName: 'customerFrom'
  79. }, {
  80. code: 'fitupType',
  81. pullType: 'mSelect',
  82. typeName: 'fitupType'
  83. }, {
  84. code: 'houseType',
  85. pullType: 'mSelect',
  86. typeName: 'houseType'
  87. }, {
  88. code: 'ageComposition',
  89. pullType: 'mSelect',
  90. typeName: 'ageComposition'
  91. }],
  92. // 列表区(内容)
  93. contentList: [
  94. { name: 'cusPhone', title: '客户电话', phone: true },
  95. { name: 'addressFull', title: '客户地址' },
  96. { name: [{ name: 'orgName', title: '' }, { name: 'staffName', title: '业务员 ' }], title: '门店信息' },
  97. { name: 'nextFollowTime', title: '提醒时间' }
  98. ],
  99. // 列表区(脚部信息)
  100. footerInfo: [{
  101. prefix: '跟进 ',
  102. name: 'followCount',
  103. title: ' 次'
  104. },],
  105. // 弹出按钮
  106. buttonList: [
  107. { name: 'followUp', title: '客户跟进' },
  108. { name: 'followUpTasks', title: '跟进任务' },
  109. { name: 'customerRefundList', title: '销售订单' },
  110. { name: 'customerRefundList', title: '客户收款' },
  111. ],
  112. totallength: 0, //视图下方提醒数量
  113. // 路由
  114. routeObjName: 'cusFollow',
  115. followStatus: 'all',
  116. active: 0
  117. },
  118. /**
  119. * @desc : 点击三个点事件
  120. * @date : 2024/2/1 15:49
  121. * @author : 于继渤
  122. */
  123. toPoint(e) {
  124. let item = e.detail.item
  125. let buttonList = this.data.buttonList
  126. if (item.followStatus == '跟进状态-约尺' && item.measureStatus == '量尺状态-待量尺') {
  127. buttonList = [
  128. { name: 'followUp', title: '客户跟进' },
  129. { name: 'followUpTasks', title: '跟进任务' },
  130. { name: 'customerRefundList', title: '销售订单' },
  131. { name: 'customerRefundList', title: '客户收款' },
  132. { name: 'measureTo', title: '量尺回执' }
  133. ]
  134. } else {
  135. buttonList = [
  136. { name: 'followUp', title: '客户跟进' },
  137. { name: 'followUpTasks', title: '跟进任务' },
  138. { name: 'customerRefundList', title: '销售订单' },
  139. { name: 'customerRefundList', title: '客户收款' }
  140. ]
  141. }
  142. this.setData({
  143. buttonList: buttonList
  144. })
  145. },
  146. /**
  147. * @desc : 切换
  148. * @date : 2024/2/1 15:49
  149. * @author : 于继渤
  150. */
  151. onChangeTabs(e) {
  152. let code = e.detail.detail.code
  153. this.setData({
  154. followStatus: code,
  155. })
  156. this.searchData()
  157. },
  158. /**
  159. * @desc : 设置查询参数
  160. * @date : 2024/2/1 15:49
  161. * @author : 于继渤
  162. */
  163. setSearchParams(params) {
  164. //销售状态
  165. params.followStatus = this.data.followStatus == 'all' ? '' : this.data.followStatus
  166. return params
  167. },
  168. /**
  169. * @desc : 处理接口返回数据
  170. * @date : 2024/2/1 15:49
  171. * @author : 于继渤
  172. */
  173. handleSearchData(tableData) {
  174. let contentSaveList = this.data.contentSaveList
  175. contentSaveList[0].bill = tableData.length
  176. this.setData({
  177. contentSaveList: contentSaveList
  178. })
  179. },
  180. /**
  181. * @desc : 查询
  182. * @date : 2024/2/1 15:49
  183. * @author : 于继渤
  184. */
  185. getData(params) {
  186. return this.excute(this.data.service, this.data.service.selectByCond, params);
  187. },
  188. })