|
@@ -106,7 +106,7 @@
|
|
|
<view class="hejiMs">商品¥{{goodsTotal}}+工时费¥{{salePriceTotal}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="settlement" @click="settlement">去结算</view>
|
|
|
+ <view class="settlement" @click="settlement">去选店</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="caidanTk" v-show="qingdanShow" @click="qingdanShow=false">
|
|
@@ -487,6 +487,7 @@ export default {
|
|
|
//同组品不为空的情况
|
|
|
//console.log("同组品不为空的情况 ")
|
|
|
var remainder=0;
|
|
|
+ var addNum=index
|
|
|
console.log("list.referenceDosageQty - "+list.referenceDosageQty+list.name)
|
|
|
var referenceDosageQty=Number(list.referenceDosageQty)
|
|
|
//var addArr= goods.goodsList
|
|
@@ -511,12 +512,32 @@ export default {
|
|
|
if(remainder>0){
|
|
|
//addArr.unshift(tgoods)
|
|
|
} */
|
|
|
-
|
|
|
+ var addDta={
|
|
|
+ goodsGroupDetail:[],
|
|
|
+ goodsList:addArr,
|
|
|
+ del:true
|
|
|
+ }
|
|
|
+ addDta.goodsList.forEach(add=>{
|
|
|
+ add.del=true;
|
|
|
+ })
|
|
|
+ //console.log(addArr)
|
|
|
+ if(tindex==0){
|
|
|
+ // console.log(addDta.goodsList[0])
|
|
|
+ list.listGoodsAll.splice(index, 1,addDta)
|
|
|
+ //console.log(list.listGoodsAll[index])
|
|
|
+ }else{
|
|
|
+ addNum++
|
|
|
+ console.log('addNum=='+addNum)
|
|
|
+ //console.log(addDta.goodsList[0])
|
|
|
+ list.listGoodsAll.splice(addNum, 0,addDta)
|
|
|
+ }
|
|
|
|
|
|
}else{
|
|
|
if(referenceDosageQty>0){
|
|
|
+ console.log('referenceDosageQty'+referenceDosageQty)
|
|
|
+ console.log(tgoods)
|
|
|
/* remainder=Number(referenceDosageQty)%tgoods.capacity
|
|
|
- console.log('--remainder---'+remainder)
|
|
|
+
|
|
|
if(remainder>1){
|
|
|
addArr.unshift(tgoods)
|
|
|
}
|
|
@@ -524,31 +545,39 @@ export default {
|
|
|
if(referenceDosageQty>tgoods.capacity){
|
|
|
var parseIntNum=parseInt(referenceDosageQty/tgoods.capacity)
|
|
|
tgoods.qty=parseIntNum
|
|
|
+ addArr.unshift(tgoods)
|
|
|
var reduce= tgoods.capacity*parseIntNum
|
|
|
referenceDosageQty=referenceDosageQty - reduce
|
|
|
}else{
|
|
|
addArr.unshift(tgoods)
|
|
|
referenceDosageQty=referenceDosageQty-tgoods.capacity
|
|
|
}
|
|
|
+
|
|
|
+ var addDta={
|
|
|
+ goodsGroupDetail:[],
|
|
|
+ goodsList:addArr,
|
|
|
+ del:true
|
|
|
+ }
|
|
|
+ addDta.goodsList.forEach(add=>{
|
|
|
+ add.del=true;
|
|
|
+ })
|
|
|
+ //console.log(addArr)
|
|
|
+ if(tindex==0){
|
|
|
+ // console.log(addDta.goodsList[0])
|
|
|
+ list.listGoodsAll.splice(index, 1,addDta)
|
|
|
+ //console.log(list.listGoodsAll[index])
|
|
|
+ }else{
|
|
|
+ addNum++
|
|
|
+ console.log('addNum=='+addNum)
|
|
|
+ //console.log(addDta.goodsList[0])
|
|
|
+ list.listGoodsAll.splice(addNum, 0,addDta)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
- var addDta={
|
|
|
- goodsGroupDetail:[],
|
|
|
- goodsList:addArr
|
|
|
- }
|
|
|
- addDta.goodsList.forEach(add=>{
|
|
|
- add.del=true;
|
|
|
- })
|
|
|
- if(tindex==0){
|
|
|
- console.log(addDta.goodsList[0])
|
|
|
- //list.listGoodsAll.splice(index, 0,addDta)
|
|
|
- console.log(list.listGoodsAll[index])
|
|
|
- }else{
|
|
|
- list.listGoodsAll.splice(index+1, 0,addDta)
|
|
|
- }
|
|
|
+
|
|
|
} )
|
|
|
|
|
|
}
|