You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
263 lines
5.8 KiB
Vue
263 lines
5.8 KiB
Vue
2 years ago
|
<template>
|
||
|
<view class="container">
|
||
|
<view class="tui-searchbox">
|
||
|
<view class="tui-search-input">
|
||
|
<icon type="search" :size='20' color='#333'></icon>
|
||
|
<input confirm-type="search" placeholder="请输入箱号" :focus="true" auto-focus
|
||
|
placeholder-class="tui-input-plholder" class="tui-input" v-model.trim="postData.CNTRNO"
|
||
|
@confirm="getInfo" />
|
||
|
<icon type="clear" :size='20' color='#bcbcbc' @tap="cleanCNTRNO" v-show="postData.CNTRNO"></icon>
|
||
|
</view>
|
||
|
<!-- <view class="tui-search-input">
|
||
|
<icon type="search" :size='20' color='#333'></icon>
|
||
|
<input confirm-type="search" placeholder="请输入车号" :focus="true" auto-focus
|
||
|
placeholder-class="tui-input-plholder" class="tui-input" v-model.trim="postData.TRUCKNO"
|
||
|
@confirm="getInfo" />
|
||
|
<icon type="clear" :size='20' color='#bcbcbc' @tap="cleanTRUCKNO" v-show="postData.TRUCKNO"></icon>
|
||
|
</view> -->
|
||
|
</view>
|
||
|
|
||
|
<view>
|
||
|
<uni-badge style="margin-left: 20rpx;margin-bottom: 20rpx" v-if="info" v-for="(item,index) in info" :key="index" :text="item.count" absolute="rightTop" size="small">
|
||
|
<uni-tag :inverted="true" :text="item.name" type="primary"></uni-tag>
|
||
|
</uni-badge>
|
||
|
</view>
|
||
|
<uni-card v-if="list" v-for="(item,index) in list" :title="item.worktype" :key="index">
|
||
|
<view class="example">
|
||
|
<uni-forms ref="form" :modelValue="item" label-position="left">
|
||
|
<uni-forms-item label="执行日期" name="dodate">
|
||
|
<uni-easyinput type="text" :disabled="true" v-model="item.dodate" />
|
||
|
</uni-forms-item>
|
||
|
<uni-forms-item label="箱号" name="boxCode">
|
||
|
<uni-easyinput type="text" :disabled="true" v-model="item.boxCode" />
|
||
|
</uni-forms-item>
|
||
|
<!-- <uni-forms-item label="承运车号" name="truckno">
|
||
|
<uni-easyinput type="text" :disabled="true" v-model="item.truckno" />
|
||
|
</uni-forms-item> -->
|
||
|
<!-- <uni-forms-item label="库位" name="areaname">
|
||
|
<uni-easyinput type="text" :disabled="true" v-model="item.areaname" />
|
||
|
</uni-forms-item> -->
|
||
|
<uni-forms-item label="状态" name="workstatus">
|
||
|
<uni-easyinput type="text" :disabled="true" v-model="item.workstatus" />
|
||
|
</uni-forms-item>
|
||
|
</uni-forms>
|
||
|
</view>
|
||
|
</uni-card>
|
||
|
</view>
|
||
|
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
info: [],
|
||
|
loadData: [],
|
||
|
pageIndex: 1,
|
||
|
loadding: false,
|
||
|
pullUpOn: true,
|
||
|
isShow: false,
|
||
|
postData: {
|
||
|
CNTRNO: "",
|
||
|
TRUCKNO: "",
|
||
|
PageIndex: 1,
|
||
|
PageSize: 5
|
||
|
},
|
||
|
skipData: {
|
||
|
WMSPLANID: "",
|
||
|
},
|
||
|
key: "",
|
||
|
list: [],
|
||
|
type: ''
|
||
|
}
|
||
|
},
|
||
|
onShow() {
|
||
|
this.list = []
|
||
|
this.skipData.type = ''
|
||
|
this.postData.CNTRNO = ''
|
||
|
this.postData.TRUCKNO = ''
|
||
|
this.getInfo()
|
||
|
},
|
||
|
methods: {
|
||
|
back: function() {
|
||
|
uni.navigateBack();
|
||
|
},
|
||
|
cleanCNTRNO: function() {
|
||
|
this.postData.CNTRNO = ''
|
||
|
},
|
||
|
cleanTRUCKNO: function() {
|
||
|
this.postData.TRUCKNO = ''
|
||
|
},
|
||
|
getInfo: function() {
|
||
|
uni.showLoading()
|
||
|
console.log(this.postData)
|
||
|
this.tui.request("/App/GetOpWorkDetail", "POST", this.postData, false, false, false)
|
||
|
.then((
|
||
|
res) => {
|
||
|
console.log(res)
|
||
|
if (res.succeeded) {
|
||
|
// this.list = res.data[0]
|
||
|
this.list = this.list.concat(res.data)
|
||
|
uni.hideLoading()
|
||
|
} else {
|
||
|
this.tui.toast(res.message, 2000, 'none')
|
||
|
}
|
||
|
}).catch((err) => {
|
||
|
console.log(err)
|
||
|
this.tui.toast('异常:' + err, 2000, 'none')
|
||
|
uni.hideLoading()
|
||
|
})
|
||
|
},
|
||
|
|
||
|
//页面相关事件处理函数--监听用户下拉动作
|
||
|
onPullDownRefresh: function() {
|
||
|
//this.newsList = this.loadData;
|
||
|
this.list = []
|
||
|
this.postData.PageIndex = 1;
|
||
|
this.getInfo()
|
||
|
this.pullUpOn = true;
|
||
|
this.loadding = false;
|
||
|
uni.stopPullDownRefresh();
|
||
|
this.tui.toast("刷新成功");
|
||
|
},
|
||
|
|
||
|
// 页面上拉触底事件的处理函数
|
||
|
onReachBottom: function() {
|
||
|
if (!this.pullUpOn) return;
|
||
|
this.loadding = true;
|
||
|
this.postData.PageIndex = this.postData.PageIndex + 1;
|
||
|
this.getInfo();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style>
|
||
|
.example {
|
||
|
padding: 15px;
|
||
|
background-color: #fff;
|
||
|
}
|
||
|
|
||
|
.button-group {
|
||
|
margin-top: 15px;
|
||
|
display: flex;
|
||
|
justify-content: space-around;
|
||
|
}
|
||
|
|
||
|
.form-item {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
}
|
||
|
|
||
|
.button {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
height: 35px;
|
||
|
margin-left: 10px;
|
||
|
}
|
||
|
|
||
|
/* @import '../../static/style/thorui.css'; */
|
||
|
.tui-msg-box {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
}
|
||
|
|
||
|
.tui-msg-pic {
|
||
|
width: 100rpx;
|
||
|
height: 100rpx;
|
||
|
border-radius: 50%;
|
||
|
display: block;
|
||
|
margin-right: 24rpx;
|
||
|
flex-shrink: 0;
|
||
|
}
|
||
|
|
||
|
.tui-msg-item {
|
||
|
max-width: 500rpx;
|
||
|
/* min-height: 100rpx; */
|
||
|
overflow: hidden;
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
justify-content: space-between;
|
||
|
}
|
||
|
|
||
|
.tui-msg-name {
|
||
|
overflow: hidden;
|
||
|
white-space: nowrap;
|
||
|
text-overflow: ellipsis;
|
||
|
font-size: 45rpx;
|
||
|
line-height: 2;
|
||
|
justify-content: space-between;
|
||
|
color: #262b3a;
|
||
|
}
|
||
|
|
||
|
.tui-item-box {
|
||
|
width: 100%;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
}
|
||
|
|
||
|
.tui-list-cell_name {
|
||
|
padding-left: 20rpx;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
justify-content: center;
|
||
|
}
|
||
|
|
||
|
.tui-ml-auto {
|
||
|
margin-left: auto;
|
||
|
}
|
||
|
|
||
|
.tui-right {
|
||
|
margin-left: auto;
|
||
|
margin-right: 34rpx;
|
||
|
font-size: 26rpx;
|
||
|
color: #999;
|
||
|
}
|
||
|
|
||
|
.tui-logo {
|
||
|
height: 52rpx;
|
||
|
width: 52rpx;
|
||
|
flex-shrink: 0;
|
||
|
}
|
||
|
</style>
|
||
|
<style lang='scss'>
|
||
|
.tui-searchbox {
|
||
|
padding: 30rpx 0;
|
||
|
box-sizing: border-box;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
}
|
||
|
|
||
|
.tui-search-input {
|
||
|
width: 100%;
|
||
|
height: 66rpx;
|
||
|
border-radius: 35rpx;
|
||
|
padding: 0 30rpx;
|
||
|
box-sizing: border-box;
|
||
|
background: #f2f2f2;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
flex-wrap: nowrap;
|
||
|
}
|
||
|
|
||
|
.tui-input {
|
||
|
flex: 1;
|
||
|
color: #333;
|
||
|
padding: 0 16rpx;
|
||
|
font-size: 28rpx;
|
||
|
}
|
||
|
|
||
|
.tui-input-plholder {
|
||
|
font-size: 28rpx;
|
||
|
color: #b2b2b2;
|
||
|
}
|
||
|
|
||
|
.fr-btn {
|
||
|
float: right;
|
||
|
height: 60upx;
|
||
|
font-size: 28upx;
|
||
|
line-height: 60upx;
|
||
|
margin: 14upx 0;
|
||
|
}
|
||
|
</style>
|