index.vue 95 KB

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