songnan.zhang
3 years ago
34 changed files with 2587 additions and 711 deletions
@ -0,0 +1,738 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Web; |
|||
using System.Web.Mvc; |
|||
using QMAPP.Common.Web.Controllers; |
|||
using QMFrameWork.WebUI.Attribute; |
|||
using QMAPP.FJC.Web.Models.FIS; |
|||
using QMFrameWork.Data; |
|||
using QMAPP.ServicesAgent; |
|||
using QMAPP.FJC.Entity.FIS; |
|||
using QMAPP.Entity; |
|||
using QMFrameWork.WebUI.DataSource; |
|||
using QMFrameWork.Common.Serialization; |
|||
using System.Data; |
|||
using QMAPP.Common.Web.Models; |
|||
using QMAPP.FJC.Entity.Basic; |
|||
using QMAPP.MD.Entity; |
|||
using QMAPP.FJC.BLL.FIS; |
|||
|
|||
namespace QMAPP.FJC.Web.Controllers |
|||
{ |
|||
/// <summary>
|
|||
/// 门板计划查询
|
|||
/// 作 者:郭兆福
|
|||
/// 时 间:2017年09月15日
|
|||
/// </summary>
|
|||
public class TJDoorPlankPlanPrintController : QController |
|||
{ |
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 加载列表
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HandleException] |
|||
public ActionResult List(bool? callback) |
|||
{ |
|||
string order_type = Request["ORDER_TYPE"]; |
|||
DoorPlankPlanModel seachModel = new DoorPlankPlanModel(); |
|||
seachModel.ORDER_TYPE = order_type; |
|||
seachModel.PLANTIMESTART = DateTime.Now.Date.AddDays(-10).ToString("yyyy-MM-dd HH:mm:ss"); |
|||
seachModel.PLANTIMEEND = DateTime.Now.Date.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss"); |
|||
seachModel.ImmediateSearch = false; |
|||
if (callback == true) |
|||
TryGetSelectBuffer<DoorPlankPlanModel>(out seachModel); |
|||
seachModel.rownumbers = false; |
|||
seachModel.url = "/DoorPlankPlan/GetList"; |
|||
return View("DoorPlankPlanList", seachModel); |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="callBack">是否回调</param>
|
|||
/// <returns>列表</returns>
|
|||
[HandleException] |
|||
public ActionResult GetList(bool? callBack) |
|||
{ |
|||
DoorPlankPlanModel seachModel = null; |
|||
DataPage page = null; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
OrderPlan condition = null; |
|||
DataResult<DataPage> pageResult = new DataResult<DataPage>(); |
|||
try |
|||
{ |
|||
//获取查询对象
|
|||
seachModel = GetModel<DoorPlankPlanModel>(); |
|||
#region 获取缓存值
|
|||
if (callBack != null) |
|||
{ |
|||
TryGetSelectBuffer<DoorPlankPlanModel>(out seachModel); |
|||
} |
|||
else |
|||
{ |
|||
//保存搜索条件
|
|||
SetSelectBuffer<DoorPlankPlanModel>(seachModel); |
|||
} |
|||
#endregion
|
|||
//获取前台分页设置信息
|
|||
page = this.GetDataPage(seachModel); |
|||
condition = CopyToModel<OrderPlan, DoorPlankPlanModel>(seachModel); |
|||
//
|
|||
//condition.WWWWWW = ((int)QMAPP.FJC.Entity.EnumGeter.ProductType.biaopi).ToString();//默认查询XXXX
|
|||
#region wcf服务统一接口
|
|||
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("DoorPlankPlanBLL_GetList", condition, page); |
|||
if (pageResult.IsSuccess == false) |
|||
{ |
|||
SetMessage(pageResult.Msg); |
|||
return List(true); |
|||
} |
|||
DateGridResult<OrderPlan> result = new DateGridResult<OrderPlan>(); |
|||
result.Total = pageResult.Result.RecordCount; |
|||
result.Rows = JsonConvertHelper.GetDeserialize<List<OrderPlan>>(pageResult.Result.Result.ToString()); |
|||
#endregion
|
|||
|
|||
return Content(result.GetJsonSource()); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 编辑
|
|||
/// <summary>
|
|||
/// 编辑载入
|
|||
/// </summary>
|
|||
/// <returns>处理结果</returns>
|
|||
[HandleException] |
|||
public ActionResult Edit() |
|||
{ |
|||
DoorPlankPlanModel model = new DoorPlankPlanModel(); |
|||
string ID = Request.Params["PID"]; |
|||
string TYPE = Request.Params["ORDER_TYPE"]; |
|||
OrderPlan Entity = new OrderPlan(); |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<OrderPlan> result = new DataResult<OrderPlan>(); |
|||
try |
|||
{ |
|||
if (string.IsNullOrEmpty(ID) == false) |
|||
{ |
|||
//修改获取原数据
|
|||
Entity.PID = ID; |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<OrderPlan>>("DoorPlankPlanBLL_Get", Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage(result.Msg); |
|||
return View("DoorPlankPlanEdit", model); |
|||
} |
|||
|
|||
model = CopyToModel<DoorPlankPlanModel, OrderPlan>(result.Result); |
|||
|
|||
if (model.PLANSOURCE == FJC.Entity.EnumGeter.WORKORDERTYPE.FIS.GetHashCode().ToString()) |
|||
{ |
|||
//SetMessage("!");
|
|||
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", "无法对FIS计划进行修改编辑!")); |
|||
} |
|||
} |
|||
model.ORDER_TYPE = TYPE; |
|||
return View("DoorPlankPlanEdit", model); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 保存
|
|||
/// </summary>
|
|||
/// <param name="model"></param>
|
|||
/// <returns>处理结果</returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
[ValidateInput(false)] |
|||
public ActionResult Save(DoorPlankPlanModel saveModel) |
|||
{ |
|||
OrderPlan Entity = null; |
|||
string TYPE = Request.Form["ORDER_TYPE"]; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
Entity = CopyToModel<OrderPlan, DoorPlankPlanModel>(saveModel); |
|||
if (string.IsNullOrEmpty(Entity.PID) == true) |
|||
{ |
|||
//新增
|
|||
Entity.ORDER_TYPE = TYPE; |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DoorPlankPlanBLL_TJInsert", Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage("计划单号已存在!"); |
|||
return View("DoorPlankPlanEdit", saveModel); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
//修改
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DoorPlankPlanBLL_Update", Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage(result.Msg); |
|||
return View("DoorPlankPlanEdit", saveModel); |
|||
} |
|||
} |
|||
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge)); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 插单
|
|||
/// </summary>
|
|||
/// <returns>处理结果</returns>
|
|||
[HandleException] |
|||
public ActionResult Insert() |
|||
{ |
|||
DoorPlankPlanModel model = new DoorPlankPlanModel(); |
|||
string ID = Request.Params["PID"]; |
|||
string TYPE = Request.Params["ORDER_TYPE"]; |
|||
OrderPlan Entity = new OrderPlan(); |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<OrderPlan> result = new DataResult<OrderPlan>(); |
|||
try |
|||
{ |
|||
if (string.IsNullOrEmpty(ID) == false) |
|||
{ |
|||
//修改获取原数据
|
|||
Entity.PID = ID; |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<OrderPlan>>("DoorPlankPlanBLL_GetFISInsertPos", Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", result.Msg)); |
|||
} |
|||
model = CopyToModel<DoorPlankPlanModel, OrderPlan>(result.Result); |
|||
} |
|||
model.PID = ""; |
|||
model.MATERIAL_CODE = ""; |
|||
model.MATERIAL_NAME = ""; |
|||
model.ORDER_TYPE = TYPE; |
|||
return View("DoorPlankPlanInsert", model); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// 保存插单
|
|||
/// </summary>
|
|||
/// <param name="model"></param>
|
|||
/// <returns>处理结果</returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
[ValidateInput(false)] |
|||
public ActionResult SaveInsert(DoorPlankPlanModel saveModel) |
|||
{ |
|||
Material condition = new Material(); |
|||
OrderPlan Entity = new OrderPlan(); |
|||
string TYPE = Request.Form["ORDER_TYPE"]; |
|||
|
|||
string source = Request.Form["PLANSOURCE"]; |
|||
DataResult<int> result = new DataResult<int>(); |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
|
|||
string materialcode = "('" + saveModel.MaterialCodes.Replace(";", "','") + "')"; |
|||
|
|||
condition.MaterialCodes = materialcode; |
|||
List<Material> materiallist = wcfAgent.InvokeServiceFunction<List<Material>>("MaterialBLL_GetMaterialInfoList", condition); |
|||
|
|||
Entity.ORDER_TYPE = TYPE; |
|||
Entity.QTY = Convert.ToInt32(saveModel.QTY); |
|||
Entity.SHIFT_CODE = saveModel.SHIFT_CODE; |
|||
Entity.PLAN_DATE = saveModel.PLAN_DATE; |
|||
Entity.PLAN_SEQ = saveModel.PLAN_SEQ; |
|||
Entity.PLANSOURCE = source; |
|||
var publishrightnow = string.Equals(saveModel.PLAN_STATE, "on"); |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DoorPlankPlanBLL_SaveFISInsert", Entity, materiallist,publishrightnow); |
|||
|
|||
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge)); |
|||
|
|||
} |
|||
#endregion
|
|||
|
|||
#region 删除
|
|||
/// <summary>
|
|||
/// 删除
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
public ActionResult Delete(OrderPlan model) |
|||
{ |
|||
string selectKey = Request.Form["selectKey"]; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DoorPlankPlanBLL_Delete", selectKey); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage(result.Msg); |
|||
return List(true); |
|||
} |
|||
SetMessage(AppResource.DeleteMessage); |
|||
return List(true); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 发布
|
|||
/// <summary>
|
|||
/// 发布
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
public ActionResult PutOut(OrderPlan model) |
|||
{ |
|||
string selectKey = Request.Form["selectKey"]; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<int> result = new DataResult<int>(); |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DoorPlankPlanBLL_PutOut", selectKey); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage(result.Msg); |
|||
return List(true); |
|||
} |
|||
SetMessage(AppResource.PutOutMessage); |
|||
return List(true); |
|||
} |
|||
#endregion
|
|||
|
|||
#region 导出excel
|
|||
/// <summary>
|
|||
/// 导出excel
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HttpPost] |
|||
public ActionResult ExportExcel() |
|||
{ |
|||
DoorPlankPlanModel seachModel = null; |
|||
OrderPlan condition = null; |
|||
DataTable exportDt = new DataTable(); |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
try |
|||
{ |
|||
//获取查询对象
|
|||
seachModel = GetModel<DoorPlankPlanModel>(); |
|||
condition = CopyToModel<OrderPlan, DoorPlankPlanModel>(seachModel); |
|||
condition.PIDList = Request.Form["selectKey"]; |
|||
//获取数据
|
|||
DoorPlankPlanBLL dp = new DoorPlankPlanBLL(); |
|||
exportDt = dp.GetExportData(condition); |
|||
//exportDt = wcfAgent.InvokeServiceFunction<DataTable>("DoorPlankPlanBLL_GetExportData", condition);
|
|||
|
|||
//导出
|
|||
QMFrameWork.WebUI.Util.IEFileTool efTool = new QMFrameWork.WebUI.Util.IEFileTool(); |
|||
return efTool.GetExcelFileResult("DoorPlankPlanExp", "门板计划信息.xlsx", exportDt); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 导入excel
|
|||
/// <summary>
|
|||
/// 导入excel
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HttpPost] |
|||
public ActionResult ImportExcel() |
|||
{ |
|||
DataTable dt = null; |
|||
List<OrderPlan> list = new List<OrderPlan>(); |
|||
DataResult<ImportMessage> serviceResult = null; |
|||
string fileName = Request.Form["fileName"]; |
|||
string orderby = Request.Form["ORDER_TYPE"]; |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
|
|||
Materiel materialmodel = new Materiel(); |
|||
ProduceShift produceshiftmodel = new ProduceShift(); |
|||
MachineInfo machine = new MachineInfo(); |
|||
//初始工作中心编号条件
|
|||
QMAPP.MD.Entity.WorkCell workcell = new QMAPP.MD.Entity.WorkCell(); |
|||
workcell.WORKCELL_CODE = orderby; |
|||
|
|||
try |
|||
{ |
|||
dt = this.GetTableByExcel("DoorPlankPlanImp", fileName, dt); |
|||
//格式转换
|
|||
list = QMFrameWork.Common.Util.BindHelper.ConvertToList<OrderPlan>(dt).ToList(); |
|||
serviceResult = wcfAgent.InvokeServiceFunction<DataResult<ImportMessage>>("DoorPlankPlanBLL_GetImportData", list, materialmodel,machine, produceshiftmodel, workcell); |
|||
if (serviceResult.Ex != null) |
|||
{ |
|||
throw serviceResult.Ex; |
|||
} |
|||
if (serviceResult.Result.failureNum != 0) |
|||
{ |
|||
foreach (RowError error in serviceResult.Result.Errors) |
|||
{ |
|||
dt.Rows[error.Key - 1]["InfoError"] = error.Value; |
|||
} |
|||
ImportMessageModel model = new ImportMessageModel(); |
|||
model.InfoName = "DoorPlankPlanImp"; |
|||
model.ReturnUrl = "/DoorPlankPlan/List?callBack=true"; |
|||
model.Message = serviceResult.Result; |
|||
model.ErrorDt = dt; |
|||
return new MessageOutputController().OutputImportMessage(model); |
|||
} |
|||
else |
|||
{ |
|||
SetMessage(serviceResult.Msg + ",如下:<br/>" |
|||
+ "插入" + serviceResult.Result.insertNum + "条," |
|||
+ "更新" + serviceResult.Result.updateNum + "条" |
|||
); |
|||
return List(true); |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
finally |
|||
{ |
|||
System.IO.File.Delete(MvcApplication.TempPath + fileName); |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 下载模板
|
|||
/// <summary>
|
|||
/// 下载导入模板
|
|||
/// </summary>
|
|||
/// <returns>结果</returns>
|
|||
[HttpPost] |
|||
public ActionResult GetTemplate() |
|||
{ |
|||
try |
|||
{ |
|||
string path = AppDomain.CurrentDomain.BaseDirectory + "App_Data/Excel/"; |
|||
string fileName = "DoorPlankPlanImp.xlsx"; |
|||
return File(path + fileName, "application/vnd.ms-excel", Url.Encode("门板信息导入模板.xlsx")); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 整车添加
|
|||
/// <summary>
|
|||
/// 编辑载入
|
|||
/// </summary>
|
|||
/// <returns>处理结果</returns>
|
|||
[HandleException] |
|||
public ActionResult AddWholeDoor() |
|||
{ |
|||
DoorPlankPlanModel model = new DoorPlankPlanModel(); |
|||
string ID = Request.Params["PID"]; |
|||
string TYPE = Request.Params["ORDER_TYPE"]; |
|||
OrderPlan Entity = new OrderPlan(); |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<OrderPlan> result = new DataResult<OrderPlan>(); |
|||
try |
|||
{ |
|||
if (string.IsNullOrEmpty(ID) == false) |
|||
{ |
|||
//修改获取原数据
|
|||
Entity.PID = ID; |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<OrderPlan>>("DoorPlankPlanBLL_Get", Entity); |
|||
if (result.IsSuccess == false) |
|||
{ |
|||
SetMessage(result.Msg); |
|||
return View("DoorPlankPlanEdit", model); |
|||
} |
|||
model = CopyToModel<DoorPlankPlanModel, OrderPlan>(result.Result); |
|||
} |
|||
model.ORDER_TYPE = TYPE; |
|||
return View("AddWholeDoorEdit", model); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
#region 保存整车添加
|
|||
/// <summary>
|
|||
/// 保存
|
|||
/// </summary>
|
|||
/// <param name="model"></param>
|
|||
/// <returns>处理结果</returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
[ValidateInput(false)] |
|||
public ActionResult DoorPlanSave(DoorPlankPlanModel saveModel) |
|||
{ |
|||
|
|||
Material condition = new Material(); |
|||
OrderPlan Entity = new OrderPlan(); |
|||
string TYPE = Request.Form["ORDER_TYPE"]; |
|||
string SetCode = Request.Form["AsmSetCode"]; |
|||
string source = Request.Form["PLANSOURCE"]; |
|||
DataResult<int> result = new DataResult<int>(); |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
|
|||
string materialcode = "('" + saveModel.MaterialCodes.Replace(";", "','") + "')"; |
|||
|
|||
condition.MaterialCodes = materialcode; |
|||
List<Material> materiallist = wcfAgent.InvokeServiceFunction<List<Material>>("MaterialBLL_GetMaterialInfoList", condition); |
|||
|
|||
Entity.ORDER_TYPE = TYPE; |
|||
Entity.QTY = Convert.ToInt32(saveModel.QTY); |
|||
Entity.SHIFT_CODE = saveModel.SHIFT_CODE; |
|||
Entity.PLAN_DATE = saveModel.PLAN_DATE; |
|||
Entity.PLANSOURCE = source; |
|||
Entity.AsmSetCode = SetCode; |
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DoorPlankPlanBLL_InsertWholeDoor", Entity, materiallist); |
|||
|
|||
|
|||
|
|||
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge)); |
|||
} |
|||
#endregion
|
|||
|
|||
//#region 整车添加物料信息
|
|||
///// <summary>
|
|||
///// 编辑载入
|
|||
///// </summary>
|
|||
///// <returns>处理结果</returns>
|
|||
//[HandleException]
|
|||
//public ActionResult AddMaterial()
|
|||
//{
|
|||
// DoorPlankPlanModel model = new DoorPlankPlanModel();
|
|||
// string ID = Request.Params["PID"];
|
|||
// string TYPE = Request.Params["ORDER_TYPE"];
|
|||
// OrderPlan Entity = new OrderPlan();
|
|||
// ServiceAgent wcfAgent = this.GetServiceAgent();
|
|||
// DataResult<OrderPlan> result = new DataResult<OrderPlan>();
|
|||
// try
|
|||
// {
|
|||
// model.ORDER_TYPE = TYPE;
|
|||
// return View("AddMaterialEdit", model);
|
|||
// }
|
|||
// catch (Exception ex)
|
|||
// {
|
|||
// throw ex;
|
|||
// }
|
|||
//}
|
|||
|
|||
///// <summary>
|
|||
///// 保存
|
|||
///// </summary>
|
|||
///// <param name="model"></param>
|
|||
///// <returns>处理结果</returns>
|
|||
//[HttpPost]
|
|||
//[HandleException]
|
|||
//[ValidateInput(false)]
|
|||
//public ActionResult SaveMaterial(DoorPlankPlanModel saveModel)
|
|||
//{
|
|||
|
|||
// Material condition = new Material();
|
|||
// ServiceAgent wcfAgent = this.GetServiceAgent();
|
|||
|
|||
// condition.MATERIAL_CODE = saveModel.MATERIAL_CODE;
|
|||
// Material material = wcfAgent.InvokeServiceFunction<Material>("MaterialBLL_GetMaterialInfo", condition);
|
|||
|
|||
// if (!string.IsNullOrEmpty(material.PID))
|
|||
// {
|
|||
// saveModel.MATERIAL_NAME = material.MATERIAL_NAME;
|
|||
// saveModel.COLOR = material.COLOR;
|
|||
// saveModel.HBTYPE = material.HBTYPE;
|
|||
// return View("AddWholeDoorEdit", saveModel);
|
|||
// }
|
|||
// return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge));
|
|||
//}
|
|||
//#endregion
|
|||
|
|||
#region 整车添加物料信息
|
|||
[HandleException] |
|||
public ActionResult AddSendDetail(bool? callBack) |
|||
{ |
|||
//实例化服务
|
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
QMAPP.MD.Web.Models.MaterialModel seachModel = null; |
|||
DataResult<DataPage> pageResult = new DataResult<DataPage>(); |
|||
DataPage page = new DataPage(); |
|||
string Fisid = Request["MATERIAL_CODE"].ToString(); |
|||
FISAssembly MaterialAssInfo = wcfAgent.InvokeServiceFunction<FISAssembly>("DoorPlankPlanBLL_GetFISMaterialInfoCD", Fisid); |
|||
string materials = "('" + MaterialAssInfo.MESModulFL + "','" + MaterialAssInfo.MESModulFR + "','" + MaterialAssInfo.MESModulRL + "','" + MaterialAssInfo.MESModulRR + "')"; |
|||
//物料发货明细实体
|
|||
Material detail = new Material() |
|||
{ |
|||
MaterialCodes = materials, |
|||
}; |
|||
try |
|||
{ |
|||
//获取查询对象
|
|||
seachModel = GetModel<QMAPP.MD.Web.Models.MaterialModel>(); |
|||
#region 获取缓存值
|
|||
if (callBack != null) |
|||
{ |
|||
TryGetSelectBuffer<QMAPP.MD.Web.Models.MaterialModel>(out seachModel); |
|||
} |
|||
else |
|||
{ |
|||
//保存搜索条件
|
|||
SetSelectBuffer<QMAPP.MD.Web.Models.MaterialModel>(seachModel); |
|||
} |
|||
#endregion
|
|||
//获取前台分页设置信息
|
|||
page = this.GetDataPage(seachModel); |
|||
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("MaterialBLL_GetList", detail, page); |
|||
if (pageResult.IsSuccess == false) |
|||
{ |
|||
SetMessage(pageResult.Msg); |
|||
return List(true); |
|||
} |
|||
DateGridResult<Material> result = new DateGridResult<Material>(); |
|||
result.Total = pageResult.Result.RecordCount; |
|||
result.Rows = JsonConvertHelper.GetDeserialize<List<Material>>(pageResult.Result.Result.ToString()); |
|||
for (var i = 0; i < result.Total; i++) |
|||
{ |
|||
result.Rows[i].AsmSetCode = MaterialAssInfo.AsmSetCode; |
|||
} |
|||
return Content(result.GetJsonSource()); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 门板顺序号编辑
|
|||
/// <summary>
|
|||
/// 门板顺序号编辑
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
public ActionResult DoorPlankEditSeq() |
|||
{ |
|||
DoorPlankPlanModel model = new DoorPlankPlanModel(); |
|||
OrderPlan Entity = new OrderPlan(); |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<OrderPlan> result = new DataResult<OrderPlan>(); |
|||
try |
|||
{ |
|||
model = GetModel<DoorPlankPlanModel>(); |
|||
return View("DoorPlankEditSeq", model); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
|
|||
#region 获取编辑系列号列表
|
|||
/// <summary>
|
|||
/// 获取编辑系列号列表
|
|||
/// </summary>
|
|||
/// <param name="callBack"></param>
|
|||
/// <returns></returns>
|
|||
[HandleException] |
|||
public ActionResult GetDoorPlankPlanList(bool? callBack) |
|||
{ |
|||
DoorPlankPlanModel seachModel = null; |
|||
DataResult<DataPage> pageResult = new DataResult<DataPage>(); |
|||
DataPage page = new DataPage(); |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
OrderPlan condition = new OrderPlan(); |
|||
try |
|||
{ |
|||
//获取查询对象
|
|||
seachModel = GetModel<DoorPlankPlanModel>(); |
|||
|
|||
condition.PIDList =seachModel.PIDList; |
|||
condition.ORDER_TYPE = seachModel.ORDER_TYPE; |
|||
|
|||
#region 获取缓存值
|
|||
if (callBack != null) |
|||
{ |
|||
TryGetSelectBuffer<DoorPlankPlanModel>(out seachModel); |
|||
} |
|||
else |
|||
{ |
|||
//保存搜索条件
|
|||
SetSelectBuffer<DoorPlankPlanModel>(seachModel); |
|||
} |
|||
#endregion
|
|||
//获取前台分页设置信息
|
|||
page = this.GetDataPage(seachModel); |
|||
condition = CopyToModel<OrderPlan, DoorPlankPlanModel>(seachModel); |
|||
|
|||
#region wcf服务统一接口
|
|||
pageResult = wcfAgent.InvokeServiceFunction<DataResult<DataPage>>("DoorPlankPlanBLL_GetDoorPlankPlanList", condition, page); |
|||
if (pageResult.IsSuccess == false) |
|||
{ |
|||
SetMessage(pageResult.Msg); |
|||
return List(true); |
|||
} |
|||
DateGridResult<OrderPlan> result = new DateGridResult<OrderPlan>(); |
|||
result.Total = pageResult.Result.RecordCount; |
|||
result.Rows = JsonConvertHelper.GetDeserialize<List<OrderPlan>>(pageResult.Result.Result.ToString()); |
|||
#endregion
|
|||
return Content(result.GetJsonSource()); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
#region 保存顺序号修改
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
/// <param name="model"></param>
|
|||
/// <returns>处理结果</returns>
|
|||
[HttpPost] |
|||
[HandleException] |
|||
[ValidateInput(false)] |
|||
public ActionResult DoorPlankPlanSeqSave(DoorPlankPlanModel saveModel) |
|||
{ |
|||
OrderPlan entity = new OrderPlan(); |
|||
ServiceAgent wcfAgent = this.GetServiceAgent(); |
|||
DataResult<int> result = new DataResult<int>(); |
|||
|
|||
entity.PLAN_SEQ = saveModel.PLAN_SEQ; |
|||
entity.PIDList = saveModel.PIDList; |
|||
|
|||
entity = CopyToModel<OrderPlan, DoorPlankPlanModel>(saveModel); |
|||
|
|||
//修改
|
|||
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DoorPlankPlanBLL_UpdateDoorPlankPlanSeq", entity); |
|||
|
|||
return this.GetJsViewResult(string.Format("parent.List(1);parent.showTitle('{0}');parent.closeAppWindow1();", AppResource.SaveMessge)); |
|||
} |
|||
#endregion
|
|||
} |
|||
} |
@ -0,0 +1,208 @@ |
|||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" |
|||
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.FIS.DoorPlankPlanModel>" %> |
|||
|
|||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> |
|||
整车添加门板编辑 |
|||
</asp:Content> |
|||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> |
|||
<%=Html.QPEdit("信息", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%> |
|||
<table id="editTable" cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td> |
|||
<table> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.PLAN_DATE)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.PLAN_DATE)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.QTY)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.QTY)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.SHIFT_CODE)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.SHIFT_CODE)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.MATERIAL_CODE)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.MATERIAL_CODE)%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<table id="QDateGrid"> |
|||
</table> |
|||
<%=Html.HiddenFor(p => p.ORDER_TYPE)%> |
|||
<%=Html.HiddenFor(p => p.MaterialCodes)%> |
|||
<%=Html.HiddenFor(p => p.AsmSetCode)%> |
|||
<%=Html.Hidden("PLANSOURCE",1)%> |
|||
<%=Html.QPEnd() %> |
|||
<script language="javascript" type="text/javascript"> |
|||
$(function () { |
|||
$('#QDateGrid').datagrid({ |
|||
width: 500, |
|||
height: 400, |
|||
fit: true, |
|||
nowrap: false, |
|||
striped: true, |
|||
collapsible: false, |
|||
pagination: true, |
|||
rownumbers: false, |
|||
remoteSort: false, |
|||
idField: 'MATERIAL_CODE', |
|||
columns: [[ |
|||
{ field: 'MATERIAL_CODE', title: '物料号', align: 'center', width: 190 }, |
|||
{ field: 'MATERIAL_NAME', title: '物料名称', align: 'center', width: 280 }, |
|||
{ field: 'HBTYPE', title: '高低配', align: 'center', width: 80 }, |
|||
{ field: 'COLOR', title: '颜色', align: 'center', width: 80 }, |
|||
{ field: 'AsmSetCode', title: '前缀', align: 'center', width: 80, hidden:true} |
|||
]], |
|||
//*************按钮**************************** |
|||
toolbar: [ |
|||
//************删除***************************** |
|||
{ |
|||
text: '删除', |
|||
iconCls: 'icon-remove', |
|||
handler: function () |
|||
{ |
|||
var selectedRowIds = $('#QDateGrid').datagrid('getSelections'); |
|||
var len = selectedRowIds.length; |
|||
if (len == 0) |
|||
{ |
|||
MSI("提示", "请选择要删除的门板计划信息!"); |
|||
return false; |
|||
} else |
|||
{ |
|||
MSQ("提示", "确定要删除选中的记录吗?", function () |
|||
{ |
|||
for (var i = 0; i < len; i++) |
|||
{ |
|||
var rowIndex = $('#QDateGrid').datagrid('getRowIndex', selectedRowIds[0]); |
|||
$("#QDateGrid").datagrid("deleteRow", rowIndex); |
|||
} |
|||
}) |
|||
} |
|||
//******************************************** |
|||
} |
|||
} |
|||
] |
|||
//********************************************** |
|||
}); |
|||
}); |
|||
//*********************grid画完************* |
|||
//*********************物料信息************* |
|||
$('#MATERIAL_CODE').combobox({ |
|||
url: "/Dict/GetFisDoorPlanForCD", |
|||
panelHeight: '150', |
|||
panelWidth: '370', |
|||
editable: 'false', |
|||
valueField: 'Id', |
|||
textField: 'Name', |
|||
onSelect: function () { |
|||
var materialcode = $('#MATERIAL_CODE').combobox('getValue'); |
|||
if (materialcode != "") { |
|||
//获取四扇车门信息 |
|||
$('#QDateGrid').datagrid("loadData", new Array()); |
|||
var dataInfo = $('#QDateGrid').datagrid('getData'); |
|||
$.ajax({ |
|||
url: "/DoorPlankPlan/AddSendDetail", |
|||
data: { |
|||
'MATERIAL_CODE': $('#MATERIAL_CODE').combobox('getValue') |
|||
}, |
|||
type: "POST", |
|||
cache: false, |
|||
dataType: "json", |
|||
async: false, |
|||
success: function (data) { |
|||
if (data == null || data == '') { |
|||
//alert("!"); |
|||
MSI("提示", "未查到数据!") |
|||
} |
|||
else { |
|||
for (var i = 0; i < data.total; i++) { |
|||
var insertInfo = |
|||
{ |
|||
MATERIAL_CODE: data.rows[i].MATERIAL_CODE, |
|||
MATERIAL_NAME: data.rows[i].MATERIAL_NAME, |
|||
HBTYPE: data.rows[i].HBTYPE, |
|||
COLOR: data.rows[i].COLOR, |
|||
AsmSetCode: data.rows[i].AsmSetCode |
|||
}; |
|||
dataInfo.rows.push(insertInfo); |
|||
} |
|||
$('#QDateGrid').datagrid('loadData', dataInfo); |
|||
$('#addMatNoWindow').window('close'); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
else { |
|||
// alert("****"); |
|||
} |
|||
} |
|||
}); |
|||
//*********************物料信息结束************* |
|||
//********************整车添加保存****************************************** |
|||
function SaveDoorPlan() { |
|||
var plandate = $('#PLAN_DATE').val(); |
|||
if (plandate == "") { |
|||
MSI("提示", "计划日期不能为空!"); |
|||
return; |
|||
} |
|||
var reg = /^[0-9]+$/; |
|||
var qty = $('#QTY').val(); |
|||
if (!reg.test(qty)) { |
|||
MSI("提示", "计划数量只能输入数字!"); |
|||
return; |
|||
} |
|||
|
|||
var shiftcode = $('#SHIFT_CODE').combobox('getValue'); |
|||
if (shiftcode == "") { |
|||
MSI("提示", "班次信息不能为空!"); |
|||
return; |
|||
} |
|||
//Grid表信息 |
|||
var matData = $('#QDateGrid').datagrid('getData'); |
|||
|
|||
//当Grid表存在信息时 |
|||
if (matData.rows.length > 0) { |
|||
var materialCode = ""; |
|||
for (var i = 0; i < matData.rows.length; i++) { |
|||
var materialDetail = matData.rows[i]; |
|||
materialCode = materialCode + ";" + materialDetail.MATERIAL_CODE; |
|||
} |
|||
|
|||
var setcode=matData.rows[0].AsmSetCode; |
|||
$('#MaterialCodes').val(materialCode.substring(1)); |
|||
$('#AsmSetCode').val(setcode); |
|||
submitByButton("DoorPlanSave"); |
|||
} |
|||
else { |
|||
MSI("提示", "整车添加需要四条物料信息!"); |
|||
return false; |
|||
} |
|||
} |
|||
</script> |
|||
</asp:Content> |
|||
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server"> |
|||
<table width="100%" cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td> |
|||
<%=Html.QTButtonSave("DoorPlankPlan", "Save", "return SaveDoorPlan();")%> |
|||
<%=Html.QTButtonBack("close", "DashBoardPlanList", "parent.closeAppWindow1();return false;")%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</asp:Content> |
@ -0,0 +1,130 @@ |
|||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" |
|||
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.FIS.DoorPlankPlanModel>" %> |
|||
|
|||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> |
|||
更新门板计划顺序号 |
|||
</asp:Content> |
|||
|
|||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> |
|||
<% |
|||
var editable = true; |
|||
%> |
|||
<table id="editTable" cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td> |
|||
<table> |
|||
<tr> |
|||
<th align="right"> |
|||
<span style="color: #FF0000">*</span>顺序号 |
|||
</th> |
|||
<td> |
|||
<input class="easyui-validatebox" type="text" id="PLAN_SEQ" name="PLAN_SEQ" value="<%=Model.PLAN_SEQ %>" |
|||
<%=editable?"data-options=\"required:true,validType:['number','length[3,3]']\"":"readonly =\"readonly\""%> /> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<table id="QDateGrid"></table> |
|||
<%=Html.QPEnd() %> |
|||
<%=Html.Hidden("PIDList")%> |
|||
<%=Html.Hidden("ORDER_TYPE")%> |
|||
<script language="javascript" type="text/javascript"> |
|||
|
|||
$(function () { |
|||
$('#QDateGrid').datagrid({ |
|||
// width: 350, |
|||
// height: 300, |
|||
fit: true, |
|||
nowrap: false, |
|||
striped: true, |
|||
collapsible: false, |
|||
pagination: true, |
|||
rownumbers: false, |
|||
remoteSort: false, |
|||
idField: 'PLAN_NO', |
|||
columns: [[ |
|||
{ field: 'PLAN_NO', title: '计划单号', align: 'center', width: 150 }, |
|||
{ field: 'PLAN_SEQ', title: '计划顺序号', align: 'center', width: 180 }, |
|||
{ field: 'MATERIAL_CODE', title: '物料号', align: 'center', width: 150 }, |
|||
{ field: 'MATERIAL_NAME', title: '物料名称', align: 'center', width: 180 } |
|||
]] |
|||
}); |
|||
//******************datagrid画完**************************** |
|||
|
|||
|
|||
|
|||
$('#QDateGrid').datagrid("loadData", new Array()); |
|||
var dataInfo = $('#QDateGrid').datagrid('getData'); |
|||
var type = document.getElementById("ORDER_TYPE").value; |
|||
var pids = document.getElementById("PIDList").value; |
|||
$.ajax({ |
|||
url: "/DoorPlankPlan/GetDoorPlankPlanList?PIDList=" + pids + "&ORDER_TYPE=" + type, |
|||
type: "POST", |
|||
cache: false, |
|||
dataType: "json", |
|||
async: false, |
|||
success: function (data) { |
|||
if (data == null || data == '') { |
|||
//alert("!"); |
|||
MSI("提示", "未查到数据!") |
|||
} |
|||
else { |
|||
for (var i = 0; i < data.total; i++) { |
|||
var insertInfo = { |
|||
PLAN_NO: data.rows[i].PLAN_NO, |
|||
PLAN_SEQ: data.rows[i].PLAN_SEQ, |
|||
MATERIAL_CODE: data.rows[i].MATERIAL_CODE, |
|||
MATERIAL_NAME: data.rows[i].MATERIAL_NAME |
|||
}; |
|||
dataInfo.rows.push(insertInfo); |
|||
} |
|||
$('#QDateGrid').datagrid('loadData', dataInfo); |
|||
} |
|||
} |
|||
}); |
|||
//******************填充grid结束************************** |
|||
}); |
|||
//****************function ()结束**************************** |
|||
|
|||
|
|||
|
|||
//******************保存更新**************************** |
|||
function SaveDoorPlankPlanSeq() { |
|||
if (isValidate() == false) { |
|||
return false; |
|||
} |
|||
//当前页面中,有无条码 |
|||
var seq = document.getElementById("PLAN_SEQ").value; |
|||
if (seq == "") { |
|||
MSI("提示", "请填写新的计划顺序号!"); |
|||
return false; |
|||
}; |
|||
var reg = /^[0-9]+$/; |
|||
var netId = $("#PLAN_SEQ").val(); |
|||
if (!reg.test(netId)) { |
|||
MSI("提示", "计划顺序号只能输入数字!"); |
|||
return; |
|||
} |
|||
var pids = document.getElementById("PIDList").value; |
|||
submitByButton("DoorPlankPlanSeqSave"); |
|||
} |
|||
|
|||
</script> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</asp:Content> |
|||
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server"> |
|||
<table width="100%" cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td> |
|||
<%=Html.QTButtonSave("User", "Save", "return SaveDoorPlankPlanSeq();")%> |
|||
<%=Html.QTButtonBack("close", "List", "parent.List(1);parent.closeAppWindow1();return false;")%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</asp:Content> |
@ -0,0 +1,160 @@ |
|||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" |
|||
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.FIS.DoorPlankPlanModel>" %> |
|||
|
|||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> |
|||
门板订单计划信息编辑 |
|||
</asp:Content> |
|||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> |
|||
<%=Html.QPEdit("信息", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%> |
|||
<% |
|||
var editable = false; |
|||
if (string.IsNullOrEmpty(Model.PLAN_STATE) || string.Equals(Model.PLAN_STATE, "0")) |
|||
{ |
|||
editable = true; |
|||
} |
|||
%> |
|||
<table id="editTable" cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td> |
|||
<table> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.PLAN_DATE)%> |
|||
</th> |
|||
<td> |
|||
<input id="PLAN_DATE" name="PLAN_DATE" value="<%=string.IsNullOrEmpty(Model.PID)?DateTime.Now.ToString("yyyy-MM-dd"):Model.PLAN_DATE.ToString("yyyy-MM-dd HH:mm:ss") %>" |
|||
style=" width:200px" type="text" class="easyui-datebox" required="required" <%=editable?"":"readonly =\"readonly\"" %> /> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<span style="color: #FF0000">*</span>顺序号 |
|||
</th> |
|||
<td> |
|||
<input class="easyui-validatebox" style=" width:196px" type="text" id="PLAN_SEQ" name="PLAN_SEQ" value="<%=Model.PLAN_SEQ %>" |
|||
<%=editable?"data-options=\"required:true,validType:['number','length[3,3]']\"":"readonly =\"readonly\""%> /> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.MATERIAL_CODE)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.MATERIAL_CODE, editable ? null : new { Readonly = "readonly" })%> |
|||
<script type="text/javascript" language="javascript"> |
|||
</script> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.QTY)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.QTY)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.SHIFT_CODE)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.SHIFT_CODE)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.PRODUCEREQUIRE)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.PRODUCEREQUIRE)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.STARTTIME)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.STARTTIME)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.ENDTIME)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.ENDTIME)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.REMARK)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.REMARK)%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<%=Html.HiddenFor(p=>p.PID) %> |
|||
<%=Html.HiddenFor(p=>p.WORKCENTER_CODE) %> |
|||
<%=Html.HiddenFor(p=>p.CREATEDATE) %> |
|||
<%=Html.HiddenFor(p=>p.CREATEUSER) %> |
|||
<%=Html.HiddenFor(p=>p.UPDATEDATE)%> |
|||
<%=Html.HiddenFor(p=>p.UPDATEUSER) %> |
|||
<%=Html.HiddenFor(p=>p.COMPLETE_QTY) %> |
|||
<%=Html.HiddenFor(p => p.PLAN_STATE)%> |
|||
<%=Html.HiddenFor(p => p.FACTORY_CODE)%> |
|||
<%=Html.HiddenFor(p => p.ORDER_TYPE)%> |
|||
<%=Html.HiddenFor(p => p.ROUTE_CODE)%> |
|||
<%=Html.HiddenFor(p => p.PBOM_CODE)%> |
|||
<%=Html.HiddenFor(p => p.PLAN_NO)%> |
|||
<%=Html.HiddenFor(p => p.FACTORY_CODE)%> |
|||
<%=Html.Hidden("PLANSOURCE",1)%> |
|||
<%=Html.QPEnd() %> |
|||
</asp:Content> |
|||
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server"> |
|||
<table width="100%" cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td> |
|||
<%=Html.QTButtonSave("User", "Save", "return Save();")%> |
|||
<%=Html.QTButtonBack("close", "DashBoardPlanList", "parent.closeAppWindow1();return false;")%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<script type="text/javascript"> |
|||
$(function () { |
|||
var type = document.getElementById("ORDER_TYPE").value; |
|||
//获取物料下拉数据源 |
|||
$('#MATERIAL_CODE').combotree({ |
|||
url: "/Dict/GetFisMaterialTree?ordertype=" + type, |
|||
panelHeight: '230', |
|||
panelWidth: '470', |
|||
}); |
|||
}); |
|||
function Save() { |
|||
|
|||
var reg = /^[0-9]+$/; |
|||
var netId = $("#QTY").val(); |
|||
if (!reg.test(netId)) { |
|||
MSI("提示", "计划数量只能输入数字。"); |
|||
return; |
|||
} |
|||
var starttime = document.getElementById("STARTTIME").value; |
|||
var endtime = document.getElementById("ENDTIME").value; |
|||
if (starttime == "" || endtime == "") { |
|||
alert("请输入以时间为准的时间段!"); |
|||
return; |
|||
} |
|||
if (parseDate($("#STARTTIME").val()) > parseDate($("#ENDTIME").val())) { |
|||
alert("开始日期不能大于截止时间!"); |
|||
return; |
|||
} |
|||
if (isValidate() == false) { |
|||
return false; |
|||
} |
|||
submitByButton("Save"); |
|||
} |
|||
</script> |
|||
</asp:Content> |
@ -0,0 +1,371 @@ |
|||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" |
|||
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.FIS.DoorPlankPlanModel>" %> |
|||
|
|||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> |
|||
门板插单计划编辑 |
|||
</asp:Content> |
|||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> |
|||
<%=Html.QPEdit("信息", string.IsNullOrEmpty(Model.PID) ? QMFrameWork.WebUI.panelType.Add : QMFrameWork.WebUI.panelType.Update)%> |
|||
<table id="editTable" cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td> |
|||
<table> |
|||
<tr> |
|||
<th align="right"> |
|||
插单时间 |
|||
</th> |
|||
<td> |
|||
<input id="PLAN_DATE" name="PLAN_DATE" value="<%=Model.PLAN_DATE.ToString("yyyy-MM-dd HH:mm:ss") %>" |
|||
type="text" class="easyui-datetimebox" required="required" readonly ="readonly" %/> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
插单位置 |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.PLAN_SEQ, new { Readonly = "readonly" })%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
插单数量 |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.QTY)%> |
|||
</td> |
|||
</tr> |
|||
<%--<tr> |
|||
<th align="right"> |
|||
即时发布 |
|||
</th> |
|||
<td> |
|||
<input name="PLAN_STATE" id="PLAN_STATE" checked="checked" type="checkbox" /> |
|||
</td> |
|||
</tr>--%> |
|||
</table> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
<table id="QDateGrid"> |
|||
</table> |
|||
<%=Html.HiddenFor(p => p.ORDER_TYPE)%> |
|||
<%=Html.HiddenFor(p => p.MaterialCodes)%> |
|||
<%=Html.Hidden("PLANSOURCE",2)%> |
|||
<%=Html.QPEnd() %> |
|||
<div id="addMatNoWindow" class="easyui-window" title="新增物料信息" iconcls="icon-save" |
|||
closed="true" style="width: 400px; height: 300px; padding: 5px;"> |
|||
<div class="easyui-layout" fit="true"> |
|||
<div region="center" border="false" style="padding: 10px; background: #fff; border: 1px solid #ccc;"> |
|||
<table id="Table3"> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.MATERIAL_CODE)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.MATERIAL_CODE)%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
<div region="north" border="false" style="text-align: left;"> |
|||
<table width="100%" cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td> |
|||
<%=Html.QTButtonSave("DoorPlankPlan", "TransitSave", "AddMatInfoSave()")%> |
|||
<%=Html.QTButtonBack("Home", "Index", "AddMatInfoCancel()")%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<script language="javascript" type="text/javascript"> |
|||
$(function () { |
|||
$('#QDateGrid').datagrid({ |
|||
width: 500, |
|||
height: 400, |
|||
fit: true, |
|||
nowrap: false, |
|||
striped: true, |
|||
collapsible: false, |
|||
pagination: true, |
|||
rownumbers: false, |
|||
remoteSort: false, |
|||
idField: 'MATERIAL_CODE', |
|||
columns: [[ |
|||
{ field: 'MATERIAL_CODE', title: '物料号', align: 'center' }, |
|||
{ field: 'MATERIAL_NAME', title: '物料名称', align: 'center' }, |
|||
{ field: 'HBTYPE', title: '高低配', align: 'center' }, |
|||
{ field: 'COLOR', title: '颜色', align: 'center' }, |
|||
{ field: 'MATERIAL_TYPE_CODE', title: '物料类型', align: 'center', width: 150, hidden: true } |
|||
]], |
|||
//*************增加**************************** |
|||
toolbar: [{ |
|||
text: '添加', |
|||
iconCls: 'icon-add', |
|||
handler: function () { |
|||
OpenAddMatNo(); |
|||
} |
|||
}, |
|||
//************删除***************************** |
|||
{ |
|||
text: '删除', |
|||
iconCls: 'icon-remove', |
|||
handler: function () { |
|||
//******************************************************************* |
|||
// var selectRow = $('#QDateGrid').datagrid('getSelected'); |
|||
// //获取选中行的序列 |
|||
// var rowIndex = $('#QDateGrid').datagrid('getRowIndex', selectRow); |
|||
|
|||
// if (rowIndex == -1) { |
|||
// MSI("提示", "请选择要删除的物料信息!"); |
|||
// return false; |
|||
// } |
|||
// var dataResultSubmit; |
|||
// //删除物料信息 |
|||
// $('#QDateGrid').datagrid('deleteRow', rowIndex); |
|||
//**************************************** |
|||
var selectedRowIds = $('#QDateGrid').datagrid('getSelections'); |
|||
var len = selectedRowIds.length; |
|||
if (len == 0) { |
|||
MSI("提示", "请选择要删除的物料信息!"); |
|||
return false; |
|||
} |
|||
for (var i = 0; i < len; i++) { |
|||
var rowIndex = $('#QDateGrid').datagrid('getRowIndex', selectedRowIds[0]); |
|||
$("#QDateGrid").datagrid("deleteRow", rowIndex); |
|||
} |
|||
//******************************************** |
|||
|
|||
} |
|||
|
|||
} |
|||
] |
|||
//********************************************** |
|||
}); |
|||
}); |
|||
|
|||
//*********************打开新增物料信息界面************* |
|||
function OpenAddMatNo() { |
|||
$('#addMatNoWindow').window({ |
|||
title: '新增物料信息', |
|||
modal: true, |
|||
shadow: false, |
|||
closed: true, |
|||
left: 250, |
|||
top: 30, |
|||
width: 280, |
|||
closable: true, |
|||
minimizable: false, |
|||
maximizable: false, |
|||
height: 300, |
|||
collapsible: false |
|||
}); |
|||
$('#addMatNoWindow').window('open'); |
|||
|
|||
//初始化物料信息下拉 |
|||
|
|||
//前台Grid表; |
|||
var matData = $('#QDateGrid').datagrid('getData'); |
|||
mattypes = ""; |
|||
if (matData.rows.length > 0) { |
|||
//当Grid表存在信息时,获取第一行物料号(此物料号是为了过滤掉信息),颜色,高低配 |
|||
//默认选取第一行 |
|||
var sendplanDetail = matData.rows[0]; |
|||
|
|||
var hbtype = sendplanDetail.HBTYPE; |
|||
var color = sendplanDetail.COLOR; |
|||
|
|||
if (matData.rows.length > 0) { |
|||
|
|||
var materials = ""; |
|||
for (var i = 0; i < matData.rows.length; i++) { |
|||
var sendplanDetail = matData.rows[i]; |
|||
materials = materials + ";" + sendplanDetail.MATERIAL_CODE; |
|||
mattypes = mattypes + ";" + sendplanDetail.MATERIAL_TYPE_CODE; |
|||
} |
|||
|
|||
var materialcode = materials.substring(1) |
|||
mattypes = mattypes.substring(1); |
|||
}; |
|||
|
|||
}; |
|||
if (matData.rows.length == 4) { |
|||
|
|||
MSI('提示', '最多添加四条物料信息!'); |
|||
$('#addMatNoWindow').window('close'); |
|||
}; |
|||
|
|||
var type = document.getElementById("ORDER_TYPE").value; |
|||
var data1; |
|||
$.ajax({ |
|||
url: "/Dict/GetMaterialDoorPlan?ordertype=" + type + "&color=" + color + "&hbtype=" + hbtype + "&mattypes=" + mattypes, |
|||
data: { |
|||
'MATERIAL_CODE': $('#MATERIAL_CODE').combobox('getValue') |
|||
}, |
|||
type: "post", |
|||
datatype: "json", |
|||
success: function (resultdata) { |
|||
; |
|||
data1 = eval(resultdata); |
|||
if (data1.length == 1) { |
|||
//$("#PRODUCTLINEID").val(data1[0].ID); |
|||
$("#pl").hide(); |
|||
} |
|||
else { |
|||
$('#MATERIAL_CODE').combobox({ |
|||
data: data1, |
|||
editable: 'false', |
|||
valueField: 'MATERIAL_CODE', |
|||
textField: 'MATERIAL_NAME' |
|||
}); |
|||
$("#pl").show(); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
//*********************物料新增界面点击保存事件************************ |
|||
|
|||
function AddMatInfoSave() { |
|||
//获取物料号 |
|||
var materialcode = $('#MATERIAL_CODE').combobox('getValue'); |
|||
if (materialcode == "") { |
|||
MSI("提示", "请选择物料信息!"); |
|||
return false; |
|||
}; |
|||
|
|||
//前台Grid表信息 |
|||
var matData = $('#QDateGrid').datagrid('getData'); |
|||
|
|||
//当Grid表存在信息时 |
|||
if (matData.rows.length > 0) { |
|||
for (var i = 0; i < matData.rows.length; i++) { |
|||
var sendplanDetail = matData.rows[i]; |
|||
|
|||
if (sendplanDetail.MATERIAL_CODE == $('#MATERIAL_CODE').combobox('getValue')) { |
|||
|
|||
MSI('提示', '已经添加了物料号为' + $('#MATERIAL_CODE').combobox('getValue') + '的物料信息!'); |
|||
return false; |
|||
} |
|||
} |
|||
}; |
|||
|
|||
var sendDetailID = ""; |
|||
|
|||
//编辑界面,异步添加 |
|||
// if ($('#SENDID').val() != "") |
|||
// { |
|||
//---------------------------改点CR13------------------------------ |
|||
//获取是否优先 |
|||
// var isPriorSendPlanMark = $("#ISPRIORSENDPLANDETAILbool:checked").val(); |
|||
// if (isPriorSendPlanMark == "true") |
|||
// { |
|||
// isPriorSendPlanMark = "1"; |
|||
// } else |
|||
// { |
|||
// isPriorSendPlanMark = "0"; |
|||
// } |
|||
//------------------------------------------------------------------ |
|||
//*******************************提交************************************ |
|||
var dataResultSubmit; |
|||
$.ajax({ |
|||
url: "/DoorPlankPlan/AddSendDetail", |
|||
data: { |
|||
'MATERIAL_CODE': $('#MATERIAL_CODE').combobox('getValue') |
|||
}, |
|||
type: "GET", |
|||
cache: false, |
|||
dataType: "json", |
|||
async: false, |
|||
success: function (data) { |
|||
//将后台传递过来的Json串转成对象 |
|||
dataResultSubmit = eval(data); |
|||
} |
|||
}); |
|||
|
|||
//新增失败时 |
|||
if (dataResultSubmit.IsSuccess == false) { |
|||
|
|||
MSI("提示", dataResultSubmit.Msg); |
|||
return false; |
|||
} |
|||
|
|||
//将发货计划ID |
|||
//sendDetailID = dataResultSubmit.Result; |
|||
materialname = dataResultSubmit.MATERIAL_NAME; |
|||
hbtype = dataResultSubmit.HBTYPE; |
|||
color = dataResultSubmit.COLOR; |
|||
// } |
|||
|
|||
//---------------------------改点CR13------------------------------ |
|||
//获取是否优先 |
|||
// var isPriorSendPlanTemp = $("#ISPRIORSENDPLANDETAILbool:checked").val(); |
|||
// if (isPriorSendPlanTemp == "true") { |
|||
// isPriorSendPlanTemp = "是"; |
|||
// } else { |
|||
// isPriorSendPlanTemp = "否"; |
|||
// } |
|||
//------------------------------------------------------------------ |
|||
//********************************填充数据**************************** |
|||
matData.rows.push({ |
|||
MATERIAL_CODE: $('#MATERIAL_CODE').combobox('getValue'), |
|||
MATERIAL_NAME: materialname, |
|||
HBTYPE: hbtype, |
|||
COLOR: color, |
|||
MATERIAL_TYPE_CODE: dataResultSubmit.MATERIAL_TYPE_CODE |
|||
}); |
|||
$('#QDateGrid').datagrid('loadData', matData); |
|||
|
|||
//************************保存成功后 |
|||
// $('#PALLETTYPE').combobox('setValue', ''); |
|||
// $('#MATID').combobox('setValue', ''); |
|||
// $('#PLANQUAN').val('0'); |
|||
// $("#ISPRIORSENDPLANDETAILbool").attr("checked", false); |
|||
$('#addMatNoWindow').window('close'); |
|||
|
|||
} |
|||
//********************************************************************************** |
|||
//关闭新增物料号信息 |
|||
function AddMatInfoCancel() { |
|||
$('#addMatNoWindow').window('close'); |
|||
} |
|||
//********************整车添加保存****************************************** |
|||
function SaveDoorPlan() { |
|||
var plandate = $('#PLAN_DATE').val(); |
|||
var qty = $('#QTY').val(); |
|||
//var shiftcode = $('#SHIFT_CODE').combobox('getValue'); |
|||
//Grid表信息 |
|||
var matData = $('#QDateGrid').datagrid('getData'); |
|||
|
|||
//当Grid表存在信息时 |
|||
if (matData.rows.length >= 1) { |
|||
var materialCode = ""; |
|||
for (var i = 0; i < matData.rows.length; i++) { |
|||
var materialDetail = matData.rows[i]; |
|||
materialCode = materialCode + ";" + materialDetail.MATERIAL_CODE; |
|||
} |
|||
|
|||
$('#MaterialCodes').val(materialCode.substring(1)); |
|||
submitByButton("SaveInsert"); |
|||
} |
|||
else { |
|||
MSI("提示", "请至少添加一种生产物料!"); |
|||
return false; |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
</script> |
|||
</asp:Content> |
|||
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server"> |
|||
<table width="100%" cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td> |
|||
<%=Html.QTButtonSave("DoorPlankPlan", "SaveInsert", "return SaveDoorPlan();")%> |
|||
<%=Html.QTButtonBack("close", "DashBoardPlanList", "parent.closeAppWindow1();return false;")%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</asp:Content> |
@ -0,0 +1,215 @@ |
|||
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AppMaster.Master" |
|||
Inherits="System.Web.Mvc.ViewPage<QMAPP.FJC.Web.Models.FIS.DoorPlankPlanModel>" %> |
|||
|
|||
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> |
|||
订单生产计划列表 |
|||
</asp:Content> |
|||
|
|||
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> |
|||
<%=Html.QPSeach(110, true)%> |
|||
<table id="condiTable"> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.PLAN_NO)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.PLAN_NO)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.SHIFT_CODE)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.SHIFT_CODE)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.MATERIAL_CODE)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.MATERIAL_CODE)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.FACTORY_CODE)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.FACTORY_CODE)%> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.PLANSOURCE)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.PLANSOURCE)%> |
|||
</td> |
|||
|
|||
<th align="right"> |
|||
<%=Html.QV(p => p.PLANTIMESTART)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.PLANTIMESTART)%> |
|||
</td> |
|||
<th align="right"> |
|||
<%=Html.QV(p => p.PLANTIMEEND)%> |
|||
</th> |
|||
<td> |
|||
<%=Html.QC(p => p.PLANTIMEEND)%> |
|||
</td> |
|||
|
|||
</tr> |
|||
</table> |
|||
<%=Html.QPEnd()%> |
|||
<%=Html.QPList() %> |
|||
<%=Html.QDateGrid<QMAPP.FJC.Web.Models.FIS.DoorPlankPlanModel>(Model)%> |
|||
<%=Html.QPEnd() %> |
|||
<%=Html.Hidden("selectKey")%> |
|||
<%=Html.Hidden("fileName")%> |
|||
<%=Html.Hidden("ORDER_TYPE")%> |
|||
<script language="javascript" type="text/javascript"> |
|||
$(function () { |
|||
var type = document.getElementById("ORDER_TYPE").value; |
|||
//获取物料下拉数据源 |
|||
$('#MATERIAL_CODE').combotree({ |
|||
url: "/Dict/GetFisMaterialTree?ordertype=" + type, |
|||
panelHeight: '250', |
|||
panelWidth: '500', |
|||
}); |
|||
List(1); |
|||
}); |
|||
//添加 |
|||
function Add() { |
|||
var type = document.getElementById("ORDER_TYPE").value; |
|||
openAppWindow1('信息添加', 'Edit?ORDER_TYPE=' + type, '500', '400'); |
|||
} |
|||
|
|||
//整车添加 |
|||
function AddWholeDoor() { |
|||
var type = document.getElementById("ORDER_TYPE").value; |
|||
openAppWindow1('整车添加门板', 'AddWholeDoor?ORDER_TYPE=' + type, '650', '380'); |
|||
} |
|||
//修改 |
|||
function Update() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("提示", "请选择修改记录。"); |
|||
return; |
|||
} |
|||
if (ids.indexOf(":") > 0) { |
|||
MSI("提示", "每次只能修改一条记录。"); |
|||
return; |
|||
} |
|||
document.getElementById("selectKey").value = ids; |
|||
var type = document.getElementById("ORDER_TYPE").value; |
|||
openAppWindow1('修改', 'Edit?PID=' + ids + "&ORDER_TYPE=" + type, '500', '400'); |
|||
} |
|||
//插单 |
|||
function Insert() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("提示", "请选择一条FIS计划作为插单位置。"); |
|||
return; |
|||
} |
|||
if (ids.indexOf(":") > 0) { |
|||
MSI("提示", "只能选择一条FIS计划作为插单位置。"); |
|||
return; |
|||
} |
|||
document.getElementById("selectKey").value = ids; |
|||
var type = document.getElementById("ORDER_TYPE").value; |
|||
openAppWindow1('插单', 'Insert?PID=' + ids + "&ORDER_TYPE=" + type, '650', '380'); |
|||
} |
|||
//删除 |
|||
function Delete() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("错误", "至少选择一条记录"); |
|||
} |
|||
else { |
|||
document.getElementById("selectKey").value = ids; |
|||
MSQ("提示", "确定要删除选中的记录吗?", function () { |
|||
submitByButton("Delete"); |
|||
}) |
|||
} |
|||
} |
|||
//导入 |
|||
function Import() { |
|||
var fileName = window.showModalDialog("/File/UploadFile", "", "dialogHeight: 200px; dialogWidth: 300px; center: Yes; help: Yes;status: Yes;"); |
|||
if (fileName == null) |
|||
return; |
|||
document.getElementById("fileName").value = fileName; |
|||
//处理等待 |
|||
submitByButton("ImportExcel"); |
|||
} |
|||
//导出 |
|||
function Export() { |
|||
document.getElementById("selectKey").value = getSelectKey(); |
|||
submitByButton("ExportExcel"); |
|||
} |
|||
//下载模板 |
|||
function getTemplate() { |
|||
submitByButton("GetTemplate"); |
|||
} |
|||
//查询 |
|||
function Search() { |
|||
var endtime = document.getElementById("PLANTIMEEND").value; |
|||
if (parseDate($("#PLANTIMESTART").val()) > parseDate($("#PLANTIMEEND").val()) && endtime != "") { |
|||
alert("开始时间不能大于结束时间!"); |
|||
return; |
|||
} |
|||
List(1) |
|||
} |
|||
//发布 |
|||
function Publish() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("错误", "至少选择一条记录"); |
|||
} |
|||
else { |
|||
document.getElementById("selectKey").value = ids; |
|||
MSQ("提示", "确定要发布选中的记录吗?", function () { |
|||
submitByButton("PutOut"); |
|||
}) |
|||
} |
|||
} |
|||
|
|||
//修改计划顺序 |
|||
function EditDoorPlankPlanSeq() { |
|||
var ids = getSelectKey(); |
|||
if (ids == "") { |
|||
MSI("错误", "至少选择一条记录"); |
|||
return; |
|||
} |
|||
document.getElementById("selectKey").value = ids; |
|||
var type = document.getElementById("ORDER_TYPE").value; |
|||
openAppWindow1('修改门板计划顺序号', 'DoorPlankEditSeq?PIDList=' + ids+ "&ORDER_TYPE=" + type, '690', '400'); |
|||
} |
|||
$(function () { |
|||
|
|||
$('#FACTORY_CODE').combobox({ |
|||
panelWidth: '350' |
|||
|
|||
}); |
|||
|
|||
}); |
|||
|
|||
</script> |
|||
</asp:Content> |
|||
|
|||
<asp:Content ID="Content3" ContentPlaceHolderID="ToolContent" runat="server"> |
|||
<table cellpadding="0" cellspacing="0"> |
|||
<tr> |
|||
<td align="center"> |
|||
<%=Html.QTButtonSearch("DoorPlankPlan", "List", "Search()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButtonAdd("DoorPlankPlan", "Add", "Add()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButton("AddWholeDoor", "AddWholeDoor", QMFrameWork.WebUI.IconCls.add, "AddWholeDoor()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButtonUpdate("DoorPlankPlan", "Edit", "Update()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButton("EditSeq", "EditDoorPlankPlanSeq", QMFrameWork.WebUI.IconCls.edit, "EditDoorPlankPlanSeq()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButton("insertorder","Insert",QMFrameWork.WebUI.IconCls.add,"Insert()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButtonDelete("DoorPlankPlan", "Delete", "Delete()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButton("publish", "PutOut", "detail", "Publish()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButton("import", "ImportExcel", QMFrameWork.WebUI.IconCls.undo, "Import()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButton("export", "ExportExcel", QMFrameWork.WebUI.IconCls.redo, "Export()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
<%=Html.QTButton("template", "TemplateExcel", QMFrameWork.WebUI.IconCls.template, "getTemplate()", QMAPP.Common.Web.SystemLimit.isLimt)%> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</asp:Content> |
|||
|
Binary file not shown.
Loading…
Reference in new issue