From 3280d1bd977e8fb5c9c60e615612fabb7b99c3e3 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 27 Jul 2022 09:46:58 +0800
Subject: [PATCH] 20220727  保存代码

---
 src/main/resources/templates/febs/views/modules/order/orderList.html |   63 +++++++++++++++++++++++++++++--
 1 files changed, 58 insertions(+), 5 deletions(-)

diff --git a/src/main/resources/templates/febs/views/modules/order/orderList.html b/src/main/resources/templates/febs/views/modules/order/orderList.html
index 8ea89e4..b7ad4c9 100644
--- a/src/main/resources/templates/febs/views/modules/order/orderList.html
+++ b/src/main/resources/templates/febs/views/modules/order/orderList.html
@@ -32,6 +32,24 @@
                                     </div>
                                 </div>
                                 <div class="layui-inline">
+                                    <label class="layui-form-label">团长:</label>
+                                    <div class="layui-input-inline">
+                                        <select name="uniqueCode" class="order-takeUniqueCode">
+                                            <option value="">请选择</option>
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label layui-form-label-sm">配送方式</label>
+                                    <div class="layui-input-inline">
+                                        <select name="deliveryType">
+                                            <option value="">请选择</option>
+                                            <option value="1">自提</option>
+                                            <option value="2">快递</option>
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
                                     <label class="layui-form-label layui-form-label-sm">支付状态</label>
                                     <div class="layui-input-inline">
                                         <select name="payResult">
@@ -81,14 +99,15 @@
 </script>
 <script type="text/html" id="tableToolBar">
     <div class="layui-btn-container">
-        <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain" lay-event="exportDeliver">导出未发货订单</button>
+        <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain" lay-event="exportDeliverOne">导出未发货订单(自提)</button>
+        <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain" lay-event="exportDeliverTwo">导出未发货订单(快递)</button>
         <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain" id="importDeliver" lay-event="importDeliver">导入发货</button>
     </div>
 </script>
 <!-- 表格操作栏 end -->
 <script data-th-inline="none" type="text/javascript">
     // 引入组件并初始化
-    layui.use([ 'jquery', 'form', 'table', 'febs', 'upload'], function () {
+    layui.use([ 'jquery', 'form', 'table', 'febs', 'formSelects', 'upload'], function () {
         var $ = layui.jquery,
             febs = layui.febs,
             form = layui.form,
@@ -100,18 +119,40 @@
             $searchForm = $view.find('form'),
             $add = $view.find('#add'),
             sortObject = {field: 'phone', type: null},
+            formSelects = layui.formSelects,
             tableIns;
 
         form.render();
+
+        formSelects.render();
+        //(下拉框)
+        $.get(ctx + 'admin/leader/selectList', function (data) {
+            for (var k in data)
+            {
+                $(".order-takeUniqueCode").append("<option value='" + data[k].uniqueCode + "'>" + data[k].name + "</option>");
+            }
+            layui.use('form', function () {
+                var form = layui.form;
+                form.render();
+            });
+        });
 
         // 表格初始化
         initTable();
 
         table.on('toolbar(orderTable)', function(obj){
             var event = obj.event;
+            if (event == 'exportDeliverOne') {
+                let uniqueCodeValue = $searchForm.find("select[name='uniqueCode']").val();
+                if(uniqueCodeValue == '' || uniqueCodeValue == null){
+                    febs.alert.warn('请选择团长');
+                    return;
+                }
+                window.location.href = ctx + "admin/order/exportOrderListOne?orderType=1&status=2&deliveryType=1&takeUniqueCode="+uniqueCodeValue;
+            }
 
-            if (event == 'exportDeliver') {
-                window.location.href = ctx + "admin/order/exportOrderList?orderType=1&status=2";
+            if (event == 'exportDeliverTwo') {
+                window.location.href = ctx + "admin/order/exportOrderList?orderType=1&status=2&deliveryType=2";
             }
         });
 
@@ -205,6 +246,16 @@
                         {field: 'amount', title: '订单金额', minWidth: 120,align:'left'},
                         {field: 'carriage', title: '运费', minWidth: 120,align:'left'},
                         {field: 'orderTime', title: '下单时间', minWidth: 200,align:'left'},
+                        {field: 'deliveryType', title: '配送方式',
+                            templet: function (d) {
+                                if (d.deliveryType === 1) {
+                                    return '<span style="color:dodgerblue;">自提</span>'
+                                } else if (d.deliveryType === 2) {
+                                    return '<span style="color:forestgreen;">快递</span>'
+                                }else{
+                                    return ''
+                                }
+                            }, minWidth: 120,align:'center'},
                         {field: 'status', title: '状态',
                             templet: function (d) {
                                 if (d.status === 1) {
@@ -230,7 +281,7 @@
                         {field: 'payOrderNo', title: '支付订单号', minWidth: 200,align:'left'},
                         {title: '操作',
                             templet: function (d) {
-                                    if (d.status === 2) {
+                                    if (d.status === 2 && d.deliveryType === 2) {
                                         return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="deliverGoods" shiro:hasPermission="user:update">发货</button>'
                                             +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="seeOrder" shiro:hasPermission="user:update">详情</button>'
                                     }else{
@@ -249,6 +300,8 @@
                 orderNo: $searchForm.find('input[name="orderNo"]').val().trim(),
                 payResult: $searchForm.find("select[name='payResult']").val(),
                 status: $searchForm.find("select[name='status']").val(),
+                deliveryType: $searchForm.find("select[name='deliveryType']").val(),
+                uniqueCode: $searchForm.find("select[name='uniqueCode']").val(),
             };
         }
 

--
Gitblit v1.9.1