index.vue 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588
  1. <template>
  2. <div class="bgcolor home agentList">
  3. <div class="header">
  4. <van-nav-bar class="navBar" :title="$route.meta.title">
  5. <template #left>
  6. <span @click="login" style="display: block; width: 50px; height: 100%"></span>
  7. </template>
  8. <template #right>
  9. <span @click="searchFn">筛选<van-icon name="arrow-down" /></span>
  10. </template>
  11. </van-nav-bar>
  12. <div class="searchDiv">
  13. <van-search
  14. v-model="chainsName"
  15. left-icon="search"
  16. show-action
  17. placeholder="搜索名称/编号"
  18. @clear="clearFn">
  19. <template #action>
  20. <div @click="onSearchm">搜索</div>
  21. </template>
  22. </van-search>
  23. </div>
  24. <van-tabs class="myTab" type="card" v-model="tabVal" color="#0057ba" @change="tabChange">
  25. <van-tab title="销售部" name="0" :disabled="disabled"></van-tab>
  26. <van-tab title="我的" name="1" :disabled="disabled"></van-tab>
  27. </van-tabs>
  28. </div>
  29. <div class="content" id="content" @touchmove="handleTouch">
  30. <van-pull-refresh v-model="isLoading" @refresh="onRefresh">
  31. <van-list
  32. class="myList"
  33. v-model="loading"
  34. :finished="finished"
  35. finished-text="--已经到底了--"
  36. @load="onLoad">
  37. <div class="cellcontent" v-for="(item, index) in list" :key="index" v-if="list.length">
  38. <van-cell>
  39. <div class="card">
  40. <div class="title titlero">
  41. <span @click="goOtherSystem(item)" :style="setStroeNameStyle(item)">
  42. <span>{{ item.chainName }}</span>
  43. (<span>{{ item.chainCode }}</span
  44. >)
  45. </span>
  46. <span class="btn" :data-clipboard-text="item.chainCode">
  47. <van-icon
  48. :name="require('@/assets/icon/paste.png')"
  49. color="#ee0a24"
  50. size="20"
  51. style="top: 6px; margin-left: 4px" />
  52. </span>
  53. </div>
  54. <div class="info" style="position: relative">
  55. 实际经营者:{{ item.customerManager }}
  56. <div style="position: absolute; bottom: 0px; right: 0px">
  57. <!-- 凤凰客户 -->
  58. <el-popover
  59. popper-class="zpover"
  60. placement="bottom"
  61. width="120"
  62. trigger="click"
  63. content="该客户为凤凰客户">
  64. <div
  65. v-if="item.chainLabels && item.chainLabels.fhCustomer"
  66. class="visitStoreIco"
  67. style="background-color: #fff"
  68. slot="reference">
  69. <van-icon :name="require('@/assets/icon/fenghuangjihua.png')" size="26" />
  70. </div>
  71. </el-popover>
  72. <!-- 本月已出货 -->
  73. <el-popover
  74. popper-class="zpover shipped"
  75. placement="bottom"
  76. trigger="click"
  77. content="本月已出货">
  78. <div
  79. v-if="item.chainLabels && item.chainLabels.shipped"
  80. class="visitStoreIco"
  81. style="background-color: #fff"
  82. slot="reference">
  83. <van-icon :name="require('@/assets/icon/shipped.png')" size="26" />
  84. </div>
  85. </el-popover>
  86. <el-popover
  87. popper-class="zpover zpover6"
  88. placement="bottom-start"
  89. trigger="click">
  90. <template v-if="item.chainLabels && item.chainLabels.skuNum">
  91. <div>
  92. <p>
  93. 本经销商{{ timeData }}下单SKU数:<a
  94. @click="linkList(item)"
  95. style="text-decoration: underline"
  96. >点击查看详情</a
  97. >
  98. </p>
  99. </div>
  100. <div
  101. class="visitStoreIco"
  102. style="background-color: #fff; position: relative"
  103. slot="reference">
  104. <p
  105. style="
  106. width: 100%;
  107. position: absolute;
  108. z-index: 1;
  109. top: 0.2px;
  110. width: 22px;
  111. margin: 0;
  112. margin-left: 3.6px;
  113. text-align: center;
  114. font-size: 12px;
  115. ">
  116. {{ item.chainLabels.skuNum }}
  117. </p>
  118. <van-icon :name="require('@/assets/icon/ord.png')" size="26" /></div
  119. ></template>
  120. </el-popover>
  121. <!-- 应收账款逾期 -->
  122. <el-popover
  123. :popper-class="yu7Class(item.chainLabels.beOverdue)"
  124. placement="bottom"
  125. trigger="click"
  126. :content="yu7Content(item.chainLabels.beOverdue)">
  127. <div
  128. v-if="item.chainLabels && item.chainLabels.beOverdue"
  129. class="visitStoreIco"
  130. style="background-color: #fff"
  131. slot="reference">
  132. <van-icon
  133. v-if="item.chainLabels.beOverdue == 1"
  134. :name="require('@/assets/icon/yu71.png')"
  135. size="26" />
  136. <van-icon
  137. v-if="item.chainLabels.beOverdue == 2"
  138. :name="require('@/assets/icon/yu72.png')"
  139. size="26" />
  140. <van-icon
  141. v-if="item.chainLabels.beOverdue == 3"
  142. :name="require('@/assets/icon/yu73.png')"
  143. size="26" />
  144. </div>
  145. </el-popover>
  146. <!-- 仿石漆配送商 -->
  147. <el-popover
  148. popper-class="zpover fsqDelivery"
  149. placement="bottom"
  150. trigger="click"
  151. content="仿石漆配送商">
  152. <div
  153. v-if="item.chainLabels && item.chainLabels.deliveryProvider"
  154. class="visitStoreIco"
  155. style="background-color: #fff"
  156. slot="reference">
  157. <van-icon :name="require('@/assets/icon/delivery.png')" size="26" />
  158. </div>
  159. </el-popover>
  160. <!-- <el-popover
  161. popper-class="zpover zpover5"
  162. placement="bottom"
  163. width="200"
  164. trigger="click">
  165. <div v-if="item.storeLabels">
  166. <p>已参加:</p>
  167. <p v-for="tt in (item.storeLabels.targetOne + '').split(';')">
  168. {{ tt }}
  169. </p>
  170. </div>
  171. <div
  172. class="visitStoreIco"
  173. v-if="item.storeLabels.targetOne"
  174. style="background-color: #fff"
  175. slot="reference">
  176. <van-icon :name="targetOne" size="26" />
  177. </div>
  178. </el-popover>
  179. <el-popover
  180. popper-class="zpover"
  181. placement="bottom"
  182. width="120"
  183. trigger="click"
  184. content="调色机5天未联网">
  185. <div
  186. v-if="item.storeLabels.ccmOffline"
  187. class="visitStoreIco"
  188. style="background-color: #fff"
  189. slot="reference">
  190. <van-icon :name="Network" size="26" />
  191. </div>
  192. </el-popover>
  193. <el-popover
  194. popper-class="zpover"
  195. placement="bottom"
  196. width="200"
  197. trigger="click"
  198. content="同城店近60天未下单">
  199. <div
  200. v-if="item.storeLabels.fxNoOrder"
  201. class="visitStoreIco"
  202. style="background-color: #fff"
  203. slot="reference">
  204. <van-icon :name="order60" size="26" />
  205. </div>
  206. </el-popover>
  207. <el-popover
  208. popper-class="zpover"
  209. placement="bottom"
  210. width="200"
  211. trigger="click"
  212. content="金牌店近30天未下单">
  213. <div
  214. v-if="item.storeLabels.noOrder"
  215. class="visitStoreIco"
  216. style="background-color: #fff"
  217. slot="reference">
  218. <van-icon :name="order" size="26" />
  219. </div>
  220. </el-popover>
  221. <el-popover
  222. popper-class="zpover"
  223. placement="bottom"
  224. width="200"
  225. trigger="click"
  226. content="本店本月进过专业时时丽">
  227. <div
  228. class="visitStoreIco"
  229. v-if="item.storeLabels.zyssl"
  230. style="background-color: #ed5c68"
  231. slot="reference">
  232. </div>
  233. </el-popover>
  234. <el-popover
  235. popper-class="zpover zpover1"
  236. placement="bottom"
  237. width="200"
  238. trigger="click"
  239. content="本店本月进过超好贴">
  240. <div
  241. v-if="item.storeLabels.chtczj"
  242. class="visitStoreIco"
  243. style="background-color: #0057ba"
  244. slot="reference">
  245. </div>
  246. </el-popover>
  247. <el-popover
  248. placement="bottom"
  249. popper-class="zpover zpover1 zpover1sb"
  250. :disabled="!item.userVisitTimesMap"
  251. trigger="click">
  252. <div
  253. v-if="item.storeLabels.visitTimes && item.storeLabels.visitTimes > 0"
  254. class="visitStoreIco"
  255. slot="reference"
  256. style="background-color: #fff; position: relative">
  257. <p
  258. style="
  259. width: 100%;
  260. position: absolute;
  261. z-index: 10;
  262. top: -2px;
  263. margin: 0;
  264. text-align: center;
  265. font-size: 12px;
  266. ">
  267. {{ item.storeLabels.visitTimes }}
  268. </p>
  269. <van-icon :name="ordernum" size="26" />
  270. </div>
  271. <el-table :data="item.userVisitTimesMap" border max-height="180px">
  272. <el-table-column label="业务员" prop="userName" />
  273. <el-table-column label="拜访次数" prop="visitTimes" width="110px" />
  274. </el-table>
  275. </el-popover> -->
  276. </div>
  277. </div>
  278. <div class="info">身份类型:{{ item.typeName2 }}</div>
  279. <div class="info">开户日期:{{ formatCompactDate(item.openDate) }}</div>
  280. <div class="info">是否冻结:{{ item.freeze }}</div>
  281. <div class="info">是否关户:{{ item.close }}</div>
  282. </div>
  283. <div
  284. class="statstext"
  285. v-if="item.stateString == '未拜访'"
  286. style="background-color: #ed5c68">
  287. 未拜访
  288. </div>
  289. <div
  290. class="statstext"
  291. v-if="item.stateString == '拜访中'"
  292. style="background-color: white">
  293. <van-icon :name="require('@/assets/icon/times.png')" color="#ee0a24" size="32" />
  294. </div>
  295. <div class="statstext" v-if="item.stateString == '已拜访'">已拜访</div>
  296. <div class="btnbox">
  297. <van-row>
  298. <van-col
  299. span="5"
  300. v-if="item.stateString != '已拜访' && showChainsVisitButton"
  301. @click="storeVisit(item)">
  302. <img
  303. :src="require('@/assets/icon/call.png')"
  304. style="margin: 0 auto; height: 18px; display: block" />
  305. <p style="text-align: center; margin: 0; font-size: 12px">进入拜访</p>
  306. </van-col>
  307. <van-col
  308. span="5"
  309. v-if="item.stateString != '已拜访' && showChainsVisitButton"
  310. @click="abnormalVisit(item)">
  311. <img
  312. :src="require('@/assets/icon/yichang.png')"
  313. style="margin: 0 auto; height: 18px; display: block" />
  314. <p style="text-align: center; margin: 0; margin-top: 1px; font-size: 12px">
  315. 异常拜访
  316. </p>
  317. </van-col>
  318. <!-- <van-col span="5" v-if="item.stateString == '已拜访'" @click="Visit(item)">
  319. <img
  320. :src="require('@/assets/icon/bfxx.png')"
  321. style="margin: 0 auto; height: 18px; display: block" />
  322. <p style="text-align: center; margin: 0; margin-top: 1px; font-size: 12px">
  323. 拜访信息
  324. </p>
  325. </van-col> -->
  326. <van-col span="5" @click="visitFn(item)">
  327. <img
  328. :src="require('@/assets/icon/kehuxinxi-2.png')"
  329. style="margin: 0 auto; width: 18px; display: block" />
  330. <p style="text-align: center; margin: 0; margin-top: 1px; font-size: 12px">
  331. 客户门店
  332. </p>
  333. </van-col>
  334. </van-row>
  335. </div>
  336. </van-cell>
  337. <div class="lineGrey"></div>
  338. </div>
  339. <van-empty v-if="list.length == 0" />
  340. </van-list>
  341. </van-pull-refresh>
  342. </div>
  343. <van-popup v-model="showPicker" position="bottom" class="textsize">
  344. <van-row
  345. style="
  346. /* position: fixed; */
  347. /* top: 0; */
  348. width: 100%;
  349. z-index: 998;
  350. background-color: #fff;
  351. border-bottom: 1px solid #ccc;
  352. height: 50px;
  353. ">
  354. <van-col span="3" style="text-align: center; margin: 14px 0" @click="showPicker = false">
  355. <van-icon name="cross" size="20" color="#909399" />
  356. </van-col>
  357. <van-col span="13"> </van-col>
  358. <van-col span="4" style="text-align: center; line-height: 36px" @click="onConfirm">
  359. <div style="color: #0057ba">
  360. <van-button type="info" size="small" color="#0057ba">筛选</van-button>
  361. </div></van-col
  362. >
  363. <van-col span="4" style="text-align: center; line-height: 36px" @click="onsets">
  364. <van-button type="default" size="small" style="height: 28px">重置</van-button>
  365. </van-col>
  366. </van-row>
  367. <!-- <div style="height: 48px; width: 100%"></div> -->
  368. <div class="searchcheck" @touchmove="handleTouch">
  369. <p class="searchchecktitle">&nbsp;主经销商</p>
  370. <van-row>
  371. <van-col span="24">
  372. <div @click="moreTypeShowFn">
  373. <van-field
  374. style="
  375. margin-top: -6px;
  376. border-radius: 6px;
  377. border: 1px solid #ccc;
  378. overflow: hidden;
  379. "
  380. readonly
  381. v-model="chainName"
  382. label=""
  383. placeholder="请选择经销商" />
  384. </div>
  385. </van-col>
  386. </van-row>
  387. <p class="searchchecktitle" @click="isMonthVisited = !isMonthVisited">
  388. &nbsp;本月是否拜访<van-icon name="arrow-down" style="float: right" />
  389. </p>
  390. <van-radio-group v-model="monthVisited" direction="horizontal" class="monthVisited">
  391. <template v-if="isMonthVisited">
  392. <van-radio name="1">已拜访</van-radio>
  393. <van-radio name="0">未拜访</van-radio>
  394. </template>
  395. </van-radio-group>
  396. <p class="searchchecktitle" @click="isYuQiVisited = !isYuQiVisited">
  397. &nbsp;逾期<van-icon name="arrow-down" style="float: right" />
  398. </p>
  399. <van-radio-group v-model="YuQiVisitedTypes" direction="horizontal" class="monthVisited">
  400. <template v-if="isYuQiVisited">
  401. <van-radio :name="item.dictValue" v-for="item in YuQiList">{{
  402. item.dictLabel
  403. }}</van-radio>
  404. </template>
  405. </van-radio-group>
  406. <van-checkbox-group v-model="chainLabelTypes" direction="horizontal">
  407. <p class="searchchecktitle" @click="otherbqShow = !otherbqShow">
  408. &nbsp;经销商标签<van-icon name="arrow-down" style="float: right" />
  409. </p>
  410. <div v-if="otherbqShow" style="width: 100%">
  411. <div class="checkbox" v-for="(item, index) in chainLabelTypesOption" :key="index">
  412. <van-checkbox :name="item.dictValue">{{ item.dictLabel }}</van-checkbox>
  413. </div>
  414. <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
  415. </div>
  416. </van-checkbox-group>
  417. <van-checkbox-group v-model="result" direction="horizontal">
  418. <p class="searchchecktitle" @click="otherfxdShow = !otherfxdShow">
  419. &nbsp;身份类型<van-icon name="arrow-down" style="float: right" />
  420. </p>
  421. <div v-if="otherfxdShow" style="margin: 0 10px; width: 100%">
  422. <p class="searchchecktitle1" @click="otherfxdShow1 = !otherfxdShow1">
  423. 片区经销商<van-icon name="arrow-down" style="float: right" />
  424. </p>
  425. <div v-if="otherfxdShow1">
  426. <div v-for="(item1, index1) in PQChain" :key="200 + index1" class="checkbox1">
  427. <div class="child">
  428. <van-checkbox :name="item1.dictValue">{{ item1.dictLabel }}</van-checkbox>
  429. </div>
  430. </div>
  431. <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
  432. </div>
  433. <p class="searchchecktitle1" @click="otherfxdShow2 = !otherfxdShow2">
  434. 非片区经销商<van-icon name="arrow-down" style="float: right" />
  435. </p>
  436. <div v-if="otherfxdShow2">
  437. <div v-for="(itemlj, indexlj) in FPQChain" :key="400 + indexlj" class="checkbox1">
  438. <div class="child">
  439. <van-checkbox :name="itemlj.dictValue">{{ itemlj.dictLabel }}</van-checkbox>
  440. </div>
  441. </div>
  442. <div style="clear: both"></div>
  443. </div>
  444. </div>
  445. <div style="height: 2px; background-color: #f5f5f5; width: 100%; clear: both"></div>
  446. </van-checkbox-group>
  447. </div>
  448. </van-popup>
  449. <van-popup v-model="moreTypeShow" position="bottom" style="height: 80%">
  450. <van-row style="background-color: #f5f5f5">
  451. <van-col span="20">
  452. <van-field
  453. left-icon="search"
  454. style="margin-top: 2px; border-radius: 6px; overflow: hidden"
  455. v-model="CustomerName"
  456. label=""
  457. placeholder="请输入关键词"
  458. clearable />
  459. </van-col>
  460. <van-col span="4" style="text-align: center; line-height: 48px" @click="getCustomer">
  461. <div style="background-color: #0057ba; color: #fff">搜索</div></van-col
  462. >
  463. </van-row>
  464. <van-picker
  465. show-toolbar
  466. :columns="chainsData"
  467. value-key="mainCustomerName"
  468. @confirm="onConfirmChainsList"
  469. @cancel="moreTypeShow = false"
  470. visible-item-count="10" />
  471. </van-popup>
  472. <el-dialog
  473. :visible.sync="SKUDateShow"
  474. width="90%"
  475. :append-to-body="true"
  476. :close-on-click-modal="false"
  477. custom-class="SKUDateTable">
  478. <div v-for="item in SKUList">
  479. <p style="font-weight: bold; font-size: 14px">&nbsp;&nbsp;&nbsp;{{ item.m01Name }}</p>
  480. <el-table :data="item.productDetailList" border style="width: 100%">
  481. <el-table-column label="物料名称" prop="productName" />
  482. <el-table-column label="规格" prop="productSku" width="70" />
  483. </el-table>
  484. </div>
  485. </el-dialog>
  486. <!-- 测试用 -->
  487. <!-- 下单系统 -->
  488. <div
  489. class="storeSystem"
  490. v-if="objectPath"
  491. style="
  492. width: 100%;
  493. height: 100%;
  494. position: absolute;
  495. z-index: 9999999;
  496. display: flex;
  497. flex-direction: column;
  498. ">
  499. <div
  500. style="
  501. position: relative;
  502. z-index: 1;
  503. display: flex;
  504. align-items: center;
  505. height: 46px;
  506. background-color: #fff;
  507. font-size: 16px;
  508. font-weight: bold;
  509. justify-content: center;
  510. ">
  511. 下单系统
  512. </div>
  513. <object style="flex: 1" :data="objectPath" type="text/html" width="100%"></object>
  514. </div>
  515. <tab-bar tabBarActive="agentList"></tab-bar>
  516. </div>
  517. </template>
  518. <script>
  519. import {
  520. addVisitsPosition,
  521. mobileReposition,
  522. buryingPoint,
  523. getDictOption,
  524. checkVisit,
  525. } from '@/api/index';
  526. import { getPosition, getTicketFun } from '@/utils/TXApiFun';
  527. import { mapState } from 'vuex';
  528. import store from '@/store';
  529. import { scrollTopMixins } from '@/mixin/scrollTop';
  530. import {
  531. queryMyChainsGroupList,
  532. queryMyChainsGroupListByDept,
  533. checkChainsAddressByChainCode,
  534. getMainchains,
  535. getItemList,
  536. } from '@/api/agentList';
  537. import tabBar from '@/components/tabBar';
  538. export default {
  539. name: 'outsidelist',
  540. mixins: [scrollTopMixins],
  541. computed: {
  542. ...mapState({
  543. deviceOutsidePage: (state) => state.isRefreshPage.deviceOutsidePage,
  544. userInfo: (state) => state.user.userInfo,
  545. }),
  546. },
  547. components: { tabBar },
  548. data() {
  549. return {
  550. otherShow: false,
  551. chainName: '',
  552. chainCode: '',
  553. showPopover: false,
  554. moreTypeShow: false,
  555. chainLabelTypes: [],
  556. disabled: false,
  557. timer: null,
  558. flag: true,
  559. show: false,
  560. tabVal: '1',
  561. list: [],
  562. cont: 0,
  563. loading: false,
  564. showPicker: false,
  565. finished: false,
  566. otherbqShow: true,
  567. otherkkdShow: true,
  568. otherfxdShow: true,
  569. otherfxdShow2: true,
  570. otherfxdShow1: true,
  571. typeName: '搜索',
  572. visitEndId: '',
  573. pageSize: 12,
  574. pageNum: 1,
  575. listActive: null,
  576. query: '',
  577. chainsName: '',
  578. storeType: '',
  579. endShow: false,
  580. storeCategory: '',
  581. fromValue: {},
  582. storeTypeList: [],
  583. PQChain: [],
  584. FPQChain: [],
  585. chainsData: [],
  586. serachstype: '',
  587. addShow1: false,
  588. result: [],
  589. chainLabelTypesOption: [],
  590. CustomerName: '',
  591. lat: '',
  592. lon: '',
  593. objectPath: '',
  594. isLoading: false,
  595. monthVisited: '', //本月是否拜访
  596. isMonthVisited: true,
  597. num: 1,
  598. timeData: '',
  599. SKUDateShow: false,
  600. SKUList: [],
  601. showChainsVisitButton: true,
  602. isYuQiVisited: true,
  603. YuQiList: [],
  604. YuQiVisitedTypes: '', //逾期
  605. };
  606. },
  607. created() {
  608. // 经销商拜访,是否显示拜访按钮
  609. this.showChainsVisitButton = this.userInfo.showChainsVisitButton;
  610. // 当前tabs,0:销售部;1:我的
  611. this.tabVal = localStorage.getItem('tabVal') == '0' ? '0' : '1';
  612. store.dispatch('setDeviceOutsidePage', false);
  613. this.getMonth();
  614. // 经销商标签
  615. this.getStoreLabels();
  616. },
  617. mounted() {
  618. if (this.deviceOutsidePage) this.initData();
  619. // 上拉边界下拉出现白色空白
  620. let node = document.getElementsByClassName('home')[0];
  621. node.addEventListener(
  622. 'touchmove',
  623. (e) => {
  624. if (e._isScroller) return;
  625. e.preventDefault();
  626. },
  627. {
  628. passive: false,
  629. },
  630. );
  631. },
  632. methods: {
  633. getMonth() {
  634. // 获取当前日期
  635. var currentDate = new Date();
  636. // 获取当前月份
  637. var currentMonth = currentDate.getMonth();
  638. // 获取当前年份
  639. // var currentYear = currentDate.getFullYear();
  640. var previousMonthDate1 = new Date();
  641. if (currentDate.getDate() == 1) {
  642. previousMonthDate1.setMonth(currentMonth - 1);
  643. } else {
  644. }
  645. var previousMonth1 = previousMonthDate1.getMonth();
  646. var previousYear1 = previousMonthDate1.getFullYear();
  647. // 计算前三个月的年份和月份
  648. var previousMonthDate = new Date();
  649. if (currentDate.getDate() == 1) {
  650. previousMonthDate.setMonth(currentMonth - 3);
  651. } else {
  652. previousMonthDate.setMonth(currentMonth - 2);
  653. }
  654. 1;
  655. var previousMonth = previousMonthDate.getMonth();
  656. var previousYear = previousMonthDate.getFullYear();
  657. //前三个月
  658. if (previousYear1 == previousYear) {
  659. var formattedPreviousMonth1 = previousYear1 + '-' + (previousMonth1 + 1);
  660. // 格式化年份和月份
  661. var formattedPreviousMonth = previousYear + '-' + (previousMonth + 1);
  662. this.timeData =
  663. formattedPreviousMonth.split('-')[1] + '-' + formattedPreviousMonth1.split('-')[1] + '月';
  664. } else {
  665. var formattedPreviousMonth1 = previousYear1 + '年' + (previousMonth1 + 1) + '月';
  666. // .toString().padStart(2, '0');
  667. // 格式化年份和月份
  668. var formattedPreviousMonth = previousYear + '年' + (previousMonth + 1) + '月';
  669. this.timeData = formattedPreviousMonth + '-' + formattedPreviousMonth1;
  670. }
  671. },
  672. onRefresh() {
  673. this.onSearch();
  674. this.isLoading = false;
  675. },
  676. handleTouch(e) {
  677. e._isScroller = true;
  678. },
  679. initData() {
  680. this.chainName = localStorage.getItem('outvchainName'); //筛选-经销商名称搜索
  681. this.chainCode = localStorage.getItem('outvchainCode'); //筛选-经销商Code
  682. // 筛选-店型选择
  683. if (localStorage.getItem('outvstoreCategoryList') != null) {
  684. this.result = localStorage.getItem('outvstoreCategoryList').split(',');
  685. } else {
  686. this.result = [];
  687. }
  688. this.query = this.$route.query; // 路由参数
  689. localStorage.removeItem('visitId');
  690. if (localStorage.getItem('postType') == 'GZ') {
  691. this.addShow1 = false;
  692. this.otherShow = true; //筛选-其他
  693. } else {
  694. this.addShow1 = true;
  695. this.otherShow = false; //筛选-其他
  696. }
  697. // 经销商标签
  698. this.getStoreLabels();
  699. this.onSearch();
  700. },
  701. getStoreLabels() {
  702. this.YuQiList = [];
  703. this.chainLabelTypesOption = [];
  704. getDictOption({}, 'chain_labels').then((res) => {
  705. if (res.code == 200 && res.data) {
  706. let YuQiList = [];
  707. let chainLabelTypesOption = [];
  708. res.data.forEach((val) => {
  709. if (val.remark == 'overdue') {
  710. YuQiList.push(val);
  711. } else {
  712. chainLabelTypesOption.push(val);
  713. }
  714. });
  715. this.YuQiList = YuQiList;
  716. this.chainLabelTypesOption = chainLabelTypesOption;
  717. }
  718. });
  719. },
  720. setStroeNameStyle(item) {
  721. return { color: '#0057ba', 'text-decoration': 'underline' };
  722. },
  723. clearFn() {
  724. this.chainsName = '';
  725. localStorage.setItem('outvstoreName', '');
  726. },
  727. moreTypeShowFn() {
  728. this.moreTypeShow = true;
  729. this.getCustomer();
  730. },
  731. buryingPoint(val) {
  732. buryingPoint(val);
  733. },
  734. getCustomer() {
  735. getMainchains({ mainChainsName: this.CustomerName }).then((request) => {
  736. this.chainsData = request.data;
  737. this.chainsData.push({});
  738. this.chainsData.pop();
  739. });
  740. },
  741. onConfirmChainsList(value) {
  742. if (value.mainCustomerName != undefined) {
  743. this.chainName = value.mainCustomerName;
  744. this.chainCode = value.mainCustomerCode;
  745. }
  746. this.showPickerChainsList = false;
  747. this.moreTypeShow = false;
  748. },
  749. onConfirm(value) {
  750. this.showPicker = false;
  751. this.onSearchm();
  752. },
  753. onsets() {
  754. this.result = [];
  755. this.chainLabelTypes = [];
  756. this.chainName = '';
  757. this.chainCode = '';
  758. this.monthVisited = '';
  759. this.YuQiVisitedTypes = '';
  760. this.onSearch();
  761. },
  762. setChainTypeList() {
  763. if (store.getters.chainsType) {
  764. this.PQChain = store.getters.chainsType.filter((val) => val.remark == 'pq');
  765. this.FPQChain = store.getters.chainsType.filter((val) => val.remark == 'fp');
  766. }
  767. },
  768. searchFn() {
  769. //获取门店类型 //获取门店标签
  770. Promise.all([this.setChainTypeList()]).then(() => {
  771. this.showPicker = true;
  772. this.CustomerName = '';
  773. });
  774. },
  775. getUserOrgStoreList() {
  776. this.storeType = localStorage.getItem('storeType');
  777. this.endShow = false;
  778. if (this.refreshing) {
  779. this.list = [];
  780. this.refreshing = false;
  781. }
  782. this.disabled = true;
  783. this.toastLoading(0, '加载中...', true);
  784. // 添加逾期筛选
  785. let chainLabelTypes =
  786. this.YuQiVisitedTypes != ''
  787. ? this.chainLabelTypes.join(',') + ',' + this.YuQiVisitedTypes
  788. : this.chainLabelTypes.join(',');
  789. queryMyChainsGroupListByDept({
  790. lat: this.lat,
  791. lon: this.lon,
  792. pageNum: this.pageNum,
  793. typeCode2List: this.result.join(','),
  794. chainLabelTypes: chainLabelTypes,
  795. pageSize: this.pageSize,
  796. chainsName: this.chainsName.trim(),
  797. monthVisited: this.monthVisited, //本月是否拜访1=拜访,0=未拜访
  798. mainCustomerCode: this.chainCode, //主经销商编号
  799. }).then((res) => {
  800. this.disabled = false;
  801. this.toastLoading().clear();
  802. this.loading = false;
  803. if (res.code == 200) {
  804. if (this.pageNum == '1') {
  805. this.list = [];
  806. }
  807. this.list = this.list.concat(res.rows);
  808. if (this.list.length >= res.total) {
  809. this.finished = true;
  810. } else {
  811. this.finished = false;
  812. }
  813. this.pageNum = this.pageNum + 1;
  814. this.list.forEach((item) => {
  815. if (item.stateString.indexOf('拜访中') != -1) {
  816. this.endShow = true;
  817. this.visitEndId = item.visitId;
  818. return;
  819. }
  820. });
  821. } else {
  822. this.$toast(res.msg);
  823. }
  824. });
  825. },
  826. getUserOutPlaListFun() {
  827. this.storeType = localStorage.getItem('storeType');
  828. this.disabled = true;
  829. this.toastLoading(0, '加载中...', true);
  830. this.endShow = false;
  831. if (this.refreshing) {
  832. this.list = [];
  833. this.refreshing = false;
  834. }
  835. let chainLabelTypes =
  836. this.YuQiVisitedTypes != ''
  837. ? this.chainLabelTypes.join(',') + ',' + this.YuQiVisitedTypes
  838. : this.chainLabelTypes.join(',');
  839. queryMyChainsGroupList({
  840. lat: this.lat,
  841. lon: this.lon,
  842. pageNum: this.pageNum,
  843. typeCode2List: this.result.join(','),
  844. chainLabelTypes: chainLabelTypes,
  845. pageSize: this.pageSize,
  846. chainsName: this.chainsName.trim(),
  847. monthVisited: this.monthVisited, //本月是否拜访1=拜访,0=未拜访
  848. mainCustomerCode: this.chainCode, //主经销商编号
  849. }).then((res) => {
  850. this.disabled = false;
  851. this.toastLoading().clear();
  852. this.loading = false;
  853. if (res.code == 200) {
  854. this.list = this.list.concat(res.rows);
  855. if (this.list.length >= res.total) {
  856. this.finished = true;
  857. } else {
  858. this.finished = false;
  859. }
  860. this.pageNum = this.pageNum + 1;
  861. this.list.forEach((item) => {
  862. if (item.stateString.indexOf('拜访中') != -1) {
  863. this.endShow = true;
  864. this.visitEndId = item.visitId;
  865. return;
  866. }
  867. });
  868. } else {
  869. this.finished = true;
  870. this.$toast(res.msg);
  871. }
  872. });
  873. },
  874. // 进入拜访
  875. storeVisit(val) {
  876. this.toastLoading(0, '加载中...', true);
  877. localStorage.setItem('tabVal', this.tabVal);
  878. localStorage.removeItem('visitId');
  879. checkVisit({ chainId: val.chainId }).then((res) => {
  880. if (res.code == 200 || val.stateString.indexOf('拜访中') != -1) {
  881. getPosition()
  882. .then((res) => {
  883. let { TXisBD, resData } = res;
  884. this.lat = TXisBD.lat;
  885. this.lon = TXisBD.lon;
  886. localStorage.setItem('lat', this.lat);
  887. localStorage.setItem('lon', this.lon);
  888. // var location = this.CJ02BD(res.latitude, res.longitude);
  889. if (val.stateString.indexOf('拜访中') != -1) {
  890. localStorage.setItem('startTime', new Date());
  891. localStorage.setItem('ORGName', val.deptName);
  892. localStorage.setItem('chainNameR', val.chainName);
  893. localStorage.removeItem('visitId'); //删除上次拜访id
  894. localStorage.setItem('getRequestFlage', 'true');
  895. this.toastLoading().clear();
  896. this.$router.push({
  897. path: '/visitPage',
  898. query: {
  899. typeName2: val.typeName2,
  900. chainId: val.chainId,
  901. rdId: val.rdId,
  902. customerManager: val.customerManager,
  903. openDate: val.openDate,
  904. close: val.close,
  905. freeze: val.freeze,
  906. lat: TXisBD.lat,
  907. lon: TXisBD.lon,
  908. visitId: val.visitId,
  909. pageType: 'out',
  910. addressLine: val.addressLine,
  911. storeCategory: val.storeCategory,
  912. chainName: val.chainName,
  913. hisTime: val.hisTime,
  914. contactName: val.contactName,
  915. chainCode: val.chainCode,
  916. tabVal: this.tabVal,
  917. visitModel: '1',
  918. latNew: TXisBD.lat,
  919. lonNew: TXisBD.lon,
  920. PointSum: '0',
  921. marklat: resData.latitude,
  922. marklon: resData.longitude,
  923. from: 'outPlan',
  924. },
  925. });
  926. } else {
  927. this.checkStoreAddressByStoreCodeFun(val, TXisBD, resData);
  928. }
  929. })
  930. .catch((error) => {
  931. this.toastLoading().clear();
  932. this.$dialog.alert({
  933. message: error,
  934. });
  935. });
  936. } else {
  937. this.toastLoading().clear();
  938. this.$dialog.alert({
  939. message: res.msg,
  940. });
  941. }
  942. });
  943. },
  944. checkStoreAddressByStoreCodeFun(val, location, res) {
  945. checkChainsAddressByChainCode({
  946. chainCode: val.chainCode,
  947. lon: location.lon,
  948. lat: location.lat,
  949. })
  950. .then((response) => {
  951. this.toastLoading().clear();
  952. if (val.lat == '' || val.lat == null) {
  953. this.lat = location.lat;
  954. this.lon = location.lon;
  955. }
  956. let PointSumval = this.twoPointSum(
  957. location.lat,
  958. location.lon,
  959. location.lat,
  960. location.lon,
  961. ).toFixed(2);
  962. // 直接进入拜访 不校验经纬度
  963. // localStorage.setItem('startTime', new Date());
  964. // localStorage.setItem('ORGName', val.deptName);
  965. // localStorage.setItem('chainNameR', val.chainName);
  966. // this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
  967. // return;
  968. // 门店校验 地址不通过
  969. if (response.code != 200) {
  970. // updateAddress : ,1:同城AB+金牌,去修改地址;2:非金牌店铺,非同城店铺偏差过大不允许拜访,可以重置定位;0非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访
  971. if (response.data.updateAddress == 0) {
  972. // 非金牌店铺,非同城店铺 位置信息不存在 可以继续拜访
  973. this.$dialog
  974. .confirm({
  975. confirmButtonText: '确定拜访',
  976. cancelButtonText: '取消拜访',
  977. title: '系统提示',
  978. message:
  979. '该客户没有经纬度,此次拜访会保存定位点作为客户经纬度,下次拜访时判断是否偏差过大。',
  980. closeOnClickOverlay: true,
  981. })
  982. .then(() => {
  983. this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
  984. });
  985. } else if (response.data.updateAddress == 1) {
  986. // 同城AB+金牌,去修改地址
  987. // addressUpdateTimesOver: true=已经达到最大次数,不让修改; false=没有达到可以修改
  988. if (!response.data.addressUpdateTimesOver) {
  989. this.$dialog
  990. .confirm({
  991. title: '系统提示',
  992. message: response.msg + '请立即修改后再拜访',
  993. messageAlign: 'left',
  994. confirmButtonText: '立即修改',
  995. cancelButtonText: '取消',
  996. })
  997. .then(() => {
  998. this.$router.push({
  999. path: '/storeDetail',
  1000. query: {
  1001. id: val.chainId,
  1002. type: 'address',
  1003. storeAddressId: val.storeAddressId,
  1004. },
  1005. });
  1006. });
  1007. } else {
  1008. this.$dialog.confirm({
  1009. title: '系统提示',
  1010. message: '已经达到最大修改次数',
  1011. messageAlign: 'left',
  1012. confirmButtonText: '确定',
  1013. });
  1014. }
  1015. } else if (response.data.updateAddress == 2) {
  1016. // 1.非金牌店铺,非同城店铺 位置偏差过大 重置经纬度
  1017. this.resetCoord(res, val, location, PointSumval);
  1018. return;
  1019. }
  1020. } else {
  1021. // 门店编码校验门店地址通过 进入拜访
  1022. this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
  1023. }
  1024. })
  1025. .catch(() => {
  1026. this.toastLoading().clear();
  1027. });
  1028. },
  1029. // 重置经纬度
  1030. resetCoord(res, val, location, PointSumval) {
  1031. this.$dialog
  1032. .confirm({
  1033. confirmButtonText: '初始化定位',
  1034. cancelButtonText: '取消拜访',
  1035. title: '系统提示',
  1036. message: '偏差过大,不允许拜访。可修改本店定位.',
  1037. closeOnClickOverlay: true,
  1038. })
  1039. .then(() => {
  1040. mobileReposition({
  1041. chainId: val.chainId,
  1042. lat: location.lat,
  1043. lon: location.lon,
  1044. }).then((response) => {
  1045. if (response.code == 200) {
  1046. this.$dialog
  1047. .alert({
  1048. title: '系统提示',
  1049. message: '本信息定位已更新成功!',
  1050. })
  1051. .then(() => {
  1052. this.toSuishenbangOutstoreVisit(res, val, location, PointSumval);
  1053. });
  1054. localStorage.setItem('startTime', new Date());
  1055. localStorage.setItem('ORGName', val.deptName);
  1056. localStorage.setItem('chainNameR', val.chainName);
  1057. } else {
  1058. this.$toast(response.msg);
  1059. }
  1060. });
  1061. });
  1062. },
  1063. // 进入拜访 router.push
  1064. toSuishenbangOutstoreVisit(res, val, location, PointSumval) {
  1065. addVisitsPosition({
  1066. chainId: val.chainId,
  1067. visitsId: '',
  1068. lon: res.longitude,
  1069. lat: res.latitude,
  1070. sourceLon: location.lon,
  1071. sourceLat: location.lat,
  1072. positionDesc: '',
  1073. accuracy: res.accuracy,
  1074. }).then((response) => {
  1075. // 进入拜访之前先刷新页面
  1076. store.dispatch('setDeviceOutsidePage', true);
  1077. localStorage.removeItem('visitId'); //删除上次拜访id
  1078. localStorage.setItem('getRequestFlage', 'true');
  1079. this.$router.push({
  1080. path: '/visitPage',
  1081. query: {
  1082. typeName2: val.typeName2,
  1083. chainId: val.chainId,
  1084. rdId: val.rdId,
  1085. customerManager: val.customerManager,
  1086. openDate: val.openDate,
  1087. close: val.close,
  1088. freeze: val.freeze,
  1089. lat: location.lat,
  1090. lon: location.lon,
  1091. visitId: val.visitId,
  1092. pageType: 'out',
  1093. addressLine: val.addressLine,
  1094. storeCategory: val.storeCategory,
  1095. chainName: val.chainName,
  1096. hisTime: val.hisTime,
  1097. contactName: val.contactName,
  1098. chainCode: val.chainCode,
  1099. tabVal: this.tabVal,
  1100. visitModel: '1',
  1101. latNew: location.lat,
  1102. lonNew: location.lon,
  1103. PointSum: PointSumval,
  1104. marklat: res.latitude,
  1105. marklon: res.longitude,
  1106. from: 'outPlan',
  1107. },
  1108. });
  1109. });
  1110. },
  1111. // 异常拜访
  1112. abnormalVisit(val) {
  1113. localStorage.removeItem('visitId');
  1114. localStorage.setItem('tabVal', this.tabVal);
  1115. getPosition()
  1116. .then((res) => {
  1117. let { TXisBD, resData } = res;
  1118. this.lat = TXisBD.lat;
  1119. this.lon = TXisBD.lon;
  1120. localStorage.setItem('lat', this.lat);
  1121. localStorage.setItem('lon', this.lon);
  1122. let PointSum = this.twoPointSum(TXisBD.lat, TXisBD.lon, TXisBD.lat, TXisBD.lon).toFixed(
  1123. 2,
  1124. );
  1125. addVisitsPosition({
  1126. chainId: val.chainId,
  1127. visitsId: '',
  1128. lon: resData.longitude,
  1129. lat: resData.latitude,
  1130. sourceLon: location.lon,
  1131. sourceLat: location.lat,
  1132. positionDesc: '',
  1133. accuracy: resData.accuracy,
  1134. }).then((response) => {
  1135. // 进入拜访之前先刷新页面
  1136. store.dispatch('setDeviceOutsidePage', true);
  1137. this.$router.push({
  1138. path: '/visitAbnormal',
  1139. query: {
  1140. chainId: val.chainId,
  1141. rdId: val.rdId,
  1142. lat: this.lat,
  1143. lon: this.lon,
  1144. visitId: val.visitId,
  1145. pageType: 'out',
  1146. visitModel: localStorage.getItem('postType') != 'GZ' ? '5' : '3',
  1147. chainCode: val.chainCode,
  1148. tabVal: this.tabVal,
  1149. latNew: TXisBD.lat,
  1150. lonNew: TXisBD.lon,
  1151. PointSum: PointSum,
  1152. marklat: resData.latitude,
  1153. marklon: resData.longitude,
  1154. },
  1155. });
  1156. localStorage.setItem('startTime', new Date());
  1157. localStorage.setItem('ORGName', val.deptName);
  1158. localStorage.setItem('chainNameR', val.chainName);
  1159. });
  1160. })
  1161. .catch((error) => {
  1162. this.$dialog.alert({
  1163. message: error,
  1164. });
  1165. });
  1166. },
  1167. // 客户门店
  1168. visitFn(val) {
  1169. this.buryingPoint({
  1170. systemModel: '计划外',
  1171. buryingPointType: 90,
  1172. buryingPointValue: val.chainName + '(' + val.chainCode + ')',
  1173. buryingPointName: '客户信息',
  1174. buryingPointPosition: this.tabVal == 1 ? '我的' : '销售部',
  1175. });
  1176. window.location.href =
  1177. process.env.VUE_APP_SSB_LINK +
  1178. '/order/storeDetail/list?customerCode=' +
  1179. val.chainCode +
  1180. '&status=jxs';
  1181. },
  1182. // 拜访信息
  1183. Visit(val) {
  1184. this.$router.push({
  1185. path: '/historicalDetails',
  1186. query: {
  1187. visitId: val.visitId,
  1188. chainId: val.chainId,
  1189. chainCode: val.chainCode,
  1190. },
  1191. });
  1192. },
  1193. onClickLeft() {
  1194. this.$router.go(-1);
  1195. },
  1196. onSearch() {
  1197. this.pageNum = 1;
  1198. this.list = [];
  1199. this.finished = true;
  1200. this.onLoad();
  1201. },
  1202. onSearchm() {
  1203. localStorage.setItem('outvstoreName', this.chainName);
  1204. localStorage.setItem('outvchainName', this.chainName);
  1205. localStorage.setItem('outvstoreCategoryList', this.result);
  1206. localStorage.setItem('outvchainCode', this.chainCode);
  1207. this.onSearch();
  1208. },
  1209. tabChange(name) {
  1210. this.finished = true;
  1211. this.pageNum = 1;
  1212. this.list = [];
  1213. this.tabVal = name;
  1214. localStorage.setItem('tabVal', name);
  1215. this.onLoad();
  1216. },
  1217. // 滚动条与底部距离小于 offset 时触发 初始化会触发
  1218. onLoad() {
  1219. this.toastLoading(0, '加载中...', true);
  1220. // 授权
  1221. getTicketFun()
  1222. .then(() => {
  1223. getPosition(true)
  1224. .then((res) => {
  1225. let { TXisBD } = res;
  1226. this.lat = TXisBD.lat;
  1227. this.lon = TXisBD.lon;
  1228. if (this.tabVal == '1') {
  1229. this.getUserOutPlaListFun();
  1230. } else {
  1231. this.getUserOrgStoreList();
  1232. }
  1233. })
  1234. .catch((error) => {
  1235. this.$dialog.alert({
  1236. message: error,
  1237. });
  1238. });
  1239. })
  1240. .catch(() => {
  1241. this.finished = true;
  1242. });
  1243. },
  1244. // 跳转好帮手门店详情
  1245. goOtherSystem(item) {
  1246. if (item.chainCode) {
  1247. window.location.href =
  1248. process.env.VUE_APP_SSB_LINK +
  1249. '/order/customerDetail/index?customerCode=' +
  1250. item.mainCustomerCode;
  1251. } else {
  1252. this.$dialog.alert({
  1253. message: '缺少门店code',
  1254. });
  1255. }
  1256. },
  1257. login() {
  1258. if (this.num > 5) {
  1259. this.$router.push('/login');
  1260. } else {
  1261. this.num = this.num + 1;
  1262. }
  1263. },
  1264. linkList(val) {
  1265. getItemList({ chainCode: val.chainCode }).then((res) => {
  1266. if (res.code == 200) {
  1267. this.SKUDateShow = true;
  1268. this.SKUList = res.data;
  1269. } else {
  1270. this.$toast.fail(res.msg);
  1271. }
  1272. });
  1273. },
  1274. yu7Class(val) {
  1275. if (val == 1) {
  1276. return 'yu7Class yu71';
  1277. } else if (val == 2) {
  1278. return 'yu7Class yu72';
  1279. } else if (val == 3) {
  1280. return 'yu7Class yu73';
  1281. }
  1282. },
  1283. yu7Content(val) {
  1284. if (val == 1) {
  1285. return '已逾期1~30天(含)';
  1286. } else if (val == 2) {
  1287. return '已逾期31~90天(含)';
  1288. } else if (val == 3) {
  1289. return '已逾期91天及以上';
  1290. }
  1291. },
  1292. },
  1293. };
  1294. </script>
  1295. <style lang="scss" scoped>
  1296. .bgcolor {
  1297. background-color: #f5f5f5;
  1298. }
  1299. .card {
  1300. padding: 10px 16px;
  1301. box-sizing: border-box;
  1302. }
  1303. .card .title {
  1304. font-size: 15px;
  1305. font-weight: bold;
  1306. color: #333;
  1307. line-height: 22px;
  1308. padding-right: 52px;
  1309. }
  1310. .card .info {
  1311. font-size: 14px;
  1312. color: #909090;
  1313. line-height: 26px;
  1314. }
  1315. .btnbox {
  1316. padding-top: 14px;
  1317. border-top: 1px solid #eee;
  1318. margin: 0 10px;
  1319. }
  1320. .statstext {
  1321. background-color: #0057ba;
  1322. position: absolute;
  1323. right: 0;
  1324. top: 6px;
  1325. padding: 2px 6px 2px 12px;
  1326. border-bottom-left-radius: 60px;
  1327. border-top-left-radius: 60px;
  1328. color: #fff;
  1329. }
  1330. .cellcontent .van-cell {
  1331. padding-bottom: 10px;
  1332. }
  1333. .statstext .van-icon__image {
  1334. height: 0.7em;
  1335. }
  1336. .home {
  1337. height: 100%;
  1338. width: 100%;
  1339. display: flex;
  1340. flex-direction: column;
  1341. overflow: hidden;
  1342. .content {
  1343. flex: 1;
  1344. overflow: hidden;
  1345. padding: 10px 0;
  1346. .van-pull-refresh {
  1347. height: 100%;
  1348. overflow-y: auto;
  1349. .van-pull-refresh__track {
  1350. }
  1351. }
  1352. }
  1353. }
  1354. .monthVisited {
  1355. margin: 0px 10px;
  1356. .van-radio {
  1357. width: 50%;
  1358. margin: 3px 0;
  1359. }
  1360. }
  1361. </style>
  1362. <style lang="scss">
  1363. .van-tabs__nav--card .van-tab.van-tab--active {
  1364. background-color: #0057ba !important;
  1365. }
  1366. .zDialog .van-dialog__header {
  1367. padding: 10px;
  1368. border-bottom: 1px solid #f5f5f5;
  1369. }
  1370. .zDialog .infoText {
  1371. margin: 10px;
  1372. font-size: 14px;
  1373. color: #909090;
  1374. width: 98%;
  1375. }
  1376. .visitStoreIco {
  1377. float: left;
  1378. float: left;
  1379. width: 26px;
  1380. text-align: center;
  1381. background-color: #ffba13;
  1382. color: #fff;
  1383. border-radius: 100%;
  1384. margin-left: 14px;
  1385. line-height: 26px;
  1386. height: 26px;
  1387. }
  1388. .searchcheck {
  1389. padding: 0 10px 10px;
  1390. }
  1391. .searchcheck .van-checkbox {
  1392. /*width: 44%;*/
  1393. padding-bottom: 10px;
  1394. }
  1395. .searchcheck .checkbox {
  1396. font-size: 14px;
  1397. display: inline-block;
  1398. width: 50%;
  1399. line-height: 28px;
  1400. }
  1401. .searchcheck .checkbox .van-checkbox {
  1402. margin-bottom: 2px;
  1403. }
  1404. .searchcheck .checkbox1 {
  1405. font-size: 12px;
  1406. float: left;
  1407. line-height: 28px;
  1408. width: 50%;
  1409. }
  1410. .searchcheck .checkbox1 .child {
  1411. width: 100%;
  1412. }
  1413. .searchcheck {
  1414. /* height: 93vh;
  1415. overflow-y: auto; */
  1416. }
  1417. .searchchecktitle {
  1418. width: 100%;
  1419. margin: 20px 0;
  1420. font-size: 16px;
  1421. border-left: 3px solid #0057ba;
  1422. line-height: 18px;
  1423. }
  1424. .searchchecktitle1 {
  1425. width: 100%;
  1426. margin: 20px 0;
  1427. font-size: 16px;
  1428. line-height: 18px;
  1429. }
  1430. .textsize {
  1431. font-size: 14px;
  1432. /* overflow: hidden; */
  1433. display: flex;
  1434. flex-direction: column;
  1435. .searchcheck {
  1436. flex: 1;
  1437. overflow-y: auto;
  1438. margin-bottom: 50px;
  1439. }
  1440. }
  1441. .home {
  1442. .TCFXListItem {
  1443. display: inline-block;
  1444. border: 1px solid #ccc;
  1445. padding: 3px 5px;
  1446. margin: 0 5px;
  1447. border-radius: 6px;
  1448. }
  1449. }
  1450. .van-dialog__confirm,
  1451. .van-dialog__confirm:active {
  1452. color: #0057ba;
  1453. }
  1454. .searchDiv {
  1455. .van-search {
  1456. background: #fff;
  1457. }
  1458. .van-search__action {
  1459. font-size: 14px;
  1460. color: #0057ba;
  1461. font-weight: bold;
  1462. background: #f1f1f1;
  1463. border-bottom-right-radius: 60px;
  1464. border-top-right-radius: 60px;
  1465. border: 1px solid #ccc;
  1466. padding: 0 20px;
  1467. }
  1468. .van-search--show-action {
  1469. padding-right: 12px;
  1470. }
  1471. .van-search__content {
  1472. border: 1px solid #ccc;
  1473. border-bottom-left-radius: 60px;
  1474. border-top-left-radius: 60px;
  1475. background: #f1f1f1;
  1476. border-right: 0;
  1477. }
  1478. }
  1479. .myTab {
  1480. .van-tabs__nav--card {
  1481. margin: 0 !important;
  1482. border-left: 0;
  1483. border-right: 0;
  1484. }
  1485. .van-tabs__wrap,
  1486. .van-tabs__nav--card {
  1487. height: 39px;
  1488. }
  1489. .van-tab {
  1490. line-height: 40px;
  1491. }
  1492. }
  1493. .myList {
  1494. padding-bottom: 50px;
  1495. .van-cell {
  1496. padding: 0;
  1497. &:after {
  1498. border-bottom: none;
  1499. }
  1500. }
  1501. }
  1502. .el-dialog__wrapper {
  1503. z-index: 9999 !important;
  1504. display: flex;
  1505. justify-content: center;
  1506. align-items: center;
  1507. background: rgba(0, 0, 0, 0.5) !important;
  1508. .SKUDateTable {
  1509. overflow: hidden;
  1510. display: flex;
  1511. flex-direction: column;
  1512. max-height: 70%;
  1513. margin-top: 0 !important;
  1514. .el-dialog__header {
  1515. height: 40px;
  1516. display: flex;
  1517. justify-content: right;
  1518. .el-dialog__headerbtn {
  1519. position: static !important;
  1520. }
  1521. }
  1522. .el-dialog__body {
  1523. padding: 30px 20px !important;
  1524. overflow-y: auto;
  1525. flex: 1;
  1526. }
  1527. .cell {
  1528. font-size: 12px;
  1529. }
  1530. }
  1531. }
  1532. .shipped {
  1533. min-width: 100px;
  1534. text-align: center;
  1535. }
  1536. .fsqDelivery {
  1537. width: auto !important;
  1538. min-width: auto;
  1539. text-align: center;
  1540. }
  1541. .yu71 {
  1542. background-color: #610000 !important;
  1543. }
  1544. .yu72 {
  1545. background-color: #450202 !important;
  1546. }
  1547. .yu73 {
  1548. background-color: #1d2129 !important;
  1549. }
  1550. .yu71 .popper__arrow::after {
  1551. border-bottom-color: #610000 !important;
  1552. border-top-color: #610000 !important;
  1553. }
  1554. .yu72 .popper__arrow::after {
  1555. border-bottom-color: #450202 !important;
  1556. border-top-color: #450202 !important;
  1557. }
  1558. .yu73 .popper__arrow::after {
  1559. border-bottom-color: #1d2129 !important;
  1560. border-top-color: #1d2129 !important;
  1561. }
  1562. .yu7Class {
  1563. color: #fff !important;
  1564. padding: 8px 10px !important;
  1565. z-index: 1 !important;
  1566. border-radius: 20px !important;
  1567. border: 0 !important;
  1568. box-shadow: none !important;
  1569. }
  1570. .yu7Class p {
  1571. margin: 0;
  1572. }
  1573. .myPopover {
  1574. min-width: 100px;
  1575. width: auto;
  1576. }
  1577. </style>