freight_setting_approval.vue 6.3 KB

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