Commit 8b19a5aa by xuyl

更新提现管理审核代码

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