LR-20210131IOQH\Administrator
2021-08-10 d4a6d65f5e449c3e5464aa18ae97bf8953987217
zhengcaioa/zhengcaioa/Views/IntentionCustomer/IndexYiXiang.cshtml
New file
@@ -0,0 +1,162 @@
@{
    ViewBag.Title = "IntentionCustomer";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
    string ywjlId = ViewBag.ywjlId as string;
}
@section headerStyle{
    <script type="text/javascript">
        var ywjls = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.ywjl))';
         var khlys = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.khly))';
         var Dianxiaozhuanyuans = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Dianxiaozhuanyuan))';
        loseherght = 60;
        gridConfig = { multiselect: true, selectcol: "Id" };
        dataCol = [
            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
            { label: '意向时间', name: 'YixiangtimeName', labtype: 'txt', hidden: false, width: 100 },
            { label: '意向来源', name: 'KhlyName', labtype: 'txt', hidden: false, width: 100 },
            { label: '电销专员', name: 'DianxiaozhuanyuanName', labtype: 'txt', hidden: false, width: 100 },
            {
                label: '客户单位', name: 'Name', labtype: 'txt', hidden: false, width: 400,
                formatter: function (cellvalue, options, rowObject) {
                    return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/IntentionCustomer/Edit?id=" + rowObject.Id + "')\"  >" + cellvalue + "</a>";
                }
            },
            { label: '承办人', name: 'YwjlName', labtype: 'txt', hidden: false, width: 100 },
            { label: '最近跟踪时间', name: 'ZuijinzhuizongtimeName', labtype: 'txt', hidden: false, width: 100 },
            {
                label: '跟踪记录', name: 'Name111', labtype: 'txt', hidden: false, width: 100,
                formatter: function (cellvalue, options, rowObject) {
                    return "<a onclick=\"OpenWindow('跟踪记录','98%','100%', '/IntentionVisit/Index?IsYwjl=true&Viscustomer=" + rowObject.Id + "')\"  >跟踪记录</a>";
                }
            },
        ];
        dataUrl = "/IntentionCustomer/GetList?Yixiang=05&YwjlYx=@ywjlId";
        searchCol = [
            { label: '意向时间', name: 'Yixiangtime', labtype: 'datearea', hidden: false },
            { label: '意向来源', name: 'Khly', labtype: 'combox', hidden: false, data: JSON.parse(khlys)/*, cwidth: '5%', cccwidth: '8%'*/ },
            { label: '电销专员', name: 'Dianxiaozhuanyuan', labtype: 'combox', hidden: false, data: JSON.parse(Dianxiaozhuanyuans)/*, cwidth: '5%', cccwidth: '8%' */},
            { label: '客户单位', name: 'Name', labtype: 'txt', hidden: false },
            { label: '承办人', name: 'Ywjl', labtype: 'combox', hidden: false, data: JSON.parse(ywjls) },
        ];
        var _pageDelete = function () {
            var duanxin = GetGridSelect();
            var baifangid = "";
            if (duanxin != '') {
                for (var i = 0; i < duanxin.length; i++) {
                    baifangid += duanxin[i] + ','
                }
                baifangid = baifangid.substring(0, baifangid.length - 1);
            } else {
                toastr.error("请选择意向订单");
                return;
            }
            // 1、打开弹出层
            var index = layer.open({
                type: 1,  //基本层类型
                icon: 0, //图标
                content: '确定要删除意向订单吗?',   //内容
                shade: 0.3,  //遮罩,如果想定义别的颜色,可以shade:[0.5,'#fff']
                shadeClose: 1,   //是否点击遮罩关闭
                skin: 'demoClass',    //样式类名
                moveType: 1, //拖拽风格,默认为0(会有个过度的透明框)
                btn: ['确定', '取消'],    //按钮
                btn1: function () { //按钮一的回调
                    layer.close(index);
                    $.ajax({
                        type: "POST",
                        url: "/IntentionCustomer/UnBind?id=" + baifangid,
                        dataType: "json",
                        global: false,
                        data: "",
                        success: function (data) {
                            if (data.Result) {
                                toastr.success("删除成功");
                                jQuery('#jqGrid').jqGrid().trigger('reloadGrid');
                            } else {
                                toastr.error("删除失败" + data.Message);
                            }
                        },
                        error: function () {
                            toastr.error("删除失败");
                        }
                    });
                },
                //                btn2:function(){    //按钮二的回调
                //
                //                }
            });
        }
        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">
    </script>
}