| | |
| | | var Khlx = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Khlx))'; |
| | | var HuifangStatus = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.HuifangStatus))'; |
| | | var PingjiaStatus = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.PingjiaStatus))'; |
| | | var ShouliStatus = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.ShouliStatus))'; |
| | | |
| | | |
| | | var pageEntities = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.pageEntities))'; |
| | | var pageEntitiesJson = JSON.parse(pageEntities); |
| | |
| | | pingjiabool = false; |
| | | } else if (pageEntitiesJson[i].PageName == "优惠") { |
| | | youhuibool = false; |
| | | } |
| | | } |
| | | } |
| | | |
| | | //gridConfig = { multiselect: true, selectcol: "Id" }; |
| | | loseherght = 60; |
| | | dataCol = [ |
| | | { label: 'id', name: 'Id', labtype: 'txt', hidden: true }, |
| | |
| | | } |
| | | }, |
| | | |
| | | { label: '订单类别', name: 'OrderTypeName', labtype: 'txt', hidden: false, width: 100 }, |
| | | { |
| | | label: '订单类别', name: 'OrderTypeName', labtype: 'txt', hidden: false, width: 100, |
| | | formatter: function (cellvalue, options, rowObject) { |
| | | var OrderTypea = rowObject.OrderTypeName; |
| | | if (rowObject.OrderType1Name != null && rowObject.OrderType1Name != '') { |
| | | OrderTypea += '-' + rowObject.OrderType1Name; |
| | | } |
| | | if (rowObject.OrderType2 != null && rowObject.OrderType2 != '') { |
| | | OrderTypea += '-' + rowObject.OrderType2; |
| | | } |
| | | return OrderTypea; |
| | | } }, |
| | | { label: '客户名称', name: 'KhdwName', labtype: 'txt', hidden: false, width: 200 }, |
| | | |
| | | { label: '数量', name: 'OrderNum', labtype: 'txt', hidden: false, width: 60 }, |
| | |
| | | label: '送货', name: 'SonghuoStatusName', labtype: 'txt', hidden: songhuobool, width: 60, |
| | | formatter: function (cellvalue, options, rowObject) { |
| | | if (rowObject.ShouliStatus == '5') { |
| | | return "√"; |
| | | return "<a onclick=\"songhuo('" + rowObject.Id + "')\" >√</a>"; |
| | | } else { |
| | | if (rowObject.ShouliStatus == '1' || rowObject.ChedanStatus == 'A') { |
| | | return ""; |
| | |
| | | } |
| | | |
| | | } else { |
| | | return "√"; |
| | | return "<a onclick=\"huifang('" + rowObject.Id + "')\" >√</a>"; |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | label: '评价', name: 'PingjiaStatusName', labtype: 'txt', hidden: pingjiabool, width: 60, |
| | | label: '评价', name: 'PingjiaStatusName', labtype: 'txt', hidden: true, width: 60, |
| | | formatter: function (cellvalue, options, rowObject) { |
| | | if (rowObject.PingjiaStatus == 'D') { |
| | | if (rowObject.ShouliStatus == '1') { |
| | |
| | | }, |
| | | { |
| | | label: '优惠/元', name: 'Youhui', labtype: 'txt', hidden: youhuibool, width: 60, |
| | | formatter: function (cellvalue, options, rowObject) { |
| | | if (rowObject.YouhuiStatus == null || rowObject.YouhuiStatus == 'null' || rowObject.YouhuiStatus == '') { |
| | | if (rowObject.ShouliStatus == '1' || rowObject.ChedanStatus == 'A' ) { |
| | | if (rowObject.ChedanStatus == 'A') { |
| | | return cellvalue; |
| | | } else { |
| | | return ""; |
| | | } |
| | | //formatter: function (cellvalue, options, rowObject) { |
| | | // if (rowObject.YouhuiStatus == null || rowObject.YouhuiStatus == 'null' || rowObject.YouhuiStatus == '') { |
| | | // if (rowObject.ShouliStatus == '1' || rowObject.ChedanStatus == 'A' ) { |
| | | // if (rowObject.ChedanStatus == 'A') { |
| | | // return cellvalue; |
| | | // } else { |
| | | // return ""; |
| | | // } |
| | | |
| | | } else { |
| | | return "<a onclick=\"youhui('" + rowObject.Id + "')\" >优惠</a>"; |
| | | } |
| | | // } else { |
| | | // return "<a onclick=\"youhui('" + rowObject.Id + "')\" >优惠</a>"; |
| | | // } |
| | | |
| | | } else { |
| | | return cellvalue; |
| | | } |
| | | } }, |
| | | // } else { |
| | | // return cellvalue; |
| | | // } |
| | | //} |
| | | }, |
| | | { |
| | | label: '打印', name: 'OrderType', labtype: 'txt', hidden: false, width: 60, |
| | | formatter: function (cellvalue, options, rowObject) { |
| | |
| | | ]; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | dataUrl = "/CooperOrder/GetList"; |
| | |
| | | { label: '回访', name: 'HuifangStatus', labtype: 'combox', hidden: false, data: JSON.parse(HuifangStatus), cwidth: '5%', cccwidth: '8%' }, |
| | | { label: '评价', name: 'PingjiaStatus', labtype: 'combox', hidden: false, data: JSON.parse(PingjiaStatus), cwidth: '5%', cccwidth: '8%' }, |
| | | |
| | | |
| | | |
| | | { label: '订单状态', name: 'ShouliStatus', labtype: 'combox', hidden: false, data: JSON.parse(ShouliStatus), cwidth: '5%', cccwidth: '8%' }, |
| | | |
| | | |
| | | |
| | | |
| | |
| | | global: false, |
| | | data: "", |
| | | success: function (data) { |
| | | |
| | | |
| | | if (data.Result) { |
| | | toastr.success("受理成功"); |
| | | window._reloadPageData(); |
| | |
| | | } |
| | | |
| | | function huifang(id) { |
| | | OpenWindow("回访", "20%", "30%", "/CooperOrder/Huifang?id=" + id); |
| | | OpenWindow("回访", "50%", "60%", "/CooperOrder/Huifang?id=" + id); |
| | | } |
| | | |
| | | function pingjia(id) { |
| | |
| | | |
| | | |
| | | function songhuo(id) { |
| | | OpenWindow("送货", "50%", "60%", "/CooperOrder/Songhuo?id=" + id); |
| | | //// 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 () { //按钮一的回调 |
| | | |
| | | // 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); |
| | | |
| | | layer.close(index); |
| | | // $.ajax({ |
| | | // type: "GET", |
| | | // url: "/CooperOrder/Songhuo?id=" + id, |
| | | // dataType: "json", |
| | | // global: false, |
| | | // data: "", |
| | | // success: function (data) { |
| | | |
| | | $.ajax({ |
| | | type: "GET", |
| | | url: "/CooperOrder/Songhuo?id=" + id, |
| | | dataType: "json", |
| | | global: false, |
| | | data: "", |
| | | success: function (data) { |
| | | |
| | | if (data.Result) { |
| | | toastr.success("送货成功"); |
| | | window._reloadPageData(); |
| | | } else { |
| | | toastr.error("送货失败" + data.Message); |
| | | } |
| | | }, |
| | | error: function () { |
| | | // if (data.Result) { |
| | | // toastr.success("送货成功"); |
| | | // window._reloadPageData(); |
| | | // } else { |
| | | // toastr.error("送货失败" + data.Message); |
| | | // } |
| | | // }, |
| | | // error: function () { |
| | | |
| | | |
| | | toastr.error("送货失败"); |
| | | } |
| | | }); |
| | | }, |
| | | // btn2:function(){ //按钮二的回调 |
| | | // |
| | | // } |
| | | }); |
| | | // toastr.error("送货失败"); |
| | | // } |
| | | // }); |
| | | // }, |
| | | // // btn2:function(){ //按钮二的回调 |
| | | // // |
| | | // // } |
| | | //}); |
| | | } |
| | | |
| | | function wangong(id) { |
| | |
| | | global: false, |
| | | data: "", |
| | | success: function (data) { |
| | | |
| | | |
| | | if (data.Result) { |
| | | toastr.success("完工成功"); |
| | | window._reloadPageData(); |
| | |
| | | // } |
| | | }); |
| | | } |
| | | |
| | | var _pagePrint = function () { |
| | | |
| | | var XdTime = $("#PBSXdTime").val(); |
| | | var OrderNo = $("#PBSOrderNo").val(); |
| | | var OrderType = $("#PBSOrderType").val(); |
| | | var Ywjl = $("#PBSYwjl").val(); |
| | | var KhdwName = $("#PBSKhdwName").val(); |
| | | |
| | | |
| | | var Khlx = $("#PBSKhlx").val(); |
| | | var HuifangStatus = $("#PBSHuifangStatus").val(); |
| | | var PingjiaStatus = $("#PBSPingjiaStatus").val(); |
| | | |
| | | |
| | | |
| | | var url = "/CooperOrder/printList?XdTime=" + XdTime + "&OrderNo=" + OrderNo + "&OrderType=" + OrderType + "&Ywjl=" + Ywjl + "&KhdwName=" + KhdwName + "&Khlx=" + Khlx + "&HuifangStatus=" + HuifangStatus + "&PingjiaStatus=" + PingjiaStatus; |
| | | var me = window.open(url, "打印"); //打开新窗口 |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | var _afterSave = function (result) { |
| | | if (result) { |
| | | toastr.success("保存成功"); |