index.vue 99 KB

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