fix(币种配置): 修复币种配置相关页面请求异步导致列表部分字段不展示的问题

This commit is contained in:
woody 2025-04-23 17:10:58 +08:00
parent 4b9a079834
commit fe1d148dcd
5 changed files with 338 additions and 308 deletions

View File

@ -48,11 +48,12 @@
:formatter="stateFormat"
prop="upperBound"
:label="`${'个税上界'}(${getUser.currency.symbol})`"
min-width="140"
/>
<el-table-column align="center" prop="ratio" :label="'个税扣除'+'(%)'" />
<el-table-column align="center" prop="kouchuType" :label="'扣除类型'" />
<el-table-column align="center" prop="effectiveDate" :label="'生效日期'" />
<el-table-column align="center" prop="creationTime" :label="'创建日期'" width="200" />
<el-table-column align="center" prop="creationTime" :label="'创建日期'" width="160" />
<el-table-column align="center" prop="time" :label="'操作'" fixed="right" width="100">
<template slot-scope="scope">
<el-button
@ -62,7 +63,7 @@
class="button-s"
@click.native.prevent="update(scope.row)"
>
{{ '修改' }}
修改
</el-button>
<el-button
type="text"
@ -71,7 +72,7 @@
class="button-s"
@click.native.prevent="deleteRow(scope.row)"
>
{{ '删除' }}
删除
</el-button>
</template>
</el-table-column>
@ -277,9 +278,11 @@ export default {
}
},
created() {
this.getWithdrawalList()
this.userCountryList()
this.getcellTypeList()
// this.userCountryList()
// this.getcellTypeList()
this.initEnum().finally(() => {
this.getWithdrawalList()
})
},
methods: {
stateFormat,
@ -289,6 +292,24 @@ export default {
this.cellTypeList = res.data
})
},
initEnum() {
return new Promise((resolve, reject) => {
Promise.allSettled([
this.userCountryList(),
this.getcellTypeList()
]).then(([countryList, cellTypeList]) => {
if (countryList.status === 'fulfilled') {
this.countryList = countryList.value.data
}
if (cellTypeList.status === 'fulfilled') {
this.cellTypeList = cellTypeList.value.data
}
resolve()
}).catch((err) => {
reject(err)
})
})
},
addList() {
this.form.withdrawalTaxDetailsList.push({
lowerBound: '',

View File

@ -438,9 +438,9 @@ export default {
...mapGetters(['getUser'])
},
mounted() {
this.getOthers()
//
this.getDataList()
this.getOthers().finally(() => {
this.getDataList()
})
},
methods: {
stateFormat,
@ -499,10 +499,6 @@ export default {
this.dialogVisible = true
},
getOthers() {
//
userCountryList().then((res) => {
this.countryList = res.data
})
//
getPubEnumsAccount().then((res) => {
this.pubEnumsAccountList = res.rows
@ -511,9 +507,21 @@ export default {
api.pkBdAccountList().then((res) => {
this.pkAccountList = res.rows
})
//
api.getCycle().then((res) => {
this.cycleList = res.data
return new Promise((resolve, reject) => {
Promise.allSettled([
userCountryList(),
api.getCycle()
]).then(([countryList, cycleList]) => {
if (countryList.status === 'fulfilled') {
this.countryList = countryList.value.data
}
if (cycleList.status === 'fulfilled') {
this.cycleList = cycleList.value.data
}
resolve()
}).catch((err) => {
reject(err)
})
})
},
getDataList() {

View File

@ -3,9 +3,9 @@
<div class="page">
<topBar
v-if="topList.length > 0"
:topList="topList"
:top-list="topList"
:moren="moren"
></topBar>
/>
<div class="main">
<div class="maintop">
<div class="mainbtn">
@ -17,48 +17,53 @@
</div>
<div class="maintable">
<el-table
:data="tableData"
v-loading="loading"
:data="tableData"
height="760px"
style="width: 100%"
:header-cell-style="{ background: '#EEEEEE' }"
:row-class-name="tableRowClassName"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column type="selection" width="55" />
<el-table-column
align="center"
prop="jxmc"
prop="pkCountry"
:label="'国家'"
width="180"
>
<template slot-scope="scope">
<div class="tem">
<img :src="scope.row.pkCountryIcon" alt="" />
<div>{{ scope.row.pkCountryName }}</div>
<template v-if="renderCountryName(scope.row.pkCountry)">
<img :src="renderCountryName(scope.row.pkCountry).icon" alt="">
<div>{{ renderCountryName(scope.row.pkCountry).name }}</div>
</template>
<template v-else>
-
</template>
</div>
</template>
</el-table-column>
<el-table-column align="center" prop="serviceTypeVal" :label="'手续费类型'">
<el-table-column align="center" prop="serviceType" label="手续费类型">
<template slot-scope="scope">
{{ renderCellType(scope.row.serviceType) }}
</template>
</el-table-column>
<el-table-column
align="center"
prop="serviceRatio"
:label="'手续费数值'"
>
</el-table-column>
/>
<el-table-column
align="center"
prop="effectiveDate"
:label="'生效日期'"
>
</el-table-column>
/>
<el-table-column
align="center"
prop="creationTime"
:label="'创建日期'"
>
</el-table-column>
/>
<el-table-column
align="center"
prop="time"
@ -67,20 +72,20 @@
>
<template slot-scope="scope">
<el-button
@click.native.prevent="update(scope.row)"
type="text"
size="small"
class="button-s"
style="color: #6962f6"
@click.native.prevent="update(scope.row)"
>
{{ '修改' }}
</el-button>
<el-button
@click.native.prevent="deleteRow(scope.row)"
type="text"
size="small"
class="button-s"
style="color: #c73030"
@click.native.prevent="deleteRow(scope.row)"
>
{{ '删除' }}
</el-button>
@ -114,23 +119,23 @@
<el-row style="display: flex; justify-content: space-between">
<el-col :span="11" style="margin-left: -10px">
<el-form-item :label="'手续费类型'" prop="serviceType">
<el-select clearable v-model="form.serviceType" placeholder="">
<el-select v-model="form.serviceType" clearable placeholder="">
<el-option
v-for="item in cellTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item :label="'手续费数值'" prop="serviceRatio">
<el-input
clearable
v-model="form.serviceRatio"
clearable
placeholder=""
></el-input>
/>
</el-form-item>
</el-col>
</el-row>
@ -142,243 +147,232 @@
type="datetime"
:placeholder="'请选择'"
value-format="yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button class="cancels" @click="handleClose">
{{ '取消' }}</el-button
>
{{ '取消' }}</el-button>
<el-button
class="submit"
style="margin-left: 40px"
type="primary"
@click="onSubmit('form')"
>{{ '确定' }}</el-button
>
>{{ '确定' }}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import topBar from "@/components/topBar";
import { userCountryList } from "@/api/user";
import { getcellTypeList } from "@/api/bonus";
<script>
import topBar from '@/components/topBar'
import { userCountryList } from '@/api/user'
import { getcellTypeList } from '@/api/bonus'
import {
getWithdrawalProcessList,
deleteWithdrawalProcess,
saveWithdrawalProcess,
updateWithdrawalProcess,
getOneWithdrawalProcessList,
} from "@/api/configManage";
getOneWithdrawalProcessList
} from '@/api/configManage'
export default {
name: "Txsxf",
name: 'Txsxf',
components: {
topBar,
topBar
},
filters: {
isAgree(val) {
if (!val) {
return '允许';
return '允许'
} else {
return '禁止';
return '禁止'
}
},
}
},
data() {
return {
moren: "txsxf",
moren: 'txsxf',
topList: [
{
name: '币种配置',
path: "bzpz",
path: 'bzpz'
},
{
name: '消费配置',
path: "xfpz",
path: 'xfpz'
},
{
name: '转账配置',
path: "zzpz",
path: 'zzpz'
},
{
name: '提现配置',
path: "txpz",
path: 'txpz'
},
{
name: '提现个税',
path: "txgs",
path: 'txgs'
},
{
name: '提现手续费',
path: "txsxf",
path: 'txsxf'
},
{
name: '特殊消费',
path: "specialMoney",
},
path: 'specialMoney'
}
],
countryList: [], //
countryList: [], //
tableData: [],
loading:false,
loading: false,
total: 0,
queryParams: {
pageNum: 1,
pageSize: 50,
pageSize: 50
},
cellTypeList: [], //
cellTypeList: [], //
updateShow: false,
addOrEdit: "", // true false
updateTitle: "",
addOrEdit: '', // true false
updateTitle: '',
form: {
serviceType: "", //
serviceRatio: "", //
effectiveDate: "", //
serviceType: '', //
serviceRatio: '', //
effectiveDate: '' //
},
rules: {
serviceRatio: [
{ required: true, message: "请输入手续费值", trigger: "blur" },
{ required: true, message: '请输入手续费值', trigger: 'blur' }
],
serviceType: [
{ required: true, message: '请选择', trigger: "change" },
{ required: true, message: '请选择', trigger: 'change' }
],
effectiveDate: [
{ required: true, message: '请选择生效时间', trigger: "change" },
],
},
};
{ required: true, message: '请选择生效时间', trigger: 'change' }
]
}
}
},
created() {
this.getWithdrawalProcessList();
this.userCountryList();
this.getcellTypeList();
this.getWithdrawalProcessList()
this.userCountryList()
this.getcellTypeList()
},
methods: {
//
//
getcellTypeList() {
getcellTypeList().then((res) => {
this.cellTypeList = res.data;
});
this.cellTypeList = res.data
})
},
renderCellType(serviceType) {
return this.cellTypeList.find((item) => item.value === serviceType)?.label
},
renderCountryName(country) {
const countryInfo = this.countryList.find((item) => item.pkCountry === country)
return countryInfo ? {
name: countryInfo.name,
icon: countryInfo.nationalFlag2
} : null
},
handleClose() {
this.updateShow = false;
this.$refs["form"].clearValidate();
this.$refs["form"].resetFields();
this.updateShow = false
this.$refs['form'].clearValidate()
this.$refs['form'].resetFields()
},
//
//
onSubmit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
let url = "";
let url = ''
if (this.addOrEdit == true) {
url = saveWithdrawalProcess;
url = saveWithdrawalProcess
} else {
url = updateWithdrawalProcess;
url = updateWithdrawalProcess
}
url(this.form).then((res) => {
if (res.code == 200) {
this.updateShow = false;
this.updateShow = false
this.$message({
message: res.msg,
type: "success",
});
this.getWithdrawalProcessList();
type: 'success'
})
this.getWithdrawalProcessList()
} else {
this.$message({
message: res.msg,
type: "warning",
});
type: 'warning'
})
}
});
})
}
});
})
},
//
//
getWithdrawalProcessList() {
this.loading = true
getWithdrawalProcessList(this.queryParams).then((res) => {
res.rows.forEach((element) => {
this.countryList.forEach((child) => {
if (element.pkCountry == child.pkCountry) {
element.pkCountryName = child.name;
element.pkCountryIcon = child.nationalFlag2;
}
});
this.cellTypeList.forEach((child2) => {
if (element.serviceType == child2.value) {
element.sxfType = child2.label;
}
});
});
this.tableData = res.rows;
this.total = res.total;
this.tableData = res.rows
this.total = res.total
this.loading = false
});
})
},
//
//
adddate() {
this.updateShow = true;
this.updateTitle = '添加';
this.addOrEdit = true;
this.updateShow = true
this.updateTitle = '添加'
this.addOrEdit = true
if (this.$refs.form) {
this.form.pkId = null;
this.$refs.form.clearValidate();
this.$refs.form.resetFields();
this.form.pkId = null
this.$refs.form.clearValidate()
this.$refs.form.resetFields()
}
},
//
//
userCountryList() {
userCountryList().then((res) => {
this.countryList = res.data;
});
this.countryList = res.data
})
},
//
//
update(row) {
this.updateTitle = '修改';
this.addOrEdit = false;
this.updateShow = true;
this.updateTitle = '修改'
this.addOrEdit = false
this.updateShow = true
getOneWithdrawalProcessList(row.pkId).then((res) => {
this.form = res.data;
});
this.form = res.data
})
},
//
//
deleteRow(row) {
this.$confirm('确定删除?').then((_) => {
deleteWithdrawalProcess(row.pkId).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
this.getWithdrawalProcessList();
type: 'success'
})
this.getWithdrawalProcessList()
}
});
});
},
handleClose() {
this.updateShow = false;
this.$refs["form"].clearValidate();
this.$refs["form"].resetFields();
})
})
},
handleSelectionChange(val) {
this.multipleSelection = val;
this.multipleSelection = val
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
return "warning-row";
return 'warning-row'
} else if (rowIndex % 2 == 0) {
return "success-row";
return 'success-row'
}
return "";
},
},
};
return ''
}
}
}
</script>
<style lang="scss" scoped>

View File

@ -8,13 +8,13 @@
<div class="page">
<topBar
v-if="topList.length > 0"
:topList="topList"
:top-list="topList"
:moren="moren"
></topBar>
/>
<div class="main">
<div class="maintop">
<div class="mainbtn">
<el-button size="mini" @click="openDig" class="thebtn1">{{
<el-button size="mini" class="thebtn1" @click="openDig">{{
'添加'
}}</el-button>
<el-button size="mini" class="thebtn2"> {{ '导出' }}</el-button>
@ -22,25 +22,34 @@
</div>
<div class="maintable">
<el-table
v-loading="loading"
:data="tableData"
height="760px"
v-loading="loading"
style="width: 100%"
:header-cell-style="{ background: '#EEEEEE' }"
:row-class-name="tableRowClassName"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column type="selection" width="55" />
<el-table-column
align="center"
prop="specialAreaName"
:label="'所属专区'"
prop="specialArea"
label="所属专区"
width="140px"
>
<template slot-scope="scope">
<span v-if="scope.row.specialArea">
{{ renderArea(scope.row.specialArea) }}
</span>
<span v-else>--</span>
</template>
</el-table-column>
<el-table-column
align="center"
prop="sort"
:label="'扣款顺序/比例(%)'"
label="扣款顺序/比例(%)"
width="auto"
show-overflow-tooltip
>
<template slot-scope="scope">
<span
@ -55,39 +64,40 @@
<el-table-column
align="center"
prop="effectiveDate"
:label="'生效日期'"
>
</el-table-column>
label="生效日期"
width="160px"
/>
<el-table-column
align="center"
prop="creationTime"
:label="'创建日期'"
>
</el-table-column>
label="创建日期"
width="160px"
/>
<el-table-column
align="center"
prop="time"
:label="'操作'"
label="操作"
fixed="right"
width="100px"
>
<template slot-scope="scope">
<el-button
@click="toFixed(scope.row.pkId)"
class="button-s"
type="text"
size="small"
style="color: rgb(105, 98, 246)"
@click="toFixed(scope.row.pkId)"
>
{{ '修改' }}
修改
</el-button>
<el-button
@click="handleDelete(scope.row.pkId)"
type="text"
class="button-s"
size="small"
style="color: #c73030"
@click="handleDelete(scope.row.pkId)"
>
{{ '删除' }}
删除
</el-button>
</template>
</el-table-column>
@ -112,14 +122,14 @@
<el-form ref="form" :rules="rules" :model="form" label-width="auto">
<el-row>
<el-col :span="14">
<el-form-item :label="'所属专区'" prop="specialArea">
<el-select clearable v-model="form.specialArea">
<el-form-item label="所属专区" prop="specialArea">
<el-select v-model="form.specialArea" clearable>
<el-option
v-for="item in areaList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
/>
</el-select>
</el-form-item>
</el-col>
@ -131,13 +141,13 @@
:prop="`detailsList.${index}.pkAccount`"
:rules="rules.pkAccount"
>
<el-select clearable v-model="item.pkAccount">
<el-select v-model="item.pkAccount" clearable>
<el-option
v-for="item in bdAccountList"
:key="item.pkId"
:label="item.accountName"
:value="item.pkId"
></el-option>
/>
</el-select>
</el-form-item>
</el-col>
@ -153,8 +163,8 @@
placeholder="请输入扣款比例"
></el-input> -->
<el-input-number
:disabled="item.deductMaxRatio != 0"
v-model="item.deductRatio"
:disabled="item.deductMaxRatio != 0"
:max="100"
:min="0"
:controls="false"
@ -168,8 +178,8 @@
:rules="rules.deductMaxRatio"
>
<el-input-number
:disabled="item.deductRatio != 0"
v-model="item.deductMaxRatio"
:disabled="item.deductRatio != 0"
:max="100"
:min="0"
:controls="false"
@ -179,82 +189,78 @@
<el-col :span="3">
<div class="middle">
<div
@click="delKou(index)"
class="del"
v-if="form.detailsList.length > 1"
class="del"
@click="delKou(index)"
>
{{ '删除' }}
删除
</div>
<div v-if="form.detailsList.length == index + 1" @click="addKou">
<i class="el-icon-circle-plus"></i>
<i class="el-icon-circle-plus" />
</div>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="14">
<el-form-item :label="'生效日期'" prop="effectiveDate">
<el-form-item label="生效日期" prop="effectiveDate">
<el-date-picker
v-model="form.effectiveDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
:placeholder="'请选择'"
>
</el-date-picker>
placeholder="请选择"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button class="cancels" @click="handleClose">{{
'取消'
}}</el-button>
<el-button class="cancels" @click="handleClose">取消</el-button>
<el-button
class="submit"
style="margin-left: 40px"
@click="onSubmit('form')"
>{{ '确认' }}</el-button
>
>确认</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import topBar from "@/components/topBar";
import * as api from "@/api/configManage.js";
import { areaCurrencySave, areaCurrencyUpdate } from "@/api/configManage.js";
import { userCountryList } from "@/api/user";
import { getToken } from "@/utils/auth";
import topBar from '@/components/topBar'
import * as api from '@/api/configManage.js'
import { areaCurrencySave, areaCurrencyUpdate } from '@/api/configManage.js'
import { userCountryList } from '@/api/user'
import { getToken } from '@/utils/auth'
export default {
name: "Bzpz",
name: 'Bzpz',
components: {
topBar,
topBar
},
filters: {
isAgree(val) {
if (!val) {
return '允许';
return '允许'
} else {
return '禁止';
return '禁止'
}
},
}
},
data() {
return {
//
queryParams: {
pageNum: 1,
pageSize: 50,
pageSize: 50
},
total: 0,
showImg: true, //
showImg: true, //
noneUploadImg: false, //
openImg: false,
openImgUrl: "",
uploadImgUrl: process.env.VUE_APP_BASE_API + "/system/upload",
openImgUrl: '',
uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload',
headers: {
Authorization: getToken(),
Authorization: getToken()
},
dialogVisible: false,
tableData: [],
@ -263,221 +269,217 @@ export default {
agreeList: [
{
text: '允许',
val: 0,
val: 0
},
{
text: '禁止',
val: 1,
},
val: 1
}
],
moren: "xfpz",
moren: 'xfpz',
topList: [
{
name: '币种配置',
path: "bzpz",
path: 'bzpz'
},
{
name: "消费配置",
path: "xfpz",
name: '消费配置',
path: 'xfpz'
},
{
name: "转账配置",
path: "zzpz",
name: '转账配置',
path: 'zzpz'
},
{
name: '提现配置',
path: "txpz",
path: 'txpz'
},
{
name: "提现个税",
path: "txgs",
name: '提现个税',
path: 'txgs'
},
{
name: "提现手续费",
path: "txsxf",
name: '提现手续费',
path: 'txsxf'
},
{
name: '特殊消费',
path: "specialMoney",
},
path: 'specialMoney'
}
],
form: {
specialArea: "",
specialArea: '',
detailsList: [
{
pkAccount: "",
deductRatio: "",
deductMaxRatio: 0,
},
],
pkAccount: '',
deductRatio: '',
deductMaxRatio: 0
}
]
},
rules: {
deductRatio: [
{ required: true, message: "请输入扣款比例", trigger: "blur" },
{ required: true, message: '请输入扣款比例', trigger: 'blur' }
],
deductMaxRatio: [
{ required: true, message: "请输入扣款最大比例", trigger: "blur" },
{ required: true, message: '请输入扣款最大比例', trigger: 'blur' }
],
specialArea: [
{ required: true, message: "请选择所属专区", trigger: "change" },
{ required: true, message: '请选择所属专区', trigger: 'change' }
],
pkAccount: [
{ required: true, message: "请选择扣款顺序", trigger: "change" },
{ required: true, message: '请选择扣款顺序', trigger: 'change' }
],
effectiveDate: [
{ required: true, message: '请选择生效时间', trigger: "change" },
],
{ required: true, message: '请选择生效时间', trigger: 'change' }
]
},
areaList: [],
bdAccountList: [],
addOrEdit: true,
dialogTitle: "",
};
dialogTitle: ''
}
},
mounted() {
// userCountryList
this.getCountry();
this.getCountry()
//
this.getDataList();
this.getDataList()
//
this.getArea();
this.getArea()
//
this.getpkBdAccountList();
this.getpkBdAccountList()
},
methods: {
//
delKou(index) {
this.form.detailsList.splice(index, 1);
this.form.detailsList.splice(index, 1)
},
//
addKou() {
this.form.detailsList.push({
pkAccount: "",
deductRatio: "",
deductMaxRatio: 0,
});
pkAccount: '',
deductRatio: '',
deductMaxRatio: 0
})
},
//
toFixed(id) {
this.dialogTitle = '修改';
this.addOrEdit = false;
this.dialogVisible = true;
this.dialogTitle = '修改'
this.addOrEdit = false
this.dialogVisible = true
api.getAreaCurrency(id).then((res) => {
res.data.detailsList.forEach(item=>{
if(item.deductMaxRatio == undefined){
res.data.detailsList.forEach(item => {
if (item.deductMaxRatio == undefined) {
item.deductMaxRatio = 0
}
})
this.form = res.data;
});
this.form = res.data
})
},
//
getpkBdAccountList() {
api.pkBdAccountList().then((res) => {
this.bdAccountList = res.rows;
});
this.bdAccountList = res.rows
})
},
//
getArea() {
api.specialAreaConsume().then((res) => {
this.areaList = res.data;
});
this.areaList = res.data
})
},
renderArea(areaId) {
return this.areaList.find(item => item.value === areaId)?.label || '--'
},
resetData() {
this.form = {
specialArea: "",
specialArea: '',
detailsList: [
{
pkAccount: "",
deductRatio: "",
deductMaxRatio: 0,
},
],
};
pkAccount: '',
deductRatio: '',
deductMaxRatio: 0
}
]
}
},
onSubmit(formName) {
this.form.detailsList.forEach((item, index) => {
item.deductSort = index + 1;
});
item.deductSort = index + 1
})
this.$refs[formName].validate((valid) => {
if (valid) {
let url = "";
let url = ''
if (this.addOrEdit == true) {
url = areaCurrencySave;
url = areaCurrencySave
} else {
url = areaCurrencyUpdate;
url = areaCurrencyUpdate
}
url(this.form).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
this.dialogVisible = false;
type: 'success'
})
this.dialogVisible = false
//
// this.$refs[formName].resetFields()
this.resetData();
this.resetData()
//
this.getDataList();
this.getDataList()
}
});
})
} else {
return false;
return false
}
});
})
},
handleClose() {
this.dialogVisible = false;
this.resetData();
this.dialogVisible = false
this.resetData()
},
openDig() {
this.dialogTitle = '添加';
this.dialogVisible = true;
this.addOrEdit = true;
this.dialogTitle = '添加'
this.dialogVisible = true
this.addOrEdit = true
this.$nextTick(() => {
this.$refs["form"].clearValidate();
});
this.$refs['form'].clearValidate()
})
},
getCountry() {
userCountryList().then((res) => {
this.countryList = res.data;
});
this.countryList = res.data
})
},
getDataList() {
this.loading = true;
this.loading = true
api.areaCurrencyList().then((res) => {
res.rows.forEach((item) => {
this.areaList.forEach((child) => {
if (item.specialArea == child.value) {
item.specialAreaName = child.label;
}
});
});
this.tableData = res.rows;
this.total = res.total;
this.loading = false;
});
this.tableData = res.rows
this.total = res.total
this.loading = false
})
},
handleSelectionChange(val) {
this.multipleSelection = val;
this.multipleSelection = val
},
//
handleDelete(id) {
api.delAreaCurrency(id).then((res) => {
//
this.getDataList();
});
this.getDataList()
})
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
return "warning-row";
return 'warning-row'
} else if (rowIndex % 2 == 0) {
return "success-row";
return 'success-row'
}
return "";
},
},
};
return ''
}
}
}
</script>
<style scoped lang="scss">

View File

@ -373,9 +373,9 @@ export default {
}
},
mounted() {
this.getTransferList()
this.userCountryList()
// this.getcellTypeList();
this.userCountryList().finally(() => {
this.getTransferList()
})
},
methods: {
stateFormat,
@ -453,8 +453,13 @@ export default {
},
//
userCountryList() {
userCountryList().then((res) => {
this.countryList = res.data
return new Promise((resolve, reject) => {
userCountryList().then((res) => {
this.countryList = res.data
resolve(res.data)
}).catch((err) => {
reject(err)
})
})
},
//