添加:商户添加积分商品相关处理
This commit is contained in:
parent
ceb1aa8b33
commit
1b96cb80ca
|
|
@ -488,3 +488,99 @@ export function holdIntegralList(data) {
|
|||
export function holdIntegralTitleApi() {
|
||||
return request.get(`integral/hold_list_title`)
|
||||
}
|
||||
|
||||
// 积分商品分类 -- 列表
|
||||
export function integralCategoryListApi() {
|
||||
return request.get('points/cate/lst')
|
||||
}
|
||||
// 积分商品分类 -- 新增表单
|
||||
export function integralCategoryCreateApi() {
|
||||
return request.get('points/cate/create/form')
|
||||
}
|
||||
|
||||
// 积分商品分类 -- 编辑表单
|
||||
export function integralCategoryUpdateApi(id) {
|
||||
return request.get(`points/cate/update/form/${id}`)
|
||||
}
|
||||
|
||||
// 积分商品分类 -- 删除
|
||||
export function integralCategoryDeleteApi(id) {
|
||||
return request.delete(`points/cate/delete/${id}`)
|
||||
}
|
||||
|
||||
// 积分商品分类 -- 修改状态
|
||||
export function integralCategoryStatusApi(id, status) {
|
||||
return request.post(`points/cate/status/${id}`, {status})
|
||||
}
|
||||
|
||||
// 积分商品 -- 商品列表
|
||||
export function integralProList(data) {
|
||||
return request.get(`points/product/lst`, data)
|
||||
}
|
||||
|
||||
// 积分商品 -- 删除
|
||||
export function integralProDeleteApi(id) {
|
||||
return request.delete(`points/product/delete/${id}`)
|
||||
}
|
||||
|
||||
// 积分商品 -- 修改状态
|
||||
export function integralProductStatusApi(id, status) {
|
||||
return request.post(`points/product/status/${id}`, {status})
|
||||
}
|
||||
|
||||
// 积分商品 -- 创建商品
|
||||
export function createIntegralProduct(data) {
|
||||
return request.post(`points/product/create`, data)
|
||||
}
|
||||
// 积分商品 -- 商品详情
|
||||
export function integralProDetailApi(id) {
|
||||
return request.get(`points/product/detail/${id}`)
|
||||
}
|
||||
// 积分商品 -- 商品分类选择
|
||||
export function integralProCateSelect() {
|
||||
return request.get(`points/cate/select`)
|
||||
}
|
||||
// 积分商品 -- 编辑商品
|
||||
export function integralProUpdateApi(id, data) {
|
||||
return request.post(`points/product/update/${id}`, data)
|
||||
}
|
||||
// 积分商品列表 -- 立即生成规格
|
||||
export function generateAttrApi(id, data) {
|
||||
return request.post(`points/product/get_attr_value/${id}`, data)
|
||||
}
|
||||
// 积分订单 -- 列表
|
||||
export function integralOrderLstApi(data) {
|
||||
return request.get(`points/order/lst`, data)
|
||||
}
|
||||
// 积分订单 -- 导出
|
||||
export function integralOrderExcelApi(data) {
|
||||
return request.get(`points/order/excel`, data)
|
||||
}
|
||||
// 积分订单 -- 快递公司列表
|
||||
export function expressOptionsApi(data) {
|
||||
return request.get(`expr/options`)
|
||||
}
|
||||
// 积分订单 -- 发货
|
||||
export function integralDelivery(id, data) {
|
||||
return request.post(`points/order/delivery/${id}`, data)
|
||||
}
|
||||
// 积分订单 -- 删除
|
||||
export function integralOrderDeleteApi(id) {
|
||||
return request.delete(`points/order/delete/${id}`)
|
||||
}
|
||||
// 积分订单 -- 快递查询
|
||||
export function integralOrderExpressApi(id) {
|
||||
return request.get(`points/order/express/${id}`)
|
||||
}
|
||||
// 积分订单 -- 详情
|
||||
export function integralOrderDetailApi(id) {
|
||||
return request.get(`points/order/detail/${id}`)
|
||||
}
|
||||
// 积分订单 -- 订单记录
|
||||
export function integralOrderLog(id, data) {
|
||||
return request.get(`points/order/status/${id}`, data)
|
||||
}
|
||||
// 积分订单 -- 备注
|
||||
export function integralMarkApi(id) {
|
||||
return request.get(`points/order/mark/${id}/form`)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,6 +140,12 @@ export function categorySelectApi() {
|
|||
export function categoryListApi() {
|
||||
return request.get(`store/category/list`)
|
||||
}
|
||||
/**
|
||||
* @description 商户商品列表 -- 选择弹窗
|
||||
*/
|
||||
export function merProductLstApi(data) {
|
||||
return request.get(`store/product/list`, data)
|
||||
}
|
||||
/**
|
||||
* @description 商品列表 -- 品牌分类
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -302,6 +302,42 @@ const marketingRouter =
|
|||
},
|
||||
component: () => import('@/views/marketing/integral/log/index')
|
||||
},
|
||||
{
|
||||
path: 'classify',
|
||||
name: `integralClassify`,
|
||||
meta: {
|
||||
title: '积分商品分类',
|
||||
noCache: true
|
||||
},
|
||||
component: () => import('@/views/marketing/integral/classify/index')
|
||||
},
|
||||
{
|
||||
path: 'proList',
|
||||
name: `integralProductList`,
|
||||
meta: {
|
||||
title: '积分商品列表',
|
||||
noCache: true
|
||||
},
|
||||
component: () => import('@/views/marketing/integral/productList/index')
|
||||
},
|
||||
{
|
||||
path: 'addProduct/:id?/:edit?',
|
||||
name: `addIntegralProduct`,
|
||||
meta: {
|
||||
title: '添加积分商品',
|
||||
noCache: true
|
||||
},
|
||||
component: () => import('@/views/marketing/integral/addProduct/index')
|
||||
},
|
||||
{
|
||||
path: 'orderList',
|
||||
name: `IntegralOrderList`,
|
||||
meta: {
|
||||
title: '兑换记录',
|
||||
noCache: true
|
||||
},
|
||||
component: () => import('@/views/marketing/integral/orderList/index')
|
||||
},
|
||||
{
|
||||
path: 'give',
|
||||
name: `integralGive`,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
|
||||
export default {
|
||||
shortcuts: [
|
||||
{
|
||||
text: '今天',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()));
|
||||
picker.$emit('pick', [start, end]);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '昨天',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(
|
||||
start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1)),
|
||||
);
|
||||
end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1)));
|
||||
picker.$emit('pick', [start, end]);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '最近7天',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
picker.$emit('pick', [start, end]);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '最近30天',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||
picker.$emit('pick', [start, end]);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '本月',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), 1)));
|
||||
picker.$emit('pick', [start, end]);
|
||||
},
|
||||
},
|
||||
{
|
||||
text: '本年',
|
||||
onClick(picker) {
|
||||
const end = new Date();
|
||||
const start = new Date();
|
||||
start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
|
||||
picker.$emit('pick', [start, end]);
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
<template>
|
||||
<el-dialog v-if="showRecord" title="复制记录" :visible.sync="showRecord" width="900px">
|
||||
<div v-loading="loading">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData.data"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
class="table"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column label="ID" prop="mer_id" min-width="50" />
|
||||
<el-table-column label="使用次数" prop="num" min-width="80" />
|
||||
<el-table-column label="复制商品平台名称" prop="type" min-width="120" />
|
||||
<el-table-column label="剩余次数" prop="number" min-width="80" />
|
||||
<el-table-column label="商品复制链接" prop="info" min-width="180" />
|
||||
<el-table-column label="操作时间" prop="create_time" min-width="120" />
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:page-sizes="[10, 20]"
|
||||
:page-size="tableFrom.limit"
|
||||
:current-page="tableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { productCopyRecordApi } from '@/api/product'
|
||||
export default {
|
||||
name: 'CopyRecord',
|
||||
data() {
|
||||
return {
|
||||
showRecord: false,
|
||||
loading: false,
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 10
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getRecord() {
|
||||
this.showRecord = true
|
||||
this.loading = true
|
||||
productCopyRecordApi(this.tableFrom)
|
||||
.then((res) => {
|
||||
this.tableData.data = res.data.list
|
||||
this.tableData.total = res.data.count
|
||||
this.loading = false
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$message.error(res.message)
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
|
||||
pageChange(page) {
|
||||
this.tableFrom.page = page
|
||||
this.getRecord()
|
||||
},
|
||||
pageChangeLog(page) {
|
||||
this.tableFromLog.page = page
|
||||
this.getRecord()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableFrom.limit = val
|
||||
this.getRecord()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.title {
|
||||
margin-bottom: 16px;
|
||||
color: #17233d;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
}
|
||||
.description {
|
||||
&-term {
|
||||
display: table-cell;
|
||||
padding-bottom: 10px;
|
||||
line-height: 20px;
|
||||
width: 50%;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,143 @@
|
|||
<template>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button size="small" type="primary" class="mb20" @click="onAdd">添加积分商品分类</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData.data"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
row-key="store_category_id"
|
||||
>
|
||||
<el-table-column
|
||||
label="分类名称"
|
||||
min-width="200"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.cate_name + ' [ ' + scope.row.store_category_id + ' ]' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="sort"
|
||||
label="排序"
|
||||
min-width="50"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="status"
|
||||
label="是否显示"
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.is_show"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
active-text="显示"
|
||||
inactive-text="隐藏"
|
||||
@change="onchangeIsShow(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="create_time"
|
||||
label="创建时间"
|
||||
min-width="150"
|
||||
/>
|
||||
<el-table-column label="操作" min-width="100" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="onEdit(scope.row.store_category_id)">编辑</el-button>
|
||||
<el-button type="text" size="small" @click="handleDelete(scope.row, scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {
|
||||
integralCategoryListApi, integralCategoryCreateApi, integralCategoryUpdateApi, integralCategoryDeleteApi,
|
||||
integralCategoryStatusApi
|
||||
} from '@/api/marketing'
|
||||
export default {
|
||||
name: 'ProductClassify',
|
||||
data() {
|
||||
return {
|
||||
moren: require("@/assets/images/bjt.png"),
|
||||
isChecked: false,
|
||||
listLoading: true,
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
// 列表
|
||||
getList() {
|
||||
this.listLoading = true
|
||||
integralCategoryListApi(this.tableFrom).then(res => {
|
||||
this.tableData.data = res.data
|
||||
this.tableData.total = res.data.count
|
||||
this.listLoading = false
|
||||
}).catch(res => {
|
||||
this.listLoading = false
|
||||
this.$message.error(res.message)
|
||||
})
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableData.page = page
|
||||
this.getList()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableData.limit = val
|
||||
this.getList()
|
||||
},
|
||||
// 添加
|
||||
onAdd() {
|
||||
this.$modalForm(integralCategoryCreateApi()).then(() => this.getList())
|
||||
},
|
||||
// 编辑
|
||||
onEdit(id) {
|
||||
this.$modalForm(integralCategoryUpdateApi(id)).then(() => this.getList())
|
||||
},
|
||||
// 删除
|
||||
handleDelete(row, idx) {
|
||||
let modalText = ""
|
||||
if(row.has_product == 1){
|
||||
modalText ="该分类下有商品,删除后不可恢复,请确认是否删除"
|
||||
}else{
|
||||
modalText ="确定删除该分类吗"
|
||||
}
|
||||
this.$modalSure(modalText).then(() => {
|
||||
integralCategoryDeleteApi(row.store_category_id).then(({ message }) => {
|
||||
this.$message.success(message)
|
||||
this.getList()
|
||||
}).catch(({ message }) => {
|
||||
this.$message.error(message)
|
||||
})
|
||||
})
|
||||
},
|
||||
onchangeIsShow(row) {
|
||||
integralCategoryStatusApi(row.store_category_id, row.is_show).then(({ message }) => {
|
||||
this.$message.success(message)
|
||||
}).catch(({ message }) => {
|
||||
this.$message.error(message)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
|
|
@ -0,0 +1,560 @@
|
|||
<template>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<div class="container">
|
||||
<el-form size="small" inline label-width="80px">
|
||||
<el-form-item label="订单状态:">
|
||||
<el-select
|
||||
v-model="tableFrom.status"
|
||||
placeholder="请选择"
|
||||
class="filter-item selWidth"
|
||||
clearable
|
||||
@change="getList(1)"
|
||||
>
|
||||
<el-option label="全部" value="" />
|
||||
<el-option label="待付款" :value="-3" />
|
||||
<el-option label="待发货" :value="0" />
|
||||
<el-option label="待收货" :value="1" />
|
||||
<el-option label="交易完成" :value="3" />
|
||||
<el-option label="已删除" :value="-10" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间:" prop="date">
|
||||
<el-date-picker
|
||||
v-model="timeVal"
|
||||
value-format="yyyy/MM/dd"
|
||||
align="right"
|
||||
unlink-panels
|
||||
format="yyyy/MM/dd"
|
||||
size="small"
|
||||
type="daterange"
|
||||
placement="bottom-end"
|
||||
placeholder="自定义时间"
|
||||
class="selWidth"
|
||||
:picker-options="pickerOptions"
|
||||
@change="onchangeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="搜索:" class="width100" style="display: inline-block;">
|
||||
<el-input placeholder="请输入内容" v-model="keywords" class="input-with-select">
|
||||
<el-select v-model="select" slot="prepend" placeholder="请选择">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="订单号" value="order_sn"></el-option>
|
||||
<el-option label="UID" value="uid"></el-option>
|
||||
<el-option label="用户姓名" value="nickname"></el-option>
|
||||
<el-option label="用户电话" value="phone"></el-option>
|
||||
</el-select>
|
||||
<el-button slot="append" type="primary" style="background-color:#437FFD;border-color:#437FFD;color:#fff;border-radius:0 4px 4px 0;" icon="el-icon-search" @click="changeSearch"></el-button>
|
||||
</el-input>
|
||||
|
||||
</el-form-item>
|
||||
<el-button size="small" type="primary" icon="el-icon-top" @click="exports">导出</el-button>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData.data"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
class="table"
|
||||
highlight-current-row
|
||||
:cell-class-name="addTdClass"
|
||||
>
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-form-item label="用户备注:">
|
||||
<span>{{ props.row.mark | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="商家备注:">
|
||||
<span>{{ props.row.remark | filterEmpty }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单编号" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<span style="display: block;" v-text="scope.row.order_sn" />
|
||||
<span v-show="scope.row.is_del > 0" style="color: #ED4014;display: block;">用户已删除</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="real_name" label="收货人" min-width="100" />
|
||||
<el-table-column label="商品信息" min-width="330">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-for="(val, i) in scope.row.orderProduct"
|
||||
:key="i"
|
||||
class="tabBox acea-row row-middle"
|
||||
>
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
:src="val.cart_info.product.image"
|
||||
:preview-src-list="[val.cart_info.product.image]"
|
||||
/>
|
||||
</div>
|
||||
<span
|
||||
class="tabBox_tit"
|
||||
>{{ val.cart_info.product.store_name + ' | ' }}{{ val.cart_info.productAttr.sku }}</span>
|
||||
<span class="tabBox_pice">
|
||||
{{ '¥'+ val.cart_info.productAttr.price + ' x '+ val.product_num }}
|
||||
<em
|
||||
v-if="val.refund_num < val.product_num && val.refund_num > 0"
|
||||
style="color: red;font-style: normal;"
|
||||
>(-{{ val.product_num - val.refund_num }})</em>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="兑换积分" prop="integral" min-width="80"/>
|
||||
<el-table-column label="兑换金额" prop="pay_price" min-width="80"/>
|
||||
<el-table-column label="订单状态" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.is_del === 0">
|
||||
<span v-if="scope.row.paid === 0">待付款</span>
|
||||
<span v-else>
|
||||
<span>{{ scope.row.status | integralOrderStatus }}</span>
|
||||
</span>
|
||||
</span>
|
||||
<span v-else>已删除</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="serviceScore" label="下单时间" min-width="130">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.create_time }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="120" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.paid==1&&scope.row.status==0" type="text" size="small" @click="send(scope.row.order_id)">发送货</el-button>
|
||||
<el-button type="text" size="small" @click="onOrderDetails(scope.row.order_id)">订单详情</el-button>
|
||||
<el-button v-if="scope.row.is_del > 0" type="text" size="small" @click="handleDelete(scope.row, scope.$index)">删除</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:page-sizes="[20, 40, 60, 80]"
|
||||
:page-size="tableFrom.limit"
|
||||
:current-page="tableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
<!--发送货-->
|
||||
<el-dialog title="订单发送货" :visible.sync="sendVisible" width="800px" :before-close="handleClose">
|
||||
<el-form ref="shipment" :model="shipment" :rules="rules" label-width="120px" @submit.native.prevent>
|
||||
<el-form-item label="选择类型:" prop="delivery_type">
|
||||
<el-radio-group v-model="shipment.delivery_type" @change="changeSend">
|
||||
<el-radio :label="1">手动发货</el-radio>
|
||||
<el-radio :label="3" class="radio"> 无需物流</el-radio>
|
||||
<el-radio :label="2">自己配送</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="shipment.delivery_type == 1" label="快递公司:" prop="delivery_name">
|
||||
<el-select
|
||||
filterable
|
||||
v-model="shipment.delivery_name"
|
||||
placeholder="请选择快递公司"
|
||||
class="filter-item selWidth mr20"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in deliveryList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="shipment.delivery_type == 1" label="快递单号:" prop="delivery_id">
|
||||
<el-input v-model="shipment.delivery_id" placeholder="请输入快递单号" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="shipment.delivery_type == 2" label="送货人姓名:" prop="to_name">
|
||||
<el-input v-model="shipment.to_name" maxlength="10" placeholder="请输入送货人姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="shipment.delivery_type == 2" label="送货人手机号:" prop="to_phone">
|
||||
<el-input v-model="shipment.to_phone" placeholder="请输入送货人手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注:" prop="remark">
|
||||
<el-input v-model="shipment.remark" type="textarea" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button :loading="loading" type="primary" @click="submitForm('shipment')">提交</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!--详情-->
|
||||
<order-detail
|
||||
ref="orderDetail"
|
||||
@closeDrawer="closeDrawer"
|
||||
@changeDrawer="changeDrawer"
|
||||
@send="send"
|
||||
:drawer="drawer"
|
||||
></order-detail>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { integralOrderLstApi, integralOrderExcelApi, expressOptionsApi, integralDelivery, integralOrderDeleteApi } from "@/api/marketing";
|
||||
import orderDetail from './orderDetails.vue';
|
||||
import createWorkBook from '@/utils/newToExcel.js';
|
||||
import timeOptions from '@/utils/timeOptions';
|
||||
export default {
|
||||
components: { orderDetail },
|
||||
data() {
|
||||
return {
|
||||
select: "",
|
||||
keywords: "",
|
||||
orderId: 0,
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0,
|
||||
},
|
||||
pickerOptions: timeOptions,
|
||||
listLoading: true,
|
||||
tableFrom: {
|
||||
keywords: "",
|
||||
status: "",
|
||||
date: "",
|
||||
page: 1,
|
||||
limit: 20,
|
||||
product_id: '',
|
||||
},
|
||||
timeVal: [],
|
||||
ids: "",
|
||||
uid: "",
|
||||
visibleDetail: false,
|
||||
tableFromLog: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
},
|
||||
loading: false,
|
||||
dialogVisible: false,
|
||||
cardLists: [],
|
||||
orderDatalist: null,
|
||||
shipment: {
|
||||
delivery_type: 1
|
||||
},
|
||||
deliveryList: [],
|
||||
drawer: false,
|
||||
sendVisible: false,
|
||||
rules: {
|
||||
delivery_type: [
|
||||
{ required: true, message: '请选择发送货方式', trigger: 'change' }
|
||||
],
|
||||
delivery_name: [
|
||||
{ required: true, message: '请选择快递公司', trigger: 'change' }
|
||||
],
|
||||
to_name: [
|
||||
{ required: true, message: '请输入送货人姓名', trigger: 'blur' }
|
||||
],
|
||||
delivery_id: [
|
||||
{ required: true, message: '请输入快递单号', trigger: 'blur' }
|
||||
],
|
||||
to_phone: [
|
||||
{ required: true, message: '请输入送货人手机号', trigger: 'blur' },
|
||||
{ pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$route.query.id': {
|
||||
handler: function(val) {
|
||||
this.tableFrom.product_id = val || ""
|
||||
this.getList('');
|
||||
},
|
||||
immediate: false,
|
||||
deep: true
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (this.$route.query.id) {
|
||||
this.tableFrom.product_id = this.$route.query.id;
|
||||
} else {
|
||||
this.tableFrom.product_id = "";
|
||||
}
|
||||
this.getExpressLst();
|
||||
this.getList('');
|
||||
},
|
||||
// 被缓存接收参数
|
||||
activated() {
|
||||
if (this.$route.query.id) {
|
||||
this.tableFrom.product_id = this.$route.query.id;
|
||||
} else {
|
||||
this.tableFrom.product_id = "";
|
||||
}
|
||||
this.getList('');
|
||||
},
|
||||
methods: {
|
||||
// 表格某一行添加特定的样式
|
||||
addTdClass(val) {
|
||||
if (val.row.status > 0 && val.row.paid == 1) {
|
||||
for (let i = 0; i < val.row.orderProduct.length; i++) {
|
||||
if (val.row.orderProduct[i].refund_num > 0 && val.row.orderProduct[i].refund_num < val.row.orderProduct[i].product_num) {
|
||||
return "row-bg";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return " ";
|
||||
}
|
||||
},
|
||||
async exports() {
|
||||
let excelData = JSON.parse(JSON.stringify(this.tableFrom)), data = []
|
||||
excelData.page = 1
|
||||
let pageCount = 1
|
||||
let lebData = {};
|
||||
for (let i = 0; i < pageCount; i++) {
|
||||
lebData = await this.downData(excelData)
|
||||
pageCount = Math.ceil(lebData.count/excelData.limit)
|
||||
if (lebData.export.length) {
|
||||
data = data.concat(lebData.export)
|
||||
excelData.page++
|
||||
}
|
||||
}
|
||||
createWorkBook(lebData.header, lebData.title, data, lebData.foot,lebData.filename);
|
||||
return
|
||||
},
|
||||
/**订单列表 */
|
||||
downData(excelData) {
|
||||
return new Promise((resolve, reject) => {
|
||||
integralOrderExcelApi(excelData).then((res) => {
|
||||
return resolve(res.data)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 导出
|
||||
exportRecord() {
|
||||
exportOrderApi(this.tableFrom)
|
||||
.then((res) => {
|
||||
const h = this.$createElement;
|
||||
this.$msgbox({
|
||||
title: '提示',
|
||||
message: h('p', null, [
|
||||
h('span', null, '文件正在生成中,请稍后点击"'),
|
||||
h('span', { style: 'color: teal' }, '导出记录'),
|
||||
h('span', null, '"查看~ '),
|
||||
]),
|
||||
confirmButtonText: '我知道了',
|
||||
}).then(action => {
|
||||
|
||||
});
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$message.error(res.message)
|
||||
})
|
||||
},
|
||||
// 订单删除
|
||||
handleDelete(row, idx) {
|
||||
this.$modalSure().then(() => {
|
||||
integralOrderDeleteApi(row.order_id)
|
||||
.then(({
|
||||
message
|
||||
}) => {
|
||||
this.$message.success(message)
|
||||
this.tableData.data.splice(idx, 1)
|
||||
})
|
||||
.catch(({
|
||||
message
|
||||
}) => {
|
||||
this.$message.error(message)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 获取快递公司列表
|
||||
getExpressLst() {
|
||||
expressOptionsApi().then((res) => {
|
||||
this.deliveryList = res.data
|
||||
}).catch((res) => {
|
||||
this.$message.error(res.message)
|
||||
})
|
||||
},
|
||||
// 发货
|
||||
send(id) {
|
||||
this.sendVisible = true
|
||||
this.orderId = id
|
||||
this.sendReset();
|
||||
},
|
||||
sendReset() {
|
||||
this.shipment = {
|
||||
delivery_type: 1,
|
||||
delivery_name: '',
|
||||
delivery_id: '',
|
||||
from_name: '',
|
||||
from_addr: '',
|
||||
from_tel: '',
|
||||
remark: ''
|
||||
}
|
||||
},
|
||||
changeSend() {
|
||||
this.$refs['shipment'].clearValidate();
|
||||
},
|
||||
handleClose() {
|
||||
this.sendVisible = false
|
||||
this.$refs['shipment'].resetFields()
|
||||
},
|
||||
submitForm(name) {
|
||||
if (this.shipment.delivery_type == 2) {
|
||||
this.shipment.delivery_name = this.shipment.to_name
|
||||
this.shipment.delivery_id = this.shipment.to_phone
|
||||
}
|
||||
this.$refs[name].validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
delete this.shipment.to_name;
|
||||
delete this.shipment.to_phone;
|
||||
integralDelivery(this.orderId, this.shipment).then(res => {
|
||||
this.sendVisible = false;
|
||||
this.$message.success(res.message);
|
||||
this.getList('');
|
||||
this.loading = false;
|
||||
|
||||
// this.sendReset()
|
||||
}).catch(({ message }) => {
|
||||
this.$message.error(message);
|
||||
this.loading = false;
|
||||
})
|
||||
} else {
|
||||
return
|
||||
}
|
||||
})
|
||||
},
|
||||
// 详情
|
||||
onOrderDetails(id) {
|
||||
this.orderId = id;
|
||||
this.$refs.orderDetail.getInfo(id);
|
||||
this.drawer = true;
|
||||
},
|
||||
changeDrawer(v) {
|
||||
this.drawer = v;
|
||||
},
|
||||
closeDrawer() {
|
||||
this.drawer = false;
|
||||
},
|
||||
pageChangeLog(page) {
|
||||
this.tableFromLog.page = page;
|
||||
this.getList('');
|
||||
},
|
||||
handleSizeChangeLog(val) {
|
||||
this.tableFromLog.limit = val;
|
||||
this.getList('');
|
||||
},
|
||||
// 具体日期
|
||||
onchangeTime(e) {
|
||||
this.timeVal = e;
|
||||
this.tableFrom.date = e ? this.timeVal.join('-') : '';
|
||||
this.getList(1);
|
||||
},
|
||||
changeSearch(){
|
||||
this.resetSearchVal();
|
||||
switch(this.select){
|
||||
case "uid":
|
||||
this.tableFrom.uid = this.keywords;
|
||||
this.getList(1);
|
||||
break;
|
||||
case "nickname":
|
||||
this.tableFrom.nickname = this.keywords;
|
||||
this.getList(1);
|
||||
break;
|
||||
case "phone":
|
||||
this.tableFrom.phone = this.keywords;
|
||||
this.getList(1);
|
||||
break;
|
||||
case "order_sn":
|
||||
this.tableFrom.order_sn = this.keywords;
|
||||
this.getList(1);
|
||||
break;
|
||||
case "mer_name":
|
||||
this.tableFrom.mer_name = this.keywords;
|
||||
this.getList(1);
|
||||
break;
|
||||
default:
|
||||
this.tableFrom.keywords = this.keywords;
|
||||
this.getList(1);
|
||||
break;
|
||||
}
|
||||
|
||||
},
|
||||
resetSearchVal(){
|
||||
this.tableFrom.mer_name="";
|
||||
this.tableFrom.order_sn="";
|
||||
this.tableFrom.phone="";
|
||||
this.tableFrom.nickname="";
|
||||
this.tableFrom.uid="";
|
||||
this.tableFrom.keywords="";
|
||||
},
|
||||
// 列表
|
||||
getList(num) {
|
||||
this.listLoading = true;
|
||||
this.tableFrom.page = num ? num : this.tableFrom.page;
|
||||
integralOrderLstApi(this.tableFrom)
|
||||
.then((res) => {
|
||||
this.tableData.data = res.data.list;
|
||||
this.tableData.total = res.data.count;
|
||||
this.listLoading = false;
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$message.error(res.message);
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableFrom.page = page;
|
||||
this.getList('');
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableFrom.limit = val;
|
||||
this.getList('');
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.demo-table-expand {
|
||||
/deep/ label {
|
||||
width: 83px !important;
|
||||
}
|
||||
}
|
||||
/deep/.el-input-group__prepend .el-input{
|
||||
width: 90px;
|
||||
}
|
||||
/deep/.el-input-group__prepend div.el-select .el-input__inner{
|
||||
padding: 0 10px;
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
}
|
||||
.selWidth {
|
||||
width: 260px;
|
||||
}
|
||||
.el-dropdown-link {
|
||||
cursor: pointer;
|
||||
color: #409eff;
|
||||
font-size: 12px;
|
||||
}
|
||||
.el-icon-arrow-down {
|
||||
font-size: 12px;
|
||||
}
|
||||
.tabBox_tit {
|
||||
width: 60%;
|
||||
font-size: 12px !important;
|
||||
margin: 0 2px 0 10px;
|
||||
letter-spacing: 1px;
|
||||
padding: 5px 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/deep/.row-bg {
|
||||
.cell {
|
||||
color: red !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,622 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-drawer
|
||||
:with-header="false"
|
||||
:size="1000"
|
||||
:visible.sync="drawer"
|
||||
:direction="direction"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<div v-loading="loading">
|
||||
<div class="head">
|
||||
<div class="full">
|
||||
<img class="order_icon" :src="orderImg" alt="" />
|
||||
<div class="text">
|
||||
<div class="title">普通订单</div>
|
||||
<div>
|
||||
<span class="mr20">订单编号:{{ orderDetailList.order_sn }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<el-button
|
||||
v-if="orderDetailList.status === 0 && orderDetailList.paid === 1"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="toSendGoods"
|
||||
>发送货</el-button
|
||||
>
|
||||
<el-button
|
||||
size="small"
|
||||
@click="onOrderMark"
|
||||
>备注</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li class="item">
|
||||
<div class="title">订单状态</div>
|
||||
<div>
|
||||
<div v-if="orderDetailList.is_del == 1" class="value1">用户已删除</div>
|
||||
<div v-else-if="!orderDetailList.pay_time && orderDetailList.is_del == 0" class="value1">待付款</div>
|
||||
<div v-else-if="orderDetailList.pay_time && orderDetailList.is_del == 0" class="value1">
|
||||
<span>{{ orderDetailList.status | integralOrderStatus }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div class="title">实际支付</div>
|
||||
<div> {{ !orderDetailList.pay_time ? '-' : orderDetailList.integral+'个积分+'+orderDetailList.pay_price+'元' }}</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div class="title">支付方式</div>
|
||||
<div v-if="orderDetailList.pay_time"><span>积分</span><span v-if="Number(orderDetailList.pay_price)!=0">+{{ orderDetailList.pay_type | payTypeFilter }}</span>支付</div>
|
||||
<div v-else>-</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div class="title">支付时间</div>
|
||||
<div>{{ orderDetailList.create_time }}</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<el-tabs type="border-card" v-model="activeName" @tab-click="tabClick">
|
||||
<el-tab-pane label="订单信息" name="detail">
|
||||
<div class="section">
|
||||
<div class="title">用户信息</div>
|
||||
<ul class="list">
|
||||
<li class="item">
|
||||
<div>用户昵称:</div>
|
||||
<div class="value">
|
||||
{{
|
||||
orderDetailList.user.real_name ? orderDetailList.user.real_name : orderDetailList.user.nickname
|
||||
}}
|
||||
</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>用户ID:</div>
|
||||
<div class="value">{{ orderDetailList.user.uid ? orderDetailList.user.uid : '-' }}</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>绑定电话:</div>
|
||||
<div class="value">{{ orderDetailList.user.phone ? orderDetailList.user.phone : '-' }}</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="title">收货信息</div>
|
||||
<ul class="list">
|
||||
<li class="item">
|
||||
<div>收货人:</div>
|
||||
<div class="value">{{ orderDetailList.real_name ? orderDetailList.real_name : '-' }}</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>收货电话:</div>
|
||||
<div class="value">{{ orderDetailList.user_phone ? orderDetailList.user_phone : '-' }}</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>收货地址:</div>
|
||||
<div class="value">{{ orderDetailList.user_address ? orderDetailList.user_address : '-' }}</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="title">订单信息</div>
|
||||
<ul class="list">
|
||||
<li class="item">
|
||||
<div>创建时间:</div>
|
||||
<div class="value">{{ orderDetailList.create_time ? orderDetailList.create_time : '-' }}</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>商品总数:</div>
|
||||
<div class="value">{{ orderDetailList.total_num ? orderDetailList.total_num : '-' }}</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>实际支付:</div>
|
||||
<div class="value">{{ !orderDetailList.pay_time ? '-' : orderDetailList.integral+'个积分+'+orderDetailList.pay_price+'元' }}</div>
|
||||
</li>
|
||||
<li v-if="orderDetailList.integral" class="item">
|
||||
<div>积分抵扣:</div>
|
||||
<div class="value">使用了{{ orderDetailList.integral }}个积分</div>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div>订单总价:</div>
|
||||
<div class="value">{{ orderDetailList.total_price ? orderDetailList.total_price : '-' }}</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" v-if="orderDetailList.delivery_type === '1'">
|
||||
<div class="title">物流信息</div>
|
||||
<ul class="list">
|
||||
<li class="item acea-row row-middle">
|
||||
<div>快递公司:</div>
|
||||
<div class="value">{{ orderDetailList.delivery_name ? orderDetailList.delivery_name : '-' }}</div>
|
||||
</li>
|
||||
<li class="item acea-row row-middle">
|
||||
<div>快递单号:</div>
|
||||
<div class="value">{{ orderDetailList.delivery_id ? orderDetailList.delivery_id : '-' }}</div>
|
||||
<el-button type="text" size="mini" @click="openLogistics">物流查询</el-button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="title">买家留言</div>
|
||||
<ul class="list">
|
||||
<li class="item">
|
||||
<div>{{ orderDetailList.mark ? orderDetailList.mark : '-' }}</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section">
|
||||
<div class="title">商家备注</div>
|
||||
<ul class="list">
|
||||
<li class="item">
|
||||
<div>{{ orderDetailList.remark ? orderDetailList.remark : '-' }}</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="商品信息" name="goods">
|
||||
<el-table :data="orderDetailList.orderProduct">
|
||||
<el-table-column label="商品信息" min-width="300">
|
||||
<template slot-scope="scope">
|
||||
<div class="tab">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
:src="scope.row.cart_info.product.image"
|
||||
:preview-src-list="[scope.row.cart_info.product.image]"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div class="line1">{{ scope.row.cart_info.product.store_name }}</div>
|
||||
<div class="line1 gary">
|
||||
规格:{{
|
||||
scope.row.cart_info.productAttr.sku ? scope.row.cart_info.productAttr.sku : '默认'
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="售价" min-width="90">
|
||||
<template slot-scope="scope">
|
||||
<div class="tab">
|
||||
<div class="line1">
|
||||
{{ scope.row.cart_info.productAttr.price ? scope.row.cart_info.productAttr.price : '-' }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实付金额" min-width="90">
|
||||
<template slot-scope="scope">
|
||||
<div class="tab">
|
||||
<div class="line1">
|
||||
{{ scope.row.product_price ? scope.row.product_price+'元' : '-' }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实付积分" min-width="90">
|
||||
<template slot-scope="scope">
|
||||
<div class="tab">
|
||||
<div class="line1">
|
||||
{{ scope.row.integral_total ? scope.row.integral_total+'积分' : '-' }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="购买数量" min-width="90">
|
||||
<template slot-scope="scope">
|
||||
<div class="tab">
|
||||
<div class="line1">
|
||||
{{ scope.row.product_num }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="订单记录" name="orderList">
|
||||
<div>
|
||||
<el-form size="small" label-width="80px">
|
||||
<div class="acea-row">
|
||||
<el-form-item label="操作端:">
|
||||
<el-select
|
||||
v-model="tableFromLog.user_type"
|
||||
placeholder="请选择"
|
||||
style="width: 140px; margin-right: 20px"
|
||||
clearable
|
||||
filterable
|
||||
@change="onOrderLog(orderId)"
|
||||
>
|
||||
<el-option label="系统" value="0" />
|
||||
<el-option label="用户" value="1" />
|
||||
<el-option label="平台" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作时间:">
|
||||
<el-date-picker
|
||||
style="width: 380px; margin-right: 20px"
|
||||
v-model="timeVal"
|
||||
type="datetimerange"
|
||||
placeholder="选择日期"
|
||||
value-format="yyyy/MM/dd HH:mm:ss"
|
||||
clearable
|
||||
@change="onchangeTime"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table :data="tableDataLog.data" size="small">
|
||||
<el-table-column prop="order_id" label="订单编号" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.order_sn }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作记录" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.change_message }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作角色" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<div class="tab">
|
||||
<div>{{ operationType(scope.row.user_type) }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<div class="tab">
|
||||
<div>{{ scope.row.nickname }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作时间" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<div class="tab">
|
||||
<div class="line1">{{ scope.row.change_time }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination :page-sizes="[20, 40, 60, 80]" :page-size="tableFromLog.limit" :current-page="tableFromLog.page" layout="total, sizes, prev, pager, next, jumper" :total="tableDataLog.total" @size-change="handleSizeChangeLog" @current-change="pageChangeLog" />
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</el-drawer>
|
||||
<el-dialog
|
||||
title="物流查询"
|
||||
:visible.sync="dialogLogistics"
|
||||
width="350px"
|
||||
v-if="dialogLogistics"
|
||||
>
|
||||
<div class="logistics acea-row row-top">
|
||||
<div class="logistics_img"><img src="@/assets/images/expressi.jpg"></div>
|
||||
<div class="logistics_cent">
|
||||
<span>物流公司:{{ orderDetailList.delivery_name }}</span>
|
||||
<span>物流单号:{{ orderDetailList.delivery_id }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="acea-row row-column-around trees-coadd">
|
||||
<div class="scollhide">
|
||||
<el-timeline v-if="result.length>0">
|
||||
<el-timeline-item v-for="(item,i) in result" :key="i">
|
||||
<p class="time" v-text="item.time" />
|
||||
<p class="content" v-text="item.status" />
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import {
|
||||
integralOrderExpressApi,
|
||||
integralOrderDetailApi,
|
||||
integralOrderLog,
|
||||
integralMarkApi
|
||||
} from '@/api/marketing';
|
||||
export default {
|
||||
props: {
|
||||
drawer: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
orderId: '',
|
||||
direction: 'rtl',
|
||||
activeName: 'detail',
|
||||
goodsList: [],
|
||||
orderConfirm: false,
|
||||
sendGoods: false,
|
||||
dialogLogistics: false,
|
||||
confirmReceiptForm: {
|
||||
id: '',
|
||||
},
|
||||
orderData: [],
|
||||
contentList: [],
|
||||
nicknameList: [],
|
||||
result: [],
|
||||
timeVal: [],
|
||||
childOrder: [],
|
||||
childOrder: [],
|
||||
tableDataLog: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
tableFromLog: {
|
||||
user_type: '',
|
||||
date: [],
|
||||
page: 1,
|
||||
limit: 10
|
||||
},
|
||||
orderDetailList: {
|
||||
user: {
|
||||
real_name: '',
|
||||
},
|
||||
groupOrder: {
|
||||
group_order_sn: '',
|
||||
},
|
||||
},
|
||||
orderImg: require('@/assets/images/order_icon.png'),
|
||||
};
|
||||
},
|
||||
filters: {
|
||||
},
|
||||
methods: {
|
||||
// 具体日期
|
||||
onchangeTime(e) {
|
||||
this.timeVal = e
|
||||
this.tableFromLog.date = e ? this.timeVal.join('-') : ''
|
||||
this.onOrderLog(this.orderId)
|
||||
},
|
||||
handleClose() {
|
||||
this.activeName = 'detail';
|
||||
this.$emit('closeDrawer');
|
||||
this.sendGoods = false;
|
||||
this.orderRemark = false;
|
||||
},
|
||||
openLogistics() {
|
||||
this.getOrderData()
|
||||
this.dialogLogistics = true
|
||||
},
|
||||
// 获取订单物流信息
|
||||
getOrderData() {
|
||||
integralOrderExpressApi(this.orderId).then(async res => {
|
||||
this.result = res.data
|
||||
}).catch(res => {
|
||||
this.$message.error(res.message)
|
||||
})
|
||||
},
|
||||
//发送货
|
||||
toSendGoods() {
|
||||
this.$emit('send',this.orderId);
|
||||
},
|
||||
// 备注
|
||||
onOrderMark() {
|
||||
this.$modalForm(integralMarkApi(this.orderId)).then(() => this.getInfo(this.orderId))
|
||||
},
|
||||
getInfo(id) {
|
||||
this.loading = true;
|
||||
this.orderId = id
|
||||
integralOrderDetailApi(id)
|
||||
.then((res) => {
|
||||
this.drawer = true;
|
||||
this.loading = false;
|
||||
this.orderDetailList = res.data;
|
||||
})
|
||||
.catch((res) => {
|
||||
this.loading = false;
|
||||
this.$message.error(res.message);
|
||||
});
|
||||
},
|
||||
tabClick(tab) {
|
||||
if (tab.name === 'orderList') {
|
||||
this.onOrderLog(this.orderId)
|
||||
}
|
||||
},
|
||||
onOrderLog(id){
|
||||
integralOrderLog(id, this.tableFromLog).then((res) => {
|
||||
this.tableDataLog.data = res.data.list
|
||||
this.tableDataLog.total = res.data.count
|
||||
});
|
||||
},
|
||||
pageChangeLog(page) {
|
||||
this.tableFromLog.page = page
|
||||
this.onOrderLog(this.orderId)
|
||||
},
|
||||
handleSizeChangeLog(val) {
|
||||
this.tableFromLog.limit = val
|
||||
this.onOrderLog(this.orderId)
|
||||
},
|
||||
operationType(type) {
|
||||
if (type == 0) {
|
||||
return '系统';
|
||||
} else if (type == 1) {
|
||||
return '用户';
|
||||
} else if (type == 2) {
|
||||
return '平台';
|
||||
} else {
|
||||
return '未知';
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.head {
|
||||
padding: 30px 35px 25px;
|
||||
.full {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.order_icon {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
.iconfont {
|
||||
color: #437FFD;
|
||||
&.sale-after {
|
||||
color: #90add5;
|
||||
}
|
||||
}
|
||||
.text {
|
||||
align-self: center;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
padding-left: 12px;
|
||||
font-size: 13px;
|
||||
color: #606266;
|
||||
.title {
|
||||
margin-bottom: 10px;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
line-height: 16px;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
.order-num {
|
||||
padding-top: 10px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
.list {
|
||||
display: flex;
|
||||
margin-top: 20px;
|
||||
overflow: hidden;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
.item {
|
||||
flex: none;
|
||||
width: 200px;
|
||||
font-size: 14px;
|
||||
line-height: 14px;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
.title {
|
||||
margin-bottom: 12px;
|
||||
font-size: 13px;
|
||||
line-height: 13px;
|
||||
color: #666666;
|
||||
}
|
||||
.value1 {
|
||||
color: #f56022;
|
||||
}
|
||||
|
||||
.value2 {
|
||||
color: #1bbe6b;
|
||||
}
|
||||
|
||||
.value3 {
|
||||
color: #437FFD;
|
||||
}
|
||||
|
||||
.value4 {
|
||||
color: #6a7b9d;
|
||||
}
|
||||
|
||||
.value5 {
|
||||
color: #f5222d;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-tabs--border-card {
|
||||
box-shadow: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
.section {
|
||||
padding: 20px 0 5px;
|
||||
border-bottom: 1px dashed #eeeeee;
|
||||
.title {
|
||||
padding-left: 10px;
|
||||
border-left: 3px solid #437FFD;
|
||||
font-size: 15px;
|
||||
line-height: 15px;
|
||||
color: #303133;
|
||||
}
|
||||
.list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
.item {
|
||||
flex: 0 0 calc(100% / 3);
|
||||
display: flex;
|
||||
margin-top: 16px;
|
||||
font-size: 13px;
|
||||
color: #606266;
|
||||
&:nth-child(3n + 1) {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
&:nth-child(3n + 2) {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
&:nth-child(3n + 3) {
|
||||
padding-left: 20px;
|
||||
}
|
||||
}
|
||||
.value {
|
||||
flex: 1;
|
||||
image {
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin: 0 12px 12px 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
}
|
||||
.tab {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.el-image {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
/deep/.el-drawer__body {
|
||||
overflow: auto;
|
||||
}
|
||||
.gary {
|
||||
color: #aaa;
|
||||
}
|
||||
.logistics{
|
||||
align-items: center;
|
||||
padding: 10px 0px;
|
||||
.logistics_img{
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
margin-right: 12px;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.logistics_cent{
|
||||
span{
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.tabBox_tit {
|
||||
width: 53%;
|
||||
font-size: 12px !important;
|
||||
margin: 0 2px 0 10px;
|
||||
letter-spacing: 1px;
|
||||
padding: 5px 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,153 @@
|
|||
<template>
|
||||
<el-dialog v-if="dialogVisible" title="商品信息" :visible.sync="dialogVisible" width="1000px">
|
||||
<div class="divBox">
|
||||
<div class="header clearfix">
|
||||
<div class="container">
|
||||
<el-form size="small" inline label-width="100px">
|
||||
<el-form-item label="商品分类:" class="width100">
|
||||
<el-cascader v-model="tableFrom.pid" :options="merCateList" :props="{ checkStrictly: true, emitPath:false }" clearable @change="getList(1)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品搜索:" class="width100">
|
||||
<el-input
|
||||
v-model="tableFrom.keyword"
|
||||
placeholder="请输入商品名称,关键字,编号"
|
||||
clearable
|
||||
@keyup.enter.native="getList"
|
||||
>
|
||||
<el-button slot="append" icon="el-icon-search" class="el-button-solt" @click="getList(1)" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<el-alert
|
||||
title="注:添加为预售商品后,原普通商品会下架;如该商品已开启其它营销活动,请勿选择!"
|
||||
type="warning"
|
||||
v-if="resellShow"
|
||||
show-icon>
|
||||
</el-alert>
|
||||
<el-table v-loading="listLoading" :data="tableData.data" style="width: 100%;margin-top:10px;" size="mini">
|
||||
<el-table-column width="55">
|
||||
<template slot-scope="scope">
|
||||
<el-radio
|
||||
v-model="templateRadio"
|
||||
:label="scope.row.product_id"
|
||||
@change.native="getTemplateRow(scope.row)"
|
||||
> </el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="product_id" label="ID" min-width="50" />
|
||||
<el-table-column label="商品图" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
<div class="demo-image__preview">
|
||||
<el-image
|
||||
style="width: 36px; height: 36px"
|
||||
:src="scope.row.image"
|
||||
:preview-src-list="[scope.row.image]"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="store_name" label="商品名称" min-width="150" />
|
||||
<el-table-column prop="stock" label="库存" min-width="80" />
|
||||
</el-table>
|
||||
<div class="block mb20">
|
||||
<el-pagination
|
||||
:page-sizes="[10, 20, 40]"
|
||||
:page-size="tableFrom.limit"
|
||||
:current-page="tableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { merProductLstApi, categoryListApi } from '@/api/product'
|
||||
import { roterPre } from '@/settings'
|
||||
export default {
|
||||
name: 'GoodsList',
|
||||
props:{
|
||||
resellShow:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
templateRadio: 0,
|
||||
merCateList: [],
|
||||
roterPre: roterPre,
|
||||
listLoading: true,
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0
|
||||
},
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 10,
|
||||
cate_id: '',
|
||||
store_name: '',
|
||||
keyword: '',
|
||||
type: 1,
|
||||
is_gift_bag: 0,
|
||||
},
|
||||
multipleSelection: {},
|
||||
checked: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getCategorySelect()
|
||||
window.addEventListener('unload', (e) => this.unloadHandler(e))
|
||||
},
|
||||
methods: {
|
||||
getTemplateRow(row) {
|
||||
this.multipleSelection = { src: row.image, id: row.product_id }
|
||||
this.dialogVisible = false
|
||||
this.$emit('getProduct', this.multipleSelection)
|
||||
},
|
||||
// 商品分类;
|
||||
getCategorySelect() {
|
||||
categoryListApi().then(res => {
|
||||
this.merCateList = res.data
|
||||
}).catch(res => {
|
||||
this.$message.error(res.message)
|
||||
})
|
||||
},
|
||||
// 列表
|
||||
getList(num) {
|
||||
this.listLoading = true
|
||||
this.tableFrom.page = num || this.tableFrom.page;
|
||||
merProductLstApi(this.tableFrom)
|
||||
.then((res) => {
|
||||
this.tableData.data = res.data.list
|
||||
this.tableData.total = res.data.count
|
||||
this.listLoading = false
|
||||
})
|
||||
.catch((res) => {
|
||||
this.listLoading = false
|
||||
this.$message.error(res.message)
|
||||
})
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableFrom.page = page
|
||||
this.getList()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableFrom.limit = val
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
|
|
@ -0,0 +1,256 @@
|
|||
<template>
|
||||
<div class="divBox">
|
||||
<el-card class="box-card">
|
||||
<div class="container">
|
||||
<el-form ref="tableFrom" :model="tableFrom" size="small" label-width="90px" :inline="true">
|
||||
<el-form-item label="创建时间:" prop="date">
|
||||
<el-date-picker
|
||||
v-model="timeVal"
|
||||
value-format="yyyy/MM/dd"
|
||||
align="right"
|
||||
unlink-panels
|
||||
format="yyyy/MM/dd"
|
||||
size="small"
|
||||
type="daterange"
|
||||
placement="bottom-end"
|
||||
placeholder="自定义时间"
|
||||
class="selWidth"
|
||||
:picker-options="pickerOptions"
|
||||
@change="onchangeTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="上架状态:" prop="status">
|
||||
<el-select
|
||||
v-model="tableFrom.is_used"
|
||||
placeholder="请选择"
|
||||
class="filter-item selWidth"
|
||||
clearable
|
||||
@change="getList(1)"
|
||||
>
|
||||
<el-option label="上架" :value="1" />
|
||||
<el-option label="下架" :value="0" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品搜索:">
|
||||
<el-input
|
||||
v-model="tableFrom.keyword"
|
||||
placeholder="请输入商品名称/ID"
|
||||
class="selWidth"
|
||||
clearable
|
||||
@keyup.enter.native="getList(1)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="small" @click="getList(1)">查询</el-button>
|
||||
<el-button size="small" @click="reset('tableFrom')">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<router-link :to="{ path: `${roterPre}` + '/marketing/integral/addProduct' }">
|
||||
<el-button size="small" type="primary">添加积分商品</el-button>
|
||||
</router-link>
|
||||
<el-button size="small" type="success" @click="quickAdd()">快速添加</el-button>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData.data"
|
||||
style="width: 100%"
|
||||
class="mt20"
|
||||
size="small"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column prop="product_id" label="ID" min-width="50" />
|
||||
<el-table-column min-width="100" label="商品图片">
|
||||
<template slot-scope="scope">
|
||||
<el-image style="width: 36px; height: 36px" :src="scope.row.image" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="store_name" label="商品标题" min-width="150" />
|
||||
<el-table-column prop="ot_price" label="兑换积分" min-width="100" />
|
||||
<el-table-column prop="price" label="兑换金额" min-width="100" />
|
||||
<el-table-column prop="stock" label="库存" min-width="80" />
|
||||
<el-table-column prop="sales" label="已兑换数量" min-width="100" />
|
||||
<el-table-column prop="create_time" min-width="200" label="创建时间" />
|
||||
<el-table-column prop="sort" min-width="120" label="排序" />
|
||||
<el-table-column label="状态" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.is_used"
|
||||
:active-value="1"
|
||||
:inactive-value="0"
|
||||
active-text="上架"
|
||||
inactive-text="下架"
|
||||
@click.native="onchangeIsShow(scope.row)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" min-width="180" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<router-link :to="{ path: `${roterPre}` + '/marketing/integral/orderList?id=' + scope.row.product_id }">
|
||||
<el-button type="text" size="small" class="mr10">兑换记录</el-button>
|
||||
</router-link>
|
||||
<router-link :to="{ path: `${roterPre}` + '/marketing/integral/addProduct/' + scope.row.product_id }">
|
||||
<el-button type="text" size="small" class="mr10">编辑</el-button>
|
||||
</router-link>
|
||||
<router-link :to="{ path: `${roterPre}` + '/marketing/integral/addProduct/' + scope.row.product_id + '?type=2' }">
|
||||
<el-button type="text" size="small" class="mr10">复制</el-button>
|
||||
</router-link>
|
||||
<el-button type="text" size="small" @click="handleDelete(scope.row.product_id, scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:page-sizes="[20, 40, 60, 80]"
|
||||
:page-size="tableFrom.limit"
|
||||
:current-page="tableFrom.page"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="pageChange"
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
<!--快速添加商品-->
|
||||
<goods-list ref="goodsList" @getProduct="getProduct"></goods-list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { integralProList, integralProDeleteApi, integralProductStatusApi } from '@/api/marketing';
|
||||
import { roterPre } from '@/settings';
|
||||
import timeOptions from '@/utils/timeOptions';
|
||||
import goodsList from './goodsList'
|
||||
export default {
|
||||
name: 'integralProduct',
|
||||
components: {goodsList},
|
||||
data() {
|
||||
return {
|
||||
props: { multiple: false, emitPath: false },
|
||||
Loading: false,
|
||||
dialogVisible: false,
|
||||
roterPre: roterPre,
|
||||
listLoading: true,
|
||||
receiveType: 0,
|
||||
id: '',
|
||||
categoryList: [],
|
||||
labelList: [],
|
||||
tableData: {
|
||||
data: [],
|
||||
total: 0,
|
||||
},
|
||||
tableFrom: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
keyword: '',
|
||||
is_used: '',
|
||||
date: '',
|
||||
},
|
||||
type: 0,
|
||||
isShow: false,
|
||||
pickerOptions: timeOptions,
|
||||
timeVal: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList(1);
|
||||
},
|
||||
methods: {
|
||||
quickAdd(){
|
||||
this.$refs.goodsList.dialogVisible = true;
|
||||
},
|
||||
getProduct(row){
|
||||
this.$router.push({ path: this.roterPre + `/marketing/integral/addProduct/${row.id}?type=1` });
|
||||
},
|
||||
onchangeTime(e) {
|
||||
this.timeVal = e
|
||||
this.tableFrom.date = e ? this.timeVal.join('-') : ''
|
||||
this.tableFrom.page = 1;
|
||||
this.getList()
|
||||
},
|
||||
reset(formName) {
|
||||
this.timeVal = [];
|
||||
this.tableFrom = {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
keyword: '',
|
||||
is_used: '',
|
||||
date: '',
|
||||
};
|
||||
this.getList('');
|
||||
},
|
||||
// 删除
|
||||
handleDelete(id, idx) {
|
||||
this.$modalSureDelete(`删除积分商品后将无法恢复,请谨慎操作!`).then(() => {
|
||||
integralProDeleteApi(id)
|
||||
.then(({ message }) => {
|
||||
this.$message.success(message);
|
||||
this.getList('');
|
||||
})
|
||||
.catch(({ message }) => {
|
||||
this.$message.error(message);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 列表
|
||||
getList(num) {
|
||||
this.listLoading = true;
|
||||
this.tableFrom.page = num || this.tableFrom.page;
|
||||
integralProList(this.tableFrom)
|
||||
.then((res) => {
|
||||
this.tableData.data = res.data.list;
|
||||
this.tableData.total = res.data.count;
|
||||
this.listLoading = false;
|
||||
})
|
||||
.catch((res) => {
|
||||
this.listLoading = false;
|
||||
this.$message.error(res.message);
|
||||
});
|
||||
},
|
||||
pageChange(page) {
|
||||
this.tableFrom.page = page;
|
||||
this.getList('');
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableFrom.limit = val;
|
||||
this.getList('');
|
||||
},
|
||||
// 修改状态
|
||||
onchangeIsShow(row) {
|
||||
integralProductStatusApi(row.product_id, row.is_used)
|
||||
.then(({ message }) => {
|
||||
this.$message.success(message);
|
||||
this.getList('');
|
||||
})
|
||||
.catch(({ message }) => {
|
||||
this.$message.error(message);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.modalbox {
|
||||
/deep/.el-dialog {
|
||||
min-width: 550px;
|
||||
}
|
||||
}
|
||||
.selWidth {
|
||||
width: 250px !important;
|
||||
}
|
||||
.container {
|
||||
min-width: 821px;
|
||||
}
|
||||
.selWidth {
|
||||
width: 100%;
|
||||
}
|
||||
.dialogBox {
|
||||
box-sizing: border-box;
|
||||
.el-pagination {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 25px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -738,7 +738,8 @@ export default {
|
|||
this.isDump = res.data.crmeb_serve_dump
|
||||
if (res.data.crmeb_serve_dump == 1) this.getEleTempData()
|
||||
}).catch((res) => {
|
||||
this.$message.error(res.message)
|
||||
console.log(res);
|
||||
// this.$message.error(res.message)
|
||||
})
|
||||
},
|
||||
// 获取快递公司列表
|
||||
|
|
|
|||
Loading…
Reference in New Issue