123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354 |
- <template>
- <view class="container">
- <view class="topInfo">
- <view class="topInfo-item">
- <view class="flex info">
- <view class="logo">
- <image src="../../../static/img/reject.png" mode="" v-if="list[0].status == '已驳回'"
- style="height: 40rpx;"></image><!-- 驳回 -->
- <image src="../../../static/img/tongguo.png" mode="" v-if="list[0].status == '已通过'"
- style="height: 40rpx;"></image><!-- 通过 -->
- <image src="../../../static/img/daishenhe.png" mode=""
- v-if="list[0].status == '审核中'||list[0].status == '未审核'" style="height: 40rpx;"></image>
- <!-- 待审核 -->
- </view>
- <view class="infoText">{{list[0].status}}</view>
- </view>
- <view class="infoData">{{list[0].warehousingDate}}</view>
- </view>
- </view>
- <view class="content">
- <view class="top content-item">
- <view>{{contractNo}} ({{goodsName}})</view>
- <view>{{unitPrice}}元/吨</view>
- </view>
- <view class="content-item">
- <view class="car-container" v-for="(item,index) in list">
- <view class="car-num title">{{item.carNo}}</view>
- <view class="row">
- <view class="left car-type-item">净重</view>
- <view class="right weightInfoCss">{{item.netWeight}} 吨</view>
- </view>
- <view class="row">
- <view class="left car-type-item">结重</view>
- <view class="right weightInfoCss">{{item.settlementWeight}} 吨</view>
- </view>
- <view class="row">
- <view class="left car-type-item">扣款</view>
- <view class="right weightInfoCss">
- ¥{{item.deductionAmountchange?item.deductionAmountchange:"0"}}/吨</view>
- </view>
- <view class="row ">
- <view class="left money">应付</view>
- <view class="right moneyInfo">¥{{item.amountIngPayable}}元</view>
- </view>
- </view>
- </view>
- </view>
- <u-popup v-model="show1" mode="center">
- <view style="width: 300px;padding: 30rpx 10rpx;border-radius: 20rpx;">
- <view class="rejectText">审核意见(驳回)</view>
- <u-input v-model="rejectInfo" type="textarea" :border="border" :height="height"
- :auto-height="autoHeight" class="rejectInfoCss" placeholder="请输入审核意见" />
- <view class="flex">
- <u-button @click="show1 = false" type="error" hover-class='none'>取消</u-button>
- <u-button @click="rejectSubmit()" type="success">确定</u-button>
- </view>
- </view>
- </u-popup>
- <u-popup v-model="show2" mode="center">
- <view style="width: 300px;padding: 30rpx 10rpx;border-radius: 20rpx;">
- <view class="rejectText">审核意见(通过)</view>
- <u-input v-model="rejectInfo1" type="textarea" :border="border" :height="height"
- :auto-height="autoHeight" class="rejectInfoCss" placeholder="请输入审核意见" />
- <view class="flex">
- <u-button @click="show2 = false" type="error" hover-class='none'>取消</u-button>
- <u-button @click="passSubmit()" type="success">确定</u-button>
- </view>
- </view>
- </u-popup>
- <u-toast ref="uToast" />
- <view style='padding:10px;' class='flex bottom-btn'>
- <u-button v-if='isSHowBtn' @click='show1 = true' type="error" class="btn1" hover-class='none'>驳回</u-button>
- <u-button v-if='isSHowBtn' @click='show2 = true' type="success" class="btn2">通过</u-button>
- </view>
- </view>
- </template>
- <script>
- import helper from '@/common/helper.js';
- export default {
- data() {
- return {
- isSHowBtn: true,
- everyCheck: '',
- id: "",
- currentPage: 1,
- pageSize: 10,
- list: [{
- status: "",
- }],
- contractNo: "",
- rejectInfo: "",
- rejectInfo1: "",
- show1: false,
- show2: false,
- height: 200,
- autoHeight: true,
- border: false,
- unitPrice: "",
- goodsName: "",
- }
- },
- onBackPress(e) {
- uni.navigateTo({
- url: "/pages/task/my_task"
- })
- return true;
- },
- onLoad(options) {
- this.everyCheck = uni.getStorageSync("everyTask")
- this.id = options.id
- this.isSHowBtn = options.isShowbtn
- this.getList()
- },
- methods: {
- getList(id) {
- this.$api.doRequest('get', '/stockPurchaseReceiptReport/getInfo', {
- id: this.id
- }).then(res => {
- this.contractNo = res.data.data.contractNo
- this.unitPrice = res.data.data.price
- this.goodsName = res.data.data.goodsName
- if (res.data.code == 200) {
- this.$api.doRequest('get', '/stockPurchaseReceiptReport/selectPurchaseOrder', {
- compId: "2710b21efc1e4393930c5dc800010dc4",
- currentPage: this.currentPage,
- pageSize: this.pageSize,
- contractNo: this.contractNo,
- }).then(res => {
- if (res.data.code == 200) {
- this.list = res.data.data.records
- }
- })
- }
- })
- },
- //驳回
- rejectSubmit() {
- var that = this
- if (this.list.length == 0) {
- that.$api.msg('没有要审核的条目!')
- } else {
- if (!this.rejectInfo) {
- this.$api.msg('驳回原因不能为空!')
- } else {
- that.show1 = false
- uni.showModal({
- content: "是否确定驳回?",
- showCancel: true,
- confirmText: '确定',
- success: function(res) {
- if (res.confirm) {
- that.audit(that.list[0], 0, false, true, '已驳回')
- }
- }
- })
- }
- }
- },
- //通过
- passSubmit() {
- var that = this
- if (this.list.length == 0) {
- that.$api.msg('没有要审核的条目!')
- } else {
- if (!this.rejectInfo1) {
- this.$api.msg('审核意见不能为空!')
- } else {
- that.show2 = false
- uni.showModal({
- content: "是否确定通过?",
- showCancel: true,
- confirmText: '确定',
- success: function(res) {
- if (res.confirm) {
- that.audit(that.list[0], 0, true, 2)
- }
- }
- })
- }
- }
- },
- //审核方法
- audit(item, index, status, status2, reason) {
- uni.showLoading({
- title: "审核中"
- })
- if (index < this.list.length) {
- this.$api.doRequest('post', '/workflow/api/handle', {
- taskId: item.taskId,
- approved: status,
- auditMind: reason != undefined ? this.rejectInfo : this.rejectInfo1,
- needReapply: status2 != undefined ? true : false,
- }).then(res => {
- this.audit(this.list[index + 1], index + 1, status)
- })
- } else {
- if (status == true) {
- that.$api.msg('通过成功')
- } else if (status == false) {
- that.$api.msg('驳回成功')
- }
- setTimeout(function() {
- if (that.everyCheck) {
- helper.setAudit(that.list)
- } else {
- uni.navigateBack()
- }
- uni.hideLoading()
- }, 1000);
- }
- },
- }
- }
- </script>
- <style scoped lang="scss">
- .container {
- padding: 20rpx 20rpx 250rpx 20rpx;
- }
- .content {
- margin-top: 30rpx;
- .top {
- display: flex;
- justify-content: space-between;
- }
- .content-item {
- border-radius: 20rpx;
- background: white;
- padding: 40rpx 20rpx;
- margin-bottom: 30rpx;
- }
- .title {
- font-size: 32rpx;
- font-weight: 600;
- color: #333333;
- text-align: left;
- margin: 20rpx 0;
- }
- .car-container {
- border-bottom: 2rpx solid #EEEEEE;
- }
- .car-type-item {
- font-size: 28rpx;
- margin: 20rpx 0;
- color: #878C9C;
- }
- .weightInfoCss {
- font-size: 28rpx;
- color: #333333;
- font-weight: 500;
- }
- .row {
- display: flex;
- justify-content: space-between;
- // .right,
- // input {
- // font-size: 28rpx;
- // // color: #333333;
- // }
- }
- .money {
- font-size: 32rpx;
- font-weight: 500;
- margin-bottom: 30rpx;
- }
- .moneyInfo {
- color: #22C572;
- font-size: 32rpx;
- }
- }
- .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;
- }
- }
- .topInfo {
- height: 210rpx;
- background: linear-gradient(270deg, #22C572 0%, #34DE8A 100%);
- padding: 30rpx;
- .topInfo-item {
- height: 150rpx;
- background-color: #FFFFFF;
- border-radius: 20rpx;
- padding: 40rpx;
- .logo {
- width: 40rpx;
- height: 40rpx;
- margin-top: 8rpx;
- }
- .infoText {
- font-size: 36rpx;
- font-weight: 600;
- margin-left: 20rpx;
- }
- .infoData {
- color: #878C9C;
- font-size: 26rpx;
- margin-top: 10rpx;
- }
- }
- }
- .rejectInfoCss {
- border: 1px solid #ccc;
- border-radius: 10rpx;
- background-color: #F9F9FA;
- // height: 100px;
- overflow-y: auto;
- margin: 30rpx;
- }
- .rejectText {
- text-align: center;
- }
- /deep/.u-input__textarea {
- height: 300rpx !important;
- }
- </style>
|