| | |
| | | shoulibool = false; |
| | | } else if (pageEntitiesJson[i].PageName == "撤单") { |
| | | chedanbool = false; |
| | | } else if (pageEntitiesJson[i].PageName == "完工") { |
| | | } else if (pageEntitiesJson[i].PageName == "确认订单") { |
| | | wangongbool = false; |
| | | } else if (pageEntitiesJson[i].PageName == "送货") { |
| | | songhuobool = false; |
| | |
| | | { |
| | | label: '订单号', name: 'OrderNo', labtype: 'txt', hidden: false, width: 100, |
| | | formatter: function (cellvalue, options, rowObject) { |
| | | var color = ""; |
| | | if (rowObject.OrderType == '08') { |
| | | color = "red"; |
| | | } |
| | | |
| | | if (rowObject.ShouliStatus == "A") { |
| | | return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/CooperOrder/Edit?id=" + rowObject.Id + "&ShouliStatus=" + rowObject.ShouliStatus + "')\" >" + cellvalue + "</a>"; |
| | | return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/CooperOrder/Edit?id=" + rowObject.Id + "&ShouliStatus=" + rowObject.ShouliStatus + "')\" ><span style='color:" + color + ";'>" + cellvalue + "</span></a>"; |
| | | } else { |
| | | return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/CooperOrder/Edit?id=" + rowObject.Id + "&ShouliStatus=" + rowObject.ShouliStatus + "')\" >" + cellvalue + "</a>"; |
| | | return "<a onclick=\"OpenWindow('" + cellvalue.replace(/'/g, '') + "','98%','100%', '/CooperOrder/Edit?id=" + rowObject.Id + "&ShouliStatus=" + rowObject.ShouliStatus + "')\" ><span style='color:" + color + ";'>" + cellvalue + "</span></a>"; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | { label: '金额', name: 'Money', labtype: 'txt', hidden: false, width: 60 }, |
| | | { label: '订单状态', name: 'ShouliStatusName', labtype: 'txt', hidden: false, width: 60 }, |
| | | { label: '制单人', name: 'CreaterName', labtype: 'txt', hidden: false, width: 60 }, |
| | | { |
| | | label: '受理', name: 'ShouliStatus', labtype: 'txt', hidden: shoulibool, width: 60, |
| | | formatter: function (cellvalue, options, rowObject) { |
| | |
| | | } |
| | | }, |
| | | { |
| | | label: '完工', name: 'WangongStatusName', labtype: 'txt', hidden: true, width: 60, |
| | | label: '确认订单', name: 'WangongStatusName', labtype: 'txt', hidden: false, width: 60, |
| | | formatter: function (cellvalue, options, rowObject) { |
| | | if (rowObject.ShouliStatus == '4' || rowObject.ShouliStatus == '5' ) { |
| | | if (rowObject.WangongStatus == 'A' ) { |
| | | return "√"; |
| | | } else { |
| | | if (rowObject.ShouliStatus == '1' || rowObject.ChedanStatus == 'A') { |
| | | if (rowObject.ShouliStatus == '1' || rowObject.ChedanStatus == 'A' || rowObject.OrderType != '08' ) { |
| | | return ""; |
| | | } else { |
| | | return "<a onclick=\"wangong('" + rowObject.Id + "')\" >完工</a>"; |
| | | return "<a onclick=\"wangong('" + rowObject.Id + "')\" >确认订单</a>"; |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | function chedan(id) { |
| | | OpenWindow("撤单", "20%", "30%", "/CooperOrder/Chedan?id=" + id); |
| | | OpenWindow("撤单", "50%", "60%", "/CooperOrder/Chedan?id=" + id); |
| | | } |
| | | |
| | | function huifang(id) { |
| | |
| | | var index = layer.open({ |
| | | type: 1, //基本层类型 |
| | | icon: 0, //图标 |
| | | content: '确认完工?', //内容 |
| | | content: '确认订单?', //内容 |
| | | shade: 0.3, //遮罩,如果想定义别的颜色,可以shade:[0.5,'#fff'] |
| | | shadeClose: 1, //是否点击遮罩关闭 |
| | | skin: 'demoClass', //样式类名 |
| | |
| | | success: function (data) { |
| | | |
| | | if (data.Result) { |
| | | toastr.success("完工成功"); |
| | | toastr.success("确认订单"); |
| | | window._reloadPageData(); |
| | | } else { |
| | | toastr.error("完工失败" + data.Message); |
| | | toastr.error("确认订单失败" + data.Message); |
| | | } |
| | | }, |
| | | error: function () { |
| | | |
| | | |
| | | toastr.error("完工失败"); |
| | | toastr.error("确认订单失败"); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | |
| | | } |
| | | |
| | | jQuery("#jqGrid").jqGrid("footerData", "set", { KhdwName: "<font color='darkgoldenrod'>--当页合计--</font> </br> <font color='darkgoldenrod'>--合计--</font>", OrderNum: "<font color='darkgoldenrod'>" + xhr.DangyeHeji1 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji1 + "</font>", Price: "<font color='darkgoldenrod'>" + xhr.DangyeHeji2 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji2 + "</font>", Money: "<font color='darkgoldenrod'>" + xhr.DangyeHeji3 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji3 + "</font>", Youhui: "<font color='darkgoldenrod'>" + xhr.DangyeHeji4 + "</font></br><font color='darkgoldenrod'>" + xhr.Heji4 + "</font>"}); |
| | | |
| | | }; |
| | | </script> |