|
@ -41,10 +41,20 @@
|
|
|
<van-tab title="设备信息" v-if="info.device">
|
|
|
<DeviceInfo :data="info.device"/>
|
|
|
</van-tab>
|
|
|
<van-tab title="出货拍照" v-if="info.outList&&info.outList.length">
|
|
|
<div class="pl10">
|
|
|
<div class="pic-list" >
|
|
|
<div class="pic-item" v-for="(item, i) in info.outList" :key="i">
|
|
|
<img @click="preview(i)" :src="item.pic" alt="">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</van-tab>
|
|
|
</van-tabs>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import { ImagePreview } from 'vant';
|
|
|
import medicineAbinetApi from '@/api/api-medicineAbinet'
|
|
|
import DeviceInfo from './components/DeviceInfo'
|
|
|
import LogList from './components/LogList'
|
|
@ -77,37 +87,27 @@ export default{
|
|
|
this.$toast.clear()
|
|
|
console.log('getOrderDetailById', res)
|
|
|
if(res.status == 200){
|
|
|
if(res.obj.outList){
|
|
|
res.obj.outList.forEach(v => {
|
|
|
v.pic = this.setImgUrl(v.pic)
|
|
|
});
|
|
|
}
|
|
|
this.info = res.obj
|
|
|
}
|
|
|
})
|
|
|
.catch(err=>{
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
preview(startPosition){
|
|
|
var images = _.map(this.info.outList, v=>{
|
|
|
return v.pic
|
|
|
})
|
|
|
ImagePreview({
|
|
|
images,
|
|
|
startPosition
|
|
|
});
|
|
|
}
|
|
|
// getOrderDetailById(){
|
|
|
// if(!this.id){
|
|
|
// return
|
|
|
// }
|
|
|
// this.loadingForm = true
|
|
|
// console.log('this.id.id', this.id)
|
|
|
// medicineAbinetApi
|
|
|
// .getOrderDetailById({
|
|
|
// orderId: this.id
|
|
|
// })
|
|
|
// .then(res => {
|
|
|
// if(res.obj.drugList){
|
|
|
// res.obj.drugList.forEach(v => {
|
|
|
// v.total = ((v.price * v.drugNum) || 0).toFixed(2)
|
|
|
// });
|
|
|
// }
|
|
|
// this.model = _.assign(this.model, res.obj)
|
|
|
// console.log('getOrderDetailById', this.model)
|
|
|
// this.loadingForm = false
|
|
|
// }).catch(err=>{
|
|
|
// this.loadingForm = false
|
|
|
// console.error(err)
|
|
|
// })
|
|
|
// },
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
@ -132,5 +132,19 @@ export default{
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
.pic-list{
|
|
|
padding: 10px 0;
|
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
|
.pic-item{
|
|
|
width: calc(100% / 4 - 10px);
|
|
|
margin-right: 10px;
|
|
|
margin-bottom: 10px;
|
|
|
img{
|
|
|
width: 100%;
|
|
|
display: block;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</style>
|