audit-reject.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <u-popup
  3. :show="show"
  4. mode="center"
  5. @close="close"
  6. @open="open"
  7. :round="10"
  8. :closeOnClickOverlay="false"
  9. :safeAreaInsetBottom="false"
  10. width="580rpx"
  11. >
  12. <view class="location-edit-popup">
  13. <view class="popup-header">
  14. <text class="popup-title">驳回复核任务</text>
  15. <u-icon name="close" size="20" @click="close"></u-icon>
  16. </view>
  17. <u-form
  18. :model="formData"
  19. labelPosition="top"
  20. labelWidth="100%"
  21. :borderBottom="false"
  22. ref="uForm"
  23. :rules="rules"
  24. >
  25. <u-form-item
  26. label="请输入驳回原因"
  27. required
  28. prop="reason"
  29. :borderBottom="false"
  30. >
  31. <u--textarea
  32. v-model="formData.reason"
  33. placeholder="请输入"
  34. :maxlength="100"
  35. count
  36. ></u--textarea>
  37. </u-form-item>
  38. </u-form>
  39. <view class="btn-group">
  40. <u-button
  41. class="btn cancel-btn"
  42. :plain="true"
  43. shape="square"
  44. @click="onCancel"
  45. >取消</u-button
  46. >
  47. <u-button
  48. class="btn confirm-btn"
  49. type="primary"
  50. shape="square"
  51. @click="onConfirm"
  52. >确认</u-button
  53. >
  54. </view>
  55. </view>
  56. </u-popup>
  57. </template>
  58. <script>
  59. export default {
  60. name: "RejectPopup",
  61. props: {
  62. show: {
  63. type: Boolean,
  64. default: false,
  65. },
  66. },
  67. data() {
  68. return {
  69. formData: {
  70. reason: "",
  71. },
  72. rules: {
  73. reason: {
  74. type: "string",
  75. required: true,
  76. message: "请输入驳回原因",
  77. trigger: ["blur", "change"],
  78. },
  79. },
  80. };
  81. },
  82. watch: {},
  83. methods: {
  84. close() {
  85. this.$emit("update:show", false);
  86. },
  87. open() {
  88. this.formData = {
  89. reason: "",
  90. };
  91. },
  92. onCancel() {
  93. this.close();
  94. this.$emit("cancel");
  95. },
  96. onConfirm() {
  97. this.$refs.uForm
  98. .validate()
  99. .then((res) => {
  100. this.$emit("ok", this.formData.reason);
  101. })
  102. .catch((errors) => {});
  103. },
  104. },
  105. };
  106. </script>
  107. <style lang="scss" scoped>
  108. .location-edit-popup {
  109. padding: 30rpx;
  110. width: 580rpx;
  111. .popup-header {
  112. display: flex;
  113. justify-content: space-between;
  114. align-items: center;
  115. margin-bottom: 30rpx;
  116. .popup-title {
  117. font-size: 36rpx;
  118. font-weight: 500;
  119. color: #333333;
  120. }
  121. }
  122. .mt-20 {
  123. margin-top: 20rpx;
  124. }
  125. .btn-group {
  126. display: flex;
  127. justify-content: space-between;
  128. margin-top: 40rpx;
  129. .btn {
  130. flex: 1;
  131. height: 88rpx;
  132. display: flex;
  133. align-items: center;
  134. justify-content: center;
  135. font-size: 32rpx;
  136. &.cancel-btn {
  137. margin-right: 20rpx;
  138. color: #666666;
  139. border-color: #dddddd;
  140. }
  141. &.confirm-btn {
  142. background-color: #2979ff;
  143. }
  144. }
  145. }
  146. }
  147. </style>