12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966 |
- {extend name="public/layout"} {block name="body"}
- <link rel="stylesheet" href="__LAYUI__/layui/css/layui.css" media="all" />
- <link rel="stylesheet" href=" /static/css/common.css" />
- <script src="/static/js/jquery.min.js"></script>
- <style>
- body {
- padding-bottom: 40px;
- }
- .searchtitlebox {
- display: block;
- padding: 15px 10px;
- border: 1px solid #f0f0f0;
- background: #fcfcfc;
- margin-top: 5px;
- margin-bottom: 10px;
- /* position: relative; */
- min-width: 800px;
- }
- .searchbox {
- display: block;
- margin-top: 8px;
- text-align: center;
- }
- .searchbox input {
- display: inline-block;
- height: 26px;
- line-height: 26px;
- padding-left: 3px;
- vertical-align: middle;
- border: 2px solid #4479ba;
- }
- body {
- font-size: 12px;
- font-family: "宋体";
- }
- .searchbox .searchbtn {
- display: inline-block;
- float: right;
- border: none;
- width: 98px;
- height: 30px;
- color: #fff;
- font-size: 14px;
- font-weight: bold;
- text-align: center;
- background: url(__STATIC__/img/icon-sub.png) no-repeat;
- cursor: pointer;
- vertical-align: middle;
- }
- .selectbox {
- float: left;
- }
- .leftselect {
- float: left;
- height: 26px;
- line-height: 26px;
- }
- .selectbox select {
- float: left;
- height: 26px;
- }
- .searchtext {
- border: 1px solid #ccc;
- background: #fff url(__STATIC__/img/icon071402.png) no-repeat;
- padding: 1px 2px;
- height: 24px;
- line-height: 24px;
- vertical-align: middle;
- text-indent: 3px;
- margin-left: 4px;
- }
- .searchbtn1 {
- margin-left: 4px;
- cursor: pointer;
- color: #000;
- background: url(__STATIC__/img/btn_bg.gif) repeat-x;
- border: 1px solid #c0c0c0;
- padding: 0 12px;
- *padding: 0 6px;
- height: 26px;
- }
- .layui-table td,
- .layui-table th {
- font-size: 12px;
- }
- .layui-table th {
- font-weight: bold;
- }
- .dingjingorder {
- height: 25px;
- width: 40px;
- background-color: #65c001;
- color: #fff;
- text-align: center;
- line-height: 25px;
- z-index: 100;
- display: block;
- position: absolute;
- top: 1px;
- right: 3px;
- border-radius: 11px;
- font-size: 12px;
- }
- .addvx {
- position: absolute;
- top: -5px;
- right: 1px;
- height: 14px;
- line-height: 14px;
- font-size: 16px;
- color: #666;
- font-family: "宋体";
- }
- .statebox {
- width: 40px;
- text-align: center;
- z-index: 100;
- display: block;
- position: absolute;
- font-size: 12px;
- top: -5px;
- right: 0px;
- border-radius: 0px;
- background: #4285f4;
- color: #efefef;
- height: 20px;
- line-height: 20px;
- }
- .layui-table-cell {
- overflow: initial;
- }
- #customer_detail {
- display: block;
- width: 435px;
- height: 100%;
- position: fixed;
- top: 0;
- left: 0;
- bottom: 0;
- }
- .rightbox {
- display: block;
- width: calc(100% - 435px);
- margin-left: 435px;
- }
- .unstatusbox {
- display: block;
- position: absolute;
- top: -5px;
- left: 0;
- width: 100%;
- height: 37px;
- background-color: #ff6600;
- text-align: center;
- color: #fff;
- }
- .statusbox {
- position: absolute;
- top: 0px;
- right: 0px;
- color: #666;
- text-align: right;
- z-index: 100;
- display: block;
- font-size: 12px;
- }
- .layui-table-view .layui-form-checkbox {
- width: 16px;
- height: 16px;
- line-height: 16px;
- padding-right: 0;
- }
- .layui-table-view .layui-form-checkbox i {
- height: 16px;
- width: 16px;
- font-size: 14px;
- }
- .novisitlog {
- background-color: #9139db !important;
- color: #fff;
- }
- .novisitlog a {
- color: #fff;
- }
- .crmsearchlist {
- max-height: 760px;
- cursor: pointer;
- }
- .tablebox .layui-form.layui-border-box.layui-table-view {
- max-height: 760px !important;
- height: auto !important;
- }
- .layui-table-body {
- /* max-height: 670px !important; */
- height: auto !important;
- }
- .layui-table-view .layui-table td {
- cursor: pointer;
- overflow: hidden;
- }
- .layui-form-checked {
- background-color: #37af6e;
- }
- .layui-table-view .layui-form-checked i {
- color: #fff;
- }
- .layui-table-cell {
- overflow: hidden;
- }
- .searchbox .layui-form-select {
- float: left;
- width: 130px;
- }
- .searchbox input {
- border: 1px solid #e6e6e6 !important;
- }
- .totalBox {
- width: 100%;
- height: 100px;
- border: 1px solid #f2f2f2;
- display: flex;
- align-items: center;
- }
- .totalBox > div {
- flex: 1;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- }
- .totalName {
- font-size: 16px;
- color: #999999;
- }
- .totalNum {
- font-size: 20px;
- font-weight: 600;
- }
- .totalline {
- flex: none !important;
- width: 1px !important;
- height: 50px !important;
- background-color: #f2f2f2;
- }
- .ml5 {
- margin-left: 5px;
- }
- .cursor {
- cursor: pointer;
- margin-bottom: 8px;
- position: relative;
- }
- .cursor > .layui-form-select {
- width: 115px;
- display: inline-block;
- }
- .cursor > .layui-form-select > .layui-select-title {
- border: none;
- }
- .cursor > .layui-form-select > .layui-select-title > input {
- border: none;
- color: #333333;
- font-weight: 600;
- }
- /* .layui-table-fixed-r .layui-table-body {
- overflow: hidden !important;
- } */
- .relative {
- position: relative;
- }
- .lay-setting {
- position: absolute;
- right: 10px;
- top: 10px;
- z-index: 999 !important;
- cursor: pointer;
- }
- .lay-mask {
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.3);
- position: fixed;
- top: 0px;
- left: 0px;
- z-index: 9999 !important;
- }
- .lay-block {
- width: 400px;
- height: 100%;
- background-color: #fff;
- position: absolute;
- right: 0px;
- top: 0px;
- box-sizing: border-box;
- padding: 10px 10px 30px 10px;
- overflow: auto;
- }
- .lay-title {
- width: 100%;
- height: 40px;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .lay-title > span {
- font-size: 16px;
- color: #333333;
- font-weight: 600;
- }
- .lay-title > i {
- font-weight: 600;
- cursor: pointer;
- }
- .layui-content {
- width: 100%;
- height: auto;
- }
- .lay-item {
- width: 100%;
- height: 50px;
- /* display: flex;
- align-items: center;
- justify-content: space-between; */
- }
- .lay-item > div {
- display: flex;
- align-items: center;
- }
- .lay-item > div > span {
- margin-left: 6px;
- }
- .sort_lis01 {
- float: left;
- }
- .sort_lis02 {
- float: right;
- }
- .sort_time {
- overflow: hidden;
- }
- .layui-form-switch i {
- top: 2px !important;
- }
- .relative {
- position: relative;
- }
- .selectDateBox {
- position: absolute;
- width: 330px;
- height: 100px;
- box-shadow: 0 2px 4px rgb(0 0 0 / 12%);
- background-color: #fff;
- z-index: 99999 !important;
- top: 45px;
- box-sizing: border-box;
- padding: 5px 8px;
- }
- .selecstDateBox {
- position: absolute;
- width: 330px;
- height: 100px;
- box-shadow: 0 2px 4px rgb(0 0 0 / 12%);
- background-color: #fff;
- z-index: 99999 !important;
- top: 45px;
- right: 0;
- box-sizing: border-box;
- padding: 5px 8px;
- }
- .date-flex,
- .date-flex1 {
- display: flex;
- align-items: center;
- }
- .date-box {
- padding: 15px 0px 10px;
- }
- .line-middle {
- width: 10px;
- height: 100%;
- margin: 0px 10px;
- }
- .line {
- width: 10px;
- height: 2px;
- background-color: #999999;
- }
- .mb0 {
- margin-bottom: 0px;
- }
- .layui-btn {
- background-color: #fff;
- color: #555;
- border: 1px solid #c9c9c9;
- }
- .layui-btn:hover {
- background-color: #fff;
- color: #555;
- border: 1px solid #249efb;
- }
- .layui-btn-primary,
- .sBtn {
- background-color: #249efb;
- color: #fff;
- border: 1px solid #249efb;
- }
- .layui-btn-primary:hover {
- background-color: #249efb;
- color: #fff;
- border: 1px solid #249efb;
- }
- .sBtn:hover {
- background-color: #249efb;
- color: #fff;
- border: 1px solid #249efb;
- }
- .flex-row,
- .row {
- display: flex;
- }
- .align-center {
- align-items: center;
- }
- .ml10 {
- margin-left: 10px;
- }
- .mt10 {
- margin-top: 10px;
- }
- .padding-tlr {
- padding: 15px 15px 0px;
- }
- .layui-input-block {
- margin-left: 0px;
- }
- .justify-between {
- justify-content: space-between;
- }
- .qdtj_m {
- padding: 0 15px;
- width: 100%;
- box-sizing: border-box;
- margin: 20px 0 10px;
- }
- .qdtj_ul {
- overflow: hidden;
- border: 1px solid #94d0ff;
- padding: 15px 0;
- background-color: #fbfdff;
- }
- .qdtj_ul li {
- float: left;
- position: relative;
- text-align: center;
- width: 10%;
- }
- .qdtj_1 {
- font-size: 20px;
- font-weight: 400;
- }
- .qdtj_2 {
- font-size: 14px;
- color: #888;
- margin-top: 5px;
- }
- .qdtj_r_x {
- height: 40px;
- width: 1px;
- background: #d8d8d9;
- position: absolute;
- right: 0;
- top: 50%;
- margin-top: -20px;
- }
- ::-webkit-scrollbar {
- width: auto;
- height: auto;
- }
- ::-webkit-scrollbar-thumb {
- border-radius: 10px;
- -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
- background: #dfdfdf;
- }
- ::-webkit-scrollbar-track {
- -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
- border-radius: 10px;
- background: #f5f5f5;
- }
- .backPreLevel {
- color: #249efb;
- cursor: pointer;
- margin-right: 10px;
- }
- th .layui-table-cell {
- height: 38px;
- line-height: 38px;
- padding: 0;
- overflow: unset;
- }
- .layui-table-header {
- overflow: visible;
- }
- .psinput {
- top: 45px;
- left: 50%;
- margin-left: -118px;
- width: 236px;
- background: #fff;
- z-index: 999 !important;
- position: absolute;
- box-shadow: 0 1px 10px #999;
- display: none;
- border-radius: 6px;
- overflow: visible;
- padding-top: 10px;
- }
- .dsa {
- width: 100%;
- height: 100%;
- display: block;
- }
- .pdl12 {
- padding-left: 12px;
- }
- .search_btns {
- margin-top: 11px;
- border-top: 1px solid #ccc;
- }
- .search_btns div.button_ {
- display: flex;
- width: 80%;
- overflow: hidden;
- margin: 0 auto;
- justify-content: space-between;
- }
- .scroll_body {
- overflow-x: auto;
- width: calc(100% - -17px);
- }
- .layui-table-body {
- min-height: 500px;
- overflow: visible;
- }
- .layui-form-select dl {
- z-index: 100;
- }
- .kwovsint {
- width: 90%;
- height: 40px;
- display: block;
- border: 1px solid #409eff;
- border-radius: 6px;
- }
- .checkbox {
- width: 20px;
- height: 20px;
- margin-top: 15px;
- display: block;
- float: left;
- }
- .checkdeta {
- width: 20px;
- height: 20px;
- margin-top: 15px;
- display: block;
- float: left;
- }
- .psinput .layui-form-checkbox {
- display: block;
- float: left;
- width: 20px;
- height: 20px;
- padding: 0;
- }
- .psinput .layui-form-checkbox .layui-icon {
- display: block;
- float: left;
- width: 20px !important;
- height: 20px !important;
- border: 1px solid #d2d2d2 !important;
- top: 1px;
- }
- .psinput .layui-form-checkbox .layui-icon::before {
- position: absolute;
- top: 2px;
- left: 3px;
- font-size: 14px;
- }
- .check_ul_list {
- max-height: 300px;
- overflow-y: auto;
- }
- .check_li {
- width: 90%;
- margin: 0 auto;
- overflow: hidden;
- }
- .check_li li {
- overflow: hidden;
- margin-bottom: 15px;
- }
- .check_name {
- float: left;
- line-height: 20px;
- font-size: 14px;
- margin-left: 8px;
- }
- .dsnone .layui-form-checkbox {
- position: absolute;
- width: 25px;
- height: 28px;
- margin-top: 8px;
- visibility: hidden;
- }
- .button_ a {
- position: relative;
- }
- .triangle {
- width: 0;
- height: 0;
- float: left;
- border-bottom: 10px solid #fff;
- border-left: 10px solid transparent;
- border-right: 10px solid transparent;
- position: absolute;
- top: -10px;
- left: 50%;
- margin-left: -10px;
- }
- .psinput02 {
- width: 330px !important;
- margin-left: -165px !important;
- }
- .psinput02 > .selecstDateBox {
- position: inherit !important;
- box-shadow: none;
- margin-top: 5px;
- height: 80px !important;
- }
- .mapps {
- position: absolute;
- right: 3%;
- top: 13px;
- width: 16px;
- }
- .selectDateBox {
- position: absolute;
- width: 330px;
- height: 100px;
- box-shadow: 0 2px 4px rgb(0 0 0 / 12%);
- background-color: #fff;
- z-index: 99999 !important;
- top: 45px;
- box-sizing: border-box;
- padding: 5px 8px;
- }
- .selecstDateBox {
- position: absolute;
- width: 330px;
- height: 100px;
- box-shadow: 0 2px 4px rgb(0 0 0 / 12%);
- background-color: #fff;
- z-index: 99999 !important;
- top: 45px;
- right: 0;
- box-sizing: border-box;
- padding: 5px 8px;
- }
- .layui-form-select dl {
- z-index: 102 !important;
- }
- .crmsearchlist {
- margin-bottom: 50px;
- }
- strong {
- display: inline-block;
- width: 100%;
- height: 100%;
- }
- .hovers:hover {
- background-color:#d0af4c; font-weight:bold;
- }
- .layui-table-page {
- margin-bottom: 100px !important;
- }
- .mapps{position: absolute;right:3%;top:15px;width:12px;}
- </style>
- <body class="clearfix">
- <iframe id="customer_detail" style="display: none" src=""></iframe>
- <div class="crmbox">
- <div class="search-form layui-form padding-tlr" style="margin-bottom: 10px">
- <!-- <div class="flex-row align-center justify-between" style="overflow: hidden;"> -->
- <form id="reset_form">
- <div class="" style="">
- <div class="flex-row align-center" style="float: left">
- <!-- <div class="backPreLevel">
- <i class="layui-icon layui-icon-return"></i>返回
- </div> -->
- <div class="layui-input-block">
- <input
- type="text"
- class="layui-input"
- id="keyword"
- autocomplete="off"
- name="keyword"
- placeholder="请输入员工名称"
- />
- </div>
- <div class="layui-input-inline layui-form ml10">
- <select name="org_id" class="type_id" id="org_id" lay-search>
- <option value="">请选择部门</option>
- {volist name="org" id="i"}
- <option value="{$i.id}">{$i.name}</option>
- {/volist}
- </select>
- </div>
- <div class="layui-input-inline layui-form ml10">
- <select name="source" class="type_id" id="source_id" lay-search>
- <option value="">请选择来源</option>
- {volist name="source" id="i"}
- <option value="{$i.id}">{$i.source}</option>
- {/volist}
- </select>
- </div>
- <div
- class="layui-input-inline layui-form ml10"
- style="display: inline-block"
- >
- <!-- <label class="layui-form-label" style="width: 60px;">跟进时间</label> -->
- <div class="layui-input-inline select-date relative">
- <!-- 注意:这一层元素并不是必须的 -->
- <input
- type="text"
- class="layui-input"
- id="sDate"
- name="start_date"
- style="width:170px;"
- placeholder="开始日期 - 结束日期"
- autocomplete="off"
- />
- <div data-type="" class="selecstDateBox layui-hide">
- <div data-type="" class="date-flex1">
- <div
- data-type="today"
- class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs"
- >
- 今日
- </div>
- <div
- data-type="yesterday"
- class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs"
- >
- 昨日
- </div>
- <div
- data-type="week"
- class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs"
- >
- 本周
- </div>
- <div
- data-type="lastWeek"
- class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs"
- >
- 上周
- </div>
- <div
- data-type="month"
- class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs"
- >
- 本月
- </div>
- <div
- data-type="lastMonth"
- class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs"
- >
- 上月
- </div>
- <div
- data-type="all"
- class="layui-btn layui-btn-primary layui-border-blue layui-btn-xs"
- >
- 累计
- </div>
- </div>
- <div data-type="" class="date-box">
- <input
- data-type=""
- type="text"
- id="select_sDate"
- placeholder="选择开始时间 - 结束时间"
- readonly
- autocomplete="off"
- class="layui-input"
- />
- </div>
- </div>
- </div>
- </div>
- </div>
- <div style="float: right">
- <button
- class="layui-btn sBtn ml10 submitbtn"
- id="searchbtn"
- type="button"
- lay-filter="table-search"
- >
- 筛选
- </button>
- <button type="reset" class="layui-btn sBtn ml10" id="resetbtn">
- 重置
- </button>
- </div>
- </div>
- </form>
- <div style="clear: both"></div>
- </div>
- <div class="crmsearchlist relative">
- <i class="layui-icon layui-icon-set-fill lay-setting"></i>
- <table lay-filter="crmsearchlist" id="crmsearchlist"></table>
- </div>
- </div>
- <!-- -->
- <div class="lay-mask layui-hide">
- <div class="lay-block">
- <div class="lay-title">
- <span>表格显示设置</span>
- <i class="layui-icon layui-icon-close"></i>
- </div>
- <div class="layui-content layui-form"></div>
- </div>
- </div>
- </body>
- <script src="__LAYUI__/layui/layui.js"></script>
- <script type="text/javascript" src="__STATIC__/js/Sortable.js"></script>
- {/block}{block name="js"}
- <script type="text/html" id="crmname">
- {{d.name?d.name:'未知'}} {{# if(d.jiaoding_time){ }}
- <span class="dingjingorder">定金</span>
- {{# }else{ }} {{# } }}
- </script>
- <script type="text/html" id="empname">
- {{# if(d.employee){ }} {{d.employee.name}} {{# if(d.add_wechat=='是'){ }}
- <span class="addvx">v</span>
- {{# }else{ }} {{# } }} {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# if(d.add_wechat=='是'){ }}
- <span class="addvx">v</span>
- {{# }else{ }} {{# } }} {{# } }}
- </script>
- <script type="text/html" id="square">
- {{# if(d.square>200){ }}
- <span style="font-weight: bold;color: #ff6600;">{{d.square}}</span>
- {{# }else if(d.square){ }}
- <span>{{d.square}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="designer_name">
- {{# if(d.designer){ }}
- <span>{{d.designer.name}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="source">
- {{# if(d.source){ }}
- <span>{{d.source.source}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="status">
- {{# if(d.state=="待确认"){ }}
- <div class="unstatusbox" lay-event="unstatus">
- <input type="checkbox" class="redconfirm" />
- <span class="statusbox">{{d.time_status?d.time_status:'-'}}</span>
- </div>
- {{# }else if(d.visit_log_count==0){ }}
- <span style="color: #cccccc;">-</span>
- {{# }else { }}
- <span>{{d.time_status}}</span>
- {{# } }}
- </script>
- <script type="text/html" id="editbox">
- {{# if(d.state=="待确认" && d.is_followup == 1){ }}
- <a style="display:inline-block;" lay-event="edit" href="javascript:void(0);"
- >编辑</a
- >
- {{# }else { }} {{# if(d.is_followup == 1){ }}
- <a
- style="display:inline-block;"
- lay-event="editstate"
- href="javascript:void(0);"
- >状态</a
- ><span style="padding:0 4px;">/</span
- ><a lay-event="edit" style="display:inline-block;" href="javascript:void(0);"
- >编辑</a
- >
- {{# } }} {{# } }}
- </script>
- <script type="text/html" id="designer_nametpl">
- {{# if(d.designer){ }}
- <span>{{d.designer.name}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="employee_nametpl">
- {{# if(d.employee){ }}
- <span>{{d.employee.name}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="phone">
- <div>
- {{# if(d.phone){ }}
- <div>{{d.phone}}</div>
- {{# } }} {{# if(d.phone1){ }}
- <p>{{d.phone1}}</p>
- {{# } }} {{# if(d.phone2){ }}
- <p>{{d.phone2}}</p>
- {{# } }}
- </div>
- </script>
- <script type="text/html" id="stateTpl">
- {{# if(d.allstate){ }}
- <span>{{d.allstate}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="level">
- {{# if(d.level){ }}
- <span>{{d.level}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="last_contact_date">
- {{# if(d.last_contact_date){ }}
- <span>{{d.last_contact_date}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="revisit_time">
- {{# if(d.revisit_time){ }} {{# if(d.revisit_time =='0000-00-00'){ }}
- <span style="color: #cccccc;">无</span>
- {{# }else{ }}
- <span>{{d.revisit_time}}</span>
- {{# } }} {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="protectTpl">
- {{# if(d.protected_to){ }}
- <span>{{d.protected_to}}</span>
- {{# }else{ }}
- <span style="color: #cccccc;">无</span>
- {{# } }}
- </script>
- <script type="text/html" id="add_wechat_count">
- {{# if(d.add_wechat_count){ }}
- <strong
- href="javascript:void(0)"
- lay-event="add_wechat_count"
- style="color:blue;"
- >{{d.add_wechat_count}}</strong
- >
- {{# }else{ }}
- <span>{{d.add_wechat_count}}</span>
- {{# } }}
- </script>
- <script type="text/html" id="follow_customer_count">
- {{# if(d.follow_customer_count){ }}
- <strong
- href="javascript:void(0)"
- lay-event="follow_customer_count"
- style="color:blue;"
- >{{d.follow_customer_count}}</strong
- >
- {{# }else{ }}
- <span>{{d.follow_customer_count}}</span>
- {{# } }}
- </script>
- <script type="text/html" id="valid_count">
- {{# if(d.valid_count){ }}
- <strong
- href="javascript:void(0)"
- lay-event="valid_count"
- style="color:blue;"
- >{{d.valid_count}}</strong
- >
- {{# }else{ }}
- <span>{{d.valid_count}}</span>
- {{# } }}
- </script>
- <script type="text/html" id="not_sure_count">
- {{# if(d.not_sure_count){ }}
- <strong
- href="javascript:void(0)"
- lay-event="not_sure_count"
- style="color:blue;"
- >{{d.not_sure_count}}</strong
- >
- {{# }else{ }}
- <span>{{d.not_sure_count}}</span>
- {{# } }}
- </script>
- <script type="text/html" id="yixiang_assigned_count">
- {{# if(d.yixiang_assigned_count){ }}
- <strong
- href="javascript:void(0)"
- lay-event="yixiang_assigned_count"
- style="color:blue;"
- >{{d.yixiang_assigned_count}}</strong
- >
- {{# }else{ }}
- <span>{{d.yixiang_assigned_count}}</span>
- {{# } }}
- </script>
- <script type="text/html" id="daodian_assigned_count">
- {{# if(d.daodian_assigned_count){ }}
- <strong
- href="javascript:void(0)"
- lay-event="daodian_assigned_count"
- style="color:blue;"
- >{{d.daodian_assigned_count}}</strong
- >
- {{# }else{ }}
- <span>{{d.daodian_assigned_count}}</span>
- {{# } }}
- </script>
- <script type="text/html" id="measuring_assigned_count">
- {{# if(d.measuring_assigned_count){ }}
- <strong
- href="javascript:void(0)"
- lay-event="measuring_assigned_count"
- style="color:blue;"
- >{{d.measuring_assigned_count}}</strong
- >
- {{# }else{ }}
- <span>{{d.measuring_assigned_count}}</span>
- {{# } }}
- </script>
- <!-- <script type="text/html" id="measuring_room_customer">
- {{# if(d.measuring_room_customer){ }}
- <strong
- href="javascript:void(0)"
- lay-event="measuring_room_customer"
- style="color:blue;"
- >{{d.measuring_room_customer}}</strong
- >
- {{# }else{ }}
- <span>{{d.measuring_room_customer}}</span>
- {{# } }}
- </script> -->
- <script type="text/html" id="strtore_customer_count">
- {{# if(d.strtore_customer_count){ }}
- <strong
- href="javascript:void(0)"
- lay-event="strtore_customer_count"
- style="color:blue;"
- >{{d.strtore_customer_count}}</strong
- >
- {{# }else{ }}
- <span>{{d.strtore_customer_count}}</span>
- {{# } }}
- </script>
- <script type="text/html" id="sign_count">
- {{# if(d.sign_count){ }}
- <strong
- href="javascript:void(0)"
- lay-event="sign_count"
- style="color:blue;"
- >{{d.sign_count}}</strong
- >
- {{# }else{ }}
- <span>{{d.sign_count}}</span>
- {{# } }}
- </script>
- <script type="text/html" id="deposit_count">
- {{# if(d.deposit_count){ }}
- <strong
- href="javascript:void(0)"
- lay-event="deposit_count"
- style="color:blue;"
- >{{d.deposit_count}}</strong
- >
- {{# }else{ }}
- <span>{{d.deposit_count}}</span>
- {{# } }}
- </script>
- <script type="text/html" id="invalid_customer_count">
- <span>{{d.invalid_customer_count}}</span>
- <!-- {{# if(d.invalid_customer_count){ }}
- <strong
- href="javascript:void(0)"
- lay-event="invalid_customer_count"
- style="color:blue;"
- >{{d.invalid_customer_count}}</strong
- >
- {{# }else{ }}
- <span>{{d.invalid_customer_count}}</span>
- {{# } }} -->
- </script>
- <script type="text/javascript">
- var reload = null,
- resizefun = null;
- layui
- .config({
- base: "__LAYUI__/",
- urlbase: "/sys",
- })
- .extend({
- index: "lib/index", //主入口模块
- })
- .use(["table", "form", "laydate"], function () {
- var table = layui.table,
- laydate = layui.laydate,
- $ = layui.$;
- (form = layui.form), (fType = 1), (firstloading = 0);
- var field = {};
- var showKey = {
- lf: { key: "measuring_room_customer", name: "量房数", search: false },
- dd: { key: "to_the_store", name: "到店数", search: false },
- wx: { key: "invalid_customer_count", name: "无效线索客户数", search: false },
- mj: { key: "square", name: "面积", search: false },
- fwzt: { key: "house_status", name: "房屋状态", search: false },
- fwlx: { key: "house_type", name: "房屋类型", search: false },
- ddpjzq: {key: "strtore_avg_days_1", name: "一次到店平均周期", search: false }
- };
- var valType = 2;
- var orgId = "";
- // if (is_manager != 1) {
- // $('.totalBox').addClass('layui-hide');
- // $('.topStyle1').removeClass('layui-hide');
- // $('.topStyle2').addClass('layui-hide');
- // }
- // form.on('submit(search)', function (data) {
- // var source_id = $('[name=source_id]').val();
- // var designer_id = $('[name=designer_id]').val();
- // var level = $('[name=level]').val();
- // var keyname = $('[name=keyname]').val();
- // var state = $('[name=state]').val();
- // var addtime = $('[name=addtime]').val();
- // var followtime = $('[name=followtime]').val();
- // var employee_id = $('[name=employee_id]').val();
- // field['keyname'] = keyname;
- // field['source_id'] = source_id;
- // field['designer_id'] = designer_id;
- // field['level'] = level;
- // field['state'] = state;
- // field['addtime'] = addtime;
- // field['followtime'] = followtime;
- // field['employee_id'] = employee_id;
- // //执行重载
- // table.reload('crmsearchlist', {
- // where: field
- // , page: { curr: 1 }
- // });
- // // if (is_manager == 1) {
- // // getStatistics();
- // // getStatisticsMore();
- // // }
- // });
- $("#searchbtn").click(function () {
- firstloading = 0;
- var keyword = $("#keyword").val();
- var org_id = $("#org_id").val();
- var source_id = $("#source_id").val();
- let sDate = $("#sDate").val();
- let option = {
- where: {
- keyword: keyword,
- org_id: org_id,
- source_id: source_id,
- start_date: sDate,
- type: valType,
- },
- page: {
- curr: 1,
- },
- };
- //执行重载
- table.reload("crmsearchlist", option);
- });
- //重置
- $("#resetbtn").click(function () {
- firstloading = 0;
- $("#keyword").val("");
- $("#sDate").val("");
- $("#org_id").val("");
- $("#source_id").val("");
- $("#reset_form")[0].reset();
- layui.form.render();
- let option = {
- where: {
- keyword: "",
- start_date: "",
- org_id: "",
- source_id: "",
- type: valType,
- },
- page: {
- curr: 1,
- },
- };
- table.reload("crmsearchlist", option);
- });
- $("#addWechatTime").click(function () {
- $(".selectDateBox").toggleClass("layui-hide");
- $(".selecstDateBox").addClass("layui-hide");
- });
- $("#sDate").click(function () {
- $(".selecstDateBox").toggleClass("layui-hide");
- $(".selectDateBox").addClass("layui-hide");
- });
- laydate.render({
- elem: "#select_date",
- type: "date",
- range: true,
- format: "yyyy/MM/dd",
- trigger: "click", //呼出事件改成click
- done: function (value, date, endDate) {
- $(".selectDateBox").addClass("layui-hide");
- $("#addWechatTime").val(value);
- },
- });
- laydate.render({
- elem: "#select_sDate", //指定元素
- type: "date",
- format: "yyyy/MM/dd",
- range: true,
- trigger: "click", //呼出事件改成click
- done: function (value, date, endDate) {
- $(".selecstDateBox").addClass("layui-hide");
- $("#sDate").val(value);
- },
- });
- var dateObj = {};
- setDate();
- function setDate() {
- let date = new Date();
- let year = date.getFullYear();
- let month = date.getMonth() + 1;
- let day = date.getDate();
- let lastDate = new Date(new Date().getTime() - 1 * 24 * 60 * 60 * 1000);
- let lastYear = lastDate.getFullYear();
- let lastMonth = lastDate.getMonth() + 1;
- let lastDay = lastDate.getDate();
- let weekObj = getMondayAndSunday();
- let monthObj = getMonthFirstDayAndLastDay();
- dateObj = {
- today: `${year}/${month}/${day}`,
- yesterday: `${lastYear}/${lastMonth}/${lastDay}`,
- ...weekObj,
- ...monthObj,
- };
- }
-
- // if (valType != 2) {
- // $(".backPreLevel").addClass("layui-hide");
- // $(".employeeEle").addClass("layui-hide");
- // } else {
- // $(".departEle").addClass("layui-hide");
- // }
- // $(".backPreLevel").click(function () {
- // window.history.back();
- // });
- $(".date-flex div").click(function () {
- let type = $(this).prop("dataset").type;
- if (type == "today") {
- $("#select_date").val(`${dateObj.today} - ${dateObj.today}`);
- $("#addWechatTime").val(`${dateObj.today} - ${dateObj.today}`);
- } else if (type == "yesterday") {
- $("#select_date").val(`${dateObj.yesterday} - ${dateObj.yesterday}`);
- $("#addWechatTime").val(
- `${dateObj.yesterday} - ${dateObj.yesterday}`
- );
- } else if (type == "week") {
- $("#select_date").val(
- `${dateObj.thisWeekMonday} - ${dateObj.thisWeekSunday}`
- );
- $("#addWechatTime").val(
- `${dateObj.thisWeekMonday} - ${dateObj.thisWeekSunday}`
- );
- } else if (type == "lastWeek") {
- $("#select_date").val(
- `${dateObj.lastWeekMonday} - ${dateObj.lastWeekSunday}`
- );
- $("#addWechatTime").val(
- `${dateObj.lastWeekMonday} - ${dateObj.lastWeekSunday}`
- );
- } else if (type == "month") {
- $("#select_date").val(
- `${dateObj.thisMonthFirstDay} - ${dateObj.thisMonthLastDay}`
- );
- $("#addWechatTime").val(
- `${dateObj.thisMonthFirstDay} - ${dateObj.thisMonthLastDay}`
- );
- } else if (type == "lastMonth") {
- $("#select_date").val(
- `${dateObj.lastMonthFirstDay} - ${dateObj.lastMonthLastDay}`
- );
- $("#addWechatTime").val(
- `${dateObj.lastMonthFirstDay} - ${dateObj.lastMonthLastDay}`
- );
- } else {
- $("#select_date").val("");
- $("#sDate").val("");
- $("#addWechatTime").val("");
- }
- $(".selectDateBox").addClass("layui-hide");
- });
-
- $(".date-flex1 div").click(function () {
- let type = $(this).prop("dataset").type;
- if (type == "today") {
- itmesss = dateToYYYYMMDD(dateObj.today);
- itmesss2 = dateToYYYYMMDD(dateObj.today);
- $("#select_sDate").val(itmesss+' - '+itmesss2);
- $("#sDate").val(itmesss+' - '+itmesss2);
- } else if (type == "yesterday") {
- itmesss = dateToYYYYMMDD(dateObj.yesterday);
- itmesss2 = dateToYYYYMMDD(dateObj.yesterday);
- $("#select_sDate").val(itmesss+' - '+itmesss2);
- $("#sDate").val(itmesss+' - '+itmesss2);
- } else if (type == "week") {
- $("#select_sDate").val(
- `${dateObj.thisWeekMonday} - ${dateObj.thisWeekSunday}`
- );
- $("#sDate").val(
- `${dateObj.thisWeekMonday} - ${dateObj.thisWeekSunday}`
- );
- } else if (type == "lastWeek") {
- $("#select_sDate").val(
- `${dateObj.lastWeekMonday} - ${dateObj.lastWeekSunday}`
- );
- $("#sDate").val(
- `${dateObj.lastWeekMonday} - ${dateObj.lastWeekSunday}`
- );
- } else if (type == "month") {
- $("#select_sDate").val(
- `${dateObj.thisMonthFirstDay} - ${dateObj.thisMonthLastDay}`
- );
- $("#sDate").val(
- `${dateObj.thisMonthFirstDay} - ${dateObj.thisMonthLastDay}`
- );
- } else if (type == "lastMonth") {
- $("#select_sDate").val(
- `${dateObj.lastMonthFirstDay} - ${dateObj.lastMonthLastDay}`
- );
- $("#sDate").val(
- `${dateObj.lastMonthFirstDay} - ${dateObj.lastMonthLastDay}`
- );
- } else {
- $("#select_sDate").val("");
- $("#sDate").val("");
- }
- $(".selecstDateBox").addClass("layui-hide");
- });
- function getMondayAndSunday() {
- var today = new Date();
- //构建当前日期,格式:2022-08-22 00:00:00
- var year = today.getFullYear(); //本年
- var month = today.getMonth() + 1; //本月
- var day = today.getDate(); //本日
- var newDate = new Date(year + "/" + month + "/" + day + " 00:00:00"); //年月日拼接
- var nowTime = newDate.getTime(); //当前的时间戳
- var weekDay = newDate.getDay(); //当前星期 0.1.2.3.4.5.6 【0 = 周日】
- var oneDayTime = 24 * 60 * 60 * 1000; //一天的总ms
- // 当前星期减去天数,如今天为周五,则本周一为周五的时间戳减去4天的时间戳。但周日特殊,周一至周六是周几的到的weekDay就是几,但是周日的到的为0,需特殊处理
- var thisWeekMondayTime = (1 - weekDay) * oneDayTime + nowTime; //本周一的时间戳
- if (weekDay == 0) {
- // weekDay = 0 为周日,此时本周一时间为周日减去6天的时间
- thisWeekMondayTime = nowTime - 6 * oneDayTime;
- }
- var thisWeekSundayTime = thisWeekMondayTime + 6 * 24 * 60 * 60 * 1000; // 本周日
- var lastWeekMondayTime = thisWeekMondayTime - 7 * oneDayTime; // 上周一
- var lastWeekSundayTime = thisWeekMondayTime - oneDayTime; // 上周日
- var res = {
- thisWeekMonday: dateToYYYYMMDD(thisWeekMondayTime),
- thisWeekSunday: dateToYYYYMMDD(thisWeekSundayTime),
- lastWeekMonday: dateToYYYYMMDD(lastWeekMondayTime),
- lastWeekSunday: dateToYYYYMMDD(lastWeekSundayTime),
- };
- return res;
- }
- function getMonthFirstDayAndLastDay() {
- var date = new Date();
- // 值得注意的是,如果day取值为0,意味着取的是date时间的上一个月的最后一天,简单理解:date当前月的第一天,再减去一天
- var thisMonthFirstDay = date.setDate(1); // 本月第一天
- var thisMonthLastDay = new Date(
- date.getFullYear(),
- date.getMonth() + 1,
- 0
- ); // 本月最后一天
- var lastMonthFirstDay = new Date(
- date.getFullYear(),
- date.getMonth() - 1,
- 1
- ); // 上月第一天
- var lastMonthLastDay = date.setDate(0); // 上月最后一天
- // var day = new Date(date.getFullYear(), date.getMonth(), 0).getDate()
- // var lastMonthLastDay = new Date(date.getFullYear(), date.getMonth() - 1, day) // 上月最后一天
- var res = {
- thisMonthFirstDay: dateToYYYYMMDD(thisMonthFirstDay),
- thisMonthLastDay: dateToYYYYMMDD(thisMonthLastDay),
- lastMonthFirstDay: dateToYYYYMMDD(lastMonthFirstDay),
- lastMonthLastDay: dateToYYYYMMDD(lastMonthLastDay),
- };
- return res;
- }
- function dateToYYYYMMDD(date) {
- var time = new Date(date);
- var y = time.getFullYear();
- var m = time.getMonth() + 1;
- m = m > 9 ? m : "0" + m;
- var d = time.getDate();
- d = d > 9 ? d : "0" + d;
- return y + "/" + m + "/" + d;
- }
- ajaxlist();
-
- function ajaxlist() {
- $('.date-flex1 div[data-type=month]').click();
- $.ajax({
- type: "post",
- url: '{:url("empcrm/poolFieldsList")}',
- data: {
- type: 7,
- is_org: valType || 1,
- },
- success: function (res) {
- if(res.code == 403){
- $(".exitbtn").trigger("click");
- }
- data = res.data;
- tableData = data;
- var cols = [[]];
- $.each(data, function (key, val) {
- if (key == "name") {
- cols[0].push({
- field: key,
- title: val["name"],
- minWidth: val["width"],
- align: "center",
- show: val["show"],
- fixed: "left",
- });
- } else if (key == "org_name") {
- cols[0].push({
- field: key,
- title: val["name"],
- minWidth: val["width"],
- align: "center",
- show: val["show"],
- fixed: "left",
- templet: function (res) {
- if (valType != 2) {
- return `<a style="color:#249EFB;" href="generalStatistics.html?type=2&org_id=${res.org_id}">${res.org_name}</a>`;
- } else {
- return `<span>${res.org_name}</span>`;
- }
- },
- });
- } else if (key == "measuring_room_customer" && val["show"] == 1) {
- cols[0].push({
- field: showKey.lf.key,
- title: showKey.lf.name,
- minWidth: 150,
- align: "center",
- show: val["show"],
- templet: function(res){
- if(res[showKey.lf.key]){
- return `<strong href="javascript:void(0)" lay-event="measuring_room_customer" style="color:blue;">${res[showKey.lf.key]}</strong>`
- }else{
- return `<span>${res[showKey.lf.key]}</span>`
- }
- }
- });
- } else if (key == "strtore_customer_count" && val["show"] == 1) {
- cols[0].push({
- field: key,
- title: val['name'],
- minWidth: 150,
- align: "center",
- show: val["show"],
- templet: "#strtore_customer_count"
- });
- } else if (key == "deposit_count" && val["show"] == 1) {
- cols[0].push({
- field: key,
- title: val['name'],
- minWidth: 150,
- align: "center",
- show: val["show"],
- templet: "#deposit_count"
- });
- }else if (key == "sign_count" && val["show"] == 1) {
- cols[0].push({
- field: key,
- title: val['name'],
- minWidth: 150,
- align: "center",
- show: val["show"],
- templet: "#sign_count"
- });
- } else if (key == "to_the_store" && val["show"] == 1) {
- cols[0].push({
- field: showKey.dd.key,
- title: showKey.dd.name,
- minWidth: val["width"],
- align: "center",
- show: val["show"],
- });
- } else if (key == "invalid_customer_count" && val["show"] == 1) {
- cols[0].push({
- field: showKey.wx.key,
- title: showKey.wx.name,
- minWidth: val["width"],
- align: "center",
- show: val["show"],
- templet: function(res){
- if(res[showKey.wx.key]){
- return `<span>${res[showKey.wx.key]}</span>`
- /* return `<strong
- href="javascript:void(0)"
- lay-event="invalid_customer_count"
- style="color:blue;"
- >${res[showKey.wx.key]}</strong>` */
- }else{
- return `<span>${res[showKey.wx.key]}</span>`
- }
- }
- });
- } else if (key == "square" && val["show"] == 1) {
- cols[0].push({
- field: showKey.mj.key,
- title: showKey.mj.name,
- minWidth: val["width"],
- align: "center",
- show: val["show"],
- });
- } else if (key == "house_status" && val["show"] == 1) {
- cols[0].push({
- field: showKey.fwzt.key,
- title: showKey.fwzt.name,
- minWidth: val["width"],
- align: "center",
- show: val["show"],
- });
- } else if (key == "house_type" && val["show"] == 1) {
- cols[0].push({
- field: showKey.fwlx.key,
- title: showKey.fwlx.name,
- minWidth: val["width"],
- align: "center",
- show: val["show"],
- });
- } else if (key == "strtore_avg_days_1" && val["show"] == 1) {
- cols[0].push({
- field: showKey.ddpjzq.key,
- title: showKey.ddpjzq.name,
- minWidth: val["width"],
- align: "center",
- show: val["show"],
- });
- } else if (key == "follow_customer_count" && val["show"] == 1) {
- cols[0].push({
- field: key,
- title: val["name"],
- minWidth: val["width"],
- align: "center",
- show: val["show"],
- templet: "#follow_customer_count"
- });
- } else if (key == "valid_count" && val["show"] == 1) {
- cols[0].push({
- field: key,
- title: val["name"],
- minWidth: val["width"],
- align: "center",
- show: val["show"],
- templet: "#valid_count"
- });
- }else if (key == "not_sure_count" && val["show"] == 1) {
- cols[0].push({
- field: key,
- title: val["name"],
- minWidth: val["width"],
- align: "center",
- show: val["show"],
- templet: "#not_sure_count"
- });
- }else if (key == "yixiang_assigned_count" && val["show"] == 1) {
- cols[0].push({
- field: key,
- title: val["name"],
- minWidth: val["width"],
- align: "center",
- show: val["show"],
- templet: "#yixiang_assigned_count"
- });
- }else if (key == "daodian_assigned_count" && val["show"] == 1) {
- cols[0].push({
- field: key,
- title: val["name"],
- minWidth: val["width"],
- align: "center",
- show: val["show"],
- templet: "#daodian_assigned_count"
- });
- }else if (key == "measuring_assigned_count" && val["show"] == 1) {
- cols[0].push({
- field: key,
- title: val["name"],
- minWidth: val["width"],
- align: "center",
- show: val["show"],
- templet: "#measuring_assigned_count"
- });
- } else {
- if (val["show"] == 1) {
- cols[0].push({
- field: key,
- title: val["name"],
- minWidth: val["width"],
- align: "center",
- show: val["show"],
- });
- }
- }
- });
- cols[0].push({
- title: "",
- width: 30,
- align: "center",
- fixed: "right",
- });
- let url = '{:url("empcrm/generalStatisticsData")}';
- var keyword = $("#keyword").val();
- var org_id = $("#org_id").val();
- var source_id = $("#source_id").val();
- let sDate = $("#sDate").val();
- table.render({
- elem: "#crmsearchlist",
- url: url,
- cols: cols,
- where: {
- keyword: keyword,
- org_id: org_id,
- source_id: source_id,
- start_date: sDate,
- type: valType,
- },
- page: true,
- limits: [10,17,20,30,40],
- limit: 17, //每页默认显示的数量,
- height: "full-50",
- text: "对不起,加载出现异常!",
- done: function (res, curr, count) {
- searchHtmlBody(curr);
- $("strong").each(function() {
- $(this).parent().parent().addClass("hovers")
- })
- },
- });
- },
- });
- }
- var selHtml3 = `<div class="wpsa psinput">
- <div class="triangle"></div>
- <form class="layui-form">
- <input class="pdl12 kwovsint" id="select_check" placeholder="输入关键字....." type="text" id=""/>
- <div class="check_li" style="padding-top:20px;">
- <ul class="check_ul_list">
- {volist name="liangfang_field" id="vo" }
- <li class="check_li_">
- <input class="checkdeta" type="checkbox" name="check_m" lay-filter="checkall03" value="{$key}&{$vo}">
- <p class="check_name">{$vo}</p>
- </li>
- {/volist}
- </ul>
- </div>
- <div class="search_btns">
- <div class="button_">
- <a class="submitbtn">确定</a>
- <a class="dsnonebtn">取消</a>
- </div>
- </div>
- </form>
- </div>`;
- var selHtml4 = `<div class="wpsa psinput">
- <div class="triangle"></div>
- <form class="layui-form">
- <input class="pdl12 kwovsint" id="select_check" placeholder="输入关键字....." type="text" id=""/>
- <div class="check_li" style="padding-top:20px;">
- <ul class="check_ul_list">
- {volist name="daodian_field" id="vo" }
- <li class="check_li_">
- <input class="checkdeta1" type="checkbox" name="check_m" lay-filter="checkall04" value="{$key}&{$vo}">
- <p class="check_name">{$vo}</p>
- </li>
- {/volist}
- </ul>
- </div>
- <div class="search_btns">
- <div class="button_">
- <a class="submitbtn">确定</a>
- <a class="dsnonebtn">取消</a>
- </div>
- </div>
- </form>
- </div>`;
- var selHtml5 = `<div class="wpsa psinput">
- <div class="triangle"></div>
- <form class="layui-form">
- <input class="pdl12 kwovsint" id="select_check" placeholder="输入关键字....." type="text" id=""/>
- <div class="check_li" style="padding-top:20px;">
- <ul class="check_ul_list">
- {volist name="invalid_field" id="vo" }
- <li class="check_li_">
- <input class="checkdeta2" type="checkbox" name="check_m" lay-filter="checkall05" value="{$key}&{$vo}">
- <p class="check_name">{$vo}</p>
- </li>
- {/volist}
- </ul>
- </div>
- <div class="search_btns">
- <div class="button_">
- <a class="submitbtn">确定</a>
- <a class="dsnonebtn">取消</a>
- </div>
- </div>
- </form>
- </div>`;
- var selHtml6 = `<div class="wpsa psinput">
- <div class="triangle"></div>
- <form class="layui-form">
- <input class="pdl12 kwovsint" id="select_check" placeholder="输入关键字....." type="text" id=""/>
- <div class="check_li" style="padding-top:20px;">
- <ul class="check_ul_list">
- {volist name="square_field" id="vo" }
- <li class="check_li_">
- <input class="checkdeta3" type="checkbox" name="check_m" lay-filter="checkall06" value="{$key}&{$vo}">
- <p class="check_name">{$vo}</p>
- </li>
- {/volist}
- </ul>
- </div>
- <div class="search_btns">
- <div class="button_">
- <a class="submitbtn">确定</a>
- <a class="dsnonebtn">取消</a>
- </div>
- </div>
- </form>
- </div>`;
- var selHtml7 = `<div class="wpsa psinput">
- <div class="triangle"></div>
- <form class="layui-form">
- <input class="pdl12 kwovsint" id="select_check" placeholder="输入关键字....." type="text" id=""/>
- <div class="check_li" style="padding-top:20px;">
- <ul class="check_ul_list">
- {volist name="house_status_field" id="vo" }
- <li class="check_li_">
- <input class="checkdeta4" type="checkbox" name="check_m" lay-filter="checkall07" value="{$key}&{$vo}">
- <p class="check_name">{$vo}</p>
- </li>
- {/volist}
- </ul>
- </div>
- <div class="search_btns">
- <div class="button_">
- <a class="submitbtn">确定</a>
- <a class="dsnonebtn">取消</a>
- </div>
- </div>
- </form>
- </div>`;
- var selHtml8 = `<div class="wpsa psinput">
- <div class="triangle"></div>
- <form class="layui-form">
- <input class="pdl12 kwovsint" id="select_check" placeholder="输入关键字....." type="text" id=""/>
- <div class="check_li" style="padding-top:20px;">
- <ul class="check_ul_list">
- {volist name="house_type" id="vo" }
- <li class="check_li_">
- <input class="checkdeta5" type="checkbox" name="check_m" lay-filter="checkall08" value="{$key}&{$vo}">
- <p class="check_name">{$vo}</p>
- </li>
- {/volist}
- </ul>
- </div>
- <div class="search_btns">
- <div class="button_">
- <a class="submitbtn">确定</a>
- <a class="dsnonebtn">取消</a>
- </div>
- </div>
- </form>
- </div>`;
- var selHtml9 = `<div class="wpsa psinput">
- <div class="triangle"></div>
- <form class="layui-form">
- <input class="pdl12 kwovsint" id="select_check" placeholder="输入关键字....." type="text" id=""/>
- <div class="check_li" style="padding-top:20px;">
- <ul class="check_ul_list">
- {volist name="daodian_avg_days_field" id="vo" }
- <li class="check_li_">
- <input class="checkdeta6" type="checkbox" name="check_m" lay-filter="checkall09" value="{$key}&{$vo}">
- <p class="check_name">{$vo}</p>
- </li>
- {/volist}
- </ul>
- </div>
- <div class="search_btns">
- <div class="button_">
- <a class="submitbtn">确定</a>
- <a class="dsnonebtn">取消</a>
- </div>
- </div>
- </form>
- </div>`;
- function searchHtmlBody(pages) {
- setTimeout(function () {
- $("body")
- .find(".layui-table-header")
- .find("tr")
- .each(function (index, val) {
- apphtml02(
- $(this),
- `th[data-field="${showKey.lf.key}"]`,
- showKey.lf.name,
- selHtml3,
- showKey.lf.key,
- "ishtml1",
- showKey.lf.search
- );
- apphtml02(
- $(this),
- `th[data-field="${showKey.dd.key}"]`,
- showKey.dd.name,
- selHtml4,
- showKey.dd.key,
- "ishtml1",
- showKey.dd.search
- );
- apphtml02(
- $(this),
- `th[data-field="${showKey.wx.key}"]`,
- showKey.wx.name,
- selHtml5,
- showKey.wx.key,
- "ishtml1",
- showKey.wx.search
- );
- apphtml02(
- $(this),
- `th[data-field="${showKey.mj.key}"]`,
- showKey.mj.name,
- selHtml6,
- showKey.mj.key,
- "ishtml1",
- showKey.mj.search
- );
- apphtml02(
- $(this),
- `th[data-field="${showKey.fwzt.key}"]`,
- showKey.fwzt.name,
- selHtml7,
- showKey.fwzt.key,
- "ishtml1",
- showKey.fwzt.search
- );
- apphtml02(
- $(this),
- `th[data-field="${showKey.fwlx.key}"]`,
- showKey.fwlx.name,
- selHtml8,
- showKey.fwlx.key,
- "ishtml1",
- showKey.fwlx.search
- );
- apphtml02(
- $(this),
- `th[data-field="${showKey.ddpjzq.key}"]`,
- showKey.ddpjzq.name,
- selHtml9,
- showKey.ddpjzq.key,
- "ishtml1",
- showKey.ddpjzq.search
- );
- $(this)
- .find('th[data-field="name"]')
- .find(".psinput")
- .css({ left: 0, marginLeft: 0 });
- $(this)
- .find('th[data-field="name"]')
- .find(".triangle")
- .css({ left: "25%" });
- });
- if (pages == 1 && firstloading < 1) {
- firstloading++;
- $(".layui-table-body:eq(0),.layui-table-header:eq(0)").wrapAll(
- "<div class='scroll_body'></div>"
- );
- }
- $('.checkdeta').each(function() {
- let dval = $(this).val();
- let key = dval.split("&")[0];
- if (key == showKey.lf.key) {
- $(this).prop('checked', true);
- }
- form.render('checkbox');
- })
- $('.checkdeta1').each(function() {
- let dval = $(this).val();
- let key = dval.split("&")[0];
- if (key == showKey.dd.key) {
- $(this).prop('checked', true);
- }
- form.render('checkbox');
- })
- $('.checkdeta2').each(function() {
- let dval = $(this).val();
- let key = dval.split("&")[0];
- if (key == showKey.wx.key) {
- $(this).prop('checked', true);
- }
- form.render('checkbox');
- })
- $('.checkdeta3').each(function() {
- let dval = $(this).val();
- let key = dval.split("&")[0];
- if (key == showKey.mj.key) {
- $(this).prop('checked', true);
- }
- form.render('checkbox');
- })
- $('.checkdeta4').each(function() {
- let dval = $(this).val();
- let key = dval.split("&")[0];
- if (key == showKey.fwzt.key) {
- $(this).prop('checked', true);
- }
- form.render('checkbox');
- })
- $('.checkdeta5').each(function() {
- let dval = $(this).val();
- let key = dval.split("&")[0];
- if (key == showKey.fwlx.key) {
- $(this).prop('checked', true);
- }
- form.render('checkbox');
- })
- $('.checkdeta6').each(function() {
- let dval = $(this).val();
- let key = dval.split("&")[0];
- if (key == showKey.ddpjzq.key) {
- $(this).prop('checked', true);
- }
- form.render('checkbox');
- })
- }, 100);
- function apphtml02(this_, obj, names, htmlbox, idarr, is_html, bol) {
- this_.find(obj).find("div").eq(0).empty();
- this_.find(obj).addClass("is_show");
- if (bol) {
- this_
- .find(obj)
- .find("div.layui-table-cell")
- .eq(0)
- .prepend(
- '<span class="btnbtn5 dsa" data-isshow="1">' +
- names +
- '</span><img class="mapps" src="__STATIC__/img/search_ico02.png"/>'
- );
- } else {
- this_
- .find(obj)
- .find("div.layui-table-cell")
- .eq(0)
- .prepend(
- '<span class="btnbtn5 dsa" data-isshow="1">' +
- names +
- '</span><img class="mapps" src="__STATIC__/img/search_ico01.png"/>'
- );
- }
-
- this_.find(obj).find("div.layui-table-cell").eq(0).append(htmlbox);
- form.render();
- setTimeout(function () {
- var search_input = this_.find(obj).find("#select_check"),
- search_content = this_.find(obj).find(".check_li_");
- $(search_input).on("keyup", function () {
- this_
- .find(obj)
- .find(".check_li_")
- .hide()
- .filter(":contains(" + search_input.val().trim() + ")")
- .show();
- });
- function stopPropagation(e) {
- if (e.stopPropagation) e.stopPropagation();
- else e.cancelBubble = true;
- }
- this_
- .find(obj)
- .find(".dsnonebtn")
- .on("click", function () {
- this_
- .find(obj)
- .find("div.layui-table-cell")
- .eq(0)
- .find(".psinput")
- .hide();
- this_
- .find(obj)
- .find("div.layui-table-cell")
- .eq(0)
- .find(".btnbtn5")
- .attr("data-isshow", 1);
- this_
- .find(obj)
- .find("div.layui-table-cell")
- .eq(0)
- .find("input")
- .val("");
- });
- var isradio = 1;
- this_
- .find(obj)
- .find("div.layui-table-cell")
- .eq(0)
- .find(".btnbtn5")
- .on("click", function (e) {
- $(".is_show").find(".psinput").hide();
- if ($(this).attr("data-isshow") == 1) {
- $(this).siblings(".psinput").show();
- $(this).attr("data-isshow", 0);
- } else {
- $(this).siblings(".psinput").hide();
- $(this).attr("data-isshow", 1);
- }
- });
- this_
- .find(obj)
- .find(".checkAlls")
- .on("click", function () {
- this_
- .find(obj)
- .find(".checkbox")
- .each(function (index, item) {
- this_
- .find(obj)
- .find(".checkbox")
- .eq(index)
- .prop("checked", "checked");
- });
- form.render("checkbox");
- });
- this_
- .find(obj)
- .find(".nocheckAlls")
- .on("click", function () {
- this_
- .find(obj)
- .find(".checkbox")
- .each(function (index, item) {
- this_
- .find(obj)
- .find(".checkbox")
- .eq(index)
- .prop("checked", "");
- });
- form.render("checkbox");
- });
- this_
- .find(obj)
- .find(".checkdeta")
- .each(function (i, v) {
- form.on("checkbox(checkall03)", function (data) {
- this_.find(obj).find(".checkdeta").prop("checked", false);
- data.elem.checked = true;
- setTimeout(() => {
- form.render("checkbox");
- },100)
- });
- });
-
- this_
- .find(obj)
- .find(".checkdeta1")
- .each(function (i, v) {
- form.on("checkbox(checkall04)", function (data) {
- this_.find(obj).find(".checkdeta1").prop("checked", false);
- data.elem.checked = true;
- setTimeout(() => {
- form.render("checkbox");
- },100)
- });
- });
- this_
- .find(obj)
- .find(".checkdeta2")
- .each(function (i, v) {
- form.on("checkbox(checkall05)", function (data) {
- this_.find(obj).find(".checkdeta2").prop("checked", false);
- data.elem.checked = true;
- setTimeout(() => {
- form.render("checkbox");
- },100)
- });
- });
- this_
- .find(obj)
- .find(".checkdeta3")
- .each(function (i, v) {
- form.on("checkbox(checkall06)", function (data) {
- this_.find(obj).find(".checkdeta3").prop("checked", false);
- data.elem.checked = true;
- setTimeout(() => {
- form.render("checkbox");
- },100)
- });
- });
- this_
- .find(obj)
- .find(".checkdeta4")
- .each(function (i, v) {
- form.on("checkbox(checkall07)", function (data) {
- this_.find(obj).find(".checkdeta4").prop("checked", false);
- data.elem.checked = true;
- setTimeout(() => {
- form.render("checkbox");
- },100)
- });
- });
- this_
- .find(obj)
- .find(".checkdeta5")
- .each(function (i, v) {
- form.on("checkbox(checkall08)", function (data) {
- this_.find(obj).find(".checkdeta5").prop("checked", false);
- data.elem.checked = true;
- setTimeout(() => {
- form.render("checkbox");
- },100)
- });
- });
- this_
- .find(obj)
- .find(".checkdeta6")
- .each(function (i, v) {
- form.on("checkbox(checkall09)", function (data) {
- this_.find(obj).find(".checkdeta6").prop("checked", false);
- data.elem.checked = true;
- setTimeout(() => {
- form.render("checkbox");
- },100)
- });
- });
- this_
- .find(obj)
- .find("div.layui-table-cell")
- .eq(0)
- .find(".resetbtn")
- .on("click", function () {
- $(this).parents(".search_btns").siblings(".kwovsint").val("");
- $(this)
- .parents(".search_btns")
- .siblings()
- .find(".select_sDate")
- .val("");
- });
- if (is_html == "detatime") {
- laydate.render({
- elem: "#select_sDate", //指定元素
- type: "date",
- format: "yyyy/MM/dd",
- range: true,
- trigger: "click", //呼出事件改成click
- done: function (value, date, endDate) {},
- });
- $(".date-flex div").click(function () {
- let type = $(this).prop("dataset").type;
- if (type == "today") {
- $(".select_date").val(`${dateObj.today} - ${dateObj.today}`);
- } else if (type == "yesterday") {
- $(".select_date").val(
- `${dateObj.yesterday} - ${dateObj.yesterday}`
- );
- } else if (type == "week") {
- $(".select_date").val(
- `${dateObj.thisWeekMonday} - ${dateObj.thisWeekSunday}`
- );
- } else if (type == "lastWeek") {
- $(".select_date").val(
- `${dateObj.lastWeekMonday} - ${dateObj.lastWeekSunday}`
- );
- } else if (type == "month") {
- $(".select_date").val(
- `${dateObj.thisMonthFirstDay} - ${dateObj.thisMonthLastDay}`
- );
- } else if (type == "lastMonth") {
- $(".select_date").val(
- `${dateObj.lastMonthFirstDay} - ${dateObj.lastMonthLastDay}`
- );
- } else {
- $(".select_date").val("");
- }
- });
- $(".date-flex1 div").click(function () {
- let type = $(this).prop("dataset").type;
- if (type == "today") {
- $(".select_sDate").val(`${dateObj.today} - ${dateObj.today}`);
- } else if (type == "yesterday") {
- $(".select_sDate").val(
- `${dateObj.yesterday} - ${dateObj.yesterday}`
- );
- } else if (type == "week") {
- $(".select_sDate").val(
- `${dateObj.thisWeekMonday} - ${dateObj.thisWeekSunday}`
- );
- } else if (type == "lastWeek") {
- $(".select_sDate").val(
- `${dateObj.lastWeekMonday} - ${dateObj.lastWeekSunday}`
- );
- } else if (type == "month") {
- $(".select_sDate").val(
- `${dateObj.thisMonthFirstDay} - ${dateObj.thisMonthLastDay}`
- );
- } else if (type == "lastMonth") {
- $(".select_sDate").val(
- `${dateObj.lastMonthFirstDay} - ${dateObj.lastMonthLastDay}`
- );
- } else {
- $(".select_sDate").val("");
- }
- });
- }
- this_
- .find(obj)
- .find("div.layui-table-cell")
- .eq(0)
- .find(".submitbtn")
- .on("click", function () {
- if (is_html == "ishtml1") {
- var arr = new Array();
- this_
- .find(obj)
- .find("div.layui-table-cell")
- .eq(0)
- .find("input:checkbox:checked")
- .each(function (i) {
- arr[i] = $(this).val();
- });
- var datastr = arr.join(",");
- searchfn(datastr,idarr);
- } else if (is_html == "ishtml2") {
- var kwos = $(this)
- .parents(".search_btns")
- .siblings("#kwovsint")
- .val();
- field[idarr] = kwos;
- } else if (is_html == "detatime") {
- var deta = $(this)
- .parents(".search_btns")
- .siblings()
- .find("#select_sDate")
- .val();
- field[idarr] = deta;
- }
- if (
- this_.find(obj).find("input.kwovsint").val() &&
- !field[idarr]
- ) {
- layer.msg("请选择内容", { anim: 1000, time: 1000 });
- return;
- }
- var datas = JSON.stringify(field);
- localStorage.setItem("dataStatistics", datas);
-
- $(this).parents(".psinput").hide();
- this_
- .find(obj)
- .find("div.layui-table-cell")
- .eq(0)
- .find(".btnbtn5")
- .attr("data-isshow", 1);
- });
- $(document).bind("click", function () {
- this_
- .find(obj)
- .find("div.layui-table-cell")
- .eq(0)
- .find(".psinput")
- .hide();
- this_
- .find(obj)
- .find("div.layui-table-cell")
- .eq(0)
- .find(".btnbtn5")
- .attr("data-isshow", 1);
- });
- this_.find("th").on("click", function (e) {
- stopPropagation(e);
- });
- }, 100);
- }
- }
- function searchfn(field, idarr) {
- let name = field.split('&')[1];
- let key = field.split('&')[0];
- if (idarr == showKey.lf.key) {
- showKey.lf = {name: name=='全部'?'量房数':name, key: key, search: name=='全部'?false:true,};
- } else if (idarr == showKey.dd.key) {
- showKey.dd = {name: name=='全部'?'到店数':name, key: key, search: name=='全部'?false:true,};
- } else if (idarr == showKey.wx.key) {
- showKey.wx = {name: name=='全部'?'无效客户数':name, key: key, search: name=='全部'?false:true,};
- } else if (idarr == showKey.mj.key) {
- showKey.mj = {name: name=='全部'?'面积(平米)':name, key: key, search: name=='全部'?false:true,};
- } else if (idarr == showKey.fwzt.key) {
- showKey.fwzt = {name: name=='全部'?'房屋状态':name, key: key, search: name=='全部'?false:true,};
- } else if (idarr == showKey.fwlx.key) {
- showKey.fwlx = {name: name=='全部'?'房屋类型':name, key: key, search: name=='全部'?false:true,};
- } else {
- showKey.ddpjzq = {name: name, key: key, search: name=='一次到店平均周期'?false:true,};
- }
- firstloading = 0;
- console.log(showKey)
- ajaxlist();
- }
- $(".lay-setting").click(function () {
- let arr = [];
- $.each(data, function (key, val) {
- if (key != "name" && key != "org_name") {
- arr.push({ ...val, field: key });
- }
- });
- renderTableSwitch(arr, 7);
- $(".lay-mask").removeClass("layui-hide");
- });
- $(".layui-icon-close").click(function () {
- $(".lay-mask").addClass("layui-hide");
- });
- $(".lay-block").click(function (e) {
- e.stopPropagation();
- });
- $(".lay-mask").click(function () {
- $(this).addClass("layui-hide");
- });
- function renderTableSwitch(data, types) {
- let htmls = data
- .map((item, index) => {
- return `<div class="lay-item sort_time">
- <div class="sort_lis01">
- <img style="display:${
- types == 5 ? "none" : "block"
- }" src="__STATIC__/img/sorticon.png" width="16px" alt="">
- <span>${item.name}</span>
- </div>
- <div class="sort_lis02">
- <input type="checkbox" lay-filter="tableSort" ${
- item.show == 1 ? "checked" : ""
- } name="${item.field}" lay-skin="switch">
- </div>
- </div>`;
- })
- .join("");
- $(".layui-content").html(htmls);
- setTimeout(() => {
- form.render();
- var check = "";
- var names = "";
- form.on("switch(tableSort)", function (data) {
- getdatalist(types);
- });
- new Sortable($(".layui-content")[0], {
- handle: ".lay-item", // handle's class
- animation: 150,
- // 结束拖拽
- onEnd: function (/**Event*/ evt) {
- getdatalist(types, 0);
- },
- });
- }, 300);
- }
- function getdatalist(types) {
- let getCheckedField = $(".sort_time");
- let itemArr = [];
- let check;
- getCheckedField.each(function (i) {
- let ischeck = $(this).find("input").prop("checked");
- if (ischeck) {
- check = 1;
- } else {
- check = 0;
- }
- let names = $(this).find("input").attr("name");
- itemArr.push({ name: names, show: check, sort: i + 1 });
- });
- var datajson = JSON.stringify(itemArr);
- $.ajax({
- type: "post",
- url: '{:url("empcrm/poolFieldsSet")}',
- data: {
- type: types,
- content: datajson,
- },
- success: function (res) {
- if(res.code == 403){
- $(".exitbtn").trigger("click");
- }
- firstloading = 0;
- ajaxlist();
- },
- });
- }
- function getStatistics() {
- var addtime = $("[name=addtime]").val();
- var followtime = $("[name=followtime]").val();
- var objtype;
- if (fType == 1) {
- objtype = {
- addtime: addtime,
- };
- } else {
- objtype = {
- followtime: followtime,
- };
- }
- $.ajax({
- url: '{:url("empcrm/statistics")}',
- type: "post",
- data: {
- search_type: fType,
- ...objtype,
- },
- success: (res) => {
- if (res.code == 0) {
- let data = res.data;
- $(".totalNum0").text(data.customer_num);
- $(".totalNum1").text(data.visit_num);
- }else if(res.code == 403){
- $(".exitbtn").trigger("click");
- }
- },
- });
- }
- function getStatisticsMore() {
- var addtime = $("[name=addtime]").val();
- var followtime = $("[name=followtime]").val();
- var objtype;
- if (fType == 1) {
- objtype = {
- addtime: addtime,
- };
- } else {
- objtype = {
- followtime: followtime,
- };
- }
- $.ajax({
- url: '{:url("empcrm/statistics_more")}',
- type: "post",
- data: {
- search_type: fType,
- ...objtype,
- },
- success: (res) => {
- if (res.code == 0) {
- let data = res.data;
- $(".totalNum2").text(data.yylf_num);
- $(".totalNum3").text(data.lf_num);
- $(".totalNum4").text(data.yydd_num);
- $(".totalNum5").text(data.ydd_num);
- $(".totalNum6").text(data.deposit_num);
- $(".totalNum7").text(data.signed_num);
- $(".totalNum8").text(data.yyhd_num);
- $(".totalNum9").text(data.ydc_num);
- }else if(res.code == 403){
- $(".exitbtn").trigger("click");
- }
- },
- });
- }
- resizefun = function () {
- table.resize("crmsearchlist");
- };
- reload = function () {
- if (valType == 2) {
- field.org_id = "";
- field.type = valType;
- }
- table.reload("crmsearchlist", { where: field }, true);
- };
- var flag = true;
- table.on("tool(crmsearchlist)", function (obj) {
- let event = obj.event;
- let row = obj.data;
- flag = true;
- let sdate = $("#sDate").val();
- let edate = $("#eDate").val();
- if (event === "unstatus") {
- flag = false;
- if (confirm("是否确认为有效线索?")) {
- $.ajax({
- url: '{:url("empcrm/validation")}',
- data: {
- customer_id: row.id, // (客户id)
- state: "未到访",
- },
- type: "post",
- success: function (res) {
- if (res.code == 0) {
- $(obj.tr)
- .children("td")
- .children("div")
- .children("div")
- .children(".redconfirm")[0].checked = true;
- $(obj.tr)
- .children("td")
- .children("div")
- .children("div")
- .children(".redconfirm")[0].disabled = true;
- if (row.visit_log_count == 0) {
- $(obj.tr)
- .children('td[data-field="time_status"]')
- .children("div")
- .html('<span style="color: #cccccc;">-</span>');
- } else {
- $(obj.tr)
- .children('td[data-field="time_status"]')
- .children("div")
- .html("<span" + row.time_status + "</span>");
- }
- row.state = "未到访";
- alert("成功:更改成功,线索为有效状态!!!");
- }else if(res.code == 403){
- $(".exitbtn").trigger("click");
- } else {
- alert(res.msg);
- }
- },
- });
- } else {
- $(obj.tr)
- .children("td")
- .children("div")
- .children("div")
- .children(".redconfirm")[0].checked = false;
- $(obj.tr)
- .children("td")
- .children("div")
- .children("div")
- .children(".redconfirm")[0].disabled = false;
- $(obj.tr)
- .children("td")
- .children("div")
- .children("div")
- .children(".layui-unselect")
- .removeClass("layui-form-checked");
- }
- return false;
- } else if (event === "edit") {
- flag = false;
- window.parent.editcrmsg(obj.data.id);
- return false;
- } else if (event === "editstate") {
- flag = false;
- window.parent.statemsg(obj.data.id, "list.html");
- return false;
- } else {
- flag = true;
- }
- flag = true;
- // $("a").each(function() {
- // $(this).addClass("hovers")
- // })
- switch (obj.event) {
- case "follow_customer_count"://客户总数
- layer.open({
- type: 2,
- title: [
- "在跟进客户数",
- ],
- content:
- '{:url("Empcrm/generalOpen")}?type=follow_customer_count&eid=' +
- obj.data.id +
- "&start_date=" +
- sdate +
- "&end_date=" +
- edate,
- resize: false,
- shade: 0.8,
- area: ['99%', '96%'],
- });
- break;
- case "add_wechat_count"://加微客户数
- layer.open({
- type: 2,
- title: ["加微客户列表"],
- content:
- '{:url("Empcrm/generalOpen")}?type=add_wechat_count&eid=' +
- obj.data.id +
- "&start_date=" +
- sdate +
- "&end_date=" +
- edate,
- resize: false,
- shade: 0.8,
- area: ['99%', '96%'],
- });
- break;
- case "not_sure_count"://待确认
- layer.open({
- type: 2,
- title: ["待确认客户列表"],
- content:
- '{:url("Empcrm/generalOpen")}?type=not_sure_count&eid=' +
- obj.data.id +
- "&start_date=" +
- sdate +
- "&end_date=" +
- edate,
- resize: false,
- shade: 0.8,
- area: ['99%', '96%'],
- });
- break;
- case "yixiang_assigned_count"://意向分派客户数
- layer.open({
- type: 2,
- title: ["意向分派客户数列表"],
- content:
- '{:url("Empcrm/generalOpen")}?type=yixiang_assigned_count&eid=' +
- obj.data.id +
- "&start_date=" +
- sdate +
- "&end_date=" +
- edate,
- resize: false,
- shade: 0.8,
- area: ['99%', '96%'],
- });
- break;
- case "daodian_assigned_count"://到店分派客户数
- layer.open({
- type: 2,
- title: ["意向分派客户数列表"],
- content:
- '{:url("Empcrm/generalOpen")}?type=daodian_assigned_count&eid=' +
- obj.data.id +
- "&start_date=" +
- sdate +
- "&end_date=" +
- edate,
- resize: false,
- shade: 0.8,
- area: ['99%', '96%'],
- });
- break;
- case "measuring_assigned_count"://量房分派客户数
- layer.open({
- type: 2,
- title: ["意向分派客户数列表"],
- content:
- '{:url("Empcrm/generalOpen")}?type=liangfang_assigned_count&eid=' +
- obj.data.id +
- "&start_date=" +
- sdate +
- "&end_date=" +
- edate,
- resize: false,
- shade: 0.8,
- area: ['99%', '96%'],
- });
- break;
- case "measuring_room_customer"://量房客户数
- layer.open({
- type: 2,
- title: ["量房客户数列表"],
- content:
- '{:url("Empcrm/generalOpen")}?type=measuring_room_customer&eid=' +
- obj.data.id +
- "&start_date=" +
- sdate +
- "&end_date=" +
- edate,
- resize: false,
- shade: 0.8,
- area: ['99%', '96%'],
- });
- break;
- case "strtore_customer_count"://到店客户数
- layer.open({
- type: 2,
- title: ["到店客户数列表"],
- content:
- '{:url("Empcrm/generalOpen")}?type=strtore_customer_count&eid=' +
- obj.data.id +
- "&start_date=" +
- sdate +
- "&end_date=" +
- edate,
- resize: false,
- shade: 0.8,
- area: ['99%', '96%'],
- });
- break;
- case "valid_count"://有效数量
- layer.open({
- type: 2,
- title: ["有效线索列表"],
- content:
- '{:url("Empcrm/generalOpen")}?type=valid&eid=' +
- obj.data.id +
- "&start_date=" +
- sdate +
- "&end_date=" +
- edate,
- resize: false,
- shade: 0.8,
- area: ['99%', '96%'],
- });
- break;
- case "sign_count":
- layer.open({
- type: 2,
- title: ["合同客户列表"],
- content:
- '{:url("Empcrm/generalOpen")}?type=sign_count&eid=' +
- obj.data.id +
- "&start_date=" +
- sdate +
- "&end_date=" +
- edate,
- resize: false,
- shade: 0.8,
- area: ['99%', '96%'],
- });
- break;
- case "deposit_count":
- layer.open({
- type: 2,
- title: ["定金客户列表"],
- content:
- '{:url("Empcrm/generalOpen")}?type=deposit_count&eid=' +
- obj.data.id +
- "&start_date=" +
- sdate +
- "&end_date=" +
- edate,
- resize: false,
- shade: 0.8,
- area: ['99%', '96%'],
- });
- break;
- case "invalid_customer_count":
- layer.open({
- type: 2,
- title: ["无效线索客户列表"],
- content:
- '{:url("Empcrm/generalOpen")}?type=invalid_customer_count&eid=' +
- obj.data.id +
- "&start_date=" +
- sdate +
- "&end_date=" +
- edate,
- resize: false,
- shade: 0.8,
- area: ['99%', '96%'],
- });
- break;
- }
- });
- // $('.crmsearchlist').on('click', 'td', function (e) {
- // var _event = $(this).find('[lay-event]').attr('lay-event');
- // var _obj = table.cache.crmsearchlist[parseInt($(this).parent('tr').attr('data-index'))];
- // switch (_event) {
- // case 'unstatus':
- // break;
- // case 'edit':
- // break;
- // case 'editstate':
- // break;
- // default:
- // flag = true;
- // $('#customer_detail')[0].src = "/empcrm/empcrm/addlog.html?cid=" + _obj.id;
- // $('.crmbox').addClass('rightbox');
- // $('#customer_detail').show();
- // resizefun();
- // }
- // return false; //阻止事件冒泡
- // })
- // table.on('row(crmsearchlist)', function (obj) {
- // var data = obj.data;
- // if (flag) {
- // $('#customer_detail')[0].src = "/empcrm/empcrm/addlog.html?cid=" + data.id;
- // $('.crmbox').addClass('rightbox');
- // $('#customer_detail').show();
- // for (let i = 0; i < $('.crmsearchlist .layui-table-view .layui-table-box .layui-table tr').length; i++) {
- // $($('.crmsearchlist .layui-table-view .layui-table-box .layui-table tr')[i]).removeClass('onclickbg');
- // }
- // $(obj.tr).addClass('onclickbg');
- // resizefun();
- // }
- // });
- $(".searchbtn").click(function () {
- window.parent.addcrmmsg("list.html");
- });
- });
- function removealog(params) {
- $("#customer_detail").hide();
- $(".crmbox").removeClass("rightbox");
- }
- </script>
- {/block}
|