protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { pssid = Request.Params["ps_sid"] == null ? "" : Request.Params["ps_sid"].Trim(); DataTable dt = new DataTable(); DataSet ds = new BLL.Common().GetList("select project.sid as psid, project_name,project_code,stage_name,begin_date,end_date from project_stage left outer join project on project_stage.p_sid=project.sid where project_stage.sid='" + pssid + "'"); if (ds.Tables.Count > 0) { dt = ds.Tables[0]; } if (dt.Rows.Count > 0) { pname = dt.Rows[0]["project_name"].ToString().Trim(); pcode = dt.Rows[0]["project_code"].ToString().Trim(); stageName = dt.Rows[0]["stage_name"].ToString().Trim(); pModel = new BLL.project().GetModel(int.Parse(dt.Rows[0]["psid"].ToString().Trim())); string str1 = "", str2 = "", str3 = "", str4 = ""; DataTable impDT = new DataTable(); DataSet impDS = new BLL.project_implement().GetList(" s_sid='" + pssid + "'"); if (impDS.Tables.Count > 0) { impDT = impDS.Tables[0]; } for (int i = 0; i < impDT.Rows.Count; i++) { str1 += "<th colspan='1' rowspan='2' >" + impDT.Rows[i]["implement_name"].ToString().Trim() + "</th>"; str2 += "<th>" + impDT.Rows[i]["implementers"].ToString().Trim() + "</th>"; } DateTime sDate = DateTime.Parse(dt.Rows[0]["begin_date"].ToString().Trim()); DateTime eDate = DateTime.Parse(dt.Rows[0]["end_date"].ToString().Trim()); TimeSpan ts = eDate.AddDays(1).Subtract(sDate); string monthstr = ""; if (sDate.Month == eDate.Month) { monthstr = sDate.Month.ToString() + "月"; } else { monthstr = sDate.Month.ToString() + "-" + eDate.Month.ToString() + "月"; } string cols = ts.Days.ToString(); for (int i = 0; i < ts.Days; i++) { str3 += "<th colspan='1' >" + sDate.AddDays(i).Day.ToString() + "</th>"; string w = ""; switch (sDate.AddDays(i).DayOfWeek) { case DayOfWeek.Sunday: w = "日"; break; case DayOfWeek.Monday: w = "一"; break; case DayOfWeek.Tuesday: w = "二"; break; case DayOfWeek.Wednesday: w = "三"; break; case DayOfWeek.Thursday: w = "四"; break; case DayOfWeek.Friday: w = "五"; break; case DayOfWeek.Saturday: w = "六"; break; } str4 += "<th style='white-space:pre-wrap; word-wrap:break-word;'>" + w + "</th>"; } trStr += "<table class='printinnertable' cellpadding='0' cellspacing='0'>"; trStr += "<thead>"; trStr += "<tr>"; trStr += "<th rowspan='3'>阶段</th>"; trStr += "<th rowspan='3'>小组</th>"; trStr += "<th rowspan='3' >工作内容</th>"; trStr += "<th rowspan='3'>细目</th>"; trStr += "<th colspan='1'>月</th>"; trStr += "<th colspan='" + cols + "'>" + monthstr + "(黄色色块代表完成这项工作所需要的完成时间,计划表中实际完成时间将用绿色色块做标记)</th>"; trStr += str1; trStr += "<th width='100px' rowspan='3'>完成情况(按照公司设计质量标准评定:绿,黄,橙,红。四种工作完成状况)</th>"; trStr += "<th width='150px' rowspan='3'>未完成的原因</th>"; trStr += "<th width='150px' rowspan='3'>解决的办法</th>"; trStr += "<th width='150px' rowspan='3'>备注</th>"; trStr += "</tr>"; trStr += "<tr>"; trStr += "<th colspan='1'>日</th>"; trStr += str3; trStr += "</tr>"; trStr += "<tr>"; trStr += "<th >星期</th>"; trStr += str4; trStr += str2; trStr += "</tr>"; trStr += "</thead>"; trStr += ContentViewItem(pssid); trStr += "</table>"; } } }
private string ViewUserProject(HttpContext context) { DataTable dt = new DataTable(); DataSet ds = new BLL.Common().GetList(" select a.sid, c.stage_name,d.group_name,b.name as contentName,a.name as itemName,a.unfinished_reason,a.solution,a.remark,a.begin_date,a.end_date,c.begin_date as stage_sDate,c.end_date as stage_eDate,dbo.getProjectReview_fu(a.sid) as reviews,dbo.getProjectSubmitDate_fu(a.sid) as submitDate from project_specific_item a left outer join project_specific_item b on a.parent_sid=b.sid left outer join project_stage c on a.s_sid=c.sid left outer join project_group d on a.group_sid=d.sid where a.ischild=1 and a.s_sid=" + context.Request.Params["pssid"].Trim() + " order by a.s_sid asc, a.group_sid asc, a.parent_sid asc "); if (ds.Tables.Count > 0) { dt = ds.Tables[0]; } if (dt.Rows.Count > 0) { DateTime sDate = DateTime.Parse(dt.Rows[0]["stage_sDate"].ToString().Trim()); DateTime eDate = DateTime.Parse(dt.Rows[0]["stage_eDate"].ToString().Trim()); TimeSpan ts = eDate.AddDays(1).Subtract(sDate); for (int i = 0; i < ts.Days; i++) { DataColumn datetimeColumn = new DataColumn(); //该列的数据类型 datetimeColumn.DataType = System.Type.GetType("System.String"); //该列得名称 datetimeColumn.ColumnName = sDate.AddDays(i).ToString("yyyy-MM-dd"); //该列得默认值 datetimeColumn.DefaultValue = "0"; dt.Columns.Add(datetimeColumn); } for (int i = 0; i < dt.Rows.Count; i++) { DateTime mysDate = DateTime.Parse(dt.Rows[i]["begin_date"].ToString().Trim()); DateTime myeDate = DateTime.Parse(dt.Rows[i]["end_date"].ToString().Trim()); TimeSpan myts = myeDate.AddDays(1).Subtract(mysDate); for (int j = 0; j < myts.Days; j++) { if (dt.Rows[i][mysDate.AddDays(j).ToString("yyyy-MM-dd")].ToString().Trim() == "0") { dt.Rows[i][mysDate.AddDays(j).ToString("yyyy-MM-dd")] = "1"; } } } DataTable impDT = new DataTable(); DataSet impDS = new BLL.project_implement().GetList(" s_sid='" + context.Request.Params["pssid"].Trim() + "'"); if (impDS.Tables.Count > 0) { impDT = impDS.Tables[0]; } for (int i = 0; i < impDT.Rows.Count; i++) { DataColumn datetimeColumn = new DataColumn(); //该列的数据类型 datetimeColumn.DataType = System.Type.GetType("System.String"); //该列得名称 datetimeColumn.ColumnName = "imp" + impDT.Rows[i]["sid"].ToString().Trim(); //该列得默认值 datetimeColumn.DefaultValue = ""; dt.Columns.Add(datetimeColumn); for (int j = 0; j < dt.Rows.Count; j++) { DataTable impworkDT = new DataTable(); impDS = new BLL.project_work_implement().GetList("psi_sid='" + dt.Rows[j]["sid"] + "' and imp_sid='" + impDT.Rows[i]["sid"] + "'"); if (impDS.Tables.Count > 0) { impworkDT = impDS.Tables[0]; if (impworkDT.Rows.Count > 0) { dt.Rows[j]["imp" + impDT.Rows[i]["sid"].ToString().Trim()] = impworkDT.Rows[0]["implementer"].ToString().Trim(); } } } string[] submitDate = dt.Rows[i]["submitDate"].ToString().Trim().Split(','); for (int j = 0; j < submitDate.Length; j++) { try { for (int n = 0; n < ts.Days; n++) { if (sDate.AddDays(n).Date == DateTime.Parse(submitDate[j].Trim()).Date) { dt.Rows[i][sDate.AddDays(n).ToString("yyyy-MM-dd")] = "2"; } } } catch { } } } } return(DBUtility.JsonHelper.DataTable2Json_Datagrid(dt, dt.Rows.Count)); }
private string ContentViewItem(string pssid) { DataTable dt = new DataTable(); DataSet ds = new BLL.Common().GetList(" select a.sid, c.stage_name,d.group_name,b.name as contentName,a.name as itemName,dbo.getProjectReview_fu(a.sid) as reviews,a.unfinished_reason,a.solution,a.remark,a.begin_date,a.end_date,c.begin_date as stage_sDate,c.end_date as stage_eDate,dbo.getProjectSubmitDate_fu(a.sid) as submitDate from project_specific_item a left outer join project_specific_item b on a.parent_sid=b.sid left outer join project_stage c on a.s_sid=c.sid left outer join project_group d on a.group_sid=d.sid where a.ischild=1 and a.s_sid=" + pssid + " order by a.s_sid asc, a.group_sid asc, a.parent_sid asc "); if (ds.Tables.Count > 0) { dt = ds.Tables[0]; } if (dt.Rows.Count > 0) { DateTime sDate = DateTime.Parse(dt.Rows[0]["stage_sDate"].ToString().Trim()); DateTime eDate = DateTime.Parse(dt.Rows[0]["stage_eDate"].ToString().Trim()); TimeSpan ts = eDate.AddDays(1).Subtract(sDate); DataColumn datetimeColumn1 = new DataColumn(); //该列的数据类型 datetimeColumn1.DataType = System.Type.GetType("System.String"); //该列得名称 datetimeColumn1.ColumnName = "week"; //该列得默认值 datetimeColumn1.DefaultValue = ""; dt.Columns.Add(datetimeColumn1); dt.Columns[datetimeColumn1.ColumnName].SetOrdinal(5); //插入周期列 for (int i = 0; i < ts.Days; i++) { DataColumn datetimeColumn = new DataColumn(); //该列的数据类型 datetimeColumn.DataType = System.Type.GetType("System.String"); //该列得名称 datetimeColumn.ColumnName = sDate.AddDays(i).ToString("yyyy-MM-dd"); //该列得默认值 datetimeColumn.DefaultValue = "0"; dt.Columns.Add(datetimeColumn); dt.Columns[datetimeColumn.ColumnName].SetOrdinal(i + 6); } //周期列赋值 for (int i = 0; i < dt.Rows.Count; i++) { DateTime mysDate = DateTime.Parse(dt.Rows[i]["begin_date"].ToString().Trim()); DateTime myeDate = DateTime.Parse(dt.Rows[i]["end_date"].ToString().Trim()); TimeSpan myts = myeDate.AddDays(1).Subtract(mysDate); for (int j = 0; j < myts.Days; j++) { if (dt.Rows[i][mysDate.AddDays(j).ToString("yyyy-MM-dd")].ToString().Trim() == "0") { dt.Rows[i][mysDate.AddDays(j).ToString("yyyy-MM-dd")] = "1"; } } string[] submitDate = dt.Rows[i]["submitDate"].ToString().Trim().Split(','); for (int j = 0; j < submitDate.Length; j++) { try { for (int n = 0; n < ts.Days; n++) { if (sDate.AddDays(n).Date == DateTime.Parse(submitDate[j].Trim()).Date) { dt.Rows[i][sDate.AddDays(n).ToString("yyyy-MM-dd")] = "2"; } } } catch { } } } //插入实施列并赋值 DataTable impDT = new DataTable(); DataSet impDS = new BLL.project_implement().GetList(" s_sid='" + pssid + "'"); if (impDS.Tables.Count > 0) { impDT = impDS.Tables[0]; } for (int i = 0; i < impDT.Rows.Count; i++) { DataColumn datetimeColumn = new DataColumn(); //该列的数据类型 datetimeColumn.DataType = System.Type.GetType("System.String"); //该列得名称 datetimeColumn.ColumnName = "imp" + impDT.Rows[i]["sid"].ToString().Trim(); //该列得默认值 datetimeColumn.DefaultValue = ""; dt.Columns.Add(datetimeColumn); dt.Columns[datetimeColumn.ColumnName].SetOrdinal(i + 6 + ts.Days); for (int j = 0; j < dt.Rows.Count; j++) { DataTable impworkDT = new DataTable(); impDS = new BLL.project_work_implement().GetList("psi_sid='" + dt.Rows[j]["sid"] + "' and imp_sid='" + impDT.Rows[i]["sid"] + "'"); if (impDS.Tables.Count > 0) { impworkDT = impDS.Tables[0]; if (impworkDT.Rows.Count > 0) { dt.Rows[j]["imp" + impDT.Rows[i]["sid"].ToString().Trim()] = impworkDT.Rows[0]["implementer"].ToString().Trim(); } } } } } string reStr = ""; for (int i = 0; i < dt.Rows.Count; i++) { reStr += "<tr>"; //bool group = false, content = false; for (int j = 1; j < dt.Columns.Count; j++) { if (j == 1) { if (dt.Columns[j].ColumnName == "stage_name" && i == 0) { reStr += "<td rowspan='" + dt.Rows.Count + "'>" + dt.Rows[i][j].ToString().Trim() + "</td>"; continue; } else { continue; } } if (dt.Columns[j].ColumnName == "group_name") { if (i == 0) { DataRow[] dr = dt.Select("group_name='" + dt.Rows[i][j].ToString().Trim() + "'"); int tmpCount = dr.Length; reStr += "<td rowspan='" + tmpCount + "'>" + dt.Rows[i][j].ToString().Trim() + "</td>"; continue; } else if (dt.Rows[i][j].ToString().Trim() != dt.Rows[i - 1][j].ToString().Trim()) { DataRow[] dr = dt.Select("group_name='" + dt.Rows[i][j].ToString().Trim() + "'"); int tmpCount = dr.Length; reStr += "<td rowspan='" + tmpCount + "'>" + dt.Rows[i][j].ToString().Trim() + "</td>"; continue; } else { continue; } } if (dt.Columns[j].ColumnName == "contentName") { if (i == 0) { DataRow[] dr = dt.Select("contentName='" + dt.Rows[i][j].ToString().Trim() + "'"); int tmpCount = dr.Length; reStr += "<td rowspan='" + tmpCount + "'>" + dt.Rows[i][j].ToString().Trim() + "</td>"; continue; } else if (dt.Rows[i][j].ToString().Trim() != dt.Rows[i - 1][j].ToString().Trim()) { DataRow[] dr = dt.Select("contentName='" + dt.Rows[i][j].ToString().Trim() + "'"); int tmpCount = dr.Length; reStr += "<td rowspan='" + tmpCount + "'>" + dt.Rows[i][j].ToString().Trim() + "</td>"; continue; } else { continue; } } if (dt.Columns[j].ColumnName == "begin_date") { break; } if (dt.Columns[j].ColumnName == "week") { reStr += "<td style='background-color:lightgray;'></td>"; continue; } //if (IsDate(dt.Columns[j].ColumnName)) if (dt.Columns[j].ColumnName.Contains('-')) { switch (dt.Rows[i][j].ToString().Trim()) { case "0": reStr += "<td></td>"; break; case "1": //reStr += "<td style='background-color:yellow;'><img width='16px' height='16px' src='../Images/point/bullet_yellow.png'/></td>"; reStr += "<td style='background-color:yellow;'></td>"; break; case "2": //reStr += "<td style='background-color:green;'><img width='16px' height='16px' src='../Images/point/bullet_green.png'/></td>"; reStr += "<td style='background-color:green;'></td>"; break; default: reStr += "<td></td>"; break; } } else if (dt.Columns[j].ColumnName.Trim() == "reviews") { string[] arr = dt.Rows[i][j].ToString().Trim().Split(','); string pointStr = ""; for (int n = 0; n < arr.Length; n++) { switch (arr[n].Trim()) { case "0": pointStr += ""; break; case "1": pointStr += "<img width='16px' height='16px' src='../Images/point/bullet_green.png'/> "; break; case "2": pointStr += "<img width='16px' height='16px' src='../Images/point/bullet_yellow.png'/> "; break; case "3": pointStr += "<img width='16px' height='16px' src='../Images/point/bullet_orange.png'/> "; break; case "4": pointStr += "<img width='16px' height='16px' src='../Images/point/bullet_red.png'/> "; break; default: break; } } reStr += "<td>" + pointStr + "</td>"; } else { reStr += "<td>" + dt.Rows[i][j].ToString().Trim() + "</td>"; } } reStr += "</tr>"; } return(reStr); }
public static void GetProjectContent(string pssid, ref string isConstruction, out string stageName, out string pname, out string psid, out string sDateStr, out string eDateStr, out string showContent, out string showItem, out string frozencolumns, out string column) { stageName = ""; pname = ""; psid = ""; sDateStr = ""; eDateStr = ""; showContent = ""; showItem = ""; frozencolumns = ""; column = ""; DataSet ds; DataTable dt = new DataTable(); ds = new BLL.Common().GetList("select project.sid as psid, project_name,project_code,stage_name,Convert(varchar(10),begin_date,120) begin_date,Convert(varchar(10),end_date,120) end_date,project_stage.is_system,project.v1,dbo.getUserNames_fu(project.v1) as v1Users,project.v2,dbo.getUserNames_fu(project.v2) as v2Users from project_stage left outer join project on project_stage.p_sid=project.sid where project_stage.sid='" + pssid + "'"); string user = ""; DataTable userdt = new BLL.Common().GetList("select UserName,Name from baseuser where Permissions=1 order by name ").Tables[0]; DataRow newdr = userdt.NewRow(); newdr["UserName"] = ""; newdr["Name"] = "请选择"; userdt.Rows.InsertAt(newdr, 0); user = DBUtility.JsonHelper.DataTable2Json_Combo(userdt).Replace('\"', '\''); if (ds.Tables.Count > 0) { dt = ds.Tables[0]; } if (dt.Rows.Count > 0) { isConstruction = dt.Rows[0]["is_system"].ToString().Trim(); stageName = dt.Rows[0]["stage_name"].ToString().Trim(); pname = dt.Rows[0]["project_name"].ToString().Trim(); psid = dt.Rows[0]["psid"].ToString().Trim(); //动态添加实施列 //主管审核人 string dnyV1 = ""; dnyV1 = ",{title: '',field:'v1',width:80, halign:'center', align:'center',formatter:function(value,row){return row.header;},editor:{type:'combobox', options: { data: " + user + ", valueField: 'UserName', editable: false, textField: 'Name',required: true, missingMessage: '必填'}}}"; //总审人 string dnyV2 = ""; dnyV2 = ",{title: '',field:'v2',width:80, halign:'center', align:'center',formatter:function(value,row){return row.finaler;},editor:{type:'combobox', options: { data: " + user + ", valueField: 'UserName', editable: false, textField: 'Name',required: true, missingMessage: '必填'}}}"; //工作种类及人员 string dynImp = "", dynImpUser = "", dynDay = "", dynWeek = ""; DataTable impDT = new DataTable(); DataSet impDS = new BLL.project_implement().GetList(" s_sid='" + pssid + "' order by sequence"); if (impDS.Tables.Count > 0) { impDT = impDS.Tables[0]; for (int i = 0; i < impDT.Rows.Count; i++) { string[] dynImpUserArr = impDT.Rows[i]["impUsers"].ToString().Trim().Split(','); string[] dynImpUidArr = impDT.Rows[i]["implementers_sid"].ToString().Trim().Split(','); dynImp += ",{title:'" + impDT.Rows[i]["implement_name"].ToString().Trim() + "',rowspan:2,colspan:" + (dynImpUserArr.Length > 0 ? dynImpUserArr.Length : 1) + "}"; dynImpUser += ",{title: '" + impDT.Rows[i]["impUsers"].ToString().Trim() + "',field:'imp_" + impDT.Rows[i]["sid"].ToString().Trim() + "',width:80, halign:'center', align:'center',formatter:function(value,row){return row.Abbr_imp_" + impDT.Rows[i]["sid"].ToString().Trim() + ";},editor:{type:'combobox', options: { data: " + user + ", valueField: 'UserName', editable: false, textField: 'Name'}}}"; } } else { dynImp = ",{title:'',rowspan:2}"; dynImpUser = "******"; } //工作日历 string cols = "1"; string monthstr = ""; string tmp = dt.Rows[0]["begin_date"].ToString().Trim(); if (dt.Rows[0]["begin_date"].ToString().Trim() != "" && dt.Rows[0]["end_date"].ToString().Trim() != "" && dt.Rows[0]["begin_date"] != null && dt.Rows[0]["end_date"] != null) { sDateStr = dt.Rows[0]["begin_date"].ToString().Trim(); eDateStr = dt.Rows[0]["end_date"].ToString().Trim(); DateTime sDate = DateTime.Parse(dt.Rows[0]["begin_date"].ToString().Trim()); DateTime eDate = DateTime.Parse(dt.Rows[0]["end_date"].ToString().Trim()); TimeSpan ts = eDate.AddDays(1).Subtract(sDate); if (sDate.Month == eDate.Month) { monthstr = sDate.Month.ToString() + "月"; } else { monthstr = sDate.Month.ToString() + "-" + eDate.Month.ToString() + "月"; } cols = ts.Days.ToString(); for (int i = 0; i < ts.Days; i++) { dynDay += ",{title: '" + sDate.AddDays(i).Day.ToString() + "'}"; string w = ""; switch (sDate.AddDays(i).DayOfWeek) { case DayOfWeek.Sunday: w = "日"; break; case DayOfWeek.Monday: w = "一"; break; case DayOfWeek.Tuesday: w = "二"; break; case DayOfWeek.Wednesday: w = "三"; break; case DayOfWeek.Thursday: w = "四"; break; case DayOfWeek.Friday: w = "五"; break; case DayOfWeek.Saturday: w = "六"; break; } dynWeek += ",{title:'" + w + "',field:'flow_" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "',width:30,halign:'center',align:'center',styler: function(value,row,index){if(row['flow_" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "']==null)return '';var font='';if(row['flow_" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "'].length>3)font='font-size:8px;';if(row['" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "']==1){return 'background-color:yellow;'+font}else if(row['" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "']==2){return 'background-color:green;'+font}else{return ''}},editor:'text'}"; } } else { monthstr = ""; dynDay = ",{title: '',rowspan:1}"; dynWeek = ",{title: '',field:'w'}"; } //int work_width = 200; //int showCount = 15; //if (int.Parse(cols) * 30 > 200) //{ // work_width = int.Parse(cols) * 30; // if (work_width > 200) // { // showCount = showCount + ((work_width - 200) * 3 / 30); // } //} int work_width = 30; int showCount = 2; if (int.Parse(cols) * 30 > 30) { work_width = int.Parse(cols) * 30; if (work_width > 30) { showCount = showCount + ((work_width - 30) * 2 / 30); } } //string calendarStr = ""; string showGroup = "true"; string showWorkTitle = ""; string widthContent = "200"; string widthItem = "200"; switch (isConstruction) { case "1": showContent = "空间"; showItem = "图纸及索引号"; string flow = ""; DataTable tmpDT = new DataTable(); DataSet tmpDS = new BLL.project_work_flow().GetList(" s_sid='" + pssid + "'"); if (tmpDS.Tables.Count > 0) { tmpDT = tmpDS.Tables[0]; } for (int i = 0; i < tmpDT.Rows.Count; i++) { flow += (i + 1).ToString() + "." + tmpDT.Rows[i]["work_flow_name"].ToString().Trim() + ","; } string workTitle = monthstr + "(施工图立面框架" + flow + "(计划表中实际完成时间将用绿色色块做的标志))"; showWorkTitle = ""; for (int i = 0; i < workTitle.Length; i++) { showWorkTitle += workTitle[i]; if ((i + 1) % showCount == 0) { showWorkTitle += "<br/>"; } } break; case "0": showContent = "工作内容"; showItem = "细目"; showGroup = "false"; workTitle = monthstr + "(黄色色块代表完成这项工作所需要的完成时间,计划表中实际完成时间将用绿色色块做标记)"; showWorkTitle = ""; for (int i = 0; i < workTitle.Length; i++) { showWorkTitle += workTitle[i]; if ((i + 1) % showCount == 0) { showWorkTitle += "<br/>"; } } break; case "2": showContent = "货物类别"; showItem = "工作细目"; showWorkTitle = monthstr; break; case "3": showContent = "商品类别"; showItem = "细目"; workTitle = "智创产品逐个跟踪+" + pname; for (int i = 0; i < workTitle.Length; i++) { showWorkTitle += workTitle[i]; if ((i + 1) % showCount == 0) { showWorkTitle += "<br/>"; } } break; case "4": showContent = "加工类别"; showItem = "工作细目"; workTitle = monthstr + "(进程计划)"; for (int i = 0; i < workTitle.Length; i++) { showWorkTitle += workTitle[i]; if ((i + 1) % showCount == 0) { showWorkTitle += "<br/>"; } } widthContent = "80"; break; default: break; } if (isConstruction != "3") { frozencolumns += "[["; frozencolumns += "{ title: '小组', field: 'group_name', width: 60, rowspan:3, halign: 'center', align: 'center',hidden:" + showGroup + ",editor:{type:'diseditText'}}"; frozencolumns += ",{ title: '" + showContent + "', field: 'contentName', width: " + widthContent + ", rowspan:3,halign: 'center',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';},editor:{type:'diseditText'}}"; frozencolumns += ",{ title: '" + showItem + "', field: 'itemName', width: " + widthItem + ",rowspan:3, halign: 'center',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';},editor:'text'}"; frozencolumns += "]]"; column += "[["; column += "{ title: '月'}"; column += ",{ title: '" + showWorkTitle + "',colspan:" + cols + "}"; column += dynImp; //column += ",{ title: '组长审核', rowspan:2,colspan:"+(v1UidArr.Length>0?v1UidArr.Length:1)+", halign: 'center', align: 'center'}"; column += ",{ title: '组长审核', rowspan:2,colspan:1, halign: 'center', align: 'center'}"; column += ",{ title: '未完成的原因', field: 'unfinished_reason', width: 60,rowspan:3, halign: 'center', align: 'center',editor:{type:'diseditText'}}"; column += ",{ title: '解决的办法', field: 'solution', width: 60, rowspan:3, halign:'center', align:'center',editor:{type:'diseditText'}}"; column += ",{ title: '解决的结果', field: 'reviewed', width: 60, rowspan:3, halign:'center', align:'center',editor:{type:'diseditText'}}"; //column += ",{ title: '总审', rowspan:2,colspan:" + (v2UidArr.Length > 0 ? v2UidArr.Length : 1) + ", halign: 'center', align: 'center'}"; column += ",{ title: '总审', rowspan:2,colspan:1, halign: 'center', align: 'center'}"; column += ",{ title: '备注', field: 'remark', width: 60, rowspan:3,halign: 'center', editor: 'text',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';}}"; column += "],"; column += "["; column += "{ title: '日'}"; column += dynDay; column += "],["; column += "{ title: '星期', field: 'week',width:40,halign: 'center', align: 'center',styler: function(value,row,index){return 'background-color:lightgray;color:lightgray;';},editor:{type:'diseditText'}}"; column += dynWeek; column += dynImpUser; column += dnyV1; column += dnyV2; column += "]]"; } else { frozencolumns += "[["; frozencolumns += "{ title: '编号', field: 'number', width: 60, rowspan:3, halign: 'center', align: 'center',editor:{type:'diseditText'}}"; frozencolumns += ",{ title: '细目', rowspan:1, colspan:3, halign: 'center', align: 'center'}"; frozencolumns += ",{ title: '漆面颜色', field: 'paintColor', width: 100, rowspan:3, halign: 'center', align: 'center',editor:{type:'text'}}"; frozencolumns += ",{ title: '应用空间', field: 'useSpace', width: 60, rowspan:3, halign: 'center', align: 'center',editor:{type:'diseditText'}}"; frozencolumns += ",{ title: '应用数量', field: 'spaceCount', width: 60, rowspan:3, halign: 'center', align: 'center',editor:{type:'diseditText'}}"; frozencolumns += ",{ title: '安装位置', field: 'install', width: 60, rowspan:3, halign: 'center', align: 'center',editor:{type:'diseditText'}}"; frozencolumns += ",{ title: '应用部位', field: 'usePart', width: 60, rowspan:3, halign: 'center', align: 'center',editor:{type:'diseditText'}}"; frozencolumns += ",{ title: '单位', field: 'unit', width: 60, rowspan:3, halign: 'center', align: 'center',editor:{type:'diseditText'}}"; frozencolumns += ",{ title: '数量', field: 'amount', width: 60, rowspan:3, halign: 'center', align: 'center',editor:{type:'diseditText'}}"; frozencolumns += ",{ title: '油漆色板编号', field: 'paintPaletteNumber', width: 60, rowspan:3, halign: 'center', align: 'center',editor:{type:'diseditText'}}"; frozencolumns += ",{ title: '加工类别', field: 'contentName', width: 60, rowspan:3, halign: 'center', align: 'center',editor:{type:'diseditText'}}"; frozencolumns += ",{ title: '备注', field: 'remark', width: 60, rowspan:3, halign: 'center', align: 'center',editor:{type:'text'}}"; frozencolumns += ",{ title: '工作明细', field: 'itemName', width: 60, rowspan:3, halign: 'center', align: 'center',editor:{type:'text'}}"; frozencolumns += "]"; frozencolumns += ",["; frozencolumns += "{ title: '项目产品名称', field: 'productName', width: 100, rowspan:2, halign: 'center', align: 'center',editor:{type:'diseditText'}}"; frozencolumns += ",{ title: '图片', field: 'productPic', width: 100, rowspan:2,halign: 'center', align: 'center'," + "formatter: function (value, rowData, rowIndex) {" + "if (value != '') {" + " return \\\"<a path='../ProductPic/\\\" + value + \\\"' class='preview'><img alt='' height='45px' src='/ProductPic/\\\" + value + \\\"'></a>\\\";" + "}" + "}}"; frozencolumns += ",{ title: '规格', field: 'Specifications', width: 60, rowspan:2,halign: 'center', align: 'center',editor:{type:'diseditText'}}"; frozencolumns += "]]"; column += "[["; column += "{ title: '月'}"; column += ",{ title: '" + showWorkTitle + "',colspan:" + cols + "}"; column += dynImp; //column += ",{ title: '组长审核', rowspan:2,colspan:"+(v1UidArr.Length>0?v1UidArr.Length:1)+", halign: 'center', align: 'center'}"; column += ",{ title: '组长审核', rowspan:2,colspan:1, halign: 'center', align: 'center'}"; column += ",{ title: '未完成的原因', field: 'unfinished_reason', width: 60,rowspan:3, halign: 'center', align: 'center',editor:{type:'diseditText'}}"; column += ",{ title: '解决的办法', field: 'solution', width: 60, rowspan:3, halign:'center', align:'center',editor:{type:'diseditText'}}"; column += ",{ title: '解决的结果', field: 'reviewed', width: 60, rowspan:3, halign:'center', align:'center',editor:{type:'diseditText'}}"; //column += ",{ title: '总审', rowspan:2,colspan:" + (v2UidArr.Length > 0 ? v2UidArr.Length : 1) + ", halign: 'center', align: 'center'}"; column += ",{ title: '总审', rowspan:2,colspan:1, halign: 'center', align: 'center'}"; column += ",{ title: '备注', field: 'remark', width: 60, rowspan:3,halign: 'center', editor: 'text',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';}}"; column += "],"; column += "["; column += "{ title: '日'}"; column += dynDay; column += "],["; column += "{ title: '星期', field: 'week',width:40,halign: 'center', align: 'center',styler: function(value,row,index){return 'background-color:lightgray;color:lightgray;';},editor:{type:'diseditText'}}"; column += dynWeek; column += dynImpUser; column += dnyV1; column += dnyV2; column += "]]"; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { pssid = Request.Params["ps_sid"] == null ? "" : Request.Params["ps_sid"].Trim(); //isConstruction = Request.Params["isConstruction"] == null ? "" : Request.Params["isConstruction"].Trim(); //stageName = DBUtility.DbHelperSQL.GetSingle("select stage_name from project_stage where sid=" + pssid).ToString().Trim(); DataTable dt = new DataTable(); DataSet ds = new BLL.Common().GetList("select project.sid as psid, project_name,project_code,stage_name,Convert(varchar(10),begin_date,120) begin_date,Convert(varchar(10),end_date,120) end_date,project_stage.is_system from project_stage left outer join project on project_stage.p_sid=project.sid where project_stage.sid='" + pssid + "'"); if (ds.Tables.Count > 0) { dt = ds.Tables[0]; } if (dt.Rows.Count > 0) { isConstruction = dt.Rows[0]["is_system"].ToString().Trim(); stageName = dt.Rows[0]["stage_name"].ToString().Trim(); pname = dt.Rows[0]["project_name"].ToString().Trim(); psid = dt.Rows[0]["psid"].ToString().Trim(); //动态添加实施列 string dynImp = "", dynImpUser = "", dynDay = "", dynWeek = ""; DataTable impDT = new DataTable(); DataSet impDS = new BLL.project_implement().GetList(" s_sid='" + pssid + "' order by sequence"); if (impDS.Tables.Count > 0) { impDT = impDS.Tables[0]; for (int i = 0; i < impDT.Rows.Count; i++) { dynImp += ",{title:'" + impDT.Rows[i]["implement_name"].ToString().Trim() + "',rowspan:2}"; dynImpUser += ",{title: '" + impDT.Rows[i]["implementers"].ToString().Trim() + "',field:'impAbbr_" + impDT.Rows[i]["sid"].ToString().Trim() + "',width:80, halign:'center', align:'center'}"; } } else { dynImp = ",{title:'',rowspan:2}"; dynImpUser = "******"; } string cols = "1"; string monthstr = ""; string tmp = dt.Rows[0]["begin_date"].ToString().Trim(); if (dt.Rows[0]["begin_date"].ToString().Trim() != "" && dt.Rows[0]["end_date"].ToString().Trim() != "" && dt.Rows[0]["begin_date"] != null && dt.Rows[0]["end_date"] != null) { sDateStr = dt.Rows[0]["begin_date"].ToString().Trim(); eDateStr = dt.Rows[0]["end_date"].ToString().Trim(); DateTime sDate = DateTime.Parse(dt.Rows[0]["begin_date"].ToString().Trim()); DateTime eDate = DateTime.Parse(dt.Rows[0]["end_date"].ToString().Trim()); TimeSpan ts = eDate.AddDays(1).Subtract(sDate); if (sDate.Month == eDate.Month) { monthstr = sDate.Month.ToString() + "月"; } else { monthstr = sDate.Month.ToString() + "-" + eDate.Month.ToString() + "月"; } cols = ts.Days.ToString(); for (int i = 0; i < ts.Days; i++) { dynDay += ",{title: '" + sDate.AddDays(i).Day.ToString() + "'}"; string w = ""; switch (sDate.AddDays(i).DayOfWeek) { case DayOfWeek.Sunday: w = "日"; break; case DayOfWeek.Monday: w = "一"; break; case DayOfWeek.Tuesday: w = "二"; break; case DayOfWeek.Wednesday: w = "三"; break; case DayOfWeek.Thursday: w = "四"; break; case DayOfWeek.Friday: w = "五"; break; case DayOfWeek.Saturday: w = "六"; break; } dynWeek += ",{title:'" + w + "',field:'flow_" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "',width:30,halign:'center',align:'center',styler: function(value,row,index){var font='';if(row['flow_" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "'].length>3)font='font-size:8px;';if(row['" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "']==1){return 'background-color:yellow;'+font}else if(row['" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "']==2){return 'background-color:green;'+font}else{return ''}}}"; } } else { monthstr = ""; dynDay = ",{title: '',rowspan:1}"; dynWeek = ",{title: '',field:'w'}"; } int work_width = 200; int showCount = 15; if (int.Parse(cols) * 30 > 200) { work_width = int.Parse(cols) * 30; if (work_width > 200) { showCount = showCount + ((work_width - 200) * 3 / 30); } } if (isConstruction == "1") { showContent = "空间"; showItem = "图纸及索引号"; string flow = ""; DataTable tmpDT = new DataTable(); DataSet tmpDS = new BLL.project_work_flow().GetList(" s_sid='" + pssid + "'"); if (tmpDS.Tables.Count > 0) { tmpDT = tmpDS.Tables[0]; } for (int i = 0; i < tmpDT.Rows.Count; i++) { flow += (i + 1).ToString() + "." + tmpDT.Rows[i]["work_flow_name"].ToString().Trim() + ","; } string workTitle = monthstr + "(施工图立面框架" + flow + "(计划表中实际完成时间将用绿色色块做的标志))"; string showWorkTitle = ""; for (int i = 0; i < workTitle.Length; i++) { showWorkTitle += workTitle[i]; if ((i + 1) % showCount == 0) { showWorkTitle += "<br/>"; } } column += "[["; column += "{ title: '空间', field: 'contentName', width: 80, rowspan:3,halign: 'center',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';}}"; column += ",{ title: '图纸及索引号', field: 'itemName', width: 200,rowspan:3, halign: 'center',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';}}"; column += ",{ title: '月'}"; //column += ",{ title: '" + monthstr + "(施工图立面框架" + flow + "(计划表中实际完成时间将用绿色色块做的标志))',rowspan:1,colspan:" + cols + "}"; column += ",{ title: '" + showWorkTitle + "',rowspan:1,colspan:" + cols + "}"; column += dynImp; column += ",{ title: '主管审核', field: 'header', width: 60,rowspan:3, halign: 'center', align: 'center'}"; column += ",{ title: '未完成的原因', field: 'unfinished_reason', width: 60,rowspan:3, halign: 'center', align: 'center'}"; column += ",{ title: '解决的办法', field: 'solution', width: 60, rowspan:3, halign: 'center', align: 'center'}"; column += ",{ title: '解决的结果', field: 'reviewed', width: 60, rowspan:3, halign: 'center', align: 'center'}"; column += ",{ title: '总审', field: 'finaler', width: 60, rowspan:3,halign: 'center', align: 'center'}"; column += ",{ title: '备注', field: 'remark', width: 60, rowspan:3,halign: 'center', editor: 'text',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';}}"; column += "],"; column += "["; column += "{ title: '日'}"; column += dynDay; column += "],["; column += "{ title: '星期', field: 'week',width:40,halign: 'center', align: 'center',styler: function(value,row,index){return 'background-color:lightgray;color:lightgray;';}}"; column += dynWeek; column += dynImpUser; column += "]]"; } else { showContent = "工作内容"; showItem = "细目"; column += "[["; column += "{ title: '小组', field: 'group_name', width: 60, rowspan:3, halign: 'center', align: 'center'}"; column += ",{ title: '工作内容', field: 'contentName', width: 200, rowspan:3,halign: 'center',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';}}"; column += ",{ title: '细目', field: 'itemName', width: 200,rowspan:3, halign: 'center',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';}}"; column += ",{ title: '月'}"; column += ",{ title: '" + monthstr + "(黄色色块代表完成这项工作所需要的完成时间,<br/>计划表中实际完成时间将用绿色色块做标记)',colspan:" + cols + "}"; column += dynImp; column += ",{ title: '主管审核', field: 'header', width: 60,rowspan:3, halign: 'center', align: 'center'}"; column += ",{ title: '未完成的原因', field: 'unfinished_reason', width: 60,rowspan:3, halign: 'center', align: 'center'}"; column += ",{ title: '解决的办法', field: 'solution', width: 60, rowspan:3, halign: 'center', align: 'center'}"; column += ",{ title: '解决的结果', field: 'reviewed', width: 60, rowspan:3, halign: 'center', align: 'center'}"; column += ",{ title: '总审', field: 'finaler', width: 60, rowspan:3, halign: 'center', align: 'center'}"; column += ",{ title: '备注', field: 'remark', width: 60, rowspan:3,halign: 'center', editor: 'text',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';}}"; column += "],"; column += "["; column += "{ title: '日'}"; column += dynDay; column += "],["; column += "{ title: '星期', field: 'week',width:40,halign: 'center', align: 'center',styler: function(value,row,index){return 'background-color:lightgray;color:lightgray;';}}"; column += dynWeek; column += dynImpUser; column += "]]"; } } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { pssid = Request.Params["ps_sid"] == null ? "" : Request.Params["ps_sid"].Trim(); DataTable dt = new DataTable(); DataSet ds = new BLL.Common().GetList("select project.sid as psid, project_name,project_code,stage_name,project.v1 as groupAppr,project.v2 as trialAppr,project.v3 as qsAppr from project_stage left outer join project on project_stage.p_sid=project.sid where project_stage.sid='" + pssid + "'"); if (ds.Tables.Count > 0) { dt = ds.Tables[0]; } if (dt.Rows.Count > 0) { pname = dt.Rows[0]["project_name"].ToString().Trim(); pcode = dt.Rows[0]["project_code"].ToString().Trim(); stageName = dt.Rows[0]["stage_name"].ToString().Trim(); //动态添加实施列 string dynamicColumn = ""; DataTable impDT = new DataTable(); DataSet impDS = new BLL.project_implement().GetList(" s_sid='" + pssid + "'"); if (impDS.Tables.Count > 0) { impDT = impDS.Tables[0]; } for (int i = 0; i < impDT.Rows.Count; i++) { string json = "[]"; DataTable tmpDT1 = new DataTable(); DataSet tmpDS1 = new BLL.Common().GetList(" select username, name from baseuser where username in ( select * from dbo.getTable('" + impDT.Rows[i]["implementers_sid"].ToString().Trim() + "',',')) order by name asc"); if (tmpDS1.Tables.Count > 0) { tmpDT1 = tmpDS1.Tables[0]; json = DBUtility.JsonHelper.DataTable2Json_Combo(tmpDT1).Replace('"', '\''); } dynamicColumn += "{field:'" + "imp" + impDT.Rows[i]["sid"].ToString().Trim() + "',title:'" + impDT.Rows[i]["implement_name"].ToString().Trim() + "',width:80,align:'center',halign: 'center', editor: {type:'combobox',options:{valueField:'username',textField:'name',data:" + json + ",panelWidth:100}},formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + rowData.imp_abb" + impDT.Rows[i]["sid"].ToString().Trim() + " + '\\\"><span class=\\\"mlength\\\">' + rowData.imp_abb" + impDT.Rows[i]["sid"].ToString().Trim() + " + '</span></a>';}},"; //dynamicColumn += "{field:'" + "imp" + impDT.Rows[i]["sid"].ToString().Trim() + "',title:'" + impDT.Rows[i]["implement_name"].ToString().Trim() + "',width:80,align:'center',halign: 'center', editor: {type:'combobox',options:{valueField:'username',textField:'name',url:'../ashx/project.ashx?action=getImpJson&pisid=" + impDT.Rows[i]["sid"].ToString().Trim() + "',panelWidth:100}},formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + rowData.imp_abb" + impDT.Rows[i]["sid"].ToString().Trim() + " + '\\\"><span class=\\\"mlength\\\">' + rowData.imp_abb" + impDT.Rows[i]["sid"].ToString().Trim() + " + '</span></a>';}},"; //dynamicColumn += "{field:'" + "imp" + impDT.Rows[i]["sid"].ToString().Trim() + "',title:'" + impDT.Rows[i]["implement_name"].ToString().Trim() + "',width:80,align:'center',halign: 'center', formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + rowData.imp_abb" + impDT.Rows[i]["sid"].ToString().Trim() + " + '\\\"><span class=\\\"mlength\\\">' + rowData.imp_abb" + impDT.Rows[i]["sid"].ToString().Trim() + " + '</span></a>';}},"; } //获取小组列表 string groupJson = "[]"; DataTable tmpDT = new DataTable(); DataSet tmpDS = new BLL.Common().GetList(" select sid, group_name from project_group where ps_sid='" + pssid + "' order by sequence asc"); if (tmpDS.Tables.Count > 0) { tmpDT = tmpDS.Tables[0]; groupJson = DBUtility.JsonHelper.DataTable2Json_Combo(tmpDT).Replace('"', '\''); } //小组审核 string groupAppJson = "[]"; tmpDT = new DataTable(); tmpDS = new BLL.Common().GetList(" select username, name from baseuser where username in ( select * from dbo.getTable('" + dt.Rows[0]["groupAppr"].ToString().Trim() + "',',')) order by name asc"); if (tmpDS.Tables.Count > 0) { tmpDT = tmpDS.Tables[0]; groupAppJson = DBUtility.JsonHelper.DataTable2Json_Combo(tmpDT).Replace('"', '\''); } //初审 string trialAppJson = "[]"; tmpDT = new DataTable(); tmpDS = new BLL.Common().GetList(" select username, name from baseuser where username in ( select * from dbo.getTable('" + dt.Rows[0]["trialAppr"].ToString().Trim() + "',',')) order by name asc"); if (tmpDS.Tables.Count > 0) { tmpDT = tmpDS.Tables[0]; trialAppJson = DBUtility.JsonHelper.DataTable2Json_Combo(tmpDT).Replace('"', '\''); } //质量监督 string qsAppJson = "[]"; tmpDT = new DataTable(); tmpDS = new BLL.Common().GetList(" select username as v3, name as qsAppr from baseuser where username in ( select * from dbo.getTable('" + dt.Rows[0]["qsAppr"].ToString().Trim() + "',',')) order by name asc"); if (tmpDS.Tables.Count > 0) { tmpDT = tmpDS.Tables[0]; qsAppJson = DBUtility.JsonHelper.DataTable2Json_Combo(tmpDT).Replace('"', '\''); } column += "[["; column += "{ title: '小组', field: 'group_sid', width: 60, halign: 'center', align: 'center', editor: {type:'combobox',options:{valueField:'sid',textField:'group_name',data:" + groupJson + ",panelWidth:100}},formatter: function (value, rowData, rowIndex) {if (rowData.parent_sid == 0) {return '<a class=\\\"a_black\\\" title=\\\"' + rowData.group_name + '\\\"><span class=\\\"mlength\\\">' + rowData.group_name + '</span></a>';}else {return '';}}},"; //column += "{ title: '小组', field: 'group_sid', width: 60, sortable: true, halign: 'center', align: 'center', editor: {type:'combobox',options:{valueField:'sid',textField:'group_name',data:"+groupJson+",panelWidth:100}},formatter: function (value, rowData, rowIndex) {if (rowData.parent_sid == 0) {return '<a class=\\\"a_black\\\" title=\\\"' + rowData.group_name + '\\\"><span class=\\\"mlength\\\">' + rowData.group_name + '</span></a>';}else {return '';}}},"; column += "{ title: '工作内容/细目', field: 'name', width: 200, halign: 'center', editor: 'text', formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';}},"; column += "{ title: '开始日期', field: 'begin_date', width: 80, halign: 'center', align: 'center', editor: 'datebox',formatter: function (value, rowData, rowIndex) {if (value.Format('yyyy-MM-dd') == '1900-01-01') {return '';} else {return value.Format('yyyy-MM-dd');}}},"; column += "{ title: '结束日期', field: 'end_date', width: 80, halign: 'center', align: 'center', editor: 'datebox',formatter: function (value, rowData, rowIndex) {if (value.Format('yyyy-MM-dd') == '1900-01-01') {return '';} else {return value.Format('yyyy-MM-dd');}}},"; column += dynamicColumn; column += "{ title: '小组审核', field: 'v1', width: 100, halign: 'center', align: 'center', editor: {type:'combobox',options:{valueField:'username',textField:'name',data:" + groupAppJson + ",panelWidth:100}},formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + rowData.groupAppr + '\\\"><span class=\\\"mlength\\\">' + rowData.groupAppr + '</span></a>';}},"; column += "{ title: '初审', field: 'v2', width: 100, sortable: true, halign: 'center', align: 'center',formatter: function (value, rowData, rowIndex) {return rowData.trialAppr ;}, editor: {type:'combobox',options:{valueField:'username',textField:'name',data:" + trialAppJson + ",panelWidth:100}}},"; column += "{ title: '质量监督', field: 'v3', width: 100, halign: 'center', align: 'center',formatter: function (value, rowData, rowIndex) {return rowData.qsAppr;}, editor: {type:'combobox',options:{valueField:'v3',textField:'qsAppr',data:" + qsAppJson + ",panelWidth:100}}},"; //column += "{ title: '小组审核', field: 'v1', width: 100, sortable: true, halign: 'center', align: 'center', editor: {type:'combobox',options:{valueField:'username',textField:'name',url:'../ashx/project.ashx?action=getGroupApprJson&psid=" + dt.Rows[0]["psid"].ToString().Trim() + "',panelWidth:100}},formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + rowData.groupAppr + '\\\"><span class=\\\"mlength\\\">' + rowData.groupAppr + '</span></a>';}},"; //column += "{ title: '初审', field: 'v2', width: 100, sortable: true, halign: 'center', align: 'center', editor: {type:'combobox',options:{valueField:'username',textField:'name',url:'../ashx/project.ashx?action=getTrialApprJson&pssid=" + dt.Rows[0]["psid"].ToString().Trim() + "',panelWidth:100}},formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + rowData.groupAppr + '\\\"><span class=\\\"mlength\\\">' + rowData.trialAppr + '</span></a>';}},"; //column += "{ title: '质量监督', field: 'v3', width: 100, sortable: true, halign: 'center', align: 'center', editor: {type:'combobox',options:{valueField:'username',textField:'name',url:'../ashx/project.ashx?action=getQsApprJson&pssid=" + dt.Rows[0]["psid"].ToString().Trim() + "',panelWidth:100}},formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + rowData.groupAppr + '\\\"><span class=\\\"mlength\\\">' + rowData.qsAppr + '</span></a>';}},"; //column += "{ title: '小组审核', field: 'v1', width: 100, sortable: true, halign: 'center', align: 'center',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + rowData.groupAppr + '\\\"><span class=\\\"mlength\\\">' + rowData.groupAppr + '</span></a>';}},"; //column += "{ title: '初审', field: 'v2', width: 100, sortable: true, halign: 'center', align: 'center', formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + rowData.groupAppr + '\\\"><span class=\\\"mlength\\\">' + rowData.trialAppr + '</span></a>';}},"; //column += "{ title: '质量监督', field: 'v3', width: 100, sortable: true, halign: 'center', align: 'center', formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + rowData.groupAppr + '\\\"><span class=\\\"mlength\\\">' + rowData.qsAppr + '</span></a>';}},"; column += "{ title: '备注', field: 'remark', width: 100, halign: 'center', editor: 'text',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';}}"; column += "]]"; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { pssid = Request.Params["ps_sid"] == null ? "" : Request.Params["ps_sid"].Trim(); DataTable dt = new DataTable(); DataSet ds = new BLL.Common().GetList("select project.sid as psid, project_name,project_code,stage_name,begin_date,end_date from project_stage left outer join project on project_stage.p_sid=project.sid where project_stage.sid='" + pssid + "'"); if (ds.Tables.Count > 0) { dt = ds.Tables[0]; } if (dt.Rows.Count > 0) { pname = dt.Rows[0]["project_name"].ToString().Trim(); pcode = dt.Rows[0]["project_code"].ToString().Trim(); stageName = dt.Rows[0]["stage_name"].ToString().Trim(); pModel = new BLL.project().GetModel(int.Parse(dt.Rows[0]["psid"].ToString().Trim())); string str1 = "", str2 = "", str3 = "", str4 = ""; DataTable impDT = new DataTable(); DataSet impDS = new BLL.project_implement().GetList(" s_sid='" + pssid + "'"); if (impDS.Tables.Count > 0) { impDT = impDS.Tables[0]; } for (int i = 0; i < impDT.Rows.Count; i++) { str1 += "<th colspan='1' rowspan='2' >" + impDT.Rows[i]["implement_name"].ToString().Trim() + "</th>"; //str1 += "{title:'" + impDT.Rows[i]["implement_name"].ToString().Trim() + "',rowspan:2},"; //str1 += "<th colspan='1' rowspan='2' ></th>"; str2 += "<th data-options=\"field:'imp" + impDT.Rows[i]["sid"].ToString().Trim() + "',width:100, halign:'center', align:'center'\" >" + impDT.Rows[i]["implementers"].ToString().Trim() + "</th>"; //str2 += "{field:'imp" + impDT.Rows[i]["sid"].ToString().Trim() + "',title:'" + impDT.Rows[i]["implementers"].ToString().Trim() + "',width:100, halign:'center', align:'center'},"; } DateTime sDate = DateTime.Parse(dt.Rows[0]["begin_date"].ToString().Trim()); DateTime eDate = DateTime.Parse(dt.Rows[0]["end_date"].ToString().Trim()); TimeSpan ts = eDate.AddDays(1).Subtract(sDate); string monthstr = ""; if (sDate.Month == eDate.Month) { monthstr = sDate.Month.ToString() + "月"; } else { monthstr = sDate.Month.ToString() + "-" + eDate.Month.ToString() + "月"; } string cols = ts.Days.ToString(); //string widthstr = (int.Parse(cols) * 30).ToString(); for (int i = 0; i < ts.Days; i++) { str3 += "<th colspan='1' >" + sDate.AddDays(i).Day.ToString() + "</th>"; //str3 += "{title:'" + sDate.AddDays(i).Day.ToString() + "'},"; string w = ""; switch (sDate.AddDays(i).DayOfWeek) { case DayOfWeek.Sunday: w = "日"; break; case DayOfWeek.Monday: w = "一"; break; case DayOfWeek.Tuesday: w = "二"; break; case DayOfWeek.Wednesday: w = "三"; break; case DayOfWeek.Thursday: w = "四"; break; case DayOfWeek.Friday: w = "五"; break; case DayOfWeek.Saturday: w = "六"; break; } //str4 += "<th data-options=\"field:'" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "',width:30,halign:'center',align:'center',styler: function(value,row,index){if(value==1){return 'background-color:yellow;'}else{return ''};},formatter: function(value,row,index){return '';}\" style='white-space:pre-wrap; word-wrap:break-word;'>" + w + "</th>"; str4 += "<th data-options=\"field:'" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "',width:30,halign:'center',align:'center',styler: function(value,row,index){if(value==1){return 'background-color:yellow;'}else if(value==2){return 'background-color:green;'}else{return ''};},formatter: function(value,row,index){return '';}\" style='white-space:pre-wrap; word-wrap:break-word;'>" + w + "</th>"; //str4 += "{field:'" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "',title:'" + w + "',width:30,halign:'center',align:'center',styler: function(value,row,index){if(value==1){return 'background-color:yellow;'}else{return ''};},formatter: function(value,row,index){return '';}},"; } //trStr += "<thead>"; trStr += "<thead data-options='frozen:true'>"; trStr += "<tr>"; trStr += "<th data-options=\"field:'stage_name',width:50, halign: 'center', align: 'center',styler: function(value,row,index){return 'background-color:white;white-space:pre-wrap; word-wrap:break-word;';}\" rowspan='3'>阶段</th>"; trStr += "<th data-options=\"field:'group_name',width:50, halign: 'center', align: 'center',styler: function(value,row,index){return 'background-color:white;white-space:pre-wrap; word-wrap:break-word;';}\" rowspan='3'>小组</th>"; //trStr += "<th data-options=\"field:'contentName',width:150, halign: 'center', styler: function(value,row,index){return 'background-color:white;white-space:pre-wrap; word-wrap:break-word;';},formatter: function (value, rowData, rowIndex) {return '<span style=\'white-space:pre-wrap; word-wrap:break-word;\'>' + value + '</span>';}\" rowspan='3' >工作内容</th>"; trStr += "<th data-options=\"field:'contentName',width:150, halign: 'center', styler: function(value,row,index){return 'background-color:white;white-space:pre-wrap; word-wrap:break-word;';}\" rowspan='3' >工作内容</th>"; trStr += "<th data-options='field:\"itemName\",width:150, halign: \"center\" ,formatter: function (value, rowData, rowIndex) {var str=\"<a class=\\\"a_black\\\" title=\\\"\" + value + \"\\\"><span class=\\\"mlength\\\">\" + value + \"</span></a>\";return str;}' rowspan='3'>细目</th>"; trStr += "</tr>"; trStr += "</thead>"; trStr += "<thead>"; trStr += "<tr>"; trStr += "<th colspan='1'>月</th>"; trStr += "<th colspan='" + cols + "'>" + monthstr + "(黄色色块代表完成这项工作所需要的完成时间,<br/>计划表中实际完成时间将用绿色色块做标记)</th>"; trStr += str1; //trStr += "<th data-options=\"field:'reviews',width:150, halign: 'center',formatter: function (value, rowData, rowIndex) {var arr=value.split(',');var str='';for(var i=0;i<arr.length;i++){switch (arr[i]) {case 0:break;case 1:str+='<img src=\"../Images/point/bullet_green.png\" />';break;case 2:str+='<img src=\"../Images/point/bullet_yellow.png\" />';break;case 3:str+='<img src=\"../Images/point/bullet_orange.png\" />';break;case 4:str+='<img src=\"../Images/point/bullet_red.png\" />';break;default:break;}}return str;}\" rowspan='3'>完成情况(按照公司设计质量标准评定:绿,黄,橙,红。四种工作完成状况)</th>"; //trStr += "<th data-options='field:\"reviews\",width:150, halign: \"center\",formatter: function (value, rowData, rowIndex) {var arr=value.split(\",\");var str=\"\";for(var i=0;i<arr.length;i++){switch (arr[i]) {case \"0\":break;case \"1\":str+=\"<div style=\\\"float:left\\\"><img src=\\\"../Images/point/bullet_green.png\\\"/></div>\";break;case \"2\":str+=\"<div style=\\\"float:left\\\"><img src=\\\"../Images/point/bullet_yellow.png\\\" /></div>\";break;case \"3\":str+=\"<div style=\\\"float:left\\\"><img src=\\\"../Images/point/bullet_orange.png\\\" /></div>\";break;case \"4\":str+=\"<div style=\\\"float:left\\\"><img src=\\\"../Images/point/bullet_red.png\\\" /></div>\";break;default:break;}} return str;}' rowspan='3'>完成情况(按照公司设计质量标准评定:绿,黄,橙,红。四种工作完成状况)</th>"; trStr += "<th data-options='field:\"reviews\",width:150, halign: \"center\",formatter: function (value, rowData, rowIndex) {var arr=value.split(\",\");var str=\"\";for(var i=0;i<arr.length;i++){switch (arr[i]) {case \"0\":break;case \"1\":str+=\"<img width=\\\"16px\\\" height=\\\"16px\\\" src=\\\"../Images/point/bullet_green.png\\\"/> \";break;case \"2\":str+=\"<img width=\\\"16px\\\" height=\\\"16px\\\" src=\\\"../Images/point/bullet_yellow.png\\\" /> \";break;case \"3\":str+=\"<img width=\\\"16px\\\" height=\\\"16px\\\" src=\\\"../Images/point/bullet_orange.png\\\" /> \";break;case \"4\":str+=\"<img width=\\\"16px\\\" height=\\\"16px\\\" src=\\\"../Images/point/bullet_red.png\\\" /> \";break;default:break;}} return str;}' rowspan='3'>完成情况(按照公司设计质量标准评定:绿,黄,橙,红。四种工作完成状况)</th>"; trStr += "<th data-options=\"field:'wtype7',width:150, halign: 'center', align: 'center'\" rowspan='3'>未完成的原因</th>"; trStr += "<th data-options=\"field:'wtype8',width:150, halign: 'center', align: 'center'\" rowspan='3'>解决的办法</th>"; trStr += "<th data-options=\"field:'wtype9',width:150, halign: 'center', align: 'center'\" rowspan='3'>备注</th>"; trStr += "</tr>"; trStr += "<tr>"; trStr += "<th colspan='1'>日</th>"; trStr += str3; trStr += "</tr>"; trStr += "<tr>"; trStr += "<th data-options=\"field:'wtype11',width:35, halign: 'center', align: 'center',styler: function(value,row,index){return 'background-color:lightgray;color:lightgray;';}\">星期</th>"; trStr += str4; trStr += str2; trStr += "</tr>"; trStr += "</thead>"; //tr.Text = trStr; //trStr += "[["; //trStr += "{field:'stage_name',title:'阶段',width:50, halign: 'center', align: 'center',rowspan:3,styler: function(value,row,index){return 'background-color:white;';}},"; //trStr += "{field:'group_name',title:'小组',width:50, halign: 'center', align: 'center',rowspan:3,styler: function(value,row,index){return 'background-color:white;';}},"; //trStr += "{field:'contentName',title:'工作内容',width:150, halign: 'center',rowspan:3,styler: function(value,row,index){return 'background-color:white;';},formatter: function (value, rowData, rowIndex) {return '<a>' + value + '</a>';}},"; //trStr += "{field:'itemName',title:'细目',width:150, halign: 'center',rowspan:3},"; //trStr += "{field:'m',title:'月'},"; //trStr += "{title:'" + monthstr + "(黄色色块代表完成这项工作所需要的完成时间,<br/>计划表中实际完成时间将用绿色色块做标记)',colspan:" + cols + "},"; //trStr += "{field:'wtype6',title:'完成情况(按照公司设计质量标准评定:绿,黄,橙,红。四种工作完成状况)',width:150, halign: 'center',rowspan:3},"; //trStr += "{field:'wtype7',title:'未完成的原因',width:150, halign: 'center',rowspan:3},"; //trStr += "{field:'wtype8',title:'解决的办法',width:150, halign: 'center',rowspan:3},"; //trStr += "{field:'wtype9',title:'备注',width:150, halign: 'center',rowspan:3}"; //trStr += "],["; //trStr += "{field:'d',title:'日'},"; //trStr += str3.Substring(0, str3.Length - 1); //trStr += "],["; //trStr += "{field:'wtype11',title:'星期',width:35, halign: 'center', align: 'center',styler: function(value,row,index){return 'background-color:lightgray;color:lightgray;';}},"; //trStr += str4; //trStr += str2.Substring(0, str2.Length - 1); //trStr += "]]"; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { pssid = Request.Params["ps_sid"] == null ? "" : Request.Params["ps_sid"].Trim(); DataTable dt = new DataTable(); DataSet ds = new BLL.Common().GetList("select project.sid as psid, project_name,project_code,stage_name,Convert(varchar(10),begin_date,120) begin_date,Convert(varchar(10),end_date,120) end_date,project_stage.is_system,project.v1,dbo.getUserNames_fu(project.v1) as v1Users,project.v2,dbo.getUserNames_fu(project.v2) as v2Users from project_stage left outer join project on project_stage.p_sid=project.sid where project_stage.sid='" + pssid + "'"); if (ds.Tables.Count > 0) { dt = ds.Tables[0]; } if (dt.Rows.Count > 0) { isConstruction = dt.Rows[0]["is_system"].ToString().Trim(); stageName = dt.Rows[0]["stage_name"].ToString().Trim(); pname = dt.Rows[0]["project_name"].ToString().Trim(); psid = dt.Rows[0]["psid"].ToString().Trim(); //动态添加实施列 //主管审核人 string dnyV1 = ""; string[] v1UserArr = dt.Rows[0]["v1Users"].ToString().Trim().Split(','); string[] v1UidArr = dt.Rows[0]["v1"].ToString().Trim().Split(','); for (int j = 0; j < v1UserArr.Length; j++) { if (v1UidArr[j].Trim() != "") { dnyV1 += ",{title: '" + v1UserArr[j].ToString().Trim() + "',field:'v1_" + v1UidArr[j] + "',width:60, halign:'center', align:'center',editor:'text'}"; } else { dnyV1 += ",{title: '" + v1UserArr[j].ToString().Trim() + "',field:'v1_" + v1UidArr[j] + "',width:60, halign:'center', align:'center',editor:{type:'diseditText'}}"; } //dnyV1 += ",{title: '" + v1UserArr[j].ToString().Trim() + "',field:'v1_" + v1UidArr[j] + "',width:60, halign:'center', align:'center',formatter: function(value,row,index){},editor:'text'}"; } if (v1UserArr.Length == 0) { dnyV1 = ",{title: '',field:'v1_',width:60, halign:'center', align:'center'}"; } //总审人 string dnyV2 = ""; string[] v2UserArr = dt.Rows[0]["v2USers"].ToString().Trim().Split(','); string[] v2UidArr = dt.Rows[0]["v2"].ToString().Trim().Split(','); for (int j = 0; j < v2UserArr.Length; j++) { if (v2UidArr[j].Trim() != "") { dnyV2 += ",{title: '" + v2UserArr[j].ToString().Trim() + "',field:'v2_" + v2UidArr[j] + "',width:60, halign:'center', align:'center',editor:'text'}"; } else { dnyV2 += ",{title: '" + v2UserArr[j].ToString().Trim() + "',field:'v2_" + v2UidArr[j] + "',width:60, halign:'center', align:'center',editor:{type:'diseditText'}}"; } } if (v2UserArr.Length == 0) { dnyV2 = ",{title: '',field:'v2_',width:60, halign:'center', align:'center'}"; } //工作种类及人员 string dynImp = "", dynImpUser = "", dynDay = "", dynWeek = ""; DataTable impDT = new DataTable(); DataSet impDS = new BLL.project_implement().GetList(" s_sid='" + pssid + "' order by sequence"); if (impDS.Tables.Count > 0) { impDT = impDS.Tables[0]; for (int i = 0; i < impDT.Rows.Count; i++) { string[] dynImpUserArr = impDT.Rows[i]["impUsers"].ToString().Trim().Split(','); string[] dynImpUidArr = impDT.Rows[i]["implementers_sid"].ToString().Trim().Split(','); dynImp += ",{title:'" + impDT.Rows[i]["implement_name"].ToString().Trim() + "',rowspan:2,colspan:" + (dynImpUserArr.Length > 0 ? dynImpUserArr.Length : 1) + "}"; for (int j = 0; j < dynImpUserArr.Length; j++) { if (dynImpUserArr[j].Trim() != "") { dynImpUser += ",{title: '" + dynImpUserArr[j].ToString().Trim() + "',field:'impAbbr_" + impDT.Rows[i]["sid"].ToString().Trim() + "_" + dynImpUidArr[j] + "',width:80, halign:'center', align:'center',editor:'text'}"; } else { dynImpUser += ",{title: '" + dynImpUserArr[j].ToString().Trim() + "',field:'impAbbr_" + impDT.Rows[i]["sid"].ToString().Trim() + "_" + dynImpUidArr[j] + "',width:80, halign:'center', align:'center',editor:{type:'diseditText'}}"; } } if (dynImpUserArr.Length == 0) { dynImpUser = "******"; } } } else { dynImp = ",{title:'',rowspan:2}"; dynImpUser = "******"; } //工作日历 string cols = "1"; string monthstr = ""; string tmp = dt.Rows[0]["begin_date"].ToString().Trim(); if (dt.Rows[0]["begin_date"].ToString().Trim() != "" && dt.Rows[0]["end_date"].ToString().Trim() != "" && dt.Rows[0]["begin_date"] != null && dt.Rows[0]["end_date"] != null) { sDateStr = dt.Rows[0]["begin_date"].ToString().Trim(); eDateStr = dt.Rows[0]["end_date"].ToString().Trim(); DateTime sDate = DateTime.Parse(dt.Rows[0]["begin_date"].ToString().Trim()); DateTime eDate = DateTime.Parse(dt.Rows[0]["end_date"].ToString().Trim()); TimeSpan ts = eDate.AddDays(1).Subtract(sDate); if (sDate.Month == eDate.Month) { monthstr = sDate.Month.ToString() + "月"; } else { monthstr = sDate.Month.ToString() + "-" + eDate.Month.ToString() + "月"; } cols = ts.Days.ToString(); for (int i = 0; i < ts.Days; i++) { dynDay += ",{title: '" + sDate.AddDays(i).Day.ToString() + "'}"; string w = ""; switch (sDate.AddDays(i).DayOfWeek) { case DayOfWeek.Sunday: w = "日"; break; case DayOfWeek.Monday: w = "一"; break; case DayOfWeek.Tuesday: w = "二"; break; case DayOfWeek.Wednesday: w = "三"; break; case DayOfWeek.Thursday: w = "四"; break; case DayOfWeek.Friday: w = "五"; break; case DayOfWeek.Saturday: w = "六"; break; } dynWeek += ",{title:'" + w + "',field:'flow_" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "',width:30,halign:'center',align:'center',styler: function(value,row,index){if(row['flow_" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "']==null);return;var font='';if(row['flow_" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "'].length>3)font='font-size:8px;';if(row['" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "']==1){return 'background-color:yellow;'+font}else if(row['" + sDate.AddDays(i).ToString("yyyy-MM-dd") + "']==2){return 'background-color:green;'+font}else{return ''}},editor:'text'}"; } } else { monthstr = ""; dynDay = ",{title: '',rowspan:1}"; dynWeek = ",{title: '',field:'w'}"; } int work_width = 200; int showCount = 15; if (int.Parse(cols) * 30 > 200) { work_width = int.Parse(cols) * 30; if (work_width > 200) { showCount = showCount + ((work_width - 200) * 3 / 30); } } //string calendarStr = ""; string showGroup = "true"; string showWorkTitle = ""; switch (isConstruction) { case "1": showContent = "空间"; showItem = "图纸及索引号"; string flow = ""; DataTable tmpDT = new DataTable(); DataSet tmpDS = new BLL.project_work_flow().GetList(" s_sid='" + pssid + "'"); if (tmpDS.Tables.Count > 0) { tmpDT = tmpDS.Tables[0]; } for (int i = 0; i < tmpDT.Rows.Count; i++) { flow += (i + 1).ToString() + "." + tmpDT.Rows[i]["work_flow_name"].ToString().Trim() + ","; } string workTitle = monthstr + "(施工图立面框架" + flow + "(计划表中实际完成时间将用绿色色块做的标志))"; showWorkTitle = ""; for (int i = 0; i < workTitle.Length; i++) { showWorkTitle += workTitle[i]; if ((i + 1) % showCount == 0) { showWorkTitle += "<br/>"; } } break; case "0": showContent = "工作内容"; showItem = "细目"; showGroup = "false"; showWorkTitle = monthstr + "(黄色色块代表完成这项工作所需要的完成时间,<br/>计划表中实际完成时间将用绿色色块做标记)"; break; case "2": showContent = "货物类别"; showItem = "工作细目"; showWorkTitle = monthstr; break; default: break; } frozencolumns += "[["; frozencolumns += "{ title: '小组', field: 'group_name', width: 60, rowspan:3, halign: 'center', align: 'center',hidden:" + showGroup + ",editor:{type:'diseditText'}}"; frozencolumns += ",{ title: '" + showContent + "', field: 'contentName', width: 200, rowspan:3,halign: 'center',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';},editor:{type:'diseditText'}}"; frozencolumns += ",{ title: '" + showItem + "', field: 'itemName', width: 200,rowspan:3, halign: 'center',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';},editor:'text'}"; frozencolumns += "]]"; column += "[["; column += "{ title: '月'}"; column += ",{ title: '" + showWorkTitle + "',colspan:" + cols + "}"; column += dynImp; column += ",{ title: '主管审核', rowspan:2,colspan:" + (v1UidArr.Length > 0?v1UidArr.Length:1) + ", halign: 'center', align: 'center'}"; column += ",{ title: '未完成的原因', field: 'unfinished_reason', width: 60,rowspan:3, halign: 'center', align: 'center',editor:{type:'diseditText'}}"; column += ",{ title: '解决的办法', field: 'solution', width: 60, rowspan:3, halign:'center', align:'center',editor:{type:'diseditText'}}"; column += ",{ title: '解决的结果', field: 'reviewed', width: 60, rowspan:3, halign:'center', align:'center',editor:{type:'diseditText'}}"; column += ",{ title: '总审', rowspan:2,colspan:" + (v2UidArr.Length > 0 ? v2UidArr.Length : 1) + ", halign: 'center', align: 'center'}"; column += ",{ title: '备注', field: 'remark', width: 60, rowspan:3,halign: 'center', editor: 'text',formatter: function (value, rowData, rowIndex) {return '<a class=\\\"a_black\\\" title=\\\"' + value + '\\\"><span class=\\\"mlength\\\">' + value + '</span></a>';}}"; column += "],"; column += "["; column += "{ title: '日'}"; column += dynDay; column += "],["; column += "{ title: '星期', field: 'week',width:40,halign: 'center', align: 'center',styler: function(value,row,index){return 'background-color:lightgray;color:lightgray;';},editor:{type:'diseditText'}}"; column += dynWeek; column += dynImpUser; column += dnyV1; column += dnyV2; column += "]]"; } } }