不用再增加一个专门的序号,就按照这个编号,不是列表都有个编号嘛,好,那个送货单就显示就显示那个编号,比如说雷波中学,你在左送货单的左上角2是1或者。或者有三果十一都可以。
那就不能变动了,那就那个那个就把弄成就不能变动了,先新增先新增订单的时候,他就把它锁死锁定了。
那个打印两组送货单,有种有数量没得送货单的时候,我们现在是默认的32开展,增加一个选项。他打的时候也可以打32开,也可以打16开,
先默认32开嘛。就默认一张纸打两张好,他有些客户他要求要一张32开好,他选要要16开,他选了16开的,那就是一张16开下头就下头就是空白的嘛。
发布时候新增了字段,需要给字段填写值
ALTER TABLE [dbo].[CoreCmsPlanOrder] ADD Bianhao [int] NULL ;
GO
| | |
| | | { |
| | | new Criterion("", Condition), |
| | | |
| | | new Criterion("orderBy"," pianqu asc ") |
| | | new Criterion("orderBy"," Bianhao ") |
| | | }; |
| | | query.Criteria = criterias; |
| | | return _ICoreCmsPlanOrderDAL.SelectModelPage(query, pa); |
| | |
| | | /// </summary> |
| | | public string biaoge { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 编号 |
| | | /// </summary> |
| | | |
| | | |
| | | public int? Bianhao { get; set; } |
| | | |
| | | #endregion Model |
| | | |
| | | #region Visiter |
| | |
| | | this.FirmId = isChange ? MyConvert.ConvertToGuid(value) : FirmId; |
| | | theValue = this.FirmId; |
| | | } |
| | | else if ("Bianhao".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 22) |
| | | { |
| | | this.Bianhao = isChange ? MyConvert.ConvertToInt32(value) : Bianhao; |
| | | theValue = this.Bianhao; |
| | | } |
| | | |
| | | |
| | | return theValue; |
| | | } |
| | |
| | | /// <summary> |
| | | /// 分页默认排序字段 |
| | | /// </summary> |
| | | const string ORDERBY = " id desc "; |
| | | const string ORDERBY = " Bianhao "; |
| | | #endregion |
| | | public CoreCmsPlanOrderDAL() |
| | | { |
| | |
| | | new SqlParameter("@isdelete",trueModel.isdelete), |
| | | new SqlParameter("@orderkeyid",trueModel.orderkeyid), |
| | | new SqlParameter("@FirmId",trueModel.FirmId), |
| | | new SqlParameter("@Bianhao",trueModel.Bianhao.HasValue?trueModel.Bianhao.Value:0), |
| | | |
| | | }; |
| | | string sql = "Insert Into CoreCmsPlanOrder ([shengId],[sheng],[shiId],[shi], [quxianId], [quxian],[pianqu], [orderAmount],[status], [userMobile],[shipAddress],[shipName],[shipMobile],[shouhuoAddress],oldOrderAmount,keYongAmount,huaFeiAmount,createTime,upDataTime,createBy,upDataBy,isdelete,orderkeyid,FirmId)" |
| | | + " Values (@shengId,@sheng,@shiId, @shi, @quxianId, @quxian, @pianqu, @orderAmount, @status, @userMobile,@shipAddress,@shipName,@shipMobile,@shouhuoAddress,@oldOrderAmount,@keYongAmount,@huaFeiAmount,@createTime,@upDataTime,@createBy,@upDataBy,@isdelete,@orderkeyid,@FirmId )"; |
| | | string sql = "Insert Into CoreCmsPlanOrder ([shengId],[sheng],[shiId],[shi], [quxianId], [quxian],[pianqu], [orderAmount],[status], [userMobile],[shipAddress],[shipName],[shipMobile],[shouhuoAddress],oldOrderAmount,keYongAmount,huaFeiAmount,createTime,upDataTime,createBy,upDataBy,isdelete,orderkeyid,FirmId,Bianhao)" |
| | | + " Values (@shengId,@sheng,@shiId, @shi, @quxianId, @quxian, @pianqu, @orderAmount, @status, @userMobile,@shipAddress,@shipName,@shipMobile,@shouhuoAddress,@oldOrderAmount,@keYongAmount,@huaFeiAmount,@createTime,@upDataTime,@createBy,@upDataBy,@isdelete,@orderkeyid,@FirmId,@Bianhao )"; |
| | | try |
| | | { |
| | | _dataBase.ExecuteSql(sql, sqlParms.ToArray<SqlParameter>()); |
| | |
| | | new SqlParameter("@isdelete",trueModel.isdelete), |
| | | new SqlParameter("@orderkeyid",trueModel.orderkeyid), |
| | | new SqlParameter("@FirmId",trueModel.FirmId), |
| | | new SqlParameter("@Bianhao",trueModel.Bianhao.HasValue?trueModel.Bianhao.Value:0), |
| | | |
| | | }; |
| | | string sql = "Insert Into CoreCmsPlanOrder ([shengId],[sheng],[shiId],[shi], [quxianId], [quxian],[pianqu], [orderAmount],[status], [userMobile],[shipAddress],[shipName],[shipMobile],[shouhuoAddress],oldOrderAmount,keYongAmount,huaFeiAmount,createTime,upDataTime,createBy,upDataBy,isdelete,orderkeyid,FirmId)" |
| | | + " Values ( @shengId,@sheng,@shiId, @shi, @quxianId, @quxian, @pianqu, @orderAmount, @status, @userMobile,@shipAddress,@shipName,@shipMobile,@shouhuoAddress,@oldOrderAmount,@keYongAmount,@huaFeiAmount,@createTime,@upDataTime,@createBy,@upDataBy,@isdelete,@orderkeyid,@FirmId )"; |
| | | string sql = "Insert Into CoreCmsPlanOrder ([shengId],[sheng],[shiId],[shi], [quxianId], [quxian],[pianqu], [orderAmount],[status], [userMobile],[shipAddress],[shipName],[shipMobile],[shouhuoAddress],oldOrderAmount,keYongAmount,huaFeiAmount,createTime,upDataTime,createBy,upDataBy,isdelete,orderkeyid,FirmId,Bianhao)" |
| | | + " Values ( @shengId,@sheng,@shiId, @shi, @quxianId, @quxian, @pianqu, @orderAmount, @status, @userMobile,@shipAddress,@shipName,@shipMobile,@shouhuoAddress,@oldOrderAmount,@keYongAmount,@huaFeiAmount,@createTime,@upDataTime,@createBy,@upDataBy,@isdelete,@orderkeyid,@FirmId,@Bianhao )"; |
| | | |
| | | int id = 0; |
| | | try |
| | |
| | | /// <returns></returns> |
| | | public IEnumerable<Model.CoreCmsPlanOrder> GetModelByorderid(int orderid) |
| | | { |
| | | return _dataBase.SelectModel<Model.CoreCmsPlanOrder>(" * ", " CoreCmsPlanOrder ", " orderkeyid = " + orderid + " order by [pianqu]") as IList<Model.CoreCmsPlanOrder>;//执行查询 |
| | | return _dataBase.SelectModel<Model.CoreCmsPlanOrder>(" * ", " CoreCmsPlanOrder ", " orderkeyid = " + orderid + " order by Bianhao ") as IList<Model.CoreCmsPlanOrder>;//执行查询 |
| | | } |
| | | |
| | | |
| | |
| | | <tr> |
| | | |
| | | <td style="text-align: center"> |
| | | <%#Container.ItemIndex + 1%> |
| | | <%#Eval("Bianhao")%><%-- <%#Container.ItemIndex + 1%>--%> |
| | | </td> |
| | | <td style="text-align: center"> |
| | | <%#Eval("pianqu")%> |
| | |
| | | |
| | | //删除 |
| | | function onDele(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookPrintDetail.aspx?PlanOrderid=" + keyid + "&selSonghuoren=" + $("#selSonghuoren").val() + "&txtBeginDate=" + $("#txtBeginDate").val(), Title: "打印送货单", Width: 1000, Height: 900 }); |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookPrintDetail.aspx?PlanOrderid=" + keyid + "&selSonghuoren=" + $("#selSonghuoren").val() + "&txtBeginDate=" + $("#txtBeginDate").val() + "&selChicun=" + $("#selChicun").val(), Title: "打印送货单", Width: 1000, Height: 900 }); |
| | | } |
| | | |
| | | //删除 |
| | | function onDeledayin(keyid) { |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookPrintDetailshuju.aspx?PlanOrderid=" + keyid + "&selSonghuoren=" + $("#selSonghuoren").val() + "&txtBeginDate=" + $("#txtBeginDate").val(), Title: "打印送货单", Width: 1000, Height: 900 }); |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookPrintDetailshuju.aspx?PlanOrderid=" + keyid + "&selSonghuoren=" + $("#selSonghuoren").val() + "&txtBeginDate=" + $("#txtBeginDate").val() + "&selChicun=" + $("#selChicun").val(), Title: "打印送货单", Width: 1000, Height: 900 }); |
| | | } |
| | | |
| | | //删除 |
| | |
| | | alertMsg("未选中任何学校"); |
| | | return; |
| | | } |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookPrintDetail.aspx?orderid=" + keyid + "&selSonghuoren=" + $("#selSonghuoren").val() + "&txtBeginDate=" + $("#txtBeginDate").val(), Title: "批量打印送货单", Width: 1000, Height: 900 }); |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookPrintDetail.aspx?orderid=" + keyid + "&selSonghuoren=" + $("#selSonghuoren").val() + "&txtBeginDate=" + $("#txtBeginDate").val() + "&selChicun=" + $("#selChicun").val(), Title: "批量打印送货单", Width: 1000, Height: 900 }); |
| | | |
| | | |
| | | } |
| | |
| | | alertMsg("未选中任何学校"); |
| | | return; |
| | | } |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookPrintDetailshuju.aspx?orderid=" + keyid + "&selSonghuoren=" + $("#selSonghuoren").val() + "&txtBeginDate=" + $("#txtBeginDate").val(), Title: "批量打印送货单", Width: 1000, Height: 900 }); |
| | | top.Dialog.open({ URL: "/Pages/business/DeliverWorkBookPrintDetailshuju.aspx?orderid=" + keyid + "&selSonghuoren=" + $("#selSonghuoren").val() + "&txtBeginDate=" + $("#txtBeginDate").val() + "&selChicun=" + $("#selChicun").val(), Title: "批量打印送货单", Width: 1000, Height: 900 }); |
| | | |
| | | |
| | | } |
| | |
| | | 送货人: <select keepdefaultstyle='true' id='selSonghuoren' runat="server" > |
| | | </select> |
| | | 送货时间:<input id="txtBeginDate" type="text" runat="server" class='date w80px' maxlength='10' /> |
| | | |
| | | 打印尺寸: <select keepdefaultstyle='true' id='selChicun' runat="server" > |
| | | <option value="2" >32开</option> |
| | | <option value="1" >16开</option> |
| | | </select> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | |
| | | <input type="checkbox" class="SelectCheck" value_kid="<%#Eval("id")%>" /> |
| | | </td> |
| | | <td style="text-align: center"> |
| | | <%#Container.ItemIndex + 1%> |
| | | <%#Eval("Bianhao")%><%-- <%#Container.ItemIndex + 1%>--%> |
| | | </td> |
| | | <td style="text-align: center"> |
| | | <%#Eval("pianqu")%> |
| | |
| | | protected global::System.Web.UI.HtmlControls.HtmlInputText txtBeginDate; |
| | | |
| | | /// <summary> |
| | | /// selChicun 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | | /// 自动生成的字段。 |
| | | /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 |
| | | /// </remarks> |
| | | protected global::System.Web.UI.HtmlControls.HtmlSelect selChicun; |
| | | |
| | | /// <summary> |
| | | /// RepClientList 控件。 |
| | | /// </summary> |
| | | /// <remarks> |
| | |
| | | </tr> |
| | | <tr> |
| | | <td class='left' colspan="4"> |
| | | 学校: <%#Eval("shipAddress")%> |
| | | 学校: <%#Eval("shipAddress")%> (<%#Eval("Bianhao")%>) |
| | | </td> |
| | | |
| | | <td class='left' colspan="4"> |
| | |
| | | </tr> |
| | | |
| | | </table> |
| | | <%#(Container.ItemIndex != (countss-1)&& (Container.ItemIndex+1)%2==0)?"<div class=\"page-break\"></div>":"" %> |
| | | <%#(Container.ItemIndex != (countss-1)&& ((Container.ItemIndex+1)%2==0 || selChicun == "1" ))?"<div class=\"page-break\"></div>":"" %> |
| | | |
| | | </ItemTemplate> |
| | | </asp:Repeater> |
| | |
| | | public int countss = 0; |
| | | public string selSonghuoren = ""; |
| | | public string txtBeginDate = ""; |
| | | public string selChicun = ""; |
| | | //初始化 |
| | | public DeliverWorkBookPrintDetail() |
| | | { |
| | |
| | | string orderIdStr = Request["orderId"]; |
| | | selSonghuoren = Request["selSonghuoren"]; |
| | | txtBeginDate = Request["txtBeginDate"]; |
| | | |
| | | selChicun = Request["selChicun"]; |
| | | |
| | | //如果是只打印一张 |
| | | string PlanOrderidStr = Request["PlanOrderid"]; |
| | | |
| | |
| | | </tr> |
| | | <tr> |
| | | <td class='left' colspan="4"> |
| | | 学校: <%#Eval("shipAddress")%> |
| | | 学校: <%#Eval("shipAddress")%> (<%#Eval("Bianhao")%>) |
| | | </td> |
| | | |
| | | <td class='left' colspan="4"> |
| | |
| | | </tr> |
| | | |
| | | </table> |
| | | <%#(Container.ItemIndex != (countss-1)&& (Container.ItemIndex+1)%2==0)?"<div class=\"page-break\"></div>":"" %> |
| | | <%#(Container.ItemIndex != (countss-1)&& ((Container.ItemIndex+1)%2==0 || selChicun == "1" ))?"<div class=\"page-break\"></div>":"" %> |
| | | |
| | | </ItemTemplate> |
| | | </asp:Repeater> |
| | |
| | | public int countss = 0; |
| | | public string selSonghuoren = ""; |
| | | public string txtBeginDate = ""; |
| | | public string selChicun = ""; |
| | | |
| | | //初始化 |
| | | public DeliverWorkBookPrintDetailshuju() |
| | |
| | | string orderIdStr = Request["orderId"]; |
| | | selSonghuoren = Request["selSonghuoren"]; |
| | | txtBeginDate = Request["txtBeginDate"]; |
| | | selChicun = Request["selChicun"]; |
| | | |
| | | |
| | | //如果是只打印一张 |
| | | string PlanOrderidStr = Request["PlanOrderid"]; |
| | |
| | | <tr> |
| | | |
| | | <td style="text-align: center"> |
| | | <%#Container.ItemIndex + 1%> |
| | | <%#Eval("Bianhao")%> <%--<%#Container.ItemIndex + 1%>--%> |
| | | </td> |
| | | <td style="text-align: center"> |
| | | <%#Eval("pianqu")%> |
| | |
| | | coreCmsPlanOrder.createBy = CurrentUser.ShortName; |
| | | coreCmsPlanOrder.FirmId = CurrentUser.MemberId; |
| | | |
| | | var Bianhao = _PlanOrderBLL.GetModelByorderid(orderkeyid).Max(x => x.Bianhao); |
| | | if (Bianhao.HasValue&& Bianhao.Value > 0) |
| | | { |
| | | coreCmsPlanOrder.Bianhao = Bianhao.Value + 1; |
| | | } |
| | | else |
| | | { |
| | | coreCmsPlanOrder.Bianhao = 1; |
| | | } |
| | | |
| | | int orderid = _PlanOrderBLL.InsertModelIden(coreCmsPlanOrder); |
| | | |
| | | |
| | |
| | | <input type="checkbox" value='<%#Eval("id")%>' /> |
| | | </td> |
| | | <td> |
| | | <%#Container.ItemIndex + 1+ this.UCPager1.PageSize * (this.UCPager1.PageIndex - 1)%> |
| | | <%#Eval("Bianhao")%> <%-- <%#Container.ItemIndex + 1+ this.UCPager1.PageSize * (this.UCPager1.PageIndex - 1)%>--%> |
| | | </td> |
| | | <td> |
| | | <%#Eval("shi")%> |
| | |
| | | } |
| | | } |
| | | |
| | | var Bianhao = _PlanOrderBLL.GetModelByorderid(HideKeyid.Value.ToInt32().Value).Max(x => x.Bianhao); |
| | | |
| | | if (Bianhao.HasValue && Bianhao.Value > 0) |
| | | { |
| | | Bianhao = Bianhao.Value + 1; |
| | | } |
| | | else |
| | | { |
| | | Bianhao = 1; |
| | | } |
| | | |
| | | |
| | | using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, |
| | | new TransactionOptions |
| | |
| | | if (coreCmsPlanOrder == null) |
| | | { |
| | | CoreCmsPlanOrder order = new CoreCmsPlanOrder(); |
| | | order.Bianhao = Bianhao; |
| | | order.status = 1; |
| | | order.shipMobile = lie[j].shipMobile; |
| | | order.shipAddress = lie[j].shipAddress; |
| | |
| | | |
| | | |
| | | var id = _PlanOrderBLL.InsertModelIden(order); |
| | | Bianhao = Bianhao + 1; |
| | | var ssss = false; |
| | | foreach (var cmsPlanOrderItem in cmsPlanOrderItems) |
| | | { |
| | |
| | | 供应商名称: |
| | | </td> |
| | | <td> |
| | | <input id="txtName" type="text" runat="server" class=" req" onchange="changgetxtName();" maxlength="15" /> |
| | | <input id="txtName" type="text" runat="server" class=" req" onchange="changgetxtName();" maxlength="50" /> |
| | | </td> |
| | | <td class="ali03 "> |
| | | 营业执照号: |