| | |
| | | <el-table-column label="操作" width="90" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button> |
| | | <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> |
| | | <el-button @click="delClick(scope.row)" type="text" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <AddWorkKind ref="addWorkKind" :editRow="editRow" @shutdown="shutdown" /> |
| | | <AddWorkKind ref="addWorkKind" :editRow="editRow" @refresh="shutdown" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getFollowRecordList, getDeleteFollowRecord } from "@/api/employeeManage/employeeInfo.js" |
| | | import { getWorkTypeList, deleteWorkTypeInfo } from "@/api/employeeManage/employeeInfo.js" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | import AddWorkKind from "@/views/employeeManage/workKindManage/components/AddWorkKind" |
| | | export default { |
| | |
| | | editRow: { |
| | | title: "新建", |
| | | }, |
| | | search_map: {}, |
| | | keyWord: '', |
| | | tableColumn: [ |
| | | { label: "工种名称", prop: "topic", min: 120, default: true }, // 主题 |
| | | { label: "保底工资(元/天)", prop: "client_name", min: 180, }, // 客户名称 |
| | | { label: "薪资方案", prop: "contact_name", min: 130, }, // 联系人姓名 |
| | | { label: "添加时间", prop: "client_status", width: 130 }, // 客户状态 |
| | | { label: "添加人", prop: "contact_information_name", min: 100 }, // 联系方式 |
| | | { label: "工种名称", prop: "workName", min: 120, default: true }, // 主题 |
| | | { label: "保底工资(元/天)", prop: "guaranteedWages", min: 180, }, // 客户名称 |
| | | { label: "薪资方案", prop: "salaryPlansName", min: 130, }, // 联系人姓名 |
| | | { label: "添加时间", prop: "createTime", width: 130 }, // 客户状态 |
| | | { label: "添加人", prop: "addPeople", min: 100 }, // 联系方式 |
| | | ], |
| | | showCol: [ |
| | | "工种名称", |
| | |
| | | }, |
| | | created() { |
| | | this.setTable() |
| | | this.getData(this.search_map) |
| | | this.getData(this.keyWord) |
| | | }, |
| | | computed: { |
| | | }, |
| | |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | await getFollowRecordList({ |
| | | search_map: this.search_map, |
| | | await getWorkTypeList({ |
| | | keyWord: this.keyWord, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | const list = res.data.list.map((item) => { |
| | | if (res.data && res.data.length > 0) { |
| | | const list = res.data.map((item) => { |
| | | let salaryPlansName='' |
| | | if(item.salaryPlans){ |
| | | for(let i in item.$confirmsalaryPlans){ |
| | | salaryPlansName=salaryPlansName+'+'+item.salaryPlans[i].name |
| | | } |
| | | } |
| | | return { |
| | | ...item, |
| | | client_name: item.client.name, |
| | | contact_name: item.contact.name, |
| | | client_status: item.client_status.name, |
| | | phone: item.contact.phone, |
| | | member_name: item.member.username, |
| | | contact_information_name: item.contact_information.name |
| | | salaryPlansName:salaryPlansName, |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.count |
| | | this.pagerOptions.totalCount = res.total |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | |
| | | }, |
| | | // 搜索 |
| | | onFilterSearch(searchText) { |
| | | this.search_map.client_name = searchText ?? "" |
| | | this.keyWord = searchText ?? "" |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData() |
| | | }, |
| | | shutdown() { |
| | | this.pagerOptions.currPage = 1 |
| | | this.getData(); |
| | | }, |
| | | // 新建 |
| | |
| | | // 编辑 |
| | | handleClick(row) { |
| | | let config=JSON.parse(JSON.stringify(row)); |
| | | this.editRow = { ...config, title:'编辑',type:'add' } |
| | | this.editRow = { ...config, title:'编辑',type:'edit',id:row.ID, } |
| | | this.$refs.addWorkKind.islook = true; |
| | | }, |
| | | // 删除 |
| | | delClick(id) { |
| | | delClick(row) { |
| | | this.$confirm("是否确认删除?", "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | getDeleteFollowRecord({ ids: [id] }).then((response) => { |
| | | deleteWorkTypeInfo({ id: row.ID }).then((response) => { |
| | | if (response.code === 200) { |
| | | this.$message.success("删除成功") |
| | | this.getData() |