freight_settlement_details.vue 17 KB

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