|
@@ -4,51 +4,49 @@
|
|
|
<view class="topInfo-item">
|
|
|
<view class="flex info">
|
|
|
<view class="logo">
|
|
|
- <image src="../../../static/img/reject.png" mode="" v-if="list[0].approveStatus == '已驳回'"
|
|
|
+ <image src="../../../static/img/reject.png" mode="" v-if="list.approveStatus == '已驳回'"
|
|
|
style="height: 40rpx;"></image><!-- 驳回 -->
|
|
|
- <image src="../../../static/img/tongguo.png" mode="" v-if="list[0].approveStatus == '已通过'"
|
|
|
+ <image src="../../../static/img/tongguo.png" mode="" v-if="list.approveStatus == '已通过'"
|
|
|
style="height: 40rpx;"></image><!-- 通过 -->
|
|
|
- <image src="../../../static/img/daishenhe.png" mode="" v-if="list[0].approveStatus == '待决策人审核'|| list[0].approveStatus == '待财务审核'"
|
|
|
+ <image src="../../../static/img/daishenhe.png" mode="" v-if="list.approveStatus == '待决策人审核'|| list.approveStatus == '待财务审核'"
|
|
|
style="height: 40rpx;"></image><!-- 待审核 -->
|
|
|
</view>
|
|
|
- <view class="infoText">{{list[0].approveStatus}}</view>
|
|
|
+ <view class="infoText">{{list.approveStatus}}</view>
|
|
|
</view>
|
|
|
- <view class="infoData">{{list[0].updateDate}}</view>
|
|
|
+ <view class="infoData">{{list.updateDate}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="content">
|
|
|
<view class="top">
|
|
|
<view>合同编号</view>
|
|
|
- <view>{{list[0].contractNo}}</view>
|
|
|
+ <view>{{list.contractNo}}</view>
|
|
|
</view>
|
|
|
<view class="car-container">
|
|
|
- <view v-for="(item,index) in list" style="border-bottom: 2rpx solid #EEEEEE;margin-top: 30rpx;">
|
|
|
- <view class="car-num title">{{item.carNo}} ({{item.tranCarNo}})</view>
|
|
|
+ <view class="car-num title">{{list.carNo}} ({{list.tranCarNo}})</view>
|
|
|
<view class="car-type-item">
|
|
|
<view class="left">装</view>
|
|
|
- <view class="textInfo">{{item.loadingWeight}}吨</view>
|
|
|
+ <view class="textInfo">{{list.loadingWeight}}吨</view>
|
|
|
</view>
|
|
|
<view class="car-type-item">
|
|
|
<view class="center">卸</view>
|
|
|
- <view class="textInfo">{{item.unloadingWeight}}吨</view>
|
|
|
+ <view class="textInfo">{{list.unloadingWeight}}吨</view>
|
|
|
</view>
|
|
|
<view class="car-type-item">
|
|
|
<view class="right">结</view>
|
|
|
- <view class="textInfo">{{item.settlementWeight}}吨</view>
|
|
|
+ <view class="textInfo">{{list.settlementWeight}}吨</view>
|
|
|
</view>
|
|
|
<view class="car-type-item">
|
|
|
<view class="left">运</view>
|
|
|
- <view class="textInfo">{{item.transportPrice}}元/吨</view>
|
|
|
+ <view class="textInfo">{{list.transportPrice}}元/吨</view>
|
|
|
</view>
|
|
|
<view class="car-type-item">
|
|
|
<view class="center">扣</view>
|
|
|
- <view class="textInfo">{{item.deductionAmount}}元</view>
|
|
|
+ <view class="textInfo">{{list.deductionAmount}}元</view>
|
|
|
</view>
|
|
|
<view class="car-type-item">
|
|
|
<view class="right">付</view>
|
|
|
- <view class="textInfo">{{item.amountIngPayable}}元</view>
|
|
|
+ <view class="textInfo">{{list.amountIngPayable}}元</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<u-popup v-model="show1" mode="center">
|
|
@@ -101,92 +99,93 @@
|
|
|
border: false,
|
|
|
}
|
|
|
},
|
|
|
- onLoad() {
|
|
|
+ onLoad(options) {
|
|
|
+ this.id = options.id
|
|
|
this.getList()
|
|
|
},
|
|
|
methods: {
|
|
|
getList() {
|
|
|
- this.$api.doRequest('get', '/tranSettlementReport/selectTranSettlementReport', {
|
|
|
- compId: "2710b21efc1e4393930c5dc800010dc4",
|
|
|
- currentPage: this.currentPage,
|
|
|
- pageSize: this.pageSize,
|
|
|
- contractNo: "全部合同"
|
|
|
+ this.$api.doRequest('get', '/tranSettlementReport/getInfo', {
|
|
|
+ id: this.id
|
|
|
}).then(res => {
|
|
|
+ this.contractNo = res.data.data.contractNo
|
|
|
+ this.carId = res.data.data.carId
|
|
|
if (res.data.code == 200) {
|
|
|
- this.list = res.data.data.records
|
|
|
+ this.$api.doRequest('get', '/tranSettlementReport/selectTranSettlementReport', {
|
|
|
+ compId: "2710b21efc1e4393930c5dc800010dc4",
|
|
|
+ currentPage: this.currentPage,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ contractNo: this.contractNo,
|
|
|
+ carId:this.carId,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ this.list= res.data.data.records[0]
|
|
|
+ console.log(this.list,124)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
// 驳回
|
|
|
rejectSubmit() {
|
|
|
var that = this
|
|
|
- if (this.list.length == 0) {
|
|
|
- this.$api.msg('没有要审核的条目!')
|
|
|
- } else {
|
|
|
- if (!this.rejectInfo) {
|
|
|
- this.$api.msg('驳回原因不能为空!')
|
|
|
- }else{
|
|
|
- this.show1 = false
|
|
|
- uni.showModal({
|
|
|
- content: "是否确定驳回?",
|
|
|
- showCancel: true,
|
|
|
- confirmText: '确定',
|
|
|
- success: function(res) {
|
|
|
- if (res.confirm) {
|
|
|
- that.audit(that.list[0], 0, false, true, '已驳回')
|
|
|
- }
|
|
|
+ if (!this.rejectInfo) {
|
|
|
+ this.$api.msg('驳回原因不能为空!')
|
|
|
+ }else{
|
|
|
+ this.show1 = false
|
|
|
+ uni.showModal({
|
|
|
+ content: "是否确定驳回?",
|
|
|
+ showCancel: true,
|
|
|
+ confirmText: '确定',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ that.audit(that.list, 0, false, true, that.rejectInfo)
|
|
|
}
|
|
|
- })
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
//通过
|
|
|
passSubmit() {
|
|
|
var that = this
|
|
|
- if (this.list.length == 0) {
|
|
|
- this.$api.msg('没有要审核的条目!')
|
|
|
- } else {
|
|
|
- if (!this.rejectInfo1) {
|
|
|
- this.$api.msg('审核意见不能为空!')
|
|
|
- }else{
|
|
|
- this.show2 = false
|
|
|
- uni.showModal({
|
|
|
- content: "是否确定通过?",
|
|
|
- showCancel: true,
|
|
|
- confirmText: '确定',
|
|
|
- success: function(res) {
|
|
|
- if (res.confirm) {
|
|
|
- that.audit(that.list[0], 0, true, 2)
|
|
|
- }
|
|
|
+ if (!this.rejectInfo1) {
|
|
|
+ this.$api.msg('审核意见不能为空!')
|
|
|
+ }else{
|
|
|
+ this.show2 = false
|
|
|
+ uni.showModal({
|
|
|
+ content: "是否确定通过?",
|
|
|
+ showCancel: true,
|
|
|
+ confirmText: '确定',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ that.audit(that.list, 0, true, 2,that.rejectInfo1)
|
|
|
}
|
|
|
- })
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
//审核方法
|
|
|
- audit(item, index, status, status2, reason) {
|
|
|
- if (index < this.list.length) {
|
|
|
+ audit(list, index, status, status2, reason) {
|
|
|
+ if (this.list) {
|
|
|
this.$api.doRequest('post', '/workflow/api/handle', {
|
|
|
- taskId: item.taskId,
|
|
|
+ taskId: list.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)
|
|
|
+ if (status == true) {
|
|
|
+ this.$api.msg('通过成功')
|
|
|
+ setTimeout(function() {
|
|
|
+ uni.navigateBack()
|
|
|
+ }, 1000);
|
|
|
+ } else if (status == false) {
|
|
|
+ this.$api.msg('驳回成功')
|
|
|
+ setTimeout(function() {
|
|
|
+ uni.navigateBack()
|
|
|
+ }, 1000);
|
|
|
+ }
|
|
|
})
|
|
|
- } else {
|
|
|
- if (status == true) {
|
|
|
- this.$api.msg('通过成功')
|
|
|
- setTimeout(function() {
|
|
|
- uni.navigateBack()
|
|
|
- }, 1000);
|
|
|
- } else if (status == false) {
|
|
|
- this.$api.msg('驳回成功')
|
|
|
- setTimeout(function() {
|
|
|
- uni.navigateBack()
|
|
|
- }, 1000);
|
|
|
- }
|
|
|
}
|
|
|
},
|
|
|
}
|