warehouse_details.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <template>
  2. <view class="warp">
  3. <view class="topInfo">
  4. <view class="topInfo-item">
  5. <view class="flex info">
  6. <view class="logo">
  7. <image src="../../../static/img/reject.png" mode="" v-if="list.status == '已驳回'"
  8. style="height: 40rpx;"></image><!-- 驳回 -->
  9. <image src="../../../static/img/tongguo.png" mode="" v-if="list.status == '已通过'"
  10. style="height: 40rpx;"></image><!-- 通过 -->
  11. <image src="../../../static/img/daishenhe.png" mode="" v-if="list.status == '审核中'"
  12. style="height: 40rpx;"></image><!-- 待审核 -->
  13. </view>
  14. <view class="infoText">{{list.status}}</view>
  15. </view>
  16. <view class="infoData">{{list.updateDate}}</view>
  17. </view>
  18. </view>
  19. <view class='content1'>
  20. <view class="title">基本信息</view>
  21. <view class='row'>
  22. <view class="left">仓库</view>
  23. <view class="right">{{list.warehouseName}}</view>
  24. </view>
  25. <view class='row'>
  26. <view class="left">货名</view>
  27. <view class="right">{{list.goodsName}}</view>
  28. </view>
  29. <view class='row'>
  30. <view class="left">基准水分(%)</view>
  31. <view class="right">{{list.waterBase}}</view>
  32. </view>
  33. <view class='row'>
  34. <view class="left">干粮水分(%)</view>
  35. <view class="right">{{list.waterMin}}</view>
  36. </view>
  37. <view class='row'>
  38. <view class="left">水分上限(%)</view>
  39. <view class="right">{{list.waterMax}}</view>
  40. </view>
  41. <view v-if="list.paramType == '2'" class='row'>
  42. <view class="left">扣重比</view>
  43. <view class="right">{{list.deductWeight}}</view>
  44. </view>
  45. <view class='row'>
  46. <view class="left">干粮收购价格(元/公斤)</view>
  47. <view class="right">{{list.dryGrainPrice}}</view>
  48. </view>
  49. <view class='row boder'>
  50. <view class="left">销售上限</view>
  51. <view class="right">{{list.saleLimit}}</view>
  52. </view>
  53. </view>
  54. <view class="content2">
  55. <view class="title">粮价设置</view>
  56. <view v-for="(item,index) in list.details" :key="index">
  57. <view class="row">
  58. <view class="left">等级</view>
  59. <view class="right">{{item.level}}</view>
  60. </view>
  61. <view v-if="list.paramType == '2'" class="row">
  62. <view class="left">基准单价(元/公斤)</view>
  63. <view class="right">{{item.basePrice}}</view>
  64. </view>
  65. <view class="row" v-for="(item1,index1) in item.modelList" :key="index1" :class="index1==item.modelList.length-1?'boder':''">
  66. <view v-if="list.paramType == '2'" class="left">{{item1.startWater}}-{{item1.endWater}}降幅(元/0.1%)</view>
  67. <view v-else class="left">{{item1.startWater}}-{{item1.endWater}}扣重比</view>
  68. <view class="right">{{item1.price}}</view>
  69. </view>
  70. </view>
  71. </view>
  72. <u-toast ref="uToast" />
  73. </view>
  74. </template>
  75. <script>
  76. import {
  77. mapState
  78. } from 'vuex';
  79. export default {
  80. name: "task",
  81. data() {
  82. return {
  83. show: false,
  84. id: 0,
  85. list: {},
  86. form: {
  87. name: '',
  88. intro: '',
  89. sex: ''
  90. },
  91. radio: '',
  92. pcUserInfo: uni.getStorageSync('pcUserInfo'),
  93. switchVal: false,
  94. contractNoList: []
  95. };
  96. },
  97. computed: {
  98. ...mapState(['hasLogin', 'userInfo'])
  99. },
  100. onLoad(options) {
  101. this.id = options.id
  102. },
  103. onShow() {
  104. var that = this
  105. this.$nextTick(function() {
  106. that.getData()
  107. })
  108. },
  109. methods: {
  110. getData() {
  111. var data = []
  112. this.$api.doRequest('get', '/purchasePrice/purchasePriceLook', {
  113. id: this.id
  114. }).then(res => {
  115. if (res.data.code == 200) {
  116. this.list = res.data.data
  117. }
  118. })
  119. },
  120. confirm(item) {
  121. this.list.contractNo = item[0].value
  122. },
  123. audit() {
  124. var that = this
  125. uni.showModal({
  126. content: "是否确定通过审核?",
  127. showCancel: true,
  128. confirmText: '确定',
  129. success: function(res) {
  130. if (res.confirm) {
  131. that.$api.doRequest('post', '/purchasePrice/purchasePriceEdit',that.list ).then(res => {
  132. if (res.data.code == 200) {
  133. that.$api.doRequest('post', '/workflow/api/handle', {
  134. approved: true,
  135. auditMind: "",
  136. needReapply: true,
  137. taskId: that.list.taskId,
  138. }).then(res1 => {
  139. if (res1.data.code == 200) {
  140. that.$api.msg('审核成功');
  141. that.setTimeout(function() {
  142. uni.navigateBack()
  143. }, 1000);
  144. } else {
  145. that.$api.msg(res1.data.message);
  146. }
  147. })
  148. } else {
  149. that.$api.msg('系统异常,请联系管理员');
  150. }
  151. })
  152. }
  153. }
  154. })
  155. },
  156. reject() {
  157. var that = this
  158. uni.showModal({
  159. content: "是否确定驳回?",
  160. showCancel: true,
  161. confirmText: '确定',
  162. success: function(res) {
  163. if (res.confirm) {
  164. that.$api.doRequest('post', '/workflow/api/handle', {
  165. taskId: that.list.taskId,
  166. approved: false,
  167. auditMind: '已驳回',
  168. needReapply: true,
  169. }).then(res1 => {
  170. if (res1.data.code == 200) {
  171. that.$api.msg('驳回成功');
  172. // that.$nextTick(function() {
  173. // uni.navigateBack()
  174. // })
  175. this.setTimeout(function() {
  176. uni.navigateBack()
  177. }, 1000);
  178. } else {
  179. that.$api.msg(res1.data.message);
  180. }
  181. })
  182. }
  183. }
  184. })
  185. }
  186. }
  187. }
  188. </script>
  189. <style scoped lang="scss">
  190. .warp {
  191. margin: 10rpx;
  192. padding: 20rpx 20rpx 330rpx 20rpx;
  193. }
  194. .content1,
  195. .content2 {
  196. border-radius: 20rpx;
  197. background: white;
  198. padding: 20rpx;
  199. .title {
  200. font-size: 28rpx;
  201. font-weight: 600;
  202. color: #333333;
  203. text-align: left;
  204. }
  205. .row {
  206. display: flex;
  207. justify-content: space-between;
  208. border-bottom: 1px solid #EEEEEE;
  209. padding: 21rpx 0;
  210. .right,
  211. input {
  212. font-size: 28rpx;
  213. color: #333333;
  214. }
  215. }
  216. }
  217. .content2 {
  218. margin-top: 20rpx;
  219. }
  220. .bottom-btn {
  221. width: 100%;
  222. position: fixed;
  223. bottom:0;
  224. display: flex;
  225. z-index: 2;
  226. left: 0;
  227. background-color: #f8f8f8;
  228. flex-direction: column;
  229. .btn1,.btn2{
  230. width: 100%;
  231. margin-bottom: 26rpx;
  232. border-radius: 90rpx;
  233. }
  234. .btn1{
  235. background: white;
  236. color: #00C265;
  237. }
  238. }
  239. .submit {
  240. width: 40%;
  241. background: #22C572;
  242. border-radius: 10rpx;
  243. }
  244. .boder{
  245. border:0;
  246. border-bottom: 0!important;
  247. }
  248. .topInfo {
  249. height: 210rpx;
  250. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  251. padding: 30rpx;
  252. .topInfo-item {
  253. height: 150rpx;
  254. background-color: #FFFFFF;
  255. border-radius: 20rpx;
  256. padding: 40rpx;
  257. .logo {
  258. width: 40rpx;
  259. height: 40rpx;
  260. margin-top: 8rpx;
  261. }
  262. .infoText {
  263. font-size: 36rpx;
  264. font-weight: 600;
  265. margin-left: 20rpx;
  266. }
  267. .infoData {
  268. color: #878C9C;
  269. font-size: 26rpx;
  270. margin-top: 10rpx;
  271. }
  272. }
  273. }
  274. </style>