wangfukang 6 days ago
parent
commit
6a17107dde
  1. 3
      src/api/app.js
  2. 1
      src/api/fishMarket.js
  3. 40
      src/views/app/bill/current/current.vue
  4. 44
      src/views/app/bill/historical/historical.vue
  5. 44
      src/views/app/bill/success/success.vue
  6. 138
      src/views/app/business/expressCompany/expressCompany.vue
  7. 267
      src/views/app/data-statistics/data-statistics.vue
  8. 98
      src/views/app/shop/dictManage.vue

3
src/api/app.js

@ -199,6 +199,9 @@ export const getBillDateSummaryList = (params) => {
export const getBillDetailList = (params) => { export const getBillDetailList = (params) => {
return postBodyRequest('/mall/admin/settlement/detailList', params) return postBodyRequest('/mall/admin/settlement/detailList', params)
} }
export const getDataStatisticsSummary = (params) => {
return postBodyRequest('/mall/admin/dataStatistics/summary', params)
}
export const settlementConfirm = (params) => { export const settlementConfirm = (params) => {
return postBodyRequest('/mall/admin/settlement/confirmByShop', params) return postBodyRequest('/mall/admin/settlement/confirmByShop', params)
} }

1
src/api/fishMarket.js

@ -15,6 +15,7 @@ export const fishCategoryStatus = (params) => postBodyRequest(`${PREFIX}/categor
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 fishComplaintUnblock = (params) => postBodyRequest(`${PREFIX}/complaints/unblock`, params);
export const fishCommentDelete = (id) => postBodyRequest(`${PREFIX}/comments/${id}/delete`, {}); 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);

40
src/views/app/bill/current/current.vue

@ -34,6 +34,11 @@
</Row> </Row>
<Modal title="商家结算明细" v-model="detailVisible" :mask-closable="false" :width="1500"> <Modal title="商家结算明细" v-model="detailVisible" :mask-closable="false" :width="1500">
<Table :loading="detailLoading" border :columns="detailColumns" :data="detailData"></Table> <Table :loading="detailLoading" border :columns="detailColumns" :data="detailData"></Table>
<Row type="flex" justify="end" class="page">
<Page :current="detailSearchForm.pageNumber" :total="detailTotal" :page-size="detailSearchForm.pageSize"
@on-change="changeDetailPage" @on-page-size-change="changeDetailPageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page>
</Row>
<div slot="footer"> <div slot="footer">
<Button type="text" @click="detailVisible = false">关闭</Button> <Button type="text" @click="detailVisible = false">关闭</Button>
</div> </div>
@ -196,6 +201,15 @@
data: [], data: [],
detailData: [], detailData: [],
total: 0, total: 0,
detailTotal: 0,
detailSearchForm: {
regionId: "",
settlementDate: "",
shopId: "",
status: 0,
pageNumber: 1,
pageSize: 10
},
Visiable: false, Visiable: false,
detailVisible: false, detailVisible: false,
orderDetailVisible: false, orderDetailVisible: false,
@ -299,21 +313,37 @@
}, },
stationBinding(row) { stationBinding(row) {
this.detailVisible = true this.detailVisible = true
this.detailLoading = true this.detailSearchForm = {
getBillDetailList({
regionId: this.searchForm.regionId, regionId: this.searchForm.regionId,
settlementDate: this.searchForm.settlementDate, settlementDate: this.searchForm.settlementDate,
shopId: row.shopId, shopId: row.shopId,
status: 0 status: 0,
}).then((res) => { pageNumber: 1,
pageSize: this.detailSearchForm.pageSize
}
this.getDetailList()
},
getDetailList() {
this.detailLoading = true
getBillDetailList(this.detailSearchForm).then((res) => {
this.detailLoading = false this.detailLoading = false
if (res.success) { if (res.success) {
this.detailData = res.result || [] this.detailData = (res.result && res.result.records) || res.result || []
this.detailTotal = (res.result && res.result.total) || this.detailData.length
} }
}).catch(() => { }).catch(() => {
this.detailLoading = false this.detailLoading = false
}) })
}, },
changeDetailPage(v) {
this.detailSearchForm.pageNumber = v
this.getDetailList()
},
changeDetailPageSize(v) {
this.detailSearchForm.pageNumber = 1
this.detailSearchForm.pageSize = v
this.getDetailList()
},
closeOrderDetail(){ closeOrderDetail(){
this.orderDetailVisible = false; this.orderDetailVisible = false;
}, },

44
src/views/app/bill/historical/historical.vue

@ -46,6 +46,11 @@
<Modal title="结算记录明细" v-model="detailVisible" :mask-closable="false" :width="1500"> <Modal title="结算记录明细" v-model="detailVisible" :mask-closable="false" :width="1500">
<Table :loading="detailLoading" border :columns="detailColumns" :data="detailData"></Table> <Table :loading="detailLoading" border :columns="detailColumns" :data="detailData"></Table>
<Row type="flex" justify="end" class="page">
<Page :current="detailSearchForm.pageNumber" :total="detailTotal" :page-size="detailSearchForm.pageSize"
@on-change="changeDetailPage" @on-page-size-change="changeDetailPageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page>
</Row>
<div slot="footer"> <div slot="footer">
<Button type="text" @click="detailVisible = false">关闭</Button> <Button type="text" @click="detailVisible = false">关闭</Button>
</div> </div>
@ -157,7 +162,16 @@
shopData: [], shopData: [],
detailData: [], detailData: [],
total: 0, total: 0,
shopTotal: 0 shopTotal: 0,
detailTotal: 0,
detailSearchForm: {
regionId: "",
settlementDate: "",
shopId: "",
status: 0,
pageNumber: 1,
pageSize: 10
}
}; };
}, },
methods: { methods: {
@ -232,17 +246,35 @@
}, },
openDetail(row) { openDetail(row) {
this.detailVisible = true; this.detailVisible = true;
this.detailLoading = true; this.detailSearchForm = {
getBillDetailList({
regionId: this.searchForm.regionId, regionId: this.searchForm.regionId,
settlementDate: this.currentDate, settlementDate: this.currentDate,
shopId: row.shopId, shopId: row.shopId,
status: 0 status: 0,
}).then(res => { pageNumber: 1,
pageSize: this.detailSearchForm.pageSize
};
this.getDetailList();
},
getDetailList() {
this.detailLoading = true;
getBillDetailList(this.detailSearchForm).then(res => {
this.detailLoading = false; this.detailLoading = false;
if (res.success) this.detailData = res.result || []; if (res.success) {
this.detailData = (res.result && res.result.records) || res.result || [];
this.detailTotal = (res.result && res.result.total) || this.detailData.length;
}
}).catch(() => this.detailLoading = false); }).catch(() => this.detailLoading = false);
}, },
changeDetailPage(v) {
this.detailSearchForm.pageNumber = v;
this.getDetailList();
},
changeDetailPageSize(v) {
this.detailSearchForm.pageNumber = 1;
this.detailSearchForm.pageSize = v;
this.getDetailList();
},
settleSelected() { settleSelected() {
if (this.settlementLoading) return; if (this.settlementLoading) return;
if (this.selectList.length === 0) { if (this.selectList.length === 0) {

44
src/views/app/bill/success/success.vue

@ -43,6 +43,11 @@
<Modal title="已结算记录明细" v-model="detailVisible" :mask-closable="false" :width="1500"> <Modal title="已结算记录明细" v-model="detailVisible" :mask-closable="false" :width="1500">
<Table :loading="detailLoading" border :columns="detailColumns" :data="detailData"></Table> <Table :loading="detailLoading" border :columns="detailColumns" :data="detailData"></Table>
<Row type="flex" justify="end" class="page">
<Page :current="detailSearchForm.pageNumber" :total="detailTotal" :page-size="detailSearchForm.pageSize"
@on-change="changeDetailPage" @on-page-size-change="changeDetailPageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page>
</Row>
<div slot="footer"> <div slot="footer">
<Button type="text" @click="detailVisible = false">关闭</Button> <Button type="text" @click="detailVisible = false">关闭</Button>
</div> </div>
@ -151,7 +156,16 @@
shopData: [], shopData: [],
detailData: [], detailData: [],
total: 0, total: 0,
shopTotal: 0 shopTotal: 0,
detailTotal: 0,
detailSearchForm: {
regionId: "",
settlementDate: "",
shopId: "",
status: 1,
pageNumber: 1,
pageSize: 10
}
}; };
}, },
methods: { methods: {
@ -225,17 +239,35 @@
}, },
openDetail(row) { openDetail(row) {
this.detailVisible = true; this.detailVisible = true;
this.detailLoading = true; this.detailSearchForm = {
getBillDetailList({
regionId: this.searchForm.regionId, regionId: this.searchForm.regionId,
settlementDate: this.currentDate, settlementDate: this.currentDate,
shopId: row.shopId, shopId: row.shopId,
status: 1 status: 1,
}).then(res => { pageNumber: 1,
pageSize: this.detailSearchForm.pageSize
};
this.getDetailList();
},
getDetailList() {
this.detailLoading = true;
getBillDetailList(this.detailSearchForm).then(res => {
this.detailLoading = false; this.detailLoading = false;
if (res.success) this.detailData = res.result || []; if (res.success) {
this.detailData = (res.result && res.result.records) || res.result || [];
this.detailTotal = (res.result && res.result.total) || this.detailData.length;
}
}).catch(() => this.detailLoading = false); }).catch(() => this.detailLoading = false);
}, },
changeDetailPage(v) {
this.detailSearchForm.pageNumber = v;
this.getDetailList();
},
changeDetailPageSize(v) {
this.detailSearchForm.pageNumber = 1;
this.detailSearchForm.pageSize = v;
this.getDetailList();
},
closeOrderDetail(){ closeOrderDetail(){
this.orderDetailVisible = false; this.orderDetailVisible = false;
}, },

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

@ -18,7 +18,7 @@
<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>
<Option :value="1">通过</Option> <Option :value="1">已处理</Option>
<Option :value="2">拒绝</Option> <Option :value="2">拒绝</Option>
</Select> </Select>
</FormItem> </FormItem>
@ -77,7 +77,7 @@
<FormItem label="状态"> <FormItem label="状态">
<Select v-model="complaintQuery.status" clearable style="width: 130px"> <Select v-model="complaintQuery.status" clearable style="width: 130px">
<Option :value="0">待处理</Option> <Option :value="0">待处理</Option>
<Option :value="1">通过</Option> <Option :value="1">已处理</Option>
<Option :value="2">驳回</Option> <Option :value="2">驳回</Option>
</Select> </Select>
</FormItem> </FormItem>
@ -195,6 +195,39 @@
</div> </div>
<div v-else style="text-align: center; color: #999;">暂无商品详情</div> <div v-else style="text-align: center; color: #999;">暂无商品详情</div>
</Modal> </Modal>
<Modal v-model="complaintHandleModal" title="处理举报" width="560" :mask-closable="false">
<Form ref="complaintHandleForm" :model="complaintHandleForm" :rules="complaintHandleRules" :label-width="90">
<Alert type="warning" show-icon>
处理意见会提示给被封禁人请填写清晰规范的处理说明
</Alert>
<FormItem label="处理意见" prop="reason">
<Input
v-model="complaintHandleForm.reason"
type="textarea"
:rows="4"
maxlength="200"
show-word-limit
placeholder="请输入处理意见,确认后将封禁卖家账号"
/>
</FormItem>
<FormItem label="快捷填充">
<Button
v-for="item in complaintReasonPresets"
:key="item"
size="small"
style="margin: 0 8px 8px 0;"
@click="fillComplaintReason(item)"
>
{{ item }}
</Button>
</FormItem>
</Form>
<div slot="footer">
<Button @click="complaintHandleModal = false">取消</Button>
<Button type="primary" :loading="complaintHandleLoading" @click="submitComplaintHandle">确认处理</Button>
</div>
</Modal>
</div> </div>
</template> </template>
@ -209,6 +242,7 @@ import {
fishCategoryStatus, fishCategoryStatus,
fishComplaintPage, fishComplaintPage,
fishComplaintHandle, fishComplaintHandle,
fishComplaintUnblock,
fishCommentDelete, fishCommentDelete,
fishUserLimitPage, fishUserLimitPage,
fishUserLimitSave, fishUserLimitSave,
@ -233,8 +267,24 @@ export default {
categoryModal: false, categoryModal: false,
userLimitModal: false, userLimitModal: false,
goodsDetailModal: false, goodsDetailModal: false,
complaintHandleModal: false,
complaintHandleLoading: false,
categoryForm: {}, categoryForm: {},
userLimitForm: {}, userLimitForm: {},
complaintHandleRow: {},
complaintHandleForm: { reason: "" },
complaintHandleRules: {
reason: [
{ required: true, message: "处理意见不能为空", trigger: "blur" },
{ type: "string", min: 1, message: "处理意见不能为空", trigger: "blur", transform: value => (value || "").trim() }
]
},
complaintReasonPresets: [
"举报属实,内容违反平台规范,已对相关账号进行封禁处理。",
"举报属实,商品信息存在违规内容,已封禁发布账号并限制发布。",
"举报属实,相关聊天内容违规,已对账号进行封禁及禁言处理。",
"多次违规发布不当内容,已按平台规则进行封禁处理。"
],
goodsDetail: {}, goodsDetail: {},
detailGoodsId: "", detailGoodsId: "",
detailCommentList: [], detailCommentList: [],
@ -257,7 +307,7 @@ export default {
{ title: "操作", width: 250, fixed: "right", render: (h, p) => { { title: "操作", width: 250, fixed: "right", render: (h, p) => {
if (p.row.status == 3) return h("span", ""); if (p.row.status == 3) return h("span", "");
return h("div", [ return h("div", [
/* h("Button", { props: { type: "success", size: "small" }, style: { marginRight: "6px" }, on: { click: () => this.handleGoods(p.row, 1, "审核通过") } }, "通过"), */ /* 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: "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, "恢复上架") } }, "恢复")
@ -292,11 +342,23 @@ export default {
return h("a", { on: { click: () => this.viewGoodsDetail(p.row) } }, title); return h("a", { on: { click: () => this.viewGoodsDetail(p.row) } }, title);
} }, } },
{ title: "举报人", key: "reporterName", width: 130 }, { title: "举报人", key: "reporterName", width: 130 },
{ title: "卖家账号", key: "sellerAccount", minWidth: 150 }, { title: "被举报账号", key: "sellerAccount", minWidth: 150 },
{ title: "原因", key: "reason", minWidth: 220 }, { title: "原因", key: "reason", minWidth: 220 },
{ 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: "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: 100, fixed: "right", render: (h, p) => h("Button", { props: { type: "primary", size: "small" }, on: { click: () => this.handleComplaint(p.row) } }, "处理") } { title: "操作", width: 110, fixed: "right", render: (h, p) => {
if (p.row.status == 1) {
return h("Button", {
props: { type: "warning", size: "small" },
on: { click: () => this.unblockComplaintUser(p.row) }
}, "解除封禁");
}
if (p.row.status != 0) return h("span", "-");
return h("Button", {
props: { type: "primary", size: "small" },
on: { click: () => this.handleComplaint(p.row) }
}, "处理");
} }
], ],
auditLogColumns: [ auditLogColumns: [
{ title: "ID", key: "id", width: 80 }, { title: "ID", key: "id", width: 80 },
@ -403,7 +465,7 @@ export default {
return Number(data.total || data.totalElements) || 0; return Number(data.total || data.totalElements) || 0;
}, },
auditText(status) { auditText(status) {
return status == 1 ? "通过" : (status == 2 ? "拒绝" : "待审"); return status == 1 ? "已处理" : (status == 2 ? "拒绝" : "待审");
}, },
auditColor(status) { auditColor(status) {
return status == 1 ? "green" : (status == 2 ? "red" : "orange"); return status == 1 ? "green" : (status == 2 ? "red" : "orange");
@ -419,7 +481,7 @@ export default {
return "green"; return "green";
}, },
complaintStatusText(status) { complaintStatusText(status) {
return status == 1 ? "通过" : (status == 2 ? "驳回" : "待处理"); return status == 1 ? "已处理" : (status == 2 ? "驳回" : "待处理");
}, },
complaintTypeText(type) { complaintTypeText(type) {
const map = { const map = {
@ -555,26 +617,56 @@ export default {
}); });
}, },
handleComplaint(row) { handleComplaint(row) {
this.actionReason = ""; this.complaintHandleRow = row;
this.complaintHandleForm = { reason: "" };
this.complaintHandleModal = true;
this.$nextTick(() => {
if (this.$refs.complaintHandleForm) {
this.$refs.complaintHandleForm.resetFields();
}
});
},
fillComplaintReason(reason) {
this.complaintHandleForm.reason = reason;
this.$nextTick(() => {
if (this.$refs.complaintHandleForm) {
this.$refs.complaintHandleForm.validateField("reason");
}
});
},
submitComplaintHandle() {
this.$refs.complaintHandleForm.validate(valid => {
if (!valid) return;
const reason = (this.complaintHandleForm.reason || "").trim();
this.complaintHandleLoading = true;
fishComplaintHandle({
complaintId: this.complaintHandleRow.id,
status: 1,
blockUser: true,
muted: 1,
publishBanned: 1,
permanentBanned: 1,
reason,
handleResult: reason
}).then(() => {
this.$Message.success("处理成功");
this.complaintHandleModal = false;
this.loadComplaints();
}).finally(() => {
this.complaintHandleLoading = false;
});
});
},
unblockComplaintUser(row) {
this.$Modal.confirm({ this.$Modal.confirm({
title: "处理举报", title: "解除封禁",
render: (h) => h("Input", { content: `确认解除被举报账号“${row.sellerAccount || "-"}”的封禁限制吗?`,
props: { type: "textarea", autofocus: true, rows: 4, placeholder: "请输入处理意见,确认后将封禁卖家账号" },
on: { input: val => this.actionReason = val }
}),
onOk: () => { onOk: () => {
const reason = this.actionReason || "举报成立,封禁卖家账号"; fishComplaintUnblock({
fishComplaintHandle({
complaintId: row.id, complaintId: row.id,
status: 1, reason: "后台解除举报封禁"
blockUser: true,
muted: 1,
publishBanned: 1,
permanentBanned: 1,
reason,
handleResult: reason
}).then(() => { }).then(() => {
this.$Message.success("处理成功"); this.$Message.success("解除封禁成功");
this.loadComplaints(); this.loadComplaints();
}); });
} }

267
src/views/app/data-statistics/data-statistics.vue

@ -5,20 +5,18 @@
<div class="search"> <div class="search">
<Card> <Card>
<Tabs v-model="tabName" :animated="false" @on-click="changeOrderTab"> <Tabs v-model="tabName" :animated="false" @on-click="changeOrderTab">
<TabPane label="拼团单" name="0"></TabPane> <TabPane label="数据统计" name="0"></TabPane>
<TabPane label="外卖单" name="1"></TabPane>
<TabPane label="跑腿单" name="2"></TabPane>
<TabPane :label="renderIeReportTabLabel" name="3"></TabPane> <TabPane :label="renderIeReportTabLabel" name="3"></TabPane>
<TabPane label="i/e违规内容" name="4"></TabPane> <TabPane label="i/e违规内容" name="4"></TabPane>
</Tabs> </Tabs>
<Row v-if="tabName !== '3' && tabName !== '4'" @keydown.enter.native="handleSearch"> <Row v-if="tabName !== '3' && tabName !== '4'" @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70"> <Form style="margin-left: -75px" ref="searchForm" :model="searchForm" inline :label-width="70">
<FormItem> <FormItem>
<Row> <Row>
<Button>昨日</Button> <Button @click="setQuickRange('yesterday')">昨日</Button>
<Button>今日</Button> <Button @click="setQuickRange('today')">今日</Button>
<Button>7</Button> <Button @click="setQuickRange('7')">7</Button>
<Button>30</Button> <Button @click="setQuickRange('30')">30</Button>
</Row> </Row>
</FormItem> </FormItem>
<FormItem> <FormItem>
@ -55,6 +53,9 @@
</Row> </Row>
</Card> </Card>
<Card v-if="tabName !== '3' && tabName !== '4'"> <Card v-if="tabName !== '3' && tabName !== '4'">
<Alert show-icon style="margin-bottom: 16px;">
统计口径订单按支付时间退款/售后按成功时间抽奖按开奖时间流水和配送费已扣微信0.6%手续费内容审核按每100次0.05元向上取整
</Alert>
<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>
@ -65,7 +66,7 @@
<Icon type="ios-briefcase" color="#fff" size="40" /> <Icon type="ios-briefcase" color="#fff" size="40" />
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.orderCount }}</div>
<div>订单数量</div> <div>订单数量</div>
</div> </div>
</div> </div>
@ -76,7 +77,7 @@
<Icon type="logo-buffer" color="#fff" size="40" /> <Icon type="logo-buffer" color="#fff" size="40" />
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.grossFlowAmount }}</div>
<div>流水总金额</div> <div>流水总金额</div>
</div> </div>
</div> </div>
@ -87,8 +88,8 @@
<Icon type="logo-yen" color="#fff" size="40"/> <Icon type="logo-yen" color="#fff" size="40"/>
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.effectiveFlowAmount }}</div>
<div>支付总金额</div> <div>有效流水总金额</div>
</div> </div>
</div> </div>
</Col> </Col>
@ -98,8 +99,8 @@
<Icon type="md-bookmarks" color="#fff" size="40" /> <Icon type="md-bookmarks" color="#fff" size="40" />
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.koiDiscountAmount }}</div>
<div>活动总优惠</div> <div>锦鲤总优惠</div>
</div> </div>
</div> </div>
</Col> </Col>
@ -112,30 +113,19 @@
<Icon type="md-alarm" color="#fff" size="40" /> <Icon type="md-alarm" color="#fff" size="40" />
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.onTimeRate }}</div>
<div>配送总准时率%</div> <div>配送总准时率%</div>
</div> </div>
</div> </div>
</Col> </Col>
<Col span="6">
<div style="display:flex;">
<div style="width:50px;height:50px;background:#32CD32;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="logo-yen" color="#fff" size="40"/>
</div>
<div>
<div style="font-weight:700;font-size:22px;">100</div>
<div>优惠券优惠总金额</div>
</div>
</div>
</Col>
<Col span="6"> <Col span="6">
<div style="display:flex;"> <div style="display:flex;">
<div style="width:50px;height:50px;background:#32CD32;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;"> <div style="width:50px;height:50px;background:#32CD32;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="ios-book" color="#fff" size="40" /> <Icon type="ios-book" color="#fff" size="40" />
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.refundAmount }}</div>
<div>配送费总金额</div> <div>退款总金额</div>
</div> </div>
</div> </div>
</Col> </Col>
@ -145,26 +135,24 @@
<Icon type="md-bookmarks" color="#fff" size="40" /> <Icon type="md-bookmarks" color="#fff" size="40" />
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.afterSaleAmount }}</div>
<div>配送费实际支付总金额</div> <div>售后总金额</div>
</div> </div>
</div> </div>
</Col> </Col>
</Row>
<div style="width:100%;height: 20px;"></div>
<Row :gutter="16">
<Col span="6"> <Col span="6">
<div style="display:flex;"> <div style="display:flex;">
<div style="width:50px;height:50px;background:#32CD32;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;"> <div style="width:50px;height:50px;background:#32CD32;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="logo-yen" color="#fff" size="40"/> <Icon type="logo-yen" color="#fff" size="40"/>
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.couponDiscountAmount }}</div>
<div>返佣补贴金额</div> <div>优惠券优惠总金额</div>
</div> </div>
</div> </div>
</Col> </Col>
</Row> </Row>
<div style="width:100%;height: 20px;"></div>
<div style="border-left: 5px solid rgb(70, 130, 180);height: 20px;line-height: 20px;font-size: 18px;font-weight: 700;margin: 20px 0;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: 20px 0;padding-left: 7px;">
平台数据 平台数据
</div> </div>
@ -172,69 +160,58 @@
<Col span="6"> <Col span="6">
<div style="display:flex;"> <div style="display:flex;">
<div style="width:50px;height:50px;background:#87CEFA;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;"> <div style="width:50px;height:50px;background:#87CEFA;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="ios-briefcase" color="#fff" size="40" /> <Icon type="logo-yen" color="#fff" size="40"/>
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.customerAverageAmount }}</div>
<div>平台营收</div> <div>客单价</div>
</div> </div>
</div> </div>
</Col> </Col>
<Col span="6"> <Col span="6">
<div style="display:flex;"> <div style="display:flex;">
<div style="width:50px;height:50px;background:#87CEFA;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;"> <div style="width:50px;height:50px;background:#87CEFA;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="logo-buffer" color="#fff" size="40" /> <Icon type="md-bookmarks" color="#fff" size="40" />
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.actualIncomeAmount }}</div>
<div>平台补贴总金额</div> <div>实际所得</div>
</div> </div>
</div> </div>
</Col> </Col>
<Col span="6"> <Col span="6">
<div style="display:flex;"> <div style="display:flex;">
<div style="width:50px;height:50px;background:#87CEFA;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;"> <div style="width:50px;height:50px;background:#87CEFA;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="logo-yen" color="#fff" size="40"/> <Icon type="md-alarm" color="#fff" size="40" />
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.headquartersDeductionAmount }}</div>
<div>客单价</div> <div>总部扣点</div>
</div> </div>
</div> </div>
</Col> </Col>
<Col span="6"> <Col span="6">
<div style="display:flex;"> <div style="display:flex;">
<div style="width:50px;height:50px;background:#87CEFA;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;"> <div style="width:50px;height:50px;background:#87CEFA;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="md-bookmarks" color="#fff" size="40" /> <Icon type="md-alarm" color="#fff" size="40" />
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.deliveryFeeAmount }}</div>
<div>平台抽成</div> <div>配送费总额</div>
</div> </div>
</div> </div>
</Col> </Col>
</Row> </Row>
<div style="width:100%;height: 20px;"></div> <div style="width:100%;height: 20px;"></div>
<Row :gutter="16"> <Row :gutter="16">
<Col span="6">
<div style="display:flex;">
<div style="width:50px;height:50px;background:#87CEFA;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="md-alarm" color="#fff" size="40" />
</div>
<div>
<div style="font-weight:700;font-size:22px;">100</div>
<div>平台优惠券补贴总金额</div>
</div>
</div>
</Col>
<Col span="6"> <Col span="6">
<div style="display:flex;"> <div style="display:flex;">
<div style="width:50px;height:50px;background:#87CEFA;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;"> <div style="width:50px;height:50px;background:#87CEFA;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="logo-yen" color="#fff" size="40"/> <Icon type="logo-yen" color="#fff" size="40"/>
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.smsCount }}</div>
<div>平台配送费</div> <div>短信总数</div>
</div> </div>
</div> </div>
</Col> </Col>
@ -244,108 +221,57 @@
<Icon type="ios-book" color="#fff" size="40" /> <Icon type="ios-book" color="#fff" size="40" />
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.contentAuditCount }}</div>
<div>平台实际配送费</div> <div>内容审核数</div>
</div> </div>
</div> </div>
</Col> </Col>
</Row>
<div style="border-left: 5px solid rgb(70, 130, 180);height: 20px;line-height: 20px;font-size: 18px;font-weight: 700;margin: 20px 0;padding-left: 7px;">
商家数据
</div>
<Row :gutter="16">
<Col span="6"> <Col span="6">
<div style="display:flex;"> <div style="display:flex;">
<div style="width:50px;height:50px;background:#FFA500;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;"> <div style="width:50px;height:50px;background:#87CEFA;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="ios-briefcase" color="#fff" size="40" /> <Icon type="ios-book" color="#fff" size="40" />
</div>
<div>
<div style="font-weight:700;font-size:22px;">100</div>
<div>外卖入驻商家数量</div>
</div>
</div>
</Col>
<Col span="6">
<div style="display:flex;">
<div style="width:50px;height:50px;background:#FFA500;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="logo-buffer" color="#fff" size="40" />
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.realNameAuthCount }}</div>
<div>产生订单商家数量</div> <div>实名认证数</div>
</div> </div>
</div> </div>
</Col> </Col>
<Col span="6"> <Col span="6">
<div style="display:flex;"> <div style="display:flex;">
<div style="width:50px;height:50px;background:#FFA500;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;"> <div style="width:50px;height:50px;background:#87CEFA;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="logo-yen" color="#fff" size="40"/> <Icon type="logo-yen" color="#fff" size="40"/>
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ rewardTotalAmount }}</div>
<div>外卖申请商家数量</div> <div>抽奖奖励排位奖励配送奖励</div>
</div>
</div>
</Col>
<Col span="6">
<div style="display:flex;">
<div style="width:50px;height:50px;background:#FFA500;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="md-bookmarks" color="#fff" size="40" />
</div>
<div>
<div style="font-weight:700;font-size:22px;">100</div>
<div>冻结商家数量</div>
</div> </div>
</div> </div>
</Col> </Col>
</Row> </Row>
<div style="width:100%;height: 20px;"></div> <div style="width:100%;height: 20px;"></div>
<div style="border-left: 5px solid rgb(70, 130, 180);height: 20px;line-height: 20px;font-size: 18px;font-weight: 700;margin: 20px 0;padding-left: 7px;">
商家数据
</div>
<Row :gutter="16"> <Row :gutter="16">
<Col span="6"> <Col span="6">
<div style="display:flex;"> <div style="display:flex;">
<div style="width:50px;height:50px;background:#FFA500;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;"> <div style="width:50px;height:50px;background:#FFA500;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="md-alarm" color="#fff" size="40" /> <Icon type="logo-buffer" color="#fff" size="40" />
</div>
<div>
<div style="font-weight:700;font-size:22px;">100</div>
<div>商家补贴总金额</div>
</div>
</div>
</Col>
<Col span="6">
<div style="display:flex;">
<div style="width:50px;height:50px;background:#FFA500;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="logo-yen" color="#fff" size="40"/>
</div>
<div>
<div style="font-weight:700;font-size:22px;">100</div>
<div>商家配送费</div>
</div>
</div>
</Col>
<Col span="6">
<div style="display:flex;">
<div style="width:50px;height:50px;background:#FFA500;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="ios-book" color="#fff" size="40" />
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.orderShopCount }}</div>
<div>商家实际配送费</div> <div>产生订单商家数量</div>
</div> </div>
</div> </div>
</Col> </Col>
</Row>
<div style="border-left: 5px solid rgb(70, 130, 180);height: 20px;line-height: 20px;font-size: 18px;font-weight: 700;margin: 20px 0;padding-left: 7px;">
用户数据
</div>
<Row :gutter="16">
<Col span="6"> <Col span="6">
<div style="display:flex;"> <div style="display:flex;">
<div style="width:50px;height:50px;background:#6495ED;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;"> <div style="width:50px;height:50px;background:#6495ED;border-radius:5px;text-align:center;padding-top:5px;margin-right:10px;">
<Icon type="ios-briefcase" color="#fff" size="40" /> <Icon type="ios-briefcase" color="#fff" size="40" />
</div> </div>
<div> <div>
<div style="font-weight:700;font-size:22px;">100</div> <div style="font-weight:700;font-size:22px;">{{ statistics.orderUserCount }}</div>
<div>产生订单用户数</div> <div>产生订单用户数</div>
</div> </div>
</div> </div>
@ -406,7 +332,7 @@
getDictDataByType, getDictDataByType,
} from "@/api/index"; } from "@/api/index";
import { import {
getLogiticsCompanyData, getDataStatisticsSummary,
} from "@/api/app"; } from "@/api/app";
import { import {
ieReportPage, ieReportPage,
@ -420,6 +346,14 @@
data() { data() {
return { return {
tabName: "0", tabName: "0",
selectDate: [],
statisticsLoading: false,
statistics: this.defaultStatistics(),
options: {
disabledDate(date) {
return date && date.valueOf() > Date.now()
}
},
ieReportLoading: false, ieReportLoading: false,
ieReportList: [], ieReportList: [],
ieReportTotal: 0, ieReportTotal: 0,
@ -518,6 +452,12 @@
computed: { computed: {
ieMessageModalTitle() { ieMessageModalTitle() {
return this.ieMessageSearch.roomId ? `房间聊天记录 #${this.ieMessageSearch.roomId}` : "房间聊天记录" return this.ieMessageSearch.roomId ? `房间聊天记录 #${this.ieMessageSearch.roomId}` : "房间聊天记录"
},
rewardTotalAmount() {
const total = this.toNumber(this.statistics.collegeRankRewardAmount) +
this.toNumber(this.statistics.drawPoolAmount) +
this.toNumber(this.statistics.deliveryRankRewardAmount)
return total.toFixed(2)
} }
}, },
mounted() { mounted() {
@ -525,9 +465,39 @@
this.selectDate = [dayTime, dayTime] this.selectDate = [dayTime, dayTime]
this.searchForm.startDate = dayTime this.searchForm.startDate = dayTime
this.searchForm.endDate = dayTime this.searchForm.endDate = dayTime
this.searchForm.regionId = this.resolveRegionId()
this.getDataList()
this.getIeReportPendingCount() this.getIeReportPendingCount()
}, },
methods: { methods: {
defaultStatistics() {
return {
orderCount: 0,
grossFlowAmount: "0.00",
effectiveFlowAmount: "0.00",
koiDiscountAmount: "0.00",
onTimeRate: "0.00",
refundAmount: "0.00",
afterSaleAmount: "0.00",
couponDiscountAmount: "0.00",
customerAverageAmount: "0.00",
actualIncomeAmount: "0.00",
headquartersDeductionAmount: "0.00",
deliveryFeeAmount: "0.00",
smsCount: 0,
contentAuditCount: 0,
realNameAuthCount: 0,
collegeRankRewardAmount: "0.00",
drawPoolAmount: "0.00",
deliveryRankRewardAmount: "0.00",
orderShopCount: 0,
orderUserCount: 0
}
},
toNumber(value) {
const num = Number(value)
return Number.isNaN(num) ? 0 : num
},
resolveRegionId() { resolveRegionId() {
try { try {
const user = this.getStore("user") const user = this.getStore("user")
@ -756,9 +726,46 @@
let single = year + '-' + month + '-' + da // let single = year + '-' + month + '-' + da //
return single return single
}, },
formatDate(date) {
let year = date.getFullYear().toString()
let month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : (date.getMonth() + 1).toString()
let day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate().toString()
return `${year}-${month}-${day}`
},
setQuickRange(type) {
const today = new Date()
let start = new Date(today)
let end = new Date(today)
if (type === 'yesterday') {
start.setDate(today.getDate() - 1)
end.setDate(today.getDate() - 1)
} else if (type === '7') {
start.setDate(today.getDate() - 6)
} else if (type === '30') {
start.setDate(today.getDate() - 29)
}
this.selectDate = [this.formatDate(start), this.formatDate(end)]
this.searchForm.startDate = this.selectDate[0]
this.searchForm.endDate = this.selectDate[1]
this.getDataList()
},
selectDateRange(v) {
this.searchForm.startDate = v && v[0] ? v[0] : ""
this.searchForm.endDate = v && v[1] ? v[1] : ""
},
getDataList() {
this.statisticsLoading = true
const params = Object.assign({}, this.searchForm, {
regionId: this.resolveRegionId()
})
getDataStatisticsSummary(params).then(res => {
const data = res.result || res || {}
this.statistics = Object.assign(this.defaultStatistics(), data)
}).finally(() => {
this.statisticsLoading = false
})
},
handleSearch() { handleSearch() {
this.searchForm.pageNum = 1;
this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
} }
} }

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

@ -51,6 +51,53 @@
background: #60F3FF; background: #60F3FF;
color: #fff !important; color: #fff !important;
} }
.goods-attribute-list {
display: flex;
flex-direction: column;
}
.goods-attribute-row {
display: flex;
align-items: flex-start;
margin-bottom: 8px;
padding: 8px;
line-height: 30px;
background: #f8f8f9;
border: 1px solid #e8eaec;
border-radius: 4px;
}
.goods-attribute-name {
flex: 0 0 auto;
margin-right: 8px;
font-weight: bold;
color: #515a6e;
}
.goods-attribute-values {
display: flex;
flex: 1;
flex-wrap: wrap;
min-width: 0;
}
.goods-attribute-value {
margin: 0 6px 6px 0;
padding: 0 8px;
line-height: 24px;
background: #fff;
border: 1px solid #dcdee2;
border-radius: 12px;
color: #515a6e;
white-space: nowrap;
}
.goods-attribute-canbuy {
display: flex;
align-items: center;
flex: 0 0 auto;
margin-right: 12px;
color: #888;
}
.goods-attribute-canbuy .ivu-input-wrapper {
width: 60px;
margin-left: 4px;
}
</style> </style>
<template> <template>
<div class="search"> <div class="search">
@ -167,8 +214,10 @@
</FormItem> </FormItem>
</Col> </Col>
<Col span="6"> <Col span="6">
<FormItem label="店铺分类" class="form-noheight"> <FormItem label="商品分类" prop="categoryId">
<Input v-model="editTitle" disabled /> <Select v-model="addGoodsForm.categoryId" filterable placeholder="请选择商品分类" @on-change="selectGoodsCategory">
<Option v-for="item in goodsCategoryOptions" :value="item.id" :key="item.id">{{ item.categoryName || item.title }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col span="6"> <Col span="6">
@ -205,16 +254,20 @@
<Input v-model="addGoodsForm.lunchBox" type="number" :min="0" :max="10" :disabled="addGoodsForm.isMoreBuy == 1" 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="24">
<FormItem label="商品属性" class="form-noheight"> <FormItem label="商品属性" class="form-noheight">
<div style="display: flex;flex-direction: column;"> <div class="goods-attribute-list">
<div v-for="(value,key) in Array.from(addGoodsForm.attributeList1)" style="display: flex;align-items:center;margin-bottom:5px;"> <div v-for="(value,key) in Array.from(addGoodsForm.attributeList1)" :key="key" class="goods-attribute-row">
{{value[0]}}: <div class="goods-attribute-canbuy">
<div v-for="(item,index) in value[1].title"> <span>可选:</span>
{{item}} <Input v-model="value[1].canbuy" type="number" placeholder="1" @on-change="onCanbuyChange(value[0], value[1].canbuy)" />
</div>
<span class="goods-attribute-name">{{value[0]}}:</span>
<div class="goods-attribute-values">
<span v-for="(item,index) in value[1].title" :key="index" class="goods-attribute-value">
{{item}}
</span>
</div> </div>
<span style="margin-left:8px;color:#888;">可选:</span>
<Input v-model="value[1].canbuy" type="number" style="width:60px;margin-left:4px;" placeholder="1" @on-change="onCanbuyChange(value[0], value[1].canbuy)" />
</div> </div>
<div @click="checkSpec('shuxing')" style="width: 80px;height: 30px;text-align: center;line-height: 30px;background: #008ba0;color:#fff;"> <div @click="checkSpec('shuxing')" style="width: 80px;height: 30px;text-align: center;line-height: 30px;background: #008ba0;color:#fff;">
选择属性 选择属性
@ -419,6 +472,11 @@
}, },
formValidate: { formValidate: {
// //
categoryId: [{
required: true,
message: "请选择商品分类",
trigger: "change"
}],
productName: [{ productName: [{
required: true, required: true,
message: "请输入名称", message: "请输入名称",
@ -650,6 +708,11 @@
screenWidth: 0, screenWidth: 0,
}; };
}, },
computed: {
goodsCategoryOptions() {
return this.treeData.filter(item => item.id !== "tuijian" && item.id !== "bidian");
}
},
methods: { methods: {
isIntegerInRange(value, min, max) { isIntegerInRange(value, min, max) {
if (value === "" || value === null || value === undefined) return false; if (value === "" || value === null || value === undefined) return false;
@ -687,6 +750,10 @@
this.$Message.warning("起售数量需为1-10的整数"); this.$Message.warning("起售数量需为1-10的整数");
return false; return false;
} }
if (!this.addGoodsForm.categoryId) {
this.$Message.warning("请选择商品分类");
return false;
}
for (let i = 0; i < this.addGoodsForm.attributeListPrice.length; i++) { for (let i = 0; i < this.addGoodsForm.attributeListPrice.length; i++) {
if (!this.isDecimalInRange(this.addGoodsForm.attributeListPrice[i].specPrice, 0.1, 9999)) { if (!this.isDecimalInRange(this.addGoodsForm.attributeListPrice[i].specPrice, 0.1, 9999)) {
this.$Message.warning(`${i + 1}个商品规格价格需为0.1-9999,最多2位小数`); this.$Message.warning(`${i + 1}个商品规格价格需为0.1-9999,最多2位小数`);
@ -705,8 +772,18 @@
} }
} }
this.addGoodsForm.productName = productName; this.addGoodsForm.productName = productName;
this.setGoodsCategoryName(this.addGoodsForm.categoryId);
return true; return true;
}, },
selectGoodsCategory(categoryId) {
this.setGoodsCategoryName(categoryId);
},
setGoodsCategoryName(categoryId) {
const category = this.goodsCategoryOptions.find(item => item.id == categoryId);
if (category) {
this.addGoodsForm.categoryName = category.categoryName || category.title;
}
},
validateSpecPrice(index) { validateSpecPrice(index) {
const item = this.addGoodsForm.attributeListPrice[index]; const item = this.addGoodsForm.attributeListPrice[index];
if (item && item.specPrice !== "" && !this.isDecimalInRange(item.specPrice, 0.1, 9999)) { if (item && item.specPrice !== "" && !this.isDecimalInRange(item.specPrice, 0.1, 9999)) {
@ -1294,6 +1371,7 @@
this.specValueArr = this.addGoodsForm.attributeListPrice this.specValueArr = this.addGoodsForm.attributeListPrice
this.addGoodsForm.sellTime = this.addGoodsForm.sellBeginTime != '' ? 1 : 0 this.addGoodsForm.sellTime = this.addGoodsForm.sellBeginTime != '' ? 1 : 0
this.setGoodsCategoryName(this.addGoodsForm.categoryId)
this.modalVisible = true; this.modalVisible = true;
}, },
handelSubmit() { handelSubmit() {

Loading…
Cancel
Save