Browse Source

目标与达成页面

ningsy 4 years ago
parent
commit
36de76c41c

+ 11 - 3
suishenbang-order/src/main/java/com/dgtly/order/controller/OrderSalesDetailController.java

@@ -32,6 +32,7 @@ import javax.servlet.http.HttpServletRequest;
 public class OrderSalesDetailController extends BaseController
 {
     private String prefix = "order/orderSalesDetail";
+    final private static String queryUrl = "http://10.32.2.212:8010";
 
     @Autowired
     private RestTemplate restTemplate;
@@ -60,18 +61,25 @@ public class OrderSalesDetailController extends BaseController
 
         HttpEntity<Object> requestEntity
                 = new HttpEntity<>(map, headers);
-        String url = cloudPath+"order"+request.getRequestURI();
+        //走网关
+        //String url = cloudPath+"order"+request.getRequestURI();
+        //不走网关
+        String url = queryUrl+request.getRequestURI();
         String str = restTemplate.postForObject(url ,requestEntity,String.class);
         return str;
     }
 
     /**
-     * 查看经销商详情
+     * 查看销售目标达成详情
      */
     @GetMapping("/info/{id}")
     public String info(@PathVariable("id") Long id, ModelMap mmap)
     {
-        String str = restTemplate.getForObject(cloudPath+"order/order/orderSalesDetail/info/"+id,String.class);
+        //走网关
+        //String queryUrl = cloudPath+"order/order/orderSalesDetail/info/"+id;
+        //不走网关
+        String url = queryUrl + "/order/orderSalesDetail/info/"+id;
+        String str = restTemplate.getForObject(url, String.class);
         OrderSalesDetail orderSalesDetail = JSONObject.toJavaObject(JSON.parseObject(str),OrderSalesDetail.class);
         mmap.put("orderSalesDetail", orderSalesDetail);
         return prefix + "/edit";

+ 46 - 25
suishenbang-order/src/main/resources/templates/order/orderSalesDetail/edit.html

@@ -1,136 +1,156 @@
 <!DOCTYPE html>
 <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
 <head>
-    <th:block th:include="include :: header('修改销售目标达成')" />
+    <th:block th:include="include :: header('销售目标达成-详情')" />
 </head>
 <body class="white-bg">
     <div class="wrapper wrapper-content animated fadeInRight ibox-content">
         <form class="form-horizontal m" id="form-detail-edit" th:object="${orderSalesDetail}">
             <input name="id" th:field="*{id}" type="hidden">
-            <div class="form-group">    
+            <!--<div class="form-group">
                 <label class="col-sm-3 control-label">是否删除:</label>
                 <div class="col-sm-8">
                     <input name="isDelete" th:field="*{isDelete}" class="form-control" type="text">
                 </div>
-            </div>
+            </div>-->
             <div class="form-group">    
                 <label class="col-sm-3 control-label">公司代码:</label>
                 <div class="col-sm-8">
-                    <input name="companyCode" th:field="*{companyCode}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{companyCode}"></span>
+                   <!-- <input name="companyCode" th:field="*{companyCode}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">公司名称:</label>
                 <div class="col-sm-8">
-                    <input name="companyName" th:field="*{companyName}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{companyName}"></span>
+                    <!--<input name="companyName" th:field="*{companyName}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">销售大区代码:</label>
                 <div class="col-sm-8">
-                    <input name="saledeptCode" th:field="*{saledeptCode}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{saledeptCode}"></span>
+                    <!--<input name="saledeptCode" th:field="*{saledeptCode}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">销售大区名称:</label>
                 <div class="col-sm-8">
-                    <input name="saledeptName" th:field="*{saledeptName}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{saledeptName}"></span>
+                    <!--<input name="saledeptName" th:field="*{saledeptName}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">销售部代码:</label>
                 <div class="col-sm-8">
-                    <input name="officeCode" th:field="*{officeCode}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{officeCode}"></span>
+                    <!--<input name="officeCode" th:field="*{officeCode}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">销售部名称:</label>
                 <div class="col-sm-8">
-                    <input name="officeName" th:field="*{officeName}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{officeName}"></span>
+                    <!--<input name="officeName" th:field="*{officeName}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">销售分部/推广组:</label>
                 <div class="col-sm-8">
-                    <input name="subofficeCode" th:field="*{subofficeCode}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{subofficeCode}"></span>
+                    <!--<input name="subofficeCode" th:field="*{subofficeCode}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">销售分部/推广组:</label>
                 <div class="col-sm-8">
-                    <input name="subofficeName" th:field="*{subofficeName}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{subofficeName}"></span>
+                    <!--<input name="subofficeName" th:field="*{subofficeName}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">工号:</label>
                 <div class="col-sm-8">
-                    <input name="empId" th:field="*{empId}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{empId}"></span>
+                    <!--<input name="empId" th:field="*{empId}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">销售员:</label>
                 <div class="col-sm-8">
-                    <input name="empName" th:field="*{empName}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{empName}"></span>
+                    <!--<input name="empName" th:field="*{empName}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">经销商代码:</label>
                 <div class="col-sm-8">
-                    <input name="customerId" th:field="*{customerId}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{customerId}"></span>
+                    <!--<input name="customerId" th:field="*{customerId}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">经销商名称:</label>
                 <div class="col-sm-8">
-                    <input name="customerName" th:field="*{customerName}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{customerName}"></span>
+                    <!--<input name="customerName" th:field="*{customerName}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">已复核:</label>
                 <div class="col-sm-8">
-                    <input name="nowYearAct" th:field="*{nowYearAct}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{nowYearAct}"></span>
+                    <!--<input name="nowYearAct" th:field="*{nowYearAct}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">预算:</label>
                 <div class="col-sm-8">
-                    <input name="nowYearBud" th:field="*{nowYearBud}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{nowYearBud}"></span>
+                    <!--<input name="nowYearBud" th:field="*{nowYearBud}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">未复核:</label>
                 <div class="col-sm-8">
-                    <input name="reviewNo" th:field="*{reviewNo}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{reviewNo}"></span>
+                    <!--<input name="reviewNo" th:field="*{reviewNo}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">未清:</label>
                 <div class="col-sm-8">
-                    <input name="uncleared" th:field="*{uncleared}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{uncleared}"></span>
+                    <!--<input name="uncleared" th:field="*{uncleared}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">冻结:</label>
                 <div class="col-sm-8">
-                    <input name="freeze" th:field="*{freeze}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{freeze}"></span>
+                    <!--<input name="freeze" th:field="*{freeze}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">销售凭证数量:</label>
                 <div class="col-sm-8">
-                    <input name="orderNum" th:field="*{orderNum}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{orderNum}"></span>
+                    <!--<input name="orderNum" th:field="*{orderNum}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">日期:</label>
                 <div class="col-sm-8">
-                    <input name="calMonth" th:field="*{calMonth}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{calMonth}"></span>
+                    <!--<input name="calMonth" th:field="*{calMonth}" class="form-control" type="text">-->
                 </div>
             </div>
             <div class="form-group">    
                 <label class="col-sm-3 control-label">数据更新时间:</label>
                 <div class="col-sm-8">
-                    <input name="runTime" th:field="*{runTime}" class="form-control" type="text">
+                    <span class="form-control" th:text="*{runTime}"></span>
+                    <!--<input name="runTime" th:field="*{runTime}" class="form-control" type="text">-->
                 </div>
             </div>
         </form>
@@ -143,9 +163,10 @@
         });
 
         function submitHandler() {
-            if ($.validate.form()) {
+          /*  if ($.validate.form()) {
                 $.operate.save(prefix + "/edit", $('#form-detail-edit').serialize());
-            }
+            }*/
+            return true;
         }
     </script>
 </body>

+ 41 - 42
suishenbang-order/src/main/resources/templates/order/orderSalesDetail/orderSalesDetail.html

@@ -10,10 +10,6 @@
                 <form id="formId">
                     <div class="select-list">
                         <ul>
-                            <li>
-                                <p>是否删除:</p>
-                                <input type="text" name="isDelete"/>
-                            </li>
                             <li>
                                 <p>公司名称:</p>
                                 <input type="text" name="companyName"/>
@@ -42,10 +38,10 @@
                                 <p>经销商名称:</p>
                                 <input type="text" name="customerName"/>
                             </li>
-                            <li>
+                            <!--<li class="select-time">
                                 <p>日期:</p>
-                                <input type="text" name="calMonth"/>
-                            </li>
+                                <input type="text" name="calMonth" class="time-input" id="calMonthDate" placeholder="yyyy-MM" style="cursor: default;width: 200px;"/>
+                            </li>-->
                             <li>
                                 <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                 <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@@ -56,18 +52,9 @@
             </div>
 
             <div class="btn-group-sm" id="toolbar" role="group">
-                <!--<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="OrderSalesDetail:detail:add">
-                    <i class="fa fa-plus"></i> 添加
-                </a>
-                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="OrderSalesDetail:detail:edit">
-                    <i class="fa fa-edit"></i> 修改
+                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="order:orderSalesDetail:info">
+                    <i class="fa fa-edit"></i> 详情
                 </a>
-                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="OrderSalesDetail:detail:remove">
-                    <i class="fa fa-remove"></i> 删除
-                </a>
-                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="OrderSalesDetail:detail:export">
-                    <i class="fa fa-download"></i> 导出
-                 </a>-->
             </div>
             <div class="col-sm-12 select-table table-striped">
                 <table id="bootstrap-table"></table>
@@ -75,6 +62,7 @@
         </div>
     </div>
     <th:block th:include="include :: footer" />
+    <th:block th:include="include :: datetimepicker-js" />
     <script th:inline="javascript">
         var detailFlag = [[${@permission.hasPermi('order:orderSalesDetail:info')}]];
         var prefix = ctx + "order/orderSalesDetail";
@@ -82,93 +70,90 @@
         $(function() {
             var options = {
                 url: prefix + "/list",
+                updateUrl: prefix + "/info/{id}",
                 modalName: "销售目标达成",
                 columns: [{
                     checkbox: true
                 },
                 {
-                    field : 'id', 
+                    field : 'id',
                     title : 'id',
                     visible: false
                 },
                 {
-                    field : 'isDelete', 
-                    title : '是否删除'
-                },
-                {
-                    field : 'companyCode', 
+                    field : 'companyCode',
                     title : '公司代码'
                 },
                 {
-                    field : 'companyName', 
+                    field : 'companyName',
                     title : '公司名称'
                 },
                 {
-                    field : 'saledeptCode', 
+                    field : 'saledeptCode',
                     title : '销售大区代码'
                 },
                 {
-                    field : 'saledeptName', 
+                    field : 'saledeptName',
                     title : '销售大区名称'
                 },
                 {
-                    field : 'officeCode', 
+                    field : 'officeCode',
                     title : '销售部代码'
                 },
                 {
-                    field : 'officeName', 
+                    field : 'officeName',
                     title : '销售部名称'
                 },
                 {
-                    field : 'subofficeCode', 
+                    field : 'subofficeCode',
                     title : '销售分部/推广组'
                 },
                 {
-                    field : 'subofficeName', 
+                    field : 'subofficeName',
                     title : '销售分部/推广组'
                 },
                 {
-                    field : 'empId', 
+                    field : 'empId',
                     title : '工号'
                 },
                 {
-                    field : 'empName', 
+                    field : 'empName',
                     title : '销售员'
                 },
                 {
-                    field : 'customerName', 
+                    field : 'customerName',
                     title : '经销商名称'
                 },
                 {
-                    field : 'nowYearAct', 
+                    field : 'nowYearAct',
                     title : '已复核'
                 },
                 {
-                    field : 'nowYearBud', 
+                    field : 'nowYearBud',
                     title : '预算'
                 },
                 {
-                    field : 'reviewNo', 
+                    field : 'reviewNo',
                     title : '未复核'
                 },
                 {
-                    field : 'uncleared', 
+                    field : 'uncleared',
                     title : '未清'
                 },
                 {
-                    field : 'freeze', 
+                    field : 'freeze',
                     title : '冻结'
                 },
                 {
-                    field : 'orderNum', 
+                    field : 'orderNum',
                     title : '销售凭证数量'
                 },
                 {
-                    field : 'calMonth', 
+                    field : 'calMonth',
                     title : '日期'
                 },
                 {
-                    field : 'runTime', 
+                    field : 'runTime',
                     title : '数据更新时间'
                 },
                 {
@@ -183,6 +168,20 @@
             };
             $.table.init(options);
         });
+
+       /* //订单结束时间
+        $("#calMonthDate").datetimepicker({
+            format: 'yyyy-mm',
+            minView: "month",
+            todayBtn:  true,
+            autoclose: true,
+            endDate : new Date(),
+        }).on('changeDate', function(event) {
+            event.preventDefault();
+            event.stopPropagation();
+            var startTime = event.date;
+            $('#calMonthDate').datetimepicker('setStartDate', startTime);
+        });*/
     </script>
 </body>
 </html>