diff --git a/.gitignore b/.gitignore index f0f507f..972b04a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /.hbuilderx /unpackage/dist/dev/app-plus -/unpackage/dist/dev/mp-weixin \ No newline at end of file +/unpackage/dist/dev/mp-weixin +/unpackage/dist/dev/cache \ No newline at end of file diff --git a/pages/procurement/components/Inventory.vue b/pages/procurement/components/Inventory.vue index 995aeab..4c5bb55 100644 --- a/pages/procurement/components/Inventory.vue +++ b/pages/procurement/components/Inventory.vue @@ -2,19 +2,21 @@ 全部库存预警 - - + {{v.categoryId_dictText}} {{v.typeId_dictText}} - {{v.medicationName}} + {{v.medicationId_dictText}} - + {{v.materialName}}{{v.materialNo}} @@ -44,15 +46,20 @@ - + 已添加 - - 出入库 - 加购物车 + + 出入库 + + + 加购 + 物车 + + - + @@ -65,16 +72,6 @@ \ No newline at end of file diff --git a/pages/procurement/components/classification.vue b/pages/procurement/components/classification.vue index b434546..3857dfe 100644 --- a/pages/procurement/components/classification.vue +++ b/pages/procurement/components/classification.vue @@ -84,7 +84,7 @@ 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:'', + medicationId:scroll.act3>-1?TreeData.value[scroll.act1].children[scroll.act2].children[scroll.act3].key:'', } getTreeDataWlnum(obj).then(res=>{ num.value = res.result.totalSize; @@ -100,7 +100,7 @@ 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:'', + medicationId:scroll.act3>-1?TreeData.value[scroll.act1].children[scroll.act2].children[scroll.act3].key:'', } emit('confirm',obj) } diff --git a/pages/procurement/material.vue b/pages/procurement/material.vue index fa13a13..2589d2e 100644 --- a/pages/procurement/material.vue +++ b/pages/procurement/material.vue @@ -29,7 +29,7 @@ {{!qb?'更多':'收起'}} - + 查看全部 添加全部 @@ -70,62 +70,7 @@ - - - - - - - {{v.categoryId_dictText}} - {{v.typeId_dictText}} - {{v.medicationName}} - - - - - {{v.materialName}}{{v.materialNo}} - - - 规格型号: {{v.specificationModel}} - - - 采购单价: ¥{{v.oneUnitPrice}} - 采购单位: {{ v.oneUnit}} - 采购单价: ¥{{v.twoUnitPrice}} - 采购单位: {{ v.twoUnit}} - 采购单价: ¥{{v.referenceUnitPrice}} - 采购单位: {{ v.materialUnits}} - - - - {{v.kcsl}} - 库存数量 - - - {{v.upperLimit}} - 物料上限 ↑ - - - {{v.lowerLimit}} - ↓ 物料下限 - - - - - 已添加 - - - - 出入库 - 加购物车 - - - - - - - + @@ -136,14 +81,18 @@ - + + + + - + @@ -154,6 +103,7 @@ import calculator from './components/calculator.vue' import classification from './components/classification.vue' import Inventory from './components/Inventory.vue' + import carditem from './components/carditem.vue' const qb = ref(false) const addflag = ref(false) const ification = ref(false) @@ -201,6 +151,7 @@ console.log(res.result) res.result.records.forEach(item=>{ item.zk = false; + item.scrollleft = 0; }) Material.value.push(...res.result.records); statustory.value = (res.result.total == Material.value.length ? 'nomore' : 'loadmore') @@ -264,23 +215,13 @@ queryInvoicingList(form).then(res => { res.result.records.forEach(item=>{ item.zk = false; + item.scrollleft = 0; }) InvoicingList.value.push(...res.result.records); status.value = (res.result.total == InvoicingList.value.length ? 'nomore' : 'loadmore') setout2.value = (res.result.total == InvoicingList.value.length ? false : true) }) } - const clkzk =(v:any,i:number)=>{ - caigouobj.value = v; - caigouobj.value.Limitnum = Number(caigouobj.value?.upperLimit)-Number(caigouobj.value.kcsl); - InvoicingList.value.forEach((item,k)=>{ - if(k==i){ - item.zk = !item.zk; - }else{ - item.zk = false; - } - }) - } const addcartory =(e:any)=>{ console.log(e) caigouobj.value = e; @@ -308,6 +249,10 @@ } connfig(nm) } + const addcard=(n:any,nm:any)=>{ + caigouobj.value = n; + connfig(nm) + } const timers = ref(true) const connfig = (nm:any) =>{ if(timers.value==false){return} @@ -337,8 +282,10 @@ if(res.success){ addflag.value = false; shoppcar(); - if(caigouobj.value.index){ + if(caigouobj.value.yj){ Material.value[caigouobj.value.index].isAdd = 1 + }else{ + InvoicingList.value[caigouobj.value.index].isAdd = 1 } } },700) @@ -394,207 +341,12 @@ width: 100%; height: 70.3vh; margin-top: 1vw; - - .carditem { - width: 47vw; - height: 14.5vw; - background: rgba(255, 255, 255, 0.5); - 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; - >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: 100%; - - .fler { - display: grid; - grid-template-columns: 1fr 1fr; - } + display: grid; + grid-template-columns: 1fr 1fr; } }