audit.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486
  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 ? 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" style="padding-bottom: 25px">
  79. <div class="custom-item-tit">
  80. <div class="tit">审核结果</div>
  81. </div>
  82. <div class="cell-item">
  83. <p class="label">审核结果</p>
  84. <div class="tit">
  85. <van-radio-group v-model="radio" :disabled="!readOnlyType">
  86. <van-radio name="1" checked-color="#976CEB">通过</van-radio>
  87. <van-radio name="2" checked-color="#976CEB">取消</van-radio>
  88. </van-radio-group>
  89. </div>
  90. </div>
  91. <div class="custom-item-tit">
  92. <div class="tit">取消原因</div>
  93. </div>
  94. <uni-easyinput
  95. type="textarea"
  96. autoHeight
  97. :disabled="radio != '2' || !readOnlyType"
  98. v-model="reason"
  99. maxlength="800"
  100. class="textarea-item input-item-warp"
  101. placeholder="请输入"
  102. />
  103. </div>
  104. <div class="repair-bottom bottom-button" v-if="readOnlyType">
  105. <button class="btn" @click="submitFrom">提交</button>
  106. </div>
  107. <!-- 开始时间 -->
  108. <van-popup v-model="showStartPicker" position="bottom">
  109. <van-datetime-picker
  110. v-model="startTime"
  111. type="date"
  112. title="选择开始时间"
  113. @confirm="startTimeConfirml"
  114. @cancel="startTimeCancel"
  115. />
  116. </van-popup>
  117. <!-- 明天预约时间 -->
  118. <van-popup v-model="showEndPicker" position="bottom">
  119. <van-datetime-picker
  120. v-model="endTime"
  121. type="date"
  122. title="选择结束时间"
  123. @confirm="endTimeConfirml"
  124. @cancel="endTimeCancel"
  125. />
  126. </van-popup>
  127. </div>
  128. </template>
  129. <script>
  130. // import auth from "@/service/auth";
  131. import vanRadio from "../../../wxcomponents/weapp/dist/radio/index";
  132. import vanRadioGroup from "../../../wxcomponents/weapp/dist/radio-group/index";
  133. import { formatDate } from "@/js_sdk/dateFormat";
  134. import TelNum from "../../subPackages/components/tel-number";
  135. import {
  136. getAppUserMain,
  137. getDetial,
  138. confirmAudit,
  139. getUserLocalStorageInfo,
  140. getByCodes,
  141. } from "@/js_sdk/venueRoom";
  142. export default {
  143. components: {
  144. TelNum,
  145. vanRadio,
  146. vanRadioGroup,
  147. },
  148. data() {
  149. return {
  150. active: "",
  151. dic_SelectList: {},
  152. dic_key: ["timeSlot"],
  153. currUser: {},
  154. bizInfo: {},
  155. roomDetial: {},
  156. oderDetial: {},
  157. appointId: "",
  158. readOnlyType: true,
  159. //停车场信息
  160. lotInfo: {},
  161. //车位列表
  162. seatList: [],
  163. //数量
  164. num: -1,
  165. radio: "1",
  166. showStartPicker: false,
  167. showEndPicker: false,
  168. startTime: "",
  169. formatStartTime: "",
  170. endTime: "",
  171. formatEndTime: "",
  172. // 日期列表
  173. dateList: [
  174. {
  175. date: "8/1",
  176. typeList: ["1", "3", "4"],
  177. },
  178. {
  179. date: "8/2",
  180. typeList: ["1", "2", "4"],
  181. },
  182. {
  183. date: "8/3",
  184. typeList: ["4", "2", "1"],
  185. },
  186. ],
  187. reason: "",
  188. // 时间段列表
  189. timeList: ["9:00-12:00", "13:00-18:00", "18:00-22:00"],
  190. };
  191. },
  192. onLoad(option) {
  193. console.log(option.readOnlyType === "1");
  194. this.appointId = option.id;
  195. this.readOnlyType = option.readOnlyType === "1" ? true : false;
  196. this.currUser = getUserLocalStorageInfo().user;
  197. this.getByCodes();
  198. },
  199. methods: {
  200. async getByCodes() {
  201. let data = await getByCodes(JSON.stringify(this.dic_key));
  202. this.dic_SelectList = this.$common.handleDicList(data);
  203. this.getOrderDetail();
  204. },
  205. //获取公司名称
  206. getBizMain() {
  207. let reqData = {
  208. id: this.oderDetial.createdId,
  209. };
  210. getAppUserMain(reqData).then((res) => {
  211. if (res.key == 200) {
  212. this.bizInfo = res.data.qymc;
  213. }
  214. });
  215. },
  216. //获取预约详情
  217. getOrderDetail() {
  218. let reqData = {
  219. id: this.appointId,
  220. };
  221. getDetial(reqData).then((res) => {
  222. if (res.key == 200) {
  223. this.roomDetial = res.data.roomDetial;
  224. this.oderDetial = res.data.oderDetial;
  225. this.oderDetial.useTime = this.$common.transDate(
  226. this.oderDetial.useTime
  227. );
  228. this.radio = this.oderDetial.state == "5" ? "2" : "1";
  229. this.reason = this.oderDetial.cancelReason;
  230. this.getBizMain();
  231. }
  232. });
  233. },
  234. //提交
  235. submitFrom() {
  236. let reqData = {
  237. id: this.appointId,
  238. confirmType: this.radio,
  239. reason: this.reason,
  240. userId: this.currUser.id,
  241. };
  242. if (this.radio == 2) {
  243. if (!this.reason) {
  244. this.$showToast("请填写取消原因!");
  245. return false;
  246. }
  247. }
  248. confirmAudit(reqData).then((res) => {
  249. console.log("获取提交详情_:", res);
  250. if (res.key == 200) {
  251. this.$showToast("审核成功!");
  252. uni.navigateBack({
  253. success() {
  254. beforePage.getAppointList("1,3");
  255. },
  256. });
  257. }
  258. });
  259. },
  260. /**
  261. * 开始时间弹窗取消
  262. */
  263. startTimeCancel() {
  264. this.showStartPicker = false;
  265. },
  266. /**
  267. * 开始时间弹窗确认
  268. */
  269. startTimeConfirml(val) {
  270. this.formatStartTime = formatDate(val, "day");
  271. this.showStartPicker = false;
  272. },
  273. /**
  274. * 结束时间弹窗取消
  275. */
  276. endTimeCancel() {
  277. this.showEndPicker = false;
  278. },
  279. /**
  280. * 结束时间弹窗确认
  281. */
  282. endTimeConfirml(val) {
  283. this.formatEndTime = formatDate(val, "day");
  284. this.showEndPicker = false;
  285. },
  286. },
  287. };
  288. </script>
  289. <style lang="scss" scoped>
  290. .detail {
  291. padding: 0 0 180rpx;
  292. overflow: hidden;
  293. .bottom-button {
  294. position: fixed;
  295. bottom: 0;
  296. left: 0;
  297. height: 21.333vw;
  298. width: 92%;
  299. height: 100rpx;
  300. padding: 4.667vw 4vw;
  301. background-color: #fff;
  302. display: -webkit-box;
  303. display: -ms-flexbox;
  304. display: flex;
  305. -webkit-box-align: center;
  306. -ms-flex-align: center;
  307. align-items: center;
  308. -webkit-box-pack: center;
  309. -ms-flex-pack: center;
  310. justify-content: center;
  311. .btn {
  312. height: 100%;
  313. line-height: 100rpx;
  314. width: 100%;
  315. color: #fff;
  316. background-color: #60f;
  317. font-size: 4.533vw;
  318. border-radius: 1.333vw;
  319. }
  320. }
  321. .top-box {
  322. height: 100rpx;
  323. line-height: 100rpx;
  324. font-size: 30rpx;
  325. color: #333;
  326. }
  327. .part-1 {
  328. margin-bottom: 20rpx;
  329. .custom-item-tit {
  330. height: 13.333vw;
  331. font-size: 4.267vw;
  332. color: #333;
  333. padding: 2.667vw 0;
  334. position: relative;
  335. display: flex;
  336. -webkit-box-pack: justify;
  337. -ms-flex-pack: justify;
  338. justify-content: space-between;
  339. -webkit-box-align: center;
  340. -ms-flex-align: center;
  341. align-items: center;
  342. box-sizing: border-box;
  343. .tit {
  344. padding-left: 2.667vw;
  345. position: relative;
  346. font-size: 4.267vw;
  347. &::after {
  348. content: "";
  349. width: 0.8vw;
  350. height: 90%;
  351. background-color: #976dec;
  352. border-radius: 0.4vw;
  353. position: absolute;
  354. left: 0;
  355. top: 50%;
  356. -webkit-transform: translateY(-50%);
  357. transform: translateY(-50%);
  358. }
  359. }
  360. }
  361. }
  362. .part-2 {
  363. margin-bottom: 20rpx;
  364. .custom-item-tit {
  365. height: 13.333vw;
  366. font-size: 4.267vw;
  367. color: #333;
  368. padding: 2.667vw 0;
  369. position: relative;
  370. display: flex;
  371. -webkit-box-pack: justify;
  372. -ms-flex-pack: justify;
  373. justify-content: space-between;
  374. -webkit-box-align: center;
  375. -ms-flex-align: center;
  376. align-items: center;
  377. box-sizing: border-box;
  378. .tit {
  379. padding-left: 2.667vw;
  380. position: relative;
  381. font-size: 4.267vw;
  382. &::after {
  383. content: "";
  384. width: 0.8vw;
  385. height: 90%;
  386. background-color: #976dec;
  387. border-radius: 0.4vw;
  388. position: absolute;
  389. left: 0;
  390. top: 50%;
  391. -webkit-transform: translateY(-50%);
  392. transform: translateY(-50%);
  393. }
  394. }
  395. }
  396. }
  397. .filter-box {
  398. padding: 0 30rpx 30rpx;
  399. margin-bottom: 20rpx;
  400. .tit {
  401. font-size: 34rpx;
  402. padding-bottom: 30rpx;
  403. }
  404. }
  405. .filter-input-box {
  406. display: flex;
  407. align-items: center;
  408. justify-content: space-between;
  409. .custom-input-box {
  410. width: 250rpx;
  411. }
  412. .confirm-btn {
  413. width: 100rpx;
  414. height: 80rpx;
  415. border-radius: 10rpx;
  416. color: #fff;
  417. background-color: #6600ff;
  418. i {
  419. font-size: 35rpx;
  420. }
  421. }
  422. }
  423. .part-2 {
  424. padding: 30rpx;
  425. }
  426. .part-3 {
  427. .custom-item-tit {
  428. height: 13.333vw;
  429. font-size: 4.267vw;
  430. color: #333;
  431. padding: 2.667vw 0;
  432. position: relative;
  433. display: flex;
  434. -webkit-box-pack: justify;
  435. -ms-flex-pack: justify;
  436. justify-content: space-between;
  437. -webkit-box-align: center;
  438. -ms-flex-align: center;
  439. align-items: center;
  440. box-sizing: border-box;
  441. .tit {
  442. padding-left: 2.667vw;
  443. position: relative;
  444. font-size: 4.267vw;
  445. &::after {
  446. content: "";
  447. width: 0.8vw;
  448. height: 90%;
  449. background-color: #976dec;
  450. border-radius: 0.4vw;
  451. position: absolute;
  452. left: 0;
  453. top: 50%;
  454. -webkit-transform: translateY(-50%);
  455. transform: translateY(-50%);
  456. }
  457. }
  458. }
  459. .input-item-warp {
  460. padding: 0 0 30rpx;
  461. }
  462. }
  463. }
  464. </style>