createOrder.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774
  1. <template>
  2. <view class="page" :style="{'height':(h)+'px','padding-top':mt+'px'}">
  3. <c-nav-bar :title="!dataForm.id?'新增订单':!orderStatus?'编辑订单':'办理入住'" :showIcon="true"></c-nav-bar>
  4. <view class="box box1">
  5. <view class="tit">预订信息</view>
  6. <u-cell-group :border="false" customStyle="margin:0 -30rpx">
  7. <u-cell customStyle="height:88rpx">
  8. <text>*</text>
  9. <text slot="icon" class="label">姓名</text>
  10. <view slot="title" class="title">
  11. <u--input border="none" class="input" inputAlign="right" placeholderStyle="font-size:26rpx"
  12. placeholder="请输入姓名" v-model="dataForm.guestName"></u--input>
  13. </view>
  14. </u-cell>
  15. <u-cell customStyle="height:88rpx">
  16. <text slot="icon" class="label">手机号码</text>
  17. <view slot="title" class="title">
  18. <u--input border="none" class="input" inputAlign="right" placeholderStyle="font-size:26rpx"
  19. placeholder="请输入手机号码" v-model="dataForm.guestPhone"></u--input>
  20. </view>
  21. </u-cell>
  22. <u-cell :isLink="true" @click="showLaiyuan=true">
  23. <text slot="icon" class="label">订单来源</text>
  24. <view slot="title" class="title">
  25. {{dataForm.guestSourceName||''}}
  26. </view>
  27. </u-cell>
  28. </u-cell-group>
  29. </view>
  30. <view class="box">
  31. <view class="tit tit2">入住登记<u-icon @click="goStayCheck()" name="plus-circle" label="添加入住人"
  32. labelColor="#1372FF" labelSize="24" color="1372FF" size="30"></u-icon></view>
  33. <view class="perItem" v-for="(item,index) in dataForm.detailFormList[0].checkInPersonList" :key="index">
  34. <text>{{item.checkInName}}</text>
  35. <text style="margin-left: 40px;">{{item.idCard}}</text>
  36. <u-icon name="close-circle-fill" color="#ddd" size="30" @click="delPer(index)"></u-icon>
  37. </view>
  38. </view>
  39. <view class="box box1">
  40. <view class="tit">房间信息</view>
  41. <view class="dateBetween">
  42. <view class="start" v-if="dataForm.arriveDate">
  43. <text>入住日期</text>
  44. <text class="txt">{{dataForm.arriveDate.substring(5,10)}}</text>
  45. </view>
  46. <view class="dateNum">共{{dataForm.num}}晚</view>
  47. <view class="end" v-if="dataForm.leaveDate">
  48. <text>离店日期</text>
  49. <text @click="showPick()" class="txt">{{dataForm.leaveDate.substring(5,10)}}</text>
  50. <u-datetime-picker :show="leaveDateShow" mode="date" ref="picker" @cancel="leaveDateShow=false"
  51. @confirm="credentialsConfirmtime" :defaultIndex="credentialsDefaulttime"></u-datetime-picker>
  52. </view>
  53. </view>
  54. <u-cell-group :border="false" customStyle="margin:0 -30rpx">
  55. <!-- <u-cell>
  56. <text slot="icon" class="label">入住日期</text>
  57. <view slot="title" class="title">
  58. {{dataForm.arriveDate}}
  59. </view>
  60. </u-cell>
  61. <u-cell>
  62. <text slot="icon" class="label">离店日期</text>
  63. <view slot="title" class="title">
  64. {{dataForm.leaveDate}}
  65. </view>
  66. </u-cell> -->
  67. <!-- <u-cell>
  68. <text slot="icon" class="label">共几晚</text>
  69. <view slot="title" class="title">
  70. {{dataForm.num}}
  71. </view>
  72. </u-cell> -->
  73. <u-cell isLink="true" @click="checkInTypeShow=true">
  74. <text slot="icon" class="label">入住类型</text>
  75. <view slot="title" class="title">
  76. {{dataForm.detailFormList[0].checkInTypeName}}
  77. </view>
  78. </u-cell>
  79. <u-cell>
  80. <text slot="icon" class="label">房间类型</text>
  81. <view slot="title" class="title">
  82. {{dataForm.houseBaseName}}
  83. </view>
  84. </u-cell>
  85. <u-cell>
  86. <text slot="icon" class="label">房间号</text>
  87. <view slot="title" class="title">
  88. {{dataForm.detailFormList[0].roomNumber}}
  89. </view>
  90. </u-cell>
  91. <u-cell>
  92. <text slot="icon" class="label">房价</text>
  93. <view slot="title" class="title">
  94. {{dataForm.detailFormList[0].roomAmount}}
  95. </view>
  96. </u-cell>
  97. <u-cell customStyle="height:88rpx">
  98. <text slot="icon" class="label">备注</text>
  99. <view slot="title" class="title">
  100. <u--input border="none" class="input" inputAlign="right" placeholderStyle="font-size:26rpx"
  101. type="textarea" placeholder="请输入" v-model="dataForm.remarks" height="200"></u--input>
  102. </view>
  103. </u-cell>
  104. </u-cell-group>
  105. </view>
  106. <view class="box">
  107. <view class="tit tit2"><text>消费信息</text> <u-icon @click="addBreast()" name="plus-circle" label="添加消费"
  108. labelColor="#1372FF" labelSize="24" color="1372FF" size="30"></u-icon></view>
  109. <u-swipe-action>
  110. <u-swipe-action-item :show="item.show" :index="index" class=""
  111. v-for="(item, index) in dataForm.detailFormList[0].breakfastData" :key="index" @click="click(index)"
  112. :options="options">
  113. <view class="goodsInfo item">
  114. <view class="title-wrap">
  115. <text class="title u-line-2">{{item.breakfastName}}/{{item.num}}/{{item.price}}</text>
  116. </view>
  117. </view>
  118. </u-swipe-action-item>
  119. <u-swipe-action-item :show="item.show" :index="index2" class=""
  120. v-for="(item, index2) in dataForm.detailFormList[0].otherData" :key="index2" @click="click2(index2)"
  121. :options="options">
  122. <view class="goodsInfo item">
  123. <view class="title-wrap">
  124. <text class="title u-line-2">{{item.projectName}}/{{item.num}}/{{item.defaultPrice}}</text>
  125. </view>
  126. </view>
  127. </u-swipe-action-item>
  128. </u-swipe-action>
  129. </view>
  130. <view class="box">
  131. <view class="tit tit2"><text>收款信息</text> <u-icon @click="addpay()" name="plus-circle" label="添加收款"
  132. labelColor="#1372FF" labelSize="24" color="1372FF" size="30"></u-icon></view>
  133. <u-swipe-action>
  134. <u-swipe-action-item :show="item.show" :index="index" class=""
  135. v-for="(item, index) in dataForm.flowRecord" :key="index" @click="click3(index)" :options="options">
  136. <view class="goodsInfo item">
  137. <view class="title-wrap">
  138. <text
  139. class="title u-line-2">{{item.flowTypeName}}/{{item.payTypeName}}/{{item.amount}}</text>
  140. </view>
  141. </view>
  142. </u-swipe-action-item>
  143. </u-swipe-action>
  144. </view>
  145. <view class="footer">
  146. <view class="total"><text>订单金额:</text><text>¥{{totalMOney}}</text></view>
  147. <view class="btns">
  148. <text @click="confirmOrder(2)" v-if="today==1">直接入住</text>
  149. <text @click="confirmOrder(1)" v-if="!orderStatus">保存</text>
  150. <!-- 新增和编辑时由此按钮 -->
  151. </view>
  152. </view>
  153. <u-picker :itemHeight="88" :immediateChange="true" :show="showLaiyuan" :columns="laiyuan" title="来源选择"
  154. keyName="guestSource" :defaultIndex="passengerDefault" @cancel="showLaiyuan=false;"
  155. @confirm="passengerConfirm"></u-picker>
  156. <u-picker :itemHeight="88" :immediateChange="true" :show="checkInTypeShow" :columns="checkInType" title="入住类型选择"
  157. keyName="label" :defaultIndex="passengerDefault2" @cancel="checkInTypeShow=false;"
  158. @confirm="passengerConfirm2"></u-picker>
  159. </view>
  160. </template>
  161. <script>
  162. import {
  163. encrypt
  164. } from '../../utils/aes.js'
  165. export default {
  166. data() {
  167. return {
  168. credentialsDefaulttime: [10, 1, 0],
  169. titleStyle: {
  170. fontSize: '34rpx',
  171. fontWeight: "bold",
  172. },
  173. showLaiyuan: false,
  174. checkInTypeShow: false,
  175. passengerDefault: [0],
  176. passengerDefault2: [0],
  177. leaveDateShow: false,
  178. options: [{
  179. text: '删除',
  180. style: {
  181. backgroundColor: '#dd524d'
  182. }
  183. }],
  184. orderStatus: '',
  185. totalMOney: 0, //订单总金额
  186. dataForm: {
  187. arriveDate: "",
  188. detailFormList: [{
  189. breakfastAmount: 0,
  190. checkInPersonList: [],
  191. checkInType: 0,
  192. checkInTypeName: '',
  193. id: 0,
  194. otherAmount: 0,
  195. roomAmount: 0,
  196. roomIds: "",
  197. breakfastData: [],
  198. otherData: [],
  199. roomNumber: "",
  200. }],
  201. flowRecord: [],
  202. guestName: "",
  203. guestPhone: "",
  204. guestSourceId: null,
  205. guestSourceName: null,
  206. homestayId: uni.getStorageSync('homestayId'),
  207. houseBaseId: 0,
  208. houseBaseName: '',
  209. leaveDate: "",
  210. num: 0,
  211. orderStatus: null,
  212. remarks: "",
  213. },
  214. checkInType: [
  215. [{
  216. label: '正常入住',
  217. val: 1
  218. }, {
  219. label: '自用房',
  220. val: 2
  221. },
  222. {
  223. label: '免费入住',
  224. val: 3
  225. }
  226. ]
  227. ],
  228. flowTypeNames: ['微信', '支付宝', '云闪付'],
  229. roomId: '',
  230. laiyuan: [
  231. []
  232. ],
  233. currentDate: '',
  234. today: '',
  235. //加密备用
  236. tempCheckInPersonList: null,
  237. tempGuestName: null,
  238. tempGuestPhone: null
  239. }
  240. },
  241. onReady() {
  242. // 微信小程序需要用此写法
  243. },
  244. onLoad(opt) {
  245. this.getLaiyuan();
  246. if (opt.roomId) {
  247. this.roomId = opt.roomId.split(',');
  248. }
  249. if (opt.id) { //编辑
  250. if (opt.orderStatus) {
  251. this.orderStatus = opt.orderStatus;
  252. }
  253. this.dataForm.id = opt.id;
  254. this.getInfo2()
  255. } else {
  256. //新增获取简单信息
  257. this.getInfo();
  258. }
  259. // 当前日期
  260. let myDate = new Date();
  261. let year = myDate.getFullYear();
  262. let mon = myDate.getMonth() + 1;
  263. let day = myDate.getDate();
  264. mon = mon > 9 ? mon : '0' + mon;
  265. day = day > 9 ? day : '0' + day;
  266. this.currentDate = year + '-' + mon + '-' + day;
  267. },
  268. methods: {
  269. showPick() {
  270. this.leaveDateShow = true;
  271. this.$refs.picker.innerValue = new Date().getTime()
  272. },
  273. //i计算天数
  274. getDaysBetween(dateString1, dateString2) {
  275. var startDate = Date.parse(dateString1);
  276. var endDate = Date.parse(dateString2);
  277. if (startDate > endDate) {
  278. return 0;
  279. }
  280. if (startDate == endDate) {
  281. return 1;
  282. }
  283. var days = (endDate - startDate) / (1 * 24 * 60 * 60 * 1000);
  284. this.dataForm.num = days;
  285. //return days;
  286. },
  287. credentialsConfirmtime(e) {
  288. // 创建一个Date对象并传入时间戳
  289. const date = new Date(e.value);
  290. // 使用Date对象的方法获取年、月、日、小时、分钟和秒
  291. const year = date.getFullYear();
  292. const month = ('0' + (date.getMonth() + 1)).slice(-2);
  293. const day = ('0' + date.getDate()).slice(-2);
  294. // 格式化时间
  295. const formattedTime = `${year}-${month}-${day}`;
  296. this.dataForm.leaveDate = formattedTime;
  297. this.getDaysBetween(this.dataForm.arriveDate, this.dataForm.leaveDate);
  298. this.leaveDateShow = false;
  299. },
  300. compareDate(data) {
  301. let data2 = data.substring(0, 10);
  302. if (
  303. new Date(data2).getTime() < new Date(this.currentDate).getTime()
  304. ) {
  305. this.today = -1;
  306. }
  307. if (
  308. new Date(data2).getTime() == new Date(this.currentDate).getTime()
  309. ) {
  310. this.today = 1;
  311. }
  312. if (
  313. new Date(data2).getTime() > new Date(this.currentDate).getTime()
  314. ) {
  315. this.today = 2;
  316. }
  317. },
  318. //添加入住人
  319. goStayCheck() {
  320. let list = JSON.stringify(this.dataForm);
  321. uni.navigateTo({
  322. url: '/pages/house/stayCheck?orderInfo=' + list,
  323. events: {
  324. addSuccess: data => {
  325. this.dataForm.detailFormList[0].checkInPersonList = data.data || [];
  326. }
  327. },
  328. })
  329. },
  330. //添加早餐
  331. addBreast() {
  332. let list = JSON.stringify(this.dataForm.detailFormList[0].breakfastData);
  333. let list2 = JSON.stringify(this.dataForm.detailFormList[0].otherData)
  334. uni.navigateTo({
  335. url: '/pages/house/breast?list1=' + list + '&list2=' + list2,
  336. events: {
  337. addSuccess: data => {
  338. this.dataForm.detailFormList[0].breakfastData = data.data1.filter((item) => item
  339. .num && item
  340. .num != 0);
  341. this.dataForm.detailFormList[0].otherData = data.data2.filter((item) => item.num &&
  342. item.num !=
  343. 0);
  344. this.totalMOney = this.dataForm.detailFormList[0].roomAmount;
  345. this.dataForm.detailFormList[0].breakfastAmount = 0;
  346. this.dataForm.detailFormList[0].otherAmount = 0;
  347. for (let i = 0; i < this.dataForm.detailFormList[0].breakfastData.length; i++) {
  348. this.totalMOney += parseFloat(this.dataForm.detailFormList[0].breakfastData[i]
  349. .price) * this.dataForm.detailFormList[0].breakfastData[i].num;
  350. this.dataForm.detailFormList[0].breakfastAmount += parseFloat(this.dataForm
  351. .detailFormList[0].breakfastData[i]
  352. .price) * this.dataForm.detailFormList[0].breakfastData[i].num;
  353. }
  354. for (let i = 0; i < this.dataForm.detailFormList[0].otherData.length; i++) {
  355. this.totalMOney += parseFloat(this.dataForm.detailFormList[0].otherData[i]
  356. .defaultPrice) * this.dataForm.detailFormList[0].otherData[i].num;
  357. this.dataForm.detailFormList[0].otherAmount += parseFloat(this.dataForm
  358. .detailFormList[0].otherData[i]
  359. .defaultPrice) * this.dataForm.detailFormList[0].otherData[i].num;
  360. }
  361. }
  362. }
  363. })
  364. },
  365. //添加收款
  366. addpay() {
  367. uni.navigateTo({
  368. url: '/pages/house/payAdd?money=' + this.totalMOney + '&list=' +
  369. JSON.stringify(this.dataForm.flowRecord),
  370. events: {
  371. addSuccess: data => {
  372. if (data.data.amount != 0) {
  373. this.dataForm.flowRecord = this.dataForm.flowRecord || [];
  374. this.dataForm.flowRecord.push(data.data)
  375. // if(data.data.flowType==1){ //收款
  376. // this.totalMOney+=parseFloat(data.data.amount);
  377. // }else{
  378. // this.totalMOney=parseFloat(data.data.amount);
  379. // }
  380. }
  381. }
  382. }
  383. })
  384. },
  385. delPer(index) {
  386. this.dataForm.detailFormList[0].checkInPersonList.splice(index, 1)
  387. },
  388. confirmOrder(orderStatus) {
  389. if (!this.dataForm.guestName) {
  390. this.$showToast('请输入姓名');
  391. return
  392. }
  393. let value = this.dataForm.guestPhone;
  394. if (value.indexOf("**") > -1) {
  395. value = value.replace(/\*/g, "5");
  396. }
  397. if (!this.$u.test.mobile(value)) {
  398. this.$showToast('请输入正确手机号');
  399. return
  400. }
  401. if (!this.dataForm.guestSourceName) {
  402. this.$showToast('请选择来源');
  403. return
  404. }
  405. if (!this.dataForm.detailFormList[0].checkInPersonList || this.dataForm.detailFormList[0].checkInPersonList
  406. .length == 0) {
  407. this.$showToast('请添加入住人');
  408. return
  409. }
  410. //orderStatus//预约入住 1,直接入住2
  411. if (orderStatus) {
  412. this.dataForm.orderStatus = orderStatus;
  413. }
  414. let url = '';
  415. if (this.dataForm.id) {
  416. url = '/merchant/hotel/order/updOrder'
  417. if (this.orderStatus) {
  418. this.dataForm.orderStatus = this.orderStatus;
  419. }
  420. } else {
  421. url = '/merchant/hotel/order/placeOrder'
  422. }
  423. //加密
  424. let newDataForm = JSON.parse(JSON.stringify(this.dataForm));
  425. if (
  426. newDataForm.guestName &&
  427. this.tempGuestName != newDataForm.guestName
  428. ) {
  429. //编辑了
  430. newDataForm.guestName = encrypt(
  431. newDataForm.guestName
  432. );
  433. } else {
  434. newDataForm.guestName = null;
  435. }
  436. if (
  437. newDataForm.guestPhone &&
  438. this.tempGuestPhone != newDataForm.guestPhone
  439. ) {
  440. newDataForm.guestPhone = encrypt(
  441. newDataForm.guestPhone
  442. );
  443. } else {
  444. newDataForm.guestPhone = null;
  445. }
  446. let checkInPersonList =
  447. newDataForm.detailFormList[0].checkInPersonList;
  448. //入住人里面身份证
  449. //let len = this.tempCheckInPersonList;
  450. checkInPersonList.forEach((element, i) => {
  451. //姓名 checkInName,idCard,checkInPhone
  452. //新增直接加密,编辑判断是否修改
  453. if (
  454. (!this.tempCheckInPersonLis) ||
  455. element.checkInName &&
  456. element.checkInName != this.tempCheckInPersonList[i].checkInName
  457. ) {
  458. element.checkInName = encrypt(element.checkInName);
  459. } else {
  460. element.checkInName = null;
  461. }
  462. //身份证
  463. if (
  464. (!this.tempCheckInPersonLis) ||
  465. element.idCard &&
  466. element.idCard != this.tempCheckInPersonList[i].idCard
  467. ) {
  468. element.idCard = encrypt(element.idCard);
  469. } else {
  470. element.idCard = null;
  471. }
  472. //手机号
  473. if (
  474. (!this.tempCheckInPersonLis) ||
  475. element.checkInPhone &&
  476. element.checkInPhone != this.tempCheckInPersonList[i].checkInPhone
  477. ) {
  478. element.checkInPhone = encrypt(
  479. element.checkInPhone
  480. );
  481. } else {
  482. element.checkInPhone = null;
  483. }
  484. });
  485. newDataForm.detailFormList[0].checkInPersonList = checkInPersonList;
  486. this.$api.post(url, newDataForm).then(res => {
  487. if (res.data.code == 0) {
  488. this.$showToast('操作成功');
  489. setTimeout(() => {
  490. uni.navigateTo({
  491. url: '/pagesMy/orderList/orderList'
  492. })
  493. }, 1500)
  494. }
  495. })
  496. },
  497. click(index) {
  498. this.dataForm.detailFormList[0].breakfastAmount -= this.dataForm.detailFormList[0].breakfastData[index]
  499. .price * this.dataForm.detailFormList[0].breakfastData[index].num;
  500. this.totalMOney -= this.dataForm.detailFormList[0].breakfastData[index].price * this.dataForm
  501. .detailFormList[0].breakfastData[index].num;
  502. this.dataForm.detailFormList[0].breakfastData.splice(index, 1);
  503. },
  504. click2(index) {
  505. this.dataForm.detailFormList[0].otherAmount -= this.dataForm.detailFormList[0].otherData[index]
  506. .defaultPrice * this.dataForm.detailFormList[0].otherData[index].num;
  507. this.totalMOney -= this.dataForm.detailFormList[0].otherData[index].defaultPrice * this.dataForm
  508. .detailFormList[0].otherData[index].num;
  509. this.dataForm.detailFormList[0].otherData.splice(index, 1);
  510. },
  511. click3(index) {
  512. this.dataForm.flowRecord.splice(index, 1);
  513. },
  514. getLaiyuan() {
  515. this.$api.get("/merchant/hotel/room/state/getSourceDownBox", {
  516. homestayId: this.dataForm.homestayId,
  517. })
  518. .then((res) => {
  519. if (res.data.code == 0) {
  520. this.laiyuan = [res.data.data];
  521. }
  522. });
  523. },
  524. getInfo2() { //详情信息
  525. this.$api.get('/merchant/hotel/order/getOrderDetail/' + this.dataForm.id).then(res => {
  526. if (res.data.code == 0) {
  527. this.dataForm = {
  528. ...this.dataForm,
  529. ...res.data.data,
  530. };
  531. //加密备用
  532. this.tempCheckInPersonList =
  533. this.dataForm.detailFormList[0].checkInPersonList || []; //入住人集合
  534. this.tempGuestName = this.dataForm.guestName;
  535. this.tempGuestPhone = this.dataForm.guestPhone;
  536. this.compareDate(this.dataForm.arriveDate);
  537. this.dataForm.detailFormList[0].checkInType = res.data.data.detailFormList[0].checkInType;
  538. this.dataForm.detailFormList[0].checkInTypeName = this.checkInType[0].filter((item => item
  539. .val == this.dataForm.detailFormList[0].checkInType))[0].label;
  540. this.totalMOney = this.dataForm.orderAmount;
  541. this.dataForm.flowRecord.forEach((i, index) => {
  542. let flowTypeName = i.flowType == 1 ? '收款' : '退款';
  543. var payTypeName = '微信';
  544. if (i.payType) {
  545. payTypeName = this.flowTypeNames[i.payType - 1];
  546. }
  547. this.$set(this.dataForm.flowRecord[index], 'flowTypeName', flowTypeName)
  548. this.$set(this.dataForm.flowRecord[index], 'payTypeName', payTypeName)
  549. })
  550. }
  551. })
  552. },
  553. // 房型列表
  554. getInfo() {
  555. this.$api.post('/merchant/hotel/order/getRoomInfoList', this.roomId).then(res => {
  556. if (res.data.code == 0) {
  557. this.dataForm.detailFormList[0].roomIds = res.data.data.roomIds;
  558. this.dataForm.detailFormList[0].roomNumber = res.data.data.roomNumber;
  559. this.dataForm.detailFormList[0].checkInType = res.data.data.checkInType;
  560. this.dataForm.detailFormList[0].checkInTypeName = this.checkInType[0].filter((item => item
  561. .val == res.data.data.checkInType))[0].label;
  562. this.dataForm.detailFormList[0].roomAmount = res.data.data.roomAmount;
  563. this.dataForm.arriveDate = res.data.data.arriveDate;
  564. this.compareDate(this.dataForm.arriveDate);
  565. this.dataForm.leaveDate = res.data.data.leaveDate;
  566. this.dataForm.houseBaseId = res.data.data.houseBaseId;
  567. this.dataForm.houseBaseName = res.data.data.houseBaseName;
  568. this.dataForm.num = res.data.data.num;
  569. this.totalMOney = res.data.data.roomAmount;
  570. }
  571. })
  572. },
  573. // 来源
  574. passengerConfirm(e) {
  575. this.dataForm.guestSourceId = e.value[0].id;
  576. this.dataForm.guestSourceName = e.value[0].guestSource;
  577. this.showLaiyuan = false;
  578. },
  579. //入住类型
  580. passengerConfirm2(e) {
  581. this.dataForm.detailFormList[0].checkInType = e.value[0].val;
  582. this.dataForm.detailFormList[0].checkInTypeName = e.value[0].label;
  583. this.checkInTypeShow = false;
  584. }
  585. }
  586. }
  587. </script>
  588. <style>
  589. .u-swipe-action-item__right__button__wrapper__text {
  590. font-size: 28rpx !important;
  591. }
  592. </style>
  593. <style lang="scss" scoped>
  594. .u-swipe-action-item__right__button__wrapper {
  595. height: 36px
  596. }
  597. .u-swipe-action-item__right__button__wrapper__text {
  598. font-size: 28rpx;
  599. }
  600. .footer {
  601. position: fixed;
  602. bottom: 0;
  603. width: 100%;
  604. background-color: #fff;
  605. left: 0;
  606. z-index: 99;
  607. padding: 30rpx;
  608. box-sizing: border-box;
  609. .total {
  610. text {
  611. color: #1372FF;
  612. font-size: 32rpx;
  613. &:first-child {
  614. color: #333;
  615. }
  616. }
  617. }
  618. .btns {
  619. display: flex;
  620. justify-content: space-between;
  621. margin-top: 30rpx;
  622. text {
  623. display: inline-block;
  624. width: 48%;
  625. height: 96rpx;
  626. line-height: 96rpx;
  627. text-align: center;
  628. font-size: 34rpx;
  629. border-radius: 48rpx;
  630. border: 1rpx solid #D1D1D1;
  631. color: #999;
  632. margin: 0 3%;
  633. flex: 1;
  634. &:last-child {
  635. background-color: #1372FF;
  636. color: #fff;
  637. }
  638. }
  639. }
  640. }
  641. .u-cell__body {
  642. padding: 0 !important;
  643. }
  644. .page {
  645. background: #F3F4F4;
  646. padding-bottom: 260rpx;
  647. box-sizing: border-box;
  648. overflow-y: auto;
  649. overflow-x: auto;
  650. }
  651. .box {
  652. background-color: #fff;
  653. margin: 20rpx auto 0;
  654. border-radius: 10rpx;
  655. width: 96%;
  656. padding: 0 30rpx 30rpx;
  657. box-sizing: border-box;
  658. .label {
  659. color: #333;
  660. font-size: 30rpx;
  661. }
  662. &.box1 {
  663. padding: 0 30rpx;
  664. .title {
  665. text-align: right;
  666. }
  667. }
  668. .title {
  669. color: #999;
  670. }
  671. }
  672. .tit,
  673. .tit2 {
  674. font-size: 32rpx;
  675. font-weight: bold;
  676. padding-top: 30rpx;
  677. color: #333;
  678. margin-bottom: 10rpx;
  679. }
  680. .tit2 {
  681. display: flex;
  682. justify-content: space-between;
  683. align-items: center;
  684. }
  685. .goodsInfo.item {
  686. padding: 20rpx 0;
  687. text {
  688. font-size: 30rpx;
  689. }
  690. }
  691. .perItem {
  692. display: flex;
  693. align-items: center;
  694. padding: 26rpx 0;
  695. border-bottom: 1rpx solid #E1E1E1;
  696. &:last-child {
  697. border: 0;
  698. }
  699. text {
  700. font-size: 30rpx;
  701. color: #333;
  702. &:nth-of-type(2) {
  703. flex: 1;
  704. margin: 0 10rpx;
  705. }
  706. }
  707. }
  708. .dateBetween {
  709. display: flex;
  710. justify-content: space-between;
  711. align-items: center;
  712. padding: 20rpx 0 30rpx;
  713. border-bottom: 1rpx solid #E1E1E1;
  714. .start,
  715. .end {
  716. text-align: center;
  717. display: flex;
  718. flex-direction: column;
  719. justify-content: center;
  720. text {
  721. &.txt {
  722. font-size: 40rpx;
  723. font-weight: bold;
  724. margin-top: 20rpx;
  725. }
  726. }
  727. }
  728. .dateNum {
  729. text-align: center;
  730. border-radius: 30rpx;
  731. display: inline-block;
  732. width: 120rpx;
  733. height: 50rpx;
  734. line-height: 50rpx;
  735. font-size: 30rpx;
  736. color: #333;
  737. background-color: #F9FAFC;
  738. }
  739. }
  740. </style>