proportionCheck.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <template>
  2. <view class="content">
  3. <form>
  4. <view class="body user-insert">账号:{{proportionCheck.userName}}</view>
  5. <view class="body user-insert">旧分销:</view>
  6. <view class="body user-insert-line">平台:{{oldProportionCheck.adminProportion}}%</view>
  7. <view class="body user-insert-line">省级:{{oldProportionCheck.agencyProportion}}%</view>
  8. <view class="body user-insert-line">市级:{{oldProportionCheck.merchantProportion}}%</view>
  9. <view class="body user-insert-line">终端:{{oldProportionCheck.personageProportion}}%</view>
  10. </form>
  11. <form>
  12. <view class="body user-insert" style="padding-top: 40upx;">
  13. 新分销:
  14. </view>
  15. <view class="body user-insert-line">平台:{{proportionCheck.adminProportion}}%</view>
  16. <view class="body user-insert-line">省级:{{proportionCheck.agencyProportion}}%</view>
  17. <view class="body user-insert-line">市级:{{proportionCheck.merchantProportion}}%</view>
  18. <view class="body user-insert-line">终端:{{proportionCheck.personageProportion}}%</view>
  19. <!-- <view class="body">
  20. 省级:<input class="input" name="oldPassword" />
  21. </view> -->
  22. <view class="btn-area">
  23. <button type="primary" @click="agree(proportionCheck.id)" style="margin-right: 20px;">通过</button>
  24. <button type="primary" @click="unagree(proportionCheck.id)">撤销</button>
  25. </view>
  26. </form>
  27. </view>
  28. </template>
  29. <script>
  30. export default {
  31. data() {
  32. return {
  33. oldProportionCheck: {},
  34. proportionCheck: {}
  35. }
  36. },
  37. onLoad: function(option) {
  38. const proportionCheck = JSON.parse(decodeURIComponent(option.proportionCheck));
  39. this.proportionCheck = proportionCheck;
  40. this.getOldProportion(proportionCheck.adminId);
  41. },
  42. onShow() {},
  43. methods: {
  44. getOldProportion(adminId) {
  45. var token = uni.getStorageSync("token");
  46. // var globalUser = uni.getStorageSync("globalUser");
  47. uni.request({
  48. url: this.serverurl + '/TProportion/getList?adminId=' + adminId,
  49. header: {
  50. 'token': token
  51. },
  52. method: "GET",
  53. success: (res) => {
  54. if (res.data.code) {
  55. this.oldProportionCheck = res.data.data;
  56. }
  57. },
  58. });
  59. },
  60. agree(id) {
  61. var that = this;
  62. uni.showModal({
  63. title: '提示',
  64. content: '是否通过?',
  65. success: function(res) {
  66. if (res.confirm) {
  67. var token = uni.getStorageSync("token");
  68. uni.request({
  69. url: that.serverurl + '/TProportionCheck/agree?id=' + id,
  70. header: {
  71. 'token': token
  72. },
  73. method: "GET",
  74. success: (res) => {
  75. uni.showToast({
  76. title: res.data.message,
  77. duration: 2000
  78. });
  79. },
  80. });
  81. } else if (res.cancel) {}
  82. }
  83. });
  84. },
  85. unagree(id) {
  86. var that = this;
  87. uni.showModal({
  88. title: '提示',
  89. content: '是否不通过?',
  90. success: function(res) {
  91. if (res.confirm) {
  92. var token = uni.getStorageSync("token");
  93. uni.request({
  94. url: that.serverurl + '/TProportionCheck/unagree?id=' + id,
  95. header: {
  96. 'token': token
  97. },
  98. method: "GET",
  99. success: (res) => {
  100. uni.showToast({
  101. title: res.data.message,
  102. duration: 2000
  103. });
  104. },
  105. });
  106. } else if (res.cancel) {}
  107. }
  108. });
  109. }
  110. }
  111. }
  112. </script>
  113. <style>
  114. .content {
  115. padding-top: 20upx;
  116. margin-left: 20upx;
  117. }
  118. .body {
  119. background-color: #FFFFFF;
  120. padding: 10upx 20upx 10upx 20upx;
  121. display: flex;
  122. flex-direction: row;
  123. justify-content: flex-start;
  124. }
  125. .input {
  126. /* padding: 10upx 20upx 10upx 0upx; */
  127. padding-left: 20upx;
  128. padding-top: 10upx;
  129. background-color: #FFFFFF;
  130. width: 500upx;
  131. height: 50upx;
  132. box-shadow: 0upx 0upx 20upx #D3D3D3;
  133. border-radius: 5upx;
  134. }
  135. .button {
  136. margin: 0 auto;
  137. display: inline-block;
  138. }
  139. button[type=primary] {
  140. background-color: #007aff;
  141. display: inline-block;
  142. }
  143. .btn-area {
  144. padding-top: 100upx;
  145. margin: 0 auto;
  146. width: 50%;
  147. }
  148. .user-insert-line {
  149. width: 400upx;
  150. height: 23px;
  151. border-bottom: solid black 1px;
  152. margin: 0 auto;
  153. }
  154. .user-insert {
  155. width: 400upx;
  156. margin: 0 auto;
  157. }
  158. view {
  159. font-size: 30rpx;
  160. }
  161. </style>