¶Ô±ÈÐÂÎļþ |
| | |
| | | // å·¥åºæäº§é¡µé¢æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | // å页æ¥è¯¢ |
| | | export function listPageProcess(query) { |
| | | return request({ |
| | | url: "/salesLedger/scheduling/listPageProcess", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // åæ¶æäº§ |
| | | export function productionDispatchDelete(query) { |
| | | return request({ |
| | | url: "/salesLedger/scheduling/productionDispatchDelete", |
| | | method: "delete", |
| | | data: query, |
| | | }); |
| | | } |
| | | // åæ¶æäº§ |
| | | export function processScheduling(query) { |
| | | return request({ |
| | | url: "/salesLedger/scheduling/processScheduling", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // ç产订å页颿¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | // å页æ¥è¯¢ |
| | | export function schedulingListPage(query) { |
| | | return request({ |
| | | url: "/salesLedger/scheduling/listPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // ç产派工 |
| | | export function productionDispatch(query) { |
| | | return request({ |
| | | url: "/salesLedger/scheduling/productionDispatch", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // ç产æ¥å·¥é¡µé¢æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | // å页æ¥è¯¢ |
| | | export function workListPage(query) { |
| | | return request({ |
| | | url: "/salesLedger/work/listPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // åè¡¨æ ¼æ¥è¯¢ |
| | | export function workListPageById(query) { |
| | | return request({ |
| | | url: "/salesLedger/work/list", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | // ç产æ¥å·¥ |
| | | export function productionReport(query) { |
| | | return request({ |
| | | url: "/salesLedger/work/productionReport", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | | // ç产æ¥å·¥-ç¼è¾ |
| | | export function productionReportUpdate(query) { |
| | | return request({ |
| | | url: "/salesLedger/work/productionReportUpdate", |
| | | method: "post", |
| | | data: query, |
| | | }); |
| | | } |
| | |
| | | <div> |
| | | <el-dialog |
| | | v-model="dialogFormVisible" |
| | | :title="operationType === 'add' ? 'æ°å¢å
¥è' : 'ç¼è¾äººå'" |
| | | title="å·¥åºæäº§" |
| | | width="70%" |
| | | @close="closeDia" |
| | | > |
| | | <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef"> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项ç®åç§°ï¼" prop="staffNo"> |
| | | <el-input v-model="form.staffNo" placeholder="请è¾å
¥" clearable disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="产å大类ï¼" prop="staffNo"> |
| | | <el-input v-model="form.staffNo" placeholder="请è¾å
¥" clearable disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ»æ°éï¼" prop="staffNo"> |
| | | <el-input v-model="form.staffNo" placeholder="请è¾å
¥" clearable disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¬æ¬¡æäº§æ°éï¼" prop="staffNo"> |
| | | <el-input-number |
| | | v-model="form.ticketsNum" |
| | | placeholder="请è¾å
¥" |
| | | :min="0" |
| | | :step="0.1" |
| | | :precision="2" |
| | | clearable |
| | | style="width: 100%" |
| | | <el-button type="primary" @click="addRow" style="margin-bottom: 10px;">æ°å¢</el-button> |
| | | <span style="font-size: 18px;margin-left: 10px">å¾
æäº§æ°éï¼{{pendingNum}}</span> |
| | | <el-table :data="tableData" border style="width: 100%" :summary-method="summarizeMainTable" show-summary :row-key="row => row.id"> |
| | | <el-table-column label="åºå·" width="60"> |
| | | <template #default="scope"> |
| | | {{ scope.$index + 1 }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥åº" prop="process"> |
| | | <template #default="scope"> |
| | | <el-select v-model="scope.row.process" placeholder="è¯·éæ©" clearable style="width: 100%"> |
| | | <el-option |
| | | v-for="dict in work_step" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æäº§äººï¼" prop="staffName"> |
| | | <el-input v-model="form.staffName" placeholder="请è¾å
¥" clearable/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æäº§æ¥æï¼" prop="contractStartTime"> |
| | | <el-date-picker |
| | | v-model="form.contractStartTime" |
| | | type="date" |
| | | placeholder="è¯·éæ©æ¥æ" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | clearable |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确认</el-button> |
| | | <el-button @click="closeDia">åæ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åä½" prop="unit"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.unit" placeholder="请è¾å
¥åä½" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æäº§æ°é" width="200" prop="schedulingNum"> |
| | | <template #default="scope"> |
| | | <el-input-number |
| | | v-model="scope.row.schedulingNum" |
| | | placeholder="请è¾å
¥" |
| | | :min="0" |
| | | :step="0.1" |
| | | :precision="2" |
| | | clearable |
| | | style="width: 100%" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥æ¶å®é¢" width="200" prop="workHours"> |
| | | <template #default="scope"> |
| | | <el-input-number |
| | | v-model="scope.row.workHours" |
| | | placeholder="请è¾å
¥" |
| | | :min="0" |
| | | :step="0.1" |
| | | :precision="2" |
| | | clearable |
| | | style="width: 100%" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æäº§æ¥æ" prop="schedulingDate"> |
| | | <template #default="scope"> |
| | | <el-date-picker v-model="scope.row.schedulingDate" type="date" placeholder="éæ©æ¥æ" style="width: 100%;" value-format="YYYY-MM-DD" format="YYYY-MM-DD"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æäº§äºº" prop="schedulingUserId"> |
| | | <template #default="scope"> |
| | | <el-select |
| | | v-model="scope.row.schedulingUserId" |
| | | placeholder="éæ©äººå" |
| | | style="width: 100%;" |
| | | > |
| | | <el-option |
| | | v-for="user in userList" |
| | | :key="user.userId" |
| | | :label="user.nickName" |
| | | :value="user.userId" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="80"> |
| | | <template #default="scope"> |
| | | <el-button type="danger" size="small" @click="removeRow(scope.$index)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确认</el-button> |
| | | <el-button @click="closeDia">åæ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate} from "@/api/personnelManagement/onboarding.js"; |
| | | import {userListNoPageByTenantId} from "@/api/system/user.js"; |
| | | import {processScheduling} from "@/api/productionManagement/operationScheduling.js"; |
| | | const { proxy } = getCurrentInstance() |
| | | const { work_step } = proxy.useDict("work_step") |
| | | const emit = defineEmits(['close']) |
| | | |
| | | const dialogFormVisible = ref(false); |
| | | const operationType = ref('') |
| | | const data = reactive({ |
| | | form: { |
| | | staffNo: "", |
| | | staffName: "", |
| | | sex: "", |
| | | nativePlace: "", |
| | | postJob: "", |
| | | adress: "", |
| | | firstStudy: "", |
| | | profession: "", |
| | | identityCard: "", |
| | | age: 0, |
| | | phone: "", |
| | | emergencyContact: "", |
| | | emergencyContactPhone: "", |
| | | contractTerm: 0, |
| | | contractStartTime: "", |
| | | contractEndTime: "", |
| | | staffState: "", |
| | | }, |
| | | rules: { |
| | | staffNo: [{ required: true, message: "请è¾å
¥", trigger: "blur" },], |
| | | staffName: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | sex: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | nativePlace: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | postJob: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | adress: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | firstStudy: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | profession: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | identityCard: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | age: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | phone: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | emergencyContact: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | emergencyContactPhone: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | contractTerm: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | contractStartTime: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | contractEndTime: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | }, |
| | | }); |
| | | const { form, rules } = toRefs(data); |
| | | const tableData = ref([ |
| | | { process: '', schedulingDate: '', schedulingNum: '', schedulingUserId: '', workHours: '', unit: '' } |
| | | ]); |
| | | const unitFromRow = ref(''); |
| | | const idFromRow = ref(''); |
| | | const pendingNum = ref(''); |
| | | const userList = ref([]) |
| | | |
| | | // æå¼å¼¹æ¡ |
| | | const openDialog = (type, row) => { |
| | | operationType.value = type; |
| | | dialogFormVisible.value = true; |
| | | if (operationType.value === 'edit') { |
| | | getStaffJoinInfo(row.id).then(res => { |
| | | form.value = {...res.data} |
| | | }) |
| | | userListNoPageByTenantId().then((res) => { |
| | | userList.value = res.data; |
| | | }); |
| | | pendingNum.value = row.pendingNum |
| | | if (row && row.unit !== undefined) { |
| | | unitFromRow.value = row.unit; |
| | | idFromRow.value = row.id; |
| | | tableData.value.forEach(item => { |
| | | item.unit = row.unit; |
| | | item.id = row.id; |
| | | }); |
| | | } else { |
| | | unitFromRow.value = ''; |
| | | } |
| | | } |
| | | // æäº¤äº§å表å |
| | | const submitForm = () => { |
| | | proxy.$refs.formRef.validate(valid => { |
| | | if (valid) { |
| | | form.value.staffState = 1 |
| | | if (operationType.value === "add") { |
| | | staffJoinAdd(form.value).then(res => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | }) |
| | | } else { |
| | | staffJoinUpdate(form.value).then(res => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | // 1. æ£æ¥æ¯ä¸è¡æ¯å¦å¡«å宿´ |
| | | for (let i = 0; i < tableData.value.length; i++) { |
| | | const row = tableData.value[i]; |
| | | if ( |
| | | !row.process || |
| | | !row.schedulingDate || |
| | | row.schedulingNum === '' || row.schedulingNum === null || |
| | | !row.schedulingUserId || |
| | | row.workHours === '' || row.workHours === null || |
| | | !row.unit |
| | | ) { |
| | | proxy.$modal.msgError(`第${i + 1}è¡æ°æ®æªå¡«å宿´`); |
| | | return; |
| | | } |
| | | } |
| | | // 2. å计æäº§æ°é |
| | | const totalSchedulingNum = tableData.value.reduce((sum, row) => { |
| | | return sum + Number(row.schedulingNum || 0); |
| | | }, 0); |
| | | if (totalSchedulingNum > Number(pendingNum.value)) { |
| | | proxy.$modal.msgError('æäº§æ°éå计ä¸è½è¶
è¿å¾
æäº§æ°é'); |
| | | return; |
| | | } |
| | | processScheduling(tableData.value).then((res) => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | }) |
| | | } |
| | | |
| | | const summarizeMainTable = (param) => { |
| | | return proxy.summarizeTable(param, ['schedulingNum']); |
| | | }; |
| | | // å
³éå¼¹æ¡ |
| | | const closeDia = () => { |
| | | proxy.resetForm("formRef"); |
| | | dialogFormVisible.value = false; |
| | | emit('close') |
| | | }; |
| | | defineExpose({ |
| | | openDialog, |
| | | }); |
| | | |
| | | const addRow = () => { |
| | | tableData.value.push({ id: idFromRow.value, process: '', unit: unitFromRow.value, schedulingNum: '', workHours: '', schedulingDate: '', schedulingUserId: '' }); |
| | | }; |
| | | const removeRow = (index) => { |
| | | tableData.value.splice(index, 1); |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ:"> |
| | | <el-select v-model="searchForm.status" placeholder="è¯·éæ©ç¶æ" style="width: 140px" clearable> |
| | | <el-option label="å·²æäº§" :value="1"></el-option> |
| | | <el-option label="å¾
æäº§" :value="0"></el-option> |
| | | <el-option label="å¾
æäº§" :value="1"></el-option> |
| | | <el-option label="å·²æäº§" :value="0"></el-option> |
| | | <el-option label="æäº§ä¸" :value="2"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | |
| | | </div> |
| | | <div class="table_list"> |
| | | <div style="text-align: right" class="mb10"> |
| | | <el-button type="primary" @click="openForm('add')">å·¥åºæäº§</el-button> |
| | | <el-button type="danger" @click="openForm('delete')" plain>åæ¶æäº§</el-button> |
| | | <el-button type="primary" @click="openForm">å·¥åºæäº§</el-button> |
| | | <el-button type="danger" @click="handleDelete" plain>åæ¶æäº§</el-button> |
| | | </div> |
| | | <PIMTable |
| | | rowKey="id" |
| | |
| | | |
| | | <script setup> |
| | | import {onMounted, ref} from "vue"; |
| | | import FormDia from "@/views/productionManagement/productionDispatching/components/formDia.vue"; |
| | | import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js"; |
| | | import FormDia from "@/views/productionManagement/operationScheduling/components/formDia.vue"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import {listPageProcess, productionDispatchDelete} from "@/api/productionManagement/operationScheduling.js"; |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | staffName: "", |
| | | status: 0, |
| | | status: 1, |
| | | entryDate: [ |
| | | dayjs().format("YYYY-MM-DD"), |
| | | dayjs().add(1, "day").format("YYYY-MM-DD"), |
| | |
| | | const { searchForm } = toRefs(data); |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "å½å
¥æ¥æ", |
| | | prop: "staffNo", |
| | | label: "ç¶æ", |
| | | prop: "status", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "å·²æäº§"; |
| | | } else if (params == 1) { |
| | | return "å¾
æäº§"; |
| | | } else { |
| | | return 'æäº§ä¸'; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return "success"; |
| | | } else if (params == 1) { |
| | | return "primary"; |
| | | } else { |
| | | return 'warning'; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: "æ´¾å·¥æ¥æ", |
| | | prop: "schedulingDate", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "派工人", |
| | | prop: "schedulingUserName", |
| | | }, |
| | | { |
| | | label: "ååå·", |
| | | prop: "staffName", |
| | | prop: "salesContractNo", |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: "客æ·ååå·", |
| | | prop: "addressPhone", |
| | | width: 250, |
| | | prop: "customerContractNo", |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: "客æ·åç§°", |
| | | prop: "contactPerson", |
| | | prop: "customerName", |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: "项ç®åç§°", |
| | | prop: "contactPhone", |
| | | width:150 |
| | | prop: "projectName", |
| | | width:300 |
| | | }, |
| | | { |
| | | label: "产å大类", |
| | | prop: "basicBankAccount", |
| | | width: 220, |
| | | prop: "productCategory", |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "è§æ ¼åå·", |
| | | prop: "bankAccount", |
| | | width: 220, |
| | | prop: "specificationModel", |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "bankCode", |
| | | width:220 |
| | | prop: "unit", |
| | | }, |
| | | { |
| | | label: "æ°é", |
| | | prop: "maintainer", |
| | | label: "æäº§æ»æ°", |
| | | prop: "schedulingNum", |
| | | }, |
| | | { |
| | | label: "æäº§æ°é", |
| | | prop: "maintenanceTime", |
| | | label: "å·²æäº§æ°é", |
| | | prop: "successNum", |
| | | width: 100, |
| | | }, |
| | | { |
| | | label: "å¾
ææ°é", |
| | | prop: "maintenanceTime", |
| | | label: "å¾
æäº§æ°é", |
| | | prop: "pendingNum", |
| | | width: 100, |
| | | }, |
| | | ]); |
| | |
| | | }; |
| | | const changeDaterange = (value) => { |
| | | if (value) { |
| | | searchForm.entryDateStart = dayjs(value[0]).format("YYYY-MM-DD"); |
| | | searchForm.entryDateEnd = dayjs(value[1]).format("YYYY-MM-DD"); |
| | | searchForm.value.entryDateStart = dayjs(value[0]).format("YYYY-MM-DD"); |
| | | searchForm.value.entryDateEnd = dayjs(value[1]).format("YYYY-MM-DD"); |
| | | } else { |
| | | searchForm.entryDateStart = undefined; |
| | | searchForm.entryDateEnd = undefined; |
| | | searchForm.value.entryDateStart = undefined; |
| | | searchForm.value.entryDateEnd = undefined; |
| | | } |
| | | handleQuery(); |
| | | }; |
| | |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | staffJoinListPage({...page, ...searchForm.value}).then(res => { |
| | | const params = { ...searchForm.value, ...page }; |
| | | params.entryDate = undefined |
| | | listPageProcess(params).then(res => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.data.records |
| | | tableData.value = res.data.records.map(item => ({ |
| | | ...item, |
| | | pendingNum: (Number(item.schedulingNum) || 0) - (Number(item.successNum) || 0) |
| | | })); |
| | | page.total = res.data.total; |
| | | }).catch(err => { |
| | | tableLoading.value = false; |
| | |
| | | proxy.$message.error("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | return; |
| | | } |
| | | if (selectedRows.value[0].unPaymentAmountTotal == 0) { |
| | | proxy.$message.warning("æ éå仿¬¾"); |
| | | if (selectedRows.value[0].pendingNum == 0) { |
| | | proxy.$message.warning("æ éåæäº§"); |
| | | return; |
| | | } |
| | | nextTick(() => { |
| | | formDia.value?.openDialog(type, row) |
| | | formDia.value?.openDialog(type, selectedRows.value[0]) |
| | | }) |
| | | }; |
| | | |
| | |
| | | proxy.$modal.msgWarning("è¯·éæ©æ°æ®"); |
| | | return; |
| | | } |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å é¤ï¼æ¯å¦ç¡®è®¤å é¤ï¼", "导åº", { |
| | | ElMessageBox.confirm("æ¯å¦ç¡®è®¤åæ¶æäº§ï¼", "å é¤æç¤º", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | staffJoinDel(ids).then((res) => { |
| | | proxy.$modal.msgSuccess("å 餿å"); |
| | | getList(); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | // å¯¼åº |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å¯¼åºï¼æ¯å¦ç¡®è®¤å¯¼åºï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/staff/staffJoinLeaveRecord/export", {staffState: 1}, "人åå
¥è.xlsx"); |
| | | tableLoading.value = true; |
| | | productionDispatchDelete(ids) |
| | | .then((res) => { |
| | | proxy.$modal.msgSuccess("åæ¶æäº§æå"); |
| | | getList(); |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <span class="search_title">çäº§æ¥æï¼</span> |
| | | <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange" |
| | | placeholder="è¯·éæ©" clearable @change="changeDaterange" /> |
| | | <span class="search_title ml10">ç产人ï¼</span> |
| | | <el-input |
| | | 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 |
| | | > |
| | | </div> |
| | | <div> |
| | | <el-button @click="handleOut">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table_list"> |
| | | <PIMTable |
| | | rowKey="id" |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :page="page" |
| | | :tableLoading="tableLoading" |
| | | @pagination="pagination" |
| | | ></PIMTable> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {onMounted, ref} from "vue"; |
| | | import { |
| | | listCustomer, |
| | | } from "@/api/basicData/customerFile.js"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "çäº§æ¥æ", |
| | | prop: "customerName", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "ç产人", |
| | | prop: "customerName", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "ååå·", |
| | | prop: "taxpayerIdentificationNumber", |
| | | width: 220, |
| | | }, |
| | | { |
| | | label: "客æ·ååå·", |
| | | prop: "addressPhone", |
| | | width: 250, |
| | | }, |
| | | { |
| | | label: "客æ·åç§°", |
| | | prop: "contactPerson", |
| | | }, |
| | | { |
| | | label: "项ç®åç§°", |
| | | prop: "contactPhone", |
| | | width:150 |
| | | }, |
| | | { |
| | | label: "产å大类", |
| | | prop: "basicBankAccount", |
| | | width: 220, |
| | | }, |
| | | { |
| | | label: "è§æ ¼åå·", |
| | | prop: "bankAccount", |
| | | width: 220, |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "bankCode", |
| | | width:220 |
| | | }, |
| | | { |
| | | label: "å·¥åº", |
| | | prop: "maintainer", |
| | | }, |
| | | { |
| | | label: "ç产æ°é", |
| | | prop: "maintenanceTime", |
| | | width: 100, |
| | | }, |
| | | { |
| | | label: "å·¥æ¶å®é¢", |
| | | prop: "maintenanceTime", |
| | | width: 100, |
| | | }, |
| | | { |
| | | label: "å·¥èµ", |
| | | prop: "maintenanceTime", |
| | | width: 100, |
| | | }, |
| | | ]); |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | total: 0, |
| | | }); |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | customerName: "", |
| | | entryDate: [ |
| | | dayjs().format("YYYY-MM-DD"), |
| | | dayjs().add(1, "day").format("YYYY-MM-DD"), |
| | | ], // å½å
¥æ¥æ |
| | | entryDateStart: dayjs().format("YYYY-MM-DD"), |
| | | entryDateEnd: dayjs().add(1, "day").format("YYYY-MM-DD"), |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | | |
| | | // æ¥è¯¢å表 |
| | | /** æç´¢æé®æä½ */ |
| | | const handleQuery = () => { |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | const changeDaterange = (value) => { |
| | | if (value) { |
| | | searchForm.entryDateStart = dayjs(value[0]).format("YYYY-MM-DD"); |
| | | searchForm.entryDateEnd = dayjs(value[1]).format("YYYY-MM-DD"); |
| | | } else { |
| | | searchForm.entryDateStart = undefined; |
| | | searchForm.entryDateEnd = undefined; |
| | | } |
| | | handleQuery(); |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | listCustomer({ ...searchForm.value, ...page }).then((res) => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.records; |
| | | page.total = res.total; |
| | | }); |
| | | }; |
| | | |
| | | // å¯¼åº |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å¯¼åºï¼æ¯å¦ç¡®è®¤å¯¼åºï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/basic/customer/export", {}, "çäº§æ ¸ç®.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"></style> |
| | |
| | | <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef"> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项ç®åç§°ï¼" prop="staffNo"> |
| | | <el-input v-model="form.staffNo" placeholder="请è¾å
¥" clearable disabled/> |
| | | <el-form-item label="项ç®åç§°ï¼" prop="projectName"> |
| | | <el-input v-model="form.projectName" placeholder="请è¾å
¥" clearable disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="产å大类ï¼" prop="staffNo"> |
| | | <el-input v-model="form.staffNo" placeholder="请è¾å
¥" clearable disabled/> |
| | | <el-form-item label="产å大类ï¼" prop="productCategory"> |
| | | <el-input v-model="form.productCategory" placeholder="请è¾å
¥" clearable disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ»æ°éï¼" prop="staffNo"> |
| | | <el-input v-model="form.staffNo" placeholder="请è¾å
¥" clearable disabled/> |
| | | <el-form-item label="æ»æ°éï¼" prop="quantity"> |
| | | <el-input v-model="form.quantity" placeholder="请è¾å
¥" clearable disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¬æ¬¡æäº§æ°éï¼" prop="staffNo"> |
| | | <el-form-item label="å¾
æäº§æ°éï¼" prop="pendingQuantity"> |
| | | <el-input v-model="form.pendingQuantity" placeholder="请è¾å
¥" clearable disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¬æ¬¡æäº§æ°éï¼" prop="schedulingNum"> |
| | | <el-input-number |
| | | v-model="form.ticketsNum" |
| | | v-model="form.schedulingNum" |
| | | placeholder="请è¾å
¥" |
| | | :min="0" |
| | | :step="0.1" |
| | | :precision="2" |
| | | clearable |
| | | @change="changeNum" |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æäº§äººï¼" prop="staffName"> |
| | | <el-input v-model="form.staffName" placeholder="请è¾å
¥" clearable/> |
| | | <el-form-item label="派工人ï¼" prop="schedulingUserId"> |
| | | <el-select |
| | | v-model="form.schedulingUserId" |
| | | placeholder="éæ©äººå" |
| | | style="width: 100%;" |
| | | > |
| | | <el-option |
| | | v-for="user in userList" |
| | | :key="user.userId" |
| | | :label="user.nickName" |
| | | :value="user.userId" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æäº§æ¥æï¼" prop="contractStartTime"> |
| | | <el-form-item label="æ´¾å·¥æ¥æï¼" prop="schedulingDate"> |
| | | <el-date-picker |
| | | v-model="form.contractStartTime" |
| | | v-model="form.schedulingDate" |
| | | type="date" |
| | | placeholder="è¯·éæ©æ¥æ" |
| | | value-format="YYYY-MM-DD" |
| | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate} from "@/api/personnelManagement/onboarding.js"; |
| | | import {userListNoPageByTenantId} from "@/api/system/user.js"; |
| | | import {productionDispatch} from "@/api/productionManagement/productionOrder.js"; |
| | | import useUserStore from "@/store/modules/user.js"; |
| | | import dayjs from "dayjs"; |
| | | const { proxy } = getCurrentInstance() |
| | | const emit = defineEmits(['close']) |
| | | |
| | |
| | | const operationType = ref('') |
| | | const data = reactive({ |
| | | form: { |
| | | staffNo: "", |
| | | staffName: "", |
| | | sex: "", |
| | | nativePlace: "", |
| | | postJob: "", |
| | | adress: "", |
| | | firstStudy: "", |
| | | profession: "", |
| | | identityCard: "", |
| | | age: 0, |
| | | phone: "", |
| | | emergencyContact: "", |
| | | emergencyContactPhone: "", |
| | | contractTerm: 0, |
| | | contractStartTime: "", |
| | | contractEndTime: "", |
| | | staffState: "", |
| | | projectName: "", |
| | | productCategory: "", |
| | | quantity: "", |
| | | schedulingNum: "", |
| | | schedulingUserId: "", |
| | | schedulingDate: "", |
| | | pendingQuantity: "", |
| | | }, |
| | | rules: { |
| | | staffNo: [{ required: true, message: "请è¾å
¥", trigger: "blur" },], |
| | | staffName: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | sex: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | nativePlace: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | postJob: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | adress: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | firstStudy: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | profession: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | identityCard: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | age: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | phone: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | emergencyContact: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | emergencyContactPhone: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | contractTerm: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | contractStartTime: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | contractEndTime: [{ required: true, message: "请è¾å
¥", trigger: "blur" }], |
| | | schedulingNum: [{ required: true, message: "请è¾å
¥", trigger: "blur" },], |
| | | schedulingUserId: [{ required: true, message: "è¯·éæ©", trigger: "change" },], |
| | | schedulingDate: [{ required: true, message: "è¯·éæ©", trigger: "change" },], |
| | | }, |
| | | }); |
| | | const { form, rules } = toRefs(data); |
| | | const userList = ref([]) |
| | | const userStore = useUserStore() |
| | | |
| | | // æå¼å¼¹æ¡ |
| | | const openDialog = (type, row) => { |
| | | operationType.value = type; |
| | | dialogFormVisible.value = true; |
| | | if (operationType.value === 'edit') { |
| | | getStaffJoinInfo(row.id).then(res => { |
| | | form.value = {...res.data} |
| | | }) |
| | | } |
| | | userListNoPageByTenantId().then((res) => { |
| | | userList.value = res.data; |
| | | }); |
| | | form.value = {...row} |
| | | form.value.schedulingNum = 0 |
| | | form.value.schedulingUserId = userStore.id |
| | | form.value.schedulingDate = dayjs().format("YYYY-MM-DD"); |
| | | } |
| | | |
| | | // |
| | | const changeNum = (value) => { |
| | | if (value > form.value.pendingQuantity) { |
| | | form.value.schedulingNum = form.value.pendingQuantity; |
| | | proxy.$modal.msgWarning('æäº§æ°éä¸å¯å¤§äºå¾
æäº§æ°é') |
| | | } |
| | | } |
| | | // æäº¤äº§å表å |
| | | const submitForm = () => { |
| | | proxy.$refs.formRef.validate(valid => { |
| | | if (valid) { |
| | | form.value.staffState = 1 |
| | | if (operationType.value === "add") { |
| | | staffJoinAdd(form.value).then(res => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | }) |
| | | } else { |
| | | staffJoinUpdate(form.value).then(res => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | }) |
| | | } |
| | | productionDispatch(form.value).then(res => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | |
| | | <span class="search_title ml10">å½å
¥æ¥æï¼</span> |
| | | <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange" |
| | | placeholder="è¯·éæ©" clearable @change="changeDaterange" /> |
| | | <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('add')">ç产派工</el-button> |
| | |
| | | <script setup> |
| | | import {onMounted, ref} from "vue"; |
| | | import FormDia from "@/views/productionManagement/productionDispatching/components/formDia.vue"; |
| | | import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import {schedulingListPage} from "@/api/productionManagement/productionOrder.js"; |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "å½å
¥æ¥æ", |
| | | prop: "staffNo", |
| | | prop: "entryDate", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "ååå·", |
| | | prop: "staffName", |
| | | prop: "salesContractNo", |
| | | width: 220, |
| | | }, |
| | | { |
| | | label: "客æ·ååå·", |
| | | prop: "addressPhone", |
| | | prop: "customerContractNo", |
| | | width: 250, |
| | | }, |
| | | { |
| | | label: "客æ·åç§°", |
| | | prop: "contactPerson", |
| | | prop: "customerName", |
| | | width: 250, |
| | | }, |
| | | { |
| | | label: "项ç®åç§°", |
| | | prop: "contactPhone", |
| | | width:150 |
| | | prop: "projectName", |
| | | width:300 |
| | | }, |
| | | { |
| | | label: "产å大类", |
| | | prop: "basicBankAccount", |
| | | width: 220, |
| | | prop: "productCategory", |
| | | width: 160, |
| | | }, |
| | | { |
| | | label: "è§æ ¼åå·", |
| | | prop: "bankAccount", |
| | | prop: "specificationModel", |
| | | width: 220, |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "bankCode", |
| | | width:220 |
| | | prop: "unit", |
| | | width:90 |
| | | }, |
| | | { |
| | | label: "æ°é", |
| | | prop: "maintainer", |
| | | prop: "quantity", |
| | | }, |
| | | { |
| | | label: "æäº§æ°é", |
| | | prop: "maintenanceTime", |
| | | prop: "schedulingNum", |
| | | width: 100, |
| | | }, |
| | | { |
| | | label: "å¾
ææ°é", |
| | | prop: "maintenanceTime", |
| | | prop: "pendingQuantity", |
| | | width: 100, |
| | | }, |
| | | ]); |
| | |
| | | }; |
| | | const changeDaterange = (value) => { |
| | | if (value) { |
| | | searchForm.entryDateStart = dayjs(value[0]).format("YYYY-MM-DD"); |
| | | searchForm.entryDateEnd = dayjs(value[1]).format("YYYY-MM-DD"); |
| | | searchForm.value.entryDateStart = value[0]; |
| | | searchForm.value.entryDateEnd = value[1]; |
| | | } else { |
| | | searchForm.entryDateStart = undefined; |
| | | searchForm.entryDateEnd = undefined; |
| | | searchForm.value.entryDateStart = undefined; |
| | | searchForm.value.entryDateEnd = undefined; |
| | | } |
| | | handleQuery(); |
| | | }; |
| | |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | staffJoinListPage({...page, ...searchForm.value}).then(res => { |
| | | // æé ä¸ä¸ªæ°ç对象ï¼ä¸å
å«entryDateåæ®µ |
| | | const params = { ...searchForm.value, ...page }; |
| | | params.entryDate = undefined |
| | | schedulingListPage(params).then((res) => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.data.records |
| | | // å¤çæ¯æ¡æ°æ®ï¼å¢å pendingQuantityåæ®µ |
| | | tableData.value = res.data.records.map(item => ({ |
| | | ...item, |
| | | pendingQuantity: (Number(item.quantity) || 0) - (Number(item.schedulingNum) || 0) |
| | | })); |
| | | page.total = res.data.total; |
| | | }).catch(err => { |
| | | }).catch(() => { |
| | | tableLoading.value = false; |
| | | }) |
| | | }; |
| | |
| | | }; |
| | | |
| | | // æå¼å¼¹æ¡ |
| | | const openForm = (type, row) => { |
| | | const openForm = (type) => { |
| | | if (selectedRows.value.length !== 1) { |
| | | proxy.$message.error("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | return; |
| | | } |
| | | if (selectedRows.value[0].unPaymentAmountTotal == 0) { |
| | | proxy.$message.warning("æ éå仿¬¾"); |
| | | if (selectedRows.value[0].pendingQuantity == 0) { |
| | | proxy.$message.warning("æ éåæ´¾å·¥"); |
| | | return; |
| | | } |
| | | nextTick(() => { |
| | | formDia.value?.openDialog(type, row) |
| | | formDia.value?.openDialog(type, selectedRows.value[0]) |
| | | }) |
| | | }; |
| | | |
| | | // å é¤ |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| | | ids = selectedRows.value.map((item) => item.id); |
| | | } else { |
| | | proxy.$modal.msgWarning("è¯·éæ©æ°æ®"); |
| | | return; |
| | | } |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å é¤ï¼æ¯å¦ç¡®è®¤å é¤ï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | staffJoinDel(ids).then((res) => { |
| | | proxy.$modal.msgSuccess("å 餿å"); |
| | | getList(); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | // å¯¼åº |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å¯¼åºï¼æ¯å¦ç¡®è®¤å¯¼åºï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/staff/staffJoinLeaveRecord/export", {staffState: 1}, "人åå
¥è.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | onMounted(() => { |
| | | searchForm.value.entryDate = [ |
| | | dayjs().format("YYYY-MM-DD"), |
| | | dayjs().add(1, "day").format("YYYY-MM-DD"), |
| | | ] |
| | | searchForm.value.entryDateStart = dayjs().format("YYYY-MM-DD") |
| | | searchForm.value.entryDateEnd = dayjs().add(1, "day").format("YYYY-MM-DD") |
| | | getList(); |
| | | }); |
| | | </script> |
| | |
| | | /> |
| | | <span class="search_title ml10">项ç®åç§°ï¼</span> |
| | | <el-input |
| | | v-model="searchForm.customerName" |
| | | v-model="searchForm.projectName" |
| | | style="width: 240px" |
| | | placeholder="请è¾å
¥" |
| | | @change="handleQuery" |
| | |
| | | |
| | | <script setup> |
| | | import {onMounted, ref} from "vue"; |
| | | import { |
| | | listCustomer, |
| | | } from "@/api/basicData/customerFile.js"; |
| | | import { ElMessageBox } from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import {schedulingListPage} from "@/api/productionManagement/productionOrder.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "å½å
¥æ¥æ", |
| | | prop: "customerName", |
| | | prop: "entryDate", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "ååå·", |
| | | prop: "taxpayerIdentificationNumber", |
| | | prop: "salesContractNo", |
| | | width: 220, |
| | | }, |
| | | { |
| | | label: "客æ·ååå·", |
| | | prop: "addressPhone", |
| | | prop: "customerContractNo", |
| | | width: 250, |
| | | }, |
| | | { |
| | | label: "客æ·åç§°", |
| | | prop: "contactPerson", |
| | | prop: "customerName", |
| | | width: 250, |
| | | }, |
| | | { |
| | | label: "项ç®åç§°", |
| | | prop: "contactPhone", |
| | | width:150 |
| | | prop: "projectName", |
| | | width:300 |
| | | }, |
| | | { |
| | | label: "产å大类", |
| | | prop: "basicBankAccount", |
| | | width: 220, |
| | | prop: "productCategory", |
| | | width: 160, |
| | | }, |
| | | { |
| | | label: "è§æ ¼åå·", |
| | | prop: "bankAccount", |
| | | prop: "specificationModel", |
| | | width: 220, |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "bankCode", |
| | | width:220 |
| | | prop: "unit", |
| | | width:90 |
| | | }, |
| | | { |
| | | label: "æ°é", |
| | | prop: "maintainer", |
| | | prop: "quantity", |
| | | }, |
| | | { |
| | | label: "æäº§æ°é", |
| | | prop: "maintenanceTime", |
| | | prop: "schedulingNum", |
| | | width: 100, |
| | | }, |
| | | { |
| | | label: "å®å·¥æ°é", |
| | | prop: "maintenanceTime", |
| | | prop: "successNum", |
| | | width: 100, |
| | | }, |
| | | ]); |
| | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | customerName: "", |
| | | entryDate: [ |
| | | dayjs().format("YYYY-MM-DD"), |
| | | dayjs().add(1, "day").format("YYYY-MM-DD"), |
| | | ], // å½å
¥æ¥æ |
| | | entryDateStart: dayjs().format("YYYY-MM-DD"), |
| | | entryDateEnd: dayjs().add(1, "day").format("YYYY-MM-DD"), |
| | | projectName: "", |
| | | entryDate: [], // å½å
¥æ¥æ |
| | | entryDateStart: '', |
| | | entryDateEnd: '', |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | |
| | | }; |
| | | const changeDaterange = (value) => { |
| | | if (value) { |
| | | searchForm.entryDateStart = dayjs(value[0]).format("YYYY-MM-DD"); |
| | | searchForm.entryDateEnd = dayjs(value[1]).format("YYYY-MM-DD"); |
| | | searchForm.value.entryDateStart = value[0]; |
| | | searchForm.value.entryDateEnd = value[1]; |
| | | } else { |
| | | searchForm.entryDateStart = undefined; |
| | | searchForm.entryDateEnd = undefined; |
| | | searchForm.value.entryDateStart = undefined; |
| | | searchForm.value.entryDateEnd = undefined; |
| | | } |
| | | handleQuery(); |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | listCustomer({ ...searchForm.value, ...page }).then((res) => { |
| | | // æé ä¸ä¸ªæ°ç对象ï¼ä¸å
å«entryDateåæ®µ |
| | | const params = { ...searchForm.value, ...page }; |
| | | params.entryDate = undefined |
| | | schedulingListPage(params).then((res) => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.records; |
| | | page.total = res.total; |
| | | }); |
| | | tableData.value = res.data.records; |
| | | page.total = res.data.total; |
| | | }).catch(() => { |
| | | tableLoading.value = false; |
| | | }) |
| | | }; |
| | | |
| | | // å¯¼åº |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/basic/customer/export", {}, "å®¢æ·æ¡£æ¡.xlsx"); |
| | | proxy.download("/salesLedger/scheduling/export", {}, "ç产订å.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | searchForm.value.entryDate = [ |
| | | dayjs().format("YYYY-MM-DD"), |
| | | dayjs().add(1, "day").format("YYYY-MM-DD"), |
| | | ] |
| | | searchForm.value.entryDateStart = dayjs().format("YYYY-MM-DD") |
| | | searchForm.value.entryDateEnd = dayjs().add(1, "day").format("YYYY-MM-DD") |
| | | getList(); |
| | | }); |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog |
| | | v-model="dialogFormVisible" |
| | | title="ç产æ¥å·¥" |
| | | width="70%" |
| | | @close="closeDia" |
| | | > |
| | | <el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef"> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æäº§æ°éï¼" prop="schedulingNum"> |
| | | <el-input v-model="form.schedulingNum" placeholder="请è¾å
¥" clearable disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¬æ¬¡ç产æ°éï¼" prop="finishedNum"> |
| | | <el-input-number |
| | | v-model="form.finishedNum" |
| | | placeholder="请è¾å
¥" |
| | | :min="0" |
| | | :step="0.1" |
| | | :precision="2" |
| | | clearable |
| | | style="width: 100%" |
| | | @change="changeNum" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å¾
ç产æ°éï¼" prop="pendingNum"> |
| | | <el-input v-model="form.pendingNum" placeholder="请è¾å
¥" clearable disabled/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç产人ï¼" prop="schedulingUserId"> |
| | | <el-select |
| | | v-model="form.schedulingUserId" |
| | | placeholder="éæ©äººå" |
| | | style="width: 100%;" |
| | | > |
| | | <el-option |
| | | v-for="user in userList" |
| | | :key="user.userId" |
| | | :label="user.nickName" |
| | | :value="user.userId" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="çäº§æ¥æï¼" prop="schedulingDate"> |
| | | <el-date-picker |
| | | v-model="form.schedulingDate" |
| | | type="date" |
| | | placeholder="è¯·éæ©æ¥æ" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | clearable |
| | | style="width: 100%" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确认</el-button> |
| | | <el-button @click="closeDia">åæ¶</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {getStaffJoinInfo, staffJoinAdd, staffJoinUpdate} from "@/api/personnelManagement/onboarding.js"; |
| | | import {userListNoPageByTenantId} from "@/api/system/user.js"; |
| | | import {productionReport, productionReportUpdate} from "@/api/productionManagement/productionReporting.js"; |
| | | const { proxy } = getCurrentInstance() |
| | | const emit = defineEmits(['close']) |
| | | |
| | | const userList = ref([]) |
| | | const dialogFormVisible = ref(false); |
| | | const operationType = ref('') |
| | | const data = reactive({ |
| | | form: { |
| | | successNum: "", |
| | | schedulingNum: "", |
| | | finishedNum: "", |
| | | schedulingUserId: "", |
| | | schedulingDate: "", |
| | | }, |
| | | rules: { |
| | | schedulingNum: [{ required: true, message: "请è¾å
¥", trigger: "blur" },], |
| | | }, |
| | | }); |
| | | const { form, rules } = toRefs(data); |
| | | |
| | | // æå¼å¼¹æ¡ |
| | | const openDialog = (type, row) => { |
| | | operationType.value = type; |
| | | dialogFormVisible.value = true; |
| | | userListNoPageByTenantId().then((res) => { |
| | | userList.value = res.data; |
| | | }); |
| | | form.value = {...row} |
| | | } |
| | | |
| | | const changeNum = (value) => { |
| | | if (value > form.value.schedulingNum) { |
| | | form.value.finishedNum = form.value.schedulingNum; |
| | | proxy.$modal.msgWarning('æ¬æ¬¡ç产æ°éä¸å¯å¤§äºæäº§æ°é') |
| | | } |
| | | form.value.pendingNum = form.value.schedulingNum - form.value.finishedNum; |
| | | } |
| | | // æäº¤äº§å表å |
| | | const submitForm = () => { |
| | | proxy.$refs.formRef.validate(valid => { |
| | | if (valid) { |
| | | form.value.staffState = 1 |
| | | if (operationType.value === "add") { |
| | | productionReport(form.value).then(res => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | }) |
| | | } else { |
| | | productionReportUpdate(form.value).then(res => { |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | closeDia(); |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // å
³éå¼¹æ¡ |
| | | const closeDia = () => { |
| | | proxy.resetForm("formRef"); |
| | | dialogFormVisible.value = false; |
| | | emit('close') |
| | | }; |
| | | defineExpose({ |
| | | openDialog, |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <el-form :model="searchForm" :inline="true"> |
| | | <el-form-item label="客æ·åç§°:"> |
| | | <el-input v-model="searchForm.customerName" placeholder="请è¾å
¥" clearable prefix-icon="Search" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="项ç®åç§°:"> |
| | | <el-input v-model="searchForm.projectName" placeholder="请è¾å
¥" clearable prefix-icon="Search" |
| | | @change="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="æäº§æ¥æ:"> |
| | | <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange" |
| | | placeholder="è¯·éæ©" clearable @change="changeDaterange" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ:"> |
| | | <el-select v-model="searchForm.status" placeholder="è¯·éæ©ç¶æ" style="width: 140px" clearable> |
| | | <el-option label="å¾
ç产" :value="1"></el-option> |
| | | <el-option label="å·²æ¥å·¥" :value="0"></el-option> |
| | | <el-option label="ç产ä¸" :value="2"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="handleQuery">æç´¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="table_list"> |
| | | <div style="text-align: right" class="mb10"> |
| | | <el-button type="primary" @click="openForm('add')">ç产æ¥å·¥</el-button> |
| | | </div> |
| | | <PIMTable |
| | | rowKey="id" |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :page="page" |
| | | :isSelection="true" |
| | | :expandRowKeys="expandedRowKeys" |
| | | @expand-change="expandChange" |
| | | @selection-change="handleSelectionChange" |
| | | :tableLoading="tableLoading" |
| | | @pagination="pagination" |
| | | :total="page.total" |
| | | > |
| | | <template #expand="{ row }"> |
| | | <el-table |
| | | :data="expandData" |
| | | border |
| | | show-summary |
| | | :summary-method="summarizeMainTable" |
| | | v-loading="childrenLoading" |
| | | > |
| | | <el-table-column |
| | | align="center" |
| | | label="åºå·" |
| | | type="index" |
| | | width="60" |
| | | /> |
| | | <el-table-column label="æ¬æ¬¡ç产æ°é" prop="finishedNum" align="center"> |
| | | <template #default="scope"> |
| | | <el-input-number :step="0.01" :min="0" style="width: 100%" |
| | | v-model="scope.row.finishedNum" |
| | | :disabled="!scope.row.editType" |
| | | :precision="2" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | @change="changeNum(scope.row)" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="å¾
ç产æ°é" prop="pendingNum" width="240" align="center"></el-table-column>--> |
| | | <el-table-column label="ç产人" prop="schedulingUserId" width="240"> |
| | | <template #default="scope"> |
| | | <el-select |
| | | v-model="scope.row.schedulingUserId" |
| | | placeholder="éæ©äººå" |
| | | :disabled="!scope.row.editType" |
| | | style="width: 100%;" |
| | | > |
| | | <el-option |
| | | v-for="user in userList" |
| | | :key="user.userId" |
| | | :label="user.nickName" |
| | | :value="user.userId" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="çäº§æ¥æ" prop="schedulingDate" width="240"> |
| | | <template #default="scope"> |
| | | <el-date-picker |
| | | v-model="scope.row.schedulingDate" |
| | | type="date" |
| | | :disabled="!scope.row.editType" |
| | | placeholder="è¯·éæ©æ¥æ" |
| | | value-format="YYYY-MM-DD" |
| | | format="YYYY-MM-DD" |
| | | clearable |
| | | style="width: 100%" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="60"> |
| | | <template #default="scope"> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | size="small" |
| | | @click="changeEditType(scope.row)" |
| | | v-if="!scope.row.editType" |
| | | >ç¼è¾</el-button |
| | | > |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | size="small" |
| | | @click="saveReceiptPayment(scope.row)" |
| | | v-if="scope.row.editType" |
| | | >ä¿å</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | </PIMTable> |
| | | </div> |
| | | <form-dia ref="formDia" @close="handleQuery"></form-dia> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {onMounted, ref} from "vue"; |
| | | import FormDia from "@/views/productionManagement/productionReporting/components/formDia.vue"; |
| | | import {staffJoinDel, staffJoinListPage} from "@/api/personnelManagement/onboarding.js"; |
| | | import {ElMessageBox} from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | import { |
| | | productionReportUpdate, |
| | | workListPage, |
| | | workListPageById |
| | | } from "@/api/productionManagement/productionReporting.js"; |
| | | import {userListNoPageByTenantId} from "@/api/system/user.js"; |
| | | |
| | | const data = reactive({ |
| | | searchForm: { |
| | | staffName: "", |
| | | entryDate: [ |
| | | dayjs().format("YYYY-MM-DD"), |
| | | dayjs().add(1, "day").format("YYYY-MM-DD"), |
| | | ], // å½å
¥æ¥æ |
| | | entryDateStart: dayjs().format("YYYY-MM-DD"), |
| | | entryDateEnd: dayjs().add(1, "day").format("YYYY-MM-DD"), |
| | | }, |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | | const expandedRowKeys = ref([]); |
| | | const expandData = ref([]); |
| | | const userList = ref([]) |
| | | const tableColumn = ref([ |
| | | { |
| | | type: "expand", |
| | | dataType: "slot", |
| | | slot: "expand", |
| | | }, |
| | | { |
| | | label: "ç¶æ", |
| | | prop: "status", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "å·²æ¥å·¥"; |
| | | } else if (params == 1) { |
| | | return "å¾
ç产"; |
| | | } else { |
| | | return 'ç产ä¸'; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return "success"; |
| | | } else if (params == 1) { |
| | | return "primary"; |
| | | } else { |
| | | return 'warning'; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: "æäº§æ¥æ", |
| | | prop: "schedulingDate", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "æäº§äºº", |
| | | prop: "schedulingUserName", |
| | | }, |
| | | { |
| | | label: "ååå·", |
| | | prop: "salesContractNo", |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: "客æ·ååå·", |
| | | prop: "customerContractNo", |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: "客æ·åç§°", |
| | | prop: "customerName", |
| | | width: 200, |
| | | }, |
| | | { |
| | | label: "项ç®åç§°", |
| | | prop: "projectName", |
| | | width:300 |
| | | }, |
| | | { |
| | | label: "产å大类", |
| | | prop: "productCategory", |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "è§æ ¼åå·", |
| | | prop: "specificationModel", |
| | | width: 150, |
| | | }, |
| | | { |
| | | label: "åä½", |
| | | prop: "unit", |
| | | }, |
| | | { |
| | | label: "å·¥åº", |
| | | prop: "process", |
| | | }, |
| | | { |
| | | label: "æäº§æ°é", |
| | | prop: "schedulingNum", |
| | | width: 100, |
| | | }, |
| | | { |
| | | label: "ç产æ°é", |
| | | prop: "finishedNum", |
| | | width: 100, |
| | | }, |
| | | { |
| | | label: "å¾
ç产æ°é", |
| | | prop: "pendingFinishNum", |
| | | width: 100, |
| | | }, |
| | | ]); |
| | | const tableData = ref([]); |
| | | const selectedRows = ref([]); |
| | | const tableLoading = ref(false); |
| | | const childrenLoading = ref(false); |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | total: 0, |
| | | }); |
| | | const formDia = ref() |
| | | const { proxy } = getCurrentInstance() |
| | | |
| | | // æ¥è¯¢å表 |
| | | /** æç´¢æé®æä½ */ |
| | | const handleQuery = () => { |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | const changeDaterange = (value) => { |
| | | if (value) { |
| | | searchForm.value.entryDateStart = value[0]; |
| | | searchForm.value.entryDateEnd = value[1]; |
| | | } else { |
| | | searchForm.value.entryDateStart = undefined; |
| | | searchForm.value.entryDateEnd = undefined; |
| | | } |
| | | handleQuery(); |
| | | }; |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | const getList = () => { |
| | | tableLoading.value = true; |
| | | const params = { ...searchForm.value, ...page }; |
| | | params.entryDate = undefined |
| | | expandedRowKeys.value = [] |
| | | workListPage(params).then(res => { |
| | | tableLoading.value = false; |
| | | tableData.value = res.data.records.map(item => ({ |
| | | ...item, |
| | | pendingFinishNum: (Number(item.schedulingNum) || 0) - (Number(item.finishedNum) || 0) |
| | | })); |
| | | page.total = res.data.total; |
| | | }).catch(err => { |
| | | tableLoading.value = false; |
| | | }) |
| | | }; |
| | | // å±å¼è¡ |
| | | const expandChange = (row, expandedRows) => { |
| | | userListNoPageByTenantId().then((res) => { |
| | | userList.value = res.data; |
| | | }); |
| | | if (expandedRows.length > 0) { |
| | | nextTick(() => { |
| | | expandedRowKeys.value = []; |
| | | try { |
| | | childrenLoading.value = true; |
| | | workListPageById({ id: row.id }).then((res) => { |
| | | childrenLoading.value = false; |
| | | const index = tableData.value.findIndex((item) => item.id === row.id); |
| | | if (index > -1) { |
| | | expandData.value = res.data.map(item => ({ |
| | | ...item, |
| | | pendingNum: (Number(item.schedulingNum) || 0) - (Number(item.finishedNum) || 0) |
| | | })); |
| | | } |
| | | expandedRowKeys.value.push(row.id); |
| | | }); |
| | | } catch (error) { |
| | | childrenLoading.value = false; |
| | | console.log(error); |
| | | } |
| | | }) |
| | | } else { |
| | | expandedRowKeys.value = []; |
| | | } |
| | | }; |
| | | const changeNum = (row) => { |
| | | // æ¾å°ç¶è¡¨æ ¼æ°æ® |
| | | const parentRow = tableData.value.find(item => item.id === expandedRowKeys.value[0]); |
| | | // è®¡ç®ææåè¡¨æ ¼ finishedNum çæ»å |
| | | const totalFinishedNum = expandData.value.reduce((sum, item) => sum + (Number(item.finishedNum) || 0), 0); |
| | | // ç¶è¡¨æ ¼çæäº§æ°é |
| | | const schedulingNum = parentRow ? Number(parentRow.schedulingNum) : 0; |
| | | |
| | | if (totalFinishedNum > schedulingNum) { |
| | | // åéæ¬æ¬¡è¾å
¥ |
| | | row.finishedNum = schedulingNum - (totalFinishedNum - Number(row.finishedNum)); |
| | | proxy.$modal.msgWarning('æææ¬æ¬¡ç产æ°éä¹åä¸å¯å¤§äºæäº§æ°é'); |
| | | } |
| | | row.pendingNum = row.schedulingNum - row.finishedNum; |
| | | } |
| | | // ç¼è¾ä¿®æ¹ç¶æ |
| | | const changeEditType = (row) => { |
| | | row.editType = !row.editType; |
| | | }; |
| | | // ä¿åè®°å½ |
| | | const saveReceiptPayment = (row) => { |
| | | productionReportUpdate(row).then((res) => { |
| | | row.editType = !row.editType; |
| | | getList(); |
| | | proxy.$modal.msgSuccess("æäº¤æå"); |
| | | }); |
| | | }; |
| | | // è¡¨æ ¼éæ©æ°æ® |
| | | const handleSelectionChange = (selection) => { |
| | | selectedRows.value = selection; |
| | | }; |
| | | const summarizeMainTable = (param) => { |
| | | return proxy.summarizeTable(param, [ |
| | | "finishedNum" |
| | | ]); |
| | | }; |
| | | // æå¼å¼¹æ¡ |
| | | const openForm = (type, row) => { |
| | | if (selectedRows.value.length !== 1) { |
| | | proxy.$message.error("è¯·éæ©ä¸æ¡æ°æ®"); |
| | | return; |
| | | } |
| | | if (selectedRows.value[0].pendingFinishNum == 0) { |
| | | proxy.$message.warning("æ é忥工"); |
| | | return; |
| | | } |
| | | nextTick(() => { |
| | | const rowInfo = type === 'add' ? selectedRows.value[0] : row |
| | | formDia.value?.openDialog(type, rowInfo) |
| | | }) |
| | | }; |
| | | |
| | | // å é¤ |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| | | ids = selectedRows.value.map((item) => item.id); |
| | | } else { |
| | | proxy.$modal.msgWarning("è¯·éæ©æ°æ®"); |
| | | return; |
| | | } |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å é¤ï¼æ¯å¦ç¡®è®¤å é¤ï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | staffJoinDel(ids).then((res) => { |
| | | proxy.$modal.msgSuccess("å 餿å"); |
| | | getList(); |
| | | }); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | // å¯¼åº |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("éä¸çå
容å°è¢«å¯¼åºï¼æ¯å¦ç¡®è®¤å¯¼åºï¼", "导åº", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/staff/staffJoinLeaveRecord/export", {staffState: 1}, "人åå
¥è.xlsx"); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已忶"); |
| | | }); |
| | | }; |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped></style> |