|
@@ -7,11 +7,6 @@
|
|
|
@close="onClose"
|
|
|
>
|
|
|
<div>
|
|
|
-<!-- <table_list :layout="tablecols" :opwidth="200" :data="productsList" :custom="true" :height="tableHieght" :checkbox="true">-->
|
|
|
-<!-- <template v-slot:customcol="scope">-->
|
|
|
-<!-- <p >{{scope.column.data[scope.column.columnname]}}</p>-->
|
|
|
-<!-- </template>-->
|
|
|
-<!-- </table_list>-->
|
|
|
<tablelayout :layout="tablecols" :data="productsList" :custom="true" :checkbox="true" height="calc(100vh - 452px)" @checkboxCallBack="checkboxCallBack">
|
|
|
<template v-slot:customcol="scope">
|
|
|
<div v-if="scope.column.columnname === 'province'">
|
|
@@ -19,7 +14,16 @@
|
|
|
</div>
|
|
|
<p v-else>{{scope.column.data[scope.column.columnname]}}</p>
|
|
|
</template>
|
|
|
+
|
|
|
</tablelayout>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <p style="margin-top: 2%">已选{{selected}}个商品,共{{total}}个商品</p>
|
|
|
+ </div>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button size="small" @click="drawer = false" class="normal-btn-width">取消</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width btn-primary">确定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -45,7 +49,9 @@ export default {
|
|
|
productsList:[],
|
|
|
multipleSelection: [],
|
|
|
tablecols:[],
|
|
|
- tableHieght:420
|
|
|
+ tableHieght:420,
|
|
|
+ selected:0,
|
|
|
+ total:0
|
|
|
}
|
|
|
},
|
|
|
components:{
|
|
@@ -77,19 +83,13 @@ export default {
|
|
|
})
|
|
|
console.log(res)
|
|
|
this.productsList = res.data
|
|
|
+ this.total = res.total
|
|
|
},
|
|
|
- // toggleSelection(rows) {
|
|
|
- // if (rows) {
|
|
|
- // rows.forEach(row => {
|
|
|
- // this.$refs.multipleTable.toggleRowSelection(row);
|
|
|
- // });
|
|
|
- // } else {
|
|
|
- // this.$refs.multipleTable.clearSelection();
|
|
|
- // }
|
|
|
- // },
|
|
|
-
|
|
|
- handleSelectionChange(val) {
|
|
|
+ checkboxCallBack(val){
|
|
|
+ console.log(val)
|
|
|
this.multipleSelection = val;
|
|
|
+ this.selected = val.length
|
|
|
+
|
|
|
},
|
|
|
async onSubmit(){
|
|
|
console.log(this.multipleSelection)
|