freight_setting_approval.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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.priceStatus == '已驳回'"
  8. style="height: 40rpx;"></image><!-- 驳回 -->
  9. <image src="../../../static/img/tongguo.png" mode="" v-if="list.priceStatus == '已通过'"
  10. style="height: 40rpx;"></image><!-- 通过 -->
  11. <image src="../../../static/img/daishenhe.png" mode="" v-if="list.priceStatus == '审核中'"
  12. style="height: 40rpx;"></image><!-- 待审核 -->
  13. </view>
  14. <view class="infoText">{{list.priceStatus}}</view>
  15. </view>
  16. <view class="infoData">2020年1月15日 08:45</view>
  17. </view>
  18. </view>
  19. <view class="transaction">
  20. <u-form :model="list" ref="list" class="uForm">
  21. <u-form-item label="合同编号" prop="contractNo" label-width="140">
  22. <u-input v-model="list.contractNo" input-align="right" placeholder="" disabled />
  23. </u-form-item>
  24. <u-form-item label="任务编号" prop="processNo" label-width="140">
  25. <u-input v-model="list.processNo" input-align="right" placeholder="" disabled />
  26. </u-form-item>
  27. <u-form-item label="货名" prop="goodsName" label-width="140">
  28. <u-input v-model="list.goodsName" input-align="right" placeholder="" disabled />
  29. </u-form-item>
  30. <u-form-item label="发货地址" prop="sendDetailedAddress" label-width="140">
  31. <u-input v-model="list.sendDetailedAddress" input-align="right" placeholder="发货地址" disabled />
  32. </u-form-item>
  33. <u-form-item label="收货地址" prop="receiveDetailedAddress" label-width="140">
  34. <u-input v-model="list.receiveDetailedAddress" input-align="right" placeholder="收货地址" disabled />
  35. </u-form-item>
  36. <u-form-item label="运费(元/吨)" prop="tranPrice" label-width="250">
  37. <u-input v-model="list.tranPriceIng" input-align="right" placeholder="请输入运费单价" />
  38. </u-form-item>
  39. </u-form>
  40. </view>
  41. <u-button type="primary" class="submit" @click="passSubmit()" v-if="list.priceStatus == '审核中'">通过</u-button>
  42. </view>
  43. </template>
  44. <script>
  45. import {
  46. mapState
  47. } from 'vuex';
  48. export default {
  49. data() {
  50. return {
  51. list: {},
  52. id: "",
  53. }
  54. },
  55. onLoad(options) {
  56. this.id = options.id
  57. this.getList()
  58. },
  59. computed: {
  60. ...mapState(['hasLogin', 'userInfo']),
  61. },
  62. methods: {
  63. getList() {
  64. this.$api.doRequest('get', '/tranProcessInfo/getTranProcess', {
  65. id: this.id
  66. }).then(res => {
  67. this.list = res.data.data
  68. })
  69. },
  70. passSubmit() {
  71. var that = this
  72. var tranProcessInfo = {}
  73. tranProcessInfo.id = this.list.id
  74. tranProcessInfo.flag = "1"
  75. tranProcessInfo.tranPriceIng = this.list.tranPriceIng
  76. tranProcessInfo.reviewer = this.userInfo.userName
  77. this.$api.doRequest('post', '/tranProcessInfo/api/setUpTranPrice', tranProcessInfo).then(res => {
  78. if (res.data.code == 200) {
  79. this.$api.msg('审核通过成功!')
  80. this.setTimeout(function() {
  81. uni.navigateBack()
  82. }, 1000);
  83. }
  84. })
  85. }
  86. }
  87. }
  88. </script>
  89. <style scoped lang="scss">
  90. .transaction {
  91. background-color: #FFFFFF;
  92. margin: 10rpx;
  93. padding-bottom: 10rpx;
  94. border-radius: 20rpx;
  95. }
  96. .uForm {
  97. padding: 0 40rpx;
  98. }
  99. .u-form-item {
  100. padding: 0;
  101. }
  102. .bottom-btn {
  103. width: 100%;
  104. position: fixed;
  105. bottom: 40rpx;
  106. display: flex;
  107. z-index: 2;
  108. }
  109. .topInfo {
  110. height: 210rpx;
  111. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  112. padding: 30rpx;
  113. .topInfo-item {
  114. height: 150rpx;
  115. background-color: #FFFFFF;
  116. border-radius: 20rpx;
  117. padding: 40rpx;
  118. .logo {
  119. width: 40rpx;
  120. height: 40rpx;
  121. margin-top: 8rpx;
  122. }
  123. .infoText {
  124. font-size: 36rpx;
  125. font-weight: 600;
  126. margin-left: 20rpx;
  127. }
  128. .infoData {
  129. color: #878C9C;
  130. font-size: 26rpx;
  131. margin-top: 10rpx;
  132. }
  133. }
  134. }
  135. .submit {
  136. width: 98%;
  137. background: #22C572;
  138. border-radius: 40rpx;
  139. margin-top: 40rpx;
  140. }
  141. </style>