acquisition_settlement_approval.vue 8.9 KB

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