freight_setting_approval.vue 6.1 KB

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