fix(币种配置): 修复币种配置相关页面请求异步导致列表部分字段不展示的问题
This commit is contained in:
parent
4b9a079834
commit
fe1d148dcd
|
@ -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: '',
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 修改
|
||||
|
|
Loading…
Reference in New Issue