| | |
| | | <div> |
| | | <span class="search_title">姓名:</span> |
| | | <el-input |
| | | v-model="searchForm.customerName" |
| | | style="width: 240px" |
| | | placeholder="请输入名称搜索" |
| | | @change="handleQuery" |
| | | clearable |
| | | :prefix-icon="Search" |
| | | v-model="searchForm.customerName" |
| | | style="width: 240px" |
| | | placeholder="请输入名称搜索" |
| | | @change="handleQuery" |
| | | clearable |
| | | :prefix-icon="Search" |
| | | /> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px">搜索</el-button> |
| | | <el-button type="primary" @click="handleQuery" style="margin-left: 10px" |
| | | >搜索</el-button |
| | | > |
| | | </div> |
| | | <div> |
| | | <el-button type="primary" @click="openForm">新增入职</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table_list"> |
| | | <PIMTable :column="tableColumn" :tableData="tableData" :page="page" :isSelection="true" |
| | | :handleSelectionChange="handleSelectionChange" :tableLoading="tableLoading" @pagination="pagination" |
| | | :total="total"></PIMTable> |
| | | <PIMTable |
| | | rowKey="id" |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :page="page" |
| | | :isSelection="true" |
| | | @selection-change="handleSelectionChange" |
| | | :tableLoading="tableLoading" |
| | | @pagination="pagination" |
| | | :total="total" |
| | | ></PIMTable> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {ref} from "vue"; |
| | | import { Search } from "@element-plus/icons-vue"; |
| | | import { ref } from "vue"; |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | customerName: '', |
| | | customerName: "", |
| | | }, |
| | | form: { |
| | | salesLedgerId: '', |
| | | customerName: '', |
| | | salesman: '', |
| | | projectName: '', |
| | | productData: [] |
| | | salesLedgerId: "", |
| | | customerName: "", |
| | | salesman: "", |
| | | projectName: "", |
| | | productData: [], |
| | | }, |
| | | rules: { |
| | | salesLedgerId: [{ required: true, message: "请选择", trigger: "change" }] |
| | | } |
| | | }) |
| | | const { searchForm, form, rules } = toRefs(data) |
| | | salesLedgerId: [{ required: true, message: "请选择", trigger: "change" }], |
| | | }, |
| | | }); |
| | | const { searchForm, form, rules } = toRefs(data); |
| | | const tableColumn = ref([ |
| | | { |
| | | label: '状态', |
| | | prop: 'paymentDate', |
| | | dataType: 'tag', |
| | | label: "状态", |
| | | prop: "paymentDate", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return '在职'; |
| | | return "在职"; |
| | | } else if (params == 1) { |
| | | return '离职'; |
| | | return "离职"; |
| | | } else { |
| | | return null |
| | | return null; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return 'primary'; |
| | | return "primary"; |
| | | } else if (params == 1) { |
| | | return 'danger'; |
| | | return "danger"; |
| | | } else { |
| | | return null |
| | | return null; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: '员工编号', |
| | | prop: 'supplierName', |
| | | label: "员工编号", |
| | | prop: "supplierName", |
| | | }, |
| | | { |
| | | label: '姓名', |
| | | prop: 'currentPaymentAmount', |
| | | label: "姓名", |
| | | prop: "currentPaymentAmount", |
| | | }, |
| | | { |
| | | label: '性别', |
| | | prop: 'paymentMethod' |
| | | label: "性别", |
| | | prop: "paymentMethod", |
| | | }, |
| | | { |
| | | label: '籍贯', |
| | | prop: 'registrant' |
| | | label: "籍贯", |
| | | prop: "registrant", |
| | | }, |
| | | { |
| | | label: '岗位', |
| | | prop: 'registrationtDate' |
| | | label: "岗位", |
| | | prop: "registrationtDate", |
| | | }, |
| | | { |
| | | label: '家庭住址', |
| | | prop: 'registrationtDate' |
| | | label: "家庭住址", |
| | | prop: "registrationtDate", |
| | | }, |
| | | { |
| | | label: '第一学历', |
| | | prop: 'registrationtDate' |
| | | label: "第一学历", |
| | | prop: "registrationtDate", |
| | | }, |
| | | { |
| | | label: '专业', |
| | | prop: 'registrationtDate' |
| | | label: "专业", |
| | | prop: "registrationtDate", |
| | | }, |
| | | { |
| | | label: '身份证号', |
| | | prop: 'registrationtDate' |
| | | label: "身份证号", |
| | | prop: "registrationtDate", |
| | | }, |
| | | { |
| | | label: '年龄', |
| | | prop: 'registrationtDate' |
| | | label: "年龄", |
| | | prop: "registrationtDate", |
| | | }, |
| | | { |
| | | label: '联系电话', |
| | | prop: 'registrationtDate' |
| | | label: "联系电话", |
| | | prop: "registrationtDate", |
| | | }, |
| | | { |
| | | label: '紧急联系人', |
| | | prop: 'registrationtDate' |
| | | label: "紧急联系人", |
| | | prop: "registrationtDate", |
| | | }, |
| | | { |
| | | label: '联系电话', |
| | | prop: 'registrationtDate' |
| | | label: "联系电话", |
| | | prop: "registrationtDate", |
| | | }, |
| | | { |
| | | label: '合同年限', |
| | | prop: 'registrationtDate' |
| | | label: "合同年限", |
| | | prop: "registrationtDate", |
| | | }, |
| | | { |
| | | label: '合同开始日期', |
| | | prop: 'registrationtDate' |
| | | label: "合同开始日期", |
| | | prop: "registrationtDate", |
| | | }, |
| | | { |
| | | label: '合同结束日期', |
| | | prop: 'registrationtDate' |
| | | label: "合同结束日期", |
| | | prop: "registrationtDate", |
| | | }, |
| | | ]) |
| | | const tableData = ref([]) |
| | | const selectedRows = ref([]) |
| | | const tableLoading = ref(false) |
| | | ]); |
| | | const tableData = ref([]); |
| | | const selectedRows = ref([]); |
| | | const tableLoading = ref(false); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | }) |
| | | const total = ref(0) |
| | | |
| | | }); |
| | | const total = ref(0); |
| | | |
| | | // 查询列表 |
| | | /** 搜索按钮操作 */ |
| | | const handleQuery = () => { |
| | | page.current = 1 |
| | | getList() |
| | | } |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList() |
| | | } |
| | | getList(); |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true |
| | | ledgerListPage({...searchForm.value, ...page}).then(res => { |
| | | tableLoading.value = false |
| | | tableLoading.value = true; |
| | | ledgerListPage({ ...searchForm.value, ...page }).then((res) => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.records; |
| | | total.value = res.total |
| | | }) |
| | | } |
| | | total.value = res.total; |
| | | }); |
| | | }; |
| | | // 表格选择数据 |
| | | const handleSelectionChange = (selection) => { |
| | | console.log('selection', selection) |
| | | selectedRows.value = selection.filter(item => item.salesContractNo !== undefined); |
| | | } |
| | | console.log("selection", selection); |
| | | selectedRows.value = selection.filter( |
| | | (item) => item.salesContractNo !== undefined |
| | | ); |
| | | }; |
| | | |
| | | // 打开弹框 |
| | | const openForm = () => { |
| | | |
| | | } |
| | | const openForm = () => {}; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | | <style scoped></style> |