From 2860daf092e84f52bdc435a1ac9ab34277bdb0c9 Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Tue, 8 Mar 2022 21:58:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A5=97=E9=A4=90=E8=AE=A2=E5=8D=95=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=80=A7=E8=B4=A8=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/js/mealOrder/allMealOrderList.js | 7 +++++++ .../js/mealOrder/memberMealOrderList.js | 1 + .../template/js/mealOrder/storeMealOrderAdd.js | 6 ++++++ .../template/js/mealOrder/storeMealOrderList.js | 8 ++++++++ .../tpl/mealOrder/allMealOrderList.html | 5 +++++ .../tpl/mealOrder/storeMealOrderAdd.html | 8 ++++++++ .../tpl/mealOrder/storeMealOrderList.html | 5 +++++ .../assets/lib/layui/customer/shopUtil.js | 17 +++++++++++++++++ 8 files changed, 57 insertions(+) diff --git a/shop/src/main/resources/template/js/mealOrder/allMealOrderList.js b/shop/src/main/resources/template/js/mealOrder/allMealOrderList.js index a98c1b333..a3bb67f10 100644 --- a/shop/src/main/resources/template/js/mealOrder/allMealOrderList.js +++ b/shop/src/main/resources/template/js/mealOrder/allMealOrderList.js @@ -24,6 +24,11 @@ layui.config({ }); }); + // 加载套餐订单性质 + shopUtil.queryMealOrderNatureList(function (json){ + $("#natureId").html(getDataUseHandlebars(selOption, json)); + }); + table.render({ id: 'messageTable', elem: '#messageTable', @@ -47,6 +52,7 @@ layui.config({ { field: 'state', title: '订单状态', width: 80, align: "center", rowspan: '2', templet: function(d){ return shopUtil.getMealOrderStateName(d); }}, + { field: 'natureName', title: '订单性质', width: 80, rowspan: '2', align: "center"}, { field: 'payTime', title: '支付时间', align: 'center', rowspan: '2', width: 150 }, { field: 'type', title: '订单来源', width: 80, align: "center", rowspan: '2', templet: function(d){ if(d.type == 1){ @@ -112,6 +118,7 @@ layui.config({ orderNum: $("#orderNum").val(), memberName: $("#memberName").val(), memberPhone: $("#memberPhone").val(), + natureId: $("#natureId").val(), state: $("#state").val(), areaId: $("#areaId").val(), storeId: $("#storeId").val() diff --git a/shop/src/main/resources/template/js/mealOrder/memberMealOrderList.js b/shop/src/main/resources/template/js/mealOrder/memberMealOrderList.js index 39f8350b7..1325d6656 100644 --- a/shop/src/main/resources/template/js/mealOrder/memberMealOrderList.js +++ b/shop/src/main/resources/template/js/mealOrder/memberMealOrderList.js @@ -38,6 +38,7 @@ layui.config({ { field: 'state', title: '订单状态', width: 80, align: "center", templet: function(d){ return shopUtil.getMealOrderStateName(d); }}, + { field: 'natureName', title: '订单性质', width: 80, align: "center"}, { field: 'payTime', title: '支付时间', align: 'center', width: 150 }, { field: 'type', title: '订单来源', width: 80, align: "center", templet: function(d){ if(d.type == 1){ diff --git a/shop/src/main/resources/template/js/mealOrder/storeMealOrderAdd.js b/shop/src/main/resources/template/js/mealOrder/storeMealOrderAdd.js index f9567ed9e..315215e79 100644 --- a/shop/src/main/resources/template/js/mealOrder/storeMealOrderAdd.js +++ b/shop/src/main/resources/template/js/mealOrder/storeMealOrderAdd.js @@ -48,6 +48,11 @@ layui.config({ $("#allPrice").html("0 元"); }); + // 加载套餐订单性质 + shopUtil.queryMealOrderNatureList(function (json){ + $("#natureId").html(getDataUseHandlebars($("#selectTemplate").html(), json)); + }); + textool.init({ eleId: 'remark', maxlength: 400, @@ -100,6 +105,7 @@ layui.config({ var params = { storeId: $("#storeId").val(), + natureId: $("#natureId").val(), memberId: memberMation.id, remark: $("#remark").val(), type: 2, diff --git a/shop/src/main/resources/template/js/mealOrder/storeMealOrderList.js b/shop/src/main/resources/template/js/mealOrder/storeMealOrderList.js index 17bfc17d2..cdca0acf3 100644 --- a/shop/src/main/resources/template/js/mealOrder/storeMealOrderList.js +++ b/shop/src/main/resources/template/js/mealOrder/storeMealOrderList.js @@ -10,12 +10,18 @@ layui.config({ var $ = layui.$, form = layui.form, table = layui.table; + var selOption = getFileContent('tpl/template/select-option.tpl'); // 加载我所在的门店 shopUtil.queryStaffBelongStoreList(function (json){ $("#storeId").html(getDataUseHandlebars($("#selectTemplate").html(), json)); }); + // 加载套餐订单性质 + shopUtil.queryMealOrderNatureList(function (json){ + $("#natureId").html(getDataUseHandlebars(selOption, json)); + }); + form.on('select(storeId)', function(data) { table.reload("messageTable", {page: {curr: 1}, where: getTableParams()}) }); @@ -42,6 +48,7 @@ layui.config({ { field: 'state', title: '订单状态', width: 80, align: "center", templet: function(d){ return shopUtil.getMealOrderStateName(d); }}, + { field: 'natureName', title: '订单性质', width: 80, align: "center"}, { field: 'payTime', title: '支付时间', align: 'center', width: 150 }, { field: 'type', title: '订单来源', width: 80, align: "center", templet: function(d){ if(d.type == 1){ @@ -163,6 +170,7 @@ layui.config({ orderNum: $("#orderNum").val(), memberName: $("#memberName").val(), memberPhone: $("#memberPhone").val(), + natureId: $("#natureId").val(), state: $("#state").val(), storeId: storeId }; diff --git a/shop/src/main/resources/template/tpl/mealOrder/allMealOrderList.html b/shop/src/main/resources/template/tpl/mealOrder/allMealOrderList.html index 4a9d2be92..4f09b5f75 100644 --- a/shop/src/main/resources/template/tpl/mealOrder/allMealOrderList.html +++ b/shop/src/main/resources/template/tpl/mealOrder/allMealOrderList.html @@ -48,6 +48,11 @@ + +
+ +
diff --git a/shop/src/main/resources/template/tpl/mealOrder/storeMealOrderAdd.html b/shop/src/main/resources/template/tpl/mealOrder/storeMealOrderAdd.html index f05050a79..53b4fe125 100644 --- a/shop/src/main/resources/template/tpl/mealOrder/storeMealOrderAdd.html +++ b/shop/src/main/resources/template/tpl/mealOrder/storeMealOrderAdd.html @@ -23,6 +23,14 @@ +
+ +
+ +
+
diff --git a/shop/src/main/resources/template/tpl/mealOrder/storeMealOrderList.html b/shop/src/main/resources/template/tpl/mealOrder/storeMealOrderList.html index 812638ab0..810cc8156 100644 --- a/shop/src/main/resources/template/tpl/mealOrder/storeMealOrderList.html +++ b/shop/src/main/resources/template/tpl/mealOrder/storeMealOrderList.html @@ -43,6 +43,11 @@
+ +
+ +
diff --git a/web/src/main/resources/template/assets/lib/layui/customer/shopUtil.js b/web/src/main/resources/template/assets/lib/layui/customer/shopUtil.js index ad083d27e..f27923234 100644 --- a/web/src/main/resources/template/assets/lib/layui/customer/shopUtil.js +++ b/web/src/main/resources/template/assets/lib/layui/customer/shopUtil.js @@ -24,6 +24,23 @@ var shopUtil = { } }, + /** + * 获取套餐订单已启用的性质管理列表 + * + * @param callback 回执函数 + */ + queryMealOrderNatureList: function (callback){ + AjaxPostUtil.request({url: shopBasePath + "queryMealOrderNatureList", params: {enabled: 1}, type: 'json', method: "POST", callback: function(json) { + if(json.returnCode == 0) { + if(typeof(callback) == "function") { + callback(json); + } + } else { + winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); + } + }, async: false}); + }, + /** * 获取套餐订单是否赠送的字段信息 * -- GitLab