freight_setting_approval.vue 6.1 KB

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