|
@@ -1,149 +1,169 @@
|
|
<template>
|
|
<template>
|
|
<div class="bindAccount">
|
|
<div class="bindAccount">
|
|
- <div class="search">
|
|
|
|
- <div class="left"></div>
|
|
|
|
- <div class="right">
|
|
|
|
- <div>
|
|
|
|
- <el-input
|
|
|
|
- v-model="search.keyword"
|
|
|
|
- style="width: 250px"
|
|
|
|
- placeholder="请输入店铺ID/店铺名称"
|
|
|
|
- clearable
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <el-select
|
|
|
|
- v-model="search.capitalStatus"
|
|
|
|
- placeholder="请选择平台"
|
|
|
|
- clearable
|
|
|
|
- style="width: 100%"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in constant.capitalStatus"
|
|
|
|
- :key="item.code"
|
|
|
|
- :label="item.name"
|
|
|
|
- :value="item.code"
|
|
|
|
|
|
+
|
|
|
|
+ <el-tabs v-model="activeName" type="border-card" @tab-click="handleTabClick">
|
|
|
|
+ <el-tab-pane label="待处理" name="pending"> </el-tab-pane>
|
|
|
|
+ <el-tab-pane label="全部" name="all"></el-tab-pane>
|
|
|
|
+ <div class="search">
|
|
|
|
+ <div class="left"></div>
|
|
|
|
+ <div class="right">
|
|
|
|
+ <div>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="search.shopName"
|
|
|
|
+ style="width: 250px"
|
|
|
|
+ placeholder="请输入店铺ID/店铺名称"
|
|
|
|
+ clearable
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="activeName === 'pending'">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="search.accountName"
|
|
|
|
+ style="width: 250px"
|
|
|
|
+ placeholder="请输入绑定账户名称/绑定账户账号"
|
|
|
|
+ clearable
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="search.platformCode"
|
|
|
|
+ placeholder="请选择平台"
|
|
|
|
+ clearable
|
|
>
|
|
>
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </div>
|
|
|
|
- <div>
|
|
|
|
- <el-select
|
|
|
|
- v-model="search.capitalStatus"
|
|
|
|
- placeholder="请选择账号绑定状态"
|
|
|
|
- clearable
|
|
|
|
- style="width: 100%"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in constant.capitalStatus"
|
|
|
|
- :key="item.code"
|
|
|
|
- :label="item.name"
|
|
|
|
- :value="item.code"
|
|
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in constant.platformType"
|
|
|
|
+ :key="item.code"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.code"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="activeName === 'all'">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="search.accountStatus"
|
|
|
|
+ placeholder="请选择账号绑定状态"
|
|
|
|
+ clearable
|
|
|
|
+ style="width: 200px"
|
|
>
|
|
>
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </div>
|
|
|
|
- <div class="leftBtn">
|
|
|
|
- <el-button type="primary" @click="fetchData">查询</el-button>
|
|
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in constant.accountBindingStatus"
|
|
|
|
+ :key="item.code"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.code"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="leftBtn">
|
|
|
|
+ <el-button type="primary" @click="fetchData">查询</el-button>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
- <cy-comm-table
|
|
|
|
- ref="commTable"
|
|
|
|
- v-loading="loading"
|
|
|
|
- parent-component="CapitalManage"
|
|
|
|
- :columns="columns"
|
|
|
|
- :data="tableData"
|
|
|
|
- :count="total"
|
|
|
|
- :table-options="{
|
|
|
|
- maxHeight: 'calc(100vh - 410px)',
|
|
|
|
- height: 'calc(100vh - 410px)'
|
|
|
|
- }"
|
|
|
|
- />
|
|
|
|
- <cy-dialog ref="editStatus" title="修正账户绑定状态" width="800px">
|
|
|
|
- <el-form
|
|
|
|
- ref="editRuleForm"
|
|
|
|
- :model="editRuleForm"
|
|
|
|
- :rules="editRules"
|
|
|
|
- label-position="top"
|
|
|
|
- label-width="150px"
|
|
|
|
- class="rule-form-orange"
|
|
|
|
- >
|
|
|
|
- <el-form-item label="账户绑定状态" prop="payBackMethod" style="width: 100%">
|
|
|
|
- <el-select
|
|
|
|
- v-model="editRuleForm.payBackMethod"
|
|
|
|
- placeholder="请选择账户绑定状态"
|
|
|
|
- clearable
|
|
|
|
- style="width: 100%"
|
|
|
|
- :disabled="disabled"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in constant.payBackMethod"
|
|
|
|
- :key="item.code"
|
|
|
|
- :label="item.name"
|
|
|
|
- :value="item.code"
|
|
|
|
|
|
+ <cy-comm-table
|
|
|
|
+ ref="commTable"
|
|
|
|
+ v-loading="loading"
|
|
|
|
+ parent-component="MonitorBindAccount"
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :data="tableData"
|
|
|
|
+ :count="total"
|
|
|
|
+ :table-options="{
|
|
|
|
+ maxHeight: 'calc(100vh - 410px)',
|
|
|
|
+ height: 'calc(100vh - 410px)'
|
|
|
|
+ }"
|
|
|
|
+ />
|
|
|
|
+ <cy-dialog ref="editStatus" title="修正账户绑定状态" width="800px">
|
|
|
|
+ <el-form
|
|
|
|
+ ref="editRuleForm"
|
|
|
|
+ :model="editRuleForm"
|
|
|
|
+ :rules="editRules"
|
|
|
|
+ label-position="top"
|
|
|
|
+ label-width="150px"
|
|
|
|
+ class="rule-form-orange"
|
|
|
|
+ >
|
|
|
|
+ <el-form-item label="账户绑定状态" prop="accountStatus" style="width: 100%">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="editRuleForm.accountStatus"
|
|
|
|
+ placeholder="请选择账户绑定状态"
|
|
|
|
+ clearable
|
|
|
|
+ style="width: 100%"
|
|
>
|
|
>
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="备注" prop="donorAccountName" style="width: 100%">
|
|
|
|
- <el-input v-model="editRuleForm.donorAccountName" placeholder="请输入备注" />
|
|
|
|
- </el-form-item>
|
|
|
|
-
|
|
|
|
- </el-form>
|
|
|
|
- <div class="submit-btn">
|
|
|
|
- <el-button @click="$refs.editStatus.show = false">关闭</el-button>
|
|
|
|
- <el-button type="primary" @click="submit('submit')">确定</el-button>
|
|
|
|
- </div>
|
|
|
|
- </cy-dialog>
|
|
|
|
- <cy-dialog ref="changeBind" title="换绑账号" width="800px">
|
|
|
|
- <el-form
|
|
|
|
- ref="changeRuleForm"
|
|
|
|
- :model="changeRuleForm"
|
|
|
|
- :rules="changeRules"
|
|
|
|
- label-position="top"
|
|
|
|
- label-width="150px"
|
|
|
|
- class="rule-form-orange"
|
|
|
|
- >
|
|
|
|
- <el-form-item label="换绑账号" prop="payBackMethod" style="width: 100%">
|
|
|
|
- <el-select
|
|
|
|
- v-model="editRuleForm.payBackMethod"
|
|
|
|
- placeholder="请选择换绑账号"
|
|
|
|
- clearable
|
|
|
|
- style="width: 100%"
|
|
|
|
- :disabled="disabled"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in constant.payBackMethod"
|
|
|
|
- :key="item.code"
|
|
|
|
- :label="item.name"
|
|
|
|
- :value="item.code"
|
|
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in editAccountStatus"
|
|
|
|
+ :key="item.code"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.code"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="备注" prop="triggerReason" style="width: 100%">
|
|
|
|
+ <el-input v-model="editRuleForm.triggerReason" placeholder="请输入备注" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div class="submit-btn">
|
|
|
|
+ <el-button @click="$refs.editStatus.show = false">关闭</el-button>
|
|
|
|
+ <el-button type="primary" @click="editSubmit">确定</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </cy-dialog>
|
|
|
|
+ <cy-dialog ref="changeBind" title="换绑账号" width="800px">
|
|
|
|
+ <el-form
|
|
|
|
+ ref="changeRuleForm"
|
|
|
|
+ :model="changeRuleForm"
|
|
|
|
+ :rules="changeRules"
|
|
|
|
+ label-position="top"
|
|
|
|
+ label-width="150px"
|
|
|
|
+ class="rule-form-orange"
|
|
|
|
+ >
|
|
|
|
+ <el-form-item label="换绑账号" prop="accountNumber" style="width: 100%">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="changeRuleForm.accountNumber"
|
|
|
|
+ placeholder="请选择换绑账号"
|
|
|
|
+ clearable
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ @change="accountNameChange"
|
|
>
|
|
>
|
|
- </el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="换绑账户名称" prop="donorAccountName" style="width: 100%">
|
|
|
|
- <el-input v-model="editRuleForm.donorAccountName" placeholder="请输入换绑账户名称" />
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in accountList"
|
|
|
|
+ :key="item.accountNumber"
|
|
|
|
+ :label="item.accountNumber"
|
|
|
|
+ :value="item.accountNumber"
|
|
|
|
+ >
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="换绑账户名称" prop="accountName" style="width: 100%">
|
|
|
|
+ <el-input v-model="changeRuleForm.accountName" disabled placeholder="请输入换绑账户名称" />
|
|
|
|
+ </el-form-item>
|
|
|
|
|
|
- </el-form>
|
|
|
|
- <div class="submit-btn">
|
|
|
|
- <el-button @click="$refs.changeBind.show = false">关闭</el-button>
|
|
|
|
- <el-button type="primary" @click="submit('submit')">确定</el-button>
|
|
|
|
- </div>
|
|
|
|
- </cy-dialog>
|
|
|
|
|
|
+ </el-form>
|
|
|
|
+ <div class="submit-btn">
|
|
|
|
+ <el-button @click="$refs.changeBind.show = false">关闭</el-button>
|
|
|
|
+ <el-button type="primary" @click="changeSubmit">确定</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </cy-dialog>
|
|
|
|
+ </el-tabs>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { mapGetters } from 'vuex'
|
|
import { mapGetters } from 'vuex'
|
|
|
|
+import { getList, refreshStatus, changeAccount, getAccountList, updateStatus } from '@/api/monitorManage/bindAccount'
|
|
|
|
+import { filterListData } from '@/utils'
|
|
export default {
|
|
export default {
|
|
|
|
+ name: 'MonitorBindAccount',
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- search: {},
|
|
|
|
|
|
+ search: {
|
|
|
|
+ shopName: '',
|
|
|
|
+ accountStatus: '',
|
|
|
|
+ accountName: '',
|
|
|
|
+ platformCode: ''
|
|
|
|
+ },
|
|
total: 0,
|
|
total: 0,
|
|
- tableData: [{ capitalName: '11111' }],
|
|
|
|
|
|
+ page: 1,
|
|
|
|
+ size: 10,
|
|
|
|
+ tableData: [],
|
|
columns: [
|
|
columns: [
|
|
{
|
|
{
|
|
label: '序号',
|
|
label: '序号',
|
|
@@ -151,47 +171,42 @@ export default {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: '平台',
|
|
label: '平台',
|
|
- prop: 'creditNo',
|
|
|
|
|
|
+ prop: 'platformName',
|
|
showTooltip: true
|
|
showTooltip: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: '店铺ID',
|
|
label: '店铺ID',
|
|
- prop: 'capitalName',
|
|
|
|
|
|
+ prop: 'shopId',
|
|
showTooltip: true
|
|
showTooltip: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: '店铺名称',
|
|
label: '店铺名称',
|
|
- prop: 'capitalName',
|
|
|
|
|
|
+ prop: 'shopName',
|
|
showTooltip: true
|
|
showTooltip: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: '绑定账户名称',
|
|
label: '绑定账户名称',
|
|
- prop: 'capitalName',
|
|
|
|
|
|
+ prop: 'accountName',
|
|
showTooltip: true
|
|
showTooltip: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: '绑定账户账号',
|
|
label: '绑定账户账号',
|
|
- prop: 'capitalName',
|
|
|
|
|
|
+ prop: 'accountNumber',
|
|
showTooltip: true
|
|
showTooltip: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: '账户绑定状态',
|
|
label: '账户绑定状态',
|
|
- prop: 'capitalName',
|
|
|
|
- showTooltip: true
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: '修正原因',
|
|
|
|
- prop: 'capitalName',
|
|
|
|
|
|
+ prop: 'accountStatusName',
|
|
showTooltip: true
|
|
showTooltip: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: '操作人',
|
|
|
|
- prop: 'capitalName',
|
|
|
|
|
|
+ label: '触发原因',
|
|
|
|
+ prop: 'triggerReason',
|
|
showTooltip: true
|
|
showTooltip: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: '操作时间',
|
|
|
|
- prop: 'capitalName',
|
|
|
|
|
|
+ label: '更新时间',
|
|
|
|
+ prop: 'gmtModified',
|
|
showTooltip: true
|
|
showTooltip: true
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -201,40 +216,47 @@ export default {
|
|
{
|
|
{
|
|
msg: '刷新账户绑定状态 ',
|
|
msg: '刷新账户绑定状态 ',
|
|
icon: 'iconfont icon-shuaxin',
|
|
icon: 'iconfont icon-shuaxin',
|
|
- power: '',
|
|
|
|
- tabPower: [],
|
|
|
|
|
|
+ power: 'reflushAccountStatus',
|
|
|
|
+ tabPower: ['pending', 'all'],
|
|
rowPower: [],
|
|
rowPower: [],
|
|
category: 'updateBind'
|
|
category: 'updateBind'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
msg: '换绑',
|
|
msg: '换绑',
|
|
icon: 'iconfont icon-huanbang',
|
|
icon: 'iconfont icon-huanbang',
|
|
- power: '',
|
|
|
|
- tabPower: [],
|
|
|
|
- rowPower: [],
|
|
|
|
|
|
+ power: 'changeBinding',
|
|
|
|
+ tabPower: ['pending', 'all'],
|
|
|
|
+ rowPower: ['account_risk'],
|
|
category: 'changeBind'
|
|
category: 'changeBind'
|
|
},
|
|
},
|
|
- {
|
|
|
|
- msg: '解绑',
|
|
|
|
- icon: 'iconfont icon-jiebang',
|
|
|
|
- power: '',
|
|
|
|
- tabPower: [],
|
|
|
|
- rowPower: [],
|
|
|
|
- category: 'unbind'
|
|
|
|
- },
|
|
|
|
|
|
+ // {
|
|
|
|
+ // msg: '解绑',
|
|
|
|
+ // icon: 'iconfont icon-jiebang',
|
|
|
|
+ // power: '',
|
|
|
|
+ // tabPower: [],
|
|
|
|
+ // rowPower: [],
|
|
|
|
+ // category: 'unbind'
|
|
|
|
+ // },
|
|
{
|
|
{
|
|
msg: '修正绑定状态',
|
|
msg: '修正绑定状态',
|
|
icon: 'iconfont icon-xiugai',
|
|
icon: 'iconfont icon-xiugai',
|
|
- power: '',
|
|
|
|
- tabPower: [],
|
|
|
|
|
|
+ power: 'updateAccountStatus',
|
|
|
|
+ tabPower: ['pending', 'all'],
|
|
rowPower: [],
|
|
rowPower: [],
|
|
category: 'editStatus'
|
|
category: 'editStatus'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ msg: '状态更新日志',
|
|
|
|
+ icon: 'iconfont icon-xiangqing',
|
|
|
|
+ power: 'updateStatusLog',
|
|
|
|
+ tabPower: ['all'],
|
|
|
|
+ rowPower: [],
|
|
|
|
+ category: 'statusUpdate'
|
|
}
|
|
}
|
|
]
|
|
]
|
|
const options = btnList.map(item => {
|
|
const options = btnList.map(item => {
|
|
- // this.tablePower({ item, tab: this.activeName, row }) &&
|
|
|
|
return (
|
|
return (
|
|
- <el-tooltip class='item' effect='dark' content={item.msg} placement='top'>
|
|
|
|
|
|
+ this.tablePower({ item, tab: this.activeName, row }) && <el-tooltip class='item' effect='dark' content={item.msg} placement='top'>
|
|
<span class='table-icon-box' v-power={item.power}>
|
|
<span class='table-icon-box' v-power={item.power}>
|
|
<i class={item.icon} onClick={() => { this.handlerOperate(item.category, row) }}></i>
|
|
<i class={item.icon} onClick={() => { this.handlerOperate(item.category, row) }}></i>
|
|
</span>
|
|
</span>
|
|
@@ -246,20 +268,38 @@ export default {
|
|
width: 160
|
|
width: 160
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- editRuleForm: {},
|
|
|
|
- editRules: {},
|
|
|
|
- changeRuleForm: {},
|
|
|
|
- changeRules: {}
|
|
|
|
|
|
+ editRuleForm: {
|
|
|
|
+ id: '',
|
|
|
|
+ accountStatus: ''
|
|
|
|
+ },
|
|
|
|
+ editRules: {
|
|
|
|
+ accountStatus: [{ required: true, message: '请选择账户绑定状态', trigger: 'cahnge' }],
|
|
|
|
+ triggerReason: [{ required: true, message: '请输入触发原因', trigger: 'cahnge' }]
|
|
|
|
+ },
|
|
|
|
+ changeRuleForm: {
|
|
|
|
+ id: '',
|
|
|
|
+ accountName: '',
|
|
|
|
+ accountNumber: ''
|
|
|
|
+ },
|
|
|
|
+ changeRules: {
|
|
|
|
+ accountNumber: [{ required: true, message: '请选择换绑账号', trigger: 'cahnge' }]
|
|
|
|
+ },
|
|
|
|
+ activeName: 'pending',
|
|
|
|
+ accountList: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapGetters(['constant']),
|
|
...mapGetters(['constant']),
|
|
tablePower() {
|
|
tablePower() {
|
|
return ({ item, tab, row }) => {
|
|
return ({ item, tab, row }) => {
|
|
- const { tabPower, rowPower } = item
|
|
|
|
|
|
+ const { tabPower, rowPower, category } = item
|
|
if (rowPower && rowPower.length) {
|
|
if (rowPower && rowPower.length) {
|
|
- if (tabPower.includes(tab) && rowPower.includes(row.capitalStatus)) {
|
|
|
|
- return true
|
|
|
|
|
|
+ if (category === 'changeBind') {
|
|
|
|
+ return row.accountStatus === 'account_risk'
|
|
|
|
+ } else {
|
|
|
|
+ if (tabPower.includes(tab) && rowPower.includes(row.capitalStatus)) {
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if (tabPower.includes(tab)) {
|
|
if (tabPower.includes(tab)) {
|
|
@@ -267,18 +307,60 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ editAccountStatus() {
|
|
|
|
+ return filterListData(this.constant.accountBindingStatus, ['account_empty', 'account_risk'])
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.$store.dispatch('getConstant', ['capitalStatus'])
|
|
|
|
|
|
+ this.$store.dispatch('getConstant', ['platformType', 'accountBindingStatus'])
|
|
|
|
+ this.fetchData()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ fetchData(type) {
|
|
|
|
+ this.loading = true
|
|
|
|
+ if (type === 'search') {
|
|
|
|
+ this.page = 1
|
|
|
|
+ this.size = 10
|
|
|
|
+ this.$refs.commTable.initPage()
|
|
|
|
+ }
|
|
|
|
+ const params = {
|
|
|
|
+ ...this.search,
|
|
|
|
+ page: this.page || 1,
|
|
|
|
+ rows: this.size || 10,
|
|
|
|
+ flag: this.activeName
|
|
|
|
+ }
|
|
|
|
+ getList(params).then(({ rows, records }) => {
|
|
|
|
+ this.tableData = rows
|
|
|
|
+ this.total = records
|
|
|
|
+ this.loading = false
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ handleTabClick(tab) {
|
|
|
|
+ this.activeName = tab.name
|
|
|
|
+ this.page = 1
|
|
|
|
+ this.size = 10
|
|
|
|
+ this.fetchData()
|
|
|
|
+ },
|
|
handlerOperate(type, row) {
|
|
handlerOperate(type, row) {
|
|
- if (type === 'editStatus' || type === 'changeBind') {
|
|
|
|
|
|
+ if (type === 'updateBind') {
|
|
|
|
+ this.refreshStatusClick(row.id)
|
|
|
|
+ } else if (type === 'editStatus') {
|
|
this.$refs[type].show = true
|
|
this.$refs[type].show = true
|
|
- }
|
|
|
|
- if (type === 'unbind') {
|
|
|
|
|
|
+ this.editRuleForm.id = row.id
|
|
|
|
+ } else if (type === 'changeBind') {
|
|
|
|
+ this.$refs[type].show = true
|
|
|
|
+ this.changeRuleForm.id = row.id
|
|
|
|
+ this.changeRuleForm.accountName = ''
|
|
|
|
+ this.changeRuleForm.accountNumber = ''
|
|
|
|
+ this.getAccountListData(row)
|
|
|
|
+ } else if (type === 'unbind') {
|
|
this.unBind()
|
|
this.unBind()
|
|
|
|
+ } else if (type === 'statusUpdate') {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ name: 'MonitorBindAccountRecord',
|
|
|
|
+ params: { id: row.id }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
},
|
|
},
|
|
unBind() {
|
|
unBind() {
|
|
@@ -288,7 +370,63 @@ export default {
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
|
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ refreshStatusClick(id) {
|
|
|
|
+ refreshStatus({ id }).then(() => {
|
|
|
|
+ this.$message.success('刷新成功')
|
|
|
|
+ this.fetchData()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getAccountListData(row) {
|
|
|
|
+ const { platformCode, shopId } = row
|
|
|
|
+ const params = {
|
|
|
|
+ platformCode,
|
|
|
|
+ shopId
|
|
|
|
+ }
|
|
|
|
+ getAccountList(params).then(({ data }) => {
|
|
|
|
+ this.accountList = data
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ accountNameChange(val) {
|
|
|
|
+ this.changeRuleForm.accountName = this.accountList.find(item => item.accountNumber === val).accountName
|
|
|
|
+ },
|
|
|
|
+ editSubmit() {
|
|
|
|
+ this.$refs.editRuleForm.validate((valid) => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ const params = {
|
|
|
|
+ ...this.editRuleForm
|
|
|
|
+ }
|
|
|
|
+ updateStatus(params).then(() => {
|
|
|
|
+ this.$message.success('修改成功')
|
|
|
|
+ this.$refs.editRuleForm.resetFields()
|
|
|
|
+ this.$refs.editRuleForm.clearValidate()
|
|
|
|
+ this.$refs.editRuleForm.resetFields()
|
|
|
|
+ this.$refs.editStatus.show = false
|
|
|
|
+ this.fetchData()
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ changeSubmit() {
|
|
|
|
+ this.$refs.changeRuleForm.validate((valid) => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ const params = {
|
|
|
|
+ ...this.changeRuleForm
|
|
|
|
+ }
|
|
|
|
+ changeAccount(params).then(() => {
|
|
|
|
+ this.$message.success('换绑成功')
|
|
|
|
+ this.$refs.changeRuleForm.resetFields()
|
|
|
|
+ this.$refs.changeBind.show = false
|
|
|
|
+ this.fetchData()
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|