Commit ba70c5b2 authored by zhengke's avatar zhengke

修改

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