Commit 8b19a5aa by xuyl

更新提现管理审核代码

1 parent 50fe322d
...@@ -3026,7 +3026,7 @@ ...@@ -3026,7 +3026,7 @@
}, },
"charenc": { "charenc": {
"version": "0.0.2", "version": "0.0.2",
"resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", "resolved": "https://registry.npmmirror.com/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": {
...@@ -3978,7 +3978,7 @@ ...@@ -3978,7 +3978,7 @@
}, },
"crypt": { "crypt": {
"version": "0.0.2", "version": "0.0.2",
"resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", "resolved": "https://registry.npmmirror.com/crypt/-/crypt-0.0.2.tgz",
"integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==" "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow=="
}, },
"crypto-browserify": { "crypto-browserify": {
...@@ -6278,7 +6278,7 @@ ...@@ -6278,7 +6278,7 @@
}, },
"glsx-vue-common": { "glsx-vue-common": {
"version": "2.0.5", "version": "2.0.5",
"resolved": "https://registry.npmjs.org/glsx-vue-common/-/glsx-vue-common-2.0.5.tgz", "resolved": "https://registry.npmmirror.com/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 +11438,7 @@ ...@@ -11438,7 +11438,7 @@
}, },
"sha1": { "sha1": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/sha1/-/sha1-1.1.1.tgz", "resolved": "https://registry.npmmirror.com/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",
......
...@@ -231,6 +231,7 @@ export default { ...@@ -231,6 +231,7 @@ export default {
}, },
// 多选 // 多选
handleSelect(val) { handleSelect(val) {
console.log(val)
this.mutiSelectArr[this.tableParams.mutiSelectName] = val this.mutiSelectArr[this.tableParams.mutiSelectName] = val
}, },
// 清空多选 // 清空多选
......
...@@ -10,7 +10,7 @@ export const nearlyAMonth = { ...@@ -10,7 +10,7 @@ export const nearlyAMonth = {
let year = date.getFullYear() let year = date.getFullYear()
let month = date.getMonth() + 1 let month = date.getMonth() + 1
let day = date.getDate() let day = date.getDate()
let aheadOfMonth = month == '12' ? '1' : month - 1 let aheadOfMonth = month == '1' ? '12' : month - 1
this.defalutStartTime = year + '-' + aheadOfMonth + '-' + day this.defalutStartTime = year + '-' + aheadOfMonth + '-' + day
this.defalutEndTime = year + '-' + month + '-' + day this.defalutEndTime = year + '-' + month + '-' + day
} }
......
<template> <template>
<el-dialog title='提示' :visible.sync='dialogVisible' width='30%'> <el-dialog title='提示' :visible.sync='dialogVisible' width='30%'>
<span>{{ textTooltip }}</span> <div v-html="textTooltip"></div>
<p>是否确定审核?</p>
<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='comfirmDialog()'
...@@ -14,7 +13,7 @@ ...@@ -14,7 +13,7 @@
<script> <script>
export default { export default {
name: 'WithdrawalDialog', name: 'WithdrawalDialog',
props: ['textTooltip','selectType'], props: ['textTooltip','auditId'],
data() { data() {
return { return {
dialogVisible: false dialogVisible: false
...@@ -22,7 +21,7 @@ export default { ...@@ -22,7 +21,7 @@ export default {
}, },
methods: { methods: {
comfirmDialog() { comfirmDialog() {
console.log(this.selectType) console.log(this.auditId)
} }
} }
} }
......
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
<el-form-item label='状态'> <el-form-item label='状态'>
<el-select v-model='withdrawalSearchForm.status' placeholder='请选择状态'> <el-select v-model='withdrawalSearchForm.status' placeholder='请选择状态'>
<el-option label='全部' value=''></el-option> <el-option label='全部' value=''></el-option>
<el-option label='待审核' value='0'></el-option> <el-option label='待审核' value='1'></el-option>
<el-option label='到账中' value='1'></el-option> <el-option label='到账中' value='2'></el-option>
<el-option label='已到账' value='2'></el-option> <el-option label='已到账' value='3'></el-option>
<el-option label='到账失败' value='3'></el-option> <el-option label='到账失败' value='4'></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label='提现时间'> <el-form-item label='提现时间'>
...@@ -65,34 +65,34 @@ ...@@ -65,34 +65,34 @@
<script> <script>
import { nearlyAMonth } from '@/mixin/nearlyAMonth' import { nearlyAMonth } from '@/mixin/nearlyAMonth'
export default { export default {
name: 'WithdrawalSearch', name: 'WithdrawalSearch',
mixins:[nearlyAMonth], mixins: [nearlyAMonth],
data() { data() {
return { return {
withdrawalSearchForm: {} withdrawalSearchForm: {}
} }
}, },
created() { created() {
this.$set(this.withdrawalSearchForm,'withdrawalTime',[this.defalutStartTime,this.defalutEndTime]) this.$set(this.withdrawalSearchForm, 'withdrawalTime', [this.defalutStartTime, this.defalutEndTime])
}, },
methods: { methods: {
copeWithTime(beginTime, endTime, primaryTime) {
let searchForm = this.withdrawalSearchForm
searchForm[beginTime] = searchForm[primaryTime] && searchForm[primaryTime][0]
searchForm[endTime] = searchForm[primaryTime] && searchForm[primaryTime][1]
},
handleSearch() { handleSearch() {
if (this.withdrawalSearchForm && this.withdrawalSearchForm.withdrawalTime) { this.withdrawalSearchForm.withdrawalTime && this.copeWithTime('withdrawalBeginTime', 'withdrawalEndTime', 'withdrawalTime')
this.withdrawalSearchForm.withdrawalBeginTime = this.withdrawalSearchForm.withdrawalTime[0] this.withdrawalSearchForm.reviewTime && this.copeWithTime('reviewBeginTime', 'reviewEndTime', 'reviewTime')
this.withdrawalSearchForm.withdrawalEndTime = this.withdrawalSearchForm.withdrawalTime[1]
}
if (this.withdrawalSearchForm && this.withdrawalSearchForm.reviewTime) {
this.withdrawalSearchForm.reviewBeginTime = this.withdrawalSearchForm.reviewTime[0]
this.withdrawalSearchForm.reviewEndTime = this.withdrawalSearchForm.reviewTime[1]
}
this.$emit('sendSearchForm', this.withdrawalSearchForm) this.$emit('sendSearchForm', this.withdrawalSearchForm)
}, },
reset() { reset() {
Object.keys(this.withdrawalSearchForm).forEach((key) => { Object.keys(this.withdrawalSearchForm).forEach((key) => {
this.withdrawalSearchForm[key] = '' this.withdrawalSearchForm[key] = ''
}) })
this.$set(this.withdrawalSearchForm,'withdrawalTime',[this.defalutStartTime,this.defalutEndTime]) this.$set(this.withdrawalSearchForm, 'withdrawalTime', [this.defalutStartTime, this.defalutEndTime])
this.$nextTick(() => { this.$nextTick(() => {
this.handleSearch() this.handleSearch()
}) })
......
<template> <template>
<d2-table <d2-table
class="my-row-height" class='my-row-height'
ref="withdrawalTable" ref='withdrawalTable'
@select="handleSelect" :tableData='tableData'
:hasNum="true" :hasNum='true'
:tableParams="withdrawalTableParams" :tableParams='withdrawalTableParams'
:searchForm="searchForm" :searchForm='searchForm'
:getListApi="getListApi" :getListApi='getListApi'
:pageConf="pageConf" :pageConf='pageConf'
> >
<div slot="status" slot-scope="scope">
<span v-if="scope.scope.status == '1'">待审核</span>
<span v-if="scope.scope.status == '2'">到账中</span>
<span v-if="scope.scope.status == '3'">已到账</span>
<span v-if="scope.scope.status == '4'">到账失败</span>
</div>
</d2-table> </d2-table>
</template> </template>
<script> <script>
export default { export default {
name: 'WithdrawalTable', name: 'WithdrawalTable',
props:['searchForm'], props: ['searchForm'],
data(){ data() {
return{ return {
pageConf: { pageConf: {
pageSize: 'pageSize', pageSize: 'pageSize',
pageNum: 'pageNum', pageNum: 'pageNum',
totalCount: 'data.total', totalCount: 'data.total'
}, },
// getListApi: customerApi.searchCustomerList, tableData: [
{
id: 1,
staffName: '小徐',
staffPhone: '11111',
withdrawalScore: '2',
status:'1'
},
{
id: 2,
staffName: '小zhang',
staffPhone: '11111',
withdrawalScore: '2',
status:'0'
},
{
id: 2,
staffName: '小zhang',
staffPhone: '11111',
withdrawalScore: '2',
status:'0'
},
{
id: 2,
staffName: '小zhang',
staffPhone: '11111',
withdrawalScore: '2',
status:'3'
},
{
id: 23,
staffName: '小zhang',
staffPhone: '11111',
withdrawalScore: '2',
status:'4'
},
{
id: 23,
staffName: '小zhang',
staffPhone: '11111',
withdrawalScore: '2',
status:'4'
},
{
id: 22,
staffName: '小zhang',
staffPhone: '11111',
withdrawalScore: '2',
status:'4'
},
{
id: 21,
staffName: '小zhang',
staffPhone: '11111',
withdrawalScore: '2',
status:'4'
}
],
withdrawalTableParams: { withdrawalTableParams: {
mutiSelectUniqueKey:new Date().getTime() + parseInt(Math.random() * 1000), mutiSelectUniqueKey: new Date().getTime() + parseInt(Math.random() * 1000),
mutiSelectName:'1111', mutiSelectName: 'list',
// btnId: new Date().getTime() + parseInt(Math.random() * 1000), // btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data.list', listName: 'data.list',
tableColumns: [ tableColumns: [
{ {
label: '员工名称', label: '员工名称',
prop: 'staffName', prop: 'staffName'
}, },
{ {
label: '员工手机号', label: '员工手机号',
prop: 'staffPhone', prop: 'staffPhone'
}, },
{ {
label: '积分值', label: '积分值',
prop: 'withdrawalScore', prop: 'withdrawalScore'
}, },
{ {
label: '提现金额(元)', label: '提现金额(元)',
prop: 'withdrawalAmount', prop: 'withdrawalAmount'
}, },
// {
// label: '广联渠道',
// prop: 'validCustomerNumber',
// },
// {
// label: '服务商渠道',
// prop: 'batchNo',
// },
// {
// label: '门店渠道',
// prop: 'status',
// addHtml: 'status',
// },
{ {
label: '提现时间', label: '提现时间',
prop: 'withdrawalTime', prop: 'withdrawalTime'
}, },
{ {
label: '微信昵称', label: '微信昵称',
prop: 'wechatName', prop: 'wechatName'
}, },
{ {
label: '微信手机号', label: '微信手机号',
prop: 'wechatPhone', prop: 'wechatPhone'
}, },
{ {
label: '微信openid', label: '微信openid',
prop: 'wechatId', prop: 'wechatId'
}, },
{ {
label: '状态', label: '状态',
prop: 'status', prop: 'status',
addHtml:'status'
}, },
{ {
label: '审核人', label: '审核人',
prop: 'reviewer', prop: 'reviewer'
}, },
{ {
label: '审核时间', label: '审核时间',
prop: 'reviewTime', prop: 'reviewTime'
}, },
{ {
label: '到账时间', label: '到账时间',
prop: 'successTime', prop: 'successTime'
} }
], ]
}, }
// getListApi: customerApi.searchCustomerList,
} }
},
methods:{
handleSelect(selection,row){
this.orgMultiSelection = selection;
let opSelection = this.res.map(item => {
let {status,id,...params} = item
return {status,id}
})
this.$emit('sendSelection',opSelection )
},
} }
} }
</script> </script>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</el-button </el-button
> >
</div> </div>
<WithdrawalTable :searchForm='searchForm' @sendSelection='getSelection' /> <WithdrawalTable ref='withdrawalTable' :searchForm='searchForm' />
<WithdrawalDialog :textTooltip='textTooltip' :selectType='selectType' :auditId='auditId' ref='dialogRef' /> <WithdrawalDialog :textTooltip='textTooltip' :selectType='selectType' :auditId='auditId' ref='dialogRef' />
</div> </div>
</template> </template>
...@@ -45,7 +45,6 @@ export default { ...@@ -45,7 +45,6 @@ export default {
data() { data() {
return { return {
textTooltip: '', textTooltip: '',
selectType: '',
searchForm: {}, searchForm: {},
choiceStatus: [], choiceStatus: [],
auditId: [] auditId: []
...@@ -57,6 +56,13 @@ export default { ...@@ -57,6 +56,13 @@ export default {
if (val.reviewTime) delete val.reviewTime if (val.reviewTime) delete val.reviewTime
this.searchForm = val this.searchForm = val
}, },
getSeletedData() {
this.choiceStatus = this.$refs.withdrawalTable.$children[0].mutiSelectArr.list &&
this.$refs.withdrawalTable.$children[0].mutiSelectArr.list.map(item => {
let {status,id,...params} = item
return {status,id}
})
},
handleOutput() { handleOutput() {
let params = JSON.parse(JSON.stringify(this.searchForm)) let params = JSON.parse(JSON.stringify(this.searchForm))
// customerApi.orderListExport(params).then(res => { // customerApi.orderListExport(params).then(res => {
...@@ -71,32 +77,31 @@ export default { ...@@ -71,32 +77,31 @@ export default {
// }) // })
}, },
vertify(selectType, status) { vertify(selectType, status) {
console.log(arguments) this.getSeletedData()
let errMsg = selectType == 'check' ? '请选择待审核的提现记录!' : '请选择到账失败的提现记录' let errMsg = selectType == 'check' ? '请选择待审核的提现记录!' : '请选择到账失败的提现记录'
if ((selectType && !this.choiceStatus.length) || (selectType && this.choiceStatus.every(item => item.status !== status))) { if ((selectType && (this.choiceStatus &&!this.choiceStatus.length) ) || !(selectType && (this.choiceStatus && this.choiceStatus.every(item => item.status == status)))) {
this.$message({ this.$message({
type: 'error', type: 'error',
message: errMsg message: errMsg
}) })
return false return false
}else{
return true
} }
}, },
getSelection(val) {
// this.selectId = val.map(item =>
// return item.id
// )
},
handleDialog(type) { handleDialog(type) {
this.selectType = type let vertifycheck
let vertifycheck = true
if (type == 'check') { if (type == 'check') {
vertifycheck = this.vertify('check', '1') vertifycheck = this.vertify('check', '1')
} else { } else {
vertifycheck = this.vertify('transfer', '2') vertifycheck = this.vertify('transfer', '4')
} }
if (vertifycheck) { if (vertifycheck) {
this.auditId = this.getSelection() this.auditId = this.choiceStatus.map(item =>item.id)
this.textTooltip = type == 'check' ? '审核通过,系统将自动转账至员工的微信零钱中' : '手动发起转账,系统将重新发起转账至员工的微信零钱中' const checkText = `<p>审核通过, 系统将自动转账至员工的微信零钱中</p><p>是否确定审核?</p>`
const transferText = `<p>手动发起转账,系统将重新发起转账至员工的微信零钱中</p><p>是否确定发起?</p>`
this.textTooltip = type == 'check' ? checkText : transferText
this.$refs.dialogRef.dialogVisible = true this.$refs.dialogRef.dialogVisible = true
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!