Commit 83d0d5ec authored by 华国豪's avatar 华国豪 🙄

1

parent b4220283
...@@ -332,7 +332,7 @@ input[type="number"] { ...@@ -332,7 +332,7 @@ input[type="number"] {
<td v-if="childIndex==0" :rowspan="subItem.DiningPriceList.length"> <td v-if="childIndex==0" :rowspan="subItem.DiningPriceList.length">
{{item.UseTimeStr}} {{item.UseTimeStr}}
</td> </td>
<td v-if="childIndex==0" :rowspan="subItem.DiningPriceList.length"> <td v-if="childIndex==0 && subIndex == 0" :rowspan="item.row">
{{subItem.RealName? subItem.RealName : subItem.DiningName}} {{subItem.RealName? subItem.RealName : subItem.DiningName}}
</td> </td>
<td v-if="childIndex==0" :rowspan="subItem.DiningPriceList.length"> <td v-if="childIndex==0" :rowspan="subItem.DiningPriceList.length">
...@@ -1471,6 +1471,11 @@ export default { ...@@ -1471,6 +1471,11 @@ export default {
// } // }
// }) // })
}, },
unique(arr) { // 根据唯一标识orderId来对数组进行过滤
const res = new Map(); //定义常量 res,值为一个Map对象实例
//返回arr数组过滤后的结果,结果为一个数组 过滤条件是,如果res中没有某个键,就设置这个键的值为1
return arr.filter((arr) => !res.has(arr.DiningID) && res.set(arr.DiningID, 1))
},
getnewList(){ getnewList(){
this.loading = true; this.loading = true;
// dmcstatistics_post_GetNewPlanTotalPrice_V2 // dmcstatistics_post_GetNewPlanTotalPrice_V2
...@@ -1524,13 +1529,23 @@ export default { ...@@ -1524,13 +1529,23 @@ export default {
}); });
Diningmap[ai.UseTimeStr] = ai; Diningmap[ai.UseTimeStr] = ai;
}else{ }else{
let list = []
for(var j = 0; j < Diningdest.length; j++){ for(var j = 0; j < Diningdest.length; j++){
var dj = Diningdest[j]; var dj = Diningdest[j];
if(dj.UseTimeStr == ai.UseTimeStr && dj.DiningID == ai.DiningID){ if(dj.UseTimeStr == ai.UseTimeStr && dj.DiningID == ai.DiningID){
dj.data.push(ai); dj.data.push(ai);
break; break;
}else{
list.push(ai)
} }
} }
for(let i = 0; i < list.length; i++) {
Diningdest.push({
UseTimeStr: ai.UseTimeStr,
DiningID: ai.DiningID,
data: [ai]
});
}
} }
} }
for(var i = 0; i < Diningdest.length; i++){ for(var i = 0; i < Diningdest.length; i++){
...@@ -1540,7 +1555,8 @@ export default { ...@@ -1540,7 +1555,8 @@ export default {
} }
Diningdest[i].row = row Diningdest[i].row = row
} }
this.DiningDataList = Diningdest this.DiningDataList = this.unique(Diningdest);
// this.DiningDataList = Diningdest
//票 //票
let ScenicList = [] let ScenicList = []
for(let i = 0; i < res.data.data.ScenicList.length; i++) { for(let i = 0; i < res.data.data.ScenicList.length; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment