@layout("/common/_container.html"){
|
<style>
|
.avatar-uploader .el-upload {
|
border: 1px dashed #d9d9d9;
|
border-radius: 6px;
|
cursor: pointer;
|
position: relative;
|
height: 100px;
|
width: 100px;
|
overflow: hidden;
|
}
|
|
.avatar-uploader .el-upload:hover {
|
border-color: #409EFF;
|
}
|
.avatar-uploader-icon {
|
font-size: 28px;
|
color: #8c939d;
|
width: 100px;
|
height: 100px;
|
line-height: 100px;
|
margin-top: 32px;
|
text-align: center;
|
}
|
.avatar {
|
width: 100px;
|
height: 100px;
|
display: block;
|
}
|
|
.col-sm-12 {
|
margin-top: 20px;
|
}
|
|
.col-sm-12 select {
|
height: 33px;
|
}
|
|
|
|
</style>
|
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script>
|
<div class="ibox float-e-margins">
|
<div class="ibox-content">
|
|
|
<div class="form-horizontal" id="carInfoForm">
|
<input hidden id="role" value="${role}">
|
<input hidden id="operator" value="${operator}">
|
<input hidden id="objectType" value="${objectType}">
|
@if(role=='1'){
|
<div class="form-group">
|
<label class="col-sm-3 control-label">*门店类型:</label>
|
<div class="col-sm-9">
|
<input type="radio" name="type" value="1" onclick="updateType(1)"> 平台门店
|
<input type="radio" name="type" value="2" onclick="updateType(2)" id="radio1" checked > 运营商门店
|
</div>
|
</div>
|
@}
|
|
@if(role=='1'){
|
<div id="yys" hidden>
|
<div class="form-group">
|
<label class="col-sm-3 control-label">*所属运营商:</label>
|
<div class="col-sm-9">
|
<select class="form-control" id="account" name="account" onchange="TCarInfoDlg.oneChange3(this)" >
|
<option value="">选择运营商</option>
|
@for(i in yysList){
|
<option value="${i.id}" ${i.id == operator ? 'selected' : ''}>${i.name}</option>
|
@}
|
</select>
|
</div>
|
</div>
|
<div class="form-group" id="provinceCode">
|
<label class="col-sm-3 control-label">*所在省:</label>
|
<div class="col-sm-9">
|
<select class="form-control" id="pCode" name="pCode" onchange="TCarInfoDlg.oneChange9(this)">
|
</select>
|
</div>
|
</div>
|
<div class="form-group" id="cityCode">
|
<label class="col-sm-3 control-label">*所在市:</label>
|
<div class="col-sm-9">
|
<select class="form-control" id="cCode" name="cCode" >
|
<option value="">选择市</option>
|
</select>
|
</div>
|
</div>
|
</div>
|
@}
|
<div id="yys1" >
|
<div class="form-group" id="provinceCode1">
|
<label class="col-sm-3 control-label">*所在省:</label>
|
<div class="col-sm-9">
|
<select class="form-control" id="pCode1" name="pCode1" onchange="TCarInfoDlg.oneChange9(this)">
|
<option value="">选择省</option>
|
@for(i in list){
|
<option value="${i.code}">${i.name}</option>
|
@}
|
</select>
|
</div>
|
</div>
|
<div class="form-group" id="cityCode1">
|
<label class="col-sm-3 control-label">*所在市:</label>
|
<div class="col-sm-9">
|
<select class="form-control" id="cCode1" name="cCode1" >
|
<option value="">选择市</option>
|
</select>
|
</div>
|
</div>
|
</div>
|
<#input id="name" name="*门店名称" placeholder= "请输入门店名称" type="text"/>
|
<#input id="phone" name="*联系电话" placeholder= "请输入联系电话" type="text"/>
|
<div class="form-group">
|
<label class="col-sm-3 control-label">*门店地址:</label>
|
<div class="col-sm-9">
|
<input class="form-control" placeholder= "请输入门店地址" id="address" name="address" type="text" onchange="TCarInfoDlg.searchByStationName(this,1)">
|
</div>
|
</div>
|
<div class="col-sm-10" style="margin-left: 397px;width: 70%;" >
|
<!-- 创建地图容器-->
|
<div id="container" style="height: 500px;" ></div>
|
</div>
|
<div hidden id="longitude" value="104.0559716796875"></div>
|
<div hidden id="latitude" value="30.585671929253472"></div>
|
|
<#input id="time" name="*营业时间" placeholder= "请选择营业时间" type="text"/>
|
<div class="form-group">
|
<label class="col-sm-3 control-label">*门店介绍:</label>
|
<div class="col-sm-9">
|
<textarea placeholder= "请输入门店介绍" id="introduce" style="width: 617px; height: 180px;"></textarea>
|
</div>
|
</div>
|
<#input id="userName" name="*店长姓名" placeholder= "请输入店长姓名" type="text"/>
|
<#input id="userPhone" name="*店长手机号" placeholder= "请输入店长手机号" type="text"/>
|
<#avatar id="img" name="*门店封面(推荐像素722*360px)" />
|
<div class="row" id="app1">
|
<div class="col-sm-6" style="width: 100%;margin-left: 103px;">
|
<div class="form-group">
|
<label class="col-sm-3 control-label" style="width: 15%;margin-left: 5%">*实景图片(推荐像素780*440px,请上传不超过五张图片): </label>
|
<div class="col-sm-2" style="width: 100%;margin-left: 11%;margin-top: 1%">
|
<el-upload
|
:limit="5"
|
class="avatar-uploader"
|
action="/tCouponManage/uploadPic"
|
list-type="picture-card"
|
accept="."
|
:on-success="handleAvatarSuccess"
|
:on-remove="handleRemove">
|
<i class="el-icon-plus"></i>
|
</el-upload>
|
<el-dialog :visible.sync="dialogVisible">
|
<img width="100%" :src="imageUrl1" alt="">
|
</div>
|
</div>
|
|
</div>
|
</div>
|
<!--<#input id="ids" name="添加入园闸机" placeholder= "请输入入园闸机id,多个用逗号分隔" type="text"/>-->
|
|
</div>
|
</div>
|
|
<div class="row btn-group-m-t">
|
<div class="col-sm-10 col-sm-offset-5">
|
<#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCarInfoDlg.addSubmit()"/>
|
<#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCarInfoDlg.close()"/>
|
</div>
|
</div>
|
|
</div>
|
|
|
<script src="${ctxPath}/modular/system/tShop/tShop_info.js"></script>
|
<script src="${ctxPath}/js/vue/vue.js"></script>
|
<script src="${ctxPath}/js/elementui/index.js"></script>
|
<link rel="stylesheet" href="${ctxPath}/js/elementui/index.css">
|
<script>
|
|
document.addEventListener("DOMContentLoaded", function() {
|
var selectElement = document.getElementById("account");
|
selectElement.dispatchEvent(new Event("change"));
|
|
|
var radioElement = document.getElementById("radio1");
|
radioElement.click();
|
|
|
|
});
|
|
|
|
|
layui.use('laydate', function(){
|
var laydate = layui.laydate;
|
//时间范围
|
laydate.render({
|
elem: '#time'
|
, type: 'time'
|
, range: true
|
, format: 'HH:mm'
|
, theme: '#368ee0'
|
, ready: function (date) {
|
var dom = $(".laydate-time-list").children("li");
|
for (var i = 0; i < dom.length; i++) {
|
if (i == 2 || i == 5) {
|
$(dom[i]).remove();
|
} else if(i==1||i==4) {
|
var li = $(dom[i]).children("ol").children("li")
|
//console.log(li.length);
|
for (var j = 0; j < li.length; j++) {
|
//console.log($(li[j]).text())
|
if ($(li[j]).text() != 00 && $(li[j]).text()!=30) {
|
$(li[j]).remove();
|
}
|
}
|
}
|
}
|
}
|
});
|
})
|
|
|
|
|
|
var vue2 = new Vue({
|
el: '#app1',
|
props: {
|
// 数量限制
|
limit: {
|
type: Number,
|
default: 2
|
},
|
},
|
data: {
|
autoUpload: true,//自动上传
|
imageUrl1: '',//模型数据,用于上传图片完成后图片预览
|
dialogVisible: false
|
},
|
methods: {
|
handleAvatarSuccess(res, file) {
|
TCarInfoDlg.goodsPicArray.push(file);
|
},
|
beforeAvatarUpload(file) {
|
const isLt2M = file.size / 1024 / 1024 < 10;
|
if (!isLt2M) {
|
this.$message.error('上传图片大小不能超过 10MB!');
|
}
|
return isLt2M;
|
},
|
handleRemove(file, fileList) {
|
TCarInfoDlg.goodsPicArray = TCarInfoDlg.goodsPicArray.filter(item => {
|
return item.uid != file.uid;
|
});
|
},
|
},
|
created() {
|
},
|
});
|
|
|
function updateType(o) {
|
if(o==1){
|
$("#yys").hide()
|
$("#yys1").show()
|
}else {
|
$("#yys").show()
|
$("#yys1").hide()
|
|
}
|
|
}
|
</script>
|
@}
|