@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;
|
}
|
#app1{
|
margin-left: 255px;
|
}
|
|
/* 价格配置相关样式 */
|
.step-container {
|
display: none;
|
}
|
|
.step-container.active {
|
display: block;
|
}
|
|
.price-config-section {
|
background: #fff;
|
padding: 20px;
|
margin-bottom: 20px;
|
border-radius: 4px;
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
}
|
|
.section-title {
|
font-size: 16px;
|
font-weight: bold;
|
margin-bottom: 15px;
|
padding-bottom: 10px;
|
border-bottom: 2px solid #409EFF;
|
}
|
|
.field-item {
|
display: flex;
|
align-items: center;
|
margin-bottom: 10px;
|
padding: 10px;
|
background: #f9f9f9;
|
border-radius: 4px;
|
}
|
|
.field-item label {
|
min-width: 100px;
|
margin: 0 10px 0 0;
|
font-weight: normal;
|
}
|
|
.field-item .form-control {
|
flex: 1;
|
margin-right: 10px;
|
}
|
|
.btn-add {
|
cursor: pointer;
|
color: #1ab394;
|
margin-left: 10px;
|
font-size: 16px;
|
}
|
|
.btn-add:hover {
|
color: #18a689;
|
}
|
|
.btn-remove {
|
cursor: pointer;
|
color: #ed5565;
|
font-size: 16px;
|
}
|
|
.btn-remove:hover {
|
color: #da4453;
|
}
|
|
.audience-checkboxes {
|
display: flex;
|
gap: 20px;
|
}
|
|
.info-alert {
|
background-color: #e7f4ff;
|
border-left: 4px solid #409EFF;
|
padding: 10px 15px;
|
margin-bottom: 15px;
|
border-radius: 4px;
|
}
|
|
.price-table-container {
|
overflow-x: auto;
|
margin-top: 15px;
|
}
|
|
.price-table {
|
width: 100%;
|
border-collapse: collapse;
|
background: white;
|
}
|
|
.price-table th,
|
.price-table td {
|
border: 1px solid #ddd;
|
padding: 8px;
|
text-align: center;
|
}
|
|
.price-table th {
|
background-color: #f5f7fa;
|
font-weight: bold;
|
color: #333;
|
}
|
|
.price-input {
|
width: 80px;
|
padding: 5px;
|
text-align: center;
|
}
|
|
</style>
|
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.4.15&key=77b37f0753049c4e712ea79a24e0719c"></script>
|
<div class="ibox float-e-margins">
|
<input hidden id="objectType" value="${objectType}">
|
<input hidden id="objectId" value="${objectId}">
|
<div class="ibox-content">
|
<div class="form-horizontal" id="carInfoForm">
|
<input hidden id="role" value="${role}">
|
@if(objectType==1){
|
<div class="form-group" >
|
<label class="col-sm-3 control-label">*所属运营商:</label>
|
<div class="col-sm-8">
|
<select style="width: 300px" class="form-control" id="yys" name="yys" onchange="TSite.oneChangeYys(this)">
|
<option style="width: 300px" value="">选择运营商</option>
|
@for(obj in yysList){
|
<option style="width: 300px" value="${obj.id}">${obj.name}</option>
|
@}
|
</select>
|
<input type="checkbox" value="0" name="pt" onchange="TSite.oneChangeYys(this)">平台</input>
|
</div>
|
</div>
|
@}
|
<div class="form-group" >
|
<label class="col-sm-3 control-label">*所属门店:</label>
|
<div class="col-sm-9">
|
<select style="width: 300px" class="form-control" id="store" name="store" >
|
@for(obj in stores){
|
<option style="width: 300px" value="${obj.id}">${obj.name}</option>
|
@}
|
</select>
|
</div>
|
</div>
|
<div class="form-group" >
|
<label class="col-sm-3 control-label">*场地类型:</label>
|
<div class="col-sm-9">
|
<select style="width: 300px" class="form-control" id="siteTypeOne" name = "typeId" onchange="updateTime1()">
|
<option value="普通场地">普通场地</option>
|
<option value="智慧场地">智慧场地</option>
|
</select>
|
</div>
|
</div>
|
<div class="form-group" id="siteType">
|
<label class="col-sm-3 control-label">*场地分类:</label>
|
<div class="col-sm-9">
|
<select style="width: 300px" class="form-control" id="siteTypeId" name = "typeId">
|
<option value="">选择类型</option>
|
@for(obj in siteType){
|
<option value="${obj.id}">${obj.name}</option>
|
@}
|
</select>
|
</div>
|
</div>
|
|
<#input style="width: 300px" id="name" name="*场地名称" type="text"/>
|
|
<div class="form-group">
|
<label class="col-sm-3 control-label">是否可预约:</label>
|
<div class="col-sm-9">
|
<input type="radio" name="reservation" value="1" checked onclick="updateHtml(1)"> 是
|
<input type="radio" name="reservation" value="0" onclick="updateHtml(0)"> 否
|
</div>
|
</div>
|
<div class="form-group">
|
<label class="col-sm-3 control-label">*场地责任险有效期:</label>
|
<div class="col-sm-9">
|
<input style="width: 300px" class="form-control" id="insuranceEndTime" name="insuranceEndTime" type="date">
|
</div>
|
|
<#avatar id="img" name="" avatarImg=""/>
|
|
<div class="form-group">
|
<label class="col-sm-3 control-label head-scu-label">*消防及应急管理方案:</label>
|
<div class="col-sm-2" style="padding-top: 30px;">
|
<input type="file" id="upFile" name="upFile" style="display: none">
|
<input class="form-control" id="courseVideo" readonly/>
|
</div>
|
<div class="col-sm-2" style="padding-top: 30px;">
|
<button class="btn btn-outline btn-success" type="file" onclick="UploadFileFn()"><i class="fa fa-upload"></i>上传文件</button>
|
</div>
|
</div>
|
<div class="row" id="app1">
|
<div class="form-group">
|
<label class="col-sm-3 control-label head-scu-label">*实景图片(请上传不超过五张图片): </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="">
|
</el-dialog>
|
</div>
|
</div>
|
</div>
|
|
@if(objectType==1){
|
<div class="form-group" style=" margin-left: 17%;" >
|
<label class="col-sm-1 control-label">场地说明:</label>
|
<div class="col-sm-5">
|
<textarea type="text/plain" id="editor" style="height: 300px;width: 800px;"></textarea>
|
</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="TSite.addSubmit()"/>
|
<#button btnCss="primary" name="下一步,设置价格" id="btn_next_price" icon="fa-arrow-right" clickFun="TSite.nextStep()"/>
|
<#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TSite.close()"/>
|
</div>
|
</div>
|
|
</div>
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="${ctxPath}/modular/system/tSite/tSite.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">
|
<link href="http://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/css/select2.min.css" rel="stylesheet" />
|
<script src="http://cdnjs.cloudflare.com/ajax/libs/select2/4.0.13/js/select2.min.js"></script>
|
<script>
|
|
|
$(document).ready(function() {
|
$('#yys').select2({
|
width: '300px',
|
placeholder: '选择运营商',
|
allowClear: true,
|
minimumResultsForSearch: 1 // To disable the search box, set this value to Infinity
|
});
|
});
|
|
|
|
|
var vue2 = new Vue({
|
el: '#app1',
|
props: {
|
// 数量限制
|
limit: {
|
type: Number,
|
default: 2
|
},
|
},
|
data: {
|
autoUpload: true,//自动上传
|
imageUrl1: '',//模型数据,用于上传图片完成后图片预览
|
dialogVisible: false
|
},
|
methods: {
|
handleAvatarSuccess(res, file) {
|
TSite.goodsPicArray.push(file);
|
},
|
beforeAvatarUpload(file) {
|
const isLt2M = file.size / 1024 / 1024 < 10;
|
if (!isLt2M) {
|
this.$message.error('上传图片大小不能超过 10MB!');
|
}
|
return isLt2M;
|
},
|
handleRemove(file, fileList) {
|
TSite.goodsPicArray = TSite.goodsPicArray.filter(item => {
|
return item.uid != file.uid;
|
});
|
},
|
},
|
created() {
|
},
|
});
|
|
|
|
|
function updateHtml(e) {
|
console.log("是否可预约变更:", e);
|
// 暂时不需要特殊处理,价格配置在步骤2进行
|
}
|
|
|
var vue2 = new Vue({
|
el: '#app1',
|
props: {
|
// 数量限制
|
limit: {
|
type: Number,
|
default: 2
|
},
|
},
|
data: {
|
autoUpload: true,//自动上传
|
imageUrl1: '',//模型数据,用于上传图片完成后图片预览
|
dialogVisible: false
|
},
|
methods: {
|
handleAvatarSuccess(res, file) {
|
TSite.goodsPicArray.push(file);
|
},
|
beforeAvatarUpload(file) {
|
const isLt2M = file.size / 1024 / 1024 < 10;
|
if (!isLt2M) {
|
this.$message.error('上传图片大小不能超过 10MB!');
|
}
|
return isLt2M;
|
},
|
handleRemove(file, fileList) {
|
TSite.goodsPicArray = TSite.goodsPicArray.filter(item => {
|
return item.uid != file.uid;
|
});
|
},
|
},
|
created() {
|
},
|
});
|
</script>
|
@}
|