@{
|
ViewBag.Title = "CooperVisit";
|
Layout = "~/Views/Shared/_Layout_Search.cshtml";
|
string Viscustomer = ViewBag.Viscustomer as string;
|
}
|
@section headerStyle{
|
<script type="text/javascript">
|
var khlxs = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.khlx))';
|
var khlys = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.khly))';
|
var hyfls = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.hyfl))';
|
var users = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.users))';
|
var shengDropDown = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.ShengDropDown))';
|
|
loseherght = 60;
|
gridConfig = { multiselect: true, selectcol: "Id" };
|
dataCol = [
|
{ label: 'id', name: 'Id', labtype: 'txt', hidden: true },
|
|
{
|
label: '拜访时间', name: 'VistimeName', labtype: 'txt', hidden: false, width: 100,
|
formatter: function (cellvalue, options, rowObject) {
|
return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/CooperVisit/Edit?id=" + rowObject.Id + "')\" >" + cellvalue + "</a>";
|
}
|
},
|
|
//{ label: '所属区域', name: 'ShengName', labtype: 'txt', hidden: false, width: 100 },
|
{ label: '客户单位', name: 'Name', labtype: 'txt', hidden: false, width: 100 },
|
{ label: '拜访方式', name: 'VisTypeName', labtype: 'txt', hidden: false, width: 100 },
|
{ label: '接待人', name: 'Jdr', labtype: 'txt', hidden: false, width: 100},
|
{ label: '职务', name: 'ZwName', labtype: 'txt', hidden: false, width: 100 },
|
{ label: '交谈内容', name: 'Talk', labtype: 'txt', hidden: false, width: 100 },
|
{ label: '客户反馈', name: 'Khfk', labtype: 'txt', hidden: false, width: 100 },
|
{ label: '成交意向', name: 'YxName', labtype: 'txt', hidden: false, width: 100 },
|
{ label: '跟踪建议', name: 'JyName', labtype: 'txt', hidden: false, width: 100 },
|
|
];
|
dataUrl = "/CooperVisit/GetList?Viscustomer=@Viscustomer";
|
searchCol = [
|
{ label: '客户来源', name: 'Khly', labtype: 'combox', hidden: false, data: JSON.parse(khlys), cwidth: '5%', cccwidth: '8%' },
|
{ label: '行业分类', name: 'Hyfl', labtype: 'combox', hidden: false, data: JSON.parse(hyfls), cwidth: '5%', cccwidth: '15%' },
|
{ label: '客户类型', name: 'Khlx', labtype: 'combox', hidden: false, data: JSON.parse(khlxs), cwidth: '5%', cccwidth: '8%' },
|
{ label: '业务经理', name: 'Ywjl', labtype: 'combox', hidden: false, data: JSON.parse(users), cwidth: '5%', cccwidth: '8%' },
|
|
{ label: '省', name: 'Sheng', labtype: 'combox', hidden: false, data: JSON.parse(shengDropDown), cwidth: '5%', cccwidth: '8%' },
|
{ label: '市', name: 'City', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '1%', cccwidth: '8%' },
|
{ label: '区县', name: 'AreaId', labtype: 'combox', hidden: false, data: JSON.parse('[]'), cwidth: '2%', cccwidth: '8%' },
|
{ label: '客户单位', name: 'Name', labtype: 'txt', hidden: false },
|
{ label: '拜访时间', name: 'Vistime', labtype: 'datearea', hidden: false },
|
|
|
|
];
|
var _pageAdd = function () {
|
OpenWindow("新增合作客户回访", "98%", "90%", "/CooperVisit/Edit?Viscustomer=@Viscustomer");
|
}
|
|
|
|
|
var _afterSave = function (result) {
|
if (result) {
|
toastr.success("保存成功");
|
} else {
|
toastr.error("保存失败");
|
}
|
}
|
|
var _afterDel = function (result) {
|
if (result) {
|
toastr.success("删除成功");
|
} else {
|
/**/
|
toastr.error("删除成功");
|
/**/
|
}
|
}
|
</script>
|
}
|
|
@section footerScripts{
|
<script type="text/javascript">
|
|
function send() {
|
|
var msg = $("#PBSSheng");
|
|
|
if (msg.length > 0) {
|
$("#PBSSheng").change(function () {
|
var sheng = $("#PBSSheng").val();
|
$.ajax({
|
type: "GET",
|
url: "/Project/getCity?shengid=" + sheng,
|
dataType: "json",
|
global: false,
|
data: "",
|
success: function (data) {
|
|
var city = $("#PBSCity");
|
city.find('option').remove();
|
var aaa = '<option value="" hassubinfo="true"> </option>';
|
city.append(aaa);
|
if (data.length > 0) {
|
for (var i = 0; i < data.length; i++) {
|
|
var o = '<option value="' + data[i].CodeId + '" hassubinfo="true">' + data[i].Name + '</option>';
|
city.append(o);
|
}
|
}
|
$("#PBSCity").trigger('chosen:updated');//更新选项
|
},
|
error: function () {
|
|
|
parent.layer.msg('失败', { icon: 5 });
|
}
|
});
|
});
|
|
} else {
|
setTimeout(send, 1000);
|
} }
|
|
|
send();
|
|
|
|
function sendCity() {
|
|
var msg = $("#PBSCity");
|
|
|
if (msg.length > 0) {
|
$("#PBSCity").change(function () {
|
|
var city = $("#PBSCity").val();
|
$.ajax({
|
type: "GET",
|
url: "/Project/getAreaId?cityid=" + city,
|
dataType: "json",
|
global: false,
|
data: "",
|
success: function (data) {
|
|
var quxian = $("#PBSAreaId");
|
quxian.find('option').remove();
|
var aaa = '<option value="" hassubinfo="true"> </option>';
|
quxian.append(aaa);
|
if (data.length > 0) {
|
for (var i = 0; i < data.length; i++) {
|
|
var o = '<option value="' + data[i].CodeId + '" hassubinfo="true">' + data[i].Name + '</option>';
|
quxian.append(o);
|
}
|
}
|
$("#PBSAreaId").trigger('chosen:updated');//更新选项
|
},
|
error: function () {
|
|
|
parent.layer.msg('失败', { icon: 5 });
|
}
|
});
|
});
|
|
} else {
|
setTimeout(sendCity, 1000);
|
}
|
}
|
|
|
sendCity();
|
|
|
|
|
</script>
|
}
|