general_statistics.html 86 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966
  1. {extend name="public/layout"} {block name="body"}
  2. <link rel="stylesheet" href="__LAYUI__/layui/css/layui.css" media="all" />
  3. <link rel="stylesheet" href=" /static/css/common.css" />
  4. <script src="/static/js/jquery.min.js"></script>
  5. <style>
  6. body {
  7. padding-bottom: 40px;
  8. }
  9. .searchtitlebox {
  10. display: block;
  11. padding: 15px 10px;
  12. border: 1px solid #f0f0f0;
  13. background: #fcfcfc;
  14. margin-top: 5px;
  15. margin-bottom: 10px;
  16. /* position: relative; */
  17. min-width: 800px;
  18. }
  19. .searchbox {
  20. display: block;
  21. margin-top: 8px;
  22. text-align: center;
  23. }
  24. .searchbox input {
  25. display: inline-block;
  26. height: 26px;
  27. line-height: 26px;
  28. padding-left: 3px;
  29. vertical-align: middle;
  30. border: 2px solid #4479ba;
  31. }
  32. body {
  33. font-size: 12px;
  34. font-family: "宋体";
  35. }
  36. .searchbox .searchbtn {
  37. display: inline-block;
  38. float: right;
  39. border: none;
  40. width: 98px;
  41. height: 30px;
  42. color: #fff;
  43. font-size: 14px;
  44. font-weight: bold;
  45. text-align: center;
  46. background: url(__STATIC__/img/icon-sub.png) no-repeat;
  47. cursor: pointer;
  48. vertical-align: middle;
  49. }
  50. .selectbox {
  51. float: left;
  52. }
  53. .leftselect {
  54. float: left;
  55. height: 26px;
  56. line-height: 26px;
  57. }
  58. .selectbox select {
  59. float: left;
  60. height: 26px;
  61. }
  62. .searchtext {
  63. border: 1px solid #ccc;
  64. background: #fff url(__STATIC__/img/icon071402.png) no-repeat;
  65. padding: 1px 2px;
  66. height: 24px;
  67. line-height: 24px;
  68. vertical-align: middle;
  69. text-indent: 3px;
  70. margin-left: 4px;
  71. }
  72. .searchbtn1 {
  73. margin-left: 4px;
  74. cursor: pointer;
  75. color: #000;
  76. background: url(__STATIC__/img/btn_bg.gif) repeat-x;
  77. border: 1px solid #c0c0c0;
  78. padding: 0 12px;
  79. *padding: 0 6px;
  80. height: 26px;
  81. }
  82. .layui-table td,
  83. .layui-table th {
  84. font-size: 12px;
  85. }
  86. .layui-table th {
  87. font-weight: bold;
  88. }
  89. .dingjingorder {
  90. height: 25px;
  91. width: 40px;
  92. background-color: #65c001;
  93. color: #fff;
  94. text-align: center;
  95. line-height: 25px;
  96. z-index: 100;
  97. display: block;
  98. position: absolute;
  99. top: 1px;
  100. right: 3px;
  101. border-radius: 11px;
  102. font-size: 12px;
  103. }
  104. .addvx {
  105. position: absolute;
  106. top: -5px;
  107. right: 1px;
  108. height: 14px;
  109. line-height: 14px;
  110. font-size: 16px;
  111. color: #666;
  112. font-family: "宋体";
  113. }
  114. .statebox {
  115. width: 40px;
  116. text-align: center;
  117. z-index: 100;
  118. display: block;
  119. position: absolute;
  120. font-size: 12px;
  121. top: -5px;
  122. right: 0px;
  123. border-radius: 0px;
  124. background: #4285f4;
  125. color: #efefef;
  126. height: 20px;
  127. line-height: 20px;
  128. }
  129. .layui-table-cell {
  130. overflow: initial;
  131. }
  132. #customer_detail {
  133. display: block;
  134. width: 435px;
  135. height: 100%;
  136. position: fixed;
  137. top: 0;
  138. left: 0;
  139. bottom: 0;
  140. }
  141. .rightbox {
  142. display: block;
  143. width: calc(100% - 435px);
  144. margin-left: 435px;
  145. }
  146. .unstatusbox {
  147. display: block;
  148. position: absolute;
  149. top: -5px;
  150. left: 0;
  151. width: 100%;
  152. height: 37px;
  153. background-color: #ff6600;
  154. text-align: center;
  155. color: #fff;
  156. }
  157. .statusbox {
  158. position: absolute;
  159. top: 0px;
  160. right: 0px;
  161. color: #666;
  162. text-align: right;
  163. z-index: 100;
  164. display: block;
  165. font-size: 12px;
  166. }
  167. .layui-table-view .layui-form-checkbox {
  168. width: 16px;
  169. height: 16px;
  170. line-height: 16px;
  171. padding-right: 0;
  172. }
  173. .layui-table-view .layui-form-checkbox i {
  174. height: 16px;
  175. width: 16px;
  176. font-size: 14px;
  177. }
  178. .novisitlog {
  179. background-color: #9139db !important;
  180. color: #fff;
  181. }
  182. .novisitlog a {
  183. color: #fff;
  184. }
  185. .crmsearchlist {
  186. max-height: 760px;
  187. cursor: pointer;
  188. }
  189. .tablebox .layui-form.layui-border-box.layui-table-view {
  190. max-height: 760px !important;
  191. height: auto !important;
  192. }
  193. .layui-table-body {
  194. /* max-height: 670px !important; */
  195. height: auto !important;
  196. }
  197. .layui-table-view .layui-table td {
  198. cursor: pointer;
  199. overflow: hidden;
  200. }
  201. .layui-form-checked {
  202. background-color: #37af6e;
  203. }
  204. .layui-table-view .layui-form-checked i {
  205. color: #fff;
  206. }
  207. .layui-table-cell {
  208. overflow: hidden;
  209. }
  210. .searchbox .layui-form-select {
  211. float: left;
  212. width: 130px;
  213. }
  214. .searchbox input {
  215. border: 1px solid #e6e6e6 !important;
  216. }
  217. .totalBox {
  218. width: 100%;
  219. height: 100px;
  220. border: 1px solid #f2f2f2;
  221. display: flex;
  222. align-items: center;
  223. }
  224. .totalBox > div {
  225. flex: 1;
  226. display: flex;
  227. flex-direction: column;
  228. align-items: center;
  229. justify-content: center;
  230. }
  231. .totalName {
  232. font-size: 16px;
  233. color: #999999;
  234. }
  235. .totalNum {
  236. font-size: 20px;
  237. font-weight: 600;
  238. }
  239. .totalline {
  240. flex: none !important;
  241. width: 1px !important;
  242. height: 50px !important;
  243. background-color: #f2f2f2;
  244. }
  245. .ml5 {
  246. margin-left: 5px;
  247. }
  248. .cursor {
  249. cursor: pointer;
  250. margin-bottom: 8px;
  251. position: relative;
  252. }
  253. .cursor > .layui-form-select {
  254. width: 115px;
  255. display: inline-block;
  256. }
  257. .cursor > .layui-form-select > .layui-select-title {
  258. border: none;
  259. }
  260. .cursor > .layui-form-select > .layui-select-title > input {
  261. border: none;
  262. color: #333333;
  263. font-weight: 600;
  264. }
  265. /* .layui-table-fixed-r .layui-table-body {
  266. overflow: hidden !important;
  267. } */
  268. .relative {
  269. position: relative;
  270. }
  271. .lay-setting {
  272. position: absolute;
  273. right: 10px;
  274. top: 10px;
  275. z-index: 999 !important;
  276. cursor: pointer;
  277. }
  278. .lay-mask {
  279. width: 100%;
  280. height: 100%;
  281. background-color: rgba(0, 0, 0, 0.3);
  282. position: fixed;
  283. top: 0px;
  284. left: 0px;
  285. z-index: 9999 !important;
  286. }
  287. .lay-block {
  288. width: 400px;
  289. height: 100%;
  290. background-color: #fff;
  291. position: absolute;
  292. right: 0px;
  293. top: 0px;
  294. box-sizing: border-box;
  295. padding: 10px 10px 30px 10px;
  296. overflow: auto;
  297. }
  298. .lay-title {
  299. width: 100%;
  300. height: 40px;
  301. display: flex;
  302. align-items: center;
  303. justify-content: space-between;
  304. }
  305. .lay-title > span {
  306. font-size: 16px;
  307. color: #333333;
  308. font-weight: 600;
  309. }
  310. .lay-title > i {
  311. font-weight: 600;
  312. cursor: pointer;
  313. }
  314. .layui-content {
  315. width: 100%;
  316. height: auto;
  317. }
  318. .lay-item {
  319. width: 100%;
  320. height: 50px;
  321. /* display: flex;
  322. align-items: center;
  323. justify-content: space-between; */
  324. }
  325. .lay-item > div {
  326. display: flex;
  327. align-items: center;
  328. }
  329. .lay-item > div > span {
  330. margin-left: 6px;
  331. }
  332. .sort_lis01 {
  333. float: left;
  334. }
  335. .sort_lis02 {
  336. float: right;
  337. }
  338. .sort_time {
  339. overflow: hidden;
  340. }
  341. .layui-form-switch i {
  342. top: 2px !important;
  343. }
  344. .relative {
  345. position: relative;
  346. }
  347. .selectDateBox {
  348. position: absolute;
  349. width: 330px;
  350. height: 100px;
  351. box-shadow: 0 2px 4px rgb(0 0 0 / 12%);
  352. background-color: #fff;
  353. z-index: 99999 !important;
  354. top: 45px;
  355. box-sizing: border-box;
  356. padding: 5px 8px;
  357. }
  358. .selecstDateBox {
  359. position: absolute;
  360. width: 330px;
  361. height: 100px;
  362. box-shadow: 0 2px 4px rgb(0 0 0 / 12%);
  363. background-color: #fff;
  364. z-index: 99999 !important;
  365. top: 45px;
  366. right: 0;
  367. box-sizing: border-box;
  368. padding: 5px 8px;
  369. }
  370. .date-flex,
  371. .date-flex1 {
  372. display: flex;
  373. align-items: center;
  374. }
  375. .date-box {
  376. padding: 15px 0px 10px;
  377. }
  378. .line-middle {
  379. width: 10px;
  380. height: 100%;
  381. margin: 0px 10px;
  382. }
  383. .line {
  384. width: 10px;
  385. height: 2px;
  386. background-color: #999999;
  387. }
  388. .mb0 {
  389. margin-bottom: 0px;
  390. }
  391. .layui-btn {
  392. background-color: #fff;
  393. color: #555;
  394. border: 1px solid #c9c9c9;
  395. }
  396. .layui-btn:hover {
  397. background-color: #fff;
  398. color: #555;
  399. border: 1px solid #249efb;
  400. }
  401. .layui-btn-primary,
  402. .sBtn {
  403. background-color: #249efb;
  404. color: #fff;
  405. border: 1px solid #249efb;
  406. }
  407. .layui-btn-primary:hover {
  408. background-color: #249efb;
  409. color: #fff;
  410. border: 1px solid #249efb;
  411. }
  412. .sBtn:hover {
  413. background-color: #249efb;
  414. color: #fff;
  415. border: 1px solid #249efb;
  416. }
  417. .flex-row,
  418. .row {
  419. display: flex;
  420. }
  421. .align-center {
  422. align-items: center;
  423. }
  424. .ml10 {
  425. margin-left: 10px;
  426. }
  427. .mt10 {
  428. margin-top: 10px;
  429. }
  430. .padding-tlr {
  431. padding: 15px 15px 0px;
  432. }
  433. .layui-input-block {
  434. margin-left: 0px;
  435. }
  436. .justify-between {
  437. justify-content: space-between;
  438. }
  439. .qdtj_m {
  440. padding: 0 15px;
  441. width: 100%;
  442. box-sizing: border-box;
  443. margin: 20px 0 10px;
  444. }
  445. .qdtj_ul {
  446. overflow: hidden;
  447. border: 1px solid #94d0ff;
  448. padding: 15px 0;
  449. background-color: #fbfdff;
  450. }
  451. .qdtj_ul li {
  452. float: left;
  453. position: relative;
  454. text-align: center;
  455. width: 10%;
  456. }
  457. .qdtj_1 {
  458. font-size: 20px;
  459. font-weight: 400;
  460. }
  461. .qdtj_2 {
  462. font-size: 14px;
  463. color: #888;
  464. margin-top: 5px;
  465. }
  466. .qdtj_r_x {
  467. height: 40px;
  468. width: 1px;
  469. background: #d8d8d9;
  470. position: absolute;
  471. right: 0;
  472. top: 50%;
  473. margin-top: -20px;
  474. }
  475. ::-webkit-scrollbar {
  476. width: auto;
  477. height: auto;
  478. }
  479. ::-webkit-scrollbar-thumb {
  480. border-radius: 10px;
  481. -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
  482. background: #dfdfdf;
  483. }
  484. ::-webkit-scrollbar-track {
  485. -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
  486. border-radius: 10px;
  487. background: #f5f5f5;
  488. }
  489. .backPreLevel {
  490. color: #249efb;
  491. cursor: pointer;
  492. margin-right: 10px;
  493. }
  494. th .layui-table-cell {
  495. height: 38px;
  496. line-height: 38px;
  497. padding: 0;
  498. overflow: unset;
  499. }
  500. .layui-table-header {
  501. overflow: visible;
  502. }
  503. .psinput {
  504. top: 45px;
  505. left: 50%;
  506. margin-left: -118px;
  507. width: 236px;
  508. background: #fff;
  509. z-index: 999 !important;
  510. position: absolute;
  511. box-shadow: 0 1px 10px #999;
  512. display: none;
  513. border-radius: 6px;
  514. overflow: visible;
  515. padding-top: 10px;
  516. }
  517. .dsa {
  518. width: 100%;
  519. height: 100%;
  520. display: block;
  521. }
  522. .pdl12 {
  523. padding-left: 12px;
  524. }
  525. .search_btns {
  526. margin-top: 11px;
  527. border-top: 1px solid #ccc;
  528. }
  529. .search_btns div.button_ {
  530. display: flex;
  531. width: 80%;
  532. overflow: hidden;
  533. margin: 0 auto;
  534. justify-content: space-between;
  535. }
  536. .scroll_body {
  537. overflow-x: auto;
  538. width: calc(100% - -17px);
  539. }
  540. .layui-table-body {
  541. min-height: 500px;
  542. overflow: visible;
  543. }
  544. .layui-form-select dl {
  545. z-index: 100;
  546. }
  547. .kwovsint {
  548. width: 90%;
  549. height: 40px;
  550. display: block;
  551. border: 1px solid #409eff;
  552. border-radius: 6px;
  553. }
  554. .checkbox {
  555. width: 20px;
  556. height: 20px;
  557. margin-top: 15px;
  558. display: block;
  559. float: left;
  560. }
  561. .checkdeta {
  562. width: 20px;
  563. height: 20px;
  564. margin-top: 15px;
  565. display: block;
  566. float: left;
  567. }
  568. .psinput .layui-form-checkbox {
  569. display: block;
  570. float: left;
  571. width: 20px;
  572. height: 20px;
  573. padding: 0;
  574. }
  575. .psinput .layui-form-checkbox .layui-icon {
  576. display: block;
  577. float: left;
  578. width: 20px !important;
  579. height: 20px !important;
  580. border: 1px solid #d2d2d2 !important;
  581. top: 1px;
  582. }
  583. .psinput .layui-form-checkbox .layui-icon::before {
  584. position: absolute;
  585. top: 2px;
  586. left: 3px;
  587. font-size: 14px;
  588. }
  589. .check_ul_list {
  590. max-height: 300px;
  591. overflow-y: auto;
  592. }
  593. .check_li {
  594. width: 90%;
  595. margin: 0 auto;
  596. overflow: hidden;
  597. }
  598. .check_li li {
  599. overflow: hidden;
  600. margin-bottom: 15px;
  601. }
  602. .check_name {
  603. float: left;
  604. line-height: 20px;
  605. font-size: 14px;
  606. margin-left: 8px;
  607. }
  608. .dsnone .layui-form-checkbox {
  609. position: absolute;
  610. width: 25px;
  611. height: 28px;
  612. margin-top: 8px;
  613. visibility: hidden;
  614. }
  615. .button_ a {
  616. position: relative;
  617. }
  618. .triangle {
  619. width: 0;
  620. height: 0;
  621. float: left;
  622. border-bottom: 10px solid #fff;
  623. border-left: 10px solid transparent;
  624. border-right: 10px solid transparent;
  625. position: absolute;
  626. top: -10px;
  627. left: 50%;
  628. margin-left: -10px;
  629. }
  630. .psinput02 {
  631. width: 330px !important;
  632. margin-left: -165px !important;
  633. }
  634. .psinput02 > .selecstDateBox {
  635. position: inherit !important;
  636. box-shadow: none;
  637. margin-top: 5px;
  638. height: 80px !important;
  639. }
  640. .mapps {
  641. position: absolute;
  642. right: 3%;
  643. top: 13px;
  644. width: 16px;
  645. }
  646. .selectDateBox {
  647. position: absolute;
  648. width: 330px;
  649. height: 100px;
  650. box-shadow: 0 2px 4px rgb(0 0 0 / 12%);
  651. background-color: #fff;
  652. z-index: 99999 !important;
  653. top: 45px;
  654. box-sizing: border-box;
  655. padding: 5px 8px;
  656. }
  657. .selecstDateBox {
  658. position: absolute;
  659. width: 330px;
  660. height: 100px;
  661. box-shadow: 0 2px 4px rgb(0 0 0 / 12%);
  662. background-color: #fff;
  663. z-index: 99999 !important;
  664. top: 45px;
  665. right: 0;
  666. box-sizing: border-box;
  667. padding: 5px 8px;
  668. }
  669. .layui-form-select dl {
  670. z-index: 102 !important;
  671. }
  672. .crmsearchlist {
  673. margin-bottom: 50px;
  674. }
  675. strong {
  676. display: inline-block;
  677. width: 100%;
  678. height: 100%;
  679. }
  680. .hovers:hover {
  681. background-color:#d0af4c; font-weight:bold;
  682. }
  683. .layui-table-page {
  684. margin-bottom: 100px !important;
  685. }
  686. .mapps{position: absolute;right:3%;top:15px;width:12px;}
  687. </style>
  688. <body class="clearfix">
  689. <iframe id="customer_detail" style="display: none" src=""></iframe>
  690. <div class="crmbox">
  691. <div class="search-form layui-form padding-tlr" style="margin-bottom: 10px">
  692. <!-- <div class="flex-row align-center justify-between" style="overflow: hidden;"> -->
  693. <form id="reset_form">
  694. <div class="" style="">
  695. <div class="flex-row align-center" style="float: left">
  696. <!-- <div class="backPreLevel">
  697. <i class="layui-icon layui-icon-return"></i>返回
  698. </div> -->
  699. <div class="layui-input-block">
  700. <input
  701. type="text"
  702. class="layui-input"
  703. id="keyword"
  704. autocomplete="off"
  705. name="keyword"
  706. placeholder="请输入员工名称"
  707. />
  708. </div>
  709. <div class="layui-input-inline layui-form ml10">
  710. <select name="org_id" class="type_id" id="org_id" lay-search>
  711. <option value="">请选择部门</option>
  712. {volist name="org" id="i"}
  713. <option value="{$i.id}">{$i.name}</option>
  714. {/volist}
  715. </select>
  716. </div>
  717. <div class="layui-input-inline layui-form ml10">
  718. <select name="source" class="type_id" id="source_id" lay-search>
  719. <option value="">请选择来源</option>
  720. {volist name="source" id="i"}
  721. <option value="{$i.id}">{$i.source}</option>
  722. {/volist}
  723. </select>
  724. </div>
  725. <div
  726. class="layui-input-inline layui-form ml10"
  727. style="display: inline-block"
  728. >
  729. <!-- <label class="layui-form-label" style="width: 60px;">跟进时间</label> -->
  730. <div class="layui-input-inline select-date relative">
  731. <!-- 注意:这一层元素并不是必须的 -->
  732. <input
  733. type="text"
  734. class="layui-input"
  735. id="sDate"
  736. name="start_date"
  737. style="width:170px;"
  738. placeholder="开始日期 - 结束日期"
  739. autocomplete="off"
  740. />
  741. <div data-type="" class="selecstDateBox layui-hide">
  742. <div data-type="" class="date-flex1">
  743. <div
  744. data-type="today"
  745. class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs"
  746. >
  747. 今日
  748. </div>
  749. <div
  750. data-type="yesterday"
  751. class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs"
  752. >
  753. 昨日
  754. </div>
  755. <div
  756. data-type="week"
  757. class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs"
  758. >
  759. 本周
  760. </div>
  761. <div
  762. data-type="lastWeek"
  763. class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs"
  764. >
  765. 上周
  766. </div>
  767. <div
  768. data-type="month"
  769. class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs"
  770. >
  771. 本月
  772. </div>
  773. <div
  774. data-type="lastMonth"
  775. class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs"
  776. >
  777. 上月
  778. </div>
  779. <div
  780. data-type="all"
  781. class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs"
  782. >
  783. 累计
  784. </div>
  785. </div>
  786. <div data-type="" class="date-box">
  787. <input
  788. data-type=""
  789. type="text"
  790. id="select_sDate"
  791. placeholder="选择开始时间 - 结束时间"
  792. readonly
  793. autocomplete="off"
  794. class="layui-input"
  795. />
  796. </div>
  797. </div>
  798. </div>
  799. </div>
  800. </div>
  801. <div style="float: right">
  802. <button
  803. class="layui-btn sBtn ml10 submitbtn"
  804. id="searchbtn"
  805. type="button"
  806. lay-filter="table-search"
  807. >
  808. 筛选
  809. </button>
  810. <button type="reset" class="layui-btn sBtn ml10" id="resetbtn">
  811. 重置
  812. </button>
  813. </div>
  814. </div>
  815. </form>
  816. <div style="clear: both"></div>
  817. </div>
  818. <div class="crmsearchlist relative">
  819. <i class="layui-icon layui-icon-set-fill lay-setting"></i>
  820. <table lay-filter="crmsearchlist" id="crmsearchlist"></table>
  821. </div>
  822. </div>
  823. <!-- -->
  824. <div class="lay-mask layui-hide">
  825. <div class="lay-block">
  826. <div class="lay-title">
  827. <span>表格显示设置</span>
  828. <i class="layui-icon layui-icon-close"></i>
  829. </div>
  830. <div class="layui-content layui-form"></div>
  831. </div>
  832. </div>
  833. </body>
  834. <script src="__LAYUI__/layui/layui.js"></script>
  835. <script type="text/javascript" src="__STATIC__/js/Sortable.js"></script>
  836. {/block}{block name="js"}
  837. <script type="text/html" id="crmname">
  838. {{d.name?d.name:'未知'}} {{# if(d.jiaoding_time){ }}
  839. <span class="dingjingorder">定金</span>
  840. {{# }else{ }} {{# } }}
  841. </script>
  842. <script type="text/html" id="empname">
  843. {{# if(d.employee){ }} {{d.employee.name}} {{# if(d.add_wechat=='是'){ }}
  844. <span class="addvx">v</span>
  845. {{# }else{ }} {{# } }} {{# }else{ }}
  846. <span style="color: #cccccc;">无</span>
  847. {{# if(d.add_wechat=='是'){ }}
  848. <span class="addvx">v</span>
  849. {{# }else{ }} {{# } }} {{# } }}
  850. </script>
  851. <script type="text/html" id="square">
  852. {{# if(d.square>200){ }}
  853. <span style="font-weight: bold;color: #ff6600;">{{d.square}}</span>
  854. {{# }else if(d.square){ }}
  855. <span>{{d.square}}</span>
  856. {{# }else{ }}
  857. <span style="color: #cccccc;">无</span>
  858. {{# } }}
  859. </script>
  860. <script type="text/html" id="designer_name">
  861. {{# if(d.designer){ }}
  862. <span>{{d.designer.name}}</span>
  863. {{# }else{ }}
  864. <span style="color: #cccccc;">无</span>
  865. {{# } }}
  866. </script>
  867. <script type="text/html" id="source">
  868. {{# if(d.source){ }}
  869. <span>{{d.source.source}}</span>
  870. {{# }else{ }}
  871. <span style="color: #cccccc;">无</span>
  872. {{# } }}
  873. </script>
  874. <script type="text/html" id="status">
  875. {{# if(d.state=="待确认"){ }}
  876. <div class="unstatusbox" lay-event="unstatus">
  877. <input type="checkbox" class="redconfirm" />
  878. <span class="statusbox">{{d.time_status?d.time_status:'-'}}</span>
  879. </div>
  880. {{# }else if(d.visit_log_count==0){ }}
  881. <span style="color: #cccccc;">-</span>
  882. {{# }else { }}
  883. <span>{{d.time_status}}</span>
  884. {{# } }}
  885. </script>
  886. <script type="text/html" id="editbox">
  887. {{# if(d.state=="待确认" && d.is_followup == 1){ }}
  888. <a style="display:inline-block;" lay-event="edit" href="javascript:void(0);"
  889. >编辑</a
  890. >
  891. {{# }else { }} {{# if(d.is_followup == 1){ }}
  892. <a
  893. style="display:inline-block;"
  894. lay-event="editstate"
  895. href="javascript:void(0);"
  896. >状态</a
  897. ><span style="padding:0 4px;">/</span
  898. ><a lay-event="edit" style="display:inline-block;" href="javascript:void(0);"
  899. >编辑</a
  900. >
  901. {{# } }} {{# } }}
  902. </script>
  903. <script type="text/html" id="designer_nametpl">
  904. {{# if(d.designer){ }}
  905. <span>{{d.designer.name}}</span>
  906. {{# }else{ }}
  907. <span style="color: #cccccc;">无</span>
  908. {{# } }}
  909. </script>
  910. <script type="text/html" id="employee_nametpl">
  911. {{# if(d.employee){ }}
  912. <span>{{d.employee.name}}</span>
  913. {{# }else{ }}
  914. <span style="color: #cccccc;">无</span>
  915. {{# } }}
  916. </script>
  917. <script type="text/html" id="phone">
  918. <div>
  919. {{# if(d.phone){ }}
  920. <div>{{d.phone}}</div>
  921. {{# } }} {{# if(d.phone1){ }}
  922. <p>{{d.phone1}}</p>
  923. {{# } }} {{# if(d.phone2){ }}
  924. <p>{{d.phone2}}</p>
  925. {{# } }}
  926. </div>
  927. </script>
  928. <script type="text/html" id="stateTpl">
  929. {{# if(d.allstate){ }}
  930. <span>{{d.allstate}}</span>
  931. {{# }else{ }}
  932. <span style="color: #cccccc;">无</span>
  933. {{# } }}
  934. </script>
  935. <script type="text/html" id="level">
  936. {{# if(d.level){ }}
  937. <span>{{d.level}}</span>
  938. {{# }else{ }}
  939. <span style="color: #cccccc;">无</span>
  940. {{# } }}
  941. </script>
  942. <script type="text/html" id="last_contact_date">
  943. {{# if(d.last_contact_date){ }}
  944. <span>{{d.last_contact_date}}</span>
  945. {{# }else{ }}
  946. <span style="color: #cccccc;">无</span>
  947. {{# } }}
  948. </script>
  949. <script type="text/html" id="revisit_time">
  950. {{# if(d.revisit_time){ }} {{# if(d.revisit_time =='0000-00-00'){ }}
  951. <span style="color: #cccccc;">无</span>
  952. {{# }else{ }}
  953. <span>{{d.revisit_time}}</span>
  954. {{# } }} {{# }else{ }}
  955. <span style="color: #cccccc;">无</span>
  956. {{# } }}
  957. </script>
  958. <script type="text/html" id="protectTpl">
  959. {{# if(d.protected_to){ }}
  960. <span>{{d.protected_to}}</span>
  961. {{# }else{ }}
  962. <span style="color: #cccccc;">无</span>
  963. {{# } }}
  964. </script>
  965. <script type="text/html" id="add_wechat_count">
  966. {{# if(d.add_wechat_count){ }}
  967. <strong
  968. href="javascript:void(0)"
  969. lay-event="add_wechat_count"
  970. style="color:blue;"
  971. >{{d.add_wechat_count}}</strong
  972. >
  973. {{# }else{ }}
  974. <span>{{d.add_wechat_count}}</span>
  975. {{# } }}
  976. </script>
  977. <script type="text/html" id="follow_customer_count">
  978. {{# if(d.follow_customer_count){ }}
  979. <strong
  980. href="javascript:void(0)"
  981. lay-event="follow_customer_count"
  982. style="color:blue;"
  983. >{{d.follow_customer_count}}</strong
  984. >
  985. {{# }else{ }}
  986. <span>{{d.follow_customer_count}}</span>
  987. {{# } }}
  988. </script>
  989. <script type="text/html" id="valid_count">
  990. {{# if(d.valid_count){ }}
  991. <strong
  992. href="javascript:void(0)"
  993. lay-event="valid_count"
  994. style="color:blue;"
  995. >{{d.valid_count}}</strong
  996. >
  997. {{# }else{ }}
  998. <span>{{d.valid_count}}</span>
  999. {{# } }}
  1000. </script>
  1001. <script type="text/html" id="not_sure_count">
  1002. {{# if(d.not_sure_count){ }}
  1003. <strong
  1004. href="javascript:void(0)"
  1005. lay-event="not_sure_count"
  1006. style="color:blue;"
  1007. >{{d.not_sure_count}}</strong
  1008. >
  1009. {{# }else{ }}
  1010. <span>{{d.not_sure_count}}</span>
  1011. {{# } }}
  1012. </script>
  1013. <script type="text/html" id="yixiang_assigned_count">
  1014. {{# if(d.yixiang_assigned_count){ }}
  1015. <strong
  1016. href="javascript:void(0)"
  1017. lay-event="yixiang_assigned_count"
  1018. style="color:blue;"
  1019. >{{d.yixiang_assigned_count}}</strong
  1020. >
  1021. {{# }else{ }}
  1022. <span>{{d.yixiang_assigned_count}}</span>
  1023. {{# } }}
  1024. </script>
  1025. <script type="text/html" id="daodian_assigned_count">
  1026. {{# if(d.daodian_assigned_count){ }}
  1027. <strong
  1028. href="javascript:void(0)"
  1029. lay-event="daodian_assigned_count"
  1030. style="color:blue;"
  1031. >{{d.daodian_assigned_count}}</strong
  1032. >
  1033. {{# }else{ }}
  1034. <span>{{d.daodian_assigned_count}}</span>
  1035. {{# } }}
  1036. </script>
  1037. <script type="text/html" id="measuring_assigned_count">
  1038. {{# if(d.measuring_assigned_count){ }}
  1039. <strong
  1040. href="javascript:void(0)"
  1041. lay-event="measuring_assigned_count"
  1042. style="color:blue;"
  1043. >{{d.measuring_assigned_count}}</strong
  1044. >
  1045. {{# }else{ }}
  1046. <span>{{d.measuring_assigned_count}}</span>
  1047. {{# } }}
  1048. </script>
  1049. <!-- <script type="text/html" id="measuring_room_customer">
  1050. {{# if(d.measuring_room_customer){ }}
  1051. <strong
  1052. href="javascript:void(0)"
  1053. lay-event="measuring_room_customer"
  1054. style="color:blue;"
  1055. >{{d.measuring_room_customer}}</strong
  1056. >
  1057. {{# }else{ }}
  1058. <span>{{d.measuring_room_customer}}</span>
  1059. {{# } }}
  1060. </script> -->
  1061. <script type="text/html" id="strtore_customer_count">
  1062. {{# if(d.strtore_customer_count){ }}
  1063. <strong
  1064. href="javascript:void(0)"
  1065. lay-event="strtore_customer_count"
  1066. style="color:blue;"
  1067. >{{d.strtore_customer_count}}</strong
  1068. >
  1069. {{# }else{ }}
  1070. <span>{{d.strtore_customer_count}}</span>
  1071. {{# } }}
  1072. </script>
  1073. <script type="text/html" id="sign_count">
  1074. {{# if(d.sign_count){ }}
  1075. <strong
  1076. href="javascript:void(0)"
  1077. lay-event="sign_count"
  1078. style="color:blue;"
  1079. >{{d.sign_count}}</strong
  1080. >
  1081. {{# }else{ }}
  1082. <span>{{d.sign_count}}</span>
  1083. {{# } }}
  1084. </script>
  1085. <script type="text/html" id="deposit_count">
  1086. {{# if(d.deposit_count){ }}
  1087. <strong
  1088. href="javascript:void(0)"
  1089. lay-event="deposit_count"
  1090. style="color:blue;"
  1091. >{{d.deposit_count}}</strong
  1092. >
  1093. {{# }else{ }}
  1094. <span>{{d.deposit_count}}</span>
  1095. {{# } }}
  1096. </script>
  1097. <script type="text/html" id="invalid_customer_count">
  1098. <span>{{d.invalid_customer_count}}</span>
  1099. <!-- {{# if(d.invalid_customer_count){ }}
  1100. <strong
  1101. href="javascript:void(0)"
  1102. lay-event="invalid_customer_count"
  1103. style="color:blue;"
  1104. >{{d.invalid_customer_count}}</strong
  1105. >
  1106. {{# }else{ }}
  1107. <span>{{d.invalid_customer_count}}</span>
  1108. {{# } }} -->
  1109. </script>
  1110. <script type="text/javascript">
  1111. var reload = null,
  1112. resizefun = null;
  1113. layui
  1114. .config({
  1115. base: "__LAYUI__/",
  1116. urlbase: "/sys",
  1117. })
  1118. .extend({
  1119. index: "lib/index", //主入口模块
  1120. })
  1121. .use(["table", "form", "laydate"], function () {
  1122. var table = layui.table,
  1123. laydate = layui.laydate,
  1124. $ = layui.$;
  1125. (form = layui.form), (fType = 1), (firstloading = 0);
  1126. var field = {};
  1127. var showKey = {
  1128. lf: { key: "measuring_room_customer", name: "量房数", search: false },
  1129. dd: { key: "to_the_store", name: "到店数", search: false },
  1130. wx: { key: "invalid_customer_count", name: "无效线索客户数", search: false },
  1131. mj: { key: "square", name: "面积", search: false },
  1132. fwzt: { key: "house_status", name: "房屋状态", search: false },
  1133. fwlx: { key: "house_type", name: "房屋类型", search: false },
  1134. ddpjzq: {key: "strtore_avg_days_1", name: "一次到店平均周期", search: false }
  1135. };
  1136. var valType = 2;
  1137. var orgId = "";
  1138. // if (is_manager != 1) {
  1139. // $('.totalBox').addClass('layui-hide');
  1140. // $('.topStyle1').removeClass('layui-hide');
  1141. // $('.topStyle2').addClass('layui-hide');
  1142. // }
  1143. // form.on('submit(search)', function (data) {
  1144. // var source_id = $('[name=source_id]').val();
  1145. // var designer_id = $('[name=designer_id]').val();
  1146. // var level = $('[name=level]').val();
  1147. // var keyname = $('[name=keyname]').val();
  1148. // var state = $('[name=state]').val();
  1149. // var addtime = $('[name=addtime]').val();
  1150. // var followtime = $('[name=followtime]').val();
  1151. // var employee_id = $('[name=employee_id]').val();
  1152. // field['keyname'] = keyname;
  1153. // field['source_id'] = source_id;
  1154. // field['designer_id'] = designer_id;
  1155. // field['level'] = level;
  1156. // field['state'] = state;
  1157. // field['addtime'] = addtime;
  1158. // field['followtime'] = followtime;
  1159. // field['employee_id'] = employee_id;
  1160. // //执行重载
  1161. // table.reload('crmsearchlist', {
  1162. // where: field
  1163. // , page: { curr: 1 }
  1164. // });
  1165. // // if (is_manager == 1) {
  1166. // // getStatistics();
  1167. // // getStatisticsMore();
  1168. // // }
  1169. // });
  1170. $("#searchbtn").click(function () {
  1171. firstloading = 0;
  1172. var keyword = $("#keyword").val();
  1173. var org_id = $("#org_id").val();
  1174. var source_id = $("#source_id").val();
  1175. let sDate = $("#sDate").val();
  1176. let option = {
  1177. where: {
  1178. keyword: keyword,
  1179. org_id: org_id,
  1180. source_id: source_id,
  1181. start_date: sDate,
  1182. type: valType,
  1183. },
  1184. page: {
  1185. curr: 1,
  1186. },
  1187. };
  1188. //执行重载
  1189. table.reload("crmsearchlist", option);
  1190. });
  1191. //重置
  1192. $("#resetbtn").click(function () {
  1193. firstloading = 0;
  1194. $("#keyword").val("");
  1195. $("#sDate").val("");
  1196. $("#org_id").val("");
  1197. $("#source_id").val("");
  1198. $("#reset_form")[0].reset();
  1199. layui.form.render();
  1200. let option = {
  1201. where: {
  1202. keyword: "",
  1203. start_date: "",
  1204. org_id: "",
  1205. source_id: "",
  1206. type: valType,
  1207. },
  1208. page: {
  1209. curr: 1,
  1210. },
  1211. };
  1212. table.reload("crmsearchlist", option);
  1213. });
  1214. $("#addWechatTime").click(function () {
  1215. $(".selectDateBox").toggleClass("layui-hide");
  1216. $(".selecstDateBox").addClass("layui-hide");
  1217. });
  1218. $("#sDate").click(function () {
  1219. $(".selecstDateBox").toggleClass("layui-hide");
  1220. $(".selectDateBox").addClass("layui-hide");
  1221. });
  1222. laydate.render({
  1223. elem: "#select_date",
  1224. type: "date",
  1225. range: true,
  1226. format: "yyyy/MM/dd",
  1227. trigger: "click", //呼出事件改成click
  1228. done: function (value, date, endDate) {
  1229. $(".selectDateBox").addClass("layui-hide");
  1230. $("#addWechatTime").val(value);
  1231. },
  1232. });
  1233. laydate.render({
  1234. elem: "#select_sDate", //指定元素
  1235. type: "date",
  1236. format: "yyyy/MM/dd",
  1237. range: true,
  1238. trigger: "click", //呼出事件改成click
  1239. done: function (value, date, endDate) {
  1240. $(".selecstDateBox").addClass("layui-hide");
  1241. $("#sDate").val(value);
  1242. },
  1243. });
  1244. var dateObj = {};
  1245. setDate();
  1246. function setDate() {
  1247. let date = new Date();
  1248. let year = date.getFullYear();
  1249. let month = date.getMonth() + 1;
  1250. let day = date.getDate();
  1251. let lastDate = new Date(new Date().getTime() - 1 * 24 * 60 * 60 * 1000);
  1252. let lastYear = lastDate.getFullYear();
  1253. let lastMonth = lastDate.getMonth() + 1;
  1254. let lastDay = lastDate.getDate();
  1255. let weekObj = getMondayAndSunday();
  1256. let monthObj = getMonthFirstDayAndLastDay();
  1257. dateObj = {
  1258. today: `${year}/${month}/${day}`,
  1259. yesterday: `${lastYear}/${lastMonth}/${lastDay}`,
  1260. ...weekObj,
  1261. ...monthObj,
  1262. };
  1263. }
  1264. // if (valType != 2) {
  1265. // $(".backPreLevel").addClass("layui-hide");
  1266. // $(".employeeEle").addClass("layui-hide");
  1267. // } else {
  1268. // $(".departEle").addClass("layui-hide");
  1269. // }
  1270. // $(".backPreLevel").click(function () {
  1271. // window.history.back();
  1272. // });
  1273. $(".date-flex div").click(function () {
  1274. let type = $(this).prop("dataset").type;
  1275. if (type == "today") {
  1276. $("#select_date").val(`${dateObj.today} - ${dateObj.today}`);
  1277. $("#addWechatTime").val(`${dateObj.today} - ${dateObj.today}`);
  1278. } else if (type == "yesterday") {
  1279. $("#select_date").val(`${dateObj.yesterday} - ${dateObj.yesterday}`);
  1280. $("#addWechatTime").val(
  1281. `${dateObj.yesterday} - ${dateObj.yesterday}`
  1282. );
  1283. } else if (type == "week") {
  1284. $("#select_date").val(
  1285. `${dateObj.thisWeekMonday} - ${dateObj.thisWeekSunday}`
  1286. );
  1287. $("#addWechatTime").val(
  1288. `${dateObj.thisWeekMonday} - ${dateObj.thisWeekSunday}`
  1289. );
  1290. } else if (type == "lastWeek") {
  1291. $("#select_date").val(
  1292. `${dateObj.lastWeekMonday} - ${dateObj.lastWeekSunday}`
  1293. );
  1294. $("#addWechatTime").val(
  1295. `${dateObj.lastWeekMonday} - ${dateObj.lastWeekSunday}`
  1296. );
  1297. } else if (type == "month") {
  1298. $("#select_date").val(
  1299. `${dateObj.thisMonthFirstDay} - ${dateObj.thisMonthLastDay}`
  1300. );
  1301. $("#addWechatTime").val(
  1302. `${dateObj.thisMonthFirstDay} - ${dateObj.thisMonthLastDay}`
  1303. );
  1304. } else if (type == "lastMonth") {
  1305. $("#select_date").val(
  1306. `${dateObj.lastMonthFirstDay} - ${dateObj.lastMonthLastDay}`
  1307. );
  1308. $("#addWechatTime").val(
  1309. `${dateObj.lastMonthFirstDay} - ${dateObj.lastMonthLastDay}`
  1310. );
  1311. } else {
  1312. $("#select_date").val("");
  1313. $("#sDate").val("");
  1314. $("#addWechatTime").val("");
  1315. }
  1316. $(".selectDateBox").addClass("layui-hide");
  1317. });
  1318. $(".date-flex1 div").click(function () {
  1319. let type = $(this).prop("dataset").type;
  1320. if (type == "today") {
  1321. itmesss = dateToYYYYMMDD(dateObj.today);
  1322. itmesss2 = dateToYYYYMMDD(dateObj.today);
  1323. $("#select_sDate").val(itmesss+' - '+itmesss2);
  1324. $("#sDate").val(itmesss+' - '+itmesss2);
  1325. } else if (type == "yesterday") {
  1326. itmesss = dateToYYYYMMDD(dateObj.yesterday);
  1327. itmesss2 = dateToYYYYMMDD(dateObj.yesterday);
  1328. $("#select_sDate").val(itmesss+' - '+itmesss2);
  1329. $("#sDate").val(itmesss+' - '+itmesss2);
  1330. } else if (type == "week") {
  1331. $("#select_sDate").val(
  1332. `${dateObj.thisWeekMonday} - ${dateObj.thisWeekSunday}`
  1333. );
  1334. $("#sDate").val(
  1335. `${dateObj.thisWeekMonday} - ${dateObj.thisWeekSunday}`
  1336. );
  1337. } else if (type == "lastWeek") {
  1338. $("#select_sDate").val(
  1339. `${dateObj.lastWeekMonday} - ${dateObj.lastWeekSunday}`
  1340. );
  1341. $("#sDate").val(
  1342. `${dateObj.lastWeekMonday} - ${dateObj.lastWeekSunday}`
  1343. );
  1344. } else if (type == "month") {
  1345. $("#select_sDate").val(
  1346. `${dateObj.thisMonthFirstDay} - ${dateObj.thisMonthLastDay}`
  1347. );
  1348. $("#sDate").val(
  1349. `${dateObj.thisMonthFirstDay} - ${dateObj.thisMonthLastDay}`
  1350. );
  1351. } else if (type == "lastMonth") {
  1352. $("#select_sDate").val(
  1353. `${dateObj.lastMonthFirstDay} - ${dateObj.lastMonthLastDay}`
  1354. );
  1355. $("#sDate").val(
  1356. `${dateObj.lastMonthFirstDay} - ${dateObj.lastMonthLastDay}`
  1357. );
  1358. } else {
  1359. $("#select_sDate").val("");
  1360. $("#sDate").val("");
  1361. }
  1362. $(".selecstDateBox").addClass("layui-hide");
  1363. });
  1364. function getMondayAndSunday() {
  1365. var today = new Date();
  1366. //构建当前日期,格式:2022-08-22 00:00:00
  1367. var year = today.getFullYear(); //本年
  1368. var month = today.getMonth() + 1; //本月
  1369. var day = today.getDate(); //本日
  1370. var newDate = new Date(year + "/" + month + "/" + day + " 00:00:00"); //年月日拼接
  1371. var nowTime = newDate.getTime(); //当前的时间戳
  1372. var weekDay = newDate.getDay(); //当前星期 0.1.2.3.4.5.6 【0 = 周日】
  1373. var oneDayTime = 24 * 60 * 60 * 1000; //一天的总ms
  1374. // 当前星期减去天数,如今天为周五,则本周一为周五的时间戳减去4天的时间戳。但周日特殊,周一至周六是周几的到的weekDay就是几,但是周日的到的为0,需特殊处理
  1375. var thisWeekMondayTime = (1 - weekDay) * oneDayTime + nowTime; //本周一的时间戳
  1376. if (weekDay == 0) {
  1377. // weekDay = 0 为周日,此时本周一时间为周日减去6天的时间
  1378. thisWeekMondayTime = nowTime - 6 * oneDayTime;
  1379. }
  1380. var thisWeekSundayTime = thisWeekMondayTime + 6 * 24 * 60 * 60 * 1000; // 本周日
  1381. var lastWeekMondayTime = thisWeekMondayTime - 7 * oneDayTime; // 上周一
  1382. var lastWeekSundayTime = thisWeekMondayTime - oneDayTime; // 上周日
  1383. var res = {
  1384. thisWeekMonday: dateToYYYYMMDD(thisWeekMondayTime),
  1385. thisWeekSunday: dateToYYYYMMDD(thisWeekSundayTime),
  1386. lastWeekMonday: dateToYYYYMMDD(lastWeekMondayTime),
  1387. lastWeekSunday: dateToYYYYMMDD(lastWeekSundayTime),
  1388. };
  1389. return res;
  1390. }
  1391. function getMonthFirstDayAndLastDay() {
  1392. var date = new Date();
  1393. // 值得注意的是,如果day取值为0,意味着取的是date时间的上一个月的最后一天,简单理解:date当前月的第一天,再减去一天
  1394. var thisMonthFirstDay = date.setDate(1); // 本月第一天
  1395. var thisMonthLastDay = new Date(
  1396. date.getFullYear(),
  1397. date.getMonth() + 1,
  1398. 0
  1399. ); // 本月最后一天
  1400. var lastMonthFirstDay = new Date(
  1401. date.getFullYear(),
  1402. date.getMonth() - 1,
  1403. 1
  1404. ); // 上月第一天
  1405. var lastMonthLastDay = date.setDate(0); // 上月最后一天
  1406. // var day = new Date(date.getFullYear(), date.getMonth(), 0).getDate()
  1407. // var lastMonthLastDay = new Date(date.getFullYear(), date.getMonth() - 1, day) // 上月最后一天
  1408. var res = {
  1409. thisMonthFirstDay: dateToYYYYMMDD(thisMonthFirstDay),
  1410. thisMonthLastDay: dateToYYYYMMDD(thisMonthLastDay),
  1411. lastMonthFirstDay: dateToYYYYMMDD(lastMonthFirstDay),
  1412. lastMonthLastDay: dateToYYYYMMDD(lastMonthLastDay),
  1413. };
  1414. return res;
  1415. }
  1416. function dateToYYYYMMDD(date) {
  1417. var time = new Date(date);
  1418. var y = time.getFullYear();
  1419. var m = time.getMonth() + 1;
  1420. m = m > 9 ? m : "0" + m;
  1421. var d = time.getDate();
  1422. d = d > 9 ? d : "0" + d;
  1423. return y + "/" + m + "/" + d;
  1424. }
  1425. ajaxlist();
  1426. function ajaxlist() {
  1427. $('.date-flex1 div[data-type=month]').click();
  1428. $.ajax({
  1429. type: "post",
  1430. url: '{:url("empcrm/poolFieldsList")}',
  1431. data: {
  1432. type: 7,
  1433. is_org: valType || 1,
  1434. },
  1435. success: function (res) {
  1436. if(res.code == 403){
  1437. $(".exitbtn").trigger("click");
  1438. }
  1439. data = res.data;
  1440. tableData = data;
  1441. var cols = [[]];
  1442. $.each(data, function (key, val) {
  1443. if (key == "name") {
  1444. cols[0].push({
  1445. field: key,
  1446. title: val["name"],
  1447. minWidth: val["width"],
  1448. align: "center",
  1449. show: val["show"],
  1450. fixed: "left",
  1451. });
  1452. } else if (key == "org_name") {
  1453. cols[0].push({
  1454. field: key,
  1455. title: val["name"],
  1456. minWidth: val["width"],
  1457. align: "center",
  1458. show: val["show"],
  1459. fixed: "left",
  1460. templet: function (res) {
  1461. if (valType != 2) {
  1462. return `<a style="color:#249EFB;" href="generalStatistics.html?type=2&org_id=${res.org_id}">${res.org_name}</a>`;
  1463. } else {
  1464. return `<span>${res.org_name}</span>`;
  1465. }
  1466. },
  1467. });
  1468. } else if (key == "measuring_room_customer" && val["show"] == 1) {
  1469. cols[0].push({
  1470. field: showKey.lf.key,
  1471. title: showKey.lf.name,
  1472. minWidth: 150,
  1473. align: "center",
  1474. show: val["show"],
  1475. templet: function(res){
  1476. if(res[showKey.lf.key]){
  1477. return `<strong href="javascript:void(0)" lay-event="measuring_room_customer" style="color:blue;">${res[showKey.lf.key]}</strong>`
  1478. }else{
  1479. return `<span>${res[showKey.lf.key]}</span>`
  1480. }
  1481. }
  1482. });
  1483. } else if (key == "strtore_customer_count" && val["show"] == 1) {
  1484. cols[0].push({
  1485. field: key,
  1486. title: val['name'],
  1487. minWidth: 150,
  1488. align: "center",
  1489. show: val["show"],
  1490. templet: "#strtore_customer_count"
  1491. });
  1492. } else if (key == "deposit_count" && val["show"] == 1) {
  1493. cols[0].push({
  1494. field: key,
  1495. title: val['name'],
  1496. minWidth: 150,
  1497. align: "center",
  1498. show: val["show"],
  1499. templet: "#deposit_count"
  1500. });
  1501. }else if (key == "sign_count" && val["show"] == 1) {
  1502. cols[0].push({
  1503. field: key,
  1504. title: val['name'],
  1505. minWidth: 150,
  1506. align: "center",
  1507. show: val["show"],
  1508. templet: "#sign_count"
  1509. });
  1510. } else if (key == "to_the_store" && val["show"] == 1) {
  1511. cols[0].push({
  1512. field: showKey.dd.key,
  1513. title: showKey.dd.name,
  1514. minWidth: val["width"],
  1515. align: "center",
  1516. show: val["show"],
  1517. });
  1518. } else if (key == "invalid_customer_count" && val["show"] == 1) {
  1519. cols[0].push({
  1520. field: showKey.wx.key,
  1521. title: showKey.wx.name,
  1522. minWidth: val["width"],
  1523. align: "center",
  1524. show: val["show"],
  1525. templet: function(res){
  1526. if(res[showKey.wx.key]){
  1527. return `<span>${res[showKey.wx.key]}</span>`
  1528. /* return `<strong
  1529. href="javascript:void(0)"
  1530. lay-event="invalid_customer_count"
  1531. style="color:blue;"
  1532. >${res[showKey.wx.key]}</strong>` */
  1533. }else{
  1534. return `<span>${res[showKey.wx.key]}</span>`
  1535. }
  1536. }
  1537. });
  1538. } else if (key == "square" && val["show"] == 1) {
  1539. cols[0].push({
  1540. field: showKey.mj.key,
  1541. title: showKey.mj.name,
  1542. minWidth: val["width"],
  1543. align: "center",
  1544. show: val["show"],
  1545. });
  1546. } else if (key == "house_status" && val["show"] == 1) {
  1547. cols[0].push({
  1548. field: showKey.fwzt.key,
  1549. title: showKey.fwzt.name,
  1550. minWidth: val["width"],
  1551. align: "center",
  1552. show: val["show"],
  1553. });
  1554. } else if (key == "house_type" && val["show"] == 1) {
  1555. cols[0].push({
  1556. field: showKey.fwlx.key,
  1557. title: showKey.fwlx.name,
  1558. minWidth: val["width"],
  1559. align: "center",
  1560. show: val["show"],
  1561. });
  1562. } else if (key == "strtore_avg_days_1" && val["show"] == 1) {
  1563. cols[0].push({
  1564. field: showKey.ddpjzq.key,
  1565. title: showKey.ddpjzq.name,
  1566. minWidth: val["width"],
  1567. align: "center",
  1568. show: val["show"],
  1569. });
  1570. } else if (key == "follow_customer_count" && val["show"] == 1) {
  1571. cols[0].push({
  1572. field: key,
  1573. title: val["name"],
  1574. minWidth: val["width"],
  1575. align: "center",
  1576. show: val["show"],
  1577. templet: "#follow_customer_count"
  1578. });
  1579. } else if (key == "valid_count" && val["show"] == 1) {
  1580. cols[0].push({
  1581. field: key,
  1582. title: val["name"],
  1583. minWidth: val["width"],
  1584. align: "center",
  1585. show: val["show"],
  1586. templet: "#valid_count"
  1587. });
  1588. }else if (key == "not_sure_count" && val["show"] == 1) {
  1589. cols[0].push({
  1590. field: key,
  1591. title: val["name"],
  1592. minWidth: val["width"],
  1593. align: "center",
  1594. show: val["show"],
  1595. templet: "#not_sure_count"
  1596. });
  1597. }else if (key == "yixiang_assigned_count" && val["show"] == 1) {
  1598. cols[0].push({
  1599. field: key,
  1600. title: val["name"],
  1601. minWidth: val["width"],
  1602. align: "center",
  1603. show: val["show"],
  1604. templet: "#yixiang_assigned_count"
  1605. });
  1606. }else if (key == "daodian_assigned_count" && val["show"] == 1) {
  1607. cols[0].push({
  1608. field: key,
  1609. title: val["name"],
  1610. minWidth: val["width"],
  1611. align: "center",
  1612. show: val["show"],
  1613. templet: "#daodian_assigned_count"
  1614. });
  1615. }else if (key == "measuring_assigned_count" && val["show"] == 1) {
  1616. cols[0].push({
  1617. field: key,
  1618. title: val["name"],
  1619. minWidth: val["width"],
  1620. align: "center",
  1621. show: val["show"],
  1622. templet: "#measuring_assigned_count"
  1623. });
  1624. } else {
  1625. if (val["show"] == 1) {
  1626. cols[0].push({
  1627. field: key,
  1628. title: val["name"],
  1629. minWidth: val["width"],
  1630. align: "center",
  1631. show: val["show"],
  1632. });
  1633. }
  1634. }
  1635. });
  1636. cols[0].push({
  1637. title: "",
  1638. width: 30,
  1639. align: "center",
  1640. fixed: "right",
  1641. });
  1642. let url = '{:url("empcrm/generalStatisticsData")}';
  1643. var keyword = $("#keyword").val();
  1644. var org_id = $("#org_id").val();
  1645. var source_id = $("#source_id").val();
  1646. let sDate = $("#sDate").val();
  1647. table.render({
  1648. elem: "#crmsearchlist",
  1649. url: url,
  1650. cols: cols,
  1651. where: {
  1652. keyword: keyword,
  1653. org_id: org_id,
  1654. source_id: source_id,
  1655. start_date: sDate,
  1656. type: valType,
  1657. },
  1658. page: true,
  1659. limits: [10,17,20,30,40],
  1660. limit: 17, //每页默认显示的数量,
  1661. height: "full-50",
  1662. text: "对不起,加载出现异常!",
  1663. done: function (res, curr, count) {
  1664. searchHtmlBody(curr);
  1665. $("strong").each(function() {
  1666. $(this).parent().parent().addClass("hovers")
  1667. })
  1668. },
  1669. });
  1670. },
  1671. });
  1672. }
  1673. var selHtml3 = `<div class="wpsa psinput">
  1674. <div class="triangle"></div>
  1675. <form class="layui-form">
  1676. <input class="pdl12 kwovsint" id="select_check" placeholder="输入关键字....." type="text" id=""/>
  1677. <div class="check_li" style="padding-top:20px;">
  1678. <ul class="check_ul_list">
  1679. {volist name="liangfang_field" id="vo" }
  1680. <li class="check_li_">
  1681. <input class="checkdeta" type="checkbox" name="check_m" lay-filter="checkall03" value="{$key}&{$vo}">
  1682. <p class="check_name">{$vo}</p>
  1683. </li>
  1684. {/volist}
  1685. </ul>
  1686. </div>
  1687. <div class="search_btns">
  1688. <div class="button_">
  1689. <a class="submitbtn">确定</a>
  1690. <a class="dsnonebtn">取消</a>
  1691. </div>
  1692. </div>
  1693. </form>
  1694. </div>`;
  1695. var selHtml4 = `<div class="wpsa psinput">
  1696. <div class="triangle"></div>
  1697. <form class="layui-form">
  1698. <input class="pdl12 kwovsint" id="select_check" placeholder="输入关键字....." type="text" id=""/>
  1699. <div class="check_li" style="padding-top:20px;">
  1700. <ul class="check_ul_list">
  1701. {volist name="daodian_field" id="vo" }
  1702. <li class="check_li_">
  1703. <input class="checkdeta1" type="checkbox" name="check_m" lay-filter="checkall04" value="{$key}&{$vo}">
  1704. <p class="check_name">{$vo}</p>
  1705. </li>
  1706. {/volist}
  1707. </ul>
  1708. </div>
  1709. <div class="search_btns">
  1710. <div class="button_">
  1711. <a class="submitbtn">确定</a>
  1712. <a class="dsnonebtn">取消</a>
  1713. </div>
  1714. </div>
  1715. </form>
  1716. </div>`;
  1717. var selHtml5 = `<div class="wpsa psinput">
  1718. <div class="triangle"></div>
  1719. <form class="layui-form">
  1720. <input class="pdl12 kwovsint" id="select_check" placeholder="输入关键字....." type="text" id=""/>
  1721. <div class="check_li" style="padding-top:20px;">
  1722. <ul class="check_ul_list">
  1723. {volist name="invalid_field" id="vo" }
  1724. <li class="check_li_">
  1725. <input class="checkdeta2" type="checkbox" name="check_m" lay-filter="checkall05" value="{$key}&{$vo}">
  1726. <p class="check_name">{$vo}</p>
  1727. </li>
  1728. {/volist}
  1729. </ul>
  1730. </div>
  1731. <div class="search_btns">
  1732. <div class="button_">
  1733. <a class="submitbtn">确定</a>
  1734. <a class="dsnonebtn">取消</a>
  1735. </div>
  1736. </div>
  1737. </form>
  1738. </div>`;
  1739. var selHtml6 = `<div class="wpsa psinput">
  1740. <div class="triangle"></div>
  1741. <form class="layui-form">
  1742. <input class="pdl12 kwovsint" id="select_check" placeholder="输入关键字....." type="text" id=""/>
  1743. <div class="check_li" style="padding-top:20px;">
  1744. <ul class="check_ul_list">
  1745. {volist name="square_field" id="vo" }
  1746. <li class="check_li_">
  1747. <input class="checkdeta3" type="checkbox" name="check_m" lay-filter="checkall06" value="{$key}&{$vo}">
  1748. <p class="check_name">{$vo}</p>
  1749. </li>
  1750. {/volist}
  1751. </ul>
  1752. </div>
  1753. <div class="search_btns">
  1754. <div class="button_">
  1755. <a class="submitbtn">确定</a>
  1756. <a class="dsnonebtn">取消</a>
  1757. </div>
  1758. </div>
  1759. </form>
  1760. </div>`;
  1761. var selHtml7 = `<div class="wpsa psinput">
  1762. <div class="triangle"></div>
  1763. <form class="layui-form">
  1764. <input class="pdl12 kwovsint" id="select_check" placeholder="输入关键字....." type="text" id=""/>
  1765. <div class="check_li" style="padding-top:20px;">
  1766. <ul class="check_ul_list">
  1767. {volist name="house_status_field" id="vo" }
  1768. <li class="check_li_">
  1769. <input class="checkdeta4" type="checkbox" name="check_m" lay-filter="checkall07" value="{$key}&{$vo}">
  1770. <p class="check_name">{$vo}</p>
  1771. </li>
  1772. {/volist}
  1773. </ul>
  1774. </div>
  1775. <div class="search_btns">
  1776. <div class="button_">
  1777. <a class="submitbtn">确定</a>
  1778. <a class="dsnonebtn">取消</a>
  1779. </div>
  1780. </div>
  1781. </form>
  1782. </div>`;
  1783. var selHtml8 = `<div class="wpsa psinput">
  1784. <div class="triangle"></div>
  1785. <form class="layui-form">
  1786. <input class="pdl12 kwovsint" id="select_check" placeholder="输入关键字....." type="text" id=""/>
  1787. <div class="check_li" style="padding-top:20px;">
  1788. <ul class="check_ul_list">
  1789. {volist name="house_type" id="vo" }
  1790. <li class="check_li_">
  1791. <input class="checkdeta5" type="checkbox" name="check_m" lay-filter="checkall08" value="{$key}&{$vo}">
  1792. <p class="check_name">{$vo}</p>
  1793. </li>
  1794. {/volist}
  1795. </ul>
  1796. </div>
  1797. <div class="search_btns">
  1798. <div class="button_">
  1799. <a class="submitbtn">确定</a>
  1800. <a class="dsnonebtn">取消</a>
  1801. </div>
  1802. </div>
  1803. </form>
  1804. </div>`;
  1805. var selHtml9 = `<div class="wpsa psinput">
  1806. <div class="triangle"></div>
  1807. <form class="layui-form">
  1808. <input class="pdl12 kwovsint" id="select_check" placeholder="输入关键字....." type="text" id=""/>
  1809. <div class="check_li" style="padding-top:20px;">
  1810. <ul class="check_ul_list">
  1811. {volist name="daodian_avg_days_field" id="vo" }
  1812. <li class="check_li_">
  1813. <input class="checkdeta6" type="checkbox" name="check_m" lay-filter="checkall09" value="{$key}&{$vo}">
  1814. <p class="check_name">{$vo}</p>
  1815. </li>
  1816. {/volist}
  1817. </ul>
  1818. </div>
  1819. <div class="search_btns">
  1820. <div class="button_">
  1821. <a class="submitbtn">确定</a>
  1822. <a class="dsnonebtn">取消</a>
  1823. </div>
  1824. </div>
  1825. </form>
  1826. </div>`;
  1827. function searchHtmlBody(pages) {
  1828. setTimeout(function () {
  1829. $("body")
  1830. .find(".layui-table-header")
  1831. .find("tr")
  1832. .each(function (index, val) {
  1833. apphtml02(
  1834. $(this),
  1835. `th[data-field="${showKey.lf.key}"]`,
  1836. showKey.lf.name,
  1837. selHtml3,
  1838. showKey.lf.key,
  1839. "ishtml1",
  1840. showKey.lf.search
  1841. );
  1842. apphtml02(
  1843. $(this),
  1844. `th[data-field="${showKey.dd.key}"]`,
  1845. showKey.dd.name,
  1846. selHtml4,
  1847. showKey.dd.key,
  1848. "ishtml1",
  1849. showKey.dd.search
  1850. );
  1851. apphtml02(
  1852. $(this),
  1853. `th[data-field="${showKey.wx.key}"]`,
  1854. showKey.wx.name,
  1855. selHtml5,
  1856. showKey.wx.key,
  1857. "ishtml1",
  1858. showKey.wx.search
  1859. );
  1860. apphtml02(
  1861. $(this),
  1862. `th[data-field="${showKey.mj.key}"]`,
  1863. showKey.mj.name,
  1864. selHtml6,
  1865. showKey.mj.key,
  1866. "ishtml1",
  1867. showKey.mj.search
  1868. );
  1869. apphtml02(
  1870. $(this),
  1871. `th[data-field="${showKey.fwzt.key}"]`,
  1872. showKey.fwzt.name,
  1873. selHtml7,
  1874. showKey.fwzt.key,
  1875. "ishtml1",
  1876. showKey.fwzt.search
  1877. );
  1878. apphtml02(
  1879. $(this),
  1880. `th[data-field="${showKey.fwlx.key}"]`,
  1881. showKey.fwlx.name,
  1882. selHtml8,
  1883. showKey.fwlx.key,
  1884. "ishtml1",
  1885. showKey.fwlx.search
  1886. );
  1887. apphtml02(
  1888. $(this),
  1889. `th[data-field="${showKey.ddpjzq.key}"]`,
  1890. showKey.ddpjzq.name,
  1891. selHtml9,
  1892. showKey.ddpjzq.key,
  1893. "ishtml1",
  1894. showKey.ddpjzq.search
  1895. );
  1896. $(this)
  1897. .find('th[data-field="name"]')
  1898. .find(".psinput")
  1899. .css({ left: 0, marginLeft: 0 });
  1900. $(this)
  1901. .find('th[data-field="name"]')
  1902. .find(".triangle")
  1903. .css({ left: "25%" });
  1904. });
  1905. if (pages == 1 && firstloading < 1) {
  1906. firstloading++;
  1907. $(".layui-table-body:eq(0),.layui-table-header:eq(0)").wrapAll(
  1908. "<div class='scroll_body'></div>"
  1909. );
  1910. }
  1911. $('.checkdeta').each(function() {
  1912. let dval = $(this).val();
  1913. let key = dval.split("&")[0];
  1914. if (key == showKey.lf.key) {
  1915. $(this).prop('checked', true);
  1916. }
  1917. form.render('checkbox');
  1918. })
  1919. $('.checkdeta1').each(function() {
  1920. let dval = $(this).val();
  1921. let key = dval.split("&")[0];
  1922. if (key == showKey.dd.key) {
  1923. $(this).prop('checked', true);
  1924. }
  1925. form.render('checkbox');
  1926. })
  1927. $('.checkdeta2').each(function() {
  1928. let dval = $(this).val();
  1929. let key = dval.split("&")[0];
  1930. if (key == showKey.wx.key) {
  1931. $(this).prop('checked', true);
  1932. }
  1933. form.render('checkbox');
  1934. })
  1935. $('.checkdeta3').each(function() {
  1936. let dval = $(this).val();
  1937. let key = dval.split("&")[0];
  1938. if (key == showKey.mj.key) {
  1939. $(this).prop('checked', true);
  1940. }
  1941. form.render('checkbox');
  1942. })
  1943. $('.checkdeta4').each(function() {
  1944. let dval = $(this).val();
  1945. let key = dval.split("&")[0];
  1946. if (key == showKey.fwzt.key) {
  1947. $(this).prop('checked', true);
  1948. }
  1949. form.render('checkbox');
  1950. })
  1951. $('.checkdeta5').each(function() {
  1952. let dval = $(this).val();
  1953. let key = dval.split("&")[0];
  1954. if (key == showKey.fwlx.key) {
  1955. $(this).prop('checked', true);
  1956. }
  1957. form.render('checkbox');
  1958. })
  1959. $('.checkdeta6').each(function() {
  1960. let dval = $(this).val();
  1961. let key = dval.split("&")[0];
  1962. if (key == showKey.ddpjzq.key) {
  1963. $(this).prop('checked', true);
  1964. }
  1965. form.render('checkbox');
  1966. })
  1967. }, 100);
  1968. function apphtml02(this_, obj, names, htmlbox, idarr, is_html, bol) {
  1969. this_.find(obj).find("div").eq(0).empty();
  1970. this_.find(obj).addClass("is_show");
  1971. if (bol) {
  1972. this_
  1973. .find(obj)
  1974. .find("div.layui-table-cell")
  1975. .eq(0)
  1976. .prepend(
  1977. '<span class="btnbtn5 dsa" data-isshow="1">' +
  1978. names +
  1979. '</span><img class="mapps" src="__STATIC__/img/search_ico02.png"/>'
  1980. );
  1981. } else {
  1982. this_
  1983. .find(obj)
  1984. .find("div.layui-table-cell")
  1985. .eq(0)
  1986. .prepend(
  1987. '<span class="btnbtn5 dsa" data-isshow="1">' +
  1988. names +
  1989. '</span><img class="mapps" src="__STATIC__/img/search_ico01.png"/>'
  1990. );
  1991. }
  1992. this_.find(obj).find("div.layui-table-cell").eq(0).append(htmlbox);
  1993. form.render();
  1994. setTimeout(function () {
  1995. var search_input = this_.find(obj).find("#select_check"),
  1996. search_content = this_.find(obj).find(".check_li_");
  1997. $(search_input).on("keyup", function () {
  1998. this_
  1999. .find(obj)
  2000. .find(".check_li_")
  2001. .hide()
  2002. .filter(":contains(" + search_input.val().trim() + ")")
  2003. .show();
  2004. });
  2005. function stopPropagation(e) {
  2006. if (e.stopPropagation) e.stopPropagation();
  2007. else e.cancelBubble = true;
  2008. }
  2009. this_
  2010. .find(obj)
  2011. .find(".dsnonebtn")
  2012. .on("click", function () {
  2013. this_
  2014. .find(obj)
  2015. .find("div.layui-table-cell")
  2016. .eq(0)
  2017. .find(".psinput")
  2018. .hide();
  2019. this_
  2020. .find(obj)
  2021. .find("div.layui-table-cell")
  2022. .eq(0)
  2023. .find(".btnbtn5")
  2024. .attr("data-isshow", 1);
  2025. this_
  2026. .find(obj)
  2027. .find("div.layui-table-cell")
  2028. .eq(0)
  2029. .find("input")
  2030. .val("");
  2031. });
  2032. var isradio = 1;
  2033. this_
  2034. .find(obj)
  2035. .find("div.layui-table-cell")
  2036. .eq(0)
  2037. .find(".btnbtn5")
  2038. .on("click", function (e) {
  2039. $(".is_show").find(".psinput").hide();
  2040. if ($(this).attr("data-isshow") == 1) {
  2041. $(this).siblings(".psinput").show();
  2042. $(this).attr("data-isshow", 0);
  2043. } else {
  2044. $(this).siblings(".psinput").hide();
  2045. $(this).attr("data-isshow", 1);
  2046. }
  2047. });
  2048. this_
  2049. .find(obj)
  2050. .find(".checkAlls")
  2051. .on("click", function () {
  2052. this_
  2053. .find(obj)
  2054. .find(".checkbox")
  2055. .each(function (index, item) {
  2056. this_
  2057. .find(obj)
  2058. .find(".checkbox")
  2059. .eq(index)
  2060. .prop("checked", "checked");
  2061. });
  2062. form.render("checkbox");
  2063. });
  2064. this_
  2065. .find(obj)
  2066. .find(".nocheckAlls")
  2067. .on("click", function () {
  2068. this_
  2069. .find(obj)
  2070. .find(".checkbox")
  2071. .each(function (index, item) {
  2072. this_
  2073. .find(obj)
  2074. .find(".checkbox")
  2075. .eq(index)
  2076. .prop("checked", "");
  2077. });
  2078. form.render("checkbox");
  2079. });
  2080. this_
  2081. .find(obj)
  2082. .find(".checkdeta")
  2083. .each(function (i, v) {
  2084. form.on("checkbox(checkall03)", function (data) {
  2085. this_.find(obj).find(".checkdeta").prop("checked", false);
  2086. data.elem.checked = true;
  2087. setTimeout(() => {
  2088. form.render("checkbox");
  2089. },100)
  2090. });
  2091. });
  2092. this_
  2093. .find(obj)
  2094. .find(".checkdeta1")
  2095. .each(function (i, v) {
  2096. form.on("checkbox(checkall04)", function (data) {
  2097. this_.find(obj).find(".checkdeta1").prop("checked", false);
  2098. data.elem.checked = true;
  2099. setTimeout(() => {
  2100. form.render("checkbox");
  2101. },100)
  2102. });
  2103. });
  2104. this_
  2105. .find(obj)
  2106. .find(".checkdeta2")
  2107. .each(function (i, v) {
  2108. form.on("checkbox(checkall05)", function (data) {
  2109. this_.find(obj).find(".checkdeta2").prop("checked", false);
  2110. data.elem.checked = true;
  2111. setTimeout(() => {
  2112. form.render("checkbox");
  2113. },100)
  2114. });
  2115. });
  2116. this_
  2117. .find(obj)
  2118. .find(".checkdeta3")
  2119. .each(function (i, v) {
  2120. form.on("checkbox(checkall06)", function (data) {
  2121. this_.find(obj).find(".checkdeta3").prop("checked", false);
  2122. data.elem.checked = true;
  2123. setTimeout(() => {
  2124. form.render("checkbox");
  2125. },100)
  2126. });
  2127. });
  2128. this_
  2129. .find(obj)
  2130. .find(".checkdeta4")
  2131. .each(function (i, v) {
  2132. form.on("checkbox(checkall07)", function (data) {
  2133. this_.find(obj).find(".checkdeta4").prop("checked", false);
  2134. data.elem.checked = true;
  2135. setTimeout(() => {
  2136. form.render("checkbox");
  2137. },100)
  2138. });
  2139. });
  2140. this_
  2141. .find(obj)
  2142. .find(".checkdeta5")
  2143. .each(function (i, v) {
  2144. form.on("checkbox(checkall08)", function (data) {
  2145. this_.find(obj).find(".checkdeta5").prop("checked", false);
  2146. data.elem.checked = true;
  2147. setTimeout(() => {
  2148. form.render("checkbox");
  2149. },100)
  2150. });
  2151. });
  2152. this_
  2153. .find(obj)
  2154. .find(".checkdeta6")
  2155. .each(function (i, v) {
  2156. form.on("checkbox(checkall09)", function (data) {
  2157. this_.find(obj).find(".checkdeta6").prop("checked", false);
  2158. data.elem.checked = true;
  2159. setTimeout(() => {
  2160. form.render("checkbox");
  2161. },100)
  2162. });
  2163. });
  2164. this_
  2165. .find(obj)
  2166. .find("div.layui-table-cell")
  2167. .eq(0)
  2168. .find(".resetbtn")
  2169. .on("click", function () {
  2170. $(this).parents(".search_btns").siblings(".kwovsint").val("");
  2171. $(this)
  2172. .parents(".search_btns")
  2173. .siblings()
  2174. .find(".select_sDate")
  2175. .val("");
  2176. });
  2177. if (is_html == "detatime") {
  2178. laydate.render({
  2179. elem: "#select_sDate", //指定元素
  2180. type: "date",
  2181. format: "yyyy/MM/dd",
  2182. range: true,
  2183. trigger: "click", //呼出事件改成click
  2184. done: function (value, date, endDate) {},
  2185. });
  2186. $(".date-flex div").click(function () {
  2187. let type = $(this).prop("dataset").type;
  2188. if (type == "today") {
  2189. $(".select_date").val(`${dateObj.today} - ${dateObj.today}`);
  2190. } else if (type == "yesterday") {
  2191. $(".select_date").val(
  2192. `${dateObj.yesterday} - ${dateObj.yesterday}`
  2193. );
  2194. } else if (type == "week") {
  2195. $(".select_date").val(
  2196. `${dateObj.thisWeekMonday} - ${dateObj.thisWeekSunday}`
  2197. );
  2198. } else if (type == "lastWeek") {
  2199. $(".select_date").val(
  2200. `${dateObj.lastWeekMonday} - ${dateObj.lastWeekSunday}`
  2201. );
  2202. } else if (type == "month") {
  2203. $(".select_date").val(
  2204. `${dateObj.thisMonthFirstDay} - ${dateObj.thisMonthLastDay}`
  2205. );
  2206. } else if (type == "lastMonth") {
  2207. $(".select_date").val(
  2208. `${dateObj.lastMonthFirstDay} - ${dateObj.lastMonthLastDay}`
  2209. );
  2210. } else {
  2211. $(".select_date").val("");
  2212. }
  2213. });
  2214. $(".date-flex1 div").click(function () {
  2215. let type = $(this).prop("dataset").type;
  2216. if (type == "today") {
  2217. $(".select_sDate").val(`${dateObj.today} - ${dateObj.today}`);
  2218. } else if (type == "yesterday") {
  2219. $(".select_sDate").val(
  2220. `${dateObj.yesterday} - ${dateObj.yesterday}`
  2221. );
  2222. } else if (type == "week") {
  2223. $(".select_sDate").val(
  2224. `${dateObj.thisWeekMonday} - ${dateObj.thisWeekSunday}`
  2225. );
  2226. } else if (type == "lastWeek") {
  2227. $(".select_sDate").val(
  2228. `${dateObj.lastWeekMonday} - ${dateObj.lastWeekSunday}`
  2229. );
  2230. } else if (type == "month") {
  2231. $(".select_sDate").val(
  2232. `${dateObj.thisMonthFirstDay} - ${dateObj.thisMonthLastDay}`
  2233. );
  2234. } else if (type == "lastMonth") {
  2235. $(".select_sDate").val(
  2236. `${dateObj.lastMonthFirstDay} - ${dateObj.lastMonthLastDay}`
  2237. );
  2238. } else {
  2239. $(".select_sDate").val("");
  2240. }
  2241. });
  2242. }
  2243. this_
  2244. .find(obj)
  2245. .find("div.layui-table-cell")
  2246. .eq(0)
  2247. .find(".submitbtn")
  2248. .on("click", function () {
  2249. if (is_html == "ishtml1") {
  2250. var arr = new Array();
  2251. this_
  2252. .find(obj)
  2253. .find("div.layui-table-cell")
  2254. .eq(0)
  2255. .find("input:checkbox:checked")
  2256. .each(function (i) {
  2257. arr[i] = $(this).val();
  2258. });
  2259. var datastr = arr.join(",");
  2260. searchfn(datastr,idarr);
  2261. } else if (is_html == "ishtml2") {
  2262. var kwos = $(this)
  2263. .parents(".search_btns")
  2264. .siblings("#kwovsint")
  2265. .val();
  2266. field[idarr] = kwos;
  2267. } else if (is_html == "detatime") {
  2268. var deta = $(this)
  2269. .parents(".search_btns")
  2270. .siblings()
  2271. .find("#select_sDate")
  2272. .val();
  2273. field[idarr] = deta;
  2274. }
  2275. if (
  2276. this_.find(obj).find("input.kwovsint").val() &&
  2277. !field[idarr]
  2278. ) {
  2279. layer.msg("请选择内容", { anim: 1000, time: 1000 });
  2280. return;
  2281. }
  2282. var datas = JSON.stringify(field);
  2283. localStorage.setItem("dataStatistics", datas);
  2284. $(this).parents(".psinput").hide();
  2285. this_
  2286. .find(obj)
  2287. .find("div.layui-table-cell")
  2288. .eq(0)
  2289. .find(".btnbtn5")
  2290. .attr("data-isshow", 1);
  2291. });
  2292. $(document).bind("click", function () {
  2293. this_
  2294. .find(obj)
  2295. .find("div.layui-table-cell")
  2296. .eq(0)
  2297. .find(".psinput")
  2298. .hide();
  2299. this_
  2300. .find(obj)
  2301. .find("div.layui-table-cell")
  2302. .eq(0)
  2303. .find(".btnbtn5")
  2304. .attr("data-isshow", 1);
  2305. });
  2306. this_.find("th").on("click", function (e) {
  2307. stopPropagation(e);
  2308. });
  2309. }, 100);
  2310. }
  2311. }
  2312. function searchfn(field, idarr) {
  2313. let name = field.split('&')[1];
  2314. let key = field.split('&')[0];
  2315. if (idarr == showKey.lf.key) {
  2316. showKey.lf = {name: name=='全部'?'量房数':name, key: key, search: name=='全部'?false:true,};
  2317. } else if (idarr == showKey.dd.key) {
  2318. showKey.dd = {name: name=='全部'?'到店数':name, key: key, search: name=='全部'?false:true,};
  2319. } else if (idarr == showKey.wx.key) {
  2320. showKey.wx = {name: name=='全部'?'无效客户数':name, key: key, search: name=='全部'?false:true,};
  2321. } else if (idarr == showKey.mj.key) {
  2322. showKey.mj = {name: name=='全部'?'面积(平米)':name, key: key, search: name=='全部'?false:true,};
  2323. } else if (idarr == showKey.fwzt.key) {
  2324. showKey.fwzt = {name: name=='全部'?'房屋状态':name, key: key, search: name=='全部'?false:true,};
  2325. } else if (idarr == showKey.fwlx.key) {
  2326. showKey.fwlx = {name: name=='全部'?'房屋类型':name, key: key, search: name=='全部'?false:true,};
  2327. } else {
  2328. showKey.ddpjzq = {name: name, key: key, search: name=='一次到店平均周期'?false:true,};
  2329. }
  2330. firstloading = 0;
  2331. console.log(showKey)
  2332. ajaxlist();
  2333. }
  2334. $(".lay-setting").click(function () {
  2335. let arr = [];
  2336. $.each(data, function (key, val) {
  2337. if (key != "name" && key != "org_name") {
  2338. arr.push({ ...val, field: key });
  2339. }
  2340. });
  2341. renderTableSwitch(arr, 7);
  2342. $(".lay-mask").removeClass("layui-hide");
  2343. });
  2344. $(".layui-icon-close").click(function () {
  2345. $(".lay-mask").addClass("layui-hide");
  2346. });
  2347. $(".lay-block").click(function (e) {
  2348. e.stopPropagation();
  2349. });
  2350. $(".lay-mask").click(function () {
  2351. $(this).addClass("layui-hide");
  2352. });
  2353. function renderTableSwitch(data, types) {
  2354. let htmls = data
  2355. .map((item, index) => {
  2356. return `<div class="lay-item sort_time">
  2357. <div class="sort_lis01">
  2358. <img style="display:${
  2359. types == 5 ? "none" : "block"
  2360. }" src="__STATIC__/img/sorticon.png" width="16px" alt="">
  2361. <span>${item.name}</span>
  2362. </div>
  2363. <div class="sort_lis02">
  2364. <input type="checkbox" lay-filter="tableSort" ${
  2365. item.show == 1 ? "checked" : ""
  2366. } name="${item.field}" lay-skin="switch">
  2367. </div>
  2368. </div>`;
  2369. })
  2370. .join("");
  2371. $(".layui-content").html(htmls);
  2372. setTimeout(() => {
  2373. form.render();
  2374. var check = "";
  2375. var names = "";
  2376. form.on("switch(tableSort)", function (data) {
  2377. getdatalist(types);
  2378. });
  2379. new Sortable($(".layui-content")[0], {
  2380. handle: ".lay-item", // handle's class
  2381. animation: 150,
  2382. // 结束拖拽
  2383. onEnd: function (/**Event*/ evt) {
  2384. getdatalist(types, 0);
  2385. },
  2386. });
  2387. }, 300);
  2388. }
  2389. function getdatalist(types) {
  2390. let getCheckedField = $(".sort_time");
  2391. let itemArr = [];
  2392. let check;
  2393. getCheckedField.each(function (i) {
  2394. let ischeck = $(this).find("input").prop("checked");
  2395. if (ischeck) {
  2396. check = 1;
  2397. } else {
  2398. check = 0;
  2399. }
  2400. let names = $(this).find("input").attr("name");
  2401. itemArr.push({ name: names, show: check, sort: i + 1 });
  2402. });
  2403. var datajson = JSON.stringify(itemArr);
  2404. $.ajax({
  2405. type: "post",
  2406. url: '{:url("empcrm/poolFieldsSet")}',
  2407. data: {
  2408. type: types,
  2409. content: datajson,
  2410. },
  2411. success: function (res) {
  2412. if(res.code == 403){
  2413. $(".exitbtn").trigger("click");
  2414. }
  2415. firstloading = 0;
  2416. ajaxlist();
  2417. },
  2418. });
  2419. }
  2420. function getStatistics() {
  2421. var addtime = $("[name=addtime]").val();
  2422. var followtime = $("[name=followtime]").val();
  2423. var objtype;
  2424. if (fType == 1) {
  2425. objtype = {
  2426. addtime: addtime,
  2427. };
  2428. } else {
  2429. objtype = {
  2430. followtime: followtime,
  2431. };
  2432. }
  2433. $.ajax({
  2434. url: '{:url("empcrm/statistics")}',
  2435. type: "post",
  2436. data: {
  2437. search_type: fType,
  2438. ...objtype,
  2439. },
  2440. success: (res) => {
  2441. if (res.code == 0) {
  2442. let data = res.data;
  2443. $(".totalNum0").text(data.customer_num);
  2444. $(".totalNum1").text(data.visit_num);
  2445. }else if(res.code == 403){
  2446. $(".exitbtn").trigger("click");
  2447. }
  2448. },
  2449. });
  2450. }
  2451. function getStatisticsMore() {
  2452. var addtime = $("[name=addtime]").val();
  2453. var followtime = $("[name=followtime]").val();
  2454. var objtype;
  2455. if (fType == 1) {
  2456. objtype = {
  2457. addtime: addtime,
  2458. };
  2459. } else {
  2460. objtype = {
  2461. followtime: followtime,
  2462. };
  2463. }
  2464. $.ajax({
  2465. url: '{:url("empcrm/statistics_more")}',
  2466. type: "post",
  2467. data: {
  2468. search_type: fType,
  2469. ...objtype,
  2470. },
  2471. success: (res) => {
  2472. if (res.code == 0) {
  2473. let data = res.data;
  2474. $(".totalNum2").text(data.yylf_num);
  2475. $(".totalNum3").text(data.lf_num);
  2476. $(".totalNum4").text(data.yydd_num);
  2477. $(".totalNum5").text(data.ydd_num);
  2478. $(".totalNum6").text(data.deposit_num);
  2479. $(".totalNum7").text(data.signed_num);
  2480. $(".totalNum8").text(data.yyhd_num);
  2481. $(".totalNum9").text(data.ydc_num);
  2482. }else if(res.code == 403){
  2483. $(".exitbtn").trigger("click");
  2484. }
  2485. },
  2486. });
  2487. }
  2488. resizefun = function () {
  2489. table.resize("crmsearchlist");
  2490. };
  2491. reload = function () {
  2492. if (valType == 2) {
  2493. field.org_id = "";
  2494. field.type = valType;
  2495. }
  2496. table.reload("crmsearchlist", { where: field }, true);
  2497. };
  2498. var flag = true;
  2499. table.on("tool(crmsearchlist)", function (obj) {
  2500. let event = obj.event;
  2501. let row = obj.data;
  2502. flag = true;
  2503. let sdate = $("#sDate").val();
  2504. let edate = $("#eDate").val();
  2505. if (event === "unstatus") {
  2506. flag = false;
  2507. if (confirm("是否确认为有效线索?")) {
  2508. $.ajax({
  2509. url: '{:url("empcrm/validation")}',
  2510. data: {
  2511. customer_id: row.id, // (客户id)
  2512. state: "未到访",
  2513. },
  2514. type: "post",
  2515. success: function (res) {
  2516. if (res.code == 0) {
  2517. $(obj.tr)
  2518. .children("td")
  2519. .children("div")
  2520. .children("div")
  2521. .children(".redconfirm")[0].checked = true;
  2522. $(obj.tr)
  2523. .children("td")
  2524. .children("div")
  2525. .children("div")
  2526. .children(".redconfirm")[0].disabled = true;
  2527. if (row.visit_log_count == 0) {
  2528. $(obj.tr)
  2529. .children('td[data-field="time_status"]')
  2530. .children("div")
  2531. .html('<span style="color: #cccccc;">-</span>');
  2532. } else {
  2533. $(obj.tr)
  2534. .children('td[data-field="time_status"]')
  2535. .children("div")
  2536. .html("<span" + row.time_status + "</span>");
  2537. }
  2538. row.state = "未到访";
  2539. alert("成功:更改成功,线索为有效状态!!!");
  2540. }else if(res.code == 403){
  2541. $(".exitbtn").trigger("click");
  2542. } else {
  2543. alert(res.msg);
  2544. }
  2545. },
  2546. });
  2547. } else {
  2548. $(obj.tr)
  2549. .children("td")
  2550. .children("div")
  2551. .children("div")
  2552. .children(".redconfirm")[0].checked = false;
  2553. $(obj.tr)
  2554. .children("td")
  2555. .children("div")
  2556. .children("div")
  2557. .children(".redconfirm")[0].disabled = false;
  2558. $(obj.tr)
  2559. .children("td")
  2560. .children("div")
  2561. .children("div")
  2562. .children(".layui-unselect")
  2563. .removeClass("layui-form-checked");
  2564. }
  2565. return false;
  2566. } else if (event === "edit") {
  2567. flag = false;
  2568. window.parent.editcrmsg(obj.data.id);
  2569. return false;
  2570. } else if (event === "editstate") {
  2571. flag = false;
  2572. window.parent.statemsg(obj.data.id, "list.html");
  2573. return false;
  2574. } else {
  2575. flag = true;
  2576. }
  2577. flag = true;
  2578. // $("a").each(function() {
  2579. // $(this).addClass("hovers")
  2580. // })
  2581. switch (obj.event) {
  2582. case "follow_customer_count"://客户总数
  2583. layer.open({
  2584. type: 2,
  2585. title: [
  2586. "在跟进客户数",
  2587. ],
  2588. content:
  2589. '{:url("Empcrm/generalOpen")}?type=follow_customer_count&eid=' +
  2590. obj.data.id +
  2591. "&start_date=" +
  2592. sdate +
  2593. "&end_date=" +
  2594. edate,
  2595. resize: false,
  2596. shade: 0.8,
  2597. area: ['99%', '96%'],
  2598. });
  2599. break;
  2600. case "add_wechat_count"://加微客户数
  2601. layer.open({
  2602. type: 2,
  2603. title: ["加微客户列表"],
  2604. content:
  2605. '{:url("Empcrm/generalOpen")}?type=add_wechat_count&eid=' +
  2606. obj.data.id +
  2607. "&start_date=" +
  2608. sdate +
  2609. "&end_date=" +
  2610. edate,
  2611. resize: false,
  2612. shade: 0.8,
  2613. area: ['99%', '96%'],
  2614. });
  2615. break;
  2616. case "not_sure_count"://待确认
  2617. layer.open({
  2618. type: 2,
  2619. title: ["待确认客户列表"],
  2620. content:
  2621. '{:url("Empcrm/generalOpen")}?type=not_sure_count&eid=' +
  2622. obj.data.id +
  2623. "&start_date=" +
  2624. sdate +
  2625. "&end_date=" +
  2626. edate,
  2627. resize: false,
  2628. shade: 0.8,
  2629. area: ['99%', '96%'],
  2630. });
  2631. break;
  2632. case "yixiang_assigned_count"://意向分派客户数
  2633. layer.open({
  2634. type: 2,
  2635. title: ["意向分派客户数列表"],
  2636. content:
  2637. '{:url("Empcrm/generalOpen")}?type=yixiang_assigned_count&eid=' +
  2638. obj.data.id +
  2639. "&start_date=" +
  2640. sdate +
  2641. "&end_date=" +
  2642. edate,
  2643. resize: false,
  2644. shade: 0.8,
  2645. area: ['99%', '96%'],
  2646. });
  2647. break;
  2648. case "daodian_assigned_count"://到店分派客户数
  2649. layer.open({
  2650. type: 2,
  2651. title: ["意向分派客户数列表"],
  2652. content:
  2653. '{:url("Empcrm/generalOpen")}?type=daodian_assigned_count&eid=' +
  2654. obj.data.id +
  2655. "&start_date=" +
  2656. sdate +
  2657. "&end_date=" +
  2658. edate,
  2659. resize: false,
  2660. shade: 0.8,
  2661. area: ['99%', '96%'],
  2662. });
  2663. break;
  2664. case "measuring_assigned_count"://量房分派客户数
  2665. layer.open({
  2666. type: 2,
  2667. title: ["意向分派客户数列表"],
  2668. content:
  2669. '{:url("Empcrm/generalOpen")}?type=liangfang_assigned_count&eid=' +
  2670. obj.data.id +
  2671. "&start_date=" +
  2672. sdate +
  2673. "&end_date=" +
  2674. edate,
  2675. resize: false,
  2676. shade: 0.8,
  2677. area: ['99%', '96%'],
  2678. });
  2679. break;
  2680. case "measuring_room_customer"://量房客户数
  2681. layer.open({
  2682. type: 2,
  2683. title: ["量房客户数列表"],
  2684. content:
  2685. '{:url("Empcrm/generalOpen")}?type=measuring_room_customer&eid=' +
  2686. obj.data.id +
  2687. "&start_date=" +
  2688. sdate +
  2689. "&end_date=" +
  2690. edate,
  2691. resize: false,
  2692. shade: 0.8,
  2693. area: ['99%', '96%'],
  2694. });
  2695. break;
  2696. case "strtore_customer_count"://到店客户数
  2697. layer.open({
  2698. type: 2,
  2699. title: ["到店客户数列表"],
  2700. content:
  2701. '{:url("Empcrm/generalOpen")}?type=strtore_customer_count&eid=' +
  2702. obj.data.id +
  2703. "&start_date=" +
  2704. sdate +
  2705. "&end_date=" +
  2706. edate,
  2707. resize: false,
  2708. shade: 0.8,
  2709. area: ['99%', '96%'],
  2710. });
  2711. break;
  2712. case "valid_count"://有效数量
  2713. layer.open({
  2714. type: 2,
  2715. title: ["有效线索列表"],
  2716. content:
  2717. '{:url("Empcrm/generalOpen")}?type=valid&eid=' +
  2718. obj.data.id +
  2719. "&start_date=" +
  2720. sdate +
  2721. "&end_date=" +
  2722. edate,
  2723. resize: false,
  2724. shade: 0.8,
  2725. area: ['99%', '96%'],
  2726. });
  2727. break;
  2728. case "sign_count":
  2729. layer.open({
  2730. type: 2,
  2731. title: ["合同客户列表"],
  2732. content:
  2733. '{:url("Empcrm/generalOpen")}?type=sign_count&eid=' +
  2734. obj.data.id +
  2735. "&start_date=" +
  2736. sdate +
  2737. "&end_date=" +
  2738. edate,
  2739. resize: false,
  2740. shade: 0.8,
  2741. area: ['99%', '96%'],
  2742. });
  2743. break;
  2744. case "deposit_count":
  2745. layer.open({
  2746. type: 2,
  2747. title: ["定金客户列表"],
  2748. content:
  2749. '{:url("Empcrm/generalOpen")}?type=deposit_count&eid=' +
  2750. obj.data.id +
  2751. "&start_date=" +
  2752. sdate +
  2753. "&end_date=" +
  2754. edate,
  2755. resize: false,
  2756. shade: 0.8,
  2757. area: ['99%', '96%'],
  2758. });
  2759. break;
  2760. case "invalid_customer_count":
  2761. layer.open({
  2762. type: 2,
  2763. title: ["无效线索客户列表"],
  2764. content:
  2765. '{:url("Empcrm/generalOpen")}?type=invalid_customer_count&eid=' +
  2766. obj.data.id +
  2767. "&start_date=" +
  2768. sdate +
  2769. "&end_date=" +
  2770. edate,
  2771. resize: false,
  2772. shade: 0.8,
  2773. area: ['99%', '96%'],
  2774. });
  2775. break;
  2776. }
  2777. });
  2778. // $('.crmsearchlist').on('click', 'td', function (e) {
  2779. // var _event = $(this).find('[lay-event]').attr('lay-event');
  2780. // var _obj = table.cache.crmsearchlist[parseInt($(this).parent('tr').attr('data-index'))];
  2781. // switch (_event) {
  2782. // case 'unstatus':
  2783. // break;
  2784. // case 'edit':
  2785. // break;
  2786. // case 'editstate':
  2787. // break;
  2788. // default:
  2789. // flag = true;
  2790. // $('#customer_detail')[0].src = "/empcrm/empcrm/addlog.html?cid=" + _obj.id;
  2791. // $('.crmbox').addClass('rightbox');
  2792. // $('#customer_detail').show();
  2793. // resizefun();
  2794. // }
  2795. // return false; //阻止事件冒泡
  2796. // })
  2797. // table.on('row(crmsearchlist)', function (obj) {
  2798. // var data = obj.data;
  2799. // if (flag) {
  2800. // $('#customer_detail')[0].src = "/empcrm/empcrm/addlog.html?cid=" + data.id;
  2801. // $('.crmbox').addClass('rightbox');
  2802. // $('#customer_detail').show();
  2803. // for (let i = 0; i < $('.crmsearchlist .layui-table-view .layui-table-box .layui-table tr').length; i++) {
  2804. // $($('.crmsearchlist .layui-table-view .layui-table-box .layui-table tr')[i]).removeClass('onclickbg');
  2805. // }
  2806. // $(obj.tr).addClass('onclickbg');
  2807. // resizefun();
  2808. // }
  2809. // });
  2810. $(".searchbtn").click(function () {
  2811. window.parent.addcrmmsg("list.html");
  2812. });
  2813. });
  2814. function removealog(params) {
  2815. $("#customer_detail").hide();
  2816. $(".crmbox").removeClass("rightbox");
  2817. }
  2818. </script>
  2819. {/block}