manuallyclosecheckorder.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <!--
  2. * @Title:
  3. * @Description: 人工关闭工单
  4. * @Author: swp
  5. * @Date: 2022-08-24 10:49:21
  6. * @LastEditors:
  7. * @LastEditTime: 2022-08-24 10:49:21
  8. -->
  9. <template>
  10. <view class="wrap">
  11. <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" statusBar="false" left-icon="left" left-text="返回"
  12. @clickLeft="toBack">
  13. <view style="width: 100%;display: flex;flex-direction: row;justify-content: center;align-items: center;">
  14. <text style="color: white;font-size: 1rem;">{{title}}</text>
  15. </view>
  16. </uni-nav-bar>
  17. <view class="container">
  18. <uni-section title="关闭任务说明" type="circle">
  19. <view style="margin-top: 20px;margin-bottom: 40px;;padding-left: 10px;padding-right: 10px;">
  20. <uni-easyinput :styles="inputStyles" prefixIcon="search" v-model="orderDesc" placeholder="请输入处理意见">
  21. </uni-easyinput>
  22. </view>
  23. </uni-section>
  24. <view style="margin-top: 10px;margin-bottom: 10px;padding-left: 10px;padding-right: 10px;">
  25. <button style="background-color: lightcoral;" type="default"
  26. @click="onCheckOrderSubmitClick()">提交任务</button>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import http from '@/http/api.js';
  33. export default {
  34. components: {
  35. },
  36. onLoad(option) {
  37. this.id = option.id;
  38. },
  39. data() {
  40. return {
  41. id: '',
  42. orderDesc: '',
  43. title: '人工关闭维修任务',
  44. inputStyles: {
  45. color: '#808080',
  46. borderColor: '#d3d3d3'
  47. },
  48. checkOrderForm: {
  49. id: '',
  50. rtuName: '',
  51. rtuCode: '',
  52. orderDesc: '',
  53. },
  54. query: {}
  55. }
  56. },
  57. computed: {
  58. },
  59. onShow() {
  60. },
  61. created() {
  62. },
  63. methods: {
  64. toBack() {
  65. uni.navigateBack({
  66. delta: 1
  67. })
  68. },
  69. onCheckOrderSubmitClick() {
  70. let that = this;
  71. this.checkOrderForm['id'] = this.id;
  72. this.checkOrderForm['orderDesc'] = this.orderDesc;
  73. let postData = Object.assign(this.checkOrderForm, this.query);
  74. http.request({
  75. url: '/galaxy-business/rtu/check/order/close',
  76. method: 'POST',
  77. params: postData
  78. }).then(res => {
  79. if (res.success) {
  80. uni.showModal({
  81. content: '人工关闭维修任务操作成功!',
  82. showCancel: true,
  83. success(res) {
  84. if (res.confirm) {
  85. that.toBack();
  86. }
  87. }
  88. });
  89. } else {
  90. uni.showModal({
  91. content: '人工关闭维修任务操作失败!',
  92. showCancel: true,
  93. success(res) {
  94. }
  95. });
  96. }
  97. }).catch(err => {
  98. console.log(err)
  99. })
  100. },
  101. }
  102. }
  103. </script>
  104. <style>
  105. /* page {
  106. background-color: rgb(240, 242, 244);
  107. } */
  108. </style>
  109. <style lang="scss" scoped>
  110. .container {
  111. padding: 0 0 150rpx;
  112. }
  113. </style>