This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop/source/application/store/view/shop/add.php
2020-04-25 22:20:29 +08:00

196 lines
10 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="row-content am-cf">
<div class="row">
<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
<div class="widget am-cf">
<form id="my-form" class="am-form tpl-form-line-form" method="post">
<div class="widget-body">
<fieldset>
<div class="widget-head am-cf">
<div class="widget-title am-fl">添加门店</div>
</div>
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 门店名称 </label>
<div class="am-u-sm-9 am-u-end">
<input type="text" class="tpl-form-input" name="shop[shop_name]"
placeholder="请输入门店名称" required>
</div>
</div>
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 门店logo </label>
<div class="am-u-sm-9 am-u-end">
<div class="am-form-file">
<div class="am-form-file">
<button type="button"
class="upload-file am-btn am-btn-secondary am-radius">
<i class="am-icon-cloud-upload"></i> 选择图片
</button>
<div class="uploader-list am-cf">
</div>
</div>
</div>
</div>
</div>
<div class="am-form-group am-padding-top">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 联系人 </label>
<div class="am-u-sm-9 am-u-end">
<input type="text" class="tpl-form-input" name="shop[linkman]"
placeholder="请输入门店联系人" required>
</div>
</div>
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 联系电话 </label>
<div class="am-u-sm-9 am-u-end">
<input type="text" class="tpl-form-input" name="shop[phone]"
placeholder="请输入门店联系电话" required>
</div>
</div>
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 营业时间 </label>
<div class="am-u-sm-9 am-u-end">
<input type="text" class="tpl-form-input" name="shop[shop_hours]"
placeholder="请输入门店营业时间" required>
<small>例如8:30-17:30</small>
</div>
</div>
<div class="am-form-group am-padding-top">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 门店区域 </label>
<div class="am-u-sm-9 am-u-end">
<div class="x-region-select" data-region-selected>
<select name="shop[province_id]" data-province required>
<option value="">请选择省份</option>
</select>
<select name="shop[city_id]" data-city required>
<option value="">请选择城市</option>
</select>
<select name="shop[region_id]" data-region required>
<option value="">请选择地区</option>
</select>
</div>
</div>
</div>
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 详细地址 </label>
<div class="am-u-sm-9 am-u-end">
<input type="text" class="tpl-form-input" name="shop[address]"
placeholder="请输入详细地址" required>
</div>
</div>
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 门店坐标 </label>
<div class="am-u-sm-9 am-u-end">
<div class="am-block">
<input type="text" style="background: none !important;" id="coordinate"
class="tpl-form-input" name="shop[coordinate]"
placeholder="请选择门店坐标" readonly="" required>
</div>
<div class="am-block am-padding-top-xs">
<iframe id="map" src="<?= url('shop/getpoint') ?>"
width="915"
height="610"></iframe>
</div>
</div>
</div>
<div class="am-form-group am-padding-top">
<label class="am-u-sm-3 am-u-lg-2 am-form-label"> 门店简介 </label>
<div class="am-u-sm-9 am-u-end">
<textarea class="am-field-valid" rows="5" placeholder="请输入门店简介"
name="shop[summary]"></textarea>
</div>
</div>
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">门店排序 </label>
<div class="am-u-sm-9 am-u-end">
<input type="number" class="tpl-form-input" name="shop[sort]"
value="100" required>
<small>数字越小越靠前</small>
</div>
</div>
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 自提核销 </label>
<div class="am-u-sm-9 am-u-end">
<label class="am-radio-inline">
<input type="radio" name="shop[is_check]" value="1" data-am-ucheck
checked>
支持
</label>
<label class="am-radio-inline">
<input type="radio" name="shop[is_check]" value="0" data-am-ucheck>
不支持
</label>
</div>
</div>
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 门店状态 </label>
<div class="am-u-sm-9 am-u-end">
<label class="am-radio-inline">
<input type="radio" name="shop[status]" value="1" data-am-ucheck
checked>
启用
</label>
<label class="am-radio-inline">
<input type="radio" name="shop[status]" value="0" data-am-ucheck>
禁用
</label>
</div>
</div>
<div class="am-form-group">
<div class="am-u-sm-9 am-u-sm-push-3 am-margin-top-lg">
<button type="submit" class="j-submit am-btn am-btn-secondary">提交
</button>
</div>
</div>
</fieldset>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- 图片文件列表模板 -->
<script id="tpl-file-item" type="text/template">
{{ each list }}
<div class="file-item">
<a href="{{ $value.file_path }}" title="点击查看大图" target="_blank">
<img src="{{ $value.file_path }}">
</a>
<input type="hidden" name="{{ name }}" value="{{ $value.file_id }}">
<i class="iconfont icon-shanchu file-item-delete"></i>
</div>
{{ /each }}
</script>
<!-- 文件库弹窗 -->
{{include file="layouts/_template/file_library" /}}
<script src="assets/store/js/select.region.js?v=1.2"></script>
<script>
/**
* 设置坐标
*/
function setCoordinate(value) {
var $coordinate = $('#coordinate');
$coordinate.val(value);
// 触发验证
$coordinate.trigger('change');
}
</script>
<script>
$(function () {
// 选择图片
$('.upload-file').selectImages({
name: 'shop[logo_image_id]'
});
/**
* 表单验证提交
* @type {*}
*/
$('#my-form').superForm();
});
</script>