Browse Source

5. 工厂生产管理

liujiankang 5 years ago
parent
commit
eae78f93b2

+ 4 - 1
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -1499,7 +1499,7 @@ public class AdminCustomerController {
         salesOrder.setEndDate(ca.getTime());
        Integer allToDayOrder = salesOrderService.listSalesOrderNum(salesOrder);
 
-        Map<String, Integer> numberMap = new HashMap<>();
+        Map<String, Object> numberMap = new HashMap<>();
         numberMap.put("toBeConfirmedOrder", toBeConfirmedOrder);
         numberMap.put("toBeAnnounced", toBeAnnounced);
         numberMap.put("toBeDelivered", toBeDelivered);
@@ -1511,6 +1511,9 @@ public class AdminCustomerController {
 //        numberMap.put("notSendCustomer", notSendCustomer);
 
         numberMap.put("adminDept", admin.getAdminDept());
+
+        SalesOrder salesOrderNum = salesOrderService.getStatusNum();
+        numberMap.put("salesOrderNum", salesOrderNum);
         msg.setResultCode(ResultInfo.SUCCESSCODE);
         msg.setStatus(true);
         msg.setData(numberMap);

+ 1 - 0
watero-rst-web/src/main/java/com/iamberry/rst/controllers/order/AdminSalesOrderController.java

@@ -134,6 +134,7 @@ public class AdminSalesOrderController {
         StitchAttrUtil.getSa()
                 .addDatePro("yyyy-MM-dd HH:mm:ss","startDate","endDate")
                 .addNoPro("suSalesOrderItemList")
+                .addNoPro("salesOrderItemList")
                 .setModelAndView(salesOrder, mv, "/admin/salesOrder/list_order_page", pagedResult);
         salesOrder.setSalesOrderItemList(null);
         // 查询订单各个状态数量

+ 79 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/home/pc_index.ftl

@@ -127,6 +127,55 @@
             <#--<a onclick="toOrserList('${path}/admin/customer/select_customer_list?backStatus=1&isFirst=1',2,'')"  ><span>(</span><span id="notSendCustomer" style="color: #f00">0</span><span>)录入三天后未寄回的客诉数量</span></a>-->
         </ul>
     </div>
+    <div id="selectTodo2" class="menu_dropdown bk_2" style="display:none">
+        <ul>
+            <li style="margin-top: 1px;width: 200px;margin-left: 10px;">
+                <a onclick="toOrserList('${path}/admin/salesOrder/list_order_page?statisticalType=1',1,'',this)">
+                    <span style="color: red">待确认(<span id="beConfirmedNum" style="color: #f00">0</span>)</span>
+                </a>
+            </li>
+            <li style="margin-top: 1px;width: 200px;margin-left: 10px;">
+                <a onclick="toOrserList('${path}/admin/salesOrder/list_order_page?statisticalType=2',1,'',this)">
+                    <span style="color: red">待分配物流(<span id="distributionLogisticsNum" style="color: #f00">0</span>)</span>
+                </a>
+            </li>
+            <li style="margin-top: 1px;width: 200px;margin-left: 10px;">
+                <a onclick="toOrserList('${path}/admin/salesOrder/list_order_page?statisticalType=3',1,'',this)">
+                    <span style="color: red">待发货(<span id="sendTheGoods" style="color: #f00">0</span>)</span>
+                </a>
+            </li>
+            <li style="margin-top: 1px;width: 200px;margin-left: 10px;">
+                <a onclick="toOrserList('${path}/admin/salesOrder/list_order_page?statisticalType=4',1,'',this)">
+                    <span style="color: red">待打单(<span id="playSingle" style="color: #f00">0</span>)</span>
+                </a>
+            </li>
+            <li style="margin-top: 1px;width: 200px;margin-left: 10px;">
+                <a onclick="toOrserList('${path}/admin/salesOrder/list_order_page?statisticalType=5',1,'',this)">
+                    <span style="color: red">待出库(<span id="outbound" style="color: #f00">0</span>)</span>
+                </a>
+            </li>
+            <li style="margin-top: 1px;width: 200px;margin-left: 10px;">
+                <a onclick="toOrserList('${path}/admin/salesOrder/list_order_page?statisticalType=6',1,'',this)">
+                    <span style="color: red">待揽件(<span id="takeToBe" style="color: #f00">0</span>)</span>
+                </a>
+            </li>
+            <li style="margin-top: 1px;width: 200px;margin-left: 10px;">
+                <a onclick="toOrserList('${path}/admin/salesOrder/list_order_page?statisticalType=7',1,'',this)">
+                    <span style="color: red">揽件超时(<span id="tookTimeout" style="color: #f00">0</span>)</span>
+                </a>
+            </li>
+            <li style="margin-top: 1px;width: 200px;margin-left: 10px;">
+                <a onclick="toOrserList('${path}/admin/salesOrder/list_order_page?statisticalType=8',1,'',this)">
+                    <span style="color: red">揽件异常(<span id="tookAbnormal" style="color: #f00">0</span>)</span>
+                </a>
+            </li>
+            <#--<div>客诉</div>-->
+            <#--<a onclick="toOrserList('${path}/admin/customer/select_customer_list?customerIsSolve=2&isFirst=1',2,'')"  ><span>(</span><span id="notSolvedCustomer" style="color: #f00">0</span><span>)未解决客诉数量</span></a><br>-->
+            <#--<a onclick="toOrserList('${path}/admin/customer/select_customer_list?backStatus=4&isFirst=1',2,'')"  ><span>(</span><span id="amountReceivedCustomer" style="color: #f00">0</span><span>)需要向工厂确认是否已签收的产品数量</span></a><br>-->
+            <#--<a onclick="toOrserList('${path}/admin/customer/select_customer_list?backStatus=3&isFirst=1',2,'')"  ><span>(</span><span id="noEntryCustomer" style="color: #f00">0</span><span>)需要填写Efast订单号的客诉数量</span></a><br>-->
+            <#--<a onclick="toOrserList('${path}/admin/customer/select_customer_list?backStatus=1&isFirst=1',2,'')"  ><span>(</span><span id="notSendCustomer" style="color: #f00">0</span><span>)录入三天后未寄回的客诉数量</span></a>-->
+        </ul>
+    </div>
 </section>
 
 <div class="contextMenu" id="Huiadminmenu">
@@ -153,6 +202,19 @@
             content: $("#selectTodo").html()
         });
     }
+    function toDoShow3(){
+        //页面层
+        layer.open({
+            type: 1,
+            title: '待处理订单提醒',
+            shade: false,
+            offset: 'rb',
+            /*closeBtn: 0, 是否展示关闭按钮*/
+
+            area: ['300px', '230px'], //宽高
+            content: $("#selectTodo2").html()
+        });
+    }
     function toDoShow2(playSingle,outbound){
         //页面层
         layer.open({
@@ -196,10 +258,23 @@
                     $("#toBeAnnounced").html(data.data.toBeAnnounced);
                     $("#toBeDelivered").html(data.data.toBeDelivered);
                     $("#allToDayOrder").html(data.data.allToDayOrder);
+
+
+                    $("#beConfirmedNum").html(data.data.salesOrderNum.beConfirmedNum);
+                    $("#distributionLogisticsNum").html(data.data.salesOrderNum.distributionLogisticsNum);
+                    $("#sendTheGoods").html(data.data.salesOrderNum.sendTheGoods);
+                    $("#playSingle").html(data.data.salesOrderNum.playSingle);
+                    $("#outbound").html(data.data.salesOrderNum.outbound);
+                    $("#takeToBe").html(data.data.salesOrderNum.takeToBe);
+                    $("#tookTimeout").html(data.data.salesOrderNum.tookTimeout);
+                    $("#tookAbnormal").html(data.data.salesOrderNum.tookAbnormal);
                     if(data.data.adminDept === 3){
+                        toDoShow3();
+                    }else{
                         toDoShow();
                     }
-                }toDoShow();
+                }
+
             },
             "error":function(data){
                 alert("操作失败,请联系管理员!");
@@ -226,5 +301,8 @@
             }
         });
     });
+    function statisticalType(statisticalType) {
+        window.location.href= "${path}/admin/salesOrder/list_order_page?statisticalType="+statisticalType;
+    }
 </script>
 </html>

+ 9 - 4
watero-rst-web/src/main/webapp/WEB-INF/views/pts/productionPlan/add_productionPlan.ftl

@@ -205,6 +205,11 @@
             layer.msg("工作日期不能为空!", {icon: 5, time: 2000});
             return;
         }
+        var planProcessId = $("#planProcessId").val();
+        if(planProcessId == null || planProcessId == ""){
+            layer.msg("工序不能为空!", {icon: 5, time: 2000});
+            return;
+        }
         var planStay = $("#planStay").val();
         if(planStay == null || planStay == ""){
             layer.msg("拉线不能为空!", {icon: 5, time: 2000});
@@ -230,10 +235,10 @@
                 async: false,
                 success: function(data){
                     if (data.returnCode == 200) {
-                        /*layer.msg("添加成功!", {icon: 1, time: 1000},function () {
-                            layer_close();
-                        });*/
-                        layer.msg("添加成功!", {icon: 1, time: 2000});
+                        layer.msg("添加成功!", {icon: 1, time: 1000},function () {
+                            window.location.href= '${path}/admin/productionPlan/select_productionPlan_list';
+                        });
+                        /*layer.msg("添加成功!", {icon: 1, time: 2000});*/
                     } else if(data.returnCode == 501){
                         var names = "";
                         var employeeList = data.returnMsg.employeeList;

+ 4 - 4
watero-rst-web/src/main/webapp/WEB-INF/views/pts/productionPlan/perfect_productionPlan.ftl

@@ -245,10 +245,10 @@
                 async: false,
                 success: function(data){
                     if (data.returnCode == 200) {
-                        l/*ayer.msg("完善成功!", {icon: 1, time: 1000},function () {
-                            layer_close();
-                        });*/
-                        layer.msg("完善成功!", {icon: 1, time: 2000});
+                        layer.msg("完善成功!", {icon: 1, time: 1000},function () {
+                            window.location.href= '${path}/admin/productionPlan/select_productionPlan_list';
+                        });
+                        /*layer.msg("完善成功!", {icon: 1, time: 2000});*/
                     } else {
                         layer.msg("完善失败!", {icon: 5, time: 2000});
                     }

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/pts/productionPlan/productionPlan_statistical.ftl

@@ -61,7 +61,7 @@
 							<td class="text-c" width="100">${list.planResults!''}</td>
 							<td class="text-c" width="100"><#if list.planResults??><#if list.planWorkHours??><#if list.employeesNum??>${list.planResults/list.planWorkHours/list.employeesNum}</#if></#if></#if></td>
 							<td class="text-c" width="100">${list.processWorkinghours!''}</td>
-							<td class="text-c" width="100"><#if list.planResults??><#if list.planWorkHours??><#if list.employeesNum??>${list.processWorkinghours/(list.planResults/list.planWorkHours/list.employeesNum) * 100}%</#if></#if></#if></td>
+							<td class="text-c" width="100"><#if list.planResults??><#if list.planWorkHours??><#if list.employeesNum??>${(list.planResults/list.planWorkHours/list.employeesNum)/list.processWorkinghours * 100}%</#if></#if></#if></td>
 						</tr>
 					</#list>
                 <#else>

+ 1 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/pts/productionPlan/update_productionPlan.ftl

@@ -253,8 +253,7 @@
                 success: function(data){
                     if (data.returnCode == 200) {
                         layer.msg("编辑成功!", {icon: 1, time: 1000},function () {
-                            parent.location.reload();
-                            layer_close();
+                            window.location.href= '${path}/admin/productionPlan/select_productionPlan_list';
 
                         });
 

+ 3 - 2
watero-rst-web/src/main/webapp/common/js/salesOrder/salesOrder.js

@@ -468,15 +468,16 @@ function calculatePrice(){
     /*总价,折扣价,优惠金额*/
     var colorDiscountAll = 0,colorPriceAll = 0;
     $("#add_product").find("tr").each(function(){
-        var colorDiscount = 0,colorPrice = 0,salesPayMoney=0,itemNum=0;
+        var colorDiscount = 0,colorPrice = 0,salesPayMoney=0,itemNum=0,item_total=0;
         colorDiscount = Number($(this).find(".color_discount").val());
         colorPrice = Number($(this).find(".color_price").val());
         itemNum = $(this).find(".item-num").val();
+        item_total = Number($(this).find(".item_total").val());//小结
         if(!isEmpty(itemNum)){
             return;
         }
         itemNum = Number(itemNum);
-        var total = accMul(colorDiscount,itemNum);
+        var total = accMul(item_total,itemNum);
         var isUpdate = $(this).find(".item_total").attr("isUpdate");
         if(isUpdate == "1"){
             $(this).find(".item_total").val(total);