From bf19ad9211797145c7a2713604b6a5518609dbaa Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Mon, 21 Feb 2022 22:02:29 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E5=BA=97=E4=BF=A1=E6=81=AF=E8=AE=BE?= =?UTF-8?q?=E5=AE=9A=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/js/mealOrder/allMealOrderList.js | 8 +- .../js/mealOrder/memberMealOrderList.js | 8 +- .../js/mealOrder/storeMealOrderList.js | 8 +- .../js/storeOnlineSetUp/storeOnlineSetUp.js | 211 +++++++++--------- .../tpl/keepFitOrder/keepFitOrderAdd.html | 2 +- .../tpl/mealOrder/storeMealOrderDetails.html | 2 +- 6 files changed, 123 insertions(+), 116 deletions(-) diff --git a/shop/src/main/resources/template/js/mealOrder/allMealOrderList.js b/shop/src/main/resources/template/js/mealOrder/allMealOrderList.js index 5aac6b238..07748cb14 100644 --- a/shop/src/main/resources/template/js/mealOrder/allMealOrderList.js +++ b/shop/src/main/resources/template/js/mealOrder/allMealOrderList.js @@ -43,11 +43,11 @@ layui.config({ { field: 'phone', title: '会员手机号', width: 100, rowspan: '2', align: "center"}, { title: '下单地址', align: 'center', colspan: '2'}, { field: 'payablePrice', title: '应付金额', width: 100, align: "left", rowspan: '2'}, + { field: 'payPrice', title: '实付金额', width: 100, align: "left", rowspan: '2'}, { field: 'state', title: '订单状态', width: 80, align: "center", rowspan: '2', templet: function(d){ return shopUtil.getMealOrderStateName(d); }}, - { field: 'payPrice', title: '实付金额', width: 100, align: "left", rowspan: '2'}, - { field: 'payTime', title: '实付日期', align: 'center', rowspan: '2', width: 150 }, + { 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){ return "线上下单"; @@ -55,8 +55,8 @@ layui.config({ return "线下下单"; } }}, - { field: 'createName', title: '录入人', width: 120, rowspan: '2' }, - { field: 'createTime', title: '单据日期', align: 'center', width: 150, rowspan: '2' }, + { field: 'createName', title: '专属顾问', width: 120, rowspan: '2' }, + { field: 'createTime', title: '创建时间', align: 'center', width: 150, rowspan: '2' }, ],[ { field: 'areaName', title: '区域', align: 'left', width: 120}, { field: 'storeName', title: '门店', align: 'left', width: 120} diff --git a/shop/src/main/resources/template/js/mealOrder/memberMealOrderList.js b/shop/src/main/resources/template/js/mealOrder/memberMealOrderList.js index 5ce53b3ee..eb38e795b 100644 --- a/shop/src/main/resources/template/js/mealOrder/memberMealOrderList.js +++ b/shop/src/main/resources/template/js/mealOrder/memberMealOrderList.js @@ -34,11 +34,11 @@ layui.config({ { field: 'contacts', title: '会员名称', width: 100 }, { field: 'phone', title: '会员手机号', width: 100, align: "center"}, { field: 'payablePrice', title: '应付金额', width: 100, align: "left"}, + { field: 'payPrice', title: '实付金额', width: 100, align: "left"}, { field: 'state', title: '订单状态', width: 80, align: "center", templet: function(d){ return shopUtil.getMealOrderStateName(d); }}, - { field: 'payPrice', title: '实付金额', width: 100, align: "left"}, - { field: 'payTime', title: '实付日期', align: 'center', width: 150 }, + { field: 'payTime', title: '支付时间', align: 'center', width: 150 }, { field: 'type', title: '订单来源', width: 80, align: "center", templet: function(d){ if(d.type == 1){ return "线上下单"; @@ -46,8 +46,8 @@ layui.config({ return "线下下单"; } }}, - { field: 'createName', title: '录入人', width: 120 }, - { field: 'createTime', title: '单据日期', align: 'center', width: 150 }, + { field: 'createName', title: '专属顾问', width: 120 }, + { field: 'createTime', title: '创建时间', align: 'center', width: 150 }, ]], done: function(){ matchingLanguage(); diff --git a/shop/src/main/resources/template/js/mealOrder/storeMealOrderList.js b/shop/src/main/resources/template/js/mealOrder/storeMealOrderList.js index 6f834814e..b5240fc53 100644 --- a/shop/src/main/resources/template/js/mealOrder/storeMealOrderList.js +++ b/shop/src/main/resources/template/js/mealOrder/storeMealOrderList.js @@ -38,11 +38,11 @@ layui.config({ { field: 'contacts', title: '会员名称', width: 100 }, { field: 'phone', title: '会员手机号', width: 100, align: "center"}, { field: 'payablePrice', title: '应付金额', width: 100, align: "left"}, + { field: 'payPrice', title: '实付金额', width: 100, align: "left"}, { field: 'state', title: '订单状态', width: 80, align: "center", templet: function(d){ return shopUtil.getMealOrderStateName(d); }}, - { field: 'payPrice', title: '实付金额', width: 100, align: "left"}, - { field: 'payTime', title: '实付日期', align: 'center', width: 150 }, + { field: 'payTime', title: '支付时间', align: 'center', width: 150 }, { field: 'type', title: '订单来源', width: 80, align: "center", templet: function(d){ if(d.type == 1){ return "线上下单"; @@ -50,8 +50,8 @@ layui.config({ return "线下下单"; } }}, - { field: 'createName', title: '录入人', width: 120 }, - { field: 'createTime', title: '单据日期', align: 'center', width: 150 }, + { field: 'createName', title: '专属顾问', width: 120 }, + { field: 'createTime', title: '创建时间', align: 'center', width: 150 }, { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'} ]], done: function(){ diff --git a/shop/src/main/resources/template/js/storeOnlineSetUp/storeOnlineSetUp.js b/shop/src/main/resources/template/js/storeOnlineSetUp/storeOnlineSetUp.js index 95d9e10ae..48a9e1e0b 100644 --- a/shop/src/main/resources/template/js/storeOnlineSetUp/storeOnlineSetUp.js +++ b/shop/src/main/resources/template/js/storeOnlineSetUp/storeOnlineSetUp.js @@ -14,7 +14,10 @@ layui.config({ // 加载我所在的门店 shopUtil.queryStaffBelongStoreList(function (json){ - $("#storeId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option.tpl'), json)); + $("#storeId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json)); + if(json.rows.length > 0){ + loadStoreMation($("#storeId").val()); + } }); form.on('select(storeId)', function(data) { @@ -22,115 +25,119 @@ layui.config({ if(isNull(thisRowValue)){ $("#formContent").html(""); }else{ - showGrid({ - id: "formContent", - url: shopBasePath + "store008", - params: {rowId: thisRowValue}, - pagination: false, - method: "GET", - template: beanTemplate, - ajaxSendLoadBefore: function(hdb, json){ - if(isNull(json.bean.onlineBookJson)){ - json.bean.onlineBookJson = []; - }else{ - json.bean.onlineBookJson = JSON.parse(json.bean.onlineBookJson); + loadStoreMation(thisRowValue); + } + }); + + function loadStoreMation(storeId){ + showGrid({ + id: "formContent", + url: shopBasePath + "store008", + params: {rowId: storeId}, + pagination: false, + method: "GET", + template: beanTemplate, + ajaxSendLoadBefore: function(hdb, json){ + if(isNull(json.bean.onlineBookJson)){ + json.bean.onlineBookJson = []; + }else{ + json.bean.onlineBookJson = JSON.parse(json.bean.onlineBookJson); + } + }, + ajaxSendAfter:function(data){ + + var startTime = laydate.render({ + elem: '#businessStartTime', + format: 'HH:mm', + type: 'timeminute', + minutesinterval: 15, + btns: ['confirm'], + done:function(value, date){ + endTime.config.min = { + year: date.year, + month: date.month - 1,//关键 + date: date.date, + hours: date.hours, + minutes: date.minutes, + seconds: date.seconds + }; } - }, - ajaxSendAfter:function(data){ + }); - var startTime = laydate.render({ - elem: '#businessStartTime', - format: 'HH:mm', - type: 'timeminute', - minutesinterval: 15, - btns: ['confirm'], - done:function(value, date){ - endTime.config.min = { - year: date.year, - month: date.month - 1,//关键 - date: date.date, - hours: date.hours, - minutes: date.minutes, - seconds: date.seconds - }; - } - }); + var endTime = laydate.render({ + elem: '#businessEndTime', + format: 'HH:mm', + type: 'timeminute', + minutesinterval: 15, + btns: ['confirm'], + done:function(value, date){ + startTime.config.max = { + year: date.year, + month: date.month - 1,//关键 + date: date.date, + hours: date.hours, + minutes: date.minutes, + seconds: date.seconds + }; + } + }); - var endTime = laydate.render({ - elem: '#businessEndTime', - format: 'HH:mm', - type: 'timeminute', - minutesinterval: 15, - btns: ['confirm'], - done:function(value, date){ - startTime.config.max = { - year: date.year, - month: date.month - 1,//关键 - date: date.date, - hours: date.hours, - minutes: date.minutes, - seconds: date.seconds + $("input:radio[name=onlineBookAppoint][value=" + data.bean.onlineBookAppoint + "]").attr("checked", true); + $("input:radio[name=onlineBookType][value=" + data.bean.onlineBookType + "]").attr("checked", true); + + authBtn('1644129110388'); + matchingLanguage(); + form.render(); + form.on('submit(formSaveBean)', function (data) { + if (winui.verifyForm(data.elem)) { + var tableData = new Array(); + $.each($(".onlineJson"), function(i, item) { + var row = { + time: $(item).attr("id").replace("td", ""), + value: $(item).val(), }; + tableData.push(row); + }); + var onlineBookAppoint = $("input[name='onlineBookAppoint']:checked").val(); + if(onlineBookAppoint == 1){ + // 开启预约 + if(isNull($("#onlineBookRadix").val())){ + winui.window.msg('请输入维修基数', {icon: 2,time: 2000}); + return false; + } + if(tableData.length == 0){ + winui.window.msg('请计算时间段', {icon: 2,time: 2000}); + return false; + } + if(isNull($("input[name='onlineBookType']:checked").val())){ + winui.window.msg('请选择类型', {icon: 2,time: 2000}); + return false; + } } - }); - $("input:radio[name=onlineBookAppoint][value=" + data.bean.onlineBookAppoint + "]").attr("checked", true); - $("input:radio[name=onlineBookType][value=" + data.bean.onlineBookType + "]").attr("checked", true); + var params = { + rowId: $("#storeId").val(), + businessStartTime: $("#businessStartTime").val(), + businessEndTime: $("#businessEndTime").val(), + onlineBookAppoint: $("input[name='onlineBookAppoint']:checked").val(), + onlineBookRadix: $("#onlineBookRadix").val(), + onlineBookType: $("input[name='onlineBookType']:checked").val(), + onlineBookJson: JSON.stringify(tableData) + }; - authBtn('1644129110388'); - matchingLanguage(); - form.render(); - form.on('submit(formSaveBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var tableData = new Array(); - $.each($(".onlineJson"), function(i, item) { - var row = { - time: $(item).attr("id").replace("td", ""), - value: $(item).val(), - }; - tableData.push(row); - }); - var onlineBookAppoint = $("input[name='onlineBookAppoint']:checked").val(); - if(onlineBookAppoint == 1){ - // 开启预约 - if(isNull($("#onlineBookRadix").val())){ - winui.window.msg('请输入维修基数', {icon: 2,time: 2000}); - return false; - } - if(tableData.length == 0){ - winui.window.msg('请计算时间段', {icon: 2,time: 2000}); - return false; - } - if(isNull($("input[name='onlineBookType']:checked").val())){ - winui.window.msg('请选择类型', {icon: 2,time: 2000}); - return false; - } + AjaxPostUtil.request({url: shopBasePath + "store009", params: params, type: 'json', method: "POST", callback: function(json){ + if(json.returnCode == 0){ + winui.window.msg('保存成功', {icon: 1,time: 2000}); + }else{ + winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); } - - var params = { - rowId: $("#storeId").val(), - businessStartTime: $("#businessStartTime").val(), - businessEndTime: $("#businessEndTime").val(), - onlineBookAppoint: $("input[name='onlineBookAppoint']:checked").val(), - onlineBookRadix: $("#onlineBookRadix").val(), - onlineBookType: $("input[name='onlineBookType']:checked").val(), - onlineBookJson: JSON.stringify(tableData) - }; - - AjaxPostUtil.request({url: shopBasePath + "store009", params: params, type: 'json', method: "POST", callback: function(json){ - if(json.returnCode == 0){ - winui.window.msg('保存成功', {icon: 1,time: 2000}); - }else{ - winui.window.msg(json.returnMessage, {icon: 2, time: 2000}); - } - }, async: true}); - } - return false; - }); - } - }); - } - }); + }, async: true}); + } + return false; + }); + } + }); + } $("body").on("click", "#calc", function() { var startTime = $("#businessStartTime").val(); diff --git a/shop/src/main/resources/template/tpl/keepFitOrder/keepFitOrderAdd.html b/shop/src/main/resources/template/tpl/keepFitOrder/keepFitOrderAdd.html index 094926210..46be2ad5c 100644 --- a/shop/src/main/resources/template/tpl/keepFitOrder/keepFitOrderAdd.html +++ b/shop/src/main/resources/template/tpl/keepFitOrder/keepFitOrderAdd.html @@ -23,7 +23,7 @@
- +
diff --git a/shop/src/main/resources/template/tpl/mealOrder/storeMealOrderDetails.html b/shop/src/main/resources/template/tpl/mealOrder/storeMealOrderDetails.html index eb63ecf2e..e18a58f99 100644 --- a/shop/src/main/resources/template/tpl/mealOrder/storeMealOrderDetails.html +++ b/shop/src/main/resources/template/tpl/mealOrder/storeMealOrderDetails.html @@ -34,7 +34,7 @@
- +
{{createName}}
-- GitLab