This commit is contained in:
parent
9bbda06505
commit
4a081beadf
|
|
@ -2,8 +2,8 @@
|
|||
"name" : "护理单元",
|
||||
"appid" : "__UNI__FB2D473",
|
||||
"description" : "护理单元",
|
||||
"versionName" : "1.0.011",
|
||||
"versionCode" : 10011,
|
||||
"versionName" : "1.0.012",
|
||||
"versionCode" : 10012,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
|
|
|||
|
|
@ -11,4 +11,27 @@ export const queryInvoicingList = (params) => {
|
|||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export const getMaterialTreeData = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/qld/getMaterialTreeData`,
|
||||
method: 'get',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
export const getTreeDataWlnum = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/qld/getTreeDataWlnum`,
|
||||
method: 'get',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
export const wlzd = (params) => {
|
||||
return request({
|
||||
url: `${uni.getStorageSync('serverUrl')}/api/pad/invoicing/qld/wlzd`,
|
||||
method: 'post',
|
||||
data: params,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
<scroll-view class="carditem guodu" @touchend="handleTouchEnd($event,v,index)"
|
||||
@touchstart="touchstart($event,v,index)" scroll-with-animation scroll-x="true"
|
||||
:scroll-left="v.scrollleft" @scroll="scroll" >
|
||||
<view class="zding" v-if="v.zhiDingId">
|
||||
<image src="/static/index/procurement/zd.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="speitem guodu" >
|
||||
<image :src="v.materialImg?serverUrl+v.materialImg:'/static/index/procurement/k.png'"
|
||||
mode="aspectFill">
|
||||
|
|
@ -34,24 +37,27 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="add" @click.stop="addcar(v,index)">
|
||||
<view class="add" @click.stop="comfig(v,index,0)">
|
||||
<view v-if="v.isAdd==1">已添加</view>
|
||||
<image :src="'/static/index/procurement/+.png'" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="zkadd guodu" :class="v.isAdd==1?'zkf':''">
|
||||
<view @click.stop="crk(v,index)" @touchend.stop>
|
||||
<view @click.stop="comfig(v,index,1)" @touchend.stop>
|
||||
请领记录
|
||||
</view>
|
||||
<view @click.stop="crk(v,index)" @touchend.stop>
|
||||
<view @click.stop="comfig(v,index,2)" @touchend.stop>
|
||||
物料详情
|
||||
</view>
|
||||
<view @click.stop="addcar(v,index)" v-if="v.isAdd!=1" @touchend.stop>
|
||||
置 顶
|
||||
<view @click.stop="comfig(v,index,3)" @touchend.stop>
|
||||
{{v.zhiDingId?'取消置顶':'置 顶'}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height:6vw;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>
|
||||
</template>
|
||||
|
|
@ -65,29 +71,33 @@
|
|||
},
|
||||
status: {
|
||||
type: String
|
||||
},
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: true,
|
||||
},
|
||||
}
|
||||
})
|
||||
const caigouobj = ref({})
|
||||
const emit = defineEmits(['addcartory', 'scrolltolower','addcar','crk'])
|
||||
const serverUrl = ref(uni.getStorageSync('serverUrl') + '/sys/common/static/')
|
||||
const emit = defineEmits([ 'scrolltolower' ,'comfig'])
|
||||
|
||||
const pageX = ref(0);
|
||||
const pageY = ref(0);
|
||||
const ones = ref(true)
|
||||
const touchstart = (event : any, v : any,i:number) => {
|
||||
caigouobj.value = v;
|
||||
pageX.value = event.changedTouches[0].pageX;
|
||||
pageY.value = event.changedTouches[0].pageY;
|
||||
solleft(v, i)
|
||||
if(ones.value){
|
||||
ones.value = false;
|
||||
solleft(v, i)
|
||||
}
|
||||
}
|
||||
const comfig=(v,i,t)=>{
|
||||
emit('comfig',v,i,t)
|
||||
}
|
||||
const handleTouchEnd = (event : any, v : any, i : number) => {
|
||||
let y = event.changedTouches[0].pageY;
|
||||
let x = event.changedTouches[0].pageX;
|
||||
let absx = Math.abs(x - pageX.value)
|
||||
let absy = Math.abs(y - pageY.value)
|
||||
let absy = Math.abs(y - pageY.value);
|
||||
ones.value = true;
|
||||
if (absy > 30 && absx+10<absy) {
|
||||
setTimeout(()=>{
|
||||
caigouobj.value.scrollleft = 0
|
||||
|
|
@ -110,17 +120,15 @@
|
|||
scrollLeft.value = 0;
|
||||
})
|
||||
}else{
|
||||
caigouobj.value.scrollleft = 150;
|
||||
scrollLeft.value = 150
|
||||
caigouobj.value.scrollleft = scrollLeft.value;
|
||||
caigouobj.value.zk = true;
|
||||
}
|
||||
caigouobj.value = v;
|
||||
caigouobj.value.Limitnum = Number(caigouobj.value?.upperLimit) - Number(caigouobj.value.kcsl);
|
||||
caigouobj.value.index = i;
|
||||
caigouobj.value.yj = false;
|
||||
caigouobj.value.zk = x > pageX.value ? false : true;
|
||||
caigouobj.value.scrollleft = caigouobj.value.zk ? 150 : 0;
|
||||
}
|
||||
const solleft = (v : any, i : number) => {
|
||||
console.log(v)
|
||||
props.InvoicingList.forEach((item, k) => {
|
||||
if (k != i&&item.zk==true) {
|
||||
item.zk = false;
|
||||
|
|
@ -129,12 +137,12 @@
|
|||
})
|
||||
}
|
||||
const scrolltolower = () => {
|
||||
emit('scrolltolower')
|
||||
emit('scrolltolower')
|
||||
}
|
||||
const scrollLeft = ref(0)
|
||||
const scroll = (e)=>{
|
||||
scrollLeft.value = e.detail.scrollLeft
|
||||
console.log(e.detail.scrollLeft)
|
||||
// console.log(e.detail.scrollLeft)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -306,6 +314,17 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.zding{
|
||||
width: 4.6vw;
|
||||
height: 4.6vw;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.speitem {
|
||||
width: 10vw;
|
||||
height: 100%;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,474 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="mengban" @click="emit('fill')" v-if="show"></view>
|
||||
<view class="ifclass guodu" :class="show?'':'unclass'" :style="showbox?'z-index:220':'z-index:-2'">
|
||||
<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} from '../api/api.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','fill'])
|
||||
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: ""
|
||||
}
|
||||
})
|
||||
const showbox = ref(false)
|
||||
watch(
|
||||
() => props.show,
|
||||
() => {
|
||||
if (props.show == false) {
|
||||
selt.value = false;
|
||||
showbox.value = false
|
||||
nextTick(()=>{
|
||||
typescroll(1,-1,{})
|
||||
})
|
||||
}else{
|
||||
getMaterial();
|
||||
setTimeout(()=>{
|
||||
showbox.value = true
|
||||
},50)
|
||||
}
|
||||
})
|
||||
const qingkong = () => {
|
||||
if (gysidnum.value > -1) {
|
||||
gysidnum.value = -1;
|
||||
getTreelnum()
|
||||
}
|
||||
}
|
||||
defineExpose({
|
||||
typescroll,
|
||||
config,
|
||||
qingkong,
|
||||
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 {
|
||||
opacity: 0 !important;
|
||||
}
|
||||
|
||||
.ifclass {
|
||||
width: 37vw;
|
||||
height: 75vh;
|
||||
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: 15vh;
|
||||
left: 130px;
|
||||
padding: 2.5vw 1vw;
|
||||
|
||||
.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(75vh - 18vw);
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
|
||||
.scrl1 {
|
||||
width: 10vw;
|
||||
}
|
||||
|
||||
.scrl2,
|
||||
.scrl3 {
|
||||
width: 10vw;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
view {
|
||||
width: 8vw;
|
||||
margin-left: 1vw;
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
width: 10vw;
|
||||
height: calc(75vh - 22vw);
|
||||
|
||||
view {
|
||||
min-width: 8.5vw;
|
||||
max-width: 10vw;
|
||||
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;
|
||||
padding-left: 1vw;
|
||||
}
|
||||
|
||||
.guodu {
|
||||
transition: .4s;
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.mengban{
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
z-index: 20;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,243 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="mengban" @click="emit('fill')" v-if="show"> </view>
|
||||
<view class="card" :class="show?'':'unclass'" :style="showbox?'z-index:220':'z-index:-2'">
|
||||
<view class="tit">物料详情</view>
|
||||
<view class="cont">
|
||||
<view class="leftbox">
|
||||
<image :src="objtake.materialImg?serverUrl+objtake.materialImg:'/static/index/procurement/k.png'" mode="aspectFill"/>
|
||||
<view>
|
||||
<text>耗材用品</text>
|
||||
<text>复健用品</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="youcont">
|
||||
<view>{{objtake.materialName}}</view>
|
||||
<view>
|
||||
<view>
|
||||
物料编码
|
||||
<text>{{objtake.materialNo}}</text>
|
||||
</view>
|
||||
<view>
|
||||
规格型号
|
||||
<text style="white-space: nowrap;">{{objtake.specificationModel}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
请领数量
|
||||
<text>{{objtake.qlNum?objtake.qlNum:'--'}}</text>
|
||||
</view>
|
||||
<view>
|
||||
请领单位
|
||||
<text>{{objtake.materialUnits}}</text>
|
||||
</view>
|
||||
<view>
|
||||
累计请领
|
||||
<text>{{objtake.materialNo}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="plsbuy-bottom">
|
||||
<view class="quxiao" @click="emit('fill')">
|
||||
取消
|
||||
</view>
|
||||
<view class="plsbuy-bottom-blue" @click="closeIt">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount, computed, nextTick, defineProps, watch, reactive } from 'vue';
|
||||
const props = defineProps({
|
||||
objtake: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
show: {
|
||||
type: Boolean
|
||||
}
|
||||
})
|
||||
const serverUrl = ref(uni.getStorageSync('serverUrl') + '/sys/common/static/')
|
||||
const emit = defineEmits([ 'fill' ,'qingling'])
|
||||
const showbox = ref(false)
|
||||
watch(()=>props.show,
|
||||
()=>{
|
||||
console.log(props.objtake)
|
||||
if(props.show==true){
|
||||
setTimeout(()=>{
|
||||
showbox.value = true
|
||||
},50)
|
||||
}else{
|
||||
showbox.value = false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.plsbuy-bottom {
|
||||
width: 100%;
|
||||
margin-top: 3vw;
|
||||
height: 7vw;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
font-size: 35rpx;
|
||||
padding-right: 3vw;
|
||||
view{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 9.1vw;
|
||||
height: 3.8vw;
|
||||
color: rgba(92, 121, 146, 1);
|
||||
border-radius:1.9vw;
|
||||
font-size: 1.8vw;
|
||||
border: 1px solid #EDEDEF;
|
||||
margin-left: 1vw;
|
||||
}
|
||||
.quxiao{
|
||||
background: #EDEDEF;
|
||||
}
|
||||
.plsbuy-bottom-blue {
|
||||
background: linear-gradient(0deg, #CAE0F9, #E9F4FF);
|
||||
border: 1px solid rgba(3,133,250,0.34);
|
||||
color: #0385FA;
|
||||
}
|
||||
}
|
||||
.card {
|
||||
width: 53vw;
|
||||
height: 29vw;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
box-shadow: 0rpx 0rpx 1.3vw 0rpx rgba(163, 167, 182, 0.16);
|
||||
border-radius: 1.6vw;
|
||||
position: fixed;
|
||||
top: 16vw;
|
||||
left: 23vw;
|
||||
z-index: 200;
|
||||
|
||||
.cont {
|
||||
width: 100%;
|
||||
height: 14vw;
|
||||
padding: 0 3vw;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
|
||||
.leftbox {
|
||||
width: 14.2vw;
|
||||
height: 100%;
|
||||
border-right: 2px solid #E5E5E5;
|
||||
|
||||
view {
|
||||
width: 100%;
|
||||
margin-top: 0.6vw;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
|
||||
text {
|
||||
width: 6vw;
|
||||
height: 2vw;
|
||||
border-radius: 1vw;
|
||||
border: 1px solid #D2D2D2;
|
||||
font-weight: 400;
|
||||
font-size: 1.1vw;
|
||||
color: #555555;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
>image {
|
||||
width: 10.2vw;
|
||||
height: 10.2vw;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.youcont {
|
||||
width: 32vw;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
>view {
|
||||
padding: 0 1.8vw;
|
||||
&:nth-child(2),
|
||||
&:nth-child(3) {
|
||||
width: 100%;
|
||||
height: 3.6vw;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
margin-top: 1.8vw;
|
||||
|
||||
>view {
|
||||
width: 33.3%;
|
||||
font-weight: 400;
|
||||
font-size: 1.1vw;
|
||||
color: #888888;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
text {
|
||||
font-weight: 400;
|
||||
font-size: 1.4vw;
|
||||
color: #222222;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(1) {
|
||||
width: 100%;
|
||||
height: 1.8vw;
|
||||
font-weight: bold;
|
||||
font-size: 1.6vw;
|
||||
color: #222222;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
line-height: 1.8vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tit {
|
||||
width: 100%;
|
||||
height: 6vw;
|
||||
line-height: 6vw;
|
||||
padding-left: 2.2vw;
|
||||
font-weight: 400;
|
||||
font-size: 1.6vw;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
.hei0 {
|
||||
height: 0 !important;
|
||||
view{
|
||||
height: 0 !important;
|
||||
}
|
||||
}
|
||||
.unclass {
|
||||
opacity: 0 !important;
|
||||
}
|
||||
.guodu {
|
||||
transition: .4s;
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.mengban{
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
z-index: 20;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,418 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="mengban" @click="emit('fill')" v-if="show"> </view>
|
||||
<view class="takitem guodu" :class="show?'':'unclass'" :style="showbox?'z-index:220':'z-index:-2'">
|
||||
<view class="tit">
|
||||
请领物料
|
||||
</view>
|
||||
<view class="cont">
|
||||
<view class="zuo">
|
||||
<view class="carp">
|
||||
<view class="zuoimg tp">
|
||||
<image :src="objtake.materialImg?serverUrl+objtake.materialImg:'/static/index/procurement/k.png'" mode="aspectFill"/>
|
||||
</view>
|
||||
<view class="youcont">
|
||||
<view>{{objtake.materialName}}</view>
|
||||
<view>
|
||||
<view>
|
||||
物料编码
|
||||
<text>{{objtake.materialNo}}</text>
|
||||
</view>
|
||||
<view>
|
||||
请购单位
|
||||
<text>{{objtake.materialUnits}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
规格型号
|
||||
<text style="white-space: nowrap;">{{objtake.specificationModel}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="qinggou-font">
|
||||
数量 <text style="color: red;" v-if="sx==true">超过库存上限!</text>
|
||||
</view>
|
||||
<view class="stringShow-father">
|
||||
<view class="jj" @click="jjnum(-1)" @longpress="handleTouchStart(-1)" @touchend="handleTouchEnd">
|
||||
-
|
||||
</view>
|
||||
<view class="stringShow-kuai">
|
||||
<view v-for="(item,index) in stringShow" :key="index" :style="sx==true?'color: red':''">
|
||||
{{item}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="jj" :style="sx==true?'background:#f8f8f8':''" @click="jjnum(1)" @longpress="handleTouchStart(1)" @touchend="handleTouchEnd">
|
||||
+
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="you">
|
||||
<view class="calculator-father">
|
||||
<view v-for="(item,index) in calculatorArray" :key="index">
|
||||
<view class="calculator-kuai"
|
||||
@click="clickKuai(item,index)">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="plsbuy-bottom">
|
||||
<view class="quxiao" @click="emit('fill')">
|
||||
取消
|
||||
</view>
|
||||
<view class="plsbuy-bottom-blue" @click="closeIt">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount, computed, nextTick, defineProps, watch, reactive } from 'vue';
|
||||
const props = defineProps({
|
||||
objtake: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
show: {
|
||||
type: Boolean
|
||||
}
|
||||
})
|
||||
const serverUrl = ref(uni.getStorageSync('serverUrl') + '/sys/common/static/')
|
||||
const emit = defineEmits([ 'fill' ,'qingling'])
|
||||
const showbox = ref(false)
|
||||
watch(()=>props.show,
|
||||
()=>{
|
||||
console.log(props.objtake)
|
||||
if(props.show==true){
|
||||
setTimeout(()=>{
|
||||
showbox.value = true
|
||||
},50)
|
||||
}else{
|
||||
showbox.value = false
|
||||
}
|
||||
})
|
||||
const sx = ref(false)
|
||||
const cy=()=>{
|
||||
let num = Number(props.caigouobj.upperLimit)-Number(props.caigouobj.kcsl);
|
||||
let bl = relNumber.value*type.value.num
|
||||
if(bl>num){
|
||||
sx.value = true
|
||||
}else{
|
||||
sx.value = false
|
||||
}
|
||||
console.log(sx.value,num,bl)
|
||||
}
|
||||
const calculatorArray = [1, 2, 3, 4, 5, 6, 7, 8, 9, "AC", 0, "AE"];
|
||||
const stringShow = ref("0000");
|
||||
const relNumber = ref(0);
|
||||
const isZero = ref(false);
|
||||
const clickKuai = (item : any, index : number) => {
|
||||
if (item == "AC") {
|
||||
relNumber.value = 0;
|
||||
stringShow.value = "0000";
|
||||
cy()
|
||||
return
|
||||
}
|
||||
if (item == "AE") {
|
||||
relNumber.value = Math.trunc(relNumber.value / 10)
|
||||
stringShow.value = toFixed4ByPadStart(relNumber.value);
|
||||
cy()
|
||||
return
|
||||
}
|
||||
if(isZero.value == false){
|
||||
isZero.value = true;
|
||||
relNumber.value = item;
|
||||
stringShow.value = toFixed4ByPadStart(relNumber.value);
|
||||
cy()
|
||||
return
|
||||
}
|
||||
if (digitCountByString(relNumber.value) > 3) {
|
||||
|
||||
} else {
|
||||
if (!relNumber.value) {
|
||||
relNumber.value = item
|
||||
} else {
|
||||
relNumber.value = relNumber.value * 10 + item;
|
||||
}
|
||||
cy()
|
||||
stringShow.value = toFixed4ByPadStart(relNumber.value)
|
||||
}
|
||||
}
|
||||
const InteroutId = ref(null)
|
||||
const handleTouchStart = (e:number)=> {
|
||||
Interval(e)
|
||||
}
|
||||
const handleTouchEnd=()=> {
|
||||
clearInterval(InteroutId.value);
|
||||
// 清除定时器
|
||||
}
|
||||
const Interval = (e:number)=>{
|
||||
InteroutId.value = setInterval(() => {
|
||||
jjnum(e);
|
||||
}, 120);
|
||||
}
|
||||
const jjnum = (e:number)=>{
|
||||
let num = Number(props.caigouobj.upperLimit)-Number(props.caigouobj.kcsl);
|
||||
let m = Math.floor(num/type.value.num)
|
||||
if(m<=relNumber.value&&e==1){relNumber.value = m; return}
|
||||
if(relNumber.value<=1&&e==-1){relNumber.value = 1; return}
|
||||
relNumber.value+=e;
|
||||
stringShow.value = toFixed4ByPadStart(relNumber.value)
|
||||
cy()
|
||||
// emit('jjnum',e)
|
||||
}
|
||||
const closeIt = () => {
|
||||
if(relNumber.value<1){
|
||||
uni.showToast({
|
||||
title:'采购数量不能为0!',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
emit('right', relNumber.value,gysarr.value[gysidnum.value],type.value)
|
||||
}
|
||||
const colse = ()=>{
|
||||
emit('colse')
|
||||
}
|
||||
function digitCountByString(n) {
|
||||
const s = Math.abs(n).toString();
|
||||
return s.length;
|
||||
}
|
||||
function toFixed4ByPadStart(n) {
|
||||
const intPart = Math.floor(Math.abs(n));
|
||||
return String(intPart).padStart(4, '0');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.takitem{
|
||||
width: 53.3vw;
|
||||
height: 36vw;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
box-shadow: 0rpx 0rpx 1.3vw 0rpx rgba(163,167,182,0.16);
|
||||
border-radius: 1.6vw;
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
top: 13vw;
|
||||
right: 23.4vw;
|
||||
padding: 2vw;
|
||||
.you{
|
||||
.plsbuy-bottom {
|
||||
width: 100%;
|
||||
margin-top: 3vw;
|
||||
height: 7vw;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
font-size: 35rpx;
|
||||
view{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 9.1vw;
|
||||
height: 3.8vw;
|
||||
color: rgba(92, 121, 146, 1);
|
||||
border-radius:1.9vw;
|
||||
font-size: 1.8vw;
|
||||
border: 1px solid #EDEDEF;
|
||||
margin-left: 1vw;
|
||||
}
|
||||
.quxiao{
|
||||
background: #EDEDEF;
|
||||
}
|
||||
.plsbuy-bottom-blue {
|
||||
background: linear-gradient(0deg, #CAE0F9, #E9F4FF);
|
||||
border: 1px solid rgba(3,133,250,0.34);
|
||||
color: #0385FA;
|
||||
}
|
||||
}
|
||||
.calculator-father {
|
||||
width: 19vw;
|
||||
height: 20vw;
|
||||
margin :0 auto 0;
|
||||
flex-wrap: wrap;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
.calculator-kuai {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: url('/static/index/procurement/bt.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
font-size: 42rpx;
|
||||
font-weight: 500;
|
||||
margin: 12rpx 20rpx 0 20rpx;
|
||||
width: 4.4vw;
|
||||
height: 4.4vw;
|
||||
}
|
||||
.calculator-kuai:active{
|
||||
background: linear-gradient(to bottom, #00C9FF, #0076FF);
|
||||
color: #fff;
|
||||
font-size: 45rpx;
|
||||
font-weight: 500;
|
||||
border-radius: 1.6vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
.stringShow-father {
|
||||
width: 100%;
|
||||
height:7vw;
|
||||
margin-top:0.5vw;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
.jj{
|
||||
width: 5vw;
|
||||
height: 5vw;
|
||||
margin: 0 1vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: url('/static/index/procurement/bt.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
border-radius: 45rpx;
|
||||
font-size: 42rpx;
|
||||
}
|
||||
.jj:active{
|
||||
background: linear-gradient(to bottom, #00C9FF, #0076FF);
|
||||
color: #fff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #DCDCEE;
|
||||
border-radius: 45rpx;
|
||||
font-size: 45rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.stringShow-kuai {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 11.5vw;
|
||||
height: 5vw;
|
||||
background: #F3F5F9;
|
||||
border-radius: 1vw;
|
||||
border: 1px solid #CBCFD0;
|
||||
justify-content: space-around;
|
||||
box-shadow: 0rpx 0.1vw 0.3vw 0rpx rgba(140,143,153,0.17) inset;
|
||||
view{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 42rpx;
|
||||
font-weight: 500;
|
||||
width:2.5vw;
|
||||
height: 5vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
.qinggou-font {
|
||||
font-size: 1.4vw;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.cont{
|
||||
width: 100%;
|
||||
height: 26.5vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-top: 1.7vw;
|
||||
.zuo{
|
||||
width: 27vw;
|
||||
height: 100%;
|
||||
.carp{
|
||||
width: 100%;
|
||||
height: 16vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-top: 1.8vw;
|
||||
.youcont{
|
||||
width: 17vw;
|
||||
height: 100%;
|
||||
>view{
|
||||
&:nth-child(2),&:nth-child(3){
|
||||
width: 100%;
|
||||
height: 3.6vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 1.8vw;
|
||||
>view{
|
||||
font-weight: 400;
|
||||
font-size: 1.1vw;
|
||||
color: #888888;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
text{
|
||||
font-weight: 300;
|
||||
font-size: 1.4vw;
|
||||
color: #222222;
|
||||
}
|
||||
}
|
||||
}
|
||||
&:nth-child(1){
|
||||
width: 17vw;
|
||||
height: 1.8vw;
|
||||
font-weight: bold;
|
||||
font-size: 1.6vw;
|
||||
color: #222222;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
line-height: 1.8vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
.zuoimg{
|
||||
width: 8vw;
|
||||
height: 8vw;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tit{
|
||||
width: 100%;
|
||||
height: 2.6vw;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
font-weight: 400;
|
||||
font-size: 1.6vw;
|
||||
color: #333333;
|
||||
line-height: 2.1vw;
|
||||
}
|
||||
}
|
||||
.mengban{
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
z-index: 20;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.hei0 {
|
||||
height: 0 !important;
|
||||
view{
|
||||
height: 0 !important;
|
||||
}
|
||||
}
|
||||
.unclass {
|
||||
opacity: 0 !important;
|
||||
}
|
||||
.guodu {
|
||||
transition: .4s;
|
||||
-webkit-transform-style: preserve-3d;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -8,13 +8,14 @@
|
|||
<view class="scr">
|
||||
检索
|
||||
</view>
|
||||
<view class="shx">
|
||||
<view class="shx" @click="ification = true">
|
||||
<image src="/static/index/requestform/shaixuan.png" mode="aspectFill"></image>
|
||||
<view class="shx-font">
|
||||
筛选
|
||||
</view>
|
||||
</view>
|
||||
<view class="shx">
|
||||
<view class="shx" @click="chongzhi"
|
||||
v-if="form.categoryId!=''||form.wlParamInfo!='' " >
|
||||
<image src="/static/index/requestform/chongzhi.png" mode="aspectFill"></image>
|
||||
<view class="shx-font">
|
||||
重置
|
||||
|
|
@ -43,16 +44,22 @@
|
|||
</view>
|
||||
</view>
|
||||
<addwl></addwl>
|
||||
<carditem :InvoicingList="listarr"></carditem>
|
||||
<carditem :InvoicingList="listarr" @scrolltolower="scrolltolower" :status="status" @comfig="comfig"></carditem>
|
||||
<takeing :show="takeshow" :objtake="objtake" @fill="takeshow = false"></takeing>
|
||||
<cgdclass @confirm="confirm" :show="ification" :typenum="0" ref="classication" @fill="ification = false"></cgdclass>
|
||||
<medetails :show="detaishow" @fill="detaishow = false" @confirm="confirm" :objtake="objtake"></medetails>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount, computed, nextTick, defineProps, watch, reactive } from 'vue';
|
||||
import { queryInvoicingList } from '../api/api.js'
|
||||
import addwl from '../common/addwl.vue'
|
||||
import carditem from '../common/carditem.vue'
|
||||
const from = reactive({
|
||||
import { queryInvoicingList,wlzd } from '../api/api.js'
|
||||
import addwl from '../common/addwl.vue';
|
||||
import carditem from '../common/carditem.vue';
|
||||
import takeing from '../common/takeing.vue';
|
||||
import cgdclass from '../common/cgdclass.vue';
|
||||
import medetails from '../common/medetails.vue';
|
||||
const form = reactive({
|
||||
pageNo:1,
|
||||
pageSize:10,
|
||||
nuId:uni.getStorageSync('nuId'),
|
||||
|
|
@ -62,21 +69,98 @@
|
|||
typeId:'',
|
||||
medicationId:''
|
||||
})
|
||||
const takeshow = ref(false)
|
||||
const ification = ref(false)
|
||||
const detaishow = ref(false)
|
||||
|
||||
const classication = ref<InstanceType<typeof ChildComponent>>()
|
||||
onMounted(()=>{
|
||||
config()
|
||||
})
|
||||
const listarr = ref([])
|
||||
const status = ref('loadmore')
|
||||
const config = ()=>{
|
||||
console.log(from)
|
||||
queryInvoicingList(from).then(res=>{
|
||||
console.log(form)
|
||||
queryInvoicingList(form).then(res=>{
|
||||
res.result.records.forEach(item=>{
|
||||
item.zk = false;
|
||||
item.scrollleft = 0;
|
||||
})
|
||||
listarr.value.push(...res.result.records)
|
||||
console.log(res)
|
||||
status.value = (res.result.total == listarr.value.length ? 'nomore' : 'loadmore')
|
||||
console.log(res,status.value,listarr.value.length)
|
||||
})
|
||||
}
|
||||
const scrolltolower = ( ) => {
|
||||
if (status.value=='loading') { return }
|
||||
status.value = 'loading';
|
||||
form.pageNo++;
|
||||
config()
|
||||
}
|
||||
const objtake = ref({})
|
||||
const comfig=(v,i,t)=>{
|
||||
console.log(v,i,t)
|
||||
switch (t){
|
||||
case 0:
|
||||
objtake.value = v;
|
||||
takeshow.value = true;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
break;
|
||||
|
||||
case 2:
|
||||
objtake.value = v;
|
||||
detaishow.value = true;
|
||||
break;
|
||||
case 3:
|
||||
let obj = {
|
||||
nuId:form.nuId,
|
||||
elderId:form.elderId,
|
||||
wlId:v.wlId,
|
||||
izZd:v.zhiDingId?false:true
|
||||
}
|
||||
wlzd(obj).then(res=>{
|
||||
console.log(obj,res)
|
||||
if(res.success){
|
||||
listarr.value = [];
|
||||
form.pageNo = 1;
|
||||
config()
|
||||
}else{
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title:res.message
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
const confirm = (e)=>{
|
||||
form.categoryId = e.categoryId;
|
||||
form.typeId = e.typeId;
|
||||
form.medicationId = e.medicationId;
|
||||
form.pageNo=1;
|
||||
listarr.value = [];
|
||||
config();
|
||||
ification.value = false;
|
||||
console.log(e)
|
||||
}
|
||||
const chongzhi=()=>{
|
||||
form.categoryId = '';
|
||||
form.typeId = '';
|
||||
form.medicationId = '';
|
||||
form.pageNo=1;
|
||||
form.wlParamInfo= '',
|
||||
listarr.value = [];
|
||||
classication.value.typescroll(1,-1,{});
|
||||
classication.value.qingkong();
|
||||
classication.value.config();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
|
|
|||
|
|
@ -138,8 +138,8 @@
|
|||
const moredex = ref(0)
|
||||
const InvoicingList = ref([]);
|
||||
const caigouobj = ref({})
|
||||
const status = ref('loading')
|
||||
const statustory = ref('loading')
|
||||
const status = ref('loadmore')
|
||||
const statustory = ref('loadmore')
|
||||
|
||||
const scrolltop = ref(0)
|
||||
const serverUrl = ref('')
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
Loading…
Reference in New Issue