acquisition_information_approval.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <view class="wrap">
  3. <view class='content1'>
  4. <view class='row content-item'>
  5. <view class="left" style="color: #878C9C ;">仓库</view>
  6. <view class="right">鲅鱼圈库</view>
  7. </view>
  8. <view class='row content-item'>
  9. <textarea placeholder="请输入仓库信息" class="textarea" maxlength="2000" v-model="textareaValue"></textarea>
  10. <view class="textarea-bottom">{{textareaValue?textareaValue.length:'0'}}/2000字</view>
  11. </view>
  12. <view class='row content-item'>
  13. <u-checkbox activeColor="#19be6b" v-model="value" @change="checkBoxChange">显示在易粮易运收购信息中</u-checkbox>
  14. </view>
  15. </view>
  16. <u-toast ref="uToast" />
  17. <view style='padding:10px;' class='flex bottom-btn'>
  18. <!-- getRoles("acquisitionQuality.initial") -->
  19. <u-button v-if='isSHowBtn' @click='reject' type="error" class="btn1" hover-class='none'>驳回</u-button>
  20. <u-button v-if='isSHowBtn' @click='pass' type="success" class="btn2">通过</u-button>
  21. </view>
  22. <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
  23. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='登录提示'
  24. showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
  25. </view>
  26. </template>
  27. <script>
  28. import {
  29. mapState
  30. } from 'vuex';
  31. export default {
  32. components: {
  33. },
  34. data() {
  35. return {
  36. isSHowBtn: true,
  37. isShowAlert: false,
  38. content: '当前登入信息验证失败,是否重新登录?',
  39. textareaValue: '',
  40. value: ''
  41. }
  42. },
  43. onLoad() {
  44. },
  45. // #ifndef MP
  46. onNavigationBarButtonTap(e) {
  47. const index = e.index;
  48. if (index === 0) {
  49. this.navTo('/pages/set/set');
  50. } else if (index === 1) {
  51. // #ifdef APP-PLUS
  52. const pages = getCurrentPages();
  53. const page = pages[pages.length - 1];
  54. const currentWebview = page.$getAppWebview();
  55. currentWebview.hideTitleNViewButtonRedDot({
  56. index
  57. });
  58. // #endif
  59. uni.navigateTo({
  60. url: '/pages/notice/notice'
  61. })
  62. }
  63. },
  64. // #endif
  65. computed: {
  66. ...mapState(['hasLogin', 'userInfo']),
  67. },
  68. onShow() {
  69. this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
  70. console.log("checkSession", res)
  71. if (res.data.data == "INVALID") {
  72. this.isShowAlert = true;
  73. // uni.showModal({
  74. // title: '登录提示',
  75. // content: '当前登入信息验证失败,是否重新登录?',
  76. // showCancel: true,
  77. // confirmText: '登录',
  78. // success: (e) => {
  79. // if (e.confirm) {
  80. // uni.navigateTo({
  81. // url: '/pages/public/login'
  82. // })
  83. // }
  84. // },
  85. // fail: () => {},
  86. // complete: () => {}
  87. // })
  88. }
  89. })
  90. console.log("hasLogin", this.hasLogin)
  91. },
  92. methods: {
  93. /**
  94. * 统一跳转接口,拦截未登录路由
  95. * navigator标签现在默认没有转场动画,所以用view
  96. */
  97. navTo(url) {
  98. if (!this.hasLogin) {
  99. url = '/pages/public/login';
  100. }
  101. uni.navigateTo({
  102. url
  103. })
  104. },
  105. alertBtn() {
  106. uni.navigateTo({
  107. url: '/pages/public/login'
  108. })
  109. },
  110. cancelClick() {
  111. this.isShowAlert = false
  112. },
  113. checkBoxChange(e) {
  114. console.log(e)
  115. }
  116. }
  117. }
  118. </script>
  119. <style lang='scss' scoped>
  120. page {
  121. background: #F5F6FA;
  122. }
  123. .wrap {
  124. background: #fff;
  125. margin: 10px;
  126. border-radius: 10px;
  127. padding: 10px;
  128. }
  129. .row {
  130. display: flex;
  131. justify-content: space-between;
  132. position: relative;
  133. /* border-bottom: 1px solid #EEEEEE; */
  134. .right,
  135. input {
  136. font-size: 28rpx;
  137. // color: #333333;
  138. }
  139. }
  140. .textarea {
  141. background: #F9F9FA;
  142. font-size: 12px;
  143. text-align: left;
  144. width: 100%;
  145. height: 60px;
  146. padding: 10px;
  147. border-radius: 5px;
  148. margin-top: 10px;
  149. height: 50vh;
  150. padding-bottom: 20rpx;
  151. }
  152. .textarea-bottom {
  153. position: absolute;
  154. bottom: 20rpx;
  155. right: 20rpx;
  156. color: #606266;
  157. }
  158. </style>