freight_setting_approval.vue 6.6 KB

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