fangtailive.vue 56 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759
  1. <template>
  2. <a-card :bordered="false">
  3. <a-tabs v-model="activeKey" type="card" @change="tabsClick">
  4. <a-tab-pane key="1" tab="实时房态"> </a-tab-pane>
  5. <a-tab-pane key="2" tab="日历房态"> </a-tab-pane>
  6. <a-tab-pane key="3" tab="客单"> </a-tab-pane>
  7. <a-tab-pane key="4" tab="远期房态"> </a-tab-pane>
  8. <a-tab-pane key="5" tab="物品租借"> </a-tab-pane>
  9. <a-tab-pane key="6" tab="客人留言"> </a-tab-pane>
  10. <a-tab-pane key="7" tab="客人物品管理"> </a-tab-pane>
  11. </a-tabs>
  12. <div
  13. v-if="activeKey === '1'"
  14. style="display: flex; height: calc(100vh - 240px)"
  15. >
  16. <div style="width: 80%" class="course-week">
  17. <div style="display: flex; flex-direction: column">
  18. <div style="display: flex; gap: 5px; flex-flow: wrap">
  19. <a-dropdown :disabled="scheduleBtnDis">
  20. <a-menu slot="overlay" @click="scheduleClick">
  21. <a-menu-item key="1"> 散客预定 </a-menu-item>
  22. <a-menu-item key="2"> 团队预定</a-menu-item>
  23. </a-menu>
  24. <a-button type="danger"> 预定 <a-icon type="down" /> </a-button>
  25. </a-dropdown>
  26. <a-dropdown :disabled="checkInBtnDis">
  27. <a-menu slot="overlay" @click="handleMenuClick">
  28. <a-menu-item key="1"> 散客入住 </a-menu-item>
  29. <a-menu-item key="2"> 团队入住</a-menu-item>
  30. </a-menu>
  31. <a-button type="danger">
  32. 入住 <a-icon type="down" />
  33. </a-button> </a-dropdown
  34. ><a-button
  35. style="margin-bottom: 10px"
  36. @click="handleClean"
  37. :disabled="cleanDisabled"
  38. type="danger"
  39. >置干净</a-button
  40. ><a-button
  41. style="margin-bottom: 10px"
  42. @click="handleDirty"
  43. type="danger"
  44. :disabled="dirtyDisabled"
  45. >置脏</a-button
  46. >
  47. <a-button
  48. v-if="wxCompleteBtn"
  49. style="margin-bottom: 10px"
  50. @click="handleCompleteRepair"
  51. type="danger"
  52. >完成维修</a-button
  53. >
  54. <a-button
  55. v-else
  56. style="margin-bottom: 10px"
  57. @click="handleWx"
  58. :disabled="lockDisabled"
  59. type="danger"
  60. >置维修</a-button
  61. >
  62. <a-button
  63. v-if="offLockBtn"
  64. style="margin-bottom: 10px"
  65. @click="handleOffLock"
  66. type="danger"
  67. >解锁</a-button
  68. ><a-button
  69. v-else
  70. style="margin-bottom: 10px"
  71. @click="handleLock"
  72. :disabled="lockDisabled"
  73. type="danger"
  74. >锁房</a-button
  75. >
  76. <a-button
  77. disabled
  78. style="margin-bottom: 10px"
  79. @click="handleAdd"
  80. type="danger"
  81. >联房</a-button
  82. ><a-button
  83. disabled
  84. style="margin-bottom: 10px"
  85. @click="handleAdd"
  86. type="danger"
  87. >批量制卡</a-button
  88. >
  89. <!-- <a-button style="margin-bottom: 10px" @click="toPage" type="danger"
  90. >查询散客详单</a-button
  91. >
  92. <a-button
  93. style="margin-bottom: 10px"
  94. @click="toTeamPage"
  95. type="danger"
  96. >查询团队详单</a-button
  97. > -->
  98. </div>
  99. <div class="week-top">
  100. <div class="w-choose-status">
  101. <div v-for="sta in roomStatusColorList">
  102. <span class="square" :style="{ background: sta.extend }"></span>
  103. <span class="title">{{ sta.title }}</span>
  104. </div>
  105. </div>
  106. <div class="w-choose-status">
  107. 批量操作<a-switch
  108. v-model="multipleRoom"
  109. @change="multipleRoomChange"
  110. />
  111. </div>
  112. </div>
  113. </div>
  114. <div class="week-table" style="overflow: hidden auto">
  115. <div id="components-grid-demo-playground" class="w-time-period-list">
  116. <div
  117. v-for="(period, cIndex) in roomList"
  118. :key="`period${cIndex}`"
  119. style="padding: 5px"
  120. >
  121. <p>
  122. <span style="color: rgba(0, 186, 173, 1); font-weight: 600">
  123. {{ period.buildingName }}{{ period.name }}
  124. </span>
  125. <a-divider type="vertical" />
  126. <span style="padding-right: 5px"
  127. >{{ period.rooms.length }}间:在住{{
  128. checkInCount(period.rooms)
  129. }}间/空置{{ vacantCount(period.rooms) }}间</span
  130. >
  131. <a-icon
  132. type="right"
  133. v-if="period.collapse == 0"
  134. @click="collapseClick(period, 1)"
  135. />
  136. <a-icon type="down" v-else @click="collapseClick(period, 0)" />
  137. </p>
  138. <a-row :gutter="[5, 5]" v-show="period.collapse == 1">
  139. <a-col
  140. v-for="(roomLive, roomLiveIndex) in period.rooms"
  141. :key="`period${cIndex}roomLive${roomLiveIndex}`"
  142. :span="3"
  143. @click.stop="roomItemClick(roomLive)"
  144. @dblclick.stop="handleBillInfo(roomLive)"
  145. >
  146. <!-- <div class="post-mark"></div> -->
  147. <div
  148. class="room-item"
  149. :style="{
  150. background:
  151. roomStatusColorList && roomStatusColorList.length > 0
  152. ? getRoomStatusColor(roomLive.roomInfo.roomStatus)
  153. : '',
  154. }"
  155. >
  156. <div
  157. class="select-cell"
  158. v-if="roomLive.roomInfo.state == 88"
  159. >
  160. <a-icon
  161. type="check-circle"
  162. theme="twoTone"
  163. two-tone-color="#52c41a"
  164. style="font-size: 40px"
  165. />
  166. </div>
  167. <a-popover placement="rightTop">
  168. <template
  169. slot="content"
  170. v-if="
  171. roomLive.livingData && roomLive.livingData.livingOrder
  172. "
  173. >
  174. <p>
  175. 入住:{{ roomLive.livingData.livingOrder.arrivalTime }}
  176. </p>
  177. <p>
  178. 预离:{{ roomLive.livingData.livingOrder.dueOutTime }}
  179. </p>
  180. <p>
  181. 已住:{{ roomLive.livingData.livingOrder.liveDayCount }}晚 已付:{{ roomLive.livingData.livingOrder.shouKuan }}元
  182. </p>
  183. <!-- <p>来源:{{ roomLive.detail.mobile }} 消费:300元</p> -->
  184. <p>
  185. 房价:{{
  186. roomLive.livingData.price &&
  187. roomLive.livingData.price.length > 0
  188. ? roomLive.livingData.price[0].price
  189. : 0
  190. }}/晚 余额:{{ (roomLive.livingData.livingOrder.shouKuan - roomLive.livingData.livingOrder.xiaoFei) }}
  191. <!-- {{ roomLive.detail.balance }} -->
  192. </p>
  193. <p>
  194. 来源:{{
  195. getCustomerSourceList(
  196. roomLive.livingData.livingOrder.customerSource
  197. )
  198. }}
  199. </p>
  200. <p>注:{{ roomLive.livingData.livingOrder.remark }}</p>
  201. </template>
  202. <template
  203. slot="title"
  204. v-if="
  205. roomLive.livingData && roomLive.livingData.livingOrder
  206. "
  207. >
  208. <p>
  209. 客人姓名:{{
  210. roomLive.livingData.livingCustomers
  211. ? roomLive.livingData.livingCustomers.customerName
  212. : ""
  213. }}
  214. 性别:{{
  215. roomLive.livingData.livingCustomers
  216. ? roomLive.livingData.livingCustomers.gender == 1
  217. ? "男"
  218. : "女"
  219. : ""
  220. }}
  221. </p>
  222. <p>
  223. 手机号:{{
  224. roomLive.livingData.livingCustomers
  225. ? roomLive.livingData.livingCustomers.phone
  226. : ""
  227. }}
  228. </p>
  229. <!-- <p>同住人:{{ roomLive.detail.mobile }} 性别:女</p> -->
  230. </template>
  231. <template
  232. slot="content"
  233. v-if="
  234. !roomLive.livingData ||
  235. !roomLive.livingData.livingOrder
  236. "
  237. >
  238. <p>
  239. 房态:{{
  240. getRoomStatusName(roomLive.roomInfo.roomStatus)
  241. }}
  242. </p>
  243. <p
  244. v-if="
  245. roomLive.bookingData &&
  246. roomLive.bookingData.bookingCustomer
  247. "
  248. >
  249. 预定人:{{
  250. roomLive.bookingData.bookingCustomer.name
  251. }}
  252. </p>
  253. <p
  254. v-if="
  255. roomLive.bookingData &&
  256. roomLive.bookingData.bookingCustomer
  257. "
  258. >
  259. 手机:{{ roomLive.bookingData.bookingCustomer.phone }}
  260. </p>
  261. <p
  262. v-if="
  263. roomLive.bookingData &&
  264. roomLive.bookingData.bookingOrder
  265. "
  266. >
  267. 预抵日:{{
  268. roomLive.bookingData.bookingOrder.arrivalTime
  269. }}
  270. </p>
  271. <!-- <p>
  272. 备注:{{ roomLive.livingData.livingOrder.remark }}
  273. </p> -->
  274. </template>
  275. <template
  276. slot="title"
  277. v-if="
  278. !roomLive.livingData ||
  279. !roomLive.livingData.livingOrder
  280. "
  281. >
  282. <span>{{ roomLive.layout.name }}</span
  283. ><span>¥{{ roomLive.layout.marketPrice }}/晚</span>
  284. </template>
  285. <a-dropdown :trigger="['contextmenu']">
  286. <div style="height: 100%">
  287. <div
  288. style="
  289. text-overflow: ellipsis;
  290. white-space: nowrap;
  291. overflow: hidden;
  292. "
  293. >
  294. <span
  295. style="
  296. font-size: 20px;
  297. font-weight: 600;
  298. margin-right: 2px;
  299. "
  300. >{{ roomLive.roomInfo.name }}</span
  301. >
  302. {{ roomLive.layout.name }}
  303. </div>
  304. <template
  305. v-if="
  306. roomLive.livingData &&
  307. roomLive.livingData.livingOrder
  308. "
  309. >
  310. <!-- <div>
  311. <span style="margin-right: 5px">{{
  312. roomLive.detail.occupant
  313. }}</span
  314. ><a-tag
  315. :style="{
  316. color:
  317. sourceType[roomLive.detail.source || 1]
  318. .color,
  319. }"
  320. >携</a-tag
  321. >
  322. </div> -->
  323. <div>
  324. <span>
  325. {{
  326. roomLive.livingData.livingCustomers
  327. .customerName
  328. }}
  329. <a-tag
  330. color="pink"
  331. v-if="
  332. roomLive.livingData.livingOrder
  333. .vipCustomerId
  334. "
  335. >
  336. vip
  337. </a-tag>
  338. </span>
  339. </div>
  340. <div>
  341. <span
  342. >{{
  343. roomLive.livingData.livingOrder.liveDayCount
  344. }}天/{{
  345. roomLive.livingData.livingOrder.arrivalTime.substr(
  346. 5,
  347. 5
  348. )
  349. }}</span
  350. >
  351. </div>
  352. <div
  353. style="
  354. text-overflow: ellipsis;
  355. white-space: nowrap;
  356. overflow: hidden;
  357. "
  358. >
  359. <!-- <span
  360. >¥{{ roomLive.detail.amout }}/付{{
  361. roomLive.detail.payAmount
  362. }}/余{{ roomLive.detail.balance }}</span
  363. > -->
  364. <span
  365. >¥{{
  366. roomLive.livingData.price &&
  367. roomLive.livingData.price.length > 0
  368. ? roomLive.livingData.price[0].price
  369. : 0
  370. }}/付{{
  371. roomLive.livingData && roomLive.livingData.livingOrder ?
  372. roomLive.livingData.livingOrder.shouKuan:0
  373. }}/余{{
  374. roomLive.livingData && roomLive.livingData.livingOrder ?
  375. (roomLive.livingData.livingOrder.shouKuan - roomLive.livingData.livingOrder.xiaoFei):0
  376. }}</span
  377. >
  378. </div>
  379. <a-tag color="blue" v-if="
  380. roomLive.livingData && roomLive.livingData.livingOrder
  381. && ((roomLive.livingData.livingOrder.shouKuan - roomLive.livingData.livingOrder.xiaoFei) < 0)
  382. ">欠</a-tag>
  383. <a-tag
  384. color="blue"
  385. v-if="
  386. roomLive.livingData &&
  387. roomLive.livingData.livingOrder &&
  388. roomLive.livingData.livingOrder.livingType == 2
  389. "
  390. >钟</a-tag
  391. >
  392. <a-tag
  393. color="blue"
  394. v-if="
  395. roomLive.livingData &&
  396. roomLive.livingData.livingOrder &&
  397. roomLive.livingData.livingOrder.isTeam
  398. "
  399. >团</a-tag
  400. ><a-tag
  401. color="blue"
  402. v-if="
  403. roomLive.livingData &&
  404. roomLive.livingData.livingOrder &&
  405. roomLive.livingData.livingOrder.dueOutTime ==
  406. currentDate
  407. "
  408. >离</a-tag
  409. >
  410. <a-tag color="blue">{{
  411. getCustomerSourceList(
  412. roomLive.livingData.livingOrder.customerSource,
  413. true
  414. )
  415. }}</a-tag>
  416. </template>
  417. <template v-else>
  418. <div>
  419. <span
  420. >¥{{ roomLive.layout.marketPrice }}/晚</span
  421. >
  422. </div>
  423. <div>
  424. <span
  425. v-if="
  426. roomLive.bookingData &&
  427. roomLive.bookingData.bookingOrder &&
  428. roomLive.bookingData.bookingCustomer
  429. "
  430. >
  431. {{ roomLive.bookingData.bookingCustomer.name }}
  432. </span>
  433. </div>
  434. <div>
  435. <span
  436. v-if="
  437. roomLive.bookingData &&
  438. roomLive.bookingData.bookingOrder
  439. "
  440. >
  441. {{
  442. roomLive.bookingData.bookingOrder.dayCount
  443. }}天/{{
  444. roomLive.bookingData.bookingOrder.arrivalTime.substr(
  445. 5,
  446. 5
  447. )
  448. }}
  449. </span>
  450. </div>
  451. <!-- <div
  452. style="
  453. margin-top: 22px;
  454. text-overflow: ellipsis;
  455. white-space: nowrap;
  456. overflow: hidden;
  457. "
  458. >
  459. <span
  460. >注:{{
  461. roomLive.livingData.livingOrder.remark
  462. }}</span
  463. >
  464. </div> -->
  465. <a-tag
  466. v-if="
  467. roomLive.bookingData &&
  468. roomLive.bookingData.bookingOrder
  469. "
  470. >订</a-tag
  471. >
  472. </template>
  473. </div>
  474. <a-menu
  475. slot="overlay"
  476. @click="(e) => onMenuClick(e, roomLive)"
  477. >
  478. <a-menu-item
  479. key="1"
  480. v-if="
  481. !roomLive.livingData ||
  482. !roomLive.livingData.livingOrder
  483. "
  484. >
  485. 入住
  486. </a-menu-item>
  487. <a-menu-item
  488. key="2"
  489. v-if="
  490. !roomLive.livingData ||
  491. !roomLive.livingData.livingOrder
  492. "
  493. >
  494. 预定</a-menu-item
  495. >
  496. <a-menu-item
  497. key="31"
  498. v-if="roomLive.roomInfo.roomStatus === 2"
  499. >
  500. 置干净
  501. </a-menu-item>
  502. <a-menu-item key="3" v-else> 置脏 </a-menu-item>
  503. <a-menu-item
  504. key="41"
  505. v-if="roomLive.roomInfo.roomStatus === 5"
  506. >
  507. 完成维修
  508. </a-menu-item>
  509. <a-menu-item key="4" v-else> 置维修 </a-menu-item>
  510. <a-menu-item
  511. key="51"
  512. v-if="roomLive.roomInfo.roomStatus === 6"
  513. >
  514. 解锁
  515. </a-menu-item>
  516. <a-menu-item key="5" v-else> 锁房 </a-menu-item>
  517. <template v-if="roomLive.roomInfo.roomStatus === 3 || roomLive.roomInfo.roomStatus === 4">
  518. <a-menu-item key="6"> 详单 </a-menu-item>
  519. <a-menu-item key="7"> 账单 </a-menu-item>
  520. <a-menu-item key="8"> 查房 </a-menu-item>
  521. <a-menu-item key="9"> 入账 </a-menu-item>
  522. <a-menu-item key="10"> 续租/提前 </a-menu-item>
  523. <a-menu-item key="11"> 制房卡 </a-menu-item>
  524. <a-menu-item key="12"> 注销房卡 </a-menu-item>
  525. <a-menu-item key="13"> 换房 </a-menu-item>
  526. <a-menu-item key="14"> 合并联房 </a-menu-item>
  527. <a-menu-item key="15"> 添加同住 </a-menu-item>
  528. <a-menu-item key="16"> 结账退房 </a-menu-item>
  529. <a-menu-item key="17"> 撤销入住 </a-menu-item>
  530. </template>
  531. <a-menu-item key="18"> 日志 </a-menu-item>
  532. </a-menu>
  533. </a-dropdown>
  534. </a-popover>
  535. </div>
  536. </a-col>
  537. </a-row>
  538. </div>
  539. </div>
  540. </div>
  541. </div>
  542. <div style="width: 1%"></div>
  543. <div style="width: 19%; overflow: hidden auto">
  544. <div>
  545. <a-input-search
  546. style="width: 100%; margin-bottom: 8px"
  547. placeholder="房间号/姓名/手机号/身份证号"
  548. enter-button="搜索"
  549. v-model="keyWord"
  550. type="danger"
  551. @search="checkChange"
  552. />
  553. </div>
  554. <p style="font-size: 16px; font-weight: 600; color: rgb(0, 186, 173)">
  555. 按楼层
  556. </p>
  557. <a-tree-select
  558. style="width: 100%"
  559. v-model="checkedroomBuildingFloorList"
  560. :tree-data="roomBuildingFloorTree"
  561. tree-checkable
  562. :show-checked-strategy="SHOW_PARENT"
  563. :replaceFields="{
  564. children: 'children',
  565. title: 'name',
  566. key: 'id',
  567. value: 'id',
  568. }"
  569. @change="checkChange"
  570. />
  571. <p
  572. style="
  573. font-size: 16px;
  574. font-weight: 600;
  575. color: rgb(0, 186, 173);
  576. margin-top: 10px;
  577. "
  578. >
  579. 按房态
  580. </p>
  581. <a-checkbox-group
  582. v-model="checkedRoomStatusList"
  583. :options="roomStatusList"
  584. @change="checkChange"
  585. >
  586. </a-checkbox-group>
  587. <p
  588. style="
  589. font-size: 16px;
  590. font-weight: 600;
  591. color: rgb(0, 186, 173);
  592. margin-top: 10px;
  593. "
  594. >
  595. 按来源
  596. </p>
  597. <a-checkbox-group
  598. v-model="checkedCustomerSourceList"
  599. :options="customerSourceList"
  600. @change="checkChange"
  601. >
  602. </a-checkbox-group>
  603. <p
  604. style="
  605. font-size: 16px;
  606. font-weight: 600;
  607. color: rgb(0, 186, 173);
  608. margin-top: 10px;
  609. "
  610. >
  611. 按房型
  612. </p>
  613. <a-checkbox-group
  614. v-model="checkedCesRoomLayoutList"
  615. :options="cesRoomLayoutList"
  616. @change="checkChange"
  617. >
  618. </a-checkbox-group>
  619. </div>
  620. </div>
  621. <template v-else-if="activeKey === '2'">
  622. <calendarfangtai> </calendarfangtai>
  623. </template>
  624. <template v-else-if="activeKey === '3'">
  625. <guestorders></guestorders>
  626. </template>
  627. <template v-else-if="activeKey === '4'">
  628. <forwardfangtai></forwardfangtai>
  629. </template>
  630. <template v-else-if="activeKey === '5'">
  631. <leasegoods></leasegoods>
  632. </template>
  633. <template v-else-if="activeKey === '6'">
  634. <membermessage></membermessage>
  635. </template>
  636. <template v-else-if="activeKey === '7'">
  637. <membergoodsmanage></membergoodsmanage>
  638. </template>
  639. <upkeep-room-modal ref="modalForm" @ok="modalWxFormOk"></upkeep-room-modal>
  640. <bill-room-info-modal
  641. ref="ModalBillRoomInfo"
  642. @ok="modalLockRoomFormOk"
  643. ></bill-room-info-modal>
  644. <bill-room-form-modal
  645. ref="ModalBillRoomForm"
  646. @ok="modalBillRoomFormOk"
  647. ></bill-room-form-modal>
  648. <schedule-room-modal
  649. ref="ModalScheduleRoom"
  650. @ok="modalFormOk"
  651. ></schedule-room-modal>
  652. <schedule-team-room-modal
  653. ref="ModalScheduleTeamRoom"
  654. @ok="modalTeamFormOk"
  655. ></schedule-team-room-modal>
  656. <edit-schedule-room-modal
  657. ref="ModalEditScheduleRoom"
  658. @ok="modalFormOk"
  659. ></edit-schedule-room-modal>
  660. <lock-room-modal
  661. ref="ModalLockRoom"
  662. @ok="modalLockRoomFormOk"
  663. ></lock-room-modal>
  664. <clean-room-modal
  665. ref="ModalCleanRoom"
  666. @ok="modalLockRoomFormOk"
  667. ></clean-room-modal>
  668. </a-card>
  669. </template>
  670. <script>
  671. import "@/assets/less/TableExpand.less";
  672. // import { mixinDevice } from "@/utils/mixin";
  673. // import { JeecgListMixin } from "@/mixins/JeecgListMixin";
  674. import { httpAction, getAction, postAction } from "@/api/manage";
  675. import UpkeepRoomModal from "./modules/upkeep/UpkeepRoomModal.vue";
  676. import BillRoomInfoModal from "./modules/checkIn/BillRoomInfoModal.vue";
  677. import BillRoomFormModal from "./modules/checkIn/BillRoomFormModal.vue";
  678. import ScheduleRoomModal from "./modules/schedule/ScheduleRoomModal.vue";
  679. import ScheduleTeamRoomModal from "./modules/scheduleTeam/ScheduleRoomModal.vue";
  680. import EditScheduleRoomModal from "./modules/schedule/EditScheduleRoomModal.vue";
  681. import LockRoomModal from "./modules/lock/LockRoomModal.vue";
  682. import CleanRoomModal from "./modules/clean/CleanRoomModal.vue";
  683. import calendarfangtai from "./calendarfangtai";
  684. import forwardfangtai from "./forwardfangtai";
  685. import guestorders from "./guestorders";
  686. import leasegoods from "./leasegoods";
  687. import membermessage from "./membermessage";
  688. import membergoodsmanage from "./membergoodsmanage";
  689. import { TreeSelect } from "ant-design-vue";
  690. import moment from "moment";
  691. const SHOW_PARENT = TreeSelect.SHOW_PARENT;
  692. export default {
  693. name: "BusMeetingRoomList",
  694. // mixins: [JeecgListMixin, mixinDevice],
  695. components: {
  696. UpkeepRoomModal,
  697. BillRoomInfoModal,
  698. BillRoomFormModal,
  699. ScheduleRoomModal,
  700. ScheduleTeamRoomModal,
  701. EditScheduleRoomModal,
  702. calendarfangtai,
  703. guestorders,
  704. forwardfangtai,
  705. leasegoods,
  706. membermessage,
  707. membergoodsmanage,
  708. LockRoomModal,
  709. CleanRoomModal,
  710. },
  711. data() {
  712. return {
  713. currentDate: moment(new Date()).format("YYYY-MM-DD"),
  714. activeKey: "1",
  715. timeId: null,
  716. multipleRoom: false,
  717. keyWord: "",
  718. checkedroomBuildingFloorList: [],
  719. SHOW_PARENT,
  720. cardStatus: {
  721. 0: {
  722. title: "空净",
  723. color: "rgba(67, 207, 124, 1)",
  724. },
  725. 1: {
  726. title: "在住",
  727. color: "#00a0e9",
  728. },
  729. 2: {
  730. title: "今日预离",
  731. color: "rgba(10, 122, 114, 1)",
  732. },
  733. 3: {
  734. title: "欠费",
  735. color: "rgba(172, 51, 193, 1)",
  736. },
  737. 4: {
  738. title: "锁房/脏房",
  739. color: "rgba(128, 128, 128, 1)",
  740. },
  741. },
  742. sourceType: {
  743. 0: {
  744. title: "美团",
  745. color: "rgba(67, 207, 124, 1)",
  746. },
  747. 1: {
  748. title: "携程",
  749. color: "#00a0e9",
  750. },
  751. 2: {
  752. title: "飞猪",
  753. color: "rgba(10, 122, 114, 1)",
  754. },
  755. 3: {
  756. title: "去哪儿",
  757. color: "rgba(172, 51, 193, 1)",
  758. },
  759. 4: {
  760. title: "同程艺龙",
  761. color: "rgba(128, 128, 128, 1)",
  762. },
  763. 5: {
  764. title: "微信订房",
  765. color: "rgba(128, 128, 128, 1)",
  766. },
  767. },
  768. startDate: "",
  769. endDate: "",
  770. customerSourceList: [],
  771. checkedCustomerSourceList: [],
  772. cesRoomLayoutList: [],
  773. checkedCesRoomLayoutList: [],
  774. roomBuildingFloorTree: [],
  775. roomStatusColorList: [],
  776. roomList: [],
  777. oldRoomList: [],
  778. roomStatusList: [],
  779. checkedRoomStatusList: [],
  780. scheduleBtnDis: false,
  781. checkInBtnDis: false,
  782. };
  783. },
  784. watch: {
  785. activeKey(key) {
  786. console.log("activeKey", key);
  787. },
  788. },
  789. computed: {
  790. lockDisabled() {
  791. return !this.roomList.some((t) =>
  792. t.rooms.some((c) => c.roomInfo.state === 88)
  793. );
  794. },
  795. offLockBtn() {
  796. return this.roomList.some((t) =>
  797. t.rooms.some(
  798. (c) => c.roomInfo.state === 88 && c.roomInfo.roomStatus === 6
  799. )
  800. );
  801. },
  802. wxCompleteBtn() {
  803. return this.roomList.some((t) =>
  804. t.rooms.some(
  805. (c) => c.roomInfo.state === 88 && c.roomInfo.roomStatus === 5
  806. )
  807. );
  808. },
  809. cleanDisabled() {
  810. return !this.roomList.some((t) =>
  811. t.rooms.some(
  812. (c) =>
  813. c.roomInfo.state === 88 &&
  814. (c.roomInfo.roomStatus === 2 || c.roomInfo.roomStatus === 4)
  815. )
  816. );
  817. },
  818. dirtyDisabled() {
  819. return !this.roomList.some((t) =>
  820. t.rooms.some(
  821. (c) =>
  822. c.roomInfo.state === 88 &&
  823. (c.roomInfo.roomStatus === 1 || c.roomInfo.roomStatus === 3)
  824. )
  825. );
  826. },
  827. },
  828. created() {
  829. // 禁用右键
  830. // document.oncontextmenu = new Function("event.returnValue=false");
  831. var _info = JSON.parse(localStorage.getItem("storeInfo"));
  832. // if (_info) {
  833. // this.model.hotelId = _info.id;
  834. // }
  835. getAction("/business/busDictItem/list", {
  836. hotelId: _info.id,
  837. dictId: "1639538915239743490",
  838. }).then((res) => {
  839. if (res.success) {
  840. var list = [];
  841. res.result.records.forEach((item) => {
  842. list.push({ label: item.itemText, value: item.id });
  843. });
  844. this.customerSourceList = list;
  845. }
  846. });
  847. getAction("/rooms/cesRoomLayout/list", {
  848. pageSize: 99999,
  849. pageNo: 1,
  850. }).then((res) => {
  851. if (res.success) {
  852. var list = [];
  853. res.result.records.forEach((item) => {
  854. list.push({ label: item.name, value: item.id });
  855. });
  856. this.cesRoomLayoutList = list;
  857. }
  858. });
  859. getAction("/rooms/cesRoomBuildingFloor/tree", {}).then((res) => {
  860. if (res.success) {
  861. this.roomBuildingFloorTree = res.result;
  862. }
  863. });
  864. getAction("/rooms/cesRooms/room-status-color", {}).then((res) => {
  865. if (res.success) {
  866. this.roomStatusColorList = res.result;
  867. var list = [];
  868. res.result.forEach((item) => {
  869. list.push({ label: item.title, value: item.value });
  870. });
  871. this.roomStatusList = list;
  872. }
  873. });
  874. this.loadData();
  875. },
  876. mounted() {
  877. // this.handleBillInfo();
  878. // this.handleCheckInAdd()
  879. // this.$refs.ModalScheduleRoom.addList([]);
  880. // this.$refs.ModalScheduleRoom.title = "预定登记";
  881. // this.$refs.ModalScheduleRoom.disableSubmit = false;
  882. // this.$refs.ModalScheduleTeamRoom.addList([]);
  883. // this.$refs.ModalScheduleTeamRoom.title = "团队预定登记";
  884. // this.$refs.ModalScheduleTeamRoom.disableSubmit = false;
  885. // this.$refs.ModalEditScheduleRoom.addList([]);
  886. // this.$refs.ModalEditScheduleRoom.title = "详单";
  887. // this.$refs.ModalEditScheduleRoom.disableSubmit = false;
  888. },
  889. methods: {
  890. moment,
  891. getCustomerSourceList(customerSource, first) {
  892. var find = this.customerSourceList.find((t) => t.value == customerSource);
  893. if (find) {
  894. return first ? find.label.substr(0, 1) : find.label;
  895. }
  896. return "";
  897. },
  898. checkInCount(rooms) {
  899. return rooms.filter((t) => t.livingData && t.livingData.livingOrder)
  900. .length;
  901. },
  902. vacantCount(rooms) {
  903. return rooms.filter((t) => !t.livingData || !t.livingData.livingOrder)
  904. .length;
  905. },
  906. tabsClick(e) {
  907. if (e == "1") {
  908. this.loadData();
  909. }
  910. },
  911. getRoomStatusColor(roomStatus) {
  912. var find = this.roomStatusColorList.find((t) => t.value == roomStatus);
  913. return find ? find.extend : "";
  914. },
  915. getRoomStatusName(roomStatus) {
  916. var find = this.roomStatusList.find((t) => t.value == roomStatus);
  917. return find ? find.label : "";
  918. },
  919. toPage() {
  920. this.$router.push({
  921. // path: "/room/scheduledetail",
  922. // query: { id: "YD20230331112026203" },
  923. name: "room-scheduledetail",
  924. params: { id: "YD20230331112026203" },
  925. });
  926. },
  927. toTeamPage() {
  928. this.$router.push({
  929. // path: "/room/scheduleteamdetail",
  930. // query: { id: "YD20230403170240075" },
  931. name: "room-scheduleteamdetail",
  932. params: { id: "YD20230403170240075" },
  933. });
  934. },
  935. addScheduleTeam() {
  936. this.$refs.ModalScheduleTeamRoom.addList([]);
  937. this.$refs.ModalScheduleTeamRoom.title = "团队预定登记";
  938. this.$refs.ModalScheduleTeamRoom.disableSubmit = false;
  939. },
  940. scheduleClick(e) {
  941. var selectRoom = [];
  942. this.roomList.forEach((t) => {
  943. t.rooms.forEach((c) => {
  944. if (c.roomInfo.state === 88) {
  945. c.roomInfo.marketPrice = c.layout.marketPrice;
  946. selectRoom.push(c.roomInfo);
  947. }
  948. });
  949. });
  950. this.$refs.ModalScheduleRoom.addList(selectRoom, e.key);
  951. this.$refs.ModalScheduleRoom.title =
  952. e.key == "1" ? "散客预定登记" : "团队预定登记";
  953. this.$refs.ModalScheduleRoom.disableSubmit = false;
  954. },
  955. handleMenuClick(e) {
  956. console.log("click", e);
  957. var selectRoom = [];
  958. this.roomList.forEach((t) => {
  959. t.rooms.forEach((c) => {
  960. if (c.roomInfo.state === 88) {
  961. c.roomInfo.marketPrice = c.layout.marketPrice;
  962. selectRoom.push(c.roomInfo);
  963. }
  964. });
  965. });
  966. this.$refs.ModalBillRoomForm.addList(selectRoom, e.key);
  967. this.$refs.ModalBillRoomForm.title =
  968. e.key == "1" ? "散客入住登记" : "团队入住登记";
  969. this.$refs.ModalBillRoomForm.disableSubmit = false;
  970. },
  971. roomItemClick(roomLive) {
  972. // 清除上一次的定时器
  973. if (this.timeId) {
  974. clearTimeout(this.timeId);
  975. }
  976. this.timeId = setTimeout(() => {
  977. if (!this.multipleRoom && roomLive.roomInfo.state !== 88) {
  978. this.roomList.forEach((item) => {
  979. item.rooms.forEach((c) => {
  980. if (c.roomInfo.state === 88) {
  981. c.roomInfo.state = 0;
  982. }
  983. });
  984. });
  985. }
  986. if (roomLive.roomInfo.state !== 88) {
  987. roomLive.roomInfo.state = 88;
  988. if (roomLive.livingData && roomLive.livingData.livingOrder) {
  989. this.checkInBtnDis = true;
  990. } else {
  991. this.checkInBtnDis = false;
  992. }
  993. if (
  994. (roomLive.livingData && roomLive.livingData.livingOrder) ||
  995. (roomLive.bookingData && roomLive.bookingData.bookingOrder)
  996. ) {
  997. this.scheduleBtnDis = true;
  998. } else {
  999. this.scheduleBtnDis = false;
  1000. }
  1001. } else {
  1002. roomLive.roomInfo.state = 0;
  1003. }
  1004. if (this.multipleRoom) {
  1005. this.checkInBtnDis = false;
  1006. this.scheduleBtnDis = false;
  1007. this.roomList.forEach((item) => {
  1008. item.rooms.forEach((c) => {
  1009. if (c.roomInfo.state === 88) {
  1010. if (!this.checkInBtnDis) {
  1011. if (c.livingData && c.livingData.livingOrder) {
  1012. this.checkInBtnDis = true;
  1013. } else {
  1014. this.checkInBtnDis = false;
  1015. }
  1016. }
  1017. if (!this.scheduleBtnDis) {
  1018. if (
  1019. (c.livingData && c.livingData.livingOrder) ||
  1020. (c.bookingData && c.bookingData.bookingOrder)
  1021. ) {
  1022. this.scheduleBtnDis = true;
  1023. } else {
  1024. this.scheduleBtnDis = false;
  1025. }
  1026. }
  1027. }
  1028. });
  1029. });
  1030. }
  1031. // 清除定时器
  1032. clearTimeout(this.timeId);
  1033. }, 200);
  1034. },
  1035. handleBillInfo(roomLive) {
  1036. console.log("handleBillInfo", roomLive);
  1037. if (this.timeId) {
  1038. clearTimeout(this.timeId);
  1039. }
  1040. if (!roomLive.livingData || !roomLive.livingData.livingOrder) {
  1041. if (!roomLive.bookingData || !roomLive.bookingData.bookingOrder) {
  1042. this.handleCheckInAdd(roomLive);
  1043. } else {
  1044. this.$router.push({
  1045. name: "room-scheduledetail",
  1046. params: { id: roomLive.bookingData.bookingOrder.bookingOrdersNo },
  1047. });
  1048. }
  1049. } else {
  1050. this.$refs.ModalBillRoomInfo.add(
  1051. roomLive.livingData.livingOrder.bookingOrderId,
  1052. 1
  1053. );
  1054. this.$refs.ModalBillRoomInfo.title = "账单";
  1055. this.$refs.ModalBillRoomInfo.disableSubmit = true;
  1056. }
  1057. roomLive.roomInfo.state = 0;
  1058. },
  1059. handleCheckInAdd(roomLive) {
  1060. if (this.timeId) {
  1061. clearTimeout(this.timeId);
  1062. }
  1063. roomLive.roomInfo.marketPrice = roomLive.layout.marketPrice;
  1064. this.$refs.ModalBillRoomForm.addList([roomLive.roomInfo], 1);
  1065. this.$refs.ModalBillRoomForm.title = "散客入住登记";
  1066. this.$refs.ModalBillRoomForm.disableSubmit = false;
  1067. },
  1068. multipleRoomChange() {
  1069. this.roomList.forEach((item) => {
  1070. item.rooms.forEach((c) => {
  1071. if (c.roomInfo.state == 88) {
  1072. c.roomInfo.state = 0;
  1073. }
  1074. });
  1075. });
  1076. },
  1077. onChange() {},
  1078. onCheck(value, label, extra) {
  1079. console.log("onCheck", value);
  1080. console.log(
  1081. "checkedroomBuildingFloorList",
  1082. this.checkedroomBuildingFloorList
  1083. );
  1084. },
  1085. checkChange(e) {
  1086. console.log("e", e);
  1087. console.log(
  1088. "checkedroomBuildingFloorList",
  1089. this.checkedroomBuildingFloorList
  1090. );
  1091. var list = this.oldRoomList;
  1092. if (this.checkedCesRoomLayoutList.length > 0) {
  1093. list = this.oldRoomList.reduce((acc, curr) => {
  1094. const rooms = curr.rooms.filter((room) =>
  1095. this.checkedCesRoomLayoutList.includes(room.layout.id)
  1096. );
  1097. acc.push({ ...curr, rooms });
  1098. return acc;
  1099. }, []);
  1100. }
  1101. if (this.checkedRoomStatusList.length > 0) {
  1102. list = list.reduce((acc, curr) => {
  1103. const rooms = curr.rooms.filter((room) =>
  1104. this.checkedRoomStatusList.includes(
  1105. room.roomInfo.roomStatus.toString()
  1106. )
  1107. );
  1108. acc.push({ ...curr, rooms });
  1109. return acc;
  1110. }, []);
  1111. }
  1112. if (this.checkedCustomerSourceList.length > 0) {
  1113. list = list.reduce((acc, curr) => {
  1114. const rooms = curr.rooms.filter((room) =>
  1115. room.livingData && room.livingData.livingOrder
  1116. ? this.checkedCustomerSourceList.includes(
  1117. room.livingData.livingOrder.customerSource
  1118. )
  1119. : room.bookingData && room.bookingData.bookingOrder
  1120. ? this.checkedCustomerSourceList.includes(
  1121. room.bookingData.bookingOrder.customerSource
  1122. )
  1123. : false
  1124. );
  1125. acc.push({ ...curr, rooms });
  1126. return acc;
  1127. }, []);
  1128. }
  1129. if (this.checkedroomBuildingFloorList.length > 0) {
  1130. list = list.filter(
  1131. (item) =>
  1132. this.checkedroomBuildingFloorList.includes(item.buildingId) ||
  1133. this.checkedroomBuildingFloorList.includes(item.id)
  1134. );
  1135. }
  1136. if (this.keyWord) {
  1137. //房号/姓名/手机号搜索
  1138. list = list.reduce((acc, curr) => {
  1139. const rooms = curr.rooms.filter(
  1140. (room) =>
  1141. room.roomInfo.name == this.keyWord ||
  1142. (room.livingData && room.livingData.livingCustomers
  1143. ? room.livingData.livingCustomers.customerName == this.keyWord
  1144. : room.bookingData && room.bookingData.bookingCustomer
  1145. ? room.bookingData.bookingCustomer.name == this.keyWord
  1146. : false) ||
  1147. (room.livingData && room.livingData.livingCustomers
  1148. ? room.livingData.livingCustomers.phone == this.keyWord
  1149. : room.bookingData && room.bookingData.bookingCustomer
  1150. ? room.bookingData.bookingCustomer.phone == this.keyWord
  1151. : false)
  1152. );
  1153. acc.push({ ...curr, rooms });
  1154. return acc;
  1155. }, []);
  1156. }
  1157. console.log("list2", list);
  1158. this.roomList = list;
  1159. },
  1160. // roomStatusChange(e) {
  1161. // console.log("e", e);
  1162. // var list = this.oldRoomList;
  1163. // if (this.checkedRoomStatusList.length > 0) {
  1164. // list = this.oldRoomList.reduce((acc, curr) => {
  1165. // const rooms = curr.rooms.filter((room) =>
  1166. // this.checkedRoomStatusList.includes(room.roomInfo.roomStatus.toString())
  1167. // );
  1168. // acc.push({ ...curr, rooms });
  1169. // return acc;
  1170. // }, []);
  1171. // }
  1172. // console.log("list2", list);
  1173. // this.roomList = list;
  1174. // },
  1175. collapseClick(row, value) {
  1176. this.$set(row, "collapse", value);
  1177. },
  1178. handleAdd(e) {
  1179. this.$refs.modalForm.add();
  1180. this.$refs.modalForm.title = "维修";
  1181. this.$refs.modalForm.disableSubmit = false;
  1182. },
  1183. modalWxFormOk() {
  1184. this.loadData();
  1185. },
  1186. handleWx() {
  1187. var selectRoom = [];
  1188. this.roomList.forEach((t) => {
  1189. t.rooms.forEach((c) => {
  1190. if (c.roomInfo.state === 88) {
  1191. selectRoom.push({ roomId: c.roomInfo.id, roomNo: c.roomInfo.name });
  1192. }
  1193. });
  1194. });
  1195. if (selectRoom.length === 0) {
  1196. this.$message.warning("请先选择房间");
  1197. return;
  1198. }
  1199. console.log("selectRoom", selectRoom);
  1200. this.$refs.modalForm.add({ roomRepairList: selectRoom });
  1201. this.$refs.modalForm.title = "维修";
  1202. this.$refs.modalForm.disableSubmit = false;
  1203. },
  1204. handleLock(e) {
  1205. var selectRoom = [];
  1206. this.roomList.forEach((t) => {
  1207. t.rooms.forEach((c) => {
  1208. if (c.roomInfo.state === 88) {
  1209. selectRoom.push({ roomId: c.roomInfo.id, roomNo: c.roomInfo.name });
  1210. }
  1211. });
  1212. });
  1213. if (selectRoom.length === 0) {
  1214. this.$message.warning("请先选择房间");
  1215. return;
  1216. }
  1217. console.log("selectRoom", selectRoom);
  1218. this.$refs.ModalLockRoom.add({ roomLockList: selectRoom });
  1219. this.$refs.ModalLockRoom.title = "锁房";
  1220. this.$refs.ModalLockRoom.disableSubmit = false;
  1221. },
  1222. handleDirty() {
  1223. var selectRoom = [];
  1224. this.roomList.forEach((t) => {
  1225. t.rooms.forEach((c) => {
  1226. if (c.roomInfo.state === 88) {
  1227. selectRoom.push(c.roomInfo.id);
  1228. }
  1229. });
  1230. });
  1231. if (selectRoom.length === 0) {
  1232. this.$message.warning("请先选择房间");
  1233. return;
  1234. }
  1235. var ids = selectRoom.join(",");
  1236. postAction("/rooms/cesRooms/dirtyRoom?roomIds=" + ids, {}).then((res) => {
  1237. if (res.success) {
  1238. this.$message.success(res.message);
  1239. this.loadData();
  1240. }
  1241. });
  1242. },
  1243. handleClean(e) {
  1244. var selectRoom = [];
  1245. this.roomList.forEach((t) => {
  1246. t.rooms.forEach((c) => {
  1247. if (c.roomInfo.state === 88) {
  1248. selectRoom.push({ roomId: c.roomInfo.id, roomNo: c.roomInfo.name });
  1249. }
  1250. });
  1251. });
  1252. if (selectRoom.length === 0) {
  1253. this.$message.warning("请先选择房间");
  1254. return;
  1255. }
  1256. console.log("selectRoom", selectRoom);
  1257. this.$refs.ModalCleanRoom.add({ roomCleanList: selectRoom });
  1258. this.$refs.ModalCleanRoom.title = "清理房间";
  1259. this.$refs.ModalCleanRoom.disableSubmit = false;
  1260. },
  1261. handleOffLock() {
  1262. var selectRoom = [];
  1263. this.roomList.forEach((t) => {
  1264. t.rooms.forEach((c) => {
  1265. if (c.roomInfo.state === 88) {
  1266. selectRoom.push(c.roomInfo.id);
  1267. }
  1268. });
  1269. });
  1270. if (selectRoom.length === 0) {
  1271. this.$message.warning("请先选择房间");
  1272. return;
  1273. }
  1274. var ids = selectRoom.join(",");
  1275. postAction("/fw/fwRoomLock/offLockRoom?roomIds=" + ids, {}).then(
  1276. (res) => {
  1277. if (res.success) {
  1278. this.$message.success(res.message);
  1279. this.loadData();
  1280. }
  1281. }
  1282. );
  1283. },
  1284. handleCompleteRepair() {
  1285. var selectRoom = [];
  1286. this.roomList.forEach((t) => {
  1287. t.rooms.forEach((c) => {
  1288. if (c.roomInfo.state === 88) {
  1289. selectRoom.push(c.roomInfo.id);
  1290. }
  1291. });
  1292. });
  1293. if (selectRoom.length === 0) {
  1294. this.$message.warning("请先选择房间");
  1295. return;
  1296. }
  1297. var ids = selectRoom.join(",");
  1298. postAction("/fw/fwRoomRepair/completeRepairRoom?roomIds=" + ids, {}).then(
  1299. (res) => {
  1300. if (res.success) {
  1301. this.$message.success(res.message);
  1302. this.loadData();
  1303. }
  1304. }
  1305. );
  1306. },
  1307. modalLockRoomFormOk() {
  1308. this.loadData();
  1309. },
  1310. onMenuClick(e, row) {
  1311. console.log("e", e);
  1312. console.log("row", row);
  1313. var that = this;
  1314. if (e.key == "1") {
  1315. if (row.bookingData && row.bookingData.bookingOrder) {
  1316. this.$confirm({
  1317. title: "提示",
  1318. content: "此房间有预定是否预定转入住?",
  1319. onOk: function () {
  1320. that.$router.push({
  1321. name: "room-scheduledetail",
  1322. params: {
  1323. id: row.bookingData.bookingOrder.bookingOrdersNo,
  1324. },
  1325. });
  1326. },
  1327. });
  1328. } else {
  1329. row.roomInfo.marketPrice = row.layout.marketPrice;
  1330. this.$refs.ModalBillRoomForm.addList([row.roomInfo], 1);
  1331. this.$refs.ModalBillRoomForm.title = "散客入住登记";
  1332. this.$refs.ModalBillRoomForm.disableSubmit = false;
  1333. }
  1334. } else if (e.key == "2") {
  1335. this.$refs.ModalScheduleRoom.addList([row.roomInfo], 1);
  1336. this.$refs.ModalScheduleRoom.title = "散客预定登记";
  1337. this.$refs.ModalScheduleRoom.disableSubmit = false;
  1338. } else if (e.key == "3") {
  1339. var selectRoom = [row.roomInfo.id];
  1340. if (selectRoom.length === 0) {
  1341. this.$message.warning("请先选择房间");
  1342. return;
  1343. }
  1344. var ids = selectRoom.join(",");
  1345. postAction("/rooms/cesRooms/dirtyRoom?roomIds=" + ids, {}).then(
  1346. (res) => {
  1347. if (res.success) {
  1348. this.$message.success(res.message);
  1349. this.loadData();
  1350. }
  1351. }
  1352. );
  1353. } else if (e.key == "31") {
  1354. var selectRoom = [
  1355. {
  1356. roomId: row.roomInfo.id,
  1357. roomNo: row.roomInfo.name,
  1358. },
  1359. ];
  1360. if (selectRoom.length === 0) {
  1361. this.$message.warning("请先选择房间");
  1362. return;
  1363. }
  1364. console.log("selectRoom", selectRoom);
  1365. this.$refs.ModalCleanRoom.add({ roomCleanList: selectRoom });
  1366. this.$refs.ModalCleanRoom.title = "清理房间";
  1367. this.$refs.ModalCleanRoom.disableSubmit = false;
  1368. } else if (e.key == "4") {
  1369. var selectRoom = [
  1370. {
  1371. roomId: row.roomInfo.id,
  1372. roomNo: row.roomInfo.name,
  1373. },
  1374. ];
  1375. if (selectRoom.length === 0) {
  1376. this.$message.warning("请先选择房间");
  1377. return;
  1378. }
  1379. console.log("selectRoom", selectRoom);
  1380. this.$refs.modalForm.add({ roomRepairList: selectRoom });
  1381. this.$refs.modalForm.title = "维修";
  1382. this.$refs.modalForm.disableSubmit = false;
  1383. } else if (e.key == "41") {
  1384. var selectRoom = [row.roomInfo.id];
  1385. if (selectRoom.length === 0) {
  1386. this.$message.warning("请先选择房间");
  1387. return;
  1388. }
  1389. var ids = selectRoom.join(",");
  1390. postAction(
  1391. "/fw/fwRoomRepair/completeRepairRoom?roomIds=" + ids,
  1392. {}
  1393. ).then((res) => {
  1394. if (res.success) {
  1395. this.$message.success(res.message);
  1396. this.loadData();
  1397. }
  1398. });
  1399. } else if (e.key == "51") {
  1400. var selectRoom = [row.roomInfo.id];
  1401. if (selectRoom.length === 0) {
  1402. this.$message.warning("请先选择房间");
  1403. return;
  1404. }
  1405. var ids = selectRoom.join(",");
  1406. postAction("/fw/fwRoomLock/offLockRoom?roomIds=" + ids, {}).then(
  1407. (res) => {
  1408. if (res.success) {
  1409. this.$message.success(res.message);
  1410. this.loadData();
  1411. }
  1412. }
  1413. );
  1414. }else if(e.key == 6 || e.key == 7){
  1415. this.handleBillInfo(row)
  1416. return
  1417. }else if(e.key == 15){
  1418. this.handleBillInfo(row)
  1419. // this.$refs.ModalBillRoomInfo.addlivingCustomer(row.livingData.livingOrder.id, 1);
  1420. return
  1421. }
  1422. },
  1423. modalBillRoomFormOk(e) {
  1424. this.loadData();
  1425. console.log("e", e);
  1426. this.$refs.ModalBillRoomInfo.add(e);
  1427. this.$refs.ModalBillRoomInfo.title = "账单";
  1428. this.$refs.ModalBillRoomInfo.disableSubmit = true;
  1429. },
  1430. modalFormOk(e) {
  1431. console.log("e", e);
  1432. this.loadData();
  1433. this.$router.push({
  1434. // path: "/room/scheduledetail",
  1435. // query: { id: e },
  1436. name: "room-scheduledetail",
  1437. params: { id: e },
  1438. });
  1439. },
  1440. modalTeamFormOk(e) {
  1441. console.log("e", e);
  1442. this.loadData();
  1443. this.$router.push({
  1444. // path: "/room/scheduledetail",
  1445. // query: { id: e },
  1446. name: "room-scheduleteamdetail",
  1447. params: { id: e },
  1448. });
  1449. },
  1450. loadData() {
  1451. this.checkInBtnDis = false;
  1452. this.scheduleBtnDis = false;
  1453. getAction("/rooms/cesRooms/realtime-rooms", {}).then((res) => {
  1454. if (res.success) {
  1455. res.result.forEach((row) => {
  1456. this.$set(row, "collapse", 1);
  1457. });
  1458. this.roomList = res.result;
  1459. this.oldRoomList = JSON.parse(JSON.stringify(res.result));
  1460. }
  1461. });
  1462. },
  1463. },
  1464. };
  1465. </script>
  1466. <style scoped>
  1467. @import "~@assets/less/common.less";
  1468. </style>
  1469. <style scoped>
  1470. .course-week {
  1471. /* border: 1px solid #ddd; */
  1472. /* padding: 1%; */
  1473. box-sizing: border-box;
  1474. display: flex;
  1475. flex-direction: column;
  1476. }
  1477. .post-mark {
  1478. position: relative;
  1479. overflow: hidden;
  1480. width: 100%;
  1481. height: 100%;
  1482. }
  1483. .select-cell {
  1484. position: absolute;
  1485. width: 100%;
  1486. height: 100%;
  1487. left: 0;
  1488. top: 0;
  1489. z-index: 10;
  1490. -webkit-box-sizing: border-box;
  1491. box-sizing: border-box;
  1492. background: rgba(102, 102, 102, 0.5);
  1493. -webkit-user-select: none;
  1494. -moz-user-select: none;
  1495. -ms-user-select: none;
  1496. user-select: none;
  1497. border-radius: 5px;
  1498. display: flex;
  1499. justify-content: center;
  1500. align-items: center;
  1501. }
  1502. .week-top {
  1503. display: flex;
  1504. justify-content: space-between;
  1505. align-items: center;
  1506. width: 100%;
  1507. height: 40px;
  1508. padding: 0 1%;
  1509. box-sizing: border-box;
  1510. }
  1511. .week-top .week-btn-wrap {
  1512. width: 200px;
  1513. display: flex;
  1514. justify-content: space-around;
  1515. color: #409eff;
  1516. }
  1517. .week-top .week-btn-wrap span {
  1518. cursor: pointer;
  1519. display: flex;
  1520. justify-content: center;
  1521. align-items: center;
  1522. font-size: 15px;
  1523. }
  1524. .w-today-date {
  1525. font-weight: bold;
  1526. font-size: 16px;
  1527. }
  1528. .w-choose-status {
  1529. display: flex;
  1530. /* justify-content: flex-end;
  1531. width: 200px; */
  1532. }
  1533. .w-choose-status > div {
  1534. width: 100%;
  1535. flex: 1;
  1536. display: flex;
  1537. padding: 0 2%;
  1538. white-space: nowrap;
  1539. line-height: 20px;
  1540. box-sizing: border-box;
  1541. }
  1542. .w-choose-status > div .square {
  1543. display: flex;
  1544. width: 16px;
  1545. height: 16px;
  1546. border-radius: 4px;
  1547. box-sizing: border-box;
  1548. }
  1549. .w-choose-status > div .title {
  1550. display: flex;
  1551. align-items: center;
  1552. line-height: 16px;
  1553. padding-left: 4px;
  1554. font-size: 14px;
  1555. box-sizing: border-box;
  1556. }
  1557. .week-table {
  1558. display: flex;
  1559. flex-direction: column;
  1560. }
  1561. .week-table .table-header {
  1562. width: 100%;
  1563. height: 80px;
  1564. background: #eaedf2;
  1565. display: flex;
  1566. flex-direction: column;
  1567. align-items: center;
  1568. border-bottom: 1px solid #eaedf2;
  1569. box-sizing: border-box;
  1570. }
  1571. .table-header .w-table-date,
  1572. .table-week {
  1573. width: 100%;
  1574. height: 40px;
  1575. text-align: left;
  1576. display: flex;
  1577. justify-content: center;
  1578. align-items: center;
  1579. }
  1580. .table-header .w-table-date > span,
  1581. .table-week > span {
  1582. flex: 1;
  1583. color: #000;
  1584. height: 100%;
  1585. font-size: 14px;
  1586. display: flex;
  1587. justify-content: center;
  1588. align-items: center;
  1589. font-weight: bold;
  1590. }
  1591. .w-table-date .w-day-item,
  1592. .table-week .w-day-item {
  1593. color: #000;
  1594. font-size: 14px;
  1595. display: flex;
  1596. justify-content: center;
  1597. align-items: center;
  1598. }
  1599. .week-table .w-time-period-list {
  1600. width: 100%;
  1601. }
  1602. .w-time-period-list .w-time-period-row {
  1603. width: 100%;
  1604. min-height: 60px;
  1605. }
  1606. .w-time-period-col {
  1607. width: 100%;
  1608. min-height: 60px;
  1609. display: flex;
  1610. }
  1611. .w-time-period-col .w-time-period {
  1612. width: 12.5%;
  1613. display: flex;
  1614. justify-content: center;
  1615. align-items: center;
  1616. border-left: 1px solid #eaedf2;
  1617. /* border-bottom: 1px solid #eaedf2; */
  1618. box-sizing: border-box;
  1619. }
  1620. .w-time-period-col:last-child {
  1621. border-bottom: 1px solid #eaedf2;
  1622. }
  1623. .meeting-room-center {
  1624. transform: translate(-200%, 0%);
  1625. width: 14px;
  1626. font-size: 14px;
  1627. word-wrap: break-word;
  1628. position: absolute;
  1629. }
  1630. .w-time-period-col .w-row-day {
  1631. width: 100%;
  1632. display: flex;
  1633. justify-content: center;
  1634. }
  1635. .w-row-day .w-things {
  1636. flex: 1;
  1637. display: flex;
  1638. flex-direction: column;
  1639. align-items: center;
  1640. border-left: 1px solid #eaedf2;
  1641. border-bottom: 1px solid #eaedf2;
  1642. box-sizing: border-box;
  1643. cursor: pointer;
  1644. }
  1645. .w-row-day .w-things:last-child {
  1646. border-right: 1px solid #eaedf2;
  1647. }
  1648. .w-things .w-thing-item {
  1649. display: flex;
  1650. /* width: 80%; */
  1651. height: 135px;
  1652. font-size: 14px;
  1653. flex-direction: column;
  1654. justify-content: space-around;
  1655. min-height: 50px;
  1656. border-radius: 10px;
  1657. margin: 2% 1%;
  1658. padding: 1% 2%;
  1659. cursor: pointer;
  1660. color: #fff;
  1661. background: #ff6200;
  1662. box-sizing: border-box;
  1663. transition: all 1s linear 0.5s;
  1664. }
  1665. .w-isCurDate {
  1666. color: #ff2525 !important;
  1667. }
  1668. .w-noMore {
  1669. min-height: 200px;
  1670. padding: 2%;
  1671. display: flex;
  1672. justify-content: center;
  1673. align-items: center;
  1674. border: 1px solid rgba(156, 173, 173, 0.3);
  1675. color: #9cadadb7;
  1676. box-sizing: border-box;
  1677. }
  1678. .w_expand,
  1679. .w_shrink {
  1680. color: #0a98d5;
  1681. cursor: pointer;
  1682. width: 100%;
  1683. padding: 2% 0;
  1684. display: flex;
  1685. justify-content: center;
  1686. align-items: center;
  1687. }
  1688. </style>
  1689. <style scoped>
  1690. #components-grid-demo-playground [class~="ant-col"] {
  1691. background: transparent;
  1692. border: 0;
  1693. }
  1694. #components-grid-demo-playground .room-item {
  1695. background: rgba(67, 207, 124, 1);
  1696. height: 125px;
  1697. /* line-height: 200px; */
  1698. font-size: 13px;
  1699. color: #f9f9f9;
  1700. padding: 2px;
  1701. border-radius: 5px;
  1702. cursor: pointer;
  1703. position: relative;
  1704. }
  1705. #components-grid-demo-playground pre {
  1706. background: #f9f9f9;
  1707. border-radius: 6px;
  1708. font-size: 13px;
  1709. padding: 8px 16px;
  1710. }
  1711. </style>