Commit ba70c5b2 authored by zhengke's avatar zhengke

修改

parent 23586f4e
<template>
<div>
<el-table ref="multipleTable" :data="dataList" tooltip-effect="dark" style="width: 100%"
<el-table ref="multipleTable" :data="dataList" tooltip-effect="dark" height="450" style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55">
</el-table-column>
......
......@@ -34,6 +34,7 @@
</template>
<script>
export default {
props:['ckGoods'],
data() {
return {
dataList: [],
......@@ -60,6 +61,10 @@
})
},
handleSelectionChange(val) {
if(val.length>this.ckGoods){
this.Info('超过了');
val=val.slice(0,this.ckGoods);
}
this.selectRow = JSON.parse(JSON.stringify(val));
},
handleCurrentChange(val) {
......
......@@ -420,7 +420,7 @@
</div>
</draggable>
<div class="goods-add">
<el-button @click="showGoodsDialog(catIndex)" icon="el-icon-plus"></el-button>
<el-button @click="showGoodsDialog(catIndex),ckGoods=cat.goodsNum" icon="el-icon-plus"></el-button>
</div>
</div>
</div>
......@@ -542,7 +542,7 @@
</el-dialog>
<!-- 选择商品 -->
<el-dialog title="选择商品" :visible.sync="isShowGoods" custom-class="goodsDialog">
<choiceGood ref="choiceGood"></choiceGood>
<choiceGood ref="choiceGood" :ckGoods="ckGoods"></choiceGood>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="quxiaoGoods()">取 消</el-button>
<el-button size="small" type="danger" @click="getGoodsChoice()">确 定</el-button>
......@@ -567,6 +567,8 @@
},
data() {
return {
//可以选择的商品数
ckGoods:0,
data: this.goodData.data,
position: 'center center',
repeat: 'no-repeat',
......
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