parent
93cc41f557
commit
c48da8d53b
17 changed files with 1028 additions and 993 deletions
@ -0,0 +1,88 @@ |
||||
import request from '@/utils/request' |
||||
var service_name = 'oil-mall' |
||||
var group_name = 'mallAdvertise' |
||||
var new_group_name = 'mallHomeRecommended' |
||||
export default { |
||||
getByPage(page) { |
||||
// 分页查询
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/getByPage`, |
||||
method: 'post', |
||||
data: page |
||||
}) |
||||
}, |
||||
|
||||
save(data) { |
||||
// 新增广告
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/save`, |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
}, |
||||
update(data) { |
||||
// 修改广告
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/update`, |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
}, |
||||
delete(data) { |
||||
// 删除广告
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/delete`, |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
}, |
||||
|
||||
get(id) { |
||||
// 查询广告详情
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/get/${id}`, |
||||
method: 'get' |
||||
}) |
||||
}, |
||||
goOnlineAndGoOffline(page) { |
||||
// 广告上下线
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/goOnlineAndGoOffline`, |
||||
method: 'post', |
||||
data: page |
||||
}) |
||||
}, |
||||
|
||||
getHomeByPage(page) { |
||||
// 分页查询
|
||||
return request({ |
||||
url: `/${service_name}/${new_group_name}/getByPage`, |
||||
method: 'post', |
||||
data: page |
||||
}) |
||||
}, |
||||
topOne(id) { |
||||
// 置顶
|
||||
return request({ |
||||
url: `/${service_name}/${new_group_name}/topOne/${id}`, |
||||
method: 'get' |
||||
}) |
||||
}, |
||||
|
||||
homeDelete(page) { |
||||
// 删除首页推荐
|
||||
return request({ |
||||
url: `/${service_name}/${new_group_name}/delete`, |
||||
method: 'post', |
||||
data: page |
||||
}) |
||||
}, |
||||
whetherToRecommend(page) { |
||||
// 修改是否推荐
|
||||
return request({ |
||||
url: `/${service_name}/${new_group_name}/whetherToRecommend`, |
||||
method: 'post', |
||||
data: page |
||||
}) |
||||
} |
||||
} |
@ -1,94 +0,0 @@ |
||||
import request from '@/utils/request' |
||||
var service_name = 'oil-finance' |
||||
var group_name = 'xchargeStationAccountReverse' |
||||
export default { |
||||
getByPage(page) { |
||||
// 分页查询
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/getByPage`, |
||||
method: 'post', |
||||
data: page |
||||
}) |
||||
}, |
||||
save(xchargeStationAccountReverse) { |
||||
// 保存
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/save`, |
||||
method: 'post', |
||||
data: xchargeStationAccountReverse |
||||
}) |
||||
}, |
||||
get(id) { |
||||
// 根据id查询
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/get/${id}`, |
||||
method: 'get' |
||||
}) |
||||
}, |
||||
update(xchargeStationAccountReverse) { |
||||
// 更新
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/update`, |
||||
method: 'put', |
||||
data: xchargeStationAccountReverse |
||||
}) |
||||
}, |
||||
exportExcel(page) { |
||||
// 导出
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/export`, |
||||
method: 'post', |
||||
notEncrypt: true, |
||||
data: page, |
||||
responseType: 'blob' |
||||
}) |
||||
}, |
||||
|
||||
saveAccount(page) { |
||||
return request({ |
||||
url: `/oil-finance/${group_name}/saveAccount`, |
||||
method: 'post', |
||||
data: page |
||||
}) |
||||
}, |
||||
|
||||
//电站油站公司充值新增
|
||||
saveNew(page) { |
||||
return request({ |
||||
url: `/${service_name}/${group_name}/saveNew`, |
||||
method: 'post', |
||||
data: page |
||||
}) |
||||
}, |
||||
saveAccountNew(page) { |
||||
return request({ |
||||
url: `/oil-finance/${group_name}/saveAccountNew`, |
||||
method: 'post', |
||||
data: page |
||||
}) |
||||
}, |
||||
findBySiteCompanyInfoId(page) { |
||||
return request({ |
||||
url: `/oil-finance/xchargeStationsAccount/findBySiteCompanyInfoId`, |
||||
method: 'get', |
||||
params: page |
||||
}) |
||||
}, |
||||
|
||||
deleteById(id) { |
||||
// 根据id删除
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/delete`, |
||||
method: 'put', |
||||
data: { id: id } |
||||
}) |
||||
}, |
||||
//审核调拨/回拨
|
||||
auditAccount(data) { |
||||
return request({ |
||||
url: `/${service_name}/${group_name}/auditAccount`, |
||||
method: 'post', |
||||
data |
||||
}) |
||||
} |
||||
} |
@ -1,36 +0,0 @@ |
||||
import request from '@/utils/request' |
||||
var service_name = 'oil-electric-energy' |
||||
var group_name = 'xchargeEquipmentInfo' |
||||
export default{ |
||||
//分页查询
|
||||
getByPage(data) { |
||||
return request({ |
||||
url: `/${service_name}/${group_name}/getByPage`, |
||||
method: 'post', |
||||
data |
||||
}) |
||||
}, |
||||
// 模糊查询充电站点列表
|
||||
queryByName(stationName) { |
||||
return request({ |
||||
url: `/${service_name}/xchargeStationInfo/queryStationIdByName/${stationName}`, |
||||
method: 'get', |
||||
}) |
||||
}, |
||||
//充电设备禁用启用
|
||||
update(data) { |
||||
return request({ |
||||
url: `/${service_name}/${group_name}/update`, |
||||
method: 'put', |
||||
data |
||||
}) |
||||
}, |
||||
// 充电桩禁用启用
|
||||
updateNew(page) { |
||||
return request({ |
||||
url: `/${service_name}/xchargeConnectorInfo/update`, |
||||
method: 'put', |
||||
data :page |
||||
}) |
||||
}, |
||||
} |
@ -1,69 +0,0 @@ |
||||
import request from '@/utils/request' |
||||
var service_name = 'oil-finance' |
||||
var group_name = 'xchargeStationsAccount' |
||||
export default { |
||||
getByPage(page) { |
||||
// 分页查询
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/getByPage`, |
||||
method: 'post', |
||||
data: page |
||||
}) |
||||
}, |
||||
save(xchargeStationsAccount) { |
||||
// 保存
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/save`, |
||||
method: 'post', |
||||
data: xchargeStationsAccount |
||||
}) |
||||
}, |
||||
get(id) { |
||||
// 根据id查询
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/get/${id}`, |
||||
method: 'get' |
||||
}) |
||||
}, |
||||
update(xchargeStationsAccount) { |
||||
// 更新
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/update`, |
||||
method: 'put', |
||||
data: xchargeStationsAccount |
||||
}) |
||||
}, |
||||
exportExcel(page) { |
||||
// 导出
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/export`, |
||||
method: 'post', |
||||
notEncrypt: true, |
||||
data: page, |
||||
responseType: 'blob' |
||||
}) |
||||
}, |
||||
deleteById(id) { |
||||
// 根据id删除
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/delete`, |
||||
method: 'put', |
||||
data: { id: id } |
||||
}) |
||||
}, |
||||
// 新获取账户名称 远程搜索
|
||||
getChannelAccountMapsNotVoid(name) { |
||||
return request({ |
||||
url: `/${service_name}/${group_name}/getChannelAccountMapsNotVoidByName/${name}`, |
||||
method: 'get' |
||||
}) |
||||
}, |
||||
// 新获取账户名称 远程搜索
|
||||
accountState(data) { |
||||
return request({ |
||||
url: `/${service_name}/${group_name}/accountState`, |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
} |
@ -1,48 +0,0 @@ |
||||
import request from '@/utils/request' |
||||
var service_name = 'oil-finance' |
||||
var group_name = 'xchargeStationsAccountRecord' |
||||
export default { |
||||
getByPage(page) { // 分页查询
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/getByPage`, |
||||
method: 'post', |
||||
data: page |
||||
}) |
||||
}, |
||||
save(xchargeStationsAccountRecord) { // 保存
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/save`, |
||||
method: 'post', |
||||
data: xchargeStationsAccountRecord |
||||
}) |
||||
}, |
||||
get(id) { // 根据id查询
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/get/${id}`, |
||||
method: 'get' |
||||
}) |
||||
}, |
||||
update(xchargeStationsAccountRecord) { // 更新
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/update`, |
||||
method: 'put', |
||||
data: xchargeStationsAccountRecord |
||||
}) |
||||
}, |
||||
exportExcel(page) { // 导出
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/export`, |
||||
method: 'post', |
||||
notEncrypt: true, |
||||
data: page, |
||||
responseType: 'blob' |
||||
}) |
||||
}, |
||||
deleteById(id) { // 根据id删除
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/delete`, |
||||
method: 'put', |
||||
data: { id: id } |
||||
}) |
||||
} |
||||
} |
@ -1,48 +0,0 @@ |
||||
import request from '@/utils/request' |
||||
var service_name = 'oil-electric-energy' |
||||
var group_name = 'xchargeOrderDetail' |
||||
export default { |
||||
getByPage(page) { // 分页查询
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/getByPage`, |
||||
method: 'post', |
||||
data: page |
||||
}) |
||||
}, |
||||
save(xchargeOrderDetail) { // 保存
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/save`, |
||||
method: 'post', |
||||
data: xchargeOrderDetail |
||||
}) |
||||
}, |
||||
get(id) { // 根据id查询
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/get/${id}`, |
||||
method: 'get' |
||||
}) |
||||
}, |
||||
update(xchargeOrderDetail) { // 更新
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/update`, |
||||
method: 'put', |
||||
data: xchargeOrderDetail |
||||
}) |
||||
}, |
||||
exportExcel(page) { // 导出
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/export`, |
||||
method: 'post', |
||||
notEncrypt: true, |
||||
data: page, |
||||
responseType: 'blob' |
||||
}) |
||||
}, |
||||
deleteById(id) { // 根据id删除
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/delete`, |
||||
method: 'put', |
||||
data: { id: id } |
||||
}) |
||||
} |
||||
} |
@ -1,94 +0,0 @@ |
||||
import request from '@/utils/request' |
||||
var service_name = 'oil-electric-energy' |
||||
var group_name = 'xchargeOrderInfo' |
||||
export default { |
||||
getByPage(page) { |
||||
// 分页查询
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/getByPage`, |
||||
method: 'post', |
||||
data: page |
||||
}) |
||||
}, |
||||
getStatusByPage(page) { |
||||
// 分页查询
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/getStatusByPage`, |
||||
method: 'post', |
||||
data: page |
||||
}) |
||||
}, |
||||
save(xchargeOrderInfo) { |
||||
// 保存
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/save`, |
||||
method: 'post', |
||||
data: xchargeOrderInfo |
||||
}) |
||||
}, |
||||
get(id) { |
||||
// 根据id查询
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/getWeb/${id}`, |
||||
method: 'get' |
||||
}) |
||||
}, |
||||
update(xchargeOrderInfo) { |
||||
// 更新
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/update`, |
||||
method: 'put', |
||||
data: xchargeOrderInfo |
||||
}) |
||||
}, |
||||
exportByPage(page) { |
||||
// 导出
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/exportByPage`, |
||||
method: 'post', |
||||
data: page, |
||||
responseType: 'blob' |
||||
}) |
||||
}, |
||||
exportExcel(page) { |
||||
// 导出
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/export`, |
||||
method: 'post', |
||||
notEncrypt: true, |
||||
data: page, |
||||
responseType: 'blob' |
||||
}) |
||||
}, |
||||
deleteById(id) { |
||||
// 根据id删除
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/delete`, |
||||
method: 'put', |
||||
data: { id: id } |
||||
}) |
||||
}, |
||||
refund(data) { |
||||
// 根据id退款
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/refund`, |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
}, |
||||
getDetail(id) { |
||||
// 根据id查询订单明细
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/getDetail/${id}`, |
||||
method: 'get' |
||||
}) |
||||
}, |
||||
toStop(data) { |
||||
// 根据id强制停止
|
||||
return request({ |
||||
url: `/${service_name}/${group_name}/stopOrder`, |
||||
method: 'post', |
||||
data: data |
||||
}) |
||||
} |
||||
} |
@ -0,0 +1,115 @@ |
||||
<template> |
||||
<div class="divBox"> |
||||
<!-- <el-card class="box-card"> |
||||
<div style="width :100%;height:45px;line-height: 45px;background: #f3f3f3; padding-left:20px"> |
||||
添加广告 |
||||
</div> --> |
||||
<el-form :rules="rules" ref="form" :model="advertisement" class="formValidate" label-width="100px"> |
||||
<el-row> |
||||
<el-col :span="13"> |
||||
<el-form-item label="广告名称" prop="advertiseName"> |
||||
<el-input v-model="advertisement.advertiseName" maxlength="249" placeholder="请输入商品名称" /> |
||||
</el-form-item> |
||||
</el-col> |
||||
|
||||
<el-col :span="13"> |
||||
<el-form-item label="开始时间" prop="startTime"> |
||||
<el-date-picker style="width:100%" v-model="advertisement.startTime" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"> |
||||
</el-date-picker> |
||||
</el-form-item> |
||||
</el-col> |
||||
<el-col :span="13"> |
||||
<el-form-item label="结束时间" prop="endTime"> |
||||
<el-date-picker style="width:100%" v-model="advertisement.endTime" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"> |
||||
</el-date-picker> |
||||
</el-form-item> |
||||
</el-col> |
||||
|
||||
<el-col :span="24"> |
||||
<el-form-item label="上线/下线" prop="isDownline"> |
||||
<el-radio-group v-model="advertisement.isDownline"> |
||||
<el-radio :label="1">上线</el-radio> |
||||
<el-radio :label="0">下线</el-radio> |
||||
</el-radio-group> |
||||
</el-form-item> |
||||
</el-col> |
||||
|
||||
<el-col> |
||||
<el-form-item label="广告图片" prop="positionImage"> |
||||
<div class="upLoadPicBox"> |
||||
<upload :photo="advertisement.positionImage" @success="uploadSuccess" tip="只能上传jpg/png格式文件,文件不能超过50kb"></upload> |
||||
</div> |
||||
</el-form-item> |
||||
</el-col> |
||||
|
||||
<el-col :span="13"> |
||||
<el-form-item label="广告链接" prop="advertiseUrl"> |
||||
<el-input v-model="advertisement.advertiseUrl" type="url" placeholder="请输入广告链接" /> |
||||
</el-form-item> |
||||
</el-col> |
||||
</el-row> |
||||
|
||||
<el-form-item> |
||||
<el-button type="primary" class="submission" @click="handleSubmit">提交</el-button> |
||||
<el-button :size="$store.getters.size" @click="close">取消</el-button> |
||||
</el-form-item> |
||||
</el-form> |
||||
<!-- </el-card> --> |
||||
</div> |
||||
</template> |
||||
<script> |
||||
import marketingApi from '@/api/finance/marketing.js' |
||||
import upload from '@/components/Upload/index' |
||||
export default { |
||||
components: { upload }, |
||||
props: { |
||||
advertisement: { |
||||
type: Object, |
||||
default() {} |
||||
} |
||||
}, |
||||
data() { |
||||
return { |
||||
advertisement: { isDownline: '1' }, |
||||
|
||||
rules: { |
||||
advertiseName: [{ required: true, message: '请输入广告名称', trigger: 'blur' }], |
||||
startTime: [{ required: true, message: '请选择开始时间', trigger: 'change' }], |
||||
endTime: [{ required: true, message: '请选择结束时间', trigger: 'change' }], |
||||
picture: [{ required: true, message: '请上传广告图片', trigger: 'change' }], |
||||
advertiseUrl: [{ required: true, message: '请输入广告链接', trigger: 'blur' }] |
||||
} |
||||
} |
||||
}, |
||||
methods: { |
||||
handleSubmit() { |
||||
this.$refs['form'].validate(valid => { |
||||
if (valid) { |
||||
this.update() |
||||
} |
||||
}) |
||||
}, |
||||
update() { |
||||
loadingFn.call( |
||||
this, |
||||
'loading', |
||||
marketingApi.update(this.advertisement).then(res => { |
||||
if ((res.code = 20000)) this.$message.success(res.msg) |
||||
this.$emit('closeDialog') |
||||
this.$emit('getList') |
||||
}) |
||||
) |
||||
}, |
||||
uploadSuccess(e, res) { |
||||
console.log(res) |
||||
if (res.code == 20000) { |
||||
this.advertisement.positionImage = res.data.publicUrl |
||||
} |
||||
}, |
||||
close() { |
||||
this.$emit('closeDialog') |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped lang="stylus"></style> |
@ -0,0 +1,8 @@ |
||||
<template> |
||||
<div> |
||||
<router-view /> |
||||
</div> |
||||
</template> |
||||
<script> |
||||
export default {} |
||||
</script> |
@ -0,0 +1,433 @@ |
||||
<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> |
||||
<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-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> |
||||
<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" |
||||
:data="tableList" |
||||
class="ivu-mt mt14" |
||||
v-loading="loading" |
||||
highlight-current-row |
||||
:row-key="getRowKey" |
||||
@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"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ scope.row.id }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="商品图" min-width="90"> |
||||
<template slot-scope="scope"> |
||||
<div class="tabBox_img" v-viewer> |
||||
<img v-lazy="scope.row.image" /> |
||||
</div> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="商品名称" min-width="250"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ scope.row.store_name }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="商品类型" min-width="100"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ scope.row.product_type }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="商品售价" min-width="100"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ scope.row.price }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="销量" min-width="100"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ scope.row.sales }}</span> |
||||
</template> |
||||
</el-table-column> |
||||
<el-table-column label="库存" min-width="100"> |
||||
<template slot-scope="scope"> |
||||
<span>{{ scope.row.stock }}</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"> |
||||
<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> |
||||
</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" /> |
||||
</div> |
||||
</el-card> |
||||
</div> |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
name: 'product_productList', |
||||
// components: { expandRow, attribute, taoBao, goodsDetail, userLabel, couponList }, |
||||
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, |
||||
md: 12, |
||||
sm: 24, |
||||
xs: 24 |
||||
}, |
||||
artFrom: { |
||||
page: 1, |
||||
limit: 15, |
||||
cate_id: '', |
||||
type: '1', |
||||
store_name: '' |
||||
}, |
||||
list: [], |
||||
tableList: [], |
||||
headeNum: [ |
||||
{ |
||||
count: 2, |
||||
name: '出售中商品', |
||||
type: 1 |
||||
}, |
||||
{ |
||||
count: 40, |
||||
name: '仓库中商品', |
||||
type: 2 |
||||
}, |
||||
{ |
||||
count: 5, |
||||
name: '已经售馨商品', |
||||
type: 3 |
||||
}, |
||||
{ |
||||
count: 10, |
||||
name: '警戒库存', |
||||
type: 4 |
||||
}, |
||||
{ |
||||
count: 1, |
||||
name: '商品回收站', |
||||
type: 5 |
||||
} |
||||
], |
||||
loading: false, |
||||
data: [], |
||||
total: 0, |
||||
attrTemplate: false, |
||||
ids: [], |
||||
goodsId: '', |
||||
isProductBox: false, |
||||
treeSelect: [], |
||||
multipleSelection: [] |
||||
} |
||||
}, |
||||
created() {}, |
||||
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) |
||||
}, |
||||
|
||||
getPath() {}, |
||||
// 导出 |
||||
async exports() { |
||||
let [th, filekey, data, fileName] = [[], [], [], ''] |
||||
let excelData = JSON.parse(JSON.stringify(this.artFrom)) |
||||
excelData.page = 1 |
||||
excelData.limit = 50 |
||||
excelData.ids = this.ids |
||||
for (let i = 0; i < excelData.page + 1; i++) { |
||||
let lebData = await this.getExcelData(excelData) |
||||
if (!fileName) fileName = lebData.filename |
||||
if (!filekey.length) { |
||||
filekey = lebData.fileKey |
||||
} |
||||
if (!th.length) th = lebData.header |
||||
if (lebData.export.length) { |
||||
data = data.concat(lebData.export) |
||||
excelData.page++ |
||||
} else { |
||||
this.$exportExcel(th, filekey, fileName, data) |
||||
return |
||||
} |
||||
} |
||||
}, |
||||
getExcelData(excelData) {}, |
||||
freight() {}, |
||||
// 批量上架 |
||||
onShelves() {}, |
||||
// 批量下架 |
||||
onDismount() {}, |
||||
getRowKey(row) { |
||||
return row.id |
||||
}, |
||||
// 选中某一行 |
||||
handleSelectRow(selection) { |
||||
const uniqueArr = [] |
||||
const ids = [] |
||||
for (let i = 0; i < selection.length; i++) { |
||||
const item = selection[i] |
||||
if (!ids.includes(item.id)) { |
||||
uniqueArr.push(item) |
||||
ids.push(item.id) |
||||
} |
||||
} |
||||
this.ids = ids |
||||
this.multipleSelection = uniqueArr |
||||
}, |
||||
|
||||
// tab选择 |
||||
onClickTab() { |
||||
this.artFrom.page = 1 |
||||
this.multipleSelection = [] |
||||
this.$refs.table.clearSelection() |
||||
this.getDataList() |
||||
}, |
||||
|
||||
// 获取商品表单头数量 |
||||
goodHeade() {}, |
||||
// 商品分类; |
||||
goodsCategory() {}, |
||||
// 商品列表; |
||||
getDataList() {}, |
||||
showSelectData() {}, |
||||
// 表格搜索 |
||||
userSearchs() { |
||||
this.artFrom.page = 1 |
||||
}, |
||||
// 上下架 |
||||
changeSwitch(row) {}, |
||||
// 数据导出; |
||||
exportData: function() {}, |
||||
// 属性弹出; |
||||
attrTap() { |
||||
this.attrTemplate = true |
||||
}, |
||||
changeTemplate(msg) { |
||||
this.attrTemplate = msg |
||||
}, |
||||
// 编辑 |
||||
edit(row) { |
||||
// this.$router.push({ path: this.$routeProStr + '/product/add_product/' + row.id }); |
||||
}, |
||||
// 确认 |
||||
del(row, tit, num) {} |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped lang="scss"> |
||||
::v-deep .el-tabs__item { |
||||
height: 54px !important; |
||||
line-height: 54px !important; |
||||
} |
||||
::v-deep .ivu-modal-mask { |
||||
z-index: 999 !important; |
||||
} |
||||
|
||||
::v-deep .ivu-modal-wrap { |
||||
z-index: 999 !important; |
||||
} |
||||
|
||||
.Box { |
||||
::v-deep .ivu-modal-body { |
||||
height: 700px; |
||||
overflow: auto; |
||||
} |
||||
} |
||||
|
||||
.batch-box { |
||||
::v-deep .ivu-modal-body { |
||||
overflow: auto; |
||||
min-height: 350px; |
||||
} |
||||
} |
||||
|
||||
.tabBox_img { |
||||
width: 36px; |
||||
height: 36px; |
||||
border-radius: 4px; |
||||
cursor: pointer; |
||||
|
||||
img { |
||||
width: 100%; |
||||
height: 100%; |
||||
} |
||||
} |
||||
|
||||
.bg { |
||||
position: fixed; |
||||
left: 0; |
||||
top: 0; |
||||
width: 100%; |
||||
height: 100%; |
||||
background: rgba(0, 0, 0, 0.5); |
||||
z-index: 11; |
||||
} |
||||
|
||||
::v-deep .happy-scroll-content { |
||||
width: 100%; |
||||
|
||||
.demo-spin-icon-load { |
||||
animation: ani-demo-spin 1s linear infinite; |
||||
} |
||||
|
||||
@keyframes ani-demo-spin { |
||||
from { |
||||
transform: rotate(0deg); |
||||
} |
||||
|
||||
50% { |
||||
transform: rotate(180deg); |
||||
} |
||||
|
||||
to { |
||||
transform: rotate(360deg); |
||||
} |
||||
} |
||||
|
||||
.demo-spin-col { |
||||
height: 100px; |
||||
position: relative; |
||||
border: 1px solid #eee; |
||||
} |
||||
} |
||||
|
||||
.labelInput { |
||||
border: 1px solid #dcdee2; |
||||
width: 100%; |
||||
padding: 0 15px; |
||||
border-radius: 5px; |
||||
min-height: 30px; |
||||
cursor: pointer; |
||||
font-size: 12px; |
||||
|
||||
.span { |
||||
color: #c5c8ce; |
||||
} |
||||
|
||||
.iconxiayi { |
||||
font-size: 12px; |
||||
} |
||||
} |
||||
.el-dropdown-link { |
||||
cursor: pointer; |
||||
color: var(--prev-color-primary); |
||||
font-size: 12px; |
||||
} |
||||
.el-icon-arrow-down { |
||||
font-size: 12px; |
||||
} |
||||
.el-dropdown-menu__item { |
||||
a { |
||||
color: #606266; |
||||
} |
||||
} |
||||
.label_width { |
||||
width: 400px; |
||||
} |
||||
</style> |
Loading…
Reference in new issue