deal.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <view class="page">
  3. <view class="form">
  4. <u-form :model="form" ref="uForm">
  5. <u-form-item label-width="150" label="审核客户" prop="curName">
  6. <u-input placeholder="请输入" v-model="curName" disabled="true" type="text"></u-input>
  7. </u-form-item>
  8. <u-form-item label-width="150" label="处理" prop="subscr_state" required>
  9. <u-radio-group v-model="form.subscr_state" active-color="#2979ff">
  10. <u-radio name="1">通过</u-radio>
  11. <u-radio name="2">拒绝</u-radio>
  12. </u-radio-group>
  13. </u-form-item>
  14. <u-form-item label-width="150" label="备注信息" prop="remark" label-position="top">
  15. <u-input placeholder="审核不通过时备注必填" v-model="form.remark" type="textarea"></u-input>
  16. </u-form-item>
  17. </u-form>
  18. <u-gap height="60"></u-gap>
  19. <u-button type="primary" @click="submitHandle">确定</u-button>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. import { arrToObj } from '@/utils'
  25. var that;
  26. export default {
  27. data() {
  28. return {
  29. curName: '',
  30. curId: '',
  31. form: {
  32. subscr_state: '1'
  33. },
  34. };
  35. },
  36. onLoad(params) {
  37. this.curId = params.id
  38. this.curName = `${params.name}`
  39. },
  40. // 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
  41. onReady() {
  42. this.$refs.uForm.setRules(this.rules);
  43. },
  44. methods: {
  45. submitHandle() {
  46. const that = this
  47. this.$refs.uForm.validate(valid => {
  48. if (valid) {
  49. let params = {
  50. ...that.form,
  51. id: that.curId,
  52. }
  53. let str = 'apireportsubscrDeal'
  54. uni.api.estate[str](params).then(res => {
  55. uni.$msgConfirm('编辑成功', () => {
  56. uni.reLaunch({
  57. url: '/pages/agent/report/buycheck'
  58. })
  59. }, () => {
  60. uni.reLaunch({
  61. url: '/pages/agent/report/buycheck'
  62. })
  63. })
  64. })
  65. }
  66. });
  67. },
  68. // 以下是工具函数
  69. // 格式化日期的月份或天数的显示(小于10,在前面增加0)
  70. getFormatDate(value) {
  71. if (value == undefined || value == '') {
  72. return '';
  73. }
  74. var str = value;
  75. if (parseInt(value) < 10) {
  76. str = '0' + value;
  77. }
  78. return str;
  79. }
  80. }
  81. };
  82. </script>
  83. <style lang="scss">
  84. .page {
  85. background-color: #ffffff;
  86. }
  87. .form {
  88. border-radius: 10rpx;
  89. padding: 0 40rpx;
  90. }
  91. .popup-body {
  92. .tips-title {
  93. font-size: $u-p;
  94. margin-bottom: 20rpx;
  95. }
  96. .tips-content {
  97. font-size: $u-p2;
  98. color: $u-tips-color;
  99. margin-bottom: 60rpx;
  100. }
  101. }
  102. .id_card {
  103. color: #606266;
  104. width: 100%;
  105. height: 350rpx;
  106. display: flex;
  107. flex-direction: column;
  108. align-items: center;
  109. justify-content: center;
  110. background-color: #f4f5f6;
  111. font-size: $u-p2;
  112. border-radius: 10rpx;
  113. image {
  114. border-radius: 10rpx;
  115. }
  116. }
  117. .footer {
  118. position: relative;
  119. text-align: center;
  120. font-size: $u-p2;
  121. left: 0;
  122. bottom: 20rpx;
  123. .agreement {
  124. color: $u-theme-color;
  125. }
  126. }
  127. .slot-content {
  128. font-size: 28rpx;
  129. color: $u-content-color;
  130. padding: 20rpx;
  131. }
  132. .warp {
  133. display: flex;
  134. flex-direction: column;
  135. align-items: center;
  136. justify-content: center;
  137. height: 100%;
  138. }
  139. .rect {
  140. width: 400rpx;
  141. height: 400rpx;
  142. background-color: #fff;
  143. }
  144. </style>