freight_settlement_details.vue 17 KB

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