freight_settlement_approval.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  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. this.list = res.data.data
  144. // console.log(this.list, 124)
  145. }
  146. })
  147. // this.$api.doRequest('get', '/tranSettlementReport/getInfo', {
  148. // id: this.id
  149. // }).then(res => {
  150. // this.contractNo = res.data.data.contractNo
  151. // this.carId = res.data.data.carId
  152. // this.customerName = res.data.data.customer
  153. // this.shippingAddress = res.data.data.send
  154. // this.receivingAddress = res.data.data.receive
  155. // if (res.data.code == 200) {
  156. // this.$api.doRequest('get', '/tranSettlementReport/getTranSettlementReport', {
  157. // compId: "2710b21efc1e4393930c5dc800010dc4",
  158. // currentPage: this.currentPage,
  159. // pageSize: this.pageSize,
  160. // contractNo: this.contractNo,
  161. // carId: this.carId,
  162. // }).then(res => {
  163. // if (res.data.code == 200) {
  164. // this.list = res.data.data.records[0]
  165. // console.log(this.list, 124)
  166. // }
  167. // })
  168. // }
  169. // })
  170. },
  171. close() {
  172. this.show = false
  173. },
  174. pass() {
  175. this.show = true
  176. this.title = '审核意见(通过)'
  177. },
  178. reject() {
  179. this.show = true
  180. this.title = '驳回原因(驳回)'
  181. },
  182. // 驳回
  183. rejectSubmit() {
  184. var that = this
  185. if (!this.rejectInfo) {
  186. this.$api.msg('驳回原因不能为空!')
  187. } else {
  188. this.show = false
  189. uni.showModal({
  190. content: "是否确定驳回?",
  191. showCancel: true,
  192. confirmText: '确定',
  193. success: function(res) {
  194. if (res.confirm) {
  195. that.audit(that.list[0], 0, false, true, that.rejectInfo)
  196. }
  197. }
  198. })
  199. }
  200. },
  201. //通过
  202. passSubmit() {
  203. var that = this
  204. if (this.title == '驳回原因(驳回)') {
  205. this.rejectSubmit()
  206. } else {
  207. this.show = false
  208. uni.showModal({
  209. content: "是否确定通过?",
  210. showCancel: true,
  211. confirmText: '确定',
  212. success: function(res) {
  213. if (res.confirm) {
  214. that.audit(that.list[0], 0, true, 2, that.rejectInfo1)
  215. }
  216. }
  217. })
  218. }
  219. },
  220. //审核方法
  221. audit(list, index, status, status2, reason) {
  222. uni.showLoading({
  223. title: "审核中"
  224. })
  225. let that = this
  226. if (this.list) {
  227. this.$api.doRequest('post', '/workflow/api/handle', {
  228. taskId: list.taskId,
  229. approved: status,
  230. auditMind: reason != undefined ? this.rejectInfo : this.rejectInfo1,
  231. needReapply: status2 != undefined ? true : false,
  232. }).then(res => {
  233. if (status == true) {
  234. this.$api.msg('通过成功')
  235. } else if (status == false) {
  236. this.$api.msg('驳回成功')
  237. }
  238. setTimeout(function() {
  239. if (that.everyCheck) {
  240. helper.setAudit(that.list[0])
  241. } else {
  242. uni.navigateBack()
  243. }
  244. }, 1000);
  245. })
  246. }
  247. },
  248. }
  249. }
  250. </script>
  251. <style scoped lang="scss">
  252. .container {
  253. margin: 10rpx;
  254. padding: 20rpx 20rpx 230rpx 20rpx;
  255. }
  256. .content {
  257. .top {
  258. display: flex;
  259. justify-content: space-between;
  260. border-radius: 20rpx;
  261. background: white;
  262. padding: 30rpx 20rpx;
  263. font-size: 36rpx;
  264. margin-top: 20rpx;
  265. }
  266. .top1 {
  267. // display: flex;
  268. justify-content: space-between;
  269. border-radius: 20rpx;
  270. background: white;
  271. padding: 10rpx 20rpx;
  272. font-size: 30rpx;
  273. margin-top: 20rpx;
  274. }
  275. .top_info {
  276. margin: 10rpx 0;
  277. }
  278. .title {
  279. font-size: 28rpx;
  280. font-weight: 600;
  281. color: #333333;
  282. text-align: left;
  283. margin-bottom: 30rpx;
  284. }
  285. .car-container {
  286. // border-bottom: 2rpx solid #EEEEEE;
  287. }
  288. .car-container-item {
  289. background: white;
  290. padding: 10rpx 20rpx;
  291. border-radius: 20rpx;
  292. margin: 20rpx 0;
  293. }
  294. .car-type-item {
  295. display: inline-flex;
  296. // justify-content: center;
  297. width: 33.33%;
  298. margin-bottom: 40rpx;
  299. }
  300. .title {
  301. font-size: 36rpx;
  302. }
  303. }
  304. .bottom-btn {
  305. width: 100%;
  306. position: fixed;
  307. bottom: 0;
  308. display: flex;
  309. z-index: 2;
  310. left: 0;
  311. background-color: #f8f8f8;
  312. flex-direction: column;
  313. .btn1,
  314. .btn2 {
  315. width: 100%;
  316. margin-bottom: 26rpx;
  317. border-radius: 90rpx;
  318. }
  319. .btn1 {
  320. background: white;
  321. color: #00C265;
  322. }
  323. }
  324. .submit {
  325. width: 40%;
  326. background: #22C572;
  327. border-radius: 10rpx;
  328. }
  329. .left {
  330. background: #FEECE6;
  331. color: #FE6430;
  332. }
  333. .center {
  334. background: #EBEEFA;
  335. color: #5C76DF;
  336. }
  337. .right {
  338. background: #E9F8F0;
  339. color: #22C572;
  340. }
  341. .left,
  342. .center,
  343. .right {
  344. width: 50rpx;
  345. height: 50rpx;
  346. text-align: center;
  347. line-height: 50rpx;
  348. border-radius: 10rpx;
  349. }
  350. .textInfo {
  351. margin: 6rpx 0 0 10rpx;
  352. }
  353. .topInfo {
  354. height: 210rpx;
  355. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  356. padding: 30rpx;
  357. .topInfo-item {
  358. height: 158rpx;
  359. background-color: #FFFFFF;
  360. border-radius: 20rpx;
  361. padding: 40rpx;
  362. .logo {
  363. width: 40rpx;
  364. height: 40rpx;
  365. margin-top: 8rpx;
  366. }
  367. .infoText {
  368. font-size: 36rpx;
  369. font-weight: 600;
  370. margin-left: 20rpx;
  371. }
  372. .infoData {
  373. color: #878C9C;
  374. font-size: 26rpx;
  375. margin-top: 10rpx;
  376. }
  377. }
  378. }
  379. .shade {
  380. position: fixed;
  381. top: 0;
  382. left: 0;
  383. height: 100%;
  384. width: 100%;
  385. background: rgba(0, 0, 0, 0.4);
  386. z-index: 3;
  387. .wrap {
  388. position: absolute;
  389. left: 0;
  390. top: 0;
  391. right: 0;
  392. bottom: 0;
  393. margin: auto;
  394. background: #fff;
  395. width: calc(100% - 198rpx);
  396. height: 700rpx;
  397. border-radius: 20rpx;
  398. .alert-top {
  399. padding: 33rpx;
  400. display: flex;
  401. justify-content: center;
  402. align-items: center;
  403. position: relative;
  404. }
  405. .title {
  406. font-size: 32rpx;
  407. font-weight: 600;
  408. color: #333333;
  409. }
  410. .close {
  411. position: absolute;
  412. right: 33rpx;
  413. }
  414. }
  415. }
  416. .cancel,
  417. .confirm {
  418. position: absolute;
  419. display: inline-block;
  420. width: 50%;
  421. text-align: center;
  422. bottom: 0;
  423. padding: 10px;
  424. border-top: 1px solid #eee;
  425. font-size: 34rpx;
  426. }
  427. .cancel {
  428. left: 0;
  429. border-right: 1px solid #eee;
  430. color: #AFB3BF;
  431. }
  432. .confirm {
  433. right: 0;
  434. color: #22C572;
  435. }
  436. .u-textarea-style {
  437. margin: 20rpx;
  438. background: #F9F9FA;
  439. border-radius: 10px;
  440. border: 1px solid #EEEEEE;
  441. padding: 10rpx 20rpx;
  442. position: relative;
  443. .right-bottom {
  444. position: absolute;
  445. right: 20rpx;
  446. bottom: 20rpx;
  447. color: #AFB3BF;
  448. }
  449. }
  450. /deep/.u-input__textarea {
  451. height: 300rpx !important;
  452. }
  453. .person-info {
  454. background: white;
  455. padding: 20rpx 0;
  456. border-radius: 20rpx;
  457. // margin-bottom: 50rpx;
  458. margin: 20rpx 0;
  459. .tit {
  460. font-size: 36rpx;
  461. }
  462. }
  463. .c-row {
  464. display: -webkit-box;
  465. display: -webkit-flex;
  466. display: flex;
  467. -webkit-box-align: center;
  468. -webkit-align-items: center;
  469. align-items: center;
  470. padding: 20rpx 30rpx;
  471. position: relative;
  472. }
  473. .c-row1 {
  474. // display: -webkit-box;
  475. // display: -webkit-flex;
  476. // display: flex;
  477. -webkit-box-align: center;
  478. -webkit-align-items: center;
  479. align-items: center;
  480. padding: 20rpx 30rpx;
  481. position: relative;
  482. }
  483. </style>