wangfukang 7 days ago
parent
commit
037961d286
  1. 2
      src/api/app.js
  2. 6
      src/api/fishMarket.js
  3. 13
      src/views/app/business/bus/bus.vue
  4. 312
      src/views/app/business/expressCompany/expressCompany.vue
  5. 2
      src/views/app/business/logiticsCompany/transferStation.vue
  6. 2
      src/views/app/shop/addType.vue
  7. 16
      src/views/app/shop/dictManage.vue
  8. 13
      src/views/app/shop/shop.vue

2
src/api/app.js

@ -48,7 +48,7 @@ export const deleteCompany = (params) => {
// 新增分类接口 // 新增分类接口
export const addType = (params) => { export const addType = (params) => {
return postBodyRequest('/app/productCategory/batchSaveCategoryAndAttribute', params) return postRequest('/app/productCategory/save', params)
} }
//编辑分类 //编辑分类

6
src/api/fishMarket.js

@ -3,17 +3,23 @@ import { getRequest, postBodyRequest } from '@/libs/axios';
const PREFIX = '/app/fishmarket/admin'; const PREFIX = '/app/fishmarket/admin';
export const fishGoodsPage = (params) => postBodyRequest(`${PREFIX}/goods/page`, params); export const fishGoodsPage = (params) => postBodyRequest(`${PREFIX}/goods/page`, params);
export const fishGoodsDetail = (id) => getRequest(`${PREFIX}/goods/${id}`, {});
export const fishGoodsComments = (id, params) => getRequest(`${PREFIX}/goods/${id}/comments/page`, params);
export const fishGoodsStatus = (params) => postBodyRequest(`${PREFIX}/goods/status`, params); export const fishGoodsStatus = (params) => postBodyRequest(`${PREFIX}/goods/status`, params);
export const fishWantPage = (params) => postBodyRequest(`${PREFIX}/wants/page`, params); export const fishWantPage = (params) => postBodyRequest(`${PREFIX}/wants/page`, params);
export const fishCategoryList = (params) => getRequest(`${PREFIX}/categories`, params); export const fishCategoryList = (params) => getRequest(`${PREFIX}/categories`, params);
export const fishCategorySave = (params) => postBodyRequest(`${PREFIX}/categories`, params); export const fishCategorySave = (params) => postBodyRequest(`${PREFIX}/categories`, params);
export const fishCategoryDelete = (id) => postBodyRequest(`${PREFIX}/categories/delete?id=${id}`, {}); export const fishCategoryDelete = (id) => postBodyRequest(`${PREFIX}/categories/delete?id=${id}`, {});
export const fishCategoryStatus = (params) => postBodyRequest(`${PREFIX}/categories/status`, params);
export const fishComplaintPage = (params) => postBodyRequest(`${PREFIX}/complaints/page`, params); export const fishComplaintPage = (params) => postBodyRequest(`${PREFIX}/complaints/page`, params);
export const fishComplaintHandle = (params) => postBodyRequest(`${PREFIX}/complaints/handle`, params); export const fishComplaintHandle = (params) => postBodyRequest(`${PREFIX}/complaints/handle`, params);
export const fishCommentDelete = (id) => postBodyRequest(`${PREFIX}/comments/${id}/delete`, {});
export const fishUserLimitPage = (params) => postBodyRequest(`${PREFIX}/users/limits/page`, params); export const fishUserLimitPage = (params) => postBodyRequest(`${PREFIX}/users/limits/page`, params);
export const fishUserLimitSave = (params) => postBodyRequest(`${PREFIX}/users/limits`, params); export const fishUserLimitSave = (params) => postBodyRequest(`${PREFIX}/users/limits`, params);
export const fishAdminLogPage = (params) => postBodyRequest(`${PREFIX}/logs/page`, params); export const fishAdminLogPage = (params) => postBodyRequest(`${PREFIX}/logs/page`, params);
export const fishAuditLogPage = (params) => getRequest(`${PREFIX}/audit-logs/page`, params);

13
src/views/app/business/bus/bus.vue

@ -94,7 +94,7 @@
</div> </div>
</Card> </Card>
<Card style="width:49%;"> <Card style="width:49%;">
<Form ref="form" :model="form" :rules="formValidate" label-position="top"> <Form ref="form" :model="giveData" :rules="formValidate" label-position="top">
<Row> <Row>
<Col> <Col>
<FormItem label="发放类型"> <FormItem label="发放类型">
@ -481,10 +481,19 @@
this.getDataList(); this.getDataList();
}, },
issueCoupons(v){ issueCoupons(v){
this.resetGiveData();
this.Visiable = true this.Visiable = true
this.couponsData = v this.couponsData = v
this.giveData.couponId = v.id this.giveData.couponId = v.id
}, },
resetGiveData(){
this.giveData = {
type:'', //0 1
userPhones:'',
couponId:'',
giveNum:''
};
},
showIssueDetail(v) { showIssueDetail(v) {
this.detailVisible = true; this.detailVisible = true;
this.detailCoupon = v; this.detailCoupon = v;
@ -556,6 +565,8 @@
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.$Message.success("发放成功"); this.$Message.success("发放成功");
this.Visiable = false;
this.resetGiveData();
} }
}); });
}, },

312
src/views/app/business/expressCompany/expressCompany.vue

@ -12,9 +12,9 @@
<FormItem label="关键词"> <FormItem label="关键词">
<Input v-model="goodsQuery.keyword" clearable placeholder="标题/发布人" style="width: 180px" /> <Input v-model="goodsQuery.keyword" clearable placeholder="标题/发布人" style="width: 180px" />
</FormItem> </FormItem>
<FormItem label="学校"> <!-- <FormItem label="学校">
<Input v-model="goodsQuery.regionId" clearable placeholder="校区ID" style="width: 160px" /> <Input v-model="goodsQuery.regionId" clearable placeholder="校区ID" style="width: 160px" />
</FormItem> </FormItem> -->
<FormItem label="审核"> <FormItem label="审核">
<Select v-model="goodsQuery.auditStatus" clearable style="width: 120px"> <Select v-model="goodsQuery.auditStatus" clearable style="width: 120px">
<Option :value="0">待审核</Option> <Option :value="0">待审核</Option>
@ -51,7 +51,7 @@
<Table border :loading="loading" :columns="categoryColumns" :data="categoryList"></Table> <Table border :loading="loading" :columns="categoryColumns" :data="categoryList"></Table>
</TabPane> </TabPane>
<TabPane label="用户管理" name="user"> <!-- <TabPane label="用户管理" name="user">
<Row @keydown.enter.native="loadUserLimits"> <Row @keydown.enter.native="loadUserLimits">
<Form :model="userQuery" inline :label-width="80"> <Form :model="userQuery" inline :label-width="80">
<FormItem label="用户ID"> <FormItem label="用户ID">
@ -69,7 +69,7 @@
@on-change="p => changePage('user', p)" @on-page-size-change="s => changePageSize('user', s)" @on-change="p => changePage('user', p)" @on-page-size-change="s => changePageSize('user', s)"
:page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer /> :page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer />
</Row> </Row>
</TabPane> </TabPane> -->
<TabPane label="举报管理" name="complaint"> <TabPane label="举报管理" name="complaint">
<Row @keydown.enter.native="loadComplaints"> <Row @keydown.enter.native="loadComplaints">
@ -100,6 +100,26 @@
:page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer /> :page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer />
</Row> </Row>
</TabPane> </TabPane>
<TabPane label="违规内容" name="auditLog">
<!-- <Row @keydown.enter.native="loadAuditLogs">
<Form :model="auditLogQuery" inline :label-width="80">
<FormItem label="校区ID">
<Input v-model="auditLogQuery.regionId" disabled placeholder="自动传当前校区" style="width: 180px" />
</FormItem>
<FormItem>
<Button type="primary" icon="ios-search" @click="searchAuditLogs">搜索</Button>
<Button @click="resetAuditLogs">重置</Button>
</FormItem>
</Form>
</Row> -->
<Table border :loading="loading" :columns="auditLogColumns" :data="auditLogList"></Table>
<Row type="flex" justify="end" class="page">
<Page :current="auditLogQuery.pageNumber" :total="auditLogTotal" :page-size="auditLogQuery.pageSize"
@on-change="p => changeAuditLogPage(p)" @on-page-size-change="s => changeAuditLogPageSize(s)"
:page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer />
</Row>
</TabPane>
</Tabs> </Tabs>
</Card> </Card>
@ -107,8 +127,8 @@
<Form :model="categoryForm" :label-width="90"> <Form :model="categoryForm" :label-width="90">
<FormItem label="名称"><Input v-model="categoryForm.name" /></FormItem> <FormItem label="名称"><Input v-model="categoryForm.name" /></FormItem>
<FormItem label="排序"><InputNumber v-model="categoryForm.sortOrder" :min="0" /></FormItem> <FormItem label="排序"><InputNumber v-model="categoryForm.sortOrder" :min="0" /></FormItem>
<FormItem label="图标"><Input v-model="categoryForm.icon" /></FormItem> <!-- <FormItem label="图标"><Input v-model="categoryForm.icon" /></FormItem>
<FormItem label="颜色"><Input v-model="categoryForm.color" /></FormItem> <FormItem label="颜色"><Input v-model="categoryForm.color" /></FormItem> -->
<FormItem label="状态"> <FormItem label="状态">
<i-switch v-model="categoryForm.statusBool" size="large"> <i-switch v-model="categoryForm.statusBool" size="large">
<span slot="open">启用</span> <span slot="open">启用</span>
@ -127,20 +147,72 @@
<FormItem label="封禁原因"><Input v-model="userLimitForm.reason" type="textarea" /></FormItem> <FormItem label="封禁原因"><Input v-model="userLimitForm.reason" type="textarea" /></FormItem>
</Form> </Form>
</Modal> </Modal>
<Modal v-model="goodsDetailModal" title="商品详情" width="860" footer-hide>
<div v-if="goodsDetail && goodsDetail.id">
<Row :gutter="16">
<Col span="8">
<img v-if="goodsDetail.coverImage" :src="goodsDetail.coverImage" style="width: 100%; border-radius: 4px;" />
<div v-else style="height: 160px; line-height: 160px; text-align: center; background: #f7f7f7; color: #999;">暂无封面</div>
</Col>
<Col span="16">
<p><b>商品名称</b>{{ goodsDetail.title || "-" }}</p>
<p><b>卖家账号</b>{{ goodsDetail.sellerAccount || goodsDetail.userName || "-" }}</p>
<p><b>价格</b>{{ goodsDetail.price || "-" }}</p>
<p><b>分类</b>{{ goodsDetail.categoryName || "-" }}</p>
<p><b>状态</b>{{ goodsDetail.status == 1 ? "正常" : goodsDetail.status == 2 ? "下架" : "删除" }}</p>
<p><b>发布时间</b>{{ goodsDetail.createTime || "-" }}</p>
</Col>
</Row>
<div style="margin-top: 16px;">
<p><b>商品内容</b></p>
<p style="white-space: pre-wrap;">{{ goodsDetail.content || "-" }}</p>
</div>
<div style="margin-top: 16px;">
<p><b>评论</b></p>
<div v-if="detailCommentList.length">
<div v-for="comment in detailCommentList" :key="comment.id" style="padding: 10px 0; border-bottom: 1px solid #eee;">
<div style="display: flex; justify-content: space-between;">
<span><b>{{ comment.userName || "-" }}</b>{{ comment.content || "-" }}</span>
<Button type="error" size="small" @click="deleteGoodsComment(comment.id)">删除</Button>
</div>
<div style="color: #999; margin-top: 4px;">{{ comment.createTime || "" }}</div>
<div v-if="comment.replies && comment.replies.length" style="margin: 8px 0 0 20px; background: #f8f8f8; padding: 8px;">
<div v-for="reply in comment.replies" :key="reply.id" style="display: flex; justify-content: space-between; margin-bottom: 6px;">
<span><b>{{ reply.userName || "-" }}</b><span v-if="reply.replyToUserName"> 回复 {{ reply.replyToUserName }}</span>{{ reply.content || "-" }}</span>
<Button type="error" size="small" @click="deleteGoodsComment(reply.id)">删除</Button>
</div>
</div>
</div>
<Row type="flex" justify="end" class="page">
<Page :current="detailCommentQuery.pageNum" :total="detailCommentTotal" :page-size="detailCommentQuery.pageSize"
@on-change="changeDetailCommentPage" @on-page-size-change="changeDetailCommentPageSize"
:page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer />
</Row>
</div>
<div v-else style="text-align: center; color: #999; padding: 12px 0;">暂无评论</div>
</div>
</div>
<div v-else style="text-align: center; color: #999;">暂无商品详情</div>
</Modal>
</div> </div>
</template> </template>
<script> <script>
import { import {
fishGoodsPage, fishGoodsPage,
fishGoodsDetail,
fishGoodsComments,
fishGoodsStatus, fishGoodsStatus,
fishCategoryList, fishCategoryList,
fishCategorySave, fishCategorySave,
fishCategoryDelete, fishCategoryStatus,
fishComplaintPage, fishComplaintPage,
fishComplaintHandle, fishComplaintHandle,
fishCommentDelete,
fishUserLimitPage, fishUserLimitPage,
fishUserLimitSave, fishUserLimitSave,
fishAuditLogPage,
} from "@/api/fishMarket"; } from "@/api/fishMarket";
export default { export default {
@ -156,40 +228,51 @@ export default {
userTotal: 0, userTotal: 0,
complaintList: [], complaintList: [],
complaintTotal: 0, complaintTotal: 0,
auditLogList: [],
auditLogTotal: 0,
categoryModal: false, categoryModal: false,
userLimitModal: false, userLimitModal: false,
goodsDetailModal: false,
categoryForm: {}, categoryForm: {},
userLimitForm: {}, userLimitForm: {},
goodsDetail: {},
detailGoodsId: "",
detailCommentList: [],
detailCommentTotal: 0,
detailCommentQuery: { pageNum: 1, pageSize: 10 },
goodsQuery: { pageNum: 1, pageSize: 10 }, goodsQuery: { pageNum: 1, pageSize: 10 },
userQuery: { pageNum: 1, pageSize: 10 }, userQuery: { pageNum: 1, pageSize: 10 },
complaintQuery: { pageNum: 1, pageSize: 10, status: 0 }, complaintQuery: { pageNum: 1, pageSize: 10, status: 0 },
auditLogQuery: { pageNumber: 1, pageSize: 10, regionId: "" },
goodsColumns: [ goodsColumns: [
{ title: "标题", key: "title", minWidth: 180 }, { title: "标题", key: "title", minWidth: 180 },
{ title: "学校", key: "regionName", width: 130 }, { title: "发布人", key: "userName", width: 130 },
{ title: "发布人", key: "userName", width: 120 },
{ title: "分类", key: "categoryName", width: 100 }, { title: "分类", key: "categoryName", width: 100 },
{ title: "价格", key: "price", width: 90 }, { title: "价格", key: "price", width: 90 },
{ title: "审核", key: "auditStatus", width: 90, render: (h, p) => h("Tag", { props: { color: this.auditColor(p.row.auditStatus) } }, this.auditText(p.row.auditStatus)) }, { title: "审核", key: "auditStatus", width: 90, render: (h, p) => h("Tag", { props: { color: this.auditColor(p.row.auditStatus) } }, this.auditText(p.row.auditStatus)) },
{ title: "状态", key: "status", width: 90, render: (h, p) => h("Tag", { props: { color: p.row.status == 1 ? "green" : "red" } }, p.row.status == 1 ? "正常" : "下架") }, { title: "状态", key: "status", width: 100, render: (h, p) => h("Tag", { props: { color: this.goodsStatusColor(p.row.status) } }, this.goodsStatusText(p.row.status)) },
{ title: "举报", key: "complaintCount", width: 80 }, { title: "举报", key: "complaintCount", width: 80 },
{ title: "浏览", key: "browseCount", width: 80 }, { title: "浏览", key: "browseCount", width: 80 },
{ title: "发布时间", key: "createTime", minWidth: 150 }, { title: "发布时间", key: "createTime", minWidth: 150 },
{ title: "操作", width: 250, fixed: "right", render: (h, p) => h("div", [ { title: "操作", width: 250, fixed: "right", render: (h, p) => {
h("Button", { props: { type: "success", size: "small" }, style: { marginRight: "6px" }, on: { click: () => this.handleGoods(p.row, 1, "审核通过") } }, "通过"), if (p.row.status == 3) return h("span", "");
return h("div", [
/* h("Button", { props: { type: "success", size: "small" }, style: { marginRight: "6px" }, on: { click: () => this.handleGoods(p.row, 1, "审核通过") } }, "通过"), */
h("Button", { props: { type: "info", size: "small" }, style: { marginRight: "6px" }, on: { click: () => this.viewGoodsDetail(p.row) } }, "详情"),
h("Button", { props: { type: "warning", size: "small" }, style: { marginRight: "6px" }, on: { click: () => this.handleGoods(p.row, 2, "强制下架") } }, "下架"), h("Button", { props: { type: "warning", size: "small" }, style: { marginRight: "6px" }, on: { click: () => this.handleGoods(p.row, 2, "强制下架") } }, "下架"),
h("Button", { props: { type: "primary", size: "small" }, style: { marginRight: "6px" }, on: { click: () => this.handleGoods(p.row, 1, "恢复上架") } }, "恢复"), h("Button", { props: { type: "primary", size: "small" }, style: { marginRight: "6px" }, on: { click: () => this.handleGoods(p.row, 1, "恢复上架") } }, "恢复")
h("Button", { props: { type: "error", size: "small" }, on: { click: () => this.handleGoods(p.row, 3, "删除") } }, "删除") ]);
]) } } }
], ],
categoryColumns: [ categoryColumns: [
{ title: "名称", key: "name" }, { title: "名称", key: "name" },
{ title: "排序", key: "sortOrder", width: 100 }, { title: "排序", key: "sortOrder", width: 100 },
{ title: "图标", key: "icon", minWidth: 180 }, /* { title: "", key: "icon", minWidth: 180 },
{ title: "颜色", key: "color", width: 100 }, { title: "颜色", key: "color", width: 100 }, */
{ title: "状态", key: "status", width: 90, render: (h, p) => h("Tag", { props: { color: p.row.status == 1 ? "green" : "default" } }, p.row.status == 1 ? "启用" : "禁用") }, { title: "状态", key: "status", width: 90, render: (h, p) => h("Tag", { props: { color: p.row.status == 1 ? "green" : "default" } }, p.row.status == 1 ? "启用" : "禁用") },
{ title: "操作", width: 160, render: (h, p) => h("div", [ { title: "操作", width: 160, render: (h, p) => h("div", [
h("Button", { props: { type: "primary", size: "small" }, style: { marginRight: "8px" }, on: { click: () => this.openCategory(p.row) } }, "编辑"), h("Button", { props: { type: "primary", size: "small" }, style: { marginRight: "8px" }, on: { click: () => this.openCategory(p.row) } }, "编辑"),
h("Button", { props: { type: "error", size: "small" }, on: { click: () => this.deleteCategory(p.row) } }, "删除") h("Button", { props: { type: p.row.status == 1 ? "warning" : "success", size: "small" }, on: { click: () => this.handleCategoryStatus(p.row) } }, p.row.status == 1 ? "下架" : "上架")
]) } ]) }
], ],
userColumns: [ userColumns: [
@ -202,18 +285,28 @@ export default {
{ title: "操作", width: 100, render: (h, p) => h("Button", { props: { type: "primary", size: "small" }, on: { click: () => this.openUserLimit(p.row) } }, "编辑") } { title: "操作", width: 100, render: (h, p) => h("Button", { props: { type: "primary", size: "small" }, on: { click: () => this.openUserLimit(p.row) } }, "编辑") }
], ],
complaintColumns: [ complaintColumns: [
{ title: "类型", key: "complaintType", width: 100 }, { title: "类型", key: "complaintType", width: 100, render: (h, p) => h("span", this.complaintTypeText(p.row.complaintType)) },
{ title: "商品ID", key: "goodsId", minWidth: 170 }, { title: "商品名称", key: "displayTitle", minWidth: 180, render: (h, p) => {
{ title: "举报人", key: "reporterName", width: 120 }, const title = p.row.displayTitle || "-";
{ title: "卖家ID", key: "sellerId", minWidth: 170 }, if (!p.row.goodsId) return h("span", title);
return h("a", { on: { click: () => this.viewGoodsDetail(p.row) } }, title);
} },
{ title: "举报人", key: "reporterName", width: 130 },
{ title: "卖家账号", key: "sellerAccount", minWidth: 150 },
{ title: "原因", key: "reason", minWidth: 220 }, { title: "原因", key: "reason", minWidth: 220 },
{ title: "状态", key: "status", width: 90, render: (h, p) => h("Tag", { props: { color: p.row.status == 0 ? "orange" : (p.row.status == 1 ? "green" : "default") } }, this.complaintStatusText(p.row.status)) }, { title: "状态", key: "status", width: 100, render: (h, p) => h("Tag", { props: { color: p.row.status == 0 ? "orange" : (p.row.status == 1 ? "green" : "default") } }, this.complaintStatusText(p.row.status)) },
{ title: "时间", key: "createTime", minWidth: 150 }, { title: "时间", key: "createTime", minWidth: 150 },
{ title: "操作", width: 230, fixed: "right", render: (h, p) => h("div", [ { title: "操作", width: 100, fixed: "right", render: (h, p) => h("Button", { props: { type: "primary", size: "small" }, on: { click: () => this.handleComplaint(p.row) } }, "处理") }
h("Button", { props: { type: "success", size: "small" }, style: { marginRight: "6px" }, on: { click: () => this.handleComplaint(p.row, 1) } }, "通过"), ],
h("Button", { props: { size: "small" }, style: { marginRight: "6px" }, on: { click: () => this.handleComplaint(p.row, 2) } }, "驳回"), auditLogColumns: [
h("Button", { props: { type: "error", size: "small" }, on: { click: () => this.handleComplaint(p.row, 1, true) } }, "下架封号") { title: "ID", key: "id", width: 80 },
]) } { title: "用户手机号", key: "userMobile", minWidth: 130 },
{ title: "来源", key: "bizType", minWidth: 150, render: (h, p) => h("span", this.auditBizTypeText(p.row.bizType)) },
{ title: "原始内容", key: "rawContent", minWidth: 260 },
{ title: "风险等级", key: "riskLevel", width: 100, render: (h, p) => h("Tag", { props: { color: this.riskLevelColor(p.row.riskLevel) } }, this.riskLevelText(p.row.riskLevel)) },
{ title: "命中信息", key: "hitWords", minWidth: 180 },
{ title: "分类/详情", key: "hitCategories", minWidth: 220 },
{ title: "时间", key: "createTime", minWidth: 150 }
] ]
}; };
}, },
@ -226,6 +319,15 @@ export default {
if (this.activeTab == "category") this.loadCategories(); if (this.activeTab == "category") this.loadCategories();
if (this.activeTab == "user") this.loadUserLimits(); if (this.activeTab == "user") this.loadUserLimits();
if (this.activeTab == "complaint") this.loadComplaints(); if (this.activeTab == "complaint") this.loadComplaints();
if (this.activeTab == "auditLog") this.loadAuditLogs();
},
resolveRegionId() {
try {
const user = this.getStore("user");
return user ? (JSON.parse(user).departmentId || "") : "";
} catch (e) {
return "";
}
}, },
loadGoods() { loadGoods() {
this.loading = true; this.loading = true;
@ -240,7 +342,7 @@ export default {
}, },
loadCategories() { loadCategories() {
this.loading = true; this.loading = true;
fishCategoryList({}).then(res => { fishCategoryList({ regionId: this.resolveRegionId() }).then(res => {
this.categoryList = res.result || res || []; this.categoryList = res.result || res || [];
}).finally(() => this.loading = false); }).finally(() => this.loading = false);
}, },
@ -258,6 +360,22 @@ export default {
this.complaintTotal = this.total(res); this.complaintTotal = this.total(res);
}).finally(() => this.loading = false); }).finally(() => this.loading = false);
}, },
loadAuditLogs() {
this.loading = true;
this.auditLogQuery.regionId = this.resolveRegionId();
fishAuditLogPage(this.auditLogQuery).then(res => {
this.auditLogList = this.records(res);
this.auditLogTotal = this.total(res);
}).finally(() => this.loading = false);
},
searchAuditLogs() {
this.auditLogQuery.pageNumber = 1;
this.loadAuditLogs();
},
resetAuditLogs() {
this.auditLogQuery = { pageNumber: 1, pageSize: 10, regionId: this.resolveRegionId() };
this.loadAuditLogs();
},
changePage(type, page) { changePage(type, page) {
this[`${type}Query`].pageNum = page; this[`${type}Query`].pageNum = page;
this.handleTabChange(); this.handleTabChange();
@ -267,6 +385,15 @@ export default {
this[`${type}Query`].pageNum = 1; this[`${type}Query`].pageNum = 1;
this.handleTabChange(); this.handleTabChange();
}, },
changeAuditLogPage(page) {
this.auditLogQuery.pageNumber = page;
this.loadAuditLogs();
},
changeAuditLogPageSize(size) {
this.auditLogQuery.pageSize = size;
this.auditLogQuery.pageNumber = 1;
this.loadAuditLogs();
},
records(res) { records(res) {
const data = res.result || res || {}; const data = res.result || res || {};
return data.records || data.content || []; return data.records || data.content || [];
@ -281,9 +408,54 @@ export default {
auditColor(status) { auditColor(status) {
return status == 1 ? "green" : (status == 2 ? "red" : "orange"); return status == 1 ? "green" : (status == 2 ? "red" : "orange");
}, },
goodsStatusText(status) {
if (status == 3) return "已删除";
if (status == 2) return "下架";
return "正常";
},
goodsStatusColor(status) {
if (status == 3) return "default";
if (status == 2) return "red";
return "green";
},
complaintStatusText(status) { complaintStatusText(status) {
return status == 1 ? "通过" : (status == 2 ? "驳回" : "待处理"); return status == 1 ? "通过" : (status == 2 ? "驳回" : "待处理");
}, },
complaintTypeText(type) {
const map = {
goods: "商品",
comment: "评论",
chat: "聊天"
};
return map[type] || type || "未知";
},
auditBizTypeText(type) {
const map = {
fish_goods_title: "商品标题",
fish_goods_content: "商品内容",
fish_want_title: "求购标题",
fish_want_content: "求购内容",
fish_release_image: "发布图片",
fish_comment: "留言评论",
fish_chat_message: "聊天文字",
fish_chat_message_image: "聊天图片",
fish_complaint: "举报内容",
fish_complaint_image: "举报图片"
};
return map[type] || type || "未知";
},
riskLevelText(level) {
if (level === 3) return "高";
if (level === 2) return "中";
if (level === 1) return "低";
return "无";
},
riskLevelColor(level) {
if (level === 3) return "red";
if (level === 2) return "orange";
if (level === 1) return "yellow";
return "green";
},
handleGoods(row, status, title) { handleGoods(row, status, title) {
this.$Modal.confirm({ this.$Modal.confirm({
title, title,
@ -297,21 +469,26 @@ export default {
}); });
}, },
openCategory(row = {}) { openCategory(row = {}) {
this.categoryForm = { ...row, statusBool: row.status !== 0 }; this.categoryForm = { regionId: this.resolveRegionId(), ...row, statusBool: row.status !== 0 };
this.categoryModal = true; this.categoryModal = true;
}, },
saveCategory() { saveCategory() {
const data = { ...this.categoryForm, status: this.categoryForm.statusBool ? 1 : 0 }; const data = { ...this.categoryForm, regionId: this.categoryForm.regionId || this.resolveRegionId(), status: this.categoryForm.statusBool ? 1 : 0 };
fishCategorySave(data).then(() => { fishCategorySave(data).then(() => {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.loadCategories(); this.loadCategories();
}); });
}, },
deleteCategory(row) { handleCategoryStatus(row) {
const nextStatus = row.status == 1 ? 0 : 1;
const actionText = nextStatus == 1 ? "上架" : "下架";
this.$Modal.confirm({ this.$Modal.confirm({
title: "删除分类", title: `${actionText}分类`,
content: "确认删除该分类吗?", content: `确认${actionText}分类“${row.name}”吗?`,
onOk: () => fishCategoryDelete(row.id).then(() => this.loadCategories()) onOk: () => fishCategoryStatus({ id: row.id, status: nextStatus, reason: `${actionText}分类` }).then(() => {
this.$Message.success(`${actionText}成功`);
this.loadCategories();
})
}); });
}, },
openUserLimit(row = {}) { openUserLimit(row = {}) {
@ -336,18 +513,73 @@ export default {
this.loadUserLimits(); this.loadUserLimits();
}); });
}, },
handleComplaint(row, status, blockUser) { viewGoodsDetail(row) {
const goodsId = row.goodsId || row.id;
if (!goodsId) {
this.$Message.warning("该举报没有关联商品");
return;
}
this.detailGoodsId = goodsId;
this.detailCommentQuery = { pageNum: 1, pageSize: 10 };
fishGoodsDetail(goodsId).then(res => {
const detail = res.result || res || {};
this.goodsDetail = { ...detail, sellerAccount: row.sellerAccount || row.userName };
this.goodsDetailModal = true;
this.loadGoodsComments();
});
},
loadGoodsComments() {
if (!this.detailGoodsId) return;
fishGoodsComments(this.detailGoodsId, this.detailCommentQuery).then(res => {
this.detailCommentList = this.records(res);
this.detailCommentTotal = this.total(res);
});
},
changeDetailCommentPage(page) {
this.detailCommentQuery.pageNum = page;
this.loadGoodsComments();
},
changeDetailCommentPageSize(size) {
this.detailCommentQuery.pageSize = size;
this.detailCommentQuery.pageNum = 1;
this.loadGoodsComments();
},
deleteGoodsComment(id) {
this.$Modal.confirm({
title: "删除评论",
content: "确认删除该评论吗?",
onOk: () => fishCommentDelete(id).then(() => {
this.$Message.success("删除成功");
this.loadGoodsComments();
})
});
},
handleComplaint(row) {
this.actionReason = "";
this.$Modal.confirm({
title: "处理举报",
render: (h) => h("Input", {
props: { type: "textarea", autofocus: true, rows: 4, placeholder: "请输入处理意见,确认后将封禁卖家账号" },
on: { input: val => this.actionReason = val }
}),
onOk: () => {
const reason = this.actionReason || "举报成立,封禁卖家账号";
fishComplaintHandle({ fishComplaintHandle({
complaintId: row.id, complaintId: row.id,
status, status: 1,
blockUser: !!blockUser, blockUser: true,
reason: blockUser ? "举报成立,执行风控" : "", muted: 1,
handleResult: status == 1 ? "举报通过" : "举报驳回" publishBanned: 1,
permanentBanned: 1,
reason,
handleResult: reason
}).then(() => { }).then(() => {
this.$Message.success("处理成功"); this.$Message.success("处理成功");
this.loadComplaints(); this.loadComplaints();
}); });
} }
});
}
} }
}; };
</script> </script>

2
src/views/app/business/logiticsCompany/transferStation.vue

@ -206,6 +206,7 @@ export default {
shopAddress: item.shopAddress, shopAddress: item.shopAddress,
contactPhone: item.contactPhone, contactPhone: item.contactPhone,
regionId: item.regionId, regionId: item.regionId,
shopArea: item.shopArea,
})); }));
} }
}).catch(() => { }).catch(() => {
@ -303,6 +304,7 @@ export default {
orderFiled: 0, orderFiled: 0,
status: 1, status: 1,
getAreaId: this.selectNode.regionId || this.regionId, getAreaId: this.selectNode.regionId || this.regionId,
shoArea: this.selectNode.shopArea || "",
startTime: null, startTime: null,
endTime: null, endTime: null,
remark: "", remark: "",

2
src/views/app/shop/addType.vue

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<Modal title="添加字典" v-model="visible" :mask-closable="false" :width="500"> <Modal title="添加分类" v-model="visible" :mask-closable="false" :width="500">
<Form ref="form" :model="form" :label-width="85" :rules="formValidate"> <Form ref="form" :model="form" :label-width="85" :rules="formValidate">
<FormItem label="分类名称" prop="title"> <FormItem label="分类名称" prop="title">
<Input v-model="form.categoryName" /> <Input v-model="form.categoryName" />

16
src/views/app/shop/dictManage.vue

@ -172,7 +172,7 @@
</FormItem> </FormItem>
</Col> </Col>
<Col span="6"> <Col span="6">
<FormItem label="商品格" class="form-noheight"> <FormItem label="商品格" class="form-noheight">
<div> <div>
<div v-for="(item,index) in addGoodsForm.attributeListPrice" style="display: flex;margin-top:5px;"> <div v-for="(item,index) in addGoodsForm.attributeListPrice" style="display: flex;margin-top:5px;">
<Input v-model="item.specName" v-if="item.specName != ''&& addGoodsForm.attributeListPrice.length != 1" style="padding-right: 10px;" disabled /> <Input v-model="item.specName" v-if="item.specName != ''&& addGoodsForm.attributeListPrice.length != 1" style="padding-right: 10px;" disabled />
@ -180,9 +180,9 @@
<Input v-model="item.specNum" style="padding-right: 10px;" @click="changeCount(index)" placeholder="商品库存"/> <Input v-model="item.specNum" style="padding-right: 10px;" @click="changeCount(index)" placeholder="商品库存"/>
<button @click="deldantiaoguige(index)" v-if="addGoodsForm.attributeListPrice.length>1" style="width: 120px;height: 30px;line-height: 30px;color: red;border:none;background: #fff;">删除</button> <button @click="deldantiaoguige(index)" v-if="addGoodsForm.attributeListPrice.length>1" style="width: 120px;height: 30px;line-height: 30px;color: red;border:none;background: #fff;">删除</button>
</div> </div>
<div @click="checkSpec('guige')" style="margin-top:5px;width: 80px;height: 30px;text-align: center;line-height: 30px;background: #008ba0;color:#fff;"> <!-- <div @click="checkSpec('guige')" style="margin-top:5px;width: 80px;height: 30px;text-align: center;line-height: 30px;background: #008ba0;color:#fff;">
选择规格 选择规格
</div> </div> -->
</div> </div>
</FormItem> </FormItem>
</Col> </Col>
@ -202,7 +202,7 @@
</Col> </Col>
<Col span="6"> <Col span="6">
<FormItem label="餐盒费" prop="lunchBox"> <FormItem label="餐盒费" prop="lunchBox">
<Input v-model="addGoodsForm.lunchBox" type="number" :min="0" :max="10" placeholder="0-10,最多2位小数" /> <Input v-model="addGoodsForm.lunchBox" type="number" :min="0" :max="10" :disabled="addGoodsForm.isMoreBuy == 1" placeholder="0-10,最多2位小数" />
</FormItem> </FormItem>
</Col> </Col>
<Col span="6"> <Col span="6">
@ -243,7 +243,7 @@
</FormItem> </FormItem>
</Col> </Col>
<Col span="8"> <Col span="8">
<FormItem label="设置加料" class="form-noheight"> <FormItem label="搭配小食" class="form-noheight">
<div> <div>
<div style="line-height: 37px;"> <div style="line-height: 37px;">
<input type="radio" :checked="addGoodsForm.isMoreBuy==0" name="isMoreBuy" @click="checkisMoreBuy('0')" /> <input type="radio" :checked="addGoodsForm.isMoreBuy==0" name="isMoreBuy" @click="checkisMoreBuy('0')" />
@ -944,6 +944,9 @@
}, },
checkisMoreBuy(type){ checkisMoreBuy(type){
this.addGoodsForm.isMoreBuy = type; this.addGoodsForm.isMoreBuy = type;
if (this.addGoodsForm.isMoreBuy == 1) {
this.addGoodsForm.lunchBox = 0;
}
}, },
checkSpecValue(index){ checkSpecValue(index){
this.categorySonData[index].checked = !this.categorySonData[index].checked this.categorySonData[index].checked = !this.categorySonData[index].checked
@ -1294,6 +1297,9 @@
this.modalVisible = true; this.modalVisible = true;
}, },
handelSubmit() { handelSubmit() {
if (this.addGoodsForm.isMoreBuy == 1) {
this.addGoodsForm.lunchBox = 0;
}
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
if (!this.validateGoodsForm()) return; if (!this.validateGoodsForm()) return;

13
src/views/app/shop/shop.vue

@ -16,6 +16,15 @@
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.shop-row-disabled td {
background-color: #f7f7f7 !important;
color: #999;
}
.shop-row-disabled a {
color: #999;
}
</style> </style>
<template> <template>
<div class="search"> <div class="search">
@ -70,6 +79,7 @@
<a class="select-clear" @click="clearSelectAll">清空</a> <a class="select-clear" @click="clearSelectAll">清空</a>
</Alert> </Alert>
<Table :loading="loading" border :columns="columns" :data="data" :size="tableSize" sortable="custom" <Table :loading="loading" border :columns="columns" :data="data" :size="tableSize" sortable="custom"
:row-class-name="rowClassName"
@on-sort-change="changeSort" @on-selection-change="showSelect" ref="table"></Table> @on-sort-change="changeSort" @on-selection-change="showSelect" ref="table"></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" <Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize"
@ -407,6 +417,9 @@
changeTableSize(v) { changeTableSize(v) {
this.tableSize = v; this.tableSize = v;
}, },
rowClassName(row) {
return row.status === 0 ? "shop-row-disabled" : "";
},
getDataList() { getDataList() {
// //
this.loading = true; this.loading = true;

Loading…
Cancel
Save