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 | 111 +++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 83 insertions(+), 28 deletions(-)
diff --git a/src/views/FlexJobManage/FlexJobManage.vue b/src/views/FlexJobManage/FlexJobManage.vue
index 13aff9e..c12699f 100644
--- a/src/views/FlexJobManage/FlexJobManage.vue
+++ b/src/views/FlexJobManage/FlexJobManage.vue
@@ -138,7 +138,7 @@
import { ModelValueType } from 'element-plus';
defineOptions({
- name: 'EnterpriseManageList',
+ name: 'FlexJobManageList',
});
const operationBtns = defineOperationBtns([
@@ -162,11 +162,11 @@
},
{
data: {
- enCode: 'signBtn',
+ enCode: 'enterpriseSignBtn',
name: '浼佷笟绛剧害',
},
emits: {
- onClick: (role) => handleSign(role),
+ onClick: (role) => handleEnterpriseSign(role),
},
extraProps: {
hide: (row: API.GetEnterpriseEmployeesQueryResultItem) =>
@@ -178,17 +178,17 @@
},
{
data: {
- enCode: 'signBtn',
+ enCode: 'inviteSignBtn',
name: '閭�璇风绾�',
},
emits: {
- onClick: (role) => handleSign(role),
+ onClick: (role) => handleInviteSign(role),
},
extraProps: {
hide: (row: API.GetEnterpriseEmployeesQueryResultItem) =>
!(
- row.userSignContractStatus === EnumTaskUserSignContractStatus.Wait ||
- row.userSignContractStatus === EnumTaskUserSignContractStatus.Refuse
+ 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();
@@ -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) {}
}
@@ -462,49 +471,95 @@
const {
dialogProps: dialogSignProps,
handleAdd: handleSignAdd,
+ handleEdit: handleSignEdit,
editForm: signEditForm,
} = useFormDialog({
onConfirm: signContract,
defaultFormParams: {
- url: [] as UploadUserFile[],
+ ids: [] as string[],
+ contractTemplateId: '',
},
});
-function handleSign(row: API.GetEnterpriseEmployeesQueryResultItem) {
- handleSignAdd();
+function handleInviteSign(row: API.GetEnterpriseEmployeesQueryResultItem) {
+ if (row) {
+ handleSignEdit({
+ ids: [row.id],
+ contractTemplateId: '',
+ });
+ }
}
function handleBatchSign() {
const selectionRows = getSelectionRows();
if (selectionRows) {
const hasSigned = selectionRows?.some(
(x) =>
- !(
- x.userSignContractStatus === EnumTaskUserSignContractStatus.Pass &&
- x.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Wait
- )
+ x.userSignContractStatus === EnumTaskUserSignContractStatus.Pass ||
+ x.enterpriseSignContractStatus === EnumTaskUserSignContractStatus.Pass ||
+ x.hireStatus === EnumTaskUserHireStatus.Wait
);
if (hasSigned) {
Message.warnMessage('鍕鹃�変汉鍛樹腑鍖呭惈宸茬绾﹀畬鎴愭垨鏈綍鐢ㄤ汉鍛�');
return;
}
- handleSignAdd();
+ handleSignAdd({
+ ids: selectionRows.map((x) => x.id),
+ contractTemplateId: '',
+ });
}
}
async function signContract() {
try {
+ let params: API.InviteElectronSignCommand = {
+ ids: signEditForm.ids,
+ contractTemplateId: signEditForm.contractTemplateId,
+ };
+ let res = await enterpriseEmployeeServices.inviteElectronSign(params);
+ if (res) {
+ Message.successMessage('鎿嶄綔鎴愬姛');
+ getList(paginationState.pageIndex);
+ }
} catch (error) {}
}
-async function handleUnSign(row: API.GetEnterpriseEmployeesQueryResultItem) {
+async function handleEnterpriseSign(row: API.GetEnterpriseEmployeesQueryResultItem) {
try {
- await Message.tipMessage('纭畾瑙g害鐢ㄦ埛锛�');
+ let res = await enterpriseEmployeeServices.enterpriseUserElectronSign({ id: row.id });
+ if (res) {
+ window.open(res?.signContractLongUrl, '_blank');
+ }
} 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