This commit is contained in:
余同学 2024-12-16 21:00:34 +08:00
parent 073c500424
commit 28cbcff6db
15 changed files with 2476 additions and 44 deletions

View File

@ -57,7 +57,7 @@
"mockjs": "^1.1.0",
"nprogress": "0.2.0",
"obj-modal": "^1.2.2",
"obj-table-plus": "^2.4.0",
"obj-table-plus": "^2.5.0",
"qrcodejs2": "^0.0.2",
"qs": "^6.13.0",
"quill": "1.3.7",

View File

@ -212,4 +212,52 @@ export const mer_admin = {
params: data,
});
},
// 轮播图分页
bannerPage: (data) => {
return $http.request({
method: "get",
url: `/admin-api/banner/page`,
params: data,
});
},
// 轮播图添加
bannerAdd: (data) => {
return $http.post(`/admin-api/banner/add`, data);
},
//编辑轮播图
bannerUpdate: (data) => {
return $http.post(`/admin-api/banner/update`, data);
},
//删除轮播图
bannerDelete: (data) => {
return $http.post(`/admin-api/banner/delete`, data);
},
//排序轮播图
sortBanner: (data) => {
return $http.post(`/admin-api/banner/update/sort`, data);
},
// 公告分页
noticePage: (data) => {
return $http.request({
method: "get",
url: `/admin-api/notice/page`,
params: data,
});
},
// 公告添加
noticeAdd: (data) => {
return $http.post(`/admin-api/notice/add`, data);
},
//编辑公告
noticeUpdate: (data) => {
return $http.post(`/admin-api/notice/update`, data);
},
//删除公告
noticeDelete: (data) => {
return $http.post(`/admin-api/notice/delete`, data);
},
//排序公告
sortnotice: (data) => {
return $http.post(`/admin-api/notice/update/sort`, data);
},
};

View File

@ -64,6 +64,32 @@ export default {
open: null,
list: [],
},
{
menuId: getUUID(),
parentId: 0,
parentName: null,
name: "轮播图管理",
url: "product/banner/index",
perms: "",
type: 1,
elIcon: "el-icon-menu",
orderNum: 0,
open: null,
list: [],
},
{
menuId: getUUID(),
parentId: 0,
parentName: null,
name: "公告管理",
url: "product/notice/index",
perms: "",
type: 1,
elIcon: "el-icon-menu",
orderNum: 0,
open: null,
list: [],
},
],
},
{

View File

@ -81,26 +81,26 @@
</el-form-item>
</el-form>
<div class="mb-2">
<el-button type="primary" size="small">+添加</el-button>
<el-button @click="add" type="primary" size="small">+添加</el-button>
</div>
</template>
</obj-table-plus>
<!-- 添加或编辑 -->
<!-- <add-or-update
<add-or-update
@queryList="$refs.oTable.reload()"
ref="addOrUpdate"
></add-or-update> -->
></add-or-update>
<!-- 查看详情 -->
<!-- <viewDetails ref="viewDetails"></viewDetails> -->
</div>
</template>
<script>
// import AddOrUpdate from "./popup/add-or-update.vue";
import AddOrUpdate from "./popup/add-or-update.vue";
// import viewDetails from "./popup/view-details.vue";
import { mapState } from "vuex";
export default {
// components: { AddOrUpdate },
components: { AddOrUpdate },
data() {
return {
dataList: [],
@ -159,6 +159,9 @@ export default {
this.$refs.oTable.complete(false);
});
},
add() {
this.$refs.addOrUpdate.toggle().add();
},
},
computed: {
tableCols() {

View File

@ -0,0 +1,593 @@
<template>
<div>
<obj-modal
ref="modal"
labelWidth="150px"
:modalConfig="modalConfig"
:modalData="modalData"
:modalHandles="modalHandles"
>
<div slot="dialog__content">
<el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-width="150px"
class="demo-ruleForm"
>
<el-row>
<el-col :span="12">
<el-form-item label="订金支付时间:" prop="startTime">
<el-date-picker
@change="getOrderTime"
format="yyyy-MM-dd HH:mm"
data-format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm:ss"
v-model="orderTime"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:editable="false"
>
</el-date-picker> </el-form-item
></el-col>
<el-col :span="12">
<el-form-item
label="尾款支付时间:"
prop="balancePaymentStartTime"
>
<el-date-picker
@change="getArrearsTime"
format="yyyy-MM-dd"
data-format="yyyy-MM-dd"
value-format="yyyy-MM-dd HH:mm:ss"
v-model="arrears"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"
>
</el-date-picker> </el-form-item
></el-col>
</el-row>
<el-form-item
label="预计发货时间:"
prop="estimatedStartDeliveryTime"
>
<el-date-picker
format="yyyy-MM-dd HH:mm"
data-format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm:ss"
@change="deliveryTime"
v-model="delivery"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
<el-form-item label="定金可退:" prop="isRefundEarnestMoney">
<el-radio v-model="ruleForm.isRefundEarnestMoney" :label="1"
></el-radio
>
<el-radio v-model="ruleForm.isRefundEarnestMoney" :label="2"
></el-radio
>
<span>
选择是用户可在付尾款前申请退定金申请后自动退无需审核或付尾款时间结束后系统自动退定金
</span>
</el-form-item>
<el-form-item v-if="isAdd" label="选择商品:">
<el-button type="primary" @click="selectProduct"
>点击请选择商品</el-button
>
<span> 备注一次最多添加五个商品 </span>
</el-form-item>
<div style="padding: 0 0 0 20px; font-size: 16px; font-weight: 600">
已选择商品
</div>
<div v-if="isAdd" style="padding: 20px">
<div
v-for="item in ruleForm.productList"
:key="item.id"
style="border-top: 1px solid #ccc; padding: 10px 0 0 0"
>
<div style="font-size: 16px; margin-bottom: 20px">
<span>商品ID:{{ item.productId }}</span>
<span style="margin-left: 20px">商品名称:{{ item.name }}</span>
</div>
<el-table
border
ref="multipleTable"
:data="item.productSpecificationList"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table-column align="center" label="是否预售" width="80">
<template slot-scope="scope">
<el-checkbox
:true-label="1"
:false-label="0"
v-model="scope.row.isAdvanceSell"
></el-checkbox>
</template>
</el-table-column>
<el-table-column align="center" label="SKU-ID" prop="id" />
<el-table-column
align="center"
label="规格"
prop="attributeList"
>
<template slot-scope="scope">
<span>{{ scope.row.attributeValue }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="属性" prop="address">
<template slot-scope="scope">
<span>{{
scope.row.attributeList
? scope.row.attributeList[0].attributeName
: "无"
}}</span>
</template>
</el-table-column>
<el-table-column
align="center"
label="销售价"
prop="marketPrice"
width="120"
/>
<el-table-column align="center" label="*是否预售" width="200">
<template slot="header">
<span style="color: red">*预售价</span>
</template>
<template slot-scope="scope">
<el-input-number
v-if="scope.row.isAdvanceSell"
@change="
scope.row.balancePayment =
scope.row.presalePrice - scope.row.earnestMoney
"
v-model="scope.row.presalePrice"
:min="0"
:max="scope.row.marketPrice"
label="请输入销售价"
></el-input-number>
</template>
</el-table-column>
<el-table-column align="center" label="*定金" width="200">
<template slot="header">
<span style="color: red">*定金</span>
</template>
<template slot-scope="scope">
<el-input-number
@change="
scope.row.balancePayment =
scope.row.presalePrice - scope.row.earnestMoney
"
v-if="scope.row.isAdvanceSell"
v-model="scope.row.earnestMoney"
:min="0"
:max="scope.row.presalePrice"
label="请输入订金"
></el-input-number>
</template>
</el-table-column>
<el-table-column align="center" label="尾款" width="200">
<template slot-scope="scope">
<span v-if="scope.row.isAdvanceSell">{{
scope.row.presalePrice
? scope.row.presalePrice - scope.row.earnestMoney
: ""
}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="*预售库存" width="200">
<template slot="header">
<span style="color: red">*预售库存</span>
</template>
<template slot-scope="scope">
<el-input-number
v-if="scope.row.isAdvanceSell"
v-model="scope.row.advanceSellStockNum"
:min="0"
:max="999999"
:step="10"
:precision="0"
label="请输入预售库存"
></el-input-number>
</template>
</el-table-column>
</el-table>
</div>
<el-empty
v-show="ruleForm.productList.length == 0"
description="请选择商品"
></el-empty>
</div>
<div v-else style="padding: 20px">
<div style="border-top: 1px solid #ccc; padding: 10px 0 0 0">
<div style="font-size: 16px; margin-bottom: 20px">
<span>商品ID:{{ ruleForm.productId }}</span>
<span style="margin-left: 20px"
>商品名称:{{ ruleForm.name }}</span
>
</div>
<el-table
border
ref="multipleTable"
:data="ruleForm.productSpecificationList"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table-column align="center" label="是否预售" width="80">
<template slot-scope="scope">
<el-checkbox
:true-label="1"
:false-label="0"
v-model="scope.row.isAdvanceSell"
></el-checkbox>
</template>
</el-table-column>
<el-table-column align="center" label="SKU-ID" prop="id" />
<el-table-column
align="center"
label="规格"
prop="attributeList"
>
<template slot-scope="scope">
<span>{{ scope.row.attributeValue }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="属性" prop="address">
<template slot-scope="scope">
<span>{{
scope.row.attributeList
? scope.row.attributeList[0].attributeName
: "无"
}}</span>
</template>
</el-table-column>
<el-table-column
align="center"
label="销售价"
prop="marketPrice"
width="120"
/>
<el-table-column align="center" label="*是否预售" width="200">
<template slot="header">
<span style="color: red">*预售价</span>
</template>
<template slot-scope="scope">
<el-input-number
v-if="scope.row.isAdvanceSell"
@change="
scope.row.balancePayment =
scope.row.presalePrice - scope.row.earnestMoney
"
v-model="scope.row.presalePrice"
:min="0"
:max="scope.row.marketPrice"
label="请输入销售价"
></el-input-number>
</template>
</el-table-column>
<el-table-column align="center" label="*定金" width="200">
<template slot="header">
<span style="color: red">*定金</span>
</template>
<template slot-scope="scope">
<el-input-number
@change="
scope.row.balancePayment =
scope.row.presalePrice - scope.row.earnestMoney
"
v-if="scope.row.isAdvanceSell"
v-model="scope.row.earnestMoney"
:min="0"
:max="scope.row.presalePrice"
label="请输入订金"
></el-input-number>
</template>
</el-table-column>
<el-table-column align="center" label="尾款" width="200">
<template slot-scope="scope">
<span v-if="scope.row.isAdvanceSell">{{
scope.row.presalePrice
? scope.row.presalePrice - scope.row.earnestMoney
: ""
}}</span>
</template>
</el-table-column>
<el-table-column align="center" label="*预售库存" width="200">
<template slot="header">
<span style="color: red">*预售库存</span>
</template>
<template slot-scope="scope">
<el-input-number
v-if="scope.row.isAdvanceSell"
v-model="scope.row.advanceSellStockNum"
:min="0"
:max="999999"
:step="10"
:precision="0"
label="请输入预售库存"
></el-input-number>
</template>
</el-table-column>
</el-table>
</div>
<el-empty
v-show="ruleForm.productList?.length == 0"
description="请选择商品"
></el-empty>
</div>
</el-form>
</div>
<!-- 选择商品 -->
</obj-modal>
<commodity @getProduct="getProduct" ref="commodity"></commodity>
</div>
</template>
<script>
import commodity from "./commodity.vue";
import { debounce, cloneDeep } from "lodash";
export default {
components: { commodity },
props: {
marketId: {
type: String,
default: "",
},
shopId: {
type: String,
default: "",
},
},
data() {
return {
isAdd: true,
//
modalConfig: {
title: "库存预警设置",
show: false,
width: "1200px",
fullscreen: true,
},
modalData: {},
ruleForm: {
productList: [],
isRefundEarnestMoney: 1, //退 1 2
},
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now();
},
},
orderTime: [], //
arrears: [], //
delivery: [], //
tableData: [],
rules: {
startTime: [
{
required: true,
message: "请选择支付时间",
trigger: ["blur", "change"],
},
],
balancePaymentStartTime: [
{
required: true,
message: "请选择尾款支付时间",
trigger: "change",
},
],
estimatedStartDeliveryTime: [
{
required: true,
message: "请选择预计发货时间",
trigger: "change",
},
],
isRefundEarnestMoney: [
{
required: true,
message: "请选择定金可退",
trigger: "change",
},
],
presalePrice: [
{
required: true,
message: "请输入预售价格",
trigger: ["blur", "change"],
},
],
},
};
},
watch: {
"modalConfig.show"(newVal) {
if (newVal) {
//
setTimeout(() => {
this.$refs.ruleForm.resetFields();
});
}
},
},
methods: {
queryTableData(pageNo, pageSize) {},
toggle(e) {
if (this.modalConfig.show == false) {
this.modalConfig.show = true;
} else {
this.modalConfig.show = false;
}
if (e) {
this.init(cloneDeep(e));
}
return {
add: () => {
this.orderTime = [];
this.arrears = [];
this.delivery = [];
this.ruleForm = {
startTime: "",
endTime: "",
balancePaymentStartTime: "",
balancePaymentEndTime: "",
estimatedStartDeliveryTime: "",
estimatedEndDeliveryTime: "",
productList: [],
isRefundEarnestMoney: 1, //退 1 2
};
this.modalConfig.title = "新增预售";
this.isAdd = true;
},
update: () => {
this.modalConfig.title = "编辑预售";
this.isAdd = false;
},
};
},
init(row) {
console.log(row.startTime, row.endTime);
this.orderTime = [row.startTime, row.endTime];
this.arrears = [row.balancePaymentStartTime, row.balancePaymentEndTime];
this.delivery = [
row.estimatedStartDeliveryTime,
row.estimatedEndDeliveryTime,
];
(this.ruleForm = {
productId: row.id,
advanceSellId: row.advanceSellId,
startTime: row.startTime,
name: row.name,
endTime: row.endTime,
balancePaymentStartTime: row.balancePaymentStartTime,
balancePaymentEndTime: row.balancePaymentEndTime,
estimatedStartDeliveryTime: row.estimatedStartDeliveryTime,
estimatedEndDeliveryTime: row.estimatedEndDeliveryTime,
isRefundEarnestMoney: row.isRefundEarnestMoney,
productSpecificationList: row.productSpecificationList,
}),
console.log(this.orderTime, this.arrears, this.delivery);
// this.ruleForm = row;
},
//
getOrderTime(e) {
if (e) {
console.log(e);
this.ruleForm.startTime = e[0];
this.ruleForm.endTime = e[1];
} else {
this.ruleForm.startTime = "";
this.ruleForm.endTime = "";
}
},
//
getArrearsTime(e) {
if (e) {
console.log(e);
this.ruleForm.balancePaymentStartTime = e[0];
this.ruleForm.balancePaymentEndTime = e[1];
} else {
this.ruleForm.balancePaymentStartTime = "";
this.ruleForm.balancePaymentEndTime = "";
}
},
//
deliveryTime(e) {
if (e) {
console.log(e);
this.ruleForm.estimatedStartDeliveryTime = e[0];
this.ruleForm.estimatedEndDeliveryTime = e[1];
} else {
this.ruleForm.estimatedStartDeliveryTime = "";
this.ruleForm.estimatedEndDeliveryTime = "";
}
},
selectProduct() {
console.log("选择商品", this.marketId, this.shopId);
this.$nextTick(() => {
this.$refs.commodity.toggle().add({
marketId: this.marketId,
shopId: this.shopId,
});
});
},
handleSelectionChange(e) {
console.log(e);
},
getProduct(row) {
this.ruleForm.productList = row.map((item) => {
return {
productId: item.id,
name: item.name,
productSpecificationList: item.productSpecificationList,
};
});
console.log(this.ruleForm.productList, this.ruleForm.productList.length);
console.log("获取商品");
},
},
computed: {
modalHandles() {
return [
{
label: "取消",
handle: () => {
this.toggle();
},
},
{
label: "确认",
type: "primary",
// submit: true,
handle: () => {
if (this.isAdd) {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
console.log(valid);
this.$api.preSale
.addPreSaleProducts(this.ruleForm)
.then((res) => {
this.$emit("queryList");
this.toggle();
});
}
});
} else {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
console.log(valid);
this.$api.preSale
.updatePreSaleProducts(this.ruleForm)
.then((res) => {
this.$emit("queryList");
this.toggle();
});
}
});
}
},
},
];
},
},
asyncComputed: {},
};
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,230 @@
<template>
<obj-modal
ref="modal"
labelWidth="150px"
:modalConfig="modalConfig"
:modalData="modalData"
:modalHandles="modalHandles"
>
<template slot="dialog__content">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="商品搜索">
<el-input v-model="formList.name" placeholder="商品搜索"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="queryList">查询</el-button>
<el-button type="primary" @click="Reset">重置</el-button>
</el-form-item>
</el-form>
<el-table
border
ref="multipleTable"
:data="dataList"
tooltip-effect="dark"
style="width: 100%"
@select="select"
@select-all="selectAll"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column label="商品图" width="100">
<template slot-scope="scope">
<el-image
:preview-src-list="[scope.row.productPhotoList[0].url]"
:src="scope.row.productPhotoList[0].url"
></el-image
></template>
</el-table-column>
<el-table-column prop="name" label="商品名称" />
<el-table-column prop="name" label="商品售价">
<template slot-scope="scope">
<span>{{ getSalePrice(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column prop="address" label="折扣">
<template slot-scope="scope">
<span>{{ scope.row.discountActivity?.ruleObject.discount }}</span>
</template>
</el-table-column>
<el-table-column prop="saleNum" label="销量" />
<el-table-column prop="stockNum" label="库存" />
</el-table>
<div class="pagination-container">
<el-pagination
:current-page="query.pageNumber"
:page-sizes="[10, 20, 30, 50]"
:page-size="query.pageSize"
:total="total"
background
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</template>
</obj-modal>
</template>
<script>
import { debounce, cloneDeep } from "lodash";
export default {
data() {
return {
isAdd: true,
//
modalConfig: {
title: "请点击选择商品 (提示最多选择5个商品)",
show: false,
width: "1000px",
},
query: {
pageNumber: 1,
pageSize: 10,
},
total: 0,
modalData: {},
dataList: [], //
selectList: [],
formInline: {},
formList: {
name: "",
},
};
},
methods: {
queryList() {
this.$api.mer_admin
.getProductPage({
p: {
pageNumber: this.query.pageNumber,
pageSize: this.query.pageSize,
},
...this.formInline,
...this.formList,
productFilterType: "SALE",
merchantId: JSON.parse(sessionStorage.getItem("userInfo")).merchantId,
productQuerySortParam: [],
})
.then((res) => {
console.log(res);
this.dataList = res.data.data.data;
this.total = Number(res.data.data.total);
})
.catch((err) => {
this.dataList = [];
});
},
toggle(e) {
if (this.modalConfig.show == false) {
this.modalConfig.show = true;
} else {
this.modalConfig.show = false;
}
if (e) {
this.init(cloneDeep(e));
}
return {
add: (row) => {
console.log(row);
this.formInline = row;
this.isAdd = true;
this.$nextTick(() => {
this.queryList();
});
},
update: () => {
this.isAdd = false;
},
};
},
init(row) {},
toggleSelection(rows) {
if (rows) {
rows.forEach((row) => {
this.$refs.multipleTable.toggleRowSelection(row);
});
} else {
this.$refs.multipleTable.clearSelection();
}
},
select(selection, row) {
if (selection.length > 5) {
this.$message.error("最多选择5个商品");
this.$refs.multipleTable.toggleRowSelection(row, false);
} else {
this.selectList = selection;
}
},
selectAll(selection) {
if (selection.length > 5) {
this.$message.error("最多选择5个商品");
selection.length = 5;
this.selectList = selection;
console.log(selection);
} else {
this.selectList = selection;
}
},
getSalePrice(row) {
if (row.minSalePrice == row.maxSalePrice) {
return row.minSalePrice;
} else {
return `${row.minSalePrice}~${row.maxSalePrice}`;
}
},
handleSizeChange(val) {
this.query.pageSize = val;
this.getList();
},
handleCurrentChange(val) {
this.query.pageNumber = val;
this.getList();
},
Reset() {
this.formList = {};
this.queryList();
},
},
computed: {
modalHandles() {
return [
{
label: "取消",
handle: () => {
this.toggle();
},
},
{
label: "确认",
type: "primary",
handle: () => {
this.$emit("getProduct", this.selectList);
this.toggle();
},
},
];
},
tableEvent() {
return {
"checkbox-all": ({ records, reserves }) => {
console.log(records, reserves);
this.selectList = [...records, ...reserves];
},
"checkbox-change": ({ records, reserves }) => {
console.log(records, reserves);
if (records.length > 5) {
this.$message.error("最多选择5个商品");
return;
}
this.selectList = [...records, ...reserves];
},
};
},
},
};
</script>
<style lang="scss" scoped>
::v-deep .selectAllbtnDis .cell .el-checkbox__inner {
display: none;
}
</style>

View File

@ -0,0 +1,320 @@
<template>
<div>
<div style="height: calc(100vh - 200px)">
<obj-table-plus
ref="oTable"
style="height: 100%"
:tableCols="tableCols"
:tableProp="tableProp"
@query="queryList"
v-model="dataList"
:tableEvent="tableEvent"
>
<template slot="tableTop">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="模块">
<el-select
@change="changeModule"
class="filter-item"
style="width: 200px"
v-model="formInline.module"
placeholder="请选择模块"
>
<el-option
v-for="item in [
{
label: '菜市场',
value: 'market',
},
{
label: '摊铺',
value: 'shop',
},
]"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
v-if="storeList.length > 1 && formInline.module === 'shop'"
label="摊铺"
>
<el-select
class="filter-item"
style="width: 200px"
v-model="formInline.ownerId"
placeholder="请选择摊铺"
>
<el-option
v-for="item in storeList"
:key="item.shopId"
:label="item.shopName"
:value="item.shopId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="类型">
<el-select
class="filter-item"
style="width: 200px"
v-model="formInline.type"
placeholder="请选择分类类型"
>
<el-option
v-for="item in type"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="$refs.oTable.reload()"
>查询</el-button
>
<el-button type="primary" @click="Reset">重置</el-button>
</el-form-item>
</el-form>
<!-- <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
v-for="item in statusList"
:key="item.value"
:label="item.label"
:name="item.value"
></el-tab-pane>
</el-tabs> -->
<div class="mb-2">
<el-button type="primary" size="small" @click="addBanner"
>新增轮播图</el-button
>
<el-button type="primary" size="small" @click="setSort"
>排序</el-button
>
</div>
</template>
</obj-table-plus>
</div>
<!-- 轮播图 -->
<addOrUpdate
ref="addOrUpdate"
@queryList="$refs.oTable.reload()"
></addOrUpdate>
<!-- 排序 -->
<setSorting
@queryList="$refs.oTable.reload()"
ref="setSorting"
></setSorting>
</div>
</template>
<script>
import setSorting from "./popup/set-sorting.vue";
import addOrUpdate from "./popup/add-or-update.vue";
import { mapState } from "vuex";
export default {
components: { addOrUpdate, setSorting },
data() {
return {
activeName: "5",
advanceSellStatus: "",
dataList: [],
formInline: {
type: 0,
ownerId: "",
module: "shop",
},
tableProp: {
"auto-resize": true,
border: true,
height: "auto",
"row-id": "id",
"show-overflow": false,
},
selectList: [],
type: [
{
value: 0,
label: "菜市场分类",
},
{
value: 1,
label: "云店分类",
},
],
};
},
created() {
this.formInline = {
type: 0,
ownerId: this.shopId,
module: "shop",
};
this.$nextTick(() => {
this.$refs.oTable.reload();
});
},
methods: {
// getData() {
// this.$api.mer_admin
// .storeList({ marketId: this.formInline.marketId })
// .then((res) => {
// this.storeList = res.data.data;
// this.formInline.shopId = res.data.data[0].shopId;
// this.$nextTick(() => {
// this.$refs.oTable.reload();
// });
// });
// },
addBanner() {
this.$refs.addOrUpdate.toggle().add(this.formInline);
},
changeModule(e) {
if (e === "shop") {
this.formInline.ownerId = this.shopId;
} else {
this.formInline.ownerId = this.marketId;
}
console.log(e);
},
queryList(pageNo, pageSize) {
this.$api.mer_admin
.bannerPage({
pageNumber: pageNo,
pageSize: pageSize,
...this.formInline,
})
.then((res) => {
console.log(res);
this.$refs.oTable.complete(
res.data.data.data,
Number(res.data.data.total)
);
})
.catch((err) => {
this.$refs.oTable.complete(false);
});
},
Reset() {
this.formInline = {
type: 0,
ownerId: this.shopId,
};
this.$refs.oTable.reload();
},
//
setSort() {
this.$refs.setSorting.init(this.dataList);
},
},
computed: {
tableCols() {
return [
// { type: "checkbox", width: "60px", fixed: "left" },
{ type: "seq", width: "60px", align: "center", title: "序号" },
{
title: "名称",
align: "center",
width: "120px",
field: "title",
},
{
title: "轮播图",
align: "center",
field: "startTime",
type: "jsx",
render: ({ row }) => {
return (
<el-image
style="width: 60px; height: 60px"
src={row.img}
preview-src-list={[row.img]}
></el-image>
);
},
},
{
title: "状态",
align: "center",
field: "status",
type: "jsx",
render: ({ row }) => {
return <span>{row.status ? "已启用" : "已禁用"}</span>;
},
},
{
title: "操作",
fixed: "right",
type: "jsx",
align: "center",
width: "220px",
render: ({ row }) => {
let updateBanner = () => {
this.$refs.addOrUpdate.toggle(row).update();
};
let deleteBanner = () => {
this.$api.mer_admin
.bannerDelete({ id: row.id })
.then((res) => {
this.$refs.oTable.reload();
})
.catch((err) => {
this.$refs.oTable.reload();
});
};
let onCancel = () => {};
return (
<div>
<el-button
style="margin-right:10px"
size="mini"
type="primary"
onClick={updateBanner}
>
编辑
</el-button>
<el-popconfirm
onConfirm={deleteBanner}
onCancel={onCancel}
confirm-button-text="确定"
cancel-button-text="取消"
icon="el-icon-info"
icon-color="red"
title="确定删除吗?"
>
<el-button size="mini" type="danger" slot="reference">
删除
</el-button>
</el-popconfirm>
</div>
);
},
},
];
},
tableEvent() {
return {
"checkbox-all": ({ records, reserves }) => {
this.selectList = [...records, ...reserves];
},
"checkbox-change": ({ records, reserves }) => {
this.selectList = [...records, ...reserves];
},
};
},
...mapState("userData", [
"isMerchant",
"marketList",
"storeList",
"marketId",
"shopId",
]),
},
};
</script>
<style lang="scss" scoped></style>

View File

@ -0,0 +1,276 @@
<template>
<div>
<obj-modal
ref="modal"
labelWidth="150px"
:modalCols="modalCols"
:modalConfig="modalConfig"
:modalData="modalData"
:modalHandles="modalHandles"
>
<template slot="dialog__after"> </template>
</obj-modal>
</div>
</template>
<script>
import { debounce, cloneDeep } from "lodash";
import { Divider } from "element-ui";
export default {
components: {},
data() {
return {
isAdd: true,
//
modalConfig: {
title: "",
show: false,
width: "700px",
},
modalData: {},
settingId: "",
form: {},
fileList: [],
};
},
watch: {
"modalConfig.show"(newVal) {
if (!newVal) {
//
setTimeout(() => {
this.$refs.modal.resetFields();
});
}
},
},
methods: {
queryTableData(pageNo, pageSize) {},
toggle(e) {
if (this.modalConfig.show == false) {
this.modalConfig.show = true;
} else {
this.modalConfig.show = false;
}
if (e) {
this.init(cloneDeep(e));
}
return {
add: (row) => {
console.log(row);
this.modalData = {
ownerId: row.ownerId,
title: "",
module: row.module,
type: 0,
status: true,
app: 1,
img: "",
};
this.fileList = [];
this.modalConfig.title = "添加轮播图";
this.isAdd = true;
},
update: () => {
this.modalConfig.title = "编辑轮播图";
this.isAdd = false;
},
};
},
init(row) {
this.modalData = row;
this.fileList = [
{
name: "轮播图",
url: this.modalData.img,
},
];
},
},
computed: {
modalCols() {
return [
{
label: "轮播图名称",
prop: "title",
type: "Input",
required: true,
maxlength: "30",
rules: {
required: true,
message: "请输入轮播图名称",
trigger: "blur",
},
},
{
label: "分类",
prop: "type",
maxlength: "30",
rules: {
required: true,
message: "请输入轮播图名称",
trigger: "blur",
},
type: "jsx",
render: () => {
return (
<el-select
v-model={this.modalData.type}
placeholder="请选择销售单位"
>
{[
{ label: "菜市场", value: 0 },
{
label: "云店",
value: 1,
},
].map((item) => {
return (
<el-option
label={item.label}
value={item.value}
></el-option>
);
})}
</el-select>
);
},
},
{
label: "状态",
prop: "status",
maxlength: "30",
type: "jsx",
render: () => {
return (
<el-switch
v-model={this.modalData.status}
active-text="启用"
inactive-text="禁用"
/>
);
},
},
{
label: "应用",
prop: "app",
maxlength: "30",
rules: {
required: true,
message: "请输入轮播图名称",
trigger: "blur",
},
type: "jsx",
render: () => {
return (
<el-select
v-model={this.modalData.app}
placeholder="请选择销售单位"
>
{[
{ label: "用户", value: 1 },
{
label: "商家",
value: 2,
},
{
label: "专员",
value: 3,
},
].map((item) => {
return (
<el-option
label={item.label}
value={item.value}
></el-option>
);
})}
</el-select>
);
},
},
{
label: "轮播图",
prop: "img",
required: true,
rules: {
required: true,
message: "请上传商品图片",
trigger: "blur",
},
type: "jsx",
render: () => {
const handleAvatarSuccess = (res, file, fileList) => {
console.log(res, fileList);
this.modalData.img = res.data;
this.$refs.modal.validate();
};
const handleRemove = (file, fileList) => {
console.log(file, fileList);
this.fileList = [];
this.modalData.img = "";
};
return (
<el-upload
class="upload-demo"
drag
action={this.$api.mer_admin.uploadFile()}
{...{
props: {
"on-success": handleAvatarSuccess,
"on-remove": handleRemove,
},
}}
headers={{
token: "Bearer " + this.$cookie.get("token"),
}}
multiple={true}
file-list={this.fileList}
list-type="picture"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
将文件拖到此处<em>点击上传</em>
</div>
<div class="el-upload__tip" slot="tip">
只能上传jpg/png文件且不超过500kb
</div>
</el-upload>
);
},
},
];
},
modalHandles() {
return [
{
label: "取消",
handle: () => {
this.toggle();
},
},
{
label: "确认",
type: "primary",
submit: true,
handle: () => {
console.log(this.modalData);
if (this.isAdd) {
this.$api.mer_admin.bannerAdd(this.modalData).then((res) => {
this.toggle();
this.$emit("queryList");
});
} else {
this.$api.mer_admin.bannerUpdate(this.modalData).then((res) => {
this.toggle();
this.$emit("queryList");
});
}
},
},
];
},
},
asyncComputed: {},
};
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,122 @@
<template>
<el-dialog
:visible.sync="visible"
title="拖拽排序"
:close-on-click-modal="false"
width="600"
draggable
>
<div
class="item"
v-for="(item, i) in drag.list"
:key="item.id"
draggable="true"
@dragstart="dragstart($event, i)"
@dragenter="dragenter($event, i)"
@dragend="dragend"
@dragover="dragover"
>
{{ item.title }}
</div>
<template #footer>
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">确定</el-button>
</template>
</el-dialog>
</template>
<script>
// import { sortCarouselImage } from "@/api/cloudStore.js";
import debounce from "lodash/debounce";
// import { provinceAndCityData, regionData } from "element-china-area-data";
export default {
data() {
return {
visible: false,
dataForm: {},
drag: {
list: [],
},
dragIndex: 0,
};
},
computed: {},
watch: {
visible(newVal, oldVal) {
if (newVal == false) {
}
},
},
methods: {
init(row) {
this.drag.list = JSON.parse(JSON.stringify(row));
this.visible = true;
},
dragstart(e, index) {
e.stopPropagation();
this.dragIndex = index;
setTimeout(() => {
e.target.classList.add("moveing");
}, 0);
},
dragenter(e, index) {
e.preventDefault();
//
if (this.dragIndex !== index) {
const source = this.drag.list[this.dragIndex];
this.drag.list.splice(this.dragIndex, 1);
this.drag.list.splice(index, 0, source);
//
this.dragIndex = index;
}
},
dragover(e) {
e.preventDefault();
e.dataTransfer.dropEffect = "move";
},
dragend(e) {
e.target.classList.remove("moveing");
},
//
dataFormSubmitHandle: debounce(
function () {
console.log(this.drag.list);
let id = this.drag.list.map((item) => {
return item.id;
});
console.log(id);
this.$api.mer_admin.sortBanner({ ids: id }).then((res) => {
console.log(res);
this.$emit("queryList");
this.visible = false;
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>
<style scoped>
.item {
width: 500px;
height: 40px;
line-height: 40px;
/* // background-color: #f5f6f8; */
background-color: skyblue;
text-align: center;
margin: 10px;
color: #fff;
font-size: 18px;
}
.container {
position: relative;
padding: 0;
}
.moveing {
opacity: 0;
}
</style>

View File

@ -0,0 +1,324 @@
<template>
<div>
<div style="height: calc(100vh - 200px)">
<obj-table-plus
ref="oTable"
style="height: 100%"
:tableCols="tableCols"
:tableProp="tableProp"
@query="queryList"
v-model="dataList"
:tableEvent="tableEvent"
>
<template slot="tableTop">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="模块">
<el-select
@change="changePosition"
class="filter-item"
style="width: 200px"
v-model="formInline.position"
placeholder="请选择模块"
>
<el-option
v-for="item in [
{
label: '菜市场详情页',
value: '2',
},
{
label: '摊位详情',
value: '3',
},
]"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
v-if="storeList.length > 1 && formInline.position === '1'"
label="摊铺"
>
<el-select
class="filter-item"
style="width: 200px"
v-model="formInline.targetId"
placeholder="请选择摊铺"
>
<el-option
v-for="item in storeList"
:key="item.shopId"
:label="item.shopName"
:value="item.shopId"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="类型">
<el-select
class="filter-item"
style="width: 200px"
v-model="formInline.type"
placeholder="请选择分类类型"
>
<el-option
v-for="item in type"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="$refs.oTable.reload()"
>查询</el-button
>
<el-button type="primary" @click="Reset">重置</el-button>
</el-form-item>
</el-form>
<!-- <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane
v-for="item in statusList"
:key="item.value"
:label="item.label"
:name="item.value"
></el-tab-pane>
</el-tabs> -->
<div class="mb-2">
<el-button type="primary" size="small" @click="addBanner"
>新增公告</el-button
>
<el-button type="primary" size="small" @click="setSort"
>排序</el-button
>
</div>
</template>
</obj-table-plus>
</div>
<!-- 轮播图 -->
<addOrUpdate
ref="addOrUpdate"
@queryList="$refs.oTable.reload()"
></addOrUpdate>
<!-- 排序 -->
<setSorting
@queryList="$refs.oTable.reload()"
ref="setSorting"
></setSorting>
</div>
</template>
<script>
import setSorting from "./popup/set-sorting.vue";
import addOrUpdate from "./popup/add-or-update.vue";
import { mapState } from "vuex";
export default {
components: { addOrUpdate, setSorting },
data() {
return {
activeName: "5",
advanceSellStatus: "",
dataList: [],
formInline: {
type: 0,
targetId: "",
position: "3",
},
tableProp: {
"auto-resize": true,
border: true,
height: "auto",
"row-id": "id",
"show-overflow": false,
},
selectList: [],
type: [
{
value: 0,
label: "菜市场分类",
},
{
value: 1,
label: "云店分类",
},
],
};
},
created() {
this.formInline = {
type: 0,
targetId: this.shopId,
position: "3",
};
this.$nextTick(() => {
this.$refs.oTable.reload();
});
},
methods: {
// getData() {
// this.$api.mer_admin
// .storeList({ marketId: this.formInline.marketId })
// .then((res) => {
// this.storeList = res.data.data;
// this.formInline.shopId = res.data.data[0].shopId;
// this.$nextTick(() => {
// this.$refs.oTable.reload();
// });
// });
// },
addBanner() {
this.$refs.addOrUpdate.toggle().add(this.formInline);
},
changePosition(e) {
if (e === "shop") {
this.formInline.targetId = this.shopId;
} else {
this.formInline.targetId = this.marketId;
}
console.log(e);
},
queryList(pageNo, pageSize) {
this.$api.mer_admin
.noticePage({
pageNumber: pageNo,
pageSize: pageSize,
...this.formInline,
})
.then((res) => {
console.log(res);
this.$refs.oTable.complete(
res.data.data.data,
Number(res.data.data.total)
);
})
.catch((err) => {
this.$refs.oTable.complete(false);
});
},
Reset() {
this.formInline = {
type: 0,
targetId: this.shopId,
};
this.$refs.oTable.reload();
},
//
setSort() {
this.$refs.setSorting.init(this.dataList);
},
},
computed: {
tableCols() {
return [
// { type: "checkbox", width: "60px", fixed: "left" },
{ type: "seq", width: "60px", align: "center", title: "序号" },
{
title: "公告通知",
align: "center",
field: "title",
},
{
title: "位置",
align: "center",
field: "startTime",
type: "jsx",
width: "120px",
render: ({ row }) => {
let getPosition = (row) => {
if (row == "1") {
return "首页";
} else if (row == "2") {
return "菜市场详情页";
} else if (row == "3") {
return "摊位详情";
}
};
return <span>{getPosition(row.position)}</span>;
},
},
{
title: "状态",
align: "center",
field: "status",
type: "jsx",
width: "120px",
render: ({ row }) => {
return <span>{row.status ? "已启用" : "已禁用"}</span>;
},
},
{
title: "操作",
fixed: "right",
type: "jsx",
align: "center",
width: "220px",
render: ({ row }) => {
let updateBanner = () => {
this.$refs.addOrUpdate.toggle(row).update();
};
let deleteBanner = () => {
this.$api.mer_admin
.noticeDelete({ id: row.id })
.then((res) => {
this.$refs.oTable.reload();
})
.catch((err) => {
this.$refs.oTable.reload();
});
};
let onCancel = () => {};
return (
<div>
<el-button
style="margin-right:10px"
size="mini"
type="primary"
onClick={updateBanner}
>
编辑
</el-button>
<el-popconfirm
onConfirm={deleteBanner}
onCancel={onCancel}
confirm-button-text="确定"
cancel-button-text="取消"
icon="el-icon-info"
icon-color="red"
title="确定删除吗?"
>
<el-button size="mini" type="danger" slot="reference">
删除
</el-button>
</el-popconfirm>
</div>
);
},
},
];
},
tableEvent() {
return {
"checkbox-all": ({ records, reserves }) => {
this.selectList = [...records, ...reserves];
},
"checkbox-change": ({ records, reserves }) => {
this.selectList = [...records, ...reserves];
},
};
},
...mapState("userData", [
"isMerchant",
"marketList",
"storeList",
"marketId",
"shopId",
]),
},
};
</script>
<style lang="scss" scoped></style>

View File

@ -0,0 +1,219 @@
<template>
<div>
<obj-modal
ref="modal"
labelWidth="150px"
:modalCols="modalCols"
:modalConfig="modalConfig"
:modalData="modalData"
:modalHandles="modalHandles"
>
<template slot="dialog__after"> </template>
</obj-modal>
</div>
</template>
<script>
import { debounce, cloneDeep } from "lodash";
import { Divider } from "element-ui";
export default {
components: {},
data() {
return {
isAdd: true,
//
modalConfig: {
title: "",
show: false,
width: "700px",
},
modalData: {},
settingId: "",
form: {},
};
},
watch: {
"modalConfig.show"(newVal) {
if (!newVal) {
//
setTimeout(() => {
this.$refs.modal.resetFields();
});
}
},
},
methods: {
queryTableData(pageNo, pageSize) {},
toggle(e) {
if (this.modalConfig.show == false) {
this.modalConfig.show = true;
} else {
this.modalConfig.show = false;
}
if (e) {
this.init(cloneDeep(e));
}
return {
add: (row) => {
console.log(row);
this.modalData = {
targetId: row.targetId,
title: "",
module: row.position,
type: 0,
status: true,
app: 1,
};
this.fileList = [];
this.modalConfig.title = "添加公告";
this.isAdd = true;
},
update: () => {
this.modalConfig.title = "编辑公告";
this.isAdd = false;
},
};
},
init(row) {
this.modalData = row;
},
},
computed: {
modalCols() {
return [
{
label: "公告内容",
prop: "title",
type: "Textarea",
required: true,
maxlength: "120",
rows: "5",
rules: {
required: true,
message: "请输入公告内容",
trigger: "blur",
},
},
{
label: "分类",
prop: "type",
maxlength: "30",
rules: {
required: true,
message: "请输入分类",
trigger: "blur",
},
type: "jsx",
render: () => {
return (
<el-select
v-model={this.modalData.type}
placeholder="请选择销售单位"
>
{[
{ label: "菜市场", value: 0 },
{
label: "云店",
value: 1,
},
].map((item) => {
return (
<el-option
label={item.label}
value={item.value}
></el-option>
);
})}
</el-select>
);
},
},
{
label: "状态",
prop: "status",
maxlength: "30",
type: "jsx",
render: () => {
return (
<el-switch
v-model={this.modalData.status}
active-text="启用"
inactive-text="禁用"
/>
);
},
},
{
label: "应用",
prop: "app",
maxlength: "30",
rules: {
required: true,
message: "请输入轮播图名称",
trigger: "blur",
},
type: "jsx",
render: () => {
return (
<el-select
v-model={this.modalData.app}
placeholder="请选择销售单位"
>
{[
{ label: "用户", value: 1 },
{
label: "商家",
value: 2,
},
{
label: "专员",
value: 3,
},
].map((item) => {
return (
<el-option
label={item.label}
value={item.value}
></el-option>
);
})}
</el-select>
);
},
},
];
},
modalHandles() {
return [
{
label: "取消",
handle: () => {
this.toggle();
},
},
{
label: "确认",
type: "primary",
submit: true,
handle: () => {
console.log(this.modalData);
if (this.isAdd) {
this.$api.mer_admin.noticeAdd(this.modalData).then((res) => {
this.toggle();
this.$emit("queryList");
});
} else {
this.$api.mer_admin.noticeUpdate(this.modalData).then((res) => {
this.toggle();
this.$emit("queryList");
});
}
},
},
];
},
},
asyncComputed: {},
};
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,122 @@
<template>
<el-dialog
:visible.sync="visible"
title="拖拽排序"
:close-on-click-modal="false"
width="600"
draggable
>
<div
class="item"
v-for="(item, i) in drag.list"
:key="item.id"
draggable="true"
@dragstart="dragstart($event, i)"
@dragenter="dragenter($event, i)"
@dragend="dragend"
@dragover="dragover"
>
{{ item.title }}
</div>
<template #footer>
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">确定</el-button>
</template>
</el-dialog>
</template>
<script>
// import { sortCarouselImage } from "@/api/cloudStore.js";
import debounce from "lodash/debounce";
// import { provinceAndCityData, regionData } from "element-china-area-data";
export default {
data() {
return {
visible: false,
dataForm: {},
drag: {
list: [],
},
dragIndex: 0,
};
},
computed: {},
watch: {
visible(newVal, oldVal) {
if (newVal == false) {
}
},
},
methods: {
init(row) {
this.drag.list = JSON.parse(JSON.stringify(row));
this.visible = true;
},
dragstart(e, index) {
e.stopPropagation();
this.dragIndex = index;
setTimeout(() => {
e.target.classList.add("moveing");
}, 0);
},
dragenter(e, index) {
e.preventDefault();
//
if (this.dragIndex !== index) {
const source = this.drag.list[this.dragIndex];
this.drag.list.splice(this.dragIndex, 1);
this.drag.list.splice(index, 0, source);
//
this.dragIndex = index;
}
},
dragover(e) {
e.preventDefault();
e.dataTransfer.dropEffect = "move";
},
dragend(e) {
e.target.classList.remove("moveing");
},
//
dataFormSubmitHandle: debounce(
function () {
console.log(this.drag.list);
let id = this.drag.list.map((item) => {
return item.id;
});
console.log(id);
this.$api.mer_admin.sortnotice({ ids: id }).then((res) => {
console.log(res);
this.$emit("queryList");
this.visible = false;
});
},
1000,
{ leading: true, trailing: false }
),
},
};
</script>
<style scoped>
.item {
width: 500px;
height: 40px;
line-height: 40px;
/* // background-color: #f5f6f8; */
background-color: skyblue;
text-align: center;
margin: 10px;
color: #fff;
font-size: 18px;
}
.container {
position: relative;
padding: 0;
}
.moveing {
opacity: 0;
}
</style>

View File

@ -0,0 +1,47 @@
<template>
<vxe-column type="expand" width="60">
<template #content="{ row }">
<div class="expand-wrapper">
<vxe-table border :data="row.productOrders" height="200">
<vxe-column field="productOrderNo" title="商品订单号"></vxe-column>
<vxe-column field="productName" title="商品名称"></vxe-column>
<vxe-column
field="productImg"
title="商品图片"
:cell-render="imgUrlCellRender"
width="80"
></vxe-column>
<vxe-column field="productSpecName" title="商品规格名称"></vxe-column>
<vxe-column field="originPrice" title="商品原价"></vxe-column>
<vxe-column field="finalPrice" title="商品终价"></vxe-column>
<vxe-column
field="productOrderMoney"
title="商品订单金额"
></vxe-column>
<vxe-column field="productCount" title="商品数量"></vxe-column>
<vxe-column field="productLimit" title="商品限购数量"></vxe-column>
<vxe-column field="shopName" title="店铺名称"></vxe-column>
</vxe-table>
</div>
</template>
</vxe-column>
</template>
<script>
export default {
data() {
return {
imgUrlCellRender: {
name: "VxeImage",
props: {
width: 36,
height: 36,
},
},
};
},
};
</script>
<style>
</style>

View File

@ -60,9 +60,10 @@
</template>
<script>
import content from './content.vue'
import { mapState } from "vuex";
export default {
components: {},
components: {content},
data() {
return {
activeName: "5",
@ -201,58 +202,159 @@ export default {
// { type: "checkbox", width: "60px", fixed: "left" },
{ type: "seq", width: "60px", align: "center", title: "序号" },
{
title: "商品订单号",
title: "订单号",
align: "center",
width: "120px",
field: "productOrderNo",
field: "orderNo",
},
// {
// title: "",
// field: "productPhotoList",
{
title: "结算单位订单号",
align: "center",
width: "120px",
field: "unitOrderNo",
},
{
// title: "",
// align: "center",
// width: "80px",
// type: "jsx",
// render: ({ row }) => {
// if (row.productPhotoList.length > 0) {
// return (
// <el-image
// preview-src-list={row.productPhotoList.map((item) => {
// return item.url;
// })}
// src={row.productPhotoList[0].url}
// ></el-image>
// );
// } else {
// return <span></span>;
// }
// },
// },
{
title: "规格/数量",
align: "center",
field: "startTime",
type: "jsx",
render: ({ row }) => {
// width: "120px",
// field: "unitOrderStatus",
type: "jsx-out",
render: (col) => {
console.log(col);
return (
<span>
{row.startTime}{row.endTime}
</span>
<content />
);
},
},
{
title: "兑换积分",
title: "总商品数量",
align: "center",
field: "minSalePrice",
width: "120px",
field: "productCount",
},
{
title: "顾客支付",
align: "center",
width: "120px",
field: "totalMoney",
},
{
title: "配送费",
align: "center",
width: "120px",
field: "deliveryMoney",
},
{
title: "优惠券减免",
align: "center",
width: "120px",
field: "couponMoney",
},
{
title: "下单时间",
align: "center",
width: "120px",
field: "payTime",
},
{
title: "预计送达时间",
align: "center",
width: "120px",
field: "predictDeliveryTime",
},
{
title: "预计收入",
align: "center",
width: "120px",
field: "predictIncome",
},
{
title: "距离",
align: "center",
width: "120px",
field: "distance",
},
{
title: "预计自动取消时间",
align: "center",
width: "120px",
field: "predictAutoCancelTime",
},
{
title: "备注",
align: "center",
width: "120px",
field: "remark",
},
{
title: "包装费",
align: "center",
width: "120px",
field: "packageMoney",
},
{
title: "平台服务费",
align: "center",
width: "120px",
field: "platformMoney",
},
{
title: "备餐完成时间",
align: "center",
width: "120px",
field: "completePrepareTime",
},
{
title: "开始配送时间",
align: "center",
width: "120px",
field: "startDeliveryTime",
},
{
title: "配送完成时间",
align: "center",
width: "120px",
field: "startDeliveryTime",
},
{
title: "开始配送时间",
align: "center",
width: "120px",
field: "startDeliveryTime",
},
{
title: "订单退款状态",
align: "center",
width: "120px",
field: "refundStatus",
},
{
title: "申请退款原因",
align: "center",
width: "120px",
field: "refundReason",
},
{
title: "订单商品",
field: "productPhotoList",
align: "center",
width: "80px",
type: "jsx",
render: ({ row }) => {
return (
<span>
{row.balancePaymentStartTime}{row.balancePaymentEndTime}
</span>
<el-image
preview-src-list={[row.refundImg]}
src={row.refundImg}
></el-image>
);
},
},
{
title: "申请退款时间",
align: "center",
width: "120px",
field: "applyRefundTime",
},
{
title: "操作",
fixed: "right",

View File

@ -246,7 +246,7 @@
<div>订单状态{{ getBillStatus(item.billStatus) }}</div>
</div>
<div class="wallet-item">
<div>{{ item.billTypeName }}</div>
<div>{{ item.billTypeName }}{{item.billAmount}}</div>
<div>余额{{ item.amountAfterChange }}</div>
</div>
</div>