From df0862c15f2c2178e45c262c4bf96b33ee3b321c Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期三, 22 十月 2025 17:00:37 +0800
Subject: [PATCH] fix: bug
---
src/views/FlexJobManage/FlexJobManage.vue | 80 +++++++++++++++++++++++++++++++++++++++-
1 files changed, 78 insertions(+), 2 deletions(-)
diff --git a/src/views/FlexJobManage/FlexJobManage.vue b/src/views/FlexJobManage/FlexJobManage.vue
index 5cb7a19..b4522c1 100644
--- a/src/views/FlexJobManage/FlexJobManage.vue
+++ b/src/views/FlexJobManage/FlexJobManage.vue
@@ -84,6 +84,7 @@
<el-button @click="handleBatchUnSign()" type="primary">鎵归噺瑙g害</el-button>
<el-button @click="handleSendShotMessage()" type="primary">鐭俊鍙戦��</el-button>
<el-button @click="handleBatchSign()" type="primary">鎵归噺绛剧害</el-button>
+ <el-button @click="handleEnterpriseBatchSign()" type="primary">鎵归噺浼佷笟绛剧害</el-button>
</template>
</ProTableQueryFilterBar>
<ProTableV2
@@ -99,6 +100,7 @@
</ProTableV2>
</AppContainer>
<StaffInfoDialog v-bind="dialogStaffInfoProps" />
+ <StaffDetailInfoDialog v-bind="dialogStaffDetailProps" />
<BatchImportDialog
v-bind="dialogBatchImportProps"
@onDownloadTemplate="handleDownloadTemplate"
@@ -133,9 +135,11 @@
import StaffInfoDialog from './components/StaffInfoDialog.vue';
import BatchImportDialog from './components/BatchImportDialog.vue';
import SendShotMessageDialog from './components/SendShotMessageDialog.vue';
+import StaffDetailInfoDialog from './components/StaffDetailInfoDialog.vue';
import SignDialog from './components/SignDialog.vue';
import * as enterpriseEmployeeServices from '@/services/api/enterpriseEmployee';
import { ModelValueType } from 'element-plus';
+import _ from 'lodash';
defineOptions({
name: 'FlexJobManageList',
@@ -157,7 +161,8 @@
name: '璇︽儏',
},
emits: {
- onClick: (role) => openDialog(role, true),
+ onClick: (role: API.GetEnterpriseEmployeesQueryResultItem) =>
+ handleStaffDetailEdit({ id: role.id, tabType: 'info' }),
},
},
{
@@ -276,7 +281,7 @@
{
defaultExtraParams: {
searchWord: '',
- orderInput: [{ property: 'id', order: EnumPagedListOrder.Desc }],
+ orderInput: [{ property: 'createdTime', order: EnumPagedListOrder.Desc }],
createdTime: [] as unknown as ModelValueType,
signContractTime: [] as unknown as ModelValueType,
hireStatus: '' as any as EnumTaskUserHireStatus,
@@ -430,6 +435,7 @@
ids: [] as string[],
customerId: '',
name: '',
+ contractTemplateId: '',
},
});
@@ -454,6 +460,7 @@
try {
let params: API.SendInviteElectronSignSmsCommand = {
ids: editShotMessageForm.ids,
+ contractTemplateId: editShotMessageForm.contractTemplateId,
};
let res = await enterpriseEmployeeServices.sendInviteElectronSignSms(params);
if (res) {
@@ -507,6 +514,57 @@
}
}
+const handleEnterpriseBatchSign = _.debounce(
+ () => {
+ const selectionRows = getSelectionRows();
+ if (selectionRows) {
+ const hasSigned = selectionRows?.some(
+ (x) =>
+ !(
+ x.userSignContractStatus === EnumTaskUserSignContractStatus.Pass &&
+ x.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Wait
+ )
+ );
+ if (hasSigned) {
+ Message.warnMessage('鍕鹃�変汉鍛樹腑鍖呭惈宸蹭紒涓氱绾︺�佹湭褰曠敤浜哄憳鎴栨湭绛剧害瀹屾垚浜哄憳');
+ return;
+ }
+ const ids = selectionRows.map((x) => x.id);
+ handleBatchEnterpriseSign(ids);
+ }
+ },
+ 1000,
+ { leading: true, trailing: false }
+);
+
+async function handleBatchEnterpriseSign(ids: string[]) {
+ try {
+ state.loading = true;
+ let res = await enterpriseEmployeeServices.batchEnterpriseSignContract({ ids: ids });
+ if (res) {
+ Message.successMessage('鎿嶄綔鎴愬姛');
+ getList(paginationState.pageIndex);
+ if (res?.errors?.length > 0) {
+ Message.tipMessage('瀛樺湪绛剧害澶辫触鐨勭伒宸ヤ俊鎭暟鎹紝鏄惁瀵煎嚭锛�').then(() => {
+ XLSXUtils.exportToXLSX({
+ workbookDataList: res.errors,
+ fileName: '绛剧害澶辫触鐏靛伐淇℃伅',
+ workbookHeaderMap: {
+ name: '濮撳悕',
+ contactPhoneNumber: '鎵嬫満鍙�',
+ identity: '韬唤璇佸彿',
+ errorMessages: '閿欒淇℃伅',
+ },
+ });
+ });
+ }
+ }
+ } catch (error) {
+ } finally {
+ state.loading = false;
+ }
+}
+
async function signContract() {
try {
let params: API.InviteElectronSignCommand = {
@@ -538,6 +596,13 @@
try {
const selectionRows = getSelectionRows();
if (selectionRows) {
+ const hasUnSigned = selectionRows?.some(
+ (x) => x.enterpriseSignContractStatus !== EnumTaskUserSignContractStatus.Pass
+ );
+ if (hasUnSigned) {
+ Message.warnMessage('鍕鹃�夋暟鎹腑鍖呭惈浼佷笟鏈绾︽垨宸茶В绾︽暟鎹�');
+ return;
+ }
stopElectronSign(selectionRows.map((x) => x.id));
}
} catch (error) {}
@@ -554,6 +619,17 @@
} catch (error) {}
}
+const {
+ dialogProps: dialogStaffDetailProps,
+ handleEdit: handleStaffDetailEdit,
+ editForm: staffDetailEditForm,
+} = useFormDialog({
+ defaultFormParams: {
+ id: '',
+ tabType: 'info',
+ },
+});
+
async function handleDelete(row: API.GetEnterpriseEmployeesQueryResultItem) {
try {
await Message.deleteMessage();
--
Gitblit v1.9.1