This commit is contained in:
wangweidong 2025-11-18 13:08:06 +08:00
parent 5f4c729e7d
commit d15a8fa096
7 changed files with 536 additions and 91 deletions

View File

@ -608,26 +608,21 @@
</view>
</view>
<view class="contain-right-middle">
<scroll-view scroll-x="true" class="middle-Y" @scrolltolower="getmore">
<scroll-view scroll-x="true" class="middle-Y" >
<view class="middle-Y-father">
<view class="middle-one" v-for="(v,i) in [1,1,1,1]" :key='i'
<view class="middle-one" v-for="(v,i) in InvoicingList" :key='i'
:style="{border: middletarget === i? '4rpx solid #1083F8': '4rpx solid transparent'}"
@click="clickmiddle(i)">
<view :class="!i || i==3?`up-tags-target`: `up-tags`">
{{ tagsArray[i] }}
<view :class="v.status<2?`up-tags-target`: `up-tags`" >
{{v.status_dictText}}
</view>
<!-- <image class="middle-img"
:src="v.materialImg?serverUrl + v.materialImg : '/static/zhiniaoku.png'"
mode="aspectFill"></image> -->
<image class="middle-img" :src=" '/static/zhiniaoku.png'" mode="aspectFill"></image>
<image class="middle-img"
:src="v.materialImg?serverUrl + v.materialImg : '/static/index/warehouse/procurement/k.png'"
mode="aspectFill"></image>
<!-- <image class="middle-img" :src=" '/static/zhiniaoku.png'" mode="aspectFill"></image> -->
<view class="middle-right">
<view class="right-title">
{{ i == 0 ? '留置针敷贴(医用…)'
: i == 1 ? '纸尿裤-拉拉裤'
: i == 2 ? '纸尿裤'
: '纸尿裤'
}}
{{ v.wlName }}
</view>
<view class="juzhong">
<view class="">
@ -636,30 +631,26 @@
</text>
<text style="font-size: 30rpx;"
:style="{fontWeight:middletarget !== i?`600`:``}">
{{ i==0 ? '15.30'
: i==1 ? '86.16'
: i==2 ? '189.55'
: '46.80'
}}
:style="{fontWeight:Number(v.arrivalPrice)>0||Number(v.procurementPrice)>0 ?`600`:``}">
{{v.arrivalPrice?v.arrivalPrice:v.procurementPrice }}
</text>
</view>
<view class="" style="font-size: 30rpx;position: relative;">
<text style="font-weight: 600;margin-right: 14rpx;"
:style="{fontWeight:middletarget === i?`600`:``,color:middletarget === i?``:`#888888`}">
20
{{ v.purchaseQuantity }}
</text>
<text
style="position: absolute;right: -10rpx;font-size: 26rpx;bottom: 2rpx;color: #888888;">
{{ v.wlUnits}}
</text>
</view>
</view>
<view class="right-middle">
800mm*680mm
{{v.wlSpecificationModel}}
</view>
<view class="juzhong">
<view class="">
@ -668,8 +659,8 @@
</text>
</view>
<view class="">
<text :style=" {fontWeight: i>0? `600` :`` }">
{{ i==0 ? 0 : i==1 ? 10 : i==2 ? 5 : 5 }}
<text :style=" {fontWeight: v.rksl>0? `600` :`` }">
{{v.rksl}}
</text>
</view>
@ -681,8 +672,8 @@
</text>
</view>
<view class="">
<text :style=" {fontWeight: i>2? `600` :`` }">
{{ i==0 ? 0 : i==1 ? 0 : i==2 ? 0 : 5 }}
<text :style=" {fontWeight: v.wrksl>0? `600` :`` }">
{{v.wrksl}}
</text>
</view>
@ -694,8 +685,8 @@
</text>
</view>
<view class="">
<text :style=" {fontWeight: i==2? `600` :`` }">
{{ i==0 ? 0 : i==1 ? 0 : i==2 ? 5 : 0 }}
<text :style=" {fontWeight: v.xzsl>0? `600` :`` }">
{{v.xzsl}}
</text>
</view>
@ -740,28 +731,20 @@
<view style="width: 95%;height: 0.5rpx; background-color: #eff1f3;margin-left: 5%;"></view>
<view class="right-bottom" v-show="!typechange">
<view class="right-bottom-left">
<!-- <image class="left-img"
<image class="left-img"
:src="showvalue?.materialImg?serverUrl + showvalue?.materialImg : '/static/zhiniaoku.png'"
mode="aspectFill"></image> -->
mode="aspectFill"></image>
<image class="left-img" :src=" '/static/zhiniaoku.png'" mode="aspectFill"></image>
<view class="left-tags">
<view class="tags-one">
耗材用品
</view>
<view class="tags-one">
复健用品
</view>
<view class="tags-one">
支架
</view>
<view class="tags-one" v-if="showvalue.categoryId_dictText">{{showvalue.categoryId_dictText}}</view>
<view class="tags-one" v-if="showvalue.typeId_dictText">{{showvalue.typeId_dictText}}</view>
<view class="tags-one" v-if="showvalue.medicationId_dictText">{{showvalue.medicationId_dictText}}</view>
</view>
</view>
<view class="right-bottom-right">
<view class="bottom-right-title">
<view class="title-left">
纸尿裤-拉拉裤纸尿裤
{{showvalue.wlName}}
</view>
<view class="title-right">
<text
@ -778,7 +761,7 @@
物料编码
</view>
<view class="right-text">
ZHYP044
{{showvalue.wlMaterialNo}}
</view>
</view>
<view class="threeone">
@ -786,7 +769,7 @@
规格型号
</view>
<view class="right-text">
800mm*680mm
{{showvalue.wlSpecificationModel}}
</view>
</view>
<view class="gray-heng"></view>
@ -798,7 +781,7 @@
采购单价
</view>
<view class="right-text">
15
{{showvalue.arrivalPrice?showvalue.arrivalPrice:showvalue.procurementPrice}}
</view>
</view>
<view class="threeone">
@ -806,7 +789,7 @@
采购数量
</view>
<view class="right-text">
200
{{showvalue.purchaseQuantity}}
</view>
</view>
<view class="threeone">
@ -814,7 +797,7 @@
采购单位
</view>
<view class="right-text">
{{showvalue.wlUnits}}
</view>
</view>
<view class="gray-heng"></view>
@ -826,7 +809,7 @@
库存数量
</view>
<view class="right-text">
853
{{showvalue.kcsl}}
</view>
</view>
<view class="threeone">
@ -834,7 +817,7 @@
物料上限
</view>
<view class="right-text">
4000
{{showvalue.wlUpperLimit}}
</view>
</view>
<view class="threeone">
@ -842,7 +825,7 @@
物料下限
</view>
<view class="right-text">
60
{{showvalue.wlLowerLimit}}
</view>
</view>
<view class="gray-heng"></view>
@ -854,7 +837,7 @@
入库数量
</view>
<view class="right-text">
0
{{showvalue.rksl}}
</view>
</view>
<view class="threeone">
@ -862,7 +845,7 @@
挂账数量
</view>
<view class="right-text">
0
{{showvalue.wrksl}}
</view>
</view>
<view class="threeone">
@ -870,7 +853,7 @@
销账数量
</view>
<view class="right-text">
0
{{showvalue.xzsl}}
</view>
</view>
</view>
@ -1196,7 +1179,7 @@
const form = reactive({
nuId: '',
pageNo: 1,
pageSize: 9,
pageSize: -1,
categoryId: '',
typeId: '',
medicationId: '',
@ -1216,7 +1199,7 @@
cgdId: "",
isWaring: 0
}
const tagsArray = [`待入库`, `已入库`, `已销账`, `挂账中`]
const tagsArray = [`待入库`,`挂账中`, `已入库`, `已销账`, ]
const clickmiddle = (index : number) => {
middletarget.value = index;
showvalue.value = InvoicingList.value[index];
@ -1230,24 +1213,12 @@
// InvoicingList.value.push(...res.result.records);
// }
console.log(res.result.records)
InvoicingList.value.push(...res.result.records);
clickmiddle(0);
})
}
const getmore = () => {
if (form.canpull) {
form.pageNo++
queryCgdInfoList(form).then(res => {
InvoicingList.value.push(...res.result.records);
if (res.result.records.length != 10) {
form.canpull = false
}
console.log("??????", res.result.records)
})
}
}
const search = () => {
// if (!plzinfo.cgdParamInfo) return
plzinfo.pageNo = 1;
@ -2072,6 +2043,7 @@
width: 250rpx;
height: 250rpx;
margin-left: 50rpx;
margin-top: 2vw;
}
.left-tags {

View File

@ -316,7 +316,7 @@
const form = reactive({
nuId: '',
pageNo: 1,
pageSize: 10,
pageSize: -1,
categoryId: '',
typeId: '',
medicationId: '',

View File

@ -180,4 +180,12 @@ export const getTreeDataWlnum = (params) => {
method: 'get',
data: params,
})
}
}
//(业务)获取物料分类树可采购的物料数量(采购单列表使用)
export const getCgdTreeDataWlnum = (params) => {
return request({
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/getCgdTreeDataWlnum`,
method: 'get',
data: params,
})
}

View File

@ -0,0 +1,453 @@
<template>
<view>
<view class="ifclass guodu" :class="show?'':'unclass'">
<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, watch } from 'vue';
import { getMaterialTreeData, getTreeDataWlnum, getGysList, getGwcTreeDataWlnum, getGwcMaterialTreeData ,getCgdMaterialTreeData ,getCgdTreeDataWlnum} 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 gysarr = ref([]);
const gysidnum = ref(-1);
const serverUrl = ref('');
const selt = ref(false);
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/';
})
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].key : '',
cgdId:props.cgdId
}
switch (props.typenum) {
case 0:
//
getTreeDataWlnum(obj).then(res => {
num.value = res.result.totalSize;
})
break;
case 1:
//
getGwcTreeDataWlnum(obj).then(res => {
num.value = res.result.totalSize;
})
break;
case 2:
console.log(obj)
getCgdTreeDataWlnum(obj).then(res => {
num.value = res.result.totalSize;
})
break;
default:
break;
}
}
const getMaterial = () => {
switch (props.typenum) {
case 0:
//
getMaterialTreeData({ 'nuId': uni.getStorageSync('nuId') }).then(res => {
TreeData.value = res.result;
getTreelnum()
})
break;
case 1:
//
getGwcMaterialTreeData({ 'nuId': uni.getStorageSync('nuId') }).then(res => {
TreeData.value = res.result;
getTreelnum()
})
break;
case 2:
console.log({ 'nuId': uni.getStorageSync('nuId'),cgdId:props.cgdId })
getCgdMaterialTreeData({ 'nuId': uni.getStorageSync('nuId'),cgdId:props.cgdId }).then(res => {
console.log(res.result)
TreeData.value = res.result;
getTreelnum()
})
break;
default:
break;
}
}
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].key : '',
cgdId:props.cgdId
}
emit('confirm', obj)
}
const props = defineProps({
show: {
type: Boolean,
default: false,
required: true,
},
typenum: {
type: Number,
default: 0
},
cgdId: {
type: String,
default: 0
}
})
watch(
() => props.show,
() => {
if (props.show == false) {
selt.value = false;
typescroll(1,-1,{})
}else{
getMaterial();
}
})
const qingkong = () => {
if (gysidnum.value > -1) {
gysidnum.value = -1;
getTreelnum()
}
}
</script>
<style scoped lang="less">
.gyss {
width: 100%;
height: 4vw;
display: flex;
align-items: center;
position: relative;
justify-content: space-between;
.hei0 {
height: 0 !important;
}
.xuze {
width: 23vw;
height: calc(85vh - 18vw);
background: #fff;
border-radius: 1.6vw;
box-shadow: 0rpx 0rpx 1.3vw 0rpx rgba(163, 167, 182, 0.16);
position: absolute;
top: 4vw;
right: 0;
z-index: 133;
.gysscrol {
width: 100%;
height: calc(85vh - 24vw);
.acts {
color: #0385FA !important;
image {
display: block;
}
}
view {
display: flex;
justify-content: space-between;
align-items: center;
font-weight: 400;
font-size: 1.5vw;
color: #666666;
margin-bottom: 1.2vw;
padding: 0 1vw;
&:nth-child(1) {
margin-top: 0.9vw;
}
image {
width: 1vw !important;
height: 0.7vw !important;
display: none;
}
}
}
}
.lef {
width: 6.7vw;
letter-spacing: 2px;
font-weight: 400;
font-size: 1.5vw;
color: #333333;
}
.set {
width: 23vw;
height: 3.8vw;
padding: 0 1.7vw;
display: flex;
justify-content: space-between;
background: #F8F8FA;
border-radius: 1vw;
align-items: center;
image {
width: 1.6vw;
height: 1.6vw;
}
text {
font-weight: 300;
font-size: 1.4vw;
color: #999999;
display: block;
white-space: nowrap;
overflow: hidden;
width: 21vw;
height: 1.5vw;
line-height: 1.5vw;
text-overflow: ellipsis;
}
.n {
color: #000;
}
}
}
.unclass {
top: -86vh !important;
}
.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 - 22vw);
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: 400;
font-size: 1.5vw;
color: #333333;
line-height: 2.5vw;
}
.guodu {
transition: .4s;
-webkit-transform-style: preserve-3d;
-webkit-overflow-scrolling: touch;
}
</style>

View File

@ -64,7 +64,7 @@
<script setup lang="ts">
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps, watch } from 'vue';
import { getMaterialTreeData, getTreeDataWlnum, getGysList, getGwcTreeDataWlnum, getGwcMaterialTreeData } from '../api/lunpan.js'
import { getMaterialTreeData, getTreeDataWlnum, getGysList, getGwcTreeDataWlnum, getGwcMaterialTreeData ,getCgdMaterialTreeData ,getCgdTreeDataWlnum} 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([]);
@ -130,6 +130,9 @@
})
break;
case 2:
getCgdTreeDataWlnum(obj).then(res => {
num.value = res.result.totalSize;
})
break;
default:
@ -154,6 +157,12 @@
})
break;
case 2:
console.log({ 'nuId': uni.getStorageSync('nuId') })
getCgdMaterialTreeData({ 'nuId': uni.getStorageSync('nuId') }).then(res => {
console.log(res.result)
TreeData.value = res.result;
getTreelnum()
})
break;
default:

View File

@ -63,7 +63,7 @@
const form = reactive({
nuId: uni.getStorageSync('nuId'),
pageNo: 1,
pageSize: 10,
pageSize: -1,
categoryId: '',
typeId: '',
medicationId: '',

View File

@ -127,7 +127,7 @@
<view class="white-zhezhao"></view>
<view class="contain-right">
<view class="contain-right-title">
<view class="contain-right-button" style="border-color: #D9DADC;box-shadow: 0 1rpx 3rpx #D9DADC;">
<view class="contain-right-button" style="border-color: #D9DADC;box-shadow: 0 1rpx 3rpx #D9DADC;" @click="ification=true">
<image class="buttont-img" src="/static/index/purchaseorder/select.png" />
<view class="button-font">
筛选
@ -141,7 +141,7 @@
</view>
</view>
<view class="contain-right-middle">
<scroll-view scroll-y="true" class="middle-Y" @scrolltolower="getmore">
<scroll-view scroll-y="true" class="middle-Y" >
<view class="middle-Y-father">
<view class="middle-one" v-for="(v,i) in InvoicingList" :key='i'
:style="{border: middletarget === i? '4rpx dashed #1083F8': '4rpx solid transparent'}"
@ -157,7 +157,7 @@
{{ v.wlSpecificationModel }}
</view>
<view style="color: #888888;">
采购数量: {{ v.kcsl + v.wlUnits }}
采购数量: {{ v.purchaseQuantity + v.wlUnits }}
</view>
</view>
</view>
@ -355,6 +355,8 @@
</view>
</view>
</view>
<view class="mengban" v-if="ification" @click="ification = false"></view>
<classification @confirm="confirm" :show="ification" :typenum="2" :cgdId="plsbuy[lefttarget]?.id"></classification>
</view>
</template>
@ -362,7 +364,8 @@
import { ref, onMounted, reactive, onBeforeUnmount, computed, nextTick, defineProps } from 'vue';
import { queryInvoicingList, getCgdMaterialTreeData, queryNuInfoByNuId, updateKfstatus, queryCgdList, queryCgdInfoList, queryWlInfoByWlId, voidedCgdMain } from './api/lunpan.js'
import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app"
import classification from './components/cgdclass.vue'
const ification = ref(false)
const serverUrl = ref("")
onLoad(() => {
firstgetqueryCgdList();
@ -401,7 +404,17 @@
})
}
const confirm =(e:any)=>{
form.categoryId = e.categoryId;
form.typeId = e.typeId;
form.medicationId = e.medicationId;
form.suppliers = e.suppliers;
form.cgdId = e.cgdId;
form.pageNo=1;
InvoicingList.value = [];
queryInvo();
ification.value = false
}
const setout = ref(true)
let times = null
const plsbuytolower = () => {
@ -455,9 +468,10 @@
typeId: '',
medicationId: '',
wlParamInfo: '',
suppliers:'',
cgdId: "",
isWaring: 0,
canpull: true
canpull: true,
})
const mobanform = {
nuId: '',
@ -483,18 +497,7 @@
clickmiddle(0);
})
}
const getmore = () => {
if (form.canpull) {
form.pageNo++
queryCgdInfoList(form).then(res => {
InvoicingList.value.push(...res.result.records);
if (res.result.records.length != 10) {
form.canpull = false
}
})
}
}
const search = () => {
// if (!searchValue.value) return
form.pageNo = 1;