2025-03-23 10:03:12 +08:00
|
|
|
|
<!--
|
2025-06-30 16:36:48 +08:00
|
|
|
|
* @Descripttion:
|
|
|
|
|
|
* @version:
|
2025-03-23 10:03:12 +08:00
|
|
|
|
* @Author: 王三华
|
|
|
|
|
|
* @Date: 2024-04-10 11:33:36
|
|
|
|
|
|
-->
|
|
|
|
|
|
<!-- 系统配置 - 权限配置 -->
|
|
|
|
|
|
<template>
|
|
|
|
|
|
<div class="page">
|
|
|
|
|
|
<topBar v-if="topList.length > 0" :top-list="topList" :moren="moren" />
|
|
|
|
|
|
<div class="thetopbox">
|
|
|
|
|
|
<el-form ref="form" :model="queryParams" label-width="auto">
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
|
<el-col :span="4">
|
2025-05-26 10:41:35 +08:00
|
|
|
|
<el-form-item :label="'会员编号'">
|
2025-03-23 10:03:12 +08:00
|
|
|
|
<el-input v-model="queryParams.memberCode" clearable />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
|
<el-form-item label="结算日期" prop="creationTime">
|
|
|
|
|
|
<el-date-picker
|
|
|
|
|
|
v-model="modifiedTime"
|
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
|
type="daterange"
|
|
|
|
|
|
range-separator="-"
|
2025-05-26 10:41:35 +08:00
|
|
|
|
:start-placeholder="'开始日期'"
|
|
|
|
|
|
:end-placeholder="'结束日期'"
|
2025-03-23 10:03:12 +08:00
|
|
|
|
@change="changeTime"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="4">
|
|
|
|
|
|
<div class="searchbox">
|
|
|
|
|
|
<el-button class="my_search" @click="research">
|
2025-06-30 16:36:48 +08:00
|
|
|
|
{{ '搜索' }}</el-button>
|
2025-03-23 10:03:12 +08:00
|
|
|
|
<el-button class="my_reset" @click="reChongzhi">
|
2025-06-30 16:36:48 +08:00
|
|
|
|
{{ '重置' }}</el-button>
|
2025-03-23 10:03:12 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="main">
|
|
|
|
|
|
<div class="maintop">
|
|
|
|
|
|
<div class="mainbtn">
|
|
|
|
|
|
<el-button
|
2025-06-30 16:36:48 +08:00
|
|
|
|
v-hasButtons="['waterAdd']"
|
2025-03-23 10:03:12 +08:00
|
|
|
|
size="small"
|
|
|
|
|
|
class="addBtn"
|
|
|
|
|
|
@click="addRules"
|
2025-06-30 16:36:48 +08:00
|
|
|
|
>{{ '添加' }}</el-button>
|
2025-03-23 10:03:12 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
v-hasButtons="['waterDown']"
|
2025-06-30 16:36:48 +08:00
|
|
|
|
size="small"
|
2025-03-23 10:03:12 +08:00
|
|
|
|
style="background-color: #009b58; color: #fff; margin-left: 15px"
|
|
|
|
|
|
class="thebtn2"
|
2025-06-30 16:36:48 +08:00
|
|
|
|
@click="importTemplate"
|
2025-03-23 10:03:12 +08:00
|
|
|
|
>
|
2025-06-30 16:36:48 +08:00
|
|
|
|
{{ '下载模板' }}</el-button>
|
2025-03-23 10:03:12 +08:00
|
|
|
|
<el-button
|
2025-06-30 16:36:48 +08:00
|
|
|
|
v-hasButtons="['waterImport']"
|
2025-03-23 10:03:12 +08:00
|
|
|
|
size="small"
|
|
|
|
|
|
class="thebtn2"
|
|
|
|
|
|
style="background-color: #ff6723; color: #fff"
|
|
|
|
|
|
@click="handleImport"
|
|
|
|
|
|
>
|
2025-06-30 16:36:48 +08:00
|
|
|
|
{{ '导入' }}</el-button>
|
2025-03-23 10:03:12 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="maintable">
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
v-loading="loading"
|
2025-06-30 16:36:48 +08:00
|
|
|
|
:data="tableData"
|
2025-03-23 10:03:12 +08:00
|
|
|
|
height="730px"
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
:header-cell-style="{ background: '#EEEEEE' }"
|
|
|
|
|
|
:row-class-name="tableRowClassName"
|
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
|
|
|
<el-table-column align="center" prop="memberCode" label="会员编号" />
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="teamBoxNum"
|
|
|
|
|
|
label="团队总盒数"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column align="center" prop="smallBoxNum" label="小区盒数" />
|
|
|
|
|
|
<!-- <el-table-column
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="totalTeamPv"
|
|
|
|
|
|
label="团队总业绩($)"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
prop="smallAreaPv"
|
|
|
|
|
|
label="小区业绩($)"
|
|
|
|
|
|
/> -->
|
|
|
|
|
|
<el-table-column align="center" prop="settleDate" label="结算日期" />
|
2025-05-26 10:41:35 +08:00
|
|
|
|
<el-table-column align="center" :label="'操作'" width="150">
|
2025-03-23 10:03:12 +08:00
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
<el-button
|
2025-06-30 16:36:48 +08:00
|
|
|
|
v-hasButtons="['waterUp']"
|
2025-03-23 10:03:12 +08:00
|
|
|
|
class="colors"
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
style="color: #ffad41"
|
|
|
|
|
|
@click.native.prevent="updateShow(scope.row)"
|
|
|
|
|
|
>
|
2025-05-26 10:41:35 +08:00
|
|
|
|
{{ '修改' }}
|
2025-03-23 10:03:12 +08:00
|
|
|
|
</el-button>
|
|
|
|
|
|
<el-button
|
2025-06-30 16:36:48 +08:00
|
|
|
|
v-hasButtons="['waterDel']"
|
2025-03-23 10:03:12 +08:00
|
|
|
|
class="colors"
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
style="color: #c73030"
|
|
|
|
|
|
@click.native.prevent="delRole(scope.row)"
|
|
|
|
|
|
>
|
2025-05-26 10:41:35 +08:00
|
|
|
|
{{ '删除' }}
|
2025-03-23 10:03:12 +08:00
|
|
|
|
</el-button>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
|
:title="title"
|
|
|
|
|
|
:visible.sync="ruleShow"
|
|
|
|
|
|
width="40%"
|
|
|
|
|
|
center
|
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
|
:before-close="handleClose"
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-form ref="forms" :rules="rules" :model="table" label-width="auto">
|
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-form-item label="会员编号" prop="memberCode">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="table.memberCode"
|
|
|
|
|
|
clearable
|
2025-05-26 10:41:35 +08:00
|
|
|
|
:placeholder="'请输入'"
|
2025-03-23 10:03:12 +08:00
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-form-item label="团队总盒数" prop="teamBoxNum">
|
2025-06-30 16:36:48 +08:00
|
|
|
|
<el-input-number
|
2025-03-23 10:03:12 +08:00
|
|
|
|
v-model="table.teamBoxNum"
|
|
|
|
|
|
clearable
|
2025-06-30 16:36:48 +08:00
|
|
|
|
:precision="2"
|
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
|
:controls="false"
|
2025-03-23 10:03:12 +08:00
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-form-item label="小区盒数" prop="smallBoxNum">
|
2025-06-30 16:36:48 +08:00
|
|
|
|
<el-input-number
|
2025-03-23 10:03:12 +08:00
|
|
|
|
v-model="table.smallBoxNum"
|
|
|
|
|
|
clearable
|
2025-06-30 16:36:48 +08:00
|
|
|
|
:precision="2"
|
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
|
:controls="false"
|
2025-03-23 10:03:12 +08:00
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<!-- <el-col :span="12">
|
|
|
|
|
|
<el-form-item label="团队总业绩($)" prop="totalTeamPv">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="table.totalTeamPv"
|
|
|
|
|
|
type="number"
|
|
|
|
|
|
clearable
|
2025-05-26 10:41:35 +08:00
|
|
|
|
:placeholder="'请输入'"
|
2025-03-23 10:03:12 +08:00
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-form-item label="小区业绩($)" prop="smallAreaPv">
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
v-model="table.smallAreaPv"
|
|
|
|
|
|
type="number"
|
|
|
|
|
|
clearable
|
2025-05-26 10:41:35 +08:00
|
|
|
|
:placeholder="'请输入'"
|
2025-03-23 10:03:12 +08:00
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col> -->
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
<el-form-item label="结算日期" prop="settleDate">
|
|
|
|
|
|
<el-date-picker
|
|
|
|
|
|
v-model="table.settleDate"
|
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
|
type="date"
|
2025-05-26 10:41:35 +08:00
|
|
|
|
:placeholder="'请选择'"
|
2025-03-23 10:03:12 +08:00
|
|
|
|
/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<div style="padding-top: 30px; display: flex; justify-content: center">
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
class="button-style"
|
|
|
|
|
|
@click="handleClose"
|
|
|
|
|
|
>
|
2025-06-30 16:36:48 +08:00
|
|
|
|
{{ '取消' }}</el-button>
|
2025-03-23 10:03:12 +08:00
|
|
|
|
<el-button
|
|
|
|
|
|
type="text"
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
class="button-style"
|
|
|
|
|
|
style="margin-left: 40px; background-color: #c8161d"
|
|
|
|
|
|
@click="ruleSubmit"
|
|
|
|
|
|
>
|
2025-05-26 10:41:35 +08:00
|
|
|
|
{{ '确认' }}
|
2025-03-23 10:03:12 +08:00
|
|
|
|
</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
<pagination
|
|
|
|
|
|
v-show="total > 0"
|
|
|
|
|
|
:total="total"
|
|
|
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
|
|
|
@pagination="research"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
|
:title="upload.title"
|
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
|
:visible.sync="upload.open"
|
|
|
|
|
|
width="600px"
|
|
|
|
|
|
append-to-body
|
|
|
|
|
|
>
|
|
|
|
|
|
<el-upload
|
|
|
|
|
|
ref="upload"
|
|
|
|
|
|
:limit="1"
|
|
|
|
|
|
accept=".xlsx, .xls"
|
|
|
|
|
|
:headers="upload.headers"
|
|
|
|
|
|
:action="upload.url"
|
|
|
|
|
|
:disabled="upload.isUploading"
|
|
|
|
|
|
:on-progress="handleFileUploadProgress"
|
|
|
|
|
|
:on-success="handleFileSuccess"
|
|
|
|
|
|
:on-exceed="handleExceed"
|
|
|
|
|
|
:auto-upload="false"
|
|
|
|
|
|
drag
|
|
|
|
|
|
>
|
2025-06-30 16:36:48 +08:00
|
|
|
|
<i class="el-icon-upload" />
|
2025-03-23 10:03:12 +08:00
|
|
|
|
<div class="el-upload__text">
|
2025-05-26 10:41:35 +08:00
|
|
|
|
{{ '将文件拖到此处,或' }}
|
|
|
|
|
|
<em>{{ '点击上传' }}</em>
|
2025-03-23 10:03:12 +08:00
|
|
|
|
</div>
|
2025-06-30 16:36:48 +08:00
|
|
|
|
<div slot="tip" class="el-upload__tip" style="color: red">
|
2025-05-26 10:41:35 +08:00
|
|
|
|
{{ '提示:仅允许导入“xls”或“xlsx”格式文件!' }}
|
2025-03-23 10:03:12 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
<el-button type="primary" @click="submitFileForm">{{
|
2025-05-26 10:41:35 +08:00
|
|
|
|
'确认'
|
2025-03-23 10:03:12 +08:00
|
|
|
|
}}</el-button>
|
|
|
|
|
|
<el-button @click="upload.open = false">{{
|
2025-05-26 10:41:35 +08:00
|
|
|
|
'取消'
|
2025-03-23 10:03:12 +08:00
|
|
|
|
}}</el-button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2025-06-30 16:36:48 +08:00
|
|
|
|
import topBar from '@/components/topBar'
|
|
|
|
|
|
import * as api from '@/api/specialBusiness.js'
|
|
|
|
|
|
import { Message } from 'element-ui'
|
|
|
|
|
|
import { getToken } from '@/utils/auth'
|
2025-03-23 10:03:12 +08:00
|
|
|
|
export default {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
name: 'Qxpz',
|
2025-03-23 10:03:12 +08:00
|
|
|
|
components: {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
topBar
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2025-06-08 15:32:44 +08:00
|
|
|
|
title: '添加',
|
2025-03-23 10:03:12 +08:00
|
|
|
|
modifiedTime: [],
|
|
|
|
|
|
modifiedTime1: [],
|
2025-06-30 16:36:48 +08:00
|
|
|
|
forms: '',
|
2025-03-23 10:03:12 +08:00
|
|
|
|
rules: {
|
|
|
|
|
|
memberCode: [
|
2025-06-30 16:36:48 +08:00
|
|
|
|
{ required: true, message: '请输入', trigger: 'blur' }
|
2025-03-23 10:03:12 +08:00
|
|
|
|
],
|
|
|
|
|
|
settleDate: [
|
2025-06-30 16:36:48 +08:00
|
|
|
|
{ required: true, message: '请选择', trigger: 'change' }
|
|
|
|
|
|
]
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
table: {},
|
|
|
|
|
|
ruleShow: false,
|
2025-06-30 16:36:48 +08:00
|
|
|
|
moren: 'waterInjection',
|
2025-03-23 10:03:12 +08:00
|
|
|
|
topList: [
|
|
|
|
|
|
{
|
2025-06-30 16:36:48 +08:00
|
|
|
|
name: '等级修改',
|
|
|
|
|
|
path: 'waterInjection'
|
|
|
|
|
|
}
|
2025-03-23 10:03:12 +08:00
|
|
|
|
],
|
|
|
|
|
|
upload: {
|
|
|
|
|
|
// 是否显示弹出层(物流导入)
|
|
|
|
|
|
open: false,
|
|
|
|
|
|
// 弹出层标题(物流导入)
|
2025-06-30 16:36:48 +08:00
|
|
|
|
title: '',
|
2025-03-23 10:03:12 +08:00
|
|
|
|
// 是否禁用上传
|
|
|
|
|
|
isUploading: false,
|
|
|
|
|
|
// 是否更新已经存在的物流数据
|
|
|
|
|
|
updateSupport: 0,
|
|
|
|
|
|
// 设置上传的请求头部
|
2025-06-30 16:36:48 +08:00
|
|
|
|
headers: { Authorization: 'Bearer ' + getToken() },
|
2025-03-23 10:03:12 +08:00
|
|
|
|
// 上传的地址
|
2025-06-30 16:36:48 +08:00
|
|
|
|
url: process.env.VUE_APP_BASE_API + '/bonus/manage/special/importData'
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
queryParams: {
|
|
|
|
|
|
pageNum: 1,
|
2025-06-30 16:36:48 +08:00
|
|
|
|
pageSize: 50
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
loadingInstance: null,
|
|
|
|
|
|
tableData: [],
|
|
|
|
|
|
loading: false,
|
2025-06-30 16:36:48 +08:00
|
|
|
|
total: 0
|
|
|
|
|
|
}
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
created() {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.research()
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
submitFileForm() {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.$refs.upload.submit()
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
// 上传文件数量超出后的动作
|
|
|
|
|
|
handleExceed() {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.upload.isUploading = false
|
|
|
|
|
|
this.msgInfo('仅可上传一个文件哦')
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
// 文件上传中处理
|
|
|
|
|
|
handleFileUploadProgress(event, file, fileList) {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
console.log(event, 'event')
|
|
|
|
|
|
this.upload.isUploading = true
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
// 文件上传成功处理
|
|
|
|
|
|
handleFileSuccess(response, file, fileList) {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
console.log(response, 'response')
|
2025-03-23 10:03:12 +08:00
|
|
|
|
this.loadingInstance = this.$loading({
|
|
|
|
|
|
lock: true,
|
2025-06-30 16:36:48 +08:00
|
|
|
|
text: '正在处理,请稍候...',
|
|
|
|
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
|
|
})
|
|
|
|
|
|
var fileName = response.fileName
|
|
|
|
|
|
if (fileName != undefined && fileName != '') {
|
2025-03-23 10:03:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
if (response.code == 200) {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.$alert('', '上传成功', {
|
2025-03-23 10:03:12 +08:00
|
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
|
|
|
callback: () => {
|
|
|
|
|
|
// 关闭遮罩层
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.loadingInstance.close()
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2025-03-23 10:03:12 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
if (response && response.data && Array.isArray(response.data)) {
|
|
|
|
|
|
const msgList = response.data
|
2025-06-30 16:36:48 +08:00
|
|
|
|
.map((item) => item.memberCode + ' ' + item.msg)
|
|
|
|
|
|
.join('<br>')
|
|
|
|
|
|
this.$alert(msgList, this.$t('错误提示'), {
|
2025-03-23 10:03:12 +08:00
|
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
|
|
|
callback: () => {
|
|
|
|
|
|
// 关闭遮罩层
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.loadingInstance.close()
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2025-03-23 10:03:12 +08:00
|
|
|
|
} else {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
const msgs = response.msg
|
|
|
|
|
|
this.$alert(msgs, this.$t('错误提示'), {
|
2025-03-23 10:03:12 +08:00
|
|
|
|
dangerouslyUseHTMLString: true,
|
|
|
|
|
|
callback: () => {
|
|
|
|
|
|
// 关闭遮罩层
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.loadingInstance.close()
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2025-03-23 10:03:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.upload.open = false
|
|
|
|
|
|
this.upload.isUploading = false
|
|
|
|
|
|
this.$refs.upload.clearFiles()
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
handleImport() {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.upload.title = '批量导入'
|
|
|
|
|
|
this.upload.open = true
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
importTemplate() {
|
|
|
|
|
|
this.download(
|
2025-06-30 16:36:48 +08:00
|
|
|
|
'/bonus/manage/special/download',
|
2025-03-23 10:03:12 +08:00
|
|
|
|
{},
|
2025-06-30 16:36:48 +08:00
|
|
|
|
`${this.$t('新零售注水业绩')}${new Date().getTime()}.xlsx`
|
|
|
|
|
|
)
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
addRules() {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.types = 1
|
|
|
|
|
|
this.ruleShow = true
|
|
|
|
|
|
this.title = '添加'
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
updateShow(item) {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.types = 2
|
|
|
|
|
|
this.title = '修改'
|
2025-03-23 10:03:12 +08:00
|
|
|
|
api.getOnespecialList(item.pkId).then((res) => {
|
|
|
|
|
|
if (res.code === 200) {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.ruleShow = true
|
|
|
|
|
|
this.table = res.data
|
2025-03-23 10:03:12 +08:00
|
|
|
|
}
|
2025-06-30 16:36:48 +08:00
|
|
|
|
})
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
delRole(item) {
|
2025-06-08 15:32:44 +08:00
|
|
|
|
this.$confirm('确认删除?', '提示', {
|
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
|
cancelButtonText: '取消',
|
2025-06-30 16:36:48 +08:00
|
|
|
|
type: 'warning'
|
2025-03-23 10:03:12 +08:00
|
|
|
|
}).then(() => {
|
|
|
|
|
|
api.specialDel(item.pkId).then((res) => {
|
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
|
Message({
|
|
|
|
|
|
message: res.msg,
|
2025-06-30 16:36:48 +08:00
|
|
|
|
type: 'success'
|
|
|
|
|
|
})
|
|
|
|
|
|
this.research()
|
2025-03-23 10:03:12 +08:00
|
|
|
|
}
|
2025-06-30 16:36:48 +08:00
|
|
|
|
})
|
|
|
|
|
|
})
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
ruleSubmit() {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.$refs['forms'].validate((valid) => {
|
2025-03-23 10:03:12 +08:00
|
|
|
|
if (!valid) {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
return false
|
2025-03-23 10:03:12 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
if (this.types == 1) {
|
|
|
|
|
|
api.specialSave(this.table).then((res) => {
|
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
Message({
|
|
|
|
|
|
message: res.msg,
|
2025-06-30 16:36:48 +08:00
|
|
|
|
type: 'success'
|
|
|
|
|
|
})
|
|
|
|
|
|
this.ruleShow = false
|
|
|
|
|
|
this.$refs['forms'].clearValidate()
|
|
|
|
|
|
this.$refs['forms'].resetFields()
|
|
|
|
|
|
this.research()
|
2025-03-23 10:03:12 +08:00
|
|
|
|
}
|
2025-06-30 16:36:48 +08:00
|
|
|
|
})
|
2025-03-23 10:03:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
if (this.types == 2) {
|
|
|
|
|
|
api.specialUpdate(this.table).then((res) => {
|
|
|
|
|
|
if (res.code == 200) {
|
|
|
|
|
|
Message({
|
|
|
|
|
|
message: res.msg,
|
2025-06-30 16:36:48 +08:00
|
|
|
|
type: 'success'
|
|
|
|
|
|
})
|
|
|
|
|
|
this.ruleShow = false
|
|
|
|
|
|
this.$refs['forms'].clearValidate()
|
|
|
|
|
|
this.$refs['forms'].resetFields()
|
|
|
|
|
|
this.research()
|
2025-03-23 10:03:12 +08:00
|
|
|
|
}
|
2025-06-30 16:36:48 +08:00
|
|
|
|
})
|
2025-03-23 10:03:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-06-30 16:36:48 +08:00
|
|
|
|
})
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
handleClose() {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.ruleShow = false
|
|
|
|
|
|
this.table = {}
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
changeTime(val) {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.queryParams.startDate = val ? val[0] : ''
|
|
|
|
|
|
this.queryParams.endtDate = val ? val[1] : ''
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
changeTime1(val) {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.queryParams.beginEndDate = val ? val[0] : ''
|
|
|
|
|
|
this.queryParams.endEndDate = val ? val[1] : ''
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
research() {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.loading = true
|
2025-03-23 10:03:12 +08:00
|
|
|
|
api.specialList(this.queryParams).then((res) => {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.loading = false
|
|
|
|
|
|
this.tableData = res.rows
|
|
|
|
|
|
this.total = res.total
|
|
|
|
|
|
})
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
reChongzhi() {
|
|
|
|
|
|
this.queryParams = {
|
|
|
|
|
|
pageNum: 1,
|
2025-06-30 16:36:48 +08:00
|
|
|
|
pageSize: 50
|
|
|
|
|
|
}
|
|
|
|
|
|
this.modifiedTime = []
|
|
|
|
|
|
this.modifiedTime1 = []
|
|
|
|
|
|
this.research()
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
handleSelectionChange(val) {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
this.multipleSelection = val
|
2025-03-23 10:03:12 +08:00
|
|
|
|
},
|
|
|
|
|
|
tableRowClassName({ row, rowIndex }) {
|
|
|
|
|
|
if (rowIndex % 2 == 1) {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
return 'warning-row'
|
2025-03-23 10:03:12 +08:00
|
|
|
|
} else if (rowIndex % 2 == 0) {
|
2025-06-30 16:36:48 +08:00
|
|
|
|
return 'success-row'
|
2025-03-23 10:03:12 +08:00
|
|
|
|
}
|
2025-06-30 16:36:48 +08:00
|
|
|
|
return ''
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-03-23 10:03:12 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
::v-deep .el-upload--picture-card {
|
|
|
|
|
|
min-width: 80px !important;
|
|
|
|
|
|
min-height: 80px !important;
|
|
|
|
|
|
border: 1px solid #ccc;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-select {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-range-editor.el-input__inner {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .colors {
|
|
|
|
|
|
padding: 5px !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .banner .el-form-item__error {
|
|
|
|
|
|
left: 100px;
|
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.avatar-uploader {
|
|
|
|
|
|
width: 68px !important;
|
|
|
|
|
|
height: 68px !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .input-s .el-input {
|
|
|
|
|
|
//width:637px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.button-style {
|
|
|
|
|
|
width: 209px;
|
|
|
|
|
|
height: 48px;
|
|
|
|
|
|
background: #cccccc;
|
|
|
|
|
|
border-radius: 5px 5px 5px 5px;
|
|
|
|
|
|
opacity: 1;
|
|
|
|
|
|
line-height: 48px;
|
|
|
|
|
|
padding: 0 !important;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-dialog__title {
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-dialog__header {
|
|
|
|
|
|
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.button-s {
|
|
|
|
|
|
padding: 0 2px !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-button {
|
|
|
|
|
|
padding: 10px 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-date-editor .el-range__close-icon {
|
|
|
|
|
|
margin-top: -10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-date-editor .el-range-separator {
|
|
|
|
|
|
margin-top: -10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-date-editor .el-range__icon {
|
|
|
|
|
|
margin-top: -10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-input__inner {
|
|
|
|
|
|
//height:28px;
|
|
|
|
|
|
//line-height: 28px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-form-item {
|
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-form-item__label {
|
|
|
|
|
|
color: #333;
|
|
|
|
|
|
font-weight: inherit;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-row {
|
|
|
|
|
|
//margin-top: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-date-editor {
|
|
|
|
|
|
width: 100% !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-table .warning-row {
|
|
|
|
|
|
background: #f9f9f9;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-table .success-row {
|
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-table thead {
|
|
|
|
|
|
color: #000000;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.openClose {
|
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
|
color: #666666;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.page {
|
|
|
|
|
|
padding: 20px;
|
|
|
|
|
|
background: #f9f9f9;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
|
|
|
|
|
|
.thetopbox {
|
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
padding-bottom: 10px;
|
|
|
|
|
|
|
|
|
|
|
|
.searchbox {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
|
|
.searchtitle {
|
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.searchbtn {
|
|
|
|
|
|
background: #08143f;
|
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.main {
|
|
|
|
|
|
//margin-top: 20px;
|
|
|
|
|
|
background: #f9f9f9;
|
|
|
|
|
|
//border-radius: 8px;
|
|
|
|
|
|
//box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
|
|
|
|
|
|
|
|
|
|
|
|
.maintop {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
padding: 0px 0;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
|
|
.mainbtn {
|
|
|
|
|
|
.thebtn1 {
|
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
background: #3181e5;
|
|
|
|
|
|
width: 68px;
|
|
|
|
|
|
//height: 32px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|