module_visit.html 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219
  1. {extend name="public/layout" /} {block name="title"}跟进设置{/block} {block name="body"}
  2. <style type="text/css">
  3. html,
  4. body {
  5. display: block;
  6. width: 100%;
  7. height: 100%;
  8. width: calc(100% - 6px);
  9. }
  10. .lay-main {
  11. background-color: #EEEEEE;
  12. width: 100%;
  13. height: 100%;
  14. }
  15. .flex {
  16. display: flex;
  17. }
  18. .lay-leftBox {
  19. width: 360px;
  20. height: 97%;
  21. background-color: #fff;
  22. margin: 10px 13px 10px;
  23. box-sizing: border-box;
  24. padding: 10px;
  25. }
  26. .lay-rightBox {
  27. width: calc(100% - 400px);
  28. height: 97%;
  29. background-color: #fff;
  30. margin-top: 10px;
  31. margin-left: 0px;
  32. box-sizing: border-box;
  33. padding: 10px;
  34. }
  35. .lay-leftTips {
  36. width: 100%;
  37. height: 18px;
  38. line-height: 18px;
  39. border-left: 5px solid #249EFB;
  40. box-sizing: border-box;
  41. padding-left: 6px;
  42. }
  43. .lay-rightTips {
  44. width: 100%;
  45. height: 20px;
  46. display: flex;
  47. align-items: center;
  48. }
  49. .labelIcon {
  50. width: 5px;
  51. height: 18px;
  52. border-radius: 2px;
  53. background-color: #249EFB;
  54. }
  55. .valid {
  56. color: #249EFB;
  57. font-weight: 700;
  58. }
  59. .ml6 {
  60. margin-left: 6px;
  61. }
  62. .layui-border-blue,
  63. .layui-border-blue:hover {
  64. color: #249EFB;
  65. border-color: #249EFB;
  66. }
  67. .visitlistBox {
  68. width: 100%;
  69. padding: 10px;
  70. display: flex;
  71. flex-wrap: wrap;
  72. }
  73. .visitItemBox {
  74. flex: 1;
  75. }
  76. .layui-border-black {
  77. margin: 0px 5px 6px !important;
  78. position: relative;
  79. }
  80. .lay-close {
  81. position: absolute;
  82. top: -15px;
  83. right: -10px;
  84. z-index: 99 !important;
  85. }
  86. .fieldBox {
  87. width: 100%;
  88. display: flex;
  89. box-sizing: border-box;
  90. padding: 10px 0px;
  91. height: 80%;
  92. }
  93. .fieldLeftBox {
  94. width: 60%;
  95. box-sizing: border-box;
  96. }
  97. .fieldRightBox {
  98. flex: 1;
  99. margin-left: 10px;
  100. box-sizing: border-box;
  101. }
  102. .fieldTitle {
  103. font-size: 13px;
  104. color: #333333;
  105. font-weight: 600;
  106. line-height: 25px;
  107. }
  108. .fieldViewBox {
  109. border: 1px solid #EEEEEE;
  110. padding: 5px;
  111. border-radius: 4px;
  112. box-sizing: border-box;
  113. height: 550px;
  114. overflow: auto;
  115. }
  116. /*里面的代码可以根据自己需求去进行更改*/
  117. /* 设置滚动条的样式 */
  118. .fieldViewBox::-webkit-scrollbar {
  119. width: 4px;
  120. }
  121. /* 滚动槽 */
  122. .fieldViewBox::-webkit-scrollbar-track {
  123. -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.3);
  124. border-radius: 0px;
  125. }
  126. /* 滚动条滑块 */
  127. .fieldViewBox::-webkit-scrollbar-thumb {
  128. border-radius: 10px;
  129. background: #cccccc;
  130. -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.5);
  131. }
  132. .searchBox {
  133. width: 100%;
  134. height: 40px;
  135. border: 1px solid #EEEEEE;
  136. border-radius: 4px;
  137. box-sizing: border-box;
  138. padding: 0px 10px;
  139. display: flex;
  140. align-items: center;
  141. }
  142. .searchBox>input {
  143. flex: 1;
  144. height: 100%;
  145. margin-left: 10px;
  146. outline: none;
  147. border: none;
  148. }
  149. .selectFieldBox {
  150. width: 100%;
  151. height: auto;
  152. overflow: hidden;
  153. box-sizing: border-box;
  154. padding: 10px 0px 10px;
  155. display: flex;
  156. flex-wrap: wrap;
  157. }
  158. .layui-icon-ok:before {
  159. font-size: 12px !important;
  160. }
  161. .layui-form-checkbox {
  162. margin-bottom: 5px;
  163. }
  164. .sortItemBox {
  165. width: 100%;
  166. height: 40px;
  167. display: flex;
  168. align-items: center;
  169. justify-content: space-between;
  170. background-color: #fff;
  171. }
  172. .sortLeft>img {
  173. width: 16px;
  174. }
  175. .sortRight>img {
  176. width: 16px;
  177. }
  178. .moveElement {
  179. cursor: move;
  180. }
  181. .fixed-btn {
  182. width: 100%;
  183. box-sizing: border-box;
  184. padding: 10px 10px;
  185. display: flex;
  186. justify-content: flex-end;
  187. border-top: 1px solid #cccccc;
  188. margin-top: 45px;
  189. }
  190. .fieldItem {
  191. width: 50%;
  192. }
  193. .checkedDel {
  194. cursor: pointer;
  195. }
  196. .layui-icon-search {
  197. cursor: pointer;
  198. }
  199. .allCheckedField {
  200. padding-top: 10px;
  201. }
  202. .layui-form {
  203. height: 100%;
  204. }
  205. .fixed-btn {
  206. width: 30% !important;
  207. padding: 0 !important;
  208. margin-top: 0 !important;
  209. border-top: 0 !important;
  210. }
  211. .fieldViewBox {
  212. height: 94% !important;
  213. }
  214. .clue_tag_item {
  215. margin: 0 5px 10px 5px !important;
  216. }
  217. .lay-rightBox {
  218. overflow-y: auto !important;
  219. }
  220. .imgview {
  221. width: 100%;
  222. box-sizing: border-box;
  223. padding: 10px 20px;
  224. }
  225. .layleftcontent {
  226. width: 100%;
  227. margin-top: 20px;
  228. height: calc(100% - 50px);
  229. overflow-y: auto;
  230. overflow-x: hidden;
  231. position: relative;
  232. }
  233. /*里面的代码可以根据自己需求去进行更改*/
  234. /* 设置滚动条的样式 */
  235. .layleftcontent::-webkit-scrollbar {
  236. width: 2px;
  237. }
  238. /* 滚动槽 */
  239. .layleftcontent::-webkit-scrollbar-track {
  240. -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.3);
  241. border-radius: 0px;
  242. }
  243. /* 滚动条滑块 */
  244. .layleftcontent::-webkit-scrollbar-thumb {
  245. border-radius: 1px;
  246. background: #cccccc;
  247. -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.5);
  248. }
  249. .leftHeader {
  250. width: 100%;
  251. height: 40px;
  252. background-color: #71c4ff;
  253. color: #fff;
  254. display: flex;
  255. align-items: center;
  256. box-sizing: border-box;
  257. padding: 0px 10px;
  258. }
  259. .leftHeaderText {
  260. width: calc(100% - 80px);
  261. display: flex;
  262. align-items: center;
  263. }
  264. .rightHeaderIcon {
  265. width: 80px;
  266. display: flex;
  267. align-items: center;
  268. justify-content: flex-end;
  269. }
  270. .leftHeaderTab {
  271. width: 100%;
  272. height: 42px;
  273. display: flex;
  274. align-items: center;
  275. }
  276. .leftHeaderTab>div {
  277. flex: 1;
  278. height: 100%;
  279. display: flex;
  280. justify-content: center;
  281. align-items: center;
  282. }
  283. .leftActive {
  284. color: #249EFB;
  285. font-weight: 600;
  286. position: relative;
  287. }
  288. .leftActive::after {
  289. content: " ";
  290. width: 100%;
  291. height: 4px;
  292. background-color: #249EFB;
  293. border-radius: 2px;
  294. position: absolute;
  295. bottom: 0px;
  296. left: 0px;
  297. }
  298. .leftItemBox1 {
  299. width: 100%;
  300. height: 42px;
  301. display: flex;
  302. align-items: center;
  303. border-bottom: 1px solid #e7f1f7;
  304. font-size: 13px;
  305. }
  306. .leftLabel1 {
  307. width: 80px;
  308. height: 100%;
  309. display: flex;
  310. align-items: center;
  311. }
  312. .leftContent1 {
  313. width: calc(100% - 80px);
  314. height: 100%;
  315. display: flex;
  316. align-items: center;
  317. }
  318. .leftContent1>div {
  319. flex: 1;
  320. display: flex;
  321. justify-content: flex-start;
  322. align-items: center;
  323. }
  324. .ml5 {
  325. margin-left: 5px;
  326. }
  327. .leftItemBox2 {
  328. width: 100%;
  329. height: auto;
  330. box-sizing: border-box;
  331. padding: 10px;
  332. background-color: #f0f4f7;
  333. font-size: 13px;
  334. margin-top: 10px;
  335. border-radius: 2px;
  336. }
  337. .leftItemContent2 {
  338. margin-top: 10px;
  339. width: 100%;
  340. height: 60px;
  341. font-size: 13px;
  342. color: #999999;
  343. box-sizing: border-box;
  344. padding: 10px;
  345. background-color: #fff;
  346. }
  347. .leftCustomField {
  348. width: 100%;
  349. height: auto;
  350. overflow: hidden;
  351. box-sizing: border-box;
  352. padding: 10px;
  353. }
  354. .layinputtext {
  355. width: 100%;
  356. height: 40px;
  357. border-bottom: 1px solid #DEEAF1;
  358. display: flex;
  359. font-size: 13px;
  360. }
  361. .textlabel {
  362. width: 150px;
  363. height: 100%;
  364. line-height: 40px;
  365. }
  366. .textinput {
  367. width: calc(100% - 150px);
  368. height: 100%;
  369. line-height: 40px;
  370. }
  371. .radiocontent {
  372. width: calc(100% - 150px);
  373. height: 100%;
  374. display: flex;
  375. }
  376. .radiocontent>div {
  377. flex: 1;
  378. display: flex;
  379. justify-content: flex-start;
  380. align-items: center;
  381. }
  382. .gradecontent {
  383. width: calc(100% - 150px);
  384. height: 100%;
  385. display: flex;
  386. align-items: center;
  387. }
  388. .gradecontent>span {
  389. flex: none;
  390. display: inline-block;
  391. padding: 2px 8px;
  392. height: 18px;
  393. border: 1px solid #9DB6CF;
  394. font-size: 13px;
  395. margin-right: 5px;
  396. }
  397. .selectContent {
  398. width: calc(100% - 150px);
  399. height: 100%;
  400. display: flex;
  401. align-items: center;
  402. justify-content: space-between;
  403. }
  404. .selectContent>img {
  405. width: 8px;
  406. }
  407. .dateContent {
  408. width: calc(100% - 150px);
  409. height: 100%;
  410. display: flex;
  411. align-items: center;
  412. justify-content: space-between;
  413. }
  414. .dateContent>img {
  415. width: 14px;
  416. }
  417. .leftlineMiddle {
  418. width: 100%;
  419. height: 10px;
  420. background-color: #f0f4f7;
  421. margin-top: 20px;
  422. }
  423. .leftnextDateBox {
  424. width: 100%;
  425. height: auto;
  426. overflow: hidden;
  427. padding: 20px 0px;
  428. }
  429. .leftNextDateContent {
  430. width: 100%;
  431. height: 42px;
  432. display: flex;
  433. align-items: center;
  434. }
  435. .leftNextDateContent>div {
  436. flex: 1;
  437. height: 100%;
  438. display: flex;
  439. align-items: center;
  440. justify-content: center;
  441. font-size: 12px;
  442. }
  443. .leftSubmitBtn {
  444. width: 95%;
  445. height: 40px;
  446. background-color: #249EFB;
  447. color: #fff;
  448. text-align: center;
  449. line-height: 40px;
  450. margin: 20px auto 20px;
  451. }
  452. .leftProgressBox {
  453. width: 100%;
  454. }
  455. .leftProgressHeader {
  456. width: 100%;
  457. height: 30px;
  458. display: flex;
  459. align-items: center;
  460. justify-content: space-between;
  461. color: #249EFB;
  462. font-size: 13px;
  463. box-sizing: border-box;
  464. padding: 0px 10px;
  465. margin-bottom: 20px;
  466. }
  467. .leftpItemBox {
  468. width: 100%;
  469. height: auto;
  470. overflow: hidden;
  471. position: relative;
  472. padding: 0px 10px;
  473. }
  474. .circle {
  475. width: 10px;
  476. height: 10px;
  477. background-color: #fddde1;
  478. position: absolute;
  479. left: 0px;
  480. top: 3px;
  481. border-radius: 50%;
  482. display: flex;
  483. align-items: center;
  484. justify-content: center;
  485. z-index: 9;
  486. }
  487. .circle1 {
  488. width: 7px;
  489. height: 7px;
  490. background-color: #f54d64;
  491. border-radius: 50%;
  492. }
  493. .leftlinep1 {
  494. width: 1px;
  495. height: 100%;
  496. border-left: 1px dotted #b6cade;
  497. position: absolute;
  498. left: 4px;
  499. top: 8px;
  500. }
  501. .leftpBoxMsg {
  502. width: 80%;
  503. height: 60px;
  504. background-color: #fff;
  505. box-shadow: 0 3px 5px 0 rgb(36 158 251 / 17%);
  506. margin: 20px 0px 20px 20px;
  507. border-left: 3px solid #f54d64;
  508. border-top: 0.5px solid #f54d64;
  509. border-radius: 6px;
  510. box-sizing: border-box;
  511. padding: 5px;
  512. }
  513. .leftpBoxtop {
  514. width: 100%;
  515. display: flex;
  516. align-items: center;
  517. font-size: 12px;
  518. position: relative;
  519. }
  520. .leftpBoxBottom {
  521. font-size: 12px;
  522. margin-top: 10px;
  523. }
  524. .visitBoxp {
  525. position: absolute;
  526. padding: 2px 5px;
  527. background-color: #f0f4f7;
  528. color: #249EFB;
  529. border-radius: 10px;
  530. right: 0px;
  531. top: 0px;
  532. font-size: 12px;
  533. }
  534. .circle3 {
  535. width: 7px;
  536. height: 7px;
  537. background-color: #f54d64;
  538. border-radius: 50%;
  539. position: absolute;
  540. left: 1px;
  541. top: 55%;
  542. transform: translateY(-50%);
  543. }
  544. .layui-form-checked[lay-skin=primary] i {
  545. border-color: #249EFB;
  546. background-color: #249EFB;
  547. }
  548. .class_disabled .layui-form-checkbox[lay-skin=primary] i {
  549. border-color: #c2c2c2 !important;
  550. background-color: #c2c2c2 !important;
  551. }
  552. </style>
  553. <body>
  554. <div class="lay-main flex">
  555. <div class="lay-leftBox">
  556. <div class="lay-leftTips">手机端示例</div>
  557. <div class="layleftcontent">
  558. <div class="leftHeader">
  559. <div class="leftHeaderText">李逍遥 | XXX小区 | 200㎡</div>
  560. <div class="rightHeaderIcon">
  561. <img src="__STATIC__/img/collect.png" width="16px" alt="">
  562. </div>
  563. </div>
  564. <div class="leftHeaderTab">
  565. <div class="leftActive">客户跟踪</div>
  566. <div>信息完善</div>
  567. <div>客户转化</div>
  568. <div>客户预约</div>
  569. </div>
  570. <div class="leftItemBox1">
  571. <div class="leftLabel1">跟踪方式</div>
  572. <div class="leftContent1">
  573. <div>
  574. <img src="https://o.nczyzs.com/xcx/unselected.png" width="15px" height="15px" alt="">
  575. <span class="ml5">微信</span>
  576. </div>
  577. <div>
  578. <img src="https://o.nczyzs.com/xcx/unselected.png" width="15px" height="15px" alt="">
  579. <span class="ml5">电话</span>
  580. </div>
  581. <div>
  582. <img src="https://o.nczyzs.com/xcx/unselected.png" width="15px" height="15px" alt="">
  583. <span class="ml5">其他</span>
  584. </div>
  585. </div>
  586. </div>
  587. <div class="leftItemBox1">
  588. <div class="leftLabel1">线索状态</div>
  589. <div class="leftContent1">
  590. <div>
  591. <img src="https://o.nczyzs.com/xcx/unselected.png" width="15px" height="15px" alt="">
  592. <span class="ml5">待确认</span>
  593. </div>
  594. <div>
  595. <img src="https://o.nczyzs.com/xcx/unselected.png" width="15px" height="15px" alt="">
  596. <span class="ml5">有效线索</span>
  597. </div>
  598. <div>
  599. <img src="https://o.nczyzs.com/xcx/unselected.png" width="15px" height="15px" alt="">
  600. <span class="ml5">无效线索</span>
  601. </div>
  602. </div>
  603. </div>
  604. <div class="leftItemBox2">
  605. <div class="leftItemText2">
  606. </div>
  607. <div class="leftItemContent2">请输入跟进内容</div>
  608. </div>
  609. <div class="leftCustomField"></div>
  610. <div class="leftlineMiddle"></div>
  611. <div class="leftnextDateBox">
  612. <div>设置下次回访时间</div>
  613. <div class="leftNextDateContent">
  614. <div>
  615. <img src="https://o.nczyzs.com/xcx/unselected.png" width="15px" height="15px" alt="">
  616. <span class="ml5">今天</span>
  617. </div>
  618. <div>
  619. <img src="https://o.nczyzs.com/xcx/unselected.png" width="15px" height="15px" alt="">
  620. <span class="ml5">1天后</span>
  621. </div>
  622. <div>
  623. <img src="https://o.nczyzs.com/xcx/unselected.png" width="15px" height="15px" alt="">
  624. <span class="ml5">3天后</span>
  625. </div>
  626. <div>
  627. <img src="https://o.nczyzs.com/xcx/unselected.png" width="15px" height="15px" alt="">
  628. <span class="ml5">7天后</span>
  629. </div>
  630. <div style="width: 80px !important;flex: none !important;">
  631. <img src="https://o.nczyzs.com/xcx/unselected.png" width="15px" height="15px" alt="">
  632. <span class="ml5">其他时间</span>
  633. </div>
  634. </div>
  635. </div>
  636. <div class="leftSubmitBtn">提交本次跟踪数据</div>
  637. <div class="leftProgressBox">
  638. <div class="leftProgressHeader">
  639. <span>客户跟踪记录</span>
  640. <span>回访次数:3次</span>
  641. </div>
  642. <div class="leftpItemBox">
  643. <div class="circle">
  644. <div class="circle1"></div>
  645. </div>
  646. <div class="ml5">2022-12-02</div>
  647. <div class="leftlinep1"></div>
  648. <div class="leftpBoxMsg">
  649. <div class="leftpBoxtop">
  650. <img src="__STATIC__/img/default.png" width="18px" height="18px" alt="">
  651. <span class="ml5">销售:李XX</span>
  652. <span class="ml5">11:50:12</span>
  653. <span class="visitBoxp">未到访</span>
  654. </div>
  655. <div class="leftpBoxBottom">这是一段跟踪记录</div>
  656. <div class="circle3"></div>
  657. </div>
  658. </div>
  659. <div class="leftpItemBox">
  660. <div class="circle">
  661. <div class="circle1"></div>
  662. </div>
  663. <div class="ml5">2022-12-02</div>
  664. <div class="leftlinep1"></div>
  665. <div class="leftpBoxMsg">
  666. <div class="leftpBoxtop">
  667. <img src="__STATIC__/img/default.png" width="18px" height="18px" alt="">
  668. <span class="ml5">销售:李XX</span>
  669. <span class="ml5">11:24:12</span>
  670. <span class="visitBoxp">未到访</span>
  671. </div>
  672. <div class="leftpBoxBottom">这是一段跟踪记录</div>
  673. <div class="circle3"></div>
  674. </div>
  675. </div>
  676. <div class="leftpItemBox">
  677. <div class="circle">
  678. <div class="circle1"></div>
  679. </div>
  680. <div class="ml5">2022-12-02</div>
  681. <div class="leftlinep1"></div>
  682. <div class="leftpBoxMsg">
  683. <div class="leftpBoxtop">
  684. <img src="__STATIC__/img/default.png" width="18px" height="18px" alt="">
  685. <span class="ml5">销售:李XX</span>
  686. <span class="ml5">11:12:12</span>
  687. <span class="visitBoxp">未到访</span>
  688. </div>
  689. <div class="leftpBoxBottom">这是一段跟踪记录</div>
  690. <div class="circle3"></div>
  691. </div>
  692. </div>
  693. </div>
  694. </div>
  695. </div>
  696. <div class="lay-rightBox">
  697. <form class="layui-form" action="">
  698. <div class="lay-rightTips">
  699. <div class="labelIcon"></div>
  700. <span class="ml6">快速跟进设置</span>
  701. </div>
  702. <div class="visitlistBox">
  703. <div class="layui-btn layui-btn-primary layui-border-blue layui-btn-sm" id="addClueTag">+添加</div>
  704. <div class="visitItemBox">
  705. </div>
  706. </div>
  707. <div class="lay-rightTips">
  708. <div class="labelIcon"></div>
  709. <span class="ml6">跟进字段设置</span>
  710. </div>
  711. <div class="fieldBox">
  712. <div class="fieldLeftBox">
  713. <div class="fieldTitle" id="visitAllField"></div>
  714. <div class="fieldViewBox">
  715. <div class="searchBox">
  716. <i class="layui-icon layui-icon-search"></i>
  717. <input type="text" id="allFieldInput" autocomplete="off">
  718. </div>
  719. <div class="allCheckedField">
  720. <input lay-filter="checkedAll" name="all" title="全选" type="checkbox" lay-skin="primary">
  721. </div>
  722. <div class="selectFieldBox">
  723. </div>
  724. </div>
  725. </div>
  726. <div class="fieldRightBox">
  727. <div class="fieldTitle" id="checkedFieldEl"></div>
  728. <div class="fieldViewBox" id="scrollTargetEl">
  729. <div class="searchBox">
  730. <i class="layui-icon layui-icon-search"></i>
  731. <input type="text" id="checkedSearchEl" autocomplete="off">
  732. </div>
  733. <div class="checkedFieldBox" id="checkedFieldBox">
  734. </div>
  735. </div>
  736. </div>
  737. </div>
  738. <div class="lay-default" style="overflow: hidden;padding-bottom: 30px;">
  739. <div class="layui-btn layui-btn-primary" id="recoveryDefault" style="float:left;">恢复默认</div>
  740. <div class="fixed-btn" style="float:right;">
  741. <div class="layui-btn layui-btn-primary">取消</div>
  742. <div class="layui-btn layui-btn-normal" lay-submit lay-filter="layuiadmin-app-form-submit">确认</div>
  743. </div>
  744. </div>
  745. </form>
  746. </div>
  747. </div>
  748. </body>
  749. {/block} {block name="js"}
  750. <script type="text/javascript" src="__STATIC__/js/Sortable.js"></script>
  751. <script>
  752. layui.config({
  753. base: '__LAYUI__/' //静态资源所在路径
  754. ,
  755. urlbase: '/sys'
  756. }).extend({
  757. index: 'lib/index' //主入口模块
  758. }).use(['index', 'table', 'layedit', 'element', 'upload'], function () {
  759. var $ = layui.$,
  760. table = layui.table,
  761. element = layui.element,
  762. upload = layui.upload,
  763. form = layui.form,
  764. clueTagArr = [],
  765. visitFieldAll = [],
  766. checkedArr = [],
  767. defaultArr = [];
  768. form.render();
  769. getClueTags();
  770. function getClueTags() {
  771. $.ajax({
  772. type: "get",
  773. url: "{:url('customerSetting/clueTag')}",
  774. data: {},
  775. dataType: 'json',
  776. success: function (res) {
  777. if (res.code == 0) {
  778. clueTagArr = res.data;
  779. renderClueTagsHtml(clueTagArr);
  780. setClueTagRenderHtml(clueTagArr);
  781. }
  782. }
  783. })
  784. }
  785. function setClueTagRenderHtml(dataArr) {
  786. let htmls = dataArr.map((item, index) => {
  787. return `<span>${item}</span>
  788. ${index != dataArr.length ? '<span> | </span>' : ''}`;
  789. }).join('');
  790. $('.leftItemText2').html(htmls);
  791. }
  792. function setExampleHtml(dataArr) {
  793. let htmls = dataArr.map(v => {
  794. if (v.type == 1) {
  795. return `<div class="layinputtext">
  796. <div class="textlabel">${v.name}</div>
  797. <div class="textinput">请输入</div>
  798. </div>`;
  799. } else if (v.type == 2) {
  800. return `<div class="layinputtext">
  801. <div class="textlabel">${v.name}</div>
  802. <div class="textinput">请输入</div>
  803. </div>`;
  804. } else if (v.keyname == 'level') {
  805. return `<div class="layinputtext">
  806. <div class="textlabel">${v.name}</div>
  807. <div class="gradecontent">
  808. ${v.select.map(o => {
  809. return `<span>${o.name}类</span>`;
  810. }).join('')}
  811. </div>
  812. </div>`;
  813. } else if (v.type == 3 && v.select.length == 2) {
  814. return `<div class="layinputtext">
  815. <div class="textlabel">${v.name}</div>
  816. <div class="radiocontent">
  817. ${v.select.map(o => {
  818. return `<div>
  819. <img src="https://o.nczyzs.com/xcx/unselected.png" width="15px" alt="">
  820. <span style="margin-left: 5px;">${o.name}</span>
  821. </div>`;
  822. }).join('')}
  823. </div>
  824. </div>`;
  825. } else if (v.type == 3 && v.select.length > 2 && v.keyname != 'level') {
  826. return `<div class="layinputtext">
  827. <div class="textlabel">${v.name}</div>
  828. <div class="selectContent">
  829. <span>请选择</span>
  830. <img src="__STATIC__/img/cjtimg.png" alt="">
  831. </div>
  832. </div>`;
  833. } else if (v.type == 4) {
  834. return `<div class="layinputtext">
  835. <div class="textlabel">${v.name}</div>
  836. <div class="selectContent">
  837. <span>请选择</span>
  838. <img src="__STATIC__/img/cjtimg.png" alt="">
  839. </div>
  840. </div>`;
  841. } else if (v.type == 5) {
  842. return `<div class="layinputtext">
  843. <div class="textlabel">${v.name}</div>
  844. <div class="dateContent">
  845. <span>请选择</span>
  846. <img src="__STATIC__/img/rili.png" alt="">
  847. </div>
  848. </div>`;
  849. } else if (v.type == 6) {
  850. return `<div class="layinputtext">
  851. <div class="textlabel">${v.name}</div>
  852. <div class="dateContent">
  853. <span></span>
  854. <img src="__STATIC__/img/addimg.png" alt="">
  855. </div>
  856. </div>`;
  857. }
  858. }).join('');
  859. $('.leftCustomField').html(htmls);
  860. }
  861. function renderClueTagsHtml(tags) {
  862. let htmls = tags.map((item, index) => {
  863. return `<div data-index="${index}" class="layui-btn layui-btn-primary layui-border-black layui-btn-sm clue_tag_item">${item}<i
  864. class="layui-icon layui-icon-close-fill lay-close" data-index="${index}"></i></div>`;
  865. }).join('');
  866. $('.visitItemBox').html(htmls);
  867. setTimeout(() => {
  868. $('.lay-close').click(function (e) {
  869. let idx = parseInt($(this).prop('dataset').index);
  870. clueTagArr.splice(idx, 1);
  871. renderClueTagsHtml(clueTagArr);
  872. submitTabClue();
  873. e.stopPropagation();
  874. })
  875. $('.clue_tag_item').click(function (e) {
  876. let idx = parseInt($(this).prop('dataset').index);
  877. layer.prompt({
  878. formType: 0,
  879. value: clueTagArr[idx],
  880. title: '编辑',
  881. }, function (value, index, elem) {
  882. clueTagArr[idx] = value;
  883. renderClueTagsHtml(clueTagArr);
  884. submitTabClue();
  885. layer.close(index);
  886. });
  887. e.stopPropagation();
  888. })
  889. }, 600)
  890. }
  891. $('#addClueTag').click(function () {
  892. layer.prompt({
  893. formType: 0,
  894. value: '',
  895. title: '添加',
  896. }, function (value, index, elem) {
  897. clueTagArr.push(value);
  898. renderClueTagsHtml(clueTagArr);
  899. layer.close(index);
  900. submitTabClue();
  901. });
  902. })
  903. function submitTabClue() {
  904. $.ajax({
  905. url: '{:url("customerSetting/clueTagEdit")}',
  906. type: 'post',
  907. data: {
  908. content: clueTagArr
  909. },
  910. dataType: 'json',
  911. success: function (res) {
  912. if (res.code === 0) {
  913. layer.msg(res.msg, { anim: 0 });
  914. } else {
  915. layer.msg(res.msg, { anim: 6 });
  916. }
  917. }
  918. });
  919. }
  920. getVisitFiled();
  921. function getVisitFiled() {
  922. $.ajax({
  923. type: "get",
  924. url: "{:url('customerSetting/moduleField')}",
  925. data: {
  926. type: "visit"
  927. },
  928. dataType: 'json',
  929. success: function (res) {
  930. if (res.code == 0) {
  931. visitFieldAll = res.all;
  932. checkedArr = res.checked;
  933. defaultArr = res.default;
  934. renderVisitFieldHtmls(visitFieldAll);
  935. renderCheckedFieldHtmls(checkedArr);
  936. setExampleHtml(checkedArr);
  937. }
  938. }
  939. })
  940. }
  941. function renderVisitFieldHtmls(fields) {
  942. $('#visitAllField').text(`可选择字段(共${fields.length}个)`);
  943. let htmls = fields.map((item, index) => {
  944. return `<div class="fieldItem ${item.other_checked == 1 ? 'class_disabled' : ''}">${item.other_checked == 1 ? `<input lay-filter="checkboxs" disabled checked class="visitFieldElement${item.id}" type="checkbox" ${(returnCheckedStatus(item.id)) ? 'checked' : ''} name="otherField" value="${item.id}" title="${item.name}" lay-skin="primary">` : `<input lay-filter="checkboxs" class="visitFieldElement${item.id}" type="checkbox" ${(returnCheckedStatus(item.id)) ? 'checked' : ''} name="visit" value="${item.id}" title="${item.name}" lay-skin="primary">`}</div>`;
  945. }).join('');
  946. $('.selectFieldBox').html(htmls);
  947. setTimeout(() => {
  948. form.render();
  949. form.on('checkbox(checkboxs)', function (data) {
  950. if (data.elem.checked) {
  951. let OneValue = [];
  952. $(`input:checkbox[name='visit']:checked`).each(function (i) {
  953. OneValue.push({ id: $(this).val(), name: $(this).prop('title') });
  954. });
  955. let itemArr = [];
  956. OneValue.forEach(k => {
  957. let item = checkedArr.filter(o => o.id == k.id);
  958. if (!item.length) {
  959. itemArr.push(k)
  960. }
  961. })
  962. checkedArr.push(...itemArr);
  963. renderCheckedFieldHtmls(checkedArr);
  964. } else {
  965. checkedArr.forEach((y, i) => {
  966. if (data.value == y.id) {
  967. checkedArr.splice(i, 1);
  968. renderCheckedFieldHtmls(checkedArr);
  969. return;
  970. }
  971. })
  972. }
  973. })
  974. form.on('checkbox(checkedAll)', function (data) {
  975. if (data.elem.checked) {
  976. $(`input:checkbox[name='visit']`).each(function (i) {
  977. $(this).prop('checked', true);
  978. });
  979. checkedArr = visitFieldAll;
  980. renderCheckedFieldHtmls(checkedArr);
  981. form.render();
  982. } else {
  983. checkedArr = [];
  984. renderCheckedFieldHtmls(checkedArr);
  985. $(`input:checkbox[name='visit']:checked`).each(function (i) {
  986. $(this).prop('checked', false);
  987. });
  988. form.render();
  989. }
  990. })
  991. }, 600);
  992. }
  993. function renderCheckedFieldHtmls(checkedFields) {
  994. $('#checkedFieldEl').text(`已选择字段(共${checkedFields.length}个)`);
  995. let htmls = checkedFields.map((item, index) => {
  996. return `<div data-id="${item.id}" class="sortItemBox">
  997. <div data-id="${item.id}" class="sortLeft">
  998. <img data-id="${item.id}" class="moveElement" src="/static/img/move.png" alt="">
  999. <span data-id="${item.id}" class="getSortName">${item.name}</span>
  1000. </div>
  1001. <div data-id="${item.id}" class="sortRight">
  1002. <img data-id="${item.id}" src="/static/img/sTop.png" alt="">
  1003. <img data-id="${item.id}" src="/static/img/sDel.png" class="checkedDel" alt="">
  1004. </div>
  1005. </div>`;
  1006. }).join('');
  1007. $('.checkedFieldBox').html(htmls);
  1008. setTimeout(() => {
  1009. new Sortable($('.checkedFieldBox')[0], {
  1010. handle: '.moveElement', // handle's class
  1011. animation: 150
  1012. });
  1013. $('.sortRight').click(function () {
  1014. var ops1 = {
  1015. draggable: ".sortItemBox",
  1016. onChoose: function (evt) {
  1017. var index = evt.oldIndex;
  1018. $("#checkedFieldBox .sortItemBox").eq(index).insertBefore($("#checkedFieldBox .sortItemBox").eq(0));
  1019. }
  1020. };
  1021. var sortable1 = Sortable.create($('.checkedFieldBox')[0], ops1);
  1022. })
  1023. $('.checkedDel').click(function () {
  1024. let id = $(this).prop('dataset').id;
  1025. $(this).parent().parent().remove();
  1026. checkedArr.forEach((item, index) => {
  1027. if (item.id == id) {
  1028. $(`.visitFieldElement${id}`).removeAttr('checked');
  1029. checkedArr.splice(index, 1);
  1030. form.render();
  1031. return;
  1032. }
  1033. })
  1034. })
  1035. }, 600);
  1036. }
  1037. function returnCheckedStatus(vid) {
  1038. let ids = checkedArr.map(v => parseInt(v.id));
  1039. return ids.includes(parseInt(vid));
  1040. }
  1041. $('#checkedSearchEl').on('keyup', function (e) {
  1042. let val = $(this).val();
  1043. if (e.keyCode == 13 && val) {
  1044. let eleArr = $('.getSortName');
  1045. eleArr.each(function (index) {
  1046. let name = $(this).text();
  1047. if (name === val || name.indexOf(val) > -1) {
  1048. $('#scrollTargetEl').scrollTop((parseInt(index) + 1) * 40);
  1049. return;
  1050. }
  1051. })
  1052. }
  1053. });
  1054. $('#allFieldInput').on('keyup', function (e) {
  1055. let val = $(this).val();
  1056. if (e.keyCode == 13) {
  1057. if (val) {
  1058. let itemArr = visitFieldAll.filter(item => {
  1059. if (val == item.name || item.name.search(val) > -1) {
  1060. return item;
  1061. }
  1062. })
  1063. renderVisitFieldHtmls(itemArr);
  1064. } else {
  1065. renderVisitFieldHtmls(visitFieldAll);
  1066. }
  1067. }
  1068. })
  1069. $('#recoveryDefault').click(function () {
  1070. layer.confirm('确定要恢复默认设置吗?', { title: '提示' }, function (index) {
  1071. checkedArr = defaultArr;
  1072. renderVisitFieldHtmls(visitFieldAll);
  1073. renderCheckedFieldHtmls(checkedArr);
  1074. layer.close(index);
  1075. });
  1076. })
  1077. /* 监听提交 */
  1078. form.on('submit(layuiadmin-app-form-submit)', function (obj) {
  1079. let getCheckedField = $('.sortItemBox');
  1080. let itemArr = [];
  1081. getCheckedField.each(function (i) {
  1082. let id = $(this).prop('dataset').id;
  1083. itemArr.push({ id: id, sort: i + 1 });
  1084. })
  1085. $.ajax({
  1086. url: '{:url("customerSetting/moduleVisit")}',
  1087. type: 'post',
  1088. data: {
  1089. content: itemArr
  1090. },
  1091. dataType: 'json',
  1092. success: function (res) {
  1093. if (res.code === 0) {
  1094. layer.msg(res.msg, { anim: 0 });
  1095. setTimeout(() => {
  1096. window.parent.reloadFunc();
  1097. }, 1000)
  1098. } else {
  1099. layer.msg(res.msg, { anim: 6 });
  1100. }
  1101. }
  1102. });
  1103. return false;
  1104. });
  1105. });
  1106. </script>
  1107. {/block}