freight_settlement_details.vue 18 KB

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