From 558dae4a18d393ac38daa43a354e8bc9a22e4e26 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期四, 02 十一月 2023 16:52:59 +0800
Subject: [PATCH] 班次安排座位
---
zhengcaioa/zhengcaioa/Views/CooperOrder/Index.cshtml | 268 +++++++++++++++++++++++++++++++++++++---------------
1 files changed, 189 insertions(+), 79 deletions(-)
diff --git a/zhengcaioa/zhengcaioa/Views/CooperOrder/Index.cshtml b/zhengcaioa/zhengcaioa/Views/CooperOrder/Index.cshtml
index ee7dbd3..a920611 100644
--- a/zhengcaioa/zhengcaioa/Views/CooperOrder/Index.cshtml
+++ b/zhengcaioa/zhengcaioa/Views/CooperOrder/Index.cshtml
@@ -1,6 +1,11 @@
-锘緻{
+锘緻using DTO;
+@{
ViewBag.Title = "CooperOrder";
Layout = "~/Views/Shared/_Layout_Search.cshtml";
+
+ List<PageEntity> ActionInfo2 = ViewData["ActionInfo2"] as List<PageEntity>;
+
+ string Creater = ViewData["Creater"] as string;
}
@section headerStyle{
<script type="text/javascript">
@@ -10,6 +15,8 @@
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);
@@ -28,7 +35,7 @@
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;
@@ -38,9 +45,9 @@
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 },
@@ -48,16 +55,32 @@
{
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: '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 },
@@ -65,6 +88,7 @@
{ 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) {
@@ -92,15 +116,15 @@
}
},
{
- label: '瀹屽伐', name: 'WangongStatusName', labtype: 'txt', hidden: wangongbool, 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>";
}
}
@@ -110,7 +134,7 @@
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 "";
@@ -132,12 +156,12 @@
}
} 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') {
@@ -153,39 +177,86 @@
},
{
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) {
- return "<a onclick=\"OpenWindow('" + rowObject.OrderNo.replace(/'/g, '') + "','98%','100%', '/CooperOrder/Print?id=" + rowObject.Id + "')\" >鎵撳嵃</a>";
+ return "<a class='Dayin' style='display: none;' onclick=\"OpenWindow('" + rowObject.OrderNo.replace(/'/g, '') + "','98%','100%', '/CooperOrder/Print?id=" + rowObject.Id + "')\" >鎵撳嵃</a>";
+
+
+ }
+ },
+ {
+ label: '鎵撳嵃鍚堝悓', name: 'OrderType', labtype: 'txt', hidden: false, width: 60,
+ formatter: function (cellvalue, options, rowObject) {
+ if (rowObject.OrderType == '03') {
+ return "<a class='Dayinhetong' style='display: none;' onclick=\"OpenWindow('" + rowObject.OrderNo.replace(/'/g, '') + "','100%','100%', '/CooperOrder/Printbiaoshuhetong?id=" + rowObject.Id + "')\" >鎵撳嵃鍚堝悓</a>";
+ }
+ else if (rowObject.OrderType == '02' && (rowObject.OrderType1 == '浠f嫙璐ㄧ枒鍑�' || rowObject.OrderType1 == '浠f嫙鎶曡瘔涔�')) {
+ return "<a class='Dayinhetong' style='display: none;' onclick=\"OpenWindow('" + rowObject.OrderNo.replace(/'/g, '') + "','100%','100%', '/CooperOrder/Printzhiyitousuhetong?id=" + rowObject.Id + "')\" >鎵撳嵃鍚堝悓</a>";
+ }
+ else if (rowObject.OrderType == '05') {
+ return "<a class='Dayinhetong' style='display: none;' onclick=\"OpenWindow('" + rowObject.OrderNo.replace(/'/g, '') + "','100%','100%', '/CooperOrder/Printhuiyuanhetong?id=" + rowObject.Id + "')\" >鎵撳嵃鍚堝悓</a>";
+ }
+ else if (rowObject.OrderType == '08') {
+ return "<a class='Dayinhetong' style='display: none;' onclick=\"OpenWindow('" + rowObject.OrderNo.replace(/'/g, '') + "','100%','100%', '/CooperOrder/Printfengxianhetong?id=" + rowObject.Id + "')\" >鎵撳嵃鍚堝悓</a>";
+ }
+
+ else {
+ return "";
+ }
+
+
}
},
+ {
+ label: '鏂板璁㈠崟', name: 'dingdantype', labtype: 'txt', hidden: false, width: 60,
+ formatter: function (cellvalue, options, rowObject) {
+ if (rowObject.OrderType == '02' && rowObject.OrderType1 == '浠f嫙璐ㄧ枒鍑�' ) {
+ return "<a class='Xinzeng' style='display: none;' onclick=\"OpenWindow('浠f嫙鎶曡瘔涔�','100%','100%', '/CooperOrder/Edit?id=" + rowObject.Id + "&dingdantype=1')\" >浠f嫙鎶曡瘔涔�</a>";
+ }
+ else if (rowObject.OrderType == '02' && rowObject.OrderType1 == '浠f嫙鎶曡瘔涔�') {
+ return "<a class='Xinzeng' style='display: none;' onclick=\"OpenWindow('澶嶈璇夎','100%','100%', '/CooperOrder/Edit?id=" + rowObject.Id + "&dingdantype=2')\" >澶嶈璇夎</a>";
+ }
+ else if (rowObject.OrderType == '08' && rowObject.OrderType1 == '澶嶈璇夎') {
+ return "<a class='Xinzeng' style='display: none;' onclick=\"OpenWindow('澶嶈璇夎','100%','100%', '/CooperOrder/Edit?id=" + rowObject.Id + "&dingdantype=3')\" >澶嶈璇夎</a>";
+ }
+ else {
+ return "";
+ }
+
+
+
+
+ }
+ },
];
-
- dataUrl = "/CooperOrder/GetList";
+
+ dataUrl = "/CooperOrder/GetList"+"@(string.IsNullOrEmpty(Creater)?"": "?Ywjl=" + Creater)";
searchCol = [
{ label: '涓嬪崟鏃堕棿', name: 'XdTime', labtype: 'datearea', hidden: false },
{ label: '璁㈠崟缂栧彿', name: 'OrderNo', labtype: 'txt', hidden: false },
@@ -196,9 +267,9 @@
{ 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%' },
-
-
+ { label: '鍒跺崟浜�', name: 'Creater', labtype: 'combox', hidden: false, data: JSON.parse(users), cwidth: '5%', cccwidth: '8%' },
@@ -230,7 +301,7 @@
global: false,
data: "",
success: function (data) {
-
+
if (data.Result) {
toastr.success("鍙楃悊鎴愬姛");
window._reloadPageData();
@@ -257,11 +328,11 @@
}
function chedan(id) {
- OpenWindow("鎾ゅ崟", "20%", "30%", "/CooperOrder/Chedan?id=" + id);
+ OpenWindow("鎾ゅ崟", "50%", "60%", "/CooperOrder/Chedan?id=" + id);
}
function huifang(id) {
- OpenWindow("鍥炶", "20%", "30%", "/CooperOrder/Huifang?id=" + id);
+ OpenWindow("鍥炶", "50%", "60%", "/CooperOrder/Huifang?id=" + id);
}
function pingjia(id) {
@@ -270,47 +341,47 @@
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) {
@@ -319,7 +390,7 @@
var index = layer.open({
type: 1,銆�銆�//鍩烘湰灞傜被鍨�
icon: 0, //鍥炬爣
- content: '纭瀹屽伐锛�', //鍐呭
+ content: '纭璁㈠崟锛�', //鍐呭
shade: 0.3, //閬僵,濡傛灉鎯冲畾涔夊埆鐨勯鑹�,鍙互shade:[0.5,'#fff']
shadeClose: 1, //鏄惁鐐瑰嚮閬僵鍏抽棴
skin: 'demoClass', //鏍峰紡绫诲悕
@@ -336,18 +407,18 @@
global: false,
data: "",
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("纭璁㈠崟澶辫触");
}
});
},
@@ -356,6 +427,30 @@
// }
});
}
+
+ 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("淇濆瓨鎴愬姛");
@@ -372,7 +467,22 @@
toastr.error("鍒犻櫎鎴愬姛");
/**/
}
-}
+ }
+ var ActionInfo22 = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ActionInfo2))';
+
+ var _afterLoadDataload = function (xhr) {
+ var data = JSON.parse(ActionInfo22);
+ for (var o in data) {
+ //alert(o);
+ //alert(data[o]);
+ /* alert("PageShortcut:" + data[o].PageShortcut + " PageName:" + data[o].PageName);*/
+ $("." + data[o].PageShortcut).show();
+
+ }
+
+ 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>
}
--
Gitblit v1.9.1