<!doctype html>
|
<html>
|
<head>
|
[#include "/business/wechat/include/title.html" /]
|
[#include "/business/wechat/include/wheader.html" /]
|
</head>
|
|
<body>
|
<header class="kltit"><div class="present"><a href="javascript:saveKu();">确定</a></div><a href="javascript:history.go(-1);" ><span></span></a>选择${Constants.CUSTOMER_CONSTANTS}</header>
|
<div class="search-bg">
|
<div class="search-box">
|
<input type="text" placeholder="请输入${Constants.CUSTOMER_CONSTANTS}名称" id="cusName" >
|
<a href="javascript:query();"><span></span></a>
|
</div>
|
</div>
|
|
<div id="main"></div>
|
</body>
|
<script type="text/javascript">
|
function query() {
|
var cusName = $.util.encode($.trim($("#cusName").val()));
|
var param = {"cusName":cusName,"ids":"${ids}"};
|
$.post("${base}/ewyw/ewKnowledge/ewChooseCusData.html",param,function(data,textStatus) {
|
$("#main").html(data);
|
});
|
}
|
|
|
$(function() {
|
query();
|
})
|
function saveKu(){
|
var checkedBox = $(".item-foucs");
|
if(checkedBox.length==0) {
|
popupTips("请选择用户");
|
return;
|
}
|
|
var cusIdArray = new Array();
|
var cusListArray = new Array();
|
checkedBox.each(function() {
|
cusIdArray.push($.trim($(this).find(".cus").prop("id")));
|
cusListArray.push($.trim($(this).find(".cus").val()));
|
});
|
var cusId = cusIdArray.join(",");
|
var cusList = cusListArray.join(",");
|
|
$.post("${base}/ewyw/ewKnowledge/saveCusInfo.html",{"cusId":cusId,"cusList":cusList},function(data,textStatus) {
|
if(data=="1") {
|
popupTips("添加成功");
|
window.location.href = "${base}/ewyw/ewKnowledge/ewAddKnowledge.html";
|
} else {
|
popupTips("添加失败");
|
}
|
})
|
}
|
</script>
|
</html>
|