freight_settlement_approval.vue 9.4 KB

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