From fddf121cd7b9b488d7fd529bd3e64461d65b9f20 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Thu, 01 Sep 2022 16:01:33 +0800 Subject: [PATCH] 20220822 --- src/main/resources/templates/febs/views/modules/order/orderList.html | 38 +++++++++++++++++++++++++++----------- 1 files changed, 27 insertions(+), 11 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 565bdba..f2da7d7 100644 --- a/src/main/resources/templates/febs/views/modules/order/orderList.html +++ b/src/main/resources/templates/febs/views/modules/order/orderList.html @@ -100,6 +100,7 @@ <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="exportDeliverOne">导出待发货订单,系统自动发货</button> + <button class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain" lay-event="confirmOrder">确认到货</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> @@ -142,6 +143,31 @@ table.on('toolbar(orderTable)', function(obj){ var event = obj.event; + var id = obj.config.id; + var checkStatus = table.checkStatus(id); + if(event === 'confirmOrder'){ + var data = checkStatus.data; + let ids = ""; + for(let i = 0;i < data.length;i++){ + 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 () { + febs.alert.success('操作成功'); + $query.click(); + }); + // window.location.href = ctx + "admin/order/confirmOrder?takeUniqueCode="+uniqueCodeValue+"&orderIds="+ids; + } if (event == 'exportDeliverOne') { let uniqueCodeValue = $searchForm.find("select[name='uniqueCode']").val(); if(uniqueCodeValue == '' || uniqueCodeValue == null){ @@ -169,17 +195,6 @@ table.on('tool(orderTable)', function (obj) { var data = obj.data, layEvent = obj.event; - // if (layEvent === 'deliverGoods') { - // febs.modal.open('发货', 'modules/order/deliverGoods/' + data.id, { - // btn: ['确认', '取消'], - // yes: function (index, layero) { - // $('#deliver-update').find('#submit').trigger('click'); - // }, - // btn2: function () { - // layer.closeAll(); - // } - // }); - // } if (layEvent === 'deliverGoods') { febs.modal.open('发货', 'modules/order/deliverGoods/' + data.id, { btn: ['确认', '取消'], @@ -250,6 +265,7 @@ defaultToolbar: [], toolbar: '#tableToolBar', cols: [[ + {type: 'checkbox', fixed: 'left'}, {field: 'orderNo', title: '订单编号', minWidth: 200,align:'left'}, {field: 'memberName', title: '购买人', minWidth: 120,align:'left'}, {field: 'memberPhone', title: '联系方式', minWidth: 120,align:'left'}, -- Gitblit v1.9.1