店铺设置>>通知中心>>下载图片

This commit is contained in:
魏啾
2024-09-27 11:18:06 +08:00
parent fe6e6c2553
commit bac738d80c
4 changed files with 141 additions and 34 deletions

View File

@@ -32,10 +32,26 @@
<!-- <el-table-column label="创建时间" prop="createTime"></el-table-column> -->
<el-table-column label="所属商品" width="320" align="center">
<template v-slot="scope">
<el-button v-for="(item) in scope.row.product" @click="toGoods(item)" :key="item.productId"
type="text">{{ item.productName }}</el-button>
<div class="goodslang">
<div class="goods-list">
<el-button v-for="(item) in scope.row.product" @click="toGoods(item.productId)" :key="item.productId"
type="text">{{
item.productName }}</el-button>
</div>
<el-dropdown trigger="click" v-if="scope.row.product.length > 1" @command="toGoods">
<span class="el-dropdown-link" style="color: blue;">
<i class="el-icon-caret-bottom el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item class="clearfix" v-for="(item) in scope.row.product" :key="item.productId"
:command="item.productId">
{{ item.productName }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template v-slot="scope">
@@ -53,10 +69,10 @@
<el-pagination :total="clickseetableData.total" :current-page="clickseetableData.page + 1"
:page-size="clickseetableData.size" layout="total, sizes, prev, pager, next, jumper"
@current-change="paginationChangetype" @size-change="e => {
clickseetableData.size = e;
clickseetableData.page = 0;
getTableData();
}
clickseetableData.size = e;
clickseetableData.page = 0;
getTableData();
}
" />
</div>
@@ -90,11 +106,11 @@ export default {
this.getTableData();
},
methods: {
toGoods(data) {
toGoods(productId) {
this.$router.push({
path: '/product/product',
query: {
productId: data.productId
productId: productId
}
})
},
@@ -134,7 +150,7 @@ export default {
size: this.clickseetableData.size,
...this.query,
shopId: localStorage.getItem("shopId"),
sort:'createTime,desc'
sort: 'createTime,desc'
});
this.clickseetableData.loading = false;
this.clickseetableData.data = res.content.map(v => {
@@ -162,6 +178,26 @@ export default {
};
</script>
<style lang="scss" scoped>
.goodslang {
display: flex;
justify-content: flex-start;
align-items: center;
.goods-list {
overflow: hidden; //超出的文本隐藏
text-overflow: ellipsis; //溢出用省略号显示
white-space: nowrap; //溢出不换行
}
::v-deep .goods-list .el-button--text span {
display: block;
text-align: left;
}
::v-deep .goods-list .el-button--text {
white-space: break-spaces;
}
}
.green {
color: #13ce66;
font-weight: bold;

View File

@@ -49,8 +49,8 @@
</div>
<div class="row">
<el-select clearable v-model="query.sort" @change="getTableData" placeholder="排序">
<el-option label="创建时间" value="balance,desc" />
<el-option label="数量由低到高" value="createTime,desc" />
<el-option label="创建时间" value="createTime,desc" />
<el-option label="数量由低到高" value="balance,desc" />
</el-select>
</div>
</div>
@@ -63,8 +63,7 @@
<div class="boxitem_ses">
<div class="es">
<div class="e">耗材种数</div>
<div
class="s" style="color: #333333;">{{ tableData.total }}</div>
<div class="s" style="color: #333333;">{{ tableData.total }}</div>
</div>
</div>
</div>
@@ -223,11 +222,24 @@
</el-table-column> -->
<el-table-column label="所属商品">
<template v-slot="scope">
<div class="goods-list">
<el-button v-for="(item) in scope.row.product" @click="toGoods(item)" :key="item.productId" type="text">{{
item.productName }}</el-button>
<div class="goodslang">
<div class="goods-list">
<el-button v-for="(item) in scope.row.product" @click="toGoods(item.productId)" :key="item.productId"
type="text">{{
item.productName }}</el-button>
</div>
<el-dropdown trigger="click" v-if="scope.row.product.length > 1" @command="toGoods">
<span class="el-dropdown-link" style="color: blue;">
<i class="el-icon-caret-bottom el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item class="clearfix" v-for="(item) in scope.row.product" :key="item.productId"
:command="item.productId">
{{ item.productName }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</el-table-column>
<el-table-column label="库存数量" prop="stockNumber">
@@ -694,12 +706,12 @@ export default {
this.$message({ type: "error", message: "至少保留一种耗材" });
}
},
toGoods(data) {
toGoods(productId) {
this.$router.push({
path: '/product/product',
query: {
productId: data.productId
productId: productId
}
})
},
@@ -1089,9 +1101,10 @@ export default {
const res = await gettbConsInfoFlow({
page: this.clickseetableData.page,
size: this.clickseetableData.size,
consId: this.consRecordItem.consId,
conName: this.consRecordItem.conName,
shopId: localStorage.getItem("shopId")
// consId: this.consRecordItem.consId,
// conName: this.consRecordItem.conName,
shopId: localStorage.getItem("shopId"),
sort:'createTime,desc'
});
this.clickseetableData.loading = false;
this.clickseetableData.data = res.content;
@@ -1105,13 +1118,25 @@ export default {
</script>
<style scoped lang="scss">
::v-deep .goods-list .el-button--text span {
display: block;
text-align: left;
}
.goodslang {
display: flex;
justify-content: flex-start;
align-items: center;
::v-deep .goods-list .el-button--text {
white-space: break-spaces;
.goods-list {
overflow: hidden; //超出的文本隐藏
text-overflow: ellipsis; //溢出用省略号显示
white-space: nowrap; //溢出不换行
}
::v-deep .goods-list .el-button--text span {
display: block;
text-align: left;
}
::v-deep .goods-list .el-button--text {
white-space: break-spaces;
}
}
.color-success {
@@ -1177,7 +1202,7 @@ export default {
display: flex;
justify-content: center;
align-items: center;
padding: 10px 24px;
padding: 20px 24px;
background: rgba(244, 249, 255, 0.5);
border-radius: 10px;