Commit d4f94dea by chenwq

众筹活动

1 parent 267ee600
...@@ -13,6 +13,17 @@ const getActivityPageApi = params => { ...@@ -13,6 +13,17 @@ const getActivityPageApi = params => {
}) })
} }
//分页众筹活动
const getCrowdfundListApi = params => {
params.method = 'scrm.api.shopmall.crowdfunding.activity.page'
return http({
url: 'rop-scrm-shopmall/router',
method: 'GET',
data: params,
sign: true
})
}
//创建/编辑活动 //创建/编辑活动
const addOrUpdateActivityApi = params => { const addOrUpdateActivityApi = params => {
params.method = `${defaultPath}add.or.update` params.method = `${defaultPath}add.or.update`
...@@ -83,4 +94,4 @@ const getSharedApi = params => { ...@@ -83,4 +94,4 @@ const getSharedApi = params => {
}) })
} }
export default { getActivityPageApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi } export default { getActivityPageApi, getCrowdfundListApi, toggleStatusApi, deleteActivityApi, topActivityApi, getSharedApi, addOrUpdateActivityApi, getActivityDetailApi }
...@@ -328,7 +328,7 @@ const staticRoutes = Object.freeze([ ...@@ -328,7 +328,7 @@ const staticRoutes = Object.freeze([
meta: {} meta: {}
}, },
{ {
name: 'editCar', name: 'editActivity',
path: '/seckillActivity/editActivity', path: '/seckillActivity/editActivity',
component: resolve => require([`@/views/seckillActivity/editActivity.vue`], resolve), component: resolve => require([`@/views/seckillActivity/editActivity.vue`], resolve),
meta: {} meta: {}
...@@ -340,10 +340,16 @@ const staticRoutes = Object.freeze([ ...@@ -340,10 +340,16 @@ const staticRoutes = Object.freeze([
meta: {} meta: {}
}, },
{ {
name: 'editCar', name: 'editCrowdFund',
path: '/seckillActivity/editCrowdFund', path: '/seckillActivity/editCrowdFund',
component: resolve => require([`@/views/seckillActivity/editCrowdFund.vue`], resolve), component: resolve => require([`@/views/seckillActivity/editCrowdFund.vue`], resolve),
meta: {} meta: {}
},
{
name: 'crowdFundDetail',
path: '/seckillActivity/crowdFundDetail',
component: resolve => require([`@/views/seckillActivity/crowdFundDetail.vue`], resolve),
meta: {}
} }
]) ])
export default staticRoutes export default staticRoutes
...@@ -273,6 +273,15 @@ export default { ...@@ -273,6 +273,15 @@ export default {
labelWidth: 56, labelWidth: 56,
type: 'input', type: 'input',
maxlength: 100 maxlength: 100
},
{
label: '推荐人类型',
name: 'orderSource',
type: 'select',
optionList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'orderSourceList'
} }
], ],
// 快递信息 // 快递信息
...@@ -484,6 +493,14 @@ export default { ...@@ -484,6 +493,14 @@ export default {
} }
}, },
{ {
label: '推荐人类型',
prop: 'shareStaffName',
width: '180',
formatter: cellValue => {
return cellValue.shareStaffName || '-'
}
},
{
label: '支付总价', label: '支付总价',
prop: 'payPrice', prop: 'payPrice',
formatter: cellValue => { formatter: cellValue => {
......
...@@ -104,6 +104,10 @@ export default { ...@@ -104,6 +104,10 @@ export default {
name: 'shareStaffName' name: 'shareStaffName'
}, },
{ {
label: '推荐人类型',
name: ''
},
{
label: '车架号', label: '车架号',
name: 'vin' name: 'vin'
}, },
...@@ -135,6 +139,10 @@ export default { ...@@ -135,6 +139,10 @@ export default {
{ {
label: '发货地址', label: '发货地址',
name: 'shipAddress' name: 'shipAddress'
},
{
label: '其他信息',
name: ''
} }
], ],
// 售后信息 // 售后信息
......
<!-- 专区管理 -->
<template>
<div class="edit-share marketing p-t-20 edit-box">
<div class="container edit-container">
<p class="edit-title">活动名称</p>
<GLCombiForm ref="showSearch" class="p-t-20" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
<!-- 表格区域 开始 -->
<GLTable ref="zoneRef" :getListApi="getListApi" :noDataImg="url" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<!-- <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div> -->
</GLTable>
<!-- 表格区域 end -->
</div>
</div>
</template>
<script>
import * as dayjs from 'dayjs'
import url from '@/assets/empty.png'
export default {
name: 'crowdFundDetail',
data() {
return {
size: 'small',
url: url,
searchForm: {
zoneName: '',
createDate: []
},
tableSearchForm: {},
// 搜索
searchFormData: [
{
label: '专区名称',
name: 'zoneName',
type: 'input',
maxlength: 20
},
{
label: '创建日期',
name: 'createDate',
type: 'datePicker',
isClear: true,
pickerOptions: 'beforeRangePickerOptions'
}
],
// 表格按钮
// tableButtonList: [
// {
// type: 'GLButton',
// name: '编辑',
// attrs: {
// type: 'text',
// fn: '编辑'
// },
// listeners: {
// click: row => this.handleEdit(2, row)
// }
// },
// {
// type: 'el-button',
// name: '删除',
// attrs: {
// type: 'text'
// },
// listeners: {
// click: this.handleDelete
// }
// }
// ],
// 表格
getListApi: this.$apis.zoneList.getZoneListApi,
tableParams: {
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '专区名称',
prop: 'zoneName'
},
{
label: '创建日期',
prop: 'createdDate',
// width: '180',
formatter: cellValue => {
return dayjs(cellValue.createdDate).format('YYYY-MM-DD HH:mm:ss')
}
}
]
},
pageConf: { pageSize: 'pageSize', pageNum: 'currentPage', totalCount: 'total' }
}
},
mounted() { },
methods: {
getParams() {
var params = JSON.parse(JSON.stringify(this.searchForm))
params.zoneType = '2' //专区类型(1发现频道,2商城专区)
if (this.searchForm.createDate.length) {
params.startTime = new Date(this.searchForm.createDate[0]).toLocaleDateString().replace(/\//g, '-') + ' 00:00:00'
params.endTime = new Date(this.searchForm.createDate[1]).toLocaleDateString().replace(/\//g, '-') + ' 23:59:59'
}
delete params.createDate
return params
},
beforeSearchFn() {
return new Promise(resolve => {
this.tableSearchForm = this.getParams()
delete this.tableSearchForm.createDate
resolve()
})
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
if (action == 'confirm') {
this.$apis[apiModule][apiName](apiParams).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
fn && fn()
this.handleSearch()
}
})
}
}
})
},
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
var params = {
addOrEdit: addOrEdit,
$title: encodeURI(addOrEdit == 1 ? '新建专区' : '编辑专区')
}
addOrEdit != 1 && (params.id = row.id)
this.$router.push({
path: '/zoneList/editZone',
query: params
})
},
handleDelete(row) {
this.secondConfirm('删除', '是否确认删除该专区?', 'zoneList', 'deleteZoneApi', { id: row.id })
},
setTableFinishFun() {
//接收到的数据为空
this.$refs.zoneRef.data.length ? (this.$refs.zoneRef.tableHeightValues = '') : this.$refs.zoneRef.setTableHeightFun()
},
handleSearch() {
this.$refs.zoneRef.refreshTable()
},
handleReset() {
this.searchForm = {
zoneName: '',
createDate: []
}
this.handleSearch()
}
}
}
</script>
<style scoped></style>
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<template> <template>
<div class="marketing p-t-20"> <div class="marketing p-t-20">
<div class="m-b-20"> <div class="m-b-20">
<GLButton :size="size" type="primary" class="el-icon-plus" @click="handleEdit(1)" fn="新建众筹" mode="el-button">新建众筹</GLButton> <GLButton :size="size" class="default-blue-btn el-icon-plus" type="default" @click="handleEdit(1)" fn="新建众筹" mode="el-button">新建众筹</GLButton>
<el-button :size="size" type="default" class="default-blue-btn" @click="handleJump">订单管理</el-button>
</div> </div>
<div class="container"> <div class="container">
<GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm> <GLCombiForm ref="showSearch" :rowNumber="1" :formObj="searchForm" :formData="searchFormData" @handleOk="handleSearch" @handleRest="handleReset"></GLCombiForm>
...@@ -15,6 +16,9 @@ ...@@ -15,6 +16,9 @@
<img class="img-60 pointer" slot="reference" :src="scope.scope.activityImg" /> <img class="img-60 pointer" slot="reference" :src="scope.scope.activityImg" />
</el-popover> </el-popover>
</template> </template>
<div slot="viewAmount" slot-scope="scope">
<p class="cursor-pointer" @click="handleDetail(scope.scope)">{{ scope.scope.viewAmount || 0 }}</p>
</div>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton> <GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div> </div>
...@@ -158,7 +162,7 @@ export default { ...@@ -158,7 +162,7 @@ export default {
}, },
], ],
// 表格 // 表格
getListApi: this.$apis.seckillActivity.getActivityPageApi, getListApi: this.$apis.seckillActivity.getCrowdfundListApi,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: true, tableOption: true,
...@@ -176,6 +180,7 @@ export default { ...@@ -176,6 +180,7 @@ export default {
{ {
label: '浏览量(次)', label: '浏览量(次)',
prop: 'viewAmount', prop: 'viewAmount',
addHtml: 'viewAmount',
width: 140 width: 140
}, },
{ {
...@@ -208,7 +213,8 @@ export default { ...@@ -208,7 +213,8 @@ export default {
}, },
{ {
label: '剩余库存', label: '剩余库存',
prop: 'goodsStock' prop: 'goodsStock',
width: 110
}, },
{ {
label: '创建日期', label: '创建日期',
...@@ -221,6 +227,7 @@ export default { ...@@ -221,6 +227,7 @@ export default {
{ {
label: '活动状态', label: '活动状态',
name: 'activityStatus', name: 'activityStatus',
width: 110,
formatter: cellValue => { formatter: cellValue => {
return this.baseData.statusList.find(item => item.confId == cellValue.activityStatus).confName return this.baseData.statusList.find(item => item.confId == cellValue.activityStatus).confName
} }
...@@ -268,6 +275,12 @@ export default { ...@@ -268,6 +275,12 @@ export default {
}) })
}, },
handleJump(path, row = {}) {
this.$router.push({
path: '/orderManage/index'
})
},
secondConfirm(title, txt, apiModule, apiName, apiParams, fn) { secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm(txt, title, { this.$confirm(txt, title, {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -339,6 +352,16 @@ export default { ...@@ -339,6 +352,16 @@ export default {
}) })
}, },
// 明细
handleDetail(row) {
this.$router.push({
path: '/seckillActivity/crowdFundDetail',
query: {
id: row.id
}
})
},
//新增活动 //新增活动
// addActivity() { // addActivity() {
// this.$router.push('/seckillActivity/editCrowdFund/1') // this.$router.push('/seckillActivity/editCrowdFund/1')
......
...@@ -679,7 +679,7 @@ export default { ...@@ -679,7 +679,7 @@ export default {
// 活动详情 // 活动详情
if (info.activityDetail) { if (info.activityDetail) {
form.activityDetail = decodeURIComponent(info.activityDetail) form.activityDetail = decodeURIComponent(info.activityDetail)
this.$refs.configEditFormRef.$refs.activityDetailTextBox.setEdit(info.activityDetail) this.$refs.configEditFormRef.$refs.activityDetailTextBox[0].setEdit(form.activityDetail)
} }
this.$nextTick(() => { this.$nextTick(() => {
this.editStatus = false this.editStatus = false
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!