提交 bf19ad92 编写于 作者: Skyeye云's avatar Skyeye云

门店信息设定修改

上级 57b8e30e
...@@ -43,11 +43,11 @@ layui.config({ ...@@ -43,11 +43,11 @@ layui.config({
{ field: 'phone', title: '会员手机号', width: 100, rowspan: '2', align: "center"}, { field: 'phone', title: '会员手机号', width: 100, rowspan: '2', align: "center"},
{ title: '下单地址', align: 'center', colspan: '2'}, { title: '下单地址', align: 'center', colspan: '2'},
{ field: 'payablePrice', title: '应付金额', width: 100, align: "left", rowspan: '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){ { field: 'state', title: '订单状态', width: 80, align: "center", rowspan: '2', templet: function(d){
return shopUtil.getMealOrderStateName(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){ { field: 'type', title: '订单来源', width: 80, align: "center", rowspan: '2', templet: function(d){
if(d.type == 1){ if(d.type == 1){
return "线上下单"; return "线上下单";
...@@ -55,8 +55,8 @@ layui.config({ ...@@ -55,8 +55,8 @@ layui.config({
return "线下下单"; return "线下下单";
} }
}}, }},
{ field: 'createName', title: '录入人', width: 120, rowspan: '2' }, { field: 'createName', title: '专属顾问', width: 120, rowspan: '2' },
{ field: 'createTime', title: '单据日期', align: 'center', width: 150, rowspan: '2' }, { field: 'createTime', title: '创建时间', align: 'center', width: 150, rowspan: '2' },
],[ ],[
{ field: 'areaName', title: '区域', align: 'left', width: 120}, { field: 'areaName', title: '区域', align: 'left', width: 120},
{ field: 'storeName', title: '门店', align: 'left', width: 120} { field: 'storeName', title: '门店', align: 'left', width: 120}
......
...@@ -34,11 +34,11 @@ layui.config({ ...@@ -34,11 +34,11 @@ layui.config({
{ field: 'contacts', title: '会员名称', width: 100 }, { field: 'contacts', title: '会员名称', width: 100 },
{ field: 'phone', title: '会员手机号', width: 100, align: "center"}, { field: 'phone', title: '会员手机号', width: 100, align: "center"},
{ field: 'payablePrice', title: '应付金额', width: 100, align: "left"}, { field: 'payablePrice', title: '应付金额', width: 100, align: "left"},
{ field: 'payPrice', title: '实付金额', width: 100, align: "left"},
{ field: 'state', title: '订单状态', width: 80, align: "center", templet: function(d){ { field: 'state', title: '订单状态', width: 80, align: "center", templet: function(d){
return shopUtil.getMealOrderStateName(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){ { field: 'type', title: '订单来源', width: 80, align: "center", templet: function(d){
if(d.type == 1){ if(d.type == 1){
return "线上下单"; return "线上下单";
...@@ -46,8 +46,8 @@ layui.config({ ...@@ -46,8 +46,8 @@ layui.config({
return "线下下单"; return "线下下单";
} }
}}, }},
{ field: 'createName', title: '录入人', width: 120 }, { field: 'createName', title: '专属顾问', width: 120 },
{ field: 'createTime', title: '单据日期', align: 'center', width: 150 }, { field: 'createTime', title: '创建时间', align: 'center', width: 150 },
]], ]],
done: function(){ done: function(){
matchingLanguage(); matchingLanguage();
......
...@@ -38,11 +38,11 @@ layui.config({ ...@@ -38,11 +38,11 @@ layui.config({
{ field: 'contacts', title: '会员名称', width: 100 }, { field: 'contacts', title: '会员名称', width: 100 },
{ field: 'phone', title: '会员手机号', width: 100, align: "center"}, { field: 'phone', title: '会员手机号', width: 100, align: "center"},
{ field: 'payablePrice', title: '应付金额', width: 100, align: "left"}, { field: 'payablePrice', title: '应付金额', width: 100, align: "left"},
{ field: 'payPrice', title: '实付金额', width: 100, align: "left"},
{ field: 'state', title: '订单状态', width: 80, align: "center", templet: function(d){ { field: 'state', title: '订单状态', width: 80, align: "center", templet: function(d){
return shopUtil.getMealOrderStateName(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){ { field: 'type', title: '订单来源', width: 80, align: "center", templet: function(d){
if(d.type == 1){ if(d.type == 1){
return "线上下单"; return "线上下单";
...@@ -50,8 +50,8 @@ layui.config({ ...@@ -50,8 +50,8 @@ layui.config({
return "线下下单"; return "线下下单";
} }
}}, }},
{ field: 'createName', title: '录入人', width: 120 }, { field: 'createName', title: '专属顾问', width: 120 },
{ field: 'createTime', title: '单据日期', align: 'center', width: 150 }, { field: 'createTime', title: '创建时间', align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'} { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'}
]], ]],
done: function(){ done: function(){
......
...@@ -14,7 +14,10 @@ layui.config({ ...@@ -14,7 +14,10 @@ layui.config({
// 加载我所在的门店 // 加载我所在的门店
shopUtil.queryStaffBelongStoreList(function (json){ 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) { form.on('select(storeId)', function(data) {
...@@ -22,115 +25,119 @@ layui.config({ ...@@ -22,115 +25,119 @@ layui.config({
if(isNull(thisRowValue)){ if(isNull(thisRowValue)){
$("#formContent").html(""); $("#formContent").html("");
}else{ }else{
showGrid({ loadStoreMation(thisRowValue);
id: "formContent", }
url: shopBasePath + "store008", });
params: {rowId: thisRowValue},
pagination: false, function loadStoreMation(storeId){
method: "GET", showGrid({
template: beanTemplate, id: "formContent",
ajaxSendLoadBefore: function(hdb, json){ url: shopBasePath + "store008",
if(isNull(json.bean.onlineBookJson)){ params: {rowId: storeId},
json.bean.onlineBookJson = []; pagination: false,
}else{ method: "GET",
json.bean.onlineBookJson = JSON.parse(json.bean.onlineBookJson); 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({ var endTime = laydate.render({
elem: '#businessStartTime', elem: '#businessEndTime',
format: 'HH:mm', format: 'HH:mm',
type: 'timeminute', type: 'timeminute',
minutesinterval: 15, minutesinterval: 15,
btns: ['confirm'], btns: ['confirm'],
done:function(value, date){ done:function(value, date){
endTime.config.min = { startTime.config.max = {
year: date.year, year: date.year,
month: date.month - 1,//关键 month: date.month - 1,//关键
date: date.date, date: date.date,
hours: date.hours, hours: date.hours,
minutes: date.minutes, minutes: date.minutes,
seconds: date.seconds seconds: date.seconds
}; };
} }
}); });
var endTime = laydate.render({ $("input:radio[name=onlineBookAppoint][value=" + data.bean.onlineBookAppoint + "]").attr("checked", true);
elem: '#businessEndTime', $("input:radio[name=onlineBookType][value=" + data.bean.onlineBookType + "]").attr("checked", true);
format: 'HH:mm',
type: 'timeminute', authBtn('1644129110388');
minutesinterval: 15, matchingLanguage();
btns: ['confirm'], form.render();
done:function(value, date){ form.on('submit(formSaveBean)', function (data) {
startTime.config.max = { if (winui.verifyForm(data.elem)) {
year: date.year, var tableData = new Array();
month: date.month - 1,//关键 $.each($(".onlineJson"), function(i, item) {
date: date.date, var row = {
hours: date.hours, time: $(item).attr("id").replace("td", ""),
minutes: date.minutes, value: $(item).val(),
seconds: date.seconds
}; };
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); var params = {
$("input:radio[name=onlineBookType][value=" + data.bean.onlineBookType + "]").attr("checked", true); 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'); AjaxPostUtil.request({url: shopBasePath + "store009", params: params, type: 'json', method: "POST", callback: function(json){
matchingLanguage(); if(json.returnCode == 0){
form.render(); winui.window.msg('保存成功', {icon: 1,time: 2000});
form.on('submit(formSaveBean)', function (data) { }else{
if (winui.verifyForm(data.elem)) { winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
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;
}
} }
}, async: true});
var params = { }
rowId: $("#storeId").val(), return false;
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;
});
}
});
}
});
$("body").on("click", "#calc", function() { $("body").on("click", "#calc", function() {
var startTime = $("#businessStartTime").val(); var startTime = $("#businessStartTime").val();
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div class="layui-form-item layui-col-xs6"> <div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">用户类型<i class="red">*</i></label> <label class="layui-form-label">用户类型<i class="red">*</i></label>
<div class="layui-input-block winui-radio"> <div class="layui-input-block winui-radio">
<input type="radio" name="userType" value="1" title="匿名用户" lay-filter="userType"/> <!-- <input type="radio" name="userType" value="1" title="匿名用户" lay-filter="userType"/>-->
<input type="radio" name="userType" value="2" title="会员" lay-filter="userType" checked="checked"/> <input type="radio" name="userType" value="2" title="会员" lay-filter="userType" checked="checked"/>
</div> </div>
</div> </div>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs6"> <div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">操作员</label> <label class="layui-form-label">专属顾问</label>
<div class="layui-input-block ver-center"> <div class="layui-input-block ver-center">
{{createName}} {{createName}}
</div> </div>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册