|
|
@ -8,8 +8,9 @@ |
|
|
<TabPane label="拼团单" name="0"></TabPane> |
|
|
<TabPane label="拼团单" name="0"></TabPane> |
|
|
<TabPane label="外卖单" name="1"></TabPane> |
|
|
<TabPane label="外卖单" name="1"></TabPane> |
|
|
<TabPane label="跑腿单" name="2"></TabPane> |
|
|
<TabPane label="跑腿单" name="2"></TabPane> |
|
|
|
|
|
<TabPane label="i/e投诉举报" name="3"></TabPane> |
|
|
</Tabs> |
|
|
</Tabs> |
|
|
<Row @keydown.enter.native="handleSearch"> |
|
|
<Row v-if="tabName !== '3'" @keydown.enter.native="handleSearch"> |
|
|
<Form ref="searchForm" :model="searchForm" inline :label-width="70"> |
|
|
<Form ref="searchForm" :model="searchForm" inline :label-width="70"> |
|
|
<FormItem> |
|
|
<FormItem> |
|
|
<Row> |
|
|
<Row> |
|
|
@ -30,8 +31,22 @@ |
|
|
</FormItem> |
|
|
</FormItem> |
|
|
</Form> |
|
|
</Form> |
|
|
</Row> |
|
|
</Row> |
|
|
|
|
|
<Row v-else @keydown.enter.native="handleIeReportSearch"> |
|
|
|
|
|
<Form inline :label-width="70"> |
|
|
|
|
|
<FormItem label="状态"> |
|
|
|
|
|
<Select v-model="ieReportSearch.status" clearable style="width: 140px"> |
|
|
|
|
|
<Option :value="0">待处理</Option> |
|
|
|
|
|
<Option :value="1">已处理</Option> |
|
|
|
|
|
<Option :value="2">已驳回</Option> |
|
|
|
|
|
</Select> |
|
|
|
|
|
</FormItem> |
|
|
|
|
|
<FormItem> |
|
|
|
|
|
<Button type="primary" icon="ios-search" @click="handleIeReportSearch">搜索</Button> |
|
|
|
|
|
</FormItem> |
|
|
|
|
|
</Form> |
|
|
|
|
|
</Row> |
|
|
</Card> |
|
|
</Card> |
|
|
<Card> |
|
|
<Card v-if="tabName !== '3'"> |
|
|
<div style="border-left: 5px solid rgb(70, 130, 180);height: 20px;line-height: 20px;font-size: 18px;font-weight: 700;margin-bottom: 20px;padding-left: 7px;"> |
|
|
<div style="border-left: 5px solid rgb(70, 130, 180);height: 20px;line-height: 20px;font-size: 18px;font-weight: 700;margin-bottom: 20px;padding-left: 7px;"> |
|
|
订单数据 |
|
|
订单数据 |
|
|
</div> |
|
|
</div> |
|
|
@ -329,6 +344,35 @@ |
|
|
</Col> |
|
|
</Col> |
|
|
</Row> |
|
|
</Row> |
|
|
</Card> |
|
|
</Card> |
|
|
|
|
|
<Card v-else> |
|
|
|
|
|
<div style="border-left: 5px solid rgb(70, 130, 180);height: 20px;line-height: 20px;font-size: 18px;font-weight: 700;margin-bottom: 20px;padding-left: 7px;"> |
|
|
|
|
|
i/e投诉举报 |
|
|
|
|
|
</div> |
|
|
|
|
|
<Table border :columns="ieReportColumns" :data="ieReportList" :loading="ieReportLoading"></Table> |
|
|
|
|
|
<Row type="flex" justify="end" style="margin-top: 16px;"> |
|
|
|
|
|
<Page :current="ieReportSearch.pageNumber" :page-size="ieReportSearch.pageSize" :total="ieReportTotal" |
|
|
|
|
|
show-total show-elevator show-sizer @on-change="changeIeReportPage" @on-page-size-change="changeIeReportPageSize" /> |
|
|
|
|
|
</Row> |
|
|
|
|
|
<Modal v-model="ieReportModalVisible" title="处理i/e投诉举报" @on-ok="submitIeReportHandle"> |
|
|
|
|
|
<Form :model="ieReportHandleForm" :label-width="90"> |
|
|
|
|
|
<FormItem label="处理状态"> |
|
|
|
|
|
<Select v-model="ieReportHandleForm.status"> |
|
|
|
|
|
<Option :value="1">已处理</Option> |
|
|
|
|
|
<Option :value="2">已驳回</Option> |
|
|
|
|
|
</Select> |
|
|
|
|
|
</FormItem> |
|
|
|
|
|
<FormItem label="封禁身份"> |
|
|
|
|
|
<i-switch v-model="ieReportHandleForm.blockIe"> |
|
|
|
|
|
<span slot="open">是</span> |
|
|
|
|
|
<span slot="close">否</span> |
|
|
|
|
|
</i-switch> |
|
|
|
|
|
</FormItem> |
|
|
|
|
|
<FormItem label="处理说明"> |
|
|
|
|
|
<Input v-model="ieReportHandleForm.handleResult" type="textarea" :rows="4" placeholder="请输入处理结果,用户可在举报记录中查看" /> |
|
|
|
|
|
</FormItem> |
|
|
|
|
|
</Form> |
|
|
|
|
|
</Modal> |
|
|
|
|
|
</Card> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -339,10 +383,59 @@ |
|
|
import { |
|
|
import { |
|
|
getLogiticsCompanyData, |
|
|
getLogiticsCompanyData, |
|
|
} from "@/api/app"; |
|
|
} from "@/api/app"; |
|
|
|
|
|
import { |
|
|
|
|
|
ieReportPage, |
|
|
|
|
|
ieReportHandle, |
|
|
|
|
|
ieReportDelete |
|
|
|
|
|
} from "@/api/ie"; |
|
|
export default { |
|
|
export default { |
|
|
name: "order-manage", |
|
|
name: "order-manage", |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
tabName: "0", |
|
|
|
|
|
ieReportLoading: false, |
|
|
|
|
|
ieReportList: [], |
|
|
|
|
|
ieReportTotal: 0, |
|
|
|
|
|
ieReportModalVisible: false, |
|
|
|
|
|
ieReportHandleForm: { |
|
|
|
|
|
reportId: "", |
|
|
|
|
|
status: 1, |
|
|
|
|
|
blockIe: false, |
|
|
|
|
|
handleResult: "" |
|
|
|
|
|
}, |
|
|
|
|
|
ieReportSearch: { |
|
|
|
|
|
pageNumber: 1, |
|
|
|
|
|
pageSize: 10, |
|
|
|
|
|
status: "", |
|
|
|
|
|
regionId: "" |
|
|
|
|
|
}, |
|
|
|
|
|
ieReportColumns: [ |
|
|
|
|
|
{ title: "ID", key: "id", width: 80 }, |
|
|
|
|
|
{ title: "举报人", key: "reporterId", minWidth: 100 }, |
|
|
|
|
|
{ title: "被举报人", key: "reportedUserId", minWidth: 100 }, |
|
|
|
|
|
{ title: "校区", key: "regionName", minWidth: 120 }, |
|
|
|
|
|
{ title: "原因", key: "reasonType", minWidth: 110, render: (h, params) => h("span", this.reasonText(params.row.reasonType)) }, |
|
|
|
|
|
{ title: "说明", key: "reasonText", minWidth: 180 }, |
|
|
|
|
|
{ title: "状态", key: "status", width: 100, render: (h, params) => h("Tag", { props: { color: this.statusColor(params.row.status) } }, this.statusText(params.row.status)) }, |
|
|
|
|
|
{ title: "处理结果", key: "handleResult", minWidth: 180 }, |
|
|
|
|
|
{ title: "创建时间", key: "createTime", minWidth: 160 }, |
|
|
|
|
|
{ |
|
|
|
|
|
title: "操作", |
|
|
|
|
|
width: 180, |
|
|
|
|
|
fixed: "right", |
|
|
|
|
|
render: (h, params) => h("div", [ |
|
|
|
|
|
h("Button", { |
|
|
|
|
|
props: { type: "primary", size: "small" }, |
|
|
|
|
|
style: { marginRight: "8px" }, |
|
|
|
|
|
on: { click: () => this.openIeReportHandle(params.row) } |
|
|
|
|
|
}, "处理"), |
|
|
|
|
|
h("Button", { |
|
|
|
|
|
props: { type: "error", size: "small" }, |
|
|
|
|
|
on: { click: () => this.deleteIeReport(params.row) } |
|
|
|
|
|
}, "删除") |
|
|
|
|
|
]) |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
searchForm: { |
|
|
searchForm: { |
|
|
startDate: "", |
|
|
startDate: "", |
|
|
endDate: "" |
|
|
endDate: "" |
|
|
@ -356,6 +449,90 @@ |
|
|
this.searchForm.endDate = dayTime |
|
|
this.searchForm.endDate = dayTime |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
resolveRegionId() { |
|
|
|
|
|
try { |
|
|
|
|
|
const user = this.getStore("user") |
|
|
|
|
|
return user ? (JSON.parse(user).departmentId || "") : "" |
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
changeOrderTab(name) { |
|
|
|
|
|
this.tabName = name |
|
|
|
|
|
if (name === "3") { |
|
|
|
|
|
this.ieReportSearch.regionId = this.resolveRegionId() |
|
|
|
|
|
this.handleIeReportSearch() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
handleIeReportSearch() { |
|
|
|
|
|
this.ieReportSearch.pageNumber = 1 |
|
|
|
|
|
this.getIeReports() |
|
|
|
|
|
}, |
|
|
|
|
|
getIeReports() { |
|
|
|
|
|
this.ieReportLoading = true |
|
|
|
|
|
this.ieReportSearch.regionId = this.resolveRegionId() |
|
|
|
|
|
const params = Object.assign({}, this.ieReportSearch) |
|
|
|
|
|
if (params.status === "" || params.status === null || params.status === undefined) { |
|
|
|
|
|
delete params.status |
|
|
|
|
|
} |
|
|
|
|
|
ieReportPage(params).then(res => { |
|
|
|
|
|
const data = res.result || res |
|
|
|
|
|
this.ieReportList = data.records || [] |
|
|
|
|
|
this.ieReportTotal = data.total || 0 |
|
|
|
|
|
}).finally(() => { |
|
|
|
|
|
this.ieReportLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
changeIeReportPage(page) { |
|
|
|
|
|
this.ieReportSearch.pageNumber = page |
|
|
|
|
|
this.getIeReports() |
|
|
|
|
|
}, |
|
|
|
|
|
changeIeReportPageSize(size) { |
|
|
|
|
|
this.ieReportSearch.pageSize = size |
|
|
|
|
|
this.ieReportSearch.pageNumber = 1 |
|
|
|
|
|
this.getIeReports() |
|
|
|
|
|
}, |
|
|
|
|
|
openIeReportHandle(row) { |
|
|
|
|
|
this.ieReportHandleForm = { |
|
|
|
|
|
reportId: row.id, |
|
|
|
|
|
status: row.status === 2 ? 2 : 1, |
|
|
|
|
|
blockIe: row.blockedIe === 1, |
|
|
|
|
|
handleResult: row.handleResult || "" |
|
|
|
|
|
} |
|
|
|
|
|
this.ieReportModalVisible = true |
|
|
|
|
|
}, |
|
|
|
|
|
submitIeReportHandle() { |
|
|
|
|
|
ieReportHandle(this.ieReportHandleForm).then(() => { |
|
|
|
|
|
this.$Message.success("处理成功") |
|
|
|
|
|
this.getIeReports() |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
deleteIeReport(row) { |
|
|
|
|
|
this.$Modal.confirm({ |
|
|
|
|
|
title: "删除举报记录", |
|
|
|
|
|
content: `确认删除举报记录 #${row.id}?`, |
|
|
|
|
|
onOk: () => { |
|
|
|
|
|
ieReportDelete(row.id).then(() => { |
|
|
|
|
|
this.$Message.success("删除成功") |
|
|
|
|
|
this.getIeReports() |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
reasonText(type) { |
|
|
|
|
|
const map = { harassment: "骚扰不适", abuse: "攻击辱骂", fraud: "疑似欺诈", other: "其他问题" } |
|
|
|
|
|
return map[type] || "安全反馈" |
|
|
|
|
|
}, |
|
|
|
|
|
statusText(status) { |
|
|
|
|
|
if (status === 1) return "已处理" |
|
|
|
|
|
if (status === 2) return "已驳回" |
|
|
|
|
|
return "待处理" |
|
|
|
|
|
}, |
|
|
|
|
|
statusColor(status) { |
|
|
|
|
|
if (status === 1) return "green" |
|
|
|
|
|
if (status === 2) return "default" |
|
|
|
|
|
return "orange" |
|
|
|
|
|
}, |
|
|
getMonth() { |
|
|
getMonth() { |
|
|
let date = new Date() |
|
|
let date = new Date() |
|
|
let year = date.getFullYear().toString() //'年' |
|
|
let year = date.getFullYear().toString() //'年' |
|
|
|