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