feat(txgs): 移除无用列
This commit is contained in:
parent
304056eb48
commit
2baec9edf0
|
@ -3,87 +3,75 @@
|
|||
<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" class="thebtn1" @click="adddate()"
|
||||
>{{'添加'}}</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
class="thebtn1"
|
||||
@click="adddate()"
|
||||
>{{ '添加' }}</el-button>
|
||||
<el-button size="mini" class="thebtn2"> {{ '导出' }}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="maintable">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
height="750px"
|
||||
:data="tableData"
|
||||
v-loading="loading"
|
||||
style="width: 100%"
|
||||
:header-cell-style="{ background: '#eee' }"
|
||||
: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" :label="'国家'" width="180">
|
||||
<template slot-scope="scope">
|
||||
<div class="tem">
|
||||
<img :src="scope.row.pkCountryIcon" alt="" />
|
||||
<img :src="scope.row.pkCountryIcon" alt="">
|
||||
<div>{{ scope.row.pkCountryName }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="taxCycle" :label="'提现周期/月'">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="lowerBoundUsa" :label="'个税下界'+'($)'"
|
||||
:formatter="stateFormat">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" prop="upperBoundUsa" :label="'个税上界'+'($)'"
|
||||
:formatter="stateFormat">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="taxCycle" :label="'提现周期/月'" />
|
||||
<el-table-column
|
||||
align="center"
|
||||
:formatter="stateFormat"
|
||||
prop="lowerBound"
|
||||
:label="`${'个税下界'}(${getUser.currency.symbol})`"
|
||||
>
|
||||
</el-table-column>
|
||||
/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
:formatter="stateFormat"
|
||||
prop="upperBound"
|
||||
:label="`${'个税上界'}(${getUser.currency.symbol})`"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="ratio" :label="'个税扣除'+'(%)'">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="kouchuType" :label="'扣除类型'">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="effectiveDate" :label="'生效日期'">
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="creationTime" :label="'创建日期'" width="200">
|
||||
</el-table-column>
|
||||
/>
|
||||
<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="time" :label="'操作'" fixed="right" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@click.native.prevent="update(scope.row)"
|
||||
type="text"
|
||||
size="small"
|
||||
style="color: #6962F6"
|
||||
class="button-s"
|
||||
@click.native.prevent="update(scope.row)"
|
||||
>
|
||||
{{'修改'}}
|
||||
{{ '修改' }}
|
||||
</el-button>
|
||||
<el-button
|
||||
@click.native.prevent="deleteRow(scope.row)"
|
||||
type="text"
|
||||
size="small"
|
||||
style="color: #c73030"
|
||||
class="button-s"
|
||||
@click.native.prevent="deleteRow(scope.row)"
|
||||
>
|
||||
{{'删除'}}
|
||||
{{ '删除' }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -108,21 +96,22 @@
|
|||
<el-row style="padding-bottom: 20px">
|
||||
<el-col :span="7">
|
||||
<el-form-item label="提现周期(月)" prop="taxCycle">
|
||||
<el-input clearable
|
||||
<el-input
|
||||
v-model="form.taxCycle"
|
||||
clearable
|
||||
placeholder="请输入提现周期(月)"
|
||||
></el-input>
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7" style="margin-left: 45px">
|
||||
<el-form-item :label="'扣除类型'" prop="serviceType">
|
||||
<el-select clearable v-model="form.serviceType">
|
||||
<el-select v-model="form.serviceType" clearable>
|
||||
<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>
|
||||
|
@ -133,34 +122,36 @@
|
|||
type="datetime"
|
||||
:placeholder="'请选择'"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
>
|
||||
</el-date-picker>
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-for="(item, i) in form.withdrawalTaxDetailsList" :key="i">
|
||||
<el-col :span="7">
|
||||
<el-form-item :label="`个税下界(${getUser.currency.symbol})`" prop="lowerBound">
|
||||
<el-input clearable
|
||||
<el-input
|
||||
v-model="form.withdrawalTaxDetailsList[i].lowerBound"
|
||||
clearable
|
||||
:placeholder="`请输入个税下界(${getUser.currency.symbol})`"
|
||||
></el-input>
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7" style="margin-left: 45px">
|
||||
<el-form-item :label="`个税上界(${getUser.currency.symbol})`" prop="upperBound">
|
||||
<el-input clearable
|
||||
<el-input
|
||||
v-model="form.withdrawalTaxDetailsList[i].upperBound"
|
||||
clearable
|
||||
:placeholder="`请输入个税上界(${getUser.currency.symbol})`"
|
||||
></el-input>
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7" style="margin-left: 25px">
|
||||
<el-form-item label="个税扣除(%)" prop="ratio">
|
||||
<el-input clearable
|
||||
<el-input
|
||||
v-model="form.withdrawalTaxDetailsList[i].ratio"
|
||||
clearable
|
||||
placeholder="请输入个税扣除(%)"
|
||||
></el-input>
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -170,173 +161,173 @@
|
|||
circle
|
||||
icon="el-icon-plus"
|
||||
@click="addList()"
|
||||
></el-button>
|
||||
/>
|
||||
<el-button
|
||||
circle
|
||||
icon="el-icon-minus"
|
||||
@click="subList()"
|
||||
></el-button>
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button class="cancels" @click="handleClose">{{'取消'}}</el-button>
|
||||
<el-button style="margin-left: 40px" class="submit" @click="onSubmit('form')">{{'确认'}}</el-button>
|
||||
<el-button class="cancels" @click="handleClose">{{ '取消' }}</el-button>
|
||||
<el-button style="margin-left: 40px" class="submit" @click="onSubmit('form')">{{ '确认' }}</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 { mapGetters } from 'vuex'
|
||||
import {
|
||||
getWithdrawalList,
|
||||
deleteWithdrawal,
|
||||
saveWithdrawal,
|
||||
getOneWithdrawalList,
|
||||
} from "@/api/configManage";
|
||||
import {stateFormat} from "@/utils/numberToCurrency";
|
||||
getOneWithdrawalList
|
||||
} from '@/api/configManage'
|
||||
import { stateFormat } from '@/utils/numberToCurrency'
|
||||
export default {
|
||||
name: "Txgs",
|
||||
name: 'Txgs',
|
||||
components: {
|
||||
topBar,
|
||||
topBar
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['getUser']),
|
||||
...mapGetters(['getUser'])
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
moren: "txgs",
|
||||
moren: 'txgs',
|
||||
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
|
||||
},
|
||||
ceshiList: [
|
||||
{
|
||||
value: 1,
|
||||
label: "1月",
|
||||
label: '1月'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: "2月",
|
||||
},
|
||||
label: '2月'
|
||||
}
|
||||
],
|
||||
cellTypeList: [], //扣除类型
|
||||
cellTypeList: [], // 扣除类型
|
||||
updateShow: false,
|
||||
addOrEdit: "", //添加还是修改 true添加 false修改
|
||||
updateTitle: "",
|
||||
addOrEdit: '', // 添加还是修改 true添加 false修改
|
||||
updateTitle: '',
|
||||
form: {
|
||||
serviceType: "", //手续费类型
|
||||
taxCycle: "", //提现周期/月
|
||||
effectiveDate: "", //生效时间
|
||||
serviceType: '', // 手续费类型
|
||||
taxCycle: '', // 提现周期/月
|
||||
effectiveDate: '', // 生效时间
|
||||
withdrawalTaxDetailsList: [
|
||||
{
|
||||
lowerBound: "", //个税下界(¥)
|
||||
ratio: "", //个税上界(¥)
|
||||
upperBound: "", //个税扣除(%)}
|
||||
},
|
||||
],
|
||||
lowerBound: '', // 个税下界(¥)
|
||||
ratio: '', // 个税上界(¥)
|
||||
upperBound: '' // 个税扣除(%)}
|
||||
}
|
||||
]
|
||||
},
|
||||
rules: {
|
||||
taxCycle: [
|
||||
{ required: true,pattern:/^(1[0-2]|[1-9])$/, message: "请输入1-12月正整数", trigger: "blur" },
|
||||
{ required: true, pattern: /^(1[0-2]|[1-9])$/, message: '请输入1-12月正整数', trigger: 'blur' }
|
||||
],
|
||||
serviceType: [{ required: true, message: '请选择', trigger: "change" }],
|
||||
serviceType: [{ required: true, message: '请选择', trigger: 'change' }],
|
||||
effectiveDate: [
|
||||
{ required: true, message: '请选择生效时间', trigger: "change" },
|
||||
],
|
||||
},
|
||||
};
|
||||
{ required: true, message: '请选择生效时间', trigger: 'change' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getWithdrawalList();
|
||||
this.userCountryList();
|
||||
this.getcellTypeList();
|
||||
this.getWithdrawalList()
|
||||
this.userCountryList()
|
||||
this.getcellTypeList()
|
||||
},
|
||||
methods: {
|
||||
stateFormat,
|
||||
//计算类型枚举值
|
||||
// 计算类型枚举值
|
||||
getcellTypeList() {
|
||||
getcellTypeList().then((res) => {
|
||||
this.cellTypeList = res.data;
|
||||
});
|
||||
this.cellTypeList = res.data
|
||||
})
|
||||
},
|
||||
addList() {
|
||||
this.form.withdrawalTaxDetailsList.push({
|
||||
lowerBound: "",
|
||||
ratio: "",
|
||||
upperBound: "",
|
||||
});
|
||||
lowerBound: '',
|
||||
ratio: '',
|
||||
upperBound: ''
|
||||
})
|
||||
},
|
||||
subList() {
|
||||
this.form.withdrawalTaxDetailsList.pop();
|
||||
this.form.withdrawalTaxDetailsList.pop()
|
||||
},
|
||||
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) {
|
||||
saveWithdrawal(this.form).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.updateShow = false;
|
||||
this.updateShow = false
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: "success",
|
||||
});
|
||||
this.getWithdrawalList();
|
||||
type: 'success'
|
||||
})
|
||||
this.getWithdrawalList()
|
||||
} else {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: "warning",
|
||||
});
|
||||
type: 'warning'
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
//获取提现个税配置列表
|
||||
// 获取提现个税配置列表
|
||||
getWithdrawalList() {
|
||||
this.loading = true
|
||||
|
||||
|
@ -344,87 +335,87 @@ export default {
|
|||
res.rows.forEach((element) => {
|
||||
this.countryList.forEach((child) => {
|
||||
if (element.pkCountry == child.pkCountry) {
|
||||
element.pkCountryName = child.name;
|
||||
element.pkCountryIcon = child.nationalFlag2;
|
||||
element.pkCountryName = child.name
|
||||
element.pkCountryIcon = child.nationalFlag2
|
||||
}
|
||||
});
|
||||
this.cellTypeList.forEach((child2)=>{
|
||||
if(element.serviceType==child2.value){
|
||||
})
|
||||
this.cellTypeList.forEach((child2) => {
|
||||
if (element.serviceType == child2.value) {
|
||||
element.kouchuType = 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.$refs.form.clearValidate();
|
||||
this.$refs.form.resetFields();
|
||||
this.form.pkId=null
|
||||
this.$refs.form.clearValidate()
|
||||
this.$refs.form.resetFields()
|
||||
this.form.pkId = null
|
||||
this.form.withdrawalTaxDetailsList = [
|
||||
{
|
||||
lowerBound: "",
|
||||
ratio: "",
|
||||
upperBound: "",
|
||||
},
|
||||
];
|
||||
lowerBound: '',
|
||||
ratio: '',
|
||||
upperBound: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
//获取国家
|
||||
// 获取国家
|
||||
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
|
||||
getOneWithdrawalList(row.pkId).then((res) => {
|
||||
this.form = res.data;
|
||||
});
|
||||
this.form = res.data
|
||||
})
|
||||
},
|
||||
//删除
|
||||
// 删除
|
||||
deleteRow(row) {
|
||||
this.$confirm('确定删除?').then((_) => {
|
||||
deleteWithdrawal(row.pkId).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: "success",
|
||||
});
|
||||
this.getWithdrawalList();
|
||||
type: 'success'
|
||||
})
|
||||
this.getWithdrawalList()
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
})
|
||||
},
|
||||
handleClose() {
|
||||
this.updateShow = false;
|
||||
this.$refs["form"].clearValidate();
|
||||
this.$refs["form"].resetFields();
|
||||
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>
|
||||
|
|
|
@ -44,11 +44,11 @@ module.exports = {
|
|||
},
|
||||
proxy: {
|
||||
'/prod-api': {
|
||||
target: 'http://localhost:8080/',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/prod-api': ''
|
||||
}
|
||||
target: 'http://t-mana.beida413.com/',
|
||||
changeOrigin: true
|
||||
// pathRewrite: {
|
||||
// '^/prod-api': ''
|
||||
// }
|
||||
}
|
||||
}
|
||||
// before: require('./mock/mock-server.js')
|
||||
|
|
Loading…
Reference in New Issue