warehouse_approval.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <template>
  2. <view class="warp">
  3. <view class='content1'>
  4. <view class="title">基本信息</view>
  5. <view class='row'>
  6. <view class="left">仓库</view>
  7. <view class="right">{{list.warehouseName}}</view>
  8. </view>
  9. <view class='row'>
  10. <view class="left">货名</view>
  11. <view class="right">{{list.goodsName}}</view>
  12. </view>
  13. <view class='row'>
  14. <view class="left">基准水分(%)</view>
  15. <view class="right">{{list.waterBase}}</view>
  16. </view>
  17. <view class='row'>
  18. <view class="left">干粮水分(%)</view>
  19. <view class="right">{{list.waterMin}}</view>
  20. </view>
  21. <view class='row'>
  22. <view class="left">水分上限(%)</view>
  23. <view class="right">{{list.waterMax}}</view>
  24. </view>
  25. <view class='row'>
  26. <view class="left">扣重比</view>
  27. <view class="right">{{list.warehouseName}}</view>
  28. </view>
  29. <view class='row'>
  30. <view class="left">干粮收购价格(元/公斤)</view>
  31. <view class="right">{{list.warehouseName}}</view>
  32. </view>
  33. <view class='row'>
  34. <view class="left">销售上限</view>
  35. <view class="right">{{list.warehouseName}}</view>
  36. </view>
  37. </view>
  38. <view class="content2">
  39. <view class="title">粮价设置</view>
  40. <view v-for="(item,index) in 4" :key="index">
  41. <view class="row">
  42. <view class="left">等级</view>
  43. <view class="right">一等、二等</view>
  44. </view>
  45. <view class="row">
  46. <view class="left">基准单价(元/公斤)</view>
  47. <view class="right">2.2</view>
  48. </view>
  49. <view class="row" v-for="(item1,index1) in 10" :key="index1">
  50. <view class="left">15-23降幅(元/0.1%)</view>
  51. <view class="right">0.001</view>
  52. </view>
  53. </view>
  54. </view>
  55. <u-toast ref="uToast" />
  56. <view style='padding:10px;' class='flex'>
  57. <u-button v-if='list.status=="未审核"' @click='reject' type="error">驳回</u-button>
  58. <u-button v-if='list.status=="未审核"' @click='audit' type="success">通过</u-button>
  59. </view>
  60. </view>
  61. </template>
  62. <script>
  63. import {
  64. mapState
  65. } from 'vuex';
  66. export default {
  67. name: "task",
  68. data() {
  69. return {
  70. show: false,
  71. id: 0,
  72. list: {},
  73. form: {
  74. name: '',
  75. intro: '',
  76. sex: ''
  77. },
  78. radio: '',
  79. pcUserInfo: uni.getStorageSync('pcUserInfo'),
  80. switchVal: false,
  81. contractNoList: []
  82. };
  83. },
  84. computed: {
  85. ...mapState(['hasLogin', 'userInfo'])
  86. },
  87. onLoad(options) {
  88. console.log(options)
  89. this.id = options.id
  90. },
  91. onShow() {
  92. var that = this
  93. this.$nextTick(function() {
  94. that.getData()
  95. })
  96. // this.userInfo = uni.getStorageSync("userInfo")
  97. },
  98. methods: {
  99. getData() {
  100. debugger
  101. var data = []
  102. this.$api.doRequest('get', '/purchasePrice/purchasePriceLook', {
  103. id: this.id
  104. }).then(res => {
  105. if (res.data.code == 200) {
  106. this.list = res.data.data
  107. console.log(this.list)
  108. }
  109. })
  110. },
  111. confirm(item) {
  112. this.list.contractNo = item[0].value
  113. },
  114. audit() {
  115. var that = this
  116. uni.showModal({
  117. content: "是否确定通过审核?",
  118. showCancel: true,
  119. confirmText: '提交',
  120. success: function(res) {
  121. if (res.confirm) {
  122. that.$api.doRequest('post', '/workflow/api/handle', {
  123. taskId: that.list.taskId,
  124. approved: true,
  125. auditMind: '34',
  126. needReapply: false,
  127. }).then(res1 => {
  128. if (res1.data.code == 200) {
  129. that.$api.msg('审核成功');
  130. that.$nextTick(function() {
  131. uni.navigateBack()
  132. })
  133. } else {
  134. that.$api.msg('系统异常,请联系管理员');
  135. }
  136. })
  137. }
  138. }
  139. })
  140. },
  141. reject() {
  142. var that = this
  143. uni.showModal({
  144. content: "是否确定驳回?",
  145. showCancel: true,
  146. confirmText: '提交',
  147. success: function(res) {
  148. if (res.confirm) {
  149. that.$api.doRequest('post', '/workflow/api/handle', {
  150. taskId: that.list.taskId,
  151. approved: false,
  152. auditMind: '已驳回',
  153. needReapply: true,
  154. }).then(res1 => {
  155. if (res1.data.code == 200) {
  156. that.$api.msg('驳回成功');
  157. that.$nextTick(function() {
  158. uni.navigateBack()
  159. })
  160. } else {
  161. that.$api.msg(res1.data.message);
  162. }
  163. }).catch()
  164. }
  165. }
  166. })
  167. }
  168. }
  169. }
  170. </script>
  171. <style scoped lang="scss">
  172. .warp {
  173. margin: 10rpx;
  174. padding: 20rpx 20rpx 140rpx 20rpx;
  175. }
  176. .content1,
  177. .content2 {
  178. border-radius: 20rpx;
  179. background: white;
  180. padding: 20rpx;
  181. .title {
  182. font-size: 28rpx;
  183. font-weight: 600;
  184. color: #333333;
  185. text-align: center;
  186. }
  187. .row {
  188. display: flex;
  189. justify-content: space-between;
  190. border-bottom: 1px solid #EEEEEE;
  191. padding: 21rpx 0;
  192. .right,
  193. input {
  194. font-size: 28rpx;
  195. color: #333333;
  196. }
  197. }
  198. }
  199. .content2 {
  200. margin-top: 20rpx;
  201. }
  202. .bottom-btn {
  203. width: 92%;
  204. position: fixed;
  205. bottom: 40rpx;
  206. display: flex;
  207. z-index: 2;
  208. }
  209. .submit {
  210. width: 40%;
  211. background: #22C572;
  212. border-radius: 10rpx;
  213. }
  214. </style>