From ec76c13fac4f9937e62e6244624c3fb98c398538 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期五, 12 九月 2025 15:55:32 +0800
Subject: [PATCH] feat: 支付宝充值
---
src/views/FlexJobManage/FlexJobManage.vue | 83 +++++++++++++++++++++++++++--------------
1 files changed, 54 insertions(+), 29 deletions(-)
diff --git a/src/views/FlexJobManage/FlexJobManage.vue b/src/views/FlexJobManage/FlexJobManage.vue
index e2d1b49..c12699f 100644
--- a/src/views/FlexJobManage/FlexJobManage.vue
+++ b/src/views/FlexJobManage/FlexJobManage.vue
@@ -129,7 +129,7 @@
import { FlexJobManageColumns } from './constants';
import { EnumTaskUserHireStatusText, EnumTaskUserSignContractStatusText } from '@/constants';
import { Message } from '@bole-core/core';
-import { convertApi2FormUrlOnlyOne, downloadFileByUrl, format, omitByFalse } from '@/utils';
+import { convertApi2FormUrlOnlyOne, downloadFileByUrl, format } from '@/utils';
import StaffInfoDialog from './components/StaffInfoDialog.vue';
import BatchImportDialog from './components/BatchImportDialog.vue';
import SendShotMessageDialog from './components/SendShotMessageDialog.vue';
@@ -187,8 +187,8 @@
extraProps: {
hide: (row: API.GetEnterpriseEmployeesQueryResultItem) =>
!(
- row.userSignContractStatus === EnumTaskUserSignContractStatus.Wait ||
- row.userSignContractStatus === EnumTaskUserSignContractStatus.Stop
+ row.userSignContractStatus !== EnumTaskUserSignContractStatus.Pass &&
+ row.hireStatus === EnumTaskUserHireStatus.Pass
),
},
},
@@ -208,16 +208,16 @@
),
},
},
- {
- data: {
- enCode: 'delBtn',
- name: '鍒犻櫎',
- },
- props: { type: 'danger' },
- emits: {
- onClick: (role) => handleDelete(role),
- },
- },
+ // {
+ // data: {
+ // enCode: 'delBtn',
+ // name: '鍒犻櫎',
+ // },
+ // props: { type: 'danger' },
+ // emits: {
+ // onClick: (role) => handleDelete(role),
+ // },
+ // },
]);
const router = useRouter();
@@ -265,7 +265,7 @@
enterpriseSignContractStatus: extraParamState.enterpriseSignContractStatus,
};
- let res = await enterpriseEmployeeServices.getEnterpriseEmployees(omitByFalse(params), {
+ let res = await enterpriseEmployeeServices.getEnterpriseEmployees(params, {
showLoading: !state.loading,
});
return res;
@@ -430,6 +430,7 @@
ids: [] as string[],
customerId: '',
name: '',
+ contractTemplateId: '',
},
});
@@ -452,6 +453,14 @@
async function sendMessageForSign() {
try {
+ let params: API.SendInviteElectronSignSmsCommand = {
+ ids: editShotMessageForm.ids,
+ contractTemplateId: editShotMessageForm.contractTemplateId,
+ };
+ let res = await enterpriseEmployeeServices.sendInviteElectronSignSms(params);
+ if (res) {
+ Message.successMessage('鐭俊宸插彂閫�');
+ }
} catch (error) {}
}
@@ -467,7 +476,7 @@
} = useFormDialog({
onConfirm: signContract,
defaultFormParams: {
- id: '',
+ ids: [] as string[],
contractTemplateId: '',
},
});
@@ -475,14 +484,13 @@
function handleInviteSign(row: API.GetEnterpriseEmployeesQueryResultItem) {
if (row) {
handleSignEdit({
- id: row.id,
+ ids: [row.id],
contractTemplateId: '',
});
}
}
function handleBatchSign() {
const selectionRows = getSelectionRows();
- console.log('selectionRows: ', selectionRows);
if (selectionRows) {
const hasSigned = selectionRows?.some(
(x) =>
@@ -494,14 +502,17 @@
Message.warnMessage('鍕鹃�変汉鍛樹腑鍖呭惈宸茬绾﹀畬鎴愭垨鏈綍鐢ㄤ汉鍛�');
return;
}
- handleSignAdd();
+ handleSignAdd({
+ ids: selectionRows.map((x) => x.id),
+ contractTemplateId: '',
+ });
}
}
async function signContract() {
try {
let params: API.InviteElectronSignCommand = {
- id: signEditForm.id,
+ ids: signEditForm.ids,
contractTemplateId: signEditForm.contractTemplateId,
};
let res = await enterpriseEmployeeServices.inviteElectronSign(params);
@@ -521,20 +532,34 @@
} catch (error) {}
}
-async function handleUnSign(row: API.GetEnterpriseEmployeesQueryResultItem) {
- try {
- await Message.tipMessage('纭畾瑙g害鐢ㄦ埛锛�');
- let res = await enterpriseEmployeeServices.stopElectronSign({ id: row.id });
- if (res) {
- Message.successMessage('鎿嶄綔鎴愬姛');
- getList(paginationState.pageIndex);
- }
- } catch (error) {}
+function handleUnSign(row: API.GetEnterpriseEmployeesQueryResultItem) {
+ stopElectronSign([row.id]);
}
function handleBatchUnSign() {
try {
- Message.warnMessage('鍔熻兘寮�鍙戜腑');
+ 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) {}
+}
+
+async function stopElectronSign(ids: string[]) {
+ try {
+ await Message.tipMessage('纭畾瑙g害鐢ㄦ埛锛�');
+ let res = await enterpriseEmployeeServices.stopElectronSign({ ids: ids });
+ if (res) {
+ Message.successMessage('鎿嶄綔鎴愬姛');
+ getList(paginationState.pageIndex);
+ }
} catch (error) {}
}
--
Gitblit v1.9.1