diff --git a/shop/src/main/resources/template/js/mealOrder/allMealOrderList.js b/shop/src/main/resources/template/js/mealOrder/allMealOrderList.js index a98c1b3339fd4d37a98131b6f4776da08e3e6019..a3bb67f10be47dac34bf14aa27de7539d4b28b29 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 39f8350b788f4542507fbe3d1e8f982ac5d2ae7a..1325d665645fbffeec52983688b0c1bdaacfd8d7 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 f9567ed9e124b523cd9a8044f24d2781bbc427cb..315215e79693f36b63f0c604ad0cb611e58ea7ac 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 17bfc17d21e1dfe9d9f720432351dc0970afab61..cdca0acf391398804135fc22b04431165b3c4e63 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 4a9d2be92b3cd9313bc6217496773f421a917c42..4f09b5f750b15caf04fd753beb0b050b9a479705 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 f05050a791eec6aef48bbc0be5216a8b2fd2a5f5..53b4fe125f4a565505108134a0734e364aef2bae 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 812638ab0295ba80a2817abd78db00ec1556c244..810cc81569a11d4007104f1a3948ab7fe1a7074b 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 ad083d27eb5351c1bc25f674ca667cd1d3724f66..f279232348011ec8b3018d5fd0f2c67338b680c6 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}); + }, + /** * 获取套餐订单是否赠送的字段信息 *