acquisition_settlement_approval.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  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 == '待决策人审核'"
  13. style="height: 40rpx;"></image><!-- 待审核 -->
  14. </view>
  15. <view class="infoText">{{status}}</view>
  16. </view>
  17. <view class="infoData">{{updateDate}}</view>
  18. </view>
  19. </view>
  20. <view class='content1'>
  21. <view class='row content-item'>
  22. <view class="left" style="color: #878C9C ;">仓库</view>
  23. <view class="right">{{warehouseName}}</view>
  24. </view>
  25. <view class="content-item">
  26. <view v-for="(item,index) in List">
  27. <view class='row row1'>
  28. <view class="left title">{{item.paymentNo}}</view>
  29. <view class="right title">{{item.carNo}}</view>
  30. </view>
  31. <view class='row'>
  32. <view class="left goodsInfoCss">{{item.goodsName}}({{item.netWeight}}kg -
  33. ¥{{item.tidalGrainPrice}})</view>
  34. <view class="right priceCss">¥{{item.amountIngPayable}}</view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. <u-popup v-model="show1" mode="center">
  40. <view style="width: 300px;padding: 30rpx 10rpx;border-radius: 20rpx;">
  41. <view class="rejectText">审核意见(驳回)</view>
  42. <u-input v-model="rejectInfo" type="textarea" :border="border" class="rejectInfoCss"
  43. placeholder="请输入审核意见" />
  44. <view class="flex">
  45. <u-button @click="show1 = false" type="error" hover-class='none'>取消</u-button>
  46. <u-button @click="rejectSubmit()" type="success">确定</u-button>
  47. </view>
  48. </view>
  49. </u-popup>
  50. <u-popup v-model="show2" mode="center">
  51. <view style="width: 300px;padding: 30rpx 10rpx;border-radius: 20rpx;">
  52. <view class="rejectText">审核意见(通过)</view>
  53. <u-input v-model="rejectInfo1" type="textarea" :border="border" :height="height" :auto-height="autoHeight" class="rejectInfoCss"
  54. placeholder="请输入审核意见" />
  55. <view class="flex">
  56. <u-button @click="show2 = false" type="error" hover-class='none'>取消</u-button>
  57. <u-button @click="passSubmit()" type="success">确定</u-button>
  58. </view>
  59. </view>
  60. </u-popup>
  61. <u-toast ref="uToast" />
  62. <view style='padding:10px;' class='flex bottom-btn'>
  63. <!-- getRoles("acquisitionQuality.initial") -->
  64. <u-button @click='show1 = true' type="error" class="btn1" hover-class='none'>驳回</u-button>
  65. <u-button @click='show2 = true' type="success" class="btn2">通过</u-button>
  66. <!-- <u-button @click='rejectSubmit()' type="error" class="btn1" hover-class='none'>驳回</u-button>
  67. <u-button @click='passSubmit()' type="success" class="btn2">通过</u-button> -->
  68. </view>
  69. </view>
  70. </template>
  71. <script>
  72. import {
  73. mapState
  74. } from 'vuex';
  75. export default {
  76. data() {
  77. return {
  78. height: 200,
  79. autoHeight: true,
  80. border: false,
  81. show2:false,
  82. show1:false,
  83. id: "",
  84. currentPage: 1,
  85. pageSize: 100,
  86. rejectInfo: "", //审核驳回意见
  87. rejectInfo1: "", //审核通过意见
  88. List: [{
  89. approveStatus: "",
  90. }],
  91. status: "",
  92. updateDate:"",
  93. warehouseName:"",
  94. }
  95. },
  96. onLoad(options) {
  97. this.id = options.id
  98. },
  99. onShow(options) {
  100. this.getList()
  101. },
  102. computed: {
  103. ...mapState(['hasLogin', 'userInfo']),
  104. },
  105. methods: {
  106. getList() {
  107. //查仓库名
  108. this.$api.doRequest('get', '/paymentManagement/getInfo', {
  109. id: this.id
  110. }).then(res => {
  111. if (res.data.code == 200) {
  112. this.status = res.data.data.approveStatus
  113. this.updateDate = res.data.data.updateDate
  114. this.warehouseName = res.data.data.warehouseName
  115. this.$api.doRequest('get', '/paymentManagement/selectPaymentManagement', {
  116. currentPage: this.currentPage,
  117. pageSize: this.pageSize,
  118. warehouseName: res.data.data.warehouseName,
  119. managementType: 1
  120. }).then(res1 => {
  121. if (res1.data.code == 200) {
  122. this.List = res1.data.data.records
  123. }
  124. })
  125. }
  126. })
  127. },
  128. //驳回
  129. rejectSubmit() {
  130. if (!this.rejectInfo) {
  131. this.$api.msg('驳回原因不能为空!')
  132. }else{
  133. var that = this
  134. that.show1 = false
  135. if (this.List.length > 0) {
  136. uni.showModal({
  137. content: "确定驳回付款申请?",
  138. showCancel: true,
  139. confirmText: '确定',
  140. success: function(res) {
  141. if (res.confirm) {
  142. that.audit(that.List[0], 0, false, '', '')
  143. }
  144. }
  145. })
  146. }
  147. }
  148. },
  149. //通過
  150. passSubmit() {
  151. if (!this.rejectInfo1) {
  152. this.$api.msg('审核意见不能为空!')
  153. }else{
  154. var that = this
  155. this.show2 = false
  156. uni.showModal({
  157. content: "确定通过付款申请?",
  158. showCancel: true,
  159. confirmText: '确定',
  160. success: function(res) {
  161. if (res.confirm) {
  162. that.audit(that.List[0], 0, true)
  163. }
  164. }
  165. })
  166. }
  167. },
  168. audit(item, index, status, status2, reason) {
  169. if (this.List.length > 0) {
  170. if (status == true && item.status == "已驳回") {
  171. this.$api.doRequest('get', '/paymentManagement/api/openAuditFlow', {
  172. compId: "2710b21efc1e4393930c5dc800010dc4",
  173. id: item.id
  174. }).then(res => {
  175. if (res.data.code == 200) {
  176. this.audit(this.List[index + 1], index + 1, status, status2, reason)
  177. }
  178. })
  179. } else {
  180. this.$api.doRequest('post', '/workflow/api/handle', {
  181. taskId: item.taskId,
  182. approved: status,
  183. auditMind: reason ? this.rejectInfo : this.rejectInfo1,
  184. needReapply: status2 ? true : false
  185. }).then(res => {
  186. if (res.data.code == 200) {
  187. this.audit(this.List[index + 1], index + 1, status, status2, reason)
  188. }
  189. })
  190. }
  191. } else {
  192. if (status == true) {
  193. that.$api.msg('通过成功')
  194. setTimeout(function() {
  195. uni.navigateBack()
  196. }, 1000);
  197. } else if (status == false) {
  198. that.$api.msg('驳回成功')
  199. setTimeout(function() {
  200. uni.navigateBack()
  201. }, 1000);
  202. }
  203. }
  204. },
  205. }
  206. }
  207. </script>
  208. <style scoped lang="scss">
  209. .warp {
  210. margin: 10rpx;
  211. padding: 20rpx 20rpx 240rpx 20rpx;
  212. }
  213. .content1 {
  214. margin-top: 30rpx;
  215. .content-item {
  216. border-radius: 20rpx;
  217. background: white;
  218. padding: 40rpx 20rpx;
  219. margin-bottom: 30rpx;
  220. }
  221. .title {
  222. font-size: 32rpx;
  223. font-weight: 600;
  224. color: #333333;
  225. margin: 30rpx 0;
  226. }
  227. .goodsInfoCss {
  228. font-size: 28rpx;
  229. font-weight: 600;
  230. color: #878C9C;
  231. margin: 26rpx 10rpx;
  232. }
  233. .priceCss {
  234. font-size: 40rpx;
  235. margin: 26rpx 10rpx;
  236. color: #22C572;
  237. font-weight: 600;
  238. }
  239. .row {
  240. display: flex;
  241. justify-content: space-between;
  242. border-bottom: 1px solid #EEEEEE;
  243. .right,
  244. input {
  245. font-size: 28rpx;
  246. // color: #333333;
  247. }
  248. }
  249. }
  250. .bottom-btn {
  251. width: 100%;
  252. position: fixed;
  253. bottom: 0;
  254. display: flex;
  255. z-index: 2;
  256. left: 0;
  257. background-color: #f8f8f8;
  258. flex-direction: column;
  259. .btn1,
  260. .btn2 {
  261. width: 100%;
  262. margin-bottom: 26rpx;
  263. border-radius: 90rpx;
  264. }
  265. .btn1 {
  266. background: white;
  267. color: #00C265;
  268. }
  269. }
  270. .row1 {
  271. border-bottom: 0 !important;
  272. }
  273. .topInfo {
  274. height: 210rpx;
  275. background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
  276. padding: 30rpx;
  277. .topInfo-item {
  278. height: 150rpx;
  279. background-color: #FFFFFF;
  280. border-radius: 20rpx;
  281. padding: 40rpx;
  282. .logo {
  283. width: 40rpx;
  284. height: 40rpx;
  285. margin-top: 8rpx;
  286. }
  287. .infoText {
  288. font-size: 36rpx;
  289. font-weight: 600;
  290. margin-left: 20rpx;
  291. }
  292. .infoData {
  293. color: #878C9C;
  294. font-size: 26rpx;
  295. margin-top: 10rpx;
  296. }
  297. }
  298. }
  299. .rejectInfoCss {
  300. border: 1px solid #ccc;
  301. border-radius: 10rpx;
  302. background-color: #F9F9FA;
  303. // height: 100px;
  304. overflow-y: auto;
  305. margin: 30rpx;
  306. }
  307. .rejectText {
  308. text-align: center;
  309. }
  310. /deep/.u-input__textarea{
  311. height: 300rpx!important;
  312. }
  313. </style>