更新,扣减代理商余额
This commit is contained in:
parent
ef660f1149
commit
b845da2be8
|
@ -99,3 +99,11 @@ export function getIncomeList(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 增减运营商余额
|
||||||
|
export function changeBalance(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/dept/changeBalance',
|
||||||
|
method: 'put',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AMapLoader from "@amap/amap-jsapi-loader";
|
import AMapLoader from "@amap/amap-jsapi-loader";
|
||||||
|
import globalConfig from "@/utils/config/globalConfig";
|
||||||
var polyEditor = "";
|
var polyEditor = "";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -32,7 +33,7 @@
|
||||||
console.log("接收参数", this.pathList);
|
console.log("接收参数", this.pathList);
|
||||||
// console.log(typeof JSON.parse(this.pathList));
|
// console.log(typeof JSON.parse(this.pathList));
|
||||||
await AMapLoader.load({
|
await AMapLoader.load({
|
||||||
key: "9a48843dd0ab33ca198ee67930cb124d", // 申请好的Web端开发者Key,首次调用 load 时必填
|
key: globalConfig.aMap.key, // 申请好的Web端开发者Key,首次调用 load 时必填
|
||||||
version: "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
version: "2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
||||||
plugins: [
|
plugins: [
|
||||||
"AMap.ToolBar",
|
"AMap.ToolBar",
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
export default {
|
export default {
|
||||||
/**
|
/**
|
||||||
* 高德地图配置 浅蓝
|
* 高德地图配置
|
||||||
*/
|
*/
|
||||||
aMap: {
|
aMap: {
|
||||||
key: '11da89fddf9340d0a69d4fff53c0ec4b',
|
key: 'cc70402d7ec5ab19cb5c3d88b92a0b7b',
|
||||||
secret: '32dca5ef246f3b96234cd8ef891e4d59'
|
secret: '5c5bfb20421c5869760661e95a39b1d0'
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 正常:blue,
|
* 正常:blue,
|
||||||
|
|
97
src/views/system/dept/components/DeptBalanceDialog.vue
Normal file
97
src/views/system/dept/components/DeptBalanceDialog.vue
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog :visible.sync="dialogVisible" title="增减余额" width="400px" @open="onOpen">
|
||||||
|
<el-form :model="form" label-width="6em" :rules="rules" ref="formRef">
|
||||||
|
<el-form-item label="变动金额" prop="amount">
|
||||||
|
<el-input-number v-model="form.amount" style="width: calc(100% - 2em)"/> 元
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="关联订单" prop="reason">
|
||||||
|
<el-input v-model="form.reason" placeholder="请输入关联订单号"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="handleSubmit" :loading="loading">确定</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { changeBalance } from '@/api/system/dept'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'DeptBalanceDialog',
|
||||||
|
props: {
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
deptId: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
form: {
|
||||||
|
deptId: null,
|
||||||
|
amount: null,
|
||||||
|
reason: null,
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
amount: [
|
||||||
|
{ required: true, message: '请输入变动金额', trigger: 'blur' },
|
||||||
|
],
|
||||||
|
reason: [
|
||||||
|
{ required: true, message: '请输入关联订单号', trigger: 'blur' },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
dialogVisible: {
|
||||||
|
get() {
|
||||||
|
return this.visible
|
||||||
|
},
|
||||||
|
set(val) {
|
||||||
|
this.$emit('update:visible', val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onOpen() {
|
||||||
|
this.reset()
|
||||||
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
this.$refs.formRef.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.form.deptId = this.deptId
|
||||||
|
this.loading = true
|
||||||
|
changeBalance(this.form).then(res => {
|
||||||
|
this.$message.success('操作成功')
|
||||||
|
this.dialogVisible = false
|
||||||
|
this.$emit('refresh')
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.dialogVisible = false
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
deptId: null,
|
||||||
|
amount: null,
|
||||||
|
reason: null,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
|
@ -8,12 +8,20 @@
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<span>代理商详情</span>
|
<span>代理商详情</span>
|
||||||
|
<div>
|
||||||
<el-button
|
<el-button
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-setting"
|
icon="el-icon-setting"
|
||||||
@click="showConfigDialog = true">
|
@click="showConfigDialog = true">
|
||||||
代理商配置
|
代理商配置
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
@click="showBalanceLog = true">
|
||||||
|
增减余额
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -36,7 +44,7 @@
|
||||||
<dict-tag :options="dict.type.sys_yes_no" :value="detail.separateAccount" />
|
<dict-tag :options="dict.type.sys_yes_no" :value="detail.separateAccount" />
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="余额">
|
<el-descriptions-item label="余额">
|
||||||
{{ deptInfo.balance }} 元
|
{{ detail.balance }} 元
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="服务费">
|
<el-descriptions-item label="服务费">
|
||||||
{{ detail.platformServiceFee }}%
|
{{ detail.platformServiceFee }}%
|
||||||
|
@ -169,29 +177,35 @@
|
||||||
:dept-id="detail.deptId"
|
:dept-id="detail.deptId"
|
||||||
v-if="detail.deptId"
|
v-if="detail.deptId"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- 增减余额对话框 -->
|
||||||
|
<dept-balance-dialog
|
||||||
|
:visible.sync="showBalanceLog"
|
||||||
|
:dept-id="detail.deptId"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getDept, getDeptInfo } from '@/api/system/dept'
|
import { getDept, getDeptInfo } from '@/api/system/dept'
|
||||||
import UserRechargeReport from '@/views/system/dept/components/userRechargeReport.vue'
|
import Area from "@/views/system/area/index"
|
||||||
import UserConfigDialog from '@/views/system/dept/components/UserConfigDialog.vue'
|
import audit from "@/views/system/audit/index"
|
||||||
import Area from "@/views/system/area/index"
|
import DeptBalanceDialog from '@/views/system/dept/components/DeptBalanceDialog.vue'
|
||||||
import Fees from "@/views/system/fee/index"
|
import UserConfigDialog from '@/views/system/dept/components/UserConfigDialog.vue'
|
||||||
import Model from "@/views/system/model/index"
|
import UserRechargeReport from '@/views/system/dept/components/userRechargeReport.vue'
|
||||||
import device from "@/views/system/device/index"
|
import device from "@/views/system/device/index"
|
||||||
import order from "@/views/system/order/index"
|
import Fees from "@/views/system/fee/index"
|
||||||
import partner from "@/views/system/partner/index"
|
import flow from "@/views/system/flow/index"
|
||||||
import refund from "@/views/system/refund/index"
|
import Model from "@/views/system/model/index"
|
||||||
import audit from "@/views/system/audit/index"
|
import order from "@/views/system/order/index"
|
||||||
import flow from "@/views/system/flow/index"
|
import partner from "@/views/system/partner/index"
|
||||||
import withdraw from "@/views/system/withdrawAudit/index"
|
import recharge from '@/views/system/recharge/index.vue'
|
||||||
import user from "@/views/system/user/index"
|
import refund from "@/views/system/refund/index"
|
||||||
import recharge from '@/views/system/recharge/index.vue'
|
import user from "@/views/system/user/index"
|
||||||
|
import withdraw from "@/views/system/withdrawAudit/index"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DeptDetail',
|
name: 'DeptDetail',
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
UserRechargeReport,
|
UserRechargeReport,
|
||||||
UserConfigDialog,
|
UserConfigDialog,
|
||||||
|
@ -206,7 +220,8 @@
|
||||||
flow,
|
flow,
|
||||||
withdraw,
|
withdraw,
|
||||||
user,
|
user,
|
||||||
recharge
|
recharge,
|
||||||
|
DeptBalanceDialog
|
||||||
},
|
},
|
||||||
|
|
||||||
dicts: ['sys_normal_disable', 'sys_yes_no'],
|
dicts: ['sys_normal_disable', 'sys_yes_no'],
|
||||||
|
@ -217,6 +232,7 @@
|
||||||
loading: false,
|
loading: false,
|
||||||
showConfigDialog: false,
|
showConfigDialog: false,
|
||||||
deptInfo: {},
|
deptInfo: {},
|
||||||
|
showBalanceLog: false,
|
||||||
activeTab: localStorage.getItem('deptDetailActiveTab') || '运营区'
|
activeTab: localStorage.getItem('deptDetailActiveTab') || '运营区'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user