dev-zcx
qsh 2 years ago
parent 9800001876
commit 155f9009fc
  1. 1
      src/directive/permission/hasPermi.js
  2. 14
      src/utils/ruoyi.js
  3. 7
      src/views/sch/classType/index.vue
  4. 1
      src/views/sch/school/index.vue
  5. 47
      src/views/system/dept/index.vue
  6. 131
      src/views/system/employee/index.vue
  7. 134
      src/views/system/summary/index.vue
  8. 7
      src/views/zs/clue/components/BatchUpdateDialog.vue
  9. 10
      src/views/zs/clue/components/PublicDialog.vue
  10. 62
      src/views/zs/clue/components/SearchForm.vue
  11. 19
      src/views/zs/clue/components/UploadDialog.vue
  12. 274
      src/views/zs/clue/index-bak.vue
  13. 132
      src/views/zs/clue/index.vue
  14. 391
      src/views/zs/sign/components/SignFormDialog.vue
  15. 12
      vue.config.js

@ -10,7 +10,6 @@ export default {
const { value } = binding; const { value } = binding;
const all_permission = '*:*:*'; const all_permission = '*:*:*';
const permissions = store.getters && store.getters.permissions; const permissions = store.getters && store.getters.permissions;
if (value && value instanceof Array && value.length > 0) { if (value && value instanceof Array && value.length > 0) {
const permissionFlag = value; const permissionFlag = value;

@ -73,20 +73,10 @@ export function addDateRange(params, dateRange, propName) {
// 回显数据字典 // 回显数据字典
export function selectDictLabel(datas, value) { export function selectDictLabel(datas, value) {
if (value === undefined) { if (value == undefined) {
return ''; return '';
} }
var actions = []; return datas.find((item) => item.dictValue == value).dictLabel;
Object.keys(datas).some((key) => {
if (datas[key].value === '' + value) {
actions.push(datas[key].label);
return true;
}
});
if (actions.length === 0) {
actions.push(value);
}
return actions.join('');
} }
// 回显数据字典(字符串数组) // 回显数据字典(字符串数组)

@ -31,7 +31,6 @@
<el-button v-hasPermi="['sch:classType:add']" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button> <el-button v-hasPermi="['sch:classType:add']" type="primary" icon="el-icon-plus" @click="handleAdd">新增</el-button>
<el-button v-hasPermi="['sch:classType:remove']" type="danger" icon="el-icon-delete" :disabled="multiple" @click="handleDelete">删除</el-button> <el-button v-hasPermi="['sch:classType:remove']" type="danger" icon="el-icon-delete" :disabled="multiple" @click="handleDelete">删除</el-button>
<el-button v-hasPermi="['sch:classType:clone']" type="primary" icon="el-icon-copy" :disabled="multiple" @click="handleClone">克隆</el-button> <el-button v-hasPermi="['sch:classType:clone']" type="primary" icon="el-icon-copy" :disabled="multiple" @click="handleClone">克隆</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-row> </el-row>
@ -41,13 +40,13 @@
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="驾校" prop="schoolName" /> <el-table-column label="驾校" prop="schoolName" />
<el-table-column label="场地" prop="placeName" /> <el-table-column label="场地" prop="placeName" min-width="200" />
<el-table-column label="班型名称" prop="typeName" /> <el-table-column label="班型名称" prop="typeName" />
<el-table-column label="驾照类型" prop="licenseType" :formatter="licenseTypeFormat" width="80" /> <el-table-column label="驾照类型" prop="licenseType" :formatter="licenseTypeFormat" width="80" />
<!-- <el-table-column label="原价" prop="originalPrice" /> --> <!-- <el-table-column label="原价" prop="originalPrice" /> -->
<el-table-column label="报价" prop="currentPrice" width="60" /> <el-table-column label="报价" prop="currentPrice" width="60" />
<el-table-column label="底价" prop="minPrice" width="60" /> <el-table-column label="底价" prop="minPrice" width="60" />
<el-table-column label="描述" prop="description" /> <el-table-column label="描述" prop="description" min-width="200" show-overflow-tooltip />
<el-table-column label="状态" prop="status" :formatter="statusFormat" width="80" /> <el-table-column label="状态" prop="status" :formatter="statusFormat" width="80" />
<el-table-column label="创建时间" width="160"> <el-table-column label="创建时间" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
@ -441,7 +440,7 @@ export default {
} }
}); });
}) })
.catch(function () {}); .catch(function () { });
}, },
handleClone() { handleClone() {
this.cloneOpen = true; this.cloneOpen = true;

@ -31,7 +31,6 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-hasPermi="['sch:school:edit']" type="text" icon="el-icon-edit" @click="addOrUpdateHandle(scope.row)">修改</el-button> <el-button v-hasPermi="['sch:school:edit']" type="text" icon="el-icon-edit" @click="addOrUpdateHandle(scope.row)">修改</el-button>
<el-button v-hasPermi="['sch:school:remove']" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button> <el-button v-hasPermi="['sch:school:remove']" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

@ -25,23 +25,19 @@
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" /> <right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
</el-row> </el-row>
<el-table v-if="refreshTable" v-loading="loading" :data="deptList" row-key="deptId" :default-expand-all="isExpandAll" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> <el-table v-if="refreshTable" v-loading="loading" :data="deptList" row-key="deptId" :default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
<el-table-column prop="deptName" label="部门名称" width="260" /> <el-table-column prop="deptName" label="部门名称" width="260" />
<el-table-column prop="orderNum" label="排序" width="200" /> <el-table-column prop="areaList" label="所属区域" width="200" />
<el-table-column prop="status" label="状态" width="100"> <el-table-column prop="status" label="状态" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" /> <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="200"> <el-table-column prop="remark" label="备注" width="200" show-overflow-tooltip />
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-hasPermi="['system:dept:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button> <el-button v-hasPermi="['system:dept:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
<el-button v-hasPermi="['system:dept:add']" size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)">新增</el-button> <el-button v-hasPermi="['system:dept:add']" size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)">新增子部门</el-button>
<el-button v-if="scope.row.parentId != 0" v-hasPermi="['system:dept:remove']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button> <el-button v-if="scope.row.parentId != 0" v-hasPermi="['system:dept:remove']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -56,8 +52,6 @@
<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" /> <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="部门名称" prop="deptName"> <el-form-item label="部门名称" prop="deptName">
<el-input v-model="form.deptName" placeholder="请输入部门名称" /> <el-input v-model="form.deptName" placeholder="请输入部门名称" />
@ -68,8 +62,6 @@
<el-input-number v-model="form.orderNum" controls-position="right" :min="0" /> <el-input-number v-model="form.orderNum" controls-position="right" :min="0" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="负责人" prop="leader"> <el-form-item label="负责人" prop="leader">
<el-input v-model="form.leader" placeholder="请输入负责人" maxlength="20" /> <el-input v-model="form.leader" placeholder="请输入负责人" maxlength="20" />
@ -80,13 +72,6 @@
<el-input v-model="form.phone" placeholder="请输入联系电话" maxlength="11" /> <el-input v-model="form.phone" placeholder="请输入联系电话" maxlength="11" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="邮箱" prop="email">
<el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="部门状态"> <el-form-item label="部门状态">
<el-radio-group v-model="form.status"> <el-radio-group v-model="form.status">
@ -94,6 +79,18 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="所属区域" prop="areaList">
<el-select v-model="form.areaList" placeholder="请选择" filterable multiple>
<el-option label="区域1" :value="1" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注">
<el-input v-model="form.remark" placeholder="请输入" type="textarea" :autosize="{ minRows: 3 }" />
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -156,6 +153,13 @@ export default {
message: '请输入正确的手机号码', message: '请输入正确的手机号码',
trigger: 'blur' trigger: 'blur'
} }
],
areaList: [
{
required: true,
message: '所属区域不能为空',
trigger: 'blur,change'
}
] ]
} }
}; };
@ -198,7 +202,8 @@ export default {
leader: undefined, leader: undefined,
phone: undefined, phone: undefined,
email: undefined, email: undefined,
status: '0' status: '0',
areaList: []
}; };
this.resetForm('form'); this.resetForm('form');
}, },
@ -278,7 +283,7 @@ export default {
this.getList(); this.getList();
this.$modal.msgSuccess('删除成功'); this.$modal.msgSuccess('删除成功');
}) })
.catch(() => {}); .catch(() => { });
} }
} }
}; };

@ -16,11 +16,6 @@
<el-form-item prop="userOrPhone"> <el-form-item prop="userOrPhone">
<el-input v-model="queryParams.employeeName" placeholder="请输入姓名/手机号" clearable style="width: 240px" @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.employeeName" placeholder="请输入姓名/手机号" clearable style="width: 240px" @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item prop="status">
<el-select v-model="queryParams.status" placeholder="用户状态" clearable>
<el-option v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select>
</el-form-item>
<el-form-item label="入职时间"> <el-form-item label="入职时间">
<el-date-picker v-model="queryParams.hiredate" style="width: 240px" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" /> <el-date-picker v-model="queryParams.hiredate" style="width: 240px" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
</el-form-item> </el-form-item>
@ -43,7 +38,10 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" width="260"> <el-table-column label="操作" fixed="right" width="260">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-hasPermi="['system:employee:edit']" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button> <el-button v-hasPermi="['system:employee:edit']" type="text" @click="handleUpdate(scope.row)">修改</el-button>
<el-button v-hasPermi="['system:employee:logoff']" type="text" @click="handleLogoff(scope.row)">注销</el-button>
<el-button v-hasPermi="['system:employee:release']" type="text" @click="handleRelease(scope.row)">释放线索</el-button>
<el-button v-hasPermi="['system:employee:remove']" type="text" @click="handleRemove(scope.row)">删除</el-button>
<!-- <el-button <!-- <el-button
v-hasPermi="['system:employee:resetPwd']" v-hasPermi="['system:employee:resetPwd']"
type="text" type="text"
@ -54,7 +52,7 @@
</el-table-column> </el-table-column>
</el-table> </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="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
</el-col> </el-col>
</el-row> </el-row>
@ -72,85 +70,50 @@
<el-input v-model="form.phone" placeholder="请输入手机号码" maxlength="11" /> <el-input v-model="form.phone" placeholder="请输入手机号码" maxlength="11" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="角色" prop="roleIdList"> <el-form-item label="角色" prop="roleIdList">
<el-select v-model="form.roleIdList" multiple placeholder="请选择"> <el-select v-model="form.roleIdList" multiple placeholder="请选择" class="wp100">
<el-option v-for="item in roleOptions" :key="item.id" :label="item.name" :value="item.id" :disabled="item.status == 1" /> <el-option v-for="item in roleOptions" :key="item.id" :label="item.name" :value="item.id" :disabled="item.status == 1" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="归属部门" prop="orgId"> <el-form-item label="归属部门" prop="orgId">
<treeselect v-model="form.orgId" :options="deptOptions" :disable-branch-nodes="true" :show-count="true" placeholder="请选择归属部门" /> <treeselect v-model="form.orgId" class="wp100" :options="deptOptions" :disable-branch-nodes="true" :show-count="true" placeholder="请选择归属部门" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="所属区域" prop="areaList">
<el-select v-model="form.areaList" multiple placeholder="请选择">
<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-col :span="12">
<el-form-item label="权重" prop="weight"> <el-form-item label="权重" prop="weight">
<el-input v-model="form.weight" placeholder="权重,1-100" type="number" /> <el-input v-model="form.weight" placeholder="权重,1-100" type="number" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="用户性别"> <el-form-item label="用户性别">
<el-select v-model="form.sex" placeholder="请选择"> <el-select v-model="form.sex" placeholder="请选择" class="wp100">
<el-option v-for="dict in sexOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" /> <el-option v-for="dict in sexOptions" :key="dict.dictValue" :label="dict.dictLabel" :value="dict.dictValue" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="入职日期"> <el-form-item label="入职日期">
<el-date-picker v-model="form.hiredate" :editable="false" type="date" value-format="yyyy-MM-dd" placeholder="请选择入职时间" /> <el-date-picker v-model="form.hiredate" :editable="false" type="date" value-format="yyyy-MM-dd" placeholder="请选择入职时间" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="上级领导">
<el-select v-model="form.leader" placeholder="请选择">
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="状态"> <el-form-item label="状态">
<el-radio-group v-model="form.status"> <el-radio-group v-model="form.status" class="wp100">
<el-radio v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio> <el-radio v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="是否释放线索">
<el-radio-group v-model="form.discardClue">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="最大线索数"> <el-form-item label="最大线索数">
<el-input v-model="form.maxClueNum" /> <el-input v-model="form.maxClueNum" placeholder="请输入" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否考勤"> <el-form-item label="是否考勤">
<el-radio-group v-model="form.checkin"> <el-radio-group v-model="form.checkin" class="wp100">
<el-radio :label="true"></el-radio> <el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio> <el-radio :label="false"></el-radio>
</el-radio-group> </el-radio-group>
@ -158,21 +121,12 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否参与统计"> <el-form-item label="是否参与统计">
<el-radio-group v-model="form.count"> <el-radio-group v-model="form.count" class="wp100">
<el-radio :label="true"></el-radio> <el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio> <el-radio :label="false"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="所属报名点">
<el-select v-model="form.officeId" placeholder="请选择">
<el-option v-for="dict in officeOptions" :key="dict.officeId" :label="dict.officeName" :value="dict.officeId" />
</el-select>
</el-form-item>
</el-col>
<!-- <el-col :span="12"> <!-- <el-col :span="12">
<el-form-item label="小程序权限"> <el-form-item label="小程序权限">
<el-radio-group v-model="form.hasStudent"> <el-radio-group v-model="form.hasStudent">
@ -189,13 +143,10 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> --> </el-col> -->
</el-row>
<el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注"> <el-form-item label="备注">
<!-- <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input> --> <!-- <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input> -->
<editor v-model="form.remark" /> <editor v-model="form.remark" :height="200" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -210,7 +161,6 @@
<script> <script>
import empAPi from '@/api/system/employee'; import empAPi from '@/api/system/employee';
import { listOffice } from "@/api/zs/office";
import { deptTreeSelect } from '@/api/system/dept'; import { deptTreeSelect } from '@/api/system/dept';
import { getRoleOptions } from '@/api/system/role'; import { getRoleOptions } from '@/api/system/role';
import { resetUserPwd } from '@/api/system/user'; import { resetUserPwd } from '@/api/system/user';
@ -280,13 +230,6 @@ export default {
trigger: 'blur,change' trigger: 'blur,change'
} }
], ],
areaList: [
{
required: true,
message: '所属区域不能为空',
trigger: 'blur,change'
}
],
weight: [ weight: [
{ {
required: true, required: true,
@ -304,8 +247,7 @@ export default {
] ]
}, },
userOptions: [], userOptions: [],
areaOptions: [], areaOptions: []
officeOptions: []
}; };
}, },
watch: { watch: {
@ -340,7 +282,6 @@ export default {
// }) // })
} }
}); });
this.getOffices();
}, },
methods: { methods: {
/** 查询用户列表 */ /** 查询用户列表 */
@ -456,7 +397,7 @@ export default {
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function () { submitForm() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
this.$set(this.form, 'deptId', this.$store.getters.schoolId); this.$set(this.form, 'deptId', this.$store.getters.schoolId);
@ -480,14 +421,39 @@ export default {
} }
}); });
}, },
// handleLogoff(row) {
getOffices() { this.$confirm('注销后将立即释放线索,并禁用该员工,是否确认注销?', '警告', {
listOffice().then(resp => { confirmButtonText: '确定',
if (resp.code == 200) { cancelButtonText: '取消',
this.officeOptions = resp.rows type: 'warning'
} }).then(function () {
}) // 线
}).then(() => {
this.msgSuccess('注销成功!');
});
},
handleRelease(row) {
this.$confirm('是否立刻释放该员工拥有的线索?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function () {
// 线
}).then(() => {
this.msgSuccess('释放成功!');
});
}, },
handleRemove(row) {
this.$confirm('是否删除该员工,建议只在数据错误时删除?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function () {
// 使
}).then(() => {
this.msgSuccess('删除成功!');
});
}
} }
}; };
</script> </script>
@ -497,6 +463,7 @@ export default {
cursor: pointer; cursor: pointer;
color: #409eff; color: #409eff;
} }
.el-icon-arrow-down { .el-icon-arrow-down {
font-size: 12px; font-size: 12px;
} }

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="60px" size="mini"> <el-form ref="queryForm" :model="queryParams" :inline="true" label-width="60px" size="mini">
<el-form-item label="员工" prop="userId" v-hasPermi="['system:task:send']"> <el-form-item v-hasPermi="['system:task:send']" label="员工" prop="userId">
<el-select v-model="queryParams.userId" placeholder="请选择" size="mini"> <el-select v-model="queryParams.userId" placeholder="请选择" size="mini">
<el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" /> <el-option v-for="dict in userOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
</el-select> </el-select>
@ -24,7 +24,7 @@
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-plus" v-hasPermi="['system:summary:add']" size="mini" @click="handleAdd()">新增</el-button> <el-button v-hasPermi="['system:summary:add']" type="primary" icon="el-icon-plus" size="mini" @click="handleAdd()">新增</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -40,7 +40,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="月份" align="center" prop="month" /> <el-table-column label="月份" align="center" prop="month" />
= <el-table-column label="日期" align="center" prop="day" width="100" /> <el-table-column label="日期" align="center" prop="day" width="100" />
<el-table-column label="内容" align="center" min-width="100"> <el-table-column label="内容" align="center" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-html="scope.row.content" /> <div v-html="scope.row.content" />
@ -49,12 +49,12 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" v-hasPermi="['system:summary:edit']" @click="handleUpdate(scope.row)">修改</el-button> <el-button v-hasPermi="['system:summary:edit']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </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="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- 添加或修改公告对话框 --> <!-- 添加或修改公告对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
@ -82,7 +82,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" v-if="form.summaryType === 2"> <el-col v-if="form.summaryType === 2" :span="24">
<el-form-item label="日期" prop="day"> <el-form-item label="日期" prop="day">
<el-date-picker v-model="form.day" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" :disabled="dayEdit" /> <el-date-picker v-model="form.day" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" :disabled="dayEdit" />
</el-form-item> </el-form-item>
@ -90,8 +90,8 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="任务内容" prop="content"> <el-form-item label="任务内容" prop="content">
<!-- <editor v-model="form.content" /> --> <editor v-model="form.content" />
<el-input type="textarea" :rows="13" v-model="form.content"></el-input> <!-- <el-input v-model="form.content" type="textarea" :rows="13" /> -->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -104,15 +104,15 @@
</div> </div>
</template> </template>
<script> <script>
import { saveTask, getList } from '@/api/system/summary' import { saveTask, getList } from '@/api/system/summary';
import Editor from '@/components/Editor' import Editor from '@/components/Editor';
import empAPi from '@/api/system/employee' import empAPi from '@/api/system/employee';
export default { export default {
name: 'Summary', name: 'Summary',
components: { components: {
Editor, Editor
}, },
data() { data() {
return { return {
@ -133,7 +133,7 @@ export default {
userId: undefined, userId: undefined,
summaryType: 1, summaryType: 1,
month: undefined, month: undefined,
day: undefined, day: undefined
}, },
// //
form: {}, form: {},
@ -143,42 +143,42 @@ export default {
month: [{ required: true, message: '月份不能为空', trigger: 'blur' }], month: [{ required: true, message: '月份不能为空', trigger: 'blur' }],
day: [{ required: true, message: '日期不能为空', trigger: 'blur' }], day: [{ required: true, message: '日期不能为空', trigger: 'blur' }],
content: [ content: [
{ required: true, message: '任务内容不能为空', trigger: 'blur' }, { required: true, message: '任务内容不能为空', trigger: 'blur' }
], ],
summaryType: [{ required: true, message: '总结类型不能为空', trigger: 'blur' }], summaryType: [{ required: true, message: '总结类型不能为空', trigger: 'blur' }]
}, },
taskType: 1, taskType: 1,
userOptions: [], userOptions: [],
month: undefined, month: undefined,
day: undefined, day: undefined,
dayEdit: false, dayEdit: false,
userId: localStorage.getItem('userId'), userId: localStorage.getItem('userId')
} };
}, },
created() { created() {
this.getList() this.getList();
this.getEmployee() this.getEmployee();
let now = new Date() const now = new Date();
let year = now.getFullYear() // const year = now.getFullYear(); //
let month = now.getMonth() + 1 // const month = now.getMonth() + 1; //
let date = now.getDate() // const date = now.getDate(); //
this.month = month this.month = month;
this.day = year + '-' + month + '-' + date this.day = year + '-' + month + '-' + date;
}, },
methods: { methods: {
/** 查询公告列表 */ /** 查询公告列表 */
getList() { getList() {
this.loading = true this.loading = true;
getList(this.queryParams).then((response) => { getList(this.queryParams).then((response) => {
this.taskList = response.rows this.taskList = response.rows;
this.total = response.total this.total = response.total;
this.loading = false this.loading = false;
}) });
}, },
// //
cancel() { cancel() {
this.open = false this.open = false;
this.reset() this.reset();
}, },
// //
reset() { reset() {
@ -187,73 +187,73 @@ export default {
userId: undefined, userId: undefined,
month: this.month, month: this.month,
day: undefined, day: undefined,
content: undefined, content: undefined
} };
this.resetForm('form') this.resetForm('form');
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1;
this.getList() this.getList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm('queryForm') this.resetForm('queryForm');
this.handleQuery() this.handleQuery();
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset() this.reset();
this.open = true this.open = true;
this.$set(this.form, 'userId', this.userId) this.$set(this.form, 'userId', this.userId);
this.$set(this.form, 'day', this.day) this.$set(this.form, 'day', this.day);
this.dayEdit = false this.dayEdit = false;
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset() this.reset();
this.form = Object.assign({}, row) this.form = Object.assign({}, row);
this.taskType = this.form.taskType this.taskType = this.form.taskType;
if (this.form.taskType == 1) { if (this.form.taskType == 1) {
this.title = this.month + '月-总结' this.title = this.month + '月-总结';
} else { } else {
this.title = this.month + '月-总结' this.title = this.month + '月-总结';
} }
this.open = true this.open = true;
this.dayEdit = true this.dayEdit = true;
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function () { submitForm: function () {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
if (this.form.summaryType === 1) { if (this.form.summaryType === 1) {
this.form.day = undefined this.form.day = undefined;
} }
saveTask(this.form).then((response) => { saveTask(this.form).then((response) => {
if (response.code === 200) { if (response.code === 200) {
this.$message.success('保存成功'); this.$message.success('保存成功');
this.open = false this.open = false;
this.getList() this.getList();
} }
}) });
} }
}) });
}, },
// //
getEmployee() { getEmployee() {
empAPi.getEmployee({ coach: false }).then((resp) => { empAPi.getEmployee({ coach: false }).then((resp) => {
if (resp.code == 200) { if (resp.code == 200) {
//this.userOptions = resp.data; // this.userOptions = resp.data;
if (resp.data && resp.data.length > 0) { if (resp.data && resp.data.length > 0) {
resp.data.forEach((item) => { resp.data.forEach((item) => {
this.userOptions.push(item) this.userOptions.push(item);
}) });
} }
} }
}) });
}, }
}, }
} };
</script> </script>

@ -12,12 +12,12 @@
</el-row> </el-row>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button plain @click="(visible=false)">取消</el-button> <el-button plain @click="(visible = false)">取消</el-button>
<el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button> <el-button v-jclick type="primary" :disabled="!canSubmit" @click="dialogFormSubmit()">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { batchUpdate } from '@/api/zs/clue'; export default { import { batchUpdate } from '@/api/zs/clue'; export default {
name: 'BatchUpdateDialog', name: 'BatchUpdateDialog',
props: { props: {
@ -44,7 +44,6 @@ import { batchUpdate } from '@/api/zs/clue'; export default {
}, },
methods: { methods: {
init(info = undefined) { init(info = undefined) {
// debugger
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.resetDialogForm(); this.resetDialogForm();
@ -86,5 +85,5 @@ import { batchUpdate } from '@/api/zs/clue'; export default {
} }
} }
}; };
</script> </script>

@ -1,5 +1,5 @@
<template> <template>
<el-dialog title="公海" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="1000px" height="500" @close="closeDialog"> <el-dialog title="公海" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="1000px" height="500">
<div> <div>
<el-button type="text" icon="el-icon-refresh" style="margin-bottom: 10px" @click="_getTableList">刷新</el-button> <el-button type="text" icon="el-icon-refresh" style="margin-bottom: 10px" @click="_getTableList">刷新</el-button>
<el-table v-loading="loading" :data="publicList" border :row-class-name="tableRowClassName"> <el-table v-loading="loading" :data="publicList" border :row-class-name="tableRowClassName">
@ -54,10 +54,6 @@ export default {
} }
}); });
}, },
closeDialog() {
this.$emit('update:dialog.publicVisible', false);
},
handlePickup(item) { handlePickup(item) {
pickupClue(item).then((resp) => { pickupClue(item).then((resp) => {
if (resp && resp.code === 200) { if (resp && resp.code === 200) {
@ -72,8 +68,8 @@ export default {
} else { } else {
return ''; return '';
} }
}, }
} }
}; };
</script> </script>

@ -22,7 +22,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="创建时间"> <el-form-item label="创建时间">
<el-date-picker v-model="dateRange" style="width: 240px" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="pickDateChange" /> <el-date-picker v-model="createDateRange" style="width: 240px" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="pickDateChange" />
</el-form-item>
<el-form-item label="下次跟进日期">
<el-date-picker v-model="nextDateRange" style="width: 240px" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="nextDateChange" />
</el-form-item> </el-form-item>
<el-form-item label-width="0"> <el-form-item label-width="0">
<el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="$emit('search')">搜索</el-button>
@ -41,16 +44,20 @@ export default {
props: { props: {
userOptions: { userOptions: {
type: Array, type: Array,
default: [] default: () => ([])
}, },
sourceOptions: { sourceOptions: {
type: Array, type: Array,
default: [] default: () => ([])
}, },
form: {
type: Object,
default: () => ({})
}
}, },
data() { data() {
return { return {
searchForm: {}, searchForm: { ...this.form },
quickList: [ quickList: [
{ value: 1, label: '我创建的' }, { value: 1, label: '我创建的' },
{ value: 2, label: '我的有效' }, { value: 2, label: '我的有效' },
@ -62,27 +69,34 @@ export default {
{ value: 8, label: '撞单线索' } { value: 8, label: '撞单线索' }
], ],
intentionOptions: [], intentionOptions: [],
dateRange: [] createDateRange: [],
nextDateRange: []
};
},
watch: {
searchForm: {
handler(val) {
this.$emit('update:form', val);
},
deep: true
} }
}, },
created() { created() {
// //
this.getDicts('dm_intention_state').then((response) => { this.getDicts('dm_intention_state').then((response) => {
let list = response.data const list = response.data;
this.intentionOptions = [] this.intentionOptions = [];
list.map(item => { list.map(item => {
this.intentionOptions.push({ this.intentionOptions.push({
value: item.dictValue, value: item.dictValue,
label: item.dictLabel label: item.dictLabel
}) });
}) });
}) });
}, },
methods: { methods: {
resetQuery() { resetQuery() {
this.searchForm = { this.searchForm = {
createTime: [],
name: undefined, name: undefined,
intentionState: undefined, intentionState: undefined,
followUser2: undefined, followUser2: undefined,
@ -90,12 +104,28 @@ export default {
quickSearch: undefined, quickSearch: undefined,
total: 0 total: 0
}; };
this.dateRange = [] this.createDateRange = [];
this.nextDateRange = [];
}, },
pickDateChange() { pickDateChange() {
this.addDateRange(this.searchForm, this.dateRange) if (this.createDateRange.length) {
this.searchForm.createDateStart = this.createDateRange[0];
this.searchForm.createDateEnd = this.createDateRange[1];
} else {
this.searchForm.createDateStart = undefined;
this.searchForm.createDateEnd = undefined;
}
},
nextDateChange() {
if (this.nextDateRange.length) {
this.searchForm.nextDateStart = this.nextDateRange[0];
this.searchForm.nextDateEnd = this.nextDateRange[1];
} else {
this.searchForm.nextDateStart = undefined;
this.searchForm.nextDateEnd = undefined;
}
} }
}, }
} };
</script> </script>

@ -1,5 +1,5 @@
<template> <template>
<el-dialog :title="title" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="400px" @close="closeDialog"> <el-dialog :title="title" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="400px">
<el-upload ref="upload" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?ydtData=' + ydtData" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag> <el-upload ref="upload" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url + '?ydtData=' + ydtData" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
<i class="el-icon-upload" /> <i class="el-icon-upload" />
<div class="el-upload__text"> <div class="el-upload__text">
@ -13,12 +13,12 @@
</el-upload> </el-upload>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button> <el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="closeDialog"> </el-button> <el-button @click="visible = false"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth';
export default { export default {
name: 'UploadDialog', name: 'UploadDialog',
@ -35,8 +35,8 @@ export default {
// //
headers: { Authorization: 'Bearer ' + getToken() }, headers: { Authorization: 'Bearer ' + getToken() },
// //
url: process.env.VUE_APP_BASE_API + '/zs/clue/importData', url: process.env.VUE_APP_BASE_API + '/zs/clue/importData'
}, }
}; };
}, },
methods: { methods: {
@ -46,7 +46,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
if (info) { if (info) {
this.ydtData = info; this.ydtData = info;
this.title = "一点通-" + this.title; this.title = '一点通-' + this.title;
} }
}); });
}, },
@ -66,17 +66,12 @@ export default {
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + '</div>', '导入结果', { this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + '</div>', '导入结果', {
dangerouslyUseHTMLString: true dangerouslyUseHTMLString: true
}); });
this.$emit('update:dialog.batchUpdateVisible', false);
this.$emit('refreshDataList'); this.$emit('refreshDataList');
}, },
// //
submitFileForm() { submitFileForm() {
this.$refs.upload.submit(); this.$refs.upload.submit();
}, }
closeDialog() {
this.$emit('update:dialog.batchUpdateVisible', false);
},
} }
}; };
</script> </script>

@ -0,0 +1,274 @@
<template>
<div class="app-container">
<!-- 搜索插件 -->
<SearchForm v-show="showSearch" ref="SearchForm" :user-options="userOptions" :source-options="sourceOptions" @search="_getTableList" />
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button v-hasPermi="['zs:clue:add']" icon="el-icon-plus" type="primary" @click="handleAddandUpdate(undefined)">新增</el-button>
<el-button v-hasPermi="['zs:clue:import']" icon="el-icon-upload" type="warning" @click="handleImport(false)">导入</el-button>
<el-button v-hasPermi="['zs:clue:import']" icon="el-icon-upload" type="warning" @click="handleImport(true)">一点通导入</el-button>
<el-button v-hasPermi="['zs:clue:export']" icon="el-icon-download" type="warning" @click="handleExport">导出</el-button>
<el-button v-hasPermi="['zs:clue:edit']" icon="el-icon-edit" type="primary" :disabled="multiple" @click="handleBatChUpdate()">批量修改</el-button>
<el-button type="primary" @click="handlePublicClue">公海</el-button>
</el-col>
<right-toolbar :show-search.sync="showSearch" :columns="columns" @queryTable="_getTableList" />
</el-row>
<!-- 表格数据 -->
<el-table v-loading="loading" :data="tableList" @select="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<template v-for="item in columns">
<el-table-column v-if="item.visible" :key="item.prop" :label="item.label" align="center" :width="item.width" :prop="item.prop" :show-overflow-tooltip="item.overflow" />
</template>
<el-table-column 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" align="center" min-width="200">
<template slot-scope="scope">
<el-button v-hasPermi="['zs:clue:edit']" type="text" @click.native.stop="handleAddandUpdate(scope.row)">编辑</el-button>
<el-button v-if="scope.row.state" v-hasPermi="['zs:clue:sign']" type="text" style="color: #26a69a" @click.native.stop="handleSign(scope.row)">已登记</el-button>
<el-button v-if="!scope.row.state" v-hasPermi="['zs:clue:sign']" type="text" @click.native.stop="handleSign(scope.row)">未登记</el-button>
<el-button v-hasPermi="['zs:clue:remove']" type="text" icon="el-icon-delete" @click.native.stop="handleDelete(scope.row)">删除</el-button>
<el-button v-if="!scope.row.state" v-hasPermi="['zs:clue:discard']" type="text" icon="el-icon-delete" @click.native.stop="handleDiscard(scope.row)">释放</el-button>
</template>
</el-table-column>
</el-table>
<pagination :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" :page-sizes="[10, 20, 30, 50, 100]" @pagination="_getTableList" />
<!-- 新增修改 -->
<!-- <ClueForm v-if="dialog.addAndUpdateVisible" ref="addAndUpdateForm" :dialog-visible="dialog.addAndUpdateVisible" :options="options" @refreshDataList="_getTableList" /> -->
<!-- 批量修改 -->
<BatchUpdateDialog v-if="dialog.batchUpdateVisible" ref="batchUpdateDialogForm" :dialog-visible="dialog.batchUpdateVisible" :options="options" @refreshDataList="_getTableList" />
<!-- 公海 -->
<PublicDialog v-if="dialog.publicVisible" ref="publicDialogForm" :dialog-visible="dialog.publicVisible" @refreshDataList="_getTableList" />
<!-- 上传 -->
<UploadDialog v-if="dialog.uploadVisible" ref="uploadDialogForm" :dialog-visible="dialog.uploadVisible" @refreshDataList="_getTableList" />
<!-- 登记弹框 -->
<SignFormDialog ref="signDialogForm" :clue-info="clueInfo" />
</div>
</template>
<script>
import SearchForm from './components/SearchForm.vue';
import BatchUpdateDialog from './components/BatchUpdateDialog.vue';
import PublicDialog from './components/PublicDialog.vue';
import UploadDialog from './components/UploadDialog.vue';
import SignFormDialog from '../sign/components/SignFormDialog.vue';
import { defaultColumns } from './columns.js';
import { getClueList, deleteClue, getClueCountBadge, discardClue, getSign } from '@/api/zs/clue';
import empApi from '@/api/system/employee';
export default {
name: 'Clue',
components: {
SearchForm, BatchUpdateDialog, PublicDialog, UploadDialog, SignFormDialog
},
data() {
return {
//
loading: false,
//
showSearch: true,
searchForm: {
pageNum: 1,
pageSize: 10
},
tableList: [],
total: 0,
columns: [],
ids: [],
//
single: true,
//
multiple: true,
expireCount: 0,
dialog: {
batchUpdateVisible: false,
publicVisible: false,
uploadVisible: false,
addAndUpdateVisible: false,
signVisible: false
},
userOptions2: [],
userOptions: [],
sourceOptions: [],
tagColorMap: {
A高意向: '#ff7043',
B中意向: '#26a69a',
C无意向: '#5c6bc0',
D未知意向: '#ef5350',
报名成功: '#ffa726',
报名他校: '#afaeb0',
无效线索: '#afaeb0'
},
options: undefined,
clueInfo: undefined
};
},
created() {
const str = localStorage.getItem(`${this.$route.name}-table-columns`);
this.columns = str ? JSON.parse(str) : defaultColumns;
this._getClueCountBadge();
this.getEmployee();
// 线
this.getDicts('dm_source').then((response) => {
this.sourceOptions = response.data;
});
//
this.getDicts('dm_intention_state').then((response) => {
this.intentionOptions = response.data;
});
this._getTableList();
},
methods: {
//
_getTableList() {
this.loading = true;
const params = { ...this.searchForm };
getClueList(params).then((response) => {
this.tableList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 线
async _getClueCountBadge() {
const resp = await getClueCountBadge();
if (resp.code === 200) {
this.expireCount = resp.data;
}
},
//
handleAddandUpdate(info) {
this.$router.push('/zs/clue-form/index/' + (info ? info.clueId : 0));
},
//
handleBatChUpdate() {
this.options = {
userOptions: this.userOptions
};
this.getEmployee2();
this.dialog.batchUpdateVisible = true;
const item = {
clueIds: this.ids
};
this.$nextTick(() => {
this.$refs.batchUpdateDialogForm.init(item);
});
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.clueId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
// 线
handleDiscard(item) {
discardClue(item).then((resp) => {
if (resp && resp.code === 200) {
this.$message.success('释放成功');
this._getTableList();
}
});
},
//
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._getTableList();
}
});
})
.catch(function () { });
},
//
//
handleImport(ydtData) {
this.dialog.uploadVisible = true;
this.$nextTick(() => {
this.$refs.uploadDialogForm.init(ydtData);
});
},
/** 导出按钮操作 */
handleExport() {
this.$confirm('是否确认导出所有学员信息项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const tempForm = this.$refs.SearchForm?.searchForm || {};
this.download('zs/clue/export', tempForm, `线索信息_${new Date().getTime()}.xlsx`);
});
},
//
handlePublicClue() {
this.dialog.publicVisible = true;
this.$nextTick(() => {
this.$refs.publicDialogForm.init();
});
},
getEmployee() {
empApi.getEmployee().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;
});
}
});
},
//
async handleSign(item) {
// clueId
let signInfo = {};
this.clueInfo = item;
const resp = await getSign({ clueId: item.clueId });
if (resp.code == 200) {
signInfo = { ...resp.data };
}
this.$nextTick(() => {
this.$refs.signDialogForm.init(signInfo);
});
}
}
};
</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>

@ -1,20 +1,18 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索插件 --> <SearchForm v-show="showSearch" ref="SearchForm" :form.sync="searchForm" :user-options="userOptions" :source-options="sourceOptions" @search="_getTableList" />
<SearchForm v-show="showSearch" ref="SearchForm" @search="_getTableList" :userOptions="userOptions" :sourceOptions="sourceOptions" />
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button icon="el-icon-plus" type="primary" @click="handleAddandUpdate(undefined)">新增</el-button> <el-button v-hasPermi="['zs:clue:add']" icon="el-icon-plus" type="primary" @click="handleAddandUpdate(undefined)">新增</el-button>
<el-button icon="el-icon-upload" type="warning" @click="handleImport(false)">导入</el-button> <el-button v-hasPermi="['zs:clue:import']" icon="el-icon-upload" type="warning" @click="handleImport(false)">导入</el-button>
<el-button icon="el-icon-upload" type="warning" @click="handleImport(true)">一点通导入</el-button> <el-button v-hasPermi="['zs:clue:import']" icon="el-icon-upload" type="warning" @click="handleImport(true)">一点通导入</el-button>
<el-button icon="el-icon-download" type="warning" @click="handleExport">导出</el-button> <el-button v-hasPermi="['zs:clue:export']" icon="el-icon-download" type="warning" @click="handleExport">导出</el-button>
<el-button icon="el-icon-edit" type="primary" :disabled="multiple" @click="handleBatChUpdate()">批量修改</el-button> <el-button v-hasPermi="['zs:clue:edit']" icon="el-icon-edit" type="primary" :disabled="multiple" @click="handleBatChUpdate()">批量修改</el-button>
<el-button type="primary" @click="handlePublicClue">公海</el-button> <el-button type="primary" @click="handlePublicClue">公海</el-button>
</el-col> </el-col>
<right-toolbar :show-search.sync="showSearch" :columns="columns" @queryTable="_getTableList" /> <right-toolbar :show-search.sync="showSearch" :columns="columns" @queryTable="_getTableList" />
</el-row> </el-row>
<!-- 表格数据 --> <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="tableList" @select="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" /> <el-table-column type="selection" width="50" align="center" />
<template v-for="item in columns"> <template v-for="item in columns">
<el-table-column v-if="item.visible" :key="item.prop" :label="item.label" align="center" :width="item.width" :prop="item.prop" :show-overflow-tooltip="item.overflow" /> <el-table-column v-if="item.visible" :key="item.prop" :label="item.label" align="center" :width="item.width" :prop="item.prop" :show-overflow-tooltip="item.overflow" />
@ -24,30 +22,28 @@
<el-tag effect="dark" style="border: none" :color="tagColorMap[row.intentionState]">{{ row.intentionState }}</el-tag> <el-tag effect="dark" style="border: none" :color="tagColorMap[row.intentionState]">{{ row.intentionState }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="200"> <el-table-column label="操作" fixed="right" align="left" min-width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" icon="el-icon-edit" @click.native.stop="handleAddandUpdate(scope.row)">编辑</el-button> <el-button v-hasPermi="['zs:clue:edit']" type="text" @click.native.stop="handleAddandUpdate(scope.row)">编辑</el-button>
<el-button v-if="scope.row.state" type="text" icon="el-icon-edit" style="color: #26a69a" @click.native.stop="handleSign(scope.row)">已登记</el-button> <el-button v-if="scope.row.state" v-hasPermi="['zs:clue:sign']" type="text" style="color: #26a69a" @click.native.stop="handleSign(scope.row)">已登记</el-button>
<el-button v-if="!scope.row.state" type="text" icon="el-icon-edit" @click.native.stop="handleSign(scope.row)">未登记</el-button> <el-button v-if="!scope.row.state" v-hasPermi="['zs:clue:sign']" type="text" @click.native.stop="handleSign(scope.row)">未登记</el-button>
<el-button type="text" icon="el-icon-delete" @click.native.stop="handleDelete(scope.row)">删除</el-button> <el-button v-hasPermi="['zs:clue:remove']" type="text" @click.native.stop="handleDelete(scope.row)">删除</el-button>
<el-button type="text" v-if="!scope.row.state" icon="el-icon-delete" @click.native.stop="handleDiscard(scope.row)">释放</el-button> <el-button v-if="!scope.row.state" v-hasPermi="['zs:clue:discard']" type="text" @click.native.stop="handleDiscard(scope.row)">释放</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" :page-sizes="[10, 20, 30, 50, 100]" @pagination="_getTableList" /> <pagination :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" :page-sizes="[10, 20, 30, 50, 100]" @pagination="_getTableList" />
<!-- 新增修改 -->
<!-- <ClueForm v-if="dialog.addAndUpdateVisible" ref="addAndUpdateForm" :dialog-visible="dialog.addAndUpdateVisible" :options="options" @refreshDataList="_getTableList" /> -->
<!-- 批量修改 --> <!-- 批量修改 -->
<BatchUpdateDialog v-if="dialog.batchUpdateVisible" ref="batchUpdateDialogForm" :dialog-visible="dialog.batchUpdateVisible" :options="options" @refreshDataList="_getTableList" /> <BatchUpdateDialog ref="batchUpdateDialogForm" :options="options" @refreshDataList="_getTableList" />
<!-- 公海 --> <!-- 公海 -->
<PublicDialog v-if="dialog.publicVisible" ref="publicDialogForm" :dialog-visible="dialog.publicVisible" @refreshDataList="_getTableList" /> <PublicDialog ref="publicDialogForm" @refreshDataList="_getTableList" />
<!-- 上传 --> <!-- 上传 -->
<UploadDialog v-if="dialog.uploadVisible" ref="uploadDialogForm" :dialog-visible="dialog.uploadVisible" @refreshDataList="_getTableList" /> <UploadDialog ref="uploadDialogForm" @refreshDataList="_getTableList" />
<!-- 登记弹框 --> <!-- 登记弹框 -->
<SignFormDialog v-if="dialog.signVisible" ref="signDialogForm" :dialog-visible="dialog.signVisible" :clueInfo="clueInfo" /> <SignFormDialog ref="signDialogForm" :clue-info="clueInfo" />
</div> </div>
</template> </template>
<script> <script>
import SearchForm from './components/SearchForm.vue'; import SearchForm from './components/SearchForm.vue';
import BatchUpdateDialog from './components/BatchUpdateDialog.vue'; import BatchUpdateDialog from './components/BatchUpdateDialog.vue';
@ -56,19 +52,14 @@ import UploadDialog from './components/UploadDialog.vue';
import SignFormDialog from '../sign/components/SignFormDialog.vue'; import SignFormDialog from '../sign/components/SignFormDialog.vue';
import { defaultColumns } from './columns.js'; import { defaultColumns } from './columns.js';
import { getClueList, exportData, deleteClue, getClueCountBadge, discardClue, getSign } from '@/api/zs/clue'; import { getClueList, deleteClue, getClueCountBadge, discardClue, getSign } from '@/api/zs/clue';
import empApi from '@/api/system/employee' import empApi from '@/api/system/employee';
export default { export default {
components: { components: {
SearchForm, BatchUpdateDialog, PublicDialog, UploadDialog, SignFormDialog SearchForm, BatchUpdateDialog, PublicDialog, UploadDialog, SignFormDialog
}, },
name: 'Clue',
data() { data() {
return { return {
//
loading: false,
//
showSearch: true, showSearch: true,
searchForm: { searchForm: {
pageNum: 1, pageNum: 1,
@ -83,15 +74,6 @@ export default {
// //
multiple: true, multiple: true,
expireCount: 0, expireCount: 0,
dialog: {
batchUpdateVisible: false,
publicVisible: false,
uploadVisible: false,
addAndUpdateVisible: false,
signVisible: false
},
userOptions2: [],
userOptions: [], userOptions: [],
sourceOptions: [], sourceOptions: [],
tagColorMap: { tagColorMap: {
@ -105,7 +87,7 @@ export default {
}, },
options: undefined, options: undefined,
clueInfo: undefined clueInfo: undefined
} };
}, },
created() { created() {
const str = localStorage.getItem(`${this.$route.name}-table-columns`); const str = localStorage.getItem(`${this.$route.name}-table-columns`);
@ -133,7 +115,6 @@ export default {
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
}, },
// 线 // 线
async _getClueCountBadge() { async _getClueCountBadge() {
@ -144,24 +125,11 @@ export default {
}, },
// //
handleAddandUpdate(info) { handleAddandUpdate(info) {
this.$router.push("/zs/clue-form/index/" + (info ? info.clueId : 0)); this.$router.push('/zs/clue-form/index/' + (info ? info.clueId : 0));
},
//
handleBatChUpdate() {
this.options = {
userOptions: this.userOptions
}
this.getEmployee2();
this.dialog.batchUpdateVisible = true;
let item = {
clueIds: this.ids
}
this.$nextTick(() => {
this.$refs.batchUpdateDialogForm.init(item);
});
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
console.log(selection);
this.ids = selection.map((item) => item.clueId); this.ids = selection.map((item) => item.clueId);
this.single = selection.length !== 1; this.single = selection.length !== 1;
this.multiple = !selection.length; this.multiple = !selection.length;
@ -192,10 +160,8 @@ export default {
}) })
.catch(function () { }); .catch(function () { });
}, },
//
// //
handleImport(ydtData) { handleImport(ydtData) {
this.dialog.uploadVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.uploadDialogForm.init(ydtData); this.$refs.uploadDialogForm.init(ydtData);
}); });
@ -213,7 +179,6 @@ export default {
}, },
// //
handlePublicClue() { handlePublicClue() {
this.dialog.publicVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.publicDialogForm.init(); this.$refs.publicDialogForm.init();
}); });
@ -225,53 +190,32 @@ export default {
} }
}); });
}, },
// 线 //
getEmployee2() { handleBatChUpdate() {
empApi.getEmployee().then((resp) => { this.options = {
if (resp.code === 200) { userOptions: this.userOptions
this.userOptions2 = resp.data; };
this.userOptions2 = this.userOptions2.filter((item) => { this.$nextTick(() => {
return item.accept; this.$refs.batchUpdateDialogForm.init({
}); clueIds: this.ids
} });
}); });
}, },
// //
async handleSign(item) { async handleSign(item) {
//clueId // clueId
let signInfo = {}; let signInfo = {};
this.clueInfo = item; this.clueInfo = item;
const resp = await getSign({ clueId: item.clueId }) const resp = await getSign({ clueId: item.clueId });
if (resp.code == 200) { if (resp.code == 200) {
signInfo = { ...resp.data } signInfo = { ...resp.data };
} }
this.dialog.signVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.signDialogForm.init(signInfo); this.$refs.signDialogForm.init(signInfo);
}); });
} }
} }
} };
</script> </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>
<style lang="scss" scoped></style>

@ -1,18 +1,18 @@
<template> <template>
<!-- 成交登记对话框 --> <!-- 成交登记对话框 -->
<el-dialog title="成交登记" :visible.sync="visible" width="800px" append-to-body :close-on-click-modal="false" v-loading="signLoading" style> <el-dialog v-if="visible" v-loading="signLoading" title="成交登记" :visible.sync="visible" width="800px" append-to-body :close-on-click-modal="false" style>
<!-- <div style="height:500px;overflow-y:auto;"> --> <!-- <div style="height:500px;overflow-y:auto;"> -->
<span style="color:red;">输入联系方式后会进行线索数据匹配</span> <span style="color:red;">输入联系方式后会进行线索数据匹配</span>
<el-form :model="modalForm" ref="modalForm" :rules="modalRules" label-width="110px" :disabled="!modalForm.signEdit"> <el-form ref="modalForm" :model="modalForm" :rules="modalRules" label-width="110px" :disabled="!modalForm.signEdit">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="学员联系方式" prop="phone"> <el-form-item label="学员联系方式" prop="phone">
<el-input v-model="modalForm.phone" :disabled="modalForm.clueId != undefined || !modalForm.phoneEdit" @blur="searchClue"></el-input> <el-input v-model="modalForm.phone" :disabled="modalForm.clueId != undefined || !modalForm.phoneEdit" @blur="searchClue" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="学员姓名" prop="name"> <el-form-item label="学员姓名" prop="name">
<el-input v-model="modalForm.name" :disabled=" modalForm.clueId != undefined"></el-input> <el-input v-model="modalForm.name" :disabled="modalForm.clueId != undefined" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -36,12 +36,12 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="成交日期" prop="dealDate"> <el-form-item label="成交日期" prop="dealDate">
<el-date-picker v-model="modalForm.dealDate" size="small" :picker-options="dateControl" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date"></el-date-picker> <el-date-picker v-model="modalForm.dealDate" size="small" :picker-options="dateControl" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报名价格(元)" prop="signPrice"> <el-form-item label="报名价格(元)" prop="signPrice">
<el-input v-model="modalForm.signPrice" placeholder="学员报名时需要交纳总共的钱" @blur="priceChange"></el-input> <el-input v-model="modalForm.signPrice" placeholder="学员报名时需要交纳总共的钱" @blur="priceChange" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -50,14 +50,14 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报名驾校" prop="signSchool"> <el-form-item label="报名驾校" prop="signSchool">
<el-select v-model="modalForm.signSchool" filterable placeholder="请选择" value-key="schoolId" clearable size="small" @change="schoolChange"> <el-select v-model="modalForm.signSchool" filterable placeholder="请选择" value-key="schoolId" clearable size="small" @change="schoolChange">
<el-option v-for="(dict, index) in schoolOptions.filter(item =>item.schoolId === form.signSchool)" :key="index" :label="dict.schoolName" :value="dict.schoolId" /> <el-option v-for="(dict, index) in schoolOptions.filter(item => item.schoolId === modalForm.signSchool)" :key="index" :label="dict.schoolName" :value="dict.schoolId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报名场地" prop="signPlace"> <el-form-item label="报名场地" prop="signPlace">
<el-select v-model="modalForm.signPlace" filterable placeholder="请选择" clearable value-key="placeId" size="small" @change="placeChange"> <el-select v-model="modalForm.signPlace" filterable placeholder="请选择" clearable value-key="placeId" size="small" @change="placeChange">
<el-option v-for="(dict, index) in placeOptions.filter(item =>item.schoolId === form.signSchool)" :key="index" :label="dict.name" :value="dict.placeId" /> <el-option v-for="(dict, index) in placeOptions.filter(item => item.schoolId === modalForm.signSchool)" :key="index" :label="dict.name" :value="dict.placeId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -67,14 +67,14 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="报名班型" prop="signClass"> <el-form-item label="报名班型" prop="signClass">
<el-select v-model="modalForm.signClass" filterable placeholder="请选择" clearable value-key="typeId" size="small" @change="priceChange"> <el-select v-model="modalForm.signClass" filterable placeholder="请选择" clearable value-key="typeId" size="small" @change="priceChange">
<el-option v-for="(dict, index) in classTypeOptions.filter(item =>((!item.placeId && item.schoolId === form.signSchool) || item.placeId === form.signPlace))" :key="index" :label="`${dict.licenseType}-${dict.typeName}`" :value="dict.typeId" /> <el-option v-for="(dict, index) in classTypeOptions.filter(item => ((!item.placeId && item.schoolId === modalForm.signSchool) || item.placeId === modalForm.signPlace))" :key="index" :label="`${dict.licenseType}-${dict.typeName}`" :value="dict.typeId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="对接人" prop="schoolPeople"> <el-form-item label="对接人" prop="schoolPeople">
<el-input v-model="modalForm.schoolPeople"></el-input> <el-input v-model="modalForm.schoolPeople" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -82,13 +82,13 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="驾校支付" prop="schoolPay"> <el-form-item label="驾校支付" prop="schoolPay">
<el-input type="number" v-model="modalForm.schoolPay" placeholder="请输入驾校支付金额" disabled></el-input> <el-input v-model="modalForm.schoolPay" type="number" placeholder="请输入驾校支付金额" disabled />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="驾考宝典款" prop="alipay"> <el-form-item label="驾考宝典款" prop="alipay">
<el-input v-model="modalForm.alipay" placeholder="请输入驾考宝典款金额"></el-input> <el-input v-model="modalForm.alipay" placeholder="请输入驾考宝典款金额" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -104,7 +104,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="额外支出金额" prop="extraPay"> <el-form-item label="额外支出金额" prop="extraPay">
<el-input placeholder="请输入额外支出金额" v-model="modalForm.extraPay"></el-input> <el-input v-model="modalForm.extraPay" placeholder="请输入额外支出金额" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -146,7 +146,7 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注" prop="memo"> <el-form-item label="备注" prop="memo">
<el-input type="textarea" :rows="2" v-model="modalForm.memo"></el-input> <el-input v-model="modalForm.memo" type="textarea" :rows="2" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -172,34 +172,34 @@
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row v-if="modalForm && modalForm.signId"> <el-row v-if="modalForm && modalForm.signId">
<el-col :span="24"> <el-col :span="24">
<el-form-item label="审核记录"> <el-form-item label="审核记录">
<CheckRecord :signId="modalForm.signId" /> <CheckRecord :sign-id="modalForm.signId" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<!-- </div> --> <!-- </div> -->
<span slot="footer" v-if="modalForm.signEdit"> <span v-if="modalForm.signEdit" slot="footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<el-button type="primary" :disabled="!canSubmit" @click="handleSubmit"> </el-button> <el-button type="primary" :disabled="!canSubmit" @click="handleSubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { addSign, updateSign } from '@/api/zs/sign' import { addSign, updateSign } from '@/api/zs/sign';
import { validateMoney } from '@/utils/validate' import { validateMoney } from '@/utils/validate';
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth';
import empApi from '@/api/system/employee' import empApi from '@/api/system/employee';
import schoolAPi from '@/api/sch/school' import schoolAPi from '@/api/sch/school';
import { getAllPlaces } from '@/api/sch/place' import { getAllPlaces } from '@/api/sch/place';
import { getClassTypeTableList } from '@/api/sch/classType' import { getClassTypeTableList } from '@/api/sch/classType';
import { uploadEvidence, deleteFile, } from '@/api/tool/common' import { uploadEvidence, deleteFile } from '@/api/tool/common';
import { getClueList } from '@/api/zs/clue' import { getClueList } from '@/api/zs/clue';
import CheckRecord from './CheckRecord.vue' import CheckRecord from './CheckRecord.vue';
export default { export default {
name: 'SignFormDialog', name: 'SignFormDialog',
@ -219,7 +219,7 @@ export default {
userId: localStorage.getItem('userId'), userId: localStorage.getItem('userId'),
loading: { loading: {
tableLoading: false, tableLoading: false,
modalSaveLoading: false, modalSaveLoading: false
}, },
visible: false, visible: false,
signLoading: false, signLoading: false,
@ -229,14 +229,14 @@ export default {
phone: { required: true, message: '联系方式不为空', trigger: 'blur' }, phone: { required: true, message: '联系方式不为空', trigger: 'blur' },
source: { required: true, message: '线索来源不为空', trigger: 'blur' }, source: { required: true, message: '线索来源不为空', trigger: 'blur' },
area: { required: true, message: '所属区域不为空', trigger: 'blur' }, area: { required: true, message: '所属区域不为空', trigger: 'blur' },
dealDate: { required: true, message: '成交时间不为空', trigger: 'blur,change', }, dealDate: { required: true, message: '成交时间不为空', trigger: 'blur,change' },
state: { required: true, message: '是否权限必选', trigger: 'blur,change', }, state: { required: true, message: '是否权限必选', trigger: 'blur,change' },
followUser: { required: true, message: '归属人员不为空', trigger: 'blur,change', }, followUser: { required: true, message: '归属人员不为空', trigger: 'blur,change' },
signSchool: { required: true, message: '报名驾校不为空', trigger: 'blur,change', }, signSchool: { required: true, message: '报名驾校不为空', trigger: 'blur,change' },
signPlace: { required: true, message: '报名场地不为空', trigger: 'blur,change', }, signPlace: { required: true, message: '报名场地不为空', trigger: 'blur,change' },
signClass: { required: true, message: '报名班型不为空', trigger: 'blur,change', }, signClass: { required: true, message: '报名班型不为空', trigger: 'blur,change' },
dealState: { required: true, message: '结算情况不为空', trigger: 'blur,change', }, dealState: { required: true, message: '结算情况不为空', trigger: 'blur,change' },
signPrice: { required: true, validator: validateMoney, trigger: 'blur', }, signPrice: { required: true, validator: validateMoney, trigger: 'blur' }
}, },
userOptions: [], userOptions: [],
clueOptions: [], clueOptions: [],
@ -249,12 +249,12 @@ export default {
percentageOptions: [ percentageOptions: [
{ {
value: '驾校已结算', value: '驾校已结算',
label: '驾校已结算', label: '驾校已结算'
}, },
{ {
value: '提成已发放', value: '提成已发放',
label: '提成已发放', label: '提成已发放'
}, }
], ],
dateControl: undefined, dateControl: undefined,
areaOptions: [], areaOptions: [],
@ -270,137 +270,134 @@ export default {
// //
headers: { Authorization: 'Bearer ' + getToken() }, headers: { Authorization: 'Bearer ' + getToken() },
// //
url: process.env.VUE_APP_BASE_API + '/common/upload', url: process.env.VUE_APP_BASE_API + '/common/upload'
} }
} };
}, },
created() { created() {
// 线
//线
this.getDicts('dm_source').then((response) => { this.getDicts('dm_source').then((response) => {
this.sourceOptions = response.data this.sourceOptions = response.data;
}) });
// //
this.getDicts('dm_intention_state').then((response) => { this.getDicts('dm_intention_state').then((response) => {
this.intentionOptions = response.data this.intentionOptions = response.data;
}) });
// //
this.getDicts('dm_commission').then((response) => { this.getDicts('dm_commission').then((response) => {
this.commissionOptions = response.data this.commissionOptions = response.data;
}) });
// //
this.getDicts('dm_extra_pay').then((response) => { this.getDicts('dm_extra_pay').then((response) => {
this.extraPayTypeOptions = response.data this.extraPayTypeOptions = response.data;
}) });
// //
this.getDicts('dm_area').then((response) => { this.getDicts('dm_area').then((response) => {
this.areaOptions = response.data this.areaOptions = response.data;
}) });
this.getSchools() this.getSchools();
this.getEmployee() this.getEmployee();
}, },
methods: { methods: {
init(info = undefined) { init(info = undefined) {
this.fileList = [] this.fileList = [];
this.picList = [] this.picList = [];
this.canSubmit = true; this.canSubmit = true;
this.checkRecord = [] this.checkRecord = [];
this.$nextTick(() => { this.$nextTick(() => {
this.resetForm('modalForm') this.resetForm('modalForm');
this.resetForm(); // 线
//线
this.dealClue(this.clueInfo); this.dealClue(this.clueInfo);
if (info && info.signId) { if (info && info.signId) {
// //
this.handleUpdate(info) this.handleUpdate(info);
} else { } else {
// //
this.handleAdd() this.handleAdd();
} }
this.visible = true; this.visible = true;
}); });
}, },
getSchools() { getSchools() {
schoolAPi.pageList().then((resp) => { schoolAPi.pageList().then((resp) => {
this.schoolOptions = resp.rows this.schoolOptions = resp.rows;
}) });
}, },
getPlaces(schoolId) { getPlaces(schoolId) {
getAllPlaces({ schoolId: schoolId, status: '0' }).then((resp) => { getAllPlaces({ schoolId: schoolId, status: '0' }).then((resp) => {
this.placeOptions = resp.data this.placeOptions = resp.data;
}) });
}, },
getClassTypes(schoolId, placeId) { getClassTypes(schoolId, placeId) {
getClassTypeTableList({ schoolId: schoolId, placeId: placeId, status: '0' }).then( getClassTypeTableList({ schoolId: schoolId, placeId: placeId, status: '0' }).then(
(resp) => { (resp) => {
this.classTypeOptions = resp.rows this.classTypeOptions = resp.rows;
} }
) );
}, },
getEmployee() { getEmployee() {
empApi.getEmployee().then((resp) => { empApi.getEmployee().then((resp) => {
if (resp.code == 200) { if (resp.code == 200) {
this.userOptions = resp.data this.userOptions = resp.data;
} }
}) });
}, },
checkDate(date) { checkDate(date) {
let dealDate = new Date(date) const dealDate = new Date(date);
let year = dealDate.getFullYear() // const year = dealDate.getFullYear(); //
let month = dealDate.getMonth() + 1 // const month = dealDate.getMonth() + 1; //
let endDate = new Date(year, month, 5) const endDate = new Date(year, month, 5);
let now = new Date() const now = new Date();
if (now.getTime() >= endDate.getTime()) { if (now.getTime() >= endDate.getTime()) {
this.signEdit = true this.signEdit = true;
} }
}, },
//change // change
schoolChange(e) { schoolChange(e) {
this.$set(this.modalForm, 'signPlace', undefined) this.$set(this.modalForm, 'signPlace', undefined);
this.$set(this.modalForm, 'signClass', undefined) this.$set(this.modalForm, 'signClass', undefined);
this.classTypeOptions = [] this.classTypeOptions = [];
this.$set(this.modalForm, 'schoolPeople', undefined) this.$set(this.modalForm, 'schoolPeople', undefined);
this.$set(this.modalForm, 'area', undefined) this.$set(this.modalForm, 'area', undefined);
this.getPlaces(e) this.getPlaces(e);
}, },
//change // change
placeChange() { placeChange() {
this.$set(this.modalForm, 'signClass', undefined) this.$set(this.modalForm, 'signClass', undefined);
if (this.modalForm.signPlace) { if (this.modalForm.signPlace) {
const place = this.placeOptions.find( const place = this.placeOptions.find(
(item) => item.placeId === this.modalForm.signPlace (item) => item.placeId === this.modalForm.signPlace
) );
this.$set(this.modalForm, 'schoolPeople', place.contact) this.$set(this.modalForm, 'schoolPeople', place.contact);
this.$set(this.modalForm, 'area', place.area) this.$set(this.modalForm, 'area', place.area);
this.getClassTypes(this.modalForm.signSchool, this.modalForm.signPlace) this.getClassTypes(this.modalForm.signSchool, this.modalForm.signPlace);
} else { } else {
this.classTypeOptions = [] this.classTypeOptions = [];
this.$set(this.modalForm, 'schoolPeople', undefined) this.$set(this.modalForm, 'schoolPeople', undefined);
this.$set(this.modalForm, 'area', undefined) this.$set(this.modalForm, 'area', undefined);
} }
}, },
handleAdd() { handleAdd() {
this.placeOptions = [] this.placeOptions = [];
this.classTypeOptions = [] this.classTypeOptions = [];
this.setDate(true) this.setDate(true);
}, },
handleUpdate(item) { handleUpdate(item) {
this.setDate(false) this.setDate(false);
this.modalForm = Object.assign({}, item) this.modalForm = Object.assign({}, item);
this.getPlaces(this.modalForm.signSchool) this.getPlaces(this.modalForm.signSchool);
this.getClassTypes(this.modalForm.signSchool, this.modalForm.signPlace) this.getClassTypes(this.modalForm.signSchool, this.modalForm.signPlace);
this.modalForm.phoneEdit = false this.modalForm.phoneEdit = false;
if (this.modalForm.fileList) { if (this.modalForm.fileList) {
this.fileList = this.modalForm.fileList this.fileList = this.modalForm.fileList;
} }
}, },
// //
resetForm() { resetForm() {
let now = new Date() const now = new Date();
let year = now.getFullYear() // const year = now.getFullYear(); //
let month = now.getMonth() + 1 // const month = now.getMonth() + 1; //
let date = now.getDate() // const date = now.getDate(); //
this.modalForm = { this.modalForm = {
signId: undefined, signId: undefined,
clueId: undefined, clueId: undefined,
@ -433,153 +430,153 @@ export default {
signEdit: true, signEdit: true,
phoneEdit: true, phoneEdit: true,
fileList: [] fileList: []
} };
}, },
setDate(flag) { setDate(flag) {
let now = new Date() const now = new Date();
let year = now.getFullYear() // const year = now.getFullYear(); //
let month = now.getMonth() // const month = now.getMonth(); //
let start = new Date(year, month - 1, 1) let start = new Date(year, month - 1, 1);
// console.log(new Date(year, month , 9, 9)) // console.log(new Date(year, month , 9, 9))
if (flag && now >= new Date(year, month, 5)) { if (flag && now >= new Date(year, month, 5)) {
start = new Date(year, month, 1) start = new Date(year, month, 1);
} }
if (this.admin != 'true') { if (this.admin != 'true') {
this.dateControl = { this.dateControl = {
disabledDate: (time) => { disabledDate: (time) => {
return time.getTime() < start || time.getTime() >= new Date() return time.getTime() < start || time.getTime() >= new Date();
}, }
} };
} }
}, },
handleSignSave() { handleSignSave() {
this.modalForm.checkState = 1 this.modalForm.checkState = 1;
this.modalForm.fileList = this.fileList this.modalForm.fileList = this.fileList;
// //
this.$refs.modalForm.validate((valid) => { this.$refs.modalForm.validate((valid) => {
if (valid) { if (valid) {
this.canSubmit = false; this.canSubmit = false;
if (this.modalForm.signId) { if (this.modalForm.signId) {
updateSign(this.modalForm).then((resp) => { updateSign(this.modalForm).then((resp) => {
if (resp.code == 200) { if (resp.code == 200) {
this.$message.success('提交成功') this.$message.success('提交成功');
this.visible = false this.visible = false;
this.$emit('refreshDataList'); this.$emit('refreshDataList');
} else { } else {
this.canSubmit = true; this.canSubmit = true;
} }
}) });
} else { } else {
addSign(this.modalForm).then((resp) => { addSign(this.modalForm).then((resp) => {
if (resp.code == 200) { if (resp.code == 200) {
this.$message.success('提交成功') this.$message.success('提交成功');
this.visible = false this.visible = false;
this.$emit('refreshDataList') this.$emit('refreshDataList');
} else { } else {
// this.$message.error(":" + resp.msg); // this.$message.error(":" + resp.msg);
this.canSubmit = true; this.canSubmit = true;
} }
}) });
} }
} }
}) });
}, },
handleSubmit() { handleSubmit() {
this.$confirm('提交后将进入审核阶段,是否提交确认提交?', '警告', { this.$confirm('提交后将进入审核阶段,是否提交确认提交?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning'
}) })
.then((res) => { .then((res) => {
this.handleSignSave() this.handleSignSave();
}) })
.catch(function () { }) .catch(function () { });
}, },
//线 // 线
searchClue(e) { searchClue(e) {
console.log(e.target.value) console.log(e.target.value);
if (e.target.value && e.target.value != '') { if (e.target.value && e.target.value != '') {
this.signLoading = true this.signLoading = true;
getClueList({ state: false, name: e.target.value }).then((response) => { getClueList({ state: false, name: e.target.value }).then((response) => {
if (response.code == 200 && response.rows && response.rows[0]) { if (response.code == 200 && response.rows && response.rows[0]) {
this.dealClue(response.rows[0]); this.dealClue(response.rows[0]);
} else { } else {
this.dealClue(undefined); this.dealClue(undefined);
} }
this.signLoading = false this.signLoading = false;
}) });
} else { } else {
this.dealClue(undefined); this.dealClue(undefined);
} }
}, },
//线 // 线
dealClue(clueInfo) { dealClue(clueInfo) {
if (clueInfo) { if (clueInfo) {
this.modalForm.clueId = clueInfo.clueId this.modalForm.clueId = clueInfo.clueId;
this.modalForm.name = clueInfo.name this.modalForm.name = clueInfo.name;
this.modalForm.phone = clueInfo.phone this.modalForm.phone = clueInfo.phone;
this.modalForm.source = clueInfo.source this.modalForm.source = clueInfo.source;
this.modalForm.followUser = clueInfo.followUser this.modalForm.followUser = clueInfo.followUser;
this.modalForm.offlineReceiver = clueInfo.offlineReceiver this.modalForm.offlineReceiver = clueInfo.offlineReceiver;
} else { } else {
this.modalForm.clueId = undefined this.modalForm.clueId = undefined;
this.modalForm.name = undefined this.modalForm.name = undefined;
this.modalForm.source = undefined this.modalForm.source = undefined;
this.modalForm.followUser = undefined this.modalForm.followUser = undefined;
this.modalForm.offlineReceiver = undefined this.modalForm.offlineReceiver = undefined;
} }
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
console.log(file, fileList) console.log(file, fileList);
this.fileList = fileList this.fileList = fileList;
}, },
handlePictureCardPreview(file) { handlePictureCardPreview(file) {
this.dialogImageUrl = file.url this.dialogImageUrl = file.url;
this.dialogVisible = true this.dialogVisible = true;
}, },
// handleSuccess(response, file, fileList) { // handleSuccess(response, file, fileList) {
// console.log(file, fileList) // console.log(file, fileList)
// }, // },
// //
handleFileUploadProgress(event, file, fileList) { handleFileUploadProgress(event, file, fileList) {
console.log(file, fileList) console.log(file, fileList);
this.signUpload.isUploading = true; this.signUpload.isUploading = true;
}, },
// //
handleFileSuccess(response, file, fileList) { handleFileSuccess(response, file, fileList) {
console.log(file, fileList) console.log(file, fileList);
this.signUpload.isUploading = false; this.signUpload.isUploading = false;
this.$refs.signUpload.clearFiles(); this.$refs.signUpload.clearFiles();
// this.dialogImageUrl = process.env.VUE_APP_BASE_API + response.fileName // this.dialogImageUrl = process.env.VUE_APP_BASE_API + response.fileName
this.fileList.push({ name: response.newFileName, url: process.env.VUE_APP_BASE_API + response.fileName }) this.fileList.push({ name: response.newFileName, url: process.env.VUE_APP_BASE_API + response.fileName });
}, },
handleUploadFile(param) { handleUploadFile(param) {
let fileObj = param.file const fileObj = param.file;
const isLt2M = fileObj.size / 1024 / 1024 < 2 const isLt2M = fileObj.size / 1024 / 1024 < 2;
if (!isLt2M) { if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!') this.$message.error('上传头像图片大小不能超过 2MB!');
return return;
} }
if (fileObj.type === 'image/jpeg') { if (fileObj.type === 'image/jpeg') {
this.uploadFile = new File([fileObj], new Date().getTime() + '.jpg', { this.uploadFile = new File([fileObj], new Date().getTime() + '.jpg', {
type: 'image/jpeg', type: 'image/jpeg'
}) });
this.upload() this.upload();
} else if (fileObj.type === 'image/png') { } else if (fileObj.type === 'image/png') {
this.uploadFile = new File([fileObj], new Date().getTime() + '.png', { this.uploadFile = new File([fileObj], new Date().getTime() + '.png', {
type: 'image/png', type: 'image/png'
}) });
this.upload() this.upload();
} else { } else {
this.$message.error('只能上传jpg/png文件') this.$message.error('只能上传jpg/png文件');
return return;
} }
}, },
upload() { upload() {
var param = new FormData() // FormData var param = new FormData(); // FormData
param.append('file', this.uploadFile) // param.append('file', this.uploadFile); //
param.append('name', 'ziguiyu') // param.append('name', 'ziguiyu'); //
uploadEvidence(param) uploadEvidence(param)
.then((response) => { .then((response) => {
if (response.code == 200) { if (response.code == 200) {
@ -587,55 +584,57 @@ export default {
// message: '', // message: '',
// type: 'success' // type: 'success'
// }); // });
//this.form.logo = "https://duima.cainiao-xueche.com:8443/duima" + response.data; // this.form.logo = "https://duima.cainiao-xueche.com:8443/duima" + response.data;
this.dialogImageUrl = process.env.VUE_APP_BASE_API + response.data this.dialogImageUrl = process.env.VUE_APP_BASE_API + response.data;
this.fileList.push({ name: '', url: this.dialogImageUrl }) this.fileList.push({ name: '', url: this.dialogImageUrl });
// this.dialogImageUrl = file.url; // this.dialogImageUrl = file.url;
// this.dialogVisible = true; // this.dialogVisible = true;
} }
}) })
.catch((error) => { .catch(() => {
this.$message.error('上传失败,请稍后重试') this.$message.error('上传失败,请稍后重试');
}) });
}, },
handleRemoveImage(index, item) { handleRemoveImage(index, item) {
deleteFile(item).then((resp) => { deleteFile(item).then((resp) => {
if (resp && resp.data) if (resp && resp.data) {
// //
this.modalForm.fileList.splice(index, 1) this.modalForm.fileList.splice(index, 1);
}) }
});
}, },
priceChange() { priceChange() {
// - // -
if (this.modalForm.signClass && this.modalForm.signPrice) { if (this.modalForm.signClass && this.modalForm.signPrice) {
const minprice = this.classTypeOptions.find( const minprice = this.classTypeOptions.find(
(item) => item.typeId == this.modalForm.signClass (item) => item.typeId == this.modalForm.signClass
).minPrice ).minPrice;
if (minprice) { if (minprice) {
this.$set(this.modalForm, 'schoolPay', this.modalForm.signPrice - minprice) this.$set(this.modalForm, 'schoolPay', this.modalForm.signPrice - minprice);
} }
} else { } else {
this.$set(this.modalForm, 'schoolPay', undefined) this.$set(this.modalForm, 'schoolPay', undefined);
} }
}, }
}, }
} };
</script> </script>
<style scoped> <style scoped>
.demo-image__item { .demo-image__item {
width: 100px; width: 100px;
height: 100px; height: 100px;
display: inline-block; display: inline-block;
} }
.image-list-item { .image-list-item {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.el-upload--picture-card { .el-upload--picture-card {
width: 100px !important; width: 100px !important;
height: 100px !important; height: 100px !important;
} }
</style> </style>

@ -36,7 +36,7 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://118.31.23.45/duima/`, // target: `http://118.31.23.45/duima/`,
target: `http://localhost:8086`, target: `http://192.168.2.8:8086`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: ''
@ -97,10 +97,12 @@ module.exports = {
config config
.plugin('ScriptExtHtmlWebpackPlugin') .plugin('ScriptExtHtmlWebpackPlugin')
.after('html') .after('html')
.use('script-ext-html-webpack-plugin', [{ .use('script-ext-html-webpack-plugin', [
// `runtime` must same as runtimeChunk name. default is `runtime` {
inline: /runtime\..*\.js$/ // `runtime` must same as runtimeChunk name. default is `runtime`
}]) inline: /runtime\..*\.js$/
}
])
.end(); .end();
config.optimization.splitChunks({ config.optimization.splitChunks({
chunks: 'all', chunks: 'all',

Loading…
Cancel
Save