audit.vue 12 KB

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