|
@@ -134,10 +134,10 @@
|
|
<span class="c-red">*</span>电话:<input type="text" class="my-input" style="width:90px;margin-right: 0px;margin-bottom: 10px;" placeholder="联系人电话" id="contactPhone" name="contactPhone">
|
|
<span class="c-red">*</span>电话:<input type="text" class="my-input" style="width:90px;margin-right: 0px;margin-bottom: 10px;" placeholder="联系人电话" id="contactPhone" name="contactPhone">
|
|
<span class="c-red">*</span>职位/身份:<input type="text" class="my-input" style="width:90px;margin-right: 0px;margin-bottom: 10px;" placeholder="职位或身份" id="contactType" name="contactType">
|
|
<span class="c-red">*</span>职位/身份:<input type="text" class="my-input" style="width:90px;margin-right: 0px;margin-bottom: 10px;" placeholder="职位或身份" id="contactType" name="contactType">
|
|
<span class="c-red">*</span>联系邮箱:<input type="text" class="my-input" style="width:90px;margin-right: 0px;margin-bottom: 10px;" placeholder="邮箱" id="contactEmail" name="contactEmail">
|
|
<span class="c-red">*</span>联系邮箱:<input type="text" class="my-input" style="width:90px;margin-right: 0px;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="toAddCustomerInfo();">保存</button></span>
|
|
|
|
|
|
+ <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>
|
|
<div class="mt-20" style="margin: 20px;">
|
|
<div class="mt-20" style="margin: 20px;">
|
|
- <table class="table table-border table-bordered table-bg table-hover table-sort">
|
|
|
|
|
|
+ <table class="table table-border table-bordered table-bg table-hover table-sort" id="contactTable">
|
|
<thead>
|
|
<thead>
|
|
<tr class="text-c">
|
|
<tr class="text-c">
|
|
<th width="100">联系人姓名</th>
|
|
<th width="100">联系人姓名</th>
|
|
@@ -163,12 +163,12 @@
|
|
<div class="row cl">
|
|
<div class="row cl">
|
|
<label class="form-label col-1 col-sm-1"><span class="c-red">*</span>渠道类别:</label>
|
|
<label class="form-label col-1 col-sm-1"><span class="c-red">*</span>渠道类别:</label>
|
|
<div class="formControls col-1 col-sm-1">
|
|
<div class="formControls col-1 col-sm-1">
|
|
- <select name="channelCategory" class="select">
|
|
|
|
|
|
+ <select name="channelCategory" id="channelCategory" class="select">
|
|
</select>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<label class="form-label col-1 col-sm-1"><span class="c-red">*</span>渠道类型:</label>
|
|
<label class="form-label col-1 col-sm-1"><span class="c-red">*</span>渠道类型:</label>
|
|
<div class="formControls col-1 col-sm-1">
|
|
<div class="formControls col-1 col-sm-1">
|
|
- <select name="channelType" class="select">
|
|
|
|
|
|
+ <select name="channelType" id="channelType" class="select">
|
|
</select>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<label class="form-label col-1 col-sm-1"><span class="c-red">*</span>渠道名称:</label>
|
|
<label class="form-label col-1 col-sm-1"><span class="c-red">*</span>渠道名称:</label>
|
|
@@ -177,26 +177,26 @@
|
|
</div>
|
|
</div>
|
|
<label class="form-label col-1 col-sm-1"><span class="c-red">*</span>销售产品:</label>
|
|
<label class="form-label col-1 col-sm-1"><span class="c-red">*</span>销售产品:</label>
|
|
<div class="formControls col-1 col-sm-1">
|
|
<div class="formControls col-1 col-sm-1">
|
|
- <select name="promotingProducts" class="select">
|
|
|
|
|
|
+ <select name="promotingProducts" id="promotingProducts" class="select">
|
|
</select>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<label class="form-label col-1 col-sm-1"><span class="c-red">*</span>供货价格:</label>
|
|
<label class="form-label col-1 col-sm-1"><span class="c-red">*</span>供货价格:</label>
|
|
<div class="formControls col-1 col-sm-1">
|
|
<div class="formControls col-1 col-sm-1">
|
|
- <select name="supplyPrice" class="select">
|
|
|
|
|
|
+ <select name="supplyPrice" id="supplyPrice" class="select">
|
|
</select>
|
|
</select>
|
|
<input type="text" class="my-input" style="width:90px;margin-right: 0px;margin-bottom: 10px;" placeholder="填写供货价格" id="supplyPrice" name="supplyPrice">
|
|
<input type="text" class="my-input" style="width:90px;margin-right: 0px;margin-bottom: 10px;" placeholder="填写供货价格" id="supplyPrice" name="supplyPrice">
|
|
</div>
|
|
</div>
|
|
<label class="form-label col-1 col-sm-1"><span class="c-red">*</span>账期:</label>
|
|
<label class="form-label col-1 col-sm-1"><span class="c-red">*</span>账期:</label>
|
|
<div class="formControls col-1 col-sm-1">
|
|
<div class="formControls col-1 col-sm-1">
|
|
- <select name="accountPeriod" class="select">
|
|
|
|
|
|
+ <select name="accountPeriod" id="accountPeriod" class="select">
|
|
<option value="1">先款</option>
|
|
<option value="1">先款</option>
|
|
<option value="2">月结</option>
|
|
<option value="2">月结</option>
|
|
<option value="3">两个月</option>
|
|
<option value="3">两个月</option>
|
|
</select>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
- <button type="button" style="cursor:pointer; float: right;height: 35px;margin-right: 30px;margin-bottom: 10px;" class="my-btn-search" onclick="toAddCustomerInfo();">保存</button>
|
|
|
|
|
|
+ <button type="button" style="cursor:pointer; float: right;height: 35px;margin-right: 30px;margin-bottom: 10px;" class="my-btn-search" onclick="toAddChannelSaleInfo();">保存</button>
|
|
<div class="mt-20" style="margin: 20px;">
|
|
<div class="mt-20" style="margin: 20px;">
|
|
- <table class="table table-border table-bordered table-bg table-hover table-sort">
|
|
|
|
|
|
+ <table class="table table-border table-bordered table-bg table-hover table-sort" id="saleTable">
|
|
<thead>
|
|
<thead>
|
|
<tr class="text-c">
|
|
<tr class="text-c">
|
|
<th width="100">渠道类别</th>
|
|
<th width="100">渠道类别</th>
|
|
@@ -308,8 +308,6 @@
|
|
<#--业务js-->
|
|
<#--业务js-->
|
|
<#--<script type="text/javascript" src="${path}/common/js/customerSaveAdmin/save_customer_info.js"></script>-->
|
|
<#--<script type="text/javascript" src="${path}/common/js/customerSaveAdmin/save_customer_info.js"></script>-->
|
|
<script>
|
|
<script>
|
|
- //定义变量
|
|
|
|
-
|
|
|
|
/*初始化页面参数*/
|
|
/*初始化页面参数*/
|
|
$(function () {
|
|
$(function () {
|
|
/* 初始化单选框样式 */
|
|
/* 初始化单选框样式 */
|
|
@@ -447,10 +445,10 @@
|
|
/*根据渠道类别初始化渠道类型*/
|
|
/*根据渠道类别初始化渠道类型*/
|
|
function initChannelType(channelCategory){
|
|
function initChannelType(channelCategory){
|
|
var channelTypeListInfo = null;
|
|
var channelTypeListInfo = null;
|
|
- if(channelCategory == null || channelCategory == ""){
|
|
|
|
|
|
+ /* if(channelCategory == null || channelCategory == ""){
|
|
var html = '<option value="">请选择渠道类别</option>';
|
|
var html = '<option value="">请选择渠道类别</option>';
|
|
$("[name='channelCategory']").html(html);
|
|
$("[name='channelCategory']").html(html);
|
|
- }else{
|
|
|
|
|
|
+ }else{*/
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "POST",
|
|
type: "POST",
|
|
data: {
|
|
data: {
|
|
@@ -459,11 +457,11 @@
|
|
url: "${path}/admin/customerBasic/query_channelTypeList",
|
|
url: "${path}/admin/customerBasic/query_channelTypeList",
|
|
async: true,
|
|
async: true,
|
|
success: function(data){
|
|
success: function(data){
|
|
- var html = '<option value="">请选择城市</option>';
|
|
|
|
|
|
+ var html = '<option value="">请选择渠道类型</option>';
|
|
if (data.returnCode == 200) {
|
|
if (data.returnCode == 200) {
|
|
for(var i=0;i<data.returnMsg.channelTypeList.length;i++){
|
|
for(var i=0;i<data.returnMsg.channelTypeList.length;i++){
|
|
channelTypeListInfo = data.returnMsg.channelTypeList[i];
|
|
channelTypeListInfo = data.returnMsg.channelTypeList[i];
|
|
- html += '<option value="'+ channelTypeListInfo.channelDivisionId +'">'+ channelTypeListInfo.channelType +'</option>';
|
|
|
|
|
|
+ html += '<option value="'+ channelTypeListInfo.channelName +'">'+ channelTypeListInfo.channelType +'</option>';
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
html = '';
|
|
html = '';
|
|
@@ -473,36 +471,34 @@
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- }
|
|
|
|
|
|
+ //}
|
|
}
|
|
}
|
|
|
|
|
|
/*初始化销售产品*/
|
|
/*初始化销售产品*/
|
|
function initPromotingProducts() {
|
|
function initPromotingProducts() {
|
|
- //默认为售前咨询
|
|
|
|
- //var customerCounselTypeOverall = allCustomerInfoType;
|
|
|
|
- var customerChannelCategory = null;
|
|
|
|
|
|
+ var promotingProductsInfo = null;
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "POST",
|
|
type: "POST",
|
|
data: {
|
|
data: {
|
|
- complaintConsultingType : customerChannelCategory
|
|
|
|
|
|
+ promotingProductsInfo : promotingProductsInfo
|
|
},
|
|
},
|
|
- url: "${path}/admin/complaintQuestion/list_complaintType",
|
|
|
|
|
|
+ url: "${path}/admin/customerBasic/query_promotingProductsList",
|
|
async: true,
|
|
async: true,
|
|
success: function(data){
|
|
success: function(data){
|
|
- var html = '<option value="">请选择渠道类别</option>';
|
|
|
|
|
|
+ var html = '<option value="">请选择销售产品</option>';
|
|
var id;
|
|
var id;
|
|
if (data.returnCode == 200) {
|
|
if (data.returnCode == 200) {
|
|
- for(var i=0;i<data.returnMsg.complaintTypeInfoList.length;i++){
|
|
|
|
- var complaintTypeInfo = data.returnMsg.complaintTypeInfoList[i];
|
|
|
|
|
|
+ for(var i=0;i<data.returnMsg.promotingProductsList.length;i++){
|
|
|
|
+ promotingProductsInfo = data.returnMsg.promotingProductsList[i];
|
|
if(i == 0 ){
|
|
if(i == 0 ){
|
|
- id = complaintTypeInfo.complaintId;
|
|
|
|
|
|
+ id = promotingProductsInfo.productId;
|
|
}
|
|
}
|
|
- html += '<option value="'+ complaintTypeInfo.complaintId +'">'+ complaintTypeInfo.complaintClassName +'</option>';
|
|
|
|
|
|
+ html += '<option value="'+ promotingProductsInfo.productId +'">'+ promotingProductsInfo.productName +'</option>';
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
html = '';
|
|
html = '';
|
|
}
|
|
}
|
|
- $("[name='complaintId']").html(html);
|
|
|
|
|
|
+ $("[name='promotingProducts']").html(html);
|
|
},
|
|
},
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
}
|
|
}
|
|
@@ -510,39 +506,105 @@
|
|
}
|
|
}
|
|
|
|
|
|
/*初始化产品价格*/
|
|
/*初始化产品价格*/
|
|
- function initSupplyPrice(complaintId,smallId){
|
|
|
|
- if(complaintId == null || complaintId == ""){
|
|
|
|
- var html = '<option value="">请选择渠道类别</option>';
|
|
|
|
- $("[name='smallClassId']").html(html);
|
|
|
|
|
|
+ function initSupplyPrice(promotingProductsId){
|
|
|
|
+ //var supplyPriceInfo = null;
|
|
|
|
+ if(promotingProductsId == null || promotingProductsId == ""){
|
|
|
|
+ var html = '<option value="">请选择销售产品</option>';
|
|
|
|
+ $("[name='promotingProducts']").html(html);
|
|
}else{
|
|
}else{
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "POST",
|
|
type: "POST",
|
|
data: {
|
|
data: {
|
|
- complaintId : complaintId
|
|
|
|
|
|
+ promotingProductsId : promotingProductsId
|
|
},
|
|
},
|
|
- url: "${path}/admin/complaintQuestion/list_complaintSmallClass",
|
|
|
|
|
|
+ url: "${path}/admin/customerBasic/query_supplyPriceList",
|
|
async: true,
|
|
async: true,
|
|
success: function(data){
|
|
success: function(data){
|
|
- var html = '<option value="">请选择渠道类型</option>';
|
|
|
|
|
|
+ var html = '<option value="">请选择产品价格</option>';
|
|
if (data.returnCode == 200) {
|
|
if (data.returnCode == 200) {
|
|
- for(var i=0;i<data.returnMsg.customerChannelTypeList.length;i++){
|
|
|
|
- var ComplaintSmallClassInfo = data.returnMsg.customerChannelTypeList[i];
|
|
|
|
- html += '<option value="'+ ComplaintSmallClassInfo.smallClassId +'">'+ ComplaintSmallClassInfo.smallClassName +'</option>';
|
|
|
|
|
|
+ for(var i=0;i<data.returnMsg.supplyPriceList.length;i++){
|
|
|
|
+ var supplyPriceInfo = data.returnMsg.supplyPriceList[i];
|
|
|
|
+ html += '<option value="'+ supplyPriceInfo.colorId +'">'+ supplyPriceInfo.colorPrice +'</option>';
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
html = '';
|
|
html = '';
|
|
}
|
|
}
|
|
- $("[name='smallClassId']").html(html);
|
|
|
|
-
|
|
|
|
- if(smallId != null && smallId != "" && typeof(smallId)!="undefined" ){
|
|
|
|
- $("select[name='smallClassId']").val(smallId);
|
|
|
|
- }
|
|
|
|
|
|
+ $("[name='supplyPrice']").html(html);
|
|
},
|
|
},
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /*保存对接联系人信息到列表*/
|
|
|
|
+ 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;
|
|
|
|
+ //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.innerHTML=contactName;
|
|
|
|
+ cell = row.insertCell();
|
|
|
|
+ cell.innerHTML=contactPhone;
|
|
|
|
+ cell = row.insertCell();
|
|
|
|
+ cell.innerHTML=contactType;
|
|
|
|
+ cell = row.insertCell();
|
|
|
|
+ cell.innerHTML=contactEmail;
|
|
|
|
+ cell = row.insertCell();
|
|
|
|
+ cell.innerHTML=operation;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ /*保存客户销售信息到列表*/
|
|
|
|
+ function toAddChannelSaleInfo() {
|
|
|
|
+ var channelCategory = document.getElementById("channelCategory").value;
|
|
|
|
+ var channelType = document.getElementById("channelType").value;
|
|
|
|
+ var channelName = document.getElementById("channelName").value;
|
|
|
|
+ var promotingProducts = document.getElementById("promotingProducts").value;
|
|
|
|
+ var supplyPrice = document.getElementById("supplyPrice").value;
|
|
|
|
+ var accountPeriod = document.getElementById("accountPeriod").value;
|
|
|
|
+ var operation = "删除";
|
|
|
|
+ //var operation = var operation = "<a href='javascript:;' onclick='deleteChannelSale(this)'>删除</a>";
|
|
|
|
+ row = document.getElementById("saleTable").insertRow();
|
|
|
|
+ if(row!=null){
|
|
|
|
+ cell=row.insertCell();
|
|
|
|
+ cell.innerHTML=channelCategory;
|
|
|
|
+ cell = row.insertCell();
|
|
|
|
+ cell.innerHTML=channelType;
|
|
|
|
+ cell = row.insertCell();
|
|
|
|
+ cell.innerHTML=channelName;
|
|
|
|
+ cell = row.insertCell();
|
|
|
|
+ cell.innerHTML=promotingProducts;
|
|
|
|
+ cell = row.insertCell();
|
|
|
|
+ cell.innerHTML=supplyPrice;
|
|
|
|
+ cell = row.insertCell();
|
|
|
|
+ cell.innerHTML=accountPeriod;
|
|
|
|
+ cell = row.insertCell();
|
|
|
|
+ cell.innerHTML=operation;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ /*添加客户信息*/
|
|
|
|
+ function addCustomerBasicInfo() {
|
|
|
|
+ alert("addCustomerBasicInfo...");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 删除对接联系人函数
|
|
|
|
+ function deleteContact(x){
|
|
|
|
+ $(x).parent().parent().remove();
|
|
|
|
+ // tr.parentNode.removeChild(tr);
|
|
|
|
+ }
|
|
|
|
+ // 删除客户销售渠道信息函数
|
|
|
|
+ function deleteChannelSale(x){
|
|
|
|
+ var tr = x.parentNode.parentNode;
|
|
|
|
+ tr.parentNode.removeChild(tr);
|
|
|
|
+ }
|
|
/*业务逻辑js控制 end*/
|
|
/*业务逻辑js控制 end*/
|
|
</script>
|
|
</script>
|
|
|
|
|