freight_setting_approval.vue 6.3 KB

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