352 lines
8.4 KiB
Vue
352 lines
8.4 KiB
Vue
<template>
|
|
<view>
|
|
<view class="qbkyj" v-if="show">
|
|
<view class="titletop">全部库存预警</view>
|
|
<scroll-view scroll-y="true" class="crdcroll" scroll-with-animation :scroll-top="scrolltop"
|
|
@scrolltolower="scrolltolower">
|
|
<view class="fler">
|
|
<view class="carditem" v-for="(v,index) in InvoicingList" :key="index" >
|
|
<view class="speitem guodu" :class="v.zk?'spleft':''">
|
|
<image :src="v.materialImg?serverUrl+v.materialImg:'/static/index/procurement/k.png'" mode="aspectFill"></image>
|
|
<view class="cardp">
|
|
<view v-if="v.categoryId_dictText">{{v.categoryId_dictText}}</view>
|
|
<view v-if="v.typeId_dictText">{{v.typeId_dictText}}</view>
|
|
<view v-if="v.medicationName">{{v.medicationName}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="msitem guodu" :style="v.zk?'margin-left:2.5vw':''">
|
|
<view>
|
|
<view>{{v.materialName}}</view><text>{{v.materialNo}}</text>
|
|
</view>
|
|
<view>
|
|
<text> 规格型号: {{v.specificationModel}}</text>
|
|
</view>
|
|
<view>
|
|
<text v-if="v.multiUnitType=='1'">采购单价: ¥{{v.oneUnitPrice}} </text>
|
|
<text v-if="v.multiUnitType=='1'">采购单位: {{ v.oneUnit}}</text>
|
|
<text v-if="v.multiUnitType=='2'">采购单价: ¥{{v.twoUnitPrice}} </text>
|
|
<text v-if="v.multiUnitType=='2'">采购单位: {{ v.twoUnit}}</text>
|
|
<text v-if="v.multiUnitType=='3'">采购单价: ¥{{v.referenceUnitPrice}} </text>
|
|
<text v-if="v.multiUnitType=='3'">采购单位: {{ v.materialUnits}}</text>
|
|
</view>
|
|
<view>
|
|
<view>
|
|
<text>{{v.kcsl}}</text>
|
|
<text>库存数量</text>
|
|
</view>
|
|
<view>
|
|
<text >{{v.upperLimit}}</text>
|
|
<text>物料上限 ↑</text>
|
|
</view>
|
|
<view>
|
|
<text >{{v.lowerLimit}}</text>
|
|
<text>↓ 物料下限</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="add" @click="clkzk(v,index)">
|
|
<view v-if="v.isAdd==1">已添加</view>
|
|
<image class="guodu" :style="v.zk?'transform: rotate(180deg);':''" :src="'/static/index/procurement/l.png'" mode="aspectFill"></image>
|
|
</view>
|
|
<view class="zkadd guodu" :class="v.zk?'':'zkf'">
|
|
<view>出入库</view>
|
|
<view @click="addcar(v)">加购物车</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view style="height:3vw;width: 100%;display: flex;align-items: center;justify-content: center;">
|
|
<u-loadmore :status="status" :loadText="{nomore:'暂无更多数据'}" v-if="InvoicingList.length>6"/>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps ,defineComponent} from 'vue';
|
|
import { queryInvoicingList,queryWlInfoByWlId,addShoppingCartList,queryShoppingCartList } from '../api/lunpan.js'
|
|
const form = reactive({
|
|
nuId: uni.getStorageSync('nuId'),
|
|
pageNo: 1,
|
|
pageSize: 10,
|
|
categoryId: '',
|
|
typeId: '',
|
|
medicationId: '',
|
|
wlParamInfo: '',
|
|
isWaring: 1
|
|
})
|
|
const props = defineProps({
|
|
InvoicingList: {
|
|
type: Array,
|
|
required: true
|
|
},
|
|
status:{
|
|
type:String
|
|
},
|
|
show: {
|
|
type: Boolean,
|
|
default:false,
|
|
required: true,
|
|
},
|
|
})
|
|
const emit = defineEmits(['addcartory','tolower'])
|
|
const serverUrl = ref('')
|
|
onMounted(()=>{
|
|
serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/';
|
|
})
|
|
const setout1 = ref(true)
|
|
const scrolltolower = () => {
|
|
emit('tolower')
|
|
}
|
|
const caigouobj = ref({})
|
|
const clkzk =(v:any,i:number)=>{
|
|
caigouobj.value = v;
|
|
caigouobj.value.Limitnum = Number(caigouobj.value?.upperLimit)-Number(caigouobj.value.kcsl);
|
|
caigouobj.value.index = i;
|
|
props.InvoicingList.forEach((item,k)=>{
|
|
if(k==i){
|
|
item.zk = !item.zk;
|
|
}else{
|
|
item.zk = false;
|
|
}
|
|
})
|
|
}
|
|
const addcar = (v:any)=>{
|
|
emit('addcartory',caigouobj.value)
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
|
|
.carditem {
|
|
width: 47vw;
|
|
height: 14.5vw;
|
|
background: rgba(245, 246, 248, 1);
|
|
border-radius: 1.6vw;
|
|
position: relative;
|
|
margin-bottom: 1.1vw;
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: flex-start;
|
|
.zkf{
|
|
right:-10vw !important;
|
|
}
|
|
.zkadd{
|
|
width: 10vw;
|
|
height: 100%;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
view{
|
|
width: 5vw;
|
|
height: 100%;
|
|
font-weight: 400;
|
|
font-size: 1.3vw;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
&:nth-child(2){
|
|
background: #1083F8;
|
|
color: #fff;
|
|
padding: 1.1vw;
|
|
}
|
|
&:nth-child(1){
|
|
background: #C2C4C9;
|
|
color: #555555;
|
|
}
|
|
}
|
|
}
|
|
.add{
|
|
width: 6vw;
|
|
height: 100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
position: relative;
|
|
>view{
|
|
width: 4.5vw;
|
|
height: 1.8vw;
|
|
background: #E3EEF7;
|
|
border-radius: 0.9vw;
|
|
border: 1px solid rgba(3, 133, 250, 0.34);
|
|
font-weight: 400;
|
|
font-size: 1.1vw;
|
|
color: #1083F8;
|
|
text-align: center;
|
|
line-height: 1.75vw;
|
|
position: absolute;
|
|
top: 0.8vw;
|
|
right: 0.8vw;
|
|
}
|
|
image{
|
|
width: 3.2vw;
|
|
height: 3.2vw;
|
|
}
|
|
}
|
|
.msitem{
|
|
width: 25vw;
|
|
height: 100%;
|
|
padding: 1vw;
|
|
>view{
|
|
margin-top: 0.5vw;
|
|
&:nth-child(4){
|
|
width: 100%;
|
|
height: 3.4vw;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
>view{
|
|
width: 33.3%;
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
position: relative;
|
|
align-items: center;
|
|
&:nth-child(1){
|
|
width: 30%;
|
|
text-align: left;
|
|
}
|
|
&:nth-child(2){
|
|
width: 40%;
|
|
text-align: center;
|
|
}
|
|
&:nth-child(3){
|
|
width: 30%;
|
|
text-align: right;
|
|
}
|
|
&:nth-child(2)::after{
|
|
content: '';
|
|
position: absolute;
|
|
right: 0;
|
|
width: 100%;
|
|
height: 2.2vw;
|
|
border-left: 1px solid #C9C9C9;
|
|
border-right: 1px solid #C9C9C9;
|
|
top: 0.6vw;
|
|
}
|
|
text{
|
|
&:nth-child(1){
|
|
font-weight: bold;
|
|
font-size: 1.7vw;
|
|
color: #555555;
|
|
}
|
|
&:nth-child(2){
|
|
font-weight: 400;
|
|
font-size: 1.1vw;
|
|
color: #999999;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
&:nth-child(2),&:nth-child(3){
|
|
display: flex;
|
|
justify-content: space-between;
|
|
text{
|
|
font-weight: 400;
|
|
font-size: 1.4vw;
|
|
color: #777777;
|
|
margin-top: 0.35vw;
|
|
}
|
|
}
|
|
&:nth-child(1){
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
height: 2vw;
|
|
>view{
|
|
width: 19vw;
|
|
height: 2vw;
|
|
font-weight: bold;
|
|
font-size: 1.6vw;
|
|
color: #222222;
|
|
text-overflow:ellipsis;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
}
|
|
text{
|
|
width: 6vw;
|
|
font-weight: 300;
|
|
font-size: 1.4vw;
|
|
color: #222222;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.spleft{
|
|
margin-left: -15vw !important;
|
|
}
|
|
.speitem{
|
|
width: 15vw;
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
.cardp{
|
|
width: 12.5vw;
|
|
height: 4vw;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
margin: 0 auto;
|
|
align-items: center;
|
|
view{
|
|
width: 5.5vw;
|
|
height: 1.8vw;
|
|
border-radius: 0.9vw;
|
|
border: 1px solid #D2D2D2;
|
|
margin: 0.5vw 0 0 0.5vw;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
font-weight: 400;
|
|
font-size: 1vw;
|
|
color: #555555;
|
|
}
|
|
}
|
|
>image{
|
|
width: 9vw;
|
|
height: 8vw;
|
|
margin: 1vw auto 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
.crdcroll {
|
|
width: 100%;
|
|
height: calc(85vh - 6.5vw);
|
|
|
|
.fler {
|
|
display: grid;
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.qbkyj{
|
|
width: 51vw;
|
|
height: 85vh;
|
|
background: #FFFFFF;
|
|
box-shadow: 0rpx 0rpx 0.7vw 0rpx rgba(182,186,196,0.29);
|
|
border-radius: 1.6vw;
|
|
position: fixed;
|
|
top: 8vh;
|
|
left: 24.5vw;
|
|
z-index: 103;
|
|
padding: 2vw;
|
|
}
|
|
.titletop{
|
|
width: 100%;
|
|
height: 2.5vw;
|
|
font-weight: bold;
|
|
font-size: 1.8vw;
|
|
color: #333333;
|
|
line-height: 2.5vw;
|
|
}
|
|
.guodu {
|
|
transition: .4s;
|
|
-webkit-transform-style: preserve-3d;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
</style>
|