Commit 731c8ac7 by 前端

Merge branch 'v3.2.0' into 'master'

V3.2.0

See merge request !84
2 parents ad8b809d 57bdeaf3
...@@ -928,7 +928,6 @@ ...@@ -928,7 +928,6 @@
"version": "7.19.4", "version": "7.19.4",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.4.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.19.4.tgz",
"integrity": "sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==", "integrity": "sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==",
"dev": true,
"requires": { "requires": {
"regenerator-runtime": "^0.13.4" "regenerator-runtime": "^0.13.4"
}, },
...@@ -936,8 +935,7 @@ ...@@ -936,8 +935,7 @@
"regenerator-runtime": { "regenerator-runtime": {
"version": "0.13.9", "version": "0.13.9",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
"integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
"dev": true
} }
} }
}, },
...@@ -959,6 +957,22 @@ ...@@ -959,6 +957,22 @@
} }
} }
}, },
"@babel/runtime-corejs3": {
"version": "7.20.6",
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.20.6.tgz",
"integrity": "sha512-tqeujPiuEfcH067mx+7otTQWROVMKHXEaOQcAeNV5dDdbPWvPcFA8/W9LXw2NfjNmOetqLl03dfnG2WALPlsRQ==",
"requires": {
"core-js-pure": "^3.25.1",
"regenerator-runtime": "^0.13.11"
},
"dependencies": {
"regenerator-runtime": {
"version": "0.13.11",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz",
"integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg=="
}
}
},
"@babel/template": { "@babel/template": {
"version": "7.18.10", "version": "7.18.10",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz",
...@@ -3026,7 +3040,7 @@ ...@@ -3026,7 +3040,7 @@
}, },
"charenc": { "charenc": {
"version": "0.0.2", "version": "0.0.2",
"resolved": "https://registry.npmmirror.com/charenc/-/charenc-0.0.2.tgz", "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz",
"integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==" "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA=="
}, },
"check-types": { "check-types": {
...@@ -3893,6 +3907,11 @@ ...@@ -3893,6 +3907,11 @@
"browserslist": "^4.21.4" "browserslist": "^4.21.4"
} }
}, },
"core-js-pure": {
"version": "3.26.1",
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.26.1.tgz",
"integrity": "sha512-VVXcDpp/xJ21KdULRq/lXdLzQAtX7+37LzpyfFM973il0tWSsDEoyzG38G14AjTpK9VTfiNM9jnFauq/CpaWGQ=="
},
"core-util-is": { "core-util-is": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
...@@ -3978,7 +3997,7 @@ ...@@ -3978,7 +3997,7 @@
}, },
"crypt": { "crypt": {
"version": "0.0.2", "version": "0.0.2",
"resolved": "https://registry.npmmirror.com/crypt/-/crypt-0.0.2.tgz", "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz",
"integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==" "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow=="
}, },
"crypto-browserify": { "crypto-browserify": {
...@@ -4763,6 +4782,21 @@ ...@@ -4763,6 +4782,21 @@
} }
} }
}, },
"dom7": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/dom7/-/dom7-2.1.5.tgz",
"integrity": "sha512-xnhwVgyOh3eD++/XGtH+5qBwYTgCm0aW91GFgPJ3XG+jlsRLyJivnbP0QmUBFhI+Oaz9FV0s7cxgXHezwOEBYA==",
"requires": {
"ssr-window": "^2.0.0"
},
"dependencies": {
"ssr-window": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-2.0.0.tgz",
"integrity": "sha512-NXzN+/HPObKAx191H3zKlYomE5WrVIkoCB5IaSdvKokxTpjBdWfr0RaP+1Z5KOfDT0ZVz+2tdtiBkhsEQ9p+0A=="
}
}
},
"domain-browser": { "domain-browser": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
...@@ -6278,7 +6312,7 @@ ...@@ -6278,7 +6312,7 @@
}, },
"glsx-vue-common": { "glsx-vue-common": {
"version": "2.0.5", "version": "2.0.5",
"resolved": "https://registry.npmmirror.com/glsx-vue-common/-/glsx-vue-common-2.0.5.tgz", "resolved": "https://registry.npmjs.org/glsx-vue-common/-/glsx-vue-common-2.0.5.tgz",
"integrity": "sha512-YMwjcuc0svvm/nbqnut1E0Obp3JFMfi1Rx/+RU2LGRiVKI0/RQveVYsy7CXbOGgL6hlnIL/GwLCMwJ57qtaWpg==", "integrity": "sha512-YMwjcuc0svvm/nbqnut1E0Obp3JFMfi1Rx/+RU2LGRiVKI0/RQveVYsy7CXbOGgL6hlnIL/GwLCMwJ57qtaWpg==",
"requires": { "requires": {
"vue": "^2.5.10" "vue": "^2.5.10"
...@@ -11438,7 +11472,7 @@ ...@@ -11438,7 +11472,7 @@
}, },
"sha1": { "sha1": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmmirror.com/sha1/-/sha1-1.1.1.tgz", "resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz",
"integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==", "integrity": "sha512-dZBS6OrMjtgVkopB1Gmo4RQCDKiZsqcpAQpkV/aaj+FCrCg8r4I4qMkDPQjBgLIxlmu9k4nUbWq6ohXahOneYA==",
"requires": { "requires": {
"charenc": ">= 0.0.1", "charenc": ">= 0.0.1",
...@@ -11893,6 +11927,11 @@ ...@@ -11893,6 +11927,11 @@
"tweetnacl": "~0.14.0" "tweetnacl": "~0.14.0"
} }
}, },
"ssr-window": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/ssr-window/-/ssr-window-1.0.1.tgz",
"integrity": "sha512-dgFqB+f00LJTEgb6UXhx0h+SrG50LJvti2yMKMqAgzfUmUXZrLSv2fjULF7AWGwK25EXu8+smLR3jYsJQChPsg=="
},
"ssri": { "ssri": {
"version": "6.0.2", "version": "6.0.2",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz",
...@@ -12213,6 +12252,15 @@ ...@@ -12213,6 +12252,15 @@
} }
} }
}, },
"swiper": {
"version": "4.5.1",
"resolved": "https://registry.npmjs.org/swiper/-/swiper-4.5.1.tgz",
"integrity": "sha512-se6I7PWWu950NAMXXT+ENtF/6SVb8mPyO+bTfNxbQBILSeLqsYp3Ndap+YOA0EczOIUlea274PKejT6gKZDseA==",
"requires": {
"dom7": "^2.1.3",
"ssr-window": "^1.0.1"
}
},
"table": { "table": {
"version": "4.0.2", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz",
...@@ -13108,6 +13156,23 @@ ...@@ -13108,6 +13156,23 @@
"integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==", "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==",
"dev": true "dev": true
}, },
"wangeditor": {
"version": "4.7.15",
"resolved": "https://registry.npmjs.org/wangeditor/-/wangeditor-4.7.15.tgz",
"integrity": "sha512-aPTdREd8BxXVyJ5MI+LU83FQ7u1EPd341iXIorRNYSOvoimNoZ4nPg+yn3FGbB93/owEa6buLw8wdhYnMCJQLg==",
"requires": {
"@babel/runtime": "^7.11.2",
"@babel/runtime-corejs3": "^7.11.2",
"tslib": "^2.1.0"
},
"dependencies": {
"tslib": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
"integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
}
}
},
"watchpack": { "watchpack": {
"version": "1.7.5", "version": "1.7.5",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz",
......
...@@ -20,7 +20,9 @@ ...@@ -20,7 +20,9 @@
"sass-loader": "7.3.1", "sass-loader": "7.3.1",
"sha1": "^1.1.1", "sha1": "^1.1.1",
"md5": "^2.3.0", "md5": "^2.3.0",
"vue": "^2.6.11" "vue": "^2.6.11",
"wangeditor": "^4.7.12",
"swiper": "^4.0.0"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-plugin-babel": "^3.0.1", "@vue/cli-plugin-babel": "^3.0.1",
......
...@@ -8,6 +8,10 @@ const profitApi = { ...@@ -8,6 +8,10 @@ const profitApi = {
exportProfitList(data = {}) { exportProfitList(data = {}) {
data.method = `${path}exportList` data.method = `${path}exportList`
return request(data) return request(data)
},
verificationPoints(data = {}) {
data.method = `${path}exchange`
return request(data)
} }
} }
export { profitApi } export { profitApi }
...@@ -44,5 +44,10 @@ const taskApi = { ...@@ -44,5 +44,10 @@ const taskApi = {
data.method = 'merchants.api.mission.updateMission' data.method = 'merchants.api.mission.updateMission'
return request(data, 'post') return request(data, 'post')
}, },
// 查询任务总数
getStaticMission(data) {
data.method = 'merchants.api.mission.staticMission'
return request(data, 'post')
},
} }
export { taskApi } export { taskApi }
...@@ -10,7 +10,6 @@ import '@/styles/index.css' ...@@ -10,7 +10,6 @@ import '@/styles/index.css'
// 组件 // 组件
import '@/components' import '@/components'
import { Util } from './common/util' import { Util } from './common/util'
// import _ from 'lodash' // import _ from 'lodash'
// import axios from 'axios' // import axios from 'axios'
Vue.prototype.btn_size = 'mini' Vue.prototype.btn_size = 'mini'
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
class="el-icon-video-play" class="el-icon-video-play"
@click="handleEnlarge(itm.materialContent, 'video')" @click="handleEnlarge(itm.materialContent, 'video')"
></i> ></i>
<div class="video-pane-close" @click="close(index)"> <div class="video-pane-close" @click="close(index, 1)">
<img <img
src="../../assets/welcomeWord/close-video.png" src="../../assets/welcomeWord/close-video.png"
alt="" alt=""
...@@ -623,7 +623,6 @@ export default { ...@@ -623,7 +623,6 @@ export default {
video.clientWidth * multiple, video.clientWidth * multiple,
video.clientHeight * multiple video.clientHeight * multiple
) )
console.log(canvas, 'canvas')
// 转换成base64形式 // 转换成base64形式
var oGrayImg = canvas.toDataURL('image/png') // 截取后的视频封面 var oGrayImg = canvas.toDataURL('image/png') // 截取后的视频封面
const file = this.dataURLtoFile(oGrayImg) const file = this.dataURLtoFile(oGrayImg)
...@@ -691,7 +690,6 @@ export default { ...@@ -691,7 +690,6 @@ export default {
that.$nextTick(() => { that.$nextTick(() => {
const videoUrl = res const videoUrl = res
that.getImgUrl(videoUrl).then((res) => { that.getImgUrl(videoUrl).then((res) => {
console.log(res, 'videoimg')
that.$emit('getVideoImg', res.data.data) that.$emit('getVideoImg', res.data.data)
that.$emit('getEditor') that.$emit('getEditor')
}) })
...@@ -826,7 +824,8 @@ export default { ...@@ -826,7 +824,8 @@ export default {
}) })
} }
}, },
close(index) { close(index, type) {
if (type) this.$emit('setVideoImg')
this.previewList.splice(index, 1) this.previewList.splice(index, 1)
}, },
textInput(val) { textInput(val) {
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="page[this.pageConf.pageNum]" :current-page="page[this.pageConf.pageNum]"
:page-sizes="[10,20,30,40]" :page-sizes="pageSize"
:page-size="page[this.pageConf.pageSize]" :page-size="page[this.pageConf.pageSize]"
:total="getListApi ? total : tableTotal" :total="getListApi ? total : tableTotal"
:layout="layout" :layout="layout"
...@@ -125,6 +125,10 @@ export default { ...@@ -125,6 +125,10 @@ export default {
type: Object, type: Object,
default: () => {} default: () => {}
}, },
pageSize: {
type:Array,
default:()=>[10,20,30,40]
},
// 表格数据-外部传入 // 表格数据-外部传入
tableData: { tableData: {
type: Array, type: Array,
...@@ -220,7 +224,7 @@ export default { ...@@ -220,7 +224,7 @@ export default {
}, },
mounted() { mounted() {
this.page = {} this.page = {}
this.page[this.pageConf.pageSize] = 10 this.page[this.pageConf.pageSize] = this.pageSize[0]
this.page[this.pageConf.pageNum] = 1 this.page[this.pageConf.pageNum] = 1
const btn = document.getElementById(this.tableParams.btnId) const btn = document.getElementById(this.tableParams.btnId)
btn && btn.addEventListener('click', this.refreshEmit) btn && btn.addEventListener('click', this.refreshEmit)
......
export default function debounce(fn, delay) {
var t = null
return function() {
if (t) {
clearTimeout(t)
}
t = setTimeout(() => {
fn.apply(this, arguments)
}, delay)
}
}
...@@ -7,21 +7,21 @@ ...@@ -7,21 +7,21 @@
label-width="120px" label-width="120px"
class="demo-form-inline" class="demo-form-inline"
> >
<el-form-item label="员工名称"> <el-form-item label="员工名称:">
<el-input <el-input
clearable clearable
v-model="profitSearchForm.staffName" v-model="profitSearchForm.staffName"
placeholder="请输入员工名称" placeholder="请输入员工名称"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="员工手机号"> <el-form-item label="员工手机号:">
<el-input <el-input
clearable clearable
v-model="profitSearchForm.staffPhone" v-model="profitSearchForm.staffPhone"
placeholder="请输入员工手机号" placeholder="请输入员工手机号"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="所属业务场景"> <el-form-item label="所属业务场景:">
<el-select <el-select
v-model="profitSearchForm.businessScene" v-model="profitSearchForm.businessScene"
placeholder="所属业务场景" placeholder="所属业务场景"
...@@ -65,7 +65,38 @@ ...@@ -65,7 +65,38 @@
placeholder="请输入关联任务" placeholder="请输入关联任务"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="奖励时间"> <el-form-item label="发放渠道:">
<el-select
v-model="profitSearchForm.channel"
placeholder="请选择发放渠道"
>
<el-option label="全部" value=""></el-option>
<el-option label="广联" value="1"></el-option>
<el-option label="门店" value="2"></el-option>
<el-option label="服务商" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="支持积分提现:">
<el-select
v-model="profitSearchForm.isWithdrawal"
placeholder="请选择是否支持积分提现"
>
<el-option label="全部" value=""></el-option>
<el-option label="是" value="1"></el-option>
<el-option label="否" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="核销状态:">
<el-select
v-model="profitSearchForm.exchangeStatus"
placeholder="请选择核销状态"
>
<el-option label="全部" value=""></el-option>
<el-option label="已核销" value="1"></el-option>
<el-option label="未核销" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="奖励时间:">
<el-date-picker <el-date-picker
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
v-model="profitSearchForm.rewardTime" v-model="profitSearchForm.rewardTime"
...@@ -76,6 +107,17 @@ ...@@ -76,6 +107,17 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="核销时间:">
<el-date-picker
value-format="yyyy-MM-dd"
v-model="profitSearchForm.exchangeTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleSearch">查询 </el-button> <el-button type="primary" @click="handleSearch">查询 </el-button>
<el-button @click="reset">重置</el-button> <el-button @click="reset">重置</el-button>
...@@ -93,6 +135,8 @@ export default { ...@@ -93,6 +135,8 @@ export default {
profitSearchForm: { profitSearchForm: {
businessScene: '', businessScene: '',
channel: '', channel: '',
isWithdrawal:'',
exchangeStatus:''
}, },
} }
}, },
...@@ -108,6 +152,7 @@ export default { ...@@ -108,6 +152,7 @@ export default {
this.defalutStartTime, this.defalutStartTime,
this.defalutEndTime, this.defalutEndTime,
]) ])
this.$emit('sendResetTable','reset')
this.$nextTick(() => { this.$nextTick(() => {
this.handleSearch() this.handleSearch()
}) })
......
<template> <template>
<div style="margin: 16px"> <div style='margin: 16px'>
<ProfitSearch @sendSearchForm="getSearchForm" /> <ProfitSearch ref='profitSearch' @sendSearchForm='getSearchForm' @sendResetTable='reset' />
<el-button type="primary" size="small" @click="handleOutput" <el-button type='primary' size='small' @click='handleOutput'
>导出</el-button >导出
</el-button
> >
<div class="cumulativeAward">累计发放奖励:{{ totalScore }}</div> <el-button
size='small'
type='primary'
@click='handleWriteOff()'
>批量核销
</el-button
>
<div class='cumulativeAward'>累计发放奖励:{{ totalScore }}</div>
<d2-table <d2-table
class="my-row-height" class='my-row-height'
ref="profitTable" ref='profitTable'
:hasNum="true" :hasNum='true'
@sendAlldata="getTotalScore" @sendAlldata='getTotalScore'
:tableParams="profitTableParams" :tableParams='profitTableParams'
:searchForm="profitSearchForm" :searchForm='profitSearchForm'
:getListApi="getListApi" :getListApi='getListApi'
:pageConf="pageConf" :pageConf='pageConf'
:pageSize='[20,50,100,200,500]'
> >
<div slot="businessScene" slot-scope="scope"> <div slot='isWithdrawal' slot-scope='scope'>
{{ scope.scope.isWithdrawal == '1' ? '是' : scope.scope.isWithdrawal == '2' ? '否' : '' }}
</div>
<div slot='exchangeStatus' slot-scope='scope'>
{{ scope.scope.exchangeStatus == '1' ? '已核销' : scope.scope.exchangeStatus == '2' ? '未核销' : '' }}
</div>
<div slot='businessScene' slot-scope='scope'>
<span v-if="scope.scope.businessScene == '0'">1.0 新车权益升级</span> <span v-if="scope.scope.businessScene == '0'">1.0 新车权益升级</span>
<span v-if="scope.scope.businessScene == '1'">1.1 新车精品升级</span> <span v-if="scope.scope.businessScene == '1'">1.1 新车精品升级</span>
<span v-if="scope.scope.businessScene == '2'">1.2 新车膨胀金活动</span> <span v-if="scope.scope.businessScene == '2'">1.2 新车膨胀金活动</span>
...@@ -23,87 +38,201 @@ ...@@ -23,87 +38,201 @@
>1.3 售后直播众筹活动</span >1.3 售后直播众筹活动</span
> >
</div> </div>
<div slot="channel" slot-scope="scope"> <div slot='channel' slot-scope='scope'>
<span v-if="scope.scope.channel == '1'">广联</span> <span v-if="scope.scope.channel == '1'">广联</span>
<span v-if="scope.scope.channel == '2'">门店</span> <span v-if="scope.scope.channel == '2'">门店</span>
<span v-if="scope.scope.channel == '3'">服务商</span> <span v-if="scope.scope.channel == '3'">服务商</span>
</div> </div>
</d2-table> </d2-table>
<el-dialog title='提示' :visible.sync='dialogVisible' width='30%'>
<div class='verificationPoints'>核销积分确认,核销后积分不可恢复</div>
<div>
<p>涉及门店:{{ writeOffData.numberOfStores }}家</p>
<p>涉及员工数:{{ writeOffData.employeeCount }}人</p>
<p>核销积分总分:{{ writeOffData.totalPoints }}</p>
</div>
<span slot='footer' class='dialog-footer'>
<el-button @click='dialogVisible = false'>取 消</el-button>
<el-button type='primary' @click='handleDebounce'
>确 定</el-button
>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import ProfitSearch from '@/views/profitManagement/profitList/cpns/ProfitSearch' import ProfitSearch from '@/views/profitManagement/profitList/cpns/ProfitSearch'
import debounce from '@/utils/debounce'
import { profitApi } from '@/api/profitManagement' import { profitApi } from '@/api/profitManagement'
export default { export default {
name: 'WithdrawalSearch', name: 'WithdrawalSearch',
components: { components: {
ProfitSearch, ProfitSearch
}, },
data() { data() {
return { return {
processArray: [],
writeOffData: {
numberOfStores: '',
employeeCount: '',
totalPoints: ''
},
verificationWriteOff: true,
profitSearchForm: {}, profitSearchForm: {},
dialogVisible: false,
totalScore: '', totalScore: '',
choiceData: [],
choiceDataBack: [],
pageConf: { pageConf: {
pageSize: 'pageSize', pageSize: 'pageSize',
pageNum: 'pageNum', pageNum: 'pageNum',
totalCount: 'data.count', totalCount: 'data.count'
}, },
getListApi: profitApi.searchProfitList, getListApi: profitApi.searchProfitList,
profitTableParams: { profitTableParams: {
mutiSelectUniqueKey: 'id',
mutiSelectName: 'list',
listName: 'data.data', listName: 'data.data',
tableColumns: [ tableColumns: [
{ {
label: '员工名称', label: '员工名称',
prop: 'staffName', prop: 'staffName'
}, },
{ {
label: '员工手机号', label: '员工手机号',
prop: 'staffPhone', prop: 'staffPhone'
}, },
{ {
label: '奖励积分值', label: '奖励积分值',
prop: 'rewardScore', prop: 'rewardScore'
}, },
{ {
label: '关联任务', label: '关联任务',
prop: 'missionName', prop: 'missionName'
}, },
{ {
label: '发放渠道', label: '发放渠道',
prop: 'channel', prop: 'channel',
addHtml: 'channel', addHtml: 'channel'
}, },
{ {
label: '所属活动/产品', label: '所属活动/产品',
prop: 'activityName', prop: 'activityName'
}, },
{ {
label: '所属商户', label: '所属商户',
prop: 'merchantName', prop: 'merchantName'
}, },
{ {
label: '所属业务场景', label: '所属业务场景',
prop: 'businessScene', prop: 'businessScene',
addHtml: 'businessScene', addHtml: 'businessScene'
}, },
{ {
label: '奖励时间', label: '奖励时间',
prop: 'rewardTime', prop: 'rewardTime'
},
{
label: '支持积分提现',
prop: 'isWithdrawal',
addHtml: 'isWithdrawal'
},
{
label: '核销状态',
prop: 'exchangeStatus',
addHtml: 'exchangeStatus'
},
{
label: '核销时间',
prop: 'exchangeTime'
}, },
], {
label: '核销人',
prop: 'exchangeStaff'
}
]
}, },
timeout:null
} }
}, },
methods: { methods: {
handleWriteOff() {
this.getSeletedData()
if (this.choiceData && this.choiceData.length == '0') {
this.$message({
type: 'error',
message: '请勾选需要核销的积分记录!'
})
return
}
this.verificationWriteOff = this.choiceData.every(item => {
if (!item.isWithdrawal || item.isWithdrawal == '1' || item.exchangeStatus == '1') {
return false
} else {
return true
}
})
if (!this.verificationWriteOff) {
return this.$message({
type: 'error',
message: '所选中的积分记录包含「是否积分提现=是」或「核销状态=已核销」,请剔除后再进行操作!'
})
}
this.processSelectedData()
this.dialogVisible = true
},
processSelectedData() {
let obj = {}
let numberOfStoresArr = []
let totalPoints = 0
this.choiceDataBack = JSON.parse(JSON.stringify(this.choiceData))
this.processArray = this.choiceData.reduce((curr, next) => {
obj[next.staffPhone] ? '' : obj[next.staffPhone] = curr.push(next)
numberOfStoresArr.includes(next.merchantName) ? '' : numberOfStoresArr.push((next.merchantName))
console.log(totalPoints)
next.rewardScore ? totalPoints += next.rewardScore : totalPoints += 0
return curr
}, [])
this.$set(this.writeOffData, 'numberOfStores', numberOfStoresArr.length)
this.$set(this.writeOffData, 'totalPoints', totalPoints.toFixed(2))
this.$set(this.writeOffData, 'employeeCount', this.processArray.length)
},
getSeletedData() {
this.choiceData = this.$refs.profitTable.mutiSelectArr.list &&
this.$refs.profitTable.mutiSelectArr.list.map(item => {
let { exchangeStatus, staffPhone, merchantName, isWithdrawal, rewardScore, id } = item
return { exchangeStatus, staffPhone, merchantName, isWithdrawal, rewardScore, id }
})
},
handleDebounce:debounce(
async function(){
let arr = []
this.choiceDataBack && this.choiceDataBack.forEach(item => arr.push(item.id))
const params = { idList: arr }
await profitApi.verificationPoints({ ...params }).then(res => {
if (res.code == '0') {
this.$message.success('积分核销成功')
this.dialogVisible = false
this.$refs.profitSearch.reset()
} else {
this.$message.error('积分核销失败')
}
}).catch(err => {
this.$message.error(err)
})
this.dialogVisible = false
},
1000
),
// 导出 // 导出
handleOutput() { handleOutput() {
let params = JSON.parse(JSON.stringify(this.profitSearchForm)) let params = JSON.parse(JSON.stringify(this.profitSearchForm))
let pageConfig = { let pageConfig = {
pageSize: 9999, pageSize: 9999,
pageNum: 1, pageNum: 1
} }
profitApi.exportProfitList({ ...params, ...pageConfig }).then((res) => { profitApi.exportProfitList({ ...params, ...pageConfig }).then((res) => {
if (res.code == 0) { if (res.code == 0) {
...@@ -111,7 +240,7 @@ export default { ...@@ -111,7 +240,7 @@ export default {
} else { } else {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '导出失败!', message: '导出失败!'
}) })
} }
}) })
...@@ -124,16 +253,29 @@ export default { ...@@ -124,16 +253,29 @@ export default {
} }
if (params.rewardTime && params.rewardTime.length) if (params.rewardTime && params.rewardTime.length)
delete params.rewardTime delete params.rewardTime
if (params && params.exchangeTime) {
params.exchangeBeginTime = params.exchangeTime[0]
params.exchangeEndTime = params.exchangeTime[1]
}
if (params.exchangeTime && params.exchangeTime.length)
delete params.exchangeTime
this.profitSearchForm = params this.profitSearchForm = params
setTimeout(() => { setTimeout(() => {
this.$refs.profitTable.refreshTable(false, true) this.$refs.profitTable.refreshTable(false, true)
}, 500) }, 500)
}, },
reset() {
if (this.choiceData) {
this.$refs.profitTable.mutiSelectArr.list = []
this.$refs.profitTable.$children[0].clearSelection()
}
},
getTotalScore(val) { getTotalScore(val) {
let { totalScore } = val let { totalScore } = val
this.totalScore = totalScore this.totalScore = totalScore
}, }
}, }
} }
</script> </script>
...@@ -141,6 +283,12 @@ export default { ...@@ -141,6 +283,12 @@ export default {
.cumulativeAward { .cumulativeAward {
margin: 16px 0; margin: 16px 0;
} }
.verificationPoints {
font-size: 16px;
font-weight: 600;
}
.my-row-height >>> .el-table__body-wrapper .el-table__row { .my-row-height >>> .el-table__body-wrapper .el-table__row {
height: 48px; height: 48px;
} }
......
<template>
<div>
<el-dialog
title="选择任务开始日期"
:visible.sync="activityDateVisible"
width="800px"
:before-close="handleClose"
>
<div>修改规则: 不能晚于活动开始日期且不能早于当前日期。</div>
<el-date-picker
v-model="selectDateItem"
type="date"
placeholder="选择日期"
:picker-options="pickerOptions"
@change="selectDateChange"
>
</el-date-picker>
<span slot="footer" class="dialog-footer">
<el-button @click="activityDateVisible = false">取 消</el-button>
<el-button type="primary" @click="confirmActivityDate">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'activityDia',
data() {
return {
activityDateVisible: false,
selectDateItem: '',
time: '',
pickerOptions: {
disabledDate: (time) => {
return (
time.getTime() < Date.now() - 8.64e7 || time.getTime() > this.time
)
},
},
}
},
methods: {
init(time) {
this.activityDateVisible = true
var date = new Date(time)
var time1 = date.setDate(date.getDate() - 1)
console.log(time1)
this.time = time1
},
selectDateChange() {
console.log(this.selectDateItem)
},
// 关闭弹窗
handleClose() {
this.selectDateItem = ''
this.activityDateVisible = false
},
confirmActivityDate() {
var time = new Date(this.selectDateItem)
var newTime =
time.getFullYear() + '-' + (time.getMonth() + 1) + '-' + time.getDate()
console.log(newTime)
this.$emit('selectActivityDate', newTime)
this.handleClose()
},
},
}
</script>
<style lang="scss" scoped></style>
...@@ -100,23 +100,23 @@ export default { ...@@ -100,23 +100,23 @@ export default {
this.activityData.map((item) => { this.activityData.map((item) => {
item.startTime = dayjs(item.startTime).format('YYYY-MM-DD') item.startTime = dayjs(item.startTime).format('YYYY-MM-DD')
item.endTime = dayjs(item.endTime).format('YYYY-MM-DD') item.endTime = dayjs(item.endTime).format('YYYY-MM-DD')
if (this.isClone) { // if (this.isClone) {
let activityDays = this.getDateByDays(item.startTime, item.endTime) // let activityDays = this.getDateByDays(item.startTime, item.endTime)
if (activityDays != this.taskDateNum) { // if (activityDays != this.taskDateNum) {
item.taskStatus = 1 // item.taskStatus = 1
} // }
} // }
}) })
}) })
}, },
// 根据日期获取天数 // 根据日期获取天数
getDateByDays(startDate, endDdate) { // getDateByDays(startDate, endDdate) {
let d1 = Date.parse(new Date(startDate)) // let d1 = Date.parse(new Date(startDate))
let d2 = Date.parse(new Date(endDdate)) // let d2 = Date.parse(new Date(endDdate))
// 时间戳相减 / 天数 // // 时间戳相减 / 天数
let day = parseInt((d2 - d1) / (1000 * 60 * 60 * 24)) + 1 // let day = parseInt((d2 - d1) / (1000 * 60 * 60 * 24)) + 1
return day // return day
}, // },
handleSelectItem(item) { handleSelectItem(item) {
this.selectItem = item this.selectItem = item
}, },
......
<template>
<div>
<div id="div-demo"></div>
</div>
</template>
<script>
import E from 'wangeditor'
export default {
name: 'textBox',
data() {
return {
editor: '',
content: '',
editorOption: {},
}
},
props: {
excludeMenus: {
type: Array,
default: () => ['code'],
},
},
mounted() {
this.getEdit()
},
methods: {
getEdit() {
const _this = this
this.editor = new E('#div-demo')
this.editor.config.uploadImgShowBase64 = true
this.editor.config.showMenuTooltips = true
this.editor.config.menuTooltipPosition = 'down'
this.editor.config.height = 400
this.editor.config.width = 500
this.editor.config.excludeMenus = this.excludeMenus
this.editor.config.onchange = (html) => {
// console.log(html);
this.content = html // 绑定当前逐渐地值
this.$emit('change', this.content) // 将内容同步到父组件中
}
this.editor.config.onfocus = () => {
this.$emit('focus')
}
this.editor.config.onchangeTimeout = 5000
this.editor.create()
},
setEdit(html) {
this.$nextTick(() => {
this.editor.txt.html(html)
})
},
forbidEdit() {
// this.editor.$textElem.attr('contenteditable', false)
this.editor.disable()
},
},
}
</script>
<style lang="scss" scoped>
#div-demo {
margin: 16px 300px 0 0;
}
.el-form .editor {
margin-top: 20px;
}
.myQuillEditor {
background-color: #fff;
height: 200px;
}
</style>
<style>
.w-e-text-container {
z-index: 1 !important;
}
.w-e-toolbar {
z-index: 2 !important;
}
</style>
...@@ -24,7 +24,11 @@ ...@@ -24,7 +24,11 @@
<img class="displayImg" :src="sub.materialContent" /> <img class="displayImg" :src="sub.materialContent" />
</template> </template>
<template v-if="sub.materialType == '3'"> <template v-if="sub.materialType == '3'">
<video class="displayImg" controls='controls' :src="sub.materialContent" /> <video
class="displayImg"
controls="controls"
:src="sub.materialContent"
/>
</template> </template>
<template v-if="sub.materialType == '4'"> <template v-if="sub.materialType == '4'">
<p class="content">{{ sub.materialContent }}</p> <p class="content">{{ sub.materialContent }}</p>
...@@ -45,7 +49,15 @@ ...@@ -45,7 +49,15 @@
}} }}
</span> </span>
<span v-if="item.sharingMethod" <span v-if="item.sharingMethod"
>分享模式:{{ item.sharingMethod == '1'?'微信群发': item.sharingMethod == '2'? '分享好友' :item.sharingMethod == '3'?'分享朋友圈' :''}}</span >分享模式:{{
item.sharingMethod == '1'
? '微信群发'
: item.sharingMethod == '2'
? '分享好友'
: item.sharingMethod == '3'
? '分享朋友圈'
: ''
}}</span
> >
<span v-if="item.triggerValue" <span v-if="item.triggerValue"
>触发值:{{ item.triggerValue }}</span >触发值:{{ item.triggerValue }}</span
...@@ -56,6 +68,19 @@ ...@@ -56,6 +68,19 @@
<span v-if="item.minTriggerValue" <span v-if="item.minTriggerValue"
>最低指标:{{ item.minTriggerValue }}</span >最低指标:{{ item.minTriggerValue }}</span
> >
<span v-if="item.textType"
>页面风格:{{
item.textType == '1'
? '软文模式'
: item.textType == '2'
? '营销模式'
: ''
}}</span
>
<span v-if="item.textType == '1'">
文章素材:
<div v-html="tramWord(item.textContent)"></div>
</span>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -43,6 +43,11 @@ export default { ...@@ -43,6 +43,11 @@ export default {
name: '发放渠道:', name: '发放渠道:',
value: 'channelName', value: 'channelName',
id:'channelName' id:'channelName'
},
{
name: '积分提现:',
value: 'withdrawalFlag',
id:'withdrawalFlag'
} }
] ]
} }
...@@ -55,6 +60,9 @@ export default { ...@@ -55,6 +60,9 @@ export default {
Object.keys(newVal).forEach(key => { Object.keys(newVal).forEach(key => {
if (item.id == key) { if (item.id == key) {
item.value = newVal[key] item.value = newVal[key]
if (item.id == 'withdrawalFlag') {
item.value = item.value == '1' ? '员工发起提现' : item.value == '2' ? '运营从后台核销' : ''
}
} }
}) })
}) })
......
...@@ -62,8 +62,8 @@ export default { ...@@ -62,8 +62,8 @@ export default {
await taskManagementApi.findMissionDeail({ id }).then(res => { await taskManagementApi.findMissionDeail({ id }).then(res => {
let copeWithRes = res.data && res.data.platformMerchantMissionDateResponseList let copeWithRes = res.data && res.data.platformMerchantMissionDateResponseList
let copeWithResList = copeWithRes[0].platformMerchantMissionResponseList let copeWithResList = copeWithRes[0].platformMerchantMissionResponseList
let { businessSceneName, merchantName, activityName, crowdName, channelName } = res.data let { businessSceneName, merchantName, activityName, crowdName, channelName,withdrawalFlag } = res.data
this.taskInfo = { businessSceneName, merchantName, activityName, crowdName, channelName } this.taskInfo = { businessSceneName, merchantName, activityName, crowdName, channelName,withdrawalFlag }
this.hastaskInfo = Object.values(this.taskInfo).length > 0 ? 'true' : 'false' this.hastaskInfo = Object.values(this.taskInfo).length > 0 ? 'true' : 'false'
this.taskSelect = copeWithRes this.taskSelect = copeWithRes
this.taskSelect.forEach(item => { this.taskSelect.forEach(item => {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<div class='basicInfo'> <div class='basicInfo'>
<div class='headline'>基础信息</div> <div class='headline'>基础信息</div>
<div v-for='(item,index) in basicInfoList' :key='index' class='basicInfoList'> <div v-for='(item,index) in basicInfoList' :key='index' class='basicInfoList'>
<span class='infoName'>{{item.infoName}}</span> <span class='infoName'>{{ item.infoName }}</span>
<span>{{item.infoVal}}</span> <span>{{ item.infoVal }}</span>
</div> </div>
</div> </div>
</template> </template>
...@@ -11,33 +11,38 @@ ...@@ -11,33 +11,38 @@
<script> <script>
export default { export default {
name: 'BasicInfo', name: 'BasicInfo',
props:{ props: {
basicInfo:{ basicInfo: {
type:Object, type: Object,
default:{} default: {}
} }
}, },
data(){ data() {
return{ return {
basicInfoList:[ basicInfoList: [
{infoName:'业务场景:',infoVal:'businessSceneName',id:'businessSceneName'}, { infoName: '业务场景:', infoVal: 'businessSceneName', id: 'businessSceneName' },
{infoName:'商户:',infoVal:'merchantName',id:'merchantName'}, { infoName: '商户:', infoVal: 'merchantName', id: 'merchantName' },
{infoName:'活动/产品:',infoVal:'activityName',id:'activityName'}, { infoName: '活动/产品:', infoVal: 'activityName', id: 'activityName' },
{infoName:'任务指定人群:',infoVal:'crowdName',id:'crowdName'}, { infoName: '任务指定人群:', infoVal: 'crowdName', id: 'crowdName' },
{infoName:'发放渠道:',infoVal:'channelName',id:'channelName'}, { infoName: '发放渠道:', infoVal: 'channelName', id: 'channelName' },
{infoName:'备注:',infoVal:'remark',id:'remark'}, { infoName: '积分提现:', infoVal: 'withdrawalFlag', id: 'withdrawalFlag' },
{ infoName: '备注:', infoVal: 'remark', id: 'remark' }
] ]
} }
}, },
watch: { watch: {
basicInfo:{ basicInfo: {
handler(newVal,oldVal){ handler(newVal, oldVal) {
if (!oldVal || newVal !== oldVal) { if (!oldVal || newVal !== oldVal) {
this.basicInfoList.map(item => { this.basicInfoList.map(item => {
Object.keys(newVal).forEach(key => { Object.keys(newVal).forEach(key => {
if (item.id == key) { if (item.id == key) {
item.infoVal = newVal[key] item.infoVal = newVal[key]
if (item.id == 'withdrawalFlag') {
item.infoVal = item.infoVal == '1' ? '员工发起提现' : item.infoVal == '2' ? '运营从后台核销' : ''
} }
}
}) })
}) })
} }
...@@ -50,16 +55,18 @@ export default { ...@@ -50,16 +55,18 @@ export default {
</script> </script>
<style scoped> <style scoped>
.headline{ .headline {
font-weight: 600; font-weight: 600;
padding-bottom: 20px; padding-bottom: 20px;
} }
.basicInfoList{
.basicInfoList {
font-size: 14px; font-size: 14px;
display: flex; display: flex;
padding: 8px 0; padding: 8px 0;
} }
.infoName{
.infoName {
color: #999999; color: #999999;
width: 120px; width: 120px;
padding-right: 16px; padding-right: 16px;
......
...@@ -36,7 +36,11 @@ ...@@ -36,7 +36,11 @@
<img class="displayImg" :src="sub.materialContent" /> <img class="displayImg" :src="sub.materialContent" />
</template> </template>
<template v-if="sub.materialType == '3'"> <template v-if="sub.materialType == '3'">
<video class="displayImg" controls='controls' :src="sub.materialContent" /> <video
class="displayImg"
controls="controls"
:src="sub.materialContent"
/>
</template> </template>
<template v-if="sub.materialType == '4'"> <template v-if="sub.materialType == '4'">
<p>{{ sub.materialContent }}</p> <p>{{ sub.materialContent }}</p>
...@@ -58,7 +62,15 @@ ...@@ -58,7 +62,15 @@
}} }}
</span> </span>
<span v-if="displayList.sharingMethod" <span v-if="displayList.sharingMethod"
>分享模式:{{ displayList.sharingMethod == '1'?'微信群发': displayList.sharingMethod == '2'? '分享好友' :displayList.sharingMethod == '3'?'分享朋友圈' :''}}</span >分享模式:{{
displayList.sharingMethod == '1'
? '微信群发'
: displayList.sharingMethod == '2'
? '分享好友'
: displayList.sharingMethod == '3'
? '分享朋友圈'
: ''
}}</span
> >
<span v-if="displayList.triggerValue" <span v-if="displayList.triggerValue"
>触发值:{{ displayList.triggerValue }}</span >触发值:{{ displayList.triggerValue }}</span
...@@ -69,6 +81,19 @@ ...@@ -69,6 +81,19 @@
<span v-if="displayList.minTriggerValue" <span v-if="displayList.minTriggerValue"
>最低指标:{{ displayList.minTriggerValue }}</span >最低指标:{{ displayList.minTriggerValue }}</span
> >
<span v-if="displayList.textType"
>页面风格:{{
displayList.textType == '1'
? '软文模式'
: displayList.textType == '2'
? '营销模式'
: ''
}}</span
>
<span v-if="displayList.textType == '1'">
文章素材:
<div v-html="tramWord(displayList.textContent)"></div>
</span>
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
......
...@@ -40,8 +40,8 @@ export default { ...@@ -40,8 +40,8 @@ export default {
}, },
primaryInfo(id) { primaryInfo(id) {
taskManagementApi.findMissionDeail({ id }).then(res => { taskManagementApi.findMissionDeail({ id }).then(res => {
let { businessSceneName, merchantName, activityName, crowdName, channelName, remark } = res.data let { businessSceneName, merchantName, activityName, crowdName, channelName, remark,withdrawalFlag} = res.data
this.basicInfo = { businessSceneName, merchantName, activityName, crowdName, channelName, remark } this.basicInfo = { businessSceneName, merchantName, activityName, crowdName, channelName, remark,withdrawalFlag }
this.hasbasicInfo = Object.values(this.basicInfo).length > 0 ? 'true' : 'false' this.hasbasicInfo = Object.values(this.basicInfo).length > 0 ? 'true' : 'false'
this.taskPlanList = res.data.platformMerchantMissionDateResponseList this.taskPlanList = res.data.platformMerchantMissionDateResponseList
......
...@@ -50,6 +50,24 @@ ...@@ -50,6 +50,24 @@
>添加任务</el-button >添加任务</el-button
> >
</div> </div>
<el-tabs v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane
:label="'全部' + '(' + listCount.totalCount + ')'"
name="first"
></el-tab-pane>
<el-tab-pane
:label="'未发布' + '(' + listCount.draftCount + ')'"
:name="statusNum.UNPUBLISH"
></el-tab-pane>
<el-tab-pane
:label="'已发布' + '(' + listCount.upCount + ')'"
:name="statusNum.PUBLISHED"
></el-tab-pane>
<el-tab-pane
:label="'已结束' + '(' + listCount.downCount + ')'"
:name="statusNum.FINISHIED"
></el-tab-pane>
</el-tabs>
<div> <div>
<d2-table <d2-table
ref="taskTable" ref="taskTable"
...@@ -149,6 +167,7 @@ const sceneOption = [ ...@@ -149,6 +167,7 @@ const sceneOption = [
}, },
] ]
const statusNum = { const statusNum = {
ALL: '',
UNPUBLISH: '1', UNPUBLISH: '1',
PUBLISHED: '2', PUBLISHED: '2',
FINISHIED: '3', FINISHIED: '3',
...@@ -187,6 +206,7 @@ export default { ...@@ -187,6 +206,7 @@ export default {
activityName: '', activityName: '',
activityStatus: '', activityStatus: '',
}, },
listCount: {},
// 表格参数 // 表格参数
tableParams: { tableParams: {
// btnId: new Date().getTime() + parseInt(Math.random() * 1000), // btnId: new Date().getTime() + parseInt(Math.random() * 1000),
...@@ -240,9 +260,21 @@ export default { ...@@ -240,9 +260,21 @@ export default {
// 获取订单列表 // 获取订单列表
getListApi: taskApi.findMissionList, getListApi: taskApi.findMissionList,
status: false, status: false,
activeName: 'first',
} }
}, },
mounted() {
this.handleSearchTaskNum()
},
methods: { methods: {
// 查询任务状态数量
handleSearchTaskNum() {
console.log(222)
taskApi.getStaticMission({}).then((res) => {
console.log(res)
this.listCount = res.data
})
},
// 搜索框搜索 // 搜索框搜索
handleSearch() { handleSearch() {
this.$refs.taskTable.refreshTable() this.$refs.taskTable.refreshTable()
...@@ -257,6 +289,14 @@ export default { ...@@ -257,6 +289,14 @@ export default {
} }
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.taskTable.refreshTable() this.$refs.taskTable.refreshTable()
this.activeName = 'first'
})
},
// tab切换
handleTabClick(tab, event) {
this.searchForm.activityStatus = tab.name == 'first' ? '' : tab.name
this.$nextTick(() => {
this.$refs.taskTable.refreshTable(true, true)
}) })
}, },
// 编辑 // 编辑
...@@ -331,6 +371,7 @@ export default { ...@@ -331,6 +371,7 @@ export default {
callback: (action) => { callback: (action) => {
if (action == 'confirm') { if (action == 'confirm') {
taskApi.updateStatusMission(params).then((res) => { taskApi.updateStatusMission(params).then((res) => {
console.log(res)
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : '操作失败', message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error', type: res.code == '0' ? 'success' : 'error',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div v-html='textTooltip'></div> <div v-html='textTooltip'></div>
<span slot='footer' class='dialog-footer'> <span slot='footer' class='dialog-footer'>
<el-button @click='dialogVisible = false'>取 消</el-button> <el-button @click='dialogVisible = false'>取 消</el-button>
<el-button type='primary' @click='comfirmDialog()' <el-button type='primary' @click='handleDebounce'
>确 定</el-button >确 定</el-button
> >
</span> </span>
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
<script> <script>
import { withdrawalApi } from '@/api/withdrawalManagement' import { withdrawalApi } from '@/api/withdrawalManagement'
import debounce from '@/utils/debounce'
import { profitApi } from '@/api/profitManagement'
export default { export default {
name: 'WithdrawalDialog', name: 'WithdrawalDialog',
...@@ -22,23 +24,27 @@ export default { ...@@ -22,23 +24,27 @@ export default {
} }
}, },
methods: { methods: {
async comfirmDialog() { handleDebounce:debounce(
async function(){
const params = { const params = {
...JSON.parse(JSON.stringify( ...JSON.parse(JSON.stringify(
{ idList: this.auditId } { idList: this.auditId }
)) ))
} }
await withdrawalApi.batchWithdrawal(params).then(res => { await withdrawalApi.batchWithdrawal(params).then(res => {
if (res.code == '0'){ if (res.code !== '0'){
this.$message.success('审核成功')
this.dialogVisible = false
}else{
this.$message.error('审核失败') this.$message.error('审核失败')
}else{
this.$message.success('审核成功')
} }
}).catch(err =>{ }).catch(err=>{
this.$message.error('审核失败') this.$message.error(err)
})
} }
)
this.dialogVisible = false
},
1000
),
} }
} }
</script> </script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!