From 29b5ffe318b8ab32865ebebedd865ea2aa3f6c7e Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期三, 06 九月 2023 17:45:31 +0800 Subject: [PATCH] 供应商列表相关bug修复及样式调整 --- src/views/supplierManage/supplier/index.vue | 132 ++++++++++++++++++++----------------------- 1 files changed, 62 insertions(+), 70 deletions(-) diff --git a/src/views/supplierManage/supplier/index.vue b/src/views/supplierManage/supplier/index.vue index 2562d39..d5d4eb0 100644 --- a/src/views/supplierManage/supplier/index.vue +++ b/src/views/supplierManage/supplier/index.vue @@ -13,49 +13,30 @@ </div> </div> <template> - <el-table - ref="tableSupplier" - border - :data="tableList.tableInfomation" - tooltip-effect="dark" - style="width: 100%" - :lazy="tableList.lazy" - highlight-current-row - @row-click="tableRowClick" - :header-cell-style="{ background: '#ECF4FF', color: '#666' }" - > - <el-table-column type="index" label="搴忓彿" width="50"> </el-table-column> - <el-table-column - v-for="(item, i) in tableList.tableColumn" - :key="i" - :prop="item.prop" - :label="item.label" - :width="item.width" - :min-width="item.min" - show-overflow-tooltip - :sortable="item.sortable" + <div class="list-view"> + <TableCommonView + ref="tableSupplier" + :table-list="tableList" + @selCommonClick="selCommonClick" + @tableRowClick="tableRowClick" > - <template slot-scope="scope"> - <div v-if="item.status" :class="scope.row.status">{{ scope.row[item.prop] }}</div> - <span - v-else-if="item.isCommonClick && scope.row[item.prop]" - class="sel-name" - @click="selCommonClick(scope.row)" - >{{ scope.row[item.prop] }}</span - > - <span v-else>{{ scope.row[item.prop] ? scope.row[item.prop] : "--" }}</span> + <template slot="tableButton"> + <el-table-column label="鎿嶄綔" width="100"> + <template slot-scope="scope"> + <el-button + v-if="scope.row.status === 0" + @click="enableClick(scope.row, '鍚敤')" + type="text" + size="small" + >鍚敤</el-button + > + <el-button v-else @click="enableClick(scope.row, '鍋滅敤')" type="text" size="small">鍋滅敤</el-button> + <el-button @click="modifyClick(scope.row)" type="text" size="small">淇敼</el-button> + </template> + </el-table-column> </template> - </el-table-column> - <el-table-column label="鎿嶄綔" width="100"> - <template slot-scope="scope"> - <el-button v-if="scope.row.status === 0" @click="enableClick(scope.row, '鍚敤')" type="text" size="small" - >鍚敤</el-button - > - <el-button v-else @click="enableClick(scope.row, '鍋滅敤')" type="text" size="small">鍋滅敤</el-button> - <el-button @click="modifyClick(scope.row)" type="text" size="small">淇敼</el-button> - </template> - </el-table-column> - </el-table> + </TableCommonView> + </div> <div class="btn-pager"> <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> </div> @@ -79,22 +60,24 @@ </div> </div> <template> - <TableCommonView - ref="tableListProduct" - :table-list="productTableList" - @selCommonClick="selCommonClick" - @getSelectArray="getSelectArray" - > - <template slot="tableButton"> - <el-table-column label="鎿嶄綔" width="170"> - <template slot-scope="scope"> - <el-button @click="raleteClick(scope.row)" type="text" size="small">鐩稿叧渚涘簲鍟�</el-button> - <el-button @click="editClick(scope.row)" type="text" size="small">淇敼</el-button> - <el-button @click="delClick(scope.row)" type="text" size="small">鍒犻櫎</el-button> - </template> - </el-table-column> - </template> - </TableCommonView> + <div class="list-view"> + <TableCommonView + ref="tableListProduct" + :table-list="productTableList" + @selCommonClick="selCommonClick" + @getSelectArray="getSelectArray" + > + <template slot="tableButton"> + <el-table-column label="鎿嶄綔" width="170"> + <template slot-scope="scope"> + <el-button @click="raleteClick(scope.row)" type="text" size="small">鐩稿叧渚涘簲鍟�</el-button> + <el-button @click="editClick(scope.row)" type="text" size="small">淇敼</el-button> + <el-button @click="delClick(scope.row)" type="text" size="small">鍒犻櫎</el-button> + </template> + </el-table-column> + </template> + </TableCommonView> + </div> <div class="btn-pager"> <PagerView class="page" :pager-options="productPagerOptions" v-on="pagerEvents" /> </div> @@ -169,6 +152,7 @@ this.tableList = { tableInfomation: [], selectIndex: true, + highlight: true, ref: "tableListRef", tableColumn: [ { label: "渚涘簲鍟嗙紪鍙�", prop: "number", min: 190, isCommonClick: true }, @@ -237,7 +221,7 @@ this.supplierId = 0 } this.$nextTick(() => { - this.$refs.tableSupplier.setCurrentRow(this.tableList.tableInfomation[0]) + this.$refs.tableSupplier.$refs.table.setCurrentRow(this.tableList.tableInfomation[0]) }) this.getProductList() } @@ -367,8 +351,16 @@ <!-- Add "scoped" attribute to limit CSS to this component only --> <style lang="scss" scoped> .rightContent { + height: 100%; + background: #f0f2f5; + padding: 10px; .top { margin-bottom: 20px; + height: 55%; + background: #fff; + .list-view { + height: calc(100% - 120px); + } .supplier-search { display: flex; align-items: center; @@ -381,14 +373,20 @@ color: $color-primary; cursor: pointer; } - .btn-pager { - display: flex; - .page { - margin-left: auto; - } - } + // .btn-pager { + // display: flex; + // .page { + // margin-left: auto; + // } + // } } .bottom { + margin-top: 20px; + height: calc(40% - 0px); + background: #fff; + .list-view { + height: calc(100% - 120px); + } .product-search { display: flex; align-items: center; @@ -398,12 +396,6 @@ .add-view { margin-left: 20px; margin-right: 20px; - } - } - .btn-pager { - display: flex; - .page { - margin-left: auto; } } } -- Gitblit v1.8.0