fangtailive.vue 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724
  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. <!-- <a-menu-item key="3"> 日志 </a-menu-item> -->
  518. </a-menu>
  519. </a-dropdown>
  520. </a-popover>
  521. </div>
  522. </a-col>
  523. </a-row>
  524. </div>
  525. </div>
  526. </div>
  527. </div>
  528. <div style="width: 1%"></div>
  529. <div style="width: 19%; overflow: hidden auto">
  530. <div>
  531. <a-input-search
  532. style="width: 100%; margin-bottom: 8px"
  533. placeholder="房间号/姓名/手机号/身份证号"
  534. enter-button="搜索"
  535. v-model="keyWord"
  536. type="danger"
  537. @search="checkChange"
  538. />
  539. </div>
  540. <p style="font-size: 16px; font-weight: 600; color: rgb(0, 186, 173)">
  541. 按楼层
  542. </p>
  543. <a-tree-select
  544. style="width: 100%"
  545. v-model="checkedroomBuildingFloorList"
  546. :tree-data="roomBuildingFloorTree"
  547. tree-checkable
  548. :show-checked-strategy="SHOW_PARENT"
  549. :replaceFields="{
  550. children: 'children',
  551. title: 'name',
  552. key: 'id',
  553. value: 'id',
  554. }"
  555. @change="checkChange"
  556. />
  557. <p
  558. style="
  559. font-size: 16px;
  560. font-weight: 600;
  561. color: rgb(0, 186, 173);
  562. margin-top: 10px;
  563. "
  564. >
  565. 按房态
  566. </p>
  567. <a-checkbox-group
  568. v-model="checkedRoomStatusList"
  569. :options="roomStatusList"
  570. @change="checkChange"
  571. >
  572. </a-checkbox-group>
  573. <p
  574. style="
  575. font-size: 16px;
  576. font-weight: 600;
  577. color: rgb(0, 186, 173);
  578. margin-top: 10px;
  579. "
  580. >
  581. 按来源
  582. </p>
  583. <a-checkbox-group
  584. v-model="checkedCustomerSourceList"
  585. :options="customerSourceList"
  586. @change="checkChange"
  587. >
  588. </a-checkbox-group>
  589. <p
  590. style="
  591. font-size: 16px;
  592. font-weight: 600;
  593. color: rgb(0, 186, 173);
  594. margin-top: 10px;
  595. "
  596. >
  597. 按房型
  598. </p>
  599. <a-checkbox-group
  600. v-model="checkedCesRoomLayoutList"
  601. :options="cesRoomLayoutList"
  602. @change="checkChange"
  603. >
  604. </a-checkbox-group>
  605. </div>
  606. </div>
  607. <template v-else-if="activeKey === '2'">
  608. <calendarfangtai> </calendarfangtai>
  609. </template>
  610. <template v-else-if="activeKey === '3'">
  611. <guestorders></guestorders>
  612. </template>
  613. <template v-else-if="activeKey === '4'">
  614. <forwardfangtai></forwardfangtai>
  615. </template>
  616. <template v-else-if="activeKey === '5'">
  617. <leasegoods></leasegoods>
  618. </template>
  619. <template v-else-if="activeKey === '6'">
  620. <membermessage></membermessage>
  621. </template>
  622. <template v-else-if="activeKey === '7'">
  623. <membergoodsmanage></membergoodsmanage>
  624. </template>
  625. <upkeep-room-modal ref="modalForm" @ok="modalWxFormOk"></upkeep-room-modal>
  626. <bill-room-info-modal
  627. ref="ModalBillRoomInfo"
  628. @ok="modalLockRoomFormOk"
  629. ></bill-room-info-modal>
  630. <bill-room-form-modal
  631. ref="ModalBillRoomForm"
  632. @ok="modalBillRoomFormOk"
  633. ></bill-room-form-modal>
  634. <schedule-room-modal
  635. ref="ModalScheduleRoom"
  636. @ok="modalFormOk"
  637. ></schedule-room-modal>
  638. <schedule-team-room-modal
  639. ref="ModalScheduleTeamRoom"
  640. @ok="modalTeamFormOk"
  641. ></schedule-team-room-modal>
  642. <edit-schedule-room-modal
  643. ref="ModalEditScheduleRoom"
  644. @ok="modalFormOk"
  645. ></edit-schedule-room-modal>
  646. <lock-room-modal
  647. ref="ModalLockRoom"
  648. @ok="modalLockRoomFormOk"
  649. ></lock-room-modal>
  650. <clean-room-modal
  651. ref="ModalCleanRoom"
  652. @ok="modalLockRoomFormOk"
  653. ></clean-room-modal>
  654. </a-card>
  655. </template>
  656. <script>
  657. import "@/assets/less/TableExpand.less";
  658. // import { mixinDevice } from "@/utils/mixin";
  659. // import { JeecgListMixin } from "@/mixins/JeecgListMixin";
  660. import { httpAction, getAction, postAction } from "@/api/manage";
  661. import UpkeepRoomModal from "./modules/upkeep/UpkeepRoomModal.vue";
  662. import BillRoomInfoModal from "./modules/checkIn/BillRoomInfoModal.vue";
  663. import BillRoomFormModal from "./modules/checkIn/BillRoomFormModal.vue";
  664. import ScheduleRoomModal from "./modules/schedule/ScheduleRoomModal.vue";
  665. import ScheduleTeamRoomModal from "./modules/scheduleTeam/ScheduleRoomModal.vue";
  666. import EditScheduleRoomModal from "./modules/schedule/EditScheduleRoomModal.vue";
  667. import LockRoomModal from "./modules/lock/LockRoomModal.vue";
  668. import CleanRoomModal from "./modules/clean/CleanRoomModal.vue";
  669. import calendarfangtai from "./calendarfangtai";
  670. import forwardfangtai from "./forwardfangtai";
  671. import guestorders from "./guestorders";
  672. import leasegoods from "./leasegoods";
  673. import membermessage from "./membermessage";
  674. import membergoodsmanage from "./membergoodsmanage";
  675. import { TreeSelect } from "ant-design-vue";
  676. import moment from "moment";
  677. const SHOW_PARENT = TreeSelect.SHOW_PARENT;
  678. export default {
  679. name: "BusMeetingRoomList",
  680. // mixins: [JeecgListMixin, mixinDevice],
  681. components: {
  682. UpkeepRoomModal,
  683. BillRoomInfoModal,
  684. BillRoomFormModal,
  685. ScheduleRoomModal,
  686. ScheduleTeamRoomModal,
  687. EditScheduleRoomModal,
  688. calendarfangtai,
  689. guestorders,
  690. forwardfangtai,
  691. leasegoods,
  692. membermessage,
  693. membergoodsmanage,
  694. LockRoomModal,
  695. CleanRoomModal,
  696. },
  697. data() {
  698. return {
  699. currentDate: moment(new Date()).format("YYYY-MM-DD"),
  700. activeKey: "1",
  701. timeId: null,
  702. multipleRoom: false,
  703. keyWord: "",
  704. checkedroomBuildingFloorList: [],
  705. SHOW_PARENT,
  706. cardStatus: {
  707. 0: {
  708. title: "空净",
  709. color: "rgba(67, 207, 124, 1)",
  710. },
  711. 1: {
  712. title: "在住",
  713. color: "#00a0e9",
  714. },
  715. 2: {
  716. title: "今日预离",
  717. color: "rgba(10, 122, 114, 1)",
  718. },
  719. 3: {
  720. title: "欠费",
  721. color: "rgba(172, 51, 193, 1)",
  722. },
  723. 4: {
  724. title: "锁房/脏房",
  725. color: "rgba(128, 128, 128, 1)",
  726. },
  727. },
  728. sourceType: {
  729. 0: {
  730. title: "美团",
  731. color: "rgba(67, 207, 124, 1)",
  732. },
  733. 1: {
  734. title: "携程",
  735. color: "#00a0e9",
  736. },
  737. 2: {
  738. title: "飞猪",
  739. color: "rgba(10, 122, 114, 1)",
  740. },
  741. 3: {
  742. title: "去哪儿",
  743. color: "rgba(172, 51, 193, 1)",
  744. },
  745. 4: {
  746. title: "同程艺龙",
  747. color: "rgba(128, 128, 128, 1)",
  748. },
  749. 5: {
  750. title: "微信订房",
  751. color: "rgba(128, 128, 128, 1)",
  752. },
  753. },
  754. startDate: "",
  755. endDate: "",
  756. customerSourceList: [],
  757. checkedCustomerSourceList: [],
  758. cesRoomLayoutList: [],
  759. checkedCesRoomLayoutList: [],
  760. roomBuildingFloorTree: [],
  761. roomStatusColorList: [],
  762. roomList: [],
  763. oldRoomList: [],
  764. roomStatusList: [],
  765. checkedRoomStatusList: [],
  766. scheduleBtnDis: false,
  767. checkInBtnDis: false,
  768. };
  769. },
  770. watch: {
  771. activeKey(key) {
  772. console.log("activeKey", key);
  773. },
  774. },
  775. computed: {
  776. lockDisabled() {
  777. return !this.roomList.some((t) =>
  778. t.rooms.some((c) => c.roomInfo.state === 88)
  779. );
  780. },
  781. offLockBtn() {
  782. return this.roomList.some((t) =>
  783. t.rooms.some(
  784. (c) => c.roomInfo.state === 88 && c.roomInfo.roomStatus === 6
  785. )
  786. );
  787. },
  788. wxCompleteBtn() {
  789. return this.roomList.some((t) =>
  790. t.rooms.some(
  791. (c) => c.roomInfo.state === 88 && c.roomInfo.roomStatus === 5
  792. )
  793. );
  794. },
  795. cleanDisabled() {
  796. return !this.roomList.some((t) =>
  797. t.rooms.some(
  798. (c) =>
  799. c.roomInfo.state === 88 &&
  800. (c.roomInfo.roomStatus === 2 || c.roomInfo.roomStatus === 4)
  801. )
  802. );
  803. },
  804. dirtyDisabled() {
  805. return !this.roomList.some((t) =>
  806. t.rooms.some(
  807. (c) =>
  808. c.roomInfo.state === 88 &&
  809. (c.roomInfo.roomStatus === 1 || c.roomInfo.roomStatus === 3)
  810. )
  811. );
  812. },
  813. },
  814. created() {
  815. // 禁用右键
  816. // document.oncontextmenu = new Function("event.returnValue=false");
  817. var _info = JSON.parse(localStorage.getItem("storeInfo"));
  818. // if (_info) {
  819. // this.model.hotelId = _info.id;
  820. // }
  821. getAction("/business/busDictItem/list", {
  822. hotelId: _info.id,
  823. dictId: "1639538915239743490",
  824. }).then((res) => {
  825. if (res.success) {
  826. var list = [];
  827. res.result.records.forEach((item) => {
  828. list.push({ label: item.itemText, value: item.id });
  829. });
  830. this.customerSourceList = list;
  831. }
  832. });
  833. getAction("/rooms/cesRoomLayout/list", {
  834. pageSize: 99999,
  835. pageNo: 1,
  836. }).then((res) => {
  837. if (res.success) {
  838. var list = [];
  839. res.result.records.forEach((item) => {
  840. list.push({ label: item.name, value: item.id });
  841. });
  842. this.cesRoomLayoutList = list;
  843. }
  844. });
  845. getAction("/rooms/cesRoomBuildingFloor/tree", {}).then((res) => {
  846. if (res.success) {
  847. this.roomBuildingFloorTree = res.result;
  848. }
  849. });
  850. getAction("/rooms/cesRooms/room-status-color", {}).then((res) => {
  851. if (res.success) {
  852. this.roomStatusColorList = res.result;
  853. var list = [];
  854. res.result.forEach((item) => {
  855. list.push({ label: item.title, value: item.value });
  856. });
  857. this.roomStatusList = list;
  858. }
  859. });
  860. this.loadData();
  861. },
  862. mounted() {
  863. // this.handleBillInfo();
  864. // this.handleCheckInAdd()
  865. // this.$refs.ModalScheduleRoom.addList([]);
  866. // this.$refs.ModalScheduleRoom.title = "预定登记";
  867. // this.$refs.ModalScheduleRoom.disableSubmit = false;
  868. // this.$refs.ModalScheduleTeamRoom.addList([]);
  869. // this.$refs.ModalScheduleTeamRoom.title = "团队预定登记";
  870. // this.$refs.ModalScheduleTeamRoom.disableSubmit = false;
  871. // this.$refs.ModalEditScheduleRoom.addList([]);
  872. // this.$refs.ModalEditScheduleRoom.title = "详单";
  873. // this.$refs.ModalEditScheduleRoom.disableSubmit = false;
  874. },
  875. methods: {
  876. moment,
  877. getCustomerSourceList(customerSource, first) {
  878. var find = this.customerSourceList.find((t) => t.value == customerSource);
  879. if (find) {
  880. return first ? find.label.substr(0, 1) : find.label;
  881. }
  882. return "";
  883. },
  884. checkInCount(rooms) {
  885. return rooms.filter((t) => t.livingData && t.livingData.livingOrder)
  886. .length;
  887. },
  888. vacantCount(rooms) {
  889. return rooms.filter((t) => !t.livingData || !t.livingData.livingOrder)
  890. .length;
  891. },
  892. tabsClick(e) {
  893. if (e == "1") {
  894. this.loadData();
  895. }
  896. },
  897. getRoomStatusColor(roomStatus) {
  898. var find = this.roomStatusColorList.find((t) => t.value == roomStatus);
  899. return find ? find.extend : "";
  900. },
  901. getRoomStatusName(roomStatus) {
  902. var find = this.roomStatusList.find((t) => t.value == roomStatus);
  903. return find ? find.label : "";
  904. },
  905. toPage() {
  906. this.$router.push({
  907. // path: "/room/scheduledetail",
  908. // query: { id: "YD20230331112026203" },
  909. name: "room-scheduledetail",
  910. params: { id: "YD20230331112026203" },
  911. });
  912. },
  913. toTeamPage() {
  914. this.$router.push({
  915. // path: "/room/scheduleteamdetail",
  916. // query: { id: "YD20230403170240075" },
  917. name: "room-scheduleteamdetail",
  918. params: { id: "YD20230403170240075" },
  919. });
  920. },
  921. addScheduleTeam() {
  922. this.$refs.ModalScheduleTeamRoom.addList([]);
  923. this.$refs.ModalScheduleTeamRoom.title = "团队预定登记";
  924. this.$refs.ModalScheduleTeamRoom.disableSubmit = false;
  925. },
  926. scheduleClick(e) {
  927. var selectRoom = [];
  928. this.roomList.forEach((t) => {
  929. t.rooms.forEach((c) => {
  930. if (c.roomInfo.state === 88) {
  931. c.roomInfo.marketPrice = c.layout.marketPrice;
  932. selectRoom.push(c.roomInfo);
  933. }
  934. });
  935. });
  936. this.$refs.ModalScheduleRoom.addList(selectRoom, e.key);
  937. this.$refs.ModalScheduleRoom.title =
  938. e.key == "1" ? "散客预定登记" : "团队预定登记";
  939. this.$refs.ModalScheduleRoom.disableSubmit = false;
  940. },
  941. handleMenuClick(e) {
  942. console.log("click", e);
  943. var selectRoom = [];
  944. this.roomList.forEach((t) => {
  945. t.rooms.forEach((c) => {
  946. if (c.roomInfo.state === 88) {
  947. c.roomInfo.marketPrice = c.layout.marketPrice;
  948. selectRoom.push(c.roomInfo);
  949. }
  950. });
  951. });
  952. this.$refs.ModalBillRoomForm.addList(selectRoom, e.key);
  953. this.$refs.ModalBillRoomForm.title =
  954. e.key == "1" ? "散客入住登记" : "团队入住登记";
  955. this.$refs.ModalBillRoomForm.disableSubmit = false;
  956. },
  957. roomItemClick(roomLive) {
  958. // 清除上一次的定时器
  959. if (this.timeId) {
  960. clearTimeout(this.timeId);
  961. }
  962. this.timeId = setTimeout(() => {
  963. if (!this.multipleRoom && roomLive.roomInfo.state !== 88) {
  964. this.roomList.forEach((item) => {
  965. item.rooms.forEach((c) => {
  966. if (c.roomInfo.state === 88) {
  967. c.roomInfo.state = 0;
  968. }
  969. });
  970. });
  971. }
  972. if (roomLive.roomInfo.state !== 88) {
  973. roomLive.roomInfo.state = 88;
  974. if (roomLive.livingData && roomLive.livingData.livingOrder) {
  975. this.checkInBtnDis = true;
  976. } else {
  977. this.checkInBtnDis = false;
  978. }
  979. if (
  980. (roomLive.livingData && roomLive.livingData.livingOrder) ||
  981. (roomLive.bookingData && roomLive.bookingData.bookingOrder)
  982. ) {
  983. this.scheduleBtnDis = true;
  984. } else {
  985. this.scheduleBtnDis = false;
  986. }
  987. } else {
  988. roomLive.roomInfo.state = 0;
  989. }
  990. if (this.multipleRoom) {
  991. this.checkInBtnDis = false;
  992. this.scheduleBtnDis = false;
  993. this.roomList.forEach((item) => {
  994. item.rooms.forEach((c) => {
  995. if (c.roomInfo.state === 88) {
  996. if (!this.checkInBtnDis) {
  997. if (c.livingData && c.livingData.livingOrder) {
  998. this.checkInBtnDis = true;
  999. } else {
  1000. this.checkInBtnDis = false;
  1001. }
  1002. }
  1003. if (!this.scheduleBtnDis) {
  1004. if (
  1005. (c.livingData && c.livingData.livingOrder) ||
  1006. (c.bookingData && c.bookingData.bookingOrder)
  1007. ) {
  1008. this.scheduleBtnDis = true;
  1009. } else {
  1010. this.scheduleBtnDis = false;
  1011. }
  1012. }
  1013. }
  1014. });
  1015. });
  1016. }
  1017. // 清除定时器
  1018. clearTimeout(this.timeId);
  1019. }, 200);
  1020. },
  1021. handleBillInfo(roomLive) {
  1022. console.log("handleBillInfo", roomLive);
  1023. if (this.timeId) {
  1024. clearTimeout(this.timeId);
  1025. }
  1026. if (!roomLive.livingData || !roomLive.livingData.livingOrder) {
  1027. if (!roomLive.bookingData || !roomLive.bookingData.bookingOrder) {
  1028. this.handleCheckInAdd(roomLive);
  1029. } else {
  1030. this.$router.push({
  1031. name: "room-scheduledetail",
  1032. params: { id: roomLive.bookingData.bookingOrder.bookingOrdersNo },
  1033. });
  1034. }
  1035. } else {
  1036. this.$refs.ModalBillRoomInfo.add(
  1037. roomLive.livingData.livingOrder.bookingOrderId,
  1038. 1
  1039. );
  1040. this.$refs.ModalBillRoomInfo.title = "账单";
  1041. this.$refs.ModalBillRoomInfo.disableSubmit = true;
  1042. }
  1043. roomLive.roomInfo.state = 0;
  1044. },
  1045. handleCheckInAdd(roomLive) {
  1046. if (this.timeId) {
  1047. clearTimeout(this.timeId);
  1048. }
  1049. roomLive.roomInfo.marketPrice = roomLive.layout.marketPrice;
  1050. this.$refs.ModalBillRoomForm.addList([roomLive.roomInfo], 1);
  1051. this.$refs.ModalBillRoomForm.title = "散客入住登记";
  1052. this.$refs.ModalBillRoomForm.disableSubmit = false;
  1053. },
  1054. multipleRoomChange() {
  1055. this.roomList.forEach((item) => {
  1056. item.rooms.forEach((c) => {
  1057. if (c.roomInfo.state == 88) {
  1058. c.roomInfo.state = 0;
  1059. }
  1060. });
  1061. });
  1062. },
  1063. onChange() {},
  1064. onCheck(value, label, extra) {
  1065. console.log("onCheck", value);
  1066. console.log(
  1067. "checkedroomBuildingFloorList",
  1068. this.checkedroomBuildingFloorList
  1069. );
  1070. },
  1071. checkChange(e) {
  1072. console.log("e", e);
  1073. console.log(
  1074. "checkedroomBuildingFloorList",
  1075. this.checkedroomBuildingFloorList
  1076. );
  1077. var list = this.oldRoomList;
  1078. if (this.checkedCesRoomLayoutList.length > 0) {
  1079. list = this.oldRoomList.reduce((acc, curr) => {
  1080. const rooms = curr.rooms.filter((room) =>
  1081. this.checkedCesRoomLayoutList.includes(room.layout.id)
  1082. );
  1083. acc.push({ ...curr, rooms });
  1084. return acc;
  1085. }, []);
  1086. }
  1087. if (this.checkedRoomStatusList.length > 0) {
  1088. list = list.reduce((acc, curr) => {
  1089. const rooms = curr.rooms.filter((room) =>
  1090. this.checkedRoomStatusList.includes(
  1091. room.roomInfo.roomStatus.toString()
  1092. )
  1093. );
  1094. acc.push({ ...curr, rooms });
  1095. return acc;
  1096. }, []);
  1097. }
  1098. if (this.checkedCustomerSourceList.length > 0) {
  1099. list = list.reduce((acc, curr) => {
  1100. const rooms = curr.rooms.filter((room) =>
  1101. room.livingData && room.livingData.livingOrder
  1102. ? this.checkedCustomerSourceList.includes(
  1103. room.livingData.livingOrder.customerSource
  1104. )
  1105. : room.bookingData && room.bookingData.bookingOrder
  1106. ? this.checkedCustomerSourceList.includes(
  1107. room.bookingData.bookingOrder.customerSource
  1108. )
  1109. : false
  1110. );
  1111. acc.push({ ...curr, rooms });
  1112. return acc;
  1113. }, []);
  1114. }
  1115. if (this.checkedroomBuildingFloorList.length > 0) {
  1116. list = list.filter(
  1117. (item) =>
  1118. this.checkedroomBuildingFloorList.includes(item.buildingId) ||
  1119. this.checkedroomBuildingFloorList.includes(item.id)
  1120. );
  1121. }
  1122. if (this.keyWord) {
  1123. //房号/姓名/手机号搜索
  1124. list = list.reduce((acc, curr) => {
  1125. const rooms = curr.rooms.filter(
  1126. (room) =>
  1127. room.roomInfo.name == this.keyWord ||
  1128. (room.livingData && room.livingData.livingCustomers
  1129. ? room.livingData.livingCustomers.customerName == this.keyWord
  1130. : room.bookingData && room.bookingData.bookingCustomer
  1131. ? room.bookingData.bookingCustomer.name == this.keyWord
  1132. : false) ||
  1133. (room.livingData && room.livingData.livingCustomers
  1134. ? room.livingData.livingCustomers.phone == this.keyWord
  1135. : room.bookingData && room.bookingData.bookingCustomer
  1136. ? room.bookingData.bookingCustomer.phone == this.keyWord
  1137. : false)
  1138. );
  1139. acc.push({ ...curr, rooms });
  1140. return acc;
  1141. }, []);
  1142. }
  1143. console.log("list2", list);
  1144. this.roomList = list;
  1145. },
  1146. // roomStatusChange(e) {
  1147. // console.log("e", e);
  1148. // var list = this.oldRoomList;
  1149. // if (this.checkedRoomStatusList.length > 0) {
  1150. // list = this.oldRoomList.reduce((acc, curr) => {
  1151. // const rooms = curr.rooms.filter((room) =>
  1152. // this.checkedRoomStatusList.includes(room.roomInfo.roomStatus.toString())
  1153. // );
  1154. // acc.push({ ...curr, rooms });
  1155. // return acc;
  1156. // }, []);
  1157. // }
  1158. // console.log("list2", list);
  1159. // this.roomList = list;
  1160. // },
  1161. collapseClick(row, value) {
  1162. this.$set(row, "collapse", value);
  1163. },
  1164. handleAdd(e) {
  1165. this.$refs.modalForm.add();
  1166. this.$refs.modalForm.title = "维修";
  1167. this.$refs.modalForm.disableSubmit = false;
  1168. },
  1169. modalWxFormOk() {
  1170. this.loadData();
  1171. },
  1172. handleWx() {
  1173. var selectRoom = [];
  1174. this.roomList.forEach((t) => {
  1175. t.rooms.forEach((c) => {
  1176. if (c.roomInfo.state === 88) {
  1177. selectRoom.push({ roomId: c.roomInfo.id, roomNo: c.roomInfo.name });
  1178. }
  1179. });
  1180. });
  1181. if (selectRoom.length === 0) {
  1182. this.$message.warning("请先选择房间");
  1183. return;
  1184. }
  1185. console.log("selectRoom", selectRoom);
  1186. this.$refs.modalForm.add({ roomRepairList: selectRoom });
  1187. this.$refs.modalForm.title = "维修";
  1188. this.$refs.modalForm.disableSubmit = false;
  1189. },
  1190. handleLock(e) {
  1191. var selectRoom = [];
  1192. this.roomList.forEach((t) => {
  1193. t.rooms.forEach((c) => {
  1194. if (c.roomInfo.state === 88) {
  1195. selectRoom.push({ roomId: c.roomInfo.id, roomNo: c.roomInfo.name });
  1196. }
  1197. });
  1198. });
  1199. if (selectRoom.length === 0) {
  1200. this.$message.warning("请先选择房间");
  1201. return;
  1202. }
  1203. console.log("selectRoom", selectRoom);
  1204. this.$refs.ModalLockRoom.add({ roomLockList: selectRoom });
  1205. this.$refs.ModalLockRoom.title = "锁房";
  1206. this.$refs.ModalLockRoom.disableSubmit = false;
  1207. },
  1208. handleDirty() {
  1209. var selectRoom = [];
  1210. this.roomList.forEach((t) => {
  1211. t.rooms.forEach((c) => {
  1212. if (c.roomInfo.state === 88) {
  1213. selectRoom.push(c.roomInfo.id);
  1214. }
  1215. });
  1216. });
  1217. if (selectRoom.length === 0) {
  1218. this.$message.warning("请先选择房间");
  1219. return;
  1220. }
  1221. var ids = selectRoom.join(",");
  1222. postAction("/rooms/cesRooms/dirtyRoom?roomIds=" + ids, {}).then((res) => {
  1223. if (res.success) {
  1224. this.$message.success(res.message);
  1225. this.loadData();
  1226. }
  1227. });
  1228. },
  1229. handleClean(e) {
  1230. var selectRoom = [];
  1231. this.roomList.forEach((t) => {
  1232. t.rooms.forEach((c) => {
  1233. if (c.roomInfo.state === 88) {
  1234. selectRoom.push({ roomId: c.roomInfo.id, roomNo: c.roomInfo.name });
  1235. }
  1236. });
  1237. });
  1238. if (selectRoom.length === 0) {
  1239. this.$message.warning("请先选择房间");
  1240. return;
  1241. }
  1242. console.log("selectRoom", selectRoom);
  1243. this.$refs.ModalCleanRoom.add({ roomCleanList: selectRoom });
  1244. this.$refs.ModalCleanRoom.title = "清理房间";
  1245. this.$refs.ModalCleanRoom.disableSubmit = false;
  1246. },
  1247. handleOffLock() {
  1248. var selectRoom = [];
  1249. this.roomList.forEach((t) => {
  1250. t.rooms.forEach((c) => {
  1251. if (c.roomInfo.state === 88) {
  1252. selectRoom.push(c.roomInfo.id);
  1253. }
  1254. });
  1255. });
  1256. if (selectRoom.length === 0) {
  1257. this.$message.warning("请先选择房间");
  1258. return;
  1259. }
  1260. var ids = selectRoom.join(",");
  1261. postAction("/fw/fwRoomLock/offLockRoom?roomIds=" + ids, {}).then(
  1262. (res) => {
  1263. if (res.success) {
  1264. this.$message.success(res.message);
  1265. this.loadData();
  1266. }
  1267. }
  1268. );
  1269. },
  1270. handleCompleteRepair() {
  1271. var selectRoom = [];
  1272. this.roomList.forEach((t) => {
  1273. t.rooms.forEach((c) => {
  1274. if (c.roomInfo.state === 88) {
  1275. selectRoom.push(c.roomInfo.id);
  1276. }
  1277. });
  1278. });
  1279. if (selectRoom.length === 0) {
  1280. this.$message.warning("请先选择房间");
  1281. return;
  1282. }
  1283. var ids = selectRoom.join(",");
  1284. postAction("/fw/fwRoomRepair/completeRepairRoom?roomIds=" + ids, {}).then(
  1285. (res) => {
  1286. if (res.success) {
  1287. this.$message.success(res.message);
  1288. this.loadData();
  1289. }
  1290. }
  1291. );
  1292. },
  1293. modalLockRoomFormOk() {
  1294. this.loadData();
  1295. },
  1296. onMenuClick(e, row) {
  1297. console.log("e", e);
  1298. console.log("row", row);
  1299. var that = this;
  1300. if (e.key == "1") {
  1301. if (row.bookingData && row.bookingData.bookingOrder) {
  1302. this.$confirm({
  1303. title: "提示",
  1304. content: "此房间有预定是否预定转入住?",
  1305. onOk: function () {
  1306. that.$router.push({
  1307. name: "room-scheduledetail",
  1308. params: {
  1309. id: row.bookingData.bookingOrder.bookingOrdersNo,
  1310. },
  1311. });
  1312. },
  1313. });
  1314. } else {
  1315. row.roomInfo.marketPrice = row.layout.marketPrice;
  1316. this.$refs.ModalBillRoomForm.addList([row.roomInfo], 1);
  1317. this.$refs.ModalBillRoomForm.title = "散客入住登记";
  1318. this.$refs.ModalBillRoomForm.disableSubmit = false;
  1319. }
  1320. } else if (e.key == "2") {
  1321. this.$refs.ModalScheduleRoom.addList([row.roomInfo], 1);
  1322. this.$refs.ModalScheduleRoom.title = "散客预定登记";
  1323. this.$refs.ModalScheduleRoom.disableSubmit = false;
  1324. } else if (e.key == "3") {
  1325. var selectRoom = [row.roomInfo.id];
  1326. if (selectRoom.length === 0) {
  1327. this.$message.warning("请先选择房间");
  1328. return;
  1329. }
  1330. var ids = selectRoom.join(",");
  1331. postAction("/rooms/cesRooms/dirtyRoom?roomIds=" + ids, {}).then(
  1332. (res) => {
  1333. if (res.success) {
  1334. this.$message.success(res.message);
  1335. this.loadData();
  1336. }
  1337. }
  1338. );
  1339. } else if (e.key == "31") {
  1340. var selectRoom = [
  1341. {
  1342. roomId: row.roomInfo.id,
  1343. roomNo: row.roomInfo.name,
  1344. },
  1345. ];
  1346. if (selectRoom.length === 0) {
  1347. this.$message.warning("请先选择房间");
  1348. return;
  1349. }
  1350. console.log("selectRoom", selectRoom);
  1351. this.$refs.ModalCleanRoom.add({ roomCleanList: selectRoom });
  1352. this.$refs.ModalCleanRoom.title = "清理房间";
  1353. this.$refs.ModalCleanRoom.disableSubmit = false;
  1354. } else if (e.key == "4") {
  1355. var selectRoom = [
  1356. {
  1357. roomId: row.roomInfo.id,
  1358. roomNo: row.roomInfo.name,
  1359. },
  1360. ];
  1361. if (selectRoom.length === 0) {
  1362. this.$message.warning("请先选择房间");
  1363. return;
  1364. }
  1365. console.log("selectRoom", selectRoom);
  1366. this.$refs.modalForm.add({ roomRepairList: selectRoom });
  1367. this.$refs.modalForm.title = "维修";
  1368. this.$refs.modalForm.disableSubmit = false;
  1369. } else if (e.key == "41") {
  1370. var selectRoom = [row.roomInfo.id];
  1371. if (selectRoom.length === 0) {
  1372. this.$message.warning("请先选择房间");
  1373. return;
  1374. }
  1375. var ids = selectRoom.join(",");
  1376. postAction(
  1377. "/fw/fwRoomRepair/completeRepairRoom?roomIds=" + ids,
  1378. {}
  1379. ).then((res) => {
  1380. if (res.success) {
  1381. this.$message.success(res.message);
  1382. this.loadData();
  1383. }
  1384. });
  1385. } else if (e.key == "51") {
  1386. var selectRoom = [row.roomInfo.id];
  1387. if (selectRoom.length === 0) {
  1388. this.$message.warning("请先选择房间");
  1389. return;
  1390. }
  1391. var ids = selectRoom.join(",");
  1392. postAction("/fw/fwRoomLock/offLockRoom?roomIds=" + ids, {}).then(
  1393. (res) => {
  1394. if (res.success) {
  1395. this.$message.success(res.message);
  1396. this.loadData();
  1397. }
  1398. }
  1399. );
  1400. }
  1401. },
  1402. modalBillRoomFormOk(e) {
  1403. this.loadData();
  1404. console.log("e", e);
  1405. this.$refs.ModalBillRoomInfo.add(e);
  1406. this.$refs.ModalBillRoomInfo.title = "账单";
  1407. this.$refs.ModalBillRoomInfo.disableSubmit = true;
  1408. },
  1409. modalFormOk(e) {
  1410. console.log("e", e);
  1411. this.loadData();
  1412. this.$router.push({
  1413. // path: "/room/scheduledetail",
  1414. // query: { id: e },
  1415. name: "room-scheduledetail",
  1416. params: { id: e },
  1417. });
  1418. },
  1419. modalTeamFormOk(e) {
  1420. console.log("e", e);
  1421. this.loadData();
  1422. this.$router.push({
  1423. // path: "/room/scheduledetail",
  1424. // query: { id: e },
  1425. name: "room-scheduleteamdetail",
  1426. params: { id: e },
  1427. });
  1428. },
  1429. loadData() {
  1430. this.checkInBtnDis = false;
  1431. this.scheduleBtnDis = false;
  1432. getAction("/rooms/cesRooms/realtime-rooms", {}).then((res) => {
  1433. if (res.success) {
  1434. res.result.forEach((row) => {
  1435. this.$set(row, "collapse", 1);
  1436. });
  1437. this.roomList = res.result;
  1438. this.oldRoomList = JSON.parse(JSON.stringify(res.result));
  1439. }
  1440. });
  1441. },
  1442. },
  1443. };
  1444. </script>
  1445. <style scoped>
  1446. @import "~@assets/less/common.less";
  1447. </style>
  1448. <style scoped>
  1449. .course-week {
  1450. /* border: 1px solid #ddd; */
  1451. /* padding: 1%; */
  1452. box-sizing: border-box;
  1453. display: flex;
  1454. flex-direction: column;
  1455. }
  1456. .post-mark {
  1457. position: relative;
  1458. overflow: hidden;
  1459. width: 100%;
  1460. height: 100%;
  1461. }
  1462. .select-cell {
  1463. position: absolute;
  1464. width: 100%;
  1465. height: 100%;
  1466. left: 0;
  1467. top: 0;
  1468. z-index: 10;
  1469. -webkit-box-sizing: border-box;
  1470. box-sizing: border-box;
  1471. background: rgba(102, 102, 102, 0.5);
  1472. -webkit-user-select: none;
  1473. -moz-user-select: none;
  1474. -ms-user-select: none;
  1475. user-select: none;
  1476. border-radius: 5px;
  1477. display: flex;
  1478. justify-content: center;
  1479. align-items: center;
  1480. }
  1481. .week-top {
  1482. display: flex;
  1483. justify-content: space-between;
  1484. align-items: center;
  1485. width: 100%;
  1486. height: 40px;
  1487. padding: 0 1%;
  1488. box-sizing: border-box;
  1489. }
  1490. .week-top .week-btn-wrap {
  1491. width: 200px;
  1492. display: flex;
  1493. justify-content: space-around;
  1494. color: #409eff;
  1495. }
  1496. .week-top .week-btn-wrap span {
  1497. cursor: pointer;
  1498. display: flex;
  1499. justify-content: center;
  1500. align-items: center;
  1501. font-size: 15px;
  1502. }
  1503. .w-today-date {
  1504. font-weight: bold;
  1505. font-size: 16px;
  1506. }
  1507. .w-choose-status {
  1508. display: flex;
  1509. /* justify-content: flex-end;
  1510. width: 200px; */
  1511. }
  1512. .w-choose-status > div {
  1513. width: 100%;
  1514. flex: 1;
  1515. display: flex;
  1516. padding: 0 2%;
  1517. white-space: nowrap;
  1518. line-height: 20px;
  1519. box-sizing: border-box;
  1520. }
  1521. .w-choose-status > div .square {
  1522. display: flex;
  1523. width: 16px;
  1524. height: 16px;
  1525. border-radius: 4px;
  1526. box-sizing: border-box;
  1527. }
  1528. .w-choose-status > div .title {
  1529. display: flex;
  1530. align-items: center;
  1531. line-height: 16px;
  1532. padding-left: 4px;
  1533. font-size: 14px;
  1534. box-sizing: border-box;
  1535. }
  1536. .week-table {
  1537. display: flex;
  1538. flex-direction: column;
  1539. }
  1540. .week-table .table-header {
  1541. width: 100%;
  1542. height: 80px;
  1543. background: #eaedf2;
  1544. display: flex;
  1545. flex-direction: column;
  1546. align-items: center;
  1547. border-bottom: 1px solid #eaedf2;
  1548. box-sizing: border-box;
  1549. }
  1550. .table-header .w-table-date,
  1551. .table-week {
  1552. width: 100%;
  1553. height: 40px;
  1554. text-align: left;
  1555. display: flex;
  1556. justify-content: center;
  1557. align-items: center;
  1558. }
  1559. .table-header .w-table-date > span,
  1560. .table-week > span {
  1561. flex: 1;
  1562. color: #000;
  1563. height: 100%;
  1564. font-size: 14px;
  1565. display: flex;
  1566. justify-content: center;
  1567. align-items: center;
  1568. font-weight: bold;
  1569. }
  1570. .w-table-date .w-day-item,
  1571. .table-week .w-day-item {
  1572. color: #000;
  1573. font-size: 14px;
  1574. display: flex;
  1575. justify-content: center;
  1576. align-items: center;
  1577. }
  1578. .week-table .w-time-period-list {
  1579. width: 100%;
  1580. }
  1581. .w-time-period-list .w-time-period-row {
  1582. width: 100%;
  1583. min-height: 60px;
  1584. }
  1585. .w-time-period-col {
  1586. width: 100%;
  1587. min-height: 60px;
  1588. display: flex;
  1589. }
  1590. .w-time-period-col .w-time-period {
  1591. width: 12.5%;
  1592. display: flex;
  1593. justify-content: center;
  1594. align-items: center;
  1595. border-left: 1px solid #eaedf2;
  1596. /* border-bottom: 1px solid #eaedf2; */
  1597. box-sizing: border-box;
  1598. }
  1599. .w-time-period-col:last-child {
  1600. border-bottom: 1px solid #eaedf2;
  1601. }
  1602. .meeting-room-center {
  1603. transform: translate(-200%, 0%);
  1604. width: 14px;
  1605. font-size: 14px;
  1606. word-wrap: break-word;
  1607. position: absolute;
  1608. }
  1609. .w-time-period-col .w-row-day {
  1610. width: 100%;
  1611. display: flex;
  1612. justify-content: center;
  1613. }
  1614. .w-row-day .w-things {
  1615. flex: 1;
  1616. display: flex;
  1617. flex-direction: column;
  1618. align-items: center;
  1619. border-left: 1px solid #eaedf2;
  1620. border-bottom: 1px solid #eaedf2;
  1621. box-sizing: border-box;
  1622. cursor: pointer;
  1623. }
  1624. .w-row-day .w-things:last-child {
  1625. border-right: 1px solid #eaedf2;
  1626. }
  1627. .w-things .w-thing-item {
  1628. display: flex;
  1629. /* width: 80%; */
  1630. height: 135px;
  1631. font-size: 14px;
  1632. flex-direction: column;
  1633. justify-content: space-around;
  1634. min-height: 50px;
  1635. border-radius: 10px;
  1636. margin: 2% 1%;
  1637. padding: 1% 2%;
  1638. cursor: pointer;
  1639. color: #fff;
  1640. background: #ff6200;
  1641. box-sizing: border-box;
  1642. transition: all 1s linear 0.5s;
  1643. }
  1644. .w-isCurDate {
  1645. color: #ff2525 !important;
  1646. }
  1647. .w-noMore {
  1648. min-height: 200px;
  1649. padding: 2%;
  1650. display: flex;
  1651. justify-content: center;
  1652. align-items: center;
  1653. border: 1px solid rgba(156, 173, 173, 0.3);
  1654. color: #9cadadb7;
  1655. box-sizing: border-box;
  1656. }
  1657. .w_expand,
  1658. .w_shrink {
  1659. color: #0a98d5;
  1660. cursor: pointer;
  1661. width: 100%;
  1662. padding: 2% 0;
  1663. display: flex;
  1664. justify-content: center;
  1665. align-items: center;
  1666. }
  1667. </style>
  1668. <style scoped>
  1669. #components-grid-demo-playground [class~="ant-col"] {
  1670. background: transparent;
  1671. border: 0;
  1672. }
  1673. #components-grid-demo-playground .room-item {
  1674. background: rgba(67, 207, 124, 1);
  1675. height: 125px;
  1676. /* line-height: 200px; */
  1677. font-size: 13px;
  1678. color: #f9f9f9;
  1679. padding: 2px;
  1680. border-radius: 5px;
  1681. cursor: pointer;
  1682. position: relative;
  1683. }
  1684. #components-grid-demo-playground pre {
  1685. background: #f9f9f9;
  1686. border-radius: 6px;
  1687. font-size: 13px;
  1688. padding: 8px 16px;
  1689. }
  1690. </style>