dmPublicGuestPopView.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. <template>
  2. <dm-pop-view ref='popView' title="选择顾问" :isShowConfirm="false" :maskTapHide='maskTapHide' @confirm="confirmAction">
  3. <view class="content">
  4. <view class="counselorList">
  5. <view class="counselorItem" v-for="(item, index) in newAdviserData" :key="index" @click="selectedCounselor(item,index)">
  6. <image v-if="item.isSelected==false" src="../../static/icons/icon_check_nor@2x.png" mode=""></image>
  7. <image v-else src="../../static/icons/icon_check_sel@2x.png" mode=""></image>
  8. <text class="title" >{{item.adviserName}}({{item.adviserMobile}})</text>
  9. <text class="subtitle">已跟进{{item.followCount || 0}}人</text>
  10. </view>
  11. </view>
  12. <view class="bottomTools">
  13. <text @click="resetClick">重置</text><text @click="confirmClick">确定</text>
  14. </view>
  15. </view>
  16. </dm-pop-view>
  17. </template>
  18. <script>
  19. import dmPopView from './dmPopScrollView.vue'
  20. import moment from '../../static/moment.min.js'
  21. export default {
  22. props: {
  23. maskTapHide: {
  24. type: Boolean,
  25. default: true
  26. },
  27. isRadio:Boolean, // 是否单选
  28. dataList: Array,
  29. adviserSearchData:Array,
  30. },
  31. data() {
  32. return {
  33. nowDate:'',
  34. afterDate:'',
  35. startDate: '',
  36. endDate: '',
  37. oldAdviserData: null,
  38. newAdviserData:this.adviserSearchData
  39. }
  40. },
  41. watch:{
  42. adviserSearchData(val){
  43. this.newAdviserData = val;
  44. }
  45. },
  46. methods: {
  47. show() {
  48. this.$refs.popView.show()
  49. },
  50. confirmAction() {
  51. },
  52. selectedCounselor(item){
  53. if(!this.oldAdviserData){
  54. this.oldAdviserData = JSON.stringify(this.newAdviserData)
  55. }
  56. if(this.isRadio){
  57. for(let i in this.newAdviserData){
  58. const element = this.newAdviserData[i];
  59. element.isSelected = false;
  60. }
  61. }
  62. item.isSelected = !item.isSelected;
  63. this.$forceUpdate();
  64. },
  65. resetClick(){ // 重置
  66. if(!this.oldAdviserData){
  67. return
  68. }
  69. this.newAdviserData = JSON.parse(this.oldAdviserData);
  70. this.$forceUpdate();
  71. },
  72. confirmClick(){
  73. let selAdviserList = [];
  74. for(let i in this.newAdviserData){
  75. const element = this.newAdviserData[i];
  76. if(element.isSelected){
  77. selAdviserList.push(element)
  78. }
  79. }
  80. this.oldAdviserData = null
  81. this.$refs.popView.hide();
  82. this.$emit('confirmSelAdviser',selAdviserList)
  83. }
  84. },
  85. components: {
  86. dmPopView
  87. }
  88. }
  89. </script>
  90. <style scoped lang="scss">
  91. .content {
  92. width: 100%;
  93. height: 776rpx;
  94. font-family: Verdana;
  95. .list-content {
  96. margin-top: 20rpx;
  97. border-radius: 20rpx;
  98. background-color: #FFFFFF;
  99. margin-left: 20rpx;
  100. width: 670rpx;
  101. display: flex;
  102. flex-direction: column;
  103. padding: 30rpx 20rpx;
  104. .list-title {
  105. color: #333333;
  106. font-size: 28rpx;
  107. font-weight: bold;
  108. }
  109. .list-content-detail {
  110. margin-top: 14rpx;
  111. color: #333333;
  112. font-size: 24rpx;
  113. line-height: 46rpx;
  114. }
  115. }
  116. .counselorList {
  117. width: 750rpx;
  118. height: 600rpx;
  119. margin: 10rpx 0rpx 20rpx 0rpx;
  120. background: #ffffff;
  121. border-radius: 10px;
  122. overflow-y: scroll;
  123. .counselorItem {
  124. width: calc(100% - 60rpx);
  125. height: 82rpx;
  126. border-bottom: 2rpx solid rgba(84,96,116,0.05);
  127. margin-left: 30rpx;
  128. box-sizing: border-box;
  129. line-height: 82rpx;
  130. display: flex;
  131. justify-content: space-between;
  132. align-items: center;
  133. image {
  134. width: 32rpx;
  135. height: 32rpx;
  136. }
  137. .title {
  138. margin-left: 16rpx;
  139. flex-grow: 2;
  140. font-size: 14px;
  141. font-family: Verdana, Verdana-Regular;
  142. font-weight: 400;
  143. text-align: left;
  144. color: #333333;
  145. text-overflow: ellipsis;
  146. overflow: hidden;
  147. white-space: nowrap;
  148. }
  149. .subtitle {
  150. font-size: 14px;
  151. font-family: Verdana, Verdana-Regular;
  152. font-weight: 400;
  153. text-align: right;
  154. color: #999999;
  155. }
  156. }
  157. .counselorSelectedItem {
  158. background: #CCC;
  159. }
  160. }
  161. .bottomTools {
  162. width: 100%;
  163. height: 100rpx;
  164. display: flex;
  165. align-items: center;
  166. padding: 0rpx 60rpx;
  167. box-sizing: border-box;
  168. text:nth-child(1){
  169. font-size: 14px;
  170. font-family: Verdana, Verdana-Bold;
  171. font-weight: 700;
  172. text-align: center;
  173. line-height: 40px;
  174. color: #666666;
  175. width: 78px;
  176. height: 40px;
  177. background:rgba(60,217,217,0.25);
  178. border-radius: 20px;
  179. }
  180. text:nth-child(2){
  181. flex-grow: 2;
  182. text-align: center;
  183. font-size: 14px;
  184. font-family: Verdana, Verdana-Bold;
  185. font-weight: 700;
  186. color: #FFF;
  187. background: #3cd9d9;
  188. border-radius: 20px;
  189. height: 40px;
  190. line-height: 40px;
  191. margin-left: 30rpx;
  192. }
  193. }
  194. }
  195. </style>