freight_settlement_details.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  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&&list[0].status == '已驳回'"
  8. style="height: 40rpx;"></image><!-- 驳回 -->
  9. <image src="../../../static/img/tongguo.png" mode="" v-if="list&&list[0].status == '已通过'"
  10. style="height: 40rpx;"></image><!-- 通过 -->
  11. </view>
  12. <view class="infoText">{{list[0].approveStatus?list[0].approveStatus:list[0].status}}</view>
  13. </view>
  14. <view class="infoData">{{list[0].updateDate}}</view>
  15. </view>
  16. </view>
  17. <view class="content">
  18. <view class="top">
  19. <view v-if='list&&list[0].contractFlag=="1"'>合同编号</view>
  20. <view v-if='list&&list[0].contractFlag=="0"'>移库编号</view>
  21. <view>{{list[0].contractNo}}</view>
  22. </view>
  23. <view class="person-info">
  24. <view v-if='list&&list[0].contractFlag=="1"' class="top1" style="display: flex;">
  25. <view>客户</view>
  26. <view>{{list[0].customer}}</view>
  27. </view>
  28. <view style='display:flex;align-items: center;' class="top1">
  29. <view>发货地址</view>
  30. <view class="top_info">{{list[0].send ? list[0].send : "暂无发货地址"}}</view>
  31. </view>
  32. <view style='display:flex;align-items: center;' class="top1">
  33. <view>收货地址</view>
  34. <view class="top_info">{{list[0].receive ? list[0].receive : "暂无收货地址"}}</view>
  35. </view>
  36. <view style='display:flex;align-items: center;' class="top1">
  37. <view>合计</view>
  38. <view class="top_info">{{num}}</view>
  39. </view>
  40. </view>
  41. <view class="car-container">
  42. <view v-for="item in list" class="car-container-item">
  43. <view class="car-num title" v-if="item.tranTypeKey== '1'">{{item.carNo}} ({{item.tranCarNo}})</view>
  44. <view class="car-num title" v-if="item.tranTypeKey== '2'">车厢号{{item.boxNo}}</view>
  45. <view class="car-num title" v-if="item.tranTypeKey== '3'&&item.shipType== '散船'">仓位号{{item.boxNo}}
  46. </view>
  47. <view class="car-num title" v-if="item.tranTypeKey== '3'&&item.shipType== '集装箱'">箱号{{item.boxNo}}
  48. </view>
  49. <view class="car-type-item">
  50. <view class="left">装</view>
  51. <view class="textInfo">{{item.loadingWeight}}吨</view>
  52. </view>
  53. <view class="car-type-item">
  54. <view class="center">卸</view>
  55. <view class="textInfo">{{item.unloadingWeight}}吨</view>
  56. </view>
  57. <view class="car-type-item">
  58. <view class="right">结</view>
  59. <view class="textInfo">{{item.settlementWeight}}吨</view>
  60. </view>
  61. <view class="car-type-item">
  62. <view class="left">预</view>
  63. <view class="textInfo">{{item.transportPrice}}元/吨</view>
  64. </view>
  65. <view class="car-type-item">
  66. <view class="center">算</view>
  67. <view class="textInfo">{{item.settlementPrice}}元/吨</view>
  68. </view>
  69. <view class="car-type-item">
  70. <view v-if='item.deductionAmount>=0' class="right">扣</view>
  71. <view v-if='item.deductionAmount<0' class="right">加</view>
  72. <view v-if='item.deductionAmount<0' class="textInfo">{{-item.deductionAmount}}元</view>
  73. <view v-if='item.deductionAmount>=0' class="textInfo">{{item.deductionAmount}}元</view>
  74. </view>
  75. <view class="car-type-item">
  76. <view class="left">服</view>
  77. <view class="textInfo">{{item.serviceCharge}}元</view>
  78. </view>
  79. <view class="car-type-item">
  80. <view class="center">税</view>
  81. <view class="textInfo">{{item.taxPoint}}元</view>
  82. </view>
  83. <view class="car-type-item">
  84. <view class="right">实</view>
  85. <view class="textInfo">{{item.amountActuallyPaid}}元</view>
  86. </view>
  87. <view class="car-type-item">
  88. <view class="left">合</view>
  89. <view class="textInfo">{{item.totalPayable}}元</view>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. <flow :auditList="auditList" @status='getStatus'></flow>
  95. <u-toast ref="uToast" />
  96. <view style='padding:10px;' class='flex bottom-btn'>
  97. <u-button @click="fanHui" type="success" class="btn1" hover-class='none'>返回</u-button>
  98. </view>
  99. </view>
  100. </template>
  101. <script>
  102. import flow from '@/components/flow.vue';
  103. export default {
  104. components: {
  105. flow
  106. },
  107. data() {
  108. return {
  109. currentPage: 1,
  110. pageSize: 10,
  111. num: 0,
  112. list: {
  113. approveStatus: "",
  114. },
  115. auditList: [],
  116. customerName: "", //客户
  117. shippingAddress: "", //发货地址
  118. receivingAddress: "", //收货地址
  119. }
  120. },
  121. onLoad(options) {
  122. this.id = options.id
  123. this.getList()
  124. },
  125. methods: {
  126. getStatus(val) {
  127. if (val == 200) this.getList()
  128. },
  129. getList() {
  130. this.$api.doRequest('get', '/tranSettlementReport/getTranSettlementReport', {
  131. batchId: this.id
  132. }).then(res => {
  133. if (res.data.code == 200) {
  134. if (res.data.data.length > 0) {
  135. this.num = 0
  136. for (var i = 0; i < res.data.data.length; i++) {
  137. if (res.data.data[i].totalPayable) {
  138. this.num += res.data.data[i].totalPayable
  139. }
  140. }
  141. }
  142. this.num = this.num.toFixed(2)
  143. this.list = res.data.data
  144. // console.log(this.list, 124)
  145. // 查流程
  146. this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
  147. businessCode: 'TRANSPORTATION-SETTLEMENT-REPORT',
  148. tmpCompId: uni.getStorageSync('pcUserInfo').compId
  149. }).then(res1 => {
  150. this.$api.doRequest('get', '/commonUser/getHis', {
  151. workflowId: res1.data.data[0].id,
  152. businessKey: this.id
  153. }).then(response => {
  154. uni.hideLoading()
  155. for (let i = 0; i < response.data.data.length; i++) {
  156. this.$set(response.data.data[i], 'status', 'question')
  157. console.log(response.data.data[i].workflowHistoricTasks, i)
  158. if (response.data.data[i].commonStaffs) {
  159. response.data.data[i].showflow = false
  160. response.data.data[i].operatorTitle = response.data.data[i]
  161. .desc.substring(0, 2)
  162. response.data.data[i].operatorName = response.data.data[i]
  163. .desc
  164. response.data.data[i].staffscontent = '共' + response.data
  165. .data[i].commonStaffs.length + '人,当前审核' + response.data
  166. .data[i].workflowHistoricTasks.length + '人'
  167. if (response.data.data[i].workflowHistoricTasks && response
  168. .data.data[i].workflowHistoricTasks.length > 0) {
  169. if (response.data.data[i].workflowHistoricTasks
  170. .length != response.data.data[i].commonStaffs
  171. .length) {
  172. // response.data.data[i].status='question'
  173. this.$set(response.data.data[i], 'status',
  174. 'question')
  175. } else {
  176. this.$set(response.data.data[i], 'status',
  177. 'success')
  178. // response.data.data[i].status='success'
  179. }
  180. response.data.data[i].workflowlen = response.data.data[
  181. i].workflowHistoricTasks.length
  182. var workflowdata = response.data.data[i]
  183. .workflowHistoricTasks
  184. var staffsdata = response.data.data[i].commonStaffs
  185. for (let q = 0; q < staffsdata.length; q++) {
  186. staffsdata[q].status = false
  187. staffsdata[q].staffTitle = staffsdata[q].staffName
  188. for (let k = 0; k < workflowdata.length; k++) {
  189. if (staffsdata[q].staffId == workflowdata[k]
  190. .operatorId) {
  191. staffsdata[q].status = true
  192. }
  193. }
  194. }
  195. }
  196. response.data.data[i].commonStaffs1 = response.data.data[i]
  197. .commonStaffs
  198. } else {
  199. if (response.data.data[i].workflowHistoricTasks && response
  200. .data.data[i].workflowHistoricTasks.length > 0) {
  201. var len = response.data.data[i].workflowHistoricTasks
  202. .length - 1
  203. if (response.data.data[i].workflowHistoricTasks[len]
  204. .approved) {
  205. this.$set(response.data.data[i], 'status',
  206. 'success')
  207. } else {
  208. this.$set(response.data.data[i], 'status', 'error')
  209. }
  210. response.data.data[i].operatorTitle = response.data
  211. .data[i].workflowHistoricTasks[len].operatorName
  212. .substring(response.data.data[i]
  213. .workflowHistoricTasks[0].operatorName.length -
  214. 2)
  215. response.data.data[i].operatorName = response.data
  216. .data[i].workflowHistoricTasks[len].operatorName
  217. var time = new Date(response.data.data[i]
  218. .workflowHistoricTasks[len].claimTime)
  219. .getTime()
  220. response.data.data[i].updateDate = this.$u.timeFormat(
  221. time, 'mm.dd hh:MM')
  222. response.data.data[i].auditMind = response.data.data[i]
  223. .workflowHistoricTasks[len].auditMind
  224. } else {
  225. this.$set(response.data.data[i], 'status', 'question')
  226. // response.data.data[i].status='question'
  227. if (response.data.data[i].desc == '总经理助理审核') {
  228. response.data.data[i].operatorTitle = '总助'
  229. } else if (response.data.data[i].desc == '杜大光审核') {
  230. response.data.data[i].operatorTitle = '大光'
  231. } else {
  232. response.data.data[i].operatorTitle = response.data
  233. .data[i].desc.substring(0, 2)
  234. }
  235. response.data.data[i].operatorName = response.data
  236. .data[i].desc
  237. var time1 = new Date(response.data.data[i].updateDate)
  238. .getTime()
  239. response.data.data[i].updateDate = this.$u.timeFormat(
  240. time1, 'mm.dd hh:MM')
  241. response.data.data[i].auditMind = ''
  242. }
  243. }
  244. }
  245. console.log(response.data.data)
  246. for (let i = 0; i < response.data.data.length; i++) {
  247. if (response.data.data[i].status == "error") {
  248. this.auditCheck = "error"
  249. break;
  250. } else if (response.data.data[i].status == "question") {
  251. this.auditCheck = "question"
  252. break;
  253. } else {
  254. this.auditCheck = "success"
  255. }
  256. }
  257. this.auditList = response.data.data
  258. var time2 = new Date(this.list[0].createDate).getTime()
  259. var time3 = this.$u.timeFormat(time2, 'mm.dd hh:MM')
  260. this.auditList.unshift({
  261. operatorTitle: this.list[0].requester.substring(0, 2),
  262. operatorName: this.list[0].requester,
  263. updateDate: time3,
  264. auditMind: '',
  265. desc: '发起申请',
  266. showflow: false,
  267. commonStaffs1: null,
  268. commonStaffs: null,
  269. workflowHistoricTasks: [],
  270. status: 'success'
  271. })
  272. })
  273. })
  274. }
  275. })
  276. // this.$api.doRequest('get', '/tranSettlementReport/getInfo', {
  277. // id: this.id
  278. // }).then(res => {
  279. // this.contractNo = res.data.data.contractNo
  280. // this.carId = res.data.data.carId
  281. // this.customerName = res.data.data.customer
  282. // this.shippingAddress = res.data.data.send
  283. // this.receivingAddress = res.data.data.receive
  284. // if (res.data.code == 200) {
  285. // this.$api.doRequest('get', '/tranSettlementReport/selectTranSettlementReport', {
  286. // compId: "2710b21efc1e4393930c5dc800010dc4",
  287. // currentPage: this.currentPage,
  288. // pageSize: this.pageSize,
  289. // contractNo: this.contractNo,
  290. // carId: this.carId,
  291. // }).then(res => {
  292. // if (res.data.code == 200) {
  293. // this.list = res.data.data.records[0]
  294. // }
  295. // })
  296. // }
  297. // })
  298. },
  299. fanHui() {
  300. uni.navigateBack()
  301. }
  302. }
  303. }
  304. </script>
  305. <style scoped lang="scss">
  306. .container {
  307. margin: 10rpx;
  308. padding: 20rpx 20rpx 230rpx 20rpx;
  309. }
  310. .content {
  311. .top {
  312. display: flex;
  313. justify-content: space-between;
  314. border-radius: 20rpx;
  315. background: white;
  316. padding: 30rpx 20rpx;
  317. font-size: 36rpx;
  318. margin-top: 30rpx;
  319. }
  320. .top1 {
  321. // display: flex;
  322. justify-content: space-between;
  323. border-radius: 20rpx;
  324. background: white;
  325. padding: 10rpx 20rpx;
  326. font-size: 30rpx;
  327. margin-top: 20rpx;
  328. }
  329. .title {
  330. font-size: 28rpx;
  331. font-weight: 600;
  332. color: #333333;
  333. text-align: left;
  334. margin-bottom: 30rpx;
  335. }
  336. .car-container {
  337. padding: 10rpx 20rpx;
  338. border-radius: 20rpx;
  339. background: white;
  340. margin: 30rpx 0;
  341. // border-bottom: 2rpx solid #EEEEEE;
  342. }
  343. .car-type-item {
  344. display: inline-flex;
  345. // justify-content: center;
  346. width: 33.33%;
  347. margin-bottom: 40rpx;
  348. }
  349. .title {
  350. font-size: 36rpx;
  351. }
  352. }
  353. .person-info {
  354. background: white;
  355. padding: 20rpx 0;
  356. border-radius: 20rpx;
  357. // margin-bottom: 50rpx;
  358. margin: 20rpx 0;
  359. .tit {
  360. font-size: 36rpx;
  361. }
  362. }
  363. .bottom-btn {
  364. width: 100%;
  365. position: fixed;
  366. bottom: 0;
  367. display: flex;
  368. z-index: 2;
  369. left: 0;
  370. background-color: #f8f8f8;
  371. flex-direction: column;
  372. .btn1,
  373. .btn2 {
  374. width: 100%;
  375. margin-bottom: 26rpx;
  376. border-radius: 90rpx;
  377. }
  378. .btn1 {
  379. background: white;
  380. color: #00C265;
  381. }
  382. }
  383. .submit {
  384. width: 40%;
  385. background: #22C572;
  386. border-radius: 10rpx;
  387. }
  388. .left {
  389. background: #FEECE6;
  390. color: #FE6430;
  391. }
  392. .center {
  393. background: #EBEEFA;
  394. color: #5C76DF;
  395. }
  396. .right {
  397. background: #E9F8F0;
  398. color: #22C572;
  399. }
  400. .left,
  401. .center,
  402. .right {
  403. width: 50rpx;
  404. height: 50rpx;
  405. text-align: center;
  406. line-height: 50rpx;
  407. border-radius: 10rpx;
  408. }
  409. .textInfo {
  410. margin: 6rpx 0 0 10rpx;
  411. }
  412. .topInfo {
  413. height: 210rpx;
  414. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  415. padding: 30rpx;
  416. .topInfo-item {
  417. height: 150rpx;
  418. background-color: #FFFFFF;
  419. border-radius: 20rpx;
  420. padding: 40rpx;
  421. .logo {
  422. width: 40rpx;
  423. height: 40rpx;
  424. margin-top: 8rpx;
  425. }
  426. .infoText {
  427. font-size: 36rpx;
  428. font-weight: 600;
  429. margin-left: 20rpx;
  430. }
  431. .infoData {
  432. color: #878C9C;
  433. font-size: 26rpx;
  434. margin-top: 10rpx;
  435. }
  436. }
  437. }
  438. .rejectInfoCss {
  439. border: 1px solid #ccc;
  440. border-radius: 10rpx;
  441. background-color: #F9F9FA;
  442. // height: 100px;
  443. overflow-y: auto;
  444. margin: 30rpx;
  445. }
  446. .rejectText {
  447. text-align: center;
  448. }
  449. /deep/.u-input__textarea {
  450. height: 300rpx !important;
  451. }
  452. .content2 {
  453. background: white;
  454. margin: 20rpx 0;
  455. border-radius: 20rpx;
  456. padding: 20rpx;
  457. .row {
  458. display: flex;
  459. .row-left {
  460. display: flex;
  461. align-items: center;
  462. .item1 {
  463. position: relative;
  464. .item-content {
  465. background: #617AE0;
  466. width: 44px;
  467. height: 44px;
  468. border-radius: 22px;
  469. line-height: 44px;
  470. text-align: center;
  471. font-size: 15px;
  472. color: #fff;
  473. }
  474. .status {
  475. position: absolute;
  476. border-radius: 50%;
  477. padding: 0px 2px;
  478. right: -3px;
  479. bottom: -3px;
  480. background: #fff;
  481. }
  482. .status.success {
  483. border: 1px solid rgb(60, 156, 255);
  484. }
  485. .status.error {
  486. border: 1px solid rgb(245, 108, 108);
  487. }
  488. .status.question {
  489. border: 1px solid #f9ae3d;
  490. }
  491. }
  492. }
  493. .row-right {
  494. width: 80%;
  495. // color: #B0B1B5;
  496. margin-top: 10px;
  497. .right-content {
  498. background: #F2F3F7;
  499. margin-left: 10px;
  500. margin-top: 10px;
  501. padding: 10px;
  502. border-radius: 5px;
  503. color: #B0B1B5;
  504. }
  505. .right-item {
  506. display: flex;
  507. justify-content: space-between;
  508. .time {
  509. color: #999;
  510. }
  511. .item2 {
  512. margin-left: 20rpx;
  513. margin-top: -7px;
  514. .name {
  515. font-size: 28rpx;
  516. font-weight: 800;
  517. margin-bottom: 4px;
  518. }
  519. .status.success {
  520. color: #6CC48C;
  521. }
  522. .status.error {
  523. color: rgb(245, 108, 108);
  524. }
  525. .status.question {
  526. color: #f9ae3d;
  527. }
  528. }
  529. }
  530. }
  531. }
  532. .row2 {
  533. display: flex;
  534. .item-content {
  535. background: #22C572;
  536. width: 30px;
  537. height: 30px;
  538. border-radius: 50%;
  539. line-height: 30px;
  540. text-align: center;
  541. font-size: 12px;
  542. color: #fff;
  543. padding: 0 2px;
  544. margin: 0 auto;
  545. }
  546. .status {
  547. position: absolute;
  548. top: 0;
  549. right: 0;
  550. }
  551. }
  552. .row-line {
  553. width: 1px;
  554. height: 30px;
  555. background: #F2F2F2;
  556. margin: 10rpx 50rpx;
  557. }
  558. .audit {
  559. margin-top: 20rpx;
  560. }
  561. }
  562. .top_info {
  563. margin: 10rpx 0;
  564. width: 70%;
  565. text-align: right;
  566. }
  567. </style>