This commit is contained in:
KangKang0928 2024-12-19 20:03:29 +08:00
commit b1402b4d69
7 changed files with 425 additions and 308 deletions

View File

@ -106,4 +106,44 @@ export const marketing = {
params: data, params: data,
}); });
}, },
//批量新增会员积分商品
batchAddPointsProduct: (data) => {
return $http.request({
url: `/merchant-api/memberUnitPointsProduct/batchAdd`,
method: "post",
data,
});
},
// 会员积分商品详情
PointsProductDetail: (data) => {
return $http.request({
url: `/merchant-api/memberUnitPointsProduct/detail`,
method: "post",
data,
});
},
// 会员积分商品修改
updatePointsProductSave: (data) => {
return $http.request({
url: `/merchant-api/memberUnitPointsProduct/update`,
method: "post",
data,
});
},
// 会员积分商品删除
deletePointsProduct: (data) => {
return $http.request({
url: `/merchant-api/memberUnitPointsProduct/delete`,
method: "post",
data,
});
},
// 会员积分商品上下架
reverseEnablePointsProduct: (data) => {
return $http.request({
url: `/merchant-api/memberUnitPointsProduct/reverseEnable`,
method: "post",
data,
});
},
}; };

View File

@ -36,14 +36,14 @@
class="site-navbar__menu site-navbar__menu--right" class="site-navbar__menu site-navbar__menu--right"
mode="horizontal" mode="horizontal"
> >
<el-menu-item index="0" @click="openBigScreen"> <!-- <el-menu-item index="0" @click="openBigScreen">
<template slot="title"> <template slot="title">
<el-badge value=""> <el-badge value="">
<i class="el-icon-s-data"></i> <i class="el-icon-s-data"></i>
数据驾驶舱 数据驾驶舱
</el-badge> </el-badge>
</template> </template>
</el-menu-item> </el-menu-item> -->
<el-menu-item index="1" @click="$router.push({ name: 'theme' })"> <el-menu-item index="1" @click="$router.push({ name: 'theme' })">
<template slot="title"> <template slot="title">
<!-- 暂时不要右上角的图标 --> <!-- 暂时不要右上角的图标 -->

View File

@ -109,7 +109,7 @@
<el-form-item label="下单时间"> <el-form-item label="下单时间">
<el-date-picker <el-date-picker
@change="changeValue" @change="changeValue"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd"
v-model="value" v-model="value"
type="datetimerange" type="datetimerange"
start-placeholder="开始日期" start-placeholder="开始日期"
@ -120,7 +120,7 @@
<el-form-item label="结算时间"> <el-form-item label="结算时间">
<el-date-picker <el-date-picker
@change="changeValueOne" @change="changeValueOne"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd"
v-model="valueOne" v-model="valueOne"
type="datetimerange" type="datetimerange"
start-placeholder="开始日期" start-placeholder="开始日期"
@ -297,25 +297,25 @@ export default {
}); });
}, },
getCurrentDate() { getCurrentDate() {
let now = new Date(); // let now = new Date();
let year = now.getFullYear(); // let year = now.getFullYear();
let month = now.getMonth() + 1; // let month = now.getMonth() + 1;
let day = now.getDate(); // let day = now.getDate();
console.log(year, month, day); // console.log(year, month, day);
this.value = [ // this.value = [
year + "-" + month + "-" + day + " 00:00:00", // year + "-" + month + "-" + day,
year + "-" + month + "-" + day + " 23:59:59", // year + "-" + month + "-" + day,
]; // ];
this.formData.payBeginDate = year + "-" + month + "-" + day + " 00:00:00"; // this.formData.payBeginDate = year + "-" + month + "-" + day;
this.formData.payEndDate = year + "-" + month + "-" + day + " 23:59:59"; // this.formData.payEndDate = year + "-" + month + "-" + day;
this.valueOne = [ // this.valueOne = [
year + "-" + month + "-" + day + " 00:00:00", // year + "-" + month + "-" + day,
year + "-" + month + "-" + day + " 23:59:59", // year + "-" + month + "-" + day,
]; // ];
this.formData.settleBeginDate = // this.formData.settleBeginDate =
year + "-" + month + "-" + day + " 00:00:00"; // year + "-" + month + "-" + day;
this.formData.settleEndDate = // this.formData.settleEndDate =
year + "-" + month + "-" + day + " 23:59:59"; // year + "-" + month + "-" + day;
this.getList(); this.getList();
}, },
changeValue(e) { changeValue(e) {
@ -349,9 +349,9 @@ export default {
}, },
getStatus(row) { getStatus(row) {
if (row == 0) { if (row == 0) {
return "禁用"; return "待结算";
} else if (row == 1) { } else if (row == 1) {
return "启用"; return "部分结算";
} else if (row == 2) { } else if (row == 2) {
return " 已结算"; return " 已结算";
} else { } else {

View File

@ -121,6 +121,7 @@
:data="productList.viewPeopleList" :data="productList.viewPeopleList"
border border
style="width: 100%" style="width: 100%"
height="35vh"
> >
<el-table-column <el-table-column
align="center" align="center"
@ -160,6 +161,7 @@
:data="productList.payConversionList" :data="productList.payConversionList"
border border
style="width: 100%" style="width: 100%"
height="35vh"
> >
<el-table-column <el-table-column
align="center" align="center"

View File

@ -48,36 +48,11 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item label="积分数量">
<el-col :span="11">
<el-input-number
style="width: 150px"
controls-position="right"
:precision="0"
v-model="formInline.oneGoodsViewPoints"
:min="0"
label="请输入"
></el-input-number>
</el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="11">
<el-input-number
style="width: 150px"
controls-position="right"
:precision="0"
v-model="formInline.oneGoodsViewPoints"
:min="0"
label="请输入"
></el-input-number>
</el-col>
</el-form-item> -->
<el-form-item> <el-form-item>
<el-button type="primary" @click="$refs.oTable.reload()" <el-button type="primary" @click="$refs.oTable.reload()"
>查询</el-button >查询</el-button
> >
<el-button type="primary" @click="$refs.oTable.reload()" <el-button type="primary" @click="reset">重置</el-button>
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="mb-2"> <div class="mb-2">
@ -110,6 +85,9 @@ export default {
marketId: "", marketId: "",
shopId: "", shopId: "",
unitType: "", unitType: "",
productId: "",
productName: "",
redeemEnable: "",
}, },
tableProp: { tableProp: {
"auto-resize": true, "auto-resize": true,
@ -134,15 +112,6 @@ export default {
}); });
}, },
methods: { methods: {
getData() {
this.$api.marketing.PointsProductPage(this.formInline).then((res) => {
this.storeList = res.data.data;
// this.formInline.shopId = res.data.data[0].shopId;
this.$nextTick(() => {
this.$refs.oTable.reload();
});
});
},
queryList(pageNo, pageSize) { queryList(pageNo, pageSize) {
this.$api.marketing this.$api.marketing
.PointsProductPage({ .PointsProductPage({
@ -164,6 +133,14 @@ export default {
add() { add() {
this.$refs.addOrUpdate.toggle().add(); this.$refs.addOrUpdate.toggle().add();
}, },
reset() {
this.formInline = {
unitType: JSON.parse(sessionStorage.getItem("userInfo")).unitType,
marketId: this.marketId,
shopId: this.shopId,
};
this.$refs.oTable.reload();
},
}, },
computed: { computed: {
tableCols() { tableCols() {
@ -178,54 +155,146 @@ export default {
{ {
title: "商品名称", title: "商品名称",
align: "center", align: "center",
field: "publisher", field: "productName",
type: "jsx",
render: ({ row }) => {
if (row.publisher === "MERCHANT") {
return <span>店铺</span>;
} else if (row.publisher == "PLATFORM") {
return <span>平台</span>;
}
},
}, },
{ {
title: "兑换积分", title: "兑换积分",
align: "center", align: "center",
field: "name", field: "maxPoints",
type: "jsx",
render: ({ row }) => {
if (row.minPoints == row.maxPoints) {
return <span>{row.minPoints}</span>;
} else {
return (
<span>
{row.minPoints}-{row.maxPoints}
</span>
);
}
},
}, },
{ {
title: "剩余兑换库存", title: "剩余兑换库存",
align: "center", align: "center",
field: "name", field: "totalInventory",
}, },
{ {
title: "兑换状态", title: "兑换状态",
align: "center", align: "center",
field: "name", field: "redeemEnable",
type: "jsx",
render: ({ row }) => {
let changStatus = () => {
if (row.redeemEnable) {
this.$confirm("是否开启积分商品兑换, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$api.marketing
.reverseEnablePointsProduct({
id: row.id,
})
.then((res) => {
this.$refs.oTable.reload();
})
.catch((err) => {
this.$refs.oTable.reload();
});
})
.catch(() => {
this.$refs.oTable.reload();
});
} else {
this.$confirm("是否关闭积分商品兑换, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$api.marketing
.reverseEnablePointsProduct({
id: row.id,
})
.then((res) => {
this.$refs.oTable.reload();
})
.catch((err) => {
this.$refs.oTable.reload();
});
})
.catch(() => {
this.$refs.oTable.reload();
});
}
};
return (
<el-switch
onChange={changStatus}
v-model={row.redeemEnable}
active-text="启用"
inactive-text="关闭"
></el-switch>
);
},
}, },
{ {
title: "已兑换数", title: "已兑换数",
align: "center", align: "center",
field: "name", field: "totalRedeemQuantity",
}, },
{ {
title: "操作", title: "操作",
fixed: "right", fixed: "right",
type: "jsx", type: "jsx",
align: "center", align: "center",
width: "140px", width: "200px",
render: (row) => { render: ({ row }) => {
let edit = () => { let edit = () => {
// this.$refs.viewDetails.toggle(row).update(); this.$api.marketing
.PointsProductDetail({
id: row.id,
})
.then((res) => {
this.$refs.addOrUpdate
.toggle({ ...res.data.data, productName: row.productName })
.update();
})
.catch((err) => {});
};
let deleteProduct = () => {
this.$api.marketing
.deletePointsProduct({ id: row.id })
.then((res) => {
this.$message.success("删除成功");
this.$refs.oTable.reload();
})
.catch((err) => {});
}; };
return ( return (
<div> <div>
<el-button size="mini" type="primary" onClick={edit}> <el-button
style="margin-right:10px"
size="mini"
type="primary"
onClick={edit}
>
编辑 编辑
</el-button> </el-button>
<el-button size="mini" type="danger" onClick={edit}> <el-popconfirm
删除 confirm-button-text="确定"
</el-button> cancel-button-text="取消"
icon="el-icon-info"
icon-color="red"
onConfirm={deleteProduct}
title="确定删除吗?"
>
<el-button size="mini" slot="reference" type="danger">
删除
</el-button>
</el-popconfirm>
</div> </div>
); );
}, },

View File

@ -54,7 +54,7 @@
style="width: 100%" style="width: 100%"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column align="center" label="是否预售" width="80"> <!-- <el-table-column align="center" label="是否兑换" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox <el-checkbox
:true-label="1" :true-label="1"
@ -62,12 +62,16 @@
v-model="scope.row.isAdvanceSell" v-model="scope.row.isAdvanceSell"
></el-checkbox> ></el-checkbox>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column align="center" label="SKU-ID" prop="id" /> <el-table-column
align="center"
label="SKU-ID"
prop="productSpecId"
/>
<el-table-column <el-table-column
align="center" align="center"
label="规格" label="规格"
prop="attributeList" prop="attributeValue"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.attributeValue }}</span> <span>{{ scope.row.attributeValue }}</span>
@ -88,191 +92,190 @@
prop="marketPrice" prop="marketPrice"
width="120" width="120"
/> />
<el-table-column align="center" label="*是否预售" width="200"> <el-table-column
align="center"
label="*兑换所需积分"
width="200"
>
<template slot="header"> <template slot="header">
<span style="color: red">*预售价</span> <span style="color: red">*兑换所需积分</span>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number <el-input-number
v-if="scope.row.isAdvanceSell" v-model="scope.row.redeemRequiredPoints"
@change="
scope.row.balancePayment =
scope.row.presalePrice - scope.row.earnestMoney
"
v-model="scope.row.presalePrice"
:min="0" :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" :precision="0"
label="请输入预售库存" label="请输入兑换所需积分"
></el-input-number> ></el-input-number>
</template> </template>
</el-table-column> </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-model="scope.row.redeemInventory"
:min="0"
:precision="0"
:step="10"
label="请输入兑换库存"
></el-input-number>
</template>
</el-table-column>
<el-table-column
align="center"
label="*限制兑换输入0则不限"
width="200"
>
<template slot="header">
<span style="color: red">*限制兑换输入0则不限</span>
</template>
<template slot-scope="scope">
<el-input-number
v-model="scope.row.redeemRestrictions"
:min="0"
:precision="0"
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-select
size="mini"
v-model="scope.row.redeemRestrictionsType"
placeholder="请选择"
>
<el-option
v-for="item in [
{ value: 1, label: '每天' },
{ value: 2, label: '永久' },
]"
:key="item.value"
:value="item.value"
:label="item.label"
>
</el-option>
</el-select>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
<el-empty <el-empty
v-show="ruleForm.productList.length == 0" v-show="ruleForm.list?.length == 0"
description="请选择商品" description="请选择商品"
></el-empty> ></el-empty>
</div> </div>
<div v-else style="padding: 20px"> <div v-else style="padding: 20px">
<div style="border-top: 1px solid #ccc; padding: 10px 0 0 0"> <div style="border-top: 1px solid #ccc; padding: 10px 0 0 0">
<div style="font-size: 16px; margin-bottom: 20px"> <div style="font-size: 16px; margin-bottom: 20px">
<span>商品ID:{{ ruleForm.productId }}</span> <span>商品ID:{{ ruleForm.id }}</span>
<span style="margin-left: 20px" <span style="margin-left: 20px"
>商品名称:{{ ruleForm.name }}</span >商品名称:{{ ruleForm.productName }}</span
> >
</div> </div>
<el-table <el-table
border border
ref="multipleTable" ref="multipleTable"
:data="ruleForm.productSpecificationList" :data="ruleForm.pointsProductSpecList"
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%"
@selection-change="handleSelectionChange" @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 <el-table-column
align="center" align="center"
label="规格" label="SKU-ID"
prop="attributeList" prop="productSpecId"
>
<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"> <el-table-column
align="center"
label="*兑换所需积分"
width="200"
>
<template slot="header"> <template slot="header">
<span style="color: red">*预售价</span> <span style="color: red">*兑换所需积分</span>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number <el-input-number
v-if="scope.row.isAdvanceSell" v-model="scope.row.redeemRequiredPoints"
@change="
scope.row.balancePayment =
scope.row.presalePrice - scope.row.earnestMoney
"
v-model="scope.row.presalePrice"
:min="0" :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" :precision="0"
label="请输入预售库存" label="请输入兑换所需积分"
></el-input-number> ></el-input-number>
</template> </template>
</el-table-column> </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-model="scope.row.redeemInventory"
:min="0"
:precision="0"
:step="10"
label="请输入兑换库存"
></el-input-number>
</template>
</el-table-column>
<el-table-column
align="center"
label="*限制兑换输入0则不限"
width="200"
>
<template slot="header">
<span style="color: red">*限制兑换输入0则不限</span>
</template>
<template slot-scope="scope">
<el-input-number
v-model="scope.row.redeemRestrictions"
:min="0"
:precision="0"
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-select
size="mini"
v-model="scope.row.redeemRestrictionsType"
placeholder="请选择"
>
<el-option
v-for="item in [
{ value: 1, label: '每天' },
{ value: 2, label: '永久' },
]"
:key="item.value"
:value="item.value"
:label="item.label"
>
</el-option>
</el-select>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
<el-empty <!-- <el-empty
v-show="ruleForm.productList?.length == 0" v-show="ruleForm.list?.length == 0"
description="请选择商品" description="请选择商品"
></el-empty> ></el-empty> -->
</div> </div>
</el-form> </el-form>
</div> </div>
@ -354,27 +357,7 @@ export default {
}; };
}, },
init(row) { init(row) {
console.log(row.startTime, row.endTime); this.ruleForm = row;
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; // this.ruleForm = row;
}, },
@ -391,14 +374,26 @@ export default {
console.log(e); console.log(e);
}, },
getProduct(row) { getProduct(row) {
this.ruleForm.productList = row.map((item) => { this.ruleForm.list = row.map((item) => {
let data = item.productSpecificationList.map((i) => {
return {
productSpecId: i.id,
redeemRequiredPoints: 0,
redeemInventory: 0,
redeemRestrictions: 0,
redeemRestrictionsType: 1,
attributeValue: i.attributeValue,
attributeList: i.attributeList,
marketPrice: i.marketPrice,
};
});
return { return {
productId: item.id, productId: item.id,
name: item.name, name: item.name,
productSpecificationList: item.productSpecificationList, redeemEnable: false,
pointsProductSpecList: data,
}; };
}); });
console.log(this.ruleForm.productList, this.ruleForm.productList.length);
console.log("获取商品"); console.log("获取商品");
}, },
@ -421,8 +416,8 @@ export default {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (valid) { if (valid) {
console.log(valid); console.log(valid);
this.$api.preSale this.$api.marketing
.addPreSaleProducts(this.ruleForm) .batchAddPointsProduct(this.ruleForm)
.then((res) => { .then((res) => {
this.$emit("queryList"); this.$emit("queryList");
this.toggle(); this.toggle();
@ -433,8 +428,8 @@ export default {
this.$refs.ruleForm.validate((valid) => { this.$refs.ruleForm.validate((valid) => {
if (valid) { if (valid) {
console.log(valid); console.log(valid);
this.$api.preSale this.$api.marketing
.updatePreSaleProducts(this.ruleForm) .updatePointsProductSave(this.ruleForm)
.then((res) => { .then((res) => {
this.$emit("queryList"); this.$emit("queryList");
this.toggle(); this.toggle();

View File

@ -9,29 +9,36 @@
@query="queryList" @query="queryList"
v-model="dataList" v-model="dataList"
:tableEvent="tableEvent" :tableEvent="tableEvent"
:enableAutoQuery="false"
> >
<template slot="tableTop"> <template slot="tableTop">
<el-form :inline="true" :model="formInline" class="demo-form-inline"> <el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="订单号"> <el-form-item label="订单号">
<el-input <el-select v-model="formInline.group" placeholder="请选择">
v-model="formInline.name" <el-option
placeholder="订单号搜索" v-for="item in statusList"
></el-input> :key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="商品名称"> <el-form-item v-if="storeList.length > 1" label="摊铺">
<el-input <el-select
v-model="formInline.name" class="filter-item"
placeholder="商品名称或id" style="width: 200px"
></el-input> v-model="formInline.shopId"
</el-form-item> placeholder="请选择摊铺"
<el-form-item label="下单时间">
<el-date-picker
v-model="value1"
type="datetimerange"
start-placeholder="开始日期"
end-placeholder="结束日期"
> >
</el-date-picker> <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>
<el-form-item> <el-form-item>
<el-button type="primary" @click="$refs.oTable.reload()" <el-button type="primary" @click="$refs.oTable.reload()"
@ -60,10 +67,10 @@
</template> </template>
<script> <script>
import content from './content.vue' import content from "./content.vue";
import { mapState } from "vuex"; import { mapState } from "vuex";
export default { export default {
components: {content}, components: { content },
data() { data() {
return { return {
activeName: "5", activeName: "5",
@ -71,8 +78,7 @@ export default {
advanceSellStatus: "", advanceSellStatus: "",
dataList: [], dataList: [],
formInline: { formInline: {
name: "", group: "",
marketId: "",
shopId: "", shopId: "",
}, },
tableProp: { tableProp: {
@ -84,39 +90,43 @@ export default {
}, },
statusList: [ statusList: [
{ {
label: "全部", label: "历史订单",
value: "5",
},
{
label: "代发货",
value: "0", value: "0",
}, },
{ {
label: "带收货", label: "进行中",
value: "1", value: "1",
}, },
{ {
label: "待评价", label: "新订单",
value: "2", value: "2",
}, },
{ {
label: "已取消", label: "待备货",
value: "3", value: "3",
}, },
{ {
label: "交易关闭", label: "待配送",
value: "3", value: "4",
}, },
{ {
label: "已完成", label: "售后订单",
value: "3", value: "5",
}, },
], ],
productFilterType: "SALE", productFilterType: "SALE",
selectList: [], selectList: [],
}; };
}, },
created() {}, created() {
this.formInline = {
group: "0",
shopId: this.shopId,
};
this.$nextTick(() => {
this.$refs.oTable.reload();
});
},
methods: { methods: {
// getData() { // getData() {
// this.$api.mer_admin // this.$api.mer_admin
@ -160,9 +170,7 @@ export default {
.orderPage({ .orderPage({
pageNumber: pageNo, pageNumber: pageNo,
pageSize: pageSize, pageSize: pageSize,
group: 0, ...this.formInline,
shopId: this.shopId,
// ...this.formInline,
}) })
.then((res) => { .then((res) => {
console.log(res); console.log(res);
@ -177,9 +185,8 @@ export default {
}, },
Reset() { Reset() {
this.formInline = { this.formInline = {
name: "", group: "0",
marketId: JSON.parse(sessionStorage.getItem("userInfo")).markets[0] shopId: this.shopId,
.marketId,
}; };
this.$refs.oTable.reload(); this.$refs.oTable.reload();
}, },
@ -200,7 +207,24 @@ export default {
tableCols() { tableCols() {
return [ return [
// { type: "checkbox", width: "60px", fixed: "left" }, // { type: "checkbox", width: "60px", fixed: "left" },
{ type: "seq", width: "60px", align: "center", title: "序号" }, {
type: "seq",
width: "60px",
fixed: "left",
align: "center",
title: "序号",
},
{
title: "商品详情",
// align: "center",
// width: "120px",
// field: "unitOrderStatus",
type: "jsx-out",
render: (col) => {
console.log(col);
return <content />;
},
},
{ {
title: "总订单号", title: "总订单号",
align: "center", align: "center",
@ -213,19 +237,6 @@ export default {
width: "120px", width: "120px",
field: "unitOrderNo", field: "unitOrderNo",
}, },
{
// title: "",
// align: "center",
// width: "120px",
// field: "unitOrderStatus",
type: "jsx-out",
render: (col) => {
console.log(col);
return (
<content />
);
},
},
{ {
title: "总商品数量", title: "总商品数量",
align: "center", align: "center",