This commit is contained in:
wangweidong 2026-01-21 13:57:02 +08:00
parent 3911d8fae0
commit 217943be81
2 changed files with 88 additions and 9 deletions

View File

@ -24,7 +24,7 @@
</view>
<view class="bx" style="align-items: flex-end;">
<view>采购日期</view>
<text>{{list.qgDate.substring(0,10)}}</text>
<text>{{list.qgDate?.substring(0,10)}}</text>
</view>
</view>
<view class="top">
@ -68,8 +68,11 @@
</view>
</view>
</view>
<view class="swtab" >
<view v-for="(v,i) in ['全部',' 挂账','销账']" :key="i" :class="dex==i?'act guodu':'guodu'" @click="naurl(i)">{{v}}</view>
</view>
<!-- 详细信息 -->
<view class="xxxx" v-for="(v,i) in list?.list" :key="i">
<view class="xxxx" v-for="(v,i) in listarr" :key="i">
<view class="top">
<view class="left">{{v.wlName}}</view>
<view class="rishs">
@ -87,7 +90,7 @@
<text>已入库数量</text>
</view>
<view>
<view>{{v.wrksl}}</view>
<view :style="v.wrksl>0? 'color: red;font-weight: bold;':''">{{v.wrksl}}</view>
<text>挂账数量</text>
</view>
<view>
@ -96,7 +99,11 @@
</view>
</view>
</view>
<view class="none" v-if="!listarr.length">
<image style="width: 300rpx;height: 300rpx;"
src="https://www.focusnu.com/media/directive/index/none.png" mode="widthFix" lazy-load="false" />
<view class="">暂无信息</view>
</view>
</view>
</template>
@ -127,14 +134,86 @@
timeout,
success(response) {
const res = response.data;
console.log(res)
list.value = res.result
list.value = res.result;
naurl(dex.value)
}})
})
const dex = ref(0);
const listarr = ref([]);
const naurl = (e)=>{
dex.value = e;
if(e==0){
listarr.value = list.value.list
}
if(e==1){
listarr.value = [];
list.value.list.map(v=>{
if(v.wrksl>0){
listarr.value.push(v)
}
})
}
if(e==2){
listarr.value = [];
list.value.list.map(v=>{
if(v.xzsl>0){
listarr.value.push(v)
}
})
}
}
</script>
<style scoped lang="scss">
.swtab{
width: 700rpx;
margin: 28rpx auto 0;
height: 50px;
background-color: #fff;
display: flex;
justify-content: space-around;
border-radius: 40rpx;
view{
font-weight: 400;
font-size: 30rpx;
color: #666666;
height: 40px;
width: auto;
line-height: 30px;
margin-top: 5px;
}
view::after{
content: '';
width: 0%;
left: 50%;
}
.act{
font-weight: bold;
font-size: 30rpx;
color: #222222;
position: relative;
}
.act::after{
content: '';
position: absolute;
width: 50%;
left: 21%;
bottom: 0;
background: #0074E1;
border-radius: 5rpx;
border: 2px solid #0074E1;
transition: .4s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
}
.none {
display: flex;
align-items: center;
flex-direction: column;
color: #999;
margin-top: 30rpx;
}
.xxxx{
width: 705rpx;
min-height: 359rpx;

View File

@ -7,7 +7,7 @@
</view>
</view>
<view class="swtab" :style="{top:`${uni.getStorageSync('moveHeight')+40}px`}">
<view v-for="(v,i) in ['全部','采购中','挂账','完成']" :key="i" :class="dex==i?'act guodu':'guodu'" @click="naurl(i)">{{v}}</view>
<view v-for="(v,i) in ['全部','采购中','完成']" :key="i" :class="dex==i?'act guodu':'guodu'" @click="naurl(i)">{{v}}</view>
</view>
<view class="card" v-for="(v,i) in list" :key="i" @click="navurl(v)">
<view class="top">
@ -80,7 +80,7 @@
const init = ()=>{
let obj = {
gysId:GysId.value,
cgdType:dex.value==0?'':dex.value-1,
cgdType:dex.value==0?'':dex.value==1?0:2,
pageSize:10,
pageNo:pageNo.value