This commit is contained in:
姚宇浩 2024-02-01 16:14:14 +08:00
parent b7e8dc58a1
commit 71098dd6d6
3 changed files with 378 additions and 6 deletions

View File

@ -182,9 +182,9 @@
<el-form-item label="发布者"> <el-form-item label="发布者">
<el-input v-model="detailForm.userName"></el-input> <el-input v-model="detailForm.userName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="简介"> <!-- <el-form-item label="简介">
<el-input type="textarea" v-model="detailForm.introduce"></el-input> <el-input type="textarea" v-model="detailForm.introduce"></el-input>
</el-form-item> </el-form-item> -->
<el-form-item label="网盘地址"> <el-form-item label="网盘地址">
<el-input v-model="detailForm.wpPath"></el-input> <el-input v-model="detailForm.wpPath"></el-input>
</el-form-item> </el-form-item>
@ -365,9 +365,9 @@ export default {
this.opens = true; this.opens = true;
this.detailForm.goodsName = value.goodsName; this.detailForm.goodsName = value.goodsName;
this.detailForm.userName = value.shopInfo.userName; this.detailForm.userName = value.shopInfo.userName;
this.detailForm.wpPath = value.domainInfo.wpPath; this.detailForm.wpPath = value.panUrl;
this.detailForm.code = value.domainInfo.code; this.detailForm.code = value.panCode;
this.detailForm.introduce = value.domainInfo.introduce; // this.detailForm.introduce = value.domainInfo.introduce;
let img1 = null; let img1 = null;
if (value.domainInfo.file) { if (value.domainInfo.file) {
img1 = value.domainInfo.file.split(","); img1 = value.domainInfo.file.split(",");

372
src/views/examine/jfsp.vue Normal file
View File

@ -0,0 +1,372 @@
<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>
<div style="margin-left: 10px">
<el-select v-model="state" placeholder="状态" clearable>
<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">
<el-select v-model="selectValue" placeholder="审核状态" clearable>
<el-option
v-for="item in options2"
: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>
</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"
stripe
>
<el-table-column type="index" label="序号" width="80">
</el-table-column>
<el-table-column prop="goodsName" label="商品名" show-overflow-tooltip>
</el-table-column>
<el-table-column prop="pointPrice" label="积分价格"> </el-table-column>
<el-table-column prop="moneyPrice" label="金钱价格"> </el-table-column>
<el-table-column prop="authorName" label="发布人"> </el-table-column>
<el-table-column prop="state" label="状态"> </el-table-column>
<!-- <el-table-column prop="typeName" label="类型">
<template #default="scope">
<span>{{ scope.row.typeName }} - {{ scope.row.typesName }}</span>
</template>
</el-table-column> -->
<el-table-column prop="examineState" label="审核状态">
<!-- <template #default="scope">
<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 label="操作" width="150">
<template #default="scope">
<span
style="
font-size: 12px;
color: #409eff;
margin-right: 10px;
cursor: pointer;
"
@click.stop="getdetails('查看商品', scope.row)"
>查看</span
>
<span
style="
font-size: 12px;
color: #409eff;
margin-right: 10px;
cursor: pointer;
"
@click.stop="getdetails('修改商品', scope.row.id)"
>编辑</span
>
<el-popconfirm title="确定删除吗?" @confirm="del(scope.row.id)">
<template #reference>
<span
style="
font-size: 12px;
color: #409eff;
margin-right: 10px;
cursor: pointer;
"
>
删除
</span>
</template>
</el-popconfirm>
</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>
</div>
<div class="scTable-do">
<el-button
@click="refresh"
icon="el-icon-refresh"
circle
style="margin-left: 15px"
></el-button>
</div>
</div>
</div>
<el-dialog
v-model="opens"
:title="title"
destroy-on-close
:before-close="before"
width="35%"
>
<el-form :model="detailForm" label-width="100px">
<el-form-item
label="商品名"
:rules="[
{
required: true,
trigger: 'change',
message: `请输入商品名`,
},
]"
>
<el-input v-model="detailForm.goodsName"></el-input>
</el-form-item>
<el-form-item label="积分价格">
<el-input v-model="detailForm.pointPrice"></el-input>
</el-form-item>
<el-form-item label="金钱价格">
<el-input v-model="detailForm.moneyPrice"></el-input>
</el-form-item>
<el-form-item label="发布人">
<el-input v-model="detailForm.authorName"></el-input>
</el-form-item>
<el-form-item
label="状态"
:rules="[
{
required: true,
trigger: 'change',
message: `请选择状态`,
},
]"
>
<el-select v-model="detailForm.state" placeholder="状态">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="handleCloses">取消</el-button>
<el-button type="primary" @click="fix()" v-show="title == '编辑'">
确定
</el-button>
</span>
</template>
</el-dialog>
</template>
<script>
import http from "@/utils/request";
import { defineAsyncComponent } from "vue";
const scEditor = defineAsyncComponent(() => import("@/components/scEditor"));
export default {
components: {
scEditor,
},
data() {
return {
inputStyle: {
paddingRight: "30px",
},
tableData: [],
pageSize: 20,
total: 0,
currentPage: 1,
loading: false,
tableHeight: "100%",
paginationLayout: "total, prev, pager, next, jumper",
value1: "",
open: false,
opens: false,
title: "修改",
formState: {
resource: true,
desc: "",
},
detailForm: {},
imgList: [],
multipleSelection: [],
ids: "",
selectValue: "",
state: "",
options: [
{
value: "2",
label: "下架",
},
{
value: "1",
label: "上架",
},
],
options2: [
{
value: "1",
label: "通过",
},
{
value: "2",
label: "驳回",
},
{
value: "0",
label: "待审核",
},
],
};
},
created() {
this.$nextTick(() => {
this.upTableHeight();
});
},
mounted() {
this.getData();
},
methods: {
//
upTableHeight() {
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(",");
},
//
getData() {
let parame = {
state: this.state,
examineState: this.selectValue,
goodsName: this.value1,
page: this.currentPage,
size: this.pageSize,
};
http
.get("/api/goods/pointGoodsList", 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;
}
})
.catch((err) => {
console.log(err);
this.loading = false;
});
},
//
paginationChange() {
this.getData();
},
//
refresh() {
this.$refs.scTable.clearSelection();
this.loading = true;
this.getData();
},
before() {
this.opens = false;
// router.replace();
},
del(id) {
console.log("删除", id);
},
getdetails(title, value) {
this.title = title;
this.opens = true;
this.detailForm = value;
if (value.state == "上架") {
this.detailForm.state = "1";
} else {
this.detailForm.state = "0";
}
},
fix() {
console.log("修改");
},
handleCloses() {
this.opens = false;
this.detailForm = {};
},
},
};
</script>
<style scoped>
.scTable {
display: flex;
flex-direction: column;
height: calc(100% - 60px);
}
.scTable-table {
flex: 1;
}
.scTable-page {
height: 50px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 15px;
background-color: #fff;
}
.scTable-do {
white-space: nowrap;
}
</style>