hldy_xcx/pages/yuangongindex/detIlspro.vue

441 lines
9.2 KiB
Vue
Raw Normal View History

2026-01-20 16:56:26 +08:00
<template>
<view :style="{paddingTop:`${uni.getStorageSync('moveHeight')+40}px`}">
<view class="title-back" :style="{height:`${uni.getStorageSync('moveHeight')+40}px`}">
<view class="left-father" @click="goBack">
<image class="back-img" src="https://www.focusnu.com/media/directive/index/left.png" />
<view style="font-size: 30rpx;">采购单详情</view>
</view>
</view>
<view class="cgdxx">
<view class="top">
<view class="left">
<image src="https://www.focusnu.com/media/xcx/cgd.png" mode="aspectFill"></image>
<text>采购单信息</text>
</view>
<view class="righs">
<view class="rs l" :class="{'l':list.cgdType==0,'h':list.cgdType==1,'b':list.cgdType==2}">{{list?.cgdType_dictText}}</view>
</view>
</view>
<view class="center">
<view class="tspo">
<view class="bx" style="align-items: left;">
<view>采购单号</view>
<text>{{list.cgdNo}}</text>
</view>
<view class="bx" style="align-items: flex-end;">
<view>采购日期</view>
2026-01-21 13:57:02 +08:00
<text>{{list.qgDate?.substring(0,10)}}</text>
2026-01-20 16:56:26 +08:00
</view>
</view>
<view class="top">
<view class="left">
<image src="https://www.focusnu.com/media/xcx/cc.png" mode="aspectFill"></image>
<text>采购方信息</text>
</view>
</view>
</view>
<view class="contweo">
<view class="lan">
<view></view>
机构名称{{list.departName}}
</view>
<!-- <view class="lan">
<view></view>
收货地址
<text>
吉林省长春市朝阳区开运街41号吉林省长春市朝阳区开运街41号
</text>
</view> -->
<view class="lan">
<view></view>
联系人 {{list.qgBy}}
</view>
<view class="lan">
<view></view>
{{list.createBy}}
</view>
<view class="top">
<view class="left">
<image src="https://www.focusnu.com/media/xcx/jc.png" mode="aspectFill"></image>
<text>供应商信息</text>
</view>
</view>
</view>
<view class="contweo">
<view class="lan">
<view></view>
供应商名称{{list.gysName}}
</view>
</view>
</view>
2026-01-21 13:57:02 +08:00
<view class="swtab" >
<view v-for="(v,i) in ['全部',' 挂账','销账']" :key="i" :class="dex==i?'act guodu':'guodu'" @click="naurl(i)">{{v}}</view>
</view>
2026-01-20 16:56:26 +08:00
<!-- 详细信息 -->
2026-01-21 13:57:02 +08:00
<view class="xxxx" v-for="(v,i) in listarr" :key="i">
2026-01-20 16:56:26 +08:00
<view class="top">
<view class="left">{{v.wlName}}</view>
<view class="rishs">
<text>采购数量</text>
<view>{{v.purchaseQuantity}}</view>
</view>
</view>
<view class="cents">
2026-01-20 17:24:26 +08:00
<view>规格型号 <view>{{v.wlSpecificationModel}}</view></view>
2026-01-20 16:56:26 +08:00
<view>采购单位 {{v.wlUnits}}</view>
</view>
<view class="sfj">
<view>
<view>{{v.rksl}}</view>
<text>已入库数量</text>
</view>
<view>
2026-01-21 13:57:02 +08:00
<view :style="v.wrksl>0? 'color: red;font-weight: bold;':''">{{v.wrksl}}</view>
2026-01-20 16:56:26 +08:00
<text>挂账数量</text>
</view>
<view>
<view>{{v.xzsl}}</view>
<text>销账数量</text>
</view>
</view>
</view>
2026-01-21 13:57:02 +08:00
<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>
2026-01-20 16:56:26 +08:00
</view>
</template>
<script setup lang="ts">
import { reactive, ref, nextTick } from 'vue';
import { onLoad, onPullDownRefresh,onReachBottom } from '@dcloudio/uni-app'
import { getEmployeesOrgRela,getCgdListByGysId } from './api.js'
const goBack = () => {
uni.navigateBack()
}
const list = ref({})
onLoad((e)=>{
let obj = {
id:e.id
}
let header = {
'X-Access-Token': uni.getStorageSync('token') || '',
'Content-Type': 'application/json;charset=UTF-8',
'Authorization': 'Basic c2FiZXI6c2FiZXJfc2VjcmV0',
}
let timeout = 5000
uni.request({
url: uni.getStorageSync('serverUrl2') + '/api/pad/invoicing/getCgdInfoByCgdId',
method: 'GET',
header: header,
data: obj,
timeout,
success(response) {
const res = response.data;
2026-01-21 13:57:02 +08:00
list.value = res.result;
naurl(dex.value)
2026-01-20 16:56:26 +08:00
}})
})
2026-01-21 13:57:02 +08:00
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)
}
})
}
}
2026-01-20 16:56:26 +08:00
</script>
<style scoped lang="scss">
2026-01-21 13:57:02 +08:00
.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;
}
2026-01-20 16:56:26 +08:00
.xxxx{
width: 705rpx;
2026-01-20 17:24:26 +08:00
min-height: 359rpx;
2026-01-20 16:56:26 +08:00
background: #FFFFFF;
box-shadow: 0rpx 0rpx 13rpx 0rpx rgba(105,129,178,0.05);
border-radius: 40rpx;
margin: 24rpx auto 0;
padding:20rpx 46rpx;
.sfj{
width: 560rpx;
2026-01-20 17:24:26 +08:00
min-height: 88rpx;
2026-01-20 16:56:26 +08:00
display: flex;
justify-content: space-between;
margin: 0 auto;
>view{
display: flex;
flex-direction: column;
align-items: center;
view{
font-weight: bold;
font-size: 38rpx;
color: #555555;
}
text{
font-weight: 400;
2026-01-20 17:24:26 +08:00
font-size: 28rpx;
2026-01-20 16:56:26 +08:00
color: #666666;
}
}
}
.cents{
width: 100%;
margin: 37rpx auto 50rpx;
padding-left: 8rpx;
display: flex;
justify-content: space-between;
flex-wrap: nowrap;
2026-01-20 17:24:26 +08:00
>view{
2026-01-20 16:56:26 +08:00
font-weight: 400;
2026-01-20 17:24:26 +08:00
font-size: 30rpx;
2026-01-20 16:56:26 +08:00
color: #555555;
2026-01-20 17:24:26 +08:00
display: flex;
>view{
width: 220rpx;
}
2026-01-20 16:56:26 +08:00
}
}
.top{
width: 100%;
height: 80rpx;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #D2D2D2;
.left{
font-weight: bold;
font-size: 35rpx;
color: #222222;
max-width: 430rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.rishs{
display: flex;
align-items: center;
view{
font-weight: bold;
font-size: 38rpx;
color: #333333;
margin-left: 17rpx;
}
text{
font-weight: 400;
2026-01-20 17:24:26 +08:00
font-size: 27rpx;
2026-01-20 16:56:26 +08:00
color: #555555;
margin-top: 5rpx;
}
}
}
}
.cgdxx{
width: 700rpx;
2026-01-20 17:24:26 +08:00
min-height: 60rpx;
2026-01-20 16:56:26 +08:00
background: #FFFFFF;
border-radius: 40rpx;
margin: 28rpx auto 0;
padding: 28rpx;
.contweo{
width: 100%;
min-height: 40rpx;
.lan{
display: flex;
min-height: 30rpx;
font-weight: 400;
2026-01-20 17:24:26 +08:00
font-size: 30rpx;
2026-01-20 16:56:26 +08:00
color: #333333;
margin-top: 26rpx;
text{
max-width: 444rpx;
}
view{
width: 10rpx;
height: 10rpx;
background: #999999;
border-radius: 50%;
margin: 17rpx 30rpx 0 20rpx;
}
}
}
.center{
width: 100%;
min-height: 40rpx;
.tspo{
2026-01-20 17:24:26 +08:00
width: 578rpx;
2026-01-20 16:56:26 +08:00
height: 62rpx;
2026-01-20 17:24:26 +08:00
margin-left: 57rpx;
2026-01-20 16:56:26 +08:00
margin-top: 28rpx;
display: flex;
justify-content: space-between;
.bx{
display: flex;
justify-content: space-between;
flex-direction: column;
width: 50%;
font-weight: 400;
2026-01-20 17:24:26 +08:00
font-size: 28rpx;
2026-01-20 16:56:26 +08:00
view{
color: #888888;
}
text{
color: #555555;
margin-bottom: 15rpx;
}
}
}
}
.top{
width: 100%;
height: 90rpx;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #D2D2D2;
.righs{
.rs{
width: 116rpx;
height: 49rpx;
border-radius: 15rpx;
display: flex;
justify-content: center;
align-items: center;
font-weight: 400;
2026-01-20 17:24:26 +08:00
font-size: 28rpx;
2026-01-20 16:56:26 +08:00
}
.l{
border: 1px solid #0074E1;
color: #0074E1;
}
.h{
border: 1px solid #EE2C35;
color: #EE2C35;
}
.b{
border: 1px solid #333333;
color: #333;
}
}
.left{
display: flex;
align-items: center;
image{
width: 30rpx;
height: 30rpx;
}
text{
font-weight: bold;
font-size: 30rpx;
color: #333333;
margin-left: 21rpx;
}
}
}
}
.title-back {
background-color: #fff;
width: 100%;
height: 70rpx;
display: flex;
justify-content: space-between;
align-items: flex-end;
padding-bottom: 20rpx;
position: fixed;
top: 0;
left: 0;
z-index: 9999;
}
.left-father {
display: flex;
align-items: center;
z-index: 1;
.back-img {
width: 45rpx;
height: 40rpx;
margin-left: 40rpx;
margin-right: 15rpx;
}
}
.guodu {
transition: .4s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
</style>
<style>
page{
background: #F0F0F3;
}
</style>