Commit c24aa616 by 前端

更新联调后代码

1 parent d6b355bb
......@@ -68,7 +68,7 @@ export default {
},
/**
* /编辑活动文件校验上传文件接口
* /编辑活动文件校验上传文件接口
*/
updateCheckFile (params) {
......@@ -125,4 +125,22 @@ export default {
data: params
})
},
}
\ No newline at end of file
// 提现记录分页列表
getRedEnvelopeWithdraw (params) {
params.method = 'marketing.api.activityRedEnvelope.cash.out.record.page'
return http({
url,
data: params
})
},
exportRedEnvelopeWithdraw (params) {
params.method = 'marketing.api.activityRedEnvelope.cash.out.record.export'
return http({
url,
data: params
})
},
}
<template>
<div>
<div class="input-number-range" :class="{ 'is-disabled': disabled }">
<div class="flex">
<div class="from">
<el-input
ref="input_from"
v-model="formData[keyObj.from]"
:disabled="disabled"
onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
placeholder=""
@input="handleInputChangeFrom"
></el-input>
</div>
<div class="center">
<span>至</span>
</div>
<div class="to">
<el-input
ref="input_to"
v-model="formData[keyObj.to]"
onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
:disabled="disabled"
placeholder=""
@input="handleInputChangeTo"
></el-input>
</div>
<div class="unit">
<span>元</span>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'InputNumberRange',
props: {
// 是否禁用
disabled: {
type: Boolean,
default: false
},
formData:{
type: Object,
default: ()=>{
return {}
}
},
keyObj:{
type: Object,
default: ()=>{
return {
from: 'a',
to: 'b'
}
}
},
},
data() {
return {
}
},
methods: {
// from输入框change事件
handleInputChangeFrom(value) {
// let from = this.formData[this.keyObj.from]
// let to = this.formData[this.keyObj.to]
// if(from > to){
// this.formData[this.keyObj.to] = from
// }
},
// to输入框change事件
handleInputChangeTo(value) {
// let from = this.formData[this.keyObj.from]
// let to = this.formData[this.keyObj.to]
// if(from > to){
// this.formData[this.keyObj.to] = from
// }
},
}
}
</script>
<style lang="scss" scoped>
.input-number-range {
background-color: #fff;
border: 1px solid #dcdfe6;
border-radius: 4px;
}
.flex {
display: flex;
flex-direction: row;
width: 100%;
justify-content: center;
align-items: center;
/deep/ .el-input .el-input__inner {
border: 0px;
margin: 0;
padding: 0 10px;
background-color: transparent;
}
.center {
margin-top: 1px;
color: #666;
}
.unit{
margin-right: 10px;
color: #666;
}
}
.is-disabled {
background-color: #eef0f6;
border-color: #e4e7ed;
color: #c0c4cc;
cursor: not-allowed;
}
</style>
......@@ -2,41 +2,42 @@
<div class="container">
<div class="sticky">
<GLCombiForm
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
></GLCombiForm>
<div class="sticky-btns">
<div class="btns">
<el-button
type="default"
plain
@click="showImportRecord = true"
>导入记录</el-button>
type="default"
plain
@click="showImportRecord = true"
>导入记录
</el-button>
</div>
</div>
</div>
<div class="tabelList">
<div class="table-title">红包记录列表</div>
<GLTable
ref="listRef"
:getListApi="getListApi"
:searchForm="searchForm"
:noDataImg="url"
:tableParams="tableParams"
:pageConf="pageConf"
ref="listRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:noDataImg="url"
:tableParams="tableParams"
:pageConf="pageConf"
>
<span
slot="auth-button"
slot-scope="scope"
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
</span>
</GLTable>
......@@ -49,13 +50,14 @@
import url from '@/assets/empty.png'
import * as dayjs from 'dayjs'
import importRecord from './importRecord.vue'
export default {
name: 'RedEnvelopeConfig',
components: { importRecord },
data () {
components: {importRecord},
data() {
return {
url,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'},
searchForm: {
merchantName: '',
merchantId: '',
......@@ -88,8 +90,9 @@ export default {
},
{
label: '展示时间',
name: 'createDate',
name: 'showTime',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
isClear: true,
customPickerOptions: {
disabledDate(date) {
......@@ -103,8 +106,9 @@ export default {
},
{
label: '抽奖时间',
name: 'createDate',
name: 'lotteryDrawTime',
type: 'datePicker',
valueFormat: 'yyyy-MM-dd',
isClear: true,
customPickerOptions: {
disabledDate(date) {
......@@ -153,7 +157,7 @@ export default {
minWidth: 100,
formatter: cell => {
// 0:随机红包;1:九宫格;2:翻牌;3:大转盘;
return { 0: '随机红包', 1: '九宫格', 2: '翻牌', 3: '大转盘' }[cell.activityType]
return {0: '随机红包', 1: '九宫格', 2: '翻牌', 3: '大转盘'}[cell.activityType]
}
},
// {
......@@ -163,12 +167,12 @@ export default {
// },
{
label: '展示时间',
prop: '',
prop: 'showTime',
minWidth: 150
},
{
label: '抽奖时间',
prop: '',
prop: 'lotteryDrawTime',
minWidth: 150
},
{
......@@ -183,19 +187,41 @@ export default {
},
]
},
showImportRecord: false
showImportRecord: false,
tableSearchForm: {}
}
},
mounted () {
mounted() {
},
methods: {
handleSearch () {
handleSearch() {
this.tableSearchForm = this.getParams()
this.$refs.listRef.refreshTable()
},
handleReset () {
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
},
getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm))
this.updateParams(params, 'showTime', 'showTime', 'startShowTime', 'endShowTime');
this.updateParams(params, 'lotteryDrawTime', 'lotteryDrawTime', 'startLotteryDrawTime', 'endLotteryDrawTime');
return params
},
updateParams(params, paramKey, formKey, beginKey, endKey) {
if (params[paramKey]) {
params[beginKey] = this.searchForm[formKey][0];
params[endKey] = this.searchForm[formKey][1];
delete params[paramKey];
} else {
delete params[beginKey];
delete params[endKey];
}
// delete params[paramKey];
return params
}
}
}
</script>
......@@ -207,25 +233,31 @@ export default {
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 20px;
.table-title {
font-weight: 700;
font-size: 16px;
color: #333333;
padding-bottom: 18px;
}
.sticky {
position: relative;
z-index: 2;
&-btns {
position: absolute;
right: 0;
bottom: -23px;
overflow: hidden;
.el-button + .el-button {
margin-left: 8px;
}
.btns {
transition: all 0.25s;
.el-button {
padding: 8px 15px;
min-width: 60px;
......
......@@ -2,45 +2,52 @@
<div class="container">
<div class="sticky">
<GLCombiForm
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
></GLCombiForm>
ref="showSearch"
:rowNumber="1"
:formObj="searchForm"
:formData="searchFormData"
@handleOk="handleSearch"
@handleRest="handleReset"
>
<div slot="thirdCashOutMoneySlot">
<inputNumRange :formData="searchForm"
:keyObj="{from: 'startThirdCashOutMoney', to:'endThirdCashOutMoney'}"></inputNumRange>
</div>
</GLCombiForm>
<div class="sticky-btns">
<div class="btns">
<el-button
type="default"
plain
@click="showImportRecord = true"
>导入记录</el-button>
type="default"
plain
@click="showImportRecord = true"
>导入记录
</el-button>
<el-button
@click="handleExport"
>导出</el-button>
>导出
</el-button>
</div>
</div>
</div>
<div class="tabelList">
<div class="table-title">红包记录列表</div>
<GLTable
ref="listRef"
:getListApi="getListApi"
:searchForm="searchForm"
:noDataImg="url"
:tableParams="tableParams"
:pageConf="pageConf"
ref="listRef"
:getListApi="getListApi"
:searchForm="tableSearchForm"
:noDataImg="url"
:tableParams="tableParams"
:pageConf="pageConf"
>
<span
slot="auth-button"
slot-scope="scope"
slot="auth-button"
slot-scope="scope"
>
<GLTableButton
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
:buttonList="tableButtonList"
:buttonItem="scope.scope"
:buttonNum="3"
></GLTableButton>
</span>
</GLTable>
......@@ -53,32 +60,56 @@
import url from '@/assets/empty.png'
import * as dayjs from 'dayjs'
import importRecord from './importRecord.vue'
import { exportFn } from '@/common/constant'
import {exportFn} from '@/common/constant'
import inputNumRange from '@/components/inputNumRange'
export default {
name: 'RedEnvelopeWithdraw',
components: { importRecord },
data () {
components: {importRecord, inputNumRange},
data() {
return {
url,
pageConf: { pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total' },
searchForm: {
merchantName: '',
merchantId: '',
staffName: ''
},
pageConf: {pageSize: 'pageSize', pageNum: 'pageNum', totalCount: 'total'},
searchForm: {},
searchFormData: [
{
label: '流水号',
name: 'activityName',
name: 'thirdSerialNumber',
type: 'input',
maxlength: 100
},
{
label: '提现状态',
name: 'merchantName',
type: 'input',
maxlength: 100
name: 'thirdCashOutStatus',
type: 'select',
optionLabel: 'optionLabel',
optionId: 'optionId',
optionList: [
{
optionLabel: '全部',
optionId: null
},
{
optionLabel: '提现成功',
optionId: '提现成功'
},
{
optionLabel: '提现失败',
optionId: '提现失败'
},
{
optionLabel: '补发成功',
optionId: '补发成功'
},
{
optionLabel: '补发失败',
optionId: '补发失败'
},
{
optionLabel: '发放中',
optionId: '发放中'
}
]
},
{
label: '微信昵称',
......@@ -88,14 +119,15 @@ export default {
},
{
label: '提现金额/元',
name: 'userPhone',
type: 'input'
addHtml: 'thirdCashOutMoneySlot',
// type: 'input'
},
{
label: '提现时间',
name: 'createDate',
name: 'thirdCashOutTime',
type: 'datePicker',
isClear: true,
valueFormat: 'yyyy-MM-dd',
customPickerOptions: {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate()))
......@@ -107,7 +139,7 @@ export default {
}
}
],
getListApi: this.$apis.redenvelope.getRedEnvelopeRecordList,
getListApi: this.$apis.redenvelope.getRedEnvelopeWithdraw,
tableParams: {
listName: 'list',
tableOption: false,
......@@ -124,49 +156,71 @@ export default {
},
{
label: '流水号',
prop: 'activityName',
prop: 'thirdSerialNumber',
minWidth: 100
},
{
label: '提现金额/元',
prop: 'thirdCashOutMoney',
minWidth: 100,
formatter: cell => `${cell.merchantId}/${cell.merchantName}`
// formatter: cell => `${cell.merchantId}/${cell.merchantName}`
},
{
label: '提现状态',
minWidth: 100,
formatter: cell => `${cell.merchantId}/${cell.merchantName}`
prop: 'thirdCashOutStatus'
},
{
label: '提现时间',
minWidth: 150,
formatter: cell => `${dayjs(cell.activityStartTime).format('YYYY/MM/DD')}-${dayjs(cell.activityEndTime).format('YYYY/MM/DD')}`
prop: 'thirdCashOutTime',
// formatter: cell => `${dayjs(cell.activityStartTime).format('YYYY/MM/DD')}-${dayjs(cell.activityEndTime).format('YYYY/MM/DD')}`
},
{
label: '备注',
prop: 'thirdPrizeMoney',
prop: 'thirdCashOutRemark',
minWidth: 100
},
]
},
showImportRecord: false
showImportRecord: false,
tableSearchForm: {}
}
},
mounted () {
mounted() {
},
methods: {
handleSearch () {
handleSearch() {
this.tableSearchForm = this.getParams()
this.$refs.listRef.refreshTable()
},
handleReset () {
handleReset() {
this.searchForm = this.$options.data.call(this).searchForm
this.handleSearch()
},
handleExport () {
// var params = this.$options.data.call(this).searchForm
// this.$apis.redenvelope.exportGoodsApi(params).then(res => {
// exportFn(res)
// })
updateParams(params, paramKey, formKey, beginKey, endKey) {
if (params[paramKey]) {
params[beginKey] = this.searchForm[formKey][0];
params[endKey] = this.searchForm[formKey][1];
} else {
delete params[beginKey];
delete params[endKey];
}
delete params[paramKey];
},
getParams() {
let params = JSON.parse(JSON.stringify(this.searchForm))
this.updateParams(params, 'thirdCashOutTime', 'thirdCashOutTime', 'startThirdCashOutTime', 'endThirdCashOutTime');
params.startThirdCashOutMoney ? params.startThirdCashOutMoney *= 100 : ' '
params.endThirdCashOutMoney ? params.endThirdCashOutMoney *= 100 : ''
return params
},
handleExport() {
const params = this.getParams()
this.$apis.redenvelope.exportRedEnvelopeWithdraw(params).then(res => {
exportFn(res)
})
},
}
}
......@@ -179,25 +233,31 @@ export default {
-webkit-box-sizing: border-box;
box-sizing: border-box;
padding: 20px;
.table-title {
font-weight: 700;
font-size: 16px;
color: #333333;
padding-bottom: 18px;
}
.sticky {
position: relative;
z-index: 2;
&-btns {
position: absolute;
right: 0;
bottom: -23px;
overflow: hidden;
.el-button + .el-button {
margin-left: 8px;
}
.btns {
transition: all 0.25s;
.el-button {
padding: 8px 15px;
min-width: 60px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!