This commit is contained in:
parent
3febe161d7
commit
31baa1c667
|
|
@ -135,4 +135,15 @@ export const updateWarehouserEnabled = (params) => {
|
|||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//(业务)获取物料分类树可采购的物料数量(仓库列表使用)
|
||||
export const getTreeDataWlnum = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getTreeDataWlnum`,
|
||||
method: 'get',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,351 @@
|
|||
<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>
|
||||
|
|
@ -277,7 +277,7 @@
|
|||
overflow: hidden;
|
||||
box-shadow: 0rpx 0rpx 1.6vw 0rpx rgba(136,141,153,0.28);
|
||||
border-radius: 2.2vw;
|
||||
top: 6vw;
|
||||
top: 5vw;
|
||||
left: 32vw;
|
||||
position: fixed;
|
||||
z-index: 200;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,249 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="ifclass" v-if="show">
|
||||
<view class="titletop">物料分类</view>
|
||||
<view class="toptype">
|
||||
<view v-for="v in ['一','二','三']">{{v+'级分类'}}</view>
|
||||
</view>
|
||||
<view class="scroltype">
|
||||
<scroll-view scroll-y="true" scroll-with-animation :scroll-top="scroll.scrolltop1"
|
||||
class="scroll-Y scrl1">
|
||||
<view :class="scroll.act1==i?'act':''" v-for="(v,i) in TreeData" @click="typescroll(1,i,v)">
|
||||
<image :src="serverUrl + v.appCheckIconPath" mode="aspectFill" v-if="scroll.act1==i">
|
||||
</image>
|
||||
<image :src="serverUrl + v.appIconPath" mode="aspectFill" v-else></image>
|
||||
<text>
|
||||
{{v.title}}
|
||||
</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<scroll-view scroll-y="true" scroll-with-animation :scroll-top="scroll.scrolltop2"
|
||||
class="scroll-Y scrl2">
|
||||
<view :class="scroll.act2==i?'act':''" v-for="(v,i) in TreeData[scroll.act1]?.children"
|
||||
@click="typescroll(2,i,v)">
|
||||
{{v.title}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view scroll-y="true" scroll-with-animation :scroll-top="scroll.scrolltop3"
|
||||
class="scroll-Y scrl3">
|
||||
<view :class="scroll.act3==i?'act':''"
|
||||
v-for="(v,i) in TreeData[scroll.act1]?.children[scroll.act2]?.children"
|
||||
@click="typescroll(3,i,v)">
|
||||
{{v.title}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
</view>
|
||||
<view class="btnbotm">
|
||||
<view class="bt" @click="typescroll(1,-1,{})" >重置</view>
|
||||
<view class="bt qd" @click="config">确定 <text v-if="num>0">({{num>99?'99+':num}}件物料)</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps } from 'vue';
|
||||
import { getMaterialTreeData , getTreeDataWlnum} from '../api/lunpan.js'
|
||||
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
|
||||
const scroll = reactive({ scrolltop1: 0, scrolltop2: 0, scrolltop3: 0, act1: -1, act2: -1, act3: -1 });
|
||||
const TreeData = ref([]);
|
||||
const serverUrl = ref('');
|
||||
const emit = defineEmits(['confirm'])
|
||||
const typescroll = (e : number, i : number, v : object) => {
|
||||
if (e == 1) {
|
||||
scroll.act2 = -1;
|
||||
scroll.act3 = -1;
|
||||
scroll.scrolltop2 = 0;
|
||||
scroll.scrolltop3 = 0;
|
||||
if (scroll.act1 == i) {
|
||||
scroll.act1 = -1;
|
||||
getTreelnum()
|
||||
return
|
||||
}
|
||||
}
|
||||
if (e == 2) {
|
||||
scroll.act3 = -1;
|
||||
scroll.scrolltop3 = 0;
|
||||
}
|
||||
if (e == 3) {
|
||||
|
||||
}
|
||||
scroll['act' + e] = i;
|
||||
scroll['scrolltop' + e] = (i - 2) * 50;
|
||||
getTreelnum()
|
||||
}
|
||||
onMounted(()=>{
|
||||
serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/';
|
||||
getMaterial();
|
||||
})
|
||||
const num = ref(0)
|
||||
const getTreelnum = ()=>{
|
||||
let obj= {
|
||||
nuId:uni.getStorageSync('nuId'),
|
||||
categoryId:scroll.act1>-1?TreeData.value[scroll.act1].categoryId:'',
|
||||
typeId:scroll.act2>-1?TreeData.value[scroll.act1].children[scroll.act2].typeId:'',
|
||||
medicationId:scroll.act3>-1?TreeData.value[scroll.act1].children[scroll.act2].children[scroll.act3].medicationId:'',
|
||||
}
|
||||
getTreeDataWlnum(obj).then(res=>{
|
||||
num.value = res.result.totalSize;
|
||||
})
|
||||
}
|
||||
const getMaterial = () => {
|
||||
getMaterialTreeData({'nuId':uni.getStorageSync('nuId')}).then(res => {
|
||||
TreeData.value = res.result;
|
||||
getTreelnum()
|
||||
})
|
||||
}
|
||||
const config =()=>{
|
||||
let obj= {
|
||||
categoryId:scroll.act1>-1?TreeData.value[scroll.act1].categoryId:'',
|
||||
typeId:scroll.act2>-1?TreeData.value[scroll.act1].children[scroll.act2].typeId:'',
|
||||
medicationId:scroll.act3>-1?TreeData.value[scroll.act1].children[scroll.act2].children[scroll.act3].medicationId:'',
|
||||
}
|
||||
emit('confirm',obj)
|
||||
}
|
||||
const props = defineProps({
|
||||
show: {
|
||||
type: Boolean,
|
||||
default:false,
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.ifclass{
|
||||
width: 36vw;
|
||||
height: 85vh;
|
||||
position: fixed;
|
||||
z-index: 120;
|
||||
background:rgba(255, 255, 255, 0.98);
|
||||
box-shadow: 0rpx 0rpx 1.3vw 0rpx rgba(163,167,182,0.16);
|
||||
border-radius: 1.6vw;
|
||||
top: 10vh;
|
||||
left: 32vw;
|
||||
padding: 2.5vw 3vw;
|
||||
.btnbotm{
|
||||
width: 100%;
|
||||
height: 4vw;
|
||||
margin-top: 3vw;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: end;
|
||||
.bt{
|
||||
min-width: 8vw;
|
||||
height: 3.8vw;
|
||||
background: #EDEDEF;
|
||||
border-radius: 1.6vw;
|
||||
padding: 0 2vw;
|
||||
margin-left: 1vw;
|
||||
border: 1px solid #EDEDEF;
|
||||
font-size: 1.8vw;
|
||||
font-weight: 400;
|
||||
color: #888888;
|
||||
white-space: nowrap;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.qd{
|
||||
background: linear-gradient(0deg, #CAE0F9, #E9F4FF);
|
||||
border: 1px solid rgba(3,133,250,0.34);
|
||||
color: #0385FA;
|
||||
text{
|
||||
font-size: 1.4vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
.scroltype {
|
||||
width: 100%;
|
||||
height: calc(85vh - 18vw);
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
.scrl1{
|
||||
width: 9vw;
|
||||
view {
|
||||
width: 8.8vw;
|
||||
}
|
||||
|
||||
}
|
||||
.scrl2,.scrl3{
|
||||
width: 8vw;
|
||||
view {
|
||||
width: 7.7vw;
|
||||
}
|
||||
}
|
||||
.scroll-Y {
|
||||
width: 8.5vw;
|
||||
height: calc(85vh - 18vw);
|
||||
|
||||
view {
|
||||
width: 100%;
|
||||
height: 3.8vw;
|
||||
background: #F5F5F8;;
|
||||
border-radius: 1.9vw;
|
||||
font-weight: 400;
|
||||
font-size: 1.3vw;
|
||||
color: #212327;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 0 0.4vw;
|
||||
margin-bottom: .8vw;
|
||||
text-align: center;
|
||||
|
||||
text {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
>image {
|
||||
width: 2vw;
|
||||
height: 2vw;
|
||||
}
|
||||
}
|
||||
|
||||
.act {
|
||||
background: #EAF5FF !important;
|
||||
font-weight: 600;
|
||||
color: #0385FA !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.toptype {
|
||||
width: 100%;
|
||||
height: 2vw;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
margin: 1.4vw 0 .4vw 0;
|
||||
.act {
|
||||
background: rgba(255, 255, 255, 1) !important;
|
||||
font-weight: 600;
|
||||
color: #0385FA !important;
|
||||
}
|
||||
>view {
|
||||
width: 7vw;
|
||||
height: 1.9vw;
|
||||
border-radius: 1vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: rgba(255, 255, 255, .5);
|
||||
border:1px solid rgba(255, 255, 255, .5);
|
||||
font-weight: 400;
|
||||
font-size: 1.2vw;
|
||||
color: #333333;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
.titletop{
|
||||
width: 100%;
|
||||
height: 2.5vw;
|
||||
font-weight: bold;
|
||||
font-size: 1.8vw;
|
||||
color: #333333;
|
||||
line-height: 2.5vw;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
<view @click="search" class="scr">
|
||||
检索
|
||||
</view>
|
||||
<view class="shx">
|
||||
<view class="shx" @click="ification=true">
|
||||
<image src="/static/index/procurement/sx.png" mode="aspectFill"></image>
|
||||
筛选
|
||||
</view>
|
||||
|
|
@ -18,11 +18,12 @@
|
|||
<view class="kjlt">
|
||||
库存预警
|
||||
</view>
|
||||
<scroll-view scroll-x="true" class="kcscrol guodu" :style="qb?'width:46.4vw':''">
|
||||
<view class="yjbox" v-for="(v,i) in 15" :key="i">
|
||||
<image :src="'/static/index/procurement/k.png'" mode="aspectFill"></image>
|
||||
<view>纸尿裤-拉拉裤纸拉拉裤纸拉拉裤纸拉拉裤纸</view>
|
||||
<text class="ytj">已添加</text>
|
||||
<scroll-view scroll-x="true" class="kcscrol guodu" :style="qb?'width:46.4vw':''"
|
||||
scroll-with-animation :scroll-top="scrolltop" @scrolltolower="scrolltolower(1)">
|
||||
<view class="yjbox" v-for="(v,i) in Material" :key="i">
|
||||
<image :src="v.materialImg?serverUrl+v.materialImg:'/static/index/procurement/k.png'" mode="aspectFill"></image>
|
||||
<view>{{v.materialName}}</view>
|
||||
<text class="ytj" v-if="v.isAdd==1">已添加</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="kjlt more guodu" :style="qb?'width:11.2vw':''">
|
||||
|
|
@ -30,7 +31,7 @@
|
|||
{{!qb?'更多':'收起'}}
|
||||
<image src="/static/index/procurement/zjt.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="guodu" :class="qb?'':'righ0'">查看全部</view>
|
||||
<view class="guodu" :class="qb?'':'righ0'" @click="Invenshow = true">查看全部</view>
|
||||
<view class="guodu" :class="qb?'':'righ0'">添加全部</view>
|
||||
|
||||
</view>
|
||||
|
|
@ -70,11 +71,11 @@
|
|||
</view>
|
||||
<view class="listcard">
|
||||
<scroll-view scroll-y="true" class="crdcroll" scroll-with-animation :scroll-top="scrolltop"
|
||||
@scrolltolower="scrolltolower">
|
||||
@scrolltolower="scrolltolower(2)">
|
||||
<view class="fler">
|
||||
<view class="carditem" v-for="(v,index) in InvoicingList" :key="index" >
|
||||
<view class="speitem guodu" :class="v.zk?'spleft':''">
|
||||
<image :src="'/static/index/procurement/k.png'" mode="aspectFill"></image>
|
||||
<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>
|
||||
|
|
@ -112,6 +113,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="add" @click="clkzk(v,index)">
|
||||
<view v-if="v.isAdd==1">已添加</view>
|
||||
<image class="guodu" :src="!v.zk?'/static/index/procurement/+.png':'/static/index/procurement/-.png'" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="zkadd guodu" :class="v.zk?'':'zkf'">
|
||||
|
|
@ -134,75 +136,138 @@
|
|||
<image src="/static/index/procurement/cg.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mengban" v-if="addflag" @click="addflag = false"></view>
|
||||
<calculator :show="addflag" @jjnum="jjnum" :caigouobj="caigouobj" :translateNumber="caigouobj?.Limitnum" :doOnce="caigouobj?.Limitnum" @colse="colse" @right="right"></calculator>
|
||||
<view class="mengban" v-if="addflag" @click="qk"></view>
|
||||
<calculator :show="addflag" @jjnum="jjnum" :caigouobj="caigouobj"
|
||||
:translateNumber="caigouobj?.Limitnum" :doOnce="caigouobj?.Limitnum
|
||||
" @colse="qk" @right="right"></calculator>
|
||||
<view class="mengban" v-if="ification" @click="qk"></view>
|
||||
<classification @confirm="confirm" :show="ification"></classification>
|
||||
<view class="mengban" v-if="Invenshow" @click="Invenshow = false"></view>
|
||||
<Inventory @addcartory="addcartory" :show="Invenshow" :InvoicingList="Material" :status="statustory" @tolower="scrolltolower(1)"></Inventory>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps ,defineComponent} from 'vue';
|
||||
import { queryInvoicingList,updateWarehouserEnabled, getMaterialTreeData, queryNuInfoByNuId, updateKfstatus,queryWlInfoByWlId,addShoppingCartList,queryShoppingCartList } from './api/lunpan.js'
|
||||
import { queryInvoicingList,queryWlInfoByWlId,addShoppingCartList,queryShoppingCartList } from './api/lunpan.js'
|
||||
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
|
||||
import calculator from './components/calculator.vue'
|
||||
import classification from './components/classification.vue'
|
||||
import Inventory from './components/Inventory.vue'
|
||||
const qb = ref(false)
|
||||
const addflag = ref(false)
|
||||
const ification = ref(false)
|
||||
const Invenshow = ref(false)
|
||||
|
||||
|
||||
const InvoicingList = ref([]);
|
||||
const caigouobj = ref({})
|
||||
const status = ref('loading')
|
||||
const statustory = ref('loading')
|
||||
|
||||
const scrolltop = ref(0)
|
||||
const serverUrl = ref('')
|
||||
const form = reactive({
|
||||
nuId: '',
|
||||
nuId: uni.getStorageSync('nuId'),
|
||||
pageNo: 1,
|
||||
pageSize: 9,
|
||||
pageSize: 10,
|
||||
categoryId: '',
|
||||
typeId: '',
|
||||
medicationId: '',
|
||||
wlParamInfo: '',
|
||||
isWaring: 0
|
||||
})
|
||||
const warn = reactive({
|
||||
nuId: uni.getStorageSync('nuId'),
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
categoryId: '',
|
||||
typeId: '',
|
||||
medicationId: '',
|
||||
wlParamInfo: '',
|
||||
isWaring: 1
|
||||
})
|
||||
onLoad(() => {
|
||||
form.nuId = uni.getStorageSync('nuId');
|
||||
serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/';
|
||||
queryInvo();
|
||||
})
|
||||
onShow(()=>{
|
||||
shoppcar()
|
||||
shoppcar();
|
||||
getWaringMaterial()
|
||||
})
|
||||
const Material = ref([])
|
||||
const getWaringMaterial=()=>{
|
||||
queryInvoicingList(warn).then(res => {
|
||||
console.log(res.result)
|
||||
res.result.records.forEach(item=>{
|
||||
item.zk = false;
|
||||
})
|
||||
Material.value.push(...res.result.records);
|
||||
statustory.value = (res.result.total == Material.value.length ? 'nomore' : 'loadmore')
|
||||
setout1.value = (res.result.total == Material.value.length ? false : true)
|
||||
})
|
||||
}
|
||||
const carnum = ref(0)
|
||||
const shoppcar=()=>{
|
||||
let c = {
|
||||
nuId: form.nuId,
|
||||
pageNo: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
}
|
||||
queryShoppingCartList(c).then(resr=>{
|
||||
console.log(resr.result.total)
|
||||
carnum.value = resr.result.total
|
||||
})
|
||||
}
|
||||
const setout = ref(true)
|
||||
const setout1 = ref(true)
|
||||
const setout2 = ref(true)
|
||||
let times = null;
|
||||
const scrolltolower = () => {
|
||||
if (setout.value==false) { return }
|
||||
status.value = 'loading'
|
||||
setout.value = false;
|
||||
form.pageNo++;
|
||||
queryInvo()
|
||||
const scrolltolower = (t:number) => {
|
||||
if(t==1){
|
||||
if (setout1.value==false) { return }
|
||||
setout1.value = false;
|
||||
statustory.value = 'loading'
|
||||
warn.pageNo++;
|
||||
getWaringMaterial()
|
||||
}else{
|
||||
if (setout2.value==false) { return }
|
||||
status.value = 'loading'
|
||||
setout2.value = false;
|
||||
form.pageNo++;
|
||||
queryInvo()
|
||||
}
|
||||
|
||||
// times = setTimeout(() => {
|
||||
// setout.value = true
|
||||
// }, 1000)
|
||||
}
|
||||
const qk = () =>{
|
||||
ification.value = false;
|
||||
addflag.value = false;
|
||||
}
|
||||
const confirm =(e:any)=>{
|
||||
form.categoryId = e.categoryId;
|
||||
form.typeId = e.typeId;
|
||||
form.medicationId = e.medicationId;
|
||||
form.pageNo=1;
|
||||
InvoicingList.value = [];
|
||||
queryInvo();
|
||||
qk()
|
||||
}
|
||||
const search = (x : number) => {
|
||||
if (x === 0) { form.wlParamInfo = '' }
|
||||
form.pageNo = 1;
|
||||
InvoicingList.value = [];
|
||||
queryInvo();
|
||||
}
|
||||
const queryInvo = () => {
|
||||
queryInvoicingList(form).then(res => {
|
||||
res.result.records.forEach(item=>{
|
||||
item.zk = false;
|
||||
})
|
||||
InvoicingList.value.push(...res.result.records);
|
||||
console.log(res.result.records)
|
||||
status.value = (res.result.total == InvoicingList.value.length ? 'nomore' : 'loadmore')
|
||||
setout.value = (res.result.total == InvoicingList.value.length ? false : true)
|
||||
setout2.value = (res.result.total == InvoicingList.value.length ? false : true)
|
||||
})
|
||||
}
|
||||
const clkzk =(v:any,i:number)=>{
|
||||
|
|
@ -216,12 +281,14 @@
|
|||
}
|
||||
})
|
||||
}
|
||||
const addcartory =(e:any)=>{
|
||||
console.log(e)
|
||||
caigouobj.value = e;
|
||||
addflag.value = true;
|
||||
}
|
||||
const addcar = (v:any,i:number)=>{
|
||||
addflag.value = true;
|
||||
}
|
||||
const colse = () => {
|
||||
addflag.value = !addflag.value
|
||||
}
|
||||
const jjnum = (e:number) =>{
|
||||
let n = Number(caigouobj.value.upperLimit)-Number(caigouobj.value.kcsl)
|
||||
if(n==caigouobj.value.Limitnum&&e==1){return}
|
||||
|
|
@ -260,7 +327,6 @@
|
|||
wlId:caigouobj.value.wlId,
|
||||
kcsl:caigouobj.value.kcsl
|
||||
}
|
||||
console.log(dt)
|
||||
addShoppingCartList([dt]).then(res=>{
|
||||
uni.showToast({
|
||||
icon:res.success?'success':'none',
|
||||
|
|
@ -270,7 +336,10 @@
|
|||
timers.value=true;
|
||||
if(res.success){
|
||||
addflag.value = false;
|
||||
shoppcar()
|
||||
shoppcar();
|
||||
if(caigouobj.value.index){
|
||||
Material.value[caigouobj.value.index].isAdd = 1
|
||||
}
|
||||
}
|
||||
},700)
|
||||
})
|
||||
|
|
@ -323,7 +392,7 @@
|
|||
|
||||
.listcard {
|
||||
width: 100%;
|
||||
height: 73vh;
|
||||
height: 70.3vh;
|
||||
margin-top: 1vw;
|
||||
|
||||
.carditem {
|
||||
|
|
@ -332,7 +401,7 @@
|
|||
background: rgba(255, 255, 255, 0.5);
|
||||
border-radius: 1.6vw;
|
||||
position: relative;
|
||||
margin-top: 1.1vw;
|
||||
margin-bottom: 1.1vw;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
justify-content: flex-start;
|
||||
|
|
@ -373,6 +442,21 @@
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
>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;
|
||||
|
|
@ -506,7 +590,7 @@
|
|||
.crdcroll {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
|
||||
.fler {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
|
|
@ -779,8 +863,9 @@
|
|||
image {
|
||||
width: 7vw;
|
||||
height: 7vw;
|
||||
margin: 1vw auto 0;
|
||||
margin: 0.5vw auto 0.5vw;
|
||||
display: block;
|
||||
border-radius: 1vw;
|
||||
}
|
||||
|
||||
>view {
|
||||
|
|
@ -793,6 +878,7 @@
|
|||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
padding: 0 1vw;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -805,7 +891,7 @@
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
margin-top: 0.7vw;
|
||||
.ipt {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
Loading…
Reference in New Issue