Commit 20046abf authored by zhengke's avatar zhengke

修改

parent 20300da1
<template> <template>
<div> <div>
<el-input size="mini" v-model="msg.Name" placeholder="根据名称搜索" :clearable="true" <el-input size="mini" v-model="msg.Name" placeholder="根据名称搜索" :clearable="true" @clear="getList"
@clear="getList" @keyup.enter.native="getList"> @keyup.enter.native="getList">
<el-button slot="append" @click="getList">搜索</el-button> <el-button slot="append" @click="getList">搜索</el-button>
</el-input> </el-input>
<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="50px"> <el-table-column type="selection" width="50px">
</el-table-column> </el-table-column>
<el-table-column label="ID" width="100px"> <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>
<el-table-column prop="name" label="名称"> <el-table-column prop="CategoryList" label="分类" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<div flex="cross:center dir:left"> <div v-for="(subItem,SubIndex) in scope.row.CategoryList" :key="SubIndex">
<img style="width:50px;height:50px;margin-right:10px;" :src="getIconLink(scope.row.CoverImage)"/> {{subItem.CategoryName}}
<div>{{ scope.row.Name }}</div> </div>
</div> </template>
</template> </el-table-column>
</el-table-column> <el-table-column prop="name" label="名称">
</el-table> <template slot-scope="scope">
<el-pagination style="text-align:right" <div flex="cross:center dir:left">
background <img style="width:50px;height:50px;margin-right:10px;" :src="getIconLink(scope.row.CoverImage)" />
@current-change="handleCurrentChange" <div>{{ scope.row.Name }}</div>
:page-size="msg.pageSize" </div>
layout="prev, pager, next" </template>
:total="total"> </el-table-column>
</el-pagination> </el-table>
</div> <el-pagination style="text-align:center" background @current-change="handleCurrentChange" :page-size="msg.pageSize"
layout="prev, pager, next" :total="total">
</el-pagination>
</div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
dataList: [], dataList: [],
msg:{ msg: {
pageIndex:1, pageIndex: 1,
pageSize:15, pageSize: 15,
Name:'', Name: '',
}, },
total:0, total: 0,
selectRow:[], selectRow: [],
}; };
}, },
created() {}, created() {},
...@@ -49,22 +52,23 @@ ...@@ -49,22 +52,23 @@
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; this.dataList = res.data.data.pageData;
console.log(this.dataList,'this.dataList');
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
}) })
}, },
handleSelectionChange(val){ handleSelectionChange(val) {
this.selectRow=JSON.parse(JSON.stringify(val)); this.selectRow = JSON.parse(JSON.stringify(val));
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
}, },
//父组件调用方法 //父组件调用方法
getChoicedGoods(){ getChoicedGoods() {
return this.selectRow; return this.selectRow;
}, },
//清空多选方法 //清空多选方法
...@@ -76,7 +80,7 @@ ...@@ -76,7 +80,7 @@
} else { } else {
this.$refs.multipleTable.clearSelection(); this.$refs.multipleTable.clearSelection();
} }
}, },
}, },
mounted() { mounted() {
this.getList(); this.getList();
......
...@@ -291,7 +291,9 @@ ...@@ -291,7 +291,9 @@
background: rgba(0, 0, 0, 0.2); background: rgba(0, 0, 0, 0.2);
letter-spacing: -1px; letter-spacing: -1px;
} }
.goodsDialog .el-dialog__body{
padding:10px 20px;
}
</style> </style>
<template> <template>
<div :class="{'active':goodData.isCked}"> <div :class="{'active':goodData.isCked}">
...@@ -539,7 +541,7 @@ ...@@ -539,7 +541,7 @@
</span> </span>
</el-dialog> </el-dialog>
<!-- 选择商品 --> <!-- 选择商品 -->
<el-dialog title="选择商品" :visible.sync="isShowGoods"> <el-dialog title="选择商品" :visible.sync="isShowGoods" custom-class="goodsDialog">
<choiceGood ref="choiceGood"></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="quxiaoGoods()">取 消</el-button>
......
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