123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290 |
- {extend name="public/layout"/} {block name="title"}客户设置{/block} {block name="body"}
- <link rel="stylesheet" href="__STATIC__/css/csspc.css">
- <link rel="stylesheet" href="__STATIC__/css/font.css">
- <style>
- * {
- box-sizing: initial;
- }
- .font16 {
- font-size: 16px !important;
- }
- html {
- min-width: 1100px;
- margin: 0 auto;
- width: 100%;
- height: 98%;
- }
- body {
- background: #EEEEEE;
- height: 98%;
- width: 100%;
- color: #333;
- font-size: 14px !important;
- overflow: hidden;
- }
- .layui-fluid {
- display: block;
- box-shadow: 0 0 4px 0 #B6CADE;
- border-radius: 5px;
- margin: 15px;
- background-color: #ffffff;
- }
- .layui-card {
- background: #fff;
- }
- .rst_box_top {
- background: #fff;
- padding: 0px 0px 1px;
- border-radius: 8px;
- }
- .mdt20 {
- margin-top: 20px;
- }
- .layui-tab-brief>.layui-tab-more li.layui-this:after,
- .layui-tab-brief>.layui-tab-title .layui-this:after {
- border-bottom: 4px solid #28A1FF !important;
- }
- .layadmin-iframe {
- position: initial;
- }
- /* .layui-border-box{margin-top:20px !important;} */
- .layui-btn-xs,
- .layui-btn-xs:hover {
- border: 1px solid #249EFB;
- background-color: #fff;
- color: #249EFB;
- padding: 0px 10px;
- }
- input {
- font-size: 14px !important;
- }
- .layui-btn-danger {
- color: #ff5722 !important;
- border: 1px solid #ff5722 !important;
- }
- .layui-tab-item .layui-form-label {
- float: none;
- width: auto;
- padding: 0;
- text-align: left;
- padding-left: 10px;
- border-left: 6px solid #333;
- border-radius: 2px;
- }
- .layui-tab-item .layui-input-block {
- margin: 10px 0 0 15px;
- }
- .layui-btn-primary {
- color: #249efb;
- border: 1px solid #249efb;
- }
- .layui-btn-primary:hover {
- background-color: #E3F7FF;
- color: #249EFB;
- }
- .xxx {
- font-size: 16px;
- cursor: pointer;
- width: 16px;
- vertical-align: -8%;
- margin-left: 5px
- }
- #courtom .layui-btn {
- margin: 10px 10px 0 0 !important;
- }
- .custom {
- border: 1px solid #999;
- background: #f7f7f7;
- color: #999;
- }
- #addpackage {
- margin: 20px 20px 0px 0px;
- display: none;
- }
- .layui-card {
- box-shadow: none !important;
- }
- .layui-tab-content {
- overflow-y: auto;
- }
- /*里面的代码可以根据自己需求去进行更改*/
- /* 设置滚动条的样式 */
- ::-webkit-scrollbar {
- width: 12px;
- }
- /* 滚动槽 */
- ::-webkit-scrollbar-track {
- -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.3);
- border-radius: 10px;
- }
- /* 滚动条滑块 */
- ::-webkit-scrollbar-thumb {
- border-radius: 10px;
- background: rgba(0, 0, 0, 0.1);
- -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.5);
- }
- ::-webkit-scrollbar-thumb:window-inactive {
- background: rgba(255, 0, 0, 0.4);
- }
- .overflowHidden {
- overflow: hidden;
- }
- .flex {
- display: flex;
- align-items: center;
- }
- .layui-form-switch {
- margin-top: 0px;
- }
- .layui-card .layui-tab-brief .layui-tab-content{padding:0 !important;}
- #rangeDepart {
- width: 600px;
- }
- #designerEle {
- width: 500px;
- }
- </style>
- <body>
- <div class="layui-fluid">
- <div class="layui-card">
- <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
- <ul class="layui-tab-title rst_box_top ">
- <!-- <li data-type="1" class="layui-this font14">自定义</li>
- <li data-type="2" class="font14 layui-tjbtn">倾向风格设置</li> -->
- <li data-type="3" class="layui-this font14">客户画像设置</li>
- <li data-type="4" class="font14 layui-tjbtn">客户跟进设置</li>
- <li data-type="5" class="font14 layui-tjbtn">产品设置</li>
- <li data-type="6" class="font14 layui-tjbtn">客户保护规则设置</li>
- <li data-type="7" class="font14 layui-zdysz">自定义设置</li>
- <li data-type="8" class="font14 layui-sjtjsz">数据统计设置</li>
- </ul>
- <div class="layui-tab-content overflowHidden">
- <!-- <div class="layui-tab-item layui-show" style="height:85vh;" id="courtom"> -->
- <!-- <div class="rst_box_b">
- <a href="javascript:void(0)" class="layui-btn layui-btn-primary" id="cate_add" data-type="source">添加渠道来源</a>
- <table id="source" class="mdt20 clear" lay-filter="source"></table>
- </div> -->
- <!-- </div> -->
- <!-- <div class="layui-tab-item" style="height:85vh;">
- <div class="rst_box_b_left width100_ ">
- <a href="javascript:void(0)" class="layui-btn layui-btn-primary" id="cate_add1"
- data-type="decostyle">添加倾向风格</a>
- <table id="decostyle" class="mdt20 clear" lay-filter="decostyle"></table>
- </div>
- </div> -->
- <div class="layui-tab-item layui-show" style="height:85vh;">
- <div class="rst_box_b_left width100_ height100_" style="overflow: hidden;">
- <iframe src="/dashboard/customer_new_portrait/index.html" frameborder="0"
- class="layadmin-iframe"></iframe>
- </div>
- </div>
- <div class="layui-tab-item layui-form" style="height:85vh;">
- <div class="rst_box_b_left width100_ pdtb15">
- <div class="layui-form-item">
- <label class="layui-form-label">加微设置: </label>
- <div class="layui-input-block">
- <input lay-filter="switchTest" type="checkbox" name="addwechat" title="常规加微" {if
- condition="$wechat1" } checked {/if} value="常规加微">
- <input lay-filter="switchTest" type="checkbox" name="addwechat" title="社群加微" {if
- condition="$wechat2" } checked {/if} value="社群加微">
- <input lay-filter="switchTest" type="checkbox" name="addwechat" title="历史加微" {if
- condition="$wechat3" } checked {/if} value="历史加微">
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15">
- <div class="layui-form-item">
- <label class="layui-form-label">量房设置: </label>
- <div class="layui-input-block">
- <input lay-filter="house" type="checkbox" name="house" title="量房图片" {if
- condition="$lf1" } checked {/if} value="量房图片">
- <input lay-filter="house" type="checkbox" name="house" title="量房报告图片" {if
- condition="$lf2" } checked {/if} value="量房报告图片">
- <input lay-filter="house" type="checkbox" name="house" title="客户需求图片" {if
- condition="$lf3" } checked {/if} value="客户需求图片">
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label" style="width: 173px;">下次回访时间是否必传: </label>
- <div class="layui-input-block">
- <input type="radio" name="visit" value=1 title="是" {if condition="$visit_save eq 1"
- } checked {/if}>
- <input type="radio" name="visit" value=0 title="否" {if condition="$visit_save eq 0"
- } checked {/if}>
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label" style="width: 173px;">运营后台资源分配设置:非上传人员不可分配 </label>
- <div class="layui-input-block">
- <input type="radio" name="resource" value=1 title="是" {if condition="$resource_fp eq 1" } checked {/if}>
- <input type="radio" name="resource" value=0 title="否" {if condition="$resource_fp eq 0" } checked {/if}>
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label" style="width: 173px;">最迟加微天数: </label>
- <div class="layui-input-block flex" style="position: relative;width:300px;">
- <div style="width: 230px;margin-right: 10px;">
- <input style="width:230px;" type='number' onchange="RegularInt(this)"
- name="value3" placeholder="请输入最迟加微天数" class="layui-input input-indent-box"
- min="1" lay-verify="" value={$addWechatDay}>
- </div>
- <input type="checkbox" name="value33" value="1" {if
- condition="$addWechatDaySwitch eq 1" }checked{/if} lay-skin="switch"
- lay-text="开启|关闭">
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label">当客户达到</label>
- <div style="display: flex;align-items: center;margin-top: 10px;padding-left: 15px;">
- <!-- <div class="layui-input-inline layui-input-inline-bottom" style="width: 40%;">
- <div id="qrcode-user" style="width: 100%;"></div>
- </div> -->
- <!-- <input lay-filter="forbidden_state" type="checkbox" name="forbidden_state" title="确认到店" {if
- condition="$l1" } checked {/if} value="确认到店">
- <input lay-filter="forbidden_state" type="checkbox" name="forbidden_state" title="确认到场" {if
- condition="$l2" } checked {/if} value="确认到场">
- <input lay-filter="forbidden_state" type="checkbox" name="forbidden_state" title="确认量房" {if
- condition="$l3" } checked {/if} value="确认量房"> -->
- <input lay-filter="forbidden_state" type="checkbox" name="forbidden_state"
- title="{$jiaoding}" {if condition="$l4" } checked {/if} value="交定">
- <input lay-filter="forbidden_state" type="checkbox" name="forbidden_state"
- title="{$qiandan}" {if condition="$l5" } checked {/if} value="签单">
- <span class="plr10">其他人不能跟进</span>
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label">到店确认人</label>
- <div style="display: flex;align-items: center;margin-top: 10px;padding-left: 15px;">
- <input type="checkbox" name="visit_shop_confirm" title="扫码确认" {if
- condition="in_array('scan_the_code', $visitShopConfirm)" } checked {/if}
- value="scan_the_code">
- <input type="checkbox" name="visit_shop_confirm" title="设计师确认" {if
- condition="in_array('designer', $visitShopConfirm)" } checked {/if}
- value="designer">
- <input type="checkbox" name="visit_shop_confirm" title="销售确认" {if
- condition="in_array('salesperson', $visitShopConfirm)" } checked {/if}
- value="salesperson">
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label">到场确认人</label>
- <div style="display: flex;align-items: center;margin-top: 10px;padding-left: 15px;">
- <input type="checkbox" name="visit_site_confirm" title="扫码确认" {if
- condition="in_array('scan_the_code', $visitSiteConfirm)" } checked {/if}
- value="scan_the_code">
- <input type="checkbox" name="visit_site_confirm" title="设计师确认" {if
- condition="in_array('designer', $visitSiteConfirm)" } checked {/if}
- value="designer">
- <input type="checkbox" name="visit_site_confirm" title="销售确认" {if
- condition="in_array('salesperson', $visitSiteConfirm)" } checked {/if}
- value="salesperson">
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label">量房确认人</label>
- <div style="display: flex;align-items: center;margin-top: 10px;padding-left: 15px;">
- <input type="checkbox" name="measure_confirm" title="设计师确认" {if
- condition="in_array('designer', $measureConfirm)" } checked {/if}
- value="designer">
- <input type="checkbox" name="measure_confirm" title="销售确认" {if
- condition="in_array('salesperson', $measureConfirm)" } checked {/if}
- value="salesperson">
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label">定金确认人</label>
- <div style="display: flex;align-items: center;margin-top: 10px;padding-left: 15px;">
- <input type="checkbox" name="deposit_confirm" title="设计师确认" {if
- condition="in_array('designer', $depositConfirm)" } checked {/if}
- value="designer">
- <input type="checkbox" name="deposit_confirm" title="销售确认" {if
- condition="in_array('salesperson', $depositConfirm)" } checked {/if}
- value="salesperson">
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label">合同确认人</label>
- <div style="display: flex;align-items: center;margin-top: 10px;padding-left: 15px;">
- <input type="checkbox" name="sign_confirm" title="设计师确认" {if
- condition="in_array('designer', $signConfirm)" } checked {/if} value="designer">
- <input type="checkbox" name="sign_confirm" title="销售确认" {if
- condition="in_array('salesperson', $signConfirm)" } checked {/if}
- value="salesperson">
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label">指派设计师客户数量</label>
- <div style="display: flex;align-items: center;margin-top: 10px;padding-left: 15px;">
- <input type="number" name="designer_num" title="设计师确认" min="0"
- value="{$designerNum??0}" class="layui-input" style="width: 100px;"
- oninput="if(value.length>5)value=value.slice(0,8)"
- onkeyup="value=zhzs(this.value)">
- <span class="plr10" style="color:#ff8080;margin-left: 10px;"> 注:0表示不限制</span>
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label" style="width: 173px;">只显示员工跟进记录: </label>
- <div class="layui-input-block flex" style="position: relative;width:300px;">
- <input type="checkbox" name="showempvistlog" value="1" {if
- condition="$showEmpVistlog eq 1" }checked{/if} lay-skin="switch"
- lay-text="开启|关闭">
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label">指派类型设置</label>
- <div style="display: flex;align-items: center;margin-top: 10px;padding-left: 15px;">
- <input type="checkbox" name="assign_type" title="意向客户指派" {if condition="in_array('yixiang', $assign_type)" } checked {/if} value="yixiang">
- <input type="checkbox" name="assign_type" title="量房客户指派" {if condition="in_array('liangfang', $assign_type)" } checked {/if}
- value="liangfang">
- <input type="checkbox" name="assign_type" title="到店客户指派" {if condition="in_array('daodian', $assign_type)" } checked {/if} value="daodian">
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label">客户分配后是否显示已联系信息</label>
- <div style="display: flex;align-items: center;margin-top: 10px;padding-left: 15px;">
- <input type="radio" name="visit_reset" value=1 title="是" {if
- condition="$visit_reset eq 1" } checked {/if}>
- <input type="radio" name="visit_reset" value=0 title="否" {if
- condition="$visit_reset eq 0" } checked {/if}>
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label" style="width: 173px;">网销端客户池统计:</label>
- <div class="layui-input-block flex" style="position: relative;width:300px;">
- <input type="checkbox" name="empcrm_pool_statistics" value="1" {if
- condition="$empcrm_pool_statistics eq 1" }checked{/if} lay-skin="switch"
- lay-text="开启|关闭">
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label" style="width: 173px;">网销端客户不可重复报备:</label>
- <div class="layui-input-block flex" style="position: relative;width:600px;">
- <div id="rangeDepart"></div>
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label" style="width: 173px;">管理层消息通知: </label>
- <div class="layui-input-block flex" style="position: relative;width:300px;">
- <input type="checkbox" name="magnotify" value="1" {if
- condition="$magnotify eq 1" }checked{/if} lay-skin="switch"
- lay-text="开启|关闭">
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label" style="width: 173px;">设计师设置:</label>
- <div class="layui-input-block" style="position: relative;width:800px;">
- <div style="font-size: 13px;margin-bottom: 10px;">对于客户处于以下状态确认时必须指派设计师</div>
- <div>
- <input type="checkbox" name="need_designer" title="量房" {if
- condition="in_array('liangfang', $need_designer)" } checked {/if} value="liangfang">
- <input type="checkbox" name="need_designer" title="到店" {if
- condition="in_array('daodian', $need_designer)" } checked {/if}
- value="daodian">
- <input type="checkbox" name="need_designer" title="到场" {if
- condition="in_array('daochang', $need_designer)" } checked {/if} value="daochang">
- <input type="checkbox" name="need_designer" title="定金" {if
- condition="in_array('qiandan', $need_designer)" } checked {/if}
- value="qiandan">
- <input type="checkbox" name="need_designer" title="合同" {if
- condition="in_array('zhuandan', $need_designer)" } checked {/if} value="zhuandan">
- </div>
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label" style="width: 173px;">设计师能否报备、获取客户: </label>
- <div class="layui-input-block flex" style="position: relative;width:300px;">
- <input type="checkbox" name="designer_get_customer" value="1" {if
- condition="$designer_get_customer eq 1" }checked{/if} lay-skin="switch"
- lay-text="开启|关闭">
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label" style="width: 203px;">超过3、7天未跟进客户标记颜色: </label>
- <div class="layui-input-block flex" style="position: relative;width:300px;">
- <input type="checkbox" name="no_follow_tips" value="1" {if
- condition="$no_follow_tips eq 1" }checked{/if} lay-skin="switch"
- lay-text="开启|关闭">
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label" style="width: 203px;">是否开启领导层跟进权限<br>(默认:关闭,直属领导可跟进): </label>
- <div class="layui-input-block flex" style="position: relative;width:300px;">
- <input type="checkbox" name="is_all_manager_oprate_able" value="1" {notempty
- name="$is_all_manager_oprate_able"}checked{/notempty} lay-skin="switch"
- lay-text="开启|关闭">
- </div>
- </div>
- </div>
- <div class="rst_box_b_left width100_ pdtb15 layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label" style="width: 203px;">有效申请人: </label>
- <div class="layui-input-block flex" style="position: relative;width:300px;">
- <input type="checkbox" name="valid_check_person" title="销售" {if
- condition="in_array('xiaoshou', $valid_check_person)" } checked {/if} value="xiaoshou">
- <input type="checkbox" name="valid_check_person" title="设计师" {if
- condition="in_array('sheji', $valid_check_person)" } checked {/if}
- value="sheji">
- </div>
- </div>
- </div>
- <button type="button" class="layui-btn mdt15 mdl15" id="save_all"
- style="margin-bottom: 80px;">保存</button>
- </div>
- <div class="layui-tab-item" style="height:85vh;">
- <div class="rst_box_b_left width100_ ">
- <a href="javascript:void(0)" class="layui-btn layui-btn-primary" id="addpackage_button"
- data-type="package">添加产品</a>
- <table id="package" class="mdt20 clear" lay-filter="package"></table>
- </div>
- </div>
- <div class="layui-tab-item" style="height:85vh;">
- <div class="rst_box_b_left width100_ height100_">
- <iframe src="{:url('customer_setting/subscribe_protected')}" frameborder="0"
- class="layadmin-iframe"></iframe>
- </div>
- </div>
- <div class="layui-tab-item" style="height:85vh;">
- <div class="rst_box_b_left width100_ height100_" style="overflow: hidden;">
- <iframe src="/dashboard/customer_setting/moduleSetting.html" frameborder="0"
- class="layadmin-iframe"></iframe>
- </div>
- </div>
- <div class="layui-tab-item" style="height:85vh;">
- <div class="rst_box_b_left width100_ height100_" style="overflow: hidden;">
- <iframe src="/dashboard/customer_setting/get_statistics.html" frameborder="0"
- class="layadmin-iframe"></iframe>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div id="addpackage">
- <form class="layui-form">
- <div class="layui-form-item">
- <label class="layui-form-label">产品名称 : </label>
- <div class="layui-input-block">
- <input type="text" name="name" id="name" class="layui-input" autocomplete="off"
- oninput="if(value.length>5)value=value.slice(0,30)">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">总价 : </label>
- <div class="layui-input-block">
- <input type="number" name="total_price" id="total_price" class="layui-input" min="0"
- oninput="if(value.length>5)value=value.slice(0,8)" onkeyup="value=zhzs(this.value)">
- </div>
- </div>
- </form>
- </div>
- </body>
- {/block} {block name="js"}
- <script type="text/javascript">
- //转化正整数
- function zhzs(value) {
- value = value.replace(/[^\d]/g, '');
- if ('' != value) {
- value = parseInt(value);
- }
- return value;
- }
- function RegularInt(obj) {
- obj.value = obj.value.replace(/[^\d]/g, ""); //清除"数字以外的字符
- obj.value = obj.value.replace(/^\./g, ""); //验证第一个字符是数字
- if (obj.value == 0) {
- obj.value = 1;
- }
- }
- </script>
- <script type="text/html" id="op">
- <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
- <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
- </script>
- <script type="text/html" id="de">
- <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
- <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
- </script>
- <script src="__STATIC__/layui/layui/lay/modules/xm-select.js" type="text/javascript" charset="utf-8"></script>
- <script>
- layui.config({
- base: '__LAYUI__/',
- urlbase: '/sys'
- }).extend({
- index: 'lib/index' //主入口模块
- }).use(['index', 'form', 'layedit', 'element', 'upload', 'table'], function () {
- var form = layui.form,
- upload = layui.upload,
- element = layui.element,
- layedit = layui.layedit;
- table = layui.table;
- $ = layui.jquery;
- var edit = function (type, data) {
- var urls = {
- source: '{:url("crm/apisourceadding")}',
- decostyle: '{:url("material/apidecostyleadding")}',
- package: '{:url("customerSetting/editPackage")}'
- };
- requestAjax(type, urls[type], data)
- }
- var del = function (type, id) {
- var urls = {
- source: '{:url("crm/delsource")}',
- decostyle: '{:url("crm/deldecostyle")}',
- package: '{:url("customerSetting/delPackage")}'
- };
- requestAjax(type, urls[type], { id: id })
- }
- $('.rst_box_top li').click(function () {
- let type = $(this).prop('dataset').type;
- if (type == 3) {
- $('.layui-tab-content').addClass('overflowHidden')
- } else {
- $('.layui-tab-content').removeClass('overflowHidden')
- }
- })
- var requestAjax = function (type, url, data) {
- $.post(url, data, function (res) {
- if (res.code === 0) {
- layer.msg(res.msg, {
- icon: 1,
- time: 2000
- }, function () {
- table.reload(type);
- });
- } else {
- layer.msg(res.msg, {
- icon: 0,
- time: 2000
- });
- }
- })
- }
- //选项卡
- element.on('tab(docDemoTabBrief)', function (data) {
- if (data.index == 0) {
- } else if (data.index == 1) {
- // table.render({
- // elem: '#decostyle',
- // autoSort: false,
- // url: '{:url("crm/decostyle")}?type=0',
- // cols: [
- // [{
- // type: 'numbers',
- // field: 'id',
- // width: 80,
- // title: '序号',
- // sort: true
- // }, {
- // field: 'decostyle',
- // title: '风格'
- // }, {
- // title: '操作',
- // width: 240,
- // align: 'center',
- // fixed: 'right',
- // toolbar: '#de'
- // }]
- // ],
- // page: true,
- // limit: 30,
- // height: 'full-200',
- // text: '对不起,加载出现异常!'
- // });
- // table.on('tool(decostyle)', function (obj) {
- // var data = obj.data;
- // if (obj.event == 'del') {
- // layer.confirm('确定删除该数据么?', { title: ['信息', 'color:#333333;background-color:#D8E6F1;'] }, function (index) {
- // del('decostyle', data.id);
- // layer.close(index);
- // });
- // } else {
- // layer.prompt({ title: [`编辑倾向风格`, 'color:#333333;background-color:#D8E6F1;'], value: data['decostyle'] }, function (value, index) {
- // var sent = {};
- // sent['decostyle'] = value;
- // sent['id'] = data.id;
- // sent['type'] = 0;
- // edit('decostyle', sent);
- // layer.close(index);
- // });
- // }
- // });
- } else if (data.index == 2) {
- table.render({
- elem: '#package',
- autoSort: false,
- url: '{:url("customerSetting/package")}',
- cols: [
- [{
- type: 'numbers',
- field: 'id',
- width: 80,
- title: '序号',
- sort: true
- }, {
- field: 'name',
- title: '产品名称'
- }, {
- field: 'total_price',
- title: '总价'
- }, {
- title: '操作',
- width: 240,
- align: 'center',
- fixed: 'right',
- toolbar: '#de'
- }]
- ],
- page: true,
- limit: 30,
- height: 'full-200',
- text: '对不起,加载出现异常!'
- });
- } else if (data.index == 3) {
- } else if (data.index == 4) {
- }
- });
- table.render({
- elem: '#source',
- autoSort: false,
- url: '{:url("crm/source")}',
- cols: [
- [{
- type: 'numbers',
- field: 'id',
- width: 80,
- title: '序号',
- sort: true
- }, {
- field: 'source',
- title: '渠道来源'
- }, {
- title: '操作',
- width: 240,
- align: 'center',
- fixed: 'right',
- toolbar: '#op'
- }]
- ],
- page: true,
- limit: 30,
- height: 'full-200',
- text: '对不起,加载出现异常!'
- });
- table.on('tool(source)', function (obj) {
- var data = obj.data;
- if (obj.event == 'del') {
- layer.confirm('确定删除该数据么?', { title: ['信息', 'color:#333333;background-color:#D8E6F1;'] }, function (index) {
- del('source', data.id);
- layer.close(index);
- });
- } else {
- layer.prompt({ title: [`编辑渠道来源`, 'color:#333333;background-color:#D8E6F1;'], value: data['source'] }, function (value, index) {
- var sent = {};
- sent['source'] = value;
- sent['id'] = data.id;
- sent['type'] = 1;
- edit('source', sent);
- layer.close(index);
- });
- }
- });
- table.on('tool(package)', function (obj) {
- var data = obj.data;
- if (obj.event == 'del') {
- layer.confirm('确定删除该数据么?', { title: ['信息', 'color:#333333;background-color:#D8E6F1;'] }, function (index) {
- del('package', data.id);
- layer.close(index);
- });
- } else {
- $('#addpackage').find('#name').val(data.name);
- $('#addpackage').find('#total_price').val(data.total_price);
- layer.open({
- type: 1,
- title: ['编辑产品', 'color:#333333;background-color:#D8E6F1;'],
- content: $('#addpackage'),
- btn: ['保存'],
- yes: function (index, layero) {
- let form = $(layero).find('form')[0];
- let formData = new FormData(form);
- let name = formData.get('name');
- let value = formData.get('total_price');
- if (name.trim().length == 0) {
- layer.msg('请输入产品名'); return;
- }
- if (value <= 0) {
- layer.msg('请输入产品总价'); return;
- }
- edit('package', { id: data.id, name, value });
- $('#addpackage').find('#name').val("");
- $('#addpackage').find('#total_price').val("");
- layer.close(index);
- }
- });
- }
- });
- //保存加微设置
- $('#wechat_save').click(function () {
- var value = [];
- $("input:checkbox[name='addwechat']:checked").each(function () {
- value.push($(this).val());
- });
- if (value.length == 0) {
- layer.msg('请至少选择一个加微类型', { anim: 0, time: 800 });
- return false;
- }
- $.ajax({
- type: "post",
- url: '{:url("customerSetting/setting")}',
- data: { type: 'customerWechatSetting', arr: value },
- success: function (res) {
- layer.msg(res.msg, { anim: 0, time: 800 });
- }
- })
- })
- //保存量房设置
- $('#house_save').click(function () {
- var value = [];
- $("input:checkbox[name='house']:checked").each(function () {
- value.push($(this).val());
- });
- if (value.length == 0) {
- layer.msg('请至少选择一个量房图片类型', { anim: 0, time: 800 });
- return false;
- }
- $.ajax({
- type: "post",
- url: '{:url("customerSetting/setting")}',
- data: { type: 'customerLfSetting', arr: value },
- success: function (res) {
- layer.msg(res.msg, { anim: 0, time: 800 });
- }
- })
- })
- //下次回访时间是否必传
- $('#visit_save').click(function () {
- var value = $("input[name='visit']:checked").val();
- $.ajax({
- type: "post",
- url: '{:url("customerSetting/setting")}',
- data: { type: 'nextVisitTimeIsOk', value: value },
- success: function (res) {
- layer.msg(res.msg, { anim: 0, time: 800 });
- }
- })
- })
- //合并保存
- $('#save_all').click(function () {
- //加微设置
- var value = [];
- $("input:checkbox[name='addwechat']:checked").each(function () {
- value.push($(this).val());
- });
- if (value.length == 0) {
- layer.msg('请至少选择一个加微类型', { anim: 0, time: 800 });
- return false;
- }
- //量房设置
- var value1 = [];
- $("input:checkbox[name='house']:checked").each(function () {
- value1.push($(this).val());
- });
- if (value1.length == 0) {
- layer.msg('请至少选择一个量房图片类型', { anim: 0, time: 800 });
- return false;
- }
- //下次回访时间是否必传
- var value2 = $("input[name='visit']:checked").val();
- var resource_fp = $("input[name='resource']:checked").val();
- var value3 = $("input[name='value3']").val();//最迟加微天数
- var value33 = $("input[name='value33']:checked").val() ? 1 : 0;//最迟加微天数开关
- // let value4 = xmSelectElement.getValue('valueStr');
- // var value4 = $("input[name='forbidden_state']:checked").val();
- var value4 = [];
- $("input:checkbox[name='forbidden_state']:checked").each(function () {
- value4.push($(this).val());
- });
- // 确认
- let visitShopConfirm = []; $(':checkbox[name="visit_shop_confirm"]:checked').each(function () {
- visitShopConfirm.push($(this).val());
- });
- let visitSiteConfirm = []; $(':checkbox[name="visit_site_confirm"]:checked').each(function () {
- visitSiteConfirm.push($(this).val());
- });
- let measureConfirm = []; $(':checkbox[name="measure_confirm"]:checked').each(function () {
- measureConfirm.push($(this).val());
- });
- let depositConfirm = []; $(':checkbox[name="deposit_confirm"]:checked').each(function () {
- depositConfirm.push($(this).val());
- });
- let signConfirm = []; $(':checkbox[name="sign_confirm"]:checked').each(function () {
- signConfirm.push($(this).val());
- });
- let need_designer = []; $(':checkbox[name="need_designer"]:checked').each(function () {
- need_designer.push($(this).val());
- });
- let designerNum = $('input[name="designer_num"]').val();
- let showEmpVistlog = $("input[name='showempvistlog']:checked").val() ? 1 : 0;//只展示员工跟进记录开关
- let assign_type = []; $(':checkbox[name="assign_type"]:checked').each(function () {
- assign_type.push($(this).val());
- });
- var visit_reset = $("input[name='visit_reset']:checked").val();
- let empcrm_pool_statistics = $("input[name='empcrm_pool_statistics']:checked").val() ? 1 : 0;
-
- let empcrm_pool = departTree.getValue();
- let empcrm_customer_repeat = [];
- $(empcrm_pool).each(function (k,v) {
- empcrm_customer_repeat.push(v.id);
- });
- let magnotify = $("input[name='magnotify']:checked").val() ? 1 : 0;//管理层通知开关
- let designer_get_customer = $("input[name='designer_get_customer']:checked").val() ? 1 : 0;//设计师能否获取客户
- let no_follow_tips = $("input[name='no_follow_tips']:checked").val() ? 1 : 0;//管理层通知开关
- let is_all_manager_oprate_able = $("input[name='is_all_manager_oprate_able']:checked").val() ? 1 : 0;
- let valid_check_person = []; $(':checkbox[name="valid_check_person"]:checked').each(function () {
- valid_check_person.push($(this).val());
- });
- //保存
- $.ajax({
- type: "post",
- url: '{:url("customerSetting/setting")}',
- data: { value: value, value1: value1, value2: value2, value3: value3, value4: value4, value33: value33, visitShopConfirm, visitSiteConfirm, measureConfirm, depositConfirm, signConfirm, designerNum, showEmpVistlog, assign_type,resource_fp,visit_reset,empcrm_pool_statistics,empcrm_customer_repeat,magnotify,need_designer,designer_get_customer:designer_get_customer,no_follow_tips: no_follow_tips,is_all_manager_oprate_able,valid_check_person},
- success: function (res) {
- layer.msg(res.msg, { anim: 0, time: 800 });
- }
- })
- });
-
- let departarr=null;
- var departTree = xmSelect.render({
- el: "#rangeDepart",
- name: 'org_id',
- autoRow: true,
- filterable: true,
- tips: '请选择',
- checkbox: true,
- tree: {
- show: true,
- showFolderIcon: true,
- showLine: true,
- indent: 20,
- expandedKeys: [-3],
- //是否严格遵守父子模式
- strict: false,
- },
- height: "200px",
- data: [],
- on:function(data){
- if(data.isAdd){
- for(let i in departarr){
- if(departarr[i].id==data.change[0].id){
- let arr=[];
- for(let j in departarr[i].children){
- let arr1=mpersonfun(departarr[i].children[j],data.arr,data.change);
- if(!!arr1&&arr1.length>0){
- data.arr=data.arr.concat(arr1);
- }
- let flag=false;
- for(let t in data.arr){
- if(data.arr[t].id==departarr[i].children[j].id){
- flag=true;
- }
- }
- if(!flag){
- arr.push(departarr[i].children[j]);
- }
- }
- data.arr=data.arr.concat(arr);
- return data.arr;
- }else{
- let arr1=personfun(departarr[i],data.arr,data.change);
- data.arr=data.arr.concat(arr1);
- return data.arr;
- }
- }
- }
-
- }
- });
- function personfun(obj,warr,obj1){
- let arr=obj.children;
- if(arr.length==0||!arr){
- return [];
- }
- let arr1=[];
- for(let i in arr){
- if(arr[i].id==obj1[0].id){
-
- for(let j in arr[i].children){
- let arr2=mpersonfun(arr[i].children[j],warr,obj1);
- if(!!arr2&&arr2.length>0){
- arr1=arr1.concat(arr2);
- }
-
- let flag=false;
- for(let t in warr){
- if(warr[t].id==arr[i].children[j].id){
- flag=true;
- }
- }
- if(!flag){
- arr1.push(arr[i].children[j]);
- }
- }
- return arr1;
- }else{
- let arr3=personfun(arr[i],warr,obj1);
- arr1=arr1.concat(arr3);
- }
- }
- return arr1;
- }
- function mpersonfun(obj,warr,obj1){
- let arr=obj.children;
- if(arr.length==0||!arr){
- return [];
- }
- let arr1=[];
- for(let i in arr){
- let flag1=false;
- for(let t in warr){
- if(warr[t].id==arr[i].id){
- flag1=true;
- }
- }
- if(!flag1){
- arr1.push(arr[i]);
- }
- for(let j in arr[i].children){
- let arr2=mpersonfun(arr[i].children[j],warr,obj1);
- if(!!arr2&&arr2.length>0){
- arr1=arr1.concat(arr2);
- }
-
- let flag=false;
- for(let t in warr){
- if(warr[t].id==arr[i].children[j].id){
- flag=true;
- }
- }
- if(!flag){
- arr1.push(arr[i].children[j]);
- }
- }
-
- }
- return arr1;
- }
- $.ajax({
- url: '{:url("customer_setting/get_person")}',
- type: "post",
- data: {},
- success: function(res) {
- departarr=res;
- departTree.update({data:res})
- }
- })
- //添加来源
- $('#cate_add').click(function () {
- var type = 'source';
- layer.prompt({ title: ['添加渠道来源', 'color:#333333;background-color:#D8E6F1;'], }, function (value, index) {
- var data = {};
- data[type] = value;
- data['type'] = 1;
- edit(type, data);
- layer.close(index);
- });
- });
- //添加风格
- $('#cate_add1').click(function () {
- var type = 'decostyle';
- layer.prompt({ title: ['添加倾向风格', 'color:#333333;background-color:#D8E6F1;'], }, function (value, index) {
- var data = {};
- data[type] = value;
- data['type'] = 0;
- edit(type, data);
- layer.close(index);
- });
- });
- $('#addpackage_button').click(function () {
- layer.open({
- type: 1,
- title: ['添加产品', 'color:#333333;background-color:#D8E6F1;'],
- content: $('#addpackage'),
- btn: ['保存'],
- yes: function (index, layero) {
- let form = $(layero).find('form')[0];
- let formData = new FormData(form)
- let name = formData.get('name');
- let value = formData.get('total_price');
- if (name.trim().length == 0) {
- layer.msg('请输入产品名'); return;
- }
- if (value <= 0) {
- layer.msg('请输入产品总价'); return;
- }
- edit('package', { name, value });
- layer.close(index);
- }
- });
- });
- //自定义客户信息初始化
- var action = {
- setting: function () {
- $.get("{:url('customerSetting/getCustom')}", function (res) {
- if (res.code == 0) {
- var html = '';
- for (var key in res.data) {
- const title = res.data[key].title;
- const arr = res.data[key].arr;
- html += '<div class="rst_box_b_left width100_ pdtb15">';
- html += '<div class="layui-form-item">';
- html += '<label class="layui-form-label">' + title + '设置: </label>';
- html += '<div class="layui-input-block ' + key + 'add">';
- html += '<button class="layui-btn layui-btn-primary onclickadd" data-type="add" data-cate="' + key + '">添加' + title + '</button>';
- for (let i = 0; i < arr.length; i++) {
- const element = arr[i];
- html += '<button class="layui-btn custom layui-btn-primary ' + key + i + 'del"><span class="edit_html ' + key + i + '" data-key=' + i + ' data-cate="' + key + '">' + element + '</span><img class="deletebtns xxx ids" data-cate="' + key + '" data-del="' + key + i + '" src="__STATIC__/img/xxx.png"/></button>';
- }
- html += '</div>';
- html += '</div>';
- html += '</div>';
- }
- $('#courtom').html(html);
- $('.edit_html').on('click', function () {
- var cate = $(this).data('cate');
- var value = $(this).html();
- var key = $(this).data('key');
- action.edit(cate, value, key);
- })
- $('.deletebtns').on('click', function () {
- var del = $(this).data('del');
- var cate = $(this).data('cate');
- action.delete(del, cate);
- })
- $('.onclickadd').on('click', function () {
- var cate = $(this).data('cate');
- var title = $(this).html();
- action.add(cate, title);
- })
- }
- });
- },
- //添加自定义内容
- add: function (cate, title) {
- layer.prompt({
- formType: 0,
- title: title,
- // area: ['500px', '150px'],
- btnAlign: 'c',
- yes: function (index, layero) {
- // 获取文本框输入的值
- var value = layero.find(".layui-layer-input").val();
- if (value) {
- $.post("{:url('customerSetting/addCustom')}", { type: cate, key: value }, function (res) {
- if (res.code == 0) {
- layer.msg(res.data, {
- anim: 0, time: 1000, icon: 6,
- }, function () {
- layer.close(index); //再执行关闭
- });
- var i = parseInt(Math.random() * 999999999);
- var class_id1 = 'edit_html' + i;
- var class_id2 = 'deletebtns' + i;
- var html = '<button class="layui-btn custom layui-btn-primary ' + cate + i + 'del"><span class="' + class_id1 + ' ' + cate + i + '" data-cate="' + cate + '" data-key=' + i + '>' + value + '</span><img class="' + class_id2 + ' xxx ids" data-cate="' + cate + '" data-del="' + cate + i + '" src="__STATIC__/img/xxx.png"/></button>';
- $('.' + cate + 'add').append(html);
- $('.' + class_id1).on('click', function () {
- var cate = $(this).data('cate');
- var value = $(this).html();
- var key = $(this).data('key');
- action.edit(cate, value, key);
- })
- $('.' + class_id2).on('click', function () {
- var del = $(this).data('del');
- var cate = $(this).data('cate');
- action.delete(del, cate);
- })
- } else {
- layer.msg(res.data);
- }
- });
- } else {
- layer.msg('请输入内容');
- }
- }
- });
- },
- //编辑自定义内容
- edit: function (type, val, key) {
- layer.prompt({
- formType: 0,
- title: '编辑',
- // area: ['500px', '150px'],
- value: val,
- btnAlign: 'c',
- yes: function (index, layero) {
- // 获取文本框输入的值
- var value = layero.find(".layui-layer-input").val();
- if (value) {
- $.post("{:url('customerSetting/editCustom')}", { type: type, key: value, y_key: val }, function (res) {
- if (res.code == 0) {
- layer.msg(res.data, {
- anim: 0, time: 1000, icon: 6,
- }, function () {
- layer.close(index); //再执行关闭
- });
- $('.' + type + key).html(value);
- } else {
- layer.msg(res.data);
- }
- });
- } else {
- layer.msg('请输入内容');
- }
- }
- });
- },
- //删除
- delete: function (id, cate) {
- layer.confirm('确定删除?', { title: ['信息', 'color:#333333;background-color:#D8E6F1;'], }, function (index) {
- var val = $('.' + id).html();
- $.post("{:url('customerSetting/deleteCustom')}", { type: cate, key: val }, function (res) {
- if (res.code == 0) {
- layer.msg(res.data, {
- anim: 0, time: 1000, icon: 6,
- }, function () {
- layer.close(index); //再执行关闭
- });
- $('.' + id + 'del').remove();
- } else {
- layer.msg(res.data);
- }
- });
- });
- }
- }
- action.setting();
- $('.onclick').on('click', function () {
- var type = $(this).data('type');
- action[type] ? action[type].call(this) : '';
- });
- })
- </script>
- {/block}
|