freight_settlement_details.vue 19 KB

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