freight_setting_approval.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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">{{list.updateDate}}</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. <view class="text_info">
  33. {{list.sendPrivate}}{{list.sendCity}}{{list.sendArea}}{{list.sendDetailedAddress}}
  34. </view>
  35. </u-form-item>
  36. <u-form-item label="收货地址" prop="receiveDetailedAddress" label-width="140">
  37. <!-- <u-input v-model="list.receiveDetailedAddress" input-align="right" placeholder="收货地址" disabled /> -->
  38. <view class="text_info">
  39. {{list.receivePrivate}}{{list.receiveCity}}{{list.receiveArea}}{{list.receiveDetailedAddress}}
  40. </view>
  41. </u-form-item>
  42. <u-form-item label="运费(元/吨)" prop="tranPrice" label-width="250">
  43. <u-input v-model="list.tranPriceIng" input-align="right" placeholder="请输入运费单价" />
  44. </u-form-item>
  45. </u-form>
  46. </view>
  47. <u-modal v-model="show" :title-style="{fontSize: '18px',fontWeight:'500'}"
  48. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
  49. showCancelButton='false' :content="content" @confirm="passSubmit" @cancel="show = false"></u-modal>
  50. <u-button type="primary" class="submit" @click="show = true" v-if="list.priceStatus == '审核中'||isSHowBtn">通过
  51. </u-button>
  52. </view>
  53. </template>
  54. <script>
  55. import helper from '@/common/helper.js';
  56. import {
  57. mapState
  58. } from 'vuex';
  59. export default {
  60. data() {
  61. return {
  62. isSHowBtn: true,
  63. everyCheck: '',
  64. list: {
  65. priceStatus: "",
  66. },
  67. id: "",
  68. show: false,
  69. rejectInfo: "", //审核意见
  70. title: "提示",
  71. content: '是否通过该设置?'
  72. }
  73. },
  74. onBackPress(e) {
  75. if (this.everyCheck) {
  76. uni.navigateTo({
  77. url: "/pages/task/my_task"
  78. })
  79. return true;
  80. }
  81. },
  82. onLoad(options) {
  83. this.id = options.id
  84. this.everyCheck = uni.getStorageSync("everyTask")
  85. this.isSHowBtn = options.isShowbtn
  86. this.getList()
  87. },
  88. computed: {
  89. ...mapState(['hasLogin', 'userInfo']),
  90. },
  91. methods: {
  92. getList() {
  93. this.$api.doRequest('get', '/tranProcessInfo/getTranProcess', {
  94. id: this.id
  95. }).then(res => {
  96. this.list = res.data.data
  97. })
  98. },
  99. passSubmit() {
  100. var that = this
  101. if (!this.list.tranPriceIng) {
  102. this.$api.msg('运费单价不能为空')
  103. return
  104. }
  105. uni.showLoading({
  106. title: "审核中"
  107. })
  108. var tranProcessInfo = {}
  109. tranProcessInfo.id = that.list.id
  110. tranProcessInfo.flag = "2"
  111. tranProcessInfo.tranPriceIng = that.list.tranPriceIng
  112. tranProcessInfo.reviewer = that.userInfo.userName
  113. tranProcessInfo.tranTypeKey = that.list.tranTypeKey
  114. that.$api.doRequest('post', '/tranProcessInfo/api/setUpTranPrice', tranProcessInfo)
  115. .then(res => {
  116. if (res.data.code == 200) {
  117. that.$api.msg('审核通过成功!')
  118. setTimeout(function() {
  119. if (that.everyCheck) {
  120. helper.setAudit(that.list)
  121. } else {
  122. uni.navigateBack()
  123. }
  124. uni.hideLoading()
  125. }, 1000);
  126. }
  127. })
  128. }
  129. }
  130. }
  131. </script>
  132. <style scoped lang="scss">
  133. .transaction {
  134. background-color: #FFFFFF;
  135. margin: 10rpx;
  136. padding-bottom: 10rpx;
  137. border-radius: 20rpx;
  138. }
  139. .uForm {
  140. padding: 0 40rpx;
  141. }
  142. .u-form-item {
  143. padding: 0;
  144. }
  145. .bottom-btn {
  146. width: 100%;
  147. position: fixed;
  148. bottom: 40rpx;
  149. display: flex;
  150. z-index: 2;
  151. }
  152. .topInfo {
  153. height: 210rpx;
  154. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  155. padding: 30rpx;
  156. .topInfo-item {
  157. height: 150rpx;
  158. background-color: #FFFFFF;
  159. border-radius: 20rpx;
  160. padding: 40rpx;
  161. .logo {
  162. width: 40rpx;
  163. height: 40rpx;
  164. margin-top: 8rpx;
  165. }
  166. .infoText {
  167. font-size: 36rpx;
  168. font-weight: 600;
  169. margin-left: 20rpx;
  170. }
  171. .infoData {
  172. color: #878C9C;
  173. font-size: 26rpx;
  174. margin-top: 10rpx;
  175. }
  176. }
  177. }
  178. .submit {
  179. width: 98%;
  180. background: #22C572;
  181. border-radius: 40rpx;
  182. margin-top: 40rpx;
  183. }
  184. .rejectInfoCss {
  185. border: 1px solid #ccc;
  186. border-radius: 10rpx;
  187. background-color: #F9F9FA;
  188. // height: 100px;
  189. overflow-y: auto;
  190. margin: 30rpx;
  191. }
  192. .rejectText {
  193. text-align: center;
  194. }
  195. /deep/.u-input__textarea {
  196. height: 300rpx !important;
  197. }
  198. .text_info {
  199. display: flex;
  200. width: 100%;
  201. justify-content: flex-end;
  202. }
  203. </style>