|
@@ -484,7 +484,7 @@ export default {
|
|
referenceDosageQty=Math.ceil(referenceDosageQty)
|
|
referenceDosageQty=Math.ceil(referenceDosageQty)
|
|
if(goods.goodsList[0].capacity&&!goods.goodsList[0].del){
|
|
if(goods.goodsList[0].capacity&&!goods.goodsList[0].del){
|
|
//console.log(Number(list.referenceDosageQty)/goods[0].capacity)
|
|
//console.log(Number(list.referenceDosageQty)/goods[0].capacity)
|
|
- if(referenceDosageQty/goods.goodsList[0].capacity>1){
|
|
|
|
|
|
+ if(referenceDosageQty/goods.goodsList[0].capacity>1||referenceDosageQty/goods.goodsList[0].capacity==1){
|
|
var qtynum1=referenceDosageQty-goods.goodsList[0].capacity
|
|
var qtynum1=referenceDosageQty-goods.goodsList[0].capacity
|
|
var qtynum2=Math.ceil(qtynum1/goods.goodsList[0].capacity)
|
|
var qtynum2=Math.ceil(qtynum1/goods.goodsList[0].capacity)
|
|
|
|
|
|
@@ -779,13 +779,18 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
- this.mealData.forEach(item=>{
|
|
|
|
|
|
+
|
|
|
|
+ this.mealData.forEach((item,index1)=>{
|
|
item.listPackage.forEach((list,i)=>{
|
|
item.listPackage.forEach((list,i)=>{
|
|
list.listGoodsAll.forEach((goods,index)=>{
|
|
list.listGoodsAll.forEach((goods,index)=>{
|
|
goods.goodsGroupDetail.forEach(tgoods=>{
|
|
goods.goodsGroupDetail.forEach(tgoods=>{
|
|
tgoods.del=false;
|
|
tgoods.del=false;
|
|
|
|
|
|
})
|
|
})
|
|
|
|
+ goods.goodsList[0].del=false;
|
|
|
|
+ if(goods.tpn){
|
|
|
|
+ list.listGoodsAll.splice(index, 1)
|
|
|
|
+ }
|
|
})
|
|
})
|
|
})
|
|
})
|
|
})
|
|
})
|
|
@@ -814,7 +819,7 @@ export default {
|
|
referenceDosageQty=Math.ceil(referenceDosageQty)
|
|
referenceDosageQty=Math.ceil(referenceDosageQty)
|
|
if(goods.goodsList[0].capacity&&!goods.goodsList[0].del){
|
|
if(goods.goodsList[0].capacity&&!goods.goodsList[0].del){
|
|
//console.log(Number(list.referenceDosageQty)/goods[0].capacity)
|
|
//console.log(Number(list.referenceDosageQty)/goods[0].capacity)
|
|
- if(referenceDosageQty/goods.goodsList[0].capacity>1){
|
|
|
|
|
|
+ if(referenceDosageQty/goods.goodsList[0].capacity>1||referenceDosageQty/goods.goodsList[0].capacity==1){
|
|
var qtynum1=referenceDosageQty-goods.goodsList[0].capacity
|
|
var qtynum1=referenceDosageQty-goods.goodsList[0].capacity
|
|
var qtynum2=Math.ceil(qtynum1/goods.goodsList[0].capacity)
|
|
var qtynum2=Math.ceil(qtynum1/goods.goodsList[0].capacity)
|
|
|
|
|
|
@@ -848,7 +853,7 @@ export default {
|
|
//var addArr= goods.goodsList
|
|
//var addArr= goods.goodsList
|
|
referenceDosageQty=Math.ceil(referenceDosageQty)
|
|
referenceDosageQty=Math.ceil(referenceDosageQty)
|
|
goods.goodsList.splice(300);
|
|
goods.goodsList.splice(300);
|
|
-
|
|
|
|
|
|
+ console.log("referenceDosageQty---"+referenceDosageQty + "goods.goodsList[0].del---" +goods.goodsList[0].del)
|
|
if(list.referenceDosageQty&&!goods.goodsList[0].del){
|
|
if(list.referenceDosageQty&&!goods.goodsList[0].del){
|
|
|
|
|
|
goods.goodsGroupDetail.forEach((tgoods,tindex)=>{
|
|
goods.goodsGroupDetail.forEach((tgoods,tindex)=>{
|
|
@@ -945,7 +950,7 @@ export default {
|
|
}else{
|
|
}else{
|
|
if(goods.goodsGroupDetail[0].capacity){
|
|
if(goods.goodsGroupDetail[0].capacity){
|
|
|
|
|
|
- if(referenceDosageQty>1){
|
|
|
|
|
|
+ if(referenceDosageQty>1||referenceDosageQty==1){
|
|
console.log('referenceDosageQty'+referenceDosageQty)
|
|
console.log('referenceDosageQty'+referenceDosageQty)
|
|
console.log(tgoods)
|
|
console.log(tgoods)
|
|
/* remainder=Number(referenceDosageQty)%tgoods.capacity
|
|
/* remainder=Number(referenceDosageQty)%tgoods.capacity
|
|
@@ -972,7 +977,7 @@ export default {
|
|
goodsGroupDetail:goods.goodsGroupDetail,
|
|
goodsGroupDetail:goods.goodsGroupDetail,
|
|
goodsList:addArr,
|
|
goodsList:addArr,
|
|
del:true,
|
|
del:true,
|
|
- //tpn:true,
|
|
|
|
|
|
+ tpn:true,
|
|
}
|
|
}
|
|
addDta.goodsList.forEach(add=>{
|
|
addDta.goodsList.forEach(add=>{
|
|
add.del=true;
|
|
add.del=true;
|