editsto.html
14.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
<include file="public/layout"/>
<script src="__PUBLIC__/static/js/layer/laydate/laydate.js"></script>
<body style="background-color: #FFF; overflow: auto;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
<div class="fixed-bar">
<div class="item-title">
<div class="fixed-bar">
<div class="item-title">
<a class="back" href="javascript:window.history.back()" title="返回列表">
<i class="fa fa-arrow-circle-o-left"></i>
</a>
<div class="subject">
<h3>修改门店</h3>
</div>
</div>
</div>
</div>
</div>
<div class="explanation" id="explanation">
<div class="title" id="checkZoom"><i class="fa fa-lightbulb-o"></i>
<h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
<span id="explanationZoom" title="收起提示"></span></div>
<ul>
<li>门店公告,半径服务,城市区域修改后,请到京东后台查看效果</li>
<li>当输入半径服务后,配送服务范围的类型会设置成圆心半径</li>
</ul>
</div>
<input type="hidden" name="oldurl" value="{$oldurl}" class="input-txt">
<!--表单数据-->
<form method="post" id="goods_data">
<input type="hidden" name="stationNo" value="{$info.stationNo}" class="input-txt">
<input type="hidden" name="operator" value="{$info.operator}" class="input-txt">
<!--通用信息-->
<div class="ncap-form-default tab_div_1">
<dl class="row">
<dt class="tit" style=" font-size: 14px; line-height: 30px;font-weight: bold;">
<label>基础资料维护</label>
</dt>
</dl>
<!--<dl class="row">-->
<!--<dt class="tit">-->
<!--<label for="pic">门店头像</label>-->
<!--</dt>-->
<!--<dd class="opt">-->
<!--<div class="ncsc-goods-default-pic">-->
<!--<div class="goodspic-uplaod">-->
<!--<div style="">-->
<!--<img id="original_img2" src="{:getImg($config.store_logo,'__PUBLIC__/images/default_goods_image_240.gif')}" style="width:80px;border:#eee solid 1px; border-radius: 50%" onMouseOver="layer.tips('<img src={:getImg($config.store_logo,'__PUBLIC__/images/default_goods_image_240.gif')}>',this, {tips: [1, '#fff']});" onMouseOut="layer.closeAll();">-->
<!--</div>-->
<!--<input type="hidden" id="store_logo" name="store_logo"-->
<!--onkeydown="strkeydown(event, this, 'submitbtn')"-->
<!--value="{$config.store_logo}" class="type-file-text">-->
<!--<p class="hint">无门店头像默认展示商家头像,<Font color="red">大小建议为:80*80像素。</Font> </p>-->
<!--<div class="handle">-->
<!--<div class="ncsc-upload-btn">-->
<!--<a onClick="GetUploadify_new(1,'store_logo','logo','{$erpid}','store','store_id','store_logo','{$config.store_id}','call_back')" >-->
<!--<p><i class="icon-upload-alt"></i>图片上传</p>-->
<!--</a>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</dd>-->
<!--</dl>-->
<dl class="row">
<dt class="tit">
<label for="stationName"><span class="red">*</span>门店名称</label>
</dt>
<dd class="opt">
<input type="text" value="{$info.stationName}" name="stationName" class="input-txt" id="stationName">
商家门店编号: <input type="text" value="{$info.outSystemId}" name="outSystemId" class="input-txt" id="outSystemId">
</dd>
</dl>
<dl class="row">
<dt class="tit">
<label for="newAndCellphone"><span class="red">*</span>门店电话</label>
</dt>
<dd class="opt">
<input type="text" value="{$info.phone}" name="phone" class="input-txt" id="phone">
</dd>
</dl>
<dl class="row">
<dt class="tit">
<label for="newAndCellphone">门店手机</label>
</dt>
<dd class="opt">
<input type="text" value="{$info.mobile}" name="mobile" class="input-txt" id="mobile">
</dd>
</dl>
<dl class="row">
<dt class="tit">
<label for="newAndCellphone"><span class="red">*</span>备联电话</label>
</dt>
<dd class="opt">
<input type="text" value="{$info.standByPhone}" name="standByPhone" class="input-txt" id="standByPhone">
</dd>
</dl>
<dl class="row">
<dt class="tit">
<label for="cat_id"><span class="red">*</span>营业时间</label>
</dt>
<dd class="opt" style="line-height: 40px;">
<select class="servicetime validate" data-validate="required" name="serviceTimeStart1" id="serviceTimeStart1" datepickernum="1">
<option value="-1">请选择</option>
<for start="0" end="49">
<option value="{$i}" <if condition="$i eq $info.serviceTimeStart1">selected</if>>
<?php
if($i==48) echo "23:59";
else{
$fir=""; $end="";
if($i%2>0){ $fir=($i-1)/2; $end=":30";
}else{ $fir=$i/2; $end=":00"; }
if(strlen($fir)==1) $fir="0".$fir;
echo $fir.$end;
}?>
</option>
</for>
</select>
至
<select class="servicetime validate" data-validate="required" name="serviceTimeEnd1" id="serviceTimeEnd1" datepickernum="2">
<option value="-1">请选择</option>
<for start="0" end="49">
<option <if condition="$i eq $info.serviceTimeEnd1">selected</if> value="{$i}">
<?php
if($i==48) echo "23:59";
else{
$fir=""; $end="";
if($i%2>0){ $fir=($i-1)/2; $end=":30";
}else{ $fir=$i/2; $end=":00"; }
if(strlen($fir)==1) $fir="0".$fir;
echo $fir.$end;
}?>
</option>
</for>
</select>
</dd>
</dl>
<dl class="row">
<dt class="tit">
<label for="storeNotice">门店公告</label>
</dt>
<dd class="opt">
<textarea type="text" name="storeNotice" id="storeNotice" style="width:474px; height:75px; border: solid 1px #ddd;">{$info.gonggao}</textarea>
<span class="err cr"></span>
</dd>
</dl>
<!--<dl class="row">-->
<!--<dt class="tit">-->
<!--<label for="weight"><span class="red">*</span>配送单下发方式</label>-->
<!--</dt>-->
<!--<dd class="opt">-->
<!--<input type="text" value="{$goodsInfo.weight}" name="weight" style="width:150px;" id="weight" > 公斤-->
<!--<span class="err cr"></span>-->
<!--</dd>-->
<!--</dl>-->
<!--<dl class="row">-->
<!--<dt class="tit">-->
<!--<label for="scanPick1"><span class="red">*</span>扫码拣货</label>-->
<!--</dt>-->
<!--<dd class="opt">-->
<!--<input type="radio" id="scanPick1" name="scanPick" placeholder="" checked>-->
<!--<label for="scanPick1">开启</label>-->
<!--<input type="radio" id="scanPick2" name="scanPick" placeholder="">-->
<!--<label for="scanPick2">关闭</label>-->
<!--</dd>-->
<!--</dl>-->
<dl class="row">
<dt class="tit" style=" font-size: 14px; line-height: 30px;font-weight: bold;">
<label>地址及配送范围</label>
</dt>
</dl>
<dl class="row">
<dt class="tit">
<label for="sellCities"><span class="red">*</span>所在城市 </label>
</dt>
<dd class="opt">
<input type="hidden" value="{$info.townname}" name="townname" style="width:150px;" id="townname" >
<input type="text" value="{$info.cityName}" name="cityName" style="width:150px;" id="citySelect" readonly disabled="disabled" >
区县: <select name="county" id="county" class="small form-control" onchange="set_town(this)">
<option value="0">请选择</option>
<volist name="quyu" id="item">
<option value="{$item.areaCode}"
<if condition="$item.areaCode eq $info.county">selected</if>>
{$item.areaName}
</option>
</volist>
</select>
</dd>
</dl>
<!--<dl class="row">-->
<!--<dt class="tit">-->
<!--<label for="coordinateAddress"><span class="red">*</span>门店坐标地址</label>-->
<!--</dt>-->
<!--<dd class="opt">-->
<!--<input type="text" value="{$goodsInfo.coordinateAddress}" name="coordinateAddress" style="width:150px;" id="coordinateAddress" >-->
<!--</dd>-->
<!--</dl>-->
<dl class="row">
<dt class="tit">
<label for="stationAddress"><span class="red">*</span>门店详细地址</label>
</dt>
<dd class="opt">
<input type="text" value="{$info.stationAddress}" name="stationAddress" style="width:300px;" id="stationAddress" >
</dd>
</dl>
<dl class="row">
<dt class="tit">
<label for="deliveryRangeRadius"><span class="red"></span>配送范围</label>
</dt>
<dd class="opt">
半径服务: <input type="text" value="{$info.radius}" name="deliveryRangeRadius" style="width:150px;" id="deliveryRangeRadius" >米
<p class="notic">门店配送范围过大,会收取商家远距离配送费用<br>2km范围内订单:免费<br>
2km-3km内订单:商家付2元/单<br>
3km-4km内订单:商家付4元/单<br>
4km以上暂不支持配送</p>
</dd>
</dl>
<div class="ncap-form-default">
<div class="bot">
<a href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" id="sumbbtn" onClick="ajax_submit_form()">确认提交</a>
</div>
</div>
</div>
</form>
</div>
</body>
<script>
var oldurl = "{$Think.request.oldurl}";//返回的地址
/*------------商品提交---------*/
function ajax_submit_form() {
if ($('#stationName').val() == '') {
layer.msg('门店名称不能为空', {icon: 2, time: 1000});
$('#stationName').focus();
return false;
}
if ($('#outSystemId').val() == "") {
layer.msg('商家门店编号不能为空', {icon: 2, time: 1000});
$('#outSystemId').focus();
return false;
}
if ($('#phone').val() == "") {
layer.msg('请输入门店电话', {icon: 2, time: 1000});
$('#phone').focus();
return false;
}
if ($('#standByPhone').val() == "") {
layer.msg('请输入备联电话', {icon: 2, time: 1000});
$('#phone').focus();
return false;
}
if ($('#serviceTimeEnd1').val() == "-1") {
layer.msg('请输入营业开始时间', {icon: 2, time: 1000});
return false;
}
if ($('#sto_cate_list').val() == "") {
layer.msg('请输入营业结束时间', {icon: 2, time: 1000});
return false;
}
if ($('#stationAddress').val() == "") {
layer.msg('请输入门店详细地址', {icon: 2, time: 1000});
return false;
}
$("#citySelect").removeAttr("disabled");
var ai = layer.msg('提交中...', {icon: 16, shade: [0.5, '#f5f5f5'], scrollbar: false, offset: '200px', time: 0});
$.ajax({
type: "POST",
url: "{:U('Jddj/sto_handle')}",
data: $('#goods_data').serialize(),// 你的formid
error: function () {
layer.close(ai);
alert("服务器繁忙, 请联系管理员!");
},
success: function (data) {
layer.close(ai);
if (data.code == 0) {
layer.msg("修改成功", {icon: 1, time: 1000});
setTimeout(function () {
location.href = oldurl;
}, 1000);
}else{
layer.msg(data.msg, {icon: 1, time: 1000});
}
}
});
}
function set_town(ob) {
var txt=$("#county option:selected").text();
$("#townname").val(txt);
}
</script>
</html>