Merge branch 'dev' of 47.94.45.65:angelo/web-zk-admin into test

This commit is contained in:
woody 2025-10-10 09:54:07 +08:00
commit 0142f9a70f
1 changed files with 139 additions and 144 deletions

View File

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