Commit d104f1c572aa5ba5c93594745911162e17930a24
1 parent
abbfbd5f
spu 页面优化
Showing
1 changed file
with
18 additions
and
9 deletions
yudao-ui-admin/src/views/mall/product/spu/index.vue
| ... | ... | @@ -55,15 +55,19 @@ |
| 55 | 55 | <el-table v-loading="loading" :data="list"> |
| 56 | 56 | <el-table-column label="主键" align="center" prop="id"/> |
| 57 | 57 | <el-table-column label="商品名称" align="center" prop="name"/> |
| 58 | - <el-table-column label="卖点" align="center" prop="sellPoint"/> | |
| 59 | - <el-table-column label="描述" align="center" prop="description"/> | |
| 58 | +<!-- <el-table-column label="卖点" align="center" prop="sellPoint"/>--> | |
| 59 | +<!-- <el-table-column label="描述" align="center" prop="description"/>--> | |
| 60 | 60 | <el-table-column label="分类id" align="center" prop="categoryId"/> |
| 61 | - <el-table-column label="商品主图地址" align="center" prop="picUrls"/> | |
| 61 | + <el-table-column label="商品主图地址" align="center" prop="picUrls"> | |
| 62 | + <template slot-scope="scope"> | |
| 63 | + <img v-if="scope.row.picUrls" :src="scope.row.picUrls[0]" alt="分类图片" class="img-height"/> | |
| 64 | + </template> | |
| 65 | + </el-table-column> | |
| 62 | 66 | <el-table-column label="排序字段" align="center" prop="sort"/> |
| 63 | 67 | <el-table-column label="点赞初始人数" align="center" prop="likeCount"/> |
| 64 | 68 | <el-table-column label="价格 (分)" align="center" prop="price"/> |
| 65 | 69 | <el-table-column label="库存数量" align="center" prop="quantity"/> |
| 66 | - <el-table-column label="状态" align="center" prop="status"/> | |
| 70 | +<!-- <el-table-column label="状态" align="center" prop="status"/>--> | |
| 67 | 71 | <el-table-column label="创建时间" align="center" prop="createTime" width="180"> |
| 68 | 72 | <template slot-scope="scope"> |
| 69 | 73 | <span>{{ parseTime(scope.row.createTime) }}</span> |
| ... | ... | @@ -85,7 +89,7 @@ |
| 85 | 89 | @pagination="getList"/> |
| 86 | 90 | |
| 87 | 91 | <!-- 对话框(添加 / 修改) --> |
| 88 | - <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body> | |
| 92 | + <el-dialog :title="title" :visible.sync="open" width="1500px" append-to-body> | |
| 89 | 93 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| 90 | 94 | <el-form-item label="商品名称" prop="name"> |
| 91 | 95 | <el-input v-model="form.name" placeholder="请输入商品名称"/> |
| ... | ... | @@ -240,7 +244,7 @@ |
| 240 | 244 | <el-table-column |
| 241 | 245 | label="操作"> |
| 242 | 246 | <template slot-scope="scope"> |
| 243 | - <el-button type="text" size="small" @click="changeSkuStatus(`${scope.$index}`)" v-if="scope.row.status==0"> | |
| 247 | + <el-button type="text" size="small" @click="changeSkuStatus(`${scope.$index}`)" v-if="scope.row.status===0"> | |
| 244 | 248 | 正常 |
| 245 | 249 | </el-button> |
| 246 | 250 | <el-button type="text" size="small" @click="changeSkuStatus(`${scope.$index}`)" v-else>已禁用</el-button> |
| ... | ... | @@ -438,7 +442,7 @@ |
| 438 | 442 | this.addTagInput.propertyId = this.unUseTags[index].id; |
| 439 | 443 | for (let i = 0; i < this.addTagInput.selectValues.length; i++) { |
| 440 | 444 | for (let j = 0; j < this.unUseTags[index].propertyValueList.length; j++) { |
| 441 | - if (this.addTagInput.selectValues[i] == this.unUseTags[index].propertyValueList[j].name) { | |
| 445 | + if (this.addTagInput.selectValues[i] === this.unUseTags[index].propertyValueList[j].name) { | |
| 442 | 446 | this.addTagInput.selectValueIds.push(this.unUseTags[index].propertyValueList[j].id) |
| 443 | 447 | } |
| 444 | 448 | } |
| ... | ... | @@ -629,6 +633,7 @@ |
| 629 | 633 | this.reset(); |
| 630 | 634 | const id = row.id; |
| 631 | 635 | getSpu(id).then(response => { |
| 636 | + console.log(">>>>>> response.data:" + JSON.stringify(response.data)) | |
| 632 | 637 | let dataSpu = response.data; |
| 633 | 638 | this.form = { |
| 634 | 639 | id: dataSpu.id, |
| ... | ... | @@ -642,9 +647,9 @@ |
| 642 | 647 | likeCount: dataSpu.likeCount, |
| 643 | 648 | price: dataSpu.price, |
| 644 | 649 | quantity: dataSpu.quantity, |
| 645 | - status: dataSpu.status, | |
| 650 | + // status: dataSpu.status, | |
| 646 | 651 | isShowTagInput:undefined, |
| 647 | - skus:dataSpu.productSkuRespVOS, | |
| 652 | + // skus:dataSpu.productSkuRespVOS, | |
| 648 | 653 | }; |
| 649 | 654 | this.open = true; |
| 650 | 655 | this.title = "修改商品spu"; |
| ... | ... | @@ -728,5 +733,9 @@ |
| 728 | 733 | margin-left: 10px; |
| 729 | 734 | vertical-align: bottom; |
| 730 | 735 | } |
| 736 | + | |
| 737 | + .img-height { | |
| 738 | + height: 65px; | |
| 739 | + } | |
| 731 | 740 | } |
| 732 | 741 | </style> | ... | ... |