提交 0619911c 编写于 作者: doc_wei's avatar doc_wei

门店信息设定完成

上级 60ca7c14
...@@ -12,8 +12,6 @@ layui.config({ ...@@ -12,8 +12,6 @@ layui.config({
laydate = layui.laydate; laydate = layui.laydate;
var beanTemplate = $("#beanTemplate").html(); var beanTemplate = $("#beanTemplate").html();
authBtn('1643984717466');
// 加载我所在的门店 // 加载我所在的门店
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.tpl'), json));
...@@ -31,7 +29,13 @@ layui.config({ ...@@ -31,7 +29,13 @@ layui.config({
pagination: false, pagination: false,
method: "GET", method: "GET",
template: beanTemplate, template: beanTemplate,
ajaxSendLoadBefore: function(hdb){}, ajaxSendLoadBefore: function(hdb, json){
if(isNull(json.bean.onlineBookJson)){
json.bean.onlineBookJson = [];
}else{
json.bean.onlineBookJson = JSON.parse(json.bean.onlineBookJson);
}
},
ajaxSendAfter:function(data){ ajaxSendAfter:function(data){
var startTime = laydate.render({ var startTime = laydate.render({
...@@ -73,6 +77,7 @@ layui.config({ ...@@ -73,6 +77,7 @@ layui.config({
$("input:radio[name=onlineBookAppoint][value=" + data.bean.onlineBookAppoint + "]").attr("checked", true); $("input:radio[name=onlineBookAppoint][value=" + data.bean.onlineBookAppoint + "]").attr("checked", true);
$("input:radio[name=onlineBookType][value=" + data.bean.onlineBookType + "]").attr("checked", true); $("input:radio[name=onlineBookType][value=" + data.bean.onlineBookType + "]").attr("checked", true);
authBtn('1644129110388');
matchingLanguage(); matchingLanguage();
form.render(); form.render();
form.on('submit(formSaveBean)', function (data) { form.on('submit(formSaveBean)', function (data) {
...@@ -85,36 +90,40 @@ layui.config({ ...@@ -85,36 +90,40 @@ layui.config({
}; };
tableData.push(row); tableData.push(row);
}); });
var onlineBookAppoint = $("input[name='type']:checked").val(); var onlineBookAppoint = $("input[name='onlineBookAppoint']:checked").val();
if(onlineBookAppoint == 1){ if(onlineBookAppoint == 1){
// 开启预约 // 开启预约
if(isNull($("#onlineBookRadix").val())){ if(isNull($("#onlineBookRadix").val())){
winui.window.msg('请输入维修基数', {icon: 2,time: 2000}); winui.window.msg('请输入维修基数', {icon: 2,time: 2000});
return false; 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;
}
} }
console.log(tableData)
// var params = { var params = {
// title: $("#title").val(), rowId: $("#storeId").val(),
// logo: $("#logo").find("input[type='hidden'][name='upload']").attr("oldurl"), businessStartTime: $("#businessStartTime").val(),
// type: $("input[name='type']:checked").val(), businessEndTime: $("#businessEndTime").val(),
// price: $("#price").val(), onlineBookAppoint: $("input[name='onlineBookAppoint']:checked").val(),
// mealNum: $("#mealNum").val(), onlineBookRadix: $("#onlineBookRadix").val(),
// mealExplain: $("#mealExplain").val(), onlineBookType: $("input[name='onlineBookType']:checked").val(),
// state: $("input[name='state']:checked").val(), onlineBookJson: JSON.stringify(tableData)
// mealAreaMationList: JSON.stringify(mealAreaMationList), };
// mealConsumeMationList: JSON.stringify(tableData),
// }; AjaxPostUtil.request({url: shopBasePath + "store009", params: params, type: 'json', method: "POST", callback: function(json){
// if(json.returnCode == 0){
// AjaxPostUtil.request({url: shopBasePath + "meal002", params: params, type: 'json', method: "POST", callback: function(json){ winui.window.msg('保存成功', {icon: 1,time: 2000});
// if(json.returnCode == 0){ }else{
// parent.layer.close(index); winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
// parent.refreshCode = '0'; }
// }else{ }, async: true});
// winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
// }
// }, async: true});
} }
return false; return false;
}); });
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<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"> <div class="layui-input-block">
<input type="text" id="onlineBookRadix" name="onlineBookRadix" win-verify="required|number" placeholder="请输入维修基数" class="layui-input" value="{{onlineBookRadix}}"/> <input type="text" id="onlineBookRadix" name="onlineBookRadix" win-verify="number" placeholder="请输入维修基数" class="layui-input" value="{{onlineBookRadix}}"/>
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs6"> <div class="layui-form-item layui-col-xs6">
...@@ -69,17 +69,30 @@ ...@@ -69,17 +69,30 @@
<div class="layui-input-block"> <div class="layui-input-block">
<div class="winui-toolbar"> <div class="winui-toolbar">
<div class="winui-tool" style="text-align: left;"> <div class="winui-tool" style="text-align: left;">
<button id="calc" class="winui-toolbtn" type="button">计算</button> <button id="calc" class="winui-toolbtn" type="button"><i class="fa fa-calculator" aria-hidden="true"></i>计算</button>
</div> </div>
</div> </div>
<div class=" layui-col-xs12" style="overflow-x: auto"> <div class=" layui-col-xs12" style="overflow-x: auto">
<table class="layui-table"> <table class="layui-table">
<thead> <thead>
<tr id="tableHead"> <tr id="tableHead">
<th style="width: 30px;"></th>
{{#each onlineBookJson}}
<th>{{time}}</th>
{{/each}}
</tr> </tr>
</thead> </thead>
<tbody id="useTable" class="insurance-table"> <tbody id="useTable" class="insurance-table">
<tr>
<td style="width: 30px;"></td>
{{#each onlineBookJson}}
<td>
<div style="width: 100px;">
<input type="text" id="td{{time}}" win-verify="required|number" placeholder="请输入数量" class="layui-input onlineJson" value="{{value}}"/>
</div>
</td>
{{/each}}
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>
...@@ -88,7 +101,7 @@ ...@@ -88,7 +101,7 @@
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<div class="layui-input-block"> <div class="layui-input-block">
<button class="winui-btn" lay-submit lay-filter="formSaveBean"><language showName="com.skyeye.save"></language></button> <button class="winui-btn" lay-submit lay-filter="formSaveBean" auth="1644129110388"><language showName="com.skyeye.save"></language></button>
</div> </div>
</div> </div>
{{/bean}} {{/bean}}
...@@ -97,7 +110,7 @@ ...@@ -97,7 +110,7 @@
<script type="text/x-handlebars-template" id="tableHeadTemplate"> <script type="text/x-handlebars-template" id="tableHeadTemplate">
<th style="width: 30px;"></th> <th style="width: 30px;"></th>
{{#each rows}} {{#each rows}}
<th style="width: 150px;">{{this}}</th> <th>{{this}}</th>
{{/each}} {{/each}}
</script> </script>
...@@ -106,7 +119,7 @@ ...@@ -106,7 +119,7 @@
<td style="width: 30px;"></td> <td style="width: 30px;"></td>
{{#each rows}} {{#each rows}}
<td> <td>
<div style="width: 150px;"> <div style="width: 100px;">
<input type="text" id="td{{this}}" win-verify="required|number" placeholder="请输入数量" class="layui-input onlineJson"/> <input type="text" id="td{{this}}" win-verify="required|number" placeholder="请输入数量" class="layui-input onlineJson"/>
</div> </div>
</td> </td>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册