Ver Fonte

修改订单header创建时候流水号生成时间。之前是创建前先获取流水号,现在是提交时候一起创建

klzhangweiya há 1 ano atrás
pai
commit
9e1b942e98

+ 1 - 0
src_0nline/ShwasherSys/ShwasherSys.Application/Order/OrderHeadersApplicationService.cs

@@ -173,6 +173,7 @@ namespace ShwasherSys.Order
         public override async Task<OrderHeaderDto> Create(OrderHeaderCreateDto input)
         {
             CheckCreatePermission();
+            input.Id = GetNewOrderNo();
             var result = await CreateEntity(input);
             BusinessLogTypeEnum.OrderLog.WriteLog(BusinessLogRepository, "订单创建", $"订单创建,{result.ToJsonString()}");
            //await  CommonAppService.WriteShortMessage(AbpSession.UserName,

+ 18 - 11
src_0nline/ShwasherSys/ShwasherSys.Web/Views/OrderInfo/OrderMg.cshtml

@@ -211,7 +211,7 @@ new SearchItem("saleMan", "业务员",showField:"saleManName").SetSearchIcon("qu
 													new InputViewModel("customerId",hide:true),
 													new InputViewModel("saleMan",hide:true),
 													new InputViewModel("saleManId",hide:true),
-													new InputViewModel("id",displayName:"流水号"),
+													//new InputViewModel("id",displayName:"流水号"),
 													new InputViewModel("stockNo",displayName:"客户订单号"),
 													new InputViewModel("orderStatusId",InputTypes.List, displayName:"订单状态").SetSelectOptions(OrderStatusList),
 													new InputViewModel("orderDate", displayName:"订单日期").SetNotRequired(),
@@ -465,10 +465,10 @@ new SearchItem("saleMan", "业务员",showField:"saleManName").SetSearchIcon("qu
 
 @section scripts
 {
-	<script src="~/Content/Plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
-	<script src="~/Content/Plugins/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
-	@*<script src="~/Views/OrderInfo/js/OrderMg.js"></script>*@
-	<script type="text/javascript">
+    <script src="~/Content/Plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
+    <script src="~/Content/Plugins/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
+    @*<script src="~/Views/OrderInfo/js/OrderMg.js"></script>*@
+    <script type="text/javascript">
         //cId  cStockNo cOrderStatusId cCustomerId cStartDate cEndDate
         var loToCNYCurrenyRate = [];
 
@@ -487,17 +487,17 @@ new SearchItem("saleMan", "业务员",showField:"saleManName").SetSearchIcon("qu
         var itemTable = $("#tableOrderItem");
         $(function() {
             @{
-            // List<CurrencyExchangeRate> loToCNYCurrenyRate
-            foreach (var currency in loToCNYCurrenyRate ?? new List<CurrencyExchangeRate>())
-            {
-                <text>
+                // List<CurrencyExchangeRate> loToCNYCurrenyRate
+                foreach (var currency in loToCNYCurrenyRate ?? new List<CurrencyExchangeRate>())
+                {
+                    <text>
                     loToCNYCurrenyRate.push({
                         FromCurrencyId: "@currency.FromCurrencyId",
                         ExchangeRate: "@currency.ExchangeRate"
                     });
                 </text>
+                }
             }
-        }
             //show完毕前执行
             //$("#orderDate").datetimepicker(datePickerOpt).on('show', function (event) {
             //    event.preventDefault();
@@ -529,7 +529,7 @@ new SearchItem("saleMan", "业务员",showField:"saleManName").SetSearchIcon("qu
                 BtnUpdate({ readonly: "standardName,saleManName", disabled: "saleType" });
             };
 
-            funs["btnCreate"] = function() {
+            funs["btnCreate1"] = function() {
                 abp.ajax({
                     url: window.appUrl + 'OrderHeaders/GetNewOrderNo',
                     async: true,
@@ -548,6 +548,13 @@ new SearchItem("saleMan", "业务员",showField:"saleManName").SetSearchIcon("qu
                 });
 
             }
+            funs["btnCreate"] = function () {
+				BtnCreate({
+					readonly: "sendAdress,customerName,saleManName,orderDate ",
+					disabled: "orderStatusId,saleType",
+					data: { orderStatusId: "2",  orderDate: GetNowFormatDate() }
+				});
+            }
             funs["btnDelete"] = function(url) {
                 var rows = $("#table").bootstrapTable("getSelections");
                 if (rows.length === 1) {

+ 6 - 0
src_0nline/ShwasherSys/ShwasherSys.Web/Views/OrderInfo/OrderPrint.cshtml

@@ -1,5 +1,6 @@
 @using IwbZero.Setting
 @using NPOI.SS.Formula.Functions
+@using ShwasherSys
 @using ShwasherSys.CustomerInfo
 @using ShwasherSys.Order
 @using ShwasherSys.Order.Dto
@@ -120,12 +121,16 @@
                         <td align="center" style="width:12%">
                             <strong>成品编号</strong>
                         </td>
+                        <td align="center" style="width:12%">
+                            <strong>紧急程度</strong>
+                        </td>
                     </tr>
                     @{
                         int index = 1;
                         foreach (var item in orderItems)
                         {
                             string orderSendDate = item.SendDate ==new DateTime(1900,1,1) ? "" : string.Format("{0:d}", item.SendDate);
+                            string emergencyLevelStr = item.EmergencyLevel == OrderItemEmergencyLevel.Normal ? "正常" : item.EmergencyLevel == OrderItemEmergencyLevel.Urge ? "紧急" : "延期";
 
                                         <tr class="trColor">
                                             <td align="center">@index</td>
@@ -140,6 +145,7 @@
                                             <td align="center">@orderSendDate</td>
                                             <td align="center">@item.OrderItemDesc</td>
                                             <td align="center">@item.ProductNo</td>
+                                            <td align="center">@emergencyLevelStr</td>
                                         </tr>
                             index++;
                         }