freight_settlement_details.vue 18 KB

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