This commit is contained in:
parent
c57ba0040f
commit
749068ea41
|
@ -4,7 +4,7 @@
|
|||
<div style="margin-left: 10px">
|
||||
<el-input
|
||||
v-model="value1"
|
||||
placeholder="请输入标题"
|
||||
placeholder="请输入商品名"
|
||||
:input-style="inputStyle"
|
||||
clearable
|
||||
></el-input>
|
||||
|
|
|
@ -1,32 +1,60 @@
|
|||
<template>
|
||||
<el-header>
|
||||
<div style="display: flex;">
|
||||
<div style="margin-left: 10px;">
|
||||
<el-input v-model="value1" placeholder="请输入标题" :input-style="inputStyle" clearable></el-input>
|
||||
<div style="display: flex">
|
||||
<div style="margin-left: 10px">
|
||||
<el-input
|
||||
v-model="value1"
|
||||
placeholder="请输入商品名"
|
||||
:input-style="inputStyle"
|
||||
clearable
|
||||
></el-input>
|
||||
</div>
|
||||
<div style="margin-left: 10px;">
|
||||
<div style="margin-left: 10px">
|
||||
<el-select v-model="selectValue" placeholder="请选择">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div style="margin-left: 10px;">
|
||||
<div><el-button type="primary" icon="el-icon-search" @click="getData">搜索</el-button></div>
|
||||
<div style="margin-left: 10px">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-search" @click="getData"
|
||||
>搜索</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-left: 10px">
|
||||
<div>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="getdetail('批量审核', ids)"
|
||||
>批量审核</el-button
|
||||
>
|
||||
</div>
|
||||
<div style="margin-left: 10px;">
|
||||
<div><el-button type="primary" icon="el-icon-search" @click="getdetail('批量审核', ids)">批量审核</el-button></div>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<div class="scTable" ref="scTableMain" v-loading="loading">
|
||||
<div class="scTable-table">
|
||||
<el-table :data="tableData" style="width: 100%" ref="scTable" :height="tableHeight"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
ref="scTable"
|
||||
:height="tableHeight"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column type="index" label="序号" width="80"> </el-table-column>
|
||||
<el-table-column prop="domainInfo.name" label="商品"> </el-table-column>
|
||||
<el-table-column prop="domainInfo.introduce" label="简介"> </el-table-column>
|
||||
<el-table-column prop="shopInfo.userName" label="作者"> </el-table-column>
|
||||
<el-table-column type="index" label="序号" width="80">
|
||||
</el-table-column>
|
||||
<el-table-column prop="goodsName" label="商品"> </el-table-column>
|
||||
<el-table-column prop="introduce" label="简介"> </el-table-column>
|
||||
<el-table-column prop="shopInfo.userName" label="作者">
|
||||
</el-table-column>
|
||||
<el-table-column prop="workTag" label="标签"> </el-table-column>
|
||||
<el-table-column prop="typeName" label="类型">
|
||||
<template #default="scope">
|
||||
|
@ -35,45 +63,93 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="examineState" label="审核状态">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.domainInfo.examineState == '0'" style="color:#409EFF;">未审核</span>
|
||||
<span v-else-if="scope.row.domainInfo.examineState == '1'" style="color:#67C23A;">通过</span>
|
||||
<span v-else-if="scope.row.domainInfo.examineState == '2'" style="color:#F56C6C;">拒绝</span>
|
||||
<span v-if="scope.row.examineState == '0'" style="color: #409eff"
|
||||
>未审核</span
|
||||
>
|
||||
<span
|
||||
v-else-if="scope.row.examineState == '1'"
|
||||
style="color: #67c23a"
|
||||
>通过</span
|
||||
>
|
||||
<span
|
||||
v-else-if="scope.row.examineState == '2'"
|
||||
style="color: #f56c6c"
|
||||
>拒绝</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="examineUser" label="审核人">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.domainInfo.examineUser">{{ scope.row.domainInfo.examineUser }}</span>
|
||||
<span v-if="scope.row.examineUser">{{
|
||||
scope.row.examineUser
|
||||
}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="examineDate" label="审核时间">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.domainInfo.examineDate">{{ scope.row.domainInfo.examineDate }}</span>
|
||||
<span v-if="scope.row.examineDate">{{
|
||||
scope.row.examineDate
|
||||
}}</span>
|
||||
<span v-else>暂无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template #default="scope">
|
||||
<span style="font-size: 14px;color: #409eff;margin-right: 10px;cursor: pointer;"
|
||||
@click.stop="getdetail('审核', scope.row.id)" v-if="scope.row.domainInfo.examineState == '0'">审核</span>
|
||||
<span style="font-size: 14px;color: #409eff;margin-right: 10px;cursor: pointer;"
|
||||
@click.stop="getdetails('详情', scope.row)">详情</span>
|
||||
<span
|
||||
style="
|
||||
font-size: 14px;
|
||||
color: #409eff;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
"
|
||||
@click.stop="getdetail('审核', scope.row.id)"
|
||||
v-if="scope.row.examineState == '0'"
|
||||
>审核</span
|
||||
>
|
||||
<span
|
||||
style="
|
||||
font-size: 14px;
|
||||
color: #409eff;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
"
|
||||
@click.stop="getdetails('详情', scope.row)"
|
||||
>详情</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="scTable-page">
|
||||
<div class="scTable-pagination">
|
||||
<el-pagination background :small="true" layout="total, prev, pager, next, jumper" :total="total"
|
||||
:page-size="pageSize" v-model:currentPage="currentPage"
|
||||
@current-change="paginationChange"></el-pagination>
|
||||
<el-pagination
|
||||
background
|
||||
:small="true"
|
||||
layout="total, prev, pager, next, jumper"
|
||||
:total="total"
|
||||
:page-size="pageSize"
|
||||
v-model:currentPage="currentPage"
|
||||
@current-change="paginationChange"
|
||||
></el-pagination>
|
||||
</div>
|
||||
<div class="scTable-do">
|
||||
<el-button @click="refresh" icon="el-icon-refresh" circle style="margin-left:15px"></el-button>
|
||||
<el-button
|
||||
@click="refresh"
|
||||
icon="el-icon-refresh"
|
||||
circle
|
||||
style="margin-left: 15px"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog v-model="open" :title="title" destroy-on-close :before-close="before" width="50%">
|
||||
<el-dialog
|
||||
v-model="open"
|
||||
:title="title"
|
||||
destroy-on-close
|
||||
:before-close="before"
|
||||
width="50%"
|
||||
>
|
||||
<el-form :model="formState" label-width="100px">
|
||||
<el-form-item label="状态" name="userName">
|
||||
<el-radio-group v-model="formState.resource">
|
||||
|
@ -88,16 +164,20 @@
|
|||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button type="primary" @click="onFinish()">
|
||||
确定
|
||||
</el-button>
|
||||
<el-button type="primary" @click="onFinish()"> 确定 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="opens" :title="title" destroy-on-close :before-close="before" width="50%">
|
||||
<el-dialog
|
||||
v-model="opens"
|
||||
:title="title"
|
||||
destroy-on-close
|
||||
:before-close="before"
|
||||
width="50%"
|
||||
>
|
||||
<el-form :model="detailForm" label-width="100px">
|
||||
<el-form-item label="商品名称">
|
||||
<el-input v-model="detailForm.name"></el-input>
|
||||
<el-input v-model="detailForm.goodsName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="作者">
|
||||
<el-input v-model="detailForm.userName"></el-input>
|
||||
|
@ -121,9 +201,7 @@
|
|||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="handleCloses">取消</el-button>
|
||||
<el-button type="primary" @click="handleCloses">
|
||||
确定
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleCloses"> 确定 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -132,7 +210,7 @@
|
|||
<script>
|
||||
import http from "@/utils/request";
|
||||
import { defineAsyncComponent } from "vue";
|
||||
const scEditor = defineAsyncComponent(() => import('@/components/scEditor'));
|
||||
const scEditor = defineAsyncComponent(() => import("@/components/scEditor"));
|
||||
export default {
|
||||
components: {
|
||||
scEditor,
|
||||
|
@ -140,63 +218,68 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
inputStyle: {
|
||||
paddingRight: '30px'
|
||||
paddingRight: "30px",
|
||||
},
|
||||
tableData: [],
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
currentPage: 1,
|
||||
loading: false,
|
||||
tableHeight: '100%',
|
||||
tableHeight: "100%",
|
||||
paginationLayout: "total, prev, pager, next, jumper",
|
||||
value1: '',
|
||||
value1: "",
|
||||
open: false,
|
||||
opens: false,
|
||||
title: '修改',
|
||||
title: "修改",
|
||||
formState: {
|
||||
resource: true,
|
||||
desc: ''
|
||||
desc: "",
|
||||
},
|
||||
detailForm: {},
|
||||
imgList: [],
|
||||
multipleSelection: [],
|
||||
ids: '',
|
||||
selectValue: '',
|
||||
options: [{
|
||||
value: '',
|
||||
label: '全部'
|
||||
}, {
|
||||
value: '1',
|
||||
label: '已通过'
|
||||
}, {
|
||||
value: '2',
|
||||
label: '未通过'
|
||||
}, {
|
||||
value: '0',
|
||||
label: '未审核'
|
||||
}],
|
||||
}
|
||||
ids: "",
|
||||
selectValue: "",
|
||||
options: [
|
||||
{
|
||||
value: "",
|
||||
label: "全部",
|
||||
},
|
||||
{
|
||||
value: "1",
|
||||
label: "已通过",
|
||||
},
|
||||
{
|
||||
value: "2",
|
||||
label: "未通过",
|
||||
},
|
||||
{
|
||||
value: "0",
|
||||
label: "未审核",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.$nextTick(() => {
|
||||
this.upTableHeight()
|
||||
})
|
||||
this.upTableHeight();
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
this.getData()
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
//更新表格高度
|
||||
upTableHeight() {
|
||||
this.tableHeight = (this.$refs.scTableMain.offsetHeight - 50) + "px"
|
||||
this.tableHeight = this.$refs.scTableMain.offsetHeight - 50 + "px";
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
let arr = []
|
||||
this.multipleSelection.forEach(item => {
|
||||
arr.push(item.id)
|
||||
})
|
||||
this.ids = arr.join(',')
|
||||
let arr = [];
|
||||
this.multipleSelection.forEach((item) => {
|
||||
arr.push(item.id);
|
||||
});
|
||||
this.ids = arr.join(",");
|
||||
},
|
||||
//获取数据
|
||||
getData() {
|
||||
|
@ -205,29 +288,32 @@ export default {
|
|||
examineState: this.selectValue,
|
||||
title: this.value1,
|
||||
page: this.currentPage,
|
||||
size: this.pageSize
|
||||
}
|
||||
http.get("/api/goods/examineList", parame).then((res) => {
|
||||
size: this.pageSize,
|
||||
};
|
||||
http
|
||||
.get("/api/goods/examineList", parame)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.tableData = res.data.records
|
||||
this.total = res.data.total
|
||||
this.currentPage = res.data.current
|
||||
this.loading = false
|
||||
this.tableData = res.data.records;
|
||||
this.total = res.data.total;
|
||||
this.currentPage = res.data.current;
|
||||
this.loading = false;
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
this.loading = false
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
//分页点击
|
||||
paginationChange() {
|
||||
this.getData()
|
||||
this.getData();
|
||||
},
|
||||
//刷新数据
|
||||
refresh() {
|
||||
this.$refs.scTable.clearSelection();
|
||||
this.loading = true
|
||||
this.getData()
|
||||
this.loading = true;
|
||||
this.getData();
|
||||
},
|
||||
before() {
|
||||
this.open = false;
|
||||
|
@ -236,58 +322,68 @@ export default {
|
|||
},
|
||||
handleClose() {
|
||||
this.open = false;
|
||||
this.formState.desc = ''
|
||||
this.formState.resource = true
|
||||
this.formState.desc = "";
|
||||
this.formState.resource = true;
|
||||
},
|
||||
onFinish() {
|
||||
// let parame = {
|
||||
// ids: this.ids,
|
||||
// examineState: this.formState.resource
|
||||
// }
|
||||
http.post("/api/goods/examine?examineState=" + this.formState.resource + '&ids=' + this.ids).then((res) => {
|
||||
http
|
||||
.post(
|
||||
"/api/goods/examine?examineState=" +
|
||||
this.formState.resource +
|
||||
"&ids=" +
|
||||
this.ids
|
||||
)
|
||||
.then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.tableData = []
|
||||
this.total = 0
|
||||
this.currentPage = 1
|
||||
this.loading = true
|
||||
this.open = false
|
||||
this.getData()
|
||||
this.tableData = [];
|
||||
this.total = 0;
|
||||
this.currentPage = 1;
|
||||
this.loading = true;
|
||||
this.open = false;
|
||||
this.getData();
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
},
|
||||
getdetail(title, value) {
|
||||
this.title = title
|
||||
this.open = true
|
||||
this.ids = value
|
||||
this.title = title;
|
||||
this.open = true;
|
||||
this.ids = value;
|
||||
},
|
||||
getdetails(title, value) {
|
||||
this.imgList = []
|
||||
this.title = title
|
||||
this.opens = true
|
||||
this.detailForm.name = value.domainInfo.name
|
||||
this.detailForm.wpPath = value.domainInfo.wpPath
|
||||
this.detailForm.code = value.domainInfo.code
|
||||
this.detailForm.userName=value.shopInfo.userName
|
||||
let img1 = value.domainInfo.file.split(',')
|
||||
this.imgList = [];
|
||||
this.title = title;
|
||||
this.opens = true;
|
||||
this.detailForm.goodsName = value.goodsName;
|
||||
this.detailForm.userName = value.shopInfo.userName;
|
||||
this.detailForm.wpPath = value.panUrl;
|
||||
this.detailForm.code = value.panCode;
|
||||
let img1 = null;
|
||||
if (value.file) {
|
||||
img1 = value.file.split(",");
|
||||
if (img1.length > 0) {
|
||||
img1.forEach(ele => {
|
||||
img1.forEach((ele) => {
|
||||
this.imgList.push({
|
||||
path: ele,
|
||||
preview: ele
|
||||
})
|
||||
})
|
||||
preview: ele,
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
handleCloses() {
|
||||
this.opens = false;
|
||||
this.detailForm = {}
|
||||
this.imgList = []
|
||||
this.detailForm = {};
|
||||
this.imgList = [];
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
|
Loading…
Reference in New Issue