This commit is contained in:
邱贞招 2024-10-16 16:25:49 +08:00
parent 7328530497
commit f5a78514e1
2 changed files with 64 additions and 61 deletions

View File

@ -32,38 +32,6 @@
</el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['system:detail:add']"-->
<!-- >新增</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['system:detail:edit']"-->
<!-- >修改</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['system:detail:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
@ -94,9 +62,10 @@
</template>
</el-table-column>
<el-table-column label="电话" align="center" prop="partnerPhone" />
<el-table-column label="分红比例" align="center" prop="dividendProportion" />
<el-table-column label="总金额" align="center" prop="totalAmount" />
<el-table-column label="分账金额" align="center" prop="dividendAmount" />
<el-table-column label="分红比例" align="center" prop="dividendProportion" :formatter="formatProportion"/>
<el-table-column label="总金额" align="center" prop="totalAmount" :formatter="formatTotalAmount"/>
<el-table-column label="分账金额" align="center" prop="dividendAmount" :formatter="formatAmount"/>
<el-table-column label="退款金额" align="center" prop="refundAmount" :formatter="formatRefundAmount"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
@ -165,7 +134,7 @@ import { listDetail, getDetail, delDetail, addDetail, updateDetail } from "@/api
export default {
name: "Detail",
dicts: ['rl_user_type'],
dicts: ['rl_user_type','rl_dividend_status'],
data() {
return {
//
@ -211,6 +180,35 @@ export default {
this.getList();
},
methods: {
formatProportion(row) {
let dividendProportion = row.dividendProportion;
if (dividendProportion !== null && dividendProportion !== undefined) {
return (dividendProportion * 100).toFixed(2) + '%';
}
return '—'; //
},
formatTotalAmount(row) {
let totalAmount = row.totalAmount;
if (totalAmount === null || totalAmount === undefined || totalAmount === '') {
return '';
}
// 100 100
return totalAmount + '元';
},
formatAmount(row) {
let dividendAmount = row.dividendAmount;
if (dividendAmount === null || dividendAmount === undefined || dividendAmount === '') {
return '';
}
return dividendAmount + '元';
},
formatRefundAmount(row) {
let value = row.refundAmount;
if (value === null || value === undefined || value === '') {
return '';
}
return value + '元';
},
/** 查询分账明细列表 */
getList() {
this.loading = true;

View File

@ -56,16 +56,16 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:user:add']"
>新增</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['system:user:add']"-->
<!-- >新增</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="success"
@ -169,8 +169,8 @@
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item label="用户名">
<el-input v-model="form.userName" placeholder="请输入用户名" maxlength="30" />
<el-form-item label="手机号">
<el-input v-model="form.userName" placeholder="请输入用户名" maxlength="30" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -180,14 +180,6 @@
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item v-if="form.userId == undefined" label="手机号码" prop="phonenumber">
<el-input v-model="form.phonenumber" placeholder="请输入手机号码" maxlength="11" />
<span class="el-form-item__tip" style="width: 100%;">
<div>手机号用于分润和登录系统保存后不可修改</div>
</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="代理城市" prop="cityId">
<el-select v-model="form.cityId" placeholder="请选择代理城市">
@ -200,6 +192,19 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="角色">
<el-select v-model="form.roleIds" multiple placeholder="请选择角色">
<el-option
v-for="item in roleOptions"
:key="item.roleId"
:label="item.roleName"
:value="item.roleId"
:disabled="item.status == 1"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
@ -304,6 +309,8 @@ export default {
dateRange: [],
//
cityOptions: [],
//
roleOptions: [],
//
form: {
dividendStatus: "0"
@ -338,7 +345,7 @@ export default {
status: undefined,
deptId: undefined,
areaId: undefined,
typeList: "03"
typeList: "00,02,03,04"
},
//
rules: {
@ -502,11 +509,9 @@ export default {
handleAdd() {
this.reset();
getUser().then(response => {
this.postOptions = response.posts;
this.roleOptions = response.roles;
this.areaOptions = response.areas;
this.open = true;
this.title = "添加户";
this.title = "添加系统用户";
this.form.password = this.initPassword;
});
},
@ -524,7 +529,7 @@ export default {
// console.log(1111111111111)
this.$set(this.form, "areas", response.areas);
this.open = true;
this.title = "修改户";
this.title = "修改系统用户";
this.form.password = "";
});
},