BillRoomInfoModal.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. <template>
  2. <j-modal
  3. :width="width"
  4. :visible="visible"
  5. switchFullscreen
  6. @ok="handleOk"
  7. :confirmLoadingTwo="confirmLoading"
  8. :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
  9. @cancel="handleCancel"
  10. cancelText="关闭"
  11. :class="livingStatu === -1 ? 'ant-modal-header_living' : 'ant-modal-header_leave'"
  12. >
  13. <template slot="title">
  14. <div
  15. style="
  16. display: flex;
  17. height: 80px;">
  18. <div class="menu" v-if="livingStatu === -1">
  19. <a-icon @click="adjustPrice" type="account-book" style="color: #fff; font-size: 30px; width:120px; align-self: center;" />
  20. <a-button @click="adjustPrice" type="link" style="width: 120px; text-align: center; align-self: center"> 调价 </a-button>
  21. </div>
  22. <div class="menu" v-if="livingStatu === -1">
  23. <a-icon @click="handleLeaseGoods" type="block" style="color: #fff; font-size: 30px; width:120px; align-self: center;" />
  24. <a-button type="link" @click="handleLeaseGoods" style="width: 120px; text-align: center; align-self: center">
  25. 物品借用
  26. </a-button>
  27. </div>
  28. <div class="menu" v-if="livingStatu === -1">
  29. <a-icon @click="handleMessage" type="message" style="color: #fff; font-size: 30px; width:120px; align-self: center;" />
  30. <a-button @click="handleMessage" type="link" style="width: 120px; text-align: center; align-self: center"> 客户留言 </a-button>
  31. </div>
  32. <div class="menu" v-if="livingStatu === -1">
  33. <a-icon @click="handleUnion" type="retweet" style="color: #fff; font-size: 30px; width:120px; align-self: center;" />
  34. <a-button @click="handleUnion" type="link" style="width: 120px; text-align: center; align-self: center">联房</a-button>
  35. </div>
  36. <div class="menu" v-if="livingStatu === -1">
  37. <a-icon @click="handleLeaveNotSettle" type="euro" style="color: #fff; font-size: 30px; width:120px; align-self: center;" />
  38. <a-button @click="handleLeaveNotSettle" type="link" style="width: 120px; text-align: center; align-self: center">
  39. 先走不结
  40. </a-button>
  41. </div>
  42. <div class="menu" v-else-if="livingStatu === 1">
  43. <a-icon @click="cancelHandleLeaveNotSettle" type="euro" style="color: #fff; font-size: 30px; width:120px; align-self: center;"/>
  44. <a-button @click="cancelHandleLeaveNotSettle" type="link" style="width: 120px; text-align: center; align-self: center">
  45. 撤销结账
  46. </a-button>
  47. </div>
  48. <div class="menu" v-else>
  49. <a-icon @click="cancelHandleLeaveNotSettle" type="euro" style="color: #fff; font-size: 30px; width:120px; align-self: center;" />
  50. <a-button @click="cancelHandleLeaveNotSettle" type="link" style="width: 120px; text-align: center; align-self: center">
  51. 撤销先走不结
  52. </a-button>
  53. </div>
  54. <div class="menu">
  55. <a-icon
  56. type="printer"
  57. style="color: #fff; font-size: 30px; width:120px; align-self: center;"
  58. /><a-button type="link" style="width: 120px; text-align: center; align-self: center"> 打印账单 </a-button>
  59. </div>
  60. <div class="menu">
  61. <a-icon
  62. type="container"
  63. style="color: #fff; font-size: 30px; width:120px; align-self: center;"/>
  64. <a-button type="link" style="width: 120px; text-align: center; align-self: center"> 自定义账单 </a-button>
  65. </div>
  66. </div></template>
  67. <bill-room-info ref="realForm" @ok="submitCallback" @changeLoading="changeLoading" @changeLivingStatu="(e) =>{livingStatu = e}"></bill-room-info>
  68. </j-modal>
  69. </template>
  70. <script>
  71. import BillRoomInfo from './BillRoomInfo'
  72. import { getAction, httpAction } from '@api/manage'
  73. export default {
  74. name: 'BillRoomInfoModal',
  75. components: {
  76. BillRoomInfo
  77. },
  78. data() {
  79. return {
  80. title: '',
  81. width: 1500,
  82. confirmLoading: false,
  83. visible: false,
  84. disableSubmit: false,
  85. /* -1正常入住 1结账退房 2未结退房 */
  86. livingStatu: null
  87. }
  88. },
  89. methods: {
  90. add(bookingOrderId, key, roomId, liveOrderId) {
  91. // let hotelId = roomLive.livingData.livingOrder.hotelId;
  92. // let obj = {
  93. // bookingOrderId: bookingOrderId,
  94. // roomId: roomId
  95. // }
  96. // getAction('/business/busRoomBookingOrders/canOnlyPaySelf', obj).then(res =>{
  97. // if (res.result && !confirm('是否团体支付??')) {
  98. // httpAction(
  99. // 'business/busRoomBookingOrders/split-living?livingOrderId=' +
  100. // liveOrderId,
  101. // {},
  102. // "post"
  103. // ).then((res) => {
  104. // if (res.success) {
  105. // this.visible = true;
  106. // this.$nextTick(() => {
  107. // this.$refs.realForm.add(res.result, key, roomId);
  108. // })
  109. // }
  110. // });
  111. // }else {
  112. // this.visible = true;
  113. // this.$nextTick(() => {
  114. // this.$refs.realForm.add(bookingOrderId, key, roomId);
  115. // })
  116. // }
  117. // this.visible = true
  118. // this.$nextTick(() => {
  119. // this.$refs.realForm.add(bookingOrderId, key, roomId);
  120. // })
  121. //
  122. // });
  123. this.visible = true
  124. this.$nextTick(() => {
  125. this.$refs.realForm.add(bookingOrderId, key, roomId)
  126. })
  127. },
  128. getOrder() {
  129. },
  130. edit(record) {
  131. this.visible = true
  132. this.$nextTick(() => {
  133. this.$refs.realForm.edit(record)
  134. })
  135. },
  136. close() {
  137. this.$emit('close')
  138. this.visible = false
  139. },
  140. handleOk() {
  141. this.$refs.realForm.submitForm()
  142. },
  143. handleUnion() {
  144. this.$refs.realForm.addUnion()
  145. },
  146. handleMessage() {
  147. this.$refs.realForm.addMessage()
  148. },
  149. handleLeaseGoods() {
  150. this.$refs.realForm.addLeaseGoods()
  151. },
  152. handleLeaveNotSettle() {
  153. let that = this
  154. this.$confirm({
  155. title: '先走不结',
  156. content: '确认先走不结吗?',
  157. onOk: function () {
  158. that.$refs.realForm.handleLeaveNotSettle(true)
  159. }
  160. })
  161. },
  162. cancelHandleLeaveNotSettle() {
  163. this.$refs.realForm.handleLeaveNotSettle(false)
  164. },
  165. submitCallback() {
  166. this.$emit('ok')
  167. // this.visible = false;
  168. },
  169. handleCancel() {
  170. this.close()
  171. },
  172. adjustPrice() {
  173. this.$refs.realForm.adjustPrice()
  174. },
  175. changeLoading(e) {
  176. console.log('进来了加载', e)
  177. this.confirmLoading = e
  178. }
  179. }
  180. }
  181. </script>
  182. <style lang="less">
  183. .ant-modal-header_living{
  184. .ant-modal-header{
  185. background: rgba(255, 141, 26, 1) !important;
  186. }
  187. }
  188. .ant-modal-header_leave{
  189. .ant-modal-header{
  190. background: rgb(119, 116, 113) !important;
  191. }
  192. }
  193. </style>
  194. <style scoped>
  195. /deep/ .ant-btn-link {
  196. flex: 1;
  197. color: #fff;
  198. }
  199. .menu {
  200. display: flex;
  201. flex-direction: column;
  202. flex: 1;
  203. color: #fff;
  204. margin-top: 12px;
  205. }
  206. /deep/.ant-modal-header {
  207. padding: 0;
  208. background-color: rgb(255, 141, 26);
  209. }
  210. /deep/.ant-modal-close {
  211. color: #fff;
  212. }
  213. /deep/.ant-modal-body {
  214. padding: 12px;
  215. max-height: calc(80vh - 150px);
  216. overflow-y: auto;
  217. &::-webkit-scrollbar {
  218. width: 6px;
  219. /*高宽分别对应横竖滚动条的尺寸*/
  220. height: 1px;
  221. }
  222. &::-webkit-scrollbar-thumb {
  223. background: #e3e3e6;
  224. border-radius: 6px;
  225. }
  226. &::-webkit-scrollbar-track {
  227. background: transparent;
  228. border-radius: 5px;
  229. }
  230. }
  231. </style>