eslint
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
<!-- eslint-disable vue/max-attributes-per-line -->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
@@ -71,30 +72,29 @@
|
||||
</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 v-slot:appendColumn>
|
||||
<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 label="意向状态" prop="intentionState" sortable fixed="right" min-width="100" 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 label="操作" fixed="right" width="320" v-if="!queryParams.reSign">
|
||||
<el-table-column v-if="!queryParams.reSign" label="操作" fixed="right" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" icon="el-icon-edit" @click.native.stop="handleUpdate(scope.row)" v-if="admin == 'true' || scope.row.followUser2 == userId">编辑</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>
|
||||
<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">
|
||||
</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">
|
||||
@@ -117,13 +117,13 @@
|
||||
</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;">
|
||||
<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;">
|
||||
<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>
|
||||
@@ -147,15 +147,15 @@
|
||||
<em>点击上传</em>
|
||||
</div>
|
||||
<div slot="tip" class="el-upload__tip">
|
||||
<el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
|
||||
<el-link type="info" style="font-size: 12px" @click="importTemplate">下载模板</el-link>
|
||||
</div>
|
||||
<div slot="tip" class="el-upload__tip" style="color:red">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
||||
<div slot="tip" class="el-upload__tip" style="color: red">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
||||
</el-upload>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getClueList,
|
||||
exportData,
|
||||
@@ -173,20 +173,20 @@ import {
|
||||
discardClue,
|
||||
updateAccept,
|
||||
getAccept
|
||||
} from '@/api/zs/clue'
|
||||
import { getEmployee, getAllPlaces, importData } from '@/api/tool/common'
|
||||
} from '@/api/zs/clue';
|
||||
import { getEmployee, getAllPlaces, importData } from '@/api/tool/common';
|
||||
export default {
|
||||
name: 'Clue',
|
||||
components: {
|
||||
CustomColumnTable: () => ({
|
||||
component: import('@/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') }),
|
||||
PublicTable: () => ({ component: import('./components/publicTable') })
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -199,7 +199,7 @@ export default {
|
||||
D未知意向: '#ef5350',
|
||||
报名成功: '#ffa726',
|
||||
报名他校: '#afaeb0',
|
||||
无效线索: '#afaeb0',
|
||||
无效线索: '#afaeb0'
|
||||
},
|
||||
|
||||
dialogShow: false,
|
||||
@@ -221,7 +221,7 @@ export default {
|
||||
followUser2: undefined,
|
||||
source: undefined,
|
||||
etc: [],
|
||||
total: 0,
|
||||
total: 0
|
||||
},
|
||||
tableAllFields: [
|
||||
{ prop: 'createTime', label: '创建时间', show: true },
|
||||
@@ -236,8 +236,7 @@ export default {
|
||||
{ prop: 'followUserName', label: '跟进人员', show: true },
|
||||
{ prop: 'recentLook', label: '是否近期看场地', width: 140 },
|
||||
{ prop: 'offlineReceiverName', label: '线下接待人员', width: 140, show: true },
|
||||
{ prop: 'clueMemo', label: '备注', show: true },
|
||||
|
||||
{ prop: 'clueMemo', label: '备注', show: true }
|
||||
],
|
||||
tableLoading: false,
|
||||
tableDataList: [],
|
||||
@@ -245,7 +244,7 @@ export default {
|
||||
open: false,
|
||||
isUploading: false,
|
||||
// 是否一点通线索
|
||||
ydtData: false,
|
||||
ydtData: false
|
||||
},
|
||||
sourceOptions: [],
|
||||
intentionOptions: [],
|
||||
@@ -270,58 +269,56 @@ export default {
|
||||
},
|
||||
accept: false,
|
||||
employeeId: undefined,
|
||||
userOptions2: [],
|
||||
}
|
||||
userOptions2: []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// 线索来源
|
||||
this.getDicts('dm_source').then((response) => {
|
||||
this.sourceOptions = response.data
|
||||
})
|
||||
this.sourceOptions = response.data;
|
||||
});
|
||||
// 意向状态
|
||||
this.getDicts('dm_intention_state').then((response) => {
|
||||
this.intentionOptions = response.data
|
||||
})
|
||||
this._getClueCountBadge()
|
||||
this.getPageList()
|
||||
this.getEmployee()
|
||||
this.intentionOptions = response.data;
|
||||
});
|
||||
this._getClueCountBadge();
|
||||
this.getPageList();
|
||||
this.getEmployee();
|
||||
// 查询场地
|
||||
this.getAllPlace()
|
||||
this.getAllPlace();
|
||||
if (localStorage.getItem(this.userId + '-filterItems')) {
|
||||
this.filterItems = JSON.parse(
|
||||
localStorage.getItem(this.userId + '-filterItems')
|
||||
)
|
||||
this.filterItems = JSON.parse(localStorage.getItem(this.userId + '-filterItems'));
|
||||
}
|
||||
this.getAccept();
|
||||
},
|
||||
methods: {
|
||||
// 搜索
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getPageList()
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getPageList();
|
||||
},
|
||||
getAccept() {
|
||||
getAccept().then(resp => {
|
||||
if (resp.code == 200) {
|
||||
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 }
|
||||
this.tableLoading = true;
|
||||
const params = { ...this.queryParams, etc: undefined };
|
||||
getClueList(this.opearateRequestParams(params)).then((response) => {
|
||||
this.tableDataList = response.rows
|
||||
this.queryParams.total = response.total
|
||||
this.tableLoading = false
|
||||
})
|
||||
this.tableDataList = response.rows;
|
||||
this.queryParams.total = response.total;
|
||||
this.tableLoading = false;
|
||||
});
|
||||
},
|
||||
// 获取已过期
|
||||
async _getClueCountBadge() {
|
||||
const resp = await getClueCountBadge()
|
||||
const resp = await getClueCountBadge();
|
||||
if (resp.code === 200) {
|
||||
this.expireCount = resp.data
|
||||
this.expireCount = resp.data;
|
||||
}
|
||||
},
|
||||
// 重置搜索
|
||||
@@ -335,41 +332,40 @@ export default {
|
||||
followUser2: undefined,
|
||||
source: undefined,
|
||||
etc: [],
|
||||
total: 0,
|
||||
}
|
||||
this.handleQuery()
|
||||
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)
|
||||
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)
|
||||
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') {
|
||||
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') {
|
||||
this.tableAllFields = this.tableAllFields.map((item) => {
|
||||
if (item.prop === 'clueMemo') {
|
||||
item.show = true;
|
||||
}
|
||||
return item;
|
||||
})
|
||||
});
|
||||
}
|
||||
this.handleQuery()
|
||||
this.handleQuery();
|
||||
},
|
||||
resetForm() {
|
||||
this.clueInfo = {
|
||||
@@ -386,163 +382,156 @@ export default {
|
||||
followUser: undefined,
|
||||
signupInfo: undefined,
|
||||
requirement: undefined,
|
||||
licenseType: undefined,
|
||||
}
|
||||
licenseType: undefined
|
||||
};
|
||||
this.dialogFormOptions = {
|
||||
userOptions: this.userOptions,
|
||||
sourceOptions: this.sourceOptions,
|
||||
intentionOptions: this.intentionOptions,
|
||||
placeInfo: this.placeInfo,
|
||||
}
|
||||
placeInfo: this.placeInfo
|
||||
};
|
||||
},
|
||||
// 新增
|
||||
handleAdd() {
|
||||
this.resetForm()
|
||||
this.clueVisible = true
|
||||
this.saveNextShow = true
|
||||
this.saveNext = false
|
||||
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.clueVisible = true;
|
||||
this.clueInfo = listItem;
|
||||
this.saveNextShow = false;
|
||||
this.saveNext = false;
|
||||
this.getEmployee2();
|
||||
// 查询咨询记录
|
||||
this.getConsultRecord(listItem.clueId)
|
||||
this.getConsultRecord(listItem.clueId);
|
||||
},
|
||||
// 查询咨询记录
|
||||
getConsultRecord(clueId) {
|
||||
getConsultRecord({ clueId }).then((resp) => {
|
||||
if (resp && resp.code === 200 && resp.data) {
|
||||
this.consultRecord = resp.data
|
||||
this.consultRecord = resp.data;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
handleRowClick(row) {
|
||||
if (!this.queryParams.reSign) {
|
||||
this.handleUpdate(row)
|
||||
this.handleUpdate(row);
|
||||
}
|
||||
},
|
||||
// 删除
|
||||
handleDelete(item) {
|
||||
this.$confirm(
|
||||
'是否确认删除该条线索(“' + item.name + '/' + item.phone + '”)?',
|
||||
'警告',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
}
|
||||
)
|
||||
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()
|
||||
this.$message.success('删除成功');
|
||||
this.getPageList();
|
||||
}
|
||||
})
|
||||
});
|
||||
})
|
||||
.catch(function () { })
|
||||
.catch(function () {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所有学员信息项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const resp = await exportData(
|
||||
this.opearateRequestParams(this.queryParams)
|
||||
)
|
||||
this.download(resp.msg)
|
||||
})
|
||||
const resp = await exportData(this.opearateRequestParams(this.queryParams));
|
||||
this.download(resp.msg);
|
||||
});
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handleImport(ydtData) {
|
||||
this.upload.open = true
|
||||
this.upload.ydtData = ydtData
|
||||
this.upload.open = true;
|
||||
this.upload.ydtData = ydtData;
|
||||
},
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
importTemplate({ ydtData: this.upload.ydtData }).then((response) => {
|
||||
this.download(response.msg)
|
||||
})
|
||||
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
|
||||
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()
|
||||
this.upload.open = false;
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
},
|
||||
getEmployee() {
|
||||
getEmployee({ coach: false }).then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
this.userOptions = resp.data
|
||||
this.userOptions = resp.data;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
//查询不能接收线索的员工
|
||||
// 查询不能接收线索的员工
|
||||
getEmployee2() {
|
||||
getEmployee({ coach: false }).then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
this.userOptions2 = resp.data
|
||||
this.userOptions2 = this.userOptions2.filter(item => {
|
||||
this.userOptions2 = resp.data;
|
||||
this.userOptions2 = this.userOptions2.filter((item) => {
|
||||
return item.accept;
|
||||
})
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
changeSort(val) {
|
||||
if (val.order) {
|
||||
this.queryParams.orderName = val.prop
|
||||
this.queryParams.orderName = val.prop;
|
||||
if (val.order === 'ascending') {
|
||||
this.queryParams.orderType = 'asc'
|
||||
this.queryParams.orderType = 'asc';
|
||||
} else {
|
||||
this.queryParams.orderType = 'desc'
|
||||
this.queryParams.orderType = 'desc';
|
||||
}
|
||||
} else {
|
||||
this.queryParams.orderName = undefined
|
||||
this.queryParams.orderType = undefined
|
||||
this.queryParams.orderName = undefined;
|
||||
this.queryParams.orderType = undefined;
|
||||
}
|
||||
this.getPageList()
|
||||
this.getPageList();
|
||||
},
|
||||
handleDistribute(item) {
|
||||
this.dialogTitle = '甩单'
|
||||
this.dialogWidth = '700px'
|
||||
this.componentName = 'DistributeForm'
|
||||
this.dialogTitle = '甩单';
|
||||
this.dialogWidth = '700px';
|
||||
this.componentName = 'DistributeForm';
|
||||
this.dialogFormOptions = {
|
||||
userOptions: this.userOptions,
|
||||
offlineReceiver: item.offlineReceiver,
|
||||
}
|
||||
this.dialogFooterShow = true
|
||||
offlineReceiver: item.offlineReceiver
|
||||
};
|
||||
this.dialogFooterShow = true;
|
||||
this.form = {
|
||||
clueId: item.clueId,
|
||||
offlineReceiverName: item.offlineReceiverName,
|
||||
offlineReceiver: undefined,
|
||||
memo: item.memo,
|
||||
}
|
||||
this.dialogShow = true
|
||||
memo: item.memo
|
||||
};
|
||||
this.dialogShow = true;
|
||||
},
|
||||
handleRefuse(item) {
|
||||
refuse({ clueId: item.clueId }).then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
this.$message.success('驳回成功')
|
||||
this.getPageList()
|
||||
this.$message.success('驳回成功');
|
||||
this.getPageList();
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
resetSignForm() {
|
||||
this.form = {
|
||||
@@ -568,21 +557,21 @@ export default {
|
||||
createTime: undefined,
|
||||
updateTime: undefined,
|
||||
state: true,
|
||||
commission: undefined,
|
||||
}
|
||||
commission: undefined
|
||||
};
|
||||
this.dialogFormOptions = {
|
||||
userOptions: this.userOptions,
|
||||
sourceOptions: this.sourceOptions,
|
||||
placeInfo: this.placeInfo,
|
||||
}
|
||||
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 })
|
||||
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,
|
||||
@@ -595,8 +584,8 @@ export default {
|
||||
followUserName,
|
||||
offlineReceiver,
|
||||
offlineReceiver2,
|
||||
offlineReceiverName,
|
||||
} = item
|
||||
offlineReceiverName
|
||||
} = item;
|
||||
this.form = Object.assign({}, this.form, {
|
||||
clueId,
|
||||
consultTime,
|
||||
@@ -608,160 +597,155 @@ export default {
|
||||
followUserName,
|
||||
offlineReceiver,
|
||||
offlineReceiver2,
|
||||
offlineReceiverName,
|
||||
})
|
||||
offlineReceiverName
|
||||
});
|
||||
if (resp.data) {
|
||||
this.form = { ...this.form, ...resp.data }
|
||||
this.dialogFooterShow = this.form.signEdit
|
||||
this.form = { ...this.form, ...resp.data };
|
||||
this.dialogFooterShow = this.form.signEdit;
|
||||
}
|
||||
this.dialogShow = true
|
||||
this.dialogShow = true;
|
||||
}
|
||||
},
|
||||
getAllPlace() {
|
||||
getAllPlaces({ status: '0' }).then((resp) => {
|
||||
this.placeInfo = resp.data.filter(
|
||||
(item) => item.schoolShow && item.showInMap
|
||||
)
|
||||
})
|
||||
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
|
||||
this.modalSaveLoading = true;
|
||||
let resp;
|
||||
if (this.clueInfo.clueId) {
|
||||
resp = await updateClue(this.clueInfo)
|
||||
this.modalSaveLoading = false
|
||||
resp = await updateClue(this.clueInfo);
|
||||
this.modalSaveLoading = false;
|
||||
if (resp.code === 200) {
|
||||
this.$message.success('修改成功')
|
||||
this.getPageList()
|
||||
this.clueVisible = false
|
||||
this.$message.success('修改成功');
|
||||
this.getPageList();
|
||||
this.clueVisible = false;
|
||||
}
|
||||
} else {
|
||||
resp = await addClue(this.clueInfo)
|
||||
this.modalSaveLoading = false
|
||||
resp = await addClue(this.clueInfo);
|
||||
this.modalSaveLoading = false;
|
||||
if (resp.code === 200) {
|
||||
this.$message.success('新增成功')
|
||||
this.$message.success('新增成功');
|
||||
if (this.saveNext) {
|
||||
this.resetForm()
|
||||
this.resetForm();
|
||||
} else {
|
||||
this.getPageList()
|
||||
this.clueVisible = false
|
||||
this.getPageList();
|
||||
this.clueVisible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
handleDialogConfirm() {
|
||||
this.$refs.form.validate().then(async (valid) => {
|
||||
if (valid) {
|
||||
let resp
|
||||
this.dialogSaving = true
|
||||
let resp;
|
||||
this.dialogSaving = true;
|
||||
if (this.componentName === 'SignForm') {
|
||||
// 登记提交
|
||||
this.form.checkState = 1
|
||||
resp = await saveSign(this.form)
|
||||
this.form.checkState = 1;
|
||||
resp = await saveSign(this.form);
|
||||
} else if (this.componentName === 'DistributeForm') {
|
||||
resp = await saveDistribute(this.form)
|
||||
resp = await saveDistribute(this.form);
|
||||
} else if (this.componentName === 'BatchUpdateForm') {
|
||||
resp = await batchUpdate(this.form)
|
||||
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.filterItems = { ...this.form };
|
||||
localStorage.setItem(this.userId + '-filterItems', JSON.stringify(this.filterItems));
|
||||
this.$message.success('操作成功');
|
||||
this.dialogShow = false;
|
||||
}
|
||||
this.dialogSaving = false
|
||||
this.dialogSaving = false;
|
||||
if (resp && resp.code === 200) {
|
||||
this.$message.success('操作成功')
|
||||
this.dialogShow = false
|
||||
this.getPageList()
|
||||
this.$message.success('操作成功');
|
||||
this.dialogShow = false;
|
||||
this.getPageList();
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
//表格多选
|
||||
// 表格多选
|
||||
selectRow(val) {
|
||||
console.log(val)
|
||||
this.clueIds = []
|
||||
console.log(val);
|
||||
this.clueIds = [];
|
||||
if (val && val.length > 0) {
|
||||
this.clueIds = val.map((item) => item.clueId)
|
||||
this.clueIds = val.map((item) => item.clueId);
|
||||
}
|
||||
},
|
||||
//批量修改
|
||||
// 批量修改
|
||||
handleBatChUpdate() {
|
||||
this.getEmployee2()
|
||||
//判断是否选择了数据
|
||||
this.getEmployee2();
|
||||
// 判断是否选择了数据
|
||||
if (!this.clueIds || this.clueIds.length <= 0) {
|
||||
//提示选择数据
|
||||
this.$message.error('请至少选择一条数据!')
|
||||
// 提示选择数据
|
||||
this.$message.error('请至少选择一条数据!');
|
||||
} else {
|
||||
//打开编辑框
|
||||
this.dialogTitle = '批量修改'
|
||||
this.dialogWidth = '500px'
|
||||
this.componentName = 'BatchUpdateForm'
|
||||
// 打开编辑框
|
||||
this.dialogTitle = '批量修改';
|
||||
this.dialogWidth = '500px';
|
||||
this.componentName = 'BatchUpdateForm';
|
||||
this.dialogFormOptions = {
|
||||
userOptions: this.userOptions2,
|
||||
}
|
||||
this.dialogFooterShow = true
|
||||
userOptions: this.userOptions2
|
||||
};
|
||||
this.dialogFooterShow = true;
|
||||
this.form = {
|
||||
followUsers: [],
|
||||
clueIds: this.clueIds,
|
||||
}
|
||||
this.dialogShow = true
|
||||
clueIds: this.clueIds
|
||||
};
|
||||
this.dialogShow = true;
|
||||
}
|
||||
},
|
||||
//筛选点击事件
|
||||
// 筛选点击事件
|
||||
handleFilter() {
|
||||
//打开编辑框
|
||||
this.dialogTitle = '筛选配置'
|
||||
this.dialogWidth = '500px'
|
||||
this.componentName = 'FilterForm'
|
||||
// 打开编辑框
|
||||
this.dialogTitle = '筛选配置';
|
||||
this.dialogWidth = '500px';
|
||||
this.componentName = 'FilterForm';
|
||||
this.dialogFormOptions = {
|
||||
userOptions: this.userOptions,
|
||||
}
|
||||
this.dialogFooterShow = true
|
||||
this.form = { ...this.filterItems }
|
||||
this.dialogShow = true
|
||||
userOptions: this.userOptions
|
||||
};
|
||||
this.dialogFooterShow = true;
|
||||
this.form = { ...this.filterItems };
|
||||
this.dialogShow = true;
|
||||
},
|
||||
handlePublicClue() {
|
||||
//打开编辑框
|
||||
this.dialogTitle = '公海线索'
|
||||
this.dialogWidth = '900px'
|
||||
this.componentName = 'PublicTable'
|
||||
// 打开编辑框
|
||||
this.dialogTitle = '公海线索';
|
||||
this.dialogWidth = '900px';
|
||||
this.componentName = 'PublicTable';
|
||||
this.dialogFormOptions = {
|
||||
userOptions: this.userOptions,
|
||||
}
|
||||
this.dialogFooterShow = false
|
||||
this.form = {}
|
||||
this.dialogShow = true
|
||||
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()
|
||||
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 ? '启动成功' : '停止成功')
|
||||
updateAccept({ employeeId: this.employeeId, accept: accept }).then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
this.$message.success(accept ? '启动成功' : '停止成功');
|
||||
this.accept = accept;
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.drawer-form__footer {
|
||||
border-top: 1px solid rgba(69, 74, 91, 0.1);
|
||||
position: absolute;
|
||||
@@ -781,4 +765,3 @@ export default {
|
||||
margin: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,21 +1,10 @@
|
||||
<template>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="110px"
|
||||
:disabled="form.signId != undefined"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px" :disabled="form.signId != undefined">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="跟进人员" prop="followUsers">
|
||||
<el-select v-model="form.followUsers" multiple placeholder="请选择" clearable>
|
||||
<el-option
|
||||
v-for="dict in options.userOptions"
|
||||
:key="dict.id"
|
||||
:label="dict.name"
|
||||
:value="dict.id"
|
||||
/>
|
||||
<el-option v-for="dict in options.userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -27,19 +16,19 @@ export default {
|
||||
name: 'BatchUpdateForm',
|
||||
model: {
|
||||
prop: 'info',
|
||||
event: 'update',
|
||||
event: 'update'
|
||||
},
|
||||
props: {
|
||||
info: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
default: () => {}
|
||||
},
|
||||
options: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
userOptions: [],
|
||||
}),
|
||||
},
|
||||
userOptions: []
|
||||
})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -49,25 +38,24 @@ export default {
|
||||
followUsers: {
|
||||
required: true,
|
||||
message: '跟进人员不能为空',
|
||||
trigger: 'blur',
|
||||
},
|
||||
},
|
||||
}
|
||||
trigger: 'blur'
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
form: {
|
||||
handler(val) {
|
||||
this.$emit('update', val)
|
||||
this.$emit('update', val);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
validate() {
|
||||
return this.$refs.form.validate()
|
||||
},
|
||||
},
|
||||
}
|
||||
return this.$refs.form.validate();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
|
||||
<template>
|
||||
<div style="margin-bottom: 50px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker v-model="form.createTime" value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" type="datetime" :disabled="admin!='true'" />
|
||||
<el-date-picker v-model="form.createTime" value-format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm" type="datetime" :disabled="admin != 'true'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@@ -39,9 +40,7 @@
|
||||
<el-option v-for="dict in options.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
|
||||
}}
|
||||
{{ dict.dictValue }}
|
||||
</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
@@ -128,7 +127,7 @@
|
||||
<el-dialog width="800px" title="地图编辑" :visible.sync="mapDialogShow" append-to-body @opened="initDialogMap()">
|
||||
<div id="dialogMap" class="dialog-map" />
|
||||
<!-- <el-input id="search" v-model="searchBody" class="search-body" placeholder="请输入..." /> -->
|
||||
<el-autocomplete popper-class="my-autocomplete" class="search-body" placeholder="请输入..." v-model="searchBody" :trigger-on-focus="false" :fetch-suggestions="querySearch" @select="handleSelect">
|
||||
<el-autocomplete v-model="searchBody" popper-class="my-autocomplete" class="search-body" placeholder="请输入..." :trigger-on-focus="false" :fetch-suggestions="querySearch" @select="handleSelect">
|
||||
<template slot-scope="{ item }">
|
||||
<span class="name">{{ item.name }}</span>
|
||||
<span class="addr">{{ item.district }}</span>
|
||||
@@ -155,7 +154,7 @@
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- eslint-disable no-undef -->
|
||||
<script>
|
||||
import { getFollowRecord } from '@/api/zs/clue';
|
||||
import { getClassTypes } from '@/api/tool/common';
|
||||
@@ -169,7 +168,7 @@ export default {
|
||||
props: {
|
||||
info: {
|
||||
type: Object,
|
||||
default: () => { }
|
||||
default: () => {}
|
||||
},
|
||||
options: {
|
||||
type: Object,
|
||||
@@ -338,9 +337,7 @@ export default {
|
||||
extData: element,
|
||||
clickable: true
|
||||
});
|
||||
tmpMarker.on('click', (ev) =>
|
||||
this.getClassType(ev.target.getExtData())
|
||||
);
|
||||
tmpMarker.on('click', (ev) => this.getClassType(ev.target.getExtData()));
|
||||
}
|
||||
},
|
||||
handleMapEdit() {
|
||||
@@ -424,14 +421,7 @@ export default {
|
||||
this.placeSearch.setCity(e.poi.adcode);
|
||||
this.placeSearch.search(e.poi.name, (status, result) => {
|
||||
// 搜索成功时,result即是对应的匹配数据
|
||||
if (
|
||||
result &&
|
||||
result.info &&
|
||||
result.info === 'OK' &&
|
||||
result.poiList &&
|
||||
result.poiList.pois &&
|
||||
result.poiList.pois.length > 0
|
||||
) {
|
||||
if (result && result.info && result.info === 'OK' && result.poiList && result.poiList.pois && result.poiList.pois.length > 0) {
|
||||
this.currentPoint.lat = result.poiList.pois[0].location.lat;
|
||||
this.currentPoint.lng = result.poiList.pois[0].location.lng;
|
||||
this.currentPoint.address = e.poi.name;
|
||||
@@ -443,10 +433,7 @@ export default {
|
||||
icon: require(`@/assets/images/place/flag_red.png`)
|
||||
});
|
||||
this.dialogMap.setZoom(14);
|
||||
this.dialogMap.setCenter([
|
||||
this.currentPoint.lng,
|
||||
this.currentPoint.lat
|
||||
]);
|
||||
this.dialogMap.setCenter([this.currentPoint.lng, this.currentPoint.lat]);
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -464,15 +451,14 @@ export default {
|
||||
if (this.currentPoint.lng && this.currentPoint.lat) {
|
||||
regeo({
|
||||
key: 'f2f35d6adc4a16bb879d303cead56237',
|
||||
location: this.currentPoint.lng + "," + this.currentPoint.lat
|
||||
}).then(resp => {
|
||||
if (resp.status == '1') {
|
||||
location: this.currentPoint.lng + ',' + this.currentPoint.lat
|
||||
}).then((resp) => {
|
||||
if (resp.status === '1') {
|
||||
this.currentPoint.address = resp.regeocode.formatted_address;
|
||||
this.searchBody = resp.regeocode.formatted_address;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
// 计算各个场地到目标点的距离·
|
||||
getNearbySchool() {
|
||||
@@ -489,9 +475,7 @@ export default {
|
||||
const element = this.options.placeInfo[i];
|
||||
const p1 = [element.lng, element.lat];
|
||||
// 计算直线距离
|
||||
element.distance = (
|
||||
window.AMap.GeometryUtil.distance(p1, p2) / 1000
|
||||
).toFixed(2);
|
||||
element.distance = (window.AMap.GeometryUtil.distance(p1, p2) / 1000).toFixed(2);
|
||||
element.recommend ? places1.push(element) : places2.push(element);
|
||||
}
|
||||
// 按直线距离排序
|
||||
@@ -527,19 +511,17 @@ export default {
|
||||
if (start && end) {
|
||||
const resp = await walking({
|
||||
key: 'f2f35d6adc4a16bb879d303cead56237',
|
||||
origin: start[0] + "," + start[1],
|
||||
destination: end[0] + "," + end[1],
|
||||
origin: start[0] + ',' + start[1],
|
||||
destination: end[0] + ',' + end[1]
|
||||
});
|
||||
if (resp.status === '1') {
|
||||
let num = resp.route.paths[0].distance;
|
||||
return num > 1000 ? `${(num / 1000).toFixed(2)} 公里` : `${num} 米`
|
||||
|
||||
const num = resp.route.paths[0].distance;
|
||||
return num > 1000 ? `${(num / 1000).toFixed(2)} 公里` : `${num} 米`;
|
||||
} else {
|
||||
return '步行数据无法确定';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// return new Promise((resolve, reject) => {
|
||||
|
||||
// })
|
||||
|
||||
@@ -4,8 +4,13 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item label="线下接待人员" prop="offlineReceiver">
|
||||
<el-input v-if="form.offlineReceiverName" v-model="form.offlineReceiverName" disabled />+
|
||||
<el-select v-model="form.offlineReceiver" multiple filterable placeholder="请选择" style="width:97%; padding-top:5px;">
|
||||
<el-option v-for="dict in options.userOptions.filter(item => !options.offlineReceiver || !options.offlineReceiver.includes(item.id))" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||
<el-select v-model="form.offlineReceiver" multiple filterable placeholder="请选择" style="width: 97%; padding-top: 5px">
|
||||
<el-option
|
||||
v-for="dict in options.userOptions.filter((item) => !options.offlineReceiver || !options.offlineReceiver.includes(item.id))"
|
||||
:key="dict.id"
|
||||
:label="dict.name"
|
||||
:value="dict.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -18,11 +23,17 @@
|
||||
<el-row>
|
||||
<el-col v-if="distributeRecord != undefined && distributeRecord.length > 0" :span="24">
|
||||
<el-form-item label="甩单记录">
|
||||
<el-timeline style="max-height:260px;overflow-y:auto;">
|
||||
<el-timeline-item v-for="item in distributeRecord" :key="item.record" :timestamp="item.operateTime" placement="top" style="padding:5px !important;">
|
||||
<el-timeline style="max-height: 260px; overflow-y: auto">
|
||||
<el-timeline-item
|
||||
v-for="item in distributeRecord"
|
||||
:key="item.record"
|
||||
:timestamp="item.operateTime"
|
||||
placement="top"
|
||||
style="padding: 5px !important"
|
||||
>
|
||||
<el-card>
|
||||
<span style="display:block;font-weight: bold; font-size:13px;">用户 {{ item.operateUserName }}</span>
|
||||
<span style="display:block;padding-left: 10px; font-size:13px;" v-html="item.centent" />
|
||||
<span style="display: block; font-weight: bold; font-size: 13px">用户 {{ item.operateUserName }}</span>
|
||||
<span style="display: block; padding-left: 10px; font-size: 13px" v-html="item.centent" />
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
@@ -33,25 +44,25 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDistributeRecord } from '@/api/zs/clue'
|
||||
import { getDistributeRecord } from '@/api/zs/clue';
|
||||
export default {
|
||||
name: 'DistributeForm',
|
||||
model: {
|
||||
prop: 'info',
|
||||
event: 'update',
|
||||
event: 'update'
|
||||
},
|
||||
props: {
|
||||
info: {
|
||||
type: Object,
|
||||
default: () => { },
|
||||
default: () => {}
|
||||
},
|
||||
options: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
userOptions: [],
|
||||
offlineReceiver: [],
|
||||
}),
|
||||
},
|
||||
offlineReceiver: []
|
||||
})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -60,36 +71,36 @@ export default {
|
||||
offlineReceiver: {
|
||||
required: true,
|
||||
message: '线下接待人员不为空',
|
||||
trigger: 'change',
|
||||
},
|
||||
trigger: 'change'
|
||||
}
|
||||
},
|
||||
distributeRecord: [],
|
||||
}
|
||||
distributeRecord: []
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
form: {
|
||||
handler(val) {
|
||||
this.$emit('update', val)
|
||||
this.$emit('update', val);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.handleDistribute()
|
||||
this.handleDistribute();
|
||||
},
|
||||
methods: {
|
||||
validate() {
|
||||
return this.$refs.form.validate()
|
||||
return this.$refs.form.validate();
|
||||
},
|
||||
handleDistribute() {
|
||||
// 甩单
|
||||
getDistributeRecord({ clueId: this.form.clueId }).then((resp) => {
|
||||
if (resp.code === 200) {
|
||||
this.distributeRecord = resp.data
|
||||
this.distributeRecord = resp.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -34,40 +34,39 @@ export default {
|
||||
name: 'FilterForm',
|
||||
model: {
|
||||
prop: 'info',
|
||||
event: 'update',
|
||||
event: 'update'
|
||||
},
|
||||
props: {
|
||||
info: {
|
||||
type: Object,
|
||||
default: () => { },
|
||||
default: () => {}
|
||||
},
|
||||
options: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
userOptions: [],
|
||||
}),
|
||||
},
|
||||
userOptions: []
|
||||
})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
form: JSON.parse(JSON.stringify(this.info)),
|
||||
rules: {},
|
||||
}
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
form: {
|
||||
handler(val) {
|
||||
this.$emit('update', val)
|
||||
this.$emit('update', val);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
validate() {
|
||||
return this.$refs.form.validate()
|
||||
},
|
||||
},
|
||||
}
|
||||
return this.$refs.form.validate();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-button type="text" icon="el-icon-refresh" style="margin-bottom:10px;" @click="handleQuery">刷新</el-button>
|
||||
<el-button type="text" icon="el-icon-refresh" style="margin-bottom: 10px" @click="handleQuery">刷新</el-button>
|
||||
<el-table v-loading="loading" :data="publicList" border :row-class-name="tableRowClassName">
|
||||
<el-table-column label="创建时间" prop="consultTime" width="100">
|
||||
<template slot-scope="scope">
|
||||
@@ -23,7 +23,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getPublicList, pickupClue } from '@/api/zs/clue'
|
||||
import { getPublicList, pickupClue } from '@/api/zs/clue';
|
||||
export default {
|
||||
name: 'PublicTable',
|
||||
data() {
|
||||
@@ -33,52 +33,52 @@ export default {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
total: 0,
|
||||
},
|
||||
}
|
||||
total: 0
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.getList();
|
||||
// this.timer = setInterval(() => {
|
||||
// this.getList()
|
||||
// }, 5000)
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true
|
||||
this.loading = true;
|
||||
getPublicList(this.queryParams).then((resp) => {
|
||||
if (resp && resp.code == 200) {
|
||||
this.publicList = resp.rows
|
||||
this.loading = false
|
||||
this.queryParams.total = resp.total
|
||||
if (resp && resp.code === 200) {
|
||||
this.publicList = resp.rows;
|
||||
this.loading = false;
|
||||
this.queryParams.total = resp.total;
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
handlePickup(item) {
|
||||
pickupClue(item).then((resp) => {
|
||||
if (resp && resp.code == 200) {
|
||||
this.$message.success('拾取成功')
|
||||
this.getList()
|
||||
if (resp && resp.code === 200) {
|
||||
this.$message.success('拾取成功');
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (row.followUser2 || row.followUser) {
|
||||
return 'warning-row'
|
||||
return 'warning-row';
|
||||
} else {
|
||||
return ''
|
||||
return '';
|
||||
}
|
||||
},
|
||||
handleQuery() {
|
||||
this.loading = true
|
||||
this.getList()
|
||||
},
|
||||
},
|
||||
}
|
||||
this.loading = true;
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scope>
|
||||
.el-table .warning-row {
|
||||
background: oldlace;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -46,14 +46,24 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报名场地" prop="signPlace">
|
||||
<el-select v-model="form.signPlace" filterable placeholder="请选择" @change="placeChange">
|
||||
<el-option v-for="dict in options.placeInfo.filter(item =>item.deptId === form.signSchool)" :key="dict.placeId" :label="dict.name" :value="dict.placeId" />
|
||||
<el-option
|
||||
v-for="dict in options.placeInfo.filter((item) => item.deptId === form.signSchool)"
|
||||
:key="dict.placeId"
|
||||
:label="dict.name"
|
||||
:value="dict.placeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报名班型" prop="signClass">
|
||||
<el-select v-model="form.signClass" filterable placeholder="请选择" @change="priceChange">
|
||||
<el-option v-for="dict in classTypeOptions.filter(item =>((!item.placeId && item.deptId === form.signSchool) || item.placeId === form.signPlace))" :key="dict.typeId" :label="`${dict.licenseType}-${dict.typeName}`" :value="dict.typeId" />
|
||||
<el-option
|
||||
v-for="dict in classTypeOptions.filter((item) => (!item.placeId && item.deptId === form.signSchool) || item.placeId === form.signPlace)"
|
||||
:key="dict.typeId"
|
||||
:label="`${dict.licenseType}-${dict.typeName}`"
|
||||
:value="dict.typeId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -117,8 +127,8 @@
|
||||
<i class="el-icon-plus evidence-uploader-icon" />
|
||||
</el-upload>
|
||||
<div v-for="(item, index) in form.fileList" :key="index" class="pr dib">
|
||||
<el-image class="image-list-item" fit="contain" :src="preUrl + item" :preview-src-list="form.fileList.map(url => preUrl + url)" lazy />
|
||||
<i class="el-icon-close btn-close" @click="handleRemoveImage(index,item)" />
|
||||
<el-image class="image-list-item" fit="contain" :src="preUrl + item" :preview-src-list="form.fileList.map((url) => preUrl + url)" lazy />
|
||||
<i class="el-icon-close btn-close" @click="handleRemoveImage(index, item)" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
@@ -126,11 +136,17 @@
|
||||
<el-row v-if="checkRecord && checkRecord.length > 0">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="审核记录">
|
||||
<el-timeline style="max-height:260px;overflow-y:auto;">
|
||||
<el-timeline-item v-for="item in checkRecord" :key="item.record" :timestamp="item.operateTime" placement="top" style="padding:5px !important;">
|
||||
<el-timeline style="max-height: 260px; overflow-y: auto">
|
||||
<el-timeline-item
|
||||
v-for="item in checkRecord"
|
||||
:key="item.record"
|
||||
:timestamp="item.operateTime"
|
||||
placement="top"
|
||||
style="padding: 5px !important"
|
||||
>
|
||||
<el-card>
|
||||
<span style="display:block;font-weight: bold; font-size:13px;">用户 {{ item.operateUserName }}</span>
|
||||
<span style="display:block;padding-left: 10px; font-size:13px;" v-html="item.centent" />
|
||||
<span style="display: block; font-weight: bold; font-size: 13px">用户 {{ item.operateUserName }}</span>
|
||||
<span style="display: block; padding-left: 10px; font-size: 13px" v-html="item.centent" />
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
@@ -141,33 +157,28 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { validateMoney } from '@/utils/validate'
|
||||
import {
|
||||
getSchools,
|
||||
getClassTypeInfo,
|
||||
uploadEvidence,
|
||||
deleteFile,
|
||||
} from '@/api/tool/common'
|
||||
import { getCheckRecord } from '@/api/zs/sign'
|
||||
import { validateMoney } from '@/utils/validate';
|
||||
import { getSchools, getClassTypeInfo, uploadEvidence, deleteFile } from '@/api/tool/common';
|
||||
import { getCheckRecord } from '@/api/zs/sign';
|
||||
export default {
|
||||
name: 'SignForm',
|
||||
model: {
|
||||
prop: 'info',
|
||||
event: 'update',
|
||||
event: 'update'
|
||||
},
|
||||
props: {
|
||||
info: {
|
||||
type: Object,
|
||||
default: () => { },
|
||||
default: () => {}
|
||||
},
|
||||
options: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
userOptions: [],
|
||||
sourceOptions: [],
|
||||
placeInfo: [],
|
||||
}),
|
||||
},
|
||||
placeInfo: []
|
||||
})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -178,48 +189,48 @@ export default {
|
||||
area: {
|
||||
required: true,
|
||||
message: '所属区域不为空',
|
||||
trigger: 'blur',
|
||||
trigger: 'blur'
|
||||
},
|
||||
dealDate: {
|
||||
required: true,
|
||||
message: '成交时间不为空',
|
||||
trigger: 'blur,change',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
state: {
|
||||
required: true,
|
||||
message: '是否权限必选',
|
||||
trigger: 'blur,change',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
followUser: {
|
||||
required: true,
|
||||
message: '归属人员不为空',
|
||||
trigger: 'blur,change',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
signSchool: {
|
||||
required: true,
|
||||
message: '报名驾校不为空',
|
||||
trigger: 'blur,change',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
signPlace: {
|
||||
required: true,
|
||||
message: '报名场地不为空',
|
||||
trigger: 'blur,change',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
signClass: {
|
||||
required: true,
|
||||
message: '报名班型不为空',
|
||||
trigger: 'blur,change',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
dealState: {
|
||||
required: true,
|
||||
message: '结算情况不为空',
|
||||
trigger: 'blur,change',
|
||||
trigger: 'blur,change'
|
||||
},
|
||||
signPrice: {
|
||||
required: true,
|
||||
validator: validateMoney,
|
||||
trigger: 'blur',
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
},
|
||||
schoolOptions: [],
|
||||
placeOptions: [],
|
||||
@@ -228,147 +239,136 @@ export default {
|
||||
commissionOptions: [],
|
||||
extraPayTypeOptions: [],
|
||||
dateControl: undefined,
|
||||
checkRecord: [],
|
||||
}
|
||||
checkRecord: []
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
form: {
|
||||
handler(val) {
|
||||
this.$emit('update', val)
|
||||
this.$emit('update', val);
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (!this.form.fileList) {
|
||||
this.$set(this.form, 'fileList', [])
|
||||
this.$set(this.form, 'fileList', []);
|
||||
}
|
||||
this.initData()
|
||||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
// 佣金明细
|
||||
this.getDicts('dm_commission').then((response) => {
|
||||
this.commissionOptions = response.data
|
||||
})
|
||||
this.commissionOptions = response.data;
|
||||
});
|
||||
// 额外支出类型
|
||||
this.getDicts('dm_extra_pay').then((response) => {
|
||||
this.extraPayTypeOptions = response.data
|
||||
})
|
||||
this.extraPayTypeOptions = response.data;
|
||||
});
|
||||
// 所属区域
|
||||
this.getDicts('dm_area').then((response) => {
|
||||
this.areaOptions = response.data
|
||||
})
|
||||
this.areaOptions = response.data;
|
||||
});
|
||||
// 驾校
|
||||
getSchools().then((resp) => {
|
||||
this.schoolOptions = resp.data
|
||||
})
|
||||
this.schoolOptions = resp.data;
|
||||
});
|
||||
// 班型
|
||||
getClassTypeInfo({ status: '0' }).then((resp) => {
|
||||
this.classTypeOptions = resp.data
|
||||
})
|
||||
this.classTypeOptions = resp.data;
|
||||
});
|
||||
// 审核记录
|
||||
this.form.signId &&
|
||||
getCheckRecord({
|
||||
signId: this.form.signId,
|
||||
type: 1,
|
||||
type: 1
|
||||
}).then((resp) => {
|
||||
this.checkRecord = resp.data
|
||||
})
|
||||
this.checkRecord = resp.data;
|
||||
});
|
||||
// 未登记并且非管理员,添加日期规则
|
||||
if (!this.form.signId) {
|
||||
let start = new Date()
|
||||
let start = new Date();
|
||||
// 取1号
|
||||
start.setDate(1)
|
||||
start.setDate(1);
|
||||
// 5号之前可操作上个月,注意跨年
|
||||
if (new Date().getDate() < 5) {
|
||||
if (start.getMonth() > 0) {
|
||||
start.setMonth(start.getMonth() - 1)
|
||||
start.setMonth(start.getMonth() - 1);
|
||||
} else {
|
||||
start.setFullYear(start.getFullYear() - 1)
|
||||
start.setMonth(11)
|
||||
start.setFullYear(start.getFullYear() - 1);
|
||||
start.setMonth(11);
|
||||
}
|
||||
}
|
||||
// 因为new Date()出来的时间戳,包含时分秒,判断日期时需要减一天
|
||||
start = start.getTime() - 24 * 60 * 60 * 1000
|
||||
start = start.getTime() - 24 * 60 * 60 * 1000;
|
||||
this.dateControl = {
|
||||
disabledDate: (time) => {
|
||||
return time.getTime() < start || time.getTime() > new Date()
|
||||
},
|
||||
}
|
||||
return time.getTime() < start || time.getTime() > new Date();
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
validate() {
|
||||
return this.$refs.form.validate()
|
||||
return this.$refs.form.validate();
|
||||
},
|
||||
// 驾校change事件
|
||||
schoolChange() {
|
||||
this.$set(this.form, 'signPlace', undefined)
|
||||
this.$set(this.form, 'signClass', undefined)
|
||||
this.$set(this.form, 'signPlace', undefined);
|
||||
this.$set(this.form, 'signClass', undefined);
|
||||
},
|
||||
placeChange() {
|
||||
this.$set(this.form, 'signClass', undefined)
|
||||
this.$set(
|
||||
this.form,
|
||||
'schoolPeople',
|
||||
this.options.placeInfo.find(
|
||||
(item) => item.placeId === this.form.signPlace
|
||||
).contact
|
||||
)
|
||||
this.$set(
|
||||
this.form,
|
||||
'area',
|
||||
this.options.placeInfo.find(
|
||||
(item) => item.placeId === this.form.signPlace
|
||||
).area
|
||||
)
|
||||
this.$set(this.form, 'signClass', undefined);
|
||||
this.$set(this.form, 'schoolPeople', this.options.placeInfo.find((item) => item.placeId === this.form.signPlace).contact);
|
||||
this.$set(this.form, 'area', this.options.placeInfo.find((item) => item.placeId === this.form.signPlace).area);
|
||||
// this.form.schoolPeople = this.options.placeInfo.find(
|
||||
// (item) => item.placeId === this.form.signPlace
|
||||
// ).contact
|
||||
},
|
||||
async handleUploadFile(data) {
|
||||
if (data.file) {
|
||||
const size = data.file.size
|
||||
const limitSize = 20 * 1024 * 1024 // 20M大小限制
|
||||
const size = data.file.size;
|
||||
const limitSize = 20 * 1024 * 1024; // 20M大小限制
|
||||
if (size < limitSize) {
|
||||
const formData = new FormData()
|
||||
formData.append('file', data.file)
|
||||
const resp = await uploadEvidence(formData)
|
||||
const formData = new FormData();
|
||||
formData.append('file', data.file);
|
||||
const resp = await uploadEvidence(formData);
|
||||
if (resp.code === 200) {
|
||||
this.form.fileList.push(resp.data)
|
||||
this.form.fileList.push(resp.data);
|
||||
}
|
||||
} else {
|
||||
this.msgInfo('文件过大')
|
||||
this.msgInfo('文件过大');
|
||||
}
|
||||
}
|
||||
},
|
||||
handleRemoveImage(index, item) {
|
||||
deleteFile(item).then((resp) => {
|
||||
if (resp && resp.data)
|
||||
if (resp && resp.data) {
|
||||
// 最好先通过接口删除服务器图片
|
||||
this.form.fileList.splice(index, 1)
|
||||
})
|
||||
this.form.fileList.splice(index, 1);
|
||||
}
|
||||
});
|
||||
},
|
||||
priceChange() {
|
||||
//计算驾校支付款 报名价格-班型底价
|
||||
// 计算驾校支付款 报名价格-班型底价
|
||||
if (this.form.signClass && this.form.signPrice) {
|
||||
let minprice
|
||||
let minprice;
|
||||
this.classTypeOptions.some((item) => {
|
||||
if (item.typeId == this.form.signClass) {
|
||||
minprice = item.minPrice
|
||||
return item
|
||||
minprice = item.minPrice;
|
||||
return item;
|
||||
}
|
||||
})
|
||||
});
|
||||
if (minprice) {
|
||||
this.$set(this.form, 'schoolPay', this.form.signPrice - minprice)
|
||||
this.$set(this.form, 'schoolPay', this.form.signPrice - minprice);
|
||||
}
|
||||
} else {
|
||||
this.$set(this.form, 'schoolPay', undefined)
|
||||
this.$set(this.form, 'schoolPay', undefined);
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user