acquisition_information_approval.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. <template>
  2. <view class="wrap">
  3. <view class='content1'>
  4. <view class='row'>
  5. <view class="left">{{dataList.warehouseName}}</view>
  6. </view>
  7. <view class='row '>
  8. <textarea placeholder="请输入仓库信息" class="textarea" maxlength="2000"
  9. v-model="dataList.acquisitionInformation" disabled></textarea>
  10. <view class="textarea-bottom">
  11. {{dataList.acquisitionInformation?dataList.acquisitionInformation.length:'0'}}/2000字</view>
  12. </view>
  13. <view class='row content-item'>
  14. <!-- <u-checkbox activeColor="#19be6b" v-model="value" @change="checkBoxChange">显示在易粮易运收购信息中</u-checkbox> -->
  15. 显示在易粮易运收购信息中
  16. <view class="right">
  17. <u-switch v-model="checked" active-color="#22C572" inactive-color="#eee" size='40' disabled="disabled"></u-switch>
  18. </view>
  19. </view>
  20. </view>
  21. <u-toast ref="uToast" />
  22. <view style='padding:10px;' class='flex bottom-btn'>
  23. <u-button v-if='isSHowBtn' @click='reject' type="error" class="btn1" hover-class='none'>驳回</u-button>
  24. <u-button v-if='isSHowBtn' @click='passSubmit' type="success" class="btn2">通过</u-button>
  25. </view>
  26. <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
  27. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
  28. showCancelButton='false' :content="content" @confirm="alertBtn" @cancel="cancelClick"></u-modal>
  29. </view>
  30. </template>
  31. <script>
  32. import {
  33. mapState
  34. } from 'vuex';
  35. export default {
  36. components: {},
  37. data() {
  38. return {
  39. isSHowBtn: true,
  40. isShowAlert: false,
  41. content: '当前登入信息验证失败,是否重新登录?',
  42. // textareaValue: '',
  43. // value: '',
  44. // show: false,
  45. // title: "",
  46. // auditMind: "", //审核意见
  47. checked: false,
  48. toexamineId: "",
  49. isShow: false,
  50. dataList: {},
  51. everyCheck: "",
  52. }
  53. },
  54. onBackPress(e) {
  55. if (this.everyCheck) {
  56. uni.navigateTo({
  57. url: "/pages/task/my_task"
  58. })
  59. return true;
  60. }
  61. },
  62. onLoad(options) {
  63. this.toexamineId = options.id
  64. this.isShow = options.isShowbtn
  65. this.everyCheck = uni.getStorageSync("everyTask")
  66. },
  67. computed: {
  68. ...mapState(['hasLogin', 'userInfo']),
  69. },
  70. onShow() {
  71. this.getList()
  72. },
  73. methods: {
  74. getList() {
  75. this.$api.doRequest('get', '/acquisitionInfo/getAcquisition', {
  76. id: this.toexamineId
  77. }).then(res => {
  78. if (res.data.code == 200) {
  79. this.dataList = res.data.data
  80. if (this.dataList.checkFlag == 1) {
  81. this.checked = true
  82. } else {
  83. this.checked = false
  84. }
  85. }
  86. })
  87. },
  88. reject() {
  89. var that = this
  90. uni.showModal({
  91. content: "确定驳回该条收购信息审核?",
  92. showCancel: true,
  93. confirmText: '确定',
  94. success: function(res) {
  95. if (res.confirm) {
  96. that.$api.doRequest('post', '/acquisitionInfo/api/examine', {
  97. flag: 2,
  98. id: that.toexamineId
  99. }).then(res => {
  100. if (res.data.code == 200) {
  101. that.$api.msg('驳回成功')
  102. setTimeout(function() {
  103. uni.hideLoading()
  104. uni.navigateBack()
  105. }, 1000);
  106. }
  107. })
  108. }
  109. }
  110. })
  111. },
  112. passSubmit(item) {
  113. var that = this
  114. uni.showModal({
  115. content: "确定通过该条收购信息审核?",
  116. showCancel: true,
  117. confirmText: '确定',
  118. success: function(res) {
  119. if (res.confirm) {
  120. that.$api.doRequest('post', '/acquisitionInfo/api/examine', {
  121. flag: 1,
  122. id: that.toexamineId
  123. }).then(res => {
  124. if (res.data.code == 200) {
  125. that.$api.msg('通过成功')
  126. setTimeout(function() {
  127. uni.hideLoading()
  128. uni.navigateBack()
  129. }, 1000);
  130. }
  131. })
  132. }
  133. }
  134. })
  135. },
  136. }
  137. }
  138. </script>
  139. <style lang='scss' scoped>
  140. .wrap {
  141. background: #fff;
  142. margin: 10px;
  143. border-radius: 10px;
  144. padding: 40rpx 30rpx;
  145. }
  146. .content-item {
  147. margin-top: 50rpx;
  148. font-size: 28rpx;
  149. }
  150. .row {
  151. display: flex;
  152. justify-content: space-between;
  153. position: relative;
  154. /* border-bottom: 1px solid #EEEEEE; */
  155. .right,
  156. input {
  157. font-size: 28rpx;
  158. // color: #333333;
  159. }
  160. .left {
  161. font-size: 34rpx;
  162. color: #333333;
  163. font-weight: 600;
  164. }
  165. }
  166. .textarea {
  167. background: #F9F9FA;
  168. font-size: 26rpx;
  169. text-align: left;
  170. width: 100%;
  171. height: 60px;
  172. padding: 32rpx;
  173. border-radius: 10rpx;
  174. margin-top: 40rpx;
  175. height: 50vh;
  176. padding-bottom: 20rpx;
  177. color: #AFB3BF;
  178. }
  179. .textarea-bottom {
  180. position: absolute;
  181. bottom: 20rpx;
  182. right: 20rpx;
  183. color: #606266;
  184. }
  185. .bottom-btn {
  186. width: 100%;
  187. position: fixed;
  188. bottom: 0;
  189. display: flex;
  190. z-index: 2;
  191. left: 0;
  192. background-color: #f8f8f8;
  193. flex-direction: column;
  194. .btn1,
  195. .btn2 {
  196. width: 100%;
  197. margin-bottom: 26rpx;
  198. border-radius: 90rpx;
  199. }
  200. .btn1 {
  201. background: white;
  202. color: #00C265;
  203. }
  204. }
  205. /* .shade {
  206. position: fixed;
  207. top: 0;
  208. left: 0;
  209. height: 100%;
  210. width: 100%;
  211. background: rgba(0, 0, 0, 0.4);
  212. z-index: 3;
  213. .wrap {
  214. position: absolute;
  215. left: 0;
  216. top: 0;
  217. right: 0;
  218. bottom: 0;
  219. margin: auto;
  220. background: #fff;
  221. width: calc(100% - 198rpx);
  222. height: 700rpx;
  223. border-radius: 20rpx;
  224. padding: 20rpx;
  225. .alert-top {
  226. padding: 33rpx;
  227. display: flex;
  228. justify-content: center;
  229. align-items: center;
  230. position: relative;
  231. }
  232. .title {
  233. font-size: 32rpx;
  234. font-weight: 600;
  235. color: #333333;
  236. }
  237. .close {
  238. position: absolute;
  239. right: 33rpx;
  240. }
  241. }
  242. } */
  243. .cancel,
  244. .confirm {
  245. position: absolute;
  246. display: inline-block;
  247. width: 50%;
  248. text-align: center;
  249. bottom: 0;
  250. padding: 10px;
  251. border-top: 1px solid #eee;
  252. font-size: 34rpx;
  253. }
  254. .cancel {
  255. left: 0;
  256. border-right: 1px solid #eee;
  257. color: #AFB3BF;
  258. }
  259. .confirm {
  260. right: 0;
  261. color: #22C572;
  262. }
  263. .u-textarea-style {
  264. margin: 20rpx;
  265. background: #F9F9FA;
  266. border-radius: 10px;
  267. border: 1px solid #EEEEEE;
  268. padding: 10rpx 20rpx;
  269. position: relative;
  270. .right-bottom {
  271. position: absolute;
  272. right: 20rpx;
  273. bottom: 20rpx;
  274. color: #AFB3BF;
  275. }
  276. }
  277. </style>