|
|
@@ -0,0 +1,728 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container project">
|
|
|
+ <el-form
|
|
|
+ :model="projectForm"
|
|
|
+ label-width="68px"
|
|
|
+ :inline="true"
|
|
|
+ >
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="姓名">
|
|
|
+ <el-input style="width: 240px" v-model="projectForm.teName" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="昵称">
|
|
|
+ <el-input style="width: 240px" v-model="projectForm.teNickName" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="服务类目">
|
|
|
+ <el-select style="width: 240px" v-model="projectForm.openService" clearable>
|
|
|
+ <el-option v-for="item in serveTypes" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="商户电话">
|
|
|
+ <el-input style="width: 240px" v-model="projectForm.tePhone" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="注册时间">
|
|
|
+ <el-date-picker
|
|
|
+ style="width: 240px"
|
|
|
+ v-model="projectForm.createTime"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ clearable
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="上架状态">
|
|
|
+ <el-select style="width: 240px" v-model="projectForm.postState">
|
|
|
+ <el-option label="上架" value="1"></el-option>
|
|
|
+ <el-option label="下架" value="0"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="性别">
|
|
|
+ <el-select style="width: 240px" v-model="projectForm.g" clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.sys_user_sex"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-button type="primary" @click="handleSearch">搜索</el-button>
|
|
|
+ <el-button @click="handleReset">重置</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div class="btns">
|
|
|
+ <el-button size="small" icon="el-icon-plus" type="primary" @click="handleAdd">新增</el-button>
|
|
|
+ <div class="type">
|
|
|
+ <span class="typeItem" :class="{ 'active': typeIndex === index }" @click="handleTypeIndexChange(item, index)" v-for="(item, index) in typeList">{{ item.text }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ :data="table"
|
|
|
+ >
|
|
|
+ <el-table-column prop="merchantId" label="商户ID" width="150"></el-table-column>
|
|
|
+ <el-table-column prop="teName" label="姓名" width="150"></el-table-column>
|
|
|
+ <el-table-column prop="teNickName" label="昵称" width="80"></el-table-column>
|
|
|
+ <el-table-column prop="teSex" label="性别" width="80">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <dict-tag :options="dict.type.sys_user_sex" :value="`${row.teSex}`"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="teAvatar" label="头像" width="150">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <image-preview :src="row.teAvatar" :width="120" :height="120" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="tePhone" label="电话" width="80"></el-table-column>
|
|
|
+ <el-table-column prop="nstar" label="评分" width="80"></el-table-column>
|
|
|
+ <el-table-column prop="serviceState" label="服务状态" width="80">
|
|
|
+ <template #default="{ row }">
|
|
|
+ {{ row.serviceState == 0?'服务中':row.serviceState == 1?'可服务':row.serviceState == 2?'休息中':'' }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="nnum" label="已服务数量" width="100"></el-table-column>
|
|
|
+ <el-table-column prop="onlineTime" label="累计在线时长" width="100"></el-table-column>
|
|
|
+ <el-table-column prop="teProject" label="服务类目" width="80"></el-table-column>
|
|
|
+ <el-table-column prop="postState" label="上架状态" width="120">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-switch v-model="row.postState" :active-value="1" :inactive-value="0"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="isRecommend" label="是否推荐" width="100">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-switch v-model="row.isRecommend" :active-value="1" :inactive-value="0"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="techTypeName" label="用户类型" width="150"></el-table-column>
|
|
|
+ <el-table-column prop="merchantStatusName" label="管理状态" width="150">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-button type="text" @click="handleViewManageStatus(row)">{{ row.merchantStatusName }}</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="createTime" label="创建时间" width="150"></el-table-column>
|
|
|
+ <el-table-column label="操作" fixed="right" width="180">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-button size="small" type="text" icon="el-icon-view" @click="handleView(row)">详情</el-button>
|
|
|
+ <el-button size="small" type="text" icon="el-icon-edit" @click="handleEdit(row)">编辑</el-button>
|
|
|
+ <el-dropdown @command="clickMenuItem($event, row)">
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ <el-button size="small" type="text">更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
|
|
|
+ </span>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item command="open" @click="handleOpen(row)">开通项目</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="contract" @click="handleContract(row)">合同</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="status" @click="handleStatus(row)">状态管理</el-dropdown-item>
|
|
|
+<!-- <el-dropdown-item command="del" @click="handleDel(row)">删除</el-dropdown-item>-->
|
|
|
+ <el-dropdown-item command="commission" @click="handleCommission(row)">佣金</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="pagination">
|
|
|
+ <el-pagination
|
|
|
+ v-show="total > 0"
|
|
|
+ background
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="projectForm.current"
|
|
|
+ :page-size="projectForm.size"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="total"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <el-dialog
|
|
|
+ :title="title"
|
|
|
+ :visible.sync="dialogShow"
|
|
|
+ width="30%"
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ :model="addForm"
|
|
|
+ ref="addFormRefs"
|
|
|
+ label-width="80px"
|
|
|
+ :rules="addRules"
|
|
|
+ :disabled="title == '详情'"
|
|
|
+ >
|
|
|
+ <el-form-item label="姓名" prop="teName">
|
|
|
+ <el-input style="width: 240px" v-model="addForm.teName" placeholder="请填写" clearable />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="服务类目" prop="openService">
|
|
|
+ <el-select style="width: 240px" multiple v-model="addForm.openService" clearable>
|
|
|
+ <el-option v-for="item in serveTypes" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="昵称" prop="teNickName">
|
|
|
+ <el-input style="width: 240px" v-model="addForm.teNickName" placeholder="请填写" clearable />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="服务项目" prop="projectIds">
|
|
|
+ <el-select style="width: 240px" v-model="addForm.projectIds" multiple clearable>
|
|
|
+ <el-option v-for="item in serveProjects" :label="item.title" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="性别" prop="teSex">
|
|
|
+ <el-select style="width: 240px" v-model="addForm.teSex" clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.sys_user_sex"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="商户类型" prop="techType">
|
|
|
+ <el-select style="width: 240px" v-model="addForm.techType" clearable>
|
|
|
+ <el-option label="真实商户" value="1"></el-option>
|
|
|
+ <el-option label="虚拟商户" value="0"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="电话" prop="tePhone">
|
|
|
+ <el-input style="width: 240px" v-model="addForm.tePhone" placeholder="请填写" clearable />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="是否推荐" prop="isRecommend">
|
|
|
+ <el-radio-group v-model="addForm.isRecommend">
|
|
|
+ <el-radio label="1">是</el-radio>
|
|
|
+ <el-radio label="0">否</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <div class="footer" v-if="title == '详情'">
|
|
|
+ <el-button @click="handleCancel">关闭</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="footer" v-else>
|
|
|
+ <el-button @click="handleCancel">取消</el-button>
|
|
|
+ <el-button type="primary" @click="handleSave">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="商户状态记录"
|
|
|
+ :visible.sync="statusDialogShow"
|
|
|
+ width="30%"
|
|
|
+ >
|
|
|
+ <el-table
|
|
|
+ :data="statusTable"
|
|
|
+ >
|
|
|
+ <el-table-column type="index" label="序号" width="50"></el-table-column>
|
|
|
+ <el-table-column prop="" label="管理状态"></el-table-column>
|
|
|
+ <el-table-column prop="" label="变更原因"></el-table-column>
|
|
|
+ <el-table-column prop="" label="操作人"></el-table-column>
|
|
|
+ <el-table-column prop="" label="变更时间"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="pagination">
|
|
|
+ <el-pagination
|
|
|
+ small
|
|
|
+ v-show="statusTotal > 0"
|
|
|
+ background
|
|
|
+ @size-change="handleStatusSizeChange"
|
|
|
+ @current-change="handleStatusCurrentChange"
|
|
|
+ :current-page="statusCurrent"
|
|
|
+ :page-size="statusSize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="statusTotal"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="开通项目"
|
|
|
+ :visible.sync="openDialogShow"
|
|
|
+ width="60%"
|
|
|
+ >
|
|
|
+ <el-table
|
|
|
+ :data="openTable"
|
|
|
+ >
|
|
|
+ <el-table-column prop="" label="服务类目"></el-table-column>
|
|
|
+ <el-table-column prop="" label="项目名称"></el-table-column>
|
|
|
+ <el-table-column prop="" label="图片">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <image-preview :src="row.icon" :width="120" :height="120" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="" label="价格"></el-table-column>
|
|
|
+ <el-table-column prop="" label="时间"></el-table-column>
|
|
|
+ <el-table-column prop="" label="计费单位"></el-table-column>
|
|
|
+ <el-table-column prop="" label="状态"></el-table-column>
|
|
|
+ <el-table-column prop="" label="是否上架">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <el-switch v-model="row.isOnline"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="" label="亮点"></el-table-column>
|
|
|
+ <el-table-column prop="" label="适用人群"></el-table-column>
|
|
|
+ <el-table-column prop="" label="申请时间"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="合同"
|
|
|
+ :visible.sync="contractDialogShow"
|
|
|
+ width="30%"
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ :model="contractForm"
|
|
|
+ label-width="80px"
|
|
|
+ :rules="contractRules"
|
|
|
+ >
|
|
|
+ <el-form-item label="合同" prop="contract">
|
|
|
+ <FileUpload
|
|
|
+ :fileSize="10"
|
|
|
+ :fileType="['pdf', 'jpg', 'jpeg', 'png']"
|
|
|
+ v-model="contractForm.contract"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <div class="footer">
|
|
|
+ <el-button @click="handleContractCancel">取消</el-button>
|
|
|
+ <el-button type="primary" @click="handleContractSave">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="状态管理"
|
|
|
+ :visible.sync="manageDialogShow"
|
|
|
+ width="30%"
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ :model="manageForm"
|
|
|
+ label-width="80px"
|
|
|
+ :rules="manageRules"
|
|
|
+ >
|
|
|
+ <el-form-item label="商户状态" prop="a">
|
|
|
+ <el-radio-group v-model="manageForm.a">
|
|
|
+ <el-radio label="1">正常</el-radio>
|
|
|
+ <el-radio label="2">限制接单</el-radio>
|
|
|
+ <el-radio label="3">冻结</el-radio>
|
|
|
+ <el-radio label="4">注销</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="变更原因" prop="b">
|
|
|
+ <el-input type="textarea" show-word-limit maxlength="200" v-model="manageForm.b" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <el-button @click="handleManageCancel">取消</el-button>
|
|
|
+ <el-button type="primary" @click="handleManageSave">确定</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="佣金明细"
|
|
|
+ :visible.sync="moneyDialogShow"
|
|
|
+ width="30%"
|
|
|
+ >
|
|
|
+ <el-table
|
|
|
+ :data="moneyTable"
|
|
|
+ >
|
|
|
+ <el-table-column type="index" label="序号" width="50"></el-table-column>
|
|
|
+ <el-table-column prop="" label="管理状态"></el-table-column>
|
|
|
+ <el-table-column prop="" label="变更原因"></el-table-column>
|
|
|
+ <el-table-column prop="" label="操作人"></el-table-column>
|
|
|
+ <el-table-column prop="" label="变更时间"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="pagination">
|
|
|
+ <el-pagination
|
|
|
+ small
|
|
|
+ v-show="moneyTotal > 0"
|
|
|
+ background
|
|
|
+ @size-change="handleMoneySizeChange"
|
|
|
+ @current-change="handleMoneyCurrentChange"
|
|
|
+ :current-page="moneyCurrent"
|
|
|
+ :page-size="moneySize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="moneyTotal"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { list } from '@/api/serve/caetgory'
|
|
|
+import { lists } from '@/api/serve/project'
|
|
|
+import { tenantList, add, detail, edit, upload } from '@/api/tenant/list'
|
|
|
+
|
|
|
+export default {
|
|
|
+ dicts: ['sys_user_sex'],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ projectForm: {
|
|
|
+ current: 1,
|
|
|
+ size: 10
|
|
|
+ },
|
|
|
+ total: 11,
|
|
|
+ table: [],
|
|
|
+ typeList: [
|
|
|
+ {
|
|
|
+ type: '0',
|
|
|
+ text: '全部'
|
|
|
+ },{
|
|
|
+ type: '1',
|
|
|
+ text: '可服务'
|
|
|
+ },{
|
|
|
+ type: '0',
|
|
|
+ text: '服务中'
|
|
|
+ },{
|
|
|
+ type: '2',
|
|
|
+ text: '休息中'
|
|
|
+ },{
|
|
|
+ type: '1',
|
|
|
+ text: '虚拟用户'
|
|
|
+ },{
|
|
|
+ type: '0',
|
|
|
+ text: '正式用户'
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ typeIndex: 0,
|
|
|
+ title: '新增',
|
|
|
+ dialogShow: false,
|
|
|
+ addRules: {
|
|
|
+ a: [
|
|
|
+ { required: true, message:'请选择', trigger: "change"}
|
|
|
+ ],
|
|
|
+ name: [
|
|
|
+ { required: true, message:'请填写', trigger: "blur",}
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ addForm: {},
|
|
|
+ editId: '',
|
|
|
+ statusDialogShow: false,
|
|
|
+ statusTable: [],
|
|
|
+ statusTotal: 0,
|
|
|
+ statusCurrent: 1,
|
|
|
+ statusSize: 10,
|
|
|
+ openDialogShow: false,
|
|
|
+ openTable: [],
|
|
|
+ contractDialogShow: false,
|
|
|
+ contractForm: {},
|
|
|
+ contractRules: {
|
|
|
+ contract: [
|
|
|
+ { required: true, message:'请上传', trigger: "change"}
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ manageDialogShow: false,
|
|
|
+ manageForm: {},
|
|
|
+ manageRules: {
|
|
|
+ a: [
|
|
|
+ { required: true, message:'请选择', trigger: "change"}
|
|
|
+ ],
|
|
|
+ b: [
|
|
|
+ { required: true, message:'请填写', trigger: "blur"}
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ moneyDialogShow: false,
|
|
|
+ moneyTable: [],
|
|
|
+ moneyTotal: 0,
|
|
|
+ moneyCurrent: 1,
|
|
|
+ moneySize: 10,
|
|
|
+ serveTypes: [], // 服务类目
|
|
|
+ serveProjects: [], // 服务项目
|
|
|
+ idForContract : '',
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 服务类目
|
|
|
+ initServeTypes() {
|
|
|
+ list({
|
|
|
+ current: 1,
|
|
|
+ size: 1000
|
|
|
+ }).then(res => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.serveTypes = res.data.records
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 服务项目
|
|
|
+ initServeProjects() {
|
|
|
+ lists({
|
|
|
+ current: 1,
|
|
|
+ size: 1000
|
|
|
+ }).then(res => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.serveProjects = res.data.records
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleTypeIndexChange(item, index) {
|
|
|
+ this.typeIndex = index
|
|
|
+ switch (item.text) {
|
|
|
+ case '全部':
|
|
|
+ this.projectForm.serviceState = ''
|
|
|
+ this.projectForm.techType = ''
|
|
|
+ break;
|
|
|
+ case '可服务':
|
|
|
+ this.projectForm.serviceState = '1'
|
|
|
+ this.projectForm.techType = ''
|
|
|
+ break;
|
|
|
+ case '服务中':
|
|
|
+ this.projectForm.serviceState = '0'
|
|
|
+ this.projectForm.techType = ''
|
|
|
+ break;
|
|
|
+ case '休息中':
|
|
|
+ this.projectForm.serviceState = '2'
|
|
|
+ this.projectForm.techType = ''
|
|
|
+ break;
|
|
|
+ case '虚拟用户':
|
|
|
+ this.projectForm.serviceState = ''
|
|
|
+ this.projectForm.techType = '1'
|
|
|
+ break;
|
|
|
+ case '正式用户':
|
|
|
+ this.projectForm.serviceState = ''
|
|
|
+ this.projectForm.techType = '0'
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ initData() {
|
|
|
+ let params = {
|
|
|
+ current: this.projectForm.current,
|
|
|
+ size: this.projectForm.size,
|
|
|
+ teName: this.projectForm.teName,
|
|
|
+ teNickName: this.projectForm.teNickName,
|
|
|
+ openService: this.projectForm.openService,
|
|
|
+ tePhone: this.projectForm.tePhone,
|
|
|
+ beginCreateTime: this.projectForm.createTime?.[0],
|
|
|
+ endCreateTime: this.projectForm.createTime?.[1],
|
|
|
+ postState: this.projectForm.postState,
|
|
|
+ teSex: this.projectForm.teSex,
|
|
|
+ serviceState: this.projectForm.serviceState,
|
|
|
+ techType: this.projectForm.techType
|
|
|
+ }
|
|
|
+ tenantList({
|
|
|
+ ...params
|
|
|
+ }).then(res => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.table = res.data.records
|
|
|
+ this.total = res.data.total
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleSearch() {
|
|
|
+ this.projectForm.current = 1
|
|
|
+ this.projectForm.size = 10
|
|
|
+ this.initData()
|
|
|
+ },
|
|
|
+ handleReset() {
|
|
|
+ this.projectForm = {}
|
|
|
+ this.projectForm.current = 1
|
|
|
+ this.projectForm.size = 10
|
|
|
+ this.initData()
|
|
|
+ },
|
|
|
+ handleViewManageStatus() {
|
|
|
+ this.statusDialogShow = true
|
|
|
+ this.initStatus()
|
|
|
+ },
|
|
|
+ initStatus() {
|
|
|
+
|
|
|
+ },
|
|
|
+ initDetail(id) {
|
|
|
+ detail(id).then(res => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.addForm = {
|
|
|
+ teName: res.data.teName,
|
|
|
+ openService: res.data.openService?.split(',').map(Number),
|
|
|
+ teNickName: res.data.teNickName,
|
|
|
+ projectIds: res.data.projectIds?.split(',').map(Number),
|
|
|
+ teSex: `${res.data.teSex}`,
|
|
|
+ techType: `${res.data.techType}`,
|
|
|
+ tePhone: res.data.tePhone,
|
|
|
+ isRecommend: `${res.data.isRecommend}`
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleAdd() {
|
|
|
+ this.dialogShow = true
|
|
|
+ this.title = '新增'
|
|
|
+ },
|
|
|
+ handleView(row) {
|
|
|
+ this.dialogShow = true
|
|
|
+ this.title = '详情'
|
|
|
+ this.initDetail(row.merchantId)
|
|
|
+ },
|
|
|
+ handleEdit(row) {
|
|
|
+ this.dialogShow = true
|
|
|
+ this.title = '编辑'
|
|
|
+ this.editId = row.merchantId
|
|
|
+ this.initDetail(row.merchantId)
|
|
|
+ },
|
|
|
+ clickMenuItem(command, row) {
|
|
|
+ switch (command) {
|
|
|
+ case 'open':
|
|
|
+ this.handleOpen(row)
|
|
|
+ break;
|
|
|
+ case 'del':
|
|
|
+ this.handleDel(row)
|
|
|
+ break;
|
|
|
+ case 'contract':
|
|
|
+ this.handleContract(row)
|
|
|
+ break;
|
|
|
+ case 'status':
|
|
|
+ this.handleStatus(row)
|
|
|
+ break;
|
|
|
+ case 'commission':
|
|
|
+ this.handleCommission(row)
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleOpen(row) {
|
|
|
+ this.openDialogShow = true
|
|
|
+ },
|
|
|
+ handleContract(row) {
|
|
|
+ this.contractDialogShow = true
|
|
|
+ this.idForContract = row.merchantId
|
|
|
+ },
|
|
|
+ handleContractCancel() {
|
|
|
+ this.contractDialogShow = false
|
|
|
+ this.contractForm.contract = ''
|
|
|
+ },
|
|
|
+ handleContractSave() {
|
|
|
+ let emu = this.contractForm.contract.split('/')[this.contractForm.contract.split('/').length - 1]
|
|
|
+ upload(this.idForContract, {
|
|
|
+ contractName: emu?emu.split('.')[0]:'我的合同',
|
|
|
+ url: this.contractForm.contract
|
|
|
+ }).then(res => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ this.contractDialogShow = false
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleStatus(row) {
|
|
|
+ this.manageDialogShow = true
|
|
|
+ },
|
|
|
+ handleDel(row) {
|
|
|
+ this.$modal.confirm('是否确认删除?')
|
|
|
+ .then(() => {
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+ handleCommission(row) {
|
|
|
+ this.moneyDialogShow = true
|
|
|
+ },
|
|
|
+ handleSizeChange(size) {
|
|
|
+ this.projectForm.size = size
|
|
|
+ this.initData()
|
|
|
+ },
|
|
|
+ handleCurrentChange(current) {
|
|
|
+ this.projectForm.current = current
|
|
|
+ this.initData()
|
|
|
+ },
|
|
|
+ handleStatusSizeChange(size) {
|
|
|
+ this.statusSize = size
|
|
|
+ this.initStatus()
|
|
|
+ },
|
|
|
+ handleStatusCurrentChange(page) {
|
|
|
+ this.statusCurrent = page
|
|
|
+ this.initStatus()
|
|
|
+ },
|
|
|
+ handleSave() {
|
|
|
+ if(this.editId) {
|
|
|
+ edit(this.editId, {
|
|
|
+ ...this.addForm
|
|
|
+ }).then(res => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ this.initData();
|
|
|
+ this.dialogShow = false
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ this.dialogShow = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ add({
|
|
|
+ ...this.addForm
|
|
|
+ }).then(res => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.$message.success(res.msg)
|
|
|
+ this.initData();
|
|
|
+ this.dialogShow = false
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.msg)
|
|
|
+ this.dialogShow = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleCancel() {
|
|
|
+ this.dialogShow = false
|
|
|
+ },
|
|
|
+ handleManageCancel() {
|
|
|
+ this.manageDialogShow = false
|
|
|
+ },
|
|
|
+ handleManageSave() {
|
|
|
+ this.manageDialogShow = false
|
|
|
+ },
|
|
|
+ handleMoneySizeChange(size) {
|
|
|
+ this.moneySize = size
|
|
|
+ },
|
|
|
+ handleMoneyCurrentChange(page) {
|
|
|
+ this.moneyCurrent = 1
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.initData();
|
|
|
+ this.initServeTypes();
|
|
|
+ this.initServeProjects();
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+.btns{
|
|
|
+ margin-bottom: 20px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-start;
|
|
|
+ .type{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-start;
|
|
|
+ .typeItem{
|
|
|
+ padding: 5px 15px;
|
|
|
+ border-radius: 4px;
|
|
|
+ font-size: 14px;
|
|
|
+ margin: 0 10px;
|
|
|
+ cursor: pointer;
|
|
|
+ border: 1px solid #ccc;
|
|
|
+ }
|
|
|
+ .active{
|
|
|
+ background: #1890ff;
|
|
|
+ color: white;
|
|
|
+ border-color: #1890ff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.pagination{
|
|
|
+ margin-top: 20px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-end;
|
|
|
+}
|
|
|
+</style>
|