freight_settlement_approval.vue 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  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. uni.navigateTo({
  104. url: "/pages/task/my_task"
  105. })
  106. return true;
  107. },
  108. onLoad(options) {
  109. this.id = options.id
  110. this.everyCheck = uni.getStorageSync("everyTask")
  111. this.isSHowBtn = options.isShowbtn
  112. this.getList()
  113. },
  114. methods: {
  115. getList() {
  116. this.$api.doRequest('get', '/tranSettlementReport/getInfo', {
  117. id: this.id
  118. }).then(res => {
  119. this.contractNo = res.data.data.contractNo
  120. this.carId = res.data.data.carId
  121. if (res.data.code == 200) {
  122. this.$api.doRequest('get', '/tranSettlementReport/selectTranSettlementReport', {
  123. compId: "2710b21efc1e4393930c5dc800010dc4",
  124. currentPage: this.currentPage,
  125. pageSize: this.pageSize,
  126. contractNo: this.contractNo,
  127. carId: this.carId,
  128. }).then(res => {
  129. if (res.data.code == 200) {
  130. this.list = res.data.data.records[0]
  131. console.log(this.list, 124)
  132. }
  133. })
  134. }
  135. })
  136. },
  137. close() {
  138. this.show = false
  139. },
  140. pass() {
  141. this.show = true
  142. this.title = '审核意见(通过)'
  143. },
  144. reject() {
  145. this.show = true
  146. this.title = '驳回原因(驳回)'
  147. },
  148. // 驳回
  149. rejectSubmit() {
  150. var that = this
  151. if (!this.rejectInfo) {
  152. this.$api.msg('驳回原因不能为空!')
  153. } else {
  154. this.show = false
  155. uni.showModal({
  156. content: "是否确定驳回?",
  157. showCancel: true,
  158. confirmText: '确定',
  159. success: function(res) {
  160. if (res.confirm) {
  161. that.audit(that.list, 0, false, true, that.rejectInfo)
  162. }
  163. }
  164. })
  165. }
  166. },
  167. //通过
  168. passSubmit() {
  169. var that = this
  170. if (this.title == '驳回原因(驳回)') {
  171. this.rejectSubmit()
  172. } else {
  173. this.show = false
  174. uni.showModal({
  175. content: "是否确定通过?",
  176. showCancel: true,
  177. confirmText: '确定',
  178. success: function(res) {
  179. if (res.confirm) {
  180. that.audit(that.list, 0, true, 2, that.rejectInfo1)
  181. }
  182. }
  183. })
  184. }
  185. },
  186. //审核方法
  187. audit(list, index, status, status2, reason) {
  188. uni.showLoading({
  189. title: "审核中"
  190. })
  191. let that = this
  192. if (this.list) {
  193. this.$api.doRequest('post', '/workflow/api/handle', {
  194. taskId: list.taskId,
  195. approved: status,
  196. auditMind: reason != undefined ? this.rejectInfo : this.rejectInfo1,
  197. needReapply: status2 != undefined ? true : false,
  198. }).then(res => {
  199. if (status == true) {
  200. this.$api.msg('通过成功')
  201. } else if (status == false) {
  202. this.$api.msg('驳回成功')
  203. }
  204. setTimeout(function() {
  205. if (that.everyCheck) {
  206. helper.setAudit(that.list)
  207. } else {
  208. uni.navigateBack()
  209. }
  210. }, 1000);
  211. })
  212. }
  213. },
  214. }
  215. }
  216. </script>
  217. <style scoped lang="scss">
  218. .container {
  219. margin: 10rpx;
  220. padding: 20rpx 20rpx 230rpx 20rpx;
  221. }
  222. .content {
  223. .top {
  224. display: flex;
  225. justify-content: space-between;
  226. border-radius: 20rpx;
  227. background: white;
  228. padding: 30rpx 20rpx;
  229. font-size: 36rpx;
  230. margin-top: 30rpx;
  231. }
  232. .title {
  233. font-size: 28rpx;
  234. font-weight: 600;
  235. color: #333333;
  236. text-align: left;
  237. margin-bottom: 30rpx;
  238. }
  239. .car-container {
  240. padding: 10rpx 20rpx;
  241. border-radius: 20rpx;
  242. background: white;
  243. margin: 30rpx 0;
  244. // border-bottom: 2rpx solid #EEEEEE;
  245. }
  246. .car-type-item {
  247. display: inline-flex;
  248. // justify-content: center;
  249. width: 33.33%;
  250. margin-bottom: 40rpx;
  251. }
  252. .title {
  253. font-size: 36rpx;
  254. }
  255. }
  256. .bottom-btn {
  257. width: 100%;
  258. position: fixed;
  259. bottom: 0;
  260. display: flex;
  261. z-index: 2;
  262. left: 0;
  263. background-color: #f8f8f8;
  264. flex-direction: column;
  265. .btn1,
  266. .btn2 {
  267. width: 100%;
  268. margin-bottom: 26rpx;
  269. border-radius: 90rpx;
  270. }
  271. .btn1 {
  272. background: white;
  273. color: #00C265;
  274. }
  275. }
  276. .submit {
  277. width: 40%;
  278. background: #22C572;
  279. border-radius: 10rpx;
  280. }
  281. .left {
  282. background: #FEECE6;
  283. color: #FE6430;
  284. }
  285. .center {
  286. background: #EBEEFA;
  287. color: #5C76DF;
  288. }
  289. .right {
  290. background: #E9F8F0;
  291. color: #22C572;
  292. }
  293. .left,
  294. .center,
  295. .right {
  296. width: 50rpx;
  297. height: 50rpx;
  298. text-align: center;
  299. line-height: 50rpx;
  300. border-radius: 10rpx;
  301. }
  302. .textInfo {
  303. margin: 6rpx 0 0 10rpx;
  304. }
  305. .topInfo {
  306. height: 210rpx;
  307. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  308. padding: 30rpx;
  309. .topInfo-item {
  310. height: 158rpx;
  311. background-color: #FFFFFF;
  312. border-radius: 20rpx;
  313. padding: 40rpx;
  314. .logo {
  315. width: 40rpx;
  316. height: 40rpx;
  317. margin-top: 8rpx;
  318. }
  319. .infoText {
  320. font-size: 36rpx;
  321. font-weight: 600;
  322. margin-left: 20rpx;
  323. }
  324. .infoData {
  325. color: #878C9C;
  326. font-size: 26rpx;
  327. margin-top: 10rpx;
  328. }
  329. }
  330. }
  331. .shade {
  332. position: fixed;
  333. top: 0;
  334. left: 0;
  335. height: 100%;
  336. width: 100%;
  337. background: rgba(0, 0, 0, 0.4);
  338. z-index: 3;
  339. .wrap {
  340. position: absolute;
  341. left: 0;
  342. top: 0;
  343. right: 0;
  344. bottom: 0;
  345. margin: auto;
  346. background: #fff;
  347. width: calc(100% - 198rpx);
  348. height: 700rpx;
  349. border-radius: 20rpx;
  350. .alert-top {
  351. padding: 33rpx;
  352. display: flex;
  353. justify-content: center;
  354. align-items: center;
  355. position: relative;
  356. }
  357. .title {
  358. font-size: 32rpx;
  359. font-weight: 600;
  360. color: #333333;
  361. }
  362. .close {
  363. position: absolute;
  364. right: 33rpx;
  365. }
  366. }
  367. }
  368. .cancel,
  369. .confirm {
  370. position: absolute;
  371. display: inline-block;
  372. width: 50%;
  373. text-align: center;
  374. bottom: 0;
  375. padding: 10px;
  376. border-top: 1px solid #eee;
  377. font-size: 34rpx;
  378. }
  379. .cancel {
  380. left: 0;
  381. border-right: 1px solid #eee;
  382. color: #AFB3BF;
  383. }
  384. .confirm {
  385. right: 0;
  386. color: #22C572;
  387. }
  388. .u-textarea-style {
  389. margin: 20rpx;
  390. background: #F9F9FA;
  391. border-radius: 10px;
  392. border: 1px solid #EEEEEE;
  393. padding: 10rpx 20rpx;
  394. position: relative;
  395. .right-bottom {
  396. position: absolute;
  397. right: 20rpx;
  398. bottom: 20rpx;
  399. color: #AFB3BF;
  400. }
  401. }
  402. /deep/.u-input__textarea {
  403. height: 300rpx !important;
  404. }
  405. </style>