acquisition_information_approval.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  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. uni.showLoading({
  97. title: "审核中"
  98. })
  99. that.$api.doRequest('post', '/acquisitionInfo/api/examine', {
  100. flag: 2,
  101. id: that.toexamineId
  102. }).then(res => {
  103. if (res.data.code == 200) {
  104. that.$api.msg('驳回成功')
  105. setTimeout(function() {
  106. uni.hideLoading()
  107. uni.navigateBack()
  108. }, 1000);
  109. }
  110. })
  111. }
  112. }
  113. })
  114. },
  115. passSubmit(item) {
  116. var that = this
  117. uni.showModal({
  118. content: "确定通过该条收购信息审核?",
  119. showCancel: true,
  120. confirmText: '确定',
  121. success: function(res) {
  122. if (res.confirm) {
  123. uni.showLoading({
  124. title: "审核中"
  125. })
  126. that.$api.doRequest('post', '/acquisitionInfo/api/examine', {
  127. flag: 1,
  128. id: that.toexamineId
  129. }).then(res => {
  130. if (res.data.code == 200) {
  131. that.$api.msg('通过成功')
  132. setTimeout(function() {
  133. uni.hideLoading()
  134. uni.navigateBack()
  135. }, 1000);
  136. }
  137. })
  138. }
  139. }
  140. })
  141. },
  142. }
  143. }
  144. </script>
  145. <style lang='scss' scoped>
  146. .wrap {
  147. background: #fff;
  148. margin: 10px;
  149. border-radius: 10px;
  150. padding: 40rpx 30rpx;
  151. }
  152. .content-item {
  153. margin-top: 50rpx;
  154. font-size: 28rpx;
  155. }
  156. .row {
  157. display: flex;
  158. justify-content: space-between;
  159. position: relative;
  160. /* border-bottom: 1px solid #EEEEEE; */
  161. .right,
  162. input {
  163. font-size: 28rpx;
  164. // color: #333333;
  165. }
  166. .left {
  167. font-size: 34rpx;
  168. color: #333333;
  169. font-weight: 600;
  170. }
  171. }
  172. .textarea {
  173. background: #F9F9FA;
  174. font-size: 26rpx;
  175. text-align: left;
  176. width: 100%;
  177. height: 60px;
  178. padding: 32rpx;
  179. border-radius: 10rpx;
  180. margin-top: 40rpx;
  181. height: 50vh;
  182. padding-bottom: 20rpx;
  183. color: #AFB3BF;
  184. }
  185. .textarea-bottom {
  186. position: absolute;
  187. bottom: 20rpx;
  188. right: 20rpx;
  189. color: #606266;
  190. }
  191. .bottom-btn {
  192. width: 100%;
  193. position: fixed;
  194. bottom: 0;
  195. display: flex;
  196. z-index: 2;
  197. left: 0;
  198. background-color: #f8f8f8;
  199. flex-direction: column;
  200. .btn1,
  201. .btn2 {
  202. width: 100%;
  203. margin-bottom: 26rpx;
  204. border-radius: 90rpx;
  205. }
  206. .btn1 {
  207. background: white;
  208. color: #00C265;
  209. }
  210. }
  211. /* .shade {
  212. position: fixed;
  213. top: 0;
  214. left: 0;
  215. height: 100%;
  216. width: 100%;
  217. background: rgba(0, 0, 0, 0.4);
  218. z-index: 3;
  219. .wrap {
  220. position: absolute;
  221. left: 0;
  222. top: 0;
  223. right: 0;
  224. bottom: 0;
  225. margin: auto;
  226. background: #fff;
  227. width: calc(100% - 198rpx);
  228. height: 700rpx;
  229. border-radius: 20rpx;
  230. padding: 20rpx;
  231. .alert-top {
  232. padding: 33rpx;
  233. display: flex;
  234. justify-content: center;
  235. align-items: center;
  236. position: relative;
  237. }
  238. .title {
  239. font-size: 32rpx;
  240. font-weight: 600;
  241. color: #333333;
  242. }
  243. .close {
  244. position: absolute;
  245. right: 33rpx;
  246. }
  247. }
  248. } */
  249. .cancel,
  250. .confirm {
  251. position: absolute;
  252. display: inline-block;
  253. width: 50%;
  254. text-align: center;
  255. bottom: 0;
  256. padding: 10px;
  257. border-top: 1px solid #eee;
  258. font-size: 34rpx;
  259. }
  260. .cancel {
  261. left: 0;
  262. border-right: 1px solid #eee;
  263. color: #AFB3BF;
  264. }
  265. .confirm {
  266. right: 0;
  267. color: #22C572;
  268. }
  269. .u-textarea-style {
  270. margin: 20rpx;
  271. background: #F9F9FA;
  272. border-radius: 10px;
  273. border: 1px solid #EEEEEE;
  274. padding: 10rpx 20rpx;
  275. position: relative;
  276. .right-bottom {
  277. position: absolute;
  278. right: 20rpx;
  279. bottom: 20rpx;
  280. color: #AFB3BF;
  281. }
  282. }
  283. </style>