freight_settlement_details.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <template>
  2. <view class="container">
  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[0].approveStatus == '已驳回'"
  8. style="height: 40rpx;"></image><!-- 驳回 -->
  9. <image src="../../../static/img/tongguo.png" mode="" v-if="list[0].approveStatus == '已通过'"
  10. style="height: 40rpx;"></image><!-- 通过 -->
  11. <image src="../../../static/img/daishenhe.png" mode="" v-if="list[0].approveStatus == '待决策人审核'"
  12. style="height: 40rpx;"></image><!-- 待审核 -->
  13. </view>
  14. <view class="infoText">{{list[0].approveStatus}}</view>
  15. </view>
  16. <view class="infoData">{{list[0].updateDate}}</view>
  17. </view>
  18. </view>
  19. <view class="content">
  20. <view class="top">
  21. <view>合同编号</view>
  22. <view>{{list[0].contractNo}}</view>
  23. </view>
  24. <view class="car-container">
  25. <view v-for="(item,index) in list" style="border-bottom: 2rpx solid #EEEEEE;margin-top: 30rpx;">
  26. <view class="car-num title">{{item.carNo}} ({{item.tranCarNo}})</view>
  27. <view class="car-type-item">
  28. <view class="left">装</view>
  29. <view class="textInfo">{{item.loadingWeight}}吨</view>
  30. </view>
  31. <view class="car-type-item">
  32. <view class="center">卸</view>
  33. <view class="textInfo">{{item.unloadingWeight}}吨</view>
  34. </view>
  35. <view class="car-type-item">
  36. <view class="right">结</view>
  37. <view class="textInfo">{{item.settlementWeight}}吨</view>
  38. </view>
  39. <view class="car-type-item">
  40. <view class="left">运</view>
  41. <view class="textInfo">{{item.transportPrice}}元/吨</view>
  42. </view>
  43. <view class="car-type-item">
  44. <view class="center">扣</view>
  45. <view class="textInfo">{{item.deductionAmount}}元</view>
  46. </view>
  47. <view class="car-type-item">
  48. <view class="right">付</view>
  49. <view class="textInfo">{{item.amountIngPayable}}元</view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. <u-toast ref="uToast" />
  55. <view style='padding:10px;' class='flex bottom-btn'>
  56. <u-button @click="fanHui" type="success" class="btn1" hover-class='none'>返回</u-button>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. export default {
  62. data() {
  63. return {
  64. currentPage: 1,
  65. pageSize: 10,
  66. list: [
  67. {
  68. approveStatus:"",
  69. }
  70. ],
  71. }
  72. },
  73. onLoad() {
  74. this.getList()
  75. },
  76. methods: {
  77. getList() {
  78. this.$api.doRequest('get', '/tranSettlementReport/selectTranSettlementReport', {
  79. compId: "2710b21efc1e4393930c5dc800010dc4",
  80. currentPage: this.currentPage,
  81. pageSize: this.pageSize,
  82. contractNo: "全部合同"
  83. }).then(res => {
  84. if (res.data.code == 200) {
  85. this.list = res.data.data.records
  86. }
  87. })
  88. },
  89. // 驳回
  90. rejectSubmit() {
  91. var that = this
  92. if (this.list.length == 0) {
  93. this.$api.msg('没有要审核的条目!')
  94. } else {
  95. uni.showModal({
  96. content: "是否确定驳回?",
  97. showCancel: true,
  98. confirmText: '确定',
  99. success: function(res) {
  100. if (res.confirm) {
  101. that.audit(that.list[0], 0, false, true, '已驳回')
  102. }
  103. }
  104. })
  105. }
  106. },
  107. //通过
  108. passSubmit() {
  109. var that = this
  110. if (this.list.length == 0) {
  111. this.$api.msg('没有要审核的条目!')
  112. } else {
  113. uni.showModal({
  114. content: "是否确定通过?",
  115. showCancel: true,
  116. confirmText: '确定',
  117. success: function(res) {
  118. if (res.confirm) {
  119. that.audit(that.list[0], 0, true, 2)
  120. }
  121. }
  122. })
  123. }
  124. },
  125. //审核方法
  126. audit(item, index, status, status2, reason) {
  127. if (index < this.list.length) {
  128. this.$api.doRequest('post', '/workflow/api/handle', {
  129. taskId: item.taskId,
  130. approved: status,
  131. auditMind: reason != undefined ? '已驳回' : '34',
  132. needReapply: status2 != undefined ? true : false,
  133. }).then(res => {
  134. this.audit(this.list[index + 1], index + 1, status)
  135. })
  136. } else {
  137. if (status == true) {
  138. that.$api.msg('通过成功')
  139. this.getList()
  140. } else if (status == false) {
  141. that.$api.msg('驳回成功')
  142. this.getList()
  143. }
  144. }
  145. },
  146. fanHui(){
  147. uni.navigateBack()
  148. }
  149. }
  150. }
  151. </script>
  152. <style scoped lang="scss">
  153. .container {
  154. margin: 10rpx;
  155. padding: 20rpx 20rpx 110rpx 20rpx;
  156. }
  157. .content {
  158. .top {
  159. display: flex;
  160. justify-content: space-between;
  161. border-radius: 20rpx;
  162. background: white;
  163. padding: 30rpx 20rpx;
  164. font-size: 36rpx;
  165. margin-top: 30rpx;
  166. }
  167. .title {
  168. font-size: 28rpx;
  169. font-weight: 600;
  170. color: #333333;
  171. text-align: left;
  172. margin-bottom: 30rpx;
  173. }
  174. .car-container{
  175. padding: 10rpx 20rpx;
  176. border-radius: 20rpx;
  177. background: white;
  178. margin:30rpx 0 ;
  179. // border-bottom: 2rpx solid #EEEEEE;
  180. }
  181. .car-type-item {
  182. display: inline-flex;
  183. // justify-content: center;
  184. width: 33.33%;
  185. margin-bottom: 40rpx ;
  186. }
  187. .title{
  188. font-size: 36rpx;
  189. }
  190. }
  191. .bottom-btn {
  192. width: 100%;
  193. position: fixed;
  194. bottom:0;
  195. display: flex;
  196. z-index: 2;
  197. left: 0;
  198. background-color: #f8f8f8;
  199. flex-direction: column;
  200. .btn1,.btn2{
  201. width: 100%;
  202. margin-bottom: 26rpx;
  203. border-radius: 90rpx;
  204. }
  205. .btn1{
  206. background: white;
  207. color: #00C265;
  208. }
  209. }
  210. .submit {
  211. width: 40%;
  212. background: #22C572;
  213. border-radius: 10rpx;
  214. }
  215. .left{
  216. background: #FEECE6;
  217. color: #FE6430;
  218. }
  219. .center{
  220. background: #EBEEFA;
  221. color: #5C76DF;
  222. }
  223. .right{
  224. background: #E9F8F0 ;
  225. color: #22C572 ;
  226. }
  227. .left,.center,.right{
  228. width: 50rpx;
  229. height: 50rpx;
  230. text-align: center;
  231. line-height: 50rpx;
  232. border-radius: 10rpx;
  233. }
  234. .textInfo{
  235. margin: 6rpx 0 0 10rpx;
  236. }
  237. .topInfo {
  238. height: 210rpx;
  239. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  240. padding: 30rpx;
  241. .topInfo-item {
  242. height: 158rpx;
  243. background-color: #FFFFFF;
  244. border-radius: 20rpx;
  245. padding: 40rpx;
  246. .logo {
  247. width: 40rpx;
  248. height: 40rpx;
  249. margin-top: 8rpx;
  250. }
  251. .infoText {
  252. font-size: 36rpx;
  253. font-weight: 600;
  254. margin-left: 20rpx;
  255. }
  256. .infoData {
  257. color: #878C9C;
  258. font-size: 26rpx;
  259. margin-top: 10rpx;
  260. }
  261. }
  262. }
  263. </style>