12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823 |
- {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 {
- font-size: 12px;
- padding-bottom: 60px;
- }
- .topbox {
- display: block;
- border-bottom: 1px solid #F0F0F0;
- background: #FCFCFC;
- width: 100%;
- height: 42px;
- line-height: 35px;
- font-size: 14px;
- text-indent: 5px;
- font-family: Arial;
- padding-top: 3px;
- padding-bottom: 3px;
- }
- .topbox a {
- display: block;
- font-size: 12px;
- font-weight: normal;
- margin-right: 15px;
- color: #0000FF;
- }
- .topbox a:hover {
- color: #FF0000
- }
- .textareabox {
- margin-top: 5px;
- table-layout: fixed;
- _width: 100%;
- width: 100%;
- border: 1px solid #DFDFDF;
- border-collapse: separate !important;
- border-right: 0;
- border-bottom: 2px solid #DFDFDF;
- background-color: #FFF;
- }
- .inputbox {
- border-right: 1px solid #DFDFDF;
- border-bottom: 1px solid #EAEAEC;
- padding: 7px;
- line-height: 25px;
- font-size: 13px;
- position: relative;
- padding-left: 49px;
- }
- .addrecordbox {
- display: block;
- width: 345px;
- height: 80px;
- outline: none;
- position: relative;
- overflow: hidden;
- padding: 5px;
- }
- .inputbox span {
- display: block;
- width: 42px;
- position: absolute;
- bottom: 2px;
- left: 7px;
- line-height: 25px;
- font-size: 13px;
- font-weight: bold;
- }
- .waybox {
- display: block;
- width: 100%;
- background-color: #FFF;
- padding: 7px;
- line-height: 25px;
- font-size: 13px;
- }
- .leftwaybox {
- display: block;
- color: #FF0000;
- font-weight: bold;
- }
- .leftstatebox {
- display: block;
- font-weight: bold;
- }
- .everylabel {
- display: block;
- margin-right: 10px;
- }
- .everylabel input {
- vertical-align: middle;
- width: 16px;
- height: 16px;
- appearance: none;
- -webkit-appearance: none;
- -moz-appearance: none;
- background-color: transparent;
- border: 0;
- outline: 0 !important;
- line-height: 14px;
- color: #d8d8d8;
- }
- .everylabel input[type=radio]:after {
- content: "";
- display: block;
- width: 16px;
- height: 16px;
- border-radius: 50%;
- text-align: center;
- line-height: 12px;
- color: #fff;
- border: 1px solid #ddd;
- background-color: #fff;
- box-sizing: border-box;
- }
- .everylabel input[type=radio]:checked:after {
- content: "L";
- transform: matrix(-0.766044, -0.642788, -0.642788, 0.766044, 0, 0);
- -webkit-transform: matrix(-0.766044, -0.642788, -0.642788, 0.766044, 0, 0);
- -ms-transform: matrix(-0.766044, -0.642788, -0.642788, 0.766044, 0, 0);
- /*兼容ie9+ */
- -moz-transform: matrix(-0.766044, -0.642788, -0.642788, 0.766044, 0, 0);
- /*兼容ie9+ */
- border-color: #37AF6E;
- background-color: #37AF6E;
- }
- .nextimebox {
- display: block;
- font-weight: bold;
- line-height: 25px;
- padding: 7px;
- }
- .nextimebox input {
- display: block;
- border: 1px solid #ccc;
- background: #fff;
- padding: 1px 2px;
- height: 24px;
- line-height: 24px;
- vertical-align: middle;
- text-indent: 3px;
- }
- .mustbox {
- display: block;
- padding-left: 5px;
- padding-right: 5px;
- color: #FF0000;
- }
- .savebtn {
- display: block;
- 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;
- position: absolute;
- right: 7px;
- bottom: 48px;
- }
- .statusbox {
- font-size: 13px;
- line-height: 25px;
- padding: 7px;
- background-color: #daeef3;
- }
- .statustext {
- font-weight: bold;
- }
- .recordbox {
- display: block;
- table-layout: fixed;
- _width: 100%;
- width: 100%;
- border: 1px solid #DFDFDF;
- border-collapse: separate !important;
- background-color: #FFF;
- border-right: 0;
- border-bottom: 2px solid #DFDFDF;
- margin-top: 6px;
- }
- .maintable {
- width: 100%;
- }
- .maintable th {
- background-color: #F2F3F7;
- border-right: 1px solid #DFDFDF;
- border-bottom: 1px solid #DFDFDF;
- line-height: 25px;
- padding: 5px;
- text-align: center;
- font-family: Arial;
- font-size: 12px;
- letter-spacing: 1px;
- color: #333
- }
- .maintable td {
- border-right: 1px solid #DFDFDF;
- border-bottom: 1px solid #EAEAEC;
- padding: 7px;
- line-height: 25px;
- font-size: 13px;
- position: relative;
- }
- .tablelist th,
- .tablelist td {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- word-wrap: break-word;
- }
- .tbcenter td {
- text-align: center
- }
- .maintable h2 {
- border-bottom: 1px solid #999;
- margin: 0;
- font-weight: bold;
- font-size: 15px;
- margin-bottom: 10px;
- margin-top: 5px;
- text-indent: 3px;
- font-family: Arial;
- letter-spacing: 1px;
- }
- .maintable td label {
- cursor: pointer
- }
- #showphone {
- text-decoration: underline;
- font-weight: bold;
- cursor: pointer;
- }
- .sortnum {
- display: block;
- width: 25px;
- height: 18px;
- background-color: #eee
- /*#d3ccd6*/
- ;
- text-decoration: none;
- position: absolute;
- bottom: 0;
- left: 0;
- line-height: 18px;
- border-radius: 0 6px 0 0;
- text-align: center;
- }
- .logmsgbox {
- padding: 7px;
- }
- .logmsgbox span {
- display: block;
- color: #009900;
- font-weight: bold;
- font-size: 14px;
- letter-spacing: 1px;
- }
- .footimebox {
- display: block;
- background-color: #f5f5f5;
- color: #999;
- width: 100%;
- padding: 3px 11px 3px 3px;
- height: 20px;
- line-height: 20px;
- position: relative;
- top: 7px;
- left: -7px;
- box-sizing: content-box;
- }
- .hfstate {
- position: absolute;
- right: 5px;
- }
- .linebox {
- display: block;
- width: 100%;
- padding: 10px;
- border: 1px solid #f5f5f5;
- margin: 6px auto 0px;
- text-align: left;
- letter-spacing: 1px;
- background-color: #f8f8f8;
- }
- .leftcheckbox {
- display: block;
- position: absolute;
- display: block;
- width: 78px;
- height: 27px;
- top: 0;
- left: 0;
- padding-top: 12px;
- background-color: #FFCC00;
- text-align: center;
- box-sizing: content-box;
- }
- input[type=checkbox] {
- vertical-align: middle;
- width: 16px;
- height: 16px;
- appearance: none;
- /**css3属性,不支持ie,但不影响使用**/
- -webkit-appearance: none;
- -moz-appearance: none;
- background-color: transparent;
- border: 0;
- outline: 0 !important;
- cursor: pointer
- }
- input[type=checkbox]+label {
- vertical-align: middle;
- padding-left: 1px;
- padding-right: 1px;
- }
- input[type=checkbox]:after {
- content: "";
- display: block;
- width: 16px;
- height: 16px;
- text-align: center;
- line-height: 15px;
- color: #fff;
- border: 1px solid #c0c0c0;
- background-color: #fff;
- box-sizing: border-box;
- font-weight: bold
- }
- input[type=checkbox]:checked:after {
- content: "\2713";
- border-color: #37AF6E;
- background-color: #37AF6E;
- }
- .invalidbox {
- display: block;
- font-weight: bold;
- font-size: 14px;
- text-decoration: none;
- }
- .customermsgbox {
- display: block;
- width: 95%;
- padding: 0 10px;
- border: 1px solid #f5f5f5;
- margin: 6px auto 0px;
- text-align: left;
- letter-spacing: 1px;
- background-color: #f8f8f8;
- }
- .crmtitbox {
- display: block;
- width: 100%;
- margin: 15px 0 10px 0;
- border-bottom: 1px solid #ccc;
- width: 100%;
- padding-bottom: 5px;
- font-size: 14px;
- letter-spacing: 1px;
- font-weight: bold;
- padding-left: 12px;
- }
- .othercrmsgbox {
- display: block;
- line-height: 25px;
- padding-left: 10px;
- }
- .mr10 {
- margin-right: 10px;
- }
- .setinvalidbox{
- padding-top: 50px;
- }
- .invalidtit{
- display: block;
- border-bottom: 1px solid #F0F0F0;
- background: #FCFCFC;
- width: 100%;
- height: 35px;
- line-height: 35px;
- font-size: 14px;
- text-indent: 5px;
- font-family: Arial;
- padding-top: 3px;
- padding-bottom: 3px;
- }
- .closebtn{
- display: block;
- font-size: 12px;
- font-weight: normal;
- margin-right: 15px;
- color: #000;
- line-height: 28px;
- text-indent: 5px;
- font-family: Arial;
- cursor: pointer;
- background: url(/static/img/btn_bg.gif) repeat-x;
- border: 1px solid #C0C0C0;
- padding: 0 12px;
- *padding: 0 6px;
- height: 28px;
- }
- .invalidtable{
- background-color: #FCFCFC;
- }
- .submitbtn{
- cursor: pointer;
- color: #000;
- background: url(/static/img/btn_bg.gif) repeat-x;
- border: 1px solid #C0C0C0;
- padding: 0 12px;
- *padding: 0 6px;
- height: 28px;
- }
- .orderDing {
- width: 95%;
- padding: 8px;
- text-align: center;
- font-size: 14px;
- margin: 6px auto 0px;
- background-color: #009900;
- color: #FFF;
- }
- .orderDing span {
- font-weight: bold;
- padding: 0 3px;
- color: #FFCC00;
- }
- .newcrmbox{
- display: block;
- width: 100%;
- height: 40px;
- box-sizing: border-box;
- padding: 7px;
- line-height: 26px;
- font-size: 13px;
- position: relative;
- background-color: #fff;
- letter-spacing:1px;
- }
- .orderDaDing {
- background-color: #ff6600;
- }
- .layui-layer-imgbar{
- display: none !important;
- }
- xm-select{
- min-height: 26px;
- line-height: 26px;
- font-size: 12px;
- }
- .addbtn {
- display: block;
- padding: 0 12px;
- height: 26px;
- font-size: 14px;
- text-align: center;
- cursor: pointer;
- line-height: 26px;
- }
- xm-select .xm-label .xm-label-block {
- height: 20px !important;
- line-height: 20px !important;
- }
- xm-select .xm-label .scroll .label-content {
- line-height: 20px !important;
- }
- xm-select > .xm-label .scroll .label-content {
- padding: 1px 10px !important;
- }
- .aduioimg{
- cursor: pointer;
- }
- .layMask {
- width: 100%;
- height: 100%;
- position: fixed;
- top: 0px;
- left: 0px;
- z-index: 99;
- background-color: rgba(0,0,0,0.3);
- overflow: auto;
- }
- .showImage {
- width: 85%;
- max-height: 90%;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%,-50%);
- }
- .imageRize {
- display: inline-block;
- width: 150px;
- max-height: 300px;
- overflow: hidden;
- }
- .chooseMobile {
- position: absolute;
- width: 150px;
- min-height: 80px;
- max-height: 400px;
- background-color: #fff;
- box-shadow: 0px 0px 4px 2px rgba(0,0,0,0.1);
- right: 0px;
- top: 32px;
- z-index: 999;
- border-radius: 4px;
- }
- .chooseMobile > div {
- width: 100%;
- height: 30px;
- line-height: 30px;
- box-sizing: border-box;
- padding: 0px 10px;
- border-bottom: 1px solid #f2f2f2;
- cursor: pointer;
- }
- .kuaisubiaoji{
- margin: 10px 12px;
- padding: 10px 15px;
- background-color: #f8f8f8;
- }
- .kb-input{
- margin: 10px 0px;
- overflow: hidden;
- }
- .kb-input>input{
- margin-left: 10px;
- }
- .kb-state{
- float:left;
- width:22%;
- margin-left:4%;
- height: 40px;
- line-height: 40px;
- text-align: center;
- border-radius: 5px;
- overflow: hidden;
- background: #ECECEC;
- position: relative;
- }
- .kb-state::after{top:0;left: 0;width: 100%;height: 100%;position: absolute;display: block;content: '';cursor: pointer;}
- .kb-state input[type=checkbox]{
- margin-right: 5px;
- }
- .kb-state>label>input[type=checkbox]:after{
- border-radius: 50%;
- }
- .background-green{
- background-color: green;
- }
- .background-green label{color:#fff;}
- .kb-item{
- display: none;
- }
- #kb-save{
- background: #5CA331;
- padding: 5px;
- border: 0;
- border-radius: 5px;
- color: white;
- width:100%;
- height: 40px;
- }
- .kb-save{
- float: right;
- margin: 5px 0px 20px 0;
- width:100%;
- }
- #add_wechat{background-color: #ececec;border:0;}
- input::-webkit-outer-spin-button,input::-webkit-inner-spin-button { -webkit-appearance:none !important;}
- input[type='number']{ -moz-appearance: textfield !important;}
- .maintable {
- table-layout: fixed;
- width: 100%;
- border: 1px solid #DFDFDF;
- border-collapse: separate !important;
- }
- .tupianicos{position: absolute;right: 8%;bottom: 15%;font-size: 26px;cursor: pointer;}
- .imageDiv{float:left;width:23%;margin:0 1% 6px;position:relative;height:96px;}
- .delfada{top:0;left:0;position:absolute;height: 24px;text-align: center;bottom: 0;right: 0;margin: auto;}
- .delfada i{color:#fff;}
- .delfada i:hover{color:red}
- .picDiv{overflow: hidden;}
- .loguploadfile {
- width: 100%;
- height: auto;
- display: flex;
- padding: 6px 10px 6px 5px;
- }
- .filelabel {
- width: 80px;
- display: inline-block;
- font-weight: bold;
- color: #000000;
- font-size: 14px;
- line-height: 26px;
- }
- .fileblock {
- width: calc(100% - 80px);
- display: flex;
- }
- .fileblock > div {
- line-height: 26px;
- max-width: calc(100% - 100px);
- white-space: nowrap;
- text-overflow: ellipsis;
- overflow: hidden;
- }
- .fileblock > span {
- padding: 6px 15px;
- background-color: #249EFB;
- color: #fff;
- border-radius: 4px;
- cursor: pointer;
- }
- </style>
- <body>
- <div class="addlogbox">
- <div class="clearfix topbox">
- <div class="left" style="color: #FF0000;">信息记录:</div>
- <a class="right closediv" href="javascript:void(0)" title="关闭该窗口">关闭该窗口</a>
- </div>
- <div class="textareabox relative" {if $isadd_log neq 1} style="display: none;"{/if}>
- <div class="relative inputbox clearfix">
- <span>内容:</span>
- <textarea class="addrecordbox" style="resize:none;"></textarea>
- <div id="upload-drag">
- <i class="layui-icon layui-icon-picture tupianicos"></i>
- </div>
- </div>
- <div class="relative picDiv" id="tupianbox"></div>
- <div class="clearfix waybox">
- <div class="left leftwaybox">方式:</div>
- <div class="left">
- <div class="left everylabel">
- <input name="rway" type="radio" value="1" id="rway2" title="电话">
- <label for="rway2" title="电话">电话</label>
- </div>
- <div class="left everylabel">
- <input name="rway" type="radio" value="2" id="rway3" title="短信">
- <label for="rway3" title="短信">短信</label>
- </div>
- <div class="left everylabel">
- <input name="rway" type="radio" value="3" id="rway4" title="微信">
- <label for="rway4" title="微信">微信</label>
- </div>
- <div class="left everylabel">
- <input name="rway" type="radio" value="4" id="rway1" title="见面">
- <label for="rway1" title="见面">见面</label>
- </div>
- <div class="left everylabel">
- <input name="rway" type="radio" value="5" id="rway5" title="其它">
- <label for="rway5" title="其它">其它</label>
- </div>
- </div>
- </div>
- <div class="clearfix waybox">
- <div class="left leftstatebox">线索状态:</div>
- <div class="left">
- <div class="left everylabel stateElement">
- <input name="state" type="radio" value="待确认" id="state1" title="待确认" {if $data['state'] == '待确认'}checked{/if}>
- <label for="state1" title="待确认">待确认</label>
- </div>
- <div class="left everylabel stateElement">
- <input name="state" type="radio" {if ($data['state'] == '待确认' || empty($data['state']))}value="未到访"{else /}value="回访"{/if} id="state2" title="有效" {if $data['state'] != '待确认'}checked{/if}>
- <label for="state2" title="有效">有效线索</label>
- </div>
- <div class="left everylabel stateElement">
- <input name="state" type="radio" value="无效" id="state3" title="无效">
- <label for="state3" title="无效">无效线索</label>
- </div>
- </div>
- </div>
- <div class="loguploadfile">
- <div class="filelabel">上传文件</div>
- <div class="fileblock">
- <div id="fileElename"></div>
- <span id="refbuttonele">上传附件</span>
- <input type="file" hidden id="refilele">
- </div>
- </div>
- <div class="nextimebox clearfix">
- <div class="left">下次:</div>
- <div class="left">
- <input id="nextime" class="left" type="text" readonly />
- <span class="left mustbox">*</span>
- </div>
- </div>
- <button type="button" class="savebtn">保存记录</button>
- <div class="statusbox clearfix" {if $data.house_status && $isadd_log == 1} style="display: none;" {/if}>
- <div class="left statustext">房屋状态:</div>
- {volist name="house_status" id="vo" key="k"}
- <div class="left everylabel">
- <input name="house_status" type="radio" value="{$vo.name}" id="csid{$k}" title="点击修改为:{$vo.name}">
- <label for="csid{$k}" title="点击修改为:{$vo.name}">{$vo.name}</label>
- </div>
- {/volist}
- </div>
- </div>
- {if ($data.introduce == 0) && ($data.deposit)}
- <div class="newcrmbox"><strong class="red">提示:</strong>已明确请求<u>{$data.community_name}</u>的<u>{$data.name}</u>介绍新客户<input style="display: inline-block;" onclick="OncheckBox(this)" class="newcrmdiv" type="checkbox" title="已请求介绍新客户" /></div>
- {/if}
- {if $data.deposit}
- <div class="orderDing">{$data.name}在<span class="">{$data.deposit.confirm_date}</span>交<span>{$data.deposit.money}</span>定金,{$data.employee.name}录入</div>
- {/if}
- {if $data.sign}
- <div class="orderDing orderDaDing">{$data.name}在<span class="">{$data.sign.confirm_date}</span>{if $data.package_name}用<span>{$data.package_name}</span>{/if}合同<span>{$data.sign.money}</span>, {$data.employee.name}录入</div>
- {/if}
- <div class="recordbox" {if $data.state eq '无效'} style="display: none;"{/if}>
- <div class="statusbox clearfix" style="background: none;">
- <div class="statustext" style="line-height: 26px;">指派人员:</div>
- <div style="width:100%;margin-right: 10px;">
- <div id="range_person"></div>
- </div>
- {if $assign_list && !$data.assign_type}
- <div style="width: 100%;display: flex;align-items: center;margin: 6px 0px;">
- {volist name="assign_list" id="vo" key="k"}
- <div class="everylabel">
- <input name="assign_type" type="radio" value="{$vo.keyname}" id="assign{$k}" {if condition="count($assign_list) eq 1"}checked="checked"{/if} title="{$vo.value}">
- <label for="assign1" title="{$vo.value}">{$vo.value}</label>
- </div>
- {/volist}
- </div>
- {/if}
- <div style="width: 100%;display: flex;justify-content: flex-end;margin: 6px 0px;">
- <button type="button" class="addbtn layui-btn layui-btn-primary layui-border-blue" id="assign">确定</button>
- </div>
- </div>
- </div>
- <div class="recordbox" {if $data.state eq '无效'} style="display: none;"{/if}>
- <div class="clearfix waybox">
- <table class="maintable" border="0" cellspacing="0" cellpadding="0">
- <tbody>
- <tr>
- <td align="center">
- <input name="level" type="radio" value="A" id="rway2" {if $data.level == 'A'} checked {/if} title="Arial">
- <label for="rway2" title="电话">A</label>
- </td>
- <td align="center">
- <input name="level" type="radio" value="B" id="rway3" {if $data.level == 'B'} checked {/if} title="B">
- <label for="rway3" title="短信">B</label>
- </td>
- <td align="center">
- <input name="level" type="radio" value="C" id="rway4" {if $data.level == 'C'} checked {/if} title="C">
- <label for="rway4" title="微信">C</label>
- </td>
- <td align="center">
- <input name="level" type="radio" value="D" id="rway1" {if $data.level == 'D'} checked {/if} title="D">
- <label for="rway1" title="见面">D</label>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="clearfix waybox">
- <table class="maintable" border="0" cellspacing="0" cellpadding="0">
- <tbody>
- <tr>
- <th>口碑采集</th>
- <th>进业主群</th>
- <th>添加微信</th>
- </tr>
- <tr>
- <td align="center">
- {if $data.reputation_gather}
- 已采集
- {else/}
- <input name="dataType" type="checkbox" value="reputation_gather" id="rway22" title="口碑采集">
- {/if}
- </td>
- <td align="center">
- {if $data.into_owner_group}
- 已进群
- {else/}
- <input name="dataType" type="checkbox" value="into_owner_group" id="rway33" title="进业主群">
- {/if}
- </td>
- <td align="center">
- {if $data.add_wechat_time}
- 已添加
- {else/}
- <input name="dataType" type="checkbox" value="add_wechat_time" id="rway44" title="添加微信">
- {/if}
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div class="recordbox">
- <table class="maintable">
- <tbody>
- <tr>
- <td width="55">记录人</td>
- <td>
- <span class="left">记录内容</span>
- <div class="right relative">{if $data.name==''}未知{else/}{$data.name}{/if}:<span id="showphone" title="双击查看完整号码" style="letter-spacing:1px;"></span>
- {if $outcall}
- <img id="callCustomer" src="__STATIC__/img/mobile121.png" width="14px" alt="">
- <div class="chooseMobile layui-hide">
- {volist name="outcall_phone" id="phone"}
- <div>{$phone}</div>
- {/volist}
- </div>
- {/if}
- </div>
- </td>
- </tr>
- {volist name="data.visitLog" id="vo" key="k"}
- <tr>
- <td class="relative">{$vo.empname}<span class="sortnum">{php} echo count($data['visitLog'])-$k+1; {/php}</span>
- </td>
- <td class="relative">
- <div class="logmsgbox">
- <div {if $vo.wisdom_url eq null}style="display: none;"{/if}>
- <audio src="{$vo.wisdom_url}" controls="controls" style="height: 40px;" id="audioEle{$vo.id}"></audio>
- </div>
- <div class="clearfix">
- <span class="left" {if $vo.save_portrait_field neq null}style="display:none;"{/if}>
- {if $vo.type == 1}电话:
- {elseif $vo.type == 2 /}短信:
- {elseif $vo.type == 3 /}微信:
- {elseif $vo.type == 4 /}见面:
- {/if}
- </span>
- </div>
-
- <div data-html="{$vo.remark}" class="remarkbox"></div>
- {if $vo.img neq ''}
- {volist name="vo.img" id="v"}
- <div class="imageRize">
- <img class="nowimgbox" src="{$v}" str="1" img="{$v}" width="100%"/>
- </div>
- {/volist}
- {/if}
- {if $vo.img1 neq ''}
- {volist name="vo.img1" id="v"}
- <div class="imageRize">
- <img class="nowimgbox" src="{$v}" str="1" img="{$v}" width="100%"/>
- </div>
- {/volist}
- {/if}
- {if $vo.sign_img neq ''}
- {volist name="vo.sign_img" id="v"}
- <div class="imageRize">
- <img class="nowimgbox" src="{$v}" str="1" img="{$v}" width="100%"/>
- </div>
- {/volist}
- {/if}
- {if $vo.delivery_img neq ''}
- {volist name="vo.delivery_img" id="v"}
- <div class="imageRize">
- <img class="nowimgbox" src="{$v}" str="1" img="{$v}" width="100%"/>
- </div>
- {/volist}
- {/if}
- {if $vo.save_portrait_field neq ''}
- {volist name="vo.save_portrait_field" id="v"}
- {if $v.type neq 6}
- <span style="color:#000;">{$v.name}:{$v.valname}</span>
- {else/}
- <p>
- <span style="color:#000;">{$v.name}:</span>
- {volist name="v.valname" id="p"}
- <div class="imageRize">
- <img class="nowimgbox" src="{$p}" str="1" img="{$p}" width="100%"/>
- </div>
- {/volist}
- </p>
- {/if}
- {/volist}
- {/if}
-
- {if $vo.document_name neq '' && $vo.document_field neq ''}
- <div style="white-space: nowrap;" data-url="{$vo.document_field}" data-name="{$vo.document_name}">
- <span>文件地址:</span>
- <div style="display: flex;flex-wrap: wrap;">
- <span style="color: #999999;white-space: pre-wrap !important;">{$vo.document_name}
- </span>
- <span style="display: inline !important;cursor: pointer;" class="downloadElement" data-url="{$vo.document_field}" data-name="{$vo.document_name}">下载</span>
- </div>
- </div>
- {/if}
- </div>
- <div class="footimebox">
- <span>上次:{$vo.addtime}</span>
- <span style="margin-left: 10px;">下次:{$vo.next_contact_date}</span>
- {if $vo.isyes == 0}
- <span class="hfstate" title="已回访">Yes</span>
- {/if}
- {if $vo.isyes == 1}
- <span class="hfstate" title="还没有回访">No</span>
- {/if}
- </div>
- </td>
- </tr>
- {/volist}
- </tbody>
- </table>
- </div>
- <div class="linebox relative clearfix" style="text-align:right">
- {if $data.add_wechat_time}
- <div class="left" style="color: #009900;font-size: 18px;font-style: italic;">V</div>
- {/if}
- {if $data.state == '待确认' && $isadd_log == 1}
- <a class="invalidbox">线索无效注销</a>
- {else/}
- {if $data.employee && $data.state != '待确认'}
- <div class="right">该线索于{$data.valid_time|default=$data.addtime}由{$data.employee.name}确认为有效线索。</div>
- {/if}
- {/if}
- </div>
- <div class="kuaisubiaoji">
- <div>
- <!-- -->
- <div class="kb-input">
- <label for="add_wechat">加微时间</label>
- <input type="text" name="" id="add_wechat" autocomplete="off" onkeyup="value=value.replace(/[^0-9_]/g,'');" style="width:82%;padding-left:10px;height: 40px;" placeholder="选择时间" value="{$data.add_wechat_time}">
- </div>
- </div>
- <div class="kb-input" style="margin:18px 0;">
- <div class="kb-state" style="margin-left: 0 !important;"><label>
- <input type="checkbox" disabled name="state" {volist name='$data.allstate' id='vo'}{if condition="$vo eq '已量房'"}checked{/if}{/volist} class="state_select" data-state="liangfang" value="8">量房
- </label></div>
- <div class="kb-state"><label>
- <input type="checkbox" disabled {volist name='$data.allstate' id='vo'}{if condition="$vo eq '已到店'"}checked{/if}{/volist} name="state" class="state_select" data-state="daodian" value="7">到店
- </label></div>
- {if $xinjushang == 1}
- <div class="kb-state"><label>
- <input type="checkbox" disabled {volist name='$data.allstate' id='vo' }{if condition="$vo eq '已交定'" } checked
- {/if}{/volist} name="state" class="state_select" data-state="qiandan" value="2">交定
- </label></div>
- <div class="kb-state"><label>
- <input type="checkbox" disabled name="state" {volist name='$data.allstate' id='vo' }{if condition="$vo eq '已签单'"
- }checked{/if}{/volist} class="state_select" data-state="zhuandan" value="3">合同
- </label></div>
- {else/}
- <div class="kb-state"><label>
- <input type="checkbox" disabled {volist name='$data.allstate' id='vo' }{if condition="$vo eq '已签单'" } checked
- {/if}{/volist} name="state" class="state_select" data-state="qiandan" value="2">交定
- </label></div>
- <div class="kb-state"><label>
- <input type="checkbox" disabled name="state" {volist name='$data.allstate' id='vo' }{if condition="$vo eq '已转单'"
- }checked{/if}{/volist} class="state_select" data-state="zhuandan" value="3">合同
- </label></div>
- {/if}
- </div>
- <div>
- <div class="kb-input kb-item kb-liangfang">
- <label for="lf_date">量房时间</label><input type="text" name="confirm_date" id="lf_date" onkeyup="value=value.replace(/[^0-9_]/g,'');" style="width:82%;padding-left:10px;height: 40px;" placeholder="选择时间" autocomplete="off" {if $data.lf}value="{$data.lf}"{/if}>
- </div>
- <div class="kb-input kb-item kb-daodian">
- <label for="dd_date">到店时间</label><input type="text" name="confirm_date" id="dd_date" onkeyup="value=value.replace(/[^0-9_]/g,'');" style="width:82%;padding-left:10px;height: 40px;" placeholder="选择时间" autocomplete="off" {if $data.dd}value="{$data.dd}"{/if}>
- </div>
- {if $xinjushang == 1}
- <div class="kb-input kb-item kb-qiandan">
- <label for="qd_date">交定时间</label><input type="text" name="confirm_date" id="qd_date" onkeyup="value=value.replace(/[^0-9_]/g,'');" style="width:82%;padding-left:10px;height: 40px;" placeholder="选择时间" autocomplete="off" {if $data.deposit}value="{$data.deposit.confirm_date}"{/if}>
- </div>
- <div class="kb-input kb-item kb-qiandan">
- <label for="qd_money">交定金额</label><input type="number" onmousewheel="return false;" name="money" id="qd_money" onkeyup="value=value.replace(/[^0-9_]/g,'');" style="width:82%;padding-left:10px;height: 40px;" placeholder="输入交定金额" autocomplete="off" {if $data.deposit}value="{$data.deposit.money}"{/if}>
- </div>
- <div class="kb-input kb-item kb-zhuandan">
- <label for="zd_date">合同时间</label><input type="text" name="confirm_date" id="zd_date" onkeyup="value=value.replace(/[^0-9_]/g,'');" style="width:82%;padding-left:10px;height: 40px;" placeholder="选择时间" autocomplete="off" {if $data.sign}value="{$data.sign.confirm_date}"{/if}>
- </div>
- <div class="kb-input kb-item kb-zhuandan">
- <label for="zd_money">合同金额</label><input type="number" onmousewheel="return false;" name="money" id="zd_money" onkeyup="value=value.replace(/[^0-9_]/g,'');" style="width:82%;padding-left:10px;height: 40px;" placeholder="输入合同金额" autocomplete="off" {if $data.sign}value="{$data.sign.money}"{/if}>
- </div>
- {else/}
- <div class="kb-input kb-item kb-qiandan">
- <label for="qd_date">交定时间</label><input type="text" name="confirm_date" id="qd_date" onkeyup="value=value.replace(/[^0-9_]/g,'');" style="width:82%;padding-left:10px;height: 40px;" placeholder="选择时间" autocomplete="off" {if $data.deposit}value="{$data.deposit.confirm_date}"{/if}>
- </div>
- <div class="kb-input kb-item kb-qiandan">
- <label for="qd_money">交定金额</label><input type="number" onmousewheel="return false;" name="money" id="qd_money" onkeyup="value=value.replace(/[^0-9_]/g,'');" style="width:82%;padding-left:10px;height: 40px;" placeholder="输入交定金额" autocomplete="off" {if $data.deposit}value="{$data.deposit.money}"{/if}>
- </div>
- <div class="kb-input kb-item kb-zhuandan">
- <label for="zd_date">合同时间</label><input type="text" name="confirm_date" id="zd_date" onkeyup="value=value.replace(/[^0-9_]/g,'');" style="width:82%;padding-left:10px;height: 40px;" placeholder="选择时间" autocomplete="off" {if $data.sign}value="{$data.sign.confirm_date}"{/if}>
- </div>
- <div class="kb-input kb-item kb-zhuandan">
- <label for="zd_money">合同金额</label><input type="number" onmousewheel="return false;" name="money" id="zd_money" onkeyup="value=value.replace(/[^0-9_]/g,'');" style="width:82%;padding-left:10px;height: 40px;" placeholder="输入合同金额" autocomplete="off" {if $data.sign}value="{$data.sign.money}"{/if}>
- </div>
- {/if}
- </div>
- <div class="kb-save">
- <button id="kb-save" type="button">保存</button>
- </div>
- </div>
- <div class="customermsgbox">
-
- </div>
- </div>
- <div class="setinvalidbox" style="display:none;">
- <div class="clearfix invalidtit">
- <div class="left" style="color: #FF0000;">无效线索注销:</div>
- <button class="right closebtn" type="button">返回</button>
- </div>
- <table class="maintable invalidtable">
- <tbody>
- <tr>
- <td>无效理由:<select name="hid" id="hid" style="height:26px;">
- <option value="">------------</option>
- <option value="同行">同行</option>
- <option value="空错号">空错号</option>
- <option value="不是本人">不是本人</option>
- <option value="局部装修">局部装修</option>
- <option value="超服务区域">超服务区域</option>
- <option value="与内部撞单">与内部撞单</option>
- <option value="多次联系不上">多次联系不上</option>
- <option value="装修预算太低">装修预算太低</option>
- <option value="没有装修需求">没有装修需求</option>
- <option value="精装修">精装修</option>
- </select><span title="必填信息" class="red2">*</span>
- </tr>
- <tr>
- <td>
- 注销操作: {$empname}
- </td>
- </tr>
- <tr><td class="invalidtime">注销时间:</td></tr>
- <tr>
- <td align="center" style="padding-left:160px;">
- <button class="submitbtn" type="button" style="display: inline-block;">确认并提交</button>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="layMask layui-hide">
- <div class="showImage">
- <img id="imageElement" src="" width="100%" style="margin-bottom: 60px;" alt="">
- </div>
- </div>
- </body>
- <script src="__LAYUI__/layui/layui.js"></script>
- <script src="__STATIC__/layui/layui/lay/modules/xm-select.js" type="text/javascript" charset="utf-8"></script>
- <!-- <script type="text/javascript" src="__STATIC__/js/plupload/js/plupload.full.min.js"></script>
- <script type="text/javascript" src="__STATIC__/js/plupload/ossupload.js"></script> -->
- <script src="https://gosspublic.alicdn.com/aliyun-oss-sdk-6.3.1.min.js" async></script>
- {/block}{block name="js"}
- <script type="text/javascript">
- var assigned_personnel = '{$data.assigned_personnel}';
- var ismanager = '{$is_manager}';
- var data = {assigned_personnel:assigned_personnel};
- //var isselect = assigned_personnel=='' || ismanager == 1 ? false : true;
- var isselect = false;
- layui.config({
- base: '__LAYUI__/',
- urlbase: '/sys'
- }).extend({
- index: 'lib/index' //主入口模块
- }).use(['table','laydate','upload','element'], function () {
- var table = layui.table,
- laydate = layui.laydate,
- upload = layui.upload,
- element = layui.element,
- files,
- $ = layui.$;
- laydate.render({
- elem: '#add_wechat'
- ,trigger: 'click'
- });
- laydate.render({
- elem: '#lf_date'
- ,trigger: 'click'
- });
- laydate.render({
- elem: '#dd_date'
- ,trigger: 'click'
- });
-
- laydate.render({
- elem: '#qd_date'
- ,trigger: 'click'
- });
- laydate.render({
- elem: '#zd_date'
- ,trigger: 'click'
- });
-
- var dataForm = {
- document_field: "",
- document_name: ""
- };
- var imgurls=[];
- //多图片上传
- upload.render({
- elem: '#upload-drag',
- accept: 'images',
- url: '/upload/',
- exts: 'jpg|png|bmp|jpeg|JPG|PNG|BMP|JPEG',
- field: 'img',
- size: 5 * 1024,
- auto: false,
- multiple: true,
- choose: function(obj) {
- files = obj.pushFile();
- length = $('.imageDiv').length;
- obj.preview(function(index, file, result) {
- length++;
- if(length > 12) {
- if(length == 13) layer.msg('限制12张图片以下');
- delete files[index];
- } else {
- ossuploadimg(file).then(f => {
- files[index]['imglink'] = f;
- imgurls.push(f);
- $('.picDiv').prepend('<div class="imageDiv" data-id="' + index + '"><img src="' + result + '" alt="' + file.name + '" class="layui-upload-img" width="100%" height="100%"><div class="delfada"><i class="layui-icon layui-icon-delete" prop="del"></i> <i class="layui-icon layui-icon-search" prop="view" data-image="'+result+'" style="margin-left:25px;"></i></div></div>');
- })
- }
- });
- }
- });
- $("#refbuttonele").click(function() {
- $("#refilele").click();
- })
- $("#refilele").change(function() {
- let file = $(this).prop("files")[0];
- let loadingIndex = layer.load('Loading...', {
- shade: [0.6,'#000'] //0.1透明度的白色背景
- });
- ossuploadimg(file, true).then(f => {
- $("#fileElename").text(file.name);
- dataForm.document_field = f;
- dataForm.document_name = file.name;
- layer.close(loadingIndex);
- })
- })
- $(".downloadElement").click(function() {
- let props = $(this).prop('dataset');
- downloadClick({fileurl: props.url, filename: props.name});
- })
- function downloadClick(item) {
- let downloadUrl = item.fileurl;
- let filename = item.filename;
- let xhr = new XMLHttpRequest();
- xhr.open('GET', downloadUrl, true);
- xhr.responseType = 'blob';
- xhr.onload = function () {
- if (xhr.status === 200) {
- let blob = xhr.response;
- let downloadUrl = URL.createObjectURL(blob);
- let a = document.createElement('a');
- a.href = downloadUrl;
- a.download = filename;
- document.body.appendChild(a);
- a.click();
- document.body.removeChild(a);
- URL.revokeObjectURL(downloadUrl);
- }
- };
- xhr.send();
- }
-
- function ossuploadimg(file) {
- return new Promise((resolve,reject) => {
- let file_name = file.name;
- let suffix = file_name.slice(file_name.lastIndexOf('.'), file_name.length);
- var client = new OSS({
- region: "oss-cn-hangzhou",
- accessKeyId: "LTAI5tHjWupJSCAycy2yVbQZ",
- accessKeySecret: "eNFicm77Cfq3u7ZnQyw1urFmFNpf3w",
- bucket: "zyzswzh",
- secure: true
- });
- var date = new Date().getTime();
- var year = new Date(date).getFullYear();
- var month = new Date(date).getMonth()+1;
- var ridate = new Date(date).getDate();
- var objectName = 'crm/' + year+''+month+''+ridate + "/" + Date.now() + suffix;
- client.put(objectName, file).then(function (result) {
- resolve(result.name);
- }).catch(function (error) {
- reject(error)
- });
- })
- }
-
- $('.picDiv').on('click', 'i', function(e) {
- var that = this;
- if (e.target.attributes[1].nodeValue === 'view') {
- layer.photos({ photos: {"data": [{"src": e.target.attributes[2].nodeValue}]} ,closeBtn:true});
- } else {
- layer.confirm('确定删除该图片么?',{title:['信息', 'color:#333333;background-color:#D8E6F1;'],}, function(index) {
- var imgDiv = $(that).closest('.imageDiv');
- if(id = imgDiv.data('id')) {
- delete files[id];
- }
- imgDiv.remove();
- layer.close(index);
- });
- }
- });
-
-
- for(let i=0;i< $('.remarkbox').length;i++){
- $($('.remarkbox')[i]).html($($('.remarkbox')[i]).data('html'));
- }
- for(let j=0;j<$('.playaduio').length;j++){
- $('.playaduio')[j].index=j;
- $($('.playaduio')[j]).click(function() {
- let index=this.index;
- for (let j = 0; j < $('.playaduio').length; j++) {
- let aid1 = $($('.playaduio')[j]).data('audio');
- $('#'+aid1)[0].pause();
- $($('.playaduio')[j]).show();
- $($('.pausebtn')[j]).hide();
- }
- $($('.playaduio')[index]).hide();
- $($('.pausebtn')[index]).show();
- let aid = $($('.playaduio')[index]).data('audio');
- $('#' + aid)[0].play();
- })
- $('.pausebtn')[j].index = j;
- $('.pausebtn').click(function() {
- let index = this.index;
- let aid = $($('.pausebtn')[index]).data('audio');
- $('#' + aid)[0].pause();
- $($('.playaduio')[index]).show();
- $($('.pausebtn')[index]).hide();
- })
- }
- laydate.render({
- elem: '#nextime', //指定元素
- min:0
- ,trigger:'click'
- });
- $("input[type='radio'][name='level']").click(function(){
- var val=$('input:radio[name="level"]:checked').val();
- console.log(val);
- $.ajax({
- url: '{:url("community/fast_up_portrait")}'
- , data: {
- cid: hobj.cid,// (客户id)
- type: 'level',//
- value: val,//回访类型1电话2微信3短信4见面
- }
- , type: 'post'
- , success: function (res) {
- if (res.code == 0) {
- alert('恭喜,标记成功');
- location.reload();
- }else if(res.code==403){
- $(".exitbtn").trigger("click");
- } else {
- //this_.removeClass(DISABLED);
- //this_.removeAttr('disabled');
- alert(res.msg)
- }
- },
- error : function(e){
- //this_.removeClass(DISABLED);
- //this_.removeAttr('disabled');
- }
- });
- });
- $("input[type='checkbox'][name='dataType']").click(function(){
- // let arr = [];
- // $('input:checkbox[name="dataType"]:checked').each(function() {
- // arr.push($(this).val());
- // })
- let val = $(this).val();
- console.log($(this).val());
- //return false;
- //debugger
- $.ajax({
- url: '{:url("community/fast_up_portrait")}'
- , data: {
- cid: hobj.cid,// (客户id)
- type: 'field',//
- value: val,//回访类型1电话2微信3短信4见面
- }
- , type: 'post'
- , success: function (res) {
- if (res.code == 0) {
- alert('恭喜,标记成功');
- location.reload();
- }else if(res.code==403){
- $(".exitbtn").trigger("click");
- } else {
- alert(res.msg)
- }
- },
- error : function(e){
-
- }
- });
- });
-
- let phone="{$data.phone}";
-
- if(phone){
- let parr= phone.split('');
- $('#showphone').html(parr[0]+''+ parr[1]+'*****'+ parr[parr.length-4] + parr[parr.length-3]+ parr[parr.length - 2]+ parr[parr.length - 1]);
- }
- $('#showphone').dblclick(function () {
- $('#showphone').html(phone);
- })
- $(".stateElement").click(function(e) {
- let state = $('input:radio[name="state"]:checked').val();
- if (state == "无效") {
- $('.mustbox').hide();
- } else {
- $('.mustbox').show();
- }
- })
- let isNextDateVal = "{$nextVisitTimeIsOk}";
- if (isNextDateVal == 0) {
- $(".mustbox").hide();
- }
- var isloading = false;
- let hobj = GetRequest();
- $(".savebtn").click(function(){
- var imglisturls = imgurls.toString();
- let isNextDate = "{$nextVisitTimeIsOk}";
- let nextVisitTimeVal = $("#nextime").val();
-
- var this_ = $(this);
- let state = $('input:radio[name="state"]:checked').val();
- if ($('.addrecordbox').val() == "" && state != "无效") { alert("提示:请输入回访线索的情况!"); $('.addrecordbox').focus(); return false; }
- if ($('input:radio[name="rway"]:checked').val() == null && state != "无效") { alert("提示:客户回访方式选一下!");return false; }
- if ($('input:radio[name="state"]:checked').val() == null && state != "无效") { alert("提示:客户线索状态选一下!");return false; }
- if (!nextVisitTimeVal && isNextDate == 1 && state != "无效") {
- alert("提示:请选择下次回访时间!");
- $('#nextime').focus();
- return false;
- }
- if (isloading) {
- layer.msg('正在提交...');
- return false;
- }
- isloading = true;
- let hobj = GetRequest();
- let house_status = $('input:radio[name="house_status"]:checked').val();
- layer.load();
- var DISABLED = 'layui-btn-disabled';
- var target = '#building-submit';
- $(this).addClass(DISABLED);
- $(this).attr('disabled', 'disabled');
- $.ajax({
- url: '{:url("community/addVisitlog")}'
- , data: {
- customer_id: hobj.cid,// (客户id)
- state: state,//
- house_status: house_status,
- remark: $('.addrecordbox').val(),
- type: $('input:radio[name="rway"]:checked').val(),//回访类型1电话2微信3短信4见面
- next_contact_date: $('#nextime').val(),
- img1:imglisturls,
- ...dataForm
- }
- , type: 'post'
- , success: function (res) {
- isloading = false;
- if (res.code == 0) {
- layer.closeAll('loading');
- setTimeout(function(){
- alert('恭喜,回访信息录入成功,记得下一次要及时回访哟!');
- },100)
- if (state == "无效") {
- window.parent.removealog();
- // window.parent.reload();
- } else {
- location.reload();
- // window.location.reload();
- }
- }else if(res.code==403){
- $(".exitbtn").trigger("click");
- } else {
- this_.removeClass(DISABLED);
- this_.removeAttr('disabled');
- alert(res.msg)
- }
- },
- error : function(e){
- isloading = false;
- this_.removeClass(DISABLED);
- this_.removeAttr('disabled');
- }
- });
- })
- $('#assign').on('click', function () {
- if(!$('#range_person').attr('title')){
- alert('请先指派人员!');
- return false;
- }
- if (confirm('确认指派人员?')){
- let hobj = GetRequest();
- var dd = $('#range_person').attr('title');
- var assign_type = $("input[name='assign_type']:checked").val();
- var old_assign_type = "{$data.assign_type}";
- var need_assign_type = "{:empty($assign_list) ? '' : 1}"
- //alert(old_assign_type);
- //alert(assign_type);
- //return false;
- if(old_assign_type == '' && need_assign_type){
- if(assign_type == '' || assign_type == 'undefined' || assign_type == null){
- alert('请选择指派类型');
- return false;
- }
- }
-
- //return false;
- $.ajax({
- url: '{:url("community/reserveDesigner")}'
- , data: {
- id: hobj.cid,// (客户id)
- designerId:dd,
- assign_type:assign_type
- }
- , type: 'post'
- , success: function (res) {
- if (res.code == 0) {
- alert(res.msg)
- location.reload();
- // window.parent.reload();
- }else if(res.code==403){
- $(".exitbtn").trigger("click");
- } else {
- alert(res.msg)
- }
- }
- });
-
- }else{
- $('#addvxflag')[0].checked = false;
- }
- })
- $('#addvxflag').on('click', function () {
- if (confirm('确认已添加客户微信?')){
- let hobj = GetRequest();
- $.ajax({
- url: '{:url("community/add_wetch")}'
- , data: {
- id: hobj.cid,// (客户id)
- }
- , type: 'post'
- , success: function (res) {
- if (res.code == 0) {
- $('#addvxflag')[0].checked = true;
- $('#addvxflag')[0].disabled = true;
- location.reload();
- // window.parent.reload();
- }else if(res.code==403){
- $(".exitbtn").trigger("click");
- } else {
- alert(res.msg)
- }
- }
- });
-
- }else{
- $('#addvxflag')[0].checked = false;
- }
- })
- $('.invalidbox').on('click', function () {
- let date = new Date();
- let year = date.getFullYear();
- let month = date.getMonth() * 1 + 1;
- let day = date.getDate();
- let hour = date.getHours();
- let min = date.getMinutes();
- let sed = date.getSeconds();
- let time = year + '/' + month + '/' + day + ' ' + hour + ':' + min + ':' + sed;
- $('.invalidtime').html('注销时间:' + time);
- $('.addlogbox').hide();
- $('.setinvalidbox').show();
- })
- $('.closebtn').click(function(){
- $('.addlogbox').show();
- $('.setinvalidbox').hide();
- })
- $("#callCustomer").click(function(e) {
- $(".chooseMobile").toggleClass("layui-hide");
- e.stopPropagation();
- })
- $(".chooseMobile div").click(function(e) {
- let phone = $(this).text();
- let c = GetRequest();
- $(".chooseMobile").addClass("layui-hide");
- $.post('{:url("empcrm/bind")}', {phone, 'cid':c.cid},function(res){
- if(res.code == 1) {
- layer.msg(res.msg, {anim: 6});
- return false;
- }
- layer.msg('正在呼叫'+phone+',请注意接听', {anim: 5})
- });
- e.stopPropagation();
- })
- $(document).click(function() {
- let cls = $(".chooseMobile").prop("class");
- if (cls.indexOf("layui-hide") < 0) {
- $(".chooseMobile").addClass("layui-hide");
- }
- })
- $('.submitbtn').click(function () {
- if ($('#hid').val() == "") { alert("亲,线索注销的理由请选择!"); $('#hid').focus(); return false; }
- let hobj = GetRequest();
- $.ajax({
- url: '{:url("community/addVisitlog")}'
- , data: {
- customer_id: hobj.cid,// (客户id)
- state: '无效',//
- remark: $('#hid').val(),
- }
- , type: 'post'
- , success: function (res) {
- if (res.code == 0) {
- alert('线索注销成功!');
- window.parent.removealog();
- // window.parent.reload();
- }else if(res.code==403){
- $(".exitbtn").trigger("click");
- }else {
- alert(res.msg)
- }
- }
- });
- })
- $('.closediv').click(function(){
- window.parent.removealog();
- // window.parent.reload();
- window.parent.resizefun2();
- })
- let hobj1 = GetRequest();
- var cid = hobj1.cid;//客户id
- $.ajax({
- url: '{:url("community/get_all_portrait_field")}'
- , data: {
- id:cid
- }
- , type: 'post'
- , success: function (res) {
- if (res.code == 0) {
- let str="",selectstr='',designer=[];
- let timearr=[];
- for(let i in res.data){
- str+='<div class="everycrmsgbox"><div class="crmtitbox">'+ res.data[i].name +'</div><div class="clearfix othercrmsgbox">';
- for(let j in res.data[i].child){
- if(res.data[i].child[j].type==1||res.data[i].child[j].type==2||res.data[i].child[j].type==5){
- if(res.data[i].child[j].keyname!='phone'){
- str+='<div class="left mwidth50_">'+res.data[i].child[j].name+': '+res.data[i].child[j].value+'</div>';
- }
- } else if (res.data[i].child[j].type == 6) {
- let imgstr = '';
- for (let k in res.data[i].child[j].value) {
- imgstr += '<img class="nowimgbox" width="25px" height="25px" style="display:inline-block;margin-right:8px;" src="' + res.data[i].child[j].value[k].oss_url + '" img="' + res.data[i].child[j].value[k].url + '" alt="">';
- }
- str += '<div class="left mwidth50_">' + res.data[i].child[j].name + ': ' + imgstr +'</div>';
- } else{
- if(res.data[i].child[j].keyname!='name'&&res.data[i].child[j].keyname!='phone'){
- str+='<div class="left mwidth50_">'+res.data[i].child[j].name+': '+res.data[i].child[j].valname+'</div>';
- }
- }
- }
- str+='</div></div>';
- }
- $('.customermsgbox').html(str);
- if($('.nowimgbox').length>0){
- for (let i=0;i< $('.nowimgbox').length;i++) {
- $($('.nowimgbox')[i]).click(function () {
- if ($(this).attr('str')) {
- // layer.photos({
- // photos: { "data": [{ "src": $(this).attr('img'), }] },
- // shade: 0.2
- // });
- $(".layMask").removeClass("layui-hide");
- $("#imageElement").prop("src", $(this).attr('img'));
- } else {
- // layer.photos({
- // photos: { "data": [{ "src": 'https://o.nczyzs.com/' + $(this).attr('img'), }] },
- // shade: 0.2
- // });
- $(".layMask").removeClass("layui-hide");
- $("#imageElement").prop("src", 'https://o.nczyzs.com/' + $(this).attr('img'));
- }
- })
- }
- }
-
- }else if(res.code==403){
- $(".exitbtn").trigger("click");
- } else {
- alert(res.msg)
- }
- }
- });
- $(".layMask").click(function() {
- $(this).addClass("layui-hide");
- })
-
- // $('.kb-state').on('click', 'input', function(event){
- // let type = $(this).data('state');
- // let this_state = $(this).closest('.kb-state');
- // if ($(this).prop('checked')) {
- // this_state.addClass('background-green');
- // this_state.siblings().removeClass('background-green');
- // $('.kb-item').hide();
- // $('.kb-'+type).show();
- // this_state.siblings().find('input').prop('checked', false);
- // } else {
- // this_state.removeClass('background-green');
- // $('.kb-item').hide();
- // }
- // });
- $('.kb-state').on('click',function(){
- let type = $(this).find('input').data('state');
- $(this).addClass('background-green');
- $(this).siblings().removeClass('background-green');
- $('.kb-item').hide();
- $('.kb-'+type).show();
- })
- $('.kb-save').on('click', function(){
- let s = $('.background-green').find('input');
- let add_wechat_date = $('#add_wechat').val();
- if(s.length == 0 && add_wechat_date == '') layer.msg('请先填写信息',{anim:6});
- let data = {customer_id:cid};
- if (s.length != 0) {
- let state = s.data('state');
- let stateval = s.val();
- let input = $('.kb-'+state).find('input');
- let error = false;
- input.each((i) => {
- if(error) return;
- let name = $(input[i]).attr('name');
- let val = $(input[i]).val();
- let txt = $(input[i]).prev('label').html();
- if(val == '') {
- layer.msg('请填写'+txt, {anim:6});
- error=true;
- return ;
- }
- data[name]=val;
- });
- data['state'] = stateval;
- if(error) return;
- }
- $('#kb-save').attr('disabled',true);
- $('#kb-save').css('background','#aad590')
- if(add_wechat_date != '') data['add_wechat_time'] = add_wechat_date;
- if(data['state'] == 3){
- {if !empty($data.sign)}
- data['vlogid'] = {$data.sign.id};
- {/if}
- }
- $.post("{:url('community/kb')}", data, function(rs){
- if (rs.code === 0) {
- layer.msg(rs.msg, {anim:5})
- setTimeout(()=>{
- window.location.reload();
- },1500)
- }else {
- layer.msg(rs.msg, {anim:6});
- }
- })
- });
-
- })
- function GetRequest() {
- var url = location.search; //获取url中"?"符后的字串
- var theRequest = new Object();
- if (url.indexOf("?") != -1) {
- var str = url.substr(1);
- strs = str.split("&");
- for (var i = 0; i < strs.length; i++) {
- theRequest[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
- }
- }
- return theRequest;
- }
- function OncheckBox(e) {
- if (e.checked == true) {
- let hobj = GetRequest();
- $.ajax({
- url: '{:url("community/save_introduce")}'
- , data: {
- cid: hobj.cid,
- }
- , type: 'post'
- , success: function (res) {
- if (res.code == 0) {
- alert('成功提示:你的操作已完成!!!');
- $('.newcrmdiv').attr('disabled', true);
- location.reload();
- // window.parent.reload();
- }else if(res.code==403){
- $(".exitbtn").trigger("click");
- } else {
- alert(res.msg)
- }
- }
- });
- } else {
- $('.newcrmdiv').attr('checked',false);
- }
- }
- //考试范围选择人员
- var approve_ids = xmSelect.render({
- el: "#range_person",
- autoRow: true,
- filterable: true,
- tips: '指派人员',
- disabled: isselect,
- layVerify:'required',
- toolbar: {
- show: false,
- },
- tree: {
- show: true,
- showFolderIcon: true,
- showLine: true,
- indent: 20,
- expandedKeys: [ -3 ],
- },
- height: "200px",
- data: [],
- on: function(data){
- var arr = data.arr;
- let valarr=[];
- for(let j in arr){
- valarr.push(arr[j].value);
- }
- $('#range_person').attr('title',valarr.join(','))
- }
- });
- $(function(){
- selectperson(data.assigned_personnel);
- });
- function selectperson(ids){
- setTimeout(function(){
- //data是ajax异步获取的
- $.ajax({
- type:"get",
- url:"{:url('get_person')}",
- data:{type:1,id:ids},
- dataType: 'json',
- success:function(data) {
- // var data = JSON.parse(data);
- // var res = JSON.parse(data);
- //通过ajax 获取json数据,异步更新多选下拉框的值
- if(data.code==403){
- $(".exitbtn").trigger("click");
- }
- approve_ids.update({data:data})
- $('#range_person').attr('title',approve_ids.getValue('value').join(','))
- }
- });
- },100);
- }
- </script>
- {/block}
|