freight_setting_approval.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  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.doRequest('post', '/newWorkflow/api/handle', {
  134. taskId: that.list.taskId,
  135. approved: true,
  136. auditMind: '',
  137. needReapply: true,
  138. }).then(res => {
  139. that.$api.msg('通过成功')
  140. that.show = false
  141. setTimeout(function() {
  142. if (that.everyCheck) {
  143. helper.setAudit(that.list)
  144. } else {
  145. uni.navigateBack()
  146. }
  147. uni.hideLoading()
  148. }, 1000);
  149. })
  150. }
  151. })
  152. }
  153. }
  154. }
  155. </script>
  156. <style scoped lang="scss">
  157. .transaction {
  158. background-color: #FFFFFF;
  159. margin: 10rpx;
  160. padding-bottom: 10rpx;
  161. border-radius: 20rpx;
  162. }
  163. .uForm {
  164. padding: 0 40rpx;
  165. }
  166. .u-form-item {
  167. padding: 0;
  168. }
  169. .bottom-btn {
  170. width: 100%;
  171. position: fixed;
  172. bottom: 40rpx;
  173. display: flex;
  174. z-index: 2;
  175. }
  176. .topInfo {
  177. height: 210rpx;
  178. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  179. padding: 30rpx;
  180. .topInfo-item {
  181. height: 150rpx;
  182. background-color: #FFFFFF;
  183. border-radius: 20rpx;
  184. padding: 40rpx;
  185. .logo {
  186. width: 40rpx;
  187. height: 40rpx;
  188. margin-top: 8rpx;
  189. }
  190. .infoText {
  191. font-size: 36rpx;
  192. font-weight: 600;
  193. margin-left: 20rpx;
  194. }
  195. .infoData {
  196. color: #878C9C;
  197. font-size: 26rpx;
  198. margin-top: 10rpx;
  199. }
  200. }
  201. }
  202. .submit {
  203. width: 98%;
  204. background: #22C572;
  205. border-radius: 40rpx;
  206. margin-top: 40rpx;
  207. }
  208. .rejectInfoCss {
  209. border: 1px solid #ccc;
  210. border-radius: 10rpx;
  211. background-color: #F9F9FA;
  212. // height: 100px;
  213. overflow-y: auto;
  214. margin: 30rpx;
  215. }
  216. .rejectText {
  217. text-align: center;
  218. }
  219. /deep/.u-input__textarea {
  220. height: 300rpx !important;
  221. }
  222. .text_info {
  223. display: flex;
  224. width: 100%;
  225. justify-content: flex-end;
  226. }
  227. </style>