memberIndex.vue 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901
  1. <template>
  2. <view class="container column hb flex-1 hidden">
  3. <view class="headbox">
  4. <view style="padding: 10px 10px 0 10px;" class="mb20">
  5. <view>
  6. <u-subsection class="subsection" :list="list" :current="current" bgColor="#e7f1fe" activeColor="#1677ff" :fontSize="15" :bold="false" @change="sectionChange"></u-subsection>
  7. </view>
  8. <!-- <view style="width: 70%;">
  9. <u-subsection class="subsection" :list="list" :current="current" bgColor="#e7f1fe" activeColor="#1677ff"
  10. :fontSize="15" :bold="false" @change="sectionChange" ></u-subsection>
  11. </view> -->
  12. <view style="margin-top: 10px;" class="justify-between align-center" v-if="!viewload">
  13. <u-search placeholder="搜索微信名称、手机、标签" v-model="keyword" :showAction="false" height="30px" @search='searchKeyword'></u-search>
  14. <view v-if="current!==0" class="fs24 ml20" @click="blackSel()">{{!isShowSelectAll?'批量管理':'取消批量'}}</view>
  15. </view>
  16. <view class="x-bc" v-if="current==0">
  17. <u-tabs :list="list2" :current='currentType' :lineWidth="40" lineColor="#1677ff" :activeStyle="activeStyle" :inactiveStyle="inactiveStyle" @click="clickTypeTab"></u-tabs>
  18. <view class="participate-order x-f">
  19. <image :src="imgPath+'/app/images/order_icon2.png'" mode="aspectFill" v-if="searchTypeIndex == 0 || searchTypeIndex == 2"></image>
  20. <image :src="imgPath+'/app/images/order_icon.png'" mode="aspectFill" v-else></image>
  21. <picker @change="bindPickerChange" :value="searchTypeIndex" :range="typeArray">
  22. {{typeoption[searchTypeIndex]}}
  23. </picker>
  24. </view>
  25. </view>
  26. <view class="tagbox x-bc" v-if="current==0">
  27. <view class="tagbox-left x-f">
  28. <!-- <view class="x-f" @click="openPop('search')">{{array[queryParam.typeIndex].name}}<u-icon name="arrow-down-fill" color="#2979ff" size="11" style="margin: 0 3px;"></u-icon></view> -->
  29. <view v-if="showCompanytag.length<=0" style="color: #888;" class="ml30">请点击筛选,选择标签</view>
  30. <view class="tagbox-list x-f">
  31. <view class="tagbox-item x-f" v-for="(item,index) in showCompanytag" :key='item.tagId' :class="item.checked?'checked-bg':''">
  32. {{item.tagName}}
  33. </view>
  34. </view>
  35. </view>
  36. <view class="tagbox-right x-f" @click="openPop('tag')">筛选<u-icon name="arrow-down" color="#1677ff" size="12"></u-icon></view>
  37. </view>
  38. </view>
  39. <view v-if="current==0&&!viewload">
  40. <dropdownPanel :filterData='filterData' @onClick="getactNav" :itemname='itemname' @onChange="onChange" @confirm="confirm" @reset="reset" :ispopshow='ispopshow' :top="tops">
  41. <view v-if="filterData[searchbarNav].type == 'userStatus'">
  42. <view class="boxnav x-bc">
  43. <view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option" :key="index">
  44. <view class="boxnav-item-info one-t"
  45. :class="userStatusIndex == index ? 'boxnav-active':''" @click="handleParamItem('userStatus',index,item.id)">{{item.label}}</view>
  46. </view>
  47. </view>
  48. </view>
  49. <view v-if="filterData[searchbarNav].type == 'registerTime'">
  50. <view class="boxnav x-bc ">
  51. <view class="boxnav-item" style="width: 25%;" v-for="(item,index) in filterData[searchbarNav].option" :key="index">
  52. <view class="boxnav-item-info one-t" :class="registerTimeIndex == index ? 'boxnav-active':''" @click="handleParamItem('registerTime',index)">{{item.label}}</view>
  53. </view>
  54. <view class="boxnav-item x-ac" style="width: 100%;" v-show="registerTimeIndex == 4">
  55. <view class="calendar-day x-c" @click="$refs.calendar.open()">
  56. <u-icon name="calendar" color="#999" size="20"></u-icon>{{queryParam.startTime || '选择日期'}}
  57. </view>
  58. <view class="calendar-day x-c" @click="$refs.calendar.open()">
  59. <u-icon name="calendar" color="#999" size="20"></u-icon>{{queryParam.endTime || '选择日期'}}
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. <view v-if="filterData[searchbarNav].type == 'watchStatus'">
  65. <view class="boxnav x-bc">
  66. <view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option" :key="index">
  67. <view class="boxnav-item-info one-t" :class="watchStatusIndex == index ? 'boxnav-active':''" @click="handleParamItem('watchStatus',index)">{{item.label}}</view>
  68. </view>
  69. </view>
  70. </view>
  71. <view v-if="filterData[searchbarNav].type == 'courseStatus'">
  72. <view class="boxnav x-bc">
  73. <view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option" :key="index">
  74. <view class="boxnav-item-info one-t" :class="courseStatusIndex == index ? 'boxnav-active':''" @click="handleParamItem('courseStatus',index)">{{item.label}}</view>
  75. </view>
  76. </view>
  77. </view>
  78. <view v-if="filterData[searchbarNav].type == 'project'">
  79. <view class="boxnav x-bc">
  80. <view class="boxnav-item" v-for="(item,index) in filterData[searchbarNav].option" :key="index">
  81. <view class="boxnav-item-info one-t" :class="projectStatusIndex == index ? 'boxnav-active':''" @click="handleParamItem('project',index,item.id)">{{item.label}}</view>
  82. </view>
  83. </view>
  84. </view>
  85. </dropdownPanel>
  86. </view>
  87. </view>
  88. <view class="">
  89. <uni-calendar ref="calendar" :clear-date="true" :date="date" :insert="false" :lunar="false"
  90. :startDate="$u.timeFormat(new Date().getTime() - (3600 * 24 * 365 * 1000), 'yyyy-mm-dd')" :range='true'
  91. @confirm="confirmCalendar" :endDate="$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd')" />
  92. </view>
  93. <view class="">
  94. <!-- 搜索选择弹窗/标签筛选 -->
  95. <u-popup :show="showPop" :round="12" @close="closePop" class="model" :zIndex="10076" style="flex: 0;">
  96. <view class="popbox">
  97. <view class="popbox-head">
  98. <u-icon class="close-circle" name="close-circle" color="#ccc" size="24"
  99. @click="closePop"></u-icon>
  100. {{popTitle}}
  101. </view>
  102. <view class="popbox-body">
  103. <view class="radiobox" v-show="popTitle == '搜索选择'">
  104. <label class="radiobox-item x-bc mbline" v-for="(item, index) in array" :key="item.value"
  105. @click="bindTypeChange(index)">
  106. <view>{{item.name}}</view>
  107. <radio :value="item.value" :checked="index === typeIndex"
  108. style="transform:scale(0.75)" />
  109. </label>
  110. </view>
  111. <!-- <input placeholder="请输入标签 多个标签用 , 隔开" /> -->
  112. <view class="mb20" v-if="current==0">
  113. <u-search placeholder="请输入标签 多个标签用 , 隔开" v-model="tagkeywords" :showAction="false" height="30px" @search='getcompanyTag'></u-search>
  114. </view>
  115. <scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnableds" :refresher-triggered="triggereds" refresher-background="rgba(0,0,0,0)" @refresherrefresh="pullDownRefreshs" @refresherrestore="triggereds = false"
  116. :upper-threshold="100" :lower-threshold="100" @refresherabort="triggereds = false"
  117. @scrolltolower="reachBottoms">
  118. <view class="tagbox-list x-f">
  119. <view class="tagbox-item x-f tag-active" v-if="companytag.length<=0">暂无标签</view>
  120. <view class="mlr10 mb10" v-for="(item,index) in companytag" :key='item.tagId'>
  121. <u-tag :text="item.tagName" :plain="!item.checked" :name="index" @click="chooseTag(index)"></u-tag>
  122. </view>
  123. </view>
  124. <view class="center fs24 mt20">
  125. <text class="mr20" @click="getTagpage('last')">上一页</text>
  126. <text class="base-color-red">{{pagetag.pageNum}}/{{pagetag.pages}}</text>
  127. <text class="ml20" @click="getTagpage('next')">下一页</text>
  128. </view>
  129. </scroll-view>
  130. </view>
  131. <view class="popbox-footer x-bc">
  132. <button class="popbox-footer-btn" @click="resetPop" v-show="popTitle == '标签筛选'">重置</button>
  133. <button class="popbox-footer-btn" @click="closePop" v-show="popTitle == '搜索选择'">取消</button>
  134. <button class="popbox-footer-btn con-btn" @click="confirmPop">确定</button>
  135. </view>
  136. </view>
  137. </u-popup>
  138. </view>
  139. <view class="userbox column hb hidden flex-1">
  140. <!-- <mescroll-body bottom="0" ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback" @up="upCallback"> -->
  141. <view class="userlist column hb hidden flex-1">
  142. <vipUserItem :viplist='userList' :isShowSelectAll="isShowSelectAll" @changeItem="changeItem" @getuserId='singleChange' @getlableId='singleChangeLable' @change='changesinglevip' @getuserIds='singleDelete' @pullDownRefresh="getfsuserListdata('refresh')"
  143. @changelistname="getfsuserListdata('more')" @reachBottom="getfsuserListdata()" @changePageOptions="e=>pageOptions=e" :pageOptions="pageOptions" :status="status"
  144. @changeStatus="e=>status=e" class="pb2 hb" />
  145. <view class="justify-between base-bg-f foot-select pb40" v-if="isShowSelectAll">
  146. <view class="align-center justify-between" v-if="isShowSelectAll">
  147. <u-checkbox-group @change="selectAll">
  148. <u-checkbox :checked="isSelectAll" shape="circle" activeColor="#FF6C47" :name="true" label="全选" labelColor="#333" /><text class="fs24 base-color-9 ml12">已选 {{selectedCount}}
  149. 个</text>
  150. </u-checkbox-group>
  151. </view>
  152. <view class="justify-center ">
  153. <button class="base-bg-red radius100 colorf h62 fs28 lh62 mlr10" @click="changeProhibit" v-if="current==0">禁用</button>
  154. <button class="base-bg-red radius100 colorf h62 fs28 lh62 mlr10" @click="changeblack" v-else>取消禁用</button>
  155. <button class="base-bg-blue radius100 colorf h62 fs28 lh62" @click="changetagall" v-if="current==0">改标签</button>
  156. <!-- <button class="base-bg-f radius100 base-color-red h62 ml10 fs28 lh60"
  157. style="border: #ef4c50 solid 2rpx;"
  158. @click="changevipuser" v-if="current==0">更换归属</button> -->
  159. </view>
  160. </view>
  161. </view>
  162. <!-- </mescroll-body> -->
  163. </view>
  164. <!-- <u-picker :show="showTagSelect" :columns="companytag" keyName="tag" @cancel='showTagSelect=false'
  165. @confirm='singleChangeLable' ></u-picker> -->
  166. <view>
  167. <u-popup :show="projectbox" :round="12" @close="projectbox = false" :zIndex="10074" style="flex: 0;">
  168. <view class="pb120">
  169. <view class="center bold fs32 mt30">选择项目</view>
  170. <view class="p20 justify-start mb60" style="flex-wrap: wrap">
  171. <view class="plr16 ptb8 u-border mlr10 radius8 " :class="projectId==item.dictValue?'probgsel':'probg'"
  172. v-for="(item,index) in projectList" :key="index" @click="selproject(item)">
  173. {{item.dictLabel}}
  174. </view>
  175. </view>
  176. <view class="quedingpro" @click="submitPro">确定</view>
  177. </view>
  178. </u-popup>
  179. <u-popup :show="showTagSelect" @close='closetagselect' :closeOnClickOverlay='true' mode="bottom"
  180. style="z-index: 999;">
  181. <view class=" w100 bgf pb120">
  182. <view class="plr28 ptb16 justify-between" style="flex-direction: row-reverse">
  183. <u-icon class="" name="close-circle" color="#ccc" size="24" @click="closetagselect"></u-icon>
  184. </view>
  185. <view class="mb20">
  186. <u-search placeholder="请输入标签 多个标签用 , 隔开" v-model="tagchangekeywords" :showAction="false"
  187. height="30px" @search='getcompanyTags'></u-search>
  188. </view>
  189. <scroll-view scroll-y="true" class="hb" :refresher-enabled="isEnableds"
  190. :refresher-triggered="triggeredsA" refresher-background="rgba(0,0,0,0)"
  191. @refresherrefresh="pullDownRefreshsA" @refresherrestore="triggeredsA = false"
  192. :upper-threshold="100" :lower-threshold="100" @refresherabort="triggeredsA = false">
  193. <view class="justify-start p32 wrap">
  194. <view class="mlr10 mt10 " v-for="(item,index) in changetag" :key='item.tagId'>
  195. <u-tag :text="item.tag" :plain="!item.checked" :name="index"
  196. @click="choosechangeTag"></u-tag>
  197. </view>
  198. </view>
  199. <view class="center fs24 mt20">
  200. <text class="mr20" @click="getTagpageS('last')">上一页</text>
  201. <text class="base-color-red">{{pagetagA.pageNum}}/{{pagetagA.pages}}</text>
  202. <text class="ml20" @click="getTagpageS('next')">下一页</text>
  203. </view>
  204. </scroll-view>
  205. <view class="justify-between p32 " :class="isShowSelectAll?'pb120':''">
  206. <view class="changetagbtn base-bg-f8" @click="showTagSelect=!showTagSelect">取消</view>
  207. <view class="changetagbtn colorf base-bg-blue" @click="suretagchangeAll">确定</view>
  208. </view>
  209. </view>
  210. </u-popup>
  211. </view>
  212. <view class="invite-member" :style="{right:vipInviteshow?'-72rpx':'20rpx'}">
  213. <image :src="imgPath+'/app/images/invite-member-icon.png'" mode="aspectFill" @click="vipInvite"
  214. style="position: relative;" class="intimg"> </image>
  215. <image :src="imgPath+'/app/image/tc_close_icon.png'" class="falseimg" @click="showinimg"></image>
  216. </view>
  217. <view class="">
  218. <!-- 邀请弹窗 -->
  219. <u-popup :show="invitePop" :round="12" @close="invitePop = false" :zIndex="10074" style="flex: 0;">
  220. <view class="popbox">
  221. <view class="popbox-head">
  222. <u-icon class="close-circle" name="close-circle" color="#ccc" size="24"
  223. @click="invitePop = false"></u-icon>
  224. 分享方式
  225. </view>
  226. <view class="popbox-body">
  227. <view class="choosetitle x-bc">
  228. <view>选择标签</view>
  229. <view v-if="sharetaglist" style="color:#1677ff" @click="addtag(0)">{{zhanshitag}}</view>
  230. <view class="x-f" style="color:#1677ff;" v-else @click="addtag(0)">
  231. <u-icon name="plus" color="#1677ff" size="14" style="margin-right: 5px;"></u-icon>添加标签
  232. </view>
  233. </view>
  234. <view class="invitetip">选择标签,当会员注册成功后,即可自动打标签</view>
  235. <!-- <view class="tagbox-list x-f" style="margin-top: 10px;margin-left: 0px;">
  236. <view class="tagbox-item x-f" @click="chooseTag">未打标签</view>
  237. <view class="tagbox-item x-f tag-active">未打标签</view>
  238. </view> -->
  239. <!--#ifdef MP-WEIXIN-->
  240. <view class="justify-center" style="margin-top: 10px;">
  241. <!--#endif-->
  242. <!--#ifdef H5-->
  243. <view class="justify-center" style="margin-top: 10px;">
  244. <!--#endif-->
  245. <!-- <view class="x-bc " style="margin-top: 30px;"> -->
  246. <!--#ifdef MP-WEIXIN-->
  247. <view class="sharePop-item y-f " style="text-align: center;">
  248. <!--#endif-->
  249. <!--#ifdef H5-->
  250. <view class="sharePop-item y-f card-share" @click="shareimg"
  251. style="text-align: center;">
  252. <!--#endif-->
  253. <image :src="imgPath+'/app/images/card_icon.png'" mode="aspectFill"
  254. style="width: 80rpx; height: 80rpx;margin-top: 20rpx;">
  255. </image>
  256. <view style="font-weight: bold;margin-bottom: 4px;">生成卡片</view>
  257. <view style="font-size: 12px;color: #888;">指导分享轻松转发</view>
  258. <!-- #ifdef MP-WEIXIN -->
  259. <button open-type="share" class="share">分享卡片</button>
  260. <!-- #endif -->
  261. </view>
  262. <!--#ifdef H5-->
  263. <view class="sharePop-item y-f " @click="buildimg" style="text-align: center;">
  264. <image :src="imgPath+'/app/images/poster_icon.png'" mode="aspectFill"></image>
  265. <view style="font-weight: bold;margin-bottom: 4px;">生成海报</view>
  266. <view style="font-size: 12px;color: #888;">保存海报美观宣传</view>
  267. </view>
  268. <view class="sharePop-item y-f " @click="copyLink" style="text-align: center;">
  269. <image :src="imgPath+'/app/images/link_icon.png'" mode="aspectFill"></image>
  270. <view style="font-weight: bold;margin-bottom: 4px;">复制链接</view>
  271. <view style="font-size: 12px;color: #888; ">生成链接一键复制</view>
  272. </view>
  273. <!--#endif-->
  274. </view>
  275. </view>
  276. </view>
  277. </u-popup>
  278. <!-- 设置链接有效时长弹窗 -->
  279. <u-modal :show="setTimeShow" content='content' class="model" @confirm="confirmTime">
  280. <view class="setTimebox">
  281. <view class="timetip">不传默认以系统参数为准</view>
  282. <view class="x-f">
  283. <text style="margin-right: 20px;">链接有效时长(分钟)</text>
  284. <u-input fontSize="14px" placeholder="链接有效时长" border="none" v-model="time"
  285. maxlength="5"></u-input>
  286. </view>
  287. </view>
  288. </u-modal>
  289. <!-- 长按保存海报 -->
  290. <u-popup :show="setImg" @close="closeimg" :round="12">
  291. <view class="w100 h500 center">
  292. <image :src="codeLink.url" mode="aspectFill"></image>
  293. </view>
  294. <view class="justify-around mb40">
  295. <view class="column justify-center align-center" @click="downimg">
  296. <image :src="imgPath+'/app/image/downicon.png'" class="w80 h80"></image>
  297. <view class="mt10">长按图片保存</view>
  298. </view>
  299. </view>
  300. </u-popup>
  301. <!-- 卡片分享引导 -->
  302. <u-overlay :show="showzhidao" @click="showzhidao = false" style="z-index: 9999;">
  303. <view class="point-box">
  304. <view class="imgshe">
  305. <image :src="imgPath+'/app/image/point.png'" class="w300 h300"></image>
  306. </view>
  307. <view class="column colorf fs32 xu-box fs40
  308. align-center justify-center">
  309. <view class="justify-center">点击右上角
  310. <image :src="imgPath+'/app/image/wxmore.png'" class="w50 h50 mlr10"></image>
  311. </view>
  312. <view class="mt20">选择 “转发给朋友”</view>
  313. <view style="color: #cbcbcb;" class="fs28 mt40">点击任意位置关闭弹窗</view>
  314. </view>
  315. </view>
  316. </u-overlay>
  317. <!-- 更改归属 -->
  318. <u-picker :show="showcol" :columns="columns" @cancel='showcol=!showcol' @confirm='receiveA'
  319. keyName="nickName"></u-picker>
  320. <u-loading-page :loading="viewload" iconSize="32" loadingColor="#3c9cff" fontSize="20"
  321. :loading-text="loadingtext"></u-loading-page>
  322. </view>
  323. </view>
  324. </template>
  325. <script>
  326. import {
  327. getfsuserList,
  328. getcompanyTaglist,
  329. Addblacklist,
  330. changeLable,
  331. getvipNum,
  332. changevipUser,
  333. getgroupList,
  334. becomeVipuser,
  335. becomeVipuserImg,
  336. getusersales,
  337. removebalcklist,
  338. getallTags,
  339. getprojectlist
  340. } from "@/api/manageCompany.js";
  341. import vipUserItem from "../components/vipUserItem.vue"
  342. import dropdownPanel from "../components/dropdownPanel.vue"
  343. // import wx from 'weixin-js-sdk'
  344. export default {
  345. components: {
  346. vipUserItem,
  347. dropdownPanel,
  348. },
  349. data() {
  350. return {
  351. viewload: true,
  352. loadingtext: "数据加载中...",
  353. showcol: false,
  354. setImg: false,
  355. columns: [],
  356. showTagSelect: false,
  357. list: [{
  358. name: '会员(0)',
  359. }, {
  360. name: '小黑屋(0)'
  361. },
  362. {
  363. name: '黑名单(0)'
  364. }
  365. ],
  366. userList: [],
  367. current: 0,
  368. keyword: "",
  369. companytag: [],
  370. showCompanytag: [],
  371. selectedList: [], //已经选中标签列表
  372. list2: [{
  373. name: '全部',
  374. }, {
  375. name: '今日新增',
  376. }, {
  377. name: '今日完播'
  378. }, {
  379. name: '未看过课'
  380. }],
  381. currentType: 0,
  382. activeStyle: {
  383. color: '#1677ff',
  384. fontSize: '14px',
  385. fontWeight: 'bold'
  386. },
  387. inactiveStyle: {
  388. fontSize: '14px'
  389. },
  390. searchTypeIndex: 0,
  391. typeArrays: ['连续缺课天数多到少', '连续缺课天数少到多', '按注册时间晚到早', '会员姓名0-9-A-Z'],
  392. typeArray: ['按注册时间晚到早', '会员姓名0-9-A-Z'],
  393. typeoption: ['注册时间', '会员姓名'],
  394. array: [{
  395. value: '0',
  396. name: '关联搜索',
  397. },
  398. {
  399. value: '1',
  400. name: '精准搜索'
  401. }
  402. ],
  403. typeIndex: 0,
  404. popTitle: '搜索选择',
  405. showPop: false,
  406. filterData: [{
  407. name: '销售',
  408. value: 0,
  409. type: 'userStatus',
  410. option: [{
  411. label: '全部',
  412. id: ''
  413. }, ]
  414. },
  415. {
  416. name: '注册',
  417. value: 1,
  418. type: 'registerTime',
  419. option: [{
  420. label: '全部',
  421. }, {
  422. label: '今天',
  423. }, {
  424. label: '昨天',
  425. }, {
  426. label: '近7天',
  427. }, {
  428. label: '自定义',
  429. }]
  430. }, {
  431. name: '看课',
  432. value: 2,
  433. type: 'watchStatus',
  434. option: [{
  435. label: '全部',
  436. }, {
  437. label: '未看过课',
  438. }, {
  439. label: '正常看课',
  440. }, {
  441. label: '停止看课',
  442. }]
  443. },
  444. {
  445. name: '缺课',
  446. value: 3,
  447. type: 'courseStatus',
  448. option: [{
  449. label: '全部',
  450. }, {
  451. label: '已缺课',
  452. }, {
  453. label: '未缺课',
  454. }]
  455. },
  456. {
  457. name: '项目',
  458. value: 4,
  459. type: 'project',
  460. option: [{
  461. label: '全部',
  462. id: ''
  463. }]
  464. },
  465. {
  466. name: '批量',
  467. value: 5,
  468. type: 'piliang',
  469. special: true,
  470. stopPrevent: true
  471. }
  472. ],
  473. searchbarNav: 0,
  474. userStatusIndex: 0,
  475. registerTimeIndex: 0,
  476. watchStatusIndex: 0,
  477. courseStatusIndex: 0,
  478. projectStatusIndex: 0,
  479. selprojectId: '',
  480. showCalendar: false,
  481. date: '',
  482. mode: 'range',
  483. queryParam: {
  484. typeIndex: 0,
  485. startTime: '',
  486. endTime: ''
  487. },
  488. mescroll: null,
  489. downOption: {
  490. use: true,
  491. auto: false
  492. },
  493. upOption: {
  494. onScroll: false,
  495. use: true, // 是否启用上拉加载; 默认true
  496. auto: true,
  497. page: {
  498. pae: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
  499. size: 10 // 每页数据的数量,默认10
  500. },
  501. noMoreSize: 10, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
  502. textNoMore: "已经到底了",
  503. empty: {
  504. icon: 'https://cos.his.cdwjyyh.com/fs/20240423/cf4a86b913a04341bb44e34bb4d37aa2.png',
  505. tip: '暂无数据'
  506. }
  507. },
  508. dataList: [],
  509. invitePop: false,
  510. setTimeShow: false,
  511. time: "",
  512. user: {},
  513. idx: [],
  514. todayday: uni.$u.timeFormat(new Date(), 'yyyy-mm-dd'),
  515. startTime: '',
  516. endTime: '',
  517. isShowSelectAll: false, //是否显示全选
  518. isSelectAll: false, //是否全选
  519. ispopshow: false,
  520. selectidAll: [],
  521. changetag: [],
  522. selectidtag: '',
  523. itemname: '',
  524. userid: '',
  525. groupid: [],
  526. pageOptions: {
  527. pageNum: 1,
  528. pageSize: 8,
  529. },
  530. status: 'loadmore',
  531. sharetag: 1,
  532. sharetaglist: [],
  533. codeLink: [],
  534. zhanshitag: '',
  535. copyLinks: '',
  536. showzhidao: false,
  537. imgs: this.$store.state.imgpath + '/app/image/logoshare.png',
  538. currentIsBlack: 1,
  539. tagpageNum: 1,
  540. tagpageSize: 16,
  541. triggereds: false,
  542. statusA: 'loadmore',
  543. isEnableds: true,
  544. pagetag: [],
  545. tagkeywords: '',
  546. salesid: '',
  547. tagchangekeywords: '',
  548. tagpageNums: 1,
  549. tagpageSizes: 16,
  550. triggeredsA: false,
  551. statusAs: 'loadmore',
  552. isEnabledsA: true,
  553. pagetagA: [],
  554. tops: '464rpx',
  555. showInvite: false,
  556. vipInviteshow: false,
  557. projectbox:false,
  558. projectList:{},
  559. projectId:''
  560. }
  561. },
  562. // onLoad() {
  563. // // #ifdef MP-WEIXIN
  564. // uni.showShareMenu({
  565. // withShareTicket: true,
  566. // menus: ['shareAppMessage']
  567. // });
  568. // // #endif
  569. // },
  570. mounted() {
  571. this.getsalelist()
  572. this.user = uni.getStorageSync("companyUserInfo") ? JSON.parse(uni.getStorageSync("companyUserInfo")) : {},
  573. this.getvipListnum()
  574. this.userList = []
  575. this.getfsuserListdata()
  576. this.getprojectlistsA()
  577. },
  578. onShow() {
  579. // #ifdef H5
  580. this.getjssdklist()
  581. // #endif
  582. },
  583. // 这个是分享聊天
  584. // onShareAppMessage() {
  585. // return {
  586. // title:this.$store.state.logoname+'小程序的'+this.user.userName + '邀请您成为会员!',
  587. // path: '/pages/user/users/becomeVIP?companyId=' +
  588. // this.user.companyId + '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist,
  589. // imageUrl: this.imgs,
  590. // }
  591. // },
  592. computed: {
  593. selectedCount() {
  594. return this.userList.filter(item => item.checked).length;
  595. },
  596. imgPath() {
  597. return this.$store.state.imgpath
  598. }
  599. },
  600. methods: {
  601. submitPro() {
  602. if (this.projectId == '') {
  603. uni.showToast({
  604. title: '请选择项目',
  605. icon: 'none',
  606. duration: 1000
  607. });
  608. return
  609. }
  610. this.projectbox = false
  611. this.invitePop = true
  612. const pages = '/pages_course/becomeVIP?companyId=' +this.user.companyId
  613. +"&projectId=" +this.projectId+ '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist
  614. this.$emit('childEvent', pages);
  615. },
  616. selproject(item) {
  617. this.projectId = item.dictValue
  618. },
  619. getprojectlistsA() {
  620. const oldlist = this.filterData[4].option
  621. const data = {
  622. key: 'sys_course_project'
  623. }
  624. getprojectlist(data).then(res => {
  625. if (res.code == 200) {
  626. const list = res.data
  627. this.filterData[4].option = oldlist.concat(list.map(item => {
  628. return {
  629. id: item.dictValue,
  630. label: item.dictLabel
  631. };
  632. }));
  633. console.log('1212121212', this.filterData[4].option)
  634. } else {
  635. uni.showToast({
  636. title: res.msg,
  637. icon: 'none',
  638. });
  639. }
  640. })
  641. },
  642. getprojectlists() {
  643. const data = {
  644. key: 'sys_course_project'
  645. }
  646. getprojectlist(data).then(res => {
  647. // this.projectList=res.data
  648. this.projectList = res.data.map(item => {
  649. return {
  650. ...item,
  651. checked: false,
  652. }
  653. })
  654. console.log(this.projectList)
  655. })
  656. },
  657. sharecard() {
  658. console.log(11)
  659. },
  660. changetagall() {
  661. this.showTagSelect = !this.showTagSelect
  662. this.tagchangekeywords = ''
  663. this.selectidtag = ''
  664. this.showInvite = false
  665. this.sharetag = 1
  666. this.getalltagtaglist()
  667. },
  668. getTagpageS(type) {
  669. if (type == 'last') {
  670. if (this.tagpageNums >= 2) {
  671. this.tagpageNums--
  672. this.getalltagtaglist()
  673. } else {
  674. uni.showToast({
  675. title: '已经是第一页',
  676. icon: 'none',
  677. duration: 1000
  678. });
  679. }
  680. } else {
  681. if (this.tagpageNums < this.pagetagA.pages) {
  682. this.tagpageNums++
  683. this.getalltagtaglist()
  684. } else {
  685. uni.showToast({
  686. title: '已经是最后一页',
  687. icon: 'none',
  688. duration: 1000
  689. });
  690. }
  691. }
  692. },
  693. getcompanyTags(value) {
  694. this.tagchangekeywords = value
  695. this.getalltagtaglist()
  696. },
  697. singleDelete(data) {
  698. this.pageOptions.pageNum = 1
  699. this.$emit('update:parentValue', '新值');
  700. this.userList = []
  701. this.selectidAll[0] = data
  702. this.changeblack()
  703. },
  704. changeblack() {
  705. // console.log(this.selectidAll[0])
  706. //取消禁用
  707. if (this.selectidAll.length < 1) {
  708. uni.showToast({
  709. icon: 'none',
  710. title: '所选列表为空'
  711. })
  712. return
  713. }
  714. removebalcklist(this.selectidAll).then(res => {
  715. if (res.code == 200) {
  716. this.pageOptions.pageNum = 1
  717. // console.log(this.pageOptions.pageNum)
  718. this.getfsuserListdata('refresh')
  719. // 创建一个在**秒后执行的定时器
  720. const timer = setTimeout(function() {
  721. uni.showToast({
  722. icon: 'none',
  723. title: '取消禁用成功'
  724. })
  725. }, 200);
  726. this.getvipListnum()
  727. this.isShowSelectAll = false
  728. this.isSelectAll = false
  729. } else {
  730. uni.showToast({
  731. icon: 'none',
  732. title: res.msg
  733. })
  734. }
  735. })
  736. },
  737. blackSel() {
  738. this.isShowSelectAll = !this.isShowSelectAll
  739. // if (data.value == 4) {
  740. // this.itemname = data.name
  741. // this.isShowSelectAll = !this.isShowSelectAll
  742. // } else {
  743. // this.isShowSelectAll = false
  744. // }
  745. },
  746. getsalelist() {
  747. const oldlist = this.filterData[0].option
  748. getusersales().then(res => {
  749. if (res.code == 200) {
  750. const list = res.data
  751. this.filterData[0].option = oldlist.concat(list.map(item => {
  752. return {
  753. id: item.userId,
  754. label: item.nickName
  755. };
  756. }));
  757. // this.filterData[0].option=list.map(item => {
  758. // return {
  759. // id: item.userId,
  760. // label: item.nickName
  761. // };
  762. // })
  763. } else {
  764. uni.showToast({
  765. title: res.msg,
  766. icon: 'none',
  767. });
  768. }
  769. })
  770. },
  771. getTagpage(type) {
  772. if (type == 'last') {
  773. if (this.tagpageNum >= 2) {
  774. this.tagpageNum--
  775. this.getcompanyTag()
  776. } else {
  777. uni.showToast({
  778. title: '已经是第一页',
  779. icon: 'none',
  780. duration: 1000
  781. });
  782. }
  783. } else {
  784. if (this.tagpageNum < this.pagetag.pages) {
  785. this.tagpageNum++
  786. this.getcompanyTag()
  787. } else {
  788. uni.showToast({
  789. title: '已经是最后一页',
  790. icon: 'none',
  791. duration: 1000
  792. });
  793. }
  794. }
  795. },
  796. //标签展示下拉
  797. pullDownRefreshs() {
  798. // 下拉
  799. this.triggereds = true; //下拉了状态为true
  800. setTimeout(() => {
  801. this.triggereds = false;
  802. uni.stopPullDownRefresh()
  803. this.tagpageNum = 1;
  804. this.getcompanyTag('refresh') //触底 不穿执行else
  805. // 请求接口里面需要判断是不是最后一页 是最后一页 status赋值为‘loadmore’没有更多了
  806. // 请求接口
  807. }, 1000)
  808. },
  809. getjssdklist() {
  810. const param = {
  811. url: window.location.href
  812. }
  813. getSDK(param).then(res => {
  814. wx.config({
  815. appId: res.data.appId, // 必填,公众号的唯一标识
  816. timestamp: res.data.timestamp, // 必填,生成签名的时间戳
  817. nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
  818. signature: res.data.signature, // 必填,签名
  819. jsApiList: ["updateAppMessageShareData"] // 必填,需要使用的JS接口列表
  820. });
  821. })
  822. },
  823. shareimg() {
  824. //分享好友
  825. this.getlink()
  826. let self = this
  827. // 配置--你到时候把配置全局 --就是这些东西 调接口拿
  828. wx.ready(function() { //需在用户可能点击分享按钮前就先调用
  829. wx.updateAppMessageShareData({
  830. title: self.user.userName + "邀请您成为会员", // 分享标题
  831. desc: self.user.deptName, // 分享描述
  832. link: self.copyLinks,
  833. imgUrl: self.codeLink.url || self.imgs, // 分享图标
  834. success: function(res) {
  835. self.showzhidao = true
  836. self.setImg = false
  837. self.showShare = false
  838. // 设置成功
  839. uni.showToast({
  840. title: '卡片已生成',
  841. icon: 'none',
  842. duration: 1000
  843. });
  844. },
  845. fail: function(err) {
  846. console.log(err);
  847. uni.showToast({
  848. title: '卡片生成失败,请重试',
  849. icon: 'none',
  850. duration: 2000
  851. })
  852. }
  853. })
  854. });
  855. },
  856. downimg() {},
  857. closeimg() {
  858. this.setImg = false
  859. this.invitePop = false
  860. },
  861. buildimg() {
  862. this.setImg = !this.setImg
  863. this.getshareimg()
  864. },
  865. addtag(add) {
  866. this.sharetag = add
  867. this.showTagSelect = !this.showTagSelect
  868. this.invitePop = !this.invitePop
  869. this.showInvite = true
  870. this.getalltagtaglist()
  871. },
  872. changevipuser() {
  873. this.showcol = !this.showcol
  874. this.getgrouplist()
  875. },
  876. getgrouplist() {
  877. //获取群管列表
  878. getgroupList().then(res => {
  879. if (res.code == 200) {
  880. this.columns = [res.data]
  881. // console.log(this.columns)
  882. } else {
  883. uni.showToast({
  884. icon: 'none',
  885. title: res.msg
  886. })
  887. }
  888. })
  889. },
  890. changeall() {
  891. //更换全部会员
  892. console.log(1)
  893. const param = {
  894. companyId: this.user.companyId,
  895. companyUserId: this.userid,
  896. userId: this.groupid
  897. }
  898. changevipUser(param).then(res => {
  899. if (res.code == 200) {
  900. uni.showToast({
  901. icon: 'none',
  902. title: '更换会员归属成功'
  903. })
  904. } else {
  905. uni.showToast({
  906. icon: 'none',
  907. title: res.msg
  908. })
  909. }
  910. })
  911. },
  912. receiveA(e) {
  913. console.log(e)
  914. this.userid = e.value[0].userId
  915. if (this.isShowSelectAll == true) {
  916. this.groupid = this.selectidAll
  917. this.changeall()
  918. this.showcol = !this.showcol
  919. setTimeout(() => {
  920. this.getfsuserListdata()
  921. }, 200)
  922. } else {
  923. this.changeall()
  924. this.showcol = !this.showcol
  925. this.getfsuserListdata()
  926. }
  927. this.isSelectAll = false
  928. },
  929. getvipListnum() {
  930. getvipNum().then(res => {
  931. if (res.code == 200) {
  932. this.list[0].name = "会员" + '(' + res.data.number + ')'
  933. this.list[1].name = "小黑屋" + '(' + res.data.smallBlackNum + ')'
  934. this.list[2].name = "黑名单" + '(' + res.data.blackNum + ')'
  935. } else {
  936. uni.showToast({
  937. icon: 'none',
  938. title: res.msg
  939. })
  940. }
  941. })
  942. },
  943. getactNav(data) {
  944. if (data.value == 5) {
  945. this.itemname = data.name
  946. this.isShowSelectAll = !this.isShowSelectAll
  947. } else {
  948. this.isShowSelectAll = false
  949. }
  950. },
  951. closetagselect() {
  952. this.showTagSelect = !this.showTagSelect
  953. },
  954. suretagchangeAll() {
  955. if (this.sharetag == 0) {
  956. this.sharetaglist = this.changetag.filter(item => item.checked).map(v => v.tagId).join(',')
  957. this.showTagSelect = !this.showTagSelect
  958. this.zhanshitag = this.changetag.filter(item => item.checked).map(v => v.tag).join(',')
  959. // console.log(this.sharetaglist)
  960. const pages = '/pages_course/becomeVIP?companyId=' +this.user.companyId
  961. +"&projectId=" +this.projectId+ '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist
  962. this.$emit('childEvent', pages);
  963. console.log(pages)
  964. } else {
  965. //多选改标签确认按钮
  966. this.showTagSelect = !this.showTagSelect
  967. if (this.selectidAll.length == 0) {
  968. uni.showToast({
  969. icon: 'none',
  970. title: '未选中用户'
  971. })
  972. return
  973. }
  974. this.selectidtag = this.changetag.filter(item => item.checked).map(v => v.tagId)
  975. this.changeLabelmore()
  976. }
  977. if (this.showInvite) {
  978. this.invitePop = true
  979. }
  980. },
  981. singleChangeLable(data) {
  982. this.showTagSelect = !this.showTagSelect
  983. this.selectidAll[0] = data
  984. this.tagchangekeywords = ''
  985. this.selectidtag = []
  986. this.sharetag = 1
  987. this.showInvite = false
  988. this.getalltagtaglist()
  989. },
  990. getalltagtaglist(type) {
  991. //获取公司标签列表
  992. const data = {
  993. pageNum: this.tagpageNums,
  994. pageSize: this.tagpageSizes,
  995. keyword: this.tagchangekeywords
  996. }
  997. getallTags(data).then(res => {
  998. if (res.code == 200) {
  999. const dataList = res.data.list.map(item => {
  1000. return {
  1001. ...item,
  1002. checked: false,
  1003. }
  1004. })
  1005. if (type == 'refresh') {
  1006. this.changetag = dataList
  1007. } else {
  1008. this.changetag = dataList
  1009. }
  1010. if (res.data.isLastPage) {
  1011. this.statusAs = 'nomore'
  1012. } else {
  1013. this.statusAs = 'loadmore'
  1014. }
  1015. this.pagetagA = res.data
  1016. } else {
  1017. uni.showToast({
  1018. icon: 'none',
  1019. title: res.msg
  1020. })
  1021. }
  1022. })
  1023. },
  1024. changesinglevip(data) {
  1025. this.showcol = !this.showcol
  1026. // console.log(data)
  1027. this.groupid[0] = data
  1028. this.getgrouplist()
  1029. },
  1030. changeLabelmore() {
  1031. //改标签选择按钮
  1032. const params = {
  1033. tagIds: this.selectidtag,
  1034. userCompanyUserIds: this.selectidAll
  1035. }
  1036. changeLable(params).then(res => {
  1037. if (res.code == 200) {
  1038. this.userList = []
  1039. this.getfsuserListdata('refresh')
  1040. const timer = setTimeout(function() {
  1041. uni.showToast({
  1042. icon: 'none',
  1043. title: '标签更改成功'
  1044. })
  1045. }, 500);
  1046. this.isSelectAll = false
  1047. this.selectedCount = 0
  1048. } else {
  1049. uni.showToast({
  1050. icon: 'none',
  1051. title: res.msg
  1052. })
  1053. }
  1054. })
  1055. },
  1056. changeOwnership() {
  1057. //更换归属(经销商功能)
  1058. },
  1059. getcompanyTag(type) {
  1060. this.companytag = []
  1061. this.tagkeywords = this.tagkeywords.replace(/,/g, ',')
  1062. const data = {
  1063. pageNum: this.tagpageNum,
  1064. pageSize: this.tagpageSize,
  1065. keyword: this.tagkeywords
  1066. }
  1067. getcompanyTaglist(data).then(res => {
  1068. if (res.code == 200) {
  1069. // this.showCompanytag = res.data.list
  1070. const dataList = res.data.list.map(item => {
  1071. return {
  1072. ...item,
  1073. checked: false,
  1074. }
  1075. })
  1076. if (type == 'refresh') {
  1077. this.companytag = dataList
  1078. } else {
  1079. this.companytag = [...this.companytag, ...dataList]
  1080. }
  1081. if (res.data.isLastPage) {
  1082. this.statusA = 'nomore'
  1083. } else {
  1084. this.statusA = 'loadmore'
  1085. }
  1086. this.pagetag = res.data
  1087. } else {
  1088. uni.showToast({
  1089. icon: 'none',
  1090. title: res.msg
  1091. })
  1092. }
  1093. })
  1094. },
  1095. getfsuserListdata(type) {
  1096. // this.userList=[]
  1097. const param = {
  1098. userId: this.user.userId,
  1099. tabValue: this.currentType,
  1100. registerStartTime: this.startTime, //注册开始
  1101. registerEndTime: this.endTime, //注册结束
  1102. watchCourseType: this.watchStatusIndex,
  1103. missCourseStatus: this.courseStatusIndex,
  1104. projectId: this.selprojectId,
  1105. keyword: this.keyword,
  1106. tagIds: this.idx,
  1107. status: this.currentIsBlack,
  1108. companyUserId: this.salesid,
  1109. continueMissCourseSort: this.searchTypeIndex,
  1110. ...this.pageOptions
  1111. }
  1112. getfsuserList(param).then(res => {
  1113. if (res.code == 200) {
  1114. this.viewload = false
  1115. let dataList = res.data.list.map(item => {
  1116. return {
  1117. ...item,
  1118. checked: false,
  1119. }
  1120. })
  1121. if (type == 'refresh') {
  1122. this.userList = dataList
  1123. } else if (type == 'more') {
  1124. this.userList = dataList
  1125. } else {
  1126. this.userList = [...this.userList, ...dataList]
  1127. }
  1128. if (res.data.isLastPage) {
  1129. this.status = 'nomore'
  1130. } else {
  1131. this.status = 'loadmore'
  1132. }
  1133. } else {
  1134. uni.showToast({
  1135. icon: 'none',
  1136. title: res.msg
  1137. })
  1138. }
  1139. })
  1140. },
  1141. onChange(index) {
  1142. if (index == 5) return
  1143. this.searchbarNav = index
  1144. },
  1145. searchKeyword(value) {
  1146. this.keyword = value
  1147. this.userList = []
  1148. this.pageOptions.pageNum = 1
  1149. this.getfsuserListdata()
  1150. },
  1151. singleChange(data) {
  1152. this.userList = []
  1153. this.selectidAll[0] = data
  1154. this.changeProhibit()
  1155. },
  1156. changeProhibit() {
  1157. //批量禁用选择按钮
  1158. if (this.selectidAll.length < 1) {
  1159. uni.showToast({
  1160. icon: 'none',
  1161. title: '所选列表为空'
  1162. })
  1163. return
  1164. }
  1165. Addblacklist(this.selectidAll).then(res => {
  1166. if (res.code == 200) {
  1167. this.pageOptions.pageNum = 1
  1168. this.getfsuserListdata('refresh')
  1169. // 创建一个在**秒后执行的定时器
  1170. const timer = setTimeout(function() {
  1171. uni.showToast({
  1172. icon: 'none',
  1173. title: '禁用成功'
  1174. })
  1175. }, 200);
  1176. this.getvipListnum()
  1177. // this.isShowSelectAll = false
  1178. this.isSelectAll = false
  1179. } else {
  1180. uni.showToast({
  1181. icon: 'none',
  1182. title: res.msg
  1183. })
  1184. }
  1185. })
  1186. },
  1187. // 全选
  1188. selectAll() {
  1189. // 先设置全选
  1190. this.isSelectAll = !this.isSelectAll
  1191. // 然后设置列表 checked没得this不会报错吗 这是返回新数组
  1192. console.log(this.isSelectAll)
  1193. this.userList = this.userList.map(item => {
  1194. // 每一项的 checked为 全选的状态
  1195. return {
  1196. ...item,
  1197. checked: this.isSelectAll
  1198. }
  1199. })
  1200. this.selectidAll = this.userList.filter(item => item.checked).map(item => item.userCompanyUserId)
  1201. console.log(this.isSelectAll)
  1202. },
  1203. // 单选 /反选
  1204. changeItem(i) {
  1205. let arr = {
  1206. ...this.userList[i],
  1207. checked: !this.userList[i].checked
  1208. }
  1209. this.$set(this.userList, i, arr)
  1210. this.selectidAll = this.userList.filter(item => item.checked).map(item => item.userCompanyUserId)
  1211. console.log(this.selectidAll)
  1212. this.isSelectAll = this.userList.every(item => item.checked)
  1213. if (this.isSelectAll) {
  1214. this.userList = this.userList.map(item => {
  1215. return {
  1216. ...item,
  1217. checked: this.isSelectAll
  1218. }
  1219. })
  1220. }
  1221. this.selectidAll = this.userList.filter(item => item.checked).map(item => item.userCompanyUserId)
  1222. },
  1223. reset() {
  1224. //重置时间选择等筛选
  1225. const type = this.filterData[this.searchbarNav].type
  1226. console.log(this.registerTimeIndex)
  1227. if (type == 'registerTime') {
  1228. this.registerTimeIndex = ''
  1229. this.endTime = ''
  1230. this.startTime = ''
  1231. this.getfsuserListdata('refresh')
  1232. // console.log(this.getfsuserListdata())
  1233. } else if (type == 'watchStatus') {
  1234. this.watchStatusIndex = 0
  1235. this.getfsuserListdata('refresh')
  1236. } else if (type == 'userStatus') {
  1237. this.userStatusIndex = 0
  1238. this.salesid = ''
  1239. this.getfsuserListdata('refresh')
  1240. } else if (type == 'courseStatus') {
  1241. this.courseStatusIndex = 0
  1242. this.getfsuserListdata('refresh')
  1243. } else if (type == 'project') {
  1244. this.selprojectId = ''
  1245. this.projectStatusIndex = 0
  1246. this.getfsuserListdata("refresh")
  1247. } else {
  1248. }
  1249. },
  1250. confirm(e) {
  1251. this.pageOptions.pageNum = 1
  1252. this.userList = []
  1253. const type = this.filterData[this.searchbarNav].type
  1254. const value = this.registerTimeIndex
  1255. if (type == 'registerTime') {
  1256. if (value == 0) {
  1257. this.startTime = ''
  1258. this.endTime = ''
  1259. this.getfsuserListdata('refresh')
  1260. } else if (value == 1) {
  1261. this.startTime = this.todayday + ' 00:00:00'
  1262. this.endTime = this.todayday + ' 23:59:59'
  1263. this.getfsuserListdata('refresh')
  1264. } else if (value == 2) {
  1265. let yesterday = new Date();
  1266. yesterday.setDate(yesterday.getDate() - 1);
  1267. this.startTime = uni.$u.timeFormat(yesterday, 'yyyy-mm-dd') + ' 00:00:00'
  1268. this.endTime = uni.$u.timeFormat(yesterday, 'yyyy-mm-dd') + ' 23:59:59'
  1269. this.getfsuserListdata('refresh')
  1270. } else if (value == 3) {
  1271. let yesterday = new Date();
  1272. yesterday.setDate(yesterday.getDate() - 6);
  1273. this.startTime = uni.$u.timeFormat(yesterday, 'yyyy-mm-dd') + ' 00:00:00'
  1274. this.endTime = this.todayday + ' 23:59:59'
  1275. this.getfsuserListdata('refresh')
  1276. } else {
  1277. this.getfsuserListdata('refresh')
  1278. }
  1279. } else if (type == 'watchStatus') {
  1280. // this.watchStatusIndex=value
  1281. this.getfsuserListdata()
  1282. // console.log(this.filterData)
  1283. } else if (type == 'userStatus') {
  1284. if (this.userStatusIndex == 0) {
  1285. this.salesid = ''
  1286. this.getfsuserListdata('refresh')
  1287. } else {
  1288. this.getfsuserListdata('refresh')
  1289. }
  1290. // console.log(this.userStatusIndex)
  1291. } else if (type == 'courseStatus') {
  1292. this.getfsuserListdata('refresh')
  1293. console.log(this.courseStatusIndex)
  1294. } else if (type == 'project') {
  1295. if (this.projectStatusIndex == 0) {
  1296. this.selprojectId = ''
  1297. this.getfsuserListdata('refresh')
  1298. } else {
  1299. this.getfsuserListdata('refresh')
  1300. }
  1301. console.log(this.projectStatusIndex)
  1302. }
  1303. // this.mescroll.resetUpScroll()
  1304. },
  1305. handleParamItem(type, index, id) {
  1306. if (type == 'registerTime') {
  1307. this.registerTimeIndex = index
  1308. } else if (type == 'watchStatus') {
  1309. this.watchStatusIndex = index
  1310. // console.log('watchStatus',index)
  1311. } else if (type == 'userStatus') {
  1312. this.userStatusIndex = index
  1313. this.salesid = id
  1314. console.log(this.salesid)
  1315. } else if (type == 'courseStatus') {
  1316. this.courseStatusIndex = index
  1317. } else if (type == 'project') {
  1318. this.selprojectId = id
  1319. this.projectStatusIndex = index
  1320. } else {
  1321. this.ispopshow = false
  1322. }
  1323. },
  1324. sectionChange(index) {
  1325. this.current = index;
  1326. this.currentType = 0
  1327. this.startTime = '' //注册开始
  1328. this.endTime = '' //注册结束
  1329. this.watchStatusIndex = 0
  1330. this.salesid = ''
  1331. this.courseStatusIndex = 0
  1332. this.selprojectId = ''
  1333. this.keyword = ''
  1334. this.idx = []
  1335. this.pageOptions.pageNum = 1
  1336. this.isShowSelectAll = false
  1337. this.userList = []
  1338. if (index == 0) {
  1339. // 0小黑屋 1正常 2拉黑
  1340. this.currentIsBlack = 1
  1341. this.getfsuserListdata("refresh")
  1342. } else if (index == 1) {
  1343. this.currentIsBlack = 0
  1344. this.getfsuserListdata("refresh")
  1345. } else {
  1346. this.currentIsBlack = 2
  1347. this.getfsuserListdata("refresh")
  1348. }
  1349. this.isSelectAll=false
  1350. this.getvipListnum()
  1351. },
  1352. clickTypeTab(e) {
  1353. this.currentType = e.index
  1354. this.userList = []
  1355. // 在这里更新
  1356. this.pageOptions.pageNum = 1
  1357. this.getfsuserListdata()
  1358. },
  1359. bindPickerChange(e) {
  1360. console.log('picker发送选择改变,携带值为', e.detail.value)
  1361. this.userList = []
  1362. this.searchTypeIndex = e.detail.value
  1363. this.getfsuserListdata()
  1364. },
  1365. openPop(type) {
  1366. this.popTitle = type == 'search' ? '搜索选择' : type == 'tag' ? '标签筛选' : ''
  1367. this.typeIndex = this.queryParam.typeIndex
  1368. this.showPop = true
  1369. if (type == 'tag') {
  1370. this.getcompanyTag()
  1371. }
  1372. },
  1373. closePop() {
  1374. this.showPop = false
  1375. },
  1376. resetPop(i) {
  1377. this.idx = []
  1378. this.tagkeywords = ''
  1379. this.tagpageNum = 1
  1380. this.showCompanytag = []
  1381. this.companytag.forEach(tag => {
  1382. tag.checked = false; // 将所有标签的show属性重置为true
  1383. });
  1384. this.showPop = false
  1385. this.$nextTick(() => {
  1386. this.getcompanyTag()
  1387. this.getfsuserListdata()
  1388. })
  1389. },
  1390. closeCalendar() {
  1391. this.showCalendar = false
  1392. },
  1393. confirmCalendar(e) {
  1394. // this.startTime = e[0]
  1395. // this.endTime = e[e.length-1]
  1396. this.showCalendar = false
  1397. this.queryParam.startTime = e.range.after
  1398. this.queryParam.endTime = e.range.before
  1399. this.endTime = e.range.before + ' 23:59:59'
  1400. this.startTime = e.range.after + ' 00:00:00'
  1401. console.log(e)
  1402. // this.getCount()
  1403. },
  1404. bindTypeChange(i) {
  1405. this.typeIndex = i
  1406. },
  1407. confirmPop() {
  1408. this.queryParam.typeIndex = this.typeIndex
  1409. this.showPop = false
  1410. this.showCompanytag = this.companytag.filter(item => item.checked)
  1411. this.idx = this.showCompanytag.map(v => v.tagId)
  1412. //filtter(过滤) 筛选所有checked==true的 然后map返回每一项的id
  1413. if (this.idx.length == 0) {
  1414. this.showCompanytag = this.companytag
  1415. }
  1416. this.$nextTick(() => {
  1417. this.getfsuserListdata("refresh")
  1418. })
  1419. },
  1420. chooseTag(i) {
  1421. this.companytag[i].checked = !this.companytag[i].checked
  1422. },
  1423. choosechangeTag(i) {
  1424. this.changetag[i].checked = !this.changetag[i].checked
  1425. },
  1426. vipInvite() {
  1427. if (!this.vipInviteshow) {
  1428. // this.invitePop = true
  1429. // this.getlink('preload')
  1430. // this.getjssdklist()
  1431. this.getprojectlists()
  1432. // this.invitePop = true
  1433. this.projectId=''
  1434. this.projectbox=true
  1435. this.sharetaglist = null
  1436. } else {
  1437. this.vipInviteshow = false
  1438. }
  1439. },
  1440. showinimg() {
  1441. this.vipInviteshow = true
  1442. },
  1443. copyLink() {
  1444. this.setTimeShow = true
  1445. },
  1446. confirmTime() {
  1447. this.setTimeShow = false
  1448. this.showShare = false
  1449. console.log(this.showInvite)
  1450. this.getshareLink()
  1451. },
  1452. getshareimg() {
  1453. //生成海报
  1454. this.getlink()
  1455. this.codeLink = ''
  1456. uni.showLoading({
  1457. title: '正在生成中...'
  1458. })
  1459. const url = window.location.href.split('#')[0]
  1460. const param = {
  1461. companyId: this.user.companyId,
  1462. companyUserId: this.user.userId,
  1463. realLink: url + '#/pages/user/users/becomeVIP' + '?companyId=' +
  1464. this.user.companyId + '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist,
  1465. tagIds: this.sharetaglist,
  1466. }
  1467. becomeVipuserImg(param).then(res => {
  1468. if (res.code == 200) {
  1469. this.codeLink = res.posterImage
  1470. console.log(res)
  1471. } else {
  1472. uni.showToast({
  1473. title: res.msg,
  1474. icon: 'none',
  1475. duration: 2000
  1476. });
  1477. }
  1478. })
  1479. },
  1480. getlink(type) {
  1481. //生成链接
  1482. const param = {
  1483. companyId: this.user.companyId,
  1484. companyUserId: this.user.userId,
  1485. tagids: this.sharetaglist,
  1486. limitTime: this.time
  1487. }
  1488. const url = window.location.href.split('#')[0]
  1489. // console.log(url)
  1490. this.copyLinks = url + '#/pages/user/users/becomeVIP' + '?companyId=' +
  1491. this.user.companyId + '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist
  1492. },
  1493. getshareLink() {
  1494. //生成链接
  1495. this.copyLinks = []
  1496. const param = {
  1497. code: '',
  1498. companyId: this.user.companyId,
  1499. companyUserId: this.user.userId,
  1500. tagids: this.sharetaglist,
  1501. limitTime: this.time
  1502. }
  1503. const url = window.location.href.split('#')[0]
  1504. console.log(url)
  1505. this.copyLinks = url + '#/pages/user/users/becomeVIP' + '?companyId=' +
  1506. this.user.companyId + '&companyUserId=' + this.user.userId + '&tagids=' + this.sharetaglist
  1507. console.log(this.copyLinks)
  1508. setTimeout(() => {
  1509. uni.setClipboardData({
  1510. data: String(this.copyLinks),
  1511. success: () => {
  1512. uni.showToast({
  1513. title: '复制成功',
  1514. icon: 'none',
  1515. duration: 2000
  1516. });
  1517. setTimeout(() => {
  1518. this.invitePop = false
  1519. }, 200)
  1520. },
  1521. })
  1522. }, 100)
  1523. },
  1524. mescrollInit(mescroll) {
  1525. this.mescroll = mescroll;
  1526. },
  1527. /*下拉刷新的回调 */
  1528. downCallback(mescroll) {
  1529. mescroll.resetUpScroll()
  1530. },
  1531. upCallback(page) {
  1532. //联网加载数据
  1533. var that = this;
  1534. var data = {
  1535. courseId: this.courseId,
  1536. status: '',
  1537. pageNum: page.num,
  1538. pageSize: page.size
  1539. };
  1540. uni.showLoading({
  1541. title: "加载中..."
  1542. })
  1543. },
  1544. }
  1545. }
  1546. </script>
  1547. <style lang="scss" scoped>
  1548. .probg{
  1549. color: #666;
  1550. }
  1551. .probgsel{
  1552. background-color: #1677ff;
  1553. color: #fff;
  1554. border: none;
  1555. }
  1556. .quedingpro{
  1557. background-color: #1677ff;
  1558. color: #fff;
  1559. border-radius: 80rpx;
  1560. height: 80rpx;
  1561. line-height: 80rpx;
  1562. width: 60%;
  1563. margin: 0 auto;
  1564. margin-top: 40rpx;
  1565. text-align: center;
  1566. }
  1567. .card-share {
  1568. position: relative;
  1569. }
  1570. .share {
  1571. display: inline-block;
  1572. position: absolute;
  1573. bottom: 0;
  1574. left: 0;
  1575. width: 100%;
  1576. height: 50%;
  1577. opacity: 0;
  1578. }
  1579. .imgshe {
  1580. display: flex;
  1581. flex-direction: row-reverse
  1582. }
  1583. .point-box {
  1584. height: 100%;
  1585. width: 100%;
  1586. .xu-box {
  1587. border: #f5f5f5 4rpx dashed;
  1588. padding: 20rpx 20rpx;
  1589. }
  1590. }
  1591. .codeimg {
  1592. position: absolute;
  1593. z-index: 9999;
  1594. left: 40rpx;
  1595. top: 40rpx;
  1596. }
  1597. #codeurl {
  1598. position: relative;
  1599. }
  1600. .checked-bg {
  1601. border: 1px solid #1677ff !important;
  1602. color: #1677ff !important;
  1603. background-color: #e7f1fe !important;
  1604. }
  1605. .changetagbtn {
  1606. width: 45%;
  1607. height: 80rpx;
  1608. border-radius: 50rpx;
  1609. text-align: center;
  1610. line-height: 80rpx;
  1611. }
  1612. ::v-deep {
  1613. .foot-select {
  1614. width: 100%;
  1615. padding: 20rpx 20rpx;
  1616. padding-bottom: 60rpx;
  1617. z-index: 10000 !important;
  1618. position: fixed;
  1619. bottom: 0;
  1620. margin-left: -24rpx !important;
  1621. }
  1622. }
  1623. ::v-deep {
  1624. .model .u-fade-enter-active {
  1625. z-index: 10075 !important;
  1626. }
  1627. }
  1628. ::v-deep {
  1629. .uni-calendar__mask {
  1630. z-index: 11000 !important;
  1631. }
  1632. .uni-calendar__content {
  1633. z-index: 12000 !important;
  1634. }
  1635. }
  1636. .container {
  1637. font-family: PingFang SC, PingFang SC;
  1638. font-weight: 400;
  1639. font-size: 14px;
  1640. color: #222222;
  1641. height: 100%;
  1642. overflow: hidden;
  1643. }
  1644. .boxnav {
  1645. flex-wrap: wrap;
  1646. padding: 0 0 0 10px;
  1647. &-item {
  1648. width: 50%;
  1649. overflow: hidden;
  1650. }
  1651. &-item-info {
  1652. border: 1px solid #f5f5f5;
  1653. text-align: center;
  1654. color: #222;
  1655. background-color: #f5f5f5;
  1656. border-radius: 3px;
  1657. padding: 5px;
  1658. margin: 0 10px 10px 0;
  1659. }
  1660. &-active {
  1661. border: 1px solid #1677ff !important;
  1662. color: #1677ff !important;
  1663. background-color: #e7f1fe !important;
  1664. }
  1665. }
  1666. .calendar-day {
  1667. font-family: PingFang SC, PingFang SC;
  1668. font-weight: 400;
  1669. font-size: 12px;
  1670. color: #999;
  1671. flex: 1;
  1672. min-height: 30px;
  1673. background-color: #f5f5f5;
  1674. border-radius: 4px;
  1675. margin: 0 10px 10px 0;
  1676. }
  1677. .setTimebox {
  1678. font-family: PingFang SC, PingFang SC;
  1679. font-weight: 400;
  1680. font-size: 14px;
  1681. width: fit-content;
  1682. height: fit-content;
  1683. }
  1684. .timetip {
  1685. font-family: PingFang SC, PingFang SC;
  1686. font-weight: 400;
  1687. font-size: 14px;
  1688. color: #2979ff;
  1689. text-align: center;
  1690. margin-bottom: 5px;
  1691. }
  1692. .popbox {
  1693. background-color: #fff;
  1694. border-radius: 12px;
  1695. font-family: PingFang SC, PingFang SC;
  1696. font-weight: 400;
  1697. font-size: 14px;
  1698. color: #333;
  1699. padding-bottom: 120rpx;
  1700. &-head {
  1701. padding: 15px;
  1702. font-weight: bold;
  1703. font-size: 15px;
  1704. text-align: center;
  1705. position: relative;
  1706. }
  1707. .close-circle {
  1708. position: absolute;
  1709. right: 10px;
  1710. top: 50%;
  1711. transform: translateY(-50%);
  1712. }
  1713. &-body {
  1714. padding: 10px 10px;
  1715. }
  1716. .radiobox {
  1717. &-item {
  1718. padding: 10px 0;
  1719. border-bottom: 1px solid #f5f5f5;
  1720. &:last-child {
  1721. border-bottom: none;
  1722. }
  1723. }
  1724. }
  1725. &-footer {
  1726. padding: 15px 0;
  1727. }
  1728. &-footer-btn {
  1729. flex: 1;
  1730. height: 44px;
  1731. line-height: 44px;
  1732. margin: 0 10px;
  1733. border-radius: 50px;
  1734. border: none;
  1735. font-family: PingFang SC, PingFang SC;
  1736. font-weight: 400;
  1737. font-size: 14px;
  1738. color: #333;
  1739. &::after {
  1740. border: none;
  1741. }
  1742. }
  1743. .con-btn {
  1744. background-color: #1677ff;
  1745. color: #fff;
  1746. }
  1747. .choosetitle {
  1748. font-family: PingFang SC, PingFang SC;
  1749. font-weight: 400;
  1750. font-size: 15px;
  1751. color: #333;
  1752. }
  1753. .invitetip {
  1754. margin-top: 10px;
  1755. background-color: #ebf5fb;
  1756. color: #1677ff;
  1757. padding: 5px 10px;
  1758. border-radius: 5px;
  1759. }
  1760. .sharePop-item {
  1761. padding: 0 10px;
  1762. box-sizing: border-box;
  1763. font-family: PingFang SC, PingFang SC;
  1764. font-weight: 400;
  1765. font-size: 14px;
  1766. display: inline-flex !important;
  1767. image {
  1768. height: 48px;
  1769. width: 48px;
  1770. margin-bottom: 10px;
  1771. }
  1772. }
  1773. }
  1774. .headbox {
  1775. background-color: #fff;
  1776. .subsection {
  1777. height: 45px;
  1778. padding: 4px;
  1779. }
  1780. .participate-order {
  1781. font-size: 12px;
  1782. image {
  1783. width: 15px;
  1784. height: 15px;
  1785. }
  1786. }
  1787. }
  1788. .tag-active {
  1789. background-color: #ffeceb !important;
  1790. color: #f93e3e !important;
  1791. border: 1px solid #f93e3e !important;
  1792. }
  1793. .tagbox {
  1794. padding-top: 10rpx;
  1795. font-size: 12px;
  1796. color: #1677ff;
  1797. &-list {
  1798. margin: 0 0 -6px 6px;
  1799. flex-wrap: wrap;
  1800. }
  1801. &-item {
  1802. height: 26px;
  1803. padding: 0 8px;
  1804. margin: 0 6px 6px 0;
  1805. border-radius: 4px;
  1806. background-color: #f5f5f5;
  1807. color: #999;
  1808. border: 1px solid #f5f5f5;
  1809. box-sizing: border-box;
  1810. font-size: 12px;
  1811. }
  1812. }
  1813. .invite-member {
  1814. height: 55px;
  1815. width: 50px;
  1816. position: fixed;
  1817. bottom: 110px;
  1818. right: 10px;
  1819. cursor: pointer;
  1820. .intimg {
  1821. width: 50px;
  1822. height: 55px;
  1823. }
  1824. }
  1825. .invite-members {
  1826. right: -68rpx;
  1827. }
  1828. .falseimg {
  1829. position: absolute;
  1830. width: 30rpx;
  1831. height: 30rpx;
  1832. top: 0rpx;
  1833. right: -8rpx;
  1834. }
  1835. .userlist {
  1836. padding: 24rpx;
  1837. }
  1838. </style>