confirm.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667
  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/http";
  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.radio = radio;
  330. this.$forceUpdate();
  331. console.log(this.roomDetial);
  332. this.processedAnnexList = JSON.parse(res.data.oderDetial.payProof);
  333. this.getBizMain();
  334. }
  335. });
  336. },
  337. //提交
  338. submitFrom() {
  339. let reqData = {
  340. id: this.appointId,
  341. confirmType: this.radio,
  342. reason: this.reason,
  343. userId: this.currUser.id,
  344. };
  345. confirmAudit(reqData).then((res) => {
  346. console.log("获取提交详情_:", res);
  347. if (res.key == 200) {
  348. this.$showToast("确认成功!");
  349. uni.navigateBack({
  350. success() {
  351. beforePage.getAppointList("1,3");
  352. },
  353. });
  354. }
  355. });
  356. },
  357. formatTime(val) {
  358. console.log(val);
  359. return this.$common.formatDate(val, "day");
  360. },
  361. /**
  362. * 开始时间弹窗取消
  363. */
  364. startTimeCancel() {
  365. this.showStartPicker = false;
  366. },
  367. /**
  368. * 开始时间弹窗确认
  369. */
  370. startTimeConfirml(val) {
  371. this.formatStartTime = formatDate(val, "day");
  372. this.showStartPicker = false;
  373. },
  374. /**
  375. * 结束时间弹窗取消
  376. */
  377. endTimeCancel() {
  378. this.showEndPicker = false;
  379. },
  380. /**
  381. * 结束时间弹窗确认
  382. */
  383. endTimeConfirml(val) {
  384. this.formatEndTime = formatDate(val, "day");
  385. this.showEndPicker = false;
  386. },
  387. },
  388. };
  389. </script>
  390. <style lang="scss" scoped>
  391. .detail {
  392. padding: 0 0 180rpx;
  393. overflow: hidden;
  394. .bottom-button {
  395. position: fixed;
  396. bottom: 0;
  397. left: 0;
  398. height: 21.333vw;
  399. width: 92%;
  400. height: 125rpx;
  401. padding: 4.667vw 4vw;
  402. background-color: #fff;
  403. display: -webkit-box;
  404. display: -ms-flexbox;
  405. display: flex;
  406. -webkit-box-align: center;
  407. -ms-flex-align: center;
  408. align-items: center;
  409. -webkit-box-pack: center;
  410. -ms-flex-pack: center;
  411. justify-content: center;
  412. .btn {
  413. height: 100%;
  414. line-height: 125rpx;
  415. width: 100%;
  416. color: #fff;
  417. background-color: #60f;
  418. font-size: 4.533vw;
  419. border-radius: 1.333vw;
  420. }
  421. }
  422. .top-box {
  423. height: 100rpx;
  424. line-height: 100rpx;
  425. font-size: 30rpx;
  426. color: #333;
  427. }
  428. .part-1 {
  429. margin-bottom: 20rpx;
  430. .custom-item-tit {
  431. height: 13.333vw;
  432. font-size: 4.267vw;
  433. color: #333;
  434. padding: 2.667vw 0;
  435. position: relative;
  436. display: flex;
  437. -webkit-box-pack: justify;
  438. -ms-flex-pack: justify;
  439. justify-content: space-between;
  440. -webkit-box-align: center;
  441. -ms-flex-align: center;
  442. align-items: center;
  443. box-sizing: border-box;
  444. .tit {
  445. padding-left: 2.667vw;
  446. position: relative;
  447. font-size: 4.267vw;
  448. &::after {
  449. content: "";
  450. width: 0.8vw;
  451. height: 90%;
  452. background-color: #976dec;
  453. border-radius: 0.4vw;
  454. position: absolute;
  455. left: 0;
  456. top: 50%;
  457. -webkit-transform: translateY(-50%);
  458. transform: translateY(-50%);
  459. }
  460. }
  461. }
  462. }
  463. .part-2 {
  464. margin-bottom: 20rpx;
  465. .custom-item-tit {
  466. height: 13.333vw;
  467. font-size: 4.267vw;
  468. color: #333;
  469. padding: 2.667vw 0;
  470. position: relative;
  471. display: flex;
  472. -webkit-box-pack: justify;
  473. -ms-flex-pack: justify;
  474. justify-content: space-between;
  475. -webkit-box-align: center;
  476. -ms-flex-align: center;
  477. align-items: center;
  478. box-sizing: border-box;
  479. .tit {
  480. padding-left: 2.667vw;
  481. position: relative;
  482. font-size: 4.267vw;
  483. &::after {
  484. content: "";
  485. width: 0.8vw;
  486. height: 90%;
  487. background-color: #976dec;
  488. border-radius: 0.4vw;
  489. position: absolute;
  490. left: 0;
  491. top: 50%;
  492. -webkit-transform: translateY(-50%);
  493. transform: translateY(-50%);
  494. }
  495. }
  496. }
  497. }
  498. .filter-box {
  499. padding: 0 30rpx 30rpx;
  500. margin-bottom: 20rpx;
  501. .tit {
  502. font-size: 34rpx;
  503. padding-bottom: 30rpx;
  504. }
  505. }
  506. .filter-input-box {
  507. display: flex;
  508. align-items: center;
  509. justify-content: space-between;
  510. .custom-input-box {
  511. width: 250rpx;
  512. }
  513. .confirm-btn {
  514. width: 100rpx;
  515. height: 80rpx;
  516. border-radius: 10rpx;
  517. color: #fff;
  518. background-color: #6600ff;
  519. i {
  520. font-size: 35rpx;
  521. }
  522. }
  523. }
  524. .part-2 {
  525. padding: 30rpx;
  526. }
  527. .part-3 {
  528. .custom-item-tit {
  529. height: 13.333vw;
  530. font-size: 4.267vw;
  531. color: #333;
  532. padding: 2.667vw 0;
  533. position: relative;
  534. display: flex;
  535. -webkit-box-pack: justify;
  536. -ms-flex-pack: justify;
  537. justify-content: space-between;
  538. -webkit-box-align: center;
  539. -ms-flex-align: center;
  540. align-items: center;
  541. box-sizing: border-box;
  542. .tit {
  543. padding-left: 2.667vw;
  544. position: relative;
  545. font-size: 4.267vw;
  546. &::after {
  547. content: "";
  548. width: 0.8vw;
  549. height: 90%;
  550. background-color: #976dec;
  551. border-radius: 0.4vw;
  552. position: absolute;
  553. left: 0;
  554. top: 50%;
  555. -webkit-transform: translateY(-50%);
  556. transform: translateY(-50%);
  557. }
  558. }
  559. }
  560. .input-item-warp {
  561. padding: 0 0 30rpx;
  562. }
  563. }
  564. .part-4 {
  565. .custom-item-tit {
  566. height: 13.333vw;
  567. font-size: 4.267vw;
  568. color: #333;
  569. padding: 2.667vw 0;
  570. position: relative;
  571. display: flex;
  572. -webkit-box-pack: justify;
  573. -ms-flex-pack: justify;
  574. justify-content: space-between;
  575. -webkit-box-align: center;
  576. -ms-flex-align: center;
  577. align-items: center;
  578. box-sizing: border-box;
  579. .tit {
  580. padding-left: 2.667vw;
  581. position: relative;
  582. font-size: 4.267vw;
  583. &::after {
  584. content: "";
  585. width: 0.8vw;
  586. height: 90%;
  587. background-color: #976dec;
  588. border-radius: 0.4vw;
  589. position: absolute;
  590. left: 0;
  591. top: 50%;
  592. -webkit-transform: translateY(-50%);
  593. transform: translateY(-50%);
  594. }
  595. }
  596. }
  597. .input-item-warp {
  598. padding: 0 0 30rpx;
  599. }
  600. }
  601. .part-5 {
  602. .custom-item-tit {
  603. height: 13.333vw;
  604. font-size: 4.267vw;
  605. color: #333;
  606. padding: 2.667vw 0;
  607. position: relative;
  608. display: flex;
  609. -webkit-box-pack: justify;
  610. -ms-flex-pack: justify;
  611. justify-content: space-between;
  612. -webkit-box-align: center;
  613. -ms-flex-align: center;
  614. align-items: center;
  615. box-sizing: border-box;
  616. .tit {
  617. padding-left: 2.667vw;
  618. position: relative;
  619. font-size: 4.267vw;
  620. &::after {
  621. content: "";
  622. width: 0.8vw;
  623. height: 90%;
  624. background-color: #976dec;
  625. border-radius: 0.4vw;
  626. position: absolute;
  627. left: 0;
  628. top: 50%;
  629. -webkit-transform: translateY(-50%);
  630. transform: translateY(-50%);
  631. }
  632. }
  633. }
  634. .input-item-warp {
  635. padding: 0 0 30rpx;
  636. }
  637. }
  638. }
  639. </style>