freight_setting_approval.vue 7.2 KB

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