index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. <template>
  2. <a-card :bordered="false">
  3. <a-tabs default-active-key="1" @change="callback">
  4. <a-tab-pane key="1" tab="房务数据概览">
  5. <div>
  6. <h3>今日房务管理</h3>
  7. <a-card style="width:50%;" class="card">
  8. <div class="grid-day">
  9. <div>
  10. <div>今日锁房</div>
  11. <div>{{LockedRoom}}间</div>
  12. </div>
  13. <div>
  14. <div>正在维修中房间</div>
  15. <div>{{RepairingRoom}}间</div>
  16. </div>
  17. <div>
  18. <div>今日完成维修房间</div>
  19. <div>{{TodayRepairRoom}}间</div>
  20. </div>
  21. </div>
  22. </a-card>
  23. </div>
  24. <div>
  25. <h3>分派房</h3>
  26. <div class="grid-assign">
  27. <a-card class="card">
  28. <div class="assign-flex">
  29. <div>今日待派房间<span>0</span>间,已经分配了<span>0</span>间,剩余<span>0</span>间</div>
  30. <div style="color:#1890FF" @click="showAssignModal">点击分配</div>
  31. </div>
  32. <div style="text-indent: 2em;" class="assign-content">
  33. <div v-for="(item, index) in 15" :key="index">
  34. <span style="color:#1890FF">{{'小明'}}</span>:{{'0间'}}
  35. </div>
  36. </div>
  37. </a-card>
  38. <a-card class="card">
  39. <div>
  40. <div>房务审核记录及调整</div>
  41. </div>
  42. <div class="assgin-center">0条需要审核,<span @click="lookLook">点击查看></span> </div>
  43. </a-card>
  44. <a-card class="card">
  45. <div>
  46. <div>房屋审核记录及调整</div>
  47. </div>
  48. <div class="assgin-right">
  49. <a-button @click="auditRecords">点击设置</a-button>
  50. </div>
  51. </a-card>
  52. </div>
  53. </div>
  54. <div>
  55. <h3>房扫记录</h3>
  56. <div class="">
  57. <ClearRecords />
  58. </div>
  59. </div>
  60. <div>
  61. <h3>房间易耗品记录</h3>
  62. <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;">
  63. <div style="display:flex;align-items:center;width:100%;">
  64. <div class="list-container">
  65. <div class="list-item" v-for="(item, index) in list" :key="index" :class="{active: activeIndex === index}" @click="handleClick(index)">
  66. {{ item }}
  67. </div>
  68. </div>
  69. <a-range-picker v-show="activeIndex==4" @change="onChange" size="large" />
  70. </div>
  71. <a-button @click="dispose" style="background:#1890ff;color:#fff;">配置易耗品</a-button>
  72. </div>
  73. <a-card class="card">
  74. <div>
  75. 客房易耗品消耗数量
  76. </div>
  77. <div>
  78. 布草换洗
  79. </div>
  80. </a-card>
  81. </div>
  82. </a-tab-pane>
  83. <a-tab-pane key="2" tab="维修记录" force-render>
  84. <MaintenanceRecords />
  85. </a-tab-pane>
  86. <a-tab-pane key="3" tab="锁房记录">
  87. <LockRoomRecords />
  88. </a-tab-pane>
  89. <a-tab-pane key="4" tab="房扫管理">
  90. <ClearRoomManagement />
  91. </a-tab-pane>
  92. <a-tab-pane key="5" tab="房型易耗品">
  93. <HouseTypeConsumablesVue />
  94. </a-tab-pane>
  95. </a-tabs>
  96. <!-- 分派房务弹窗 -->
  97. <a-modal v-model="assignVisible" title="分派房务" @ok="handleAssignOk" width="70%">
  98. <div style="background-color: #ecf8ff; display: flex; justify-content: center; align-items: center;height:40px;border-radius:5px;overflow: hidden;">
  99. <div style="width: 10px; height: 100%; background-color: #1890FF;"> </div>
  100. <div style="text-align: center;flex:1;">剩余脏房 {{0}} 间 续(脏)房 {{5}} 间 退(脏)房 {{1}} 间</div>
  101. </div>
  102. <a-table ref="table" size="middle" :scroll="{ x: true, y: 600 }" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="false" :loading="loading" :rowSelection="{
  103. selectedRowKeys: selectedRowKeys,
  104. onChange: onSelectChange,
  105. }" class="j-table-force-nowrap" @change="handleTableChange">
  106. <template slot="houseDetail" slot-scope="text, record">
  107. <div>
  108. 退(脏)房: <span class="check-out" v-for="(item, index) in !record || 6" :key="index">{{8306+index + ''}}</span>
  109. </div>
  110. <div style="margin-top:10px;">
  111. 续(脏)房: <span class="continue" v-for="(item, index) in !record || 6" :key="index">{{210+index + ''}}</span>
  112. </div>
  113. </template>
  114. <template slot="prefix_name" slot-scope="text, record">
  115. {{ (record.prefix || "") + record.name }}
  116. </template>
  117. <template slot="htmlSlot" slot-scope="text">
  118. <div v-html="text"></div>
  119. </template>
  120. <span slot="action" slot-scope="text, record">
  121. <a @click="handVisible = true">手动分房</a>
  122. </span>
  123. </a-table>
  124. </a-modal>
  125. <!-- 手动分房弹窗 -->
  126. <a-modal v-model="handVisible" title="房间列表" @ok="handVisible=false" width="50%">
  127. <a-card title="退(脏)房">
  128. <div style="display:flex; margin-right:6px;flex-wrap:wrap;">
  129. <div @click="checkOut(item)" class="check-out" v-for="item in 5" :key="item.id">{{item}}</div>
  130. </div>
  131. </a-card>
  132. <br />
  133. <a-card title="续(脏)房">
  134. <div style="display:flex; margin-right:6px;flex-wrap:wrap;">
  135. <div @click="continueHouse(item)" class="check-out" v-for="item in 5" :key="item.id">{{item}}</div>
  136. </div>
  137. </a-card>
  138. </a-modal>
  139. <!-- 手动分房弹窗结束 -->
  140. <!-- 分派房弹窗结束 -->
  141. <!-- 房务审核记录及调整点击查看弹窗 -->
  142. <LookLookVue ref="lookModal" />
  143. <!-- 房务审核记录及调整点击查看弹窗结束 -->
  144. <!-- 房务审核记录及调整点击设置弹窗 -->
  145. <AuditRecords ref="auditModal" />
  146. <!-- 结束 -->
  147. <!-- 配置易耗品弹窗 -->
  148. <ConfigureConsumables ref="configModal" />
  149. <!-- 配置易耗品弹窗结束 -->
  150. </a-card>
  151. </template>
  152. <script>
  153. import ClearRecords from './tabList/clearRecords.vue'
  154. import ClearRoomManagement from './tabList/clearRoomManagement.vue'
  155. import HouseTypeConsumablesVue from './tabList/houseTypeConsumables.vue'
  156. import LockRoomRecords from './tabList/LockRoomRecords.vue'
  157. import MaintenanceRecords from './tabList/maintenanceRecords.vue'
  158. import LookLookVue from './modalList/lookLook.vue'
  159. import AuditRecords from './modalList/auditRecords.vue'
  160. import ConfigureConsumables from './modalList/configureConsumables.vue'
  161. import {
  162. JeecgListMixin
  163. } from "@/mixins/JeecgListMixin";
  164. // import roomNumModal from "./roomNumModal.vue"; // todo roomLayoutForm 需要替换成房型的表单弹窗
  165. // import roomImgs from './roomImagesForm.vue'
  166. import {
  167. getAllLayouts
  168. } from "@/api/roomLayout";
  169. import {
  170. delBatch,
  171. delAll
  172. } from '@/api/roomBuildingApi'
  173. import { HousekeepingApi } from '@/api/fwApi.js'
  174. let hotelInfo = JSON.parse(localStorage.getItem("storeInfo"));
  175. export default {
  176. mixins: [JeecgListMixin],
  177. components: {
  178. ClearRecords,
  179. MaintenanceRecords,
  180. LockRoomRecords,
  181. ClearRoomManagement,
  182. HouseTypeConsumablesVue,
  183. LookLookVue,
  184. AuditRecords,
  185. ConfigureConsumables
  186. },
  187. data() {
  188. return {
  189. list: ['今天', '昨日', '本周', '本月', '更多'],
  190. activeIndex: 0,
  191. dataSource:[],
  192. assignVisible: false,
  193. handVisible: false,
  194. //锁房总数
  195. LockedRoom:'0',
  196. //正在维修中总数
  197. RepairingRoom:'0',
  198. //今日完成维修总数
  199. TodayRepairRoom:'0',
  200. // 表头
  201. columns: [{
  202. title: "姓名",
  203. align: "center",
  204. dataIndex: "hotelName",
  205. },
  206. {
  207. title: "退房",
  208. // align: "center",
  209. dataIndex: "房间明细",
  210. scopedSlots: {
  211. customRender: "houseDetail"
  212. },
  213. },
  214. {
  215. title: "操作",
  216. dataIndex: "action",
  217. align: "center",
  218. fixed: "right",
  219. width: 147,
  220. scopedSlots: {
  221. customRender: "action"
  222. },
  223. },
  224. ],
  225. url: {
  226. // list: 'org.jeecg.modules.business/busMarketMember/list',
  227. list: "/rooms/cesRooms/list",
  228. delete: "/rooms/cesRooms/remove",
  229. deleteBatch: "/rooms/cesRooms/deleteBatch",
  230. exportXlsUrl: "/rooms/cesRooms/exportXls",
  231. importExcelUrl: "rooms/cesRooms/importExcel",
  232. },
  233. buildingFloorSearchTag: {
  234. name: null
  235. },
  236. dictOptions: {},
  237. superFieldList: [],
  238. selectedRowKeys: [],
  239. }
  240. },
  241. methods: {
  242. callback(key) {
  243. console.log(key)
  244. },
  245. handleClick(index) {
  246. this.activeIndex = index
  247. this.searchQuery()
  248. },
  249. onChange(date, dateString) {
  250. console.log(date, dateString)
  251. },
  252. //点击弹出框
  253. showAssignModal() {
  254. this.assignVisible = true
  255. },
  256. handleAssignOk() {
  257. this.assignVisible = false
  258. },
  259. continueHouse(item) {
  260. console.log(item)
  261. },
  262. checkOut(item) {
  263. console.log(item)
  264. },
  265. lookLook() {
  266. this.$refs.lookModal.visible = true
  267. this.$refs.lookModal.title = '房务审核'
  268. },
  269. //房务审核记录设置
  270. auditRecords() {
  271. this.$refs.auditModal.visible = true
  272. this.$refs.auditModal.title = '分派规则'
  273. },
  274. /**
  275. * 配置易耗品
  276. */
  277. dispose(){
  278. this.$refs.configModal.visible = true
  279. this.$refs.configModal.title = '配置易耗品'
  280. }
  281. },
  282. mounted() {
  283. getAllLayouts().then((res) => {
  284. if (res.code == 200) {
  285. this.layouts = res.result.records;
  286. this.loadData();
  287. }
  288. });
  289. HousekeepingApi.getLockedRoom().then(res=>{
  290. this.LockedRoom = res.result.total
  291. })
  292. HousekeepingApi.getInRepair().then(res=>{
  293. this.RepairingRoom = res.result.total
  294. })
  295. HousekeepingApi.getRepairRoom().then(res=>{
  296. this.TodayRepairRoom = res.result.total
  297. })
  298. }
  299. }
  300. </script>
  301. <style lang="less">
  302. .grid-day {
  303. display: grid;
  304. grid-template-columns: 1fr 1fr 1fr;
  305. }
  306. .grid-assign {
  307. display: grid;
  308. grid-template-columns: 2fr 1fr 1fr;
  309. gap: 10px;
  310. .assign-flex {
  311. display: flex;
  312. justify-content: space-between;
  313. }
  314. .assign-content {
  315. display: flex;
  316. flex-wrap: wrap;
  317. margin-top: 18px;
  318. }
  319. .assgin-center {
  320. color: #1890ff;
  321. text-align: center;
  322. margin-top: 25px;
  323. }
  324. .assgin-right {
  325. text-align: center;
  326. margin-top: 18px;
  327. button {
  328. background: #1890ff;
  329. color: #fff;
  330. }
  331. }
  332. }
  333. .grid-clearRecords {
  334. display: grid;
  335. grid-template-columns: 2fr 1fr;
  336. gap: 10px;
  337. }
  338. .list-container {
  339. display: grid;
  340. grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  341. border: solid 1px #d9d9d9;
  342. width: 300px;
  343. border-radius: 5px;
  344. margin-right: 10px;
  345. overflow: hidden;
  346. }
  347. .list-item {
  348. padding: 10px;
  349. border-right: solid 1px #d9d9d9;
  350. cursor: pointer;
  351. text-align: center;
  352. }
  353. .list-item.active {
  354. background-color: #1890ff;
  355. color: #fff;
  356. }
  357. .card {
  358. box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
  359. transition: 0.3s;
  360. border-radius: 5px;
  361. /* optional */
  362. }
  363. .card:hover {
  364. box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  365. }
  366. h3 {
  367. margin-top: 15px;
  368. }
  369. .check-out{
  370. // width: 22px;
  371. // height: 12px;
  372. background: #909399;
  373. padding: 5px;
  374. color: #fff;
  375. border-radius: 5px;
  376. border: 1px solid #c9caca;
  377. display: inline-block;
  378. vertical-align: middle;
  379. margin-right: 10px;
  380. }
  381. .continue{
  382. background: #1890ff60;
  383. padding: 5px;
  384. color: #fff;
  385. border-radius: 5px;
  386. border: 1px solid #1890ff;
  387. display: inline-block;
  388. vertical-align: middle;
  389. margin-right: 10px;
  390. }
  391. </style>