diff --git a/src/views/tool/Instead/components/dialogpackage.vue b/src/views/tool/Instead/components/dialogpackage.vue
index 6118c68..6851a66 100644
--- a/src/views/tool/Instead/components/dialogpackage.vue
+++ b/src/views/tool/Instead/components/dialogpackage.vue
@@ -7,7 +7,7 @@
本组菜品{{ item.count }}选{{ item.number || 1 }}
-
@@ -44,26 +44,23 @@ export default {
};
},
methods: {
- toggleSelection(rows) {
- if (rows) {
- rows.forEach(row => {
- this.$refs.dialogpackagetable.toggleRowSelection(row);
- });
- } else {
- this.$refs.dialogpackagetable.clearSelection();
- }
-
+ toggleSelection() {
+ this.$refs.refdialogpackagetable.forEach((a) => {
+ a.clearSelection();
+ })
},
handleSelectionChange(val, index) {
try {
this.listdata.proGroupVo.forEach((a, i) => {
this.multipleSelection[index] = i === index ? val : this.multipleSelection[index] || []
})
- this.disabledshow = !this.listdata.proGroupVo.every((element, num) => element.number <= this.multipleSelection[num].length);
+ this.disabledshow = !this.listdata.proGroupVo.every((element, num) => element.number == this.multipleSelection[num].length);
} catch (error) { }
- this.$set(this.listdata.proGroupVo, index, { ...this.listdata.proGroupVo[index], alertshow: this.listdata.proGroupVo[index].number >= this.multipleSelection[index].length ? true : false });
+
+ this.$set(this.listdata.proGroupVo, index, { ...this.listdata.proGroupVo[index], alertshow: this.listdata.proGroupVo[index].number != this.multipleSelection[index].length ? true : false });
},
confirm() {
+ console.log(listdata.proGroupVo)
this.$emit("dialogpackageconfirm", this.listdata, this.multipleSelection);
this.show = false;
@@ -71,11 +68,10 @@ export default {
open(item) {
this.listdata = item
try {
- this.$refs.dialogpackagetable.clearSelection();
-
- } catch (error) {
-
- }
+ this.$refs.refdialogpackagetable.forEach((a) => {
+ a.clearSelection();
+ })
+ } catch (error) { }
this.multipleSelection = []
this.disabledshow = true
console.log(this.listdata, this.multipleSelection);
diff --git a/src/views/tool/Instead/index.vue b/src/views/tool/Instead/index.vue
index 35b680b..5df0e8a 100644
--- a/src/views/tool/Instead/index.vue
+++ b/src/views/tool/Instead/index.vue
@@ -1902,9 +1902,7 @@ export default {
},
//套餐下单
async dialogpackageconfirm(item, multipleSelection) {
- console.log(item)
- console.log(multipleSelection)
- this.goodsClick(item, 1, true, multipleSelection)
+ this.goodsClick(item, 1, true, multipleSelection.flatMap(subArray => subArray.map(item => item.proId)))
},
//挂账人支付确认
guazhangPayConfirm(guazhangren, price) {
@@ -3613,7 +3611,7 @@ export default {
}
},
//根据右侧商品单规格多规格做不同处理
- async goodsClick(item, number = 0, isConfirm = false, multipleSelection='') {
+ async goodsClick(item, number = 0, isConfirm = false, multipleSelection = '') {
// if (!this.table) {
// return this.$message.error("暂不支持无桌台下单,请先选择桌台");