index.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <view>
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="受理保养工单" @clickLeft="back"></uni-nav-bar>
  4. <view class="page-bottom-padding">
  5. <template v-if="worksheetInfo">
  6. <CellTip title="基本信息"> </CellTip>
  7. <DetailMain :detailsInfo="tourTallyDetailFn(worksheetInfo)"></DetailMain>
  8. </template>
  9. </view>
  10. <button class="btn-submit" @click="bindSubmit" :loading="loading">
  11. 受理
  12. </button>
  13. <!-- <view class="btn-submit" @click="bindSubmit">
  14. 受 理
  15. </view> -->
  16. </view>
  17. </template>
  18. <script>
  19. import {
  20. get,
  21. postJ
  22. } from "@/utils/api.js"
  23. import {
  24. tourTallyDetailFn
  25. } from '@/utils/common.js'
  26. import DetailMain from '@/components/DetailMain.vue'
  27. import TurnSendList from '@/components/TurnSendList.vue'
  28. import CellTip from '@/components/CellTip.vue'
  29. import CellInfo from '@/components/CellInfo.vue'
  30. export default {
  31. components: {
  32. DetailMain,
  33. TurnSendList,
  34. CellTip,
  35. CellInfo
  36. },
  37. data() {
  38. return {
  39. pageId: '',
  40. loading: false,
  41. worksheetInfo: null,
  42. tourTallyDetailFn,
  43. executorInfo: null,
  44. redeployCause: ''
  45. }
  46. },
  47. onLoad(options) {
  48. this.pageId = options.id;
  49. this.getInfo();
  50. },
  51. methods: {
  52. getInfo() {
  53. get(this.apiUrl + "/maintain/order/getDetail/" + this.pageId).then(res => {
  54. this.worksheetInfo = res.data;
  55. })
  56. },
  57. bindSubmit() {
  58. this.loading = true
  59. get(this.apiUrl + "/maintain/order/receiveOrder/" + this.pageId).then(res => {
  60. uni.showToast({
  61. title: "受理成功",
  62. icon: "none"
  63. })
  64. setTimeout(() => {
  65. this.loading = false
  66. uni.redirectTo({
  67. url: "../order/order"
  68. })
  69. }, 2000)
  70. })
  71. },
  72. }
  73. }
  74. </script>
  75. <style lang="scss" scoped>
  76. input {
  77. text-align: right;
  78. color: $uni-text-color-grey;
  79. font-size: $uni-font-size-base;
  80. }
  81. </style>