repair-return.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <template>
  2. <view class="mx3" style="padding-bottom: 100rpx">
  3. <view class="main-color-bg" style="height: 100rpx; margin: 0 -30rpx"></view>
  4. <view
  5. class="p3 bg-color-white"
  6. style="margin-top: -50rpx; border-radius: 20rpx"
  7. >
  8. <u-form :model="form" ref="uForm" :label-width="150">
  9. <u-form-item label="驳回原因" prop="checkContent" required>
  10. <u-input v-model="form.checkContent" type="textarea" :height="50" />
  11. </u-form-item>
  12. </u-form>
  13. <view class="p-fixed d-flex j-around a-center footer">
  14. <view
  15. class="main-color-bg text-color-white common"
  16. @tap="handleSubmit"
  17. >提交</view
  18. >
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. data() {
  26. return {
  27. form: {
  28. checkContent: ''
  29. },
  30. rules: {
  31. descripition: [
  32. {
  33. required: true,
  34. message: '请输入驳回原因',
  35. trigger: ['blur', 'change']
  36. }
  37. ]
  38. }
  39. };
  40. },
  41. onLoad(options) {
  42. this.form.id = options.id;
  43. },
  44. onReady() {
  45. this.$refs.uForm.setRules(this.rules);
  46. },
  47. methods: {
  48. handleSubmit() {
  49. this.$refs.uForm.validate((valid) => {
  50. if (valid) {
  51. this.$Http.returnRepair(this.form).then((res) => {
  52. uni.navigateBack({
  53. delta: 1
  54. });
  55. });
  56. }
  57. });
  58. }
  59. }
  60. };
  61. </script>
  62. <style lang="less">
  63. .footer {
  64. bottom: 0;
  65. left: 0;
  66. right: 0;
  67. background-color: #fff;
  68. z-index: 10000;
  69. border-top: 1rpx solid #f4f4f4;
  70. height: 100rpx;
  71. .common {
  72. padding: 15rpx 200rpx;
  73. border-radius: 30rpx;
  74. background-color: #0082ff;
  75. color: #fff;
  76. }
  77. }
  78. </style>