更新Note

1. 修复购物车,订单和退单后后置任务正确执行
	2. 修复佣金记录金额和详情
	3. 修复管理端 移动应用界面下订单管理数据统计不准确的问题
	4. 修复短信API升级-后台使用一号通
	5. 修复用户管理相关问题
	6. 修复核销点核销后核销地址不准确
	7. 修复资源同步云服务的问题
新增功能
	1. 秒杀
		a. 秒杀时段配置
		b. 秒杀商品维护
	2. 财务管理
		a. 申请提现
		b. 财务记录
			i. 充值记录
			ii. 资金监控
		c. 佣金记录
	3. 普通商品显示该商品正在参加的活动信息[秒杀]
This commit is contained in:
stivepeim
2020-11-05 16:21:06 +08:00
parent 912cf6403e
commit 6827148d7a
574 changed files with 45105 additions and 4899 deletions

View File

@@ -79,7 +79,8 @@ export function listCategroy(pram) {
export function treeCategroy(pram) {
const data = {
type: pram.type,
status: pram.status
status: pram.status,
name: pram.name
}
return request({
url: '/admin/category/list/tree',

133
admin/src/api/financial.js Normal file
View File

@@ -0,0 +1,133 @@
import request from '@/utils/request'
/**
* 提现申请 列表
* @param pram
*/
export function applyListApi(params) {
return request({
url: '/admin/finance/apply/list',
method: 'get',
params
})
}
/**
* 提现申请 金额
* @param pram
*/
export function applyBalanceApi(params) {
return request({
url: '/admin/finance/apply/balance',
method: 'post',
params
})
}
/**
* 提现申请 修改
* @param pram
*/
export function applyUpdateApi(params) {
return request({
url: '/admin/finance/apply/update',
method: 'post',
params
})
}
/**
* 提现申请 审核
* @param pram
*/
export function applyStatusApi(params, data) {
return request({
url: '/admin/finance/apply/apply',
method: 'post',
params,
data
})
}
/**
* 充值 列表
* @param pram
*/
export function topUpLogListApi(params) {
return request({
url: '/admin/user/topUpLog/list',
method: 'get',
params
})
}
/**
* 充值 金额
* @param pram
*/
export function balanceApi() {
return request({
url: '/admin/user/topUpLog/balance',
method: 'post'
})
}
/**
* 充值 删除
* @param pram
*/
export function topUpLogDeleteApi(params) {
return request({
url: '/admin/user/topUpLog/delete',
method: 'get',
params
})
}
/**
* 资金监控 列表
* @param pram
*/
export function monitorListApi(params) {
return request({
url: '/admin/finance/founds/monitor/list',
method: 'get',
params
})
}
/**
* 资金监控 佣金详细记录
* @param pram
*/
export function monitorListDetailApi(userId, params) {
return request({
url: `/admin/finance/founds/monitor/list/user/detail/${userId}`,
method: 'get',
params
})
}
/**
* 资金监控 明细类型
* @param pram
*/
export function monitorListOptionApi() {
return request({
url: `/admin/finance/founds/monitor/list/option`,
method: 'get'
})
}
/**
* 佣金记录 列表
* @param pram
*/
export function brokerageListApi(params) {
return request({
url: '/admin/finance/founds/monitor/list/user',
method: 'get',
params
})
}

View File

@@ -85,3 +85,148 @@ export function integralListApi(params, data) {
data
})
}
/**
* 秒杀配置 列表
* @param pram
*/
export function seckillListApi(params) {
return request({
url: '/admin/store/seckill/manger/list',
method: 'get',
params
})
}
/**
* 秒杀配置 详情
* @param pram
*/
export function seckillInfoApi(params) {
return request({
url: '/admin/store/seckill/manger/info',
method: 'get',
params
})
}
/**
* 秒杀配置 新增
* @param pram
*/
export function seckillSaveApi(data) {
return request({
url: '/admin/store/seckill/manger/save',
method: 'post',
data
})
}
/**
* 秒杀配置 修改
* @param pram
*/
export function seckillUpdateApi(params, data) {
return request({
url: '/admin/store/seckill/manger/update',
method: 'post',
params,
data
})
}
/**
* 秒杀配置 删除
* @param pram
*/
export function seckillDeleteApi(params) {
return request({
url: '/admin/store/seckill/manger/delete',
method: 'get',
params
})
}
/**
* 秒杀商品 列表
* @param pram
*/
export function seckillStoreListApi(params) {
return request({
url: '/admin/store/seckill/list',
method: 'get',
params
})
}
/**
* 秒杀商品 详情
* @param pram
*/
export function seckillStoreInfoApi(params) {
return request({
url: '/admin/store/seckill/info',
method: 'get',
params
})
}
/**
* 秒杀商品 新增
* @param pram
*/
export function seckillStoreSaveApi(data) {
return request({
url: '/admin/store/seckill/save',
method: 'post',
data
})
}
/**
* 秒杀商品 修改
* @param pram
*/
export function seckillStoreUpdateApi(params, data) {
return request({
url: '/admin/store/seckill/update',
method: 'post',
params,
data
})
}
/**
* 秒杀商品 删除
* @param pram
*/
export function seckillStoreDeleteApi(params) {
return request({
url: '/admin/store/seckill/delete',
method: 'get',
params
})
}
/**
* 秒杀商品 修改状态
*/
export function seckillStoreStatusApi(params) {
return request({
url: '/admin/store/seckill/update/status',
method: 'post',
params
})
}
/**
* 秒杀配置 修改状态
*/
export function seckillConfigStatusApi(id,params) {
return request({
url: `/admin/store/seckill/manger/update/status/${id}`,
method: 'post',
params
})
}

View File

@@ -6,13 +6,13 @@
prop="name"
:rules="[{ required:true,message:'请输入分类名称',trigger:['blur','change'] }]"
>
<el-input v-model="editPram.name"  :maxlength="biztype.value === 1 ? 5 : 20" placeholder="分类名称" />
<el-input v-model="editPram.name"  :maxlength="biztype.value === 1 ? 8 : 20" placeholder="分类名称" />
</el-form-item>
<el-form-item label="URL">
<el-input v-model="editPram.url" placeholder="URL" />
</el-form-item>
<el-form-item label="父级" v-if="biztype.value!==3">
<el-cascader v-model="editPram.pid" :options="biztype.value === 5 ? allTreeList : parentOptions" :props="categoryProps" style="width:100%" />
<el-cascader v-model="editPram.pid" :disabled="isCreate ===1 && editPram.pid ===0" :options="biztype.value === 5 ? allTreeList : parentOptions" :props="categoryProps" style="width:100%" />
</el-form-item>
<el-form-item label="菜单图标" v-if="biztype.value===5">
<el-input placeholder="请选择菜单图标" v-model="editPram.extra">
@@ -128,11 +128,8 @@ export default {
initEditData() {
this.parentOptions = [...this.allTreeList]
this.addTreeListLabelForCasCard(this.parentOptions, 'child')
if (this.isCreate !== 1) {
const { id } = this.prent
this.editPram.pid = id
} else {
const { extra, name, pid, sort, status, type, id, url } = this.editData
const { extra, name, pid, sort, status, type, id, url } = this.editData
if(this.isCreate === 1){
this.editPram.extra = extra
this.editPram.name = name
this.editPram.pid = pid
@@ -141,6 +138,9 @@ export default {
this.editPram.type = type
this.editPram.url = url
this.editPram.id = id
}else{
this.editPram.pid = this.prent.id
this.editPram.type = this.biztype.value
}
},
addTreeListLabelForCasCard(arr, child) {
@@ -161,12 +161,14 @@ export default {
},
handlerSaveOrUpdate(isSave) {
if (isSave) {
this.editPram.pid = this.prent.id
// this.editPram.pid = this.prent.id
this.loadingBtn = true
categoryApi.addCategroy(this.editPram).then(data => {
this.$emit('hideEditDialog')
this.$message.success('创建目录成功')
this.loadingBtn = false
}).catch(() => {
this.loadingBtn = false
})
} else {
this.editPram.pid = Array.isArray(this.editPram.pid) ? this.editPram.pid[0] : this.editPram.pid
@@ -175,6 +177,8 @@ export default {
this.$emit('hideEditDialog')
this.$message.success('更新目录成功')
this.loadingBtn = false
}).catch(() => {
this.loadingBtn = false
})
}
}

View File

@@ -19,7 +19,7 @@
<div class="container">
<el-form inline size="small">
<el-form-item>
<el-select v-model="listPram.status" placeholder="状态" clearable class="selWidth">
<el-select v-model="listPram.status" placeholder="状态" class="selWidth">
<el-option
v-for="item in constants.roleListStatus"
:key="item.value"
@@ -86,7 +86,7 @@
<el-table-column label="操作" min-width="200" fixed="right">
<template slot-scope="scope">
<el-button
v-if="(biztype.value === 1 && scope.row.pid === 0) || (biztype.value !== 1)"
v-if="(biztype.value === 1 && scope.row.pid === 0) || biztype.value === 5"
type="text"
size="small"
@click="handleAddMenu(scope.row)"
@@ -179,10 +179,10 @@ export default {
dataList: [],
treeList: [],
listPram: {
pid: this.pid,
pid: this.pid,
type: this.biztype.value,
status: null,
name: null,
status: -1,
name: '',
page: constants.page.page,
limit: constants.page.limit[0]
},
@@ -193,10 +193,10 @@ export default {
}
},
mounted() {
// if(this.biztype.value === 3){
// this.listPram.pageSize = constants.page.pageSize[4]
// this.handlerGetList()
// }else{
/* if(this.biztype.value === 3){
this.listPram.pageSize = constants.page.pageSize[4]
this.handlerGetList()
}else{*/
this.handlerGetTreeList()
// }
},
@@ -254,13 +254,15 @@ export default {
})
},
handlerGetList() {
categoryApi.listCategroy(this.listPram).then(data => {
this.treeList = data.list
})
this.handlerGetTreeList();
// categoryApi.listCategroy({status:this.listPram.status, type: 1 }).then(data => {
// this.treeList = data.list
// })
},
handlerGetTreeList() {
// this.biztype.value === 5 && !this.selectModel) ? -1 : 1
const _pram = { type: this.biztype.value, status: !this.selectModel ? -1 : (this.biztype.value === 5 ? -1 : 1) }
// const _pram = { type: this.biztype.value, status: !this.selectModel ? -1 : (this.biztype.value === 5 ? -1 : 1) }
const _pram = { type: this.biztype.value, status: this.listPram.status, name: this.listPram.name }
this.loading = true
this.biztype.value!==3 ? categoryApi.treeCategroy(_pram).then(data => {
this.treeList = this.handleAddArrt(data)
@@ -279,7 +281,6 @@ export default {
console.log('data:', data)
},
handleAddArrt(treeData) {
// let _result = this.addTreeListLabel(treeData)
const _result = selfUtil.addTreeListLabel(treeData)
return _result
},

View File

@@ -384,6 +384,28 @@ export const selectComponents = [
format: 'HH:mm:ss',
'value-format': 'HH:mm:ss'
},
{
__config__: {
label: '固定时间范围',
tag: 'time-select',
tagIcon: 'time-select',
span: 24,
showLabel: true,
labelWidth: null,
layout: 'colFormItem',
defaultValue: null,
required: true,
regList: [],
changeTag: true,
document: 'https://element.eleme.cn/#/zh-CN/component/time-picker'
},
style: { width: '100%' },
disabled: false,
clearable: true,
placeholder: '请选择',
format: 'HH:mm',
'value-format': 'HH:mm'
},
{
__config__: {
label: '日期选择',

View File

@@ -57,7 +57,7 @@ function buildFromBtns(scheme, type) {
if (scheme.formBtns && type === 'file') {
str = `<el-form-item size="large">
<el-button type="primary" @click="submitForm">提交</el-button>
<el-button @click="resetForm">重置</el-button>
<el-button @click="resetForm">取消</el-button>
</el-form-item>`
if (someSpanIsNot24) {
str = `<el-col :span="24">
@@ -304,6 +304,11 @@ const tags = {
const height = el.height ? `:height="${el.height}"` : ''
return `<${tag} ${vModel}${height} >`
},
'time-select': el => {
const { tag, vModel } = attrBuilder(el)
const height = el.height ? `:height="${el.height}"` : ''
return `<${tag} ${vModel}${height} >`
},
tinymce: el => {
const { tag, vModel } = attrBuilder(el)
const branding = el.branding ? `:branding="${el.branding}"` : ''

View File

@@ -13,5 +13,7 @@ export default {
'el-time-picker': 'change',
'el-date-picker': 'change',
'el-rate': 'change',
tinymce: 'blur'
tinymce: 'blur',
'time-select': 'change'
}

View File

@@ -39,7 +39,7 @@ function formBtns(h) {
return <el-col>
<el-form-item size='mini'>
<el-button type='primary' onClick={this.submitForm}>提交</el-button>
<el-button onClick={this.resetForm}>重置</el-button>
<el-button onClick={this.resetForm}>取消</el-button>
</el-form-item>
</el-col>
}
@@ -188,6 +188,7 @@ export default {
})
},
resetForm() {
this.$emit('resetForm', this.formConf)
this.formConfCopy = JSON.parse(JSON.stringify(this.formConf))
this.$refs[this.formConf.formRef].resetFields()
},

View File

@@ -6,6 +6,7 @@
:form-conf="formConf"
:form-edit-data="editData"
@submit="handlerSubmit"
@resetForm="resetForm"
/>
<!-- editData:{{ editData }}-->
<!-- formConf:{{ formConf }}-->
@@ -54,6 +55,9 @@ export default {
},
handlerSubmit(formValue) {
this.$emit('submit', formValue)
},
resetForm(formValue){
this.$emit('resetForm', formValue)
}
}
}

View File

@@ -0,0 +1,57 @@
<template>
<div>
<el-time-select
placeholder="起始时间"
v-model="startTime"
:picker-options="{
start: '00:00',
step: '01:00',
end: '24:00'
}">
</el-time-select>
<el-time-select
placeholder="结束时间"
v-model="endTime"
:picker-options="{
start: '00:00',
step: '01:00',
end: '24:00',
minTime: startTime
}">
</el-time-select>
</div>
</template>
<script>
export default {
name: "index",
data() {
return {
startTime: '',
endTime: ''
}
},
props: {
value: {}
},
beforeMount(){
// 接收 v-model 数据
if(this.value){
this.startTime = this.value.split(',')[0]
this.endTime = this.value.split(',')[1]
}
},
watch: {
startTime: function(val) {
this.$emit('input', [val, this.endTime].join(','))
},
endTime: function(val) {
this.$emit('input', [this.startTime, val].join(','))
}
}
}
</script>
<style scoped>
</style>

View File

@@ -5,7 +5,7 @@
<el-form inline size="small">
<el-form-item label="优惠劵名称:">
<el-input v-model="tableFrom.name" placeholder="请输入优惠券名称" class="selWidth" size="small">
<el-button slot="append" icon="el-icon-search" size="small" @click="getList" />
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
</el-input>
</el-form-item>
</el-form>
@@ -228,8 +228,9 @@ export default {
}
},
// 列表
getList() {
getList(num) {
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page
marketingListApi(this.tableFrom).then(res => {
this.tableData.data = res.list
this.tableData.total = res.total

View File

@@ -4,13 +4,11 @@
<div class="container">
<el-form inline>
<el-form-item label="商品分类:">
<el-cascader v-model="tableFrom.cateId" :options="merCateList" :props="props" clearable class="selWidth mr20" @change="getList"/>
<el-cascader v-model="tableFrom.cateId" :options="merCateList" :props="props" clearable class="selWidth mr20" @change="getList(1)"/>
</el-form-item>
<el-form-item label="商品搜索:">
<!--<el-input v-model="tableFrom.keywords" placeholder="请输入内容"></el-input>-->
<el-input v-model="tableFrom.keywords" @input="onInput()" placeholder="请输入商品名称,关键字,产品编号" class="selWidth">
<el-button slot="append" icon="el-icon-search" @click="getList"/>
<el-input v-model="tableFrom.keywords" @input="onInput($event)" placeholder="请输入商品名称,关键字,产品编号" class="selWidth">
<el-button slot="append" icon="el-icon-search" @click="getList(1)"/>
</el-input>
</el-form-item>
</el-form>
@@ -151,7 +149,7 @@ export default {
this.getCategorySelect()
},
methods: {
onInput(){
onInput(e){
this.$forceUpdate();
},
changeType(v) {
@@ -221,8 +219,9 @@ export default {
this.$message.error(res.message)
})
},
getList() {
getList(num) {
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page;
productLstApi(this.tableFrom).then(res => {
this.tableData.data = res.list
this.tableData.total = res.total

View File

@@ -14,7 +14,7 @@
<img :src="item.sattDir">
<i class="el-icon-error btndel" @click="handleRemove(index)" />
</div>
<div class="upLoadPicBox" @click="modalPicTap('2')">
<div class="upLoadPicBox" @click="modalPicTap('2')" v-show="imageList.length<20">
<div class="upLoad">
<i class="el-icon-camera cameraIconfont" />
</div>
@@ -31,7 +31,7 @@
:visible.sync="visible"
width="896px"
:before-close="handleClose"
z-index="3004"
:modal="false"
>
<upload-index v-if="visible" :checkedMore="imageList" :isMore="isMore" @getImage="getImage" />
</el-dialog>
@@ -98,7 +98,7 @@ export default {
},
handleRemove (i) {
this.imageList.splice(i, 1)
this.$emit('input', this.imageList.join(','))
this.$emit('input', JSON.stringify(this.imageList))
},
// 移动
handleDragStart (e, item) {

View File

@@ -112,8 +112,9 @@
:key="index"
class="gridPic"
>
<img v-if="index === 0" v-lazy="item.localImg?item.localImg:item.sattDir" :class="item.isSelect ? 'on': '' " @click="changImage(item, index, pictrueList.list)" />
<img v-else v-lazy="item.sattDir?item.sattDir:localImg" :class="item.isSelect ? 'on': '' " @click="changImage(item, index, pictrueList.list)" />
<img v-lazy="item.sattDir?item.sattDir:localImg" :class="item.isSelect ? 'on': '' " @click="changImage(item, index, pictrueList.list)" />
<!--<img v-if="index === 0" v-lazy="item.localImg?item.localImg:item.sattDir" :class="item.isSelect ? 'on': '' " @click="changImage(item, index, pictrueList.list)" />-->
<!--<img v-else v-lazy="item.sattDir?item.sattDir:localImg" :class="item.isSelect ? 'on': '' " @click="changImage(item, index, pictrueList.list)" />-->
</div>
</div>
</div>
@@ -123,6 +124,7 @@
:page-sizes="[12, 24, 48, 60]"
:page-size="tableData.limit"
:current-page="tableData.page"
:pager-count="5"
layout="total, sizes, prev, pager, next, jumper"
:total="pictrueList.total"
@size-change="handleSizeChange"

View File

@@ -3,8 +3,9 @@
<el-dialog
title="上传图片"
:visible.sync="visible"
width="896px"
width="950px"
:modal="false"
append-to-body
:before-close="handleClose"
>
<upload-index v-if="visible" :isMore="isMore" :modelName="modelName" @getImage="getImage" />
@@ -22,7 +23,8 @@ export default {
visible: false,
callback: function() {},
isMore: '',
modelName: ''
modelName: '',
ISmodal: false
}
},
watch: {

View File

@@ -13,10 +13,8 @@ export function filterEmpty(val) {
// 时间过滤器
export function formatDate(time) {
console.log(time)
if (time !== 0) {
const date = new Date(time * 1000);
console.log(date)
return formatDates(date, 'yyyy-MM-dd hh:mm');
}
}
@@ -96,3 +94,50 @@ export function articleTypeFilter(status) {
return arrayList.filter(item => Number(status) === Number(item.id))[0].name
}
/**
* @description 支付状态
*/
export function payStatusFilter(status) {
const statusMap = {
false: '未支付',
true: '已支付'
}
return statusMap[status]
}
/**
* @description 提现方式
*/
export function extractTypeFilter(status) {
const statusMap = {
'bank': '银行卡',
'alipay': '支付宝',
'weixin': '微信'
}
return statusMap[status]
}
/**
* @description 充值类型
*/
export function rechargeTypeFilter(status) {
const statusMap = {
'public': '微信公众号',
'weixinh5': '微信H5支付',
'routine': '小程序'
}
return statusMap[status]
}
/**
* @description 财务审核状态
*/
export function extractStatusFilter(status) {
const statusMap = {
'-1': '已拒绝',
'0': '审核中',
'1': '已提现'
}
return statusMap[status]
}

View File

@@ -1,6 +1,10 @@
import { storeStaffListApi } from '@/api/storePoint'
import { seckillListApi } from '@/api/marketing'
import Cookies from 'js-cookie'
/**
* @description 确定操作弹框
*/
export function modalSure(title) {
return new Promise((resolve, reject) => {
this.$confirm(`确定${title || '永久删除该文件'}?`, '提示', {
@@ -42,3 +46,14 @@ export function getStoreStaff() {
})
})
}
/**
* @description 秒杀配置列表
*/
export function getSeckillList(status) {
return new Promise((resolve, reject) => {
seckillListApi({page: 1, limit: 9999, isDel: false, status: status || null}).then(async res => {
resolve(res)
})
})
}

View File

@@ -18,6 +18,7 @@ import "vue-ydui/dist/ydui.base.css";
// 懒加载
import VueLazyload from 'vue-lazyload'
Vue.config.devtools=true
import App from './App'
import store from './store'
import router from './router'
@@ -31,6 +32,7 @@ import UploadFile from '@/components/Upload/uploadFile.vue'
import ueditorFrom from '@/components/ueditorFrom'
import VueUeditorWrap from 'vue-ueditor-wrap'
import iconFrom from './components/iconFrom'
import TimeSelect from '@/components/TimeSelect'
import dialog from "@/libs/dialog";
import scroll from "@/libs/loading";
import schema from "async-validator";
@@ -67,6 +69,7 @@ Vue.component('SelfUpload', SelfUpload)
Vue.component('iconFrom', iconFrom)
Vue.component('ueditorFrom', ueditorFrom)
Vue.component('uploadFile', UploadFile)
Vue.component('timeSelect', TimeSelect)
Vue.prototype.$modalSure = modalSure
Vue.prototype.$modalAttr = modalAttr
Vue.prototype.$modalIcon = modalIcon

View File

@@ -5,7 +5,7 @@ import Layout from '@/layout'
const marketingRouter = {
path: '/marketing',
component: Layout,
redirect: '/marketing/coupon/list',
redirect: '/coupon/list',
name: 'Marketing',
meta: {
title: '营销',
@@ -88,23 +88,30 @@ const marketingRouter = {
]
},
{
path: 'spike',
component: () => import('@/views/marketing/spike/index'),
name: 'Spike',
path: 'seckill',
component: () => import('@/views/marketing/seckill/index'),
name: 'Seckill',
meta: { title: '秒杀管理', icon: '' },
hidden: true,
children: [
{
path: 'spikeconfig',
component: () => import('@/views/marketing/spike/config/index'),
name: 'spikeConfig',
path: 'config',
component: () => import('@/views/marketing/seckill/seckillConfig/index'),
name: 'SeckillConfig',
meta: { title: '秒杀配置', icon: '' }
},
{
path: 'bargainList',
component: () => import('@/views/marketing/spike/googs/index'),
name: 'bargainList',
meta: { title: '秒杀商品', icon: '' }
path: 'list/:timeId?',
component: () => import('@/views/marketing/seckill/seckillList/index'),
name: 'SeckillList',
meta: { title: '秒杀商品', icon: '',noCache: true,
activeMenu: `/marketing/seckill/list` }
},
{
path: 'creatSeckill/:name?/:timeId?/:id?',
component: () => import('@/views/marketing/seckill/seckillList/creatSeckill'),
name: 'CreatSeckill',
meta: { title: '添加秒杀商品', icon: '', noCache: true,
activeMenu: `/marketing/seckill/list` }
}
]
},

View File

@@ -44,7 +44,7 @@ const mobileRouter = {
{
path: 'orderStatisticsDetail/:type/:time?',
component: () => import('@/views/mobile/orderStatistics/Statistics.vue'),
name: 'OrderStatistics',
name: 'OrderStatisticsDetail',
meta: { title: '订单数据统计' }
}
]

View File

@@ -16,36 +16,6 @@ const orderRouter = {
component: () => import('@/views/order/index'),
name: 'OrderIndex',
meta: { title: '订单管理' }
},
{
path: 'statistics',
component: () => import('@/views/mobile/orderStatistics/index.vue'),
name: 'OrderStatistics',
meta: { title: '订单统计' }
},
{
path: 'orderList/:types?',
component: () => import('@/views/mobile/orderStatistics/orderList.vue'),
name: 'OrderList',
meta: { title: '订单列表' }
},
{
path: 'orderDelivery/:oid/:id?',
component: () => import('@/views/mobile/orderStatistics/orderDelivery.vue'),
name: 'OrderDelivery',
meta: { title: '订单发货' }
},
{
path: 'orderDetail/:id?/:goname?',
component: () => import('@/views/mobile/orderStatistics/orderDetail.vue'),
name: 'OrderDetail',
meta: { title: '订单详情' }
},
{
path: 'orderStatistics/:type/:time?',
component: () => import('@/views/mobile/orderStatistics/Statistics.vue'),
name: 'OrderStatistics',
meta: { title: '订单数据统计' }
}
]
}

View File

@@ -340,7 +340,7 @@ table .el-image{
font-size: 12px !important;
}
.selWidth{
width: 350px;
width: 300px;
}
//表格字体
//.el-table--mini{

View File

@@ -24,7 +24,7 @@ export const categoryType = [ // 1 产品分类2 附件分类3 文章分
]
export const roleListStatus = [
{ label: '全部', value: '' },
{ label: '全部', value: -1 },
{ label: '显示', value: 1 },
{ label: '不显示', value: 0 }
]

View File

@@ -61,7 +61,7 @@ service.interceptors.response.use(
})
})
}
if (res.code !== 200) {
if (res.code !== 200 && res.code !== 401) {
if (isPhone()) { //移动端
return Promise.reject(res || 'Error')
}

View File

@@ -128,6 +128,7 @@
:is-create="isCreate"
:edit-data="editData"
@submit="handlerSubmit"
@resetForm="resetForm"
/>
</el-dialog>
</div>
@@ -183,6 +184,9 @@
this.getList()
},
methods: {
resetForm(formValue) {
this.dialogVisible = false
},
checkTemp() {
this.$modalSure('同步我的模板到小程序').then(() => {
tempAsyncApi().then(() => {

View File

@@ -112,6 +112,7 @@
:is-create="isCreate"
:edit-data="editData"
@submit="handlerSubmit"
@resetForm="resetForm"
/>
</el-dialog>
</div>
@@ -151,6 +152,9 @@
this.getList()
},
methods: {
resetForm(formValue) {
this.dialogVisible = false
},
seachList() {
this.tableFrom.page = 1
this.getList()

View File

@@ -8,10 +8,10 @@
<el-radio-group v-model="tableFrom.dateLimit" type="button" class="mr20" size="small" @change="selectChange(tableFrom.dateLimit)">
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button>
</el-radio-group>
<el-date-picker v-model="timeVal" value-format="yyyy/MM/dd" format="yyyy/MM/dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTime" />
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTime" />
</el-form-item>
<el-form-item label="关键字:">
<el-input v-model="tableFrom.keywords" placeholder="请输入请输入姓名、电话、UID" class="selWidth" size="small">
<el-input v-model="tableFrom.keywords" placeholder="请输入姓名、电话、UID" class="selWidth" size="small">
<el-button slot="append" icon="el-icon-search" size="small" @click="seachList" />
</el-input>
</el-form-item>
@@ -139,7 +139,7 @@
<el-radio-group v-model="spreadFrom.dateLimit" type="button" class="mr20" size="small" @change="selectChangeSpread(spreadFrom.dateLimit)">
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button>
</el-radio-group>
<el-date-picker v-model="timeValSpread" value-format="yyyy/MM/dd" format="yyyy/MM/dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTimeSpread" />
<el-date-picker v-model="timeValSpread" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTimeSpread" />
</el-form-item>
<el-form-item label="用户类型:">
<el-radio-group v-model="spreadFrom.type" size="small" @change="onChanges">
@@ -352,15 +352,18 @@
selectChangeSpread(tab) {
this.timeValSpread = []
this.spreadFrom.dateLimit = tab
this.spreadFrom.page = 1
this.onName === 'man' ? this.getListSpread() : this.getSpreadOrderList()
},
// 具体日期
onchangeTimeSpread(e) {
this.timeValSpread = e
this.tableFrom.dateLimit = e ? this.timeValSpread.join(',') : ''
this.spreadFrom.page = 1
this.onName === 'man' ? this.getListSpread() : this.getSpreadOrderList()
},
onChanges() {
this.spreadFrom.page = 1
this.onName === 'man' ? this.getListSpread() : this.getSpreadOrderList()
},
// 推广人列表

View File

@@ -1,13 +1,327 @@
<template>
<div>佣金记录</div>
<div class="divBox">
<el-card class="box-card">
<div slot="header" class="clearfix">
<div class="container">
<el-form size="small" label-width="100px" :inline="true">
<el-form-item label="关键字:">
<el-input v-model="tableFrom.keywords" placeholder="昵称/ID" class="selWidth" size="small" clearable>
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
</el-input>
</el-form-item>
<el-form-item label="佣金范围:">
<el-col :span="11">
<el-input v-model="tableFrom.min" placeholder="请输入最小金额" type="number" clearable></el-input>
</el-col>
<el-col class="line" :span="2" style="text-align: center;">-</el-col>
<el-col :span="11">
<el-input v-model="tableFrom.max" placeholder="请输入最大金额" type="number" clearable></el-input>
</el-col>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="getList(1)" size="mini">查询</el-button>
</el-form-item>
</el-form>
</div>
</div>
<el-table
v-loading="listLoading"
:data="tableData.data"
style="width: 100%"
size="mini"
class="table"
highlight-current-row
>
<el-table-column
prop="uid"
label="会员ID"
width="80"
/>
<el-table-column
prop="nickname"
label="昵称"
min-width="130"
/>
<el-table-column
prop="totalBrokerage"
label="总佣金金额"
min-width="120"
/>
<el-table-column
label="账户余额"
min-width="100"
prop="nowMoney"
/>
<el-table-column
prop="brokerage"
label="账户佣金"
min-width="200"
/>
<el-table-column
prop="totalExtract"
label="到账佣金"
min-width="150"
/>
<el-table-column label="操作" min-width="130" fixed="right">
<template slot-scope="scope">
<el-button size="small" type="text" @click="handlerOpenInfo(scope.row)">详情</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="Visible"
width="900px"
v-if="Visible"
:before-close="Close">
<div>
<div class="acea-row row-middle" v-if="userDetail">
<div class="dashboard-workplace-header-tip-desc">
<span class="dashboard-workplace-header-tip-desc-sp">姓名: {{ userDetail.nickname }}</span>
<span class="dashboard-workplace-header-tip-desc-sp">上级推广人: {{ userDetail.spreadName | filterEmpty }}</span>
<span class="dashboard-workplace-header-tip-desc-sp">佣金总收入: {{ userDetail.totalBrokerage }}</span>
<span class="dashboard-workplace-header-tip-desc-sp">账户余额: {{ userDetail.nowMoney }}</span>
<span class="dashboard-workplace-header-tip-desc-sp">创建时间: {{ userDetail.createTime }}</span>
</div>
</div>
<el-divider></el-divider>
<el-form size="small" label-position="left" label-width="90px">
<el-form-item label="时间选择:" class="width100">
<el-radio-group v-model="userTableFrom.dateLimit" type="button" class="mr20" size="small" @change="selectChangeUser(userTableFrom.dateLimit)">
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button>
</el-radio-group>
<el-date-picker v-model="timeValUser" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTimeUser" />
</el-form-item>
<el-form-item label="关键字:">
<el-input v-model="userTableFrom.keywords" placeholder="请输入订单id" class="selWidth" size="small">
<el-button slot="append" icon="el-icon-search" size="small" @click="getUserList(1)" />
</el-input>
</el-form-item>
</el-form>
<el-divider></el-divider>
<el-table
v-loading="tablistLoading"
:data="userDetailData.data"
style="width: 100%"
size="mini"
class="table"
highlight-current-row
>
<el-table-column
prop="nickName"
label="昵称"
width="80"
/>
<el-table-column
prop="number"
label="佣金金额"
min-width="100"
/>
<el-table-column
prop="createTime"
label="获得时间"
min-width="120"
/>
<el-table-column
label="备注"
min-width="150"
prop="mark"
/>
</el-table>
<div class="block">
<el-pagination
:page-sizes="[10, 20, 30, 40]"
:page-size="userTableFrom.limit"
:current-page="userTableFrom.page"
layout="total, sizes, prev, pager, next, jumper"
:total="userDetailData.total"
@size-change="handleSizeChange"
@current-change="pageChange"
/>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
}
import { brokerageListApi, monitorListDetailApi } from '@/api/financial'
import { fromList } from '@/utils/constants.js'
export default {
name: 'AccountsCapital',
data() {
return {
timeVal: [],
tableData: {
data: [],
total: 0
},
userDetailData: {
data: [],
total: 0
},
listLoading: true,
tableFrom: {
min: '',
max: '',
keywords: '',
page: 1,
limit: 20
},
userTableFrom: {
page: 1,
limit: 10,
keywords: '',
dateLimit: ''
},
fromList: fromList,
options: [],
Visible: false,
tablistLoading: false,
userDetail: {},
timeValUser: []
}
},
mounted() {
// this.getTypes()
this.getList()
},
methods: {
Close(){
this.Visible = false
},
handlerOpenInfo(row){
this.userDetail = row
this.Visible = true
this.tablistLoading = true
this.getUserList()
},
getUserList(num){
this.userTableFrom.page = num ? num : this.userTableFrom.page;
monitorListDetailApi(this.userDetail.uid, this.userTableFrom).then(res => {
this.userDetailData.data = res.list
this.userDetailData.total = res.total
this.tablistLoading = false
}).catch((res) => {
this.tablistLoading = false
})
},
selectChangeUser (tab) {
this.userTableFrom.dateLimit = tab
this.timeValUser = []
this.userTableFrom.page = 1;
this.getUserList()
},
// 具体日期
onchangeTimeUser(e) {
this.timeValUser = e
this.userTableFrom.dateLimit = e ? this.timeValUser.join(',') : ''
this.userTableFrom.page = 1;
this.getUserList()
},
// 列表
getList(num) {
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page;
brokerageListApi(this.tableFrom).then(res => {
this.tableData.data = res.list
this.tableData.total = res.total
this.listLoading = false
}).catch((res) => {
this.listLoading = false
})
},
pageChange(page) {
this.tableFrom.page = page
this.getList()
},
handleSizeChange(val) {
this.tableFrom.limit = val
this.getList()
},
getTypes() {
billTypeApi().then(res => {
this.options = res.data
localStorage.setItem('CashKey', JSON.stringify(res.data))
}).catch((res) => {
this.$message.error(res.message)
})
}
}
}
</script>
<style lang="sass" scoped>
<style scoped lang="scss">
.dashboard-workplace {
&-header {
&-avatar {
width: 64px;
height: 64px;
border-radius: 50%;
margin-right: 16px;
font-weight: 600;
}
&-tip {
width: 82%;
display: inline-block;
vertical-align: middle;
margin-top: -12px;
&-title {
font-size: 13px;
color: #000000;
margin-bottom: 12px;
}
&-desc {
width: 100%;
&-sp {
width: 32%;
color: #17233D;
font-size: 13px;
display: inline-block;
line-height: 25px;
}
}
}
&-extra {
.ivu-col {
p {
text-align: right;
}
p:first-child {
span:first-child {
margin-right: 4px;
}
span:last-child {
color: #808695;
}
}
p:last-child {
font-size: 22px;
}
}
}
}
}
.selWidth{
width: 300px;
}
</style>

View File

@@ -1,13 +1,351 @@
<template>
<div>提现申请</div>
<div class="divBox">
<el-card class="box-card">
<div slot="header" class="clearfix">
<div class="container">
<el-form size="small" label-width="100px">
<el-form-item label="时间选择:" class="width100">
<el-radio-group v-model="tableFrom.dateLimit" type="button" class="mr20" size="small" @change="selectChange(tableFrom.dateLimit)">
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button>
</el-radio-group>
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTime" />
</el-form-item>
<el-form-item label="提现状态:">
<el-radio-group v-model="tableFrom.status" type="button" size="small" @change="getList(1)">
<el-radio-button label="">全部</el-radio-button>
<el-radio-button label="0">审核中</el-radio-button>
<el-radio-button label="1">已提现</el-radio-button>
<el-radio-button label="-1">已拒绝</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="提现方式:">
<el-radio-group v-model="tableFrom.extractType" type="button" size="small" @change="getList(1)">
<el-radio-button label="">全部</el-radio-button>
<el-radio-button label="bank">银行卡</el-radio-button>
<el-radio-button label="alipay">支付宝</el-radio-button>
<el-radio-button label="weixin">微信</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="关键字:" class="width100">
<el-input v-model="tableFrom.keywords" placeholder="微信号/姓名/支付宝账号/银行卡号/失败原因" class="selWidth" size="small">
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
</el-input>
</el-form-item>
</el-form>
</div>
<cards-data :cardLists="cardLists"></cards-data>
</div>
<el-table
v-loading="listLoading"
:data="tableData.data"
style="width: 100%"
size="mini"
class="table"
highlight-current-row
>
<el-table-column
prop="id"
label="ID"
width="60"
/>
<el-table-column
label="用户信息"
min-width="180"
>
<template slot-scope="scope">
<p>用户昵称{{scope.row.nickName}}</p>
<p>用户id{{scope.row.uid}}</p>
</template>
</el-table-column>
<el-table-column
prop="extractPrice"
label="提现金额"
min-width="120"
/>
<el-table-column
label="提现方式"
min-width="100"
>
<template slot-scope="scope">
<span>{{ scope.row.extractType | extractTypeFilter }}</span>
</template>
</el-table-column>
<el-table-column
label="账号"
min-width="200"
>
<template slot-scope="scope">
<div v-if="scope.row.extractType=== 'bank'">
<p>姓名{{scope.row.realName }}</p>
<p>卡号{{scope.row.bankCode }}</p>
<p>开户行{{scope.row.bankName }}</p>
</div>
<span v-else-if="scope.row.extractType=== 'alipay'">
<p>姓名{{scope.row.realName }}</p>
<p>支付宝号{{scope.row.alipayCode }}</p>
<div class="acea-row">
收款码
<div class="demo-image__preview" v-if="scope.row.qrcodeUrl">
<el-image
:src="scope.row.qrcodeUrl"
:preview-src-list="[scope.row.qrcodeUrl]"
/>
</div>
<div v-else></div>
</div>
</span>
<span v-else-if="scope.row.extractType=== 'weixin'">
<p>姓名{{scope.row.realName }}</p>
<p>微信号{{scope.row.wechat }}</p>
<div class="acea-row">
收款码
<div class="demo-image__preview" v-if="scope.row.qrcodeUrl">
<el-image
:src="scope.row.qrcodeUrl"
:preview-src-list="[scope.row.qrcodeUrl]"
/>
</div>
<div v-else></div>
</div>
</span>
<span v-else>已退款</span>
</template>
</el-table-column>
<el-table-column
label="审核状态"
min-width="200"
>
<template slot-scope="scope">
<span class="spBlock">{{ scope.row.status | extractStatusFilter }}</span>
<span v-if="scope.row.status === -1">拒绝原因{{scope.row.failMsg}}</span>
<template v-if="scope.row.status === 0">
<el-button type="danger" icon="el-icon-close" size="mini" @click="onExamine(scope.row.id)">未通过</el-button>
<el-button type="primary" icon="el-icon-check" size="mini" @click="ok(scope.row.id)">通过</el-button>
</template>
</template>
</el-table-column>
<el-table-column
label="备注"
min-width="200"
>
<template slot-scope="scope">
<span class="spBlock">{{ scope.row.mark | filterEmpty }}</span>
</template>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
min-width="150"
/>
<el-table-column label="操作" min-width="80" fixed="right" align="center">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleEdit(scope.row)">编辑</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="dialogVisible"
width="500px"
:before-close="handleClose">
<!--微信-->
<zb-parser
v-if="dialogVisible && (tableFrom.extractType==='weixin' || extractType==='weixin')"
:form-id="124"
:is-create="isCreate"
:edit-data="editData"
@submit="handlerSubmit"
@resetForm="resetForm"
/>
<!--支付宝-->
<zb-parser
v-if="dialogVisible && (tableFrom.extractType==='alipay' || extractType==='alipay')"
:form-id="126"
:is-create="isCreate"
:edit-data="editData"
@submit="handlerSubmit"
@resetForm="resetForm"
/>
<!--银行卡-->
<zb-parser
v-if="dialogVisible && (tableFrom.extractType==='bank' || extractType==='bank')"
:form-id="125"
:is-create="isCreate"
:edit-data="editData"
@submit="handlerSubmit"
@resetForm="resetForm"
/>
</el-dialog>
</div>
</template>
<script>
export default {
}
import { applyListApi, applyBalanceApi, applyUpdateApi, applyStatusApi } from '@/api/financial'
import { fromList } from '@/utils/constants.js'
import cardsData from '@/components/cards/index'
import zbParser from '@/components/FormGenerator/components/parser/ZBParser'
export default {
name: 'AccountsExtract',
components: {
cardsData,
zbParser
},
data() {
return {
editData: {},
isCreate: 1,
dialogVisible: false,
timeVal: [],
tableData: {
data: [],
total: 0
},
listLoading: true,
tableFrom: {
extractType: '',
status: '',
dateLimit: '',
keywords: '',
page: 1,
limit: 20
},
fromList: fromList,
cardLists: [],
applyId: null,
extractType: ''
}
},
mounted() {
this.getList()
this.getBalance()
},
methods: {
resetForm(){
this.dialogVisible = false;
},
handleEdit(row) {
this.extractType = row.extractType;
this.applyId = row.id;
this.dialogVisible = true;
this.isCreate = 1;
this.editData = JSON.parse(JSON.stringify(row));
},
handlerSubmit(formValue) {
formValue.id = this.applyId;
formValue.extractType = this.extractType;
applyUpdateApi(formValue).then(data => {
this.$message.success('编辑成功')
this.dialogVisible = false
this.getList()
})
},
handleClose() {
this.dialogVisible = false
this.editData = {}
},
onExamine(id) {
this.$prompt('未通过', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputErrorMessage: '请输入原因',
inputType: 'textarea',
inputValue: '输入信息不完整或有误!',
inputPlaceholder: '请输入原因',
inputValidator: (value) => {
if (!value) {
return '请输入原因'
}
}
}).then(({ value }) => {
applyStatusApi({ id: id, status: -1, backMessage: value }).then(res => {
this.$message({
type: 'success',
message: '提交成功'
})
this.getList()
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消输入'
})
})
},
ok(id) {
this.$modalSure('审核通过吗').then(() => {
applyStatusApi({id: id, status: 1 }).then(() => {
this.$message.success('操作成功')
this.getList()
})
})
},
// 金额
getBalance() {
applyBalanceApi({dateLimit: this.tableFrom.dateLimit}).then(res => {
this.cardLists = [
{ name: '待提现金额', count: res.toBeWithdrawn },
{ name: '佣金总金额', count: res.commissionTotal },
{ name: '已提现金额', count: res.withdrawn },
{ name: '未提现金额', count: res.unDrawn }
]
})
},
// 选择时间
selectChange(tab) {
this.timeVal = []
this.tableFrom.dateLimit = tab
this.tableFrom.page = 1;
this.getList();
this.getBalance();
},
// 具体日期
onchangeTime(e) {
this.timeVal = e
this.tableFrom.dateLimit = e ? this.timeVal.join(',') : ''
this.tableFrom.page = 1;
this.getList();
this.getBalance();
},
// 列表
getList(num) {
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page;
applyListApi(this.tableFrom).then(res => {
this.tableData.data = res.list
this.tableData.total = res.total
this.listLoading = false
}).catch(() => {
this.listLoading = false
})
},
pageChange(page) {
this.tableFrom.page = page
this.getList()
},
handleSizeChange(val) {
this.tableFrom.limit = val
this.getList()
}
}
}
</script>
<style lang="sass" scoped>
<style scoped>
.selWidth{
width: 300px;
}
</style>

View File

@@ -1,13 +1,221 @@
<template>
<div>充值记录</div>
<div class="divBox">
<el-card class="box-card">
<div slot="header" class="clearfix">
<div class="container">
<el-form size="small" label-width="100px">
<el-form-item label="时间选择:" class="width100">
<el-radio-group v-model="tableFrom.dateLimit" type="button" class="mr20" size="small" @change="selectChange(tableFrom.dateLimit)">
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button>
</el-radio-group>
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTime" />
</el-form-item>
<el-form-item label="是否支付:">
<el-radio-group v-model="tableFrom.paid" type="button" size="small" @change="getList(1)">
<el-radio-button label="">全部</el-radio-button>
<el-radio-button label="1">已支付</el-radio-button>
<el-radio-button label="0">未支付</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item label="关键字:" class="width100">
<el-input v-model="tableFrom.keywords" placeholder="微信昵称/姓名/订单号" class="selWidth" size="small">
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
</el-input>
</el-form-item>
</el-form>
</div>
<cards-data :card-lists="cardLists" />
</div>
<el-table
v-loading="listLoading"
:data="tableData.data"
style="width: 100%"
size="mini"
class="table"
highlight-current-row
>
<el-table-column
prop="id"
label="ID"
width="60"
/>
<el-table-column
label="头像"
min-width="80"
>
<template slot-scope="scope">
<div class="demo-image__preview">
<el-image
:src="scope.row.avatar"
:preview-src-list="[scope.row.avatar]"
/>
</div>
</template>
</el-table-column>
<el-table-column
prop="nickname"
label="用户昵称"
min-width="130"
/>
<el-table-column
prop="orderId"
label="订单号"
min-width="180"
/>
<el-table-column
sortable
label="支付金额"
min-width="120"
:sort-method="(a,b)=>{return a.price - b.price}"
prop="price"
/>
<el-table-column
sortable
label="赠送金额"
min-width="120"
prop="givePrice"
:sort-method="(a,b)=>{return a.givePrice - b.givePrice}"
/>
<el-table-column
label="是否支付"
min-width="80"
>
<template slot-scope="scope">
<span class="spBlock">{{ scope.row.paid | payStatusFilter }}</span>
</template>
</el-table-column>
<el-table-column
label="充值类型"
min-width="80"
>
<template slot-scope="scope">
<span>{{ scope.row.rechargeType | rechargeTypeFilter }}</span>
</template>
</el-table-column>
<el-table-column
label="支付时间"
min-width="150"
>
<template slot-scope="scope">
<span class="spBlock">{{ scope.row.payTime || '无' }}</span>
</template>
</el-table-column>
<el-table-column label="操作" min-width="120" fixed="right" align="center">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleDelete(scope.row)" v-if="!scope.row.paid">删除</el-button>
<el-button type="text" size="small" @click="handleRefund(scope.row)" v-else>退款</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>
</div>
</template>
<script>
export default {
import { topUpLogListApi, balanceApi, topUpLogDeleteApi } from '@/api/financial'
import cardsData from '@/components/cards/index'
import { fromList } from '@/utils/constants.js'
export default {
name: 'AccountsBill',
components: { cardsData },
data() {
return {
cardLists: [],
timeVal: [],
tableData: {
data: [],
total: 0
},
listLoading: true,
tableFrom: {
paid: '',
dateLimit: '',
keywords: '',
page: 1,
limit: 20
},
fromList: fromList
}
},
mounted() {
this.getList()
this.getStatistics()
},
methods: {
handleRefund(row) {
}
},
handleDelete(row, idx) {
this.$modalSure().then(() => {
topUpLogDeleteApi( {id:row.id} ).then(() => {
this.$message.success('删除成功')
this.getList(this.tableFrom.page)
})
})
},
// 选择时间
selectChange(tab) {
this.tableFrom.dateLimit = tab
this.timeVal = []
this.tableFrom.page = 1;
this.getList()
},
// 具体日期
onchangeTime(e) {
this.timeVal = e
this.tableFrom.dateLimit = e ? this.timeVal.join(',') : ''
this.tableFrom.page = 1;
this.getList()
},
// 列表
getList(num) {
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page;
topUpLogListApi(this.tableFrom).then(res => {
this.tableData.data = res.list
this.tableData.total = res.total
this.listLoading = false
}).catch(() => {
this.listLoading = false
})
},
pageChange(page) {
this.tableFrom.page = page
this.getList()
},
handleSizeChange(val) {
this.tableFrom.limit = val
this.getList()
},
// 统计
getStatistics() {
balanceApi().then(res => {
const stat = res
this.cardLists = [
{ name: '充值总金额', count: stat.totalPayPrice, icon: 'el-icon-s-goods' },
{ name: '充值退款金额', count: stat.totalRefundPrice, icon: 'el-icon-s-order' },
{ name: '小程序充值金额', count: stat.totalRoutinePrice, icon: 'el-icon-s-cooperation' },
{ name: '公众号充值金额', count: stat.totalWxPrice, icon: 'el-icon-s-finance' }
]
})
}
}
}
</script>
<style lang="sass" scoped>
<style scoped>
.selWidth{
width: 300px;
}
</style>

View File

@@ -1,13 +1,165 @@
<template>
<div>资金监控</div>
<div class="divBox">
<el-card class="box-card">
<div slot="header" class="clearfix">
<div class="container">
<el-form size="small" label-width="100px">
<el-form-item label="时间选择:" class="width100">
<el-radio-group v-model="tableFrom.dateLimit" type="button" class="mr20" size="small" @change="selectChange(tableFrom.dateLimit)">
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}</el-radio-button>
</el-radio-group>
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTime" />
</el-form-item>
<el-form-item label="明细类型:">
<el-select class="selWidth" v-model="tableFrom.type" filterable clearable placeholder="请选择" @change="getList(1)">
<el-option
v-for="(item, index) in optionList"
:key="index"
:label="item.title"
:value="item.type"
/>
</el-select>
</el-form-item>
<el-form-item label="关键字:" class="width100">
<el-input v-model="tableFrom.keywords" placeholder="微信昵称/ID" class="selWidth" size="small">
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
</el-input>
</el-form-item>
</el-form>
</div>
</div>
<el-table
v-loading="listLoading"
:data="tableData.data"
style="width: 100%"
size="mini"
class="table"
highlight-current-row
>
<el-table-column
prop="uid"
label="会员ID"
width="80"
/>
<el-table-column
prop="nickName"
label="昵称"
min-width="130"
/>
<el-table-column
prop="number"
label="金额"
sortable
:sort-method="(a,b)=>{return a.number - b.number}"
min-width="120"
/>
<el-table-column
label="明细类型"
min-width="100"
prop="title"
/>
<el-table-column
prop="mark"
label="备注"
min-width="200"
/>
<el-table-column
prop="createTime"
label="创建时间"
min-width="150"
/>
</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>
</div>
</template>
<script>
export default {
}
import { monitorListApi, monitorListOptionApi } from '@/api/financial'
import { fromList } from '@/utils/constants.js'
export default {
name: 'AccountsCapital',
data() {
return {
timeVal: [],
tableData: {
data: [],
total: 0
},
listLoading: true,
tableFrom: {
type: '',
dateLimit: '',
keywords: '',
page: 1,
limit: 20
},
categoryId: '',
fromList: fromList,
optionList: []
}
},
mounted() {
// this.getTypes()
this.getOptionList()
this.getList()
},
methods: {
getOptionList() {
monitorListOptionApi().then(res => {
this.optionList = res
})
},
selectChange(tab) {
this.tableFrom.dateLimit = tab
this.timeVal = []
this.tableFrom.page = 1;
this.getList()
},
// 具体日期
onchangeTime(e) {
this.timeVal = e
this.tableFrom.dateLimit = e ? this.timeVal.join(',') : ''
this.tableFrom.page = 1;
this.getList()
},
// 列表
getList(num) {
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page;
monitorListApi(this.tableFrom).then(res => {
this.tableData.data = res.list
this.tableData.total = res.total
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="sass" scoped>
<style scoped>
.selWidth{
width: 300px;
}
</style>

View File

@@ -1,5 +1,5 @@
<template>
<div class="page-account">
<div class="page-account" :style="backgroundImages ? { backgroundImage: 'url(' + backgroundImages + ')'} : { backgroundImage: 'url(' + backgroundImageMo + ')'}">
<div class="container" :class="[ fullWidth > 768 ? 'containerSamll':'containerBig']">
<template v-if="fullWidth>768">
<swiper :options="swiperOption" class="swiperPross">
@@ -119,7 +119,8 @@ export default {
captchatImg: '',
swiperList: [],
loginLogo: '',
backgroundImage: '',
backgroundImages: '',
backgroundImageMo: require("@/assets/imgs/bg.jpg"),
fullWidth: document.body.clientWidth,
swiperOption: {
pagination: {
@@ -241,7 +242,7 @@ export default {
getLoginPicApi().then(res => {
this.swiperList = res.banner
this.loginLogo = res.logo
this.backgroundImage = res.backgroundImage
this.backgroundImages = res.backgroundImage
// Cookies.set('MerInfo', JSON.stringify(data))
})
},
@@ -270,7 +271,6 @@ export default {
this.$store.dispatch('user/login', this.loginForm)
.then(() => {
this.$router.push({ path: this.redirect || '/', query: this.otherQuery })
console.log('lalaalalala')
getStoreStaff()
this.loading = false
}).catch((err) => {
@@ -435,7 +435,6 @@ export default {
}
@media (min-width: $screen-md) {
.page-account {
background-image: url('../../assets/imgs/bg.jpg');
background-repeat: no-repeat;
background-position: center;
background-size: cover;

View File

@@ -6,6 +6,7 @@
:is-create="isCreate"
:edit-data="editData"
@submit="handlerSubmit"
@resetForm="resetForm"
v-if="isShow"
/>
</el-card>
@@ -30,6 +31,9 @@
this.getFormInfo()
},
methods: {
resetForm(formValue) {
this.isShow = false
},
handlerSubmit(data) {
const tempArr = []
for (var key in data) {

View File

@@ -10,7 +10,7 @@
<el-radio-button v-for="(item,i) in fromList.fromTxt" :key="i" :label="item.val">{{ item.text }}
</el-radio-button>
</el-radio-group>
<el-date-picker v-model="timeVal" value-format="yyyy/MM/dd" format="yyyy/MM/dd" size="small"
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small"
type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;"
@change="onchangeTime"/>
</el-form-item>

View File

@@ -0,0 +1,15 @@
<template>
<div>
<router-view />
</div>
</template>
<script>
export default {
}
</script>
<style lang="sass" scoped>
</style>

View File

@@ -0,0 +1,274 @@
<template>
<div class="divBox">
<el-card class="box-card">
<div slot="header" class="clearfix">
<div class="container">
<el-form inline>
<el-form-item label="是否显示">
<el-select v-model="tableFrom.status" placeholder="请选择" class="filter-item selWidth mr20" @change="getList(1)" clearable>
<el-option label="关闭" :value="0" />
<el-option label="开启" :value="1" />
</el-select>
</el-form-item>
<el-form-item label="秒杀名称:">
<el-input v-model="tableFrom.name" placeholder="请输入秒杀名称" class="selWidth">
<el-button slot="append" icon="el-icon-search" @click="getList(1)"/>
</el-input>
</el-form-item>
</el-form>
</div>
<el-button size="mini" type="primary" @click="add">添加秒杀配置</el-button>
</div>
<el-table
v-loading="listLoading"
:data="tableData.data"
style="width: 100%"
size="mini"
ref="multipleTable"
>
<el-table-column
prop="id"
label="ID"
min-width="50"
/>
<el-table-column
label="秒杀名称"
min-width="100"
>
<template slot-scope="scope">
<router-link :to="{ path:'/marketing/seckill/list/' + scope.row.id}">
<el-button type="text" size="small">{{scope.row.name}}</el-button>
</router-link>
</template>
</el-table-column>
<el-table-column
prop="name"
label="秒杀时段"
min-width="100"
>
<template slot-scope="scope">
{{scope.row.time.split(',').join(' - ')}}
</template>
</el-table-column>
<el-table-column label="轮播图" min-width="200">
<template slot-scope="scope">
<div class="acea-row" v-if="scope.row.silderImgs">
<div class="demo-image__preview mr5" v-for="item in JSON.parse(scope.row.silderImgs)" :key="item.attId">
<el-image
style="width: 36px; height: 36px"
:src="item.sattDir"
:preview-src-list="[item.sattDir]"
/>
</div>
</div>
<span v-else></span>
</template>
</el-table-column>
<!--<el-table-column-->
<!--label="排序"-->
<!--min-width="100"-->
<!--&gt;-->
<!--<template slot-scope="scope">-->
<!--<div v-if="!scope.row.isEdit" @click="onEditSort(scope.row)" @blur="onBlur(scope.row, scope.row.sort)" style="width: 100%;cursor: pointer;">{{scope.row.sort}}</div>-->
<!--<el-input v-model="scope.row.sort" placeholder="请输入排序" v-else @blur="onBlur(scope.row)"></el-input>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column
label="状态"
min-width="150"
>
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
:active-value="1"
:inactive-value="0"
active-text="开启"
inactive-text="关闭"
@change="onchangeIsShow(scope.row)"
/>
</template>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
min-width="130"
/>
<el-table-column label="操作" min-width="150" fixed="right" align="center">
<template slot-scope="scope">
<el-button type="text" size="small" @click="handleEdit(scope.row.id)">编辑</el-button>
<el-button type="text" size="small" @click="handleDelete(scope.row.id, scope.$index)" class="mr10">删除</el-button>
<router-link :to="{ path:'/marketing/seckill/creatSeckill/creat/' + scope.row.id}">
<el-button type="text" size="small">添加商品</el-button>
</router-link>
</template>
</el-table-column>
</el-table>
<div class="block mb20">
<el-pagination
:page-sizes="[10, 20, 30, 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>
</el-card>
<el-dialog
:title="isCreate===0 ? '添加数据' : '编辑数据'"
:visible.sync="dialogVisible"
width="700px"
:before-close="handleClose"
>
<div v-loading="loading">
<zb-parser
:form-id="formId"
:is-create="isCreate"
:edit-data="editData"
@submit="handlerSubmit"
@resetForm="resetForm"
v-if="dialogVisible"
/>
</div>
</el-dialog>
</div>
</template>
<script>
import zbParser from '@/components/FormGenerator/components/parser/ZBParser'
import { configSaveForm, configInfo } from '@/api/systemConfig.js'
import { seckillListApi, seckillUpdateApi, seckillInfoApi, seckillSaveApi, seckillDeleteApi, seckillConfigStatusApi } from '@/api/marketing'
export default {
name: "SeckillConfig",
components: { zbParser },
data() {
return {
dialogVisible: false,
isShow: true,
isCreate: 0,
editData: {},
formId: 123,
listLoading: true,
tableData: {
data: [],
total: 0
},
tableFrom: {
page: 1,
limit: 20,
name: '',
isDel: false,
status: ''
},
seckillId: '',
loading: false
}
},
mounted() {
this.getList()
},
methods: {
resetForm(formValue) {
this.dialogVisible = false
},
// 删除
handleDelete(id, idx) {
this.$modalSure().then(() => {
seckillDeleteApi({ id: id }).then(() => {
this.$message.success('删除成功')
this.tableData.data.splice(idx, 1)
})
})
},
onchangeIsShow(row) {
seckillConfigStatusApi(row.id, {status: row.status})
.then(async () => {
this.$message.success('修改成功');
this.getList()
})
},
onEditSort(row) {
this.$set(row, 'isEdit', true)
},
onBlur(row) {
this.$set(row, 'isEdit', false)
this.onEdit(row.id, row)
},
// 获取表单详情
getFormInfo(id) {
this.loading = true
seckillInfoApi({ id: id }).then(res => {
this.editData = res
this.dialogVisible = true
this.loading = false
}).catch(() => {
this.loading = false
})
},
// 编辑
handleEdit(id) {
this.seckillId = id
this.getFormInfo(id)
this.isCreate = 1
},
// 编辑
onEdit(id, obj) {
const data = obj ? obj : this.editData
seckillUpdateApi({id}, data).then(res => {
this.isSuccess()
}).catch((res) => {
this.listLoading = false
})
},
// 提交
handlerSubmit(formValue) {
if(formValue.time.split(',')[0].split(':')[0] > formValue.time.split(',')[1].split(':')[0]) return this.$message.error('请填写正确的时间范围')
this.isCreate === 0 ? seckillSaveApi(formValue).then(res => {
this.isSuccess()
}) : seckillUpdateApi({id: this.seckillId}, formValue).then(res => {
this.isSuccess()
})
},
isSuccess(){
this.$message.success('操作成功')
this.dialogVisible = false
this.getList()
},
// 列表
getList(num) {
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page;
seckillListApi(this.tableFrom).then(res => {
this.tableData.data = res.list
this.tableData.total = res.total
this.tableData.data.map(item => this.$set(item, 'isEdit', false))
this.listLoading = false
}).catch((res) => {
this.listLoading = false
})
},
pageChange(page) {
this.tableFrom.page = page
this.getList()
},
handleSizeChange(val) {
this.tableFrom.limit = val
this.getList()
},
add() {
this.isCreate = 0
this.dialogVisible = true
},
handleClose() {
this.dialogVisible = false
this.editData = {}
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,816 @@
<template>
<div class="divBox">
<el-card class="box-card">
<div slot="header" class="clearfix">
<el-steps :active="currentTab" align-center finish-status="success">
<el-step title="选择秒杀商品" />
<el-step title="填写基础信息" />
<el-step title="修改商品详情" />
</el-steps>
</div>
<el-form
ref="formValidate"
v-loading="fullscreenLoading"
class="formValidate mt20"
:rules="ruleValidate"
:model="formValidate"
label-width="150px"
@submit.native.prevent
>
<!-- 秒杀商品-->
<div v-show="currentTab === 0">
<el-form-item label="选择商品:" prop="image">
<div class="upLoadPicBox" @click="changeGood">
<div v-if="formValidate.image" class="pictrue"><img :src="formValidate.image"></div>
<div v-else class="upLoad">
<i class="el-icon-camera cameraIconfont"/>
</div>
</div>
</el-form-item>
</div>
<!-- 商品信息-->
<div v-show="currentTab === 1">
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="商品主图:" prop="image">
<div class="upLoadPicBox" @click="modalPicTap('1')">
<div v-if="formValidate.image" class="pictrue"><img :src="formValidate.image"></div>
<div v-else class="upLoad">
<i class="el-icon-camera cameraIconfont" />
</div>
</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="商品轮播图:" prop="images">
<div class="acea-row">
<div
v-for="(item,index) in formValidate.imagess"
:key="index"
class="pictrue"
draggable="true"
@dragstart="handleDragStart($event, item)"
@dragover.prevent="handleDragOver($event, item)"
@dragenter="handleDragEnter($event, item)"
@dragend="handleDragEnd($event, item)"
>
<img :src="item">
<i class="el-icon-error btndel" @click="handleRemove(index)" />
</div>
<div class="upLoadPicBox" @click="modalPicTap('2')">
<div class="upLoad">
<i class="el-icon-camera cameraIconfont" />
</div>
</div>
</div>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="商品标题:" prop="title">
<el-input v-model="formValidate.title" placeholder="请输入商品名称" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="秒杀活动简介:">
<el-input v-model="formValidate.info" type="textarea" :rows="3" placeholder="请输入商品简介" />
</el-form-item>
</el-col>
<!--<el-col v-bind="grid2">-->
<!--<el-form-item label="商品分类:" prop="cateIds">-->
<!--<el-cascader v-model="formValidate.cateIds" :options="merCateList" :props="props2" clearable class="selWidth" :show-all-levels="false" />-->
<!--</el-form-item>-->
<!--</el-col>-->
<el-col v-bind="grid2">
<el-form-item label="单位:" prop="unitName">
<el-input v-model="formValidate.unitName" placeholder="请输入单位" class="selWidth"/>
</el-form-item>
</el-col>
<el-col v-bind="grid2">
<el-form-item label="运费模板:" prop="tempId">
<div class="acea-row">
<el-select v-model="formValidate.tempId" placeholder="请选择" class="selWidth">
<el-option
v-for="item in shippingList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
<!--<el-button class="mr15" @click="addTem">添加运费模板</el-button>-->
</div>
</el-form-item>
</el-col>
<el-col v-bind="grid2">
<el-form-item label="当天参与活动次数:" prop="num">
<el-input-number v-model="formValidate.num" :step="1" step-strictly :min="1" placeholder="请输入活动次数" class="selWidth"/>
</el-form-item>
</el-col>
<el-col v-bind="grid2">
<el-form-item label="活动日期:" prop="timeVal">
<el-date-picker
class="selWidth"
v-model="formValidate.timeVal"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
size="small"
type="daterange"
placement="bottom-end"
placeholder="请选择活动日期"
@change="onchangeTime"
/>
</el-form-item>
</el-col>
<el-col v-bind="grid2">
<el-form-item label="活动时间:" prop="timeId">
<el-select v-model="formValidate.timeId" placeholder="请选择" class="selWidth">
<el-option
v-for="item in seckillTime"
:key="item.id"
:label="item.time"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="活动状态:" required>
<el-radio-group v-model="formValidate.status">
<el-radio :label="0" class="radio">关闭</el-radio>
<el-radio :label="1">开启</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<!-- 规格表格-->
<el-col :span="24">
<el-form-item label="商品属性:" class="labeltop" required>
<el-table
ref="multipleTable"
:data="ManyAttrValue"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
key="1"
v-if="formValidate.specType"
width="55">
</el-table-column>
<template v-if="manyTabDate && formValidate.specType">
<el-table-column v-for="(item,iii) in manyTabDate" :key="iii" align="center" :label="manyTabTit[iii].title" min-width="80">
<template slot-scope="scope">
<span class="priceBox" v-text="scope.row[iii]" />
</template>
</el-table-column>
</template>
<el-table-column align="center" label="图片" min-width="80">
<template slot-scope="scope">
<div class="upLoadPicBox" @click="modalPicTap('1','duo',scope.$index)">
<div v-if="scope.row.image" class="pictrue tabPic"><img :src="scope.row.image"></div>
<div v-else class="upLoad tabPic">
<i class="el-icon-camera cameraIconfont" />
</div>
</div>
</template>
</el-table-column>
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="140">
<template slot-scope="scope">
<el-input-number
size="small"
v-if="formThead[iii].title === '秒杀价'"
v-model="scope.row[iii]"
:min="0"
:precision="2" :step="0.1"
class="priceBox"
/>
<el-input-number
size="small"
v-else-if="formThead[iii].title === '限量'"
v-model="scope.row[iii]"
type="number"
:min="1"
:max="scope.row.stock"
:step="1" step-strictly
class="priceBox"
@change="inpChange(scope.row[iii], scope.row.id)"
/>
<span v-else v-text="scope.row[iii]" class="priceBox" />
<!--<el-input v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" class="priceBox" />-->
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
</el-row>
</div>
<!-- 商品详情-->
<div v-show="currentTab === 2">
<el-form-item label="商品详情:">
<ueditor-from v-model="formValidate.content" :content="formValidate.content" />
</el-form-item>
</div>
<el-form-item style="margin-top:30px;">
<el-button
v-show="(!$route.params.id && currentTab > 0) || ($route.params.id && currentTab===2)"
type="primary"
class="submission"
size="small"
@click="handleSubmitUp"
>上一步</el-button>
<el-button
v-show="currentTab == 0"
type="primary"
class="submission"
size="small"
@click="handleSubmitNest1('formValidate')"
>下一步</el-button>
<el-button
v-show="currentTab == 1"
type="primary"
class="submission"
size="small"
@click="handleSubmitNest2('formValidate')"
>下一步</el-button>
<el-button
v-show="currentTab===2"
:loading="loading"
type="primary"
class="submission"
size="small"
@click="handleSubmit('formValidate')"
>提交</el-button>
</el-form-item>
</el-form>
</el-card>
<CreatTemplates ref="addTemplates" @getList="getShippingList" />
</div>
</template>
<script>
import { productDetailApi, categoryApi } from '@/api/store'
import { shippingTemplatesList } from '@/api/logistics'
import { getSeckillList } from '@/libs/public'
import { seckillStoreSaveApi, seckillStoreUpdateApi, seckillStoreInfoApi } from '@/api/marketing'
import CreatTemplates from '@/views/systemSetting/logistics/shippingTemplates/creatTemplates'
const defaultObj = {
image: '',
images: '',
imagess: [],
title: '',
info: '',
num: 1,
unitName: '',
sort: 0,
giveIntegral: 0,
ficti: 0,
isShow: false,
tempId: '',
attrValue: [{
image: '',
price: 0,
cost: 0,
otPrice: 0,
stock: 0,
quota: 1,
barCode: '',
weight: 0,
volume: 0,
}],
attr: [],
selectRule: '',
content: '',
specType: false,
id: 0,
// productId: 0,
timeId: '',
startTime: '',
stopTime: '',
timeVal: [],
status: 0
}
const objTitle = {
price: {
title: '秒杀价'
},
cost: {
title: '成本价'
},
otPrice: {
title: '原价'
},
stock: {
title: '库存'
},
quota: {
title: "限量",
},
barCode: {
title: '商品编号'
},
weight: {
title: '重量KG'
},
volume: {
title: '体积(m³)'
}
}
export default {
name: "creatSeckill",
components: { CreatTemplates },
data() {
return {
props2: {
children: 'child',
label: 'name',
value: 'id',
multiple: true,
emitPath: false
},
grid2: {
xl: 8,
lg: 10,
md: 12,
sm: 24,
xs: 24
},
currentTab: 0,
formThead: Object.assign({}, objTitle),
formValidate: Object.assign({}, defaultObj),
loading: false,
fullscreenLoading: false,
merCateList: [], // 商户分类筛选
shippingList: [], // 运费模板
seckillTime: [],
ruleValidate: {
productId: [
{ required: true, message: '请选择商品', trigger: 'change' }
],
title: [
{ required: true, message: '请输入商品标题', trigger: 'blur' }
],
attrValue: [
{ required: true, message: '请选择商品属相', trigger: 'change', type: 'array', min: '1' }
],
num: [
{ required: true, message: '请输入活动次数', trigger: 'blur' }
],
unitName: [
{ required: true, message: '请输入单位', trigger: 'blur' }
],
info: [
{ required: true, message: '请输入秒杀商品简介', trigger: 'blur' }
],
tempId: [
{ required: true, message: '请选择运费模板', trigger: 'change' }
],
timeId: [
{ required: true, message: '请选择活动时间', trigger: 'change' }
],
image: [
{ required: true, message: '请上传商品图', trigger: 'change' }
],
imagess: [
{ required: true, message: '请上传商品轮播图', type: 'array', trigger: 'change' }
],
specType: [
{ required: true, message: '请选择商品规格', trigger: 'change' }
],
timeVal:[
{ required: true, message: '请选择活动日期', trigger: 'change', type: 'array'}
]
},
manyTabDate: {},
manyTabTit: {},
attrInfo: {},
tempRoute: {},
multipleSelection: [],
productId: 0,
OneattrValue: [Object.assign({}, defaultObj.attrValue[0])], // 单规格
ManyAttrValue: [Object.assign({}, defaultObj.attrValue[0])], // 多规格
}
},
computed: {
attrValue() {
const obj = Object.assign({}, defaultObj.attrValue[0])
delete obj.image
return obj
}
},
created() {
this.$watch('formValidate.attr', this.watCh)
this.tempRoute = Object.assign({}, this.$route)
},
mounted() {
getSeckillList(1).then((res) => {
this.seckillTime = res.list
})
this.formValidate.imagess = []
if ( this.$route.params.id ) {
this.setTagsViewTitle()
this.getInfo()
this.currentTab = 1
}
this.getShippingList()
this.getCategorySelect()
},
methods: {
inpChange(currentValue, id){
// this.ManyAttrValue.map(item => {
// if(!currentValue && item.id ===id){
// item.quota = 1
// this.$set(item, 'quota', 1)
// this.ManyAttrValue = Object.assign([], this.ManyAttrValue)
// }
// })
console.log(this.ManyAttrValue)
// if(!currentValue) item.quota = 1
},
watCh(val) {
const tmp = {}
const tmpTab = {}
this.formValidate.attr.forEach((o, i) => {
tmp['value' + i] = { title: o.attrName }
tmpTab['value' + i] = ''
})
this.manyTabTit = tmp
this.manyTabDate = tmpTab
this.formThead = Object.assign({}, this.formThead, tmp)
},
handleRemove (i) {
this.formValidate.imagess.splice(i, 1)
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
// 点击商品图
modalPicTap (tit, num, i) {
const _this = this
this.$modalUpload(function(img) {
if(tit==='1'&& !num){
_this.formValidate.image = img[0].sattDir
_this.ManyAttrValue[0].image = img[0].sattDir
}
if(tit==='2'&& !num){
img.map((item) => {
_this.formValidate.imagess.push(item.sattDir)
});
}
if(tit==='1'&& num === 'duo' ){
_this.specType ? _this.ManyAttrValue[i].image = img[0].sattDir : _this.ManyAttrValue[0].image = img[0].sattDir
}
},tit, 'content')
},
// 具体日期
onchangeTime(e) {
this.formValidate.timeVal = e;
this.formValidate.startTime = e ? e[0] : "";
this.formValidate.stopTime = e ? e[1] : "";
},
changeGood(){
const _this = this
this.$modalGoodList(function(row) {
_this.formValidate.image = row.image
_this.productId = row.id
// _this.formValidate.productId = row.id
})
},
handleSubmitNest1() {
if (!this.formValidate.image) {
this.$message.warning("请选择商品!");
return;
} else {
this.currentTab++;
if (!this.$route.params.id) this.getProdect(this.productId);
}
},
// 商品分类;
getCategorySelect() {
categoryApi({ status: -1, type: 1 }).then(res => {
this.merCateList = this.filerMerCateList(res)
})
},
filerMerCateList(treeData) {
return treeData.map((item) => {
if(!item.child){
item.disabled = true
}
item.label = item.name
return item
})
},
// 运费模板;
getShippingList() {
shippingTemplatesList(this.tempData).then(res => {
this.shippingList = res.list
})
},
// 运费模板
addTem() {
this.$refs.addTemplates.dialogVisible = true
this.$refs.addTemplates.getCityList()
},
// 商品详情
getInfo () {
if(!this.$route.params.id){
this.getProdect(this.productId)
}else{
this.getSekllProdect(this.$route.params.id)
}
},
getProdect(id) {
this.fullscreenLoading = true
productDetailApi(id).then(async res => {
let info = res
this.formValidate = {
image: info.image,
imagess: JSON.parse(info.sliderImage),
title: info.storeName,
info: info.storeInfo,
quota: '',
unitName: info.unitName,
sort: info.sort,
isShow: info.isShow,
tempId: info.tempId,
attr: info.attr,
selectRule: info.selectRule,
content: info.content,
specType: info.specType,
productId: info.id,
giveIntegral: info.giveIntegral,
ficti: info.ficti,
timeId: this.$route.params.id ? Number(info.timeId) : this.$route.params.timeId ? Number(this.$route.params.timeId) : '',
startTime: info.startTime || '',
stopTime: info.stopTime || '',
timeVal: [],
status: 0,
num: 1
}
if(info.specType){
info.attrValues.forEach((row) => {
row.quota = row.stock;
});
this.$nextTick(() => {
info.attrValues.forEach((row) => {
this.$refs.multipleTable.toggleRowSelection(row, true);
this.$set(row, 'checked', true)
});
});
this.ManyAttrValue = info.attrValues
this.multipleSelection = info.attrValues
}else{
info.attrValue.forEach((row) => {
row.quota = row.stock;
});
this.ManyAttrValue = info.attrValue
this.formValidate.attr = []
}
this.fullscreenLoading = false
}).catch(res => {
this.fullscreenLoading = false
})
},
getSekllProdect(id) {
this.fullscreenLoading = true
seckillStoreInfoApi({id:id}).then(async res => {
let info = res
this.formValidate = {
image: info.image,
imagess: JSON.parse(info.sliderImage) || [],
title: info.title,
info: info.info,
quota: info.quota,
unitName: info.unitName,
sort: info.sort,
isShow: info.isShow,
tempId: info.tempId,
attr: info.attr,
selectRule: info.selectRule,
content: info.content,
specType: info.specType,
productId: info.productId,
giveIntegral: info.giveIntegral,
ficti: info.ficti,
timeId: Number(info.timeId),
startTime: info.startTime || '',
stopTime: info.stopTime || '',
status: info.status,
num: info.num,
timeVal: info.startTime && info.stopTime ? [info.startTime, info.stopTime] : []
}
if(info.specType){
this.ManyAttrValue = info.attrValues;
this.$nextTick(() => {
this.ManyAttrValue.forEach((item, index) => {
if (item.checked) {
this.$set(item, 'price', item.price)
this.$set(item, 'quota', item.quota)
this.$nextTick(() => {
this.$refs.multipleTable.toggleRowSelection(item, true)
})
}
})
});
}else{
this.ManyAttrValue = info.attrValue
this.formValidate.attr = []
}
this.fullscreenLoading = false
}).catch(res => {
this.fullscreenLoading = false
})
},
handleSubmitNest2(name) {
this.$refs[name].validate((valid) => {
if (valid) {
if(this.formValidate.specType && this.multipleSelection.length ===0 ) return this.$message.warning("请填选择至少一个商品属性!");
this.currentTab++;
// this.multipleSelection.every((value, index) => {
// if(!value.quota){
// this.$message.warning("请填选择至少一个商品属性!");
// return false;
// }else{
// this.currentTab++;
// return true;
// }
// });
// for(i = 0; i < this.multipleSelection.length; i++){
// if(!this.multipleSelection[i].quota){
// break;
// }else{
// this.currentTab++;
// }
// }
} else {
return false;
}
});
},
// 提交
handleSubmit(name) {
if(!this.formValidate.specType){
this.formValidate.attr = []
this.formValidate.attrValue = this.ManyAttrValue
}else{
this.multipleSelection.forEach((row) => {
this.$set(row, 'checked', true)
});
this.formValidate.attrValue = this.multipleSelection
}
this.formValidate.images = JSON.stringify(this.formValidate.imagess)
this.$refs[name].validate((valid) => {
if (valid) {
this.fullscreenLoading = true;
this.loading = true;
this.$route.params.id
? seckillStoreUpdateApi({id: this.$route.params.id}, this.formValidate)
.then(async () => {
this.fullscreenLoading = false;
this.$message.success('编辑成功');
this.$router.push({
path: "/marketing/seckill/list",
});
this.$refs[name].resetFields();
this.formValidate.images = [];
this.loading = false;
})
.catch(() => {
this.fullscreenLoading = false;
this.loading = false;
})
: seckillStoreSaveApi(this.formValidate)
.then(async (res) => {
this.fullscreenLoading = false;
this.$message.success('新增成功');
this.$router.push({
path: "/marketing/seckill/list",
});
this.$refs[name].resetFields();
this.formValidate.images = [];
this.loading = false;
})
.catch(() => {
this.fullscreenLoading = false;
this.loading = false;
});
} else {
if (
!this.formValidate.storeName ||
!this.formValidate.unitName ||
!this.formValidate.store_info ||
!this.formValidate.image ||
!this.formValidate.images
) {
this.$message.warning("请填写完整商品信息!");
}
}
});
},
handleSubmitUp() {
if (this.currentTab-- < 0) this.currentTab = 0;
},
setTagsViewTitle() {
const title = '编辑秒杀商品'
const route = Object.assign({}, this.tempRoute, { title: `${title}-${this.$route.params.id}` })
this.$store.dispatch('tagsView/updateVisitedView', route)
},
}
}
</script>
<style scoped lang="scss">
.labeltop{
/deep/.el-input-number--small{
/*width: 172px !important;*/
min-width: 132px !important;
}
}
.proCoupon{
/deep/.el-form-item__content{
margin-top: 5px;
}
}
.tabPic{
width: 40px !important;
height: 40px !important;
img{
width: 100%;
height: 100%;
}
}
.noLeft{
/deep/.el-form-item__content{
margin-left: 0 !important;
}
}
.tabNumWidth{
/deep/.el-input-number--medium{
width: 121px !important;
}
/deep/.el-input-number__increase{
width: 20px !important;
font-size: 12px !important;
}
/deep/.el-input-number__decrease{
width: 20px !important;
font-size: 12px !important;
}
/deep/.el-input-number--medium .el-input__inner {
padding-left: 25px !important;
padding-right: 25px !important;
}
/deep/ thead{
line-height: normal !important;
}
/deep/ .el-table .cell{
line-height: normal !important;
}
}
.selWidth{
width: 80%;
}
.selWidthd{
width: 300px;
}
.button-new-tag {
height: 28px;
line-height: 26px;
padding-top: 0;
padding-bottom: 0;
}
.input-new-tag {
width: 90px;
margin-left: 10px;
vertical-align: bottom;
}
.pictrue{
width: 60px;
height: 60px;
border: 1px dotted rgba(0,0,0,0.1);
margin-right: 10px;
position: relative;
cursor: pointer;
img{
width: 100%;
height: 100%;
}
}
.btndel{
position: absolute;
z-index: 1;
width :20px !important;
height: 20px !important;
left: 46px;
top: -4px;
}
.labeltop{
/deep/.el-form-item__label{
/*float: none !important;*/
/*display: inline-block !important;*/
/*margin-left: 120px !important;*/
/*width: auto !important;*/
}
}
</style>

View File

@@ -0,0 +1,229 @@
<template>
<div class="divBox">
<el-card class="box-card">
<div slot="header" class="clearfix">
<div class="container">
<el-form inline>
<el-form-item label="是否显示:">
<el-select v-model="tableFrom.status" placeholder="请选择" class="filter-item selWidth" @change="getList(1)" clearable>
<el-option label="关闭" :value="0" />
<el-option label="开启" :value="1" />
</el-select>
</el-form-item>
<el-form-item label="配置名称:">
<el-select v-model="tableFrom.timeId" placeholder="请选择" class="selWidth" @change="getList(1)" clearable>
<el-option
v-for="item in seckillTime"
:key="item.id"
:label="item.name +' - ' + item.time"
:value="item.id">
</el-option>
</el-select>
<!--<el-input v-model="tableFrom.name" placeholder="请输入秒杀名称" class="selWidth">-->
<!--<el-button slot="append" icon="el-icon-search" @click="getList(1)"/>-->
<!--</el-input>-->
</el-form-item>
<el-form-item label="商品搜索:">
<el-input v-model="tableFrom.keywords" placeholder="请输入商品ID/名称" class="selWidth">
<el-button slot="append" icon="el-icon-search" @click="getList(1)"/>
</el-input>
</el-form-item>
</el-form>
</div>
<router-link :to=" { path:'/marketing/seckill/creatSeckill/creat' }">
<el-button size="small" type="primary" class="mr10">添加秒杀商品</el-button>
</router-link>
</div>
<el-table
v-loading="listLoading"
:data="tableData.data"
style="width: 100%"
size="mini"
ref="multipleTable"
>
<el-table-column
prop="id"
label="ID"
min-width="50"
/>
<el-table-column
label="配置"
min-width="160"
>
<template slot-scope="scope">
<div>{{scope.row.storeSeckillManagerResponse ? scope.row.storeSeckillManagerResponse.name : '-'}}</div>
<div>{{scope.row.startTime + ' - ' + scope.row.stopTime}}</div>
</template>
</el-table-column>
<el-table-column
prop="name"
label="秒杀时段"
min-width="130"
>
<template slot-scope="scope">
<div>{{ scope.row.storeSeckillManagerResponse ? scope.row.storeSeckillManagerResponse.time.split(',').join(' - ') : '-'}}</div>
</template>
</el-table-column>
<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
label="活动标题"
prop="title"
min-width="180"
/>
<el-table-column
label="活动简介"
min-width="180"
prop="info"
/>
<el-table-column
label="原价"
prop="otPrice"
min-width="100"
/>
<el-table-column
label="秒杀价"
min-width="100"
prop="price"
/>
<el-table-column
label="限量"
prop="quotaShow"
min-width="80"
/>
<el-table-column
label="限量剩余"
min-width="80"
prop="quota"
/>
<el-table-column
label="秒杀状态"
min-width="100"
prop="statusName"
/>
<el-table-column
label="状态"
min-width="150"
>
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
:active-value="1"
:inactive-value="0"
active-text="开启"
inactive-text="关闭"
@change="onchangeIsShow(scope.row)"
/>
</template>
</el-table-column>
<el-table-column
label="创建时间"
prop="createTime"
min-width="150"
/>
<el-table-column label="操作" min-width="150" fixed="right" align="center">
<template slot-scope="scope">
<router-link :to="{ path:'/marketing/seckill/creatSeckill/updeta/' + scope.row.productId + '/' + scope.row.id}">
<el-button type="text" size="small">编辑</el-button>
</router-link>
<el-button v-if="scope.row.killStatus !== 2 " type="text" size="small" @click="handleDelete(scope.row.id, scope.$index)" class="mr10">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block mb20">
<el-pagination
:page-sizes="[10, 20, 30, 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>
</el-card>
</div>
</template>
<script>
import { seckillStoreListApi, seckillStoreDeleteApi, seckillStoreUpdateApi, seckillStoreStatusApi } from '@/api/marketing'
import { getSeckillList } from '@/libs/public'
export default {
name: "SeckillList",
data() {
return {
listLoading: true,
tableData: {
data: [],
total: 0
},
tableFrom: {
page: 1,
limit: 20,
timeId: '',
status: '',
keywords: ''
},
seckillTime: []
}
},
mounted() {
getSeckillList().then((res) => {
this.seckillTime = res.list
})
this.tableFrom.timeId = Number(this.$route.params.timeId) || ''
this.getList()
},
methods: {
// 订单删除
handleDelete(id, idx) {
this.$modalSure().then(() => {
seckillStoreDeleteApi({ id: id }).then(() => {
this.$message.success('删除成功')
this.tableData.data.splice(idx, 1)
})
})
},
// 列表
getList(num) {
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page;
seckillStoreListApi(this.tableFrom).then(res => {
this.tableData.data = res.list
this.tableData.total = res.total
this.listLoading = false
}).catch((res) => {
this.listLoading = false
})
},
pageChange(page) {
this.tableFrom.page = page
this.getList()
},
handleSizeChange(val) {
this.tableFrom.limit = val
this.getList()
},
onchangeIsShow(row) {
seckillStoreStatusApi({id: row.id, status: row.status})
.then(async () => {
this.$message.success('修改成功');
this.getList()
})
}
}
}
</script>
<style scoped>
</style>

View File

@@ -6,6 +6,7 @@
:is-create="isCreate"
:edit-data="editData"
@submit="handlerSubmit"
@resetForm="resetForm"
/>
<!-- {{ editData }}-->
</div>
@@ -47,6 +48,9 @@ export default {
this.handlerInitEditData()
},
methods: {
resetForm(formValue) {
this.dialogVisible = false
},
handlerInitEditData() {
const { sort, status } = this.editData
this.selfForm.sort = sort

View File

@@ -137,12 +137,14 @@
<span>退款时间{{scope.row.refundReasonTime}}</span>
<span class="acea-row">
退款凭证
<div class="demo-image__preview" v-if="scope.row.refundReasonWapImg" style="width: 35px;height: auto;display: inline-block;">
<template v-if="scope.row.refundReasonWapImg">
<div v-for="(item, index) in scope.row.refundReasonWapImg.split(',')" :key="index" class="demo-image__preview" style="width: 35px;height: auto;display: inline-block;">
<el-image
:src="scope.row.refundReasonWapImg"
:preview-src-list="[scope.row.refundReasonWapImg]"
:src="item"
:preview-src-list="[item]"
/>
</div>
</template>
<!--<img :src="scope.row.refundReasonWapImg" v-if="scope.row.refundReasonWapImg" >-->
<span v-else style="display: inline-block"></span>
</span>
@@ -264,6 +266,7 @@
:is-create="1"
:edit-data="RefuseData"
@submit="RefusehandlerSubmit"
@resetForm="resetFormRefusehand"
/>
</el-dialog>
@@ -278,6 +281,7 @@
:is-create="1"
:edit-data="refundData"
@submit="refundhandlerSubmit"
@resetForm="resetFormRefundhandler"
/>
</el-dialog>
</div>
@@ -348,6 +352,15 @@
this.getList()
},
methods: {
resetFormRefundhandler(){
this.refundVisible = false
},
resetFormRefusehand(){
this.RefuseVisible = false
},
resetForm(formValue) {
this.dialogVisible = false
},
// 核销订单
onWriteOff(row) {
this.$modalSure('核销订单吗').then(() => {

View File

@@ -3,7 +3,8 @@
<el-card v-if="isShowList" v-loading="fullscreenLoading" class="box-card">
<div class="content acea-row row-middle">
<div class="demo-basic--circle acea-row row-middle">
<el-avatar :size="50" :src="circleUrl" class="mr20" />
<div class="circleUrl mr20"><img :src="circleUrl"></div>
<!--<el-avatar :size="50" :src="circleUrl" class="mr20" />-->
<div class="dashboard-workplace-header-tip">
<div class="dashboard-workplace-header-tip-title">{{ smsAccount }}祝您每一天开心</div>
<div class="dashboard-workplace-header-tip-desc">
@@ -153,6 +154,16 @@ export default {
.content{
justify-content: space-between;
}
.circleUrl{
width: 50px;
height: 50px;
}
.circleUrl img{
width: 100%;
height: 100%;
border-radius: 50%;
overflow: hidden;
}
.rR{
text-align: center;
font-size: 22px;

View File

@@ -6,6 +6,7 @@
:is-create="isCreate"
:edit-data="editData"
@submit="handlerSubmit"
@resetForm="resetForm"
v-if="isShow"
/>
</el-card>
@@ -30,6 +31,9 @@
this.getFormInfo()
},
methods: {
resetForm(formValue) {
this.isShow = false;
},
handlerSubmit(data) {
const tempArr = []
for (var key in data) {

View File

@@ -98,6 +98,7 @@
:is-create="isCreate"
:edit-data="editData"
@submit="handlerSubmit"
@resetForm="resetForm"
/>
</el-dialog>
</div>
@@ -161,6 +162,9 @@ export default {
}
},
methods: {
resetForm(formValue) {
this.handleClose();
},
handleClose() {
this.dialogVisible = false
this.editData = {}

View File

@@ -117,7 +117,7 @@
<el-col :span="24">
<el-col v-bind="grid">
<el-form-item label="排序:">
<el-input-number v-model="formValidate.sort" placeholder="请输入排序" />
<el-input-number v-model="formValidate.sort" :max="9999" placeholder="请输入排序" />
</el-form-item>
</el-col>
<el-col v-bind="grid">
@@ -138,6 +138,23 @@
</el-checkbox-group>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="活动优先级:">
<div class="color-list acea-row row-middle">
<div
class="color-item" :class="activity[item]"
v-for="item in formValidate.activity"
:key="item"
draggable="true"
@dragstart="handleDragStart($event, item)"
@dragover.prevent="handleDragOver($event, item)"
@dragenter="handleDragEnterFont($event, item)"
@dragend="handleDragEnd($event, item)"
>{{item}}</div>
<div class="tip">可拖动按钮调整活动的优先展示顺序</div>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="currentTab === 3">
<el-col :span="24">
@@ -386,7 +403,8 @@
specType: false,
id: 0,
couponIds: [],
coupons: []
coupons: [],
activity: ['默认','秒杀','砍价','拼团']
}
const objTitle = {
price: {
@@ -417,6 +435,7 @@
components: { CreatTemplates },
data() {
return {
activity: { '默认': 'red', '秒杀': 'blue', '砍价': 'green', '拼团': 'yellow' },
props2: {
children: 'child',
label: 'name',
@@ -867,7 +886,8 @@
id: info.id,
giveIntegral: info.giveIntegral,
ficti: info.ficti,
coupons: info.coupons
coupons: info.coupons,
activity: info.activityStr ? info.activityStr.split(',') : ['默认','秒杀','砍价','拼团']
}
if(info.isHot) this.checkboxGroup.push('isHot')
if(info.isGood) this.checkboxGroup.push('isGood')
@@ -1012,11 +1032,41 @@
const dst = newItems.indexOf(item)
newItems.splice(dst, 0, ...newItems.splice(src, 1))
this.formValidate.sliderImages = newItems;
},
handleDragEnterFont(e, item) {
e.dataTransfer.effectAllowed = 'move'
if (item === this.dragging) {
return
}
const newItems = [...this.formValidate.activity]
const src = newItems.indexOf(this.dragging)
const dst = newItems.indexOf(item)
newItems.splice(dst, 0, ...newItems.splice(src, 1))
this.formValidate.activity = newItems;
}
}
}
</script>
<style scoped lang="scss">
.color-item{
height: 30px;
line-height: 30px;
padding: 0 10px;
color:#fff;
margin-right :10px;
}
.color-list .color-item.blue{
background-color: #1E9FFF;
}
.color-list .color-item.yellow{
background-color: rgb(254, 185, 0);
}
.color-list .color-item.green{
background-color: #009688;
}
.color-list .color-item.red{
background-color: #ed4014;
}
.proCoupon{
/deep/.el-form-item__content{
margin-top: 5px;

View File

@@ -142,7 +142,7 @@
<el-dialog
title="复制淘宝、天猫、拼多多、京东、苏宁"
:visible.sync="dialogVisible"
width="1200px"
width="1000px"
:modal="false"
class="taoBaoModal"
:before-close="handleClose">
@@ -259,6 +259,7 @@ export default {
productDeleteApi(id).then(() => {
this.$message.success('删除成功')
this.getList()
this.goodHeade();
})
})
},
@@ -267,9 +268,11 @@ export default {
? putOnShellApi( row.id ).then(() => {
this.$message.success('上架成功')
this.getList()
this.goodHeade();
}) : offShellApi(row.id).then(() => {
this.$message.success('下架成功')
this.getList()
this.goodHeade();
})
}
}

View File

@@ -158,7 +158,6 @@
if (valid) {
replyCreatApi(this.formValidate).then(() => {
this.$message.success("新增成功")
this.$msgbox.close()
setTimeout(() => {
// this.clear();
this.$emit('getList');

View File

@@ -82,14 +82,16 @@
>
<template slot-scope="scope">
<div class="mb5 content_font">{{scope.row.comment}}</div>
<div class="demo-image__preview">
<el-image
:src="item"
class='mr5'
:preview-src-list="[item]"
v-for="(item,index) in scope.row.pics" :key="index"
/>
</div>
<template v-if="scope.row.pics.length && scope.row.pics[0]">
<div class="demo-image__preview">
<el-image
:src="item"
class='mr5'
:preview-src-list="[item]"
v-for="(item,index) in scope.row.pics" :key="index"
/>
</div>
</template>
</template>
</el-table-column>
<el-table-column
@@ -123,6 +125,14 @@
@current-change="pageChange"
/>
</div>
<el-dialog
title="提示"
:visible.sync="dialogVisible"
width="700px"
z-index="4"
:before-close="handleClose">
<creat-comment :key="timer" @getList="seachList"></creat-comment>
</el-dialog>
</el-card>
</div>
</template>
@@ -182,7 +192,9 @@ export default {
timeVal: [],
loading: false,
uids: [],
options: []
options: [],
dialogVisible: false,
timer: ''
}
},
mounted() {
@@ -205,6 +217,7 @@ export default {
}
},
seachList() {
this.dialogVisible = false
this.tableFrom.page = 1
this.getList()
},
@@ -254,38 +267,11 @@ export default {
})
},
add() {
const timer = new Date().getTime()
const _this = this
this.modalFrom(timer,null,function() {
_this.getList()
})
this.dialogVisible = true
this.timer = new Date().getTime()
},
modalFrom(timer, callback){
const h = this.$createElement
this.$msgbox({
title: '虚拟评论',
customClass: 'creatformModel',
message: h('div', { class: 'common-form-upload' }, [
h('creatComment', {
props: {
num: timer
},
on: {
getList() {
callback()
}
}
})
]),
showCancelButton: false,
showConfirmButton: false
}).then(() => {
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
})
handleClose(){
this.dialogVisible = false
},
// 具体日期
onchangeTime (e) {

View File

@@ -131,7 +131,7 @@
</el-table>
</el-form-item>
</el-col>
<el-col :span="24" v-if="formValidate.specType">
<el-col :span="24">
<el-form-item label="商品规格:" props="spec_type" label-for="spec_type">
<el-table :data="ManyAttrValue" border class="tabNumWidth" size="mini">
<template v-if="manyTabDate">
@@ -453,12 +453,12 @@
selectRule: info.selectRule,
isSub: false,
content: info.content,
specType: info.specType,
specType: info.specType || false,
id: info.id,
giveIntegral: info.giveIntegral,
ficti: info.ficti
}
if(this.formValidate.attr){
if(this.formValidate.attr.length){
for (var i = 0; i < this.formValidate.attr.length; i++) {
this.formValidate.attr[i].attrValue = JSON.parse(info.attr[i].attrValues)
}

View File

@@ -187,22 +187,22 @@ export default {
this.$message.success('添加数据成功')
// 81 82 83
// 针对云存储配置特殊处理 切勿随意改动
_formId = parseInt(_pram.id)
if(_formId === 108 || _formId === 81 || _formId === 82 || _formId === 83){
let _value
switch (_formId) {
case 108: _value = 1
break;
case 81: _value = 2
break;
case 82: _value = 3
break;
case 83: _value = 4
break;
}
const _pram = { key:"uploadType",value:_value }
systemConfigApi.configSaveUniq(_pram)
}
// _formId = parseInt(_pram.id)
// if(_formId === 108 || _formId === 81 || _formId === 82 || _formId === 83){
// let _value
// switch (_formId) {
// case 108: _value = 1
// break;
// case 81: _value = 2
// break;
// case 82: _value = 3
// break;
// case 83: _value = 4
// break;
// }
// const _pram = { key:"uploadType",value:_value }
// systemConfigApi.configSaveUniq(_pram)
// }
})
},
handlerGetTreeList() {

View File

@@ -11,7 +11,7 @@
<el-date-picker v-model="timeVal" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="daterange" placement="bottom-end" placeholder="自定义时间" style="width: 250px;" @change="onchangeTime" />
</el-form-item>
<el-form-item label="选择门店:">
<el-select v-model="tableFrom.storeId" clearable filterable placeholder="请选择" class="selWidth" clearable @change="seachList">
<el-select v-model="tableFrom.storeId" clearable filterable placeholder="请选择" class="selWidth" clearable @change="getList(1)">
<el-option
v-for="item in storeSelectList"
:key="item.id"
@@ -22,7 +22,7 @@
</el-form-item>
<el-form-item label="关键字:">
<el-input v-model="tableFrom.keywords" placeholder="请输入姓名、电话、订单ID" class="selWidth" size="small">
<el-button slot="append" icon="el-icon-search" size="small" @click="seachList" />
<el-button slot="append" icon="el-icon-search" size="small" @click="getList(1)" />
</el-input>
</el-form-item>
</el-form>
@@ -159,10 +159,6 @@
this.getList()
},
methods: {
seachList() {
this.tableFrom.page = 1
this.getList()
},
storeList() {
let artFrom = {
page: 1,
@@ -197,8 +193,9 @@
this.getList()
},
// 列表
getList() {
getList(num) {
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page
orderListApi(this.tableFrom).then(res => {
this.tableData.data = res.list.list
this.tableData.total = res.list.total

View File

@@ -153,8 +153,8 @@
});
},
resetForm(formName) {
this.$refs[formName].resetFields()
this.$parent.visible = false
this.$refs[formName].resetFields();
this.$emit('resetForm');
}
}
}

View File

@@ -340,7 +340,7 @@
:visible.sync="visible"
width="600px"
>
<edit-from v-if="visible" :uid="uid"></edit-from>
<edit-from v-if="visible" :uid="uid" @resetForm="resetForm"></edit-from>
</el-dialog>
<!--积分余额-->
<el-dialog
@@ -585,6 +585,9 @@
this.getCityList()
},
methods: {
resetForm(){
this.visible = false;
},
reset(formName) {
this.userFrom = {
labelId: '',
@@ -755,7 +758,7 @@
// 具体日期
onchangeTime (e) {
this.timeVal = e;
this.userFrom.dateLimit = e.join(',');
this.tableFrom.dateLimit = e ? this.timeVal.join(',') : '';
},
// 分组列表
groupLists () {