|
|
|
@ -1,49 +1,31 @@ |
|
|
|
|
<template> |
|
|
|
|
<div class="article-manager"> |
|
|
|
|
<el-card :bordered="false" shadow="never" class="ivu-mt mt16" :body-style="{ padding: '0 20px 20px' }"> |
|
|
|
|
<el-tabs v-model="artFrom.type" @tab-click="onClickTab"> |
|
|
|
|
<el-tab-pane :label="item.name + '(' + item.count + ')'" :name="item.type.toString()" v-for="(item, index) in headeNum" :key="index" /> |
|
|
|
|
<el-tabs v-model="page.params.orderStatus" @tab-click="onClickTab"> |
|
|
|
|
<el-tab-pane :label="item.name + '(' + item.count + ')'" :name="item.type" v-for="(item, index) in headeNum" :key="index" /> |
|
|
|
|
</el-tabs> |
|
|
|
|
<div> |
|
|
|
|
<el-form ref="artFrom" :model="artFrom" label-width="80px" label-position="right" inline @submit.native.prevent> |
|
|
|
|
<el-form-item label="商品分类:" label-for="pid"> |
|
|
|
|
<el-cascader |
|
|
|
|
v-model="artFrom.cate_id" |
|
|
|
|
size="small" |
|
|
|
|
:options="treeSelect" |
|
|
|
|
:props="{ multiple: false, emitPath: false, checkStrictly: true }" |
|
|
|
|
clearable |
|
|
|
|
class="form_content_width" |
|
|
|
|
></el-cascader> |
|
|
|
|
<el-form :model="page" label-width="80px" label-position="right" inline @submit.native.prevent> |
|
|
|
|
<el-form-item label="订单编号:"> |
|
|
|
|
<el-input clearable placeholder="订单编号/商品货号" v-model="page.params.orderCode" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="商品搜索:" label-for="store_name"> |
|
|
|
|
<el-input clearable placeholder="请输入商品名称/关键字/ID" v-model="artFrom.store_name" class="form_content_width" /> |
|
|
|
|
<el-form-item label="收货人:"> |
|
|
|
|
<el-input clearable placeholder="手机号码" v-model="page.params.customerPhone" type="phone" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="下单时间:"> |
|
|
|
|
<el-date-picker v-model="page.params.createTime" type="date" placeholder="选择日期"> </el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button type="primary" @click="userSearchs">查询</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</div> |
|
|
|
|
<div class="Button"> |
|
|
|
|
<el-button type="primary" class="mr14">添加商品</el-button> |
|
|
|
|
<el-button type="success" class="mr14" @click="onCopy">商品采集</el-button> |
|
|
|
|
<el-dropdown class="bnt mr14" @command="batchSelect"> |
|
|
|
|
<el-button>批量修改<i class="el-icon-arrow-down el-icon--right"></i></el-button> |
|
|
|
|
<el-dropdown-menu slot="dropdown"> |
|
|
|
|
<el-dropdown-item :command="1">商品分类</el-dropdown-item> |
|
|
|
|
<el-dropdown-item :command="2">物流设置</el-dropdown-item> |
|
|
|
|
<el-dropdown-item :command="3">购买送积分</el-dropdown-item> |
|
|
|
|
<el-dropdown-item :command="4">购买送优惠券</el-dropdown-item> |
|
|
|
|
<el-dropdown-item :command="5">关联用户标签</el-dropdown-item> |
|
|
|
|
<el-dropdown-item :command="6">活动推荐</el-dropdown-item> |
|
|
|
|
</el-dropdown-menu> |
|
|
|
|
</el-dropdown> |
|
|
|
|
<el-button @click="onDismount" v-show="artFrom.type === '1'">批量下架</el-button> |
|
|
|
|
<el-button @click="onShelves" v-show="artFrom.type === '2'">批量上架</el-button> |
|
|
|
|
<el-button class="export" @click="exports">导出</el-button> |
|
|
|
|
</div> |
|
|
|
|
<el-table |
|
|
|
|
ref="table" |
|
|
|
|
:key="id" |
|
|
|
|
:data="tableList" |
|
|
|
|
class="ivu-mt mt14" |
|
|
|
|
v-loading="loading" |
|
|
|
@ -52,111 +34,92 @@ |
|
|
|
|
@selection-change="handleSelectRow" |
|
|
|
|
empty-text="暂无数据" |
|
|
|
|
> |
|
|
|
|
<el-table-column type="expand" width="50" v-if="['1', '2'].includes(artFrom.type)"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<expandRow :row="scope.row"></expandRow> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column type="selection" width="60" :reserve-selection="true"> </el-table-column> |
|
|
|
|
<el-table-column label="商品ID" width="80"> |
|
|
|
|
<el-table-column label="订单编号" width="180" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ scope.row.id }}</span> |
|
|
|
|
<span>{{ scope.row.orderCode }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="商品图" min-width="90"> |
|
|
|
|
<el-table-column label="下单时间" min-width="120" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<div class="tabBox_img" v-viewer> |
|
|
|
|
<img v-lazy="scope.row.image" /> |
|
|
|
|
</div> |
|
|
|
|
<span>{{ scope.row.createTime }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="商品名称" min-width="250"> |
|
|
|
|
<el-table-column label="用户账号" min-width="120" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ scope.row.store_name }}</span> |
|
|
|
|
<span>{{ scope.row.customerPhone }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="商品类型" min-width="100"> |
|
|
|
|
<el-table-column label="订单金额" min-width="60" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ scope.row.product_type }}</span> |
|
|
|
|
<span>{{ scope.row.integral }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="商品售价" min-width="100"> |
|
|
|
|
<el-table-column label="支付积分" min-width="80" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ scope.row.price }}</span> |
|
|
|
|
<span>{{ scope.row.integral }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="销量" min-width="100"> |
|
|
|
|
<el-table-column label="自提油站" min-width="120" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ scope.row.sales }}</span> |
|
|
|
|
<span>{{ scope.row.takeSiteName }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="库存" min-width="100"> |
|
|
|
|
<el-table-column label="订单状态" min-width="100" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ scope.row.stock }}</span> |
|
|
|
|
<span>{{ scope.row.orderStatus | orderStatus }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="排序" min-width="100"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<span>{{ scope.row.sort }}</span> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="状态" min-width="100"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-switch |
|
|
|
|
class="defineSwitch" |
|
|
|
|
:active-value="1" |
|
|
|
|
:inactive-value="0" |
|
|
|
|
v-model="scope.row.is_show" |
|
|
|
|
:value="scope.row.is_show" |
|
|
|
|
:disabled="scope.row.stop_status ? true : false" |
|
|
|
|
@change="changeSwitch(scope.row)" |
|
|
|
|
size="large" |
|
|
|
|
active-text="上架" |
|
|
|
|
inactive-text="下架" |
|
|
|
|
> |
|
|
|
|
</el-switch> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" fixed="right" minWidth="100"> |
|
|
|
|
|
|
|
|
|
<el-table-column label="操作" fixed="right" minWidth="100" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<el-button type="text" @click="edit(scope.row)">查看订单</el-button> |
|
|
|
|
<el-button @click="del(scope.row, scope)" type="text">取消订单</el-button> |
|
|
|
|
<el-button type="text" @click="detail(scope.row)">查看订单</el-button> |
|
|
|
|
<el-button @click="cancle(scope.row, scope)" type="text" v-if="scope.row.orderStatus == '1'">取消订单</el-button> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
<div class="acea-row row-right page"> |
|
|
|
|
<pagination v-if="total" :total="total" :page.sync="artFrom.page" :limit.sync="artFrom.limit" @pagination="getDataList" /> |
|
|
|
|
<el-pagination |
|
|
|
|
@size-change="handleSizeChange" |
|
|
|
|
@current-change="handleCurrentChange" |
|
|
|
|
:current-page="page.currentPage" |
|
|
|
|
:page-sizes="[10, 15, 20, 30]" |
|
|
|
|
:page-size="page.pageSize" |
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" |
|
|
|
|
:total="page.totalCount" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</el-card> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import orderInfoApi from '@/api/order/orderInfo.js' |
|
|
|
|
export default { |
|
|
|
|
name: 'product_productList', |
|
|
|
|
// components: { expandRow, attribute, taoBao, goodsDetail, userLabel, couponList }, |
|
|
|
|
|
|
|
|
|
filters: { |
|
|
|
|
orderStatus(e) { |
|
|
|
|
switch (e) { |
|
|
|
|
case '0': |
|
|
|
|
return '已下单' |
|
|
|
|
case '1': |
|
|
|
|
return '待核销' |
|
|
|
|
case '2': |
|
|
|
|
return '已核销' |
|
|
|
|
case '-1': |
|
|
|
|
return '已取消' |
|
|
|
|
default: |
|
|
|
|
return '暂无' |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
template: false, |
|
|
|
|
modals: false, |
|
|
|
|
batchModal: false, |
|
|
|
|
labelShow: false, |
|
|
|
|
batchType: 1, // 批量设置类型 |
|
|
|
|
batchFormData: { |
|
|
|
|
cate_id: [], |
|
|
|
|
logistics: [], |
|
|
|
|
freight: 2, |
|
|
|
|
postage: 0, |
|
|
|
|
temp_id: null, |
|
|
|
|
give_integral: 0, |
|
|
|
|
label_id: [], |
|
|
|
|
coupon_ids: [], |
|
|
|
|
recommend: [] |
|
|
|
|
}, |
|
|
|
|
ruleBatch: {}, |
|
|
|
|
couponName: [], // 优惠券 |
|
|
|
|
dataLabel: [], // 标签 |
|
|
|
|
templateList: [], // 运费模版 |
|
|
|
|
grid: { |
|
|
|
|
xl: 6, |
|
|
|
|
lg: 8, |
|
|
|
@ -164,70 +127,51 @@ export default { |
|
|
|
|
sm: 24, |
|
|
|
|
xs: 24 |
|
|
|
|
}, |
|
|
|
|
artFrom: { |
|
|
|
|
page: 1, |
|
|
|
|
limit: 15, |
|
|
|
|
cate_id: '', |
|
|
|
|
type: '1', |
|
|
|
|
store_name: '' |
|
|
|
|
page: { |
|
|
|
|
currentPage: 1, |
|
|
|
|
pageSize: 10, |
|
|
|
|
params: {}, |
|
|
|
|
totalCount: 0 |
|
|
|
|
}, |
|
|
|
|
list: [], |
|
|
|
|
tableList: [], |
|
|
|
|
headeNum: [ |
|
|
|
|
{ |
|
|
|
|
count: 2, |
|
|
|
|
name: '出售中商品', |
|
|
|
|
type: 1 |
|
|
|
|
name: '全部订单', |
|
|
|
|
type: null |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
count: 40, |
|
|
|
|
name: '仓库中商品', |
|
|
|
|
type: 2 |
|
|
|
|
name: '已下单', |
|
|
|
|
type: '1' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
count: 5, |
|
|
|
|
name: '已经售馨商品', |
|
|
|
|
type: 3 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
count: 10, |
|
|
|
|
name: '警戒库存', |
|
|
|
|
type: 4 |
|
|
|
|
name: '已核销', |
|
|
|
|
type: '2' |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
count: 1, |
|
|
|
|
name: '商品回收站', |
|
|
|
|
type: 5 |
|
|
|
|
name: '已取消', |
|
|
|
|
type: '-1' |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
loading: false, |
|
|
|
|
data: [], |
|
|
|
|
total: 0, |
|
|
|
|
attrTemplate: false, |
|
|
|
|
ids: [], |
|
|
|
|
goodsId: '', |
|
|
|
|
isProductBox: false, |
|
|
|
|
treeSelect: [], |
|
|
|
|
multipleSelection: [] |
|
|
|
|
multipleSelection: [], |
|
|
|
|
detail: {} //详情对象 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() {}, |
|
|
|
|
created() { |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
activated() {}, |
|
|
|
|
methods: { |
|
|
|
|
// 标签弹窗关闭 |
|
|
|
|
labelClose() {}, |
|
|
|
|
look(row) { |
|
|
|
|
this.goodsId = row.id |
|
|
|
|
this.isProductBox = true |
|
|
|
|
}, |
|
|
|
|
// 物流方式 |
|
|
|
|
logisticsBtn(e) { |
|
|
|
|
this.batchFormData.logistics = e |
|
|
|
|
}, |
|
|
|
|
// 关联用户标签 |
|
|
|
|
openLabel() { |
|
|
|
|
this.labelShow = true |
|
|
|
|
}, |
|
|
|
|
closeLabel(label) { |
|
|
|
|
let index = this.dataLabel.indexOf(this.dataLabel.filter(d => d.id == label.id)[0]) |
|
|
|
|
this.dataLabel.splice(index, 1) |
|
|
|
@ -258,11 +202,7 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getExcelData(excelData) {}, |
|
|
|
|
freight() {}, |
|
|
|
|
// 批量上架 |
|
|
|
|
onShelves() {}, |
|
|
|
|
// 批量下架 |
|
|
|
|
onDismount() {}, |
|
|
|
|
|
|
|
|
|
getRowKey(row) { |
|
|
|
|
return row.id |
|
|
|
|
}, |
|
|
|
@ -282,41 +222,44 @@ export default { |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// tab选择 |
|
|
|
|
onClickTab() { |
|
|
|
|
this.artFrom.page = 1 |
|
|
|
|
onClickTab(e) { |
|
|
|
|
console.log(e) |
|
|
|
|
this.page.currentPag = 1 |
|
|
|
|
this.multipleSelection = [] |
|
|
|
|
this.$refs.table.clearSelection() |
|
|
|
|
this.getDataList() |
|
|
|
|
// this.$refs.table.clearSelection() |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 获取商品表单头数量 |
|
|
|
|
goodHeade() {}, |
|
|
|
|
// 商品分类; |
|
|
|
|
goodsCategory() {}, |
|
|
|
|
// 商品列表; |
|
|
|
|
getDataList() {}, |
|
|
|
|
showSelectData() {}, |
|
|
|
|
handleSizeChange(val) { |
|
|
|
|
this.page.pageSize = val |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
handleCurrentChange(val) { |
|
|
|
|
this.page.currentPage = val |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 订单列表; |
|
|
|
|
getList() { |
|
|
|
|
orderInfoApi.getByPage(this.page).then(res => { |
|
|
|
|
if ((res.code = 20000)) ({ list: this.tableList = [], totalCount: this.page.totalCount = 0 } = res.data) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 表格搜索 |
|
|
|
|
userSearchs() { |
|
|
|
|
this.artFrom.page = 1 |
|
|
|
|
this.page.currentPage = 1 |
|
|
|
|
this.getList() |
|
|
|
|
}, |
|
|
|
|
// 上下架 |
|
|
|
|
changeSwitch(row) {}, |
|
|
|
|
|
|
|
|
|
// 数据导出; |
|
|
|
|
exportData: function() {}, |
|
|
|
|
// 属性弹出; |
|
|
|
|
attrTap() { |
|
|
|
|
this.attrTemplate = true |
|
|
|
|
}, |
|
|
|
|
changeTemplate(msg) { |
|
|
|
|
this.attrTemplate = msg |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 编辑 |
|
|
|
|
edit(row) { |
|
|
|
|
detail(row) { |
|
|
|
|
// this.$router.push({ path: this.$routeProStr + '/product/add_product/' + row.id }); |
|
|
|
|
}, |
|
|
|
|
// 确认 |
|
|
|
|
del(row, tit, num) {} |
|
|
|
|
// 取消 |
|
|
|
|
cancle(row, tit, num) {} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|