Compare commits

..

No commits in common. "a069ca5eaecefef43d832b09fc545369441d9296" and "ab920f2bc3f6f2f61f1e6da242f81ee17506b0e8" have entirely different histories.

7 changed files with 290 additions and 407 deletions

View File

@ -106,44 +106,4 @@ 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" value-format="yyyy-MM-dd HH:mm:ss"
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" value-format="yyyy-MM-dd HH:mm:ss"
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, year + "-" + month + "-" + day + " 00:00:00",
// year + "-" + month + "-" + day, year + "-" + month + "-" + day + " 23:59:59",
// ]; ];
// this.formData.payBeginDate = year + "-" + month + "-" + day; this.formData.payBeginDate = year + "-" + month + "-" + day + " 00:00:00";
// this.formData.payEndDate = year + "-" + month + "-" + day; this.formData.payEndDate = year + "-" + month + "-" + day + " 23:59:59";
// this.valueOne = [ this.valueOne = [
// year + "-" + month + "-" + day, year + "-" + month + "-" + day + " 00:00:00",
// year + "-" + month + "-" + day, year + "-" + month + "-" + day + " 23:59:59",
// ]; ];
// this.formData.settleBeginDate = this.formData.settleBeginDate =
// year + "-" + month + "-" + day; year + "-" + month + "-" + day + " 00:00:00";
// this.formData.settleEndDate = this.formData.settleEndDate =
// year + "-" + month + "-" + day; year + "-" + month + "-" + day + " 23:59:59";
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,7 +121,6 @@
: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"
@ -161,7 +160,6 @@
: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,11 +48,36 @@
></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="reset">重置</el-button> <el-button type="primary" @click="$refs.oTable.reload()"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="mb-2"> <div class="mb-2">
@ -85,9 +110,6 @@ export default {
marketId: "", marketId: "",
shopId: "", shopId: "",
unitType: "", unitType: "",
productId: "",
productName: "",
redeemEnable: "",
}, },
tableProp: { tableProp: {
"auto-resize": true, "auto-resize": true,
@ -112,6 +134,15 @@ 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({
@ -133,14 +164,6 @@ 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() {
@ -155,146 +178,54 @@ export default {
{ {
title: "商品名称", title: "商品名称",
align: "center", align: "center",
field: "productName", field: "publisher",
},
{
title: "兑换积分",
align: "center",
field: "maxPoints",
type: "jsx", type: "jsx",
render: ({ row }) => { render: ({ row }) => {
if (row.minPoints == row.maxPoints) { if (row.publisher === "MERCHANT") {
return <span>{row.minPoints}</span>; return <span>店铺</span>;
} else { } else if (row.publisher == "PLATFORM") {
return ( return <span>平台</span>;
<span>
{row.minPoints}-{row.maxPoints}
</span>
);
} }
}, },
}, },
{
title: "兑换积分",
align: "center",
field: "name",
},
{ {
title: "剩余兑换库存", title: "剩余兑换库存",
align: "center", align: "center",
field: "totalInventory", field: "name",
}, },
{ {
title: "兑换状态", title: "兑换状态",
align: "center", align: "center",
field: "redeemEnable", field: "name",
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: "totalRedeemQuantity", field: "name",
}, },
{ {
title: "操作", title: "操作",
fixed: "right", fixed: "right",
type: "jsx", type: "jsx",
align: "center", align: "center",
width: "200px", width: "140px",
render: ({ row }) => { render: (row) => {
let edit = () => { let edit = () => {
this.$api.marketing // this.$refs.viewDetails.toggle(row).update();
.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 <el-button size="mini" type="primary" onClick={edit}>
style="margin-right:10px"
size="mini"
type="primary"
onClick={edit}
>
编辑 编辑
</el-button> </el-button>
<el-popconfirm <el-button size="mini" type="danger" onClick={edit}>
confirm-button-text="确定" 删除
cancel-button-text="取消" </el-button>
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,16 +62,12 @@
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 <el-table-column align="center" label="SKU-ID" prop="id" />
align="center"
label="SKU-ID"
prop="productSpecId"
/>
<el-table-column <el-table-column
align="center" align="center"
label="规格" label="规格"
prop="attributeValue" prop="attributeList"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.attributeValue }}</span> <span>{{ scope.row.attributeValue }}</span>
@ -92,190 +88,191 @@
prop="marketPrice" prop="marketPrice"
width="120" width="120"
/> />
<el-table-column <el-table-column align="center" label="*是否预售" width="200">
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-model="scope.row.redeemRequiredPoints" v-if="scope.row.isAdvanceSell"
@change="
scope.row.balancePayment =
scope.row.presalePrice - scope.row.earnestMoney
"
v-model="scope.row.presalePrice"
:min="0" :min="0"
:precision="0" :max="scope.row.marketPrice"
label="请输入兑换所需积分" label="请输入销售价"
></el-input-number> ></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
<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-model="scope.row.redeemInventory" @change="
scope.row.balancePayment =
scope.row.presalePrice - scope.row.earnestMoney
"
v-if="scope.row.isAdvanceSell"
v-model="scope.row.earnestMoney"
:min="0" :min="0"
:precision="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" :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" :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-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.list?.length == 0" v-show="ruleForm.productList.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.id }}</span> <span>商品ID:{{ ruleForm.productId }}</span>
<span style="margin-left: 20px" <span style="margin-left: 20px"
>商品名称:{{ ruleForm.productName }}</span >商品名称:{{ ruleForm.name }}</span
> >
</div> </div>
<el-table <el-table
border border
ref="multipleTable" ref="multipleTable"
:data="ruleForm.pointsProductSpecList" :data="ruleForm.productSpecificationList"
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="SKU-ID" label="规格"
prop="productSpecId" 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 <el-table-column align="center" label="*是否预售" width="200">
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-model="scope.row.redeemRequiredPoints" v-if="scope.row.isAdvanceSell"
@change="
scope.row.balancePayment =
scope.row.presalePrice - scope.row.earnestMoney
"
v-model="scope.row.presalePrice"
:min="0" :min="0"
:precision="0" :max="scope.row.marketPrice"
label="请输入兑换所需积分" label="请输入销售价"
></el-input-number> ></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
<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-model="scope.row.redeemInventory" @change="
scope.row.balancePayment =
scope.row.presalePrice - scope.row.earnestMoney
"
v-if="scope.row.isAdvanceSell"
v-model="scope.row.earnestMoney"
:min="0" :min="0"
:precision="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" :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" :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-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.list?.length == 0" v-show="ruleForm.productList?.length == 0"
description="请选择商品" description="请选择商品"
></el-empty> --> ></el-empty>
</div> </div>
</el-form> </el-form>
</div> </div>
@ -357,7 +354,27 @@ export default {
}; };
}, },
init(row) { init(row) {
this.ruleForm = 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; // this.ruleForm = row;
}, },
@ -374,26 +391,14 @@ export default {
console.log(e); console.log(e);
}, },
getProduct(row) { getProduct(row) {
this.ruleForm.list = row.map((item) => { this.ruleForm.productList = 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,
redeemEnable: false, productSpecificationList: item.productSpecificationList,
pointsProductSpecList: data,
}; };
}); });
console.log(this.ruleForm.productList, this.ruleForm.productList.length);
console.log("获取商品"); console.log("获取商品");
}, },
@ -416,8 +421,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.marketing this.$api.preSale
.batchAddPointsProduct(this.ruleForm) .addPreSaleProducts(this.ruleForm)
.then((res) => { .then((res) => {
this.$emit("queryList"); this.$emit("queryList");
this.toggle(); this.toggle();
@ -428,8 +433,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.marketing this.$api.preSale
.updatePointsProductSave(this.ruleForm) .updatePreSaleProducts(this.ruleForm)
.then((res) => { .then((res) => {
this.$emit("queryList"); this.$emit("queryList");
this.toggle(); this.toggle();

View File

@ -9,36 +9,29 @@
@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-select v-model="formInline.group" placeholder="请选择"> <el-input
<el-option v-model="formInline.name"
v-for="item in statusList" placeholder="订单号搜索"
:key="item.value" ></el-input>
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="storeList.length > 1" label="摊铺"> <el-form-item label="商品名称">
<el-select <el-input
class="filter-item" v-model="formInline.name"
style="width: 200px" placeholder="商品名称或id"
v-model="formInline.shopId" ></el-input>
placeholder="请选择摊铺" </el-form-item>
<el-form-item label="下单时间">
<el-date-picker
v-model="value1"
type="datetimerange"
start-placeholder="开始日期"
end-placeholder="结束日期"
> >
<el-option </el-date-picker>
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()"
@ -67,10 +60,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",
@ -78,7 +71,8 @@ export default {
advanceSellStatus: "", advanceSellStatus: "",
dataList: [], dataList: [],
formInline: { formInline: {
group: "", name: "",
marketId: "",
shopId: "", shopId: "",
}, },
tableProp: { tableProp: {
@ -90,43 +84,39 @@ 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: "4", value: "3",
}, },
{ {
label: "售后订单", label: "已完成",
value: "5", value: "3",
}, },
], ],
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
@ -170,7 +160,9 @@ export default {
.orderPage({ .orderPage({
pageNumber: pageNo, pageNumber: pageNo,
pageSize: pageSize, pageSize: pageSize,
...this.formInline, group: 0,
shopId: this.shopId,
// ...this.formInline,
}) })
.then((res) => { .then((res) => {
console.log(res); console.log(res);
@ -185,8 +177,9 @@ export default {
}, },
Reset() { Reset() {
this.formInline = { this.formInline = {
group: "0", name: "",
shopId: this.shopId, marketId: JSON.parse(sessionStorage.getItem("userInfo")).markets[0]
.marketId,
}; };
this.$refs.oTable.reload(); this.$refs.oTable.reload();
}, },
@ -207,24 +200,7 @@ 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",
@ -237,6 +213,19 @@ 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",