123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206 |
- <template>
- <view class="warp">
- <view class='content1'>
- <view class='row content-item' >
- <view class="left" style="color: #878C9C ;">仓库</view>
- <view class="right">鲅鱼圈一号库</view>
- </view>
- <view class="content-item">
- <view v-for="(item,index) in List">
- <view class='row row1'>
- <view class="left title">{{item.paymentNo}}</view>
- <view class="right title">{{item.carNo}}</view>
- </view>
- <view class='row'>
- <view class="left goodsInfoCss">{{item.goodsName}}({{item.netWeight}}kg - ¥{{item.tidalGrainPrice}})</view>
- <view class="right priceCss">¥{{item.amountIngPayable}}</view>
- </view>
- </view>
- </view>
- </view>
- <u-toast ref="uToast" />
- <view style='padding:10px;' class='flex bottom-btn'>
- <u-button @click='rejectSubmit()' type="error" class="btn1">驳回</u-button>
- <u-button @click='passSubmit()' type="success" class="btn2">通过</u-button>
- </view>
- </view>
- </template>
- <script>
- import {
- mapState
- } from 'vuex';
- export default {
- data() {
- return {
- id: "",
- currentPage: 1,
- pageSize: 10,
- List: [],
- }
- },
- onLoad(options) {
- this.id = options.id
- },
- onShow(options) {
- this.getList()
- },
- computed: {
- ...mapState(['hasLogin', 'userInfo']),
- },
- methods: {
- getList() {
- // this.$api.doRequest('get', '/stockPurchaseReceiptReport/getInfo', {
- // id:this.id
- // }).then(res => {
- // if (res.data.code == 200) {
- // console.log("hdshfuiehfiuo",res)
- // }
- // })
- this.$api.doRequest('get', '/paymentManagement/selectPaymentManagement', {
- currentPage: this.currentPage,
- pageSize: this.pageSize,
- // warehouseName: this.warehouseName,
- managementType: 1
- }).then(res => {
- if (res.data.code == 200) {
- this.List = res.data.data.records
- }
- })
- },
- //驳回
- rejectSubmit() {
- var that = this
- if (this.List.length > 0) {
- uni.showModal({
- content: "确定驳回付款申请?",
- showCancel: true,
- confirmText: '确定',
- success: function(res) {
- if (res.confirm) {
- that.audit(that.List[0], 0, false, '', '')
- }
- }
- })
- }
- },
- //通過
- passSubmit() {
- var that = this
- uni.showModal({
- content: "确定通过付款申请?",
- showCancel: true,
- confirmText: '确定',
- success: function(res) {
- if (res.confirm) {
- that.audit(that.List[0], 0, true)
- }
- }
- })
- },
- audit(item, index, status, status2, reason) {
- if (this.List.length > 0) {
- if (status == true && item.status == "已驳回") {
- this.$api.doRequest('get', '/paymentManagement/api/openAuditFlow', {
- compId: "2710b21efc1e4393930c5dc800010dc4",
- id: item.id
- }).then(res => {
- if (res.data.code == 200) {
- this.audit(this.List[index + 1], index + 1, status, status2, reason)
- }
- })
- } else {
- this.$api.doRequest('get', '/workflow/api/handle', {
- taskId: item.taskId,
- approved: status,
- auditMind: reason ? '已驳回' : '34',
- needReapply: status2 ? true : false
- }).then(res => {
- if (res.data.code == 200) {
- this.audit(this.List[index + 1], index + 1, status, status2, reason)
- }
- })
- }
- } else {
- if (status == true) {
- that.$api.msg('通过成功')
- this.getList()
- } else if (status == false) {
- that.$api.msg('驳回成功')
- this.getList()
- }
- }
- },
- }
- }
- </script>
- <style scoped lang="scss">
- .warp {
- margin: 10rpx;
- padding: 20rpx 20rpx 200rpx 20rpx;
- }
- .content1{
- .content-item{
- border-radius: 20rpx;
- background: white;
- padding: 40rpx 20rpx;
- margin-bottom: 30rpx;
- }
- .title {
- font-size: 32rpx;
- font-weight: 600;
- color: #333333;
- margin: 30rpx 0;
- }
- .goodsInfoCss{
- font-size: 28rpx;
- font-weight: 600;
- color: #878C9C;
- margin: 26rpx 10rpx;
- }
- .priceCss{
- font-size: 40rpx;
- margin: 26rpx 10rpx;
- color: #22C572;
- font-weight: 600;
- }
- .row {
- display: flex;
- justify-content: space-between;
- border-bottom: 1px solid #EEEEEE;
- .right,
- input {
- font-size: 28rpx;
- // color: #333333;
- }
- }
- }
- .bottom-btn {
- width: 100%;
- position: fixed;
- bottom:0;
- display: flex;
- z-index: 2;
- left: 0;
- background-color: #f8f8f8;
- flex-direction: column;
- .btn1,.btn2{
- width: 100%;
- margin-bottom: 26rpx;
- border-radius: 90rpx;
- }
- .btn1{
- background: white;
- color: #00C265;
- }
- }
- .row1 {
- border-bottom: 0 !important;
- }
- </style>
|