<template>
|
<view class="main">
|
<!-- 当前选择仓库 -->
|
<view class="top-tag">
|
<u-tag
|
:text="dataForm.firstClass ? dataForm.firstClass : '请选择仓库'"
|
@click="firstClassSelect"
|
></u-tag>
|
</view>
|
<!-- <u--form labelPosition="top"
|
labelWidth="20%"
|
:borderBottom="false"
|
:model="dataForm"
|
ref="uForm">
|
<u-form-item label="仓库"
|
prop="firstClass"
|
:borderBottom="false">
|
<u-cell-group>
|
<u-cell :title="dataForm.firstClass"
|
value="请选择"
|
@click="firstClassSelect">
|
<u-icon name="arrow-right"
|
slot="right-icon"
|
size="30"></u-icon></u-cell>
|
</u-cell-group>
|
</u-form-item>
|
|
</u--form> -->
|
|
<!-- <view style="margin-top: 20rpx;">
|
<u-button type="primary"
|
shape="circle"
|
text="查看该仓库收发单"
|
@click.stop="formHandle"></u-button>
|
</view> -->
|
<!-- 煤场 -->
|
<view class='div-box'>
|
<u-empty mode="data"
|
icon="http://cdn.uviewui.com/uview/empty/data.png"
|
text="暂无数据"
|
textSize="30"
|
iconSize="1000"
|
v-if="detailData.length===0"></u-empty>
|
<!-- 渲染区域 -->
|
<zh-collapse @change='change' accordion v-for="item,i in detailData"
|
:key="i">
|
<zh-collapse-item
|
class="collItem">
|
<view class="" slot='title'>
|
<view class="history-information">
|
<view class="first">
|
<view class="">{{ item.deptName || '' }}</view>
|
<view class=""><u-icon name="arrow-right"
|
color="#999999"
|
size="40"></u-icon></view>
|
</view>
|
<view class="second">
|
<view class="coal-name">{{ item.coalName || '' }}</view>
|
<view class="order-type">{{ item.orderType || '' }}</view>
|
</view>
|
<view class="third">
|
<view class="third-line">
|
<view class="third-line_text">领取数:</view>
|
<view class="third-line_num">{{ item.cars2 }}</view>
|
</view>
|
<view class="third-line">
|
<view class="third-line_text">剩余数:</view>
|
<view class="third-line_num"
|
v-if="roleType == 1">{{ item.carNumSurplus1 }}</view>
|
<view class="third-line_num"
|
v-else-if="roleType == 2">{{ item.carNumSurplus }}</view>
|
</view>
|
<view class="third-line">
|
<view class="third-line_text">提煤单个数:</view>
|
<view class="third-line_num">{{ item.tmCount }}</view>
|
</view>
|
</view>
|
<view class="fourth">
|
<view class="fourth-icon">
|
<view
|
style="width: 24rpx;height: 24rpx;line-height: 24rpx;background: url('https://mx.jzeg.cn:9096/appimg/image/banner/clock.png') no-repeat;background-size: cover">
|
</view>
|
</view>
|
<view class="senddate">{{ item.sendDate }}</view>
|
</view>
|
<view class="fourth">
|
<view class="fourth-icon">
|
<view
|
style="width: 26rpx;height: 26rpx;line-height: 26rpx;background: url('https://mx.jzeg.cn:9096/appimg/image/banner/carnNUm.png') no-repeat;background-size: cover;">
|
</view>
|
</view>
|
<view class="senddate">{{ item.orderCode }}</view>
|
</view>
|
</view>
|
|
</view>
|
<view class="" slot='cont'>
|
<view class="table">
|
<uni-table border stripe
|
emptyText="暂无更多数据">
|
<uni-tr>
|
<uni-th width='200'
|
align="center">操作</uni-th>
|
<uni-th align="center" width='100'>产品</uni-th>
|
<uni-th align="center">车牌号</uni-th>
|
<uni-th align="center" width='100'>类型</uni-th>
|
<uni-th align="center" width='100'>皮重</uni-th>
|
<uni-th align="center" width='100'>毛重</uni-th>
|
<!-- <uni-th align="center">仓库</uni-th> -->
|
<uni-th align="center" width='100'>状态</uni-th>
|
|
</uni-tr>
|
<uni-tr v-for="(subItem, index) in item.tmTaskCoalList" :key="index">
|
<uni-td align="center">
|
<view class="btnBox">
|
<text @click="viewDetail(subItem)">查看</text>
|
<text v-if="subItem.flag" @click="enterOk(subItem)">确认装卸</text>
|
</view></uni-td>
|
<uni-td align="center">
|
<view class="name">{{ subItem.productName }}</view></uni-td>
|
<uni-td align="center">
|
<view style="width:150rpx">{{ subItem.carNo }}</view></uni-td>
|
<uni-td>
|
<view class="name">{{ subItem.orderType }}</view>
|
</uni-td>
|
<uni-td>
|
<view class="name">{{ subItem.skin }}</view>
|
</uni-td>
|
<uni-td>
|
<view class="name">{{ subItem.hair }}</view>
|
</uni-td>
|
<!--
|
<uni-td align="center">
|
<view>{{ subItem.bunkerName }}</view></uni-td> -->
|
<uni-td align="center">
|
<view class="name">{{ subItem.statusView }}</view></uni-td>
|
|
</uni-tr>
|
</uni-table>
|
</view>
|
</view>
|
</zh-collapse-item>
|
</zh-collapse>
|
|
</view>
|
<u-action-sheet :actions="firstClassActionsList"
|
:show="firstClassShow"
|
cancelText='取消'
|
:closeOnClickOverlay='true'
|
@close='firstClassClose'
|
@select="firstClassSelectClick"></u-action-sheet>
|
<u-modal :show="enterZx"
|
:title="'提示'"
|
@close="closeModal"
|
@cancel="cancelModal"
|
@confirm="confirmModal"
|
:closeOnClickOverlay="true"
|
:showCancelButton="true">
|
<view class="slot-content">
|
是否确认装卸?
|
<view v-if="isNumOk">
|
<text>产品名称:{{activeObj.productName}}</text>
|
<view>
|
<u--input
|
placeholder="请输入数量"
|
border="surround"
|
v-model="checkNum"
|
></u--input>
|
</view>
|
</view>
|
</view>
|
</u-modal>
|
<!-- 煤仓 -->
|
<!-- <u-action-sheet :actions="secondClassActionsList"
|
:show="secondClassShow"
|
cancelText='取消'
|
:closeOnClickOverlay='true'
|
@close='secondClassClose'
|
@select="secondClassSelectClick"></u-action-sheet> -->
|
<!--磅单类型 -->
|
<!-- <u-action-sheet :actions="orderTypeList"
|
:show="orderTypeShow"
|
cancelText='取消'
|
:closeOnClickOverlay='true'
|
@close='orderTypeClose'
|
@select="orderTypeSelectClick"></u-action-sheet> -->
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
dataForm: {
|
firstClass: "",
|
secondClass: "",
|
orderType: '',
|
bunkerId:""
|
},
|
index: '',
|
enterZx:false,
|
isNumOk:false,
|
// 煤场操作菜单
|
firstClassActionsList: [],
|
firstClassShow: false,
|
// 煤仓操作菜单
|
secondClassActionsList: [],
|
secondClassShow: false,
|
coalList: [],
|
checkedCoal: [],
|
checkNum:'',
|
activeObj:{},
|
userInfo: {},
|
detailData:[],
|
filedId: "",
|
selectedCoal: [],
|
orderTypeShow: false,
|
orderTypeList: [{
|
name: '外销',
|
id: Math.floor(Math.random() * 100) + 1,
|
},
|
{
|
name: '外购',
|
id: Math.floor(Math.random() * 100) + 1,
|
}
|
],
|
isOrderType: '请选择', //磅房类型是否选择了 选择了清空
|
cleanIconClick: true, //修改点击清空磅房选择会出现
|
|
};
|
},
|
methods: {
|
viewDetail(item){
|
//查看收发单详情
|
uni.navigateTo({
|
url: `/pages/loadUnload-page/loadUnlaodPageDetail/detail?id=${item.id}&checkId=${item.checkId}`
|
});
|
|
},
|
getUserInfo() {
|
this.$reqGet('getUserEntity').then(res => {
|
this.userInfo = res.data;
|
this.userInfo.password = null
|
})
|
},
|
// 获取煤场
|
getDeptIdFiled() {
|
uni.showLoading({
|
title: "加载中"
|
})
|
this.$reqGet('getWarehouseList').then(res => {
|
uni.hideLoading()
|
if (res.code === 0) {
|
this.firstClassActionsList = res.data;
|
if(res.data.length === 1){
|
this.dataForm.bunkerId = res.data[0].id;
|
uni.setStorageSync('bunkerId',res.data[0].id)
|
this.dataForm.firstClass = res.data[0].name;
|
|
}
|
} else {
|
this.$u.toast('加载失败')
|
}
|
}).then(() => {
|
this.getUserInfo()
|
})
|
},
|
firstClassSelect() {
|
this.firstClassShow = true
|
},
|
firstClassClose() {
|
this.firstClassShow = false
|
},
|
getDetailData(){
|
uni.showLoading({
|
title:'加载中'
|
})
|
this.$reqGet('getTaskCoalListByBunkerId', { bunkerId:this.dataForm.bunkerId }).then(res => {
|
if (res.code === 0) {
|
this.detailData = res.data.map(item=>{
|
item.tmTaskCoalList.map(el=>{
|
el.flag = el.isPretendDischar ? false : true
|
return el
|
})
|
return item;
|
});
|
console.log(this.detailData,'detailData')
|
uni.hideLoading();
|
} else {
|
this.$u.toast('加载失败')
|
}
|
})
|
|
},
|
firstClassSelectClick(val) {
|
this.dataForm.firstClass = val.name;
|
this.dataForm.bunkerId= val.id;
|
uni.setStorageSync('bunkerId', val.id);
|
this.getDetailData();
|
this.filedId = val.id
|
},
|
// 获取煤仓
|
// getFiledIdCoalBunker(filedId) {
|
// this.$reqGet('getFiledIdCoalBunker', { filedId, }).then(res => {
|
// this.secondClassActionsList = res.data
|
// })
|
// },
|
//煤仓菜单
|
// secondClassSelect() {
|
// this.secondClassShow = true
|
// },
|
// secondClassClose() {
|
// this.secondClassShow = false
|
// },
|
// secondClassSelectClick(val) {
|
// this.dataForm.secondClass = val.name
|
// this.coalList = this.secondClassActionsList.find(v => v.id === val.id).coalNames.split(',').map(v => {
|
// return {
|
// name: v,
|
// id: Math.floor(Math.random() * 100) + 1,
|
// checked: false
|
// }
|
// })
|
// },
|
// orderTypeSelect() {
|
// this.orderTypeShow = true
|
// },
|
// orderTypeClose() {
|
// this.orderTypeShow = false
|
// },
|
// orderTypeSelectClick(val) {
|
// this.orderTypeShow = false
|
// this.dataForm.orderType = val.name
|
// this.isOrderType = ''
|
// },
|
// cleanOrderType() {
|
// this.dataForm.orderType = null
|
// this.isOrderType = '请选择'
|
// this.orderTypeShow = false
|
// },
|
// checkboxChange(e) {
|
// this.selectedCoal = e
|
// },
|
formHandle() {
|
if (!this.dataForm.firstClass) return this.$u.toast('请选择煤场或者煤仓');
|
this.$nextTick(()=>{
|
uni.navigateTo({
|
url: `/pages/loadUnload-page/loadUnload-detail/loadUnload-detail?bunkerId=${this.dataForm.bunkerId}`
|
})
|
})
|
|
},
|
change(){
|
|
},
|
close(){
|
|
},
|
open(){},
|
enterOk(item){
|
console.log('123',item)
|
this.activeObj = item;
|
if(item.productQuantity){
|
this.isNumOk = true;
|
}
|
this.enterZx = true;
|
},
|
closeModal(){
|
this.enterZx = false;
|
},
|
cancelModal(){
|
this.enterZx = false;
|
},
|
confirmModal(){
|
this.enterZx = false;
|
this.$reqPost('confirmLoadAndUnload',{
|
id: this.activeObj.id,
|
productQuantity:this.isNumOk ? this.checkNum :this.activeObj.skin,
|
isPretendDischar:this.activeObj.isPretendDischar
|
},'json').then(res=>{
|
console.log(res,'rez')
|
if(res.code === 0){
|
this.$u.toast('操作成功');
|
this.getDetailData();
|
|
}
|
})
|
}
|
|
|
|
},
|
onShow(){
|
uni.showLoading({
|
title: "加载中"
|
})
|
this.$reqGet('getWarehouseList').then(res => {
|
uni.hideLoading()
|
if (res.code === 0) {
|
this.firstClassActionsList = res.data;
|
if(res.data.length === 1){
|
this.dataForm.bunkerId = res.data[0].id;
|
uni.setStorageSync('bunkerId', res.data[0].id)
|
this.dataForm.firstClass = res.data[0].name;
|
|
}
|
} else {
|
this.$u.toast('加载失败')
|
}
|
}).then(() => {
|
this.getUserInfo()
|
})
|
}
|
}
|
</script>
|
|
<style lang="scss"
|
scoped>
|
.name{
|
width: 100rpx;
|
}
|
.table{
|
width: 94%;
|
margin-left: 20rpx;
|
position: relative;
|
overflow-x: auto;
|
/deep/ .uni-table-th{
|
font-size: 12px;
|
}
|
/deep/ .uni-table-td {
|
font-size: 12px;
|
}
|
/deep/ .uni-table{
|
min-width: 340rpx!important;
|
// position: sticky !important;;
|
}
|
/deep/ .uni-table-body-wrapper {
|
position: relative;
|
}
|
/deep/ .uni-table-body {
|
display: flex;
|
}
|
.fixed {
|
position: absolute;
|
right: -35px;
|
background: #fff;
|
}
|
|
}
|
.btnBox{
|
min-width: 150rpx;
|
display: flex;
|
justify-content: space-between;
|
text{
|
color: #035cfb;
|
}
|
}
|
.main {
|
width: 94%;
|
margin: 10px;
|
// margin-top: vww(100);
|
position: relative;
|
top: vww(-160);
|
.top-tag{
|
width: 25%;
|
height: 100rpx;
|
margin-left: 70%;
|
display: flex;
|
/* margin-top: 40rpx; */
|
color: #fff;
|
justify-content: space-between;
|
}
|
|
.div-box{
|
width: 100%;
|
/deep/ .u-collapse{
|
background: #fff;
|
}
|
|
}
|
}
|
|
.slide-fade-enter-active {
|
transition: all 0.3s ease-out;
|
}
|
|
.coal-name {
|
width: 75%;
|
min-height: vww(100);
|
|
.u-checkbox-group {
|
.u-checkbox {}
|
}
|
}
|
.box{
|
display: flex;
|
flex-direction: column;
|
width: 100%;
|
.box-top{
|
width: 100%;
|
height: 100rpx;
|
display: inline-block;
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
|
}
|
}
|
.collItem{
|
margin-top: 30rpx;
|
/deep/ .content{
|
background: none!important;
|
}
|
}
|
.history-information {
|
|
background: #ffffff;
|
border-radius: 20rpx;
|
@include flex flex-direction: column;
|
padding: 10px;
|
align-items: flex-start;
|
justify-content: space-evenly;
|
box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(73, 120, 240, 0.14), 0rpx 7rpx 45rpx 0rpx rgba(73, 120, 240, 0.12);
|
|
|
.first {
|
width: 96%;
|
height: 34rpx;
|
font-size: 32rpx;
|
font-weight: 300;
|
color: #303030;
|
@include flex;
|
margin: vww(10) vww(10) 0;
|
}
|
|
.second {
|
width: 100%;
|
height: 31rpx;
|
font-size: 30rpx;
|
font-weight: 300;
|
color: #515151;
|
margin: vww(10) vww(10) 0;
|
@include flex;
|
justify-content: flex-start;
|
|
.coal-name {
|
min-width: vww(20);
|
height: vww(20);
|
margin-right: vww(21);
|
}
|
|
.order-type {
|
height: 45rpx;
|
color: #035cfb;
|
border: 2px solid #035cfb;
|
border-radius: 4rpx;
|
padding: vww(2) vww(4);
|
text-align: center;
|
}
|
}
|
|
.third {
|
width: 96%;
|
height: 31rpx;
|
font-size: 30rpx;
|
font-weight: 300;
|
color: #515151;
|
margin: vww(10) vww(10) 0;
|
@include flex;
|
|
.third-line {
|
@include flex;
|
|
&_text {
|
color: #919090;
|
}
|
|
&_num {
|
color: #035cfb;
|
}
|
}
|
}
|
|
.fourth {
|
width: 100%;
|
height: 31rpx;
|
font-size: 30rpx;
|
font-weight: 300;
|
color: #515151;
|
margin: vww(10) vww(10) 0;
|
@include flex;
|
|
.fourth-icon {
|
width: vww(13);
|
height: vww(13);
|
margin-right: vww(14);
|
}
|
|
.senddate {
|
flex: 1;
|
}
|
}
|
}
|
</style>
|