From c571ee7de9595e2616e0e5f85734dbaa42ed6098 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期四, 21 十月 2021 13:33:41 +0800 Subject: [PATCH] 提交 --- zhengcaioa/zhengcaioa/Views/CooperOrder/Edit.cshtml | 16 ++++++-- zhengcaioa/zhengcaioa/Views/ExpertTestTopic/Edit.cshtml | 54 +++++++++++--------------- zhengcaioa/zhengcaioa/Views/ExpertTestTopic/EditPeizhi.cshtml | 11 ++--- zhengcaioa/IServices/ICooperOrderService.cs | 2 + zhengcaioa/Services/CooperOrderService.cs | 18 +++++++++ zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs | 1 6 files changed, 60 insertions(+), 42 deletions(-) diff --git a/zhengcaioa/IServices/ICooperOrderService.cs b/zhengcaioa/IServices/ICooperOrderService.cs index 1b0f091..0e36a6f 100644 --- a/zhengcaioa/IServices/ICooperOrderService.cs +++ b/zhengcaioa/IServices/ICooperOrderService.cs @@ -12,6 +12,8 @@ CooperOrderDTO Get(string id); + string GetOrderNo(); + ResultDataEntity<CooperOrderDTO> SearchByPaging(CooperOrderDTOSearch searchEntity); ResultEntity ModifyStatus(string id, string userid); diff --git a/zhengcaioa/Services/CooperOrderService.cs b/zhengcaioa/Services/CooperOrderService.cs index eeb41f8..b6a58f8 100644 --- a/zhengcaioa/Services/CooperOrderService.cs +++ b/zhengcaioa/Services/CooperOrderService.cs @@ -103,6 +103,24 @@ return resultEntity; } + public string GetOrderNo() + { + string OrderNoback = ""; + var datestreing = DateTime.Now.ToString("yyyyMMdd"); + var OrderNo = _context.CooperOrders.Where(x => x.OrderNo.Contains(datestreing)).Max(x => x.OrderNo); + if (string.IsNullOrEmpty(OrderNo)) + { + OrderNoback = datestreing + 1.ToString().PadLeft(3, '0'); + } + else + { + OrderNoback = datestreing + (int.Parse(OrderNo.Substring(OrderNo.Length - 3)) + 1).ToString().PadLeft(3, '0'); + } + + + return OrderNoback; + } + public CooperOrderDTO Get(string id) { diff --git a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs index 1d8b798..c4cdcf7 100644 --- a/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs +++ b/zhengcaioa/zhengcaioa/Controllers/BusinessOrder/CooperOrderController.cs @@ -423,6 +423,7 @@ dto.XdTime = DateTime.Now; dto.OrderNum = 1; ViewBag.ShouliStatus = "1"; + dto.OrderNo = _cooperOrderService.GetOrderNo(); //ViewBag.YouHuiList = new List<AdmAskYouHuiDTO>(); } diff --git a/zhengcaioa/zhengcaioa/Views/CooperOrder/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/CooperOrder/Edit.cshtml index f7cf0c1..87827bd 100644 --- a/zhengcaioa/zhengcaioa/Views/CooperOrder/Edit.cshtml +++ b/zhengcaioa/zhengcaioa/Views/CooperOrder/Edit.cshtml @@ -181,8 +181,8 @@ </div> - <label class="text-right col-sm-1 col-md-1 control-label">璁㈠崟绫诲瀷2</label> - <div class="col-sm-2 col-md-2"> + <label class="text-right col-sm-1 col-md-1 control-label" id="dingdanleixing2">璁㈠崟绫诲瀷2</label> + <div class="col-sm-2 col-md-2" id="dingdanleixing3"> <select id="OrderType2" class="form-control" name="OrderType2" data-placeholder="閫夋嫨 搴忓垪 ..."> <option value="" hassubinfo="true">璇烽�夋嫨</option> </select> @@ -632,6 +632,10 @@ $("#Price").trigger("change"); + + $("#dingdanleixing2").hide(); + $("#dingdanleixing3").hide(); + } else { var aaa = '<option value="" hassubinfo="true">璇烽�夋嫨</option>'; city.append(aaa); @@ -648,7 +652,8 @@ } } - + $("#dingdanleixing2").show(); + $("#dingdanleixing3").show(); } @@ -750,7 +755,8 @@ success: function (data) { var city = $("#OrderType2"); if (order_type != "02" || order_type1 == "鐢佃瘽鍜ㄨ" || order_type1 == "褰撻潰鍜ㄨ" || order_type1 == "浠f嫙璐ㄧ枒绛斿" || order_type1 == "浠f嫙鎶曡瘔澶勭悊鍐冲畾" || order_type1 == "绔炰簤瀵规墜鍜岃瘎瀹′笓瀹跺弬鍔犳斂搴滈噰璐暟鎹俊鎭煡璇�" || order_type1 == "鏀块噰璐�") { - + $("#dingdanleixing2").hide(); + $("#dingdanleixing3").hide(); } else { var aaa = ''; @@ -768,6 +774,8 @@ } } + $("#dingdanleixing2").show(); + $("#dingdanleixing3").show(); } diff --git a/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/Edit.cshtml b/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/Edit.cshtml index 987d696..45470d0 100644 --- a/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/Edit.cshtml +++ b/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/Edit.cshtml @@ -251,13 +251,13 @@ { <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label"></label> - <div class="col-sm-2 col-md-2" style="width:4%;"> + @*<div class="col-sm-2 col-md-2" style="width:4%;"> <input class="form-control" style="text-align:left;border:none;" label="绛旀缂栧彿" name="anwserno" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="@expertTestTopicanwserDTOs[i].Anwserno" readonly="readonly"> - </div> - <label class="text-right col-sm-1 col-md-1 control-label" style="width:10px;" name="Anwser1">銆�</label> + </div>*@ + <label class="text-right col-sm-1 col-md-1 control-label" style="width:15px;margin-left:15px;" name="Anwser1">@expertTestTopicanwserDTOs[i].Anwserno銆�</label> <div class="col-sm-6 col-md-6" name="Anwser2"> <input class="form-control" label="绛旀" name="Anwser" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value="@expertTestTopicanwserDTOs[i].Anwser"> - + <input type="hidden" name="anwserno" value="@expertTestTopicanwserDTOs[i].Anwserno" /> </div> <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label"> @@ -704,8 +704,8 @@ } } - if (booll < 1) { - toastr.warning("澶氬崟閫夎嚦灏戞湁涓�涓纭瓟妗�"); + if (booll <= 1) { + toastr.warning("澶氬崟閫夎嚦灏戞湁涓や釜姝g‘绛旀"); return; } } @@ -838,8 +838,8 @@ } } - if (booll < 1) { - toastr.warning("澶氬崟閫夎嚦灏戞湁涓�涓纭瓟妗�"); + if (booll <= 1) { + toastr.warning("澶氬崟閫夎嚦灏戞湁涓や釜姝g‘绛旀"); return; } } @@ -957,7 +957,7 @@ </div>`); } else if (num == 2) { $('#addlist_2').append(oTr); - $(oTr).html(` <div class="fatiaomeirong" > + $(oTr).html(` <div class="fatiaomeirong" > <div class="clearfix layer-area" style="padding-bottom:15px;"> <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label"> @@ -1111,13 +1111,11 @@ $('#addlist_3').html(` <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label"></label> - <div class="col-sm-2 col-md-2" style="width:4%;"> - <input class="form-control" style="text-align:left;border:none;" label="绛旀缂栧彿" name="anwserno" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="A" readonly="readonly"> - </div> - <label class="text-right col-sm-1 col-md-1 control-label" style="width:10px;" name="Anwser1">銆�</label> + + <label class="text-right col-sm-1 col-md-1 control-label" style="width:15px;margin-left:15px;" name="Anwser1">A銆�</label> <div class="col-sm-6 col-md-6" name="Anwser2"> <input class="form-control" label="绛旀" name="Anwser" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value=""> - + <input type="hidden" name="anwserno" value="A" /> </div> <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label"> @@ -1135,13 +1133,11 @@ <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label"></label> - <div class="col-sm-2 col-md-2" style="width:4%;"> - <input class="form-control" style="text-align:left;border:none;" label="绛旀缂栧彿" name="anwserno" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="B" readonly="readonly"> - </div> - <label class="text-right col-sm-1 col-md-1 control-label" style="width:10px;" name="Anwser1">銆�</label> + + <label class="text-right col-sm-1 col-md-1 control-label" style="width:15px;margin-left:15px;" name="Anwser1">B銆�</label> <div class="col-sm-6 col-md-6" name="Anwser2"> <input class="form-control" label="绛旀" name="Anwser" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value=""> - + <input type="hidden" name="anwserno" value="B" /> </div> <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label"> @@ -1159,13 +1155,11 @@ <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label"></label> - <div class="col-sm-2 col-md-2" style="width:4%;"> - <input class="form-control" style="text-align:left;border:none;" label="绛旀缂栧彿" name="anwserno" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="C" readonly="readonly"> - </div> - <label class="text-right col-sm-1 col-md-1 control-label" style="width:10px;" name="Anwser1">銆�</label> + + <label class="text-right col-sm-1 col-md-1 control-label" style="width:15px;margin-left:15px;" name="Anwser1">C銆�</label> <div class="col-sm-6 col-md-6" name="Anwser2"> <input class="form-control" label="绛旀" name="Anwser" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value=""> - + <input type="hidden" name="anwserno" value="C" /> </div> <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label"> @@ -1183,13 +1177,11 @@ <div class="clearfix layer-area" style="padding-bottom:15px;"> <label class="text-right col-sm-1 col-md-1 control-label"></label> - <div class="col-sm-2 col-md-2" style="width:4%;"> - <input class="form-control" style="text-align:left;border:none;" label="绛旀缂栧彿" name="anwserno" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="D" readonly="readonly"> - </div> - <label class="text-right col-sm-1 col-md-1 control-label" style="width:10px;" name="Anwser1">銆�</label> + + <label class="text-right col-sm-1 col-md-1 control-label" style="width:15px;margin-left:15px;" name="Anwser1">D銆�</label> <div class="col-sm-6 col-md-6" name="Anwser2"> <input class="form-control" label="绛旀" name="Anwser" labtype="txt" addvisible="true" editvisible="true" maxlength="500" reg="" ismust="flase" type="text" value=""> - + <input type="hidden" name="anwserno" value="D" /> </div> <label grouptype="Vdata" class="text-right col-sm-1 col-md-1 control-label"> @@ -1223,7 +1215,7 @@ } } function checkFlag(vi) { - if ($("#Topictype").val() == "01" || $("#Topictype").val() == "03") { + //if ($("#Topictype").val() == "01" || $("#Topictype").val() == "03") { if (vi.checked) { var ssssss = document.getElementsByName("FlagName"); for (var i = 0; i < ssssss.length; i++) { @@ -1231,7 +1223,7 @@ } vi.checked = true; } - } + //} } </script> diff --git a/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/EditPeizhi.cshtml b/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/EditPeizhi.cshtml index 314f739..0807a9e 100644 --- a/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/EditPeizhi.cshtml +++ b/zhengcaioa/zhengcaioa/Views/ExpertTestTopic/EditPeizhi.cshtml @@ -122,15 +122,12 @@ <h5> <div class="clearfix layer-area" style="padding-top:15px;"> - <label class="text-right col-sm-1 col-md-1 control-label" style="font-weight:bold;">@expertTestTopicpeizhiDTOs[i].Topictype @expertTestTopicpeizhiDTOs[i].TopictypeName</label> - <label class="text-right col-sm-1 col-md-1 control-label" style="font-weight:bold;"> - 锛堟暟閲忥細 - </label> + <label class="text-right col-sm-1 col-md-1 control-label" style="font-weight:bold;">@expertTestTopicpeizhiDTOs[i].Topictype @expertTestTopicpeizhiDTOs[i].TopictypeName 锛堟暟閲忥細</label> + <div class="col-sm-2 col-md-2" style="width:5%;"> <input class="form-control" style="border:none;" label="鏁伴噺" name="Fenshuszong" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="@expertTestTopicpeizhiDTOs[i].zongFenshu" readonly="readonly"> </div> - <label class="text-left col-sm-1 col-md-1 control-label" style="font-weight:bold;">棰�</label> - <label class="text-right col-sm-1 col-md-1 control-label" style="font-weight:bold;">鍒嗗�硷細</label> + <label class="text-left col-sm-1 col-md-1 control-label" style="font-weight:bold;width:5%;">棰� 鍒嗗�硷細</label> <div class="col-sm-2 col-md-2" style="width:5%;"> <input class="form-control" label="缁撹绫诲瀷" name="Fenzhizong" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="@expertTestTopicpeizhiDTOs[i].zongFenzhi" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" onafterpaste="this.value=this.value.replace(/[^0-9]/g,'')"> </div> @@ -148,7 +145,7 @@ <label class="text-right col-sm-1 col-md-1 control-label">@expertTestTopicpeizhiDTOs[i].ZhishitypeName</label> - <div class="col-sm-2 col-md-2"> + <div class="col-sm-2 col-md-2" style="width:5%;"> <input class="form-control" label="@expertTestTopicpeizhiDTOs[i].ZhishitypeName" name="Fenshus" labtype="txt" addvisible="true" editvisible="true" reg="" maxlength="50" ismust="true" type="text" value="@expertTestTopicpeizhiDTOs[i].FenshuName" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" onafterpaste="this.value=this.value.replace(/[^0-9]/g,'')" onchange="checknum('@expertTestTopicpeizhiDTOs[i].Topictype');"> <input type="hidden" name="Topictypes" value="@expertTestTopicpeizhiDTOs[i].Topictype" /> -- Gitblit v1.9.1