<template>
|
<view class="zhijian-bangfang-wrap">
|
<view class="bangfang-btns">
|
<view class="btn" v-for="(item,index) in bangfangList" :key="index">
|
<u-button type="primary" @click="handleBangfangClick(item)">{{item.name}}</u-button>
|
</view>
|
</view>
|
<view class="bangfang-liebiao-main" v-if="liebiaoList && liebiaoList.length > 0">
|
<view class="collection-form-item"
|
v-for="(item, index) in liebiaoList"
|
:key="index">
|
<view class="first-line">
|
<view class="dispatch-receive">
|
<view class="dispatch">{{ item.filedName||'' }}</view>
|
</view>
|
<view class="point-number"
|
v-if="roleType == 1">
|
<text class="residue">{{ item.cars2||'' }}</text>
|
<text>/{{ item.carNum ||''}}</text>
|
</view>
|
</view>
|
<view class="second-line">
|
<view class="coal-name">
|
<view class="">{{ item.coalName ||''}}</view>
|
<view class="black-bar"></view>
|
<view class="coal-type"
|
v-if="item.orderType">{{ item.orderType||'' }}</view>
|
</view>
|
</view>
|
<view class="second-line">
|
<view class="coal-name">
|
<view class="">{{ item.orderCode ||''}}</view>
|
</view>
|
</view>
|
<view class="second-line">
|
|
<text class="car-num " style="font-size: 28rpx;">供应商:{{ item.customerName }}</text>
|
|
</view>
|
<!-- 添加创建时间 -->
|
<view class="second-line">
|
|
<text class="car-num " style="font-size: 28rpx;">创建时间:</text>
|
|
<view style="font-size: 28rpx;">{{ item.createTime }}</view>
|
</view>
|
<view class="second-line justyflyItem">
|
<text class="car-num " style="font-size: 28rpx;">司机:{{ item.xsUser1Name }}</text>
|
</view>
|
<view class="second-line justyflyItem">
|
<text class="car-num " style="font-size: 28rpx;">复磅:{{ item.remarks }}</text>
|
</view>
|
<view class="second-line justyflyEndItem">
|
<view class="agreeBtn">
|
<u-button type="primary" :loading="agreeModalShow" loadingText="确认中" @click="agreeWeighClick(item)">同意复磅</u-button>
|
</view>
|
<view class="agreeBtn">
|
<u-button :loading="disAgreeModalShow" loadingText="确认中" @click="disAgreeWeighClick(item)">拒绝复磅</u-button>
|
</view>
|
</view>
|
|
</view>
|
</view>
|
<tab-bar :current="1"></tab-bar>
|
</view>
|
|
</template>
|
|
<script>
|
|
export default {
|
name: "zhijian-bangfang",
|
data() {
|
return {
|
bangfangList:[],
|
liebiaoList: [],
|
agreeModalShow: false,
|
disAgreeModalShow: false,
|
}
|
},
|
onShow() {
|
this.getPoundRoomByList()
|
this.getReWeighList()
|
},
|
methods: {
|
agreeWeighClick(item) { //同意复磅
|
console.log(item,'item----')
|
let params = {
|
deptId: item.deptId,
|
filedId: item.filedId,
|
tmId: item.id
|
}
|
this.agreeModalShow = true
|
this.$reqPost('agreeWeigh', params, 'json').then(res => {
|
console.log(res, '同意');
|
if (res.code == 0) {
|
this.$u.toast(res.msg ? res.msg : '同意');
|
this.agreeModalShow = false;
|
this.getReWeighList() //刷新列表
|
} else {
|
this.$u.toast(res.msg ? res.msg : '失败');
|
this.agreeModalShow = false;
|
}
|
}).finally(() => {
|
this.agreeModalShow = false
|
})
|
},
|
disAgreeWeighClick(item) {
|
let params = {
|
deptId: item.deptId,
|
filedId: item.filedId,
|
tmId: item.id
|
}
|
this.agreeModalShow = true
|
this.$reqPost('disAgreeWeigh', params, 'json').then(res => {
|
console.log(res, '拒绝');
|
if (res.code == 0) {
|
this.$u.toast(res.msg ? res.msg : '拒绝完成');
|
this.agreeModalShow = false;
|
this.getReWeighList() //刷新列表
|
} else {
|
this.$u.toast(res.msg ? res.msg : '失败');
|
this.agreeModalShow = false;
|
}
|
}).finally(() => {
|
this.agreeModalShow = false
|
})
|
},
|
getReWeighList() {
|
this.$reqGet('getReWeighList').then(res => {
|
if(res.code == 0) {
|
this.liebiaoList = res.data
|
}
|
})
|
},
|
getPoundRoomByList() {
|
this.$reqGet('getPoundRoomsByZJY').then(res => {
|
console.log(res,'磅房列表====')
|
if(res.data) {
|
this.bangfangList = res.data
|
}
|
})
|
},
|
handleBangfangClick(item) {
|
console.log(item,'点击磅房-----')
|
uni.navigateTo({
|
url: `/pages/driver-page/driver-index/bill-of-lading-details/nocarNoWeighingDevice/nocarNoWeighingDevice?houseId=${item.id}&weighHouseCode=${item?.code}`
|
})
|
}
|
},
|
onPullDownRefresh() {
|
this.getPoundRoomByList()
|
this.getReWeighList()
|
setTimeout(() => {
|
uni.stopPullDownRefresh()
|
}, 1000);
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
::v-deep{
|
.u-button--normal{
|
font-size: 28rpx!important;
|
padding: 0 24rpx!important;
|
}
|
.u-button{
|
height: 74rpx!important;
|
}
|
}
|
page{
|
width: 100%;
|
height: 100%;
|
}
|
.zhijian-bangfang-wrap{
|
width: 100%;
|
display: flex;
|
flex-direction: column;
|
}
|
.bangfang-btns{
|
width: 100%;
|
height: 100%;
|
display: flex;
|
flex-wrap: wrap;
|
.btn{
|
width: 210rpx;
|
height: 100%;
|
margin: 10rpx 20rpx;
|
align-content: flex-start;
|
padding-top: 20rpx;
|
box-sizing: border-box;
|
}
|
}
|
.collection-form-item {
|
width: 690rpx;
|
background: #ffffff;
|
box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
|
border-radius: 20rpx;
|
overflow: hidden;
|
@include flex;
|
flex-direction: column;
|
position: relative;
|
align-items: flex-start;
|
margin: vww(10) auto;
|
padding: 20rpx 0;
|
box-sizing: border-box;
|
|
.first-line {
|
width: 100%;
|
height: vww(30);
|
padding: 20rpx;
|
box-sizing: border-box;
|
display: flex;
|
justify-content: space-between;
|
|
.dispatch-receive {
|
width: 70%;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
}
|
|
.point-number {
|
width: 15%;
|
|
text {
|
font-size: 24rpx;
|
font-weight: 400;
|
color: #c78a64;
|
}
|
|
.residue {
|
font-size: 40rpx;
|
font-weight: 400;
|
color: #f81414;
|
}
|
}
|
}
|
|
.second-line {
|
width: 100%;
|
height: vww(30);
|
padding: 20rpx;
|
box-sizing: border-box;
|
display: flex;
|
align-items: center;
|
justify-content: flex-start;
|
|
.coal-name {
|
flex-grow: 1;
|
height: 30rpx;
|
font-size: 30rpx;
|
font-weight: 300;
|
color: #515151;
|
position: relative;
|
display: flex;
|
align-items: center;
|
|
.black-bar {
|
width: 2rpx;
|
height: 30rpx;
|
background: #515151;
|
margin-left: vww(12);
|
}
|
|
.coal-type {
|
margin-left: vww(12);
|
min-width: vww(50);
|
height: 30rpx;
|
line-height: 30rpx;
|
font-size: 30rpx;
|
font-weight: 300;
|
color: #515151;
|
}
|
}
|
}
|
|
.third-line {
|
width: 80%;
|
height: vww(30);
|
padding: 20rpx;
|
box-sizing: border-box;
|
display: flex;
|
justify-content: flex-start;
|
align-items: center;
|
|
.send-date {
|
margin-left: vww(14);
|
width: 148rpx;
|
height: 24rpx;
|
line-height: 24rpx;
|
font-size: 28rpx;
|
font-weight: 300;
|
color: #515151;
|
}
|
|
.car-num {
|
color: #515151;
|
white-space: nowrap;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
}
|
}
|
|
.fourth-line {
|
@include flex;
|
justify-content: flex-end;
|
|
.receive,
|
.forward {
|
|
@include flex;
|
justify-content: center;
|
color: #ffffff;
|
font-size: 28rpx;
|
position: absolute;
|
|
.button-image {
|
border: 1px solid #3b56eb;
|
border-radius: 40rpx;
|
width: vww(90);
|
height: vww(28);
|
background-size: 100% 100%;
|
font-size: 28rpx;
|
font-weight: 300;
|
color: #ffffff;
|
text-align: center;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
margin-right: 20rpx;
|
}
|
}
|
|
.receive {
|
left: vww(20);
|
}
|
|
.forward {
|
@include flex;
|
|
.button-image {
|
font-size: 28rpx;
|
font-weight: 300;
|
color: #3b56eb;
|
text-align: center;
|
}
|
}
|
|
}
|
.justyflyItem{
|
width: 100%;
|
justify-content: space-between;
|
}
|
.justyflyEndItem{
|
width: 100%;
|
display: flex;
|
justify-content: flex-end;
|
.agreeBtn{
|
margin-right: 20rpx;
|
}
|
::v-deep{
|
.u-button{
|
border-radius: 50rpx;
|
padding: 0 36rpx!important;
|
height: 68rpx!important;
|
}
|
|
}
|
}
|
}
|
</style>
|