freight_settlement_approval.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  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].approveStatus == '已驳回'"
  8. style="height: 40rpx;"></image><!-- 驳回 -->
  9. <image src="../../../static/img/tongguo.png" mode="" v-if="list[0].approveStatus == '已通过'"
  10. style="height: 40rpx;"></image><!-- 通过 -->
  11. <image src="../../../static/img/daishenhe.png" mode=""
  12. v-if="list[0].approveStatus == '待决策人审核'|| list[0].approveStatus == '待财务审核'"
  13. style="height: 40rpx;"></image><!-- 待审核 -->
  14. </view>
  15. <view class="infoText">{{list[0].approveStatus}}</view>
  16. </view>
  17. <view class="infoData">{{list[0].updateDate}}</view>
  18. </view>
  19. </view>
  20. <view class="content">
  21. <view class="top">
  22. <view>合同编号</view>
  23. <view>{{list[0].contractNo}}</view>
  24. </view>
  25. <view class="person-info">
  26. <view class="top1" style="display: flex;">
  27. <view>客户</view>
  28. <view>{{list[0].customer}}</view>
  29. </view>
  30. <view class="top1">
  31. <view>发货地址</view>
  32. <view class="top_info">{{list[0].send ? list[0].send : "暂无发货地址"}}</view>
  33. </view>
  34. <view class="top1">
  35. <view>收货地址</view>
  36. <view class="top_info">{{list[0].receive ? list[0].receive : "暂无收货地址"}}</view>
  37. </view>
  38. </view>
  39. <view class="car-container">
  40. <view v-for="item in list" class="car-container-item">
  41. <view class="car-num title" v-if="item.tranTypeKey== '1'">{{item.carNo}} ({{item.tranCarNo}})</view>
  42. <view class="car-num title" v-if="item.tranTypeKey== '2'">车厢号{{item.boxNo}}</view>
  43. <view class="car-num title" v-if="item.tranTypeKey== '3'&&item.shipType== '散船'">仓位号{{item.boxNo}}
  44. </view>
  45. <view class="car-num title" v-if="item.tranTypeKey== '3'&&item.shipType== '集装箱'">箱号{{item.boxNo}}
  46. </view>
  47. <view class="car-type-item">
  48. <view class="left">装</view>
  49. <view class="textInfo">{{item.loadingWeight}}吨</view>
  50. </view>
  51. <view class="car-type-item">
  52. <view class="center">卸</view>
  53. <view class="textInfo">{{item.unloadingWeight}}吨</view>
  54. </view>
  55. <view class="car-type-item">
  56. <view class="right">结</view>
  57. <view class="textInfo">{{item.settlementWeight}}吨</view>
  58. </view>
  59. <view class="car-type-item">
  60. <view class="left">运</view>
  61. <view class="textInfo">{{item.transportPrice}}元/吨</view>
  62. </view>
  63. <view class="car-type-item">
  64. <view class="center">扣</view>
  65. <view 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. <view v-if='show' class="shade">
  75. <view class="wrap">
  76. <view class="alert-top">
  77. <view class="title">
  78. {{title}}
  79. </view>
  80. <u-icon name="close" class="close" color="#8890B1" @click="close()"></u-icon>
  81. </view>
  82. <view class="u-textarea-style">
  83. <view class="right-bottom">
  84. {{auditMind.length}}/100个字
  85. </view>
  86. <u-input class="" v-model='auditMind' placeholder="请在此输入审核意见" type="textarea" height="414"
  87. maxlength="100" />
  88. </view>
  89. <view @click='close()' class="cancel">取消</view>
  90. <view @click='passSubmit()' class="confirm">确定</view>
  91. </view>
  92. </view>
  93. <u-toast ref="uToast" />
  94. <view style='padding:10px;' class='flex bottom-btn'>
  95. <u-button v-if='isSHowBtn' @click='reject' type="error" class="btn1" hover-class='none'>驳回</u-button>
  96. <u-button v-if='isSHowBtn' @click='pass' type="success" class="btn2">通过</u-button>
  97. </view>
  98. </view>
  99. </template>
  100. <script>
  101. import helper from '@/common/helper.js';
  102. export default {
  103. data() {
  104. return {
  105. isSHowBtn: true,
  106. currentPage: 1,
  107. pageSize: 10,
  108. list: {
  109. approveStatus: "",
  110. },
  111. title: '',
  112. show: false,
  113. height: 200,
  114. auditMind: '',
  115. autoHeight: true,
  116. border: false,
  117. everyCheck: '',
  118. customerName: "", //客户
  119. shippingAddress: "", //发货地址
  120. receivingAddress: "", //收货地址
  121. }
  122. },
  123. onBackPress(e) {
  124. if (this.everyCheck) {
  125. uni.navigateTo({
  126. url: "/pages/task/my_task"
  127. })
  128. return true;
  129. }
  130. },
  131. onLoad(options) {
  132. this.id = options.id
  133. this.everyCheck = uni.getStorageSync("everyTask")
  134. this.isSHowBtn = options.isShowbtn
  135. this.getList()
  136. },
  137. methods: {
  138. getList() {
  139. this.$api.doRequest('get', '/tranSettlementReport/getTranSettlementReport', {
  140. batchId: this.id
  141. }).then(res => {
  142. if (res.data.code == 200) {
  143. debugger
  144. this.list = res.data.data
  145. // console.log(this.list, 124)
  146. }
  147. })
  148. // this.$api.doRequest('get', '/tranSettlementReport/getInfo', {
  149. // id: this.id
  150. // }).then(res => {
  151. // this.contractNo = res.data.data.contractNo
  152. // this.carId = res.data.data.carId
  153. // this.customerName = res.data.data.customer
  154. // this.shippingAddress = res.data.data.send
  155. // this.receivingAddress = res.data.data.receive
  156. // if (res.data.code == 200) {
  157. // this.$api.doRequest('get', '/tranSettlementReport/getTranSettlementReport', {
  158. // compId: "2710b21efc1e4393930c5dc800010dc4",
  159. // currentPage: this.currentPage,
  160. // pageSize: this.pageSize,
  161. // contractNo: this.contractNo,
  162. // carId: this.carId,
  163. // }).then(res => {
  164. // if (res.data.code == 200) {
  165. // this.list = res.data.data.records[0]
  166. // console.log(this.list, 124)
  167. // }
  168. // })
  169. // }
  170. // })
  171. },
  172. close() {
  173. this.show = false
  174. },
  175. pass() {
  176. this.show = true
  177. this.title = '审核意见(通过)'
  178. },
  179. reject() {
  180. this.show = true
  181. this.title = '驳回原因(驳回)'
  182. },
  183. // 驳回
  184. rejectSubmit() {
  185. var that = this
  186. if (!this.rejectInfo) {
  187. this.$api.msg('驳回原因不能为空!')
  188. } else {
  189. this.show = false
  190. uni.showModal({
  191. content: "是否确定驳回?",
  192. showCancel: true,
  193. confirmText: '确定',
  194. success: function(res) {
  195. if (res.confirm) {
  196. that.audit(that.list[0], 0, false, true, that.rejectInfo)
  197. }
  198. }
  199. })
  200. }
  201. },
  202. //通过
  203. passSubmit() {
  204. var that = this
  205. if (this.title == '驳回原因(驳回)') {
  206. this.rejectSubmit()
  207. } else {
  208. this.show = false
  209. uni.showModal({
  210. content: "是否确定通过?",
  211. showCancel: true,
  212. confirmText: '确定',
  213. success: function(res) {
  214. if (res.confirm) {
  215. that.audit(that.list[0], 0, true, 2, that.rejectInfo1)
  216. }
  217. }
  218. })
  219. }
  220. },
  221. //审核方法
  222. audit(list, index, status, status2, reason) {
  223. uni.showLoading({
  224. title: "审核中"
  225. })
  226. let that = this
  227. if (this.list) {
  228. this.$api.doRequest('post', '/workflow/api/handle', {
  229. taskId: list.taskId,
  230. approved: status,
  231. auditMind: reason != undefined ? this.rejectInfo : this.rejectInfo1,
  232. needReapply: status2 != undefined ? true : false,
  233. }).then(res => {
  234. if (status == true) {
  235. this.$api.msg('通过成功')
  236. } else if (status == false) {
  237. this.$api.msg('驳回成功')
  238. }
  239. setTimeout(function() {
  240. if (that.everyCheck) {
  241. helper.setAudit(that.list[0])
  242. } else {
  243. uni.navigateBack()
  244. }
  245. }, 1000);
  246. })
  247. }
  248. },
  249. }
  250. }
  251. </script>
  252. <style scoped lang="scss">
  253. .container {
  254. margin: 10rpx;
  255. padding: 20rpx 20rpx 230rpx 20rpx;
  256. }
  257. .content {
  258. .top {
  259. display: flex;
  260. justify-content: space-between;
  261. border-radius: 20rpx;
  262. background: white;
  263. padding: 30rpx 20rpx;
  264. font-size: 36rpx;
  265. margin-top: 20rpx;
  266. }
  267. .top1 {
  268. // display: flex;
  269. justify-content: space-between;
  270. border-radius: 20rpx;
  271. background: white;
  272. padding: 10rpx 20rpx;
  273. font-size: 30rpx;
  274. margin-top: 20rpx;
  275. }
  276. .top_info {
  277. margin: 10rpx 0;
  278. }
  279. .title {
  280. font-size: 28rpx;
  281. font-weight: 600;
  282. color: #333333;
  283. text-align: left;
  284. margin-bottom: 30rpx;
  285. }
  286. .car-container {
  287. // border-bottom: 2rpx solid #EEEEEE;
  288. }
  289. .car-container-item {
  290. background: white;
  291. padding: 10rpx 20rpx;
  292. border-radius: 20rpx;
  293. margin: 20rpx 0;
  294. }
  295. .car-type-item {
  296. display: inline-flex;
  297. // justify-content: center;
  298. width: 33.33%;
  299. margin-bottom: 40rpx;
  300. }
  301. .title {
  302. font-size: 36rpx;
  303. }
  304. }
  305. .bottom-btn {
  306. width: 100%;
  307. position: fixed;
  308. bottom: 0;
  309. display: flex;
  310. z-index: 2;
  311. left: 0;
  312. background-color: #f8f8f8;
  313. flex-direction: column;
  314. .btn1,
  315. .btn2 {
  316. width: 100%;
  317. margin-bottom: 26rpx;
  318. border-radius: 90rpx;
  319. }
  320. .btn1 {
  321. background: white;
  322. color: #00C265;
  323. }
  324. }
  325. .submit {
  326. width: 40%;
  327. background: #22C572;
  328. border-radius: 10rpx;
  329. }
  330. .left {
  331. background: #FEECE6;
  332. color: #FE6430;
  333. }
  334. .center {
  335. background: #EBEEFA;
  336. color: #5C76DF;
  337. }
  338. .right {
  339. background: #E9F8F0;
  340. color: #22C572;
  341. }
  342. .left,
  343. .center,
  344. .right {
  345. width: 50rpx;
  346. height: 50rpx;
  347. text-align: center;
  348. line-height: 50rpx;
  349. border-radius: 10rpx;
  350. }
  351. .textInfo {
  352. margin: 6rpx 0 0 10rpx;
  353. }
  354. .topInfo {
  355. height: 210rpx;
  356. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  357. padding: 30rpx;
  358. .topInfo-item {
  359. height: 158rpx;
  360. background-color: #FFFFFF;
  361. border-radius: 20rpx;
  362. padding: 40rpx;
  363. .logo {
  364. width: 40rpx;
  365. height: 40rpx;
  366. margin-top: 8rpx;
  367. }
  368. .infoText {
  369. font-size: 36rpx;
  370. font-weight: 600;
  371. margin-left: 20rpx;
  372. }
  373. .infoData {
  374. color: #878C9C;
  375. font-size: 26rpx;
  376. margin-top: 10rpx;
  377. }
  378. }
  379. }
  380. .shade {
  381. position: fixed;
  382. top: 0;
  383. left: 0;
  384. height: 100%;
  385. width: 100%;
  386. background: rgba(0, 0, 0, 0.4);
  387. z-index: 3;
  388. .wrap {
  389. position: absolute;
  390. left: 0;
  391. top: 0;
  392. right: 0;
  393. bottom: 0;
  394. margin: auto;
  395. background: #fff;
  396. width: calc(100% - 198rpx);
  397. height: 700rpx;
  398. border-radius: 20rpx;
  399. .alert-top {
  400. padding: 33rpx;
  401. display: flex;
  402. justify-content: center;
  403. align-items: center;
  404. position: relative;
  405. }
  406. .title {
  407. font-size: 32rpx;
  408. font-weight: 600;
  409. color: #333333;
  410. }
  411. .close {
  412. position: absolute;
  413. right: 33rpx;
  414. }
  415. }
  416. }
  417. .cancel,
  418. .confirm {
  419. position: absolute;
  420. display: inline-block;
  421. width: 50%;
  422. text-align: center;
  423. bottom: 0;
  424. padding: 10px;
  425. border-top: 1px solid #eee;
  426. font-size: 34rpx;
  427. }
  428. .cancel {
  429. left: 0;
  430. border-right: 1px solid #eee;
  431. color: #AFB3BF;
  432. }
  433. .confirm {
  434. right: 0;
  435. color: #22C572;
  436. }
  437. .u-textarea-style {
  438. margin: 20rpx;
  439. background: #F9F9FA;
  440. border-radius: 10px;
  441. border: 1px solid #EEEEEE;
  442. padding: 10rpx 20rpx;
  443. position: relative;
  444. .right-bottom {
  445. position: absolute;
  446. right: 20rpx;
  447. bottom: 20rpx;
  448. color: #AFB3BF;
  449. }
  450. }
  451. /deep/.u-input__textarea {
  452. height: 300rpx !important;
  453. }
  454. .person-info {
  455. background: white;
  456. padding: 20rpx 0;
  457. border-radius: 20rpx;
  458. // margin-bottom: 50rpx;
  459. margin: 20rpx 0;
  460. .tit {
  461. font-size: 36rpx;
  462. }
  463. }
  464. .c-row {
  465. display: -webkit-box;
  466. display: -webkit-flex;
  467. display: flex;
  468. -webkit-box-align: center;
  469. -webkit-align-items: center;
  470. align-items: center;
  471. padding: 20rpx 30rpx;
  472. position: relative;
  473. }
  474. .c-row1 {
  475. // display: -webkit-box;
  476. // display: -webkit-flex;
  477. // display: flex;
  478. -webkit-box-align: center;
  479. -webkit-align-items: center;
  480. align-items: center;
  481. padding: 20rpx 30rpx;
  482. position: relative;
  483. }
  484. </style>