店铺设置>>通知中心>>下载图片
This commit is contained in:
@@ -40,3 +40,12 @@ export function delmsg(ids) {
|
|||||||
data: ids
|
data: ids
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取订阅二维码
|
||||||
|
export function subQrCode(params) {
|
||||||
|
return request({
|
||||||
|
url: '/api/msg/subQrCode',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -32,10 +32,26 @@
|
|||||||
<!-- <el-table-column label="创建时间" prop="createTime"></el-table-column> -->
|
<!-- <el-table-column label="创建时间" prop="createTime"></el-table-column> -->
|
||||||
<el-table-column label="所属商品" width="320" align="center">
|
<el-table-column label="所属商品" width="320" align="center">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button v-for="(item) in scope.row.product" @click="toGoods(item)" :key="item.productId"
|
<div class="goodslang">
|
||||||
type="text">{{ item.productName }}</el-button>
|
<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>
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
@@ -53,10 +69,10 @@
|
|||||||
<el-pagination :total="clickseetableData.total" :current-page="clickseetableData.page + 1"
|
<el-pagination :total="clickseetableData.total" :current-page="clickseetableData.page + 1"
|
||||||
:page-size="clickseetableData.size" layout="total, sizes, prev, pager, next, jumper"
|
:page-size="clickseetableData.size" layout="total, sizes, prev, pager, next, jumper"
|
||||||
@current-change="paginationChangetype" @size-change="e => {
|
@current-change="paginationChangetype" @size-change="e => {
|
||||||
clickseetableData.size = e;
|
clickseetableData.size = e;
|
||||||
clickseetableData.page = 0;
|
clickseetableData.page = 0;
|
||||||
getTableData();
|
getTableData();
|
||||||
}
|
}
|
||||||
" />
|
" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -90,11 +106,11 @@ export default {
|
|||||||
this.getTableData();
|
this.getTableData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toGoods(data) {
|
toGoods(productId) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/product/product',
|
path: '/product/product',
|
||||||
query: {
|
query: {
|
||||||
productId: data.productId
|
productId: productId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -134,7 +150,7 @@ export default {
|
|||||||
size: this.clickseetableData.size,
|
size: this.clickseetableData.size,
|
||||||
...this.query,
|
...this.query,
|
||||||
shopId: localStorage.getItem("shopId"),
|
shopId: localStorage.getItem("shopId"),
|
||||||
sort:'createTime,desc'
|
sort: 'createTime,desc'
|
||||||
});
|
});
|
||||||
this.clickseetableData.loading = false;
|
this.clickseetableData.loading = false;
|
||||||
this.clickseetableData.data = res.content.map(v => {
|
this.clickseetableData.data = res.content.map(v => {
|
||||||
@@ -162,6 +178,26 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<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 {
|
.green {
|
||||||
color: #13ce66;
|
color: #13ce66;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
@@ -49,8 +49,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<el-select clearable v-model="query.sort" @change="getTableData" placeholder="排序">
|
<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>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -63,8 +63,7 @@
|
|||||||
<div class="boxitem_ses">
|
<div class="boxitem_ses">
|
||||||
<div class="es">
|
<div class="es">
|
||||||
<div class="e">耗材种数</div>
|
<div class="e">耗材种数</div>
|
||||||
<div
|
<div class="s" style="color: #333333;">{{ tableData.total }}</div>
|
||||||
class="s" style="color: #333333;">{{ tableData.total }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -223,11 +222,24 @@
|
|||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column label="所属商品">
|
<el-table-column label="所属商品">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div class="goods-list">
|
<div class="goodslang">
|
||||||
<el-button v-for="(item) in scope.row.product" @click="toGoods(item)" :key="item.productId" type="text">{{
|
<div class="goods-list">
|
||||||
item.productName }}</el-button>
|
<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>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库存数量" prop="stockNumber">
|
<el-table-column label="库存数量" prop="stockNumber">
|
||||||
@@ -694,12 +706,12 @@ export default {
|
|||||||
this.$message({ type: "error", message: "至少保留一种耗材" });
|
this.$message({ type: "error", message: "至少保留一种耗材" });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toGoods(data) {
|
toGoods(productId) {
|
||||||
|
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/product/product',
|
path: '/product/product',
|
||||||
query: {
|
query: {
|
||||||
productId: data.productId
|
productId: productId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -1089,9 +1101,10 @@ export default {
|
|||||||
const res = await gettbConsInfoFlow({
|
const res = await gettbConsInfoFlow({
|
||||||
page: this.clickseetableData.page,
|
page: this.clickseetableData.page,
|
||||||
size: this.clickseetableData.size,
|
size: this.clickseetableData.size,
|
||||||
consId: this.consRecordItem.consId,
|
// consId: this.consRecordItem.consId,
|
||||||
conName: this.consRecordItem.conName,
|
// conName: this.consRecordItem.conName,
|
||||||
shopId: localStorage.getItem("shopId")
|
shopId: localStorage.getItem("shopId"),
|
||||||
|
sort:'createTime,desc'
|
||||||
});
|
});
|
||||||
this.clickseetableData.loading = false;
|
this.clickseetableData.loading = false;
|
||||||
this.clickseetableData.data = res.content;
|
this.clickseetableData.data = res.content;
|
||||||
@@ -1105,13 +1118,25 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
::v-deep .goods-list .el-button--text span {
|
.goodslang {
|
||||||
display: block;
|
display: flex;
|
||||||
text-align: left;
|
justify-content: flex-start;
|
||||||
}
|
align-items: center;
|
||||||
|
|
||||||
::v-deep .goods-list .el-button--text {
|
.goods-list {
|
||||||
white-space: break-spaces;
|
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 {
|
.color-success {
|
||||||
@@ -1177,7 +1202,7 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 10px 24px;
|
padding: 20px 24px;
|
||||||
background: rgba(244, 249, 255, 0.5);
|
background: rgba(244, 249, 255, 0.5);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div class="head-container">
|
<!-- <div class="head-container">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
店铺推送: <el-switch v-model="alldata.allState" :active-value="1" :inactive-value="0"
|
店铺推送: <el-switch v-model="alldata.allState" :active-value="1" :inactive-value="0"
|
||||||
@@ -19,7 +19,21 @@
|
|||||||
@change="changeEvent(alldata.stockState, 0)"></el-switch>
|
@change="changeEvent(alldata.stockState, 0)"></el-switch>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
|
<!-- 查看图片 -->
|
||||||
|
<el-button v-if="url" type="primary" @click="dialogVisible = true" style="margin-bottom: 28px;">查看图片</el-button>
|
||||||
|
<el-dialog title="提示" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
|
||||||
|
<div style="width: 100%;text-align: center;">
|
||||||
|
<el-image style="width: 200px; height: 200px;" :src="url"></el-image>
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="downloadUrl">下载</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
<div class="head-container" id="table_drag">
|
<div class="head-container" id="table_drag">
|
||||||
<el-table ref="table" :data="tableData.data" v-loading="tableData.loading" row-key="id">
|
<el-table ref="table" :data="tableData.data" v-loading="tableData.loading" row-key="id">
|
||||||
<el-table-column label="头像">
|
<el-table-column label="头像">
|
||||||
@@ -70,7 +84,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { msgall, msginfo, shopState, state, delmsg } from '@/api/notifications'
|
import { msgall, msginfo, shopState, state, delmsg, subQrCode } from '@/api/notifications'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -87,14 +101,37 @@ export default {
|
|||||||
conState: 0,
|
conState: 0,
|
||||||
opeState: 0,
|
opeState: 0,
|
||||||
stockState: 0,
|
stockState: 0,
|
||||||
}
|
},
|
||||||
|
url: '',
|
||||||
|
dialogVisible: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
this.getlist()
|
this.getlist()
|
||||||
|
this.getsubQrCode()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
downloadUrl() {
|
||||||
|
let link = document.createElement("a");
|
||||||
|
//创建一个a标签
|
||||||
|
link.style.display = "none";
|
||||||
|
//将a标签隐藏
|
||||||
|
link.href = this.url;
|
||||||
|
document.body.appendChild(link);
|
||||||
|
//将上面创建的a标签加入到body的尾部
|
||||||
|
link.click();
|
||||||
|
//执行a标签
|
||||||
|
this.dialogVisible = false
|
||||||
|
},
|
||||||
|
// 二维码
|
||||||
|
async getsubQrCode() {
|
||||||
|
let res = await subQrCode({
|
||||||
|
shopId: localStorage.getItem('shopId')
|
||||||
|
})
|
||||||
|
this.url = res
|
||||||
|
|
||||||
|
},
|
||||||
async getlist() {
|
async getlist() {
|
||||||
let res = await state({
|
let res = await state({
|
||||||
shopId: localStorage.getItem('shopId'),
|
shopId: localStorage.getItem('shopId'),
|
||||||
|
|||||||
Reference in New Issue
Block a user