warehouse_details.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  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 style='padding:10px;' class='flex bottom-btn'>
  74. <u-button @click='fanHui' type="success" class="btn2">返回</u-button>
  75. </view>
  76. </view>
  77. </template>
  78. <script>
  79. import {
  80. mapState
  81. } from 'vuex';
  82. export default {
  83. name: "task",
  84. data() {
  85. return {
  86. show: false,
  87. id: 0,
  88. list: {},
  89. form: {
  90. name: '',
  91. intro: '',
  92. sex: ''
  93. },
  94. radio: '',
  95. pcUserInfo: uni.getStorageSync('pcUserInfo'),
  96. switchVal: false,
  97. contractNoList: []
  98. };
  99. },
  100. computed: {
  101. ...mapState(['hasLogin', 'userInfo'])
  102. },
  103. onLoad(options) {
  104. this.id = options.id
  105. },
  106. onShow() {
  107. var that = this
  108. this.$nextTick(function() {
  109. that.getData()
  110. })
  111. },
  112. methods: {
  113. getData() {
  114. var data = []
  115. this.$api.doRequest('get', '/purchasePrice/purchasePriceLook', {
  116. id: this.id
  117. }).then(res => {
  118. if (res.data.code == 200) {
  119. this.list = res.data.data
  120. }
  121. })
  122. },
  123. confirm(item) {
  124. this.list.contractNo = item[0].value
  125. },
  126. audit() {
  127. var that = this
  128. uni.showModal({
  129. content: "是否确定通过审核?",
  130. showCancel: true,
  131. confirmText: '确定',
  132. success: function(res) {
  133. if (res.confirm) {
  134. that.$api.doRequest('post', '/purchasePrice/purchasePriceEdit',that.list ).then(res => {
  135. if (res.data.code == 200) {
  136. that.$api.doRequest('post', '/workflow/api/handle', {
  137. approved: true,
  138. auditMind: "",
  139. needReapply: true,
  140. taskId: that.list.taskId,
  141. }).then(res1 => {
  142. if (res1.data.code == 200) {
  143. that.$api.msg('审核成功');
  144. setTimeout(function() {
  145. uni.navigateBack()
  146. }, 1000);
  147. } else {
  148. that.$api.msg(res1.data.message);
  149. }
  150. })
  151. } else {
  152. that.$api.msg('系统异常,请联系管理员');
  153. }
  154. })
  155. }
  156. }
  157. })
  158. },
  159. reject() {
  160. var that = this
  161. uni.showModal({
  162. content: "是否确定驳回?",
  163. showCancel: true,
  164. confirmText: '确定',
  165. success: function(res) {
  166. if (res.confirm) {
  167. that.$api.doRequest('post', '/workflow/api/handle', {
  168. taskId: that.list.taskId,
  169. approved: false,
  170. auditMind: '已驳回',
  171. needReapply: true,
  172. }).then(res1 => {
  173. if (res1.data.code == 200) {
  174. that.$api.msg('驳回成功');
  175. setTimeout(function() {
  176. uni.navigateBack()
  177. }, 1000);
  178. } else {
  179. that.$api.msg(res1.data.message);
  180. }
  181. })
  182. }
  183. }
  184. })
  185. },
  186. fanHui(){
  187. uni.navigateBack()
  188. }
  189. }
  190. }
  191. </script>
  192. <style scoped lang="scss">
  193. .warp {
  194. margin: 10rpx;
  195. padding: 20rpx 20rpx 330rpx 20rpx;
  196. }
  197. .content1,
  198. .content2 {
  199. border-radius: 20rpx;
  200. background: white;
  201. padding: 20rpx;
  202. .title {
  203. font-size: 28rpx;
  204. font-weight: 600;
  205. color: #333333;
  206. text-align: left;
  207. }
  208. .row {
  209. display: flex;
  210. justify-content: space-between;
  211. border-bottom: 1px solid #EEEEEE;
  212. padding: 21rpx 0;
  213. .right,
  214. input {
  215. font-size: 28rpx;
  216. color: #333333;
  217. }
  218. }
  219. }
  220. .content2 {
  221. margin-top: 20rpx;
  222. }
  223. .bottom-btn {
  224. width: 100%;
  225. position: fixed;
  226. bottom:0;
  227. display: flex;
  228. z-index: 2;
  229. left: 0;
  230. background-color: #f8f8f8;
  231. flex-direction: column;
  232. .btn1,.btn2{
  233. width: 100%;
  234. margin-bottom: 26rpx;
  235. border-radius: 90rpx;
  236. }
  237. .btn1{
  238. background: white;
  239. color: #00C265;
  240. }
  241. }
  242. .submit {
  243. width: 40%;
  244. background: #22C572;
  245. border-radius: 10rpx;
  246. }
  247. .boder{
  248. border:0;
  249. border-bottom: 0!important;
  250. }
  251. .topInfo {
  252. height: 210rpx;
  253. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  254. padding: 30rpx;
  255. .topInfo-item {
  256. height: 150rpx;
  257. background-color: #FFFFFF;
  258. border-radius: 20rpx;
  259. padding: 40rpx;
  260. .logo {
  261. width: 40rpx;
  262. height: 40rpx;
  263. margin-top: 8rpx;
  264. }
  265. .infoText {
  266. font-size: 36rpx;
  267. font-weight: 600;
  268. margin-left: 20rpx;
  269. }
  270. .infoData {
  271. color: #878C9C;
  272. font-size: 26rpx;
  273. margin-top: 10rpx;
  274. }
  275. }
  276. }
  277. </style>