Commit b268ad40 authored by 黄奎's avatar 黄奎

页面修改

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