audit.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  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.switchTab({
  253. url: "/pages/index/index",
  254. });
  255. }
  256. });
  257. },
  258. /**
  259. * 开始时间弹窗取消
  260. */
  261. startTimeCancel() {
  262. this.showStartPicker = false;
  263. },
  264. /**
  265. * 开始时间弹窗确认
  266. */
  267. startTimeConfirml(val) {
  268. this.formatStartTime = formatDate(val, "day");
  269. this.showStartPicker = false;
  270. },
  271. /**
  272. * 结束时间弹窗取消
  273. */
  274. endTimeCancel() {
  275. this.showEndPicker = false;
  276. },
  277. /**
  278. * 结束时间弹窗确认
  279. */
  280. endTimeConfirml(val) {
  281. this.formatEndTime = formatDate(val, "day");
  282. this.showEndPicker = false;
  283. },
  284. },
  285. };
  286. </script>
  287. <style lang="scss" scoped>
  288. .detail {
  289. padding: 0 0 180rpx;
  290. overflow: hidden;
  291. .bottom-button {
  292. position: fixed;
  293. bottom: 0;
  294. left: 0;
  295. height: 21.333vw;
  296. width: 92%;
  297. height: 100rpx;
  298. padding: 4.667vw 4vw;
  299. background-color: #fff;
  300. display: -webkit-box;
  301. display: -ms-flexbox;
  302. display: flex;
  303. -webkit-box-align: center;
  304. -ms-flex-align: center;
  305. align-items: center;
  306. -webkit-box-pack: center;
  307. -ms-flex-pack: center;
  308. justify-content: center;
  309. .btn {
  310. height: 100%;
  311. line-height: 100rpx;
  312. width: 100%;
  313. color: #fff;
  314. background-color: #60f;
  315. font-size: 4.533vw;
  316. border-radius: 1.333vw;
  317. }
  318. }
  319. .top-box {
  320. height: 100rpx;
  321. line-height: 100rpx;
  322. font-size: 30rpx;
  323. color: #333;
  324. }
  325. .part-1 {
  326. margin-bottom: 20rpx;
  327. .custom-item-tit {
  328. height: 13.333vw;
  329. font-size: 4.267vw;
  330. color: #333;
  331. padding: 2.667vw 0;
  332. position: relative;
  333. display: flex;
  334. -webkit-box-pack: justify;
  335. -ms-flex-pack: justify;
  336. justify-content: space-between;
  337. -webkit-box-align: center;
  338. -ms-flex-align: center;
  339. align-items: center;
  340. box-sizing: border-box;
  341. .tit {
  342. padding-left: 2.667vw;
  343. position: relative;
  344. font-size: 4.267vw;
  345. &::after {
  346. content: "";
  347. width: 0.8vw;
  348. height: 90%;
  349. background-color: #976dec;
  350. border-radius: 0.4vw;
  351. position: absolute;
  352. left: 0;
  353. top: 50%;
  354. -webkit-transform: translateY(-50%);
  355. transform: translateY(-50%);
  356. }
  357. }
  358. }
  359. }
  360. .part-2 {
  361. margin-bottom: 20rpx;
  362. .custom-item-tit {
  363. height: 13.333vw;
  364. font-size: 4.267vw;
  365. color: #333;
  366. padding: 2.667vw 0;
  367. position: relative;
  368. display: flex;
  369. -webkit-box-pack: justify;
  370. -ms-flex-pack: justify;
  371. justify-content: space-between;
  372. -webkit-box-align: center;
  373. -ms-flex-align: center;
  374. align-items: center;
  375. box-sizing: border-box;
  376. .tit {
  377. padding-left: 2.667vw;
  378. position: relative;
  379. font-size: 4.267vw;
  380. &::after {
  381. content: "";
  382. width: 0.8vw;
  383. height: 90%;
  384. background-color: #976dec;
  385. border-radius: 0.4vw;
  386. position: absolute;
  387. left: 0;
  388. top: 50%;
  389. -webkit-transform: translateY(-50%);
  390. transform: translateY(-50%);
  391. }
  392. }
  393. }
  394. }
  395. .filter-box {
  396. padding: 0 30rpx 30rpx;
  397. margin-bottom: 20rpx;
  398. .tit {
  399. font-size: 34rpx;
  400. padding-bottom: 30rpx;
  401. }
  402. }
  403. .filter-input-box {
  404. display: flex;
  405. align-items: center;
  406. justify-content: space-between;
  407. .custom-input-box {
  408. width: 250rpx;
  409. }
  410. .confirm-btn {
  411. width: 100rpx;
  412. height: 80rpx;
  413. border-radius: 10rpx;
  414. color: #fff;
  415. background-color: #6600ff;
  416. i {
  417. font-size: 35rpx;
  418. }
  419. }
  420. }
  421. .part-2 {
  422. padding: 30rpx;
  423. }
  424. .part-3 {
  425. .custom-item-tit {
  426. height: 13.333vw;
  427. font-size: 4.267vw;
  428. color: #333;
  429. padding: 2.667vw 0;
  430. position: relative;
  431. display: flex;
  432. -webkit-box-pack: justify;
  433. -ms-flex-pack: justify;
  434. justify-content: space-between;
  435. -webkit-box-align: center;
  436. -ms-flex-align: center;
  437. align-items: center;
  438. box-sizing: border-box;
  439. .tit {
  440. padding-left: 2.667vw;
  441. position: relative;
  442. font-size: 4.267vw;
  443. &::after {
  444. content: "";
  445. width: 0.8vw;
  446. height: 90%;
  447. background-color: #976dec;
  448. border-radius: 0.4vw;
  449. position: absolute;
  450. left: 0;
  451. top: 50%;
  452. -webkit-transform: translateY(-50%);
  453. transform: translateY(-50%);
  454. }
  455. }
  456. }
  457. .input-item-warp {
  458. padding: 0 0 30rpx;
  459. }
  460. }
  461. }
  462. </style>