topStore.vue 104 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798
  1. <template>
  2. <div class="bgcolor">
  3. <div class="navBarTOP">
  4. <!-- 顶部条-->
  5. <van-nav-bar class="navBar" title="高销额门店推荐" left-arrow @click-left="onClickLeft">
  6. <template #right>
  7. <span @click="searchFn">筛选<van-icon name="arrow-down" /></span>
  8. </template>
  9. </van-nav-bar>
  10. <div class="searchDiv searchDivcs">
  11. <van-row v-if="showAll && showKM">
  12. <van-col span="16">
  13. <van-search
  14. v-model="storeName"
  15. left-icon="search"
  16. show-action
  17. placeholder="搜索名称/编号/地址"
  18. @clear="clearFn">
  19. <template #action>
  20. <div @click="onSearchm">搜索</div>
  21. </template>
  22. </van-search>
  23. </van-col>
  24. <van-col span="8">
  25. <div
  26. style="
  27. line-height: 36px;
  28. margin: 8px;
  29. margin-right: 0;
  30. text-align: center;
  31. border-radius: 6px;
  32. color: #0057ba;
  33. background-color: #fff;
  34. font-size: 14px;
  35. border: 1px solid #0057ba;
  36. "
  37. @click="jionAll">
  38. 加入计划内
  39. </div>
  40. </van-col>
  41. </van-row>
  42. <van-row v-if="!showAll || !showKM">
  43. <van-col span="24">
  44. <van-search
  45. v-model="storeName"
  46. left-icon="search"
  47. show-action
  48. placeholder="搜索名称/编号/地址"
  49. @clear="clearFn">
  50. <template #action>
  51. <div @click="onSearchm">搜索</div>
  52. </template>
  53. </van-search>
  54. </van-col>
  55. </van-row>
  56. </div>
  57. <van-dropdown-menu active-color="#0057ba">
  58. <van-dropdown-item v-model="value1" :options="option1" @change="v1Fn" />
  59. <van-dropdown-item v-model="value2" :options="option2" @change="v2Fn" />
  60. <van-dropdown-item v-model="value3" :options="option3" @change="v3Fn" />
  61. </van-dropdown-menu>
  62. </div>
  63. <!-- 主体内容-->
  64. <div style="height: 154px"></div>
  65. <van-notice-bar v-if="!showKM" color="#444" background="#f5f5f5" left-icon="info-o">
  66. 附近20KM内门店。
  67. </van-notice-bar>
  68. <div class="container">
  69. <van-list
  70. class="myList"
  71. v-model="loading"
  72. :finished="finished"
  73. @load="onLoad"
  74. finished-text="--已经到底了--">
  75. <van-checkbox-group v-model="radio">
  76. <div class="cellcontent" v-for="(item, index) in list" :key="index">
  77. <van-cell>
  78. <div class="card">
  79. <div class="title titlero btn" :data-clipboard-text="item.storeCode">
  80. {{ item.storeName }}(<span style="color: #0057ba">{{ item.storeCode }}</span
  81. >)<van-icon
  82. :name="paste"
  83. color="#ee0a24"
  84. size="20"
  85. style="top: 6px; margin-left: 4px" />
  86. </div>
  87. <div class="info" style="position: relative">
  88. 联系人:{{ item.contactName }}
  89. <div style="position: absolute; bottom: 0px; right: 0px">
  90. <el-popover
  91. popper-class="zpover zpover6"
  92. placement="bottom-start"
  93. trigger="click">
  94. <div>
  95. <p>
  96. 本店{{ timeData }}下单SKU数:<a
  97. @click="linkList(item)"
  98. style="text-decoration: underline"
  99. >点击查看</a
  100. >
  101. </p>
  102. </div>
  103. <div
  104. class="visitStoreIco"
  105. v-if="item.storeLabels.zysslNums"
  106. style="background-color: #fff; position: relative"
  107. slot="reference">
  108. <p
  109. style="
  110. width: 100%;
  111. position: absolute;
  112. z-index: 1;
  113. top: 0.2px;
  114. width: 22px;
  115. margin: 0;
  116. margin-left: 3.6px;
  117. text-align: center;
  118. font-size: 12px;
  119. ">
  120. {{ item.storeLabels.zysslNums }}
  121. </p>
  122. <van-icon :name="ord" size="26" />
  123. </div>
  124. </el-popover>
  125. <el-popover
  126. popper-class="zpover"
  127. placement="bottom"
  128. width="200"
  129. trigger="click">
  130. <div v-if="item.storeLabels">
  131. <p>已参加:</p>
  132. <p v-for="tt in (item.storeLabels.targetOne + '').split(';')">
  133. {{ tt }}
  134. </p>
  135. </div>
  136. <div
  137. class="visitStoreIco"
  138. v-if="item.storeLabels.targetOne"
  139. style="background-color: #fff"
  140. slot="reference">
  141. <van-icon :name="targetOne" size="26" />
  142. </div>
  143. </el-popover>
  144. <el-popover
  145. popper-class="zpover"
  146. placement="bottom"
  147. width="200"
  148. trigger="click"
  149. content="金牌店调色机5天未联网">
  150. <div
  151. v-if="item.storeLabels.ccmOffline"
  152. class="visitStoreIco"
  153. style="background-color: #fff"
  154. slot="reference">
  155. <van-icon :name="Network" size="26" />
  156. </div>
  157. </el-popover>
  158. <el-popover
  159. popper-class="zpover"
  160. placement="bottom"
  161. width="200"
  162. trigger="click"
  163. content="同城店近60天未下单">
  164. <div
  165. v-if="item.storeLabels.fxNoOrder"
  166. class="visitStoreIco"
  167. style="background-color: #fff"
  168. slot="reference">
  169. <van-icon :name="order60" size="26" />
  170. </div>
  171. </el-popover>
  172. <!-- <el-popover-->
  173. <!-- popper-class="zpover"-->
  174. <!-- placement="bottom"-->
  175. <!-- width="200"-->
  176. <!-- trigger="click"-->
  177. <!-- content="金牌店近30天未下单">-->
  178. <!-- <div v-if="cstype==4" class="visitStoreIco" style="background-color: #fff;" slot="reference"><van-icon :name="order" size="26" /></div>-->
  179. <!-- </el-popover>-->
  180. <!-- <el-popover-->
  181. <!-- popper-class="zpover zpover99"-->
  182. <!-- placement="bottom"-->
  183. <!-- width="200"-->
  184. <!-- trigger="click"-->
  185. <!-- content="本店没参加碰瓷专案">-->
  186. <!-- <div class="visitStoreIco" v-if="cstype==2" slot="reference" style="background-color: white"><van-icon :name="nocj" size="26" /></div>-->
  187. <!-- </el-popover>-->
  188. <el-popover
  189. popper-class="zpover"
  190. placement="bottom"
  191. width="200"
  192. trigger="click"
  193. content="本店本月进过专业时时丽">
  194. <div
  195. class="visitStoreIco"
  196. v-if="item.storeLabels.zyssl"
  197. style="background-color: #ed5c68"
  198. slot="reference">
  199. </div>
  200. </el-popover>
  201. <el-popover
  202. popper-class="zpover zpover1"
  203. placement="bottom"
  204. width="200"
  205. trigger="click"
  206. content="本店本月进过超好贴">
  207. <!-- v-if="item.storeLabels.zyssl" -->
  208. <div
  209. v-if="item.storeLabels.chtczj"
  210. class="visitStoreIco"
  211. style="background-color: #0057ba"
  212. slot="reference">
  213. </div>
  214. </el-popover>
  215. <!-- <el-popover-->
  216. <!-- placement="bottom"-->
  217. <!-- width="200"-->
  218. <!-- popper-class="zpover zpover2"-->
  219. <!-- trigger="click"-->
  220. <!-- content="本月未被拜访的信息">-->
  221. <!-- <div v-if="item.storeLabels.noVisit" class="visitStoreIco" style="background-color: #fff" slot="reference">-->
  222. <!-- <van-icon :name="visitTimess" size="26" /></div>-->
  223. <!-- </el-popover>-->
  224. <el-popover
  225. placement="bottom"
  226. popper-class="zpover zpover1 zpover1sb"
  227. trigger="click"
  228. :disabled="!item.userVisitTimesMap"
  229. :content="'本店本月已拜访过' + item.storeLabels.visitTimes + '次'">
  230. <div
  231. v-if="item.storeLabels.visitTimes && item.storeLabels.visitTimes > 0"
  232. class="visitStoreIco"
  233. slot="reference"
  234. style="background-color: #fff; position: relative">
  235. <p
  236. style="
  237. width: 100%;
  238. position: absolute;
  239. z-index: 10;
  240. top: -2px;
  241. margin: 0;
  242. text-align: center;
  243. font-size: 12px;
  244. ">
  245. {{ item.storeLabels.visitTimes }}
  246. </p>
  247. <van-icon :name="ordernum" size="26" />
  248. </div>
  249. <!-- <div class="tipsTitle">
  250. 本店本月已拜访过{{ item.storeLabels.visitTimes }}次
  251. </div> -->
  252. <el-table :data="item.userVisitTimesMap" border max-height="180px">
  253. <el-table-column label="业务员" prop="userName" />
  254. <el-table-column label="拜访次数" prop="visitTimes" width="110px" />
  255. </el-table>
  256. </el-popover>
  257. </div>
  258. </div>
  259. <div class="info" style="position: relative">
  260. 类型:<span v-if="cstype != 1">{{ item.storeCategory }}</span
  261. ><span v-if="cstype == 1">金牌店</span>&nbsp;
  262. <el-popover
  263. popper-class="zpover zpover6"
  264. placement="bottom-start"
  265. trigger="click">
  266. <div>
  267. <p>
  268. 本店经营品项指导:
  269. <a @click="linkimg(item)" style="text-decoration: underline">点击查看</a>
  270. </p>
  271. </div>
  272. <van-icon name="question-o" size="18" slot="reference" />
  273. </el-popover>
  274. </div>
  275. <div class="info" @click="buryingPointFn(item)">
  276. 联系电话:<a
  277. style="color: #0057ba; font-weight: bold; text-decoration: underline"
  278. :href="'tel:' + item.telephone"
  279. >{{ item.telephone }}<van-icon name="phone"
  280. /></a>
  281. </div>
  282. <div class="info">地址:{{ item.addressLine }}</div>
  283. <div class="info" v-if="typeShow">经销商:{{ item.chainName }}</div>
  284. <div class="info" style="color: #444">
  285. 门店销额(近三个月):¥{{ Micrometer(item.rolling3monthAMT) }}元
  286. <span
  287. v-if="cstype == 1 && index == 0 && value1 == 'b'"
  288. style="float: right; font-weight: bold; color: red">
  289. <img
  290. src="../../assets/Icon/top1.png"
  291. v-if="index == 0"
  292. style="width: 18px; float: left; margin-top: 2px" />TOP{{ index + 1 }}</span
  293. >
  294. <span
  295. v-if="cstype == 1 && index == 1 && value1 == 'b'"
  296. style="float: right; font-weight: bold; color: #f4ea2a">
  297. <img
  298. src="../../assets/Icon/top2.png"
  299. v-if="index == 1"
  300. style="width: 18px; float: left; margin-top: 2px" />TOP{{ index + 1 }}</span
  301. >
  302. <span
  303. v-if="cstype == 1 && index == 2 && value1 == 'b'"
  304. style="float: right; font-weight: bold; color: #1afa29">
  305. <img
  306. src="../../assets/Icon/top3.png"
  307. v-if="index == 2"
  308. style="width: 18px; float: left; margin-top: 2px" />TOP{{ index + 1 }}</span
  309. >
  310. <span
  311. v-if="cstype == 1 && index > 2 && value1 == 'b'"
  312. style="float: right; font-weight: bold">
  313. <img
  314. src="../../assets/Icon/top4.png"
  315. v-if="index > 2"
  316. style="width: 18px; float: left; margin-top: 2px" />TOP{{ index + 1 }}</span
  317. >
  318. </div>
  319. <div class="info" style="color: #444">
  320. 最近拜访时间:{{ parseTime(item.hisTime) }}
  321. </div>
  322. <div class="info" style="color: #444">
  323. 最新下单时间:{{ parseTime(item.deliveryDate) }}
  324. </div>
  325. </div>
  326. <div
  327. class="statstext"
  328. v-if="item.joinInPaln && showKM"
  329. style="background-color: #fff; bottom: 70px; right: 14px; top: auto">
  330. <van-checkbox
  331. :name="item.storeId"
  332. shape="square"
  333. style="float: right"></van-checkbox>
  334. </div>
  335. <div
  336. class="statstext"
  337. v-if="item.stateString == '未拜访'"
  338. style="background-color: #ed5c68">
  339. 未拜访
  340. </div>
  341. <div
  342. class="statstext"
  343. v-if="item.stateString == '拜访中'"
  344. style="background-color: white">
  345. <van-icon :name="times" color="#ee0a24" size="32" />
  346. </div>
  347. <div class="statstext" v-if="item.stateString == '已拜访'">已拜访</div>
  348. <div class="btnbox">
  349. <van-row>
  350. <van-col
  351. span="5"
  352. v-if="item.stateString != '已拜访' && customerVisits"
  353. @click="storeVisit(item)">
  354. <img :src="call" style="margin: 0 auto; height: 18px; display: block" />
  355. <p style="text-align: center; margin: 0; font-size: 12px">进入拜访</p>
  356. </van-col>
  357. <van-col
  358. span="5"
  359. v-if="item.storeCategory == '公装经销商'"
  360. @click="projectOutVisit(item)">
  361. <img :src="xmgj" style="margin: 0 auto; height: 18px; display: block" />
  362. <p style="text-align: center; margin: 0; font-size: 12px">项目跟进</p>
  363. <!-- <van-button type="info" size="small" plain class="centerBtn" @click="signAdd(item)">大客户签约</van-button>-->
  364. </van-col>
  365. <van-col
  366. span="5"
  367. v-if="
  368. item.stateString != '已拜访' &&
  369. item.storeCategory != '公装经销商' &&
  370. customerVisits
  371. "
  372. @click="abnormalVisit(item)">
  373. <img :src="yichang" style="margin: 0 auto; height: 18px; display: block" />
  374. <p style="text-align: center; margin: 0; margin-top: 1px; font-size: 12px">
  375. 异常拜访
  376. </p>
  377. </van-col>
  378. <van-col span="4" v-if="item.showOrderButton" @click="orderFn(item)">
  379. <img :src="xiadan" style="margin: 0 auto; height: 18px; display: block" />
  380. <p style="text-align: center; margin: 0; margin-top: 1px; font-size: 12px">
  381. 去下单
  382. </p>
  383. </van-col>
  384. <van-col span="5" v-if="item.stateString == '已拜访'" @click="Visit(item)">
  385. <img :src="bfxx" style="margin: 0 auto; width: 18px; display: block" />
  386. <p style="text-align: center; margin: 0; margin-top: 1px; font-size: 12px">
  387. 拜访信息
  388. </p>
  389. </van-col>
  390. <van-col span="5" @click="visitFn(item)">
  391. <img :src="kehuxinxi" style="margin: 0 auto; height: 18px; display: block" />
  392. <p style="text-align: center; margin: 0; margin-top: 1px; font-size: 12px">
  393. 客户信息
  394. </p>
  395. </van-col>
  396. <van-col span="5" v-if="item.joinInPaln && showKM" @click="storeJoinVisitv(item)">
  397. <img :src="jiarujihua" style="margin: 0 auto; height: 18px; display: block" />
  398. <p style="text-align: center; margin: 0; font-size: 12px">加入计划内</p>
  399. </van-col>
  400. </van-row>
  401. </div>
  402. </van-cell>
  403. <div class="lineGrey"></div>
  404. </div>
  405. </van-checkbox-group>
  406. <van-empty v-if="list.length == 0" />
  407. </van-list>
  408. <br />
  409. <br />
  410. <br />
  411. <br />
  412. <br />
  413. </div>
  414. <van-action-sheet
  415. v-model="showOutPopover"
  416. :actions="actions"
  417. @select="onSelect"
  418. cancel-text="取消"
  419. @cancel="showOutPopover = false" />
  420. <van-popup v-model="showPicker" position="bottom" class="textsize">
  421. <van-row
  422. style="
  423. position: fixed;
  424. top: 0;
  425. width: 100%;
  426. z-index: 998;
  427. background-color: #fff;
  428. border-bottom: 1px solid #ccc;
  429. ">
  430. <van-col span="3" style="text-align: center; margin: 14px 0" @click="showPicker = false">
  431. <van-icon name="cross" size="20" color="#909399" />
  432. </van-col>
  433. <van-col span="13"> </van-col>
  434. <van-col span="4" style="text-align: center; line-height: 36px" @click="onConfirm">
  435. <div style="color: #0057ba">
  436. <van-button type="info" size="small" color="#0057ba">筛选</van-button>
  437. </div></van-col
  438. >
  439. <van-col span="4" style="text-align: center; line-height: 36px" @click="onsets">
  440. <van-button type="default" size="small" style="height: 28px">重置</van-button>
  441. </van-col>
  442. </van-row>
  443. <div style="height: 48px; width: 100%"></div>
  444. <!-- <van-picker show-toolbar :columns="storeTypeLists" value-key="dictLabel" @confirm="onConfirm" @cancel="showPicker = false"/> -->
  445. <div class="searchcheck">
  446. <p class="searchchecktitle">&nbsp;经销商</p>
  447. <van-row>
  448. <van-col span="24">
  449. <div @click="moreTypeShowFn">
  450. <van-field
  451. style="
  452. margin-top: -6px;
  453. border-radius: 6px;
  454. border: 1px solid #ccc;
  455. overflow: hidden;
  456. "
  457. readonly
  458. v-model="chainName"
  459. label=""
  460. placeholder="请选择经销商" />
  461. </div>
  462. </van-col>
  463. <!-- <van-col span="4"><van-button type="default" native-type="button" @click="moreTypeShowclearableFn">清空</van-button></van-col>-->
  464. </van-row>
  465. <p class="searchchecktitle" @click="otherbqShow = !otherbqShow">
  466. &nbsp;门店标签<van-icon name="arrow-down" style="float: right" />
  467. </p>
  468. <van-checkbox-group v-model="storeLabelTypes" direction="horizontal">
  469. <div v-if="otherbqShow" style="width: 100%">
  470. <div class="checkbox" v-for="(item, index) in StoreLabels" :key="index">
  471. <div>
  472. <van-checkbox :name="item.dictValue">{{ item.dictLabel }}</van-checkbox>
  473. </div>
  474. </div>
  475. <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
  476. </div>
  477. </van-checkbox-group>
  478. <van-checkbox-group v-model="result" direction="horizontal">
  479. <p class="searchchecktitle" @click="otherkkdShow = !otherkkdShow">
  480. &nbsp;可控店<van-icon name="arrow-down" style="float: right" />
  481. </p>
  482. <div v-if="otherkkdShow">
  483. <div v-for="(item, index) in storeTypeLists" :key="index" class="checkbox1">
  484. <div v-if="item.groupType == 'kkd'" class="child">
  485. <van-checkbox :name="item.dictValue">{{ item.dictLabel }}</van-checkbox>
  486. </div>
  487. </div>
  488. </div>
  489. <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
  490. <p class="searchchecktitle" @click="otherfxdShow = !otherfxdShow">
  491. &nbsp;分销店<van-icon name="arrow-down" style="float: right" />
  492. </p>
  493. <div v-if="otherfxdShow" style="margin: 0 14px; width: 100%">
  494. <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
  495. <p class="searchchecktitle1" @click="otherfxdShow1 = !otherfxdShow1">
  496. 金牌店<van-icon name="arrow-down" style="float: right" />
  497. </p>
  498. <div v-if="otherfxdShow1">
  499. <div v-for="(item1, index1) in storeTypeLists" :key="200 + index1" class="checkbox1">
  500. <div v-if="item1.groupType == 'fxd' && item1.remark == 'jp'" class="child">
  501. <van-checkbox :name="item1.dictValue">{{ item1.dictLabel }}</van-checkbox>
  502. </div>
  503. </div>
  504. <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
  505. </div>
  506. <p class="searchchecktitle1" @click="otherfxdShow2 = !otherfxdShow2">
  507. 同城分销店<van-icon name="arrow-down" style="float: right" />
  508. </p>
  509. <div v-if="otherfxdShow2">
  510. <div
  511. v-for="(itemlj, indexlj) in storeTypeLists"
  512. :key="400 + indexlj"
  513. class="checkbox1">
  514. <div v-if="itemlj.groupType == 'fxd' && itemlj.remark == 'tcfx'" class="child">
  515. <van-checkbox :name="itemlj.dictValue">{{ itemlj.dictLabel }}</van-checkbox>
  516. </div>
  517. </div>
  518. <div style="clear: both"></div>
  519. </div>
  520. </div>
  521. <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
  522. <p class="searchchecktitle" @click="otherShow = !otherShow">
  523. &nbsp;其他 <van-icon name="arrow-down" style="float: right" />
  524. </p>
  525. <div v-if="otherShow">
  526. <div v-for="(item2, index2) in storeTypeLists" :key="100 + index2" class="checkbox1">
  527. <div v-if="item2.groupType == 'other'" class="child">
  528. <van-checkbox :name="item2.dictValue">{{ item2.dictLabel }}</van-checkbox>
  529. </div>
  530. </div>
  531. </div>
  532. </van-checkbox-group>
  533. </div>
  534. </van-popup>
  535. <van-popup v-model="moreTypeShow" position="bottom" style="height: 80%">
  536. <van-row style="background-color: #f5f5f5">
  537. <van-col span="20">
  538. <van-field
  539. left-icon="search"
  540. style="margin-top: 2px; border-radius: 6px; overflow: hidden"
  541. v-model="CustomerName"
  542. label=""
  543. placeholder="请输入关键词"
  544. clearable />
  545. </van-col>
  546. <van-col span="4" style="text-align: center; line-height: 48px" @click="getCustomer">
  547. <div style="background-color: #0057ba; color: #fff">搜索</div></van-col
  548. >
  549. </van-row>
  550. <van-picker
  551. show-toolbar
  552. :columns="chainsData"
  553. value-key="chainName"
  554. @confirm="onConfirmChainsList"
  555. @cancel="moreTypeShow = false"
  556. visible-item-count="10" />
  557. </van-popup>
  558. <div class="positionContent" @click="rangeStoreFn()">
  559. <van-icon class="img" :name="mpimg" size="50" />
  560. </div>
  561. </div>
  562. </template>
  563. <script>
  564. import {
  565. stopVisit,
  566. checkVisit,
  567. addVisitsPosition,
  568. mobileReposition,
  569. getStoreyslTypeList,
  570. getStoreTypeListlp,
  571. joinInPlan,
  572. getStoreLabels,
  573. getCustomerList,
  574. buryingPoint,
  575. ProductItemImge,
  576. getStoreGroupCategory,
  577. } from '@/api/index';
  578. import times from '@/assets/Icon/times.png';
  579. import order60 from '@/assets/order60.png';
  580. import targetOne from '@/assets/targetOne.png';
  581. import Network from '@/assets/Network.png';
  582. import ordernum from '@/assets/ordernum.png';
  583. import ord from '@/assets/ord.png';
  584. import timeico from '@/assets/Icon/datatims.png';
  585. import location from '@/assets/location.png';
  586. import paste from '@/assets/paste.png';
  587. import visitTimes from '@/assets/visitTimes.png';
  588. import mpimg from '@/assets/mpimg.png';
  589. import axios from 'axios';
  590. import mapmarker from '@/components/mapMarkerDouble';
  591. import order from '@/assets/order.png';
  592. import nocj from '@/assets/nocj.png';
  593. import request from '@/utils/request';
  594. import call from '@/assets/call.png';
  595. import jiarujihua from '@/assets/jiarujihua.png';
  596. import kehuxinxi from '@/assets/kehuxinxi-2.png';
  597. import xiadan from '@/assets/xiadan.png';
  598. import yichang from '@/assets/yichang.png';
  599. import bfxx from '@/assets/bfxx.png';
  600. import xmgj from '@/assets/xmgj.png';
  601. import { getOrderUrlByStoreId, topjoinInPlan, topStore } from '@/api/inventory';
  602. import { parseTime } from '@/utils';
  603. import { checkStoreAddressByStoreCode } from '@/api/visitstore';
  604. import sbpmdh from '@/assets/sbpmdh.png';
  605. import { getPosition, getTicketFun } from '@/utils/TXApiFun';
  606. export default {
  607. name: 'outsidelist',
  608. components: { mapmarker },
  609. data() {
  610. return {
  611. xmgj: xmgj,
  612. bfxx: bfxx,
  613. times: times,
  614. searchShows: false,
  615. paste: paste,
  616. visitTimess: visitTimes,
  617. typeShow: false,
  618. mpimg: mpimg,
  619. order: order,
  620. mapShow: false,
  621. yichang: yichang,
  622. xiadan: xiadan,
  623. kehuxinxi: kehuxinxi,
  624. jiarujihua: jiarujihua,
  625. call: call,
  626. otherShow: false,
  627. Network: Network,
  628. order60: order60,
  629. targetOne: targetOne,
  630. chainName: '',
  631. chainCode: '',
  632. activeNames: '1',
  633. showPopover: false,
  634. moreTypeShow: false,
  635. showPopoverVNUM: [],
  636. showPopoverC: [],
  637. showPopoverZ: [],
  638. zyssl: [],
  639. chtczj: [],
  640. noVisit: [],
  641. noOrder: [],
  642. fxNoOrder: [],
  643. storeLabelTypes: [],
  644. // showPopover:false,
  645. location: location,
  646. timeico: timeico,
  647. nocj: nocj,
  648. disabled: false,
  649. timer: null,
  650. flag: true,
  651. show: false,
  652. tabVal: '0',
  653. list: [],
  654. cont: 0,
  655. loading: false,
  656. showPicker: false,
  657. finished: false,
  658. otherbqShow: true,
  659. otherkkdShow: true,
  660. otherfxdShow: true,
  661. typeName: '搜索',
  662. visitEndId: '',
  663. pageSize: 12,
  664. pageNum: 1,
  665. listActive: null,
  666. query: '',
  667. storeName: '',
  668. genDate: '',
  669. storeType: '',
  670. endShow: false,
  671. storeCategory: '',
  672. fromValue: {},
  673. storeTypeList: [],
  674. storeTypeLists: [],
  675. chainsData: [],
  676. serachstype: '',
  677. timeData: '',
  678. addShow1: false,
  679. storeCategoryList: '',
  680. result: [],
  681. StoreLabels: [],
  682. CustomerName: '',
  683. lat: '',
  684. lon: '',
  685. cstype: 0,
  686. title: '计划外',
  687. value1: 'b',
  688. value2: '',
  689. showKM: true,
  690. value3: '',
  691. showOutPopover: false,
  692. actions: [
  693. { name: '周一', id: 1 },
  694. { name: '周二', id: 2 },
  695. { name: '周三', id: 3 },
  696. { name: '周四', id: 4 },
  697. { name: '周五', id: 5 },
  698. { name: '周六', id: 6 },
  699. { name: '周日', id: 7 },
  700. ],
  701. option1: [
  702. { text: '门店销量', value: 'a' },
  703. { text: '门店销量倒序', value: 'b' },
  704. { text: '门店销量正序', value: 'c' },
  705. ],
  706. option2: [
  707. { text: '拜访时间', value: '' },
  708. { text: '拜访时间倒序', value: 'b' },
  709. { text: '拜访时间正序', value: 'c' },
  710. ],
  711. option3: [
  712. { text: '下单时间', value: '' },
  713. { text: '下单时间倒序', value: 'b' },
  714. { text: '下单时间正序', value: 'c' },
  715. ],
  716. radio: [],
  717. sortParam: 'sales',
  718. sortType: 'desc',
  719. storeIds: '',
  720. Jointype: 1,
  721. showAll: false,
  722. ordernum: ordernum,
  723. ord: ord,
  724. customerVisits: true,
  725. otherfxdShow1: true,
  726. otherfxdShow2: true,
  727. };
  728. },
  729. watch: {
  730. $route(to, from) {
  731. if (
  732. (from.path == '/storeDetail' && to.path == '/topStore') ||
  733. (from.path == '/storeGroup' && to.path == '/topStore') ||
  734. (from.path == '/suishenbangOutstoreVisit' && to.path == '/topStore') ||
  735. (from.path == '/outabnormalVisit' && to.path == '/topStore') ||
  736. (from.path == '/home' && to.path == '/topStore') ||
  737. (from.path == '/deviceWithin/index' && to.path == '/topStore') ||
  738. (from.path == '/AI/index' && to.path == '/topStore') ||
  739. (from.path == '/storemanagement/index' && to.path == '/topStore') ||
  740. (from.path == '/My/index' && to.path == '/topStore')
  741. ) {
  742. this.lat = '';
  743. this.onSearch();
  744. var week = new Date().getDay();
  745. if (week > 0 && week < 6) {
  746. this.actions[week - 1].name = '今天';
  747. }
  748. this.radio = [];
  749. // setTimeout(()=>{
  750. // this.onSearch()
  751. // },1000)
  752. }
  753. this.value1 = 'b';
  754. this.value2 = '';
  755. this.value3 = '';
  756. this.storeName = localStorage.getItem('outvstoreName');
  757. this.chainName = localStorage.getItem('outvchainName');
  758. if (localStorage.getItem('outvstoreLabelTypes') != null) {
  759. this.storeLabelTypes = localStorage.getItem('outvstoreLabelTypes').split(',');
  760. } else {
  761. this.storeLabelTypes = [];
  762. }
  763. if (localStorage.getItem('outvstoreCategoryList') != null) {
  764. this.result = localStorage.getItem('outvstoreCategoryList').split(',');
  765. this.storeCategoryList = this.result.join(',');
  766. } else {
  767. this.result = [];
  768. this.storeCategoryList = this.result.join(',');
  769. }
  770. this.chainCode = localStorage.getItem('outvchainCode');
  771. this.storeName = localStorage.getItem('outvstoreName');
  772. this.sortType = localStorage.getItem('outvstoreName');
  773. this.sortParam = localStorage.getItem('outvstoreName');
  774. if (this.sortParam != '') {
  775. if (this.sortParam == 'sales') {
  776. if (this.sortType == 'desc') {
  777. this.value1 = 'b';
  778. }
  779. if (this.sortType == 'asc') {
  780. this.value1 = 'c';
  781. }
  782. }
  783. if (this.sortParam == 'visitTime') {
  784. this.value1 = '';
  785. if (this.sortType == 'desc') {
  786. this.value2 = 'b';
  787. }
  788. if (this.sortType == 'asc') {
  789. this.value2 = 'c';
  790. }
  791. }
  792. if (this.sortParam == 'orderTime') {
  793. this.value1 = '';
  794. if (this.sortType == 'desc') {
  795. this.value3 = 'b';
  796. }
  797. if (this.sortType == 'asc') {
  798. this.value3 = 'c';
  799. }
  800. }
  801. }
  802. var postType = localStorage.getItem('postType');
  803. if (postType == 'GZ') {
  804. this.addShow1 = false;
  805. this.otherShow = true;
  806. } else {
  807. this.addShow1 = true;
  808. this.otherShow = false;
  809. }
  810. },
  811. },
  812. created() {
  813. this.value1 = 'b';
  814. this.value2 = '';
  815. this.value3 = '';
  816. this.storeName = localStorage.getItem('outvstoreName');
  817. this.chainName = localStorage.getItem('outvchainName');
  818. if (localStorage.getItem('outvstoreLabelTypes') != null) {
  819. this.storeLabelTypes = localStorage.getItem('outvstoreLabelTypes').split(',');
  820. } else {
  821. this.storeLabelTypes = [];
  822. }
  823. if (localStorage.getItem('outvstoreCategoryList') != null) {
  824. this.result = localStorage.getItem('outvstoreCategoryList').split(',');
  825. this.storeCategoryList = this.result.join(',');
  826. } else {
  827. this.result = [];
  828. this.storeCategoryList = this.result.join(',');
  829. }
  830. this.chainCode = localStorage.getItem('outvchainCode');
  831. this.storeName = localStorage.getItem('outvstoreName');
  832. this.sortType = localStorage.getItem('outvstoreName');
  833. this.sortParam = localStorage.getItem('outvstoreName');
  834. if (this.sortParam != '') {
  835. if (this.sortParam == 'sales') {
  836. if (this.sortType == 'desc') {
  837. this.value1 = 'b';
  838. }
  839. if (this.sortType == 'asc') {
  840. this.value1 = 'c';
  841. }
  842. }
  843. if (this.sortParam == 'visitTime') {
  844. this.value1 = '';
  845. if (this.sortType == 'desc') {
  846. this.value2 = 'b';
  847. }
  848. if (this.sortType == 'asc') {
  849. this.value2 = 'c';
  850. }
  851. }
  852. if (this.sortParam == 'orderTime') {
  853. this.value1 = '';
  854. if (this.sortType == 'desc') {
  855. this.value3 = 'b';
  856. }
  857. if (this.sortType == 'asc') {
  858. this.value3 = 'c';
  859. }
  860. }
  861. }
  862. if (localStorage.getItem('tabVal') == null || this.$route.query.info != 'y') {
  863. this.tabVal = '0';
  864. } else {
  865. this.tabVal = localStorage.getItem('tabVal');
  866. }
  867. this.cstype = this.$route.query.type;
  868. this.query = this.$route.query;
  869. localStorage.removeItem('visitId');
  870. this.getStoreTypeList();
  871. this.getStoreLabels();
  872. this.lat = '';
  873. var postType = localStorage.getItem('postType');
  874. if (postType == 'GZ') {
  875. this.addShow1 = false;
  876. this.otherShow = true;
  877. } else {
  878. this.addShow1 = true;
  879. this.otherShow = false;
  880. }
  881. var week = new Date().getDay();
  882. if (week > 0 && week < 6) {
  883. this.actions[week - 1].name = '今天';
  884. }
  885. this.radio = [];
  886. this.onSearch();
  887. this.getMonth();
  888. },
  889. methods: {
  890. linkapp(val) {
  891. var poind = this.gcj02BD(val.lat, val.lon);
  892. let url = window.location.href;
  893. let that = this;
  894. let wx = this.wx;
  895. let qiyeData;
  896. const instance = axios.create();
  897. instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
  898. instance
  899. .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
  900. params: {
  901. url: url,
  902. agent: 1,
  903. },
  904. })
  905. .then((response) => {
  906. if (response.status == 200) {
  907. qiyeData = response.data.data;
  908. wx.agentConfig({
  909. corpid: qiyeData.appId, // 必填,企业微信的corpid,必须与当前登录的企业一致
  910. agentid: qiyeData.agentId, // 必填,企业微信的应用id (e.g. 1000247)
  911. timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
  912. nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
  913. signature: qiyeData.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
  914. jsApiList: ['launchMiniprogram'], //必填,传入需要使用的接口名称
  915. success: function (res) {
  916. wx.invoke(
  917. 'launchMiniprogram',
  918. {
  919. appid: 'wx238bbb5f6d958414',
  920. path:
  921. 'pages/relayStation/relayStation?latitude=' +
  922. poind.lat +
  923. '&longitude=' +
  924. poind.lon +
  925. '&name=' +
  926. val.addressLine,
  927. },
  928. function (res) {
  929. if (res.err_msg == 'launchMiniprogram:ok') {
  930. } else {
  931. }
  932. }
  933. );
  934. },
  935. fail: function (res) {
  936. if (res.errMsg.indexOf('function not exist') > -1) {
  937. alert('版本过低请升级');
  938. }
  939. },
  940. });
  941. }
  942. });
  943. },
  944. clearFn() {
  945. this.storeName = '';
  946. localStorage.setItem('outvstoreName', '');
  947. },
  948. orderFn(val) {
  949. getOrderUrlByStoreId({
  950. storeId: val.storeId,
  951. from: 'topStore',
  952. }).then((res) => {
  953. if (res.code == 200 && res.data) {
  954. window.location.href = res.data;
  955. } else {
  956. this.Toast({
  957. message: res.msg,
  958. duration: 5000,
  959. });
  960. }
  961. });
  962. },
  963. linkList(val) {
  964. this.$router.push({
  965. path: '/pItem',
  966. query: { id: val.storeCode, detilId: 'a' },
  967. });
  968. },
  969. linkimg(val) {
  970. ProductItemImge({ storeId: val.storeId }).then((response) => {
  971. if (response.code == 200) {
  972. if (response.data != undefined) {
  973. window.open(response.data);
  974. } else {
  975. this.$toast(response.msg);
  976. }
  977. }
  978. });
  979. },
  980. getMonth() {
  981. // 获取当前日期
  982. var currentDate = new Date();
  983. // 获取当前月份
  984. var currentMonth = currentDate.getMonth();
  985. // 获取当前年份
  986. // var currentYear = currentDate.getFullYear();
  987. var previousMonthDate1 = new Date();
  988. if (currentDate.getDate() == 1) {
  989. previousMonthDate1.setMonth(currentMonth - 1);
  990. } else {
  991. }
  992. var previousMonth1 = previousMonthDate1.getMonth();
  993. var previousYear1 = previousMonthDate1.getFullYear();
  994. // 计算前三个月的年份和月份
  995. var previousMonthDate = new Date();
  996. if (currentDate.getDate() == 1) {
  997. previousMonthDate.setMonth(currentMonth - 3);
  998. } else {
  999. previousMonthDate.setMonth(currentMonth - 2);
  1000. }
  1001. 1;
  1002. var previousMonth = previousMonthDate.getMonth();
  1003. var previousYear = previousMonthDate.getFullYear();
  1004. //前三个月
  1005. if (previousYear1 == previousYear) {
  1006. var formattedPreviousMonth1 = previousYear1 + '-' + (previousMonth1 + 1);
  1007. // 格式化年份和月份
  1008. var formattedPreviousMonth = previousYear + '-' + (previousMonth + 1);
  1009. this.timeData =
  1010. formattedPreviousMonth.split('-')[1] + '-' + formattedPreviousMonth1.split('-')[1] + '月';
  1011. } else {
  1012. var formattedPreviousMonth1 = previousYear1 + '年' + (previousMonth1 + 1) + '月';
  1013. // .toString().padStart(2, '0');
  1014. // 格式化年份和月份
  1015. var formattedPreviousMonth = previousYear + '年' + (previousMonth + 1) + '月';
  1016. this.timeData = formattedPreviousMonth + '-' + formattedPreviousMonth1;
  1017. }
  1018. },
  1019. jionAll() {
  1020. this.Jointype = 2;
  1021. this.showOutPopover = true;
  1022. },
  1023. storeJoinVisitv(val) {
  1024. this.storeIds = val.storeId;
  1025. this.Jointype = 1;
  1026. this.showOutPopover = true;
  1027. },
  1028. onClickLeft() {
  1029. this.$router.replace({ path: '/deviceWithin' });
  1030. },
  1031. onSelect(val) {
  1032. this.showOutPopover = false;
  1033. var storeIds = '';
  1034. if (this.Jointype == 1) {
  1035. storeIds = this.storeIds;
  1036. } else {
  1037. if (this.radio.length > 0) {
  1038. storeIds = this.radio.join(',');
  1039. } else {
  1040. var storeIdsss = [];
  1041. for (var i = 0; i < this.list.length; i++) {
  1042. if (this.list[i].joinInPaln) {
  1043. storeIdsss.push(this.list[i].storeId);
  1044. }
  1045. }
  1046. storeIds = storeIdsss.join(',');
  1047. }
  1048. }
  1049. topjoinInPlan({ storeIds: storeIds, date: val.id }).then((request) => {
  1050. if (request.code == 200) {
  1051. this.$toast.success('加入成功');
  1052. this.onSearch();
  1053. } else {
  1054. this.$toast(res.msg);
  1055. }
  1056. });
  1057. },
  1058. v1Fn(val) {
  1059. this.value3 = '';
  1060. this.value2 = '';
  1061. this.sortParam = 'sales';
  1062. if (val == 'b') {
  1063. this.sortType = 'desc';
  1064. } else {
  1065. this.sortType = 'asc';
  1066. }
  1067. this.onSearchm();
  1068. },
  1069. v2Fn(val) {
  1070. this.value1 = 'a';
  1071. this.value3 = '';
  1072. this.sortParam = 'visitTime';
  1073. if (val == 'b') {
  1074. this.sortType = 'desc';
  1075. } else {
  1076. this.sortType = 'asc';
  1077. }
  1078. this.onSearchm();
  1079. },
  1080. v3Fn(val) {
  1081. this.value1 = 'a';
  1082. this.value2 = '';
  1083. this.sortParam = 'orderTime';
  1084. if (val == 'b') {
  1085. this.sortType = 'desc';
  1086. } else {
  1087. this.sortType = 'asc';
  1088. }
  1089. this.onSearchm();
  1090. },
  1091. // value1
  1092. moreTypeShowFn() {
  1093. this.moreTypeShow = true;
  1094. // this.CustomerName=""
  1095. // this.chainsData=[]
  1096. this.getCustomer();
  1097. },
  1098. buryingPoint(val) {
  1099. buryingPoint(val);
  1100. },
  1101. getCustomer() {
  1102. var name = '';
  1103. if (this.tabVal != 1) {
  1104. name = 'org';
  1105. } else {
  1106. name = 'my';
  1107. }
  1108. getCustomerList({ name: this.CustomerName, from: name }).then((request) => {
  1109. this.chainsData = request.data;
  1110. this.chainsData.push({});
  1111. this.chainsData.pop();
  1112. });
  1113. },
  1114. onConfirmChainsList(value) {
  1115. if (value.chainName != undefined) {
  1116. this.chainName = value.chainName;
  1117. this.chainCode = value.chainCode;
  1118. }
  1119. this.showPickerChainsList = false;
  1120. this.moreTypeShow = false;
  1121. },
  1122. getStoreLabels() {
  1123. getStoreLabels().then((res) => {
  1124. this.StoreLabels = res.data;
  1125. });
  1126. },
  1127. searchType(val) {
  1128. this.storeTypeLists = [];
  1129. if (val != '') {
  1130. let filterArr = this.storeTypeList.filter((item) => {
  1131. return item.dictLabel.toLowerCase().includes(val.toLowerCase());
  1132. });
  1133. this.storeTypeLists = filterArr;
  1134. } else {
  1135. this.storeTypeLists = this.storeTypeList;
  1136. }
  1137. },
  1138. onConfirm(value) {
  1139. this.storeCategoryList = this.result.join(',');
  1140. // this.typeName=value.dictLabel
  1141. this.showPicker = false;
  1142. this.onSearchm();
  1143. },
  1144. moreTypeShowclearableFn() {
  1145. this.chainName = '';
  1146. this.chainCode = '';
  1147. this.chainsData = [];
  1148. },
  1149. onsets() {
  1150. this.result = [];
  1151. this.zyssl = [];
  1152. this.chtczj = [];
  1153. this.noVisit = [];
  1154. this.noOrder = [];
  1155. this.fxNoOrder = [];
  1156. this.storeLabelTypes = [];
  1157. this.storeCategoryList = this.result.join(',');
  1158. this.chainName = '';
  1159. this.chainCode = '';
  1160. // this.typeName=value.dictLabel
  1161. this.onSearch();
  1162. },
  1163. getStoreTypeList() {
  1164. getStoreTypeListlp({}).then((res) => {
  1165. this.storeTypeLists = res.data;
  1166. this.storeTypeList = res.data;
  1167. });
  1168. },
  1169. // 范围
  1170. rangeStoreFn() {
  1171. getPosition()
  1172. .then((res) => {
  1173. let { TXisBD } = res;
  1174. this.lat = TXisBD.lat;
  1175. this.lon = TXisBD.lon;
  1176. this.buryingPoint({
  1177. systemModel: '高销额门店推荐',
  1178. buryingPointType: 3,
  1179. buryingPointValue: '进入地图',
  1180. buryingPointName: '高销额门店推荐',
  1181. buryingPointPosition: '进入地图',
  1182. });
  1183. this.$router.push({
  1184. path: '/rangeStore',
  1185. query: {
  1186. lat: '',
  1187. lon: '',
  1188. tabVal: 6,
  1189. },
  1190. });
  1191. })
  1192. .catch((error) => {
  1193. this.$dialog.alert({
  1194. message: error,
  1195. });
  1196. });
  1197. // let loading1 = this.$toast.loading({
  1198. // duration: 0,
  1199. // message: '加载中...',
  1200. // forbidClick: true,
  1201. // });
  1202. // let url = window.location.href;
  1203. // let wx = this.wx;
  1204. // var that = this;
  1205. // let qiyeData;
  1206. // const instance = axios.create();
  1207. // instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
  1208. // instance
  1209. // .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
  1210. // params: {
  1211. // url: url,
  1212. // },
  1213. // })
  1214. // .then((response) => {
  1215. // if (response.status == 200) {
  1216. // this.cont = 3;
  1217. // var flat = true;
  1218. // var times = setInterval(() => {
  1219. // this.cont--;
  1220. // if (this.cont == '0') {
  1221. // if (flat) {
  1222. // loading1.clear();
  1223. // clearInterval(times);
  1224. // that.$dialog
  1225. // .alert({
  1226. // message: '定位失败,请开启企微定位权限',
  1227. // })
  1228. // .then(() => {});
  1229. // } else {
  1230. // clearInterval(times);
  1231. // }
  1232. // }
  1233. // }, 1000);
  1234. // qiyeData = response.data.data;
  1235. // wx.config({
  1236. // beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
  1237. // debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  1238. // appId: qiyeData.appId, // 必填,企业微信的corpID
  1239. // timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
  1240. // nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
  1241. // signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
  1242. // jsApiList: ['ready', 'getLocation'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
  1243. // });
  1244. // wx.ready(function () {
  1245. // wx.getLocation({
  1246. // type: 'gcj02',
  1247. // success: function (res) {
  1248. // flat = false;
  1249. // loading1.clear();
  1250. // that.buryingPoint({
  1251. // systemModel: '高销额门店推荐',
  1252. // buryingPointType: 3,
  1253. // buryingPointValue: '进入地图',
  1254. // buryingPointName: '高销额门店推荐',
  1255. // buryingPointPosition: '进入地图',
  1256. // });
  1257. // that.$router.push({
  1258. // path: '/rangeStore',
  1259. // query: {
  1260. // lat: '',
  1261. // lon: '',
  1262. // tabVal: 6,
  1263. // },
  1264. // });
  1265. // },
  1266. // fail: function () {
  1267. // loading1.clear();
  1268. // that.$dialog.alert({
  1269. // message: 'GPS未开启',
  1270. // });
  1271. // },
  1272. // });
  1273. // });
  1274. // wx.error(function (res) {
  1275. // loading1.clear();
  1276. // that.$dialog
  1277. // .alert({
  1278. // message: '定位失败,请开启企微定位权限',
  1279. // })
  1280. // .then(() => {});
  1281. // });
  1282. // }
  1283. // });
  1284. },
  1285. //取消搜索
  1286. cancelSearch() {
  1287. this.$refs.item.toggle();
  1288. },
  1289. storeJoinVisit(val) {
  1290. joinInPlan({ storeId: val.storeId }).then((res) => {
  1291. if (res.code == 200) {
  1292. this.onSearch();
  1293. } else {
  1294. this.$dialog.alert({
  1295. title: '系统提示',
  1296. message: res.msg,
  1297. });
  1298. }
  1299. });
  1300. },
  1301. searchFn() {
  1302. this.showPicker = true;
  1303. this.CustomerName = '';
  1304. },
  1305. moreSearch() {
  1306. this.onSearch();
  1307. this.$refs.item.toggle();
  1308. },
  1309. getUserOutPlaList() {
  1310. this.storeType = localStorage.getItem('storeType');
  1311. this.customerVisits = localStorage.getItem('customerVisits');
  1312. var that = this;
  1313. let loading3 = this.$toast.loading({
  1314. duration: 0,
  1315. message: '加载中...',
  1316. forbidClick: true,
  1317. });
  1318. this.endShow = false;
  1319. if (this.refreshing) {
  1320. this.list = [];
  1321. this.refreshing = false;
  1322. }
  1323. topStore({
  1324. sortParam: this.sortParam,
  1325. sortType: this.sortType,
  1326. lat: that.lat,
  1327. lon: that.lon,
  1328. chainCode: this.chainCode,
  1329. storeLabelTypes: this.storeLabelTypes.join(','),
  1330. storeCategoryList: this.storeCategoryList,
  1331. storeName: this.storeName.trim(),
  1332. genDate: this.genDate,
  1333. }).then((res) => {
  1334. this.disabled = false;
  1335. if (res.code == 200) {
  1336. loading3.clear();
  1337. this.loading = false;
  1338. if (res.data.storeList != undefined) {
  1339. this.list = res.data.storeList;
  1340. this.showKM = res.data.coverUser;
  1341. this.list.forEach((item) => {
  1342. if (item.stateString.indexOf('拜访中') != -1) {
  1343. this.endShow = true;
  1344. this.visitEndId = item.visitId;
  1345. return;
  1346. }
  1347. });
  1348. res.data.storeList.forEach((item) => {
  1349. this.showPopoverVNUM.push({ showPopover: false });
  1350. this.showPopoverC.push({ showPopover: false });
  1351. this.showPopoverZ.push({ showPopover: false });
  1352. if (item.joinInPaln) {
  1353. this.showAll = true;
  1354. }
  1355. });
  1356. } else {
  1357. this.list = [];
  1358. }
  1359. } else {
  1360. this.$dialog.alert({
  1361. title: '系统提示',
  1362. message: res.msg,
  1363. });
  1364. }
  1365. });
  1366. },
  1367. storeVisit(val) {
  1368. localStorage.setItem('tabVal', this.tabVal);
  1369. localStorage.removeItem('visitId');
  1370. checkVisit({ storeId: val.storeId }).then((res) => {
  1371. this.buryingPoint({
  1372. systemModel: '高销额门店推荐',
  1373. buryingPointType: 1,
  1374. buryingPointValue: '进店拜访',
  1375. buryingPointName: '进店拜访',
  1376. buryingPointPosition: '高销额门店推荐',
  1377. });
  1378. if (res.code == 200 || val.stateString.indexOf('拜访中') != -1) {
  1379. if (localStorage.getItem('loginType') == 'cs') {
  1380. var lat = '';
  1381. var lon = '';
  1382. if (val.lat == '' || val.lat == null) {
  1383. lat = '31.2517820000';
  1384. lon = '120.5593090000';
  1385. } else {
  1386. lat = val.lat;
  1387. lon = val.lon;
  1388. }
  1389. this.$router.push({
  1390. path: '/suishenbangOutstoreVisit',
  1391. query: {
  1392. storeId: val.storeId,
  1393. rdId: val.rdId,
  1394. lat: lat,
  1395. lon: lon,
  1396. visitId: val.visitId,
  1397. pageType: 'out',
  1398. addressLine: val.addressLine,
  1399. storeCategory: val.storeCategory,
  1400. storeName: val.storeName,
  1401. hisTime: val.hisTime,
  1402. contactName: val.contactName,
  1403. storeCode: val.storeCode,
  1404. tabVal: this.tabVal,
  1405. visitModel: '1',
  1406. latNew: '31.2517820000',
  1407. lonNew: '120.5593090000',
  1408. PointSum: 0,
  1409. marklat: lat,
  1410. marklon: lon,
  1411. linkType: 6,
  1412. },
  1413. });
  1414. localStorage.setItem('startTime', new Date());
  1415. localStorage.setItem('ORGName', val.deptName);
  1416. localStorage.setItem('chainNameR', val.storeName);
  1417. } else {
  1418. if (this.flag) {
  1419. this.flag = false;
  1420. this.timer = null;
  1421. let that = this;
  1422. this.timer = setTimeout(() => {
  1423. this.flag = true;
  1424. }, 2000);
  1425. if (val.stateString.indexOf('拜访中') != -1 && val.visitSource == 1) {
  1426. localStorage.setItem('startTime', new Date());
  1427. localStorage.setItem('ORGName', val.deptName);
  1428. localStorage.setItem('chainNameR', val.storeName);
  1429. that.$router.push({
  1430. path: '/suishenbangOutstoreVisit',
  1431. query: {
  1432. storeId: val.storeId,
  1433. rdId: val.rdId,
  1434. lat: val.lat,
  1435. lon: val.lon,
  1436. visitId: val.visitId,
  1437. pageType: 'out',
  1438. addressLine: val.addressLine,
  1439. storeCategory: val.storeCategory,
  1440. storeName: val.storeName,
  1441. hisTime: val.hisTime,
  1442. contactName: val.contactName,
  1443. storeCode: val.storeCode,
  1444. tabVal: that.tabVal,
  1445. visitModel: '1',
  1446. latNew: val.lat,
  1447. lonNew: val.lon,
  1448. PointSum: '0',
  1449. marklat: val.lat,
  1450. marklon: val.lon,
  1451. linkType: 6,
  1452. },
  1453. });
  1454. } else {
  1455. getPosition()
  1456. .then((res) => {
  1457. let { TXisBD, resData } = res;
  1458. this.lat = TXisBD.lat;
  1459. this.lon = TXisBD.lon;
  1460. localStorage.setItem('lat', this.lat);
  1461. localStorage.setItem('lon', this.lon);
  1462. // var location = this.CJ02BD(res.latitude, res.longitude);
  1463. this.checkStoreAddressByStoreCodeFun(val, TXisBD, resData);
  1464. })
  1465. .catch((error) => {
  1466. this.$dialog.alert({
  1467. message: error,
  1468. });
  1469. });
  1470. // let loading1 = this.$toast.loading({
  1471. // duration: 0,
  1472. // message: '加载中...',
  1473. // forbidClick: true,
  1474. // });
  1475. // let url = window.location.href;
  1476. // let wx = this.wx;
  1477. // let qiyeData;
  1478. // const instance = axios.create();
  1479. // instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
  1480. // instance
  1481. // .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
  1482. // params: {
  1483. // url: url,
  1484. // },
  1485. // })
  1486. // .then((response) => {
  1487. // if (response.status == 200) {
  1488. // this.cont = 5;
  1489. // var flat = true;
  1490. // var times = setInterval(() => {
  1491. // this.cont--;
  1492. // if (this.cont == '0') {
  1493. // if (flat) {
  1494. // loading1.clear();
  1495. // clearInterval(times);
  1496. // that.$dialog
  1497. // .alert({
  1498. // message: '定位失败,请开启企微定位权限',
  1499. // })
  1500. // .then(() => {});
  1501. // } else {
  1502. // clearInterval(times);
  1503. // }
  1504. // }
  1505. // }, 1000);
  1506. // qiyeData = response.data.data;
  1507. // wx.config({
  1508. // beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
  1509. // debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  1510. // appId: qiyeData.appId, // 必填,企业微信的corpID
  1511. // timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
  1512. // nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
  1513. // signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
  1514. // jsApiList: ['ready', 'getLocation'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
  1515. // });
  1516. // wx.ready(() => {
  1517. // wx.getLocation({
  1518. // type: 'gcj02',
  1519. // success: (res) => {
  1520. // flat = false;
  1521. // // loading1.clear();
  1522. // var location = that.CJ02BD(res.latitude, res.longitude);
  1523. // checkStoreAddressByStoreCode({
  1524. // storeCode: val.storeCode,
  1525. // lon: location.lon,
  1526. // lat: location.lat,
  1527. // }).then((response) => {
  1528. // loading1.clear();
  1529. // if (val.lat == '' || val.lat == null) {
  1530. // this.lat = location.lat;
  1531. // this.lon = location.lon;
  1532. // } else {
  1533. // this.lat = val.lat;
  1534. // this.lon = val.lon;
  1535. // }
  1536. // let PointSum = this.twoPointSum(
  1537. // this.lat,
  1538. // this.lon,
  1539. // location.lat,
  1540. // location.lon
  1541. // ).toFixed(2);
  1542. // let PointSumval = this.twoPointSum(
  1543. // location.lat,
  1544. // location.lon,
  1545. // location.lat,
  1546. // location.lon
  1547. // ).toFixed(2);
  1548. // // GZ:工装店铺 直接进入拜访
  1549. // if (localStorage.getItem('postType') == 'GZ') {
  1550. // localStorage.setItem('startTime', new Date());
  1551. // localStorage.setItem('ORGName', val.deptName);
  1552. // localStorage.setItem('chainNameR', val.storeName);
  1553. // this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
  1554. // return;
  1555. // }
  1556. // // 门店编码校验门店地址不通过
  1557. // if (response.code != 200) {
  1558. // // updateAddress : ,1:同城AB+金牌,去修改地址;2:非金牌店铺,非同城店铺偏差过大不允许拜访,可以重置定位;0非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访
  1559. // if (response.data.updateAddress == 0) {
  1560. // // 非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访
  1561. // this.$dialog
  1562. // .confirm({
  1563. // confirmButtonText: '确定拜访',
  1564. // cancelButtonText: '取消拜访',
  1565. // title: '系统提示',
  1566. // message:
  1567. // '该客户没有经纬度,此次拜访会保存定位点作为客户经纬度,下次拜访时判断是否偏差过大。',
  1568. // closeOnClickOverlay: true,
  1569. // })
  1570. // .then(() => {
  1571. // this.toSuishenbangOutstoreVisit(
  1572. // res,
  1573. // val,
  1574. // location,
  1575. // PointSumval
  1576. // );
  1577. // });
  1578. // } else if (response.data.updateAddress == 1) {
  1579. // // 同城AB+金牌,去修改地址
  1580. // // addressUpdateTimesOver: true=已经达到最大次数,不让修改; false=没有达到可以修改
  1581. // if (!response.data.addressUpdateTimesOver) {
  1582. // this.$dialog
  1583. // .confirm({
  1584. // title: '系统提示',
  1585. // message: response.msg + '请立即修改后再拜访',
  1586. // messageAlign: 'left',
  1587. // confirmButtonText: '立即修改',
  1588. // cancelButtonText: '取消',
  1589. // })
  1590. // .then(() => {
  1591. // this.$router.push({
  1592. // path: '/storeDetail',
  1593. // query: {
  1594. // id: val.storeId,
  1595. // type: 'address',
  1596. // storeAddressId: val.storeAddressId,
  1597. // },
  1598. // });
  1599. // });
  1600. // } else {
  1601. // this.$dialog.confirm({
  1602. // title: '系统提示',
  1603. // message: '已经达到最大修改次数',
  1604. // messageAlign: 'left',
  1605. // confirmButtonText: '确定',
  1606. // });
  1607. // }
  1608. // } else if (response.data.updateAddress == 2) {
  1609. // // 1.非金牌店铺,非同城店铺 位置偏差过大 重置经纬度
  1610. // this.resetCoord(res, val, location, PointSumval);
  1611. // return;
  1612. // }
  1613. // } else {
  1614. // // 门店编码校验门店地址通过 进入拜访
  1615. // this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
  1616. // }
  1617. // });
  1618. // },
  1619. // fail: function () {
  1620. // loading1.clear();
  1621. // that.$dialog.alert({
  1622. // message: 'GPS未开启',
  1623. // });
  1624. // },
  1625. // });
  1626. // });
  1627. // wx.error(function (error) {
  1628. // loading1.clear();
  1629. // that.$dialog
  1630. // .alert({
  1631. // message: '定位失败,请开启企微定位权限',
  1632. // })
  1633. // .then(() => {});
  1634. // });
  1635. // }
  1636. // });
  1637. }
  1638. }
  1639. }
  1640. } else {
  1641. this.$dialog.alert({
  1642. title: '系统提示',
  1643. message: res.msg,
  1644. });
  1645. }
  1646. });
  1647. },
  1648. checkStoreAddressByStoreCodeFun(val, location, res) {
  1649. checkStoreAddressByStoreCode({
  1650. storeCode: val.storeCode,
  1651. lon: location.lon,
  1652. lat: location.lat,
  1653. }).then((response) => {
  1654. // loading1.clear();
  1655. if (val.lat == '' || val.lat == null) {
  1656. this.lat = location.lat;
  1657. this.lon = location.lon;
  1658. } else {
  1659. this.lat = val.lat;
  1660. this.lon = val.lon;
  1661. }
  1662. // let PointSum = this.twoPointSum(this.lat, this.lon, location.lat, location.lon).toFixed(2);
  1663. let PointSumval = this.twoPointSum(
  1664. location.lat,
  1665. location.lon,
  1666. location.lat,
  1667. location.lon
  1668. ).toFixed(2);
  1669. // GZ:工装店铺 直接进入拜访
  1670. if (localStorage.getItem('postType') == 'GZ') {
  1671. localStorage.setItem('startTime', new Date());
  1672. localStorage.setItem('ORGName', val.deptName);
  1673. localStorage.setItem('chainNameR', val.storeName);
  1674. this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
  1675. return;
  1676. }
  1677. // 门店校验 地址不通过
  1678. if (response.code != 200) {
  1679. // updateAddress : ,1:同城AB+金牌,去修改地址;2:非金牌店铺,非同城店铺偏差过大不允许拜访,可以重置定位;0非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访
  1680. if (response.data.updateAddress == 0) {
  1681. // 非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访
  1682. this.$dialog
  1683. .confirm({
  1684. confirmButtonText: '确定拜访',
  1685. cancelButtonText: '取消拜访',
  1686. title: '系统提示',
  1687. message:
  1688. '该客户没有经纬度,此次拜访会保存定位点作为客户经纬度,下次拜访时判断是否偏差过大。',
  1689. closeOnClickOverlay: true,
  1690. })
  1691. .then(() => {
  1692. this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
  1693. });
  1694. } else if (response.data.updateAddress == 1) {
  1695. // 同城AB+金牌,去修改地址
  1696. // addressUpdateTimesOver: true=已经达到最大次数,不让修改; false=没有达到可以修改
  1697. if (!response.data.addressUpdateTimesOver) {
  1698. this.$dialog
  1699. .confirm({
  1700. title: '系统提示',
  1701. message: response.msg + '请立即修改后再拜访',
  1702. messageAlign: 'left',
  1703. confirmButtonText: '立即修改',
  1704. cancelButtonText: '取消',
  1705. })
  1706. .then(() => {
  1707. this.$router.push({
  1708. path: '/storeDetail',
  1709. query: {
  1710. id: val.storeId,
  1711. type: 'address',
  1712. storeAddressId: val.storeAddressId,
  1713. },
  1714. });
  1715. });
  1716. } else {
  1717. this.$dialog.confirm({
  1718. title: '系统提示',
  1719. message: '已经达到最大修改次数',
  1720. messageAlign: 'left',
  1721. confirmButtonText: '确定',
  1722. });
  1723. }
  1724. } else if (response.data.updateAddress == 2) {
  1725. // 1.非金牌店铺,非同城店铺 位置偏差过大 重置经纬度
  1726. this.resetCoord(res, val, location, PointSumval);
  1727. return;
  1728. }
  1729. } else {
  1730. // 门店编码校验门店地址通过 进入拜访
  1731. this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
  1732. }
  1733. });
  1734. },
  1735. // 重置经纬度
  1736. resetCoord(res, val, location, PointSumval) {
  1737. this.$dialog
  1738. .confirm({
  1739. confirmButtonText: '初始化定位',
  1740. cancelButtonText: '取消拜访',
  1741. title: '系统提示',
  1742. message: '偏差过大,不允许拜访。可修改本店定位.',
  1743. closeOnClickOverlay: true,
  1744. })
  1745. .then(() => {
  1746. mobileReposition({
  1747. storeId: val.storeId,
  1748. lat: location.lat,
  1749. lon: location.lon,
  1750. }).then((res) => {
  1751. if (res.code == 200) {
  1752. this.$dialog
  1753. .alert({
  1754. title: '系统提示',
  1755. message: '本信息定位已更新成功!',
  1756. })
  1757. .then(() => {
  1758. this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
  1759. });
  1760. localStorage.setItem('startTime', new Date());
  1761. localStorage.setItem('ORGName', val.deptName);
  1762. localStorage.setItem('chainNameR', val.storeName);
  1763. } else {
  1764. this.$toast(res.msg);
  1765. }
  1766. });
  1767. });
  1768. },
  1769. // 进入拜访 router.push
  1770. toSuishenbangOutstoreVisit(res, val, location, PointSumval) {
  1771. addVisitsPosition({
  1772. storeId: val.storeId,
  1773. visitsId: '',
  1774. lon: res.longitude,
  1775. lat: res.latitude,
  1776. sourceLon: location.lon,
  1777. sourceLat: location.lat,
  1778. positionDesc: '',
  1779. accuracy: res.accuracy,
  1780. });
  1781. this.$router.push({
  1782. path: '/suishenbangOutstoreVisit',
  1783. query: {
  1784. storeId: val.storeId,
  1785. rdId: val.rdId,
  1786. lat: location.lat,
  1787. lon: location.lon,
  1788. visitId: val.visitId,
  1789. pageType: 'out',
  1790. addressLine: val.addressLine,
  1791. storeCategory: val.storeCategory,
  1792. storeName: val.storeName,
  1793. hisTime: val.hisTime,
  1794. contactName: val.contactName,
  1795. storeCode: val.storeCode,
  1796. tabVal: this.tabVal,
  1797. visitModel: '1',
  1798. latNew: location.lat,
  1799. lonNew: location.lon,
  1800. PointSum: PointSumval,
  1801. marklat: res.latitude,
  1802. marklon: res.longitude,
  1803. },
  1804. });
  1805. },
  1806. projectOutVisit(val) {
  1807. localStorage.setItem('tabVal', this.tabVal);
  1808. localStorage.removeItem('visitId');
  1809. // checkVisit({storeId:val.storeId}).then(res=>{
  1810. // if(res.code==200||val.stateString.indexOf("拜访中")!=-1){
  1811. if (localStorage.getItem('loginType') == 'cs') {
  1812. var lat = '';
  1813. var lon = '';
  1814. if (val.lat == '' || val.lat == null) {
  1815. lat = '31.2517820000';
  1816. lon = '120.5593090000';
  1817. } else {
  1818. lat = val.lat;
  1819. lon = val.lon;
  1820. }
  1821. this.$router.push({
  1822. path: '/storeGroup',
  1823. query: {
  1824. storeId: val.storeId,
  1825. rdId: val.rdId,
  1826. lat: lat,
  1827. lon: lon,
  1828. visitId: val.visitId,
  1829. pageType: 'out',
  1830. addressLine: val.addressLine,
  1831. storeCategory: val.storeCategory,
  1832. storeName: val.storeName,
  1833. hisTime: val.hisTime,
  1834. contactName: val.contactName,
  1835. storeCode: val.storeCode,
  1836. tabVal: this.tabVal,
  1837. visitModel: '1',
  1838. latNew: '31.2517820000',
  1839. lonNew: '120.5593090000',
  1840. PointSum: 0,
  1841. marklat: lat,
  1842. marklon: lon,
  1843. },
  1844. });
  1845. localStorage.setItem('startTime', new Date());
  1846. localStorage.setItem('ORGName', val.deptName);
  1847. localStorage.setItem('chainNameR', val.storeName);
  1848. } else {
  1849. if (this.flag) {
  1850. this.flag = false;
  1851. this.timer = null;
  1852. let that = this;
  1853. this.timer = setTimeout(() => {
  1854. this.flag = true;
  1855. }, 2000);
  1856. if (val.stateString.indexOf('拜访中') != -1 && val.visitSource == 1) {
  1857. localStorage.setItem('startTime', new Date());
  1858. localStorage.setItem('ORGName', val.deptName);
  1859. localStorage.setItem('chainNameR', val.storeName);
  1860. that.$router.push({
  1861. path: '/storeGroup',
  1862. query: {
  1863. storeId: val.storeId,
  1864. rdId: val.rdId,
  1865. lat: val.lat,
  1866. lon: val.lon,
  1867. visitId: val.visitId,
  1868. pageType: 'out',
  1869. addressLine: val.addressLine,
  1870. storeCategory: val.storeCategory,
  1871. storeName: val.storeName,
  1872. hisTime: val.hisTime,
  1873. contactName: val.contactName,
  1874. storeCode: val.storeCode,
  1875. tabVal: that.tabVal,
  1876. visitModel: '1',
  1877. latNew: val.lat,
  1878. lonNew: val.lon,
  1879. PointSum: '0',
  1880. marklat: val.lat,
  1881. marklon: val.lon,
  1882. },
  1883. });
  1884. } else {
  1885. let loading1 = this.$toast.loading({
  1886. duration: 0,
  1887. message: '加载中...',
  1888. forbidClick: true,
  1889. });
  1890. let url = window.location.href;
  1891. let wx = this.wx;
  1892. let qiyeData;
  1893. const instance = axios.create();
  1894. instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
  1895. instance
  1896. .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
  1897. params: {
  1898. url: url,
  1899. },
  1900. })
  1901. .then((response) => {
  1902. if (response.status == 200) {
  1903. this.cont = 3;
  1904. var flat = true;
  1905. var times = setInterval(() => {
  1906. this.cont--;
  1907. if (this.cont == '0') {
  1908. if (flat) {
  1909. loading1.clear();
  1910. clearInterval(times);
  1911. that.$dialog
  1912. .alert({
  1913. message: '定位失败,请开启企微定位权限',
  1914. })
  1915. .then(() => {});
  1916. } else {
  1917. clearInterval(times);
  1918. }
  1919. }
  1920. }, 1000);
  1921. qiyeData = response.data.data;
  1922. wx.config({
  1923. beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
  1924. debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  1925. appId: qiyeData.appId, // 必填,企业微信的corpID
  1926. timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
  1927. nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
  1928. signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
  1929. jsApiList: ['ready', 'getLocation'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
  1930. });
  1931. wx.ready(function () {
  1932. wx.getLocation({
  1933. type: 'gcj02',
  1934. success: function (res) {
  1935. flat = false;
  1936. loading1.clear();
  1937. var location = that.CJ02BD(res.latitude, res.longitude);
  1938. if (val.lat == '' || val.lat == null) {
  1939. that.lat = location.lat;
  1940. that.lon = location.lon;
  1941. } else {
  1942. that.lat = val.lat;
  1943. that.lon = val.lon;
  1944. }
  1945. let PointSum = that
  1946. .twoPointSum(that.lat, that.lon, location.lat, location.lon)
  1947. .toFixed(2);
  1948. if (val.lat == '' || val.lat == null) {
  1949. if (localStorage.getItem('postType') != 'GZ') {
  1950. that.$dialog
  1951. .confirm({
  1952. confirmButtonText: '确定拜访',
  1953. cancelButtonText: '取消拜访',
  1954. title: '系统提示',
  1955. message:
  1956. '该信息没有经纬度,此次拜访会保存定位点作为信息经纬度,下次拜访时判断是否偏差过大。',
  1957. closeOnClickOverlay: true,
  1958. })
  1959. .then(() => {
  1960. that.$router.push({
  1961. path: '/storeGroup',
  1962. query: {
  1963. storeId: val.storeId,
  1964. rdId: val.rdId,
  1965. lat: that.lat,
  1966. lon: that.lon,
  1967. visitId: val.visitId,
  1968. pageType: 'out',
  1969. addressLine: val.addressLine,
  1970. storeCategory: val.storeCategory,
  1971. storeName: val.storeName,
  1972. contactName: val.contactName,
  1973. hisTime: val.hisTime,
  1974. storeCode: val.storeCode,
  1975. tabVal: that.tabVal,
  1976. visitModel: '1',
  1977. latNew: location.lat,
  1978. lonNew: location.lon,
  1979. PointSum: PointSum,
  1980. marklat: res.latitude,
  1981. marklon: res.longitude,
  1982. },
  1983. });
  1984. });
  1985. } else {
  1986. that.$router.push({
  1987. path: '/storeGroup',
  1988. query: {
  1989. storeId: val.storeId,
  1990. rdId: val.rdId,
  1991. lat: that.lat,
  1992. lon: that.lon,
  1993. visitId: val.visitId,
  1994. pageType: 'out',
  1995. addressLine: val.addressLine,
  1996. storeCategory: val.storeCategory,
  1997. storeName: val.storeName,
  1998. contactName: val.contactName,
  1999. hisTime: val.hisTime,
  2000. storeCode: val.storeCode,
  2001. tabVal: that.tabVal,
  2002. visitModel: '1',
  2003. latNew: location.lat,
  2004. lonNew: location.lon,
  2005. PointSum: PointSum,
  2006. marklat: res.latitude,
  2007. marklon: res.longitude,
  2008. },
  2009. });
  2010. }
  2011. } else {
  2012. that.$router.push({
  2013. path: '/storeGroup',
  2014. query: {
  2015. storeId: val.storeId,
  2016. rdId: val.rdId,
  2017. lat: that.lat,
  2018. lon: that.lon,
  2019. visitId: val.visitId,
  2020. pageType: 'out',
  2021. addressLine: val.addressLine,
  2022. storeCategory: val.storeCategory,
  2023. storeName: val.storeName,
  2024. contactName: val.contactName,
  2025. hisTime: val.hisTime,
  2026. storeCode: val.storeCode,
  2027. tabVal: that.tabVal,
  2028. visitModel: '1',
  2029. latNew: location.lat,
  2030. lonNew: location.lon,
  2031. PointSum: PointSum,
  2032. marklat: res.latitude,
  2033. marklon: res.longitude,
  2034. },
  2035. });
  2036. }
  2037. localStorage.setItem('startTime', new Date());
  2038. localStorage.setItem('ORGName', val.deptName);
  2039. localStorage.setItem('chainNameR', val.storeName);
  2040. addVisitsPosition({
  2041. storeId: val.storeId,
  2042. visitsId: '',
  2043. lon: res.longitude,
  2044. lat: res.latitude,
  2045. sourceLon: location.lon,
  2046. sourceLat: location.lat,
  2047. positionDesc: '',
  2048. accuracy: res.accuracy,
  2049. });
  2050. },
  2051. fail: function () {
  2052. loading1.clear();
  2053. that.$dialog.alert({
  2054. message: 'GPS未开启',
  2055. });
  2056. },
  2057. });
  2058. });
  2059. wx.error(function (res) {
  2060. loading1.clear();
  2061. that.$dialog
  2062. .alert({
  2063. message: '定位失败,请开启企微定位权限',
  2064. })
  2065. .then(() => {});
  2066. });
  2067. }
  2068. });
  2069. }
  2070. }
  2071. }
  2072. // }
  2073. // })
  2074. },
  2075. abnormalVisit(val) {
  2076. localStorage.removeItem('visitId');
  2077. localStorage.setItem('tabVal', this.tabVal);
  2078. checkVisit({ storeId: val.storeId }).then((res) => {
  2079. if (res.code == 200 || val.stateString.indexOf('拜访中') != -1) {
  2080. if (localStorage.getItem('loginType') == 'cs') {
  2081. var lat = '';
  2082. var lon = '';
  2083. if (val.lat == '' || val.lat == null) {
  2084. lat = '31.2517820000';
  2085. lon = '120.5593090000';
  2086. } else {
  2087. lat = val.lat;
  2088. lon = val.lon;
  2089. }
  2090. this.$router.push({
  2091. path: '/outabnormalVisit',
  2092. query: {
  2093. storeId: val.storeId,
  2094. rdId: val.rdId,
  2095. lat: lat,
  2096. lon: lon,
  2097. visitId: val.visitId,
  2098. pageType: 'out',
  2099. addressLine: val.addressLine,
  2100. storeCategory: val.storeCategory,
  2101. storeName: val.storeName,
  2102. hisTime: val.hisTime,
  2103. contactName: val.contactName,
  2104. storeCode: val.storeCode,
  2105. tabVal: this.tabVal,
  2106. visitModel: '3',
  2107. latNew: '31.2517820000',
  2108. lonNew: '120.5593090000',
  2109. PointSum: 0,
  2110. marklat: lat,
  2111. marklon: lon,
  2112. linkType: 6,
  2113. },
  2114. });
  2115. localStorage.setItem('startTime', new Date());
  2116. localStorage.setItem('ORGName', val.deptName);
  2117. localStorage.setItem('chainNameR', val.storeName);
  2118. } else {
  2119. if (this.flag) {
  2120. this.flag = false;
  2121. this.timer = null;
  2122. this.timer = setTimeout(() => {
  2123. this.flag = true;
  2124. }, 2000);
  2125. let loading1 = this.$toast.loading({
  2126. duration: 0,
  2127. message: '加载中...',
  2128. forbidClick: true,
  2129. });
  2130. let url = window.location.href;
  2131. let that = this;
  2132. let wx = this.wx;
  2133. let qiyeData;
  2134. const instance = axios.create();
  2135. instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
  2136. instance
  2137. .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
  2138. params: {
  2139. url: url,
  2140. },
  2141. })
  2142. .then((response) => {
  2143. if (response.status == 200) {
  2144. this.cont = 3;
  2145. var flat = true;
  2146. var times = setInterval(() => {
  2147. this.cont--;
  2148. if (this.cont == '0') {
  2149. if (flat) {
  2150. loading1.clear();
  2151. clearInterval(times);
  2152. that.$dialog
  2153. .alert({
  2154. message: '定位失败,请开启企微定位权限',
  2155. })
  2156. .then(() => {
  2157. this.$router.go(-1);
  2158. });
  2159. } else {
  2160. clearInterval(times);
  2161. }
  2162. }
  2163. }, 1000);
  2164. qiyeData = response.data.data;
  2165. wx.config({
  2166. beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
  2167. debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  2168. appId: qiyeData.appId, // 必填,企业微信的corpID
  2169. timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
  2170. nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
  2171. signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
  2172. jsApiList: ['ready', 'getLocation'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
  2173. });
  2174. wx.ready(function () {
  2175. wx.getLocation({
  2176. type: 'gcj02',
  2177. success: function (res) {
  2178. flat = false;
  2179. loading1.clear();
  2180. var location = that.CJ02BD(res.latitude, res.longitude);
  2181. if (val.lat == '' || val.lat == null) {
  2182. that.lat = location.lat;
  2183. that.lon = location.lon;
  2184. } else {
  2185. that.lat = val.lat;
  2186. that.lon = val.lon;
  2187. }
  2188. let PointSum = that
  2189. .twoPointSum(that.lat, that.lon, location.lat, location.lon)
  2190. .toFixed(2);
  2191. if (PointSum > 500 && localStorage.getItem('postType') != 'GZ') {
  2192. that.$dialog
  2193. .confirm({
  2194. confirmButtonText: '确定',
  2195. cancelButtonText: '取消',
  2196. title: '系统提示',
  2197. message: '定位距离偏差大',
  2198. closeOnClickOverlay: true,
  2199. })
  2200. .then(() => {
  2201. that.$router.push({
  2202. path: '/outabnormalVisit',
  2203. query: {
  2204. storeId: val.storeId,
  2205. rdId: val.rdId,
  2206. lat: that.lat,
  2207. lon: that.lon,
  2208. visitId: val.visitId,
  2209. pageType: 'out',
  2210. visitModel: '5',
  2211. storeCode: val.storeCode,
  2212. tabVal: that.tabVal,
  2213. latNew: location.lat,
  2214. lonNew: location.lon,
  2215. PointSum: PointSum,
  2216. marklat: res.latitude,
  2217. marklon: res.longitude,
  2218. linkType: 6,
  2219. },
  2220. });
  2221. localStorage.setItem('startTime', new Date());
  2222. localStorage.setItem('ORGName', val.deptName);
  2223. localStorage.setItem('chainNameR', val.storeName);
  2224. })
  2225. .catch(() => {
  2226. // that.abnormalVisit(val)
  2227. });
  2228. } else {
  2229. that.$router.push({
  2230. path: '/outabnormalVisit',
  2231. query: {
  2232. storeId: val.storeId,
  2233. rdId: val.rdId,
  2234. lat: that.lat,
  2235. lon: that.lon,
  2236. visitId: val.visitId,
  2237. pageType: 'out',
  2238. visitModel: '3',
  2239. storeCode: val.storeCode,
  2240. tabVal: that.tabVal,
  2241. latNew: location.lat,
  2242. lonNew: location.lon,
  2243. PointSum: PointSum,
  2244. marklat: res.latitude,
  2245. marklon: res.longitude,
  2246. linkType: 6,
  2247. },
  2248. });
  2249. localStorage.setItem('startTime', new Date());
  2250. localStorage.setItem('ORGName', val.deptName);
  2251. localStorage.setItem('chainNameR', val.storeName);
  2252. }
  2253. addVisitsPosition({
  2254. storeId: val.storeId,
  2255. visitsId: '',
  2256. lon: res.longitude,
  2257. lat: res.latitude,
  2258. sourceLon: location.lon,
  2259. sourceLat: location.lat,
  2260. positionDesc: '',
  2261. accuracy: res.accuracy,
  2262. });
  2263. },
  2264. fail: function () {
  2265. loading1.clear();
  2266. that.$dialog
  2267. .alert({
  2268. message: 'GPS未开启',
  2269. })
  2270. .then(() => {
  2271. // that.abnormalVisit(val)
  2272. });
  2273. },
  2274. });
  2275. });
  2276. wx.error(function (res) {
  2277. loading1.clear();
  2278. that.$dialog
  2279. .alert({
  2280. message: '定位失败,请开启企微定位权限',
  2281. })
  2282. .then(() => {});
  2283. });
  2284. } else {
  2285. loading1.clear();
  2286. this.$toast.fail(dataList.msg);
  2287. }
  2288. });
  2289. // this.$router.push({path: "/outabnormalVisit", query: {
  2290. // storeId:"179792",
  2291. // rdId:"null",
  2292. // lat:"31.1882020000",
  2293. // lon:"120.6801770000",
  2294. // visitId:"null",
  2295. // visitModel:"5",
  2296. // storeCode:"0190141901",
  2297. // tabVal:"0",
  2298. // latNew:34.621855582632264,
  2299. // lonNew:112.45382530736684,
  2300. // PointSum:857246.44
  2301. // }})
  2302. localStorage.setItem('startTime', new Date());
  2303. localStorage.setItem('ORGName', val.deptName);
  2304. localStorage.setItem('chainNameR', val.storeName);
  2305. }
  2306. }
  2307. } else {
  2308. this.$dialog.alert({
  2309. title: '系统提示',
  2310. message: res.msg,
  2311. });
  2312. }
  2313. });
  2314. },
  2315. visitFn(val) {
  2316. this.$router.push({
  2317. path: '/storeDetail',
  2318. query: { id: val.storeId, detilId: 'a' },
  2319. });
  2320. },
  2321. // 大客户签约
  2322. signAdd(val) {
  2323. this.$router.push({
  2324. path: '/sign',
  2325. query: { id: val.storeId, detilId: 'a' },
  2326. });
  2327. },
  2328. Visit(val) {
  2329. this.$router.push({
  2330. path: '/historicalDetails',
  2331. query: {
  2332. visitId: val.visitId,
  2333. storeId: val.storeId,
  2334. storeCode: val.storeCode,
  2335. },
  2336. });
  2337. },
  2338. onSearch() {
  2339. window.scrollTo(0, 0);
  2340. this.list = [];
  2341. this.finished = true;
  2342. this.cstype = this.$route.query.type;
  2343. this.getPositionFn();
  2344. if (this.lat != '') {
  2345. this.onLoad();
  2346. } else {
  2347. let loading3 = this.$toast.loading({
  2348. duration: 0,
  2349. message: '加载中...',
  2350. forbidClick: true,
  2351. });
  2352. setTimeout(() => {
  2353. loading3.clear();
  2354. this.onLoad();
  2355. }, 1000);
  2356. }
  2357. },
  2358. getPositionFn() {
  2359. var that = this;
  2360. let url = window.location.href;
  2361. let wx = this.wx;
  2362. let qiyeData;
  2363. const instance = axios.create();
  2364. instance.defaults.headers.common['userId'] = localStorage.getItem('loginName');
  2365. instance
  2366. .get(process.env.VUE_APP_BASE_API + 'mobile/wx/ticket', {
  2367. params: {
  2368. url: url,
  2369. },
  2370. })
  2371. .then((response) => {
  2372. if (response.status == 200) {
  2373. this.cont = 3;
  2374. var flat = true;
  2375. var times = setInterval(() => {
  2376. this.cont--;
  2377. if (this.cont == '0') {
  2378. if (flat) {
  2379. clearInterval(times);
  2380. } else {
  2381. clearInterval(times);
  2382. }
  2383. }
  2384. }, 1000);
  2385. qiyeData = response.data.data;
  2386. wx.config({
  2387. beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
  2388. debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
  2389. appId: qiyeData.appId, // 必填,企业微信的corpID
  2390. timestamp: qiyeData.timestamp, // 必填,生成签名的时间戳
  2391. nonceStr: qiyeData.nonceStr, // 必填,生成签名的随机串
  2392. signature: qiyeData.signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
  2393. jsApiList: ['ready', 'getLocation'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
  2394. });
  2395. wx.ready(function () {
  2396. wx.getLocation({
  2397. type: 'gcj02',
  2398. success: function (res) {
  2399. flat = false;
  2400. var location = that.CJ02BD(res.latitude, res.longitude);
  2401. that.lat = location.lat;
  2402. that.lon = location.lon;
  2403. },
  2404. });
  2405. });
  2406. }
  2407. });
  2408. },
  2409. buryingPointFn(val) {
  2410. this.buryingPoint({
  2411. systemModel: '高销额门店推荐',
  2412. buryingPointType: 1,
  2413. buryingPointValue: val.telephone,
  2414. buryingPointName: '点击电话',
  2415. buryingPointPosition: val.storeName + '(' + val.storeCode + ')',
  2416. });
  2417. },
  2418. onSearchm() {
  2419. var postType = localStorage.getItem('postType');
  2420. if (postType == 'GZ') {
  2421. this.typeShow = false;
  2422. } else {
  2423. this.typeShow = true;
  2424. }
  2425. var StoreLabelsArr = [];
  2426. for (var k = 0; k < this.storeLabelTypes.length; k++) {
  2427. for (var k1 = 0; k1 < this.StoreLabels.length; k1++) {
  2428. if (this.StoreLabels[k1].dictValue == this.storeLabelTypes[k]) {
  2429. StoreLabelsArr.push(this.StoreLabels[k1].dictLabel);
  2430. }
  2431. }
  2432. }
  2433. var storeCategoryList = [];
  2434. for (var q = 0; q < this.result.length; q++) {
  2435. for (var q1 = 0; q1 < this.storeTypeLists.length; q1++) {
  2436. if (this.storeTypeLists[q1].dictValue == this.result[q]) {
  2437. storeCategoryList.push(this.storeTypeLists[q1].dictLabel);
  2438. }
  2439. }
  2440. }
  2441. if (this.storeLabelTypes.length > 0) {
  2442. this.buryingPoint({
  2443. systemModel: '高销额门店推荐',
  2444. buryingPointType: 1,
  2445. buryingPointValue: StoreLabelsArr.join(','),
  2446. buryingPointName: '标签',
  2447. buryingPointPosition: '客户信息筛选',
  2448. });
  2449. }
  2450. if (this.storeCategoryList != '') {
  2451. this.buryingPoint({
  2452. systemModel: '高销额门店推荐',
  2453. buryingPointType: 1,
  2454. buryingPointValue: storeCategoryList.join(','),
  2455. buryingPointName: '类型',
  2456. buryingPointPosition: '客户信息筛选',
  2457. });
  2458. }
  2459. if (this.chainName != '') {
  2460. this.buryingPoint({
  2461. systemModel: '高销额门店推荐',
  2462. buryingPointType: 1,
  2463. buryingPointValue: this.chainName,
  2464. buryingPointName: '经销商筛选',
  2465. buryingPointPosition: '客户信息筛选',
  2466. });
  2467. }
  2468. if (this.storeName != '') {
  2469. this.buryingPoint({
  2470. systemModel: '高销额门店推荐',
  2471. buryingPointType: 1,
  2472. buryingPointValue: this.storeName,
  2473. buryingPointName: '搜索名称/编号/地址',
  2474. buryingPointPosition: '客户信息筛选',
  2475. });
  2476. }
  2477. var sortParam = '';
  2478. if (this.sortParam == 'sales') {
  2479. sortParam = '销量';
  2480. } else if (this.sortParam == 'visitTime') {
  2481. sortParam = '拜访时间';
  2482. } else {
  2483. sortParam = '下单时间';
  2484. }
  2485. var sortType = '';
  2486. if (this.sortType == 'desc') {
  2487. sortType = '正序';
  2488. } else {
  2489. sortType = '倒叙';
  2490. }
  2491. this.buryingPoint({
  2492. systemModel: '高销额门店推荐',
  2493. buryingPointType: 1,
  2494. buryingPointValue: sortType,
  2495. buryingPointName: sortParam,
  2496. buryingPointPosition: '客户信息筛选',
  2497. });
  2498. localStorage.setItem('outvstoreName', this.storeName);
  2499. localStorage.setItem('outvchainName', this.chainName);
  2500. localStorage.setItem('outvstoreLabelTypes', this.storeLabelTypes);
  2501. localStorage.setItem('outvstoreCategoryList', this.result);
  2502. localStorage.setItem('outvchainCode', this.chainCode);
  2503. localStorage.setItem('outvchainCode', this.chainCode);
  2504. localStorage.setItem('outvsortType', this.sortType);
  2505. localStorage.setItem('outsortParam', this.sortParam);
  2506. this.onSearch();
  2507. },
  2508. tabChange(name) {
  2509. window.scrollTo(0, 0);
  2510. this.finished = true;
  2511. this.disabled = true;
  2512. this.list = [];
  2513. this.tabVal = name;
  2514. this.onLoad();
  2515. },
  2516. onLoad() {
  2517. // 授权
  2518. getTicketFun().then(() => {
  2519. var postType = localStorage.getItem('postType');
  2520. if (postType == 'GZ') {
  2521. this.typeShow = false;
  2522. } else {
  2523. this.typeShow = true;
  2524. }
  2525. this.getUserOutPlaList();
  2526. });
  2527. },
  2528. onLoadlong() {
  2529. this.list = [];
  2530. this.getUserOutPlaList();
  2531. },
  2532. },
  2533. };
  2534. </script>
  2535. <style lang="scss">
  2536. .van-dialog__confirm,
  2537. .van-dialog__confirm:active {
  2538. color: #0057ba;
  2539. }
  2540. .searchDiv {
  2541. .van-search {
  2542. background: #fff;
  2543. }
  2544. .van-search__action {
  2545. font-size: 14px;
  2546. color: #0057ba;
  2547. font-weight: bold;
  2548. background: #f1f1f1;
  2549. border-bottom-right-radius: 60px;
  2550. border-top-right-radius: 60px;
  2551. border: 1px solid #ccc;
  2552. padding: 0 20px;
  2553. }
  2554. .van-search--show-action {
  2555. padding-right: 12px;
  2556. }
  2557. .van-search__content {
  2558. border: 1px solid #ccc;
  2559. border-bottom-left-radius: 60px;
  2560. border-top-left-radius: 60px;
  2561. background: #f1f1f1;
  2562. border-right: 0;
  2563. }
  2564. }
  2565. .myTab {
  2566. .van-tabs__nav--card {
  2567. margin: 0 !important;
  2568. border-left: 0;
  2569. border-right: 0;
  2570. }
  2571. .van-tabs__wrap,
  2572. .van-tabs__nav--card {
  2573. height: 39px;
  2574. }
  2575. .van-tab {
  2576. line-height: 40px;
  2577. }
  2578. }
  2579. .myList {
  2580. .van-cell {
  2581. padding: 0;
  2582. &:after {
  2583. border-bottom: none;
  2584. }
  2585. }
  2586. }
  2587. .searchDivcs .van-search__content {
  2588. border-bottom-left-radius: 6px;
  2589. border-top-left-radius: 6px;
  2590. }
  2591. .searchDivcs .van-search__action {
  2592. border-bottom-right-radius: 6px;
  2593. border-top-right-radius: 6px;
  2594. }
  2595. </style>
  2596. <style lang="scss" scoped>
  2597. .bgcolor {
  2598. background-color: #f5f5f5;
  2599. }
  2600. .container {
  2601. padding-bottom: 50px;
  2602. }
  2603. .card {
  2604. padding: 10px 16px;
  2605. box-sizing: border-box;
  2606. }
  2607. .card .title {
  2608. font-size: 15px;
  2609. font-weight: bold;
  2610. color: #333;
  2611. line-height: 22px;
  2612. padding-right: 52px;
  2613. }
  2614. .card .info {
  2615. font-size: 14px;
  2616. color: #909090;
  2617. line-height: 26px;
  2618. }
  2619. .btnbox {
  2620. padding-top: 14px;
  2621. border-top: 1px solid #eee;
  2622. margin: 0 10px;
  2623. }
  2624. .navBarTOP {
  2625. position: fixed;
  2626. width: 100%;
  2627. z-index: 2;
  2628. top: 0;
  2629. }
  2630. .cellcontent .centerBtn {
  2631. margin: 0 auto 10px;
  2632. display: block;
  2633. width: 92%;
  2634. color: #0057ba;
  2635. border-radius: 5px;
  2636. padding: 0 2px;
  2637. }
  2638. .cellcontent .centerBtn1 {
  2639. background-color: #0057ba;
  2640. color: #fff;
  2641. border-color: #0057ba;
  2642. }
  2643. .cellcontent .centerBtn2 {
  2644. margin: 0 auto 10px;
  2645. display: block;
  2646. width: 92%;
  2647. color: #0057ba;
  2648. border-radius: 5px;
  2649. padding: 0;
  2650. }
  2651. .statstext {
  2652. background-color: #0057ba;
  2653. position: absolute;
  2654. right: 0;
  2655. top: 6px;
  2656. padding: 2px 6px 2px 12px;
  2657. border-bottom-left-radius: 60px;
  2658. border-top-left-radius: 60px;
  2659. color: #fff;
  2660. }
  2661. .cellcontent .van-cell {
  2662. padding: 10px 0;
  2663. }
  2664. .statstext .van-icon__image {
  2665. height: 0.7em;
  2666. }
  2667. .tipsTitle {
  2668. padding: 5px 0;
  2669. text-align: center;
  2670. font-size: 16px;
  2671. font-weight: 600;
  2672. }
  2673. </style>
  2674. <style>
  2675. .zpover99 {
  2676. background-color: #00afff !important;
  2677. }
  2678. .van-tabs__nav--card .van-tab.van-tab--active {
  2679. background-color: #0057ba !important;
  2680. }
  2681. .visitSearch {
  2682. width: 68px;
  2683. color: #0057ba;
  2684. font-size: 14px;
  2685. }
  2686. .visitSearch .van-dropdown-menu__bar {
  2687. box-shadow: 0 0 0 #fff;
  2688. height: 52px;
  2689. }
  2690. .visitSearch .van-dropdown-menu__item {
  2691. justify-content: normal;
  2692. }
  2693. .visitSearch .van-dropdown-menu__title {
  2694. border-left: 1px solid #ccc;
  2695. }
  2696. .visitSearch .van-cell {
  2697. border: 1px solid #ccc;
  2698. border-radius: 5px;
  2699. padding: 6px;
  2700. }
  2701. .positionContent {
  2702. position: fixed;
  2703. color: #666;
  2704. display: inline-block;
  2705. box-shadow: 0px 2px 7px -5px #000;
  2706. border-radius: 100px;
  2707. overflow: hidden;
  2708. right: 14px;
  2709. cursor: pointer;
  2710. bottom: 96px;
  2711. background-color: white;
  2712. }
  2713. .positionContent .img {
  2714. border-radius: 100px;
  2715. float: left;
  2716. }
  2717. .positionContent .img .van-icon__image {
  2718. border-radius: 100px;
  2719. }
  2720. .zDialog .van-dialog__header {
  2721. padding: 10px;
  2722. border-bottom: 1px solid #f5f5f5;
  2723. }
  2724. .zDialog .infoText {
  2725. margin: 10px;
  2726. font-size: 14px;
  2727. color: #909090;
  2728. width: 98%;
  2729. }
  2730. .visitStoreIco {
  2731. float: left;
  2732. float: left;
  2733. width: 26px;
  2734. text-align: center;
  2735. background-color: #ffba13;
  2736. color: #fff;
  2737. border-radius: 100%;
  2738. margin-left: 14px;
  2739. line-height: 26px;
  2740. height: 26px;
  2741. }
  2742. .searchcheck {
  2743. padding: 0 10px 10px;
  2744. }
  2745. .searchcheck .van-checkbox {
  2746. /*width: 44%;*/
  2747. padding-bottom: 10px;
  2748. }
  2749. .searchcheck .checkbox {
  2750. font-size: 14px;
  2751. display: inline-block;
  2752. width: 50%;
  2753. line-height: 28px;
  2754. }
  2755. .searchcheck .checkbox .van-checkbox {
  2756. margin-bottom: 2px;
  2757. }
  2758. .searchcheck .checkbox1 {
  2759. font-size: 14px;
  2760. float: left;
  2761. line-height: 28px;
  2762. width: 50%;
  2763. }
  2764. .searchcheck .checkbox1 .child {
  2765. width: 100%;
  2766. }
  2767. .searchcheck {
  2768. height: 93vh;
  2769. overflow-y: auto;
  2770. }
  2771. .searchchecktitle {
  2772. width: 100%;
  2773. margin: 20px 0;
  2774. font-size: 16px;
  2775. border-left: 3px solid #0057ba;
  2776. line-height: 18px;
  2777. }
  2778. .textsize {
  2779. font-size: 14px;
  2780. }
  2781. .visitStoreIcos {
  2782. /*background: url("./../../assets/order1.png") center;*/
  2783. }
  2784. </style>