freight_setting_approval.vue 5.8 KB

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