xiaoyong931011
2022-09-29 5274e48fdb951e007b3ffdb1e4a9fcfe84b7c72c
src/main/resources/templates/febs/views/modules/order/orderList.html
@@ -42,10 +42,10 @@
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">配送方式</label>
                                    <div class="layui-input-inline">
                                        <select name="deliveryType">
                                        <select name="isHome">
                                            <option value="">请选择</option>
                                            <option value="1">自提</option>
                                            <option value="2">快递</option>
                                            <option value="1">送货上门</option>
                                            <option value="2">自提</option>
                                        </select>
                                    </div>
                                </div>
@@ -171,20 +171,28 @@
            var id = obj.config.id;
            var checkStatus = table.checkStatus(id);
            if(event === 'confirmOrder'){
                let uniqueCodeValue = $searchForm.find("select[name='uniqueCode']").val();
                // if(uniqueCodeValue == '' || uniqueCodeValue == null){
                //     febs.alert.warn('请选择团长');
                //     return;
                // }
                var data = checkStatus.data;
                let ids = "";
                for(let i = 0;i < data.length;i++){
                    ids = ids + data[i].id+","
                    if(data[i].status != 3){
                        febs.alert.warn('请选择待收货的订单');
                        return;
                    }else if(data[i].deliveryState != 2){
                        febs.alert.warn('请选择配送中的订单');
                        return;
                    }else{
                        ids = ids + data[i].id+",";
                    }
                }
                // layer.alert(layui.util.escape(JSON.stringify(data)));
                console.log(ids);
                if(ids == null || ids == ""){
                    febs.alert.warn('请选择确认到货的订单');
                    return;
                }
                let uniqueCodeValue = $searchForm.find("select[name='uniqueCode']").val();
                if(uniqueCodeValue == '' || uniqueCodeValue == null){
                    febs.alert.warn('请选择团长');
                    return;
                }
                febs.get(ctx + 'admin/order/confirmOrder?takeUniqueCode='+uniqueCodeValue+'&orderIds='+ids, null, function () {
@@ -199,7 +207,31 @@
                    febs.alert.warn('请选择团长');
                    return;
                }
                window.location.href = ctx + "admin/order/exportOrderListOne?orderType=1&status=2&deliveryType=1&takeUniqueCode="+uniqueCodeValue;
                var data = checkStatus.data;
                let ids = "";
                for(let i = 0;i < data.length;i++){
                    if(data[i].status != 2){
                        febs.alert.warn('请选择待发货的订单');
                        return;
                    }else if(data[i].deliveryState != 1){
                        febs.alert.warn('请选择待配送的订单');
                        return;
                    }else{
                        ids = ids + data[i].id+",";
                    }
                }
                // layer.alert(layui.util.escape(JSON.stringify(data)));
                console.log(ids);
                if(ids == null || ids == ""){
                    febs.alert.warn('请选择待发货的订单');
                    return;
                }
                window.location.href = ctx + "admin/order/exportOrderListOne?orderType=1&status=2&deliveryType=1&takeUniqueCode="+uniqueCodeValue+'&orderIds='+ids;
                febs.get(ctx + 'admin/order/deliverOrder?takeUniqueCode='+uniqueCodeValue+'&orderIds='+ids, null, function () {
                    febs.alert.success('操作成功');
                    $query.click();
                });
            }
            if (event == 'exportDeliverTwo') {
@@ -292,10 +324,11 @@
                cols: [[
                        {type: 'checkbox', fixed: 'left'},
                        {field: 'orderNo', title: '订单编号', minWidth: 200,align:'left'},
                        {field: 'memberName', title: '购买人', minWidth: 120,align:'left'},
                        {field: 'memberName', title: '购买人', minWidth: 100,align:'left'},
                        {field: 'memberPhone', title: '联系方式', minWidth: 120,align:'left'},
                        // {field: 'memberBindPhone', title: '联系方式', minWidth: 120,align:'left'},
                        {field: 'amount', title: '订单金额', minWidth: 120,align:'left'},
                        {field: 'goodsName', title: '商品', minWidth: 160,align:'left'},
                        {field: 'amount', title: '订单金额', minWidth: 80,align:'left'},
                        {field: 'leaderName', title: '团长', minWidth: 120,align:'left'},
                        {field: 'orderTime', title: '下单时间', minWidth: 200,align:'left'},
                        {field: 'isHome', title: '配送方式',
@@ -307,7 +340,7 @@
                                }else{
                                    return ''
                                }
                            }, minWidth: 120,align:'center'},
                            }, minWidth: 100,align:'center'},
                        {field: 'status', title: '状态',
                            templet: function (d) {
                                if (d.status === 1) {
@@ -339,10 +372,10 @@
                            }else{
                                return ''
                            }
                        }, minWidth: 120,align:'center'},
                        {field: 'payMethod', title: '支付方式', minWidth: 120,align:'left'},
                        {field: 'payTime', title: '支付时间', minWidth: 200,align:'left'},
                        {field: 'wxOrderNo', title: '支付订单号', minWidth: 200,align:'left'},
                        }, minWidth: 80,align:'center'},
                        {field: 'payMethod', title: '支付方式', minWidth: 100,align:'left'},
                        {field: 'payTime', title: '支付时间', minWidth: 120,align:'left'},
                        {field: 'wxOrderNo', title: '支付订单号', minWidth: 120,align:'left'},
                        {title: '操作',
                            templet: function (d) {
                                        return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="seeOrder" shiro:hasPermission="user:update">详情</button>'
@@ -366,7 +399,7 @@
                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(),
                isHome: $searchForm.find("select[name='isHome']").val(),
                uniqueCode: $searchForm.find("select[name='uniqueCode']").val(),
            };
        }