代理商
This commit is contained in:
parent
60cd207289
commit
a571294109
|
@ -0,0 +1,20 @@
|
|||
import $http from "@/utils/httpRequest.js";
|
||||
//代理商
|
||||
export const agent = {
|
||||
//商铺列表
|
||||
agentShopPage: (data) => {
|
||||
return $http.request({
|
||||
url: `/merchant-api/agent/shop/page`,
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
},
|
||||
//市场列表
|
||||
agentMarketPage: (data) => {
|
||||
return $http.request({
|
||||
url: `/merchant-api/agent/market/page`,
|
||||
method: "get",
|
||||
params: data,
|
||||
});
|
||||
},
|
||||
};
|
|
@ -1,15 +1,231 @@
|
|||
<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"
|
||||
:enableAutoQuery="false"
|
||||
>
|
||||
<template slot="tableTop">
|
||||
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||
<el-form-item label="菜市场名称">
|
||||
<el-input
|
||||
v-model="formInline.marketName"
|
||||
placeholder="菜市场名称搜索"
|
||||
></el-input>
|
||||
</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>
|
||||
<div class="mb-2"></div>
|
||||
</template>
|
||||
</obj-table-plus>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
|
||||
}
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
formInline: {
|
||||
name: "",
|
||||
},
|
||||
tableProp: {
|
||||
"auto-resize": true,
|
||||
border: true,
|
||||
height: "auto",
|
||||
"row-id": "id",
|
||||
"show-overflow": false,
|
||||
},
|
||||
productFilterType: "SALE",
|
||||
selectList: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
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();
|
||||
// });
|
||||
// });
|
||||
},
|
||||
Reset() {
|
||||
this.formInline = {
|
||||
name: "",
|
||||
};
|
||||
this.$refs.oTable.reload();
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
this.$api.agent
|
||||
.agentMarketPage({
|
||||
pageNumber: pageNo,
|
||||
pageSize: pageSize,
|
||||
...this.formInline,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
this.$refs.oTable.complete(
|
||||
res.data.data.content,
|
||||
Number(res.data.data.totalElements)
|
||||
);
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$refs.oTable.complete(false);
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
tableCols() {
|
||||
return [
|
||||
{ type: "checkbox", width: "60px", fixed: "left" },
|
||||
// { type: "seq", width: "60px", align: "center", title: "序号" },
|
||||
{
|
||||
title: "菜市场名称",
|
||||
align: "center",
|
||||
field: "name",
|
||||
},
|
||||
{
|
||||
title: "地址",
|
||||
align: "center",
|
||||
field: "address",
|
||||
},
|
||||
{
|
||||
title: "经纬度",
|
||||
align: "center",
|
||||
field: "category",
|
||||
type: "jsx",
|
||||
render: ({ row }) => {
|
||||
return (
|
||||
<span>
|
||||
经度:{row.longitude}; 维度:{row.latitude}
|
||||
</span>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "营业执照",
|
||||
align: "center",
|
||||
field: "couponType",
|
||||
type: "jsx",
|
||||
render: ({ row }) => {
|
||||
return (
|
||||
<el-image
|
||||
preview-src-list={[row.license]}
|
||||
src={row.license}
|
||||
></el-image>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "评分",
|
||||
align: "center",
|
||||
field: "score",
|
||||
},
|
||||
{
|
||||
title: "收藏数量",
|
||||
align: "center",
|
||||
field: "collectCount",
|
||||
},
|
||||
{
|
||||
title: "点赞数量",
|
||||
align: "center",
|
||||
field: "likeItCount",
|
||||
},
|
||||
{
|
||||
title: "平台结算比例",
|
||||
align: "center",
|
||||
field: "platformSettleRatio",
|
||||
},
|
||||
{
|
||||
title: "代理商结算比例",
|
||||
align: "center",
|
||||
field: "agentSettleRatio",
|
||||
},
|
||||
{
|
||||
title: "加入时间",
|
||||
align: "center",
|
||||
field: "createTime",
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
align: "center",
|
||||
field: "status",
|
||||
type: "jsx",
|
||||
width: "120px",
|
||||
render: ({ row }) => {
|
||||
let changeState = () => {};
|
||||
return (
|
||||
<el-switch
|
||||
onchange={changeState}
|
||||
v-model={row.status}
|
||||
active-text="开"
|
||||
inactive-text="关"
|
||||
active-value={1}
|
||||
inactive-value={0}
|
||||
></el-switch>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
type: "jsx",
|
||||
align: "center",
|
||||
width: "140px",
|
||||
render: (row) => {
|
||||
let edit = () => {
|
||||
// this.$refs.viewDetails.toggle(row).update();
|
||||
};
|
||||
return (
|
||||
<div>
|
||||
<el-button size="mini" type="primary" onClick={edit}>
|
||||
详情
|
||||
</el-button>
|
||||
</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>
|
||||
|
||||
</style>
|
||||
<style lang="scss" scoped></style>
|
|
@ -1,15 +1,236 @@
|
|||
<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"
|
||||
:enableAutoQuery="false"
|
||||
>
|
||||
<template slot="tableTop">
|
||||
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||
<el-form-item label="摊铺名称">
|
||||
<el-input
|
||||
v-model="formInline.name"
|
||||
placeholder="摊铺名称搜索"
|
||||
></el-input>
|
||||
</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>
|
||||
<div class="mb-2"></div>
|
||||
</template>
|
||||
</obj-table-plus>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
|
||||
}
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
formInline: {
|
||||
name: "",
|
||||
},
|
||||
tableProp: {
|
||||
"auto-resize": true,
|
||||
border: true,
|
||||
height: "auto",
|
||||
"row-id": "id",
|
||||
"show-overflow": false,
|
||||
},
|
||||
productFilterType: "SALE",
|
||||
selectList: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
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();
|
||||
// });
|
||||
// });
|
||||
},
|
||||
Reset() {
|
||||
this.formInline = {
|
||||
name: "",
|
||||
};
|
||||
this.$refs.oTable.reload();
|
||||
},
|
||||
queryList(pageNo, pageSize) {
|
||||
this.$api.agent
|
||||
.agentShopPage({
|
||||
pageNumber: pageNo,
|
||||
pageSize: pageSize,
|
||||
...this.formInline,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
this.$refs.oTable.complete(
|
||||
res.data.data.content,
|
||||
Number(res.data.data.totalElements)
|
||||
);
|
||||
})
|
||||
.catch((err) => {
|
||||
this.$refs.oTable.complete(false);
|
||||
});
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
tableCols() {
|
||||
return [
|
||||
{ type: "checkbox", width: "60px", fixed: "left" },
|
||||
// { type: "seq", width: "60px", align: "center", title: "序号" },
|
||||
{
|
||||
title: "摊位名称",
|
||||
align: "center",
|
||||
field: "name",
|
||||
},
|
||||
{
|
||||
title: "菜市场名称",
|
||||
align: "center",
|
||||
field: "marketName",
|
||||
},
|
||||
{
|
||||
title: "地址",
|
||||
align: "center",
|
||||
field: "address",
|
||||
},
|
||||
{
|
||||
title: "经纬度",
|
||||
align: "center",
|
||||
field: "category",
|
||||
type: "jsx",
|
||||
render: ({ row }) => {
|
||||
return (
|
||||
<span>
|
||||
经度:{row.longitude}; 维度:{row.latitude}
|
||||
</span>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "营业执照",
|
||||
align: "center",
|
||||
field: "couponType",
|
||||
type: "jsx",
|
||||
render: ({ row }) => {
|
||||
return (
|
||||
<el-image
|
||||
preview-src-list={[row.license]}
|
||||
src={row.license}
|
||||
></el-image>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "评分",
|
||||
align: "center",
|
||||
field: "score",
|
||||
},
|
||||
{
|
||||
title: "收藏数量",
|
||||
align: "center",
|
||||
field: "collectCount",
|
||||
},
|
||||
{
|
||||
title: "点赞数量",
|
||||
align: "center",
|
||||
field: "likeItCount",
|
||||
},
|
||||
{
|
||||
title: "平台结算比例",
|
||||
align: "center",
|
||||
field: "platformSettleRatio",
|
||||
},
|
||||
{
|
||||
title: "代理商结算比例",
|
||||
align: "center",
|
||||
field: "agentSettleRatio",
|
||||
},
|
||||
{
|
||||
title: "加入时间",
|
||||
align: "center",
|
||||
field: "createTime",
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
align: "center",
|
||||
field: "status",
|
||||
type: "jsx",
|
||||
width: "120px",
|
||||
render: ({ row }) => {
|
||||
let changeState = () => {};
|
||||
return (
|
||||
<el-switch
|
||||
onchange={changeState}
|
||||
v-model={row.status}
|
||||
active-text="开"
|
||||
inactive-text="关"
|
||||
active-value={1}
|
||||
inactive-value={0}
|
||||
></el-switch>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
type: "jsx",
|
||||
align: "center",
|
||||
width: "140px",
|
||||
render: (row) => {
|
||||
let edit = () => {
|
||||
// this.$refs.viewDetails.toggle(row).update();
|
||||
};
|
||||
return (
|
||||
<div>
|
||||
<el-button size="mini" type="primary" onClick={edit}>
|
||||
详情
|
||||
</el-button>
|
||||
</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>
|
||||
|
||||
</style>
|
||||
<style lang="scss" scoped></style>
|
|
@ -311,11 +311,11 @@ export default {
|
|||
this.valueOne = [
|
||||
year + "-" + month + "-" + day + " 00:00:00",
|
||||
year + "-" + month + "-" + day + " 23:59:59",
|
||||
(this.formData.settleBeginDate =
|
||||
year + "-" + month + "-" + day + " 00:00:00"),
|
||||
(this.formData.settleEndDate =
|
||||
year + "-" + month + "-" + day + " 23:59:59"),
|
||||
];
|
||||
this.formData.settleBeginDate =
|
||||
year + "-" + month + "-" + day + " 00:00:00";
|
||||
this.formData.settleEndDate =
|
||||
year + "-" + month + "-" + day + " 23:59:59";
|
||||
this.getList();
|
||||
},
|
||||
changeValue(e) {
|
||||
|
|
|
@ -87,6 +87,8 @@
|
|||
</obj-table-plus>
|
||||
<!-- 添加或编辑 -->
|
||||
<add-or-update
|
||||
:marketId="formInline.marketId"
|
||||
:shopId="formInline.shopId"
|
||||
@queryList="$refs.oTable.reload()"
|
||||
ref="addOrUpdate"
|
||||
></add-or-update>
|
||||
|
|
|
@ -15,62 +15,7 @@
|
|||
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-form-item label="定金可退:" prop="isRefundEarnestMoney">
|
||||
<el-radio v-model="ruleForm.isRefundEarnestMoney" :label="1"
|
||||
>是</el-radio
|
||||
>
|
||||
|
@ -80,7 +25,7 @@
|
|||
<span>
|
||||
选择是,用户可在付尾款前申请退定金(申请后自动退,无需审核),或付尾款时间结束后系统自动退定金
|
||||
</span>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item v-if="isAdd" label="选择商品:">
|
||||
<el-button type="primary" @click="selectProduct"
|
||||
>点击请选择商品</el-button
|
||||
|
@ -93,7 +38,7 @@
|
|||
</div>
|
||||
<div v-if="isAdd" style="padding: 20px">
|
||||
<div
|
||||
v-for="item in ruleForm.productList"
|
||||
v-for="item in ruleForm.list"
|
||||
:key="item.id"
|
||||
style="border-top: 1px solid #ccc; padding: 10px 0 0 0"
|
||||
>
|
||||
|
@ -104,7 +49,7 @@
|
|||
<el-table
|
||||
border
|
||||
ref="multipleTable"
|
||||
:data="item.productSpecificationList"
|
||||
:data="item.pointsProductSpecList"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange"
|
||||
|
@ -366,52 +311,8 @@ export default {
|
|||
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"],
|
||||
},
|
||||
],
|
||||
},
|
||||
rules: {},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
@ -437,24 +338,17 @@ export default {
|
|||
}
|
||||
return {
|
||||
add: () => {
|
||||
this.orderTime = [];
|
||||
this.arrears = [];
|
||||
this.delivery = [];
|
||||
this.ruleForm = {
|
||||
startTime: "",
|
||||
endTime: "",
|
||||
balancePaymentStartTime: "",
|
||||
balancePaymentEndTime: "",
|
||||
estimatedStartDeliveryTime: "",
|
||||
estimatedEndDeliveryTime: "",
|
||||
productList: [],
|
||||
isRefundEarnestMoney: 1, //定金可退 1是 2否
|
||||
marketId: this.marketId,
|
||||
shopId: this.shopId,
|
||||
unitType: JSON.parse(sessionStorage.getItem("userInfo")).unitType,
|
||||
list: [],
|
||||
};
|
||||
this.modalConfig.title = "新增预售";
|
||||
this.modalConfig.title = "添加积分兑换商品";
|
||||
this.isAdd = true;
|
||||
},
|
||||
update: () => {
|
||||
this.modalConfig.title = "编辑预售";
|
||||
this.modalConfig.title = "编辑积分商品";
|
||||
this.isAdd = false;
|
||||
},
|
||||
};
|
||||
|
@ -484,39 +378,6 @@ export default {
|
|||
|
||||
// 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(() => {
|
||||
|
|
Loading…
Reference in New Issue