pull/7/head
zcxee 2 years ago
parent 44c7642b9a
commit a4cf773aaa
  1. 30
      src/api/sch/file.js
  2. 175
      src/views/sch/file/index.vue
  3. 115
      src/views/sch/rules/components/RuleDialogForm.vue
  4. 46
      src/views/sch/rules/components/SearchForm.vue
  5. 195
      src/views/sch/rules/index.vue
  6. 769
      src/views/zs/clue.vue
  7. 2
      src/views/zs/clue/components/UploadDialog.vue
  8. 411
      src/views/zs/sign.vue

@ -9,36 +9,12 @@ export function listFile(query) {
})
}
// 查询文件详细
export function getFile(fileId) {
return request({
url: '/sch/file/' + fileId,
method: 'get'
})
}
// 新增文件
export function addFile(data) {
return request({
url: '/sch/file',
method: 'post',
data: data
})
}
// 修改文件
export function updateFile(data) {
// 删除文件
export function delFile(data) {
return request({
url: '/sch/file',
method: 'put',
method: 'delete',
data: data
})
}
// 删除文件
export function delFile(fileId) {
return request({
url: '/sch/file/' + fileId,
method: 'delete'
})
}

@ -1,22 +1,9 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="组织id" prop="deptId">
<el-input v-model="queryParams.deptId" placeholder="请输入组织id" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="文件名" prop="fileName">
<el-input v-model="queryParams.fileName" placeholder="请输入文件名" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="文件路径" prop="fileUrl">
<el-input v-model="queryParams.fileUrl" placeholder="请输入文件路径" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="上传时间" prop="uploadTime">
<el-date-picker clearable v-model="queryParams.uploadTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择上传时间">
</el-date-picker>
</el-form-item>
<el-form-item label="上传人员" prop="uploadUser">
<el-input v-model="queryParams.uploadUser" placeholder="请输入上传人员" clearable @keyup.enter.native="handleQuery" />
</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>
@ -25,24 +12,16 @@
<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:file: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:file: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:file:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:file:export']">导出</el-button>
<el-upload ref="upload" v-hasPermi="['sch:file:upload']" class="upload-demo" :headers="upload.headers" :action="upload.url" multiple :limit="5" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :show-file-list="false">
<el-button size="mini" type="primary">上传</el-button>
</el-upload>
<!-- <el-button type="primary" plain icon="el-icon-upload" size="mini" @click="handleAdd" v-hasPermi="['sch:file:upload']">上传</el-button> -->
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="fileList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="${comment}" align="center" prop="fileId" />
<el-table-column label="组织id" align="center" prop="deptId" />
<el-table v-loading="loading" :data="tableList">
<el-table-column type="index" width="55" align="center" />
<el-table-column label="文件名" align="center" prop="fileName" />
<el-table-column label="文件路径" align="center" prop="fileUrl" />
<el-table-column label="上传时间" align="center" prop="uploadTime" width="180">
@ -53,44 +32,20 @@
<el-table-column label="上传人员" align="center" prop="uploadUser" />
<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:file:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:file:remove']">删除</el-button>
<el-button size="mini" type="text" icon="el-icon-download" @click="handleDownload(scope.row)" v-hasPermi="['sch:file:download']">下载</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['sch:file:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- 添加或修改文件对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="组织id" prop="deptId">
<el-input v-model="form.deptId" placeholder="请输入组织id" />
</el-form-item>
<el-form-item label="文件名" prop="fileName">
<el-input v-model="form.fileName" placeholder="请输入文件名" />
</el-form-item>
<el-form-item label="文件路径" prop="fileUrl">
<el-input v-model="form.fileUrl" placeholder="请输入文件路径" />
</el-form-item>
<el-form-item label="上传时间" prop="uploadTime">
<el-date-picker clearable v-model="form.uploadTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择上传时间">
</el-date-picker>
</el-form-item>
<el-form-item label="上传人员" prop="uploadUser">
<el-input v-model="form.uploadUser" placeholder="请输入上传人员" />
</el-form-item>
</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>
</div>
</template>
<script>
import { listFile, getFile, delFile, addFile, updateFile } from "@/api/sch/file";
import { listFile, delFile, } from "@/api/sch/file";
import { getToken } from '@/utils/auth'
export default {
name: "File",
@ -108,27 +63,21 @@ export default {
showSearch: true,
//
total: 0,
//
fileList: [],
//
title: "",
//
open: false,
tableList: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
deptId: null,
fileName: null,
fileUrl: null,
uploadTime: null,
uploadUser: null
fileName: null
},
upload: {
//
isUploading: false,
//
headers: { Authorization: 'Bearer ' + getToken() },
//
url: process.env.VUE_APP_BASE_API + '/sch/file/upload',
},
//
form: {},
//
rules: {
}
};
},
created() {
@ -139,28 +88,12 @@ export default {
getList() {
this.loading = true;
listFile(this.queryParams).then(response => {
this.fileList = response.rows;
this.tableList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
fileId: null,
deptId: null,
fileName: null,
fileUrl: null,
uploadTime: null,
uploadUser: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
@ -171,63 +104,33 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.fileId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加文件";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const fileId = row.fileId || this.ids
getFile(fileId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改文件";
});
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.fileId != null) {
updateFile(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addFile(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
//
handleFileSuccess(response, file, fileList) {
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.$message.success('上传成功');
this.getList();
},
/** 删除按钮操作 */
handleDelete(row) {
const fileIds = row.fileId || this.ids;
this.$modal.confirm('是否确认删除文件编号为"' + fileIds + '"的数据项?').then(function () {
return delFile(fileIds);
this.$modal.confirm('是否确认删除文件名为"' + row.fileName + '"的数据项?').then(function () {
return delFile(row);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$message.success('删除成功');
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download('system/file/export', {
...this.queryParams
}, `file_${new Date().getTime()}.xlsx`)
handleDownload(row) {
this.download('sch/file/download', {
...row
}, row.fileName)
}
}
};

@ -0,0 +1,115 @@
<template>
<el-dialog title="驾校信息" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="600px" @close="closeDialog">
<div>
<el-form ref="dialogForm" :model="dialogForm" :rules="dataRule" label-position="top" @keyup.enter.native="dialogFormSubmit()">
<el-form-item label="制度名" prop="ruleName">
<el-input v-model="dialogForm.ruleName" placeholder="请输入制度名" />
</el-form-item>
<el-form-item label="实施时间" prop="implementTime">
<el-date-picker clearable v-model="dialogForm.implementTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择实施时间">
</el-date-picker>
</el-form-item>
<el-form-item label="到期时间" prop="dueTime">
<el-date-picker clearable v-model="dialogForm.dueTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择到期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="制度内容" prop="ruleContent">
<editor v-model="dialogForm.ruleContent" :min-height="192" />
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button plain @click="(visible=false)">取消</el-button>
<el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
</span>
</el-dialog>
</template>
<script>
import { addRules, updateRules } from "@/api/sch/rules";
export default {
data() {
return {
visible: false,
canSubmit: true,
dialogForm: {
ruleId: undefined,
ruleName: undefined,
implementTime: undefined,
dueTime: undefined,
ruleContent: undefined
},
dataRule: {
ruleName: [{ required: true, message: '制度名不能为空', trigger: 'blur' }],
implementTime: [{ required: true, message: '实施时间不能为空', trigger: 'blur' }],
ruleContent: [{ required: true, message: '制度内容不能为空', trigger: 'blur' }]
}
};
},
methods: {
init(info = undefined) {
// debugger
this.visible = true;
this.$nextTick(() => {
this.resetDialogForm();
this.$refs['dialogForm'].resetFields();
if (info) {
this.dialogForm = this.deepClone(info);
}
});
},
resetDialogForm() {
this.dialogForm = {
ruleId: undefined,
ruleName: undefined,
implementTime: undefined,
dueTime: undefined,
ruleContent: undefined
};
},
closeDialog() {
this.$emit('update:dialogVisible', false);
},
//
dialogFormSubmit() {
this.$refs.dialogForm.validate((valid) => {
if (valid) {
this.canSubmit = false;
if (this.dialogForm.ruleId) {
//
updateRules(this.dialogForm)
.then((resp) => {
this.canSubmit = true;
if (resp.code == 200) {
this.$message.success('保存成功');
this.$emit('refreshDataList');
this.visible = false;
}
})
.catch(() => {
this.canSubmit = true;
});
} else {
addRules(this.dialogForm)
.then((resp) => {
this.canSubmit = true;
if (resp.code == 200) {
this.$message.success('保存成功');
this.$emit('refreshDataList');
this.visible = false;
}
})
.catch(() => {
this.canSubmit = true;
});
}
}
});
}
}
};
</script>

@ -0,0 +1,46 @@
<template>
<div>
<el-form ref="searchForm" :model="searchForm" inline>
<el-row>
<el-form-item label="制度名" prop="ruleName">
<el-input v-model="searchForm.ruleName" placeholder="请输入制度名" clearable />
</el-form-item>
<el-form-item label-width="0">
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-row>
</el-form>
</div>
</template>
<script>
import DMRadio from '@/components/DMRadio';
export default {
components: {
DMRadio
},
data() {
return {
searchForm: {},
dateRange: []
}
},
created() {
},
methods: {
resetQuery() {
this.searchForm = {
ruleName: undefined
};
this.dateRange = []
this.$emit('search')
},
pickDateChange() {
this.addDateRange(this.searchForm, this.dateRange)
}
},
}
</script>

@ -1,42 +1,17 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="制度名" prop="ruleName">
<el-input v-model="queryParams.ruleName" placeholder="请输入制度名" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="实施时间" prop="implementTime">
<el-date-picker clearable v-model="queryParams.implementTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择实施时间">
</el-date-picker>
</el-form-item>
<el-form-item label="到期时间" prop="dueTime">
<el-date-picker clearable v-model="queryParams.dueTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择到期时间">
</el-date-picker>
</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>
<!-- 搜索插件 -->
<SearchForm v-show="showSearch" ref="SearchForm" @search="_getTableList" />
<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:rules:add']">新增</el-button>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddAndUpdate(undefined)" v-hasPermi="['sch:rules: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:rules: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:rules:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:rules:export']">导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="_getTableList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="rulesList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="${comment}" align="center" prop="ruleId" />
<el-table v-loading="loading" :data="tableList">
<el-table-column type="index" width="55" align="center" />
<el-table-column label="制度名" align="center" prop="ruleName" />
<el-table-column label="实施时间" align="center" prop="implementTime" width="180">
<template slot-scope="scope">
@ -51,48 +26,30 @@
<el-table-column label="制度内容" align="center" prop="ruleContent" />
<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:rules:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:rules:remove']">删除</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleAddAndUpdate(scope.row)" v-hasPermi="['sch:rules:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['sch:rules:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<pagination v-show="total>0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" @pagination="_getTableList" />
<!-- 添加或修改规章制度对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="制度名" prop="ruleName">
<el-input v-model="form.ruleName" placeholder="请输入制度名" />
</el-form-item>
<el-form-item label="实施时间" prop="implementTime">
<el-date-picker clearable v-model="form.implementTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择实施时间">
</el-date-picker>
</el-form-item>
<el-form-item label="到期时间" prop="dueTime">
<el-date-picker clearable v-model="form.dueTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择到期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="制度内容">
<editor v-model="form.ruleContent" :min-height="192" />
</el-form-item>
<el-form-item label="是否删除" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入是否删除" />
</el-form-item>
</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>
<RuleDialogForm v-if="dialogVisible" ref="ruleDialogForm" :dialog-visible="dialogVisible" @refreshDataList="_getTableList" />
</div>
</template>
<script>
import { listRules, getRules, delRules, addRules, updateRules } from "@/api/sch/rules";
import { listRules, getRules, delRules } from "@/api/sch/rules";
import SearchForm from "./components/SearchForm.vue";
import RuleDialogForm from "./components/RuleDialogForm.vue";
export default {
name: "Rules",
components: {
SearchForm, RuleDialogForm
},
data() {
return {
//
@ -108,129 +65,47 @@ export default {
//
total: 0,
//
rulesList: [],
//
title: "",
//
open: false,
tableList: [],
//
queryParams: {
searchForm: {
pageNum: 1,
pageSize: 10,
ruleName: null,
implementTime: null,
dueTime: null,
ruleContent: null,
pageSize: 10
},
//
form: {},
//
rules: {
}
dialogVisible: false
};
},
created() {
this.getList();
this._getTableList();
},
methods: {
/** 查询规章制度列表 */
getList() {
_getTableList() {
this.loading = true;
listRules(this.queryParams).then(response => {
this.rulesList = response.rows;
const tempForm = this.$refs.SearchForm?.searchForm || {};
const params = { ...this.searchForm, ...tempForm };
listRules(params).then(response => {
this.tableList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
ruleId: null,
ruleName: null,
implementTime: null,
dueTime: null,
ruleContent: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
delFlag: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.ruleId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加规章制度";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const ruleId = row.ruleId || this.ids
getRules(ruleId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改规章制度";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.ruleId != null) {
updateRules(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addRules(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
handleAddAndUpdate(info) {
this.dialogVisible = true
this.$nextTick(() => {
this.$refs.ruleDialogForm.init(info)
})
},
/** 删除按钮操作 */
handleDelete(row) {
const ruleIds = row.ruleId || this.ids;
this.$modal.confirm('是否确认删除规章制度编号为"' + ruleIds + '"的数据项?').then(function () {
this.$modal.confirm('是否确认删除规章制度名为"' + row.ruleName + '"的数据项?').then(function () {
return delRules(ruleIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this._getTableList();
this.$message.success('删除成功');
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
this.download('system/rules/export', {
...this.queryParams
}, `rules_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -1,769 +0,0 @@
<!-- eslint-disable vue/max-attributes-per-line -->
<template>
<div class="app-container">
<el-row>
<el-form ref="queryForm" :model="queryParams" inline>
<el-row>
<el-form-item>
<el-input v-model="queryParams.name" placeholder="姓名/联系方式" clearable style="width: 200px" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-select v-model="queryParams.source" placeholder="选择线索来源" clearable @change="handleQuery">
<el-option v-for="dict in sourceOptions" :key="dict.dictValue" :value="dict.dictValue" />
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="queryParams.intentionState" placeholder="选择意向状态" clearable @change="handleQuery">
<el-option v-for="dict in intentionOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue">
<i class="el-icon-star-on" :style="dict.cssClass" />
<span style="float: right; color: #8492a6; font-size: 13px">{{ dict.dictValue }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="queryParams.followUser2" placeholder="选择跟进人员" filterable clearable @change="handleQuery">
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker v-model="queryParams.createTime" style="width: 240px" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="handleQuery" />
</el-form-item>
</el-row>
<el-row>
<el-form-item label-width="80">
<template slot="label">
<el-button type="text" @click="handleFilter">筛选</el-button>
</template>
<el-checkbox-group v-model="queryParams.etc" @change="etcChange">
<el-checkbox v-if="filterItems.myCreate" label="myCreate">我创建的</el-checkbox>
<el-checkbox v-if="filterItems.myValid" label="myValid">我的有效</el-checkbox>
<el-checkbox v-if="filterItems.valid" label="valid">有效线索</el-checkbox>
<el-checkbox v-if="filterItems.todayValid" label="todayValid">今日有效线索</el-checkbox>
<el-checkbox v-if="filterItems.todayFollow" label="todayFollow">今日跟踪</el-checkbox>
<el-checkbox v-if="filterItems.outtime" label="outtime">
<el-badge :value="expireCount" type="danger">过期线索</el-badge>
</el-checkbox>
<el-checkbox v-if="filterItems.relate" label="relate">相关线索</el-checkbox>
<el-checkbox v-if="filterItems.reSign" label="reSign">撞单线索</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item class="m20">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
<el-button type="primary" @click="handlePublicClue">公海</el-button>
<el-dropdown trigger="click">
<el-button type="primary">
更多
<i class="el-icon-arrow-down el-icon--right" />
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="handleImport(false)">导入</el-dropdown-item>
<el-dropdown-item @click.native="handleImport(true)">一点通导入</el-dropdown-item>
<el-dropdown-item v-if="admin == 'true'" @click.native="handleExport">导出</el-dropdown-item>
<el-dropdown-item v-if="admin == 'true'" @click.native="handleBatChUpdate()">批量修改</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-form-item>
<!-- <el-button type="primary" v-if="admin != 'true' && accept" @click="handleAccept(false)">停止接收</el-button>
<el-button type="primary" v-if="admin != 'true' && !accept" @click="handleAccept(true)">启动接收</el-button> -->
</el-row>
</el-form>
</el-row>
<CustomColumnTable v-if="!queryParams.reSign" :table-list="tableDataList" :table-loading="tableLoading" :query-params.sync="queryParams" :default-columns="tableAllFields.map((item) => item.prop)" :sortable-columns="tableAllFields.map((item) => item.prop)" :table-all-fields="tableAllFields" :selectable="true" @getlist="getPageList" @changeSort="changeSort" @clickRow="handleRowClick" @selectRow="selectRow">
<template #appendColumn>
<!-- <el-table-column label="备注" prop="clueMemo" sortable min-width="140" show-overflow-tooltip=true v-if="!queryParams.reSign" /> -->
<el-table-column v-if="!queryParams.reSign" label="意向状态" prop="intentionState" sortable fixed="right" min-width="100">
<template slot-scope="{ row }">
<el-tag effect="dark" style="border: none" :color="tagColorMap[row.intentionState]">{{ row.intentionState }}</el-tag>
</template>
</el-table-column>
<el-table-column v-if="!queryParams.reSign" label="操作" fixed="right" width="320">
<template slot-scope="scope">
<el-button v-if="admin == 'true' || scope.row.followUser2 == userId" type="text" icon="el-icon-edit" @click.native.stop="handleUpdate(scope.row)">编辑</el-button>
<el-button v-if="(admin == 'true' || scope.row.followUser2 == userId) && scope.row.refuse" type="text" icon="el-icon-edit" @click.native.stop="handleRefuse(scope.row)">甩单驳回</el-button>
<el-button v-if="(admin == 'true' || scope.row.followUser2 == userId) && !scope.row.refuse" type="text" icon="el-icon-edit" :style="{ color: `${scope.row.offlineReceiver ? '#26A69A' : '#409EFF'}` }" @click.native.stop="handleDistribute(scope.row)">甩单</el-button>
<el-button v-if="(admin == 'true' || scope.row.followUser2 == userId) && scope.row.state" type="text" icon="el-icon-edit" style="color: #26a69a" @click.native.stop="handleSign1(scope.row)">已登记</el-button>
<el-button v-if="(admin == 'true' || scope.row.followUser2 == userId) && !scope.row.state" type="text" icon="el-icon-edit" @click.native.stop="handleSign1(scope.row)">未登记</el-button>
<el-button v-if="admin == 'true' || scope.row.followUser2 == userId" type="text" icon="el-icon-delete" @click.native.stop="handleDelete(scope.row)">删除</el-button>
<el-button v-if="admin == 'true' || scope.row.followUser2 == userId" type="text" icon="el-icon-delete" @click.native.stop="handleDiscard(scope.row)">释放</el-button>
</template>
</el-table-column>
</template>
</CustomColumnTable>
<CustomColumnTable v-else :table-list="tableDataList" :table-loading="tableLoading" :query-params.sync="queryParams" :default-columns="tableAllFields.filter((item) => item.show).map((item) => item.prop)" :sortable-columns="tableAllFields.filter((item) => item.show).map((item) => item.prop)" :table-all-fields="tableAllFields.filter((item) => item.show)" :selectable="true" @getlist="getPageList" @changeSort="changeSort" @clickRow="handleRowClick" @selectRow="selectRow" />
<el-drawer :visible.sync="clueVisible" size="90%" append-to-body destroy-on-close>
<div slot="title">
<div v-if="clueInfo.consultCount && clueInfo.consultCount < 2">
学员信息
<span v-if="clueInfo.name">-{{ clueInfo.name }}</span>
</div>
<el-popover v-else placement="top-start" trigger="hover">
<el-table :data="consultRecord">
<el-table-column width="120" prop="consultTime" label="咨询日期" />
<el-table-column width="100" prop="consultUserName" label="咨询人" />
</el-table>
<el-badge slot="reference" :value="clueInfo.consultCount">
<span>
学员信息
<span v-if="clueInfo.name">-{{ clueInfo.name }}</span>
</span>
</el-badge>
</el-popover>
</div>
<clue-form v-if="clueVisible" ref="clueInfo" v-model="clueInfo" :options="{ userOptions: userOptions2, sourceOptions: sourceOptions, intentionOptions: intentionOptions, placeInfo: placeInfo }" />
<div class="drawer-form__footer">
<div style="flex: 1; text-align: right">
<template v-if="saveNextShow">
<el-checkbox v-model="saveNext" />
<span class="ml5">保存后继续创建下一条</span>
</template>
</div>
<div class="ml0" style="width: 60%; display: flex">
<el-button class="footer_button" @click="clueVisible = false"> </el-button>
<el-button class="footer_button" type="primary" :loading="modalSaveLoading" @click="handleSaveClue"> </el-button>
</div>
</div>
</el-drawer>
<el-dialog :title="dialogTitle" :visible.sync="dialogShow" custom-class="dialog500" :width="dialogWidth">
<component :is="componentName" v-if="dialogShow" ref="form" v-model="form" :options="dialogFormOptions" />
<span v-if="dialogFooterShow" slot="footer">
<el-button @click="dialogShow = false">取消</el-button>
<el-button type="primary" :loading="dialogSaving" @click="handleDialogConfirm">确定</el-button>
</span>
</el-dialog>
<!-- 用户导入对话框 -->
<el-dialog title="学员信息导入" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload action="#" accept=".xlsx, .xls" :show-file-list="false" :http-request="handleUpload" :disabled="upload.isUploading" drag>
<i class="el-icon-upload" />
<div class="el-upload__text">
将文件拖到此处
<em>点击上传</em>
</div>
<div slot="tip" class="el-upload__tip">
<el-link type="info" style="font-size: 12px" @click="importTemplate">下载模板</el-link>
</div>
<div slot="tip" class="el-upload__tip" style="color: red">提示仅允许导入xlsxlsx格式文件</div>
</el-upload>
</el-dialog>
</div>
</template>
<script>
import {
getClueList,
exportData,
importTemplate,
deleteClue,
refuse,
getClueCountBadge,
addClue,
updateClue,
getSign,
saveSign,
getConsultRecord,
saveDistribute,
batchUpdate,
discardClue,
updateAccept,
getAccept
} from '@/api/zs/clue';
import { importData } from '@/api/tool/common';
import empApi from '@/api/system/employee'
import { getAllPlaces } from '@/api/sch/place'
export default {
name: 'Clue',
components: {
CustomColumnTable: () => ({
component: import('@/components/CustomColumnTable')
}),
ClueForm: () => ({ component: import('./components/clueForm') }),
DistributeForm: () => ({ component: import('./components/distributeForm.vue') }),
SignForm: () => ({ component: import('./components/signForm') }),
BatchUpdateForm: () => ({ component: import('./components/batchUpdateForm') }),
FilterForm: () => ({ component: import('./components/filterForm') }),
PublicTable: () => ({ component: import('./components/publicTable') })
},
data() {
return {
admin: localStorage.getItem('admin'),
userId: localStorage.getItem('userId'),
tagColorMap: {
A高意向: '#ff7043',
B中意向: '#26a69a',
C无意向: '#5c6bc0',
D未知意向: '#ef5350',
报名成功: '#ffa726',
报名他校: '#afaeb0',
无效线索: '#afaeb0'
},
dialogShow: false,
dialogFooterShow: false,
componentName: undefined,
dialogTitle: '',
dialogWidth: '50%',
form: {},
dialogSaving: false,
dialogFormOptions: [],
clueVisible: false,
distributeVisible: false,
queryParams: {
pageNum: 1,
pageSize: 10,
createTime: [],
name: undefined,
intentionState: undefined,
followUser2: undefined,
source: undefined,
etc: [],
total: 0
},
tableAllFields: [
{ prop: 'createTime', label: '创建时间', show: true },
{ prop: 'source', label: '线索来源', show: true },
{ prop: 'name', label: '姓名', show: true },
{ prop: 'phone', label: '联系方式', show: true },
{ prop: 'address', label: '位置', show: true },
{ prop: 'requirement', label: '学员诉求', show: true },
{ prop: 'licenseType', label: '咨询车型', show: true },
{ prop: 'followTime', label: '下次跟进时间', width: 140, show: true },
{ prop: 'firstFollowUserName', label: '首次跟进人员', width: 140, show: true },
{ prop: 'followUserName', label: '跟进人员', show: true },
{ prop: 'recentLook', label: '是否近期看场地', width: 140 },
{ prop: 'offlineReceiverName', label: '线下接待人员', width: 140, show: true },
{ prop: 'clueMemo', label: '备注', show: true }
],
tableLoading: false,
tableDataList: [],
upload: {
open: false,
isUploading: false,
// 线
ydtData: false
},
sourceOptions: [],
intentionOptions: [],
userOptions: [],
clueInfo: {},
expireCount: undefined,
placeInfo: [],
consultRecord: [],
modalSaveLoading: false,
saveNextShow: false,
saveNext: false,
clueIds: [],
filterItems: {
myCreate: true,
myValid: true,
valid: true,
todayValid: true,
todayFollow: true,
outtime: true,
relate: false,
reSign: false
},
accept: false,
employeeId: undefined,
userOptions2: []
};
},
created() {
// 线
this.getDicts('dm_source').then((response) => {
this.sourceOptions = response.data;
});
//
this.getDicts('dm_intention_state').then((response) => {
this.intentionOptions = response.data;
});
this._getClueCountBadge();
this.getPageList();
this.getEmployee();
//
this.getAllPlace();
if (localStorage.getItem(this.userId + '-filterItems')) {
this.filterItems = JSON.parse(localStorage.getItem(this.userId + '-filterItems'));
}
this.getAccept();
},
methods: {
//
handleQuery() {
this.queryParams.pageNum = 1;
this.getPageList();
},
getAccept() {
getAccept().then((resp) => {
if (resp.code === 200) {
this.accept = resp.data.accept;
this.employeeId = resp.data.employeeId;
}
});
},
getPageList() {
this.tableLoading = true;
const params = { ...this.queryParams, etc: undefined };
getClueList(params).then((response) => {
this.tableDataList = response.rows;
this.queryParams.total = response.total;
this.tableLoading = false;
});
},
//
async _getClueCountBadge() {
const resp = await getClueCountBadge();
if (resp.code === 200) {
this.expireCount = resp.data;
}
},
//
resetQuery() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
createTime: [],
name: undefined,
intentionState: undefined,
followUser2: undefined,
source: undefined,
etc: [],
total: 0
};
this.handleQuery();
},
etcChange(val) {
this.$set(this.queryParams, 'myCreate', undefined);
this.$set(this.queryParams, 'myValid', undefined);
this.$set(this.queryParams, 'valid', undefined);
this.$set(this.queryParams, 'todayValid', undefined);
this.$set(this.queryParams, 'todayFollow', undefined);
this.$set(this.queryParams, 'outtime', undefined);
this.$set(this.queryParams, 'relate', undefined);
this.$set(this.queryParams, 'reSign', undefined);
if (!this.isNullOrEmpty(val)) {
val.length > 1 && this.$set(this.queryParams, 'etc', [val[val.length - 1]]);
this.$set(this.queryParams, val[val.length - 1], true);
}
if (this.queryParams.reSign) {
this.tableAllFields = this.tableAllFields.map((item) => {
if (item.prop === 'clueMemo') {
item.show = false;
}
return item;
});
} else {
this.tableAllFields = this.tableAllFields.map((item) => {
if (item.prop === 'clueMemo') {
item.show = true;
}
return item;
});
}
this.handleQuery();
},
resetForm() {
this.clueInfo = {
clueId: undefined,
createTime: this.parseTime(new Date(), '{y}-{m}-{d} {h}:{i}'),
consultTime: undefined,
source: undefined,
name: undefined,
phone: undefined,
address: undefined,
intentionState: undefined,
followInfo: undefined,
followTime: undefined,
followUser: undefined,
signupInfo: undefined,
requirement: undefined,
licenseType: undefined
};
this.dialogFormOptions = {
userOptions: this.userOptions,
sourceOptions: this.sourceOptions,
intentionOptions: this.intentionOptions,
placeInfo: this.placeInfo
};
},
//
handleAdd() {
this.resetForm();
this.clueVisible = true;
this.saveNextShow = true;
this.saveNext = false;
this.getEmployee2();
},
//
handleUpdate(listItem) {
this.clueVisible = true;
this.clueInfo = listItem;
this.saveNextShow = false;
this.saveNext = false;
this.getEmployee2();
//
this.getConsultRecord(listItem.clueId);
},
//
getConsultRecord(clueId) {
getConsultRecord({ clueId }).then((resp) => {
if (resp && resp.code === 200 && resp.data) {
this.consultRecord = resp.data;
}
});
},
handleRowClick(row) {
if (!this.queryParams.reSign) {
this.handleUpdate(row);
}
},
//
handleDelete(item) {
this.$confirm('是否确认删除该条线索(“' + item.name + '/' + item.phone + '”)?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then((res) => {
deleteClue({ clueId: item.clueId }).then((resp) => {
if (resp.code === 200) {
this.$message.success('删除成功');
this.getPageList();
}
});
})
.catch(function () { });
},
/** 导出按钮操作 */
handleExport() {
this.$confirm('是否确认导出所有学员信息项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const resp = await exportData(this.opearateRequestParams(this.queryParams));
this.download(resp.msg);
});
},
/** 导入按钮操作 */
handleImport(ydtData) {
this.upload.open = true;
this.upload.ydtData = ydtData;
},
/** 下载模板操作 */
importTemplate() {
importTemplate({ ydtData: this.upload.ydtData }).then((response) => {
this.download(response.msg);
});
},
async handleUpload(data) {
const formData = new FormData();
formData.append('file', data.file);
this.upload.isUploading = true;
importData(this.upload.ydtData, formData).then((resp) => {
this.upload.isUploading = false;
if (resp.code === 200) {
this.$alert(resp.msg, '导入结果', {
dangerouslyUseHTMLString: true
});
this.upload.open = false;
this.getList();
}
});
},
getEmployee() {
empApi.getEmployee({ coach: false }).then((resp) => {
if (resp.code === 200) {
this.userOptions = resp.data;
}
});
},
// 线
getEmployee2() {
empApi.getEmployee().then((resp) => {
if (resp.code === 200) {
this.userOptions2 = resp.data;
this.userOptions2 = this.userOptions2.filter((item) => {
return item.accept;
});
}
});
},
changeSort(val) {
if (val.order) {
this.queryParams.orderName = val.prop;
if (val.order === 'ascending') {
this.queryParams.orderType = 'asc';
} else {
this.queryParams.orderType = 'desc';
}
} else {
this.queryParams.orderName = undefined;
this.queryParams.orderType = undefined;
}
this.getPageList();
},
handleDistribute(item) {
this.dialogTitle = '甩单';
this.dialogWidth = '700px';
this.componentName = 'DistributeForm';
this.dialogFormOptions = {
userOptions: this.userOptions,
offlineReceiver: item.offlineReceiver
};
this.dialogFooterShow = true;
this.form = {
clueId: item.clueId,
offlineReceiverName: item.offlineReceiverName,
offlineReceiver: undefined,
memo: item.memo
};
this.dialogShow = true;
},
handleRefuse(item) {
refuse({ clueId: item.clueId }).then((resp) => {
if (resp.code === 200) {
this.$message.success('驳回成功');
this.getPageList();
}
});
},
resetSignForm() {
this.form = {
dealDate: this.parseTime(new Date(), '{y}-{m}-{d}'),
signSchool: undefined,
schoolName: undefined,
signPlace: undefined,
placeName: undefined,
signClass: undefined,
className: undefined,
signPrice: undefined,
schoolPeople: undefined,
schoolPay: undefined,
alipay: undefined,
profit: undefined,
percentage: undefined,
detail: undefined,
dealState: undefined,
extraPayType: undefined,
extraPay: undefined,
percentageState: undefined,
memo: undefined,
createTime: undefined,
updateTime: undefined,
state: true,
commission: undefined
};
this.dialogFormOptions = {
userOptions: this.userOptions,
sourceOptions: this.sourceOptions,
placeInfo: this.placeInfo
};
},
async handleSign1(item) {
this.dialogTitle = '成交登记';
this.dialogWidth = '800px';
this.componentName = 'SignForm';
this.dialogFooterShow = true;
this.resetSignForm();
const resp = await getSign({ clueId: item.clueId });
if (resp.code === 200) {
const {
clueId,
consultTime,
name,
phone,
source,
followUser,
followUser2,
followUserName,
offlineReceiver,
offlineReceiver2,
offlineReceiverName
} = item;
this.form = Object.assign({}, this.form, {
clueId,
consultTime,
name,
phone,
source,
followUser,
followUser2,
followUserName,
offlineReceiver,
offlineReceiver2,
offlineReceiverName
});
if (resp.data) {
this.form = { ...this.form, ...resp.data };
this.dialogFooterShow = this.form.signEdit;
}
this.dialogShow = true;
}
},
getAllPlace() {
getAllPlaces({ status: '0' }).then((resp) => {
this.placeInfo = resp.data.filter((item) => item.schoolShow && item.showInMap);
});
},
handleSaveClue() {
this.$refs.clueInfo.validateForm().then(async (valid) => {
if (valid) {
this.modalSaveLoading = true;
let resp;
if (this.clueInfo.clueId) {
resp = await updateClue(this.clueInfo);
this.modalSaveLoading = false;
if (resp.code === 200) {
this.$message.success('修改成功');
this.getPageList();
this.clueVisible = false;
}
} else {
resp = await addClue(this.clueInfo);
this.modalSaveLoading = false;
if (resp.code === 200) {
this.$message.success('新增成功');
if (this.saveNext) {
this.resetForm();
} else {
this.getPageList();
this.clueVisible = false;
}
}
}
}
});
},
handleDialogConfirm() {
this.$refs.form.validate().then(async (valid) => {
if (valid) {
let resp;
this.dialogSaving = true;
if (this.componentName === 'SignForm') {
//
this.form.checkState = 1;
resp = await saveSign(this.form);
} else if (this.componentName === 'DistributeForm') {
resp = await saveDistribute(this.form);
} else if (this.componentName === 'BatchUpdateForm') {
resp = await batchUpdate(this.form);
} else if (this.componentName === 'FilterForm') {
this.filterItems = { ...this.form };
localStorage.setItem(this.userId + '-filterItems', JSON.stringify(this.filterItems));
this.$message.success('操作成功');
this.dialogShow = false;
}
this.dialogSaving = false;
if (resp && resp.code === 200) {
this.$message.success('操作成功');
this.dialogShow = false;
this.getPageList();
}
}
});
},
//
selectRow(val) {
console.log(val);
this.clueIds = [];
if (val && val.length > 0) {
this.clueIds = val.map((item) => item.clueId);
}
},
//
handleBatChUpdate() {
this.getEmployee2();
//
if (!this.clueIds || this.clueIds.length <= 0) {
//
this.$message.error('请至少选择一条数据!');
} else {
//
this.dialogTitle = '批量修改';
this.dialogWidth = '500px';
this.componentName = 'BatchUpdateForm';
this.dialogFormOptions = {
userOptions: this.userOptions2
};
this.dialogFooterShow = true;
this.form = {
followUsers: [],
clueIds: this.clueIds
};
this.dialogShow = true;
}
},
//
handleFilter() {
//
this.dialogTitle = '筛选配置';
this.dialogWidth = '500px';
this.componentName = 'FilterForm';
this.dialogFormOptions = {
userOptions: this.userOptions
};
this.dialogFooterShow = true;
this.form = { ...this.filterItems };
this.dialogShow = true;
},
handlePublicClue() {
//
this.dialogTitle = '公海线索';
this.dialogWidth = '900px';
this.componentName = 'PublicTable';
this.dialogFormOptions = {
userOptions: this.userOptions
};
this.dialogFooterShow = false;
this.form = {};
this.dialogShow = true;
},
handleDiscard(item) {
discardClue(item).then((resp) => {
if (resp && resp.code === 200) {
this.$message.success('释放成功');
this.getPageList();
}
});
},
// 线
handleAccept(accept) {
updateAccept({ employeeId: this.employeeId, accept: accept }).then((resp) => {
if (resp.code === 200) {
this.$message.success(accept ? '启动成功' : '停止成功');
this.accept = accept;
}
});
}
}
};
</script>
<style scoped>
.drawer-form__footer {
border-top: 1px solid rgba(69, 74, 91, 0.1);
position: absolute;
bottom: 0;
left: 0;
right: 0;
display: flex;
align-items: center;
height: 50px;
line-height: 50px;
z-index: 2;
background: #fff;
}
.footer_button {
width: 49%;
margin: auto;
}
</style>

@ -18,8 +18,6 @@
</el-dialog>
</template>
<script>
import { importTemplate } from '@/api/zs/clue';
import { importData } from '@/api/tool/common';
import { getToken } from '@/utils/auth'
export default {

@ -1,411 +0,0 @@
<template>
<!-- 成交登记对话框 -->
<el-dialog title="审核" :visible.sync="modalVisible" width="800px" append-to-body :close-on-click-modal="false">
<el-tabs v-model="checkTab" @tab-click="handleClick">
<el-tab-pane label="登记信息" name="first">
</el-tab-pane>
<el-tab-pane label="审核" name="second">
</el-tab-pane>
</el-tabs>
<!-- 显示登记内容 -->
<div v-show="first" style="height:500px;overflow-y:auto;">
<el-form :model="modalForm" ref="modalForm" label-width="110px">
<el-row>
<el-col :span="12">
<el-form-item label="学员联系方式" prop="phone">
<el-input v-model="modalForm.phone" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="学员姓名" prop="name">
<el-input v-model="modalForm.name" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="线索来源" prop="source">
<el-select v-model="modalForm.source" placeholder="请选择" size="small" disabled>
<el-option v-for="dict in sourceOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否全款" prop="state">
<el-radio-group v-model="modalForm.state" disabled>
<el-radio :label="true">全款</el-radio>
<el-radio :label="false">非全款</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="成交日期" prop="dealDate">
<el-date-picker v-model="modalForm.dealDate" size="small" disabled value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报名价格(元)" prop="signPrice">
<el-input v-model="modalForm.signPrice" placeholder="学员报名时需要交纳总共的钱" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="报名驾校" prop="signSchool">
<el-select v-model="modalForm.signSchool" filterable placeholder="请选择" clearable size="small" disabled>
<el-option v-for="dict in schoolOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="报名场地" prop="signPlace">
<el-select v-model="modalForm.signPlace" filterable placeholder="请选择" clearable size="small" disabled>
<el-option v-for="dict in placeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="报名班型" prop="signClass">
<el-select v-model="modalForm.signClass" filterable placeholder="请选择" clearable size="small" disabled>
<el-option v-for="dict in classTypeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="对接人" prop="schoolPeople">
<el-input v-model="modalForm.schoolPeople" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="驾校支付" prop="schoolPay">
<el-input type="number" v-model="modalForm.schoolPay" placeholder="请输入驾校支付金额" disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="驾考宝典款" prop="alipay">
<el-input v-model="modalForm.alipay" placeholder="请输入驾考宝典款金额" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="额外支出" prop="extraPayType">
<el-select v-model="modalForm.extraPayType" filterable placeholder="请选择" clearable size="small" disabled>
<el-option v-for="dict in extraPayTypeOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="额外支出金额" prop="extraPay">
<el-input placeholder="请输入额外支出金额" v-model="modalForm.extraPay" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="归属人员" prop="followUser">
<el-select v-model="modalForm.followUser" multiple placeholder="请选择" clearable size="small" disabled>
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属区域" prop="area">
<el-select v-model="modalForm.area" placeholder="请选择" clearable size="small" disabled>
<el-option v-for="dict in areaOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="线下接待人员" prop="offlineReceiver">
<el-select v-model="modalForm.offlineReceiver" multiple placeholder="请选择" clearable size="small" :disabled="!modalForm.signEdit || modalForm.clueId != undefined">
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item>
</el-col>-->
</el-row>
<el-row v-if="admin == 'true'">
<el-col :span="12">
<el-form-item label="佣金明细" prop="commission">
<el-select v-model="modalForm.commission" placeholder="请选择" clearable size="small" disabled>
<el-option v-for="dict in commissionOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注" prop="memo">
<el-input type="textarea" :rows="2" v-model="modalForm.memo" disabled></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="凭据" prop="memo">
<div class="demo-image__preview">
<div v-for="(item, index) in modalForm.fileList" :key="index" class="pr dib">
<el-image class="image-list-item" fit="contain" :src="preUrl + item.url" :preview-src-list="modalForm.fileList.map(url => preUrl + url)" lazy />
</div>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="修改记录">
<el-timeline style="max-height:260px;overflow-y:auto;">
<el-timeline-item v-for="info in updateRecord" :key="info.record" :timestamp="info.operateTime" placement="top" style="padding:5px !important;">
<el-card>
<span style="display:block;font-weight: bold; font-size:13px;">用户 {{info.operateUserName}}</span>
<span v-html="info.centent" style="display:block;padding-left: 10px; font-size:13px;" />
</el-card>
</el-timeline-item>
</el-timeline>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<!-- 录入审核结果 -->
<div v-show="second" style="height:500px;overflow-y:auto;">
<el-form :model="modalForm2" ref="modalForm2" label-width="110px">
<el-row v-if="admin == 'true'">
<el-col :span="12">
<el-form-item label="回款状态" prop="moneyState">
<el-select v-model="modalForm2.moneyState" placeholder="请选择" clearable size="small">
<el-option v-for="dict in moneyStateOptions" :key="dict.uid" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="驳回理由" prop="rejectReason">
<el-input type="textarea" :rows="2" v-model="modalForm2.rejectReason"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="审核记录">
<el-timeline style="max-height:260px;overflow-y:auto;">
<el-timeline-item v-for="info in checkRecord" :key="info.record" :timestamp="info.operateTime" placement="top" style="padding:5px !important;">
<el-card>
<span style="display:block;font-weight: bold; font-size:13px;">用户 {{info.operateUserName}}</span>
<span v-html="info.centent" style="display:block;padding-left: 10px; font-size:13px;" />
</el-card>
</el-timeline-item>
</el-timeline>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<span slot="footer">
<el-button type="primary" v-if="first" :loading="loading" @click="handleNext">下一步</el-button>
<el-button type="primary" v-if="second" :loading="loading" @click="handleBack">上一步</el-button>
<el-button type="primary" v-if="second" :loading="loading" @click="handleCheck(2)">通过</el-button>
<el-button type="primary" v-if="second" :loading="loading" @click="handleCheck(3)">驳回</el-button>
<el-button @click="modalVisible = false"> </el-button>
</span>
</el-dialog>
</template>
<script>
import { checkSign, getCheckRecord } from '@/api/zs/sign'
import { validateMoney } from '@/utils/validate'
import { getToken } from '@/utils/auth'
import {
getEmployee,
getSchools,
getPlaces,
getClassTypes,
} from '@/api/tool/common'
export default {
name: 'Check',
data() {
return {
admin: localStorage.getItem('admin'),
preUrl: process.env.VUE_APP_BASE_API,
userId: localStorage.getItem('userId'),
modalVisible: false,
signLoading: false,
first: true,
second: false,
modalForm: {},
modalRules: {
name: { required: true, message: '姓名不为空', trigger: 'blur' },
phone: { required: true, message: '联系方式不为空', trigger: 'blur' },
source: { required: true, message: '线索来源不为空', trigger: 'blur' },
area: { required: true, message: '所属区域不为空', trigger: 'blur' },
},
userOptions: [],
clueOptions: [],
schoolOptions: [],
placeOptions: [],
classTypeOptions: [],
sourceOptions: [],
commissionOptions: [],
extraPayTypeOptions: [],
areaOptions: [],
moneyStateOptions: [],
modalForm2: {},
loading: false,
updateRecord: [],
checkRecord: [],
dialogImageUrl: '',
dialogVisible: false,
fileList: [],
picList: [],
}
},
created() {
//线
this.getDicts('dm_source').then((response) => {
this.sourceOptions = response.data
})
//
this.getDicts('dm_commission').then((response) => {
this.commissionOptions = response.data
})
//
this.getDicts('dm_extra_pay').then((response) => {
this.extraPayTypeOptions = response.data
})
//s
this.getDicts('dm_area').then((response) => {
this.areaOptions = response.data
})
//
this.getDicts('dm_money_state').then((response) => {
this.moneyStateOptions = response.data
})
},
methods: {
init(data) {
console.log('打开弹框')
this.resetForm('modalForm')
this.modalForm = data
this.getSchools()
this.getPlaces()
this.getClassTypes()
this.getEmployee()
this.fileList = []
this.picList = []
if (data.fileList) {
this.fileList = data.fileList
for (let i in this.fileList) {
this.picList.push(this.fileList[i]) //.url
}
}
console.log(this.picList)
this.getUpdateRecord(this.modalForm.signId)
this.modalVisible = true
this.first = true
this.second = false
this.resetForm('modalForm2')
this.modalForm2 = {
signId: this.modalForm.signId,
checkState: undefined,
rejectReason: data.rejectReason,
moneyState: data.moneyState,
}
this.getCheckRecord(this.modalForm.signId)
},
getSchools() {
getSchools().then((resp) => {
this.schoolOptions = resp.data
})
},
getPlaces() {
getPlaces({ deptId: this.modalForm.signSchool, status: '0' }).then(
(resp) => {
this.placeOptions = resp.data
}
)
},
getClassTypes() {
getClassTypes({
deptId: this.modalForm.signSchool,
placeId: this.modalForm.signPlace,
status: '0',
}).then((resp) => {
this.classTypeOptions = resp.data
})
},
getEmployee() {
getEmployee({ coach: false }).then((resp) => {
if (resp.code == 200) {
this.userOptions = resp.data
}
})
},
handleNext() {
this.first = false
this.second = true
},
handleBack() {
this.first = true
this.second = false
},
handleCheck(state) {
this.modalForm2.checkState = state
this.modalForm2.signId = this.modalForm.signId
this.loading = true
checkSign(this.modalForm2).then((resp) => {
if (resp && resp.code == 200) {
if (state == 2) {
this.$message.success('通过成功!')
} else {
this.$message.success('驳回成功!')
}
this.modalVisible = false
this.loading = false
this.$emit('refreshDataList')
} else {
this.loading = false
}
})
},
getCheckRecord(signId) {
getCheckRecord({ signId: signId, type: 1 }).then((resp) => {
this.checkRecord = resp.data
})
},
getUpdateRecord(signId) {
getCheckRecord({ signId: signId, type: 0 }).then((resp) => {
this.updateRecord = resp.data
})
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
},
},
}
</script>
Loading…
Cancel
Save