freight_setting_approval.vue 3.9 KB

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