|
@@ -60,29 +60,27 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="filter">
|
|
<div class="filter">
|
|
|
<div class="filter_block">
|
|
<div class="filter_block">
|
|
|
- <!-- <el-button
|
|
|
|
|
- color="rgba(0, 97, 255, 1)"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- class="search"
|
|
|
|
|
- @click="roomClose"
|
|
|
|
|
- ><span>批量改价</span></el-button
|
|
|
|
|
- > -->
|
|
|
|
|
- <el-button
|
|
|
|
|
- color="rgba(0, 97, 255, 1)"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- class="search"
|
|
|
|
|
- @click="roomClose"
|
|
|
|
|
- ><span>导入</span></el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button type="primary" plain>导出</el-button>
|
|
|
|
|
- <!-- <el-button
|
|
|
|
|
- style="margin-left: 20px"
|
|
|
|
|
- color="rgba(0, 97, 255, 1)"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- class="search"
|
|
|
|
|
- @click="recordPrice"
|
|
|
|
|
- ><span>改价记录</span></el-button
|
|
|
|
|
- > -->
|
|
|
|
|
|
|
+ <el-upload
|
|
|
|
|
+ class="avatar-uploader"
|
|
|
|
|
+ action=""
|
|
|
|
|
+ :on-preview="handlePreview"
|
|
|
|
|
+ :on-remove="handleRemove"
|
|
|
|
|
+ :on-change="handleChange"
|
|
|
|
|
+ :http-request="handleUpload"
|
|
|
|
|
+ :before-upload="beforeAvatarUpload"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #trigger>
|
|
|
|
|
+ <el-button type="primary" color="rgba(0, 97, 255, 1)"
|
|
|
|
|
+ >导入</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template #tip>
|
|
|
|
|
+ <!-- <div class="el-upload__tip">
|
|
|
|
|
+ (注:图片大小不超过10M,建议按16:9比例)
|
|
|
|
|
+ </div> -->
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-upload>
|
|
|
|
|
+ <el-button type="primary" @click="importExcel" plain>导出</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -112,6 +110,7 @@
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
align="center"
|
|
align="center"
|
|
|
v-for="i in tableHead"
|
|
v-for="i in tableHead"
|
|
|
|
|
+ width="100"
|
|
|
>
|
|
>
|
|
|
<template #header>
|
|
<template #header>
|
|
|
<div>教师资格</div>
|
|
<div>教师资格</div>
|
|
@@ -123,265 +122,6 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- 批量改价 -->
|
|
|
|
|
- <el-dialog
|
|
|
|
|
- class="roomCloseDilog"
|
|
|
|
|
- v-model="roomCloseDialogVisible"
|
|
|
|
|
- :close-on-click-modal="false"
|
|
|
|
|
- :close-on-press-escape="false"
|
|
|
|
|
- title="批量改价"
|
|
|
|
|
- align-center
|
|
|
|
|
- width="700"
|
|
|
|
|
- :before-close="cancelRoomClose"
|
|
|
|
|
- >
|
|
|
|
|
- <div class="last">
|
|
|
|
|
- <div class="roomUl">
|
|
|
|
|
- <div class="title">选择类型</div>
|
|
|
|
|
- <div class="delRoom">
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="changePriceSelData"
|
|
|
|
|
- class="m-2"
|
|
|
|
|
- placeholder="请选择类型"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option label="全日房" value="1" />
|
|
|
|
|
- <el-option label="钟点房" value="2" />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="roomUl">
|
|
|
|
|
- <div class="title">选择房型</div>
|
|
|
|
|
- <div class="delRoom">
|
|
|
|
|
- <el-checkbox-group
|
|
|
|
|
- @change="changePriceSelcet"
|
|
|
|
|
- v-model="changePriceSelData"
|
|
|
|
|
- >
|
|
|
|
|
- <el-checkbox
|
|
|
|
|
- :label="i.id"
|
|
|
|
|
- v-for="i in changePirceRoomType"
|
|
|
|
|
- :key="i.id"
|
|
|
|
|
- >{{ i.hName }}</el-checkbox
|
|
|
|
|
- >
|
|
|
|
|
- </el-checkbox-group>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="roomUl roomTime">
|
|
|
|
|
- <div class="title">选择日期</div>
|
|
|
|
|
- <div class="delRoom">
|
|
|
|
|
- <div class="date">适用日期</div>
|
|
|
|
|
- <div class="addDate">
|
|
|
|
|
- <div class="elDate">
|
|
|
|
|
- <div
|
|
|
|
|
- class="time_li"
|
|
|
|
|
- v-for="(i, index) in changePrice.createTime"
|
|
|
|
|
- :key="index"
|
|
|
|
|
- >
|
|
|
|
|
- <el-date-picker
|
|
|
|
|
- v-model="changePrice.createTime[index]"
|
|
|
|
|
- type="daterange"
|
|
|
|
|
- range-separator="至"
|
|
|
|
|
- start-placeholder="起始时间"
|
|
|
|
|
- end-placeholder="结束时间"
|
|
|
|
|
- format="YYYY-MM-DD"
|
|
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
|
|
- :prefix-icon="Calendar"
|
|
|
|
|
- placeholder="请选择日期"
|
|
|
|
|
- />
|
|
|
|
|
- <img
|
|
|
|
|
- src="@/assets/addRoom.png"
|
|
|
|
|
- v-if="changePrice.createTime.length > 1"
|
|
|
|
|
- alt=""
|
|
|
|
|
- @click="delChangePriceTime(index)"
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="addTime">
|
|
|
|
|
- <div class="imgTime" @click="addChangePriceTime">
|
|
|
|
|
- <img src="@/assets/addRoom.png" alt="" />
|
|
|
|
|
- <span>添加时间段</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <span class="num">最多可添加10个</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="roomUl">
|
|
|
|
|
- <div class="title">设置价格</div>
|
|
|
|
|
- <div class="delRoom">
|
|
|
|
|
- <el-table
|
|
|
|
|
- :row-class-name="tableRowClassName"
|
|
|
|
|
- :data="changePriceData.list"
|
|
|
|
|
- style="width: 100%; height: 280px"
|
|
|
|
|
- :header-cell-style="{
|
|
|
|
|
- background: 'rgba(233, 242, 242, 1)',
|
|
|
|
|
- height: '40px',
|
|
|
|
|
- border: 0,
|
|
|
|
|
- }"
|
|
|
|
|
- >
|
|
|
|
|
- <el-table-column align="center" prop="hName" label="房型" />
|
|
|
|
|
- <el-table-column align="center" />
|
|
|
|
|
- <el-table-column align="center" label="价格" width="200">
|
|
|
|
|
- <template #default="{ row }">
|
|
|
|
|
- <div @click="inputPrice(row)">
|
|
|
|
|
- <span v-if="row.inputPriceShow">{{ row.price }}</span>
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-else
|
|
|
|
|
- :clearable="false"
|
|
|
|
|
- ref="inputPriceRef"
|
|
|
|
|
- @blur="inputPriceBlur(row)"
|
|
|
|
|
- v-model="row.price"
|
|
|
|
|
- class="w-50 m-2"
|
|
|
|
|
- placeholder="请输入价格"
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="options">
|
|
|
|
|
- <el-button
|
|
|
|
|
- class="queding"
|
|
|
|
|
- color="rgba(0, 97, 255, 1)"
|
|
|
|
|
- @click="notarizeRoomClose(roomCloseTree)"
|
|
|
|
|
- >确认</el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button @click="cancelRoomClose">取消</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 改价记录 -->
|
|
|
|
|
- <el-dialog
|
|
|
|
|
- class="recordDilog"
|
|
|
|
|
- v-model="recordDialogVisible"
|
|
|
|
|
- :close-on-click-modal="false"
|
|
|
|
|
- :close-on-press-escape="false"
|
|
|
|
|
- title="改价记录"
|
|
|
|
|
- align-center
|
|
|
|
|
- width="1400"
|
|
|
|
|
- :before-close="cancelRecord"
|
|
|
|
|
- >
|
|
|
|
|
- <div class="middle">
|
|
|
|
|
- <div class="filter">
|
|
|
|
|
- <div class="condition">
|
|
|
|
|
- <span>房型 : </span>
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="recordSearch.roomType"
|
|
|
|
|
- class="m-2"
|
|
|
|
|
- placeholder="请选择房型"
|
|
|
|
|
- @clear="recordPriceSearch"
|
|
|
|
|
- clearable
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- :label="i.hName"
|
|
|
|
|
- :value="i.id"
|
|
|
|
|
- v-for="i in recordRoomType"
|
|
|
|
|
- :key="i.id"
|
|
|
|
|
- />
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="condition">
|
|
|
|
|
- <span>操作时间 : </span>
|
|
|
|
|
- <el-date-picker
|
|
|
|
|
- v-model="recordSearch.operationTime"
|
|
|
|
|
- type="daterange"
|
|
|
|
|
- range-separator="-"
|
|
|
|
|
- start-placeholder="起始时间"
|
|
|
|
|
- end-placeholder="结束时间"
|
|
|
|
|
- format="YYYY-MM-DD"
|
|
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
|
|
- :prefix-icon="Calendar"
|
|
|
|
|
- placeholder="请选择日期"
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="condition">
|
|
|
|
|
- <span>价格日期 : </span>
|
|
|
|
|
- <el-date-picker
|
|
|
|
|
- v-model="recordSearch.setDate"
|
|
|
|
|
- type="daterange"
|
|
|
|
|
- range-separator="-"
|
|
|
|
|
- start-placeholder="起始时间"
|
|
|
|
|
- end-placeholder="结束时间"
|
|
|
|
|
- format="YYYY-MM-DD"
|
|
|
|
|
- value-format="YYYY-MM-DD"
|
|
|
|
|
- :prefix-icon="Calendar"
|
|
|
|
|
- placeholder="请选择日期"
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="condition">
|
|
|
|
|
- <span>操作人 : </span>
|
|
|
|
|
- <el-input
|
|
|
|
|
- :clearable="true"
|
|
|
|
|
- @clear="recordPriceSearch"
|
|
|
|
|
- v-model="recordSearch.keyWord"
|
|
|
|
|
- class="w-50 m-2"
|
|
|
|
|
- placeholder="请输入操作人名字"
|
|
|
|
|
- style="width: 230px"
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- <el-button
|
|
|
|
|
- style="margin-left: 20px"
|
|
|
|
|
- color="rgba(0, 97, 255, 1)"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- class="search"
|
|
|
|
|
- @click="recordPriceSearch"
|
|
|
|
|
- ><el-icon>
|
|
|
|
|
- <Search />
|
|
|
|
|
- </el-icon>
|
|
|
|
|
- <span>查询</span></el-button
|
|
|
|
|
- >
|
|
|
|
|
- <el-button
|
|
|
|
|
- style="margin-left: 20px"
|
|
|
|
|
- color="rgba(0, 97, 255, 1)"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- class="search"
|
|
|
|
|
- @click="importExcel"
|
|
|
|
|
- ><span>导出房价</span></el-button
|
|
|
|
|
- >
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="footer" v-loading="loading">
|
|
|
|
|
- <el-table
|
|
|
|
|
- :row-class-name="tableRowClassName2"
|
|
|
|
|
- :data="recordData.list"
|
|
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
|
|
- style="width: 100%; height: 550px"
|
|
|
|
|
- :header-cell-style="{
|
|
|
|
|
- background: 'rgba(240, 243, 247, 1)',
|
|
|
|
|
- height: '50px',
|
|
|
|
|
- border: 0,
|
|
|
|
|
- }"
|
|
|
|
|
- >
|
|
|
|
|
- <el-table-column align="center" prop="houseName" label="房型">
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column align="center" prop="setDate" label="价格日期" />
|
|
|
|
|
- <el-table-column align="center" prop="price" label="修改后价格" />
|
|
|
|
|
- <el-table-column
|
|
|
|
|
- align="center"
|
|
|
|
|
- prop="operationName"
|
|
|
|
|
- label="操作人"
|
|
|
|
|
- />
|
|
|
|
|
- <el-table-column
|
|
|
|
|
- align="center"
|
|
|
|
|
- prop="operationTime"
|
|
|
|
|
- label="操作时间"
|
|
|
|
|
- >
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- </el-table>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="pageSize">
|
|
|
|
|
- <span></span>
|
|
|
|
|
- <el-pagination
|
|
|
|
|
- background
|
|
|
|
|
- :current-page="recordPage"
|
|
|
|
|
- :page-size="recordSize"
|
|
|
|
|
- layout="total, prev, pager, next, jumper, slot"
|
|
|
|
|
- :total="recordTotal"
|
|
|
|
|
- @update:current-page="handleCurrentChange2"
|
|
|
|
|
- />
|
|
|
|
|
- </div>
|
|
|
|
|
- </el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 分页组件 -->
|
|
<!-- 分页组件 -->
|
|
|
<div class="pageSize">
|
|
<div class="pageSize">
|
|
@@ -440,77 +180,6 @@ const searchInput = reactive({
|
|
|
createTime: ["2023-09-04", "2023-09-06"],
|
|
createTime: ["2023-09-04", "2023-09-06"],
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-const addDialogVisible = ref(false); // 控制添加员工弹窗
|
|
|
|
|
-
|
|
|
|
|
-// 批量改价数据(---------------------------------------)
|
|
|
|
|
-const roomCloseDialogVisible = ref(false);
|
|
|
|
|
-const inputPriceRef = ref();
|
|
|
|
|
-const changePirceRoomType = ref(); // 批量改价房间类型
|
|
|
|
|
-const changePrice = reactive({
|
|
|
|
|
- createTime: [[]],
|
|
|
|
|
-});
|
|
|
|
|
-const changePriceSelData = ref(); // 选中的房间数据
|
|
|
|
|
-// 批量改价表格数据
|
|
|
|
|
-const changePriceData = reactive({ list: [] });
|
|
|
|
|
-
|
|
|
|
|
-// 改价记录数据(---------------------------------------)
|
|
|
|
|
-const recordDialogVisible = ref(false);
|
|
|
|
|
-const recordData = reactive({ list: [] }); // 改价记录数据
|
|
|
|
|
-const recordPage = ref(1); // 当前页
|
|
|
|
|
-const recordSize = ref(10); // 页数
|
|
|
|
|
-const recordTotal = ref(10); // 页数
|
|
|
|
|
-const recordRoomType = ref(); // 房间类型
|
|
|
|
|
-const recordSearch = reactive({
|
|
|
|
|
- operationTime: "",
|
|
|
|
|
- keyWord: "",
|
|
|
|
|
- roomType: "",
|
|
|
|
|
- setDate: "",
|
|
|
|
|
-});
|
|
|
|
|
-
|
|
|
|
|
-// 表单验证
|
|
|
|
|
-const rules = reactive({
|
|
|
|
|
- // serial: [{ required: true, message: "序列号不能为空", trigger: "blur" }],
|
|
|
|
|
- userName: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
|
|
|
|
|
- cardNumber: [
|
|
|
|
|
- { required: true, message: "微校卡号不能为空", trigger: "blur" },
|
|
|
|
|
- ],
|
|
|
|
|
- userzzId: [{ required: true, message: "身份不能为空", trigger: "blur" }],
|
|
|
|
|
- userPhone: [{ required: true, message: "手机号码不能为空", trigger: "blur" }],
|
|
|
|
|
- schoolId: [{ required: true, message: "校区不能为空", trigger: "blur" }],
|
|
|
|
|
- workType: [{ required: true, message: "工种不能为空", trigger: "blur" }],
|
|
|
|
|
- teamId: [{ required: true, message: "维修班不能为空", trigger: "blur" }],
|
|
|
|
|
- articleIds: [
|
|
|
|
|
- { required: true, message: "关联报修类型不能为空", trigger: "blur" },
|
|
|
|
|
- ],
|
|
|
|
|
- buildIds: [{ required: true, message: "关联楼栋不能为空", trigger: "blur" }],
|
|
|
|
|
- acceptanceTime: [
|
|
|
|
|
- { required: true, message: "接单考核时间不能为空", trigger: "blur" },
|
|
|
|
|
- ],
|
|
|
|
|
- maintenanceTime: [
|
|
|
|
|
- { required: true, message: "维修考核时间不能为空", trigger: "blur" },
|
|
|
|
|
- ],
|
|
|
|
|
-});
|
|
|
|
|
-// 改价记录 操作时间
|
|
|
|
|
-watch(
|
|
|
|
|
- () => recordSearch.operationTime,
|
|
|
|
|
- (newVal, oldVal) => {
|
|
|
|
|
- console.log("监听时间:", newVal);
|
|
|
|
|
- if (newVal == null) {
|
|
|
|
|
- recordPriceSearch();
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-);
|
|
|
|
|
-// 改价记录 价格日期
|
|
|
|
|
-watch(
|
|
|
|
|
- () => recordSearch.setDate,
|
|
|
|
|
- (newVal, oldVal) => {
|
|
|
|
|
- console.log("监听时间:", newVal);
|
|
|
|
|
- if (newVal == null) {
|
|
|
|
|
- recordPriceSearch();
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-);
|
|
|
|
|
-
|
|
|
|
|
// 查看员工列表
|
|
// 查看员工列表
|
|
|
const getList = async () => {
|
|
const getList = async () => {
|
|
|
loading.value = true;
|
|
loading.value = true;
|
|
@@ -565,279 +234,101 @@ const searchBtn = () => {
|
|
|
// getList();
|
|
// getList();
|
|
|
// }, 300);
|
|
// }, 300);
|
|
|
|
|
|
|
|
-// 批量改价功能(------------------------------------)
|
|
|
|
|
-const roomClose = () => {
|
|
|
|
|
- roomCloseDialogVisible.value = true;
|
|
|
|
|
- changePrice.createTime = [];
|
|
|
|
|
-};
|
|
|
|
|
-// 关闭批量改价
|
|
|
|
|
-const cancelRoomClose = () => {
|
|
|
|
|
- roomCloseDialogVisible.value = false;
|
|
|
|
|
- changePriceData.list = [];
|
|
|
|
|
- changePriceSelData.value = [];
|
|
|
|
|
-};
|
|
|
|
|
-// 批量改价中表格设置价格按钮
|
|
|
|
|
-const inputPrice = (row) => {
|
|
|
|
|
- row.inputPriceShow = false;
|
|
|
|
|
- // nextTick(() => {
|
|
|
|
|
- // if (inputPriceRef.value) {
|
|
|
|
|
- // inputPriceRef.value.focus();
|
|
|
|
|
- // }
|
|
|
|
|
- // });
|
|
|
|
|
|
|
+// 导入 (--------------------------------------------------------------)
|
|
|
|
|
+const handleRemove = (uploadFile, uploadFiles) => {
|
|
|
|
|
+ // console.log(uploadFile.uid, uploadFiles);
|
|
|
};
|
|
};
|
|
|
-// 批量改价中表格设置价格按钮失去焦点
|
|
|
|
|
-const inputPriceBlur = (row) => {
|
|
|
|
|
- row.inputPriceShow = true;
|
|
|
|
|
|
|
+// 点击图片的查看按钮
|
|
|
|
|
+const handlePreview = (file) => {
|
|
|
|
|
+ // console.log(file);
|
|
|
};
|
|
};
|
|
|
-// 勾选房间类型后表格添加相应的数据
|
|
|
|
|
-const changePriceSelcet = (val) => {
|
|
|
|
|
- // console.log(val);
|
|
|
|
|
- // console.log(changePriceSelData.value);
|
|
|
|
|
- changePriceData.list = [];
|
|
|
|
|
- changePriceSelData.value.forEach((item) => {
|
|
|
|
|
- changePirceRoomType.value.forEach((i) => {
|
|
|
|
|
- // console.log(item == i.id);
|
|
|
|
|
- if (item == i.id) {
|
|
|
|
|
- changePriceData.list.push(i);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+// 限制上传图片的大小
|
|
|
|
|
+const beforeAvatarUpload = (rawFile) => {
|
|
|
|
|
+ console.log(rawFile.type);
|
|
|
|
|
+ // if (rawFile.type !== "image/jpeg") {
|
|
|
|
|
+ // ElMessage.error("图片格式必须为JPG/PNG格式!");
|
|
|
|
|
+ // return false;
|
|
|
|
|
+ // }
|
|
|
|
|
+ // return true;
|
|
|
};
|
|
};
|
|
|
-// 批量改价 删除时间段
|
|
|
|
|
-const delChangePriceTime = (index) => {
|
|
|
|
|
- changePrice.createTime = changePrice.createTime.filter((i, ind) => {
|
|
|
|
|
- return index != ind;
|
|
|
|
|
- });
|
|
|
|
|
|
|
+// 添加照片时往fileList列表中添加图片信息
|
|
|
|
|
+const handleChange = async (file, fileLists) => {
|
|
|
|
|
+ // console.log(file, "1111");
|
|
|
};
|
|
};
|
|
|
-// 批量改价 添加时间段
|
|
|
|
|
-const addChangePriceTime = () => {
|
|
|
|
|
- if (changePrice.createTime.length <= 10) {
|
|
|
|
|
- changePrice.createTime.push([]);
|
|
|
|
|
- } else {
|
|
|
|
|
- ElMessage({
|
|
|
|
|
- type: "warning",
|
|
|
|
|
- showClose: true,
|
|
|
|
|
- message: "最多可添加10个时间段",
|
|
|
|
|
- center: true,
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
-};
|
|
|
|
|
-// 批量改价 确定改价
|
|
|
|
|
-const notarizeRoomClose = async () => {
|
|
|
|
|
- let dateList = [];
|
|
|
|
|
- changePrice.createTime.forEach((item) => [dateList.push(item.join(","))]);
|
|
|
|
|
- // console.log(dateList);
|
|
|
|
|
- let priceList = [];
|
|
|
|
|
- changePriceData.list.forEach((item) => {
|
|
|
|
|
- console.log(item);
|
|
|
|
|
- priceList.push({
|
|
|
|
|
- managerId: item.managerId,
|
|
|
|
|
- houseId: item.id,
|
|
|
|
|
- price: item.price,
|
|
|
|
|
- createId: sessionStorage.getItem("roomId"),
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- let data = {
|
|
|
|
|
- dateList: dateList,
|
|
|
|
|
- priceList: priceList,
|
|
|
|
|
- };
|
|
|
|
|
|
|
+// 可以获取图片参数
|
|
|
|
|
+const handleUpload = async (file) => {
|
|
|
|
|
+ console.log(file, "22222222");
|
|
|
|
|
+ let data = new FormData();
|
|
|
|
|
+ data.set("file", file.file);
|
|
|
let res = await axios({
|
|
let res = await axios({
|
|
|
- method: "post",
|
|
|
|
|
- url: api.value + "/mhotel/house/price/modifyPriceBatch.action",
|
|
|
|
|
|
|
+ method: "get",
|
|
|
|
|
+ url: api.value + "/class-schedule/uploadSchedule",
|
|
|
headers: {
|
|
headers: {
|
|
|
- // token: sessionStorage.getItem("token"),
|
|
|
|
|
- // user_head: sessionStorage.getItem("userhead"),
|
|
|
|
|
|
|
+ token: sessionStorage.getItem("token"),
|
|
|
|
|
+ user_head: sessionStorage.getItem("user_head"),
|
|
|
},
|
|
},
|
|
|
data: data,
|
|
data: data,
|
|
|
});
|
|
});
|
|
|
|
|
+ console.log(res, "导入课表信息");
|
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
|
- getList();
|
|
|
|
|
- roomCloseDialogVisible.value = false;
|
|
|
|
|
- changePriceData.list = [];
|
|
|
|
|
- changePriceSelData.value = [];
|
|
|
|
|
ElMessage({
|
|
ElMessage({
|
|
|
type: "success",
|
|
type: "success",
|
|
|
showClose: true,
|
|
showClose: true,
|
|
|
message: res.data.message,
|
|
message: res.data.message,
|
|
|
center: true,
|
|
center: true,
|
|
|
});
|
|
});
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: res.data.message,
|
|
|
|
|
+ center: true,
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
- console.log(res, "确定改价");
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-// 改价记录弹窗(---------------------------------------)
|
|
|
|
|
-const recordPrice = async () => {
|
|
|
|
|
- recordDialogVisible.value = true;
|
|
|
|
|
- recordPriceData();
|
|
|
|
|
-};
|
|
|
|
|
-// 改价数据
|
|
|
|
|
-const recordPriceData = async () => {
|
|
|
|
|
|
|
+//导出功能
|
|
|
|
|
+const importExcel = lodash.debounce(async () => {
|
|
|
let data = {
|
|
let data = {
|
|
|
- page: recordPage.value,
|
|
|
|
|
- rows: recordSize.value,
|
|
|
|
|
- managerId: sessionStorage.getItem("token"),
|
|
|
|
|
- houseId: recordSearch.roomType, // 房型id
|
|
|
|
|
- operationName: recordSearch.keyWord, // 关键字查询
|
|
|
|
|
|
|
+ teacherName: searchInput.keyWord, // 关键字查询
|
|
|
|
|
+ stateTime:"",
|
|
|
|
|
+ endTime:""
|
|
|
};
|
|
};
|
|
|
- if (recordSearch.operationTime) {
|
|
|
|
|
- data.operationTime = recordSearch.operationTime.join(",");
|
|
|
|
|
- }
|
|
|
|
|
- if (recordSearch.setDate) {
|
|
|
|
|
- data.setDate = recordSearch.setDate.join(",");
|
|
|
|
|
|
|
+ if (searchInput.createTime) {
|
|
|
|
|
+ data.stateTime = searchInput.createTime[0];
|
|
|
|
|
+ data.endTime = searchInput.createTime[1];
|
|
|
}
|
|
}
|
|
|
let res = await axios({
|
|
let res = await axios({
|
|
|
method: "get",
|
|
method: "get",
|
|
|
- url: api.value + "/mhotel/house/price/queryPageHistory.action",
|
|
|
|
|
|
|
+ url: api.value + "/class-schedule/downloadSchedule",
|
|
|
headers: {
|
|
headers: {
|
|
|
- // token: sessionStorage.getItem("token"),
|
|
|
|
|
- // user_head: sessionStorage.getItem("userhead"),
|
|
|
|
|
|
|
+ token: sessionStorage.getItem("token"),
|
|
|
|
|
+ user_head: sessionStorage.getItem("user_head"),
|
|
|
},
|
|
},
|
|
|
params: data,
|
|
params: data,
|
|
|
|
|
+ responseType: "blob",
|
|
|
});
|
|
});
|
|
|
- if (res.data.code == 200) {
|
|
|
|
|
- recordData.list = res.data.data.pageList;
|
|
|
|
|
- recordTotal.value = res.data.data.total;
|
|
|
|
|
- }
|
|
|
|
|
- console.log(res, "改价记录");
|
|
|
|
|
-};
|
|
|
|
|
-// 查询数据
|
|
|
|
|
-const recordPriceSearch = () => {
|
|
|
|
|
- recordPriceData();
|
|
|
|
|
-};
|
|
|
|
|
-// 取消改价记录
|
|
|
|
|
-const cancelRecord = () => {
|
|
|
|
|
- recordDialogVisible.value = false;
|
|
|
|
|
-};
|
|
|
|
|
-
|
|
|
|
|
-// 确认添加员工
|
|
|
|
|
-// const submitAdd = async (formEl) => {
|
|
|
|
|
-// if (!formEl) return;
|
|
|
|
|
-// await formEl.validate(async (valid, fields) => {
|
|
|
|
|
-// if (valid) {
|
|
|
|
|
-// if (dialongTitle.value == "添加员工") {
|
|
|
|
|
-// let data = {
|
|
|
|
|
-// userName: ruleForm.userName,
|
|
|
|
|
-// cardNumber: ruleForm.cardNumber,
|
|
|
|
|
-// userzzId: ruleForm.userzzId,
|
|
|
|
|
-// userPhone: ruleForm.userPhone,
|
|
|
|
|
-// schoolId: ruleForm.schoolId,
|
|
|
|
|
-// workType: ruleForm.workType,
|
|
|
|
|
-// articleIds: ruleForm.articleIds,
|
|
|
|
|
-// buildIds: ruleForm.buildIds,
|
|
|
|
|
-// teamId: ruleForm.teamId,
|
|
|
|
|
-// acceptanceAssessTime: ruleForm.acceptanceTime,
|
|
|
|
|
-// maintenanceAssessTime: ruleForm.maintenanceTime,
|
|
|
|
|
-// };
|
|
|
|
|
-// let res = await axios({
|
|
|
|
|
-// method: "post",
|
|
|
|
|
-// url: api.value + "/repairUser/insertRepairUserSetting",
|
|
|
|
|
-// headers: {
|
|
|
|
|
-// token: sessionStorage.getItem("token"),
|
|
|
|
|
-// user_head: sessionStorage.getItem("userhead"),
|
|
|
|
|
-// },
|
|
|
|
|
-// data: data,
|
|
|
|
|
-// });
|
|
|
|
|
-// console.log(res, "添加员工");
|
|
|
|
|
-// if (res.data.code == 200) {
|
|
|
|
|
-// getList();
|
|
|
|
|
-// ElMessage({
|
|
|
|
|
-// type: "success",
|
|
|
|
|
-// showClose: true,
|
|
|
|
|
-// message: res.data.message,
|
|
|
|
|
-// center: true,
|
|
|
|
|
-// });
|
|
|
|
|
-// addDialogVisible.value = false;
|
|
|
|
|
-// ruleFormRef.value.resetFields();
|
|
|
|
|
-// } else {
|
|
|
|
|
-// ElMessage({
|
|
|
|
|
-// type: "error",
|
|
|
|
|
-// showClose: true,
|
|
|
|
|
-// message: res.data.message,
|
|
|
|
|
-// center: true,
|
|
|
|
|
-// });
|
|
|
|
|
-// }
|
|
|
|
|
-// } else {
|
|
|
|
|
-// let data = {
|
|
|
|
|
-// userName: ruleForm.userName,
|
|
|
|
|
-// cardNumber: ruleForm.cardNumber,
|
|
|
|
|
-// userzzId: ruleForm.userzzId,
|
|
|
|
|
-// userPhone: ruleForm.userPhone,
|
|
|
|
|
-// schoolId: ruleForm.schoolId,
|
|
|
|
|
-// workType: ruleForm.workType,
|
|
|
|
|
-// articleIds: ruleForm.articleIds,
|
|
|
|
|
-// buildIds: ruleForm.buildIds,
|
|
|
|
|
-// teamId: ruleForm.teamId,
|
|
|
|
|
-// acceptanceAssessTime: ruleForm.acceptanceTime,
|
|
|
|
|
-// maintenanceAssessTime: ruleForm.maintenanceTime,
|
|
|
|
|
-// id: ruleForm.id,
|
|
|
|
|
-// };
|
|
|
|
|
-// let res = await axios({
|
|
|
|
|
-// method: "post",
|
|
|
|
|
-// url: api.value + "/repairUser/updateRepairUserSettingById",
|
|
|
|
|
-// headers: {
|
|
|
|
|
-// token: sessionStorage.getItem("token"),
|
|
|
|
|
-// user_head: sessionStorage.getItem("userhead"),
|
|
|
|
|
-// },
|
|
|
|
|
-// data: data,
|
|
|
|
|
-// });
|
|
|
|
|
-// console.log(res, "编辑员工");
|
|
|
|
|
-// if (res.data.code == 200) {
|
|
|
|
|
-// getList();
|
|
|
|
|
-// ElMessage({
|
|
|
|
|
-// type: "success",
|
|
|
|
|
-// showClose: true,
|
|
|
|
|
-// message: res.data.message,
|
|
|
|
|
-// center: true,
|
|
|
|
|
-// });
|
|
|
|
|
-// addDialogVisible.value = false;
|
|
|
|
|
-// ruleFormRef.value.resetFields();
|
|
|
|
|
-// } else {
|
|
|
|
|
-// ElMessage({
|
|
|
|
|
-// type: "error",
|
|
|
|
|
-// showClose: true,
|
|
|
|
|
-// message: res.data.message,
|
|
|
|
|
-// center: true,
|
|
|
|
|
-// });
|
|
|
|
|
-// }
|
|
|
|
|
-// }
|
|
|
|
|
-// } else {
|
|
|
|
|
-// console.log("error submit!", fields);
|
|
|
|
|
-// }
|
|
|
|
|
-// });
|
|
|
|
|
-// };
|
|
|
|
|
-
|
|
|
|
|
-//导出功能
|
|
|
|
|
-const importExcel = lodash.debounce(async () => {
|
|
|
|
|
- let data = new FormData();
|
|
|
|
|
- data.set("managerId", sessionStorage.getItem("token"));
|
|
|
|
|
- data.set("houseId", recordSearch.roomType);
|
|
|
|
|
- data.set("operationName", recordSearch.keyWord);
|
|
|
|
|
- if (recordSearch.operationTime) {
|
|
|
|
|
- data.set("operationTime", recordSearch.operationTime.join(","));
|
|
|
|
|
- }
|
|
|
|
|
- let res = await axios({
|
|
|
|
|
- method: "post",
|
|
|
|
|
- url: api.value + "/mhotel/house/price/exportHistory.action",
|
|
|
|
|
- headers: {
|
|
|
|
|
- // token: sessionStorage.getItem("token"),
|
|
|
|
|
- },
|
|
|
|
|
- data: data,
|
|
|
|
|
- });
|
|
|
|
|
- console.log(res, "导出台账管理");
|
|
|
|
|
- if (res.data.code == 200) {
|
|
|
|
|
- // var downloadPath = res.data.downurl;
|
|
|
|
|
- // // window.open(downloadPath);
|
|
|
|
|
- // window.location.href = downloadPath;
|
|
|
|
|
- // var downloadLink = document.createElement("a");
|
|
|
|
|
- // downloadLink.style.display = "none"; // 使其隐藏
|
|
|
|
|
- // downloadLink.href = downloadPath;
|
|
|
|
|
- // downloadLink.download = "";
|
|
|
|
|
- // downloadLink.click();
|
|
|
|
|
- // document.body.appendChild(downloadLink);
|
|
|
|
|
- // document.body.removeChild(downloadLink);
|
|
|
|
|
|
|
+ console.log(res, "导出课表信息");
|
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
|
+ let name = `改价记录数据`;
|
|
|
|
|
+ var content = res.data;
|
|
|
|
|
+ var datas = new Blob([content]);
|
|
|
|
|
+ var downloadUrl = window.URL.createObjectURL(datas);
|
|
|
|
|
+ var anchor = document.createElement("a");
|
|
|
|
|
+ anchor.href = downloadUrl;
|
|
|
|
|
+ anchor.download = name + ".xlsx";
|
|
|
|
|
+ anchor.click();
|
|
|
|
|
+ window.URL.revokeObjectURL(datas);
|
|
|
ElMessage({
|
|
ElMessage({
|
|
|
type: "success",
|
|
type: "success",
|
|
|
showClose: true,
|
|
showClose: true,
|
|
|
|
|
+ message: "导出成功",
|
|
|
|
|
+ center: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: "error",
|
|
|
|
|
+ showClose: true,
|
|
|
message: res.data.message,
|
|
message: res.data.message,
|
|
|
center: true,
|
|
center: true,
|
|
|
});
|
|
});
|
|
@@ -853,15 +344,7 @@ const tableRowClassName = ({ row, rowIndex }) => {
|
|
|
}
|
|
}
|
|
|
return "";
|
|
return "";
|
|
|
};
|
|
};
|
|
|
-// 表格斑马纹颜色修改
|
|
|
|
|
-const tableRowClassName2 = ({ row, rowIndex }) => {
|
|
|
|
|
- if (rowIndex % 2 === 0) {
|
|
|
|
|
- return "even2";
|
|
|
|
|
- } else if (rowIndex % 2 !== 0) {
|
|
|
|
|
- return "odd2";
|
|
|
|
|
- }
|
|
|
|
|
- return "";
|
|
|
|
|
-};
|
|
|
|
|
|
|
+
|
|
|
// 分页
|
|
// 分页
|
|
|
const handleCurrentChange = (value) => {
|
|
const handleCurrentChange = (value) => {
|
|
|
// console.log(value);
|
|
// console.log(value);
|
|
@@ -946,6 +429,12 @@ onBeforeMount(async () => {
|
|
|
|
|
|
|
|
.filter_block {
|
|
.filter_block {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
|
|
+ .avatar-uploader{
|
|
|
|
|
+ margin-right: 20px;
|
|
|
|
|
+ :deep(.el-upload-list){
|
|
|
|
|
+ display: none;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.search {
|
|
.search {
|