Commit b268ad40 authored by 黄奎's avatar 黄奎

页面修改

parent 2c49ecc4
......@@ -6,8 +6,18 @@
</el-input>
<el-table ref="multipleTable" :data="dataList" tooltip-effect="dark" height="450" style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="50px">
</el-table-column>
<template v-if="isSingle">
<el-table-column width="50px" label="">
<template slot-scope="scope">
<el-radio v-model="scope.row.IsChecked" @change.native="getTemplateRow(scope.$index,scope.row)">&nbsp;
</el-radio>
</template>
</el-table-column>
</template>
<template v-else>
<el-table-column type="selection" width="50px">
</el-table-column>
</template>
<el-table-column label="ID" width="80px">
<template slot-scope="scope">{{ scope.row.Id }}</template>
</el-table-column>
......@@ -34,7 +44,7 @@
</template>
<script>
export default {
props:['ckGoods'],
props: ['ckGoods', "isSingle", "IsGetSpec"],
data() {
return {
dataList: [],
......@@ -42,32 +52,52 @@
pageIndex: 1,
pageSize: 15,
Name: '',
GoodsStatus:1 //上架中
GoodsStatus: 1, //上架中
IsGetSpec: 0
},
total: 0,
selectRow: [],
};
},
created() {},
created() {
console.log("this.IsGetSpec", this.IsGetSpec)
if (this.IsGetSpec) {
this.msg.IsGetSpec = this.IsGetSpec;
}
},
methods: {
//获取所有菜单
getList() {
this.apipost("/api/product/GetProductGoodsDialogList", this.msg, res => {
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
this.dataList = res.data.data.pageData;
var tempArray = res.data.data.pageData;
if (tempArray && tempArray.length > 0) {
tempArray.forEach(item => {
item.IsChecked = false;
});
}
this.dataList = JSON.parse(JSON.stringify(tempArray));
} else {
this.Info(res.data.message);
}
})
},
handleSelectionChange(val) {
// if(val.length>this.ckGoods){
// this.Info('超过了');
// val=val.slice(0,this.ckGoods);
// }
this.selectRow = JSON.parse(JSON.stringify(val));
},
getTemplateRow(index, row) {
this.selectRow = [];
if (this.dataList && this.dataList.length > 0) {
this.dataList.forEach(item => {
if (item.Id != row.Id) {
item.IsChecked = false;
}
})
}
this.selectRow.push(JSON.parse(JSON.stringify(row)));
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
......
This diff is collapsed.
......@@ -56,7 +56,7 @@
</div>
</template>
</el-table-column>
<el-table-column prop="Goods_stock" label="库存">
<el-table-column prop="Goods_Stock" label="库存">
</el-table-column>
<el-table-column label="活动时间">
<template slot-scope="scope">
......@@ -136,7 +136,6 @@
this.loading = true;
this.apipost("/api/GroupBuy/GetGroupbuyActivityPageList", this.msg, res => {
this.loading = false;
console.log("res", res);
if (res.data.resultCode == 1) {
this.total = res.data.data.count;
let pageData = res.data.data.pageData;
......
......@@ -542,9 +542,9 @@
</el-dialog>
<!-- 选择商品 -->
<el-dialog title="选择商品" :visible.sync="isShowGoods" custom-class="goodsDialog">
<choiceGood ref="choiceGood" :ckGoods="ckGoods"></choiceGood>
<choiceGood ref="choiceGood" ></choiceGood>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="quxiaoGoods()">取 消</el-button>
<el-button size="small" @click="isShowGoods=false">取 消</el-button>
<el-button size="small" type="danger" @click="getGoodsChoice()">确 定</el-button>
</span>
</el-dialog>
......
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