freight_setting_approval.vue 6.5 KB

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