2024-05-20 18:07:24 +08:00
|
|
|
|
<template>
|
|
|
|
|
<div class="app-container">
|
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
|
2024-05-27 09:47:00 +08:00
|
|
|
|
<el-form-item label="运营商名称" prop="deptName">
|
2024-05-20 18:07:24 +08:00
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.deptName"
|
2024-05-27 09:47:00 +08:00
|
|
|
|
placeholder="请输入运营商名称"
|
2024-05-20 18:07:24 +08:00
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
2024-07-18 12:01:43 +08:00
|
|
|
|
<el-form-item label="运营区名称" prop="areaName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.areaName"
|
|
|
|
|
placeholder="请输入运营区名称"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="微信" prop="userName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.userName"
|
|
|
|
|
placeholder="请输入微信"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
2024-05-20 18:07:24 +08:00
|
|
|
|
<el-form-item label="状态" prop="status">
|
2024-05-27 09:47:00 +08:00
|
|
|
|
<el-select v-model="queryParams.status" placeholder="运营商状态" clearable>
|
2024-05-20 18:07:24 +08:00
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in dict.type.sys_normal_disable"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</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:dept:add']"
|
|
|
|
|
>新增</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="info"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-sort"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="toggleExpandAll"
|
|
|
|
|
>展开/折叠</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
v-if="refreshTable"
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
:data="deptList"
|
|
|
|
|
row-key="deptId"
|
|
|
|
|
:default-expand-all="isExpandAll"
|
|
|
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
2024-07-18 12:01:43 +08:00
|
|
|
|
:default-sort="defaultSort" @sort-change="handleSortChange">
|
|
|
|
|
<el-table-column prop="deptName" label="运营商名称" width="260" sortable="custom" :sort-orders="['descending', 'ascending']"></el-table-column>
|
|
|
|
|
<el-table-column prop="areaName" label="名下运营区" align="center" ></el-table-column>
|
2024-07-27 21:29:53 +08:00
|
|
|
|
<el-table-column prop="phone" label="联系电话" align="center" ></el-table-column>
|
2024-07-18 12:01:43 +08:00
|
|
|
|
<el-table-column prop="appName" label="小程序" align="center" ></el-table-column>
|
2024-07-27 21:29:53 +08:00
|
|
|
|
<el-table-column prop="userName" label="绑定提现账户" align="center" ></el-table-column>
|
2024-07-18 12:01:43 +08:00
|
|
|
|
<el-table-column prop="separateAccount" label="独立支付" align="center" width="100">
|
2024-07-17 09:52:24 +08:00
|
|
|
|
<template slot-scope="scope">
|
2024-07-18 12:01:43 +08:00
|
|
|
|
<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.separateAccount"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="platformServiceFee" label="服务费(%)" align="center" >
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ scope.row.platformServiceFee && scope.row.platformServiceFee != '0'?scope.row.platformServiceFee+'%':'' }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-07-27 21:29:53 +08:00
|
|
|
|
<el-table-column prop="handlingCharge" label="手续费" align="center" >
|
2024-07-18 12:01:43 +08:00
|
|
|
|
<template slot-scope="scope">
|
2024-07-27 21:29:53 +08:00
|
|
|
|
<span>{{ formatHandlingCharge(scope.row.handlingCharge,scope.row.handlingChargeType) }}</span>
|
2024-07-17 09:52:24 +08:00
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-05-20 18:07:24 +08:00
|
|
|
|
<el-table-column prop="status" label="状态" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
2024-07-18 12:01:43 +08:00
|
|
|
|
<el-table-column label="余额" align="center" prop="balance" sortable="custom" :sort-orders="['descending', 'ascending']">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span class="balance-cell">{{ scope.row.balance }}元</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="200" sortable="custom" :sort-orders="['descending', 'ascending']">
|
2024-05-20 18:07:24 +08:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
v-hasPermi="['system:dept:edit']"
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="scope.row.parentId != 0"
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
v-hasPermi="['system:dept:remove']"
|
|
|
|
|
>删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
2024-05-27 09:47:00 +08:00
|
|
|
|
<!-- 添加或修改运营商对话框 -->
|
2024-05-31 21:59:35 +08:00
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
|
2024-05-20 18:07:24 +08:00
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
2024-07-18 12:01:43 +08:00
|
|
|
|
<!-- <el-row>-->
|
|
|
|
|
<!-- <el-col :span="24">-->
|
|
|
|
|
<!-- <el-form-item label="上级组织" prop="parentId" >-->
|
|
|
|
|
<!-- <el-select style="width: 85%" v-model="form.parentId" placeholder="选择上级运营商">-->
|
|
|
|
|
<!-- <el-option-->
|
|
|
|
|
<!-- v-for="item in deptOptions"-->
|
|
|
|
|
<!-- :key="item.deptId"-->
|
|
|
|
|
<!-- :label="item.deptName"-->
|
|
|
|
|
<!-- :value="item.deptId"-->
|
|
|
|
|
<!-- ></el-option>-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!--<!– <treeselect v-model="form.parentId" :options="deptOptions" :disabled="true" placeholder="选择上级运营商" />–>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- </el-row>-->
|
2024-05-20 18:07:24 +08:00
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
2024-05-27 09:47:00 +08:00
|
|
|
|
<el-form-item label="运营商名称" label-width="90" prop="deptName">
|
|
|
|
|
<el-input v-model="form.deptName" style="width: 67%;" placeholder="请输入运营商名称" />
|
2024-05-20 18:07:24 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
2024-07-27 21:29:53 +08:00
|
|
|
|
<el-form-item label="绑定提现账户" prop="phonenumber" label-width="120">
|
2024-07-18 12:01:43 +08:00
|
|
|
|
<el-select
|
|
|
|
|
ref="headerSearchSelect"
|
|
|
|
|
v-model="form.appUserId"
|
|
|
|
|
:remote-method="queryPhonenumber"
|
|
|
|
|
filterable
|
|
|
|
|
default-first-option
|
|
|
|
|
remote
|
|
|
|
|
:loading="loading2"
|
|
|
|
|
placeholder="输入手机号搜索"
|
|
|
|
|
class="header-search-select" >
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in options"
|
|
|
|
|
:key="item.value"
|
|
|
|
|
:label="item.label+'---'+item.appName"
|
|
|
|
|
:value="item.value">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
2024-05-20 18:07:24 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
2024-07-27 21:29:53 +08:00
|
|
|
|
<el-col :span="12" >
|
2024-05-31 21:59:35 +08:00
|
|
|
|
<el-form-item label="联系电话" prop="phone">
|
2024-07-27 21:29:53 +08:00
|
|
|
|
<el-input v-model="form.phone" placeholder="请输入联系电话" maxlength="11" :disabled="form.deptId !== undefined"/>
|
|
|
|
|
<span class="el-form-item__tip" style="width: 100%;">
|
|
|
|
|
<div>联系电话用于登录后台管理系统,如需修改请联系管理员</div>
|
|
|
|
|
</span>
|
2024-05-20 18:07:24 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
2024-05-31 21:59:35 +08:00
|
|
|
|
<el-form-item label="负责人" prop="leader">
|
|
|
|
|
<el-input v-model="form.leader" placeholder="请输入负责人" maxlength="20" />
|
2024-05-20 18:07:24 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="邮箱" prop="email">
|
|
|
|
|
<el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
2024-05-27 09:47:00 +08:00
|
|
|
|
<el-form-item label="状态">
|
2024-05-20 18:07:24 +08:00
|
|
|
|
<el-radio-group v-model="form.status">
|
|
|
|
|
<el-radio
|
|
|
|
|
v-for="dict in dict.type.sys_normal_disable"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.value"
|
|
|
|
|
>{{dict.label}}</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
2024-05-27 09:47:00 +08:00
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label="绑定运营区" label-width="90">
|
|
|
|
|
<el-select style="width: 85%" v-model="form.areaIds" multiple placeholder="请绑定运营区">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in areaOptions"
|
|
|
|
|
:key="item.areaId"
|
|
|
|
|
:label="item.areaName"
|
|
|
|
|
:value="item.areaId"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
2024-06-07 21:31:06 +08:00
|
|
|
|
<div v-if="form.parentId != 0">
|
|
|
|
|
<el-row>
|
2024-06-13 16:21:53 +08:00
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="是否开启分账" label-width="120" prop="isProfitSharing">
|
|
|
|
|
<el-switch v-model="form.isProfitSharing" class="drawer-switch" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
2024-07-13 15:07:14 +08:00
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="是否有独立支付账户" label-width="120" prop="separateAccount">
|
|
|
|
|
<el-radio-group v-model="form.separateAccount">
|
|
|
|
|
<el-radio
|
|
|
|
|
v-for="dict in dict.type.sys_yes_no"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.value"
|
|
|
|
|
>{{dict.label}}</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
2024-07-09 14:19:21 +08:00
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
2024-07-08 14:19:30 +08:00
|
|
|
|
<el-col :span="12">
|
2024-06-07 21:31:06 +08:00
|
|
|
|
<el-form-item label="平台服务费(%)" label-width="90" prop="platformServiceFee">
|
|
|
|
|
<el-input style="width: 65%" v-model="form.platformServiceFee" placeholder="请输入平台服务费" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
2024-07-09 14:19:21 +08:00
|
|
|
|
<el-col :span="12">
|
2024-07-27 21:29:53 +08:00
|
|
|
|
<el-form-item label="手续费类型" label-width="120" prop="handlingChargeType">
|
|
|
|
|
<el-radio-group v-model="form.handlingChargeType">
|
|
|
|
|
<el-radio
|
|
|
|
|
v-for="dict in dict.type.et_handling_charge_type"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.value"
|
|
|
|
|
>{{dict.label}}</el-radio>
|
|
|
|
|
</el-radio-group>
|
2024-07-09 14:19:21 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
2024-06-13 16:21:53 +08:00
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
2024-06-07 21:31:06 +08:00
|
|
|
|
<el-col :span="12">
|
2024-06-13 16:21:53 +08:00
|
|
|
|
<el-form-item label="是否使用创享电动车小程序" label-width="160" prop="isUsePlatformApp">
|
|
|
|
|
<el-switch v-model="form.isUsePlatformApp" class="drawer-switch" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
2024-07-27 21:29:53 +08:00
|
|
|
|
<el-col :span="12" v-if="form.handlingChargeType == '1'">
|
|
|
|
|
<el-form-item label="比例(‰)" label-width="90" >
|
|
|
|
|
<el-input style="width: 65%" v-model="form.handlingCharge" placeholder="请输入手续费" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12" v-else>
|
|
|
|
|
<el-form-item label="每笔(元)" label-width="90" >
|
|
|
|
|
<el-input style="width: 65%" v-model="form.handlingCharge" placeholder="请输入手续费" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
2024-06-07 21:31:06 +08:00
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
2024-06-13 16:21:53 +08:00
|
|
|
|
<el-col :span="12" v-show="form.isUsePlatformApp != true">
|
2024-06-07 21:31:06 +08:00
|
|
|
|
<el-form-item label="appid" prop="appid">
|
|
|
|
|
<el-input style="width: 93%" v-model="form.appid" placeholder="请输入appid" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
2024-06-13 16:21:53 +08:00
|
|
|
|
<el-col :span="12" v-show="form.isUsePlatformApp != true">
|
2024-06-07 21:31:06 +08:00
|
|
|
|
<el-form-item label="appSecret" prop="appSecret">
|
|
|
|
|
<el-input v-model="form.appSecret" placeholder="请输入appSecret" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
2024-06-13 16:21:53 +08:00
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12" v-show="form.isUsePlatformApp != true">
|
2024-07-18 12:01:43 +08:00
|
|
|
|
<el-form-item label="小程序名称" prop="appName" label-width="90px">
|
2024-06-13 16:21:53 +08:00
|
|
|
|
<el-input style="width: 93%" v-model="form.appName" placeholder="请输入小程序名称" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
2024-07-18 12:01:43 +08:00
|
|
|
|
<el-col :span="12" v-show="form.isUsePlatformApp != true">
|
|
|
|
|
<el-form-item label="域名" prop="domain">
|
|
|
|
|
<el-input style="width: 93%" v-model="form.domain" placeholder="请输入域名" />
|
2024-06-07 21:31:06 +08:00
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
2024-07-18 12:01:43 +08:00
|
|
|
|
<div v-if="form.separateAccount == 'Y'">
|
|
|
|
|
<h2 style="font-weight: 700;font-size: 18px">支付相关</h2>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="商户号" prop="merchantId">
|
|
|
|
|
<el-input style="width: 93%" v-model="form.merchantId" placeholder="请输入商户号" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="apiV3密钥" prop="apiV3Key">
|
|
|
|
|
<el-input v-model="form.apiV3Key" placeholder="请输入apiV3密钥" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="通知回调地址" label-width="100" prop="notifyUrl">
|
|
|
|
|
<el-input style="width: 66%" v-model="form.notifyUrl" placeholder="请输入通知回调地址" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="密钥所在位置" label-width="100" prop="privateKeyPath">
|
|
|
|
|
<el-input style="width: 70%" v-model="form.privateKeyPath" placeholder="请输入密钥所在位置" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="证书序列号" label-width="90" prop="merchantSerialNumber">
|
|
|
|
|
<el-input style="width: 70%" v-model="form.merchantSerialNumber" placeholder="请输入证书序列号" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="退款回调地址" label-width="100" prop="refundNotifyUrl">
|
|
|
|
|
<el-input style="width: 70%" v-model="form.refundNotifyUrl" placeholder="请输入退款回调地址" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</div>
|
2024-06-07 21:31:06 +08:00
|
|
|
|
</div>
|
2024-05-20 18:07:24 +08:00
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
2024-07-17 09:52:24 +08:00
|
|
|
|
|
|
|
|
|
<!-- 添加或修改提现记录对话框 -->
|
2024-07-18 12:01:43 +08:00
|
|
|
|
<!-- <el-dialog :title="title2" :visible.sync="open2" width="500px" append-to-body>-->
|
|
|
|
|
<!-- <el-form ref="form2" :model="form2" :rules="rules2" label-width="120px">-->
|
|
|
|
|
<!-- <el-form-item label="手机号码" prop="phonenumber">-->
|
|
|
|
|
<!-- <el-select-->
|
|
|
|
|
<!-- ref="headerSearchSelect"-->
|
|
|
|
|
<!-- v-model="form2.phonenumber"-->
|
|
|
|
|
<!-- :remote-method="queryPhonenumber"-->
|
|
|
|
|
<!-- filterable-->
|
|
|
|
|
<!-- default-first-option-->
|
|
|
|
|
<!-- remote-->
|
|
|
|
|
<!-- :loading="loading2"-->
|
|
|
|
|
<!-- placeholder="输入手机号搜索"-->
|
|
|
|
|
<!-- class="header-search-select" >-->
|
|
|
|
|
<!-- <el-option-->
|
|
|
|
|
<!-- v-for="item in options"-->
|
|
|
|
|
<!-- :key="item.value"-->
|
|
|
|
|
<!-- :label="item.label+'---'+item.appName"-->
|
|
|
|
|
<!-- :value="item.value">-->
|
|
|
|
|
<!-- </el-option>-->
|
|
|
|
|
<!-- </el-select>-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-form>-->
|
|
|
|
|
<!-- <div slot="footer" class="dialog-footer">-->
|
|
|
|
|
<!-- <el-button type="primary" @click="submitForm2">确 定</el-button>-->
|
|
|
|
|
<!-- <el-button @click="cancel">取 消</el-button>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </el-dialog>-->
|
2024-05-20 18:07:24 +08:00
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
|
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
2024-05-27 09:47:00 +08:00
|
|
|
|
import { listArea } from '../../../api/system/area'
|
2024-07-17 09:52:24 +08:00
|
|
|
|
import { fastSearch } from '@/api/user/user'
|
|
|
|
|
import { bandAppUser, getUser } from '@/api/system/user'
|
2024-05-20 18:07:24 +08:00
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "Dept",
|
2024-07-27 21:29:53 +08:00
|
|
|
|
dicts: ['sys_normal_disable','sys_yes_no','et_handling_charge_type'],
|
2024-05-20 18:07:24 +08:00
|
|
|
|
components: { Treeselect },
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: true,
|
|
|
|
|
// 显示搜索条件
|
|
|
|
|
showSearch: true,
|
|
|
|
|
// 表格树数据
|
|
|
|
|
deptList: [],
|
2024-05-27 09:47:00 +08:00
|
|
|
|
// 运营商树选项
|
2024-05-20 18:07:24 +08:00
|
|
|
|
deptOptions: [],
|
2024-07-17 09:52:24 +08:00
|
|
|
|
options: [],
|
2024-05-27 09:47:00 +08:00
|
|
|
|
// 运营区选项
|
|
|
|
|
areaOptions: [],
|
2024-07-18 12:01:43 +08:00
|
|
|
|
// 默认排序
|
|
|
|
|
defaultSort: {prop: 'createTime', order: 'descending'},
|
2024-05-20 18:07:24 +08:00
|
|
|
|
// 弹出层标题
|
|
|
|
|
title: "",
|
2024-07-17 09:52:24 +08:00
|
|
|
|
title2: "",
|
|
|
|
|
userName:null,
|
2024-05-20 18:07:24 +08:00
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
open: false,
|
2024-07-17 09:52:24 +08:00
|
|
|
|
open2: false,
|
|
|
|
|
loading2: false,
|
2024-05-20 18:07:24 +08:00
|
|
|
|
// 是否展开,默认全部展开
|
|
|
|
|
isExpandAll: true,
|
|
|
|
|
// 重新渲染表格状态
|
|
|
|
|
refreshTable: true,
|
|
|
|
|
// 查询参数
|
|
|
|
|
queryParams: {
|
|
|
|
|
deptName: undefined,
|
2024-07-17 09:52:24 +08:00
|
|
|
|
status: undefined,
|
2024-07-18 12:01:43 +08:00
|
|
|
|
phonenumber: null,
|
|
|
|
|
areaName: undefined
|
2024-05-20 18:07:24 +08:00
|
|
|
|
},
|
|
|
|
|
// 表单参数
|
2024-07-18 12:01:43 +08:00
|
|
|
|
form: {
|
|
|
|
|
isProfitSharing: 'N'
|
|
|
|
|
},
|
2024-07-17 09:52:24 +08:00
|
|
|
|
form2: {},
|
2024-05-20 18:07:24 +08:00
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
|
|
|
|
parentId: [
|
2024-05-27 09:47:00 +08:00
|
|
|
|
{ required: true, message: "上级运营商不能为空", trigger: "blur" }
|
2024-05-20 18:07:24 +08:00
|
|
|
|
],
|
|
|
|
|
deptName: [
|
2024-05-27 09:47:00 +08:00
|
|
|
|
{ required: true, message: "运营商名称不能为空", trigger: "blur" }
|
2024-05-20 18:07:24 +08:00
|
|
|
|
],
|
2024-07-27 21:29:53 +08:00
|
|
|
|
handlingChargeType: [
|
|
|
|
|
{ required: true, message: "手续费类型不能为空", trigger: "blur" }
|
|
|
|
|
],
|
|
|
|
|
handlingCharge: [
|
|
|
|
|
{ required: true, message: "手续费不能为空", trigger: "blur" }
|
2024-05-20 18:07:24 +08:00
|
|
|
|
],
|
2024-07-27 21:29:53 +08:00
|
|
|
|
// orderNum: [
|
|
|
|
|
// { required: true, message: "显示排序不能为空", trigger: "blur" }
|
|
|
|
|
// ],
|
2024-05-20 18:07:24 +08:00
|
|
|
|
email: [
|
|
|
|
|
{
|
|
|
|
|
type: "email",
|
|
|
|
|
message: "请输入正确的邮箱地址",
|
|
|
|
|
trigger: ["blur", "change"]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
phone: [
|
2024-05-31 21:59:35 +08:00
|
|
|
|
{ required: true, message: "联系电话不能为空", trigger: "blur" },
|
2024-05-20 18:07:24 +08:00
|
|
|
|
{
|
|
|
|
|
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
|
|
|
|
message: "请输入正确的手机号码",
|
|
|
|
|
trigger: "blur"
|
|
|
|
|
}
|
|
|
|
|
]
|
2024-07-17 09:52:24 +08:00
|
|
|
|
},
|
|
|
|
|
rules2: {
|
|
|
|
|
phonenumber: [
|
|
|
|
|
{ required: true, message: "手机号码不能为空", trigger: "blur" },
|
|
|
|
|
]
|
2024-05-20 18:07:24 +08:00
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
2024-07-17 09:52:24 +08:00
|
|
|
|
console.log("当前用户信息:",this.$store.state.user.id)
|
|
|
|
|
this.userName = this.$store.state.user.name;
|
|
|
|
|
let userId = this.$store.state.user.id;
|
|
|
|
|
getUser(userId).then(response => {
|
|
|
|
|
this.user = response.data;
|
|
|
|
|
});
|
2024-05-20 18:07:24 +08:00
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2024-07-27 21:29:53 +08:00
|
|
|
|
formatHandlingCharge(charge, chargeType) {
|
|
|
|
|
if (!charge || charge === '0') {
|
|
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
|
if (chargeType === '1') {
|
|
|
|
|
return `${charge}‰`;
|
|
|
|
|
} else if (chargeType === '2') {
|
|
|
|
|
return `每笔${charge}元`;
|
|
|
|
|
}
|
|
|
|
|
return charge;
|
|
|
|
|
},
|
2024-07-18 12:01:43 +08:00
|
|
|
|
/** 排序触发事件 */
|
|
|
|
|
handleSortChange(column, prop, order) {
|
|
|
|
|
this.queryParams.orderByColumn = column.prop;
|
|
|
|
|
this.queryParams.isAsc = column.order;
|
|
|
|
|
this.getList();
|
2024-07-17 09:52:24 +08:00
|
|
|
|
},
|
|
|
|
|
queryPhonenumber(query) {
|
|
|
|
|
console.log("query:",query)
|
|
|
|
|
if (query !== '') {
|
|
|
|
|
this.loading2 = true;
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.loading2 = false;
|
|
|
|
|
fastSearch({"phonenumber":query}).then(response => {
|
|
|
|
|
this.options = response.data;
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}, 200);
|
|
|
|
|
} else {
|
|
|
|
|
this.options = []
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-05-27 09:47:00 +08:00
|
|
|
|
/** 查询运营商列表 */
|
2024-05-20 18:07:24 +08:00
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
listDept(this.queryParams).then(response => {
|
|
|
|
|
this.deptList = this.handleTree(response.data, "deptId");
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
2024-05-27 09:47:00 +08:00
|
|
|
|
/** 转换运营商数据结构 */
|
2024-05-20 18:07:24 +08:00
|
|
|
|
normalizer(node) {
|
|
|
|
|
if (node.children && !node.children.length) {
|
|
|
|
|
delete node.children;
|
|
|
|
|
}
|
|
|
|
|
return {
|
|
|
|
|
id: node.deptId,
|
|
|
|
|
label: node.deptName,
|
|
|
|
|
children: node.children
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
// 取消按钮
|
|
|
|
|
cancel() {
|
|
|
|
|
this.open = false;
|
2024-07-17 09:52:24 +08:00
|
|
|
|
this.open2 = false;
|
2024-05-20 18:07:24 +08:00
|
|
|
|
this.reset();
|
|
|
|
|
},
|
|
|
|
|
// 表单重置
|
|
|
|
|
reset() {
|
|
|
|
|
this.form = {
|
|
|
|
|
deptId: undefined,
|
|
|
|
|
parentId: undefined,
|
|
|
|
|
deptName: undefined,
|
|
|
|
|
orderNum: undefined,
|
|
|
|
|
leader: undefined,
|
|
|
|
|
phone: undefined,
|
|
|
|
|
email: undefined,
|
2024-07-18 12:01:43 +08:00
|
|
|
|
status: "0",
|
|
|
|
|
isProfitSharing: false,
|
|
|
|
|
separateAccount: 'N',
|
|
|
|
|
platformServiceFee: '4',
|
|
|
|
|
handlingCharge: '5.4',
|
2024-07-27 21:29:53 +08:00
|
|
|
|
handlingChargeType: '1',
|
2024-07-18 12:01:43 +08:00
|
|
|
|
isUsePlatformApp: true,
|
|
|
|
|
merchantId: null,
|
|
|
|
|
apiV3Key: null,
|
|
|
|
|
notifyUrl: null,
|
|
|
|
|
privateKeyPath: null,
|
|
|
|
|
merchantSerialNumber: null,
|
|
|
|
|
refundNotifyUrl: null
|
2024-05-20 18:07:24 +08:00
|
|
|
|
};
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
},
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
|
handleQuery() {
|
2024-07-17 09:52:24 +08:00
|
|
|
|
this.queryParams.pageNum = 1;
|
2024-05-20 18:07:24 +08:00
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
|
resetQuery() {
|
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
|
this.handleQuery();
|
|
|
|
|
},
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
handleAdd(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.open = true;
|
2024-05-27 09:47:00 +08:00
|
|
|
|
this.title = "添加运营商";
|
2024-05-20 18:07:24 +08:00
|
|
|
|
listDept().then(response => {
|
2024-07-18 12:01:43 +08:00
|
|
|
|
console.log("response=============",response)
|
|
|
|
|
this.deptOptions = response.data;
|
2024-05-27 09:47:00 +08:00
|
|
|
|
listArea().then(response => {
|
|
|
|
|
this.areaOptions = response.rows;
|
2024-05-31 21:59:35 +08:00
|
|
|
|
this.form.parentId = 100;
|
2024-05-27 09:47:00 +08:00
|
|
|
|
});
|
2024-05-20 18:07:24 +08:00
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 展开/折叠操作 */
|
|
|
|
|
toggleExpandAll() {
|
|
|
|
|
this.refreshTable = false;
|
|
|
|
|
this.isExpandAll = !this.isExpandAll;
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.refreshTable = true;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
getDept(row.deptId).then(response => {
|
|
|
|
|
this.form = response.data;
|
2024-05-27 09:47:00 +08:00
|
|
|
|
this.$set(this.form, "areaIds", response.areaIds);
|
2024-05-20 18:07:24 +08:00
|
|
|
|
this.open = true;
|
2024-05-27 09:47:00 +08:00
|
|
|
|
this.title = "修改运营商";
|
2024-06-07 21:31:06 +08:00
|
|
|
|
this.form.isProfitSharing = this.form.isProfitSharing === 'true';
|
2024-06-13 16:21:53 +08:00
|
|
|
|
this.form.isUsePlatformApp = this.form.isUsePlatformApp === 'true';
|
2024-07-22 17:18:28 +08:00
|
|
|
|
console.log("userName==========="+response.data.userName)
|
|
|
|
|
this.form.appUserId = response.data.userName;
|
2024-05-27 09:47:00 +08:00
|
|
|
|
listArea().then(response => {
|
|
|
|
|
this.areaOptions = response.rows;
|
|
|
|
|
});
|
2024-05-20 18:07:24 +08:00
|
|
|
|
listDeptExcludeChild(row.deptId).then(response => {
|
|
|
|
|
this.deptOptions = this.handleTree(response.data, "deptId");
|
|
|
|
|
if (this.deptOptions.length == 0) {
|
|
|
|
|
const noResultsOptions = { deptId: this.form.parentId, deptName: this.form.parentName, children: [] };
|
|
|
|
|
this.deptOptions.push(noResultsOptions);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm: function() {
|
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.form.deptId != undefined) {
|
|
|
|
|
updateDept(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
addDept(this.form).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
handleDelete(row) {
|
|
|
|
|
this.$modal.confirm('是否确认删除名称为"' + row.deptName + '"的数据项?').then(function() {
|
|
|
|
|
return delDept(row.deptId);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
2024-07-17 09:52:24 +08:00
|
|
|
|
<style>
|
|
|
|
|
.balance-cell {
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
color: red;
|
|
|
|
|
}
|
2024-07-27 21:29:53 +08:00
|
|
|
|
.el-form-item__tip{
|
|
|
|
|
color: #ff0000;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
line-height: 18px;
|
|
|
|
|
}
|
2024-07-17 09:52:24 +08:00
|
|
|
|
</style>
|