|
|
@@ -32,7 +32,10 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div>
|
|
|
- <el-button type="primary" class="export" @click="add_perimeter">新增周边</el-button>
|
|
|
+ <el-button class="export" size="small" @click="add_perimeter">
|
|
|
+ <i class="el-icon el-icon-circle-plus-outline" style="font-size: 20px;"></i>
|
|
|
+ <span style="font-size: 16px;">新增周边</span>
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<el-table ref="multipleTable" :data="tableData" height="558" style="width: 100%" :cell-style="cell_style" v-loading="loading"
|
|
|
@@ -129,20 +132,56 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-col :span="8" style="text-align: center;">
|
|
|
- <el-form-item label="封面图:" prop="fileUrl">
|
|
|
- <pl-upload v-model="formAddHostel.fileUrl" :times="times" :linkUrl="formAddHostel.url" :limitCount="1" :type="1"></pl-upload>
|
|
|
- </el-form-item>
|
|
|
+ <el-col :span="6" style="display: flex; justify-content: center;">
|
|
|
+ <div style="display: flex; flex-direction: column; align-items: center;">
|
|
|
+ <div style="font-size: 18px; margin-bottom: 10px;">封面图:</div>
|
|
|
+ <div
|
|
|
+ style="display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; border-radius: 5px;">
|
|
|
+ <div
|
|
|
+ style="position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; background: rgba(131, 131, 131, 1.0); border-radius: 50%; font-size: 22px; color: #e3e3e3; cursor: pointer; display: flex; justify-content: center; align-items: center;">
|
|
|
+ ×</div>
|
|
|
+ <viewer>
|
|
|
+ <img src="https://via.placeholder.com/150x180" alt="" style="border-radius: 5px;">
|
|
|
+ </viewer>
|
|
|
+ <el-button
|
|
|
+ style="margin-top: 8px; width: 150px; border: none; background: rgba(9, 101, 98, 1); color: #fff; border-radius: 5px;"
|
|
|
+ size="small">上传图片</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" style="text-align: center;">
|
|
|
- <el-form-item label="介绍视频:" prop="fileUrl">
|
|
|
- <pl-upload v-model="formAddHostel.fileUrl" :times="times" :linkUrl="formAddHostel.url" :limitCount="1" :type="1"></pl-upload>
|
|
|
- </el-form-item>
|
|
|
+ <el-col :span="6" style="display: flex; justify-content: center;">
|
|
|
+ <div style="display: flex; flex-direction: column; align-items: center;">
|
|
|
+ <div style="font-size: 18px; margin-bottom: 10px;">介绍视频:</div>
|
|
|
+ <div
|
|
|
+ style="display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; border-radius: 5px;">
|
|
|
+ <div
|
|
|
+ style="position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; background: rgba(131, 131, 131, 1.0); border-radius: 50%; font-size: 22px; color: #e3e3e3; cursor: pointer; display: flex; justify-content: center; align-items: center;">
|
|
|
+ ×</div>
|
|
|
+ <img src="https://via.placeholder.com/150x180" alt="" style="border-radius: 5px;">
|
|
|
+ <el-button
|
|
|
+ style="margin-top: 8px; width: 150px; border: none; background: rgba(9, 101, 98, 1); color: #fff; border-radius: 5px;"
|
|
|
+ size="small">上传视频</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" style="text-align: center;">
|
|
|
- <el-form-item label="详情图:" prop="fileUrl">
|
|
|
- <pl-upload v-model="formAddHostel.fileUrl" :times="times" :linkUrl="formAddHostel.url" :limitCount="6" :type="1"></pl-upload>
|
|
|
- </el-form-item>
|
|
|
+ <el-col :span="12" style="display: flex; justify-content: center;">
|
|
|
+ <div style="display: flex; flex-direction: column; align-items: center;">
|
|
|
+ <div style="font-size: 18px; margin-bottom: 10px;">详情图:</div>
|
|
|
+ <div style="display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 5px;">
|
|
|
+ <viewer :images="fileInfoListImages" style="width: 390px;">
|
|
|
+ <el-carousel height="178px" width="100%" style="border-radius: 5px;">
|
|
|
+ <el-carousel-item v-for="item in fileInfoList" :key="item.id">
|
|
|
+ <!-- <img :src="item" style="border-radius: 5px; cursor: pointer; width: 100%; height: 178px;"> -->
|
|
|
+ <img src="https://via.placeholder.com/150x180"
|
|
|
+ style="border-radius: 5px; cursor: pointer; width: 100%; height: 178px;">
|
|
|
+ </el-carousel-item>
|
|
|
+ </el-carousel>
|
|
|
+ </viewer>
|
|
|
+ <el-button
|
|
|
+ style="margin-top: 8px; width: 150px; border: none; background: rgba(9, 101, 98, 1); color: #fff; border-radius: 5px;"
|
|
|
+ size="small">上传图片</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
@@ -151,186 +190,289 @@
|
|
|
<el-button class="add-info-confirm-btn" @click="">确 认</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <!-- 新增代金券对话框 -->
|
|
|
- <el-dialog title="新增代金券" custom-class="add-voucher-class" :visible.sync="dialogAddVoucherFormVisible" :close-on-click-modal="false"
|
|
|
- :close-on-press-escape="false" @close="dialogAddVoucherFormVisible = false">
|
|
|
- <el-form :model="formAddVoucher" ref="addHostelForm" :rules="addVoucherFormRules">
|
|
|
- <div style="height: 700px; padding: 0; margin: 0; overflow:auto;">
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <div style="font-size: 18px;font-weight: 700; color: rgba(0, 0, 0, 1); margin: -10px 0 20px 20px;">代金券<span
|
|
|
- style="color: red; font-size: 14px;">(同一代金券,每笔订单最多仅可使用一张)</span></div>
|
|
|
- <el-form-item label="优惠券名称:" :label-width="formLabelWidth">
|
|
|
- <el-input v-model="formAddVoucher.name" autocomplete="off" placeholder="请输入优惠券名称" maxlength="20">
|
|
|
+ <!-- 添加产品 -->
|
|
|
+ <el-dialog title="添加产品" custom-class="add-product-class" :visible.sync="dialogAddProductVisible" :close-on-click-modal="false"
|
|
|
+ :close-on-press-escape="false" @close="dialogAddProductVisible = false">
|
|
|
+ <el-form :model="formAddHostel" ref="addHostelForm" :rules="addHostelFormRules">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="产品名称" :label-width="formLabelWidth" :required="true" prop="jibieId">
|
|
|
+ <el-input v-model="formAddHostel.adminName" autocomplete="off" placeholder="请输入产品名称" maxlength="16">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="产品介绍" :label-width="formLabelWidth" :required="true" prop="adminName">
|
|
|
+ <el-input type="textarea" v-model="formAddHostel.desc" rows="5" placeholder="请输入产品介绍" maxlength="300" show-word-limit></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="产品价格" :label-width="formLabelWidth" :required="true" prop="id">
|
|
|
+ <div style="display: flex; align-items: center;">
|
|
|
+ <el-input v-model="formAddHostel.adminName" style="width: 180px; margin-right: 8px;" autocomplete="off" placeholder="请输入产品价格"
|
|
|
+ maxlength="16">
|
|
|
</el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="减免金额:" :label-width="formLabelWidth">
|
|
|
- <div style="display: flex; justify-content: flex-start; align-items: center;">
|
|
|
- <el-input v-model="formAddVoucher.deductionPrice" autocomplete="off" placeholder="请输入金额" maxlength="8">
|
|
|
- </el-input>
|
|
|
- <div style="margin-left: 10px;">元</div>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="发放数量:" :label-width="formLabelWidth">
|
|
|
- <div style="display: flex; justify-content: flex-start; align-items: center;">
|
|
|
- <el-input v-model="formAddVoucher.grantNumber" autocomplete="off" placeholder="请输入数量" maxlength="8">
|
|
|
- </el-input>
|
|
|
- <div style="margin-left: 10px;">张</div>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="每人限领:" :label-width="formLabelWidth">
|
|
|
- <div style="display: flex; justify-content: flex-start; align-items: center;">
|
|
|
- <el-input v-model="formAddVoucher.limitNumber" autocomplete="off" placeholder="请输入数量" maxlength="8">
|
|
|
- </el-input>
|
|
|
- <div style="margin-left: 10px;">张</div>
|
|
|
- <div style="color: #ccc;">(每个用户可领卷上限)</div>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="发放时间:" :label-width="formLabelWidth">
|
|
|
- <el-date-picker v-model="formAddVoucher.grantTimes" style="width: 390px;" type="datetimerange" range-separator="~"
|
|
|
- start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <div style="font-size: 18px;font-weight: 700; color: rgba(0, 0, 0, 1); margin: -10px 0 20px 20px;">限制条件</div>
|
|
|
- <el-form-item label="使用条件:" :label-width="formLabelWidth">
|
|
|
- <div style="display: flex; justify-content: flex-start; align-items: center;">
|
|
|
- <div style="margin-right: 10px;">订单满</div>
|
|
|
- <el-input v-model="formAddVoucher.meetPrice" autocomplete="off" placeholder="请输入金额" maxlength="6">
|
|
|
- </el-input>
|
|
|
- <div style="margin-left: 10px;">元,可使用</div>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="有效期:" :label-width="formLabelWidth">
|
|
|
- <div style="display: flex; align-items: center; margin-bottom: 15px;">
|
|
|
- <el-radio v-model="formAddVoucher.radio" label="1">时间段</el-radio>
|
|
|
- <el-date-picker v-model="formAddVoucher.effectiveDateTime" :disabled="formAddVoucher.radio != 1" style="width: 390px;"
|
|
|
- type="datetimerange" range-separator="~" start-placeholder="有效开始日期" end-placeholder="有效结束日期"
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss">
|
|
|
- </el-date-picker>
|
|
|
- </div>
|
|
|
- <div style="display: flex; align-items: center;">
|
|
|
- <el-radio v-model="formAddVoucher.radio" label="2">领取后</el-radio>
|
|
|
- <el-input v-model="formAddVoucher.effectiveDay" :disabled="formAddVoucher.radio != 2" autocomplete="off" placeholder="请输入天数"
|
|
|
- class="custom-input" maxlength="3">
|
|
|
- </el-input>
|
|
|
- <div style="margin: 0 10px;">天开始</div>
|
|
|
- <el-input v-model="formAddVoucher.effectiveLoseDay" :disabled="formAddVoucher.radio != 2" autocomplete="off"
|
|
|
- placeholder="请输入天数" class="custom-input" maxlength="3">
|
|
|
- </el-input>
|
|
|
- <div style="margin-left: 10px;">天内有效</div>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="适用民宿:" :label-width="formLabelWidth">
|
|
|
- <el-checkbox :indeterminate="isAddVoucherIndeterminate" v-model="voucherCheckAll"
|
|
|
- @change="handleVoucherCheckAllChange">全选</el-checkbox>
|
|
|
- <div style="margin: 0;"></div>
|
|
|
- <el-checkbox-group v-model="voucherCheckedTowns" @change="handleVoucherCheckedTownsChange">
|
|
|
- <el-checkbox v-for="town in towns" :label="town" :key="town">{{town}}</el-checkbox>
|
|
|
- </el-checkbox-group>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
+ <div>元</div>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button class="add-info-cancel-btn" @click="dialogAddVoucherFormVisible = false">取 消</el-button>
|
|
|
- <el-button class="add-info-confirm-btn" @click="add_voucher_dialog_handler">确 认</el-button>
|
|
|
+ <el-button class="add-info-cancel-btn" @click="dialogAddProductVisible = false">取 消</el-button>
|
|
|
+ <el-button class="add-info-confirm-btn" @click="">确 认</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
- <!-- 修改代金券对话框 -->
|
|
|
- <!-- <el-dialog title="修改优惠券" custom-class="add-voucher-class" :visible.sync="dialogModifyVoucherFormVisible" :close-on-click-modal="false"
|
|
|
- :close-on-press-escape="false" @close="dialogModifyVoucherFormVisible = false">
|
|
|
- <el-form :model="formModifyVoucher" ref="addHostelForm">
|
|
|
- <div style="height: 700px; padding: 0; margin: 0; overflow:auto;">
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <div style="font-size: 18px;font-weight: 700; color: rgba(0, 0, 0, 1); margin: -10px 0 20px 20px;">代金券<span
|
|
|
- style="color: red; font-size: 14px;">(同一代金券,每笔订单最多仅可使用一张)</span></div>
|
|
|
- <el-form-item label="优惠券名称:" :label-width="formLabelWidth">
|
|
|
- <el-input v-model="formModifyVoucher.name" autocomplete="off" placeholder="请输入优惠券名称" maxlength="20">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="减免金额:" :label-width="formLabelWidth">
|
|
|
- <div style="display: flex; justify-content: flex-start; align-items: center;">
|
|
|
- <el-input v-model="formModifyVoucher.deductionPrice" autocomplete="off" placeholder="请输入金额" maxlength="8">
|
|
|
- </el-input>
|
|
|
- <div style="margin-left: 10px;">元</div>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="发放数量:" :label-width="formLabelWidth">
|
|
|
- <div style="display: flex; justify-content: flex-start; align-items: center;">
|
|
|
- <el-input v-model="formModifyVoucher.grantNumber" autocomplete="off" placeholder="请输入数量" maxlength="8">
|
|
|
- </el-input>
|
|
|
- <div style="margin-left: 10px;">张</div>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="每人限领:" :label-width="formLabelWidth">
|
|
|
- <div style="display: flex; justify-content: flex-start; align-items: center;">
|
|
|
- <el-input v-model="formModifyVoucher.limitNumber" autocomplete="off" placeholder="请输入数量" maxlength="8">
|
|
|
- </el-input>
|
|
|
- <div style="margin-left: 10px;">张</div>
|
|
|
- <div style="color: #ccc;">(每个用户可领卷上限)</div>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="发放时间:" :label-width="formLabelWidth">
|
|
|
- <el-date-picker v-model="formModifyVoucher.grantTimes" style="width: 390px;" type="datetimerange" range-separator="~"
|
|
|
- start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <div style="font-size: 18px;font-weight: 700; color: rgba(0, 0, 0, 1); margin: -10px 0 20px 20px;">限制条件</div>
|
|
|
- <el-form-item label="使用条件:" :label-width="formLabelWidth">
|
|
|
- <div style="display: flex; justify-content: flex-start; align-items: center;">
|
|
|
- <div style="margin-right: 10px;">订单满</div>
|
|
|
- <el-input v-model="formModifyVoucher.meetPrice" autocomplete="off" placeholder="请输入金额" maxlength="6">
|
|
|
- </el-input>
|
|
|
- <div style="margin-left: 10px;">元,可使用</div>
|
|
|
+ <!-- 编辑周边 -->
|
|
|
+ <el-dialog title="编辑周边" custom-class="add-dlg-class" :visible.sync="dialogModifyVisible" :close-on-click-modal="false" :close-on-press-escape="false"
|
|
|
+ @close="dialogModifyVisible = false">
|
|
|
+ <el-form :model="formAddHostel" ref="addHostelForm" :rules="addHostelFormRules">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="周边类型" :label-width="formLabelWidth" :required="true" prop="jibieId">
|
|
|
+ <el-select v-model="formAddHostel.jibieId" clearable placeholder="请选择类型" style="width: 100%;">
|
|
|
+ <el-option v-for="item in formAddHostel.jibie" :key="item.id" :label="item.jibieName" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="名称" :label-width="formLabelWidth" :required="true" prop="adminName">
|
|
|
+ <el-input v-model="formAddHostel.adminName" autocomplete="off" placeholder="请输入名称" maxlength="16">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="所在乡镇" :label-width="formLabelWidth" :required="true" prop="id">
|
|
|
+ <el-select v-model="formAddHostel.hotelTownship" clearable placeholder="请选择乡镇" style="width: 100%;" @change="getHotelId($event)">
|
|
|
+ <el-option v-for="item in formAddHostel.options" :key="item.id" :label="item.hotelTownship" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="联系电话" :label-width="formLabelWidth" :required="true" prop="linkproUrl">
|
|
|
+ <el-input v-model="formAddHostel.linkproUrl" autocomplete="off" placeholder="请输入联系电话"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" style="margin-top: -20px;">
|
|
|
+ <el-form-item label="详细地址" :required="true" :label-width="formLabelWidth" prop="addr">
|
|
|
+ <el-input v-model="formAddHostel.name" placeholder="请输入地址"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="简介" :required="true" :label-width="formLabelWidth" prop="jianjie">
|
|
|
+ <el-input type="textarea" v-model="formAddHostel.desc" rows="5" placeholder="请输入简介" maxlength="300" show-word-limit></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6" style="display: flex; justify-content: center;">
|
|
|
+ <div style="display: flex; flex-direction: column; align-items: center;">
|
|
|
+ <div style="font-size: 18px; margin-bottom: 10px;">封面图:</div>
|
|
|
+ <div
|
|
|
+ style="display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; border-radius: 5px;">
|
|
|
+ <div
|
|
|
+ style="position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; background: rgba(131, 131, 131, 1.0); border-radius: 50%; font-size: 22px; color: #e3e3e3; cursor: pointer; display: flex; justify-content: center; align-items: center;">
|
|
|
+ ×</div>
|
|
|
+ <viewer>
|
|
|
+ <img src="https://via.placeholder.com/150x180" alt="" style="border-radius: 5px;">
|
|
|
+ </viewer>
|
|
|
+ <el-button
|
|
|
+ style="margin-top: 8px; width: 150px; border: none; background: rgba(9, 101, 98, 1); color: #fff; border-radius: 5px;"
|
|
|
+ size="small">上传图片</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6" style="display: flex; justify-content: center;">
|
|
|
+ <div style="display: flex; flex-direction: column; align-items: center;">
|
|
|
+ <div style="font-size: 18px; margin-bottom: 10px;">介绍视频:</div>
|
|
|
+ <div
|
|
|
+ style="display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; border-radius: 5px;">
|
|
|
+ <div
|
|
|
+ style="position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; background: rgba(131, 131, 131, 1.0); border-radius: 50%; font-size: 22px; color: #e3e3e3; cursor: pointer; display: flex; justify-content: center; align-items: center;">
|
|
|
+ ×</div>
|
|
|
+ <img src="https://via.placeholder.com/150x180" alt="" style="border-radius: 5px;">
|
|
|
+ <el-button
|
|
|
+ style="margin-top: 8px; width: 150px; border: none; background: rgba(9, 101, 98, 1); color: #fff; border-radius: 5px;"
|
|
|
+ size="small">上传视频</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" style="display: flex; justify-content: center;">
|
|
|
+ <div style="display: flex; flex-direction: column; align-items: center;">
|
|
|
+ <div style="font-size: 18px; margin-bottom: 10px;">详情图:</div>
|
|
|
+ <div style="display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 5px;">
|
|
|
+ <viewer :images="fileInfoListImages" style="width: 390px;">
|
|
|
+ <el-carousel height="178px" width="100%" style="border-radius: 5px;">
|
|
|
+ <el-carousel-item v-for="item in fileInfoList" :key="item.id">
|
|
|
+ <!-- <img :src="item" style="border-radius: 5px; cursor: pointer; width: 100%; height: 178px;"> -->
|
|
|
+ <img src="https://via.placeholder.com/150x180"
|
|
|
+ style="border-radius: 5px; cursor: pointer; width: 100%; height: 178px;">
|
|
|
+ </el-carousel-item>
|
|
|
+ </el-carousel>
|
|
|
+ </viewer>
|
|
|
+ <el-button
|
|
|
+ style="margin-top: 8px; width: 150px; border: none; background: rgba(9, 101, 98, 1); color: #fff; border-radius: 5px;"
|
|
|
+ size="small">上传图片</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button class="add-info-cancel-btn" @click="dialogModifyVisible = false">取 消</el-button>
|
|
|
+ <el-button class="add-info-confirm-btn" @click="">确 认</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 删除确认对话框 -->
|
|
|
+ <el-dialog custom-class="el-dialog-delete-account" :visible.sync="dialogDeleteVisible" :close-on-click-modal="false" :close-on-press-escape="false"
|
|
|
+ :show-close="false">
|
|
|
+ <div slot="" class="del-account-body">
|
|
|
+ <img src="../../icons/serveAC/del_warning.png" alt="">
|
|
|
+ <div class="del-account-body-txt">是否确定将该【】从列表中移除?</div>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button class="add-user-cancel-btn" @click="dialogDeleteVisible = false"> 否 </el-button>
|
|
|
+ <el-button class="add-user-confirm-btn" @click=""> 是 </el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 周边详情 -->
|
|
|
+ <el-dialog title="周边详情" custom-class="add-voucher-class" :visible.sync="dialogInfoVisible" :close-on-click-modal="false" :close-on-press-escape="false"
|
|
|
+ @close="dialogInfoVisible = false">
|
|
|
+ <div style="padding: 0; margin: 0; overflow:auto;">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="14">
|
|
|
+ <div style="display: flex; align-items: center; margin-bottom: 20px; ">
|
|
|
+ <div
|
|
|
+ style="font-size: 16px; font-weight: 700; min-width: 100px; width: 100px; text-align: right; margin-right: 18px; color: rgba(128, 128, 128, 1);">
|
|
|
+ 周边类型</div>
|
|
|
+ <div style="font-size: 16px; font-weight: 700; color: #333;">景点</div>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex; align-items: center; margin-bottom: 20px; ">
|
|
|
+ <div
|
|
|
+ style="font-size: 16px; font-weight: 700; min-width: 100px; width: 100px; text-align: right; margin-right: 18px; color: rgba(128, 128, 128, 1);">
|
|
|
+ 名称</div>
|
|
|
+ <div style="font-size: 16px; font-weight: 700; color: #333;">山爪仑漂流</div>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex; align-items: center; margin-bottom: 20px; ">
|
|
|
+ <div
|
|
|
+ style="font-size: 16px; font-weight: 700; min-width: 100px; width: 100px; text-align: right; margin-right: 18px; color: rgba(128, 128, 128, 1);">
|
|
|
+ 所属乡镇</div>
|
|
|
+ <div style="font-size: 16px; font-weight: 700; color: #333;">山爪仑</div>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex; align-items: center; margin-bottom: 20px; ">
|
|
|
+ <div
|
|
|
+ style="font-size: 16px; font-weight: 700; min-width: 100px; width: 100px; text-align: right; margin-right: 18px; color: rgba(128, 128, 128, 1);">
|
|
|
+ 详细地址</div>
|
|
|
+ <div style="font-size: 16px; font-weight: 700; color: #333;">详细地址详细地址详细地址详细地址详细地址详细地址</div>
|
|
|
+ </div>
|
|
|
+ <div style="display: flex; align-items: center; ">
|
|
|
+ <div
|
|
|
+ style="font-size: 16px; font-weight: 700; min-width: 100px; width: 100px; text-align: right; margin-right: 18px; color: rgba(128, 128, 128, 1);">
|
|
|
+ 联系电话</div>
|
|
|
+ <div style="font-size: 16px; font-weight: 700; color: #333;">18988898898</div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <div style="display: flex;">
|
|
|
+ <div
|
|
|
+ style="font-size: 16px; font-weight: 700; min-width: 100px; text-align: right; margin-right: 18px; color: rgba(128, 128, 128, 1);">
|
|
|
+ 封面图</div>
|
|
|
+ <viewer>
|
|
|
+ <img src="https://via.placeholder.com/160x200" alt="" srcset="" style="border-radius: 5px;" />
|
|
|
+ </viewer>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-divider></el-divider>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
+ <el-tab-pane label="产品" name="first">
|
|
|
+ <el-button class="export" style="margin-bottom: 10px !important;" size="small" @click="handleAddProduct">
|
|
|
+ <i class="el-icon el-icon-circle-plus-outline" style="font-size: 16px;"></i>
|
|
|
+ <span style="font-size: 14px;">添加产品</span>
|
|
|
+ </el-button>
|
|
|
+ <el-table ref="multipleTable" :data="tableData" height="220" style="width: 100%" :cell-style="cell_style" v-loading="loading"
|
|
|
+ :header-cell-style="header_cell_style" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column label="序号" align="center" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.xuhao }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="类型" align="center" width="88">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.type == 1">代金券</span>
|
|
|
+ <span v-else-if="scope.row.type == 2">折扣券</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="所在乡镇" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.type == 1">{{ scope.row.deductionPrice }}</span>
|
|
|
+ <span v-else-if="scope.row.type == 2">{{ scope.row.maxDeduction }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="名称" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.name }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="联系电话" align="center" width="90">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.grantNumber }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="地址" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.grantNumber }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="产品数量" align="center" width="90">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.remainderNumber }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button @click="handleModifyClick(scope.row)" type="text" size="small">编辑</el-button>
|
|
|
+ <el-button @click="handleDelClick(scope.row)" type="text" size="small">删除</el-button>
|
|
|
+ <el-button @click="handleDetailClick(scope.row)" type="text" size="small">查看详情</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="简介" name="second">
|
|
|
+ <div style="height: 264px; overflow-y: auto;">
|
|
|
+ <div style="font-size: 16px; font-weight: bold; margin: 10px 0;">开放时间</div>
|
|
|
+ <div style="font-size: 14px; margin: 10px 0 20px; line-height: 22px;">1月1日-12月31日 周一至周日 全天: 08:00-17:00
|
|
|
+ 最晚入园:15:00<br>以上信息仅供参考,具体以景区当日实际公示信息为准</div>
|
|
|
+ <div style="font-size: 16px; font-weight: bold; margin: 10px 0;">预订提示</div>
|
|
|
+ <div style="font-size: 14px; margin: 10px 0 20px; line-height: 22px;">
|
|
|
+ 为了保护好您的健康与安全,请您一定要做好自我防护,建议减少外出,避免去人群密集的公共场所,进入景区佩戴口罩。同时,请您配合景区做好入园体温检测以及信息登记工作。由此给您带来不便敬请谅解景区介绍:既有森林公园的野趣,又有江南园林的韵致
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="有效期:" :label-width="formLabelWidth">
|
|
|
- <div style="display: flex; align-items: center; margin-bottom: 15px;">
|
|
|
- <el-radio v-model="formModifyVoucher.radio" label="1">时间段</el-radio>
|
|
|
- <el-date-picker v-model="formModifyVoucher.effectiveDateTime" :disabled="formModifyVoucher.radio != 1" style="width: 390px;"
|
|
|
- type="datetimerange" range-separator="~" start-placeholder="有效开始日期" end-placeholder="有效结束日期"
|
|
|
- value-format="yyyy-MM-dd HH:mm:ss">
|
|
|
- </el-date-picker>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="介绍视频" name="third">
|
|
|
+ <div style="height: 264px; overflow-y: auto;">
|
|
|
+ <div style="display: flex; justify-content: center; align-items: center;">
|
|
|
+ <div v-for="(video, index) in videoList" :key="index" style="width: 464px; height: 262px;">
|
|
|
+ <video-player class="video-player vjs-custom-skin" :ref="'videoPlayer' + index" @play="onPlayerPlay($event)"
|
|
|
+ :playsinline="true" :options="video.playerOptions"></video-player>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div style="display: flex; align-items: center;">
|
|
|
- <el-radio v-model="formModifyVoucher.radio" label="2">领取后</el-radio>
|
|
|
- <el-input v-model="formModifyVoucher.effectiveDay" :disabled="formModifyVoucher.radio != 2" autocomplete="off"
|
|
|
- placeholder="请输入天数" class="custom-input" maxlength="3">
|
|
|
- </el-input>
|
|
|
- <div style="margin: 0 10px;">天开始</div>
|
|
|
- <el-input v-model="formModifyVoucher.effectiveLoseDay" :disabled="formModifyVoucher.radio != 2" autocomplete="off"
|
|
|
- placeholder="请输入天数" class="custom-input" maxlength="3">
|
|
|
- </el-input>
|
|
|
- <div style="margin-left: 10px;">天内有效</div>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="详情图" name="fourth">
|
|
|
+ <div style="height: 264px; overflow-y: auto;">
|
|
|
+ <div style="display: flex; justify-content: center; align-items: center; border-radius: 5px;">
|
|
|
+ <viewer :images="fileInfoListImages" style="width: 600px;">
|
|
|
+ <el-carousel height="260px" width="100%" style="border-radius: 5px;">
|
|
|
+ <el-carousel-item v-for="item in fileInfoList" :key="item.id">
|
|
|
+ <!-- <img :src="item" style="border-radius: 5px; cursor: pointer; width: 100%; height: 178px;"> -->
|
|
|
+ <img src="https://via.placeholder.com/600x260"
|
|
|
+ style="border-radius: 5px; cursor: pointer; width: 100%; height: 260px;">
|
|
|
+ </el-carousel-item>
|
|
|
+ </el-carousel>
|
|
|
+ </viewer>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="适用民宿:" :label-width="formLabelWidth">
|
|
|
- <el-checkbox :indeterminate="isModifyVoucherIndeterminate" v-model="voucherModifyCheckAll"
|
|
|
- @change="handleModifyVoucherCheckAllChange">全选</el-checkbox>
|
|
|
- <div style="margin: 0;"></div>
|
|
|
- <el-checkbox-group v-model="voucherModifyCheckedTowns" @change="handleModifyVoucherCheckedTownsChange">
|
|
|
- <el-checkbox v-for="town in towns" :label="town" :key="town">{{town}}</el-checkbox>
|
|
|
- </el-checkbox-group>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- </el-form>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button class="add-info-cancel-btn" @click="dialogModifyVoucherFormVisible = false">取 消</el-button>
|
|
|
- <el-button class="add-info-confirm-btn" @click="modify_voucher_dialog_handler">确 认</el-button>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
- </el-dialog> -->
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -342,7 +484,6 @@
|
|
|
coupominsterCoupon,
|
|
|
hotelqueryAllHotel
|
|
|
} from '@/api/discountCouponMgr'
|
|
|
- import plUpload from "@/components/pl-upload/index"
|
|
|
|
|
|
import {
|
|
|
isEmpty
|
|
|
@@ -351,11 +492,12 @@
|
|
|
var townOptions = [] // 民宿列表
|
|
|
var townOptions_obj = [] // 民宿列表
|
|
|
export default {
|
|
|
- components: {
|
|
|
- plUpload
|
|
|
- },
|
|
|
data() {
|
|
|
return {
|
|
|
+ videoList: [],
|
|
|
+ activeName: 'second',
|
|
|
+ fileInfoListImages: [],
|
|
|
+ fileInfoList: [1, 2, 4],
|
|
|
currentUserLevel: this.$store.state.user.level, // 当前用户的权限
|
|
|
currentUserId: this.$store.state.user.user_id, // 当前用户的权限
|
|
|
formLabelWidth: '100px',
|
|
|
@@ -408,18 +550,16 @@
|
|
|
loading: true,
|
|
|
coupon: {},
|
|
|
formAddHostel: {},
|
|
|
- times: '',
|
|
|
- dialogVoucherVisible: false, // 代金券详情界面
|
|
|
- dialogAddVisible: false, // 新增优惠券界面
|
|
|
- dialogAddVoucherFormVisible: false, // 新增代金券对话框
|
|
|
- dialogModifyVoucherFormVisible: false, // 修改代金券对话框
|
|
|
+ dialogAddVisible: false, // 新增周边
|
|
|
+ dialogInfoVisible: false, // 周边详情
|
|
|
+ dialogModifyVisible: false, // 修改周边
|
|
|
+ dialogDeleteVisible: false, // 删除确认对话框
|
|
|
+ dialogAddProductVisible: false, // 添加产品对话框
|
|
|
formAddVoucher: {}, // 增加代金券数据模型
|
|
|
formModifyVoucher: {}, // 修改代金券数据模型
|
|
|
addVoucherFormRules: {
|
|
|
|
|
|
},
|
|
|
- dialogAddCouponFormVisible: false, // 新增折扣券对话框
|
|
|
- dialogModifyCouponFormVisible: false, // 修改折扣券对话框
|
|
|
formAddCoupon: {}, // 增加折扣券数据模型
|
|
|
formModifyCoupon: {}, // 修改折扣券数据模型
|
|
|
addCouponFormRules: {
|
|
|
@@ -457,11 +597,101 @@
|
|
|
}
|
|
|
// 获取消费记录,表格数据
|
|
|
this.get_table_data('list')
|
|
|
+
|
|
|
+ this.videoList.push({
|
|
|
+ playerOptions: {
|
|
|
+ playbackRates: [0.5, 0.8, 1.0, 1.25, 1.5, 1.75, 2.0], //播放速度
|
|
|
+ autoplay: false, // 如果true,浏览器准备好时开始回放。
|
|
|
+ muted: false, // 默认情况下将会消除任何音频。
|
|
|
+ loop: false, // 导致视频一结束就重新开始。
|
|
|
+ preload: "auto", // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
|
|
|
+ language: "zh-CN",
|
|
|
+ aspectRatio: "16:9", // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
|
|
|
+ fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
|
|
|
+ sources: [{
|
|
|
+ withCredentials: false,
|
|
|
+ type: "video/mp4", // 这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目
|
|
|
+ src: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4',
|
|
|
+ }],
|
|
|
+ controls: true,
|
|
|
+ hls: true,
|
|
|
+ poster: "", // 你的封面地址
|
|
|
+ notSupportedMessage: "此视频暂无法播放,请稍后再试", // 允许覆盖Video.js无法播放媒体源时显示的默认信息。
|
|
|
+ controlBar: {
|
|
|
+ progressControl: true,
|
|
|
+ currentTimeDisplay: true,
|
|
|
+ timeDivider: true,
|
|
|
+ durationDisplay: true,
|
|
|
+ remainingTimeDisplay: false,
|
|
|
+ fullscreenToggle: true, // 全屏按钮
|
|
|
+ },
|
|
|
+ flash: {
|
|
|
+ hls: {
|
|
|
+ withCredentials: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ html5: {
|
|
|
+ hls: {
|
|
|
+ withCredentials: false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
mounted() {
|
|
|
document.getElementsByClassName("el-pagination__jump")[0].childNodes[0].nodeValue = "跳至";
|
|
|
+
|
|
|
+ document.addEventListener('fullscreenchange', this.handleFullScreenChange);
|
|
|
+ },
|
|
|
+ beforeDestroy() {
|
|
|
+ document.removeEventListener('fullscreenchange', this.handleFullScreenChange);
|
|
|
},
|
|
|
methods: {
|
|
|
+ handleFullScreenChange() {
|
|
|
+ if (!document.fullscreenElement) {
|
|
|
+ // 退出全屏逻辑
|
|
|
+ this.playering.pause()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 定义点击播放按钮,自动全屏化的方法
|
|
|
+ full(e) {
|
|
|
+ // 做兼容处理
|
|
|
+ if (e.requestFullscreen) {
|
|
|
+ e.requestFullscreen()
|
|
|
+ } else if (e.mozRequestFullScreen) {
|
|
|
+ e.mozRequestFullScreen()
|
|
|
+ } else if (e.msRequestFullscreen) {
|
|
|
+ e.msRequestFullscreen()
|
|
|
+ } else if (e.oRequestFullscreen) {
|
|
|
+ e.oRequestFullscreen()
|
|
|
+ } else if (e.webkitRequestFullscreen) {
|
|
|
+ e.webkitRequestFullScreen()
|
|
|
+ } else {
|
|
|
+ // var docHtml = document.documentElement;
|
|
|
+ // var docBody = document.body;
|
|
|
+ var videobox = document.getElementsByClassName('video-player')
|
|
|
+ var cssText = 'width:100%;height:100%;overflow:hidden;'
|
|
|
+ // docHtml.style.cssText = cssText;
|
|
|
+ // docBody.style.cssText = cssText;
|
|
|
+ videobox.style.cssText = cssText + ';' + 'margin:0px;padding:0px;'
|
|
|
+ document.IsFullScreen = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 定义点击播放按钮,调用全屏化的方法
|
|
|
+ onPlayerPlay(player) {
|
|
|
+ // console.log('player play===>>>', player)
|
|
|
+ this.playering = player
|
|
|
+ this.full(player)
|
|
|
+ },
|
|
|
+ handleClick(tab, event) {
|
|
|
+ console.log(tab, event);
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 添加产品
|
|
|
+ */
|
|
|
+ handleAddProduct() {
|
|
|
+ this.dialogAddProductVisible = true
|
|
|
+ },
|
|
|
/**
|
|
|
* 分页表格勾选
|
|
|
* @param {Object} val
|
|
|
@@ -715,7 +945,7 @@
|
|
|
|
|
|
this.get_table_data('list')
|
|
|
|
|
|
- that.dialogAddVoucherFormVisible = false
|
|
|
+ that.dialogInfoVisible = false
|
|
|
|
|
|
that.formAddVoucher = {}
|
|
|
that.voucherMinSuIds = []
|
|
|
@@ -816,8 +1046,6 @@
|
|
|
|
|
|
this.get_table_data('list')
|
|
|
|
|
|
- that.dialogAddCouponFormVisible = false
|
|
|
-
|
|
|
that.formAddCoupon = {}
|
|
|
that.couponMinSuIds = []
|
|
|
that.couponCheckedTowns = []
|
|
|
@@ -833,101 +1061,20 @@
|
|
|
* 新增周边
|
|
|
*/
|
|
|
add_perimeter() {
|
|
|
- this.dialogAddVisible = true;
|
|
|
+ this.dialogAddVisible = true
|
|
|
},
|
|
|
/**
|
|
|
- * 打开修改优惠券对话框
|
|
|
+ * 打开编辑周边
|
|
|
* @param {Object} row
|
|
|
*/
|
|
|
handleModifyClick(row) {
|
|
|
- // 获取适用民宿列表
|
|
|
- this.getMinSuList()
|
|
|
-
|
|
|
- if (row.type == 1) { // 代金券
|
|
|
- this.dialogModifyVoucherFormVisible = true
|
|
|
-
|
|
|
- this.formModifyVoucher = {}
|
|
|
-
|
|
|
- this.$set(this.formModifyVoucher, 'name', row.name);
|
|
|
- this.$set(this.formModifyVoucher, 'deductionPrice', row.deductionPrice);
|
|
|
- this.$set(this.formModifyVoucher, 'grantNumber', row.grantNumber);
|
|
|
- this.$set(this.formModifyVoucher, 'limitNumber', row.limitNumber);
|
|
|
- this.$set(this.formModifyVoucher, 'grantTimes', [row.grantStartDate, row.grantEndDate]);
|
|
|
- this.$set(this.formModifyVoucher, 'meetPrice', row.meetPrice);
|
|
|
- if (row.effectiveType == 1) {
|
|
|
- this.$set(this.formModifyVoucher, 'radio', '1');
|
|
|
- this.$set(this.formModifyVoucher, 'effectiveDateTime', [row.effectiveStartDate, row.effectiveEndDate]);
|
|
|
- } else {
|
|
|
- this.$set(this.formModifyVoucher, 'radio', '2');
|
|
|
- this.$set(this.formModifyVoucher, 'effectiveDay', row.effectiveDay);
|
|
|
- this.$set(this.formModifyVoucher, 'effectiveLoseDay', row.effectiveLoseDay);
|
|
|
- }
|
|
|
-
|
|
|
- this.voucherModifyMinSuIds = row.hotelIds.split(',')
|
|
|
- this.voucherModifyCheckedTowns.length = 0
|
|
|
- setTimeout(() => {
|
|
|
- var tmp = []
|
|
|
- row.hotelIds.split(',').forEach((item) => {
|
|
|
- townOptions_obj.forEach((obj) => {
|
|
|
- if (obj.hid == item) {
|
|
|
- tmp.push(obj.hname);
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- this.voucherModifyCheckedTowns = tmp
|
|
|
- this.$set(this.formModifyVoucher, 'voucherModifyCheckedTowns', tmp);
|
|
|
- }, 1000);
|
|
|
-
|
|
|
- this.$set(this.formModifyVoucher, 'createId', this.currentUserId); // 创建人
|
|
|
- this.$set(this.formModifyVoucher, 'effectiveType', row.effectiveType); // 有效期类型(1.时间段 2.生效失效天数)
|
|
|
- this.$set(this.formModifyVoucher, 'type', 1); // 类型(1.代金券 2.折扣券)
|
|
|
- this.$set(this.formModifyVoucher, 'status', 1); // 状态(0删除 1正常)
|
|
|
- this.$set(this.formModifyVoucher, 'id', row.id);
|
|
|
- } else { // 折扣券
|
|
|
- this.dialogModifyCouponFormVisible = true
|
|
|
-
|
|
|
- this.formModifyCoupon = {}
|
|
|
-
|
|
|
- this.$set(this.formModifyCoupon, 'name', row.name);
|
|
|
- this.$set(this.formModifyCoupon, 'rebatePrice', row.rebatePrice);
|
|
|
- this.$set(this.formModifyCoupon, 'maxDeduction', row.maxDeduction);
|
|
|
- this.$set(this.formModifyCoupon, 'grantNumber', row.grantNumber);
|
|
|
- this.$set(this.formModifyCoupon, 'limitNumber', row.limitNumber);
|
|
|
- this.$set(this.formModifyCoupon, 'grantTimes', [row.grantStartDate, row.grantEndDate]);
|
|
|
- this.$set(this.formModifyCoupon, 'meetPrice', row.meetPrice);
|
|
|
- if (row.effectiveType == 1) {
|
|
|
- this.$set(this.formModifyCoupon, 'radio', '1');
|
|
|
- this.$set(this.formModifyCoupon, 'effectiveDateTime', [row.effectiveStartDate, row.effectiveEndDate]);
|
|
|
- } else {
|
|
|
- this.$set(this.formModifyCoupon, 'radio', '2');
|
|
|
- this.$set(this.formModifyCoupon, 'effectiveDay', row.effectiveDay);
|
|
|
- this.$set(this.formModifyCoupon, 'effectiveLoseDay', row.effectiveLoseDay);
|
|
|
- }
|
|
|
-
|
|
|
- this.couponModifyMinSuIds = row.hotelIds.split(',')
|
|
|
- this.couponModifyCheckedTowns.length = 0
|
|
|
- setTimeout(() => {
|
|
|
- var tmp = []
|
|
|
- row.hotelIds.split(',').forEach((item) => {
|
|
|
- townOptions_obj.forEach((obj) => {
|
|
|
- if (obj.hid == item) {
|
|
|
- tmp.push(obj.hname);
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- this.couponModifyCheckedTowns = tmp
|
|
|
- this.$set(this.formModifyCoupon, 'couponModifyCheckedTowns', tmp);
|
|
|
- }, 1000);
|
|
|
-
|
|
|
- this.$set(this.formModifyCoupon, 'createId', this.currentUserId); // 创建人
|
|
|
- this.$set(this.formModifyCoupon, 'effectiveType', row.effectiveType); // 有效期类型(1.时间段 2.生效失效天数)
|
|
|
- this.$set(this.formModifyCoupon, 'type', 1); // 类型(1.代金券 2.折扣券)
|
|
|
- this.$set(this.formModifyCoupon, 'status', 1); // 状态(0删除 1正常)
|
|
|
- this.$set(this.formModifyCoupon, 'id', row.id);
|
|
|
- }
|
|
|
+ this.dialogModifyVisible = true
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 删除周边
|
|
|
+ */
|
|
|
handleDelClick() {
|
|
|
-
|
|
|
+ this.dialogDeleteVisible = true
|
|
|
},
|
|
|
/**
|
|
|
* 点击查看优惠券详情,弹出优惠券详情对话框
|
|
|
@@ -935,9 +1082,8 @@
|
|
|
*/
|
|
|
handleDetailClick(row) {
|
|
|
// console.log(row);
|
|
|
+ this.dialogInfoVisible = true
|
|
|
if (row.type == 1) { // 代金券
|
|
|
- this.dialogVoucherVisible = true
|
|
|
-
|
|
|
this.coupon.name = row.name
|
|
|
this.coupon.deductionPrice = row.deductionPrice
|
|
|
this.coupon.grantNumber = row.grantNumber
|
|
|
@@ -1311,8 +1457,8 @@
|
|
|
|
|
|
<style>
|
|
|
.add-voucher-class {
|
|
|
- width: 800px !important;
|
|
|
- height: 890px !important;
|
|
|
+ width: 900px !important;
|
|
|
+ height: 760px !important;
|
|
|
}
|
|
|
|
|
|
.el-date-editor--daterange.el-input__inner {
|
|
|
@@ -1407,6 +1553,32 @@
|
|
|
|
|
|
.add-dlg-class {
|
|
|
width: 830px !important;
|
|
|
- height: 700px !important;
|
|
|
+ height: 768px !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .add-product-class {
|
|
|
+ width: 680px !important;
|
|
|
+ height: 440px !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-carousel__indicators {
|
|
|
+ display: none !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-tabs__item {
|
|
|
+ width: 100px !important;
|
|
|
+ text-align: center !important;
|
|
|
+ font-size: 20px !important;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ .el-tabs__item.is-active,
|
|
|
+ .el-tabs__item:hover {
|
|
|
+ color: rgba(9, 101, 98, 1) !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-tabs__active-bar {
|
|
|
+ color: rgba(9, 101, 98, 1) !important;
|
|
|
+ background-color: rgba(9, 101, 98, 1) !important;
|
|
|
}
|
|
|
</style>
|