paramSettings.vue 80 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834
  1. <template>
  2. <div>
  3. <a-row :gutter="[10,16]">
  4. <a-col :md="6" :sm="8">
  5. <a-card>
  6. <div class="item">
  7. <div class="item_header">
  8. <div class="item_header_left">
  9. <div class="item_header_left_logo">
  10. <img class="logo" src="~@/assets/eye.png">
  11. </div>
  12. <div class="item_header_left_title">
  13. 夜审
  14. </div>
  15. </div>
  16. <div class="item_header_right">
  17. <a-switch checked-children="自动" un-checked-children="手动" default-checked
  18. v-model="nightTrialModel.autoCheck"
  19. @change="e=>onNightTrialCheckChange(e)"/>
  20. </div>
  21. </div>
  22. <div class="item_content">
  23. <div class="item_content_row">
  24. <div class="row_left">
  25. <div class="row_left_tip">夜审时间</div>
  26. </div>
  27. <div class="row_right">
  28. <a-time-picker :open.sync="open" v-model="nightTrialModel.setNightTrialTime" format="HH:mm:ss" style="width: 80%">
  29. <a-button slot="addon" size="small" @click="handleNightTrialCancel">
  30. 取消
  31. </a-button>
  32. <a-button class="margin_left_6" slot="addon" size="small" type="primary" @click="handleNightTrialConfirm">
  33. 确定
  34. </a-button>
  35. </a-time-picker>
  36. </div>
  37. </div>
  38. <div class="item_content_row">
  39. <div class="row_left">
  40. <div class="row_left_tip">自动交班</div>
  41. </div>
  42. <div class="row_right">
  43. <a-switch checked-children="已开" un-checked-children="已关" default-checked
  44. v-model="nightTrialModel.autoHand"
  45. @change="e=>onNightTrialHandChange(e)"/>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. </a-card>
  51. </a-col>
  52. <a-col :md="6" :sm="8">
  53. <a-card>
  54. <div class="item">
  55. <div class="item_header">
  56. <div class="item_header_left">
  57. <div class="item_header_left_logo">
  58. <img class="logo" src="~@/assets/clear.png">
  59. </div>
  60. <div class="item_header_left_title">
  61. 清扫房间选择服务员
  62. </div>
  63. </div>
  64. <div class="item_header_right">
  65. </div>
  66. </div>
  67. <div class="item_content">
  68. <div class="item_content_row">
  69. <div class="row_left">
  70. <div class="row_left_tip">清扫房间选择服务员</div>
  71. </div>
  72. <div class="row_right_1">
  73. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  74. v-model="clearModel.status"
  75. @change="e=>onClearChange(e)"/>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </a-card>
  81. </a-col>
  82. <a-col :md="6" :sm="8">
  83. <a-card>
  84. <div class="item">
  85. <div class="item_header">
  86. <div class="item_header_left">
  87. <div class="item_header_left_logo">
  88. <img class="logo" src="~@/assets/clear.png">
  89. </div>
  90. <div class="item_header_left_title">
  91. 房务管理
  92. </div>
  93. </div>
  94. <div class="item_header_right">
  95. </div>
  96. </div>
  97. <div class="item_content">
  98. <div class="item_content_row">
  99. <div class="row_left">
  100. <div class="row_left_tip">开启房务管理功能</div>
  101. </div>
  102. <div class="row_right_1">
  103. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  104. v-model="houseSettingModel.status"
  105. @change="e=>onHouseSettingChange(e)"/>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </a-card>
  111. </a-col>
  112. <a-col :md="6" :sm="8">
  113. <a-card>
  114. <div class="item">
  115. <div class="item_header">
  116. <div class="item_header_left">
  117. <div class="item_header_left_logo">
  118. <img class="logo" src="~@/assets/clear.png">
  119. </div>
  120. <div class="item_header_left_title">
  121. 押金设置
  122. </div>
  123. </div>
  124. <div class="item_header_right">
  125. <div v-show="show_deposit">
  126. <a-button type="primary" shape="circle" icon="check" size="small"
  127. @click="handleDepositConfirm">
  128. </a-button>
  129. <a-button class="margin_left_6" type="danger" shape="circle" icon="close" size="small"
  130. @click="handleDepositCancel">
  131. </a-button>
  132. </div>
  133. </div>
  134. </div>
  135. <div class="item_content">
  136. <div class="item_content_row">
  137. <div class="row_left">
  138. <div class="row_left_tip">计算公式</div>
  139. </div>
  140. <div class="row_right">
  141. <a-radio-group :value="depositModel.type" @change="handleDepositChange">
  142. <a-radio-button value="1">
  143. 乘法
  144. </a-radio-button>
  145. <a-radio-button value="2">
  146. 加法
  147. </a-radio-button>
  148. <a-radio-button value="3">
  149. 固定
  150. </a-radio-button>
  151. </a-radio-group>
  152. </div>
  153. </div>
  154. <div class="item_content_row">
  155. <div class="row_left">
  156. <div class="row_left_tip">押金=</div>
  157. </div>
  158. <div class="row_right">
  159. <div class="row_right_tip" v-show="depositModel.type != 3">
  160. <span class="margin_right_4">房费</span>
  161. <span class="margin_right_4">{{depositModel.formula}}</span>
  162. </div>
  163. <a-input-number v-show="depositModel.type == 1" :precision="2"
  164. @change="onDepositChange()"
  165. v-model="depositModel.multiple" :min="0" :max="999999" />
  166. <a-input-number v-show="depositModel.type != 1" :precision="2"
  167. @change="onDepositChange()"
  168. v-model="depositModel.money" :min="0" :max="999999" />
  169. </div>
  170. </div>
  171. <div class="item_content_row">
  172. <div class="row_left">
  173. <div class="row_left_tip">余额报警</div>
  174. </div>
  175. <div class="row_right">
  176. <a-switch checked-children="已开" un-checked-children="已关" default-checked
  177. v-model="depositModel.alarm"
  178. @change="e=>onDepositAlarmChange(e)"/>
  179. </div>
  180. </div>
  181. <div class="item_content_row">
  182. <div class="row_left">
  183. <div class="row_left_tip">余额小于</div>
  184. </div>
  185. <div class="row_right">
  186. <a-input-number :precision="2" v-model="depositModel.less" :min="0" :max="999999"
  187. @change="onDepositChange()" />
  188. <div class="margin_left_6">时报警</div>
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. </a-card>
  194. </a-col>
  195. <a-col :md="6" :sm="8">
  196. <a-card>
  197. <div class="item">
  198. <div class="item_header">
  199. <div class="item_header_left">
  200. <div class="item_header_left_logo">
  201. <img class="logo" src="~@/assets/clear.png">
  202. </div>
  203. <div class="item_header_left_title">
  204. 撤销入住
  205. </div>
  206. </div>
  207. <div class="item_header_right">
  208. <div v-show="show_cancel">
  209. <a-button type="primary" shape="circle" icon="check" size="small"
  210. @click="handleCancelConfirm">
  211. </a-button>
  212. <a-button class="margin_left_6" type="danger" shape="circle" icon="close" size="small"
  213. @click="handleCancelCancel">
  214. </a-button>
  215. </div>
  216. </div>
  217. </div>
  218. <div class="item_content">
  219. <div class="item_content_row">
  220. <div class="row_left">
  221. <div class="row_left_tip">撤销开关</div>
  222. </div>
  223. <div class="row_right">
  224. <a-switch checked-children="已开" un-checked-children="已关" default-checked
  225. v-model="cancelModel.status"
  226. @change="e=>onCancelStatusChange(e)"/>
  227. </div>
  228. </div>
  229. <div class="item_content_row">
  230. <div class="row_left">
  231. <div class="row_left_tip">有效分钟</div>
  232. </div>
  233. <div class="row_right">
  234. <a-input-number :precision="2" v-model="cancelModel.minute" :min="0" :max="999999"
  235. @change="onCancelChange()" />
  236. <div class="margin_left_6">内可撤</div>
  237. </div>
  238. </div>
  239. </div>
  240. </div>
  241. </a-card>
  242. </a-col>
  243. <a-col :md="6" :sm="8">
  244. <a-card>
  245. <div class="item">
  246. <div class="item_header">
  247. <div class="item_header_left">
  248. <div class="item_header_left_logo">
  249. <img class="logo" src="~@/assets/clear.png">
  250. </div>
  251. <div class="item_header_left_title">
  252. 其他
  253. </div>
  254. </div>
  255. <div class="item_header_right">
  256. </div>
  257. </div>
  258. <div class="item_content">
  259. <div class="item_content_row">
  260. <div class="row_left">
  261. <div class="row_left_tip">是否显示制卡</div>
  262. </div>
  263. <div class="row_right_1">
  264. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  265. v-model="roomCardModel.status"
  266. @change="e=>onRoomCardChange(e)"/>
  267. </div>
  268. </div>
  269. <div class="item_content_row">
  270. <div class="row_left">
  271. <div class="row_left_tip">是否开启会员验证</div>
  272. </div>
  273. <div class="row_right_1">
  274. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  275. v-model="memberVerifyModel.status"
  276. @change="e=>onMemberVerifyChange(e)"/>
  277. </div>
  278. </div>
  279. <div class="item_content_row">
  280. <div class="row_left">
  281. <div class="row_left_tip">空脏房可以入住</div>
  282. </div>
  283. <div class="row_right_1">
  284. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  285. v-model="emptyDirtyRoomModel.status"
  286. @change="e=>onEmptyDirtyRoomChange(e)"/>
  287. </div>
  288. </div>
  289. <div class="item_content_row">
  290. <div class="row_left">
  291. <div class="row_left_tip">查房完毕才能退房</div>
  292. </div>
  293. <div class="row_right_1">
  294. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  295. v-model="checkOutModel.status"
  296. @change="e=>onCheckOutChange(e)"/>
  297. </div>
  298. </div>
  299. </div>
  300. </div>
  301. </a-card>
  302. </a-col>
  303. <a-col :md="6" :sm="8">
  304. <a-card>
  305. <div class="item">
  306. <div class="item_header">
  307. <div class="item_header_left">
  308. <div class="item_header_left_logo">
  309. <img class="logo" src="~@/assets/clear.png">
  310. </div>
  311. <div class="item_header_left_title">
  312. 扫码支付
  313. </div>
  314. </div>
  315. <div class="item_header_right">
  316. <div v-show="show_automatic">
  317. <a-button type="primary" shape="circle" icon="check" size="small"
  318. @click="handleAutomaticConfirm">
  319. </a-button>
  320. <a-button class="margin_left_6" type="danger" shape="circle" icon="close" size="small"
  321. @click="handleAutomaticCancel">
  322. </a-button>
  323. </div>
  324. </div>
  325. </div>
  326. <div class="item_content">
  327. <div class="item_content_row">
  328. <div class="row_left">
  329. <div class="row_left_tip">自动完成</div>
  330. </div>
  331. <div class="row_right">
  332. <a-input-number :precision="2" v-model="automaticModel.dayNum" :min="0" :max="999999"
  333. @change="onAutomaticChange()" />
  334. <div class="margin_left_6">天后</div>
  335. </div>
  336. </div>
  337. </div>
  338. </div>
  339. </a-card>
  340. </a-col>
  341. <a-col :md="6" :sm="8">
  342. <a-card>
  343. <div class="item">
  344. <div class="item_header">
  345. <div class="item_header_left">
  346. <div class="item_header_left_logo">
  347. <img class="logo" src="~@/assets/clear.png">
  348. </div>
  349. <div class="item_header_left_title">
  350. 数据共享
  351. </div>
  352. </div>
  353. <div class="item_header_right">
  354. <div v-show="show_share">
  355. <a-button type="primary" shape="circle" icon="check" size="small"
  356. @click="handleShareConfirm">
  357. </a-button>
  358. <a-button class="margin_left_6" type="danger" shape="circle" icon="close" size="small"
  359. @click="handleShareCancel">
  360. </a-button>
  361. </div>
  362. </div>
  363. </div>
  364. <div class="item_content">
  365. <div class="item_content_row">
  366. <div class="row_left">
  367. <div class="row_left_tip">会员共享</div>
  368. </div>
  369. <div class="row_right_1">
  370. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  371. v-model="shareModel.member"
  372. @change="e=>onShareMemberChange(e)"/>
  373. </div>
  374. </div>
  375. <div class="item_content_row">
  376. <div class="row_left">
  377. <div class="row_left_tip">会员储值共享</div>
  378. </div>
  379. <div class="row_right_1">
  380. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  381. v-model="shareModel.memberAccount"
  382. @change="e=>onShareMemberAccountChange(e)"/>
  383. </div>
  384. </div>
  385. <div class="item_content_row">
  386. <div class="row_left">
  387. <div class="row_left_tip">协议单位</div>
  388. </div>
  389. <div class="row_right_1">
  390. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  391. v-model="shareModel.agreement"
  392. @change="e=>onShareAgreementChange(e)"/>
  393. </div>
  394. </div>
  395. <div class="item_content_row">
  396. <div class="row_left">
  397. <div class="row_left_tip">协议记账共享</div>
  398. </div>
  399. <div class="row_right_1">
  400. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  401. v-model="shareModel.agreementAccount"
  402. @change="e=>onShareAgreementAccountChange(e)"/>
  403. </div>
  404. </div>
  405. </div>
  406. </div>
  407. </a-card>
  408. </a-col>
  409. <a-col :md="6" :sm="8">
  410. <a-card>
  411. <div class="item">
  412. <div class="item_header">
  413. <div class="item_header_left">
  414. <div class="item_header_left_logo">
  415. <img class="logo" src="~@/assets/clear.png">
  416. </div>
  417. <div class="item_header_left_title">
  418. 预定参数
  419. </div>
  420. </div>
  421. <div class="item_header_right">
  422. <div v-show="show_preset">
  423. <a-button type="primary" shape="circle" icon="check" size="small"
  424. @click="handlePresetConfirm">
  425. </a-button>
  426. <a-button class="margin_left_6" type="danger" shape="circle" icon="close" size="small"
  427. @click="handlePresetCancel">
  428. </a-button>
  429. </div>
  430. </div>
  431. </div>
  432. <div class="item_content">
  433. <div class="item_content_row">
  434. <div class="row_left">
  435. <div class="row_left_tip">是否开启</div>
  436. </div>
  437. <div class="row_right">
  438. <a-switch checked-children="已开" un-checked-children="已关" default-checked
  439. v-model="presetModel.status"
  440. @change="e=>onPresetStatusChange(e)"/>
  441. </div>
  442. </div>
  443. <div class="item_content_row">
  444. <div class="row_left">
  445. <div class="row_left_tip">超时预定</div>
  446. </div>
  447. <div class="row_right">
  448. <a-input-number :precision="2" v-model="presetModel.minute" :min="0" :max="999999"
  449. @change="onPresetChange()" />
  450. <div class="margin_left_6">分钟转NoShow</div>
  451. </div>
  452. </div>
  453. </div>
  454. </div>
  455. </a-card>
  456. </a-col>
  457. <a-col :md="6" :sm="8">
  458. <a-card>
  459. <div class="item">
  460. <div class="item_header">
  461. <div class="item_header_left">
  462. <div class="item_header_left_logo">
  463. <img class="logo" src="~@/assets/clear.png">
  464. </div>
  465. <div class="item_header_left_title">
  466. 计算公式
  467. </div>
  468. </div>
  469. <div class="item_header_right">
  470. <div v-show="show_computeFormula">
  471. <a-button type="primary" shape="circle" icon="check" size="small"
  472. @click="handleComputeFormulaConfirm">
  473. </a-button>
  474. <a-button class="margin_left_6" type="danger" shape="circle" icon="close" size="small"
  475. @click="handleComputeFormulaCancel">
  476. </a-button>
  477. </div>
  478. </div>
  479. </div>
  480. <div class="item_content">
  481. <div class="item_content_row">
  482. <div class="row_left">
  483. <div class="row_left_tip">出租率基数</div>
  484. </div>
  485. <div class="row_right">
  486. <a-select v-model="computeFormulaModel.cardinal" style="width: 100%" @change="onComputeFormulaChange">
  487. <!-- <a-select-option value="1">酒店实际房间数</a-select-option>-->
  488. <!-- <a-select-option value="2">总房间数-维修房数</a-select-option>-->
  489. <!-- <a-select-option value="3">总房间数-自用房数</a-select-option>-->
  490. <!-- <a-select-option value="4">总房间数-维修房数-自用房数</a-select-option>-->
  491. <a-select-option v-for="(item,index) in cardinalList" style="width: 100%"
  492. :key="index" :value="item.value">{{ item.text || item.label }}</a-select-option>
  493. </a-select>
  494. <!-- <j-dict-select-tag v-model="computeFormulaModel.cardinal" placeholder="请选择" dictCode="rental_rate_base"-->
  495. <!-- @change="onComputeFormulaChange()"/>-->
  496. </div>
  497. </div>
  498. </div>
  499. <div class="item_content">
  500. <div class="item_content_row">
  501. <div class="row_left">
  502. <div class="row_left_tip">时租间夜数</div>
  503. </div>
  504. <div class="row_right">
  505. <a-input-number :precision="2" v-model="computeFormulaModel.nights" :min="0" :max="999999"
  506. @change="onComputeFormulaChange()" />
  507. </div>
  508. </div>
  509. </div>
  510. <div class="item_content">
  511. <div class="item_content_row">
  512. <div class="row_left">
  513. <div class="row_left_tip">免费房</div>
  514. </div>
  515. <div class="row_right">
  516. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  517. v-model="computeFormulaModel.status"
  518. @change="e=>onComputeFormulaChange(e)"/>
  519. <div class="margin_left_6">计算平均房价</div>
  520. </div>
  521. </div>
  522. </div>
  523. </div>
  524. </a-card>
  525. </a-col>
  526. <a-col :md="6" :sm="8">
  527. <a-card>
  528. <div class="item">
  529. <div class="item_header">
  530. <div class="item_header_left">
  531. <div class="item_header_left_logo">
  532. <img class="logo" src="~@/assets/clear.png">
  533. </div>
  534. <div class="item_header_left_title">
  535. 打印单据隐藏信息设置
  536. </div>
  537. </div>
  538. <div class="item_header_right">
  539. </div>
  540. </div>
  541. <div class="item_content">
  542. <div class="item_content_row">
  543. <div class="row_left">
  544. <div class="row_left_tip">隐藏客人信息</div>
  545. </div>
  546. <div class="row_right_1">
  547. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  548. v-model="printModel.guest"
  549. @change="e=>onPrintGuestChange(e)"/>
  550. </div>
  551. </div>
  552. <div class="item_content_row">
  553. <div class="row_left">
  554. <div class="row_left_tip">隐藏收款房价信息</div>
  555. </div>
  556. <div class="row_right_1">
  557. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  558. v-model="printModel.price"
  559. @change="e=>onPrintPriceChange(e)"/>
  560. </div>
  561. </div>
  562. </div>
  563. </div>
  564. </a-card>
  565. </a-col>
  566. <a-col :md="6" :sm="8">
  567. <a-card>
  568. <div class="item">
  569. <div class="item_header">
  570. <div class="item_header_left">
  571. <div class="item_header_left_logo">
  572. <img class="logo" src="~@/assets/clear.png">
  573. </div>
  574. <div class="item_header_left_title">
  575. 线上预定房量是否同步
  576. </div>
  577. </div>
  578. <div class="item_header_right">
  579. </div>
  580. </div>
  581. <div class="item_content">
  582. <div class="item_content_row">
  583. <div class="row_left">
  584. <div class="row_left_tip">同步</div>
  585. </div>
  586. <div class="row_right">
  587. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  588. v-model="syncModel.status"
  589. @change="e=>onSyncChange(e)"/>
  590. </div>
  591. </div>
  592. </div>
  593. </div>
  594. </a-card>
  595. </a-col>
  596. <a-col :md="6" :sm="8">
  597. <a-card>
  598. <div class="item">
  599. <div class="item_header">
  600. <div class="item_header_left">
  601. <div class="item_header_left_logo">
  602. <img class="logo" src="~@/assets/clear.png">
  603. </div>
  604. <div class="item_header_left_title">
  605. 小程序客房服务设置
  606. </div>
  607. </div>
  608. <div class="item_header_right">
  609. <div v-show="show_xcxRoom">
  610. <a-button type="primary" shape="circle" icon="check" size="small"
  611. @click="handleXcxRoomConfirm">
  612. </a-button>
  613. <a-button class="margin_left_6" type="danger" shape="circle" icon="close" size="small"
  614. @click="handleXcxRoomCancel">
  615. </a-button>
  616. </div>
  617. </div>
  618. </div>
  619. <div class="item_content">
  620. <div class="item_content_row">
  621. <div class="row_left">
  622. <div class="row_left_tip">退房功能</div>
  623. </div>
  624. <div class="row_right">
  625. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  626. v-model="xcxRoomModel.checkOut"
  627. @change="e=>onXcxRoomChange(e)"/>
  628. </div>
  629. </div>
  630. <div class="item_content_row">
  631. <div class="row_left">
  632. <div class="row_left_tip">会员储值共享</div>
  633. </div>
  634. <div class="row_right">
  635. <a-radio-group v-model="xcxRoomModel.checkOutType" @change="onXcxRoomChange">
  636. <a-radio :value="1">
  637. 结账
  638. </a-radio>
  639. <a-radio :value="0">
  640. 未结
  641. </a-radio>
  642. </a-radio-group>
  643. </div>
  644. </div>
  645. <div class="item_content_row">
  646. <div class="row_left">
  647. <div class="row_left_tip">续住功能</div>
  648. </div>
  649. <div class="row_right">
  650. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  651. v-model="xcxRoomModel.keepLive"
  652. @change="e=>onXcxRoomChange(e)"/>
  653. </div>
  654. </div>
  655. <div class="item_content_row">
  656. <div class="row_left">
  657. <div class="row_left_tip">留言功能</div>
  658. </div>
  659. <div class="row_right">
  660. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  661. v-model="xcxRoomModel.messageLive"
  662. @change="e=>onXcxRoomChange(e)"/>
  663. </div>
  664. </div>
  665. <div class="item_content_row">
  666. <div class="row_left">
  667. <div class="row_left_tip">服务功能</div>
  668. </div>
  669. <div class="row_right">
  670. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  671. v-model="xcxRoomModel.serviceLive"
  672. @change="e=>onXcxRoomChange(e)"/>
  673. </div>
  674. </div>
  675. <div class="item_content_row">
  676. <div class="row_left">
  677. <div class="row_left_tip">维修功能</div>
  678. </div>
  679. <div class="row_right">
  680. <a-switch checked-children="开启" un-checked-children="关闭" default-checked
  681. v-model="xcxRoomModel.repairLive"
  682. @change="e=>onXcxRoomChange(e)"/>
  683. </div>
  684. </div>
  685. </div>
  686. </div>
  687. </a-card>
  688. </a-col>
  689. </a-row>
  690. </div>
  691. </template>
  692. <script>
  693. import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api'
  694. import { httpAction, getAction } from '@/api/manage'
  695. import moment from 'moment'
  696. export default {
  697. name: "paramSettings",
  698. data() {
  699. return {
  700. labelCol: {
  701. xs: {span: 24},
  702. sm: {span: 6},
  703. },
  704. wrapperCol: {
  705. xs: {span: 24},
  706. sm: {span: 12},
  707. },
  708. url: {
  709. query_nighttrial: '/business/busNightTrial/queryByHotelId',
  710. nighttrial_autocheck: '/business/busNightTrial/editAutoCheck',
  711. nighttrial_time: '/business/busNightTrial/editNightTrialTime',
  712. nighttrial_autohand: '/business/busNightTrial/editAutoHand',
  713. query_clear: '/business/busClear/queryByHotelId',
  714. clear_status: '/business/busClear/editStatus',
  715. query_housesetting: '/business/busHouseSetting/queryByHotelId',
  716. housesetting_status: '/business/busHouseSetting/editStatus',
  717. query_deposit: '/business/busDepositSetting/queryByHotelId',
  718. deposit_edit: '/business/busDepositSetting/editInfo',
  719. query_cancel: '/business/busCancel/queryByHotelId',
  720. cancel_edit: '/business/busCancel/editInfo',
  721. query_roomcard: '/business/busOtherRoomCard/queryByHotelId',
  722. roomcard_status: '/business/busOtherRoomCard/editStatus',
  723. query_memberverify: '/business/busOtherMemberVerify/queryByHotelId',
  724. memberverify_status: '/business/busOtherMemberVerify/editStatus',
  725. query_emptydirtyroom: '/business/busOtherEmptyDirtyRoom/queryByHotelId',
  726. emptydirtyroom_status: '/business/busOtherEmptyDirtyRoom/editStatus',
  727. query_checkout: '/business/busOtherCheckout/queryByHotelId',
  728. checkout_status: '/business/busOtherCheckout/editStatus',
  729. query_automatic: '/business/busParamWeep/queryByHotelId',
  730. automatic_edit: '/business/busParamWeep/editInfo',
  731. query_share: '/business/busParamShare/queryByHotelId',
  732. share_edit: '/business/busParamShare/editInfo',
  733. query_preset: '/business/busParamPreset/queryByHotelId',
  734. preset_edit: '/business/busParamPreset/editInfo',
  735. query_compute: '/business/busParamComputeFormula/queryByHotelId',
  736. compute_edit: '/business/busParamComputeFormula/editInfo',
  737. query_print: '/business/busParamPrintHide/queryByHotelId',
  738. print_editGuest: '/business/busParamPrintHide/editGuest',
  739. print_editPrice: '/business/busParamPrintHide/editPrice',
  740. query_sync: '/business/busParamPresetSync/queryByHotelId',
  741. sync_status: '/business/busParamPresetSync/editInfo',
  742. query_xcxRoom: '/business/busParamXcxRoom/queryByHotelId',
  743. xcxRoom_edit: '/business/busParamXcxRoom/editInfo',
  744. },
  745. hotelId: '',
  746. open: false,
  747. nightTrialModel: {
  748. setNightTrialTime: moment('06:00:00', 'HH:mm:ss'),
  749. autoCheck: true,
  750. autoHand: true
  751. },
  752. clearModel: {
  753. status: true
  754. },
  755. houseSettingModel: {
  756. status: true
  757. },
  758. show_deposit: false,
  759. depositModel: {
  760. type: '1',
  761. formula: '+',
  762. money: 100,
  763. alarm: true,
  764. alarmValue: 1,
  765. less: 10.00,
  766. multiple: 0.5,
  767. },
  768. show_cancel: false,
  769. cancelModel: {
  770. status: true,
  771. statusValue: 1,
  772. minute: 60
  773. },
  774. roomCardModel: {
  775. status: true
  776. },
  777. memberVerifyModel: {
  778. status: true
  779. },
  780. emptyDirtyRoomModel: {
  781. status: true
  782. },
  783. checkOutModel: {
  784. status: true
  785. },
  786. show_automatic: false,
  787. automaticModel: {
  788. dayNum: 30
  789. },
  790. show_share: false,
  791. shareModel: {
  792. agreementAccount: false,
  793. agreementAccountValue: 0,
  794. agreement: false,
  795. agreementValue: 0,
  796. memberAccount: false,
  797. memberAccountValue: 0,
  798. member: false,
  799. memberValue: 0,
  800. },
  801. show_preset: false,
  802. presetModel: {
  803. status: true,
  804. statusValue: 1,
  805. minute: 60
  806. },
  807. cardinalList: [],
  808. show_computeFormula: false,
  809. computeFormulaModel: {
  810. cardinal: '1',
  811. nights: 0,
  812. status: false,
  813. },
  814. printModel: {
  815. guest: true,
  816. price: true,
  817. },
  818. syncModel: {
  819. status: true,
  820. },
  821. show_xcxRoom: false,
  822. xcxRoomModel: {
  823. checkOut: true,
  824. checkOutType: 1,
  825. keepLive: true,
  826. messageLive: true,
  827. serviceLive: true,
  828. repairLive: true,
  829. }
  830. }
  831. },
  832. created() {
  833. //备份model原始值
  834. this.initConfig()
  835. var info = JSON.parse(localStorage.getItem("storeInfo"))
  836. this.hotelId = info.id
  837. },
  838. methods: {
  839. initConfig() {
  840. // 获取夜审信息
  841. getAction(this.url.query_nighttrial,{}).then((res)=>{
  842. console.log(res)
  843. if(res.success){
  844. // this.nightTrialModel = res.result
  845. var _time = moment(res.result.setNightTrialTime,'HH:mm:ss')
  846. var _model = {
  847. id:res.result.id,
  848. autoCheck:res.result.autoCheck == 1?true:false,
  849. autoHand:res.result.autoHand == 1?true:false,
  850. setNightTrialTime : _time
  851. }
  852. this.nightTrialModel = _model
  853. }else{
  854. }
  855. })
  856. // 获取清扫信息
  857. getAction(this.url.query_clear,{}).then((res)=>{
  858. if(res.success){
  859. var _model = {
  860. id:res.result.id,
  861. status:res.result.status == 1?true:false,
  862. }
  863. this.clearModel = _model
  864. }else{
  865. }
  866. })
  867. // 获取房务管理信息
  868. getAction(this.url.query_housesetting,{}).then((res)=>{
  869. if(res.success){
  870. var _model = {
  871. id:res.result.id,
  872. status:res.result.status == 1?true:false,
  873. }
  874. this.houseSettingModel = _model
  875. }else{
  876. }
  877. })
  878. // 获取押金设置
  879. getAction(this.url.query_deposit,{}).then((res)=>{
  880. if(res.success){
  881. var _data = res.result
  882. var _formula = _data.depositType == 1 ?'x':'+'
  883. var _model = {
  884. id:_data.id,
  885. type:_data.depositType+'',
  886. formula:_formula,
  887. multiple:_data.depositMultiple,
  888. money:_data.depositMoney,
  889. alarm:_data.balanceAlarm == 1?true:false,
  890. alarmValue:_data.balanceAlarm,
  891. less:_data.balanceLess,
  892. }
  893. this.depositModel = _model
  894. }else{
  895. }
  896. })
  897. // 获取撤销入住信息
  898. getAction(this.url.query_cancel,{}).then((res)=>{
  899. if(res.success){
  900. var _model = {
  901. id:res.result.id,
  902. status:res.result.status == 1?true:false,
  903. minute:res.result.minute
  904. }
  905. this.cancelModel = _model
  906. }else{
  907. }
  908. })
  909. //获取其他信息
  910. //制卡
  911. getAction(this.url.query_roomcard,{}).then((res)=>{
  912. if(res.success){
  913. var _model = {
  914. id:res.result.id,
  915. status:res.result.status == 1?true:false,
  916. }
  917. this.roomCardModel = _model
  918. }else{
  919. }
  920. })
  921. //会员验证
  922. getAction(this.url.query_memberverify,{}).then((res)=>{
  923. if(res.success){
  924. var _model = {
  925. id:res.result.id,
  926. status:res.result.status == 1?true:false,
  927. }
  928. this.memberVerifyModel = _model
  929. }else{
  930. }
  931. })
  932. //空脏房
  933. getAction(this.url.query_emptydirtyroom,{}).then((res)=>{
  934. if(res.success){
  935. var _model = {
  936. id:res.result.id,
  937. status:res.result.status == 1?true:false,
  938. }
  939. this.emptyDirtyRoomModel = _model
  940. }else{
  941. }
  942. })
  943. //退房
  944. getAction(this.url.query_checkout,{}).then((res)=>{
  945. if(res.success){
  946. var _model = {
  947. id:res.result.id,
  948. status:res.result.status == 1?true:false,
  949. }
  950. this.checkOutModel = _model
  951. }else{
  952. }
  953. })
  954. //扫码支付
  955. getAction(this.url.query_automatic,{}).then((res)=>{
  956. if(res.success){
  957. var _model = {
  958. id:res.result.id,
  959. dayNum:res.result.dayNum,
  960. }
  961. this.automaticModel = _model
  962. }else{
  963. }
  964. })
  965. //数据共享
  966. getAction(this.url.query_share,{}).then((res)=>{
  967. if(res.success){
  968. var _model = {
  969. id:res.result.id,
  970. agreement:res.result.agreementShare,
  971. agreementValue : res.result.agreementShare?1:0,
  972. agreementAccount:res.result.agreementAccountShare,
  973. agreementAccountValue : res.result.agreementAccountShare?1:0,
  974. member:res.result.memberShare,
  975. memberValue : res.result.memberShare?1:0,
  976. memberAccount:res.result.memberAccountShare,
  977. memberAccountValue : res.result.memberAccountShare?1:0,
  978. }
  979. this.shareModel = _model
  980. }else{
  981. }
  982. })
  983. //预定参数
  984. getAction(this.url.query_preset,{}).then((res)=>{
  985. if(res.success){
  986. var _model = {
  987. id: res.result.id,
  988. status: res.result.status,
  989. statusValue: res.result.status ? 1 : 0,
  990. minute: res.result.minute,
  991. }
  992. this.presetModel = _model
  993. }else{
  994. }
  995. })
  996. //计算公式
  997. if (getDictItemsFromCache('rental_rate_base')) {
  998. this.cardinalList = getDictItemsFromCache('rental_rate_base')
  999. return
  1000. }
  1001. //根据字典Code, 初始化字典数组
  1002. ajaxGetDictItems('rental_rate_base', null).then((res) => {
  1003. if (res.success) {
  1004. this.cardinalList = res.result
  1005. }
  1006. })
  1007. getAction(this.url.query_compute,{}).then((res)=>{
  1008. if(res.success){
  1009. var _model = {
  1010. id:res.result.id,
  1011. status:res.result.status == 1?true:false,
  1012. nights : res.result.nights,
  1013. cardinal : res.result.cardinal+'',
  1014. }
  1015. this.computeFormulaModel = _model
  1016. }else{
  1017. }
  1018. })
  1019. //打印单据隐藏信息设置
  1020. getAction(this.url.query_print,{}).then((res)=>{
  1021. if(res.success){
  1022. var _model = {
  1023. id:res.result.id,
  1024. guest:res.result.guest == 1?true:false,
  1025. price : res.result.price == 1?true:false,
  1026. }
  1027. this.printModel = _model
  1028. }else{
  1029. }
  1030. })
  1031. //线上预定房量是否同步
  1032. getAction(this.url.query_sync,{}).then((res)=>{
  1033. if(res.success){
  1034. var _model = {
  1035. id:res.result.id,
  1036. status:res.result.status == 1?true:false,
  1037. }
  1038. this.xcxRoomModel = _model
  1039. }else{
  1040. }
  1041. })
  1042. //小程序客房服务设置
  1043. getAction(this.url.query_xcxRoom,{}).then((res)=>{
  1044. if(res.success){
  1045. var _model = {
  1046. id:res.result.id,
  1047. checkOut:res.result.checkOut == 1?true:false,
  1048. checkOutType:res.result.checkOutType,
  1049. keepLive:res.result.keepLive == 1?true:false,
  1050. messageLive:res.result.messageLive == 1?true:false,
  1051. serviceLive:res.result.serviceLive == 1?true:false,
  1052. repairLive:res.result.repairLive == 1?true:false,
  1053. }
  1054. this.syncModel = _model
  1055. }else{
  1056. }
  1057. })
  1058. },
  1059. onNightTrialCheckChange(val) {
  1060. console.log('夜审' + val)
  1061. var _value = 0
  1062. if (val) {
  1063. // 自动
  1064. _value = 1
  1065. }
  1066. this.confirmLoading = true
  1067. var that = this
  1068. var _id = this.nightTrialModel.id ? this.nightTrialModel.id : ''
  1069. var param = {
  1070. autoCheck: _value,
  1071. hotelId: this.hotelId,
  1072. id: _id
  1073. }
  1074. httpAction(this.url.nighttrial_autocheck, param, 'post').then((res) => {
  1075. if (res.success) {
  1076. that.$message.success('操作成功')
  1077. that.$emit('ok')
  1078. that.nightTrialModel.id = res.result.id
  1079. } else {
  1080. that.$message.warning(res.message)
  1081. }
  1082. }).finally(() => {
  1083. that.confirmLoading = false
  1084. })
  1085. },
  1086. handleOpenChange(open) {
  1087. console.log('open', open)
  1088. this.open = open
  1089. },
  1090. handleNightTrialCancel() {
  1091. this.open = false
  1092. },
  1093. handleNightTrialConfirm() {
  1094. this.open = false
  1095. this.confirmLoading = true
  1096. var that = this
  1097. var _time = moment(new Date(this.nightTrialModel.setNightTrialTime)).format('HH:mm:ss')
  1098. var _id = this.nightTrialModel.id ? this.nightTrialModel.id : ''
  1099. var param = {
  1100. setNightTrialTime: _time,
  1101. hotelId: this.hotelId,
  1102. id: _id
  1103. }
  1104. httpAction(this.url.nighttrial_time, param, 'post').then((res) => {
  1105. if (res.success) {
  1106. that.$message.success('操作成功')
  1107. that.$emit('ok')
  1108. that.nightTrialModel.id = res.result.id
  1109. } else {
  1110. that.$message.warning(res.message)
  1111. }
  1112. }).finally(() => {
  1113. that.confirmLoading = false
  1114. })
  1115. },
  1116. onNightTrialHandChange(val) {
  1117. console.log('夜审' + val)
  1118. var _value = 0
  1119. if (val) {
  1120. // 自动
  1121. _value = 1
  1122. }
  1123. this.confirmLoading = true
  1124. var that = this
  1125. var _id = this.nightTrialModel.id ? this.nightTrialModel.id : ''
  1126. var param = {
  1127. autoHand: _value,
  1128. hotelId: this.hotelId,
  1129. id: _id
  1130. }
  1131. httpAction(this.url.nighttrial_autohand, param, 'post').then((res) => {
  1132. if (res.success) {
  1133. that.$message.success('操作成功')
  1134. that.$emit('ok')
  1135. that.nightTrialModel.id = res.result.id
  1136. } else {
  1137. that.$message.warning(res.message)
  1138. }
  1139. }).finally(() => {
  1140. that.confirmLoading = false
  1141. })
  1142. },
  1143. onClearChange(val) {
  1144. var _value = 0
  1145. if (val) {
  1146. // 开启
  1147. _value = 1
  1148. }
  1149. this.confirmLoading = true
  1150. var that = this
  1151. var _id = this.clearModel.id ? this.clearModel.id : ''
  1152. var param = {
  1153. status: _value,
  1154. hotelId: this.hotelId,
  1155. id: _id
  1156. }
  1157. httpAction(this.url.clear_status, param, 'post').then((res) => {
  1158. if (res.success) {
  1159. that.$message.success('操作成功')
  1160. that.$emit('ok')
  1161. that.clearModel.id = res.result.id
  1162. } else {
  1163. that.$message.warning(res.message)
  1164. }
  1165. }).finally(() => {
  1166. that.confirmLoading = false
  1167. })
  1168. },
  1169. onHouseSettingChange(val) {
  1170. var _value = 0
  1171. if (val) {
  1172. // 开启
  1173. _value = 1
  1174. }
  1175. this.confirmLoading = true
  1176. var that = this
  1177. var _id = this.houseSettingModel.id ? this.houseSettingModel.id : ''
  1178. var param = {
  1179. status: _value,
  1180. hotelId: this.hotelId,
  1181. id: _id
  1182. }
  1183. httpAction(this.url.housesetting_status, param, 'post').then((res) => {
  1184. if (res.success) {
  1185. that.$message.success('操作成功')
  1186. that.$emit('ok')
  1187. that.houseSettingModel.id = res.result.id
  1188. } else {
  1189. that.$message.warning(res.message)
  1190. }
  1191. }).finally(() => {
  1192. that.confirmLoading = false
  1193. })
  1194. },
  1195. handleDepositChange(e) {
  1196. console.log(e.target.value)
  1197. var _type = e.target.value
  1198. this.depositModel.type = _type
  1199. this.show_deposit = true
  1200. if (_type == 1) {
  1201. this.depositModel.formula = 'x'
  1202. }
  1203. if (_type == 2) {
  1204. this.depositModel.formula = '+'
  1205. }
  1206. },
  1207. handleDepositCancel() {
  1208. this.show_deposit = false
  1209. },
  1210. handleDepositConfirm() {
  1211. // 押金设置提交
  1212. this.confirmLoading = true
  1213. var that = this
  1214. var _id = this.depositModel.id ? this.depositModel.id : ''
  1215. var param = {
  1216. hotelId: this.hotelId,
  1217. id: _id,
  1218. depositType: this.depositModel.type,
  1219. depositMultiple: this.depositModel.multiple,
  1220. depositMoney: this.depositModel.money,
  1221. balanceAlarm: this.depositModel.alarmValue,
  1222. balanceLess: this.depositModel.less
  1223. }
  1224. httpAction(this.url.deposit_edit, param, 'post').then((res) => {
  1225. if (res.success) {
  1226. that.$message.success('操作成功')
  1227. that.$emit('ok')
  1228. that.depositModel.id = res.result.id
  1229. } else {
  1230. that.$message.warning(res.message)
  1231. }
  1232. }).finally(() => {
  1233. that.confirmLoading = false
  1234. that.show_deposit = false
  1235. })
  1236. },
  1237. onDepositChange() {
  1238. this.show_deposit = true
  1239. },
  1240. onDepositAlarmChange(val) {
  1241. this.show_deposit = true
  1242. var _value = 0
  1243. if (val) {
  1244. // 自动
  1245. _value = 1
  1246. }
  1247. this.depositModel.alarmValue = _value
  1248. },
  1249. onCancelChange() {
  1250. this.show_cancel = true
  1251. },
  1252. onCancelStatusChange(val) {
  1253. this.show_cancel = true
  1254. var _value = 0
  1255. if (val) {
  1256. // 自动
  1257. _value = 1
  1258. }
  1259. this.cancelModel.statusValue = _value
  1260. },
  1261. handleCancelCancel() {
  1262. this.show_cancel = false
  1263. },
  1264. handleCancelConfirm() {
  1265. this.confirmLoading = true
  1266. var that = this
  1267. var _id = this.cancelModel.id ? this.cancelModel.id : ''
  1268. var param = {
  1269. hotelId: this.hotelId,
  1270. id: _id,
  1271. status: this.cancelModel.statusValue,
  1272. minute: this.cancelModel.minute
  1273. }
  1274. httpAction(this.url.cancel_edit, param, 'post').then((res) => {
  1275. if (res.success) {
  1276. that.$message.success('操作成功')
  1277. that.$emit('ok')
  1278. that.cancelModel.id = res.result.id
  1279. } else {
  1280. that.$message.warning(res.message)
  1281. }
  1282. }).finally(() => {
  1283. that.confirmLoading = false
  1284. that.show_cancel = false
  1285. })
  1286. },
  1287. onRoomCardChange(val) {
  1288. var _value = 0
  1289. if (val) {
  1290. // 开启
  1291. _value = 1
  1292. }
  1293. this.confirmLoading = true
  1294. var that = this
  1295. var _id = this.roomCardModel.id ? this.roomCardModel.id : ''
  1296. var param = {
  1297. status: _value,
  1298. hotelId: this.hotelId,
  1299. id: _id
  1300. }
  1301. httpAction(this.url.roomcard_status, param, 'post').then((res) => {
  1302. if (res.success) {
  1303. that.$message.success('操作成功')
  1304. that.$emit('ok')
  1305. that.roomCardModel.id = res.result.id
  1306. } else {
  1307. that.$message.warning(res.message)
  1308. }
  1309. }).finally(() => {
  1310. that.confirmLoading = false
  1311. })
  1312. },
  1313. onMemberVerifyChange(val) {
  1314. var _value = 0
  1315. if (val) {
  1316. // 开启
  1317. _value = 1
  1318. }
  1319. this.confirmLoading = true
  1320. var that = this
  1321. var _id = this.memberVerifyModel.id ? this.memberVerifyModel.id : ''
  1322. var param = {
  1323. status: _value,
  1324. hotelId: this.hotelId,
  1325. id: _id
  1326. }
  1327. httpAction(this.url.memberverify_status, param, 'post').then((res) => {
  1328. if (res.success) {
  1329. that.$message.success('操作成功')
  1330. that.$emit('ok')
  1331. that.memberVerifyModel.id = res.result.id
  1332. } else {
  1333. that.$message.warning(res.message)
  1334. }
  1335. }).finally(() => {
  1336. that.confirmLoading = false
  1337. })
  1338. },
  1339. onEmptyDirtyRoomChange(val) {
  1340. var _value = 0
  1341. if (val) {
  1342. // 开启
  1343. _value = 1
  1344. }
  1345. this.confirmLoading = true
  1346. var that = this
  1347. var _id = this.emptyDirtyRoomModel.id ? this.emptyDirtyRoomModel.id : ''
  1348. var param = {
  1349. status: _value,
  1350. hotelId: this.hotelId,
  1351. id: _id
  1352. }
  1353. httpAction(this.url.emptydirtyroom_status, param, 'post').then((res) => {
  1354. if (res.success) {
  1355. that.$message.success('操作成功')
  1356. that.$emit('ok')
  1357. that.emptyDirtyRoomModel.id = res.result.id
  1358. } else {
  1359. that.$message.warning(res.message)
  1360. }
  1361. }).finally(() => {
  1362. that.confirmLoading = false
  1363. })
  1364. },
  1365. onCheckOutChange(val) {
  1366. var _value = 0
  1367. if (val) {
  1368. // 开启
  1369. _value = 1
  1370. }
  1371. this.confirmLoading = true
  1372. var that = this
  1373. var _id = this.checkOutModel.id ? this.checkOutModel.id : ''
  1374. var param = {
  1375. status: _value,
  1376. hotelId: this.hotelId,
  1377. id: _id
  1378. }
  1379. httpAction(this.url.checkout_status, param, 'post').then((res) => {
  1380. if (res.success) {
  1381. that.$message.success('操作成功')
  1382. that.$emit('ok')
  1383. that.checkOutModel.id = res.result.id
  1384. } else {
  1385. that.$message.warning(res.message)
  1386. }
  1387. }).finally(() => {
  1388. that.confirmLoading = false
  1389. })
  1390. },
  1391. onAutomaticChange() {
  1392. this.show_automatic = true
  1393. },
  1394. handleAutomaticConfirm() {
  1395. this.confirmLoading = true
  1396. var that = this
  1397. var _id = this.automaticModel.id ? this.automaticModel.id : ''
  1398. var param = {
  1399. hotelId: this.hotelId,
  1400. id: _id,
  1401. dayNum: this.automaticModel.dayNum
  1402. }
  1403. httpAction(this.url.automatic_edit, param, 'post').then((res) => {
  1404. if (res.success) {
  1405. that.$message.success('操作成功')
  1406. that.$emit('ok')
  1407. that.automaticModel.id = res.result.id
  1408. } else {
  1409. that.$message.warning(res.message)
  1410. }
  1411. }).finally(() => {
  1412. that.confirmLoading = false
  1413. that.show_automatic = false
  1414. })
  1415. },
  1416. handleAutomaticCancel() {
  1417. this.show_automatic = false
  1418. },
  1419. onShareMemberChange(val) {
  1420. if (!this.show_share) {
  1421. this.show_share = true
  1422. }
  1423. var _value = 0
  1424. if (val) {
  1425. // 开启
  1426. _value = 1
  1427. }
  1428. this.shareModel.memberValue = _value
  1429. },
  1430. onShareMemberAccountChange(val) {
  1431. if (!this.show_share) {
  1432. this.show_share = true
  1433. }
  1434. var _value = 0
  1435. if (val) {
  1436. // 开启
  1437. _value = 1
  1438. }
  1439. this.shareModel.memberAccountValue = _value
  1440. },
  1441. onShareAgreementChange(val) {
  1442. if (!this.show_share) {
  1443. this.show_share = true
  1444. }
  1445. var _value = 0
  1446. if (val) {
  1447. // 开启
  1448. _value = 1
  1449. }
  1450. this.shareModel.agreementValue = _value
  1451. },
  1452. onShareAgreementAccountChange(val) {
  1453. if (!this.show_share) {
  1454. this.show_share = true
  1455. }
  1456. var _value = 0
  1457. if (val) {
  1458. // 开启
  1459. _value = 1
  1460. }
  1461. this.shareModel.agreementAccountValue = _value
  1462. },
  1463. handleShareCancel() {
  1464. this.show_share = false
  1465. },
  1466. handleShareConfirm() {
  1467. this.confirmLoading = true
  1468. var that = this
  1469. var _id = this.shareModel.id ? this.shareModel.id : ''
  1470. var param = {
  1471. hotelId: this.hotelId,
  1472. id: _id,
  1473. memberAccountShare: this.shareModel.memberAccountValue,
  1474. memberShare: this.shareModel.memberValue,
  1475. agreementAccountShare: this.shareModel.agreementAccountValue,
  1476. agreementShare: this.shareModel.agreementValue
  1477. }
  1478. console.log(param)
  1479. httpAction(this.url.share_edit, param, 'post').then((res) => {
  1480. if (res.success) {
  1481. that.$message.success('操作成功')
  1482. that.$emit('ok')
  1483. that.shareModel.id = res.result.id
  1484. } else {
  1485. that.$message.warning(res.message)
  1486. }
  1487. }).finally(() => {
  1488. that.confirmLoading = false
  1489. that.show_share = false
  1490. })
  1491. },
  1492. handlePresetCancel() {
  1493. this.show_preset = false
  1494. },
  1495. onPresetChange() {
  1496. if (!this.show_preset) {
  1497. this.show_preset = true
  1498. }
  1499. },
  1500. onPresetStatusChange(val) {
  1501. if (!this.show_preset) {
  1502. this.show_preset = true
  1503. }
  1504. var _value = 0
  1505. if (val) {
  1506. // 开启
  1507. _value = 1
  1508. }
  1509. this.presetModel.statusValue = _value
  1510. },
  1511. handlePresetConfirm() {
  1512. this.confirmLoading = true
  1513. var that = this
  1514. var _id = this.presetModel.id ? this.presetModel.id : ''
  1515. var param = {
  1516. hotelId: this.hotelId,
  1517. id: _id,
  1518. status: this.presetModel.statusValue,
  1519. minute: this.presetModel.minute
  1520. }
  1521. httpAction(this.url.preset_edit, param, 'post').then((res) => {
  1522. if (res.success) {
  1523. that.$message.success('操作成功')
  1524. that.$emit('ok')
  1525. that.presetModel.id = res.result.id
  1526. } else {
  1527. that.$message.warning(res.message)
  1528. }
  1529. }).finally(() => {
  1530. that.confirmLoading = false
  1531. that.show_preset = false
  1532. })
  1533. },
  1534. onPrintGuestChange(val) {
  1535. var _value = 0
  1536. if (val) {
  1537. // 开启
  1538. _value = 1
  1539. }
  1540. this.confirmLoading = true
  1541. var that = this
  1542. var _id = this.printModel.id ? this.printModel.id : ''
  1543. var param = {
  1544. hotelId: this.hotelId,
  1545. id: _id,
  1546. guest: _value
  1547. }
  1548. httpAction(this.url.print_editGuest, param, 'post').then((res) => {
  1549. if (res.success) {
  1550. that.$message.success('操作成功')
  1551. that.$emit('ok')
  1552. that.printModel.id = res.result.id
  1553. } else {
  1554. that.$message.warning(res.message)
  1555. }
  1556. }).finally(() => {
  1557. that.confirmLoading = false
  1558. })
  1559. },
  1560. onPrintPriceChange(val) {
  1561. var _value = 0
  1562. if (val) {
  1563. // 开启
  1564. _value = 1
  1565. }
  1566. this.confirmLoading = true
  1567. var that = this
  1568. var _id = this.printModel.id ? this.printModel.id : ''
  1569. var param = {
  1570. hotelId: this.hotelId,
  1571. id: _id,
  1572. price: _value
  1573. }
  1574. httpAction(this.url.print_editPrice, param, 'post').then((res) => {
  1575. if (res.success) {
  1576. that.$message.success('操作成功')
  1577. that.$emit('ok')
  1578. that.printModel.id = res.result.id
  1579. } else {
  1580. that.$message.warning(res.message)
  1581. }
  1582. }).finally(() => {
  1583. that.confirmLoading = false
  1584. })
  1585. },
  1586. onSyncChange(val) {
  1587. var _value = 0
  1588. if (val) {
  1589. // 开启
  1590. _value = 1
  1591. }
  1592. this.confirmLoading = true
  1593. var that = this
  1594. var _id = this.syncModel.id ? this.syncModel.id : ''
  1595. var param = {
  1596. hotelId: this.hotelId,
  1597. id: _id,
  1598. status: _value
  1599. }
  1600. httpAction(this.url.sync_status, param, 'post').then((res) => {
  1601. if (res.success) {
  1602. that.$message.success('操作成功')
  1603. that.$emit('ok')
  1604. that.syncModel.id = res.result.id
  1605. } else {
  1606. that.$message.warning(res.message)
  1607. }
  1608. }).finally(() => {
  1609. that.confirmLoading = false
  1610. })
  1611. },
  1612. onXcxRoomChange() {
  1613. if (!this.show_xcxRoom) {
  1614. this.show_xcxRoom = true
  1615. }
  1616. },
  1617. handleXcxRoomCancel() {
  1618. this.show_xcxRoom = false
  1619. },
  1620. handleXcxRoomConfirm() {
  1621. this.confirmLoading = true
  1622. var that = this
  1623. var _id = this.xcxRoomModel.id ? this.xcxRoomModel.id : ''
  1624. var param = {
  1625. hotelId: this.hotelId,
  1626. id: _id,
  1627. checkOut: this.xcxRoomModel.checkOut ? 1 : 0,
  1628. checkOutType: this.xcxRoomModel.checkOutType,
  1629. keepLive: this.xcxRoomModel.keepLive ? 1 : 0,
  1630. messageLive: this.xcxRoomModel.messageLive ? 1 : 0,
  1631. serviceLive: this.xcxRoomModel.serviceLive ? 1 : 0,
  1632. repairLive: this.xcxRoomModel.repairLive ? 1 : 0
  1633. }
  1634. httpAction(this.url.xcxRoom_edit, param, 'post').then((res) => {
  1635. if (res.success) {
  1636. that.$message.success('操作成功')
  1637. that.$emit('ok')
  1638. that.xcxRoomModel.id = res.result.id
  1639. } else {
  1640. that.$message.warning(res.message)
  1641. }
  1642. }).finally(() => {
  1643. that.confirmLoading = false
  1644. that.show_xcxRoom = false
  1645. })
  1646. },
  1647. onComputeFormulaChange() {
  1648. if (!this.show_computeFormula) {
  1649. this.show_computeFormula = true
  1650. }
  1651. },
  1652. handleComputeFormulaCancel() {
  1653. this.show_computeFormula = false
  1654. },
  1655. handleComputeFormulaConfirm() {
  1656. this.confirmLoading = true
  1657. var that = this
  1658. var _id = this.computeFormulaModel.id ? this.computeFormulaModel.id : ''
  1659. var param = {
  1660. hotelId: this.hotelId,
  1661. id: _id,
  1662. status: this.computeFormulaModel.status ? 1 : 0,
  1663. nights: this.computeFormulaModel.nights,
  1664. cardinal: this.computeFormulaModel.cardinal
  1665. }
  1666. httpAction(this.url.compute_edit, param, 'post').then((res) => {
  1667. if (res.success) {
  1668. that.$message.success('操作成功')
  1669. that.$emit('ok')
  1670. that.computeFormulaModel.id = res.result.id
  1671. } else {
  1672. that.$message.warning(res.message)
  1673. }
  1674. }).finally(() => {
  1675. that.confirmLoading = false
  1676. that.show_computeFormula = false
  1677. })
  1678. }
  1679. }
  1680. }
  1681. </script>
  1682. <style lang="less" scoped>
  1683. .item{
  1684. text-align: center;
  1685. height: 220px;
  1686. margin-bottom: 10px;
  1687. }
  1688. .item_header{
  1689. display: flex;
  1690. flex-direction: row;
  1691. align-items: center;
  1692. justify-items: center;
  1693. justify-content: center;
  1694. }
  1695. .item_header_left{
  1696. flex: 3;
  1697. display: flex;
  1698. flex-direction: row;
  1699. }
  1700. .item_header_left_logo{
  1701. flex: 1;
  1702. }
  1703. .item_header_left_logo .logo{
  1704. width: 32px;
  1705. height: 32px;
  1706. max-height: 50px;
  1707. max-width: 50px;
  1708. }
  1709. .item_header_left_title{
  1710. flex: 2;
  1711. font-size: 14px;
  1712. font-weight: bold;
  1713. color: black;
  1714. display: flex;
  1715. align-items: center;
  1716. }
  1717. .item_header_right{
  1718. flex: 2;
  1719. }
  1720. .item_content{
  1721. padding-top: 15px;
  1722. display: flex;
  1723. flex-direction: column;
  1724. align-items: center;
  1725. justify-items: center;
  1726. font-size: 14px;
  1727. }
  1728. .item_content_row{
  1729. width: 90%;
  1730. display: flex;
  1731. flex-direction: row;
  1732. padding-bottom: 12px;
  1733. }
  1734. .row_left{
  1735. flex: 1;
  1736. display: flex;
  1737. flex-direction: row;
  1738. align-items: center;
  1739. }
  1740. .row_left_tip{
  1741. flex: 1;
  1742. }
  1743. .row_right{
  1744. flex: 2;
  1745. text-align: left;
  1746. display: flex;
  1747. flex-direction: row;
  1748. align-items: center;
  1749. }
  1750. .row_right_1{
  1751. flex: 1;
  1752. text-align: left;
  1753. }
  1754. .row_right_tip{
  1755. display: flex;
  1756. align-items: center;
  1757. }
  1758. .row_middle{
  1759. flex: 1;
  1760. }
  1761. .row_right {
  1762. /deep/ .ant-time-picker-panel-addon{
  1763. text-align: right;
  1764. }
  1765. }
  1766. .margin_left_6{
  1767. margin-left: 6px;
  1768. }
  1769. .margin_left_4{
  1770. margin-left: 4px;
  1771. }
  1772. .margin_right_4{
  1773. margin-right: 4px;
  1774. }
  1775. /*.ant-time-picker-panel-addon{*/
  1776. /* text-align: right*/
  1777. /*}*/
  1778. </style>