order_room.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  1. <template>
  2. <view class="content">
  3. <!-- 第一层表单 -->
  4. <view class="two_all">
  5. <!-- @click="openCalendar" -->
  6. <view class="select-time" v-if="roomType==1">
  7. <view class="select-time-one">
  8. <text class="select-list-time">{{startTime}}
  9. <text class="select-list">{{startWeek}}</text>
  10. </text>
  11. </view>
  12. <view class="select-center">
  13. <view class="select-line1"></view>
  14. <view class="select-circle">{{ruzhu_num}}晚</view>
  15. <view class="select-line2"></view>
  16. </view>
  17. <view class="select-time-one">
  18. <text class="select-list-time">{{endTime}}
  19. <text class="select-list">{{endWeek}}</text>
  20. </text>
  21. </view>
  22. </view>
  23. <view class="select-time" v-if="roomType==2">
  24. <view class="select-time-one">
  25. <text class="select-list-time">{{startTime}}
  26. <text class="select-list">{{startWeek}}</text>
  27. </text>
  28. </view>
  29. <view class="select-time-one">
  30. <!-- <text class="select-list-time" style="font-size: 12px;">{{zhongTime}} -->
  31. <text class="select-list">{{zhongshi}}小时</text>
  32. </text>
  33. </view>
  34. </view>
  35. <!-- 房型信息 -->
  36. <view class="select_name">{{typeName}}</view>
  37. <view class="select_type" v-if="roomType==1">全日房</view>
  38. <view class="select_type" v-else-if="roomType==2">钟点房</view>
  39. <view class="select_detail">
  40. {{roomArea}}㎡
  41. <text style="margin-left: 20px;">{{roomConfiguration}}</text>
  42. <!-- <text style="margin-left: 20px;">窗户位于走廊/窗户较小</text> -->
  43. </view>
  44. <uni-popup ref="popup_picker" :mask-click="true">
  45. <!-- <view class=popup_bg_picker> -->
  46. <uni-calendar :selected="info.selected" class="uni-calendar--hook" :clear-date="true" :date="info.date" :insert="info.insert" :lunar="info.lunar" :startDate="info.startDate"
  47. :endDate="info.endDate" :range="info.range" @change="change"/>
  48. <view style="height: 60px; background-color: #fff;">
  49. <view class="riliQueren" @click="popup_pickerClose">确定{{ruzhu_num}}晚</view>
  50. </view>
  51. <!-- </view> -->
  52. </uni-popup>
  53. </view>
  54. <!-- 第二层基本信息 -->
  55. <view class="second_basic">
  56. <view class="form_title">入住信息</view>
  57. <view class="form-line1"></view>
  58. <view class="form-num">房间数量:
  59. <text class="list-text">1间</text></view>
  60. <view class="form-line2"></view>
  61. <view class="form-name">住客姓名:
  62. <text class="list-text">{{cardName}}</text></view>
  63. <view class="form-line"></view>
  64. <view class="form-phone">联系电话:
  65. <text class="list-text">{{cardPhone}}</text></view>
  66. <view class="form-line" style="margin-top: 381rpx;"></view>
  67. <!-- <view class="uni-list-cell-db" v-if="roomType==1">预计到店:
  68. <picker style="margin-left: 70px;margin-top: -22px;"
  69. @change="bindPickerChange" :value="index" :range="array">
  70. <view class="uni-input" style="color: rgba(0, 0, 0, 1);">{{array[index]}}</view>
  71. <text class="jiantou">〉</text>
  72. </picker>
  73. </view> -->
  74. <view class="uni-list-cell-db" v-if="roomType==2">入住时段:
  75. <picker style="margin-left: 70px;margin-top: -22px;"
  76. @change="bindPickerChange2" :value="index2" :range="array2">
  77. <view class="uni-input" style="color: rgba(0, 0, 0, 1);">{{array2[index2]}}</view>
  78. <text class="jiantou">〉</text>
  79. </picker>
  80. </view>
  81. </view>
  82. <!-- 第三层表单 -->
  83. <view class="third_basic">
  84. <view class="third_title">费用明细</view>
  85. <view class="third-line1"></view>
  86. <view class="third-num">在线支付:
  87. <text class="third-text">
  88. 1间
  89. <template v-if="roomType==1">{{ruzhu_num}}晚</template>
  90. </text>
  91. <text style="margin-left: 10rpx;">共
  92. <text class="third-text2">¥{{payMount}}</text>
  93. </text>
  94. </view>
  95. </view>
  96. <!-- 第四层房费 -->
  97. <view class="four_basic">
  98. <view class="four_title">房费
  99. <text style="margin-left: 533rpx;">¥{{payMount}}</text>
  100. </view>
  101. <view class="four-line1"></view>
  102. <view v-if="roomType==1">
  103. <view v-for="(item,index) in wanPrice" :key="index">
  104. <view class="four-num">
  105. {{item.date}}
  106. <text style="margin-left: 30rpx;">1晚共{{item.price}}</text>
  107. </view>
  108. </view>
  109. <view class="four-all">1间 x {{ruzhu_num}}晚</view>
  110. </view>
  111. <view v-if="roomType==2">
  112. <view>
  113. <view class="four-num">{{startDate}}</view>
  114. <view class="four-num2">{{endDate}}</view>
  115. </view>
  116. <view class="four-all">{{ruzhu_num}} x ¥{{roomPrice}}</view>
  117. </view>
  118. </view>
  119. <!-- 支付框 -->
  120. <view class="fukuan">
  121. <view class="fu-price">¥{{payMount}}</view>
  122. <view class="fu-zhifu" :class="{'room-button2': freeRoom == 0}">
  123. <!-- <text v-if="freeRoom==0">房间已满</text> -->
  124. <!-- v-else<text v-else @click="getOrderSubmit('warn')">立即支付</text> -->
  125. <text @click="postOrder('warn')">立即支付</text>
  126. </view>
  127. </view>
  128. <!-- 提交订单时弹框 -->
  129. <uni-popup ref="popup_order" type="dialog">
  130. <uni-popup-dialog :type="msgType" cancelText="关闭" confirmText="确定" :content="order_txt" @confirm="dialogConfirm"
  131. @close="dialogClose"></uni-popup-dialog>
  132. </uni-popup>
  133. </view>
  134. </template>
  135. <script>
  136. import {
  137. getuserinfo,
  138. getprice,
  139. getMeiprice,
  140. postOrder,
  141. getZhongTime
  142. } from '../../utils/api_hotel.js'
  143. /**
  144. * 获取任意时间
  145. */
  146. function getDate(date, AddDayCount = 0) {
  147. if (!date) {
  148. date = new Date()
  149. }
  150. if (typeof date !== 'object') {
  151. date = date.replace(/-/g, '/')
  152. }
  153. const dd = new Date(date)
  154. dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期
  155. var a = new Array("日", "一", "二", "三", "四", "五", "六");
  156. var week = new Date().getDay();
  157. var week2 = new Date().getDay()+1;
  158. const y = dd.getFullYear()
  159. const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0
  160. const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0
  161. const h = dd.getHours() < 10 ? '0' + dd.getHours() : dd.getHours()
  162. const f = dd.getMinutes() < 10 ? '0' + dd.getMinutes() : dd.getMinutes()
  163. const s = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds()
  164. return {
  165. fullDate: y + '-' + m + '-' + d,
  166. fullDate2: y + '-' + m + '-' + d+' '+h+':'+f+':'+s,
  167. fullTime: m + '月' + d + '日',
  168. year: y,
  169. month: m,
  170. date: d,
  171. day: dd.getDay(),
  172. sWeek:"周"+ a[week],
  173. eWeek:"周"+ a[week2]
  174. }
  175. }
  176. export default {
  177. data() {
  178. return {
  179. showCalendar: false,
  180. info: {
  181. lunar: true,
  182. range: true,
  183. insert: true,
  184. selected: [],
  185. startDate:'',
  186. date:'',
  187. endDate:''
  188. },
  189. startTime:'',//到店日期
  190. endTime:'',//离店日期
  191. startDate:'',//默认到店日期接口数据
  192. endDate:'',//默认离店日期接口数据
  193. startWeek:'',// 默认入店日
  194. endWeek:'',// 默认离店
  195. array: ['18:00前到店', '19:00前到店', '20:00前到店', '21:00前到店'],
  196. index: 0,
  197. array2: [''],//钟点房
  198. index2: 0,
  199. mayTime:'',// 预计到店时间
  200. typeName:'',//户型名
  201. textNum:0,//输入框当前字数
  202. cardName:'',//用户名
  203. cardPhone:'',//用户电话
  204. cardIdentity:'',//身份
  205. roomTypeId:'',//房间类型id
  206. remark:'',//备注要求
  207. payMount:0,//应付金额
  208. freeRoom:0,//剩余房间可预订的房间数
  209. ruzhu_num:1,//入住夜晚
  210. roomArea:'0',//房间面积
  211. roomType:1,//房间类型
  212. roomPrice:"",//房间单价
  213. roomConfiguration:'',//房间配置
  214. order_txt:'',//提交订单时信息
  215. msgType:'warn',
  216. zhongTime:'',//钟点房订的时间段
  217. zhongshi:'',//钟点房时间
  218. startDateZ:'',//钟点房默认到店日期接口数据
  219. endDateZ:'',//钟点房默认离店日期接口数据
  220. wanPrice:[],
  221. source:'',
  222. sourceId:'',
  223. data:{},
  224. }
  225. },
  226. onLoad(option) {
  227. this.data=JSON.parse(decodeURIComponent(option.data))
  228. console.log(JSON.parse(decodeURIComponent(option.data)))
  229. // this.payMount=Number(this.data.payMount)
  230. this.ruzhu_num=this.data.ruzhu_num
  231. this.roomArea=this.data.roomArea
  232. this.roomType=this.data.roomType
  233. this.roomConfiguration=this.data.roomConfiguration
  234. this.roomPrice=this.data.roomPrice
  235. this.freeRoom=this.data.surplusCount
  236. this.zhongTime=this.data.zhongTime
  237. this.zhongshi=this.data.zhongshi
  238. localStorage.setItem('roomTypeId',this.data.roomTypeId)
  239. localStorage.setItem('typeName',this.data.typeName)
  240. localStorage.setItem('startTime',this.data.startTime)
  241. localStorage.setItem('endTime',this.data.endTime)
  242. localStorage.setItem('enableStartTime',this.data.enableStartTime)
  243. localStorage.setItem('enableEndTime',this.data.enableEndTime)
  244. localStorage.setItem('zhongTime',this.data.zhongTime)
  245. localStorage.setItem('source',this.data.source)
  246. localStorage.setItem('sourceId',this.data.sourceId)
  247. },
  248. mounted() {
  249. this.source=localStorage.getItem('source')
  250. this.sourceId=localStorage.getItem('sourceId')
  251. this.roomTypeId=localStorage.getItem('roomTypeId')
  252. this.typeName=localStorage.getItem('typeName')
  253. this.startTime=localStorage.getItem('startTime')
  254. this.endTime=localStorage.getItem('endTime')
  255. this.zhongTime=localStorage.getItem('zhongTime')
  256. this.startDate=localStorage.getItem('enableStartTime')
  257. this.endDate=localStorage.getItem('enableEndTime')
  258. this.startWeek=this.getweekday(this.startDate)
  259. this.endWeek=this.getweekday(this.endDate)
  260. this.mayTime=this.startDate.substring(0,11)+"18:00:00"
  261. // console.log(this.getweekday(this.startDate))
  262. if(this.roomType==2){
  263. this.getZhongTime()
  264. }
  265. // window.location.href ='https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxa46ef222053a1047&redirect_uri=https://chtech.ncjti.edu.cn/hotel/ihotel-api/ihotel/hotelUser/weixinAuth&response_type=code&scope=snsapi_base&state=pages/order_room/order_room#wechat_redirect';
  266. this.getUserInfo()
  267. },
  268. onReady() {
  269. this.$nextTick(() => {
  270. this.showCalendar = true
  271. })
  272. // TODO 模拟请求异步同步数据
  273. setTimeout(() => {
  274. this.info.date = getDate(new Date()).fullDate
  275. this.info.startDate = getDate(new Date()).fullDate
  276. this.info.endDate = getDate(new Date(),8).fullDate
  277. // this.startTime = getDate(new Date()).fullTime
  278. // this.endTime = getDate(new Date(),1).fullTime
  279. // this.startWeek = getDate(new Date()).sWeek
  280. // this.endWeek = getDate(new Date(),1).eWeek
  281. // this.ruzhu_num=1
  282. }, 20)
  283. },
  284. methods: {
  285. // 获取用户信息
  286. getUserInfo() {
  287. let _self = this
  288. var data="?userId="+localStorage.getItem('usersId')
  289. getuserinfo(data).then((res) => {
  290. if (res.success) {
  291. _self.cardName=res.data.userName
  292. _self.cardPhone=res.data.phone
  293. _self.cardIdentity=res.data.idCardInformation
  294. this.getjisuanprice()
  295. this.getWanPrice()
  296. return;
  297. } else {
  298. console.log('获取用户信息失败')
  299. }
  300. }).catch((err) => {
  301. this.$message.error(err.message)
  302. });
  303. },
  304. //获取钟点房可住时间段
  305. getZhongTime(){
  306. this.array2=[]
  307. let _self = this
  308. var data="?houseNumberId="+_self.roomTypeId+"&startTime="+_self.startDate
  309. +"&liveTime="+this.zhongshi
  310. getZhongTime(data).then((res) => {
  311. if (res.success) {
  312. res.data.forEach(data => {
  313. if(data.status=="可用"){
  314. _self.array2.push(data.hourDate)
  315. this.startDateZ=localStorage.getItem('enableStartTime').substring(0,11)+this.array2[0].substring(0,8)
  316. this.endDateZ=localStorage.getItem('enableEndTime').substring(0,11)+this.array2[0].substring(9,17)
  317. }
  318. })
  319. return;
  320. } else {
  321. console.log('失败')
  322. }
  323. }).catch((err) => {
  324. uni.showModal({
  325. content:err.message
  326. })
  327. });
  328. },
  329. // 计算每晚价格
  330. getWanPrice(){
  331. let _self = this
  332. var data="?houseId="+_self.roomTypeId+"&startTime="+_self.startDate
  333. +"&endTime="+_self.endDate
  334. getMeiprice(data).then((res) => {
  335. if (res.success) {
  336. _self.wanPrice=res.data
  337. return;
  338. } else {
  339. uni.showModal({
  340. content:res.message
  341. })
  342. }
  343. }).catch((err) => {
  344. uni.showModal({
  345. content:err.message
  346. })
  347. });
  348. },
  349. // 计算订单金额
  350. getjisuanprice() {
  351. this.payMount=0
  352. let _self = this
  353. var data="?userId="+localStorage.getItem('usersId')
  354. +
  355. "&houseId="+_self.roomTypeId+"&liveTime="+_self.startDate
  356. +"&leaveTime="+_self.endDate+"&houseOrderNumber=1"+"&source="+this.source
  357. getprice(data).then((res) => {
  358. if (res.success) {
  359. _self.payMount=res.data
  360. return;
  361. } else {
  362. uni.showModal({
  363. content:res.message
  364. })
  365. }
  366. }).catch((err) => {
  367. uni.showModal({
  368. content:err.message
  369. })
  370. });
  371. },
  372. // onBridgeReady () {
  373. // console.log('调用微信支付WeixinJSBridge')
  374. // var vm = this
  375. // WeixinJSBridge.invoke(
  376. // 'getBrandWCPayRequest', { // 下面参数内容都是后台返回的
  377. // "appId": "wxd87cbe1db0437303", //公众号ID,由商户传入
  378. // "timeStamp": "1720083271",//时间戳,自1970年以来的秒数
  379. // "nonceStr": "ORsH3qtW9wauQQ7iV5ovSm6n58s6Z2Nu", //随机串
  380. // "package": "prepay_id=wx041654316576072897ded7969912130000",
  381. // "signType": "RSA", //微信签名方式:
  382. // "paySign": "ZbyL2qiE9QScgwEHhObRn5/9VQgJQxLo0zKc7VxUK+Emeb3Eas/rzePUp89rHnUVYDCRJcbNsmuR2b1LHY4mydBZVnPy1vwHE/EOrCmdgALZ4J8GcQK0wTLNu9kMx97WR0f9TItPN/sR604df9ca5CKA4P40vNaUIEdK45mkqo3MR2IAdvyn+L8DhW49cL7jlsqIRiohVwwRsS4n06mX/yx1kuA339l7hbwnHaq7D4elvEqFYoMSHD8CR3XnoZ0HFE7Klu1RChMzgO4WUgVIMUxhsF6bhy5TkSea25OG/QWGZW/EHOl58bTCg3PorhZeJ/7fDkIC6pNRtKndrdsd+Q==" //微信签名
  383. // },
  384. // function(res){
  385. // if(res.err_msg == "get_brand_wcpay_request:ok" ) {} // 使用以上方式判断前端返回,微信团队郑重提示:res.err_msg将在用户支付成功后返回 ok,但并不保证它绝对可靠。
  386. // }
  387. // )
  388. // },
  389. //创建订单
  390. postOrder(type){
  391. // var vm = this
  392. // if (typeof WeixinJSBridge === 'undefined') { // 微信浏览器内置对象。参考微信官方文档
  393. // if (document.addEventListener) {
  394. // document.addEventListener('WeixinJSBridgeReady', vm.onBridgeReady(), false)
  395. // } else if (document.attachEvent) {
  396. // document.attachEvent('WeixinJSBridgeReady', vm.onBridgeReady())
  397. // document.attachEvent('onWeixinJSBridgeReady', vm.onBridgeReady())
  398. // }
  399. // } else {
  400. // console.log('准备调用微信支付')
  401. // vm.onBridgeReady()
  402. // }
  403. if(this.roomType=='1'){
  404. var startDate=this.startDate
  405. var endDate=this.endDate
  406. }else {
  407. var startDate=this.startDateZ
  408. var endDate=this.endDateZ
  409. }
  410. this.payUrl=''
  411. let _self = this
  412. this.$axios.defaults.headers.common['token'] = localStorage.getItem('token');
  413. this.$axios.defaults.headers.common['user_head'] = localStorage.getItem('user_head');
  414. this.$axios.defaults.headers.common['Content-Type'] ='application/json'
  415. var data={
  416. "userId": localStorage.getItem('usersId'),
  417. "houseId": this.roomTypeId,
  418. "payPrice": this.payMount,
  419. "houseOrderNumber": 1,
  420. "liveDay": this.ruzhu_num,
  421. "reserveLiveTime": startDate,
  422. "reserveLeaveTime": endDate,
  423. "reservePhone": this.cardPhone,
  424. "reserveName": this.cardName,
  425. "source":this.source,
  426. "sourceId":this.sourceId
  427. }
  428. postOrder(data).then((res) => {
  429. if (res.success) {
  430. uni.navigateTo({
  431. url:'/pages/submit_order/submit_order?houseOrderId='+res.data.id
  432. })
  433. // if(res.data.payAmount==0) {
  434. // uni.navigateTo({
  435. // url:'../zhifuchenggong/zhifuchenggong?orderId='+res.data.orderId
  436. // })
  437. // } else {
  438. // window.location.href = res.data.payUrl;
  439. // }
  440. // return;
  441. } else {
  442. this.msgType = type
  443. this.order_txt=res.message
  444. this.$refs.popup_order.open()
  445. }
  446. }).catch((err) => {
  447. this.$message.error(err.message)
  448. });
  449. },
  450. // 计算指定时间是周几
  451. getweekday(date){
  452. // date例如:'2022-03-05'
  453. var weekArray = new Array("周日","周一", "周二", "周三", "周四", "周五", "周六")
  454. var weeka = weekArray[new Date(date).getDay()]
  455. return weeka
  456. },
  457. //日历选择器
  458. openCalendar() {
  459. this.$refs.popup_picker.open()
  460. },
  461. // 关闭全日房日历
  462. popup_pickerClose(){
  463. this.$refs.popup_picker.close()
  464. this.getjisuanprice()
  465. this.getWanPrice()
  466. },
  467. change(e) {
  468. // 模拟动态打卡
  469. // if (this.info.selected.length > 5) return
  470. this.info.selected=[
  471. {
  472. date: e.range.before,
  473. info: '到店'
  474. },
  475. {
  476. date: e.range.after,
  477. info: '离店'
  478. }
  479. ]
  480. if(e.range.before!=''&&e.range.after=='') {
  481. this.startWeek='周'+e.lunar.ncWeek.substring(2,3)
  482. } else if(e.range.before!=''&&e.range.after!=''){
  483. if((new Date(e.range.after).getTime())<(new Date(e.range.before).getTime())) {
  484. this.order_txt='离店日期不能小于到店日期'
  485. this.$refs.popup_order.open()
  486. this.info.selected=[]
  487. }else if(parseInt(((new Date(e.range.after).getTime())-(new Date(e.range.before).getTime()))/1000/60/60/24)>2){
  488. this.order_txt='预订时间不能超过两晚'
  489. this.$refs.popup_order.open()
  490. this.info.selected=[]
  491. }else if(parseInt(((new Date(e.range.after).getTime())-(new Date(e.range.before).getTime()))/1000/60/60/24)==2){
  492. this.order_txt='您此次申请了两晚,请注意若只住一晚可能会导致流程管理次数失效。'
  493. this.$refs.popup_order.open()
  494. this.endWeek='周'+e.lunar.ncWeek.substring(2,3)
  495. this.startTime=e.range.before.substring(5,7)+'月'+e.range.before.substring(8,10)+'日'
  496. this.endTime=e.range.after.substring(5,7)+'月'+e.range.after.substring(8,10)+'日'
  497. this.startDate = e.range.before +' '+localStorage.getItem('liveTime')
  498. this.endDate = e.range.after +' '+localStorage.getItem('leaveTime')
  499. this.ruzhu_num=parseInt(((new Date(e.range.after).getTime())-(new Date(e.range.before).getTime()))/1000/60/60/24)
  500. }else{
  501. this.endWeek='周'+e.lunar.ncWeek.substring(2,3)
  502. this.startTime=e.range.before.substring(5,7)+'月'+e.range.before.substring(8,10)+'日'
  503. this.endTime=e.range.after.substring(5,7)+'月'+e.range.after.substring(8,10)+'日'
  504. this.startDate = e.range.before +' '+localStorage.getItem('liveTime')
  505. this.endDate = e.range.after +' '+localStorage.getItem('leaveTime')
  506. this.ruzhu_num=parseInt(((new Date(e.range.after).getTime())-(new Date(e.range.before).getTime()))/1000/60/60/24)
  507. }
  508. }
  509. },
  510. //选择器
  511. bindPickerChange: function(e) {
  512. console.log('picker发送选择改变,携带值为', e.detail.value)
  513. this.index = e.detail.value
  514. this.mayTime = this.startDate.substring(0,11)+this.array[this.index].substring(0,5)+":00"
  515. // console.log(this.mayTime)
  516. },
  517. //钟点房选择器
  518. bindPickerChange2: function(e) {
  519. console.log('picker发送选择改变,携带值为', e.detail.value)
  520. this.index2 = e.detail.value
  521. console.log(this.array2[this.index2].substring(0,8),this.array2[this.index2])
  522. if(this.array2.length<=0){
  523. }else{
  524. this.startDateZ=localStorage.getItem('enableStartTime').substring(0,11)+this.array2[this.index2].substring(0,8)
  525. this.endDateZ=localStorage.getItem('enableEndTime').substring(0,11)+this.array2[this.index2].substring(9,17)
  526. }
  527. this.mayTime = this.startDate.substring(0,11)+this.array[this.index].substring(0,5)+":00"
  528. // console.log(this.mayTime)
  529. },
  530. // 输入框
  531. bindTextAreaBlur: function (e) {
  532. this.textNum=e.detail.cursor
  533. this.remark=e.detail.value
  534. }
  535. }
  536. }
  537. </script>
  538. <style>
  539. @import url("./css/order_room.css");
  540. </style>