|
@ -1,84 +1,119 @@
|
|
|
<template>
|
|
|
<div class='deviceLog'>
|
|
|
<div class='flex f_y_c p10 c-f14 c-border-b'>
|
|
|
<div style='flex:1' class='flex f_y_c'>
|
|
|
<div class='bgc-fff c-border lh44 h44 plr15 cbr' @click="show1=true">{{$moment(beginDate).format('YYYY-MM-DD')}}</div>
|
|
|
<div class='mlr15 c-333'>至</div>
|
|
|
<div class='bgc-fff c-border lh44 h44 plr15 cbr' @click="show2=true">{{$moment(endDate).format('YYYY-MM-DD')}}</div>
|
|
|
</div>
|
|
|
<van-button class='c-border-r-5 w80' type="info" @click="onSearch">搜索</van-button>
|
|
|
</div>
|
|
|
<!-- <CustomList
|
|
|
<TimePicker @onSearch="onSearch"/>
|
|
|
<CustomList
|
|
|
ref="customList"
|
|
|
:searchfun='false'
|
|
|
@onLoad="onLoad"> -->
|
|
|
<div v-for='(item, index) in list'>
|
|
|
<div class='c-border-b bgc-fff p10 c-333 c-f14 flex f_y_c'>
|
|
|
<div style='flex: 1' class='flex f_y_c f_x_s mr30'>
|
|
|
<div>{{item.content}}</div>
|
|
|
<div>{{item.title}}</div>
|
|
|
</div>
|
|
|
<div>{{item.time}}</div>
|
|
|
</div>
|
|
|
:searchfun="false"
|
|
|
@onLoad="onLoad">
|
|
|
<div class="list plr15 mt10">
|
|
|
<van-collapse v-model="activeNames">
|
|
|
<van-collapse-item
|
|
|
v-for='(item) in list' :key="item.id"
|
|
|
:title="item.orderNum+'('+ item.name +')'" :name="item.id" :value="item.shippingTime">
|
|
|
<div v-for='(citem) in item.shipmentLogs' :key="citem.id" class='item bgc-fff plr10 c-333 c-f14 '>
|
|
|
<div class=''>
|
|
|
<div>药品名称:{{citem.drugName}}</div>
|
|
|
<div>出货状态:<span>{{citem.status==1? '未出货' : citem.status==2? '已出货' : citem.status==3? '出货故障' : ""}}</span></div>
|
|
|
<div>货道信息:{{citem.layerNo}}层 {{citem.wayerNo}}道</div>
|
|
|
<div>出货时间:{{citem.outTime}}</div>
|
|
|
<div>出货日志详情:{{citem.description}}</div>
|
|
|
<div>出货图片:<span v-if="!citem.pic">无出货照片</span>
|
|
|
<van-image
|
|
|
v-else
|
|
|
width="100"
|
|
|
height="100"
|
|
|
:src="setImgUrl(citem.pic)"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</van-collapse-item>
|
|
|
</van-collapse>
|
|
|
|
|
|
|
|
|
</div>
|
|
|
<!-- </CustomList> -->
|
|
|
<van-overlay :show="show1||show2" @click="show1=false,show2 = false" >
|
|
|
<van-datetime-picker
|
|
|
class='c-position-a'
|
|
|
style='bottom:0;width:100%'
|
|
|
v-show='show1'
|
|
|
v-model="beginDate"
|
|
|
type="date"
|
|
|
title="选择开始日期"
|
|
|
:min-date="minDate"
|
|
|
:max-date="maxDate"
|
|
|
/>
|
|
|
<van-datetime-picker
|
|
|
class='c-position-a'
|
|
|
style='bottom:0;width:100%'
|
|
|
v-show='show2'
|
|
|
v-model="endDate"
|
|
|
type="date"
|
|
|
title="选择截止日期"
|
|
|
:min-date="minDate"
|
|
|
:max-date="maxDate"
|
|
|
/>
|
|
|
</van-overlay>
|
|
|
</CustomList>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import TimePicker from './TimePicker'
|
|
|
import medicineAbinetApi from '@/api/api-medicineAbinet'
|
|
|
export default{
|
|
|
name: 'deviceLog',
|
|
|
components: {
|
|
|
TimePicker
|
|
|
},
|
|
|
props: ['deviceId', 'equNum'],
|
|
|
data(){
|
|
|
return {
|
|
|
beginDate: new Date(),
|
|
|
endDate: new Date(),
|
|
|
minDate: this.$moment().add(-1,'years').toDate(),
|
|
|
maxDate: new Date(),
|
|
|
currentDate: '',
|
|
|
list: [],
|
|
|
show1: false,
|
|
|
show2: false,
|
|
|
startDate: '',
|
|
|
endDate: '',
|
|
|
activeNames: []
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
onSearch(){
|
|
|
onLoad({page, pageSize, searchText}){
|
|
|
var { startDate, endDate } = this
|
|
|
var p = {
|
|
|
deviceId: this.deviceId,
|
|
|
|
|
|
// idDevice: '',
|
|
|
// lowT: this.min,
|
|
|
// heightT: this.max,
|
|
|
// equType: searchForm.equType,
|
|
|
// networkStatus: searchForm.networkStatusName,
|
|
|
// content: searchForm.deviceSearch,
|
|
|
// community: len? this.community[len-1] : '',
|
|
|
startTime: startDate? this.$moment(startDate).format('YYYY-MM-DD 00:00:00') : '',
|
|
|
endTime: endDate? this.$moment(endDate).format('YYYY-MM-DD 23:59:59') : '',
|
|
|
page: page,
|
|
|
size: 30
|
|
|
}
|
|
|
console.log('getDeviceOrderInfoPage', p)
|
|
|
medicineAbinetApi
|
|
|
.getDeviceOrderInfoPage(p)
|
|
|
.then(res=>{
|
|
|
console.log('getDeviceOrderInfoPage', res)
|
|
|
if(res.status == 200){
|
|
|
var list = res.detailModelList || []
|
|
|
this.list = page==1? list : this.list.concat(list)
|
|
|
this.$refs.customList.endLoad(list.length===0 || res.totalPage<=page, this.list.length)
|
|
|
} else {
|
|
|
this.onLoadError()
|
|
|
}
|
|
|
}).catch(err=>{
|
|
|
console.error(err)
|
|
|
this.onLoadError()
|
|
|
})
|
|
|
},
|
|
|
onSearch(data){
|
|
|
if(data){
|
|
|
this.startDate = data.startDate
|
|
|
this.endDate = data.endDate
|
|
|
}
|
|
|
this.$refs.customList.refresh(true)
|
|
|
},
|
|
|
onLoadError(){
|
|
|
this.$refs.customList.endLoad(false, true)
|
|
|
},
|
|
|
onLoad({}){
|
|
|
|
|
|
}
|
|
|
},
|
|
|
onLoad(){
|
|
|
this.list = [{content:'改变设备销售状态',title:'设备补货',time:'2020/09/01 10:03:00'},{content:'改变设备销售状态',title:'设备补货',time:'2020/09/01 10:03:00'}]
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped lang='scss'>
|
|
|
.deviceLog{
|
|
|
.cbr{
|
|
|
border-radius: 22px;
|
|
|
.item{
|
|
|
border-bottom: 1px solid #e1e1e1;
|
|
|
padding: 10px 0;
|
|
|
.van-image{
|
|
|
vertical-align: text-top;
|
|
|
}
|
|
|
&:last-child{
|
|
|
padding-bottom: 0;
|
|
|
border-bottom: 0;
|
|
|
}
|
|
|
&:first-child{
|
|
|
padding-top: 0;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</style>
|