freight_settlement_approval.vue 11 KB

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