confirm.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  1. <template>
  2. <div class="detail">
  3. <div class="white-box top-box">当前企业:{{ bizInfo }}</div>
  4. <div class="white-box part-1">
  5. <div class="custom-item-tit">
  6. <div class="tit">场馆信息</div>
  7. </div>
  8. <div class="cell-item">
  9. <p class="label">场馆名称</p>
  10. <p class="tit">{{ roomDetial.roomName }}</p>
  11. </div>
  12. <div class="cell-item">
  13. <p class="label">场馆位置</p>
  14. <p class="tit">{{ roomDetial.position }}</p>
  15. </div>
  16. <div class="cell-item">
  17. <p class="label">座位数</p>
  18. <p class="tit">{{ roomDetial.seatNumber }}</p>
  19. </div>
  20. <div class="cell-item">
  21. <p class="label">配套</p>
  22. <p class="tit">{{ roomDetial.match }}</p>
  23. </div>
  24. <div class="cell-item">
  25. <p class="label">收费标准</p>
  26. <p class="tit">{{ roomDetial.charges }}</p>
  27. </div>
  28. <div class="cell-item flex-item">
  29. <p class="label">预约电话</p>
  30. <p class="tit tel-box">
  31. <span>{{ roomDetial.appointPhone }}</span>
  32. <TelNum :num="roomDetial.appointPhone" :showTel="false" />
  33. </p>
  34. </div>
  35. </div>
  36. <div class="white-box part-2">
  37. <div class="custom-item-tit">
  38. <div class="tit">场馆预约</div>
  39. </div>
  40. <div class="cell-item">
  41. <p class="label">使用时间</p>
  42. <p class="tit">
  43. {{ oderDetial.useTime }} 至
  44. {{ dic_SelectList.timeSlot[oderDetial.timeSlot - 1].label }}
  45. </p>
  46. </div>
  47. <div class="cell-item">
  48. <p class="label">场馆主题</p>
  49. <p class="tit">
  50. {{ oderDetial.subject ? oderDetial.subject : "暂无" }}
  51. </p>
  52. </div>
  53. <div class="cell-item">
  54. <p class="label">参会人数</p>
  55. <p class="tit">
  56. {{ oderDetial.peopleNumber ? oderDetial.peopleNumber : "暂无" }}
  57. </p>
  58. </div>
  59. <div class="cell-item">
  60. <p class="label">联系人</p>
  61. <p class="tit">
  62. {{ oderDetial.contacts ? oderDetial.contacts : "暂无" }}
  63. </p>
  64. </div>
  65. <div class="cell-item">
  66. <p class="label">联系电话</p>
  67. <p class="tit">{{ oderDetial.phone ? oderDetial.phone : "暂无" }}</p>
  68. </div>
  69. <div class="block-cell-item">
  70. <p class="label">备注</p>
  71. <div class="tit">
  72. <div class="textarea">
  73. {{ oderDetial.remarks ? oderDetial.remarks : "暂无" }}
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. <div class="white-box part-3 form-part">
  79. <div class="custom-item-tit">
  80. <div class="tit">审核结果</div>
  81. </div>
  82. <div class="cell-item">
  83. <p class="label">审核结果</p>
  84. <p class="tit">
  85. {{ oderDetial.stateDesc == "已取消" ? "已取消" : "审核通过" }}
  86. </p>
  87. </div>
  88. <div class="block-cell-item">
  89. <p class="label">取消原因</p>
  90. <div class="tit">
  91. <div class="textarea">
  92. {{
  93. oderDetial.cancelReason || oderDetial.cancelReason == "请输入"
  94. ? oderDetial.cancelReason
  95. : "暂无"
  96. }}
  97. </div>
  98. </div>
  99. </div>
  100. <div class="cell-item">
  101. <p class="label">经办人</p>
  102. <p class="tit">{{ oderDetial.examineName }}</p>
  103. </div>
  104. <div class="cell-item">
  105. <p class="label">经办时间</p>
  106. <p class="tit">{{ oderDetial.examineTime }}</p>
  107. </div>
  108. </div>
  109. <div class="white-box part-4 form-part">
  110. <div class="custom-item-tit">
  111. <div class="tit">支付凭证</div>
  112. </div>
  113. <div class="cell-item">
  114. <p class="label">支付方式</p>
  115. <p class="tit">
  116. {{
  117. dic_SelectList.payType[oderDetial.payType - 1].label
  118. ? dic_SelectList.payType[oderDetial.payType - 1].label
  119. : "暂无"
  120. }}
  121. </p>
  122. </div>
  123. <div class="cell-item">
  124. <p class="label">支付人名称</p>
  125. <p class="tit">
  126. {{ oderDetial.payUserName ? oderDetial.payUserName : "暂无" }}
  127. </p>
  128. </div>
  129. <div class="block-cell-item">
  130. <p class="label">
  131. 处理后拍照<span class="tips" v-if="!readOnlyType"
  132. >(支持图片上传限20M内,最多1张)</span
  133. >
  134. </p>
  135. <div class="tit">
  136. <ul class="annex-list-box">
  137. <li
  138. class="annex-item"
  139. v-for="(item, index) in processedAnnexList"
  140. :key="index"
  141. >
  142. <img :src="item.url" alt="" v-if="item.isImage" />
  143. <video
  144. :src="item.url"
  145. v-if="!item.isImage"
  146. width="100%"
  147. height="100%"
  148. ></video>
  149. </li>
  150. </ul>
  151. </div>
  152. </div>
  153. </div>
  154. <div class="white-box part-5 form-part">
  155. <div class="custom-item-tit">
  156. <div class="tit">预定确认</div>
  157. </div>
  158. <div class="cell-item">
  159. <p class="label">确认结果</p>
  160. <div class="tit">
  161. <van-radio-group v-model="radio" :disabled="!readOnlyType">
  162. <van-radio name="1" checked-color="#976CEB">预定成功</van-radio>
  163. <van-radio name="2" checked-color="#976CEB">取消</van-radio>
  164. </van-radio-group>
  165. </div>
  166. </div>
  167. <div class="custom-item-tit" v-if="oderDetial.stateDesc == '已取消'">
  168. <div class="tit">取消原因</div>
  169. </div>
  170. <uni-easyinput
  171. type="textarea"
  172. autoHeight
  173. v-if="oderDetial.stateDesc == '已取消'"
  174. :disabled="radio == '1' || !readOnlyType"
  175. v-model="reason"
  176. maxlength="800"
  177. class="textarea-item input-item-warp"
  178. placeholder="暂无"
  179. />
  180. <div class="cell-item">
  181. <p class="label">经办人</p>
  182. <p class="tit">
  183. {{
  184. oderDetial.handlerName == null || oderDetial.handlerName == ""
  185. ? currUser.truename
  186. : oderDetial.handlerName
  187. }}
  188. </p>
  189. </div>
  190. <div class="cell-item">
  191. <p class="label">经办时间</p>
  192. <p class="tit">{{ oderDetial.examineTime }}</p>
  193. </div>
  194. </div>
  195. <div class="repair-bottom bottom-button" v-if="readOnlyType">
  196. <button class="btn" @click="submitFrom">提交</button>
  197. </div>
  198. <!-- 开始时间 -->
  199. <van-popup v-model="showStartPicker" position="bottom">
  200. <van-datetime-picker
  201. v-model="startTime"
  202. type="date"
  203. title="选择开始时间"
  204. @confirm="startTimeConfirml"
  205. @cancel="startTimeCancel"
  206. />
  207. </van-popup>
  208. <!-- 明天预约时间 -->
  209. <van-popup v-model="showEndPicker" position="bottom">
  210. <van-datetime-picker
  211. v-model="endTime"
  212. type="date"
  213. title="选择结束时间"
  214. @confirm="endTimeConfirml"
  215. @cancel="endTimeCancel"
  216. />
  217. </van-popup>
  218. </div>
  219. </template>
  220. <script>
  221. import vanRadio from "../../../wxcomponents/weapp/dist/radio/index";
  222. import vanRadioGroup from "../../../wxcomponents/weapp/dist/radio-group/index";
  223. import TelNum from "../../subPackages/components/tel-number";
  224. import {
  225. getUserLocalStorageInfo,
  226. getAppUserMain,
  227. getDetial,
  228. confirmAudit,
  229. getByCodes,
  230. } from "@/js_sdk/venueRoom";
  231. // import { formatDate } from "@/plugins/dateFormat";
  232. export default {
  233. components: {
  234. TelNum,
  235. vanRadio,
  236. vanRadioGroup,
  237. },
  238. data() {
  239. return {
  240. active: "",
  241. dic_SelectList: {},
  242. dic_key: ["timeSlot", "payType"],
  243. currUser: {},
  244. bizInfo: "",
  245. roomDetial: {},
  246. oderDetial: {},
  247. appointId: "",
  248. readOnlyType: false,
  249. //停车场信息
  250. lotInfo: {},
  251. //车位列表
  252. seatList: [],
  253. //数量
  254. num: -1,
  255. radio: "1",
  256. reason: "",
  257. showStartPicker: false,
  258. showEndPicker: false,
  259. startTime: "",
  260. formatStartTime: "",
  261. endTime: "",
  262. formatEndTime: "",
  263. // 日期列表
  264. dateList: [
  265. {
  266. date: "8/1",
  267. typeList: ["1", "3", "4"],
  268. },
  269. {
  270. date: "8/2",
  271. typeList: ["1", "2", "4"],
  272. },
  273. {
  274. date: "8/3",
  275. typeList: ["4", "2", "1"],
  276. },
  277. ],
  278. // 时间段列表
  279. timeList: ["9:00-12:00", "13:00-18:00", "18:00-22:00"],
  280. processedAnnexList: [],
  281. };
  282. },
  283. onLoad(option) {
  284. this.currUser = getUserLocalStorageInfo().user;
  285. this.appointId = option.id;
  286. this.readOnlyType = option.readOnlyType == "1" ? true : false;
  287. this.getByCodes();
  288. },
  289. methods: {
  290. async getByCodes() {
  291. let data = await getByCodes(JSON.stringify(this.dic_key));
  292. this.dic_SelectList = this.$common.handleDicList(data);
  293. this.getOrderDetail();
  294. },
  295. //获取公司名称
  296. getBizMain() {
  297. let reqData = {
  298. id: this.oderDetial.createdId,
  299. };
  300. getAppUserMain(reqData).then((res) => {
  301. if (res.key == 200) {
  302. this.bizInfo = res.data.qymc;
  303. }
  304. });
  305. },
  306. //获取预约详情
  307. getOrderDetail() {
  308. let reqData = {
  309. id: this.appointId,
  310. };
  311. getDetial(reqData).then((res) => {
  312. if (res.key == 200) {
  313. let radio;
  314. console.log(res.data.oderDetial.state);
  315. if (
  316. res.data.oderDetial.state == 4 ||
  317. res.data.oderDetial.state == 3
  318. ) {
  319. radio = "1";
  320. } else if (res.data.oderDetial.state == 5) {
  321. radio = "2";
  322. } else {
  323. debugger;
  324. radio = null;
  325. }
  326. console.log("radioradioradioradioradio", radio);
  327. this.roomDetial = res.data.roomDetial;
  328. this.oderDetial = res.data.oderDetial;
  329. this.oderDetial.examineTime = this.$common.transDate(
  330. this.oderDetial.examineTime
  331. );
  332. this.oderDetial.useTime = this.$common.transDate(
  333. this.oderDetial.useTime
  334. );
  335. this.radio = radio;
  336. this.$forceUpdate();
  337. console.log(this.roomDetial);
  338. this.processedAnnexList = JSON.parse(res.data.oderDetial.payProof);
  339. this.getBizMain();
  340. }
  341. });
  342. },
  343. //提交
  344. submitFrom() {
  345. let reqData = {
  346. id: this.appointId,
  347. confirmType: this.radio,
  348. reason: this.reason,
  349. userId: this.currUser.id,
  350. };
  351. confirmAudit(reqData).then((res) => {
  352. console.log("获取提交详情_:", res);
  353. if (res.key == 200) {
  354. this.$showToast("确认成功!");
  355. uni.navigateBack({
  356. success() {
  357. beforePage.getAppointList("1,3");
  358. },
  359. });
  360. }
  361. });
  362. },
  363. formatTime(val) {
  364. console.log(val);
  365. return this.$common.formatDate(val, "day");
  366. },
  367. /**
  368. * 开始时间弹窗取消
  369. */
  370. startTimeCancel() {
  371. this.showStartPicker = false;
  372. },
  373. /**
  374. * 开始时间弹窗确认
  375. */
  376. startTimeConfirml(val) {
  377. this.formatStartTime = formatDate(val, "day");
  378. this.showStartPicker = false;
  379. },
  380. /**
  381. * 结束时间弹窗取消
  382. */
  383. endTimeCancel() {
  384. this.showEndPicker = false;
  385. },
  386. /**
  387. * 结束时间弹窗确认
  388. */
  389. endTimeConfirml(val) {
  390. this.formatEndTime = formatDate(val, "day");
  391. this.showEndPicker = false;
  392. },
  393. },
  394. };
  395. </script>
  396. <style lang="scss" scoped>
  397. .detail {
  398. padding: 0 0 180rpx;
  399. overflow: hidden;
  400. .bottom-button {
  401. position: fixed;
  402. bottom: 0;
  403. left: 0;
  404. height: 21.333vw;
  405. width: 92%;
  406. height: 125rpx;
  407. padding: 4.667vw 4vw;
  408. background-color: #fff;
  409. display: -webkit-box;
  410. display: -ms-flexbox;
  411. display: flex;
  412. -webkit-box-align: center;
  413. -ms-flex-align: center;
  414. align-items: center;
  415. -webkit-box-pack: center;
  416. -ms-flex-pack: center;
  417. justify-content: center;
  418. .btn {
  419. height: 100%;
  420. line-height: 125rpx;
  421. width: 100%;
  422. color: #fff;
  423. background-color: #60f;
  424. font-size: 4.533vw;
  425. border-radius: 1.333vw;
  426. }
  427. }
  428. .top-box {
  429. height: 100rpx;
  430. line-height: 100rpx;
  431. font-size: 30rpx;
  432. color: #333;
  433. }
  434. .part-1 {
  435. margin-bottom: 20rpx;
  436. .custom-item-tit {
  437. height: 13.333vw;
  438. font-size: 4.267vw;
  439. color: #333;
  440. padding: 2.667vw 0;
  441. position: relative;
  442. display: flex;
  443. -webkit-box-pack: justify;
  444. -ms-flex-pack: justify;
  445. justify-content: space-between;
  446. -webkit-box-align: center;
  447. -ms-flex-align: center;
  448. align-items: center;
  449. box-sizing: border-box;
  450. .tit {
  451. padding-left: 2.667vw;
  452. position: relative;
  453. font-size: 4.267vw;
  454. &::after {
  455. content: "";
  456. width: 0.8vw;
  457. height: 90%;
  458. background-color: #976dec;
  459. border-radius: 0.4vw;
  460. position: absolute;
  461. left: 0;
  462. top: 50%;
  463. -webkit-transform: translateY(-50%);
  464. transform: translateY(-50%);
  465. }
  466. }
  467. }
  468. }
  469. .part-2 {
  470. margin-bottom: 20rpx;
  471. .custom-item-tit {
  472. height: 13.333vw;
  473. font-size: 4.267vw;
  474. color: #333;
  475. padding: 2.667vw 0;
  476. position: relative;
  477. display: flex;
  478. -webkit-box-pack: justify;
  479. -ms-flex-pack: justify;
  480. justify-content: space-between;
  481. -webkit-box-align: center;
  482. -ms-flex-align: center;
  483. align-items: center;
  484. box-sizing: border-box;
  485. .tit {
  486. padding-left: 2.667vw;
  487. position: relative;
  488. font-size: 4.267vw;
  489. &::after {
  490. content: "";
  491. width: 0.8vw;
  492. height: 90%;
  493. background-color: #976dec;
  494. border-radius: 0.4vw;
  495. position: absolute;
  496. left: 0;
  497. top: 50%;
  498. -webkit-transform: translateY(-50%);
  499. transform: translateY(-50%);
  500. }
  501. }
  502. }
  503. }
  504. .filter-box {
  505. padding: 0 30rpx 30rpx;
  506. margin-bottom: 20rpx;
  507. .tit {
  508. font-size: 34rpx;
  509. padding-bottom: 30rpx;
  510. }
  511. }
  512. .filter-input-box {
  513. display: flex;
  514. align-items: center;
  515. justify-content: space-between;
  516. .custom-input-box {
  517. width: 250rpx;
  518. }
  519. .confirm-btn {
  520. width: 100rpx;
  521. height: 80rpx;
  522. border-radius: 10rpx;
  523. color: #fff;
  524. background-color: #6600ff;
  525. i {
  526. font-size: 35rpx;
  527. }
  528. }
  529. }
  530. .part-2 {
  531. padding: 30rpx;
  532. }
  533. .part-3 {
  534. .custom-item-tit {
  535. height: 13.333vw;
  536. font-size: 4.267vw;
  537. color: #333;
  538. padding: 2.667vw 0;
  539. position: relative;
  540. display: flex;
  541. -webkit-box-pack: justify;
  542. -ms-flex-pack: justify;
  543. justify-content: space-between;
  544. -webkit-box-align: center;
  545. -ms-flex-align: center;
  546. align-items: center;
  547. box-sizing: border-box;
  548. .tit {
  549. padding-left: 2.667vw;
  550. position: relative;
  551. font-size: 4.267vw;
  552. &::after {
  553. content: "";
  554. width: 0.8vw;
  555. height: 90%;
  556. background-color: #976dec;
  557. border-radius: 0.4vw;
  558. position: absolute;
  559. left: 0;
  560. top: 50%;
  561. -webkit-transform: translateY(-50%);
  562. transform: translateY(-50%);
  563. }
  564. }
  565. }
  566. .input-item-warp {
  567. padding: 0 0 30rpx;
  568. }
  569. }
  570. .part-4 {
  571. .custom-item-tit {
  572. height: 13.333vw;
  573. font-size: 4.267vw;
  574. color: #333;
  575. padding: 2.667vw 0;
  576. position: relative;
  577. display: flex;
  578. -webkit-box-pack: justify;
  579. -ms-flex-pack: justify;
  580. justify-content: space-between;
  581. -webkit-box-align: center;
  582. -ms-flex-align: center;
  583. align-items: center;
  584. box-sizing: border-box;
  585. .tit {
  586. padding-left: 2.667vw;
  587. position: relative;
  588. font-size: 4.267vw;
  589. &::after {
  590. content: "";
  591. width: 0.8vw;
  592. height: 90%;
  593. background-color: #976dec;
  594. border-radius: 0.4vw;
  595. position: absolute;
  596. left: 0;
  597. top: 50%;
  598. -webkit-transform: translateY(-50%);
  599. transform: translateY(-50%);
  600. }
  601. }
  602. }
  603. .input-item-warp {
  604. padding: 0 0 30rpx;
  605. }
  606. }
  607. .part-5 {
  608. .custom-item-tit {
  609. height: 13.333vw;
  610. font-size: 4.267vw;
  611. color: #333;
  612. padding: 2.667vw 0;
  613. position: relative;
  614. display: flex;
  615. -webkit-box-pack: justify;
  616. -ms-flex-pack: justify;
  617. justify-content: space-between;
  618. -webkit-box-align: center;
  619. -ms-flex-align: center;
  620. align-items: center;
  621. box-sizing: border-box;
  622. .tit {
  623. padding-left: 2.667vw;
  624. position: relative;
  625. font-size: 4.267vw;
  626. &::after {
  627. content: "";
  628. width: 0.8vw;
  629. height: 90%;
  630. background-color: #976dec;
  631. border-radius: 0.4vw;
  632. position: absolute;
  633. left: 0;
  634. top: 50%;
  635. -webkit-transform: translateY(-50%);
  636. transform: translateY(-50%);
  637. }
  638. }
  639. }
  640. .input-item-warp {
  641. padding: 0 0 30rpx;
  642. }
  643. }
  644. }
  645. </style>