topStore.vue 104 KB

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