1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147 |
- <!DOCTYPE HTML>
- <html>
- <head>
- <#--new style begin-->
- <meta charset="utf-8">
- <meta name="renderer" content="webkit|ie-comp|ie-stand">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <meta http-equiv="Cache-Control" content="no-siteapp" />
- <#include "/base/add_base.ftl">
- <link href="${path}/common/lib/jquery.ui/jquery-ui.css" rel="stylesheet" type="text/css"/>
- <link href="${path}/common/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css"/>
- <link href="${path}/common/lib/icheck/icheck.css" rel="stylesheet" type="text/css"/>
- <style>
- .tit{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
- .tit:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
- .tit-2{position: relative;text-align: left;font-size: 16px;padding-left: 10px;}
- .tit-2:after{content: '';position: absolute;left: 0;top: 20%;height: 60%;width: 3px;background-color: #32a3d8;}
- #province select{margin-right:10px; width:100px;height: 31px;-webkit-appearance:none !important;appearance:none;background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;padding-left:3px;padding-right: 25px;}
- .my-btn-search{border: 1px solid #32a3d8;padding: 1px 25px;height: 32px;background-color: #32a3d8;color: #fff;}
- #suggest, #suggest2 {width:200px}
- .gray {color:gray}
- .ac_results {background:#fff;border:1px solid #7f9db9;position: absolute;z-index: 10000;display: none}
- .ac_results li a {white-space: nowrap;text-decoration:none;display:block;color:#05a;padding:1px 3px}
- .ac_results li {border:1px solid #fff}
- .ac_over, .ac_results li a:hover {background:#c8e3fc}
- .ac_results li a span {float:right}
- .ac_result_tip {border-bottom:1px dashed #666;padding:3px}
- .select-box{background: url(${path}/common/images/cm/select-1.png) right center no-repeat;background-size: auto 100%;}
- .select-box select{-webkit-appearance:none !important;background-color: transparent; appearance:none;padding-right: 25px;}
- .dalog-ask{position: absolute;left:60%;top:0;-webkit-transform: translateY(-30%);transform: translateY(-30%);display: none;background-color: #fff;z-index: 10;}
- .tag{ width:300px; min-height:300px; border:1px solid #32a3d8; position:relative;background-color: #fff;line-height: 1.5;padding: 10px 12px;}
- .tag em{display:block; border-width:15px; position:absolute; top:30%; left:-30px;border-style:solid dashed dashed; border-color:transparent #32a3d8 transparent transparent;font-size:0; line-height:0;}
- .dalog-ask .ask{color: #000;margin: 10px 0 5px 0;}
- .dalog-ask .answer{color: #666;margin-bottom: 10px;}
- .dalog-ask .answer:hover{color: #32a3d8;cursor: pointer;}
- .time-line-list{list-style: none;width: 100%;margin-left: -20px;}
- .time-line-list>li{position: relative;float: left; text-align: center;width: 100px;overflow: hidden;white-space: nowrap;word-break: break-all;padding: 2px 0;}
- .time-line-list .number{display: inline-block; padding: 2px; background: #32a3d8;border: 2px solid #fff;box-shadow:0 0 0 1px #32a3d8;width: 20px;height: 20px;color: #fff;line-height: 20px;border-radius: 50%;}
- .time-line-list .red{display: inline-block; padding: 2px; background: red;border: 2px solid #fff;box-shadow:0 0 0 1px #32a3d8;width: 20px;height: 20px;color: #fff;line-height: 20px;border-radius: 50%;}
- .time-line-list>li:before{content:'';position: absolute;height: 1px;width: 30%;right:0;top: 15px; background-color: #32a3d8;}
- .time-line-list>li:after{content: '';position: absolute;height: 1px;width: 30%;left: 0;top: 15px;background:#32a3d8;}
- .time-line-list>li:first-child:after,.time-line-list>li:last-child:before{display: none;}
- .time-line-list .arrow{border-width:7px; position:absolute; left:25%; top:9px;border-style:solid dashed dashed; border-color:transparent transparent transparent #32a3d8;font-size:0; line-height:0;}
- .time-line-list>li:first-child .arrow{display: none;}
- .table-bg th{background-color: #e2f6ff;}
- .update-parts>span{margin-right: 10px;padding: 3px 4px;background-color: #effaff;border: 1px solid #32a3d8;}
- .my-search-input{padding-left: 30px;background: url(${path}/common/images/cm/search.png) 6px center no-repeat;background-size: auto 60%; }
- .txt-red{color:red}
- </style>
- <title>修改客户信息</title>
- </head>
- <body>
- <nav class="breadcrumb"><i class="Hui-iconfont"></i> 首页
- <span class="c-gray en">></span> 客户信息管理
- <span class="c-gray en">></span> 修改客户信息
- <a class="btn radius r" style="line-height:1.6em;margin-top:3px;background: #32a3d8;color: #fff;border:1px solid #32a3d8;" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont"></i></a>
- </nav>
- <div class="pd-20 cl">
- <form action="${path}/admin/customerBasic/updateCustomerInfo" method="post">
- <#--<form action="${path}/admin/customerBasic/save_customer_info" method="post" class="form form-horizontal" id="form-customerInfoAdmin-add" onkeydown="if(event.keyCode==13)return false;">-->
- <input type="hidden" id="saveCustomerInfo" name="saveCustomerInfo" value="">
- <input type="hidden" id="customerId" name="customerId" value="${customerBasicInfo.customerId!''}">
- <input type="hidden" id="billingId" name="billingId" value="<#if billingInfo??>${billingInfo.billingId!''}</#if>">
- <input type="hidden" id="ticketOpeningId" name="ticketOpeningId" value="<#if billingInfo??>${ticketOpeningInfo.ticketOpeningId!''}</#if>">
- <#--客户基本信息 start-->
- <div class="row cl">
- <label class="form-label col-2">
- <div class="tit-2">客户基本信息</div>
- </label>
- <div class="formControls col-9">
- </div>
- </div>
- <div class="row cl" style="margin-bottom: 10px;">
- <label class="form-label col-2 col-sm-2" style="width: 110px;"><span class="c-red">*</span>客户类型:</label>
- <div class="formControls col-4 col-sm-4">
- <span class="select-box">
- <select name="customerType" class="select">
- <option value="1" <#if customerBasicInfo.customerType == 1>selected</#if>>个人</option>
- <option value="2"<#if customerBasicInfo.customerType == 2>selected</#if>>公司</option>
- </select>
- </span>
- </div>
- <label class="form-label col-2 col-sm-2" style="width: 110px;"><span class="c-red">*</span>合作进度:</label>
- <div class="formControls col-4 col-sm-4">
- <span class="select-box">
- <select name="cooperativeState" class="select">
- <option value="1"<#if customerBasicInfo.cooperativeState == 1>selected</#if>>意向合作</option>
- <option value="2"<#if customerBasicInfo.cooperativeState == 2>selected</#if>>已经合作</option>
- <option value="3"<#if customerBasicInfo.cooperativeState == 3>selected</#if>>停止合作</option>
- </select>
- </span>
- </div>
- </div>
- <div class="row cl" style="margin-bottom: 10px;">
- <label class="form-label col-2 col-sm-2" style="width: 110px;"><span class="c-red">*</span>客户名称:</label>
- <div class="formControls col-4 col-sm-4">
- <input type="text" class="input-text trim_input" placeholder="公司/客户 全称" id="customerName" name="customerName" value="${customerBasicInfo.customerName!''}">
- </div>
- <label class="form-label col-2 col-sm-2" style="width: 110px;">客户行业:</label>
- <div class="formControls col-4 col-sm-4">
- <input type="text" class="input-text trim_input" placeholder="请输入行业名称" id="customerIndustry" name="customerIndustry" value="${customerBasicInfo.customerIndustry!''}">
- </div>
- </div>
- <div class="row cl" style="position: relative;margin-bottom: 10px;">
- <label class="form-label col-2 col-sm-2" style="width: 110px;"><span class="c-red">*</span>客户地址:</label>
- <div class="formControls col-4 col-sm-4">
- <span class="select-box">
- <select name="customerProvinceCode" id="customerProvinceCode" class="select">
- <option value="">请选择省份</option>
- </select>
- </span>
- </div>
- <div class="formControls col-4 col-sm-4">
- <span class="select-box">
- <select name="customerCityCode" id="customerCityCode" class="select">
- <option value="">请选择城市</option>
- </select>
- </span>
- </div>
- </div>
- <div class="row cl" style="margin-bottom: 10px;">
- <label class="form-label col-2 col-sm-2" style="width: 110px;"></label>
- <div class="formControls col-9 col-sm-9">
- <input type="text" class="input-text trim_input" placeholder="请输入客户的详细地址" id="customerAddress" name="customerAddress" value="${customerBasicInfo.customerAddress!''}">
- </div>
- </div>
- <#--客户基本信息 end-->
- <#--对接联系人信息-->
- <div class="row cl">
- <label class="form-label col-3">
- <div class="tit-2">对接联系人信息<span style="font-family:'Arial Normal', 'Arial';font-weight:400;font-size:14px;">(请确保真实性,公司将不定期抽验回访)</span></div>
- </label>
- <div class="formControls col-9">
- </div>
- </div>
- <div class="row cl">
- <div class="formControls col-9">
- <span class="c-red">*</span>姓名:<input type="text" class="input-text" style="width:100px;margin-right: 10px; margin-bottom: 10px;" placeholder="联系人姓名" id="contactName" name="contactName">
- <span class="c-red">*</span>电话:<input type="text" class="input-text" style="width:100px;margin-right: 10px;margin-bottom: 10px;" placeholder="联系人电话" id="contactPhone" name="contactPhone">
- <span class="c-red">*</span>职位/身份:<input type="text" class="input-text" style="width:100px;margin-right: 10px;margin-bottom: 10px;" placeholder="职位或身份" id="contactType" name="contactType">
- <span class="c-red">*</span>联系邮箱:<input type="text" class="input-text" style="width:100px;margin-right: 10px;margin-bottom: 10px;" placeholder="邮箱" id="contactEmail" name="contactEmail">
- <span class="c-red"><button type="button" style="cursor:pointer; float: right;height: 35px;margin-right: 30px;margin-bottom: 10px;" class="my-btn-search" onclick="toAddDockedContactInfo();">保存</button></span>
- </div>
- <div class="mt-20" style="margin: 20px;">
- <input type="hidden" id="dockedContactInfoJson" name="dockedContactInfoJson">
- <table class="table table-border table-bordered table-bg table-hover table-sort" id="contactTable">
- <thead>
- <tr class="text-c">
- <th width="100">联系人姓名</th>
- <th width="100">联系电话</th>
- <th width="100">职位/身份</th>
- <th width="100">联系邮箱</th>
- <th width="100">操作</th>
- </tr>
- </thead>
- <tbody id="contactListId">
- <#if listDockedContactInfo?? && (listDockedContactInfo?size > 0) >
- <tr><td colspan="5" id="contactTbodyId" class="td-manage text-c" style="display: none;" >暂时没有联系人信息,请添加!</td></tr>
- <#list listDockedContactInfo as list>
- <tr>
- <td>${list.contactName!''}</td>
- <td>${list.contactPhone!''}</td>
- <td>${list.contactType!''}</td>
- <td>${list.contactEmail!''}</td>
- <td><a href='javascript:;' onclick='deleteContact(this)'>删除</a></td>
- </tr>
- </#list>
- <#else>
- <tr><td colspan="5" id="contactTbodyId" class="td-manage text-c" >暂时没有联系人信息,请添加!</td></tr>
- </#if>
- </tbody>
- </table>
- </div>
- </div>
- <#--客户销售渠道信息备案-->
- <div class="row cl">
- <label class="form-label col-3">
- <div class="tit-2">客户销售渠道信息备案</div>
- </label>
- <div class="formControls col-9">
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-2 col-sm-2" style="width:120px;"><span class="c-red">*</span>渠道类别:</label>
- <div class="formControls col-2 col-sm-2" style="width:120px;padding:0px 0px;margin-right: 15px;">
- <span class="select-box">
- <select name="channelCategory" id="channelCategory" class="select">
- </select>
- </span>
- </div>
- <label class="form-label col-2 col-sm-2" style="width:120px;"><span class="c-red">*</span>渠道类型:</label>
- <div class="formControls col-2 col-sm-2" style="width:120px;padding:0px 0px;margin-right: 15px;">
- <span class="select-box">
- <select name="channelType" id="channelType" class="select">
- </select>
- </span>
- </div>
- <label class="form-label col-2 col-sm-2" style="width:120px;"><span class="c-red">*</span>渠道名称:</label>
- <div class="formControls col-2 col-sm-2" style="width:120px;padding:0px 0px;margin-right: 15px;">
- <input type="text" class="input-text" style="width:90px;margin-right: 0px;margin-bottom: 10px;" placeholder="填写具体店名" id="channelName" name="channelName">
- </div>
- <label class="form-label col-2 col-sm-2" style="width:120px;"><span class="c-red">*</span>销售产品:</label>
- <div class="formControls col-2 col-sm-2" style="width:180px;padding:0px 0px;margin-right: 15px;">
- <span class="select-box">
- <select name="promotingProducts" id="promotingProducts" class="select">
- </select>
- </span>
- </div>
- </div>
- <div class="row cl">
- <label class="form-label col-2 col-sm-2" style="width:120px;"><span class="c-red">*</span>供货价格:</label>
- <div class="formControls col-2 col-sm-2" style="width:120px;padding:0 0;margin-right: 15px;">
- <span class="select-box">
- <select name="supplyPrice" id="supplyPrice" class="select">
- </select>
- </span>
- <input type="text" class="input-text" style="width:90px;margin-right: 0px;margin-bottom: 10px;" placeholder="填写供货价格" id="writeSupplyPrice" name="writeSupplyPrice">
- </div>
- <label class="form-label col-2 col-sm-2" style="width:120px;"><span class="c-red">*</span>账期:</label>
- <div class="formControls col-2 col-sm-2" style="width:120px;padding:0 0;margin-right: 15px;">
- <span class="select-box">
- <select name="accountPeriod" id="accountPeriod" class="select">
- <option value="1">先款</option>
- <option value="2">月结</option>
- <option value="3">两个月</option>
- </select>
- </span>
- </div>
- <label class="form-label col-2 col-sm-2" style="width:150px;">
- <button type="button" style="cursor:pointer; float: right;height: 35px;margin-right: 30px;margin-bottom: 10px;" class="my-btn-search" onclick="toAddChannelSaleInfo();">保存</button>
- </label>
- <div class="formControls col-2 col-sm-2" style="width:120px; padding:0px 0px;margin-right: 15px;">
- </div>
- <div class="mt-20" style="margin: 20px;">
- <input type="hidden" id="channelSaleInfoJson" name="channelSaleInfoJson">
- <table class="table table-border table-bordered table-bg table-hover table-sort" id="saleTable">
- <thead>
- <tr class="text-c">
- <th width="100">渠道类别</th>
- <th width="100">渠道类型</th>
- <th width="100">渠道/平台名称</th>
- <th width="100">销售产品型号</th>
- <th width="100">供货价(元)</th>
- <th width="100">账期 </th>
- <th width="100">操作</th>
- </tr>
- </thead>
- <tbody id="channelSaleListId">
- <#if listChannelSaleInfo?? && (listChannelSaleInfo?size > 0) >
- <tr><td colspan="7" class="td-manage text-c" id="channelTbodyId" style="display: none;" >暂时没有客户销售渠道信息,请添加!</td></tr>
- <#list listChannelSaleInfo as list>
- <tr>
- <td>
- <#if list.channelCategory??>
- <#if list.channelCategory == 1>电商</#if>
- <#if list.channelCategory == 2>特殊渠道</#if>
- <#if list.channelCategory == 3>线下</#if>
- <#if list.channelCategory == 4>海外</#if>
- </#if>
- </td>
- <td>${list.channelType!''}</td>
- <td>${list.channelName!''}</td>
- <td>${list.promotingProducts!''}</td>
- <td>${list.supplyPrice/100!''}</td>
- <td>
- <#if list.accountPeriod??>
- <#if list.accountPeriod == 1>先款</#if>
- <#if list.accountPeriod == 2>月结</#if>
- <#if list.accountPeriod == 3>俩个月</#if>
- </#if>
- </td>
- <td><a href='javascript:;' onclick='deleteChannelSale(this)'>删除</a></td>
- </tr>
- </#list>
- <#else>
- <tr><td colspan="7" class="td-manage text-c" id="channelTbodyId" >暂时没有客户销售渠道信息,请添加!</td></tr>
- </#if>
- </tbody>
- </table>
- </div>
- </div>
- <#--付款/退款信息-->
- <div class="row cl">
- <label class="form-label col-9">
- <div class="tit-2">付款/退款信息<span style="font-family:'Arial Normal', 'Arial';font-weight:400;font-size:14px;">(请真实有效,用于财务收款确认或退款业务)</span></div>
- </label>
- <div class="formControls col-9">
- </div>
- </div>
- <#if billingInfo??>
- <div class="row cl" style="margin-bottom: 10px;">
- <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>开户支行:</label>
- <div class="formControls col-2 col-sm-2">
- <input type="text" class="input-text trim_input" placeholder="开户支行" id="accountOpeningBranch" name="accountOpeningBranch" value="${billingInfo.accountOpeningBranch!''}">
- </div>
- <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>账户名称:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="账户名称" id="accountName" name="accountName" value="${billingInfo.accountName!''}">
- </div>
- <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>账号:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="填写账号" id="accountNum" name="accountNum" value="${billingInfo.accountNum!''}">
- </div>
- </div>
- <div class="row cl" style="margin-bottom: 10px;">
- <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>收款人姓名:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="收款人姓名" id="receivablesName" name="receivablesName" value="${billingInfo.receivablesName!''}">
- </div>
- <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>收款人手机:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="收款人手机" id="receivablesPhone" name="receivablesPhone" value="${billingInfo.receivablesPhone!''}">
- </div>
- </div>
- <#else >
- <div class="row cl" style="margin-bottom: 10px;">
- <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>开户支行:</label>
- <div class="formControls col-2 col-sm-2">
- <input type="text" class="input-text trim_input" placeholder="开户支行" id="accountOpeningBranch" name="accountOpeningBranch" value="">
- </div>
- <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>账户名称:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="账户名称" id="accountName" name="accountName" value="">
- </div>
- <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>账号:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="填写账号" id="accountNum" name="accountNum" value="">
- </div>
- </div>
- <div class="row cl" style="margin-bottom: 10px;">
- <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>收款人姓名:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="收款人姓名" id="receivablesName" name="receivablesName" value="">
- </div>
- <label class="form-label col-2 col-sm-2" style="width: 125px;"><span class="c-red">*</span>收款人手机:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="收款人手机" id="receivablesPhone" name="receivablesPhone" value="">
- </div>
- </div>
- </#if>
- <#--开票信息-->
- <div class="row cl" style="margin-bottom: 10px;">
- <label class="form-label col-9 skin-minimal">
- <span class="tit-2">开票信息</span><span class="c-red"> *</span>是否开票
- <div class="radio-box">
- <input type="radio" id="isOpenTicket-1" name="isOpenTicket" value="1" checked="checked" >
- <label for="isOpenTicket-1">开票</label>
- </div>
- <div class="radio-box">
- <input type="radio" id="isOpenTicket-2" name="isOpenTicket" value="1" >
- <label for="isOpenTicket-2">不开票</label>
- </div>
- </label>
- <div class="formControls col-3">
- </div>
- </div>
- <#if ticketOpeningInfo??>
- <div class="row cl" style="margin-bottom: 10px;">
- <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>发票类型:</label>
- <div class="formControls col-2 col-sm-2">
- <span class="select-box">
- <select name="ticketType" class="select">
- <option value="1" <#if ticketOpeningInfo.ticketType == 1>selected</#if>>专票</option>
- <option value="2" <#if ticketOpeningInfo.ticketType == 2>selected</#if>>普票</option>
- </select>
- </span>
- </div>
- <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>开户支行:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="开户支行名称" id="accountOpeningBranch" name="accountOpeningBranch" value="${ticketOpeningInfo.accountOpeningBranch!''}">
- </div>
- <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>开票账户:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="开票账户" id="ticketOpeningAccount" name="ticketOpeningAccount" value="${ticketOpeningInfo.ticketOpeningAccount!''}">
- </div>
- </div>
- <div class="row cl" style="margin-bottom: 10px;">
- <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>企业名称:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="企业名称" id="enterpriseName" name="enterpriseName" value="${ticketOpeningInfo.enterpriseName!''}">
- </div>
- <label class="form-label col-2 col-sm-2" style="width: 140px;"><span class="c-red">*</span>纳税人识别号:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="纳税人识别号" id="taxpayerIdentificationNum" name="taxpayerIdentificationNum" value="${ticketOpeningInfo.taxpayerIdentificationNum!''}">
- </div>
- <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>开票电话:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="开票电话" id="ticketOpeningPhone" name="ticketOpeningPhone" value="${ticketOpeningInfo.ticketOpeningPhone!''}">
- </div>
- </div>
- <div class="row cl" style="margin-bottom: 10px;">
- <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>企业地址:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="企业地址" id="enterpriseAddress" name="enterpriseAddress" value="${ticketOpeningInfo.enterpriseAddress!''}">
- </div>
- </div>
- <#else >
- <div class="row cl" style="margin-bottom: 10px;">
- <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>发票类型:</label>
- <div class="formControls col-2 col-sm-2">
- <span class="select-box">
- <select name="ticketType" class="select">
- <option value="1">专票</option>
- <option value="2">普票</option>
- </select>
- </span>
- </div>
- <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>开户支行:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="开户支行名称" id="accountOpeningBranch" name="accountOpeningBranch" value="">
- </div>
- <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>开票账户:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="开票账户" id="ticketOpeningAccount" name="ticketOpeningAccount" value="">
- </div>
- </div>
- <div class="row cl" style="margin-bottom: 10px;">
- <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>企业名称:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="企业名称" id="enterpriseName" name="enterpriseName" value="">
- </div>
- <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>纳税人识别号:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="纳税人识别号" id="taxpayerIdentificationNum" name="taxpayerIdentificationNum" value="">
- </div>
- <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>开票电话:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="开票电话" id="ticketOpeningPhone" name="ticketOpeningPhone" value="">
- </div>
- </div>
- <div class="row cl" style="margin-bottom: 10px;">
- <label class="form-label col-2 col-sm-2" style="width: 120px;"><span class="c-red">*</span>企业地址:</label>
- <div class="formControls col-2 col-sm-2 skin-minimal">
- <input type="text" class="input-text trim_input" placeholder="企业地址" id="enterpriseAddress" name="enterpriseAddress" value="">
- </div>
- </div>
- </#if>
- <#--客户备注-->
- <div class="row cl">
- <label class="form-label col-3">
- <div class="tit-2">客户备注</div>
- </label>
- <div class="formControls col-9">
- </div>
- </div>
- <div class="row cl">
- <label class="form-label">
- </label>
- <div class="formControls col-9">
- <textarea id="customerRemarks" style="width: 100%;height: 100px;" name="customerRemarks" >${customerBasicInfo.customerRemarks!''}</textarea>
- </div>
- </div>
- <#--添加保存按钮-->
- <div class="row cl">
- <label class="form-label col-5 col-sm-5"></label>
- <div class="formControls col-5 col-sm-5 skin-minimal">
- <span class="c-red"><button type="button" style="cursor:pointer; float: inherit;height: 35px;margin-right: 30px;margin-bottom: 10px;margin-top: 20px;" class="my-btn-search" onclick="updateCustomerBasicInfo();">确认修改</button></span>
- </div>
- </div>
- <input type="hidden" id="provinceCode" value="${customerBasicInfo.customerProvinceCode!''}">
- <input type="hidden" id="cityCode" value="${customerBasicInfo.customerCityCode!''}">
- </form>
- </div>
- <#--业务js-->
- <#--<script type="text/javascript" src="${path}/common/js/customerSaveAdmin/save_customer_info.js"></script>-->
- <script>
- /*初始化页面参数*/
- $(function () {
- /* 初始化单选框样式 */
- //initCheck();
- $('.skin-minimal input').iCheck({
- checkboxClass: 'icheckbox-blue',
- radioClass: 'iradio-blue',
- increaseArea: '20%'
- });
- /*初始化省份(大类)*/
- initProvince();
- //初始化市
- initCity('${customerBasicInfo.customerProvinceCode!''}');
- /*初始化渠道类别(大类)*/
- initChannelCategory();
- /*初始化销售产品(大类)*/
- initPromotingProducts();
- /*监听省份*/
- $("[name='customerProvinceCode']").change(function (){
- initCity($(this).val());
- })
- /*监听渠道类别*/
- $("[name='channelCategory']").change(function (){
- initChannelType($(this).val());
- })
- /*监听销售产品*/
- $("[name='promotingProducts']").change(function (){
- initSupplyPrice($(this).val());
- })
- /*监听产品价格选择*/
- $("[name='supplyPrice']").change(function (){
- changeSupplyPrice($(this).val());
- })
- })
- /*业务逻辑js控制 start*/
- $(document).on('click', '.dalog-ask .answer', function() {
- var customerProvinceCode = $(this).find(".customerProvinceCode").val();
- $("select[name='complaintId']").val(customerProvinceCode);
- initCity(customerProvinceCode); //根据省份初始化城市
- $(".dalog-ask").hide();
- });
- /*初始化省份*/
- function initProvince() {
- //默认查询参数为空
- var provinceListInfo = null;
- $.ajax({
- type: "POST",
- data: {
- provinceId : provinceListInfo
- },
- url: "${path}/admin/customerBasic/query_provinceList",
- async: true,
- success: function(data){
- var html = '<option value="">请选择省份</option>';
- var id;
- if (data.returnCode == 200) {
- for(var i=0;i<data.returnMsg.provinceList.length;i++){
- provinceListInfo = data.returnMsg.provinceList[i];
- if(i == 0 ){
- id = provinceListInfo.divisionCode;
- }
- html += '<option value="'+ provinceListInfo.divisionCode +'">'+ provinceListInfo.province +'</option>';
- }
- }else{
- html = '';
- }
- $("[name='customerProvinceCode']").html(html);
- $("#customerProvinceCode").val($("#provinceCode").val());
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- }
- /*根据省份代号初始化城市*/
- function initCity(customerProvinceId){
- var cityListInfo = null;
- if(customerProvinceId == null || customerProvinceId == ""){
- var html = '<option value="">请选择城市</option>';
- $("[name='customerCityCode']").html(html);
- }else{
- $.ajax({
- type: "POST",
- data: {
- provinceId : customerProvinceId
- },
- url: "${path}/admin/customerBasic/query_cityList",
- async: true,
- success: function(data){
- var html = '<option value="">请选择城市</option>';
- if (data.returnCode == 200) {
- for(var i=0;i<data.returnMsg.cityList.length;i++){
- cityListInfo = data.returnMsg.cityList[i];
- html += '<option value="'+ cityListInfo.divisionCode +'">'+ cityListInfo.city +'</option>';
- }
- }else{
- html = '';
- }
- $("[name='customerCityCode']").html(html);
- $("#customerCityCode").val($("#cityCode").val());
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- }
- }
- /*初始化渠道类别*/
- function initChannelCategory() {
- //默认查询参数为空
- var channelCategoryListInfo = null;
- $.ajax({
- type: "POST",
- data: {
- channelCategoryId : channelCategoryListInfo
- },
- url: "${path}/admin/customerBasic/query_channelCategoryList",
- async: true,
- success: function(data){
- var html = '<option value="">请选择渠道类别</option>';
- var id;
- if (data.returnCode == 200) {
- for(var i=0;i<data.returnMsg.channelCategoryList.length;i++){
- channelCategoryListInfo = data.returnMsg.channelCategoryList[i];
- if(i == 0 ){
- id = channelCategoryListInfo.channelCategory;
- }
- html += '<option value="'+ channelCategoryListInfo.channelCategory +'">'+ channelCategoryListInfo.channelName +'</option>';
- }
- }else{
- html = '';
- }
- $("[name='channelCategory']").html(html);
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- }
- /*根据渠道类别初始化渠道类型*/
- function initChannelType(channelCategory){
- var channelTypeListInfo = null;
- $.ajax({
- type: "POST",
- data: {
- channelCategoryId : channelCategory
- },
- url: "${path}/admin/customerBasic/query_channelTypeList",
- async: true,
- success: function(data){
- var html = '<option value="">请选择渠道类型</option>';
- if (data.returnCode == 200) {
- for(var i=0;i<data.returnMsg.channelTypeList.length;i++){
- channelTypeListInfo = data.returnMsg.channelTypeList[i];
- html += '<option value="'+ channelTypeListInfo.channelName +'">'+ channelTypeListInfo.channelType +'</option>';
- }
- }else{
- html = '';
- }
- $("[name='channelType']").html(html);
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- }
- /*初始化销售产品*/
- function initPromotingProducts() {
- var promotingProductsInfo = null;
- $.ajax({
- type: "POST",
- data: {
- promotingProductsInfo : promotingProductsInfo
- },
- url: "${path}/admin/customerBasic/query_promotingProductsList",
- async: true,
- success: function(data){
- var html = '<option value="">请选择销售产品</option>';
- var id;
- if (data.returnCode == 200) {
- for(var i=0;i<data.returnMsg.promotingProductsList.length;i++){
- promotingProductsInfo = data.returnMsg.promotingProductsList[i];
- if(i == 0 ){
- id = promotingProductsInfo.productId;
- }
- html += '<option value="'+ promotingProductsInfo.productId +'">'+ promotingProductsInfo.productName +'</option>';
- }
- }else{
- html = '';
- }
- $("[name='promotingProducts']").html(html);
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- }
- /*初始化产品价格*/
- function initSupplyPrice(promotingProductsId){
- //var supplyPriceInfo = null;
- if(promotingProductsId == null || promotingProductsId == ""){
- var html = '<option value="">请选择销售产品</option>';
- //$("[name='promotingProducts']").html(html);
- }else{
- $.ajax({
- type: "POST",
- data: {
- promotingProductsId : promotingProductsId
- },
- url: "${path}/admin/customerBasic/query_supplyPriceList",
- async: true,
- success: function(data){
- var html = '<option value="">手动输入产品价格</option>';
- if (data.returnCode == 200) {
- for(var i=0;i<data.returnMsg.supplyPriceList.length;i++){
- var supplyPriceInfo = data.returnMsg.supplyPriceList[i];
- html += '<option value="'+ supplyPriceInfo.colorPrice/100 +'">'+ supplyPriceInfo.colorPrice/100 +'</option>';
- }
- }else{
- html = '';
- }
- $("[name='supplyPrice']").html(html);
- $("#writeSupplyPrice").show();
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- }
- });
- }
- }
- /*监听产品价格选项*/
- function changeSupplyPrice(supplyPrice){
- if(supplyPrice == ""){
- $("#writeSupplyPrice").show();
- }else{
- $("#writeSupplyPrice").hide();
- }
- }
- /*保存对接联系人信息到列表*/
- function toAddDockedContactInfo() {
- var contactName = document.getElementById("contactName").value;
- var contactPhone = document.getElementById("contactPhone").value;
- var contactType = document.getElementById("contactType").value;
- var contactEmail = document.getElementById("contactEmail").value;
- if(contactName == "" || contactName == null ){
- layer.msg("联系人姓名不能为空");
- return;
- }
- if(contactPhone == "" || contactPhone == null ){
- layer.msg("电话不能为空");
- return;
- }else{
- //var reg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
- var reg = /^(0?(13[0-9]|15[012356789]|17[013678]|18[0-9]|14[57])[0-9]{8})$/
- if(!reg.test(contactPhone)){
- layer.msg("请填写正确的手机号码!", {icon: 5, time: 3000});
- return;
- }
- }
- if(contactType == "" || contactType == null ){
- layer.msg("职位/身份不能为空");
- return;
- }
- if(contactEmail == "" || contactEmail == null ){
- layer.msg("联系邮箱不能为空");
- return;
- }else{
- var reg = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
- if(!reg.test(contactEmail)){
- layer.msg("请填写正确的邮箱!", {icon: 5, time: 3000});
- return;
- }
- }
- //var operation = "删除";
- var operation = "<a href='javascript:;' onclick='deleteContact(this)'>删除</a>";
- //"<a href='javascript:;' onclick='del(this)'>删除</a>";
- row = document.getElementById("contactTable").insertRow();
- if(row!=null){
- cell=row.insertCell();
- cell.style.textAlign = "center";
- cell.innerHTML=contactName;
- cell = row.insertCell();
- cell.style.textAlign = "center";
- cell.innerHTML=contactPhone;
- cell = row.insertCell();
- cell.style.textAlign = "center";
- cell.innerHTML=contactType;
- cell = row.insertCell();
- cell.style.textAlign = "center";
- cell.innerHTML=contactEmail;
- cell = row.insertCell();
- cell.style.textAlign = "center";
- cell.innerHTML=operation;
- }
- $("#contactTbodyId").hide();
- return false;
- }
- /*保存客户销售信息到列表*/
- function toAddChannelSaleInfo() {
- var channelCategory = document.getElementById("channelCategory").value;
- if(channelCategory == "1"){
- channelCategory = "电商";
- }else if(channelCategory == "2"){
- channelCategory = "特殊渠道";
- }else if(channelCategory == "3"){
- channelCategory = "线下";
- }else if(channelCategory == "4"){
- channelCategory = "海外";
- }
- var channelType = document.getElementById("channelType").value;
- var channelName = document.getElementById("channelName").value;
- var promotingProducts = document.getElementById("promotingProducts").value;
- var myselect=document.getElementById("promotingProducts");
- var promotingProductsText = myselect.options[myselect.selectedIndex].text;
- var supplyPrice = document.getElementById("supplyPrice").value;
- var writeSupplyPrice = document.getElementById("writeSupplyPrice").value;//手动输入价格
- if(writeSupplyPrice != null && writeSupplyPrice !=""){
- supplyPrice = writeSupplyPrice;
- }
- var accountPeriod = document.getElementById("accountPeriod").value;
- if(accountPeriod == "1"){
- accountPeriod = "先款";
- }else if(accountPeriod == "2"){
- accountPeriod = "月结";
- }else if(accountPeriod == "3"){
- accountPeriod = "两个月";
- }
- if(channelCategory == "" || channelCategory == null ){
- layer.msg("渠道类别不能为空");
- return;
- }
- if(channelType == "" || channelType == null ){
- layer.msg("渠道类型不能为空");
- return;
- }
- if(channelName == "" || channelName == null ){
- layer.msg("渠道平台/名称不能为空");
- return;
- }
- if(promotingProducts == "" || promotingProducts == null ){
- layer.msg("销售产品不能为空");
- return;
- }
- if(supplyPrice == "" || supplyPrice == null ){
- layer.msg("供货价格不能为空");
- return;
- }
- var promotingProductsHtml = '<input type="hidden" value="'+promotingProducts+'">';
- var operation = "<a href='javascript:;' onclick='deleteChannelSale(this)' name='deleteChannelSale'>删除</a>";
- row = document.getElementById("saleTable").insertRow();
- if(row!=null){
- cell=row.insertCell();
- cell.style.textAlign = "center";
- cell.innerHTML=channelCategory;
- cell = row.insertCell();
- cell.style.textAlign = "center";
- cell.innerHTML=channelType;
- cell = row.insertCell();
- cell.style.textAlign = "center";
- cell.innerHTML=channelName;
- cell = row.insertCell();
- cell.style.textAlign = "center";
- cell.innerHTML=promotingProductsHtml+promotingProductsText;
- cell = row.insertCell();
- cell.style.textAlign = "center";
- cell.innerHTML=supplyPrice;
- cell = row.insertCell();
- cell.style.textAlign = "center";
- cell.innerHTML=accountPeriod;
- cell = row.insertCell();
- cell.style.textAlign = "center";
- cell.innerHTML=operation;
- }
- $("#channelTbodyId").hide();
- return false;
- }
- /*修改客户信息*/
- function updateCustomerBasicInfo() {
- var customerBasicInfoSaveForm = {};
- //客户基本信息
- var customerBasicInfo = {};
- customerBasicInfo.customerId = $("[name='customerId']").val();
- customerBasicInfo.customerType = $("[name='customerType']").val();
- customerBasicInfo.cooperativeState = $("[name='cooperativeState']").val();
- customerBasicInfo.customerName = $("[name='customerName']").val();
- customerBasicInfo.customerIndustry = $("[name='customerIndustry']").val();
- customerBasicInfo.customerProvinceCode = $("[name='customerProvinceCode']").val();
- customerBasicInfo.customerCityCode = $("[name='customerCityCode']").val();
- customerBasicInfo.customerAddress = $("[name='customerAddress']").val();
- customerBasicInfo.customerRemarks = $("[name='customerRemarks']").val();
- if(customerBasicInfo.customerName == "" || customerBasicInfo.customerName == null ){
- layer.msg("客户名称不能为空");
- return;
- }
- if(customerBasicInfo.customerProvinceCode == "" || customerBasicInfo.customerProvinceCode == null ){
- layer.msg("客户省份不能为空");
- return;
- }
- if(customerBasicInfo.customerCityCode == "" || customerBasicInfo.customerCityCode == null ){
- layer.msg("客户城市不能为空");
- return;
- }
- //对接联系人信息
- var dockedContactInfoList = new Array();
- $("#contactListId").find("tr").each(function (index,element){
- var a = $(element).children();
- var dockedContactInfo = {};
- for(var i=0;i<a.length;i++){
- switch(i){
- case 0:
- dockedContactInfo.contactName = a.eq(i).text().trim();
- break;
- case 1:
- dockedContactInfo.contactPhone = a.eq(i).text().trim();
- break;
- case 2:
- dockedContactInfo.contactType = a.eq(i).text().trim();
- break;
- case 3:
- dockedContactInfo.contactEmail = a.eq(i).text().trim();
- break;
- }
- }
- dockedContactInfoList.push(dockedContactInfo);
- })
- if(dockedContactInfoList.length<1){
- layer.msg("对接联系人信息不能为空");
- return;
- }
- /*var dockedContactInfoListJson = $("#dockedContactInfoJson").val(JSON.stringify(dockedContactInfoList));*/
- //客户销售渠道信息
- var channelSaleInfoList = new Array();
- $("#channelSaleListId").find("tr").each(function (index,element){
- var a = $(element).children();
- var channelSaleInfo = {};
- for(var i=0;i<a.length;i++){
- switch(i){
- case 0:
- channelSaleInfo.channelCategory = a.eq(i).text().trim();
- if(channelSaleInfo.channelCategory == "电商"){
- channelSaleInfo.channelCategory = "1";
- }else if(channelSaleInfo.channelCategory == "特殊渠道"){
- channelSaleInfo.channelCategory = "2";
- }else if(channelSaleInfo.channelCategory == "线下"){
- channelSaleInfo.channelCategory = "3";
- }else if(channelSaleInfo.channelCategory == "海外"){
- channelSaleInfo.channelCategory = "4";
- }
- break;
- case 1:
- channelSaleInfo.channelType = a.eq(i).text().trim();
- break;
- case 2:
- channelSaleInfo.channelName = a.eq(i).text().trim();
- break;
- case 3:
- channelSaleInfo.promotingProducts = a.eq(i).text().trim();
- break;
- case 4:
- channelSaleInfo.supplyPrice = a.eq(i).text().trim();
- channelSaleInfo.supplyPrice = channelSaleInfo.supplyPrice * 100;
- break;
- case 5:
- channelSaleInfo.accountPeriod = a.eq(i).text().trim();
- if(channelSaleInfo.accountPeriod == "先款"){
- channelSaleInfo.accountPeriod = "1";
- }else if(channelSaleInfo.accountPeriod == "月结"){
- channelSaleInfo.accountPeriod = "2";
- }else if(channelSaleInfo.accountPeriod == "两个月"){
- channelSaleInfo.accountPeriod = "3";
- }
- break;
- }
- }
- channelSaleInfoList.push(channelSaleInfo);
- });
- if(channelSaleInfoList.length<2){
- layer.msg("客户销售渠道信息不能为空");
- return;
- }
- /*var channelSaleInfoListJson = $("#channelSaleInfoJson").val(JSON.stringify(channelSaleInfoList));*/
- //alert("dockedContactInfoList:"+dockedContactInfoList.length);
- //alert("channelSaleInfoList:"+channelSaleInfoList.length);
- //付款/退款信息
- var billingInfo = {};
- billingInfo.billingId = $("[name='billingId']").val();
- billingInfo.accountOpeningBranch = $("[name='accountOpeningBranch']").val();
- billingInfo.accountName = $("[name='accountName']").val();
- billingInfo.accountNum = $("[name='accountNum']").val();
- billingInfo.receivablesName = $("[name='receivablesName']").val();
- billingInfo.receivablesPhone = $("[name='receivablesPhone']").val();
- if(billingInfo.accountOpeningBranch == "" || billingInfo.accountOpeningBranch == null ){
- layer.msg("开户支行不能为空");
- return;
- }
- if(billingInfo.accountName == "" || billingInfo.accountName == null ){
- layer.msg("账号名称不能为空");
- return;
- }
- if(billingInfo.accountNum == "" || billingInfo.accountNum == null ){
- layer.msg("账号不能为空");
- return;
- }
- if(billingInfo.receivablesName == "" || billingInfo.receivablesName == null ){
- layer.msg("收款人姓名不能为空");
- return;
- }if(billingInfo.receivablesPhone == "" || billingInfo.receivablesPhone == null ){
- layer.msg("收款人手机不能为空");
- return;
- }else{
- var reg = /^(0?(13[0-9]|15[012356789]|17[013678]|18[0-9]|14[57])[0-9]{8})$/
- if(!reg.test(phone)){
- layer.msg("请填写正确的手机号码!", {icon: 5, time: 3000});
- return;
- }
- }
- //开票信息
- var ticketOpeningInfo = {};
- ticketOpeningInfo.ticketOpeningId = $("[name='ticketOpeningId']").val();
- ticketOpeningInfo.ticketType = $("[name='ticketType']").val();
- ticketOpeningInfo.accountOpeningBranch = $("[name='accountOpeningBranch']").val();
- ticketOpeningInfo.ticketOpeningAccount = $("[name='ticketOpeningAccount']").val();
- ticketOpeningInfo.enterpriseName = $("[name='enterpriseName']").val();
- ticketOpeningInfo.taxpayerIdentificationNum = $("[name='taxpayerIdentificationNum']").val();
- ticketOpeningInfo.ticketOpeningPhone = $("[name='ticketOpeningPhone']").val();
- ticketOpeningInfo.enterpriseAddress = $("[name='enterpriseAddress']").val();
- if(ticketOpeningInfo.ticketType == "1" ){
- if(ticketOpeningInfo.accountOpeningBranch == "" || ticketOpeningInfo.accountOpeningBranch == null ){
- layer.msg("开户支行不能为空");
- return;
- }
- if(ticketOpeningInfo.ticketOpeningAccount == "" || ticketOpeningInfo.ticketOpeningAccount == null ){
- layer.msg("开票账户不能为空");
- return;
- }
- if(ticketOpeningInfo.enterpriseName == "" || ticketOpeningInfo.enterpriseName == null ){
- layer.msg("企业名称不能为空");
- return;
- }
- if(ticketOpeningInfo.taxpayerIdentificationNum == "" || ticketOpeningInfo.taxpayerIdentificationNum == null ){
- layer.msg("纳税人识别号不能为空");
- return;
- }
- if(ticketOpeningInfo.ticketOpeningPhone == "" || ticketOpeningInfo.ticketOpeningPhone == null ){
- layer.msg("开票电话不能为空");
- return;
- }else{
- var reg = /^(0?(13[0-9]|15[012356789]|17[013678]|18[0-9]|14[57])[0-9]{8})$/
- if(!reg.test(ticketOpeningInfo.ticketOpeningPhone)){
- layer.msg("请填写正确的电话号码!", {icon: 5, time: 3000});
- return;
- }
- }if(ticketOpeningInfo.enterpriseAddress == "" || ticketOpeningInfo.enterpriseAddress == null ){
- layer.msg("企业地址不能为空");
- return;
- }
- }else{
- if(ticketOpeningInfo.enterpriseName == "" || ticketOpeningInfo.enterpriseName == null ){
- layer.msg("企业名称不能为空");
- return;
- }
- if(ticketOpeningInfo.taxpayerIdentificationNum == "" || ticketOpeningInfo.taxpayerIdentificationNum == null ){
- layer.msg("纳税人识别号不能为空");
- return;
- }
- }
- //发送保存请求
- customerBasicInfoSaveForm.customerBasicInfo = customerBasicInfo;
- customerBasicInfoSaveForm.dockedContactInfoList = dockedContactInfoList;
- customerBasicInfoSaveForm.channelSaleInfoList = channelSaleInfoList;
- customerBasicInfoSaveForm.billingInfo = billingInfo;
- customerBasicInfoSaveForm.ticketOpeningInfo = ticketOpeningInfo;
- var saveStates = "";
- console.log(customerBasicInfoSaveForm);
- var customerInfoJson = JSON.stringify(customerBasicInfo);
- var billingInfoJson = JSON.stringify(billingInfo);
- var ticketOpeningInfoJson = JSON.stringify(ticketOpeningInfo);
- var dockedContactInfoListJson = JSON.stringify(dockedContactInfoList);
- var channelSaleInfoListJson = JSON.stringify(channelSaleInfoList);
- //$.post("${path}/admin/customerBasic/save_customer_info",customerBasicInfoSaveForm, function(res){});
- $.ajax({
- type: "POST",
- data: {
- customerInfoJson:customerInfoJson,
- dockedContactInfoListJson:dockedContactInfoListJson,
- channelSaleInfoListJson:channelSaleInfoListJson,
- billingInfoJson : billingInfoJson,
- ticketOpeningInfoJson:ticketOpeningInfoJson
- },
- url: "${path}/admin/customerBasic/update_customer_info",
- async: true,
- success: function(data){
- if (data.returnCode == 200) {
- saveStates = "保存成功";
- layer.msg(saveStates,{icon: 1,time:1000});
- window.location.href= "${path}/admin/customerBasic/listCustomerBasic";
- }else{
- saveStates = "保存失败";
- layer.msg(saveStates,{icon: 5,time:1000});
- }
- },
- error: function(XmlHttpRequest, textStatus, errorThrown){
- saveStates = "保存失败";
- layer.msg(saveStates,{icon: 5,time:1000});
- }
- });
- }
- // 删除对接联系人函数
- function deleteContact(x){
- $(x).parent().parent().remove();
- // tr.parentNode.removeChild(tr);
- initContactInfoListBody();
- }
- // 删除客户销售渠道信息函数
- function deleteChannelSale(x){
- var tr = x.parentNode.parentNode;
- tr.parentNode.removeChild(tr);
- initChannelSaleInfoListBody();
- }
- //监听对接联系人
- function initContactInfoListBody() {
- var dockedContactInfoList = new Array();
- $("#contactListId").find("tr").each(function (){
- var dockedContactInfo = {};
- dockedContactInfo.contactName = $("[name='contactName']").val();
- dockedContactInfo.contactPhone = $("[name='contactPhone']").val();
- dockedContactInfo.contactType = $("[name='contactType']").val();
- dockedContactInfo.contactEmail = $("[name='contactEmail']").val();
- dockedContactInfoList.push(dockedContactInfo);
- })
- if(dockedContactInfoList.length<2){
- $("#contactTbodyId").show();
- //document.getElementById("contactListId").innerHTML = "<tr><td colspan=\"5\" class=\"td-manage text-c\" >暂时没有联系人信息,请添加!</td></tr>";
- }
- }
- //监听销售渠道
- function initChannelSaleInfoListBody() {
- var channelSaleInfoList = new Array();
- $("#channelSaleListId").find("tr").each(function (){
- var channelSaleInfo = {};
- channelSaleInfo.channelCategory = $("[name='channelCategory']").val();
- channelSaleInfo.channelType = $("[name='channelType']").val();
- channelSaleInfo.channelName = $("[name='channelName']").val();
- channelSaleInfo.promotingProducts = $("[name='promotingProducts']").val();
- channelSaleInfo.supplyPrice = $("[name='supplyPrice']").val();
- channelSaleInfo.accountPeriod = $("[name='accountPeriod']").val();
- channelSaleInfoList.push(channelSaleInfo);
- })
- if(channelSaleInfoList.length<2){
- $("#channelTbodyId").show();
- //document.getElementById("channelSaleListId").innerHTML = "<tr><td colspan=\"7\" class=\"td-manage text-c\" >暂时没有客户销售渠道信息,请添加!</td></tr>";
- }
- }
- /*业务逻辑js控制 end*/
- </script>
- </body>
- </html>
|