|
@@ -780,6 +780,7 @@ const authorizeResult = reactive({
|
|
|
sign_url: "",
|
|
sign_url: "",
|
|
|
external_agreement_no: "",
|
|
external_agreement_no: "",
|
|
|
agreement_no: "",
|
|
agreement_no: "",
|
|
|
|
|
+ sign_scene: "INDUSTRY|PURCHASE",
|
|
|
queryLoading: false,
|
|
queryLoading: false,
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -1222,25 +1223,11 @@ function resetBatchTransfer() {
|
|
|
batchTransferFailCount.value = 0;
|
|
batchTransferFailCount.value = 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-async function handleAuthorize() {
|
|
|
|
|
- // if (!authorizeFormRef.value) return;
|
|
|
|
|
- // await authorizeFormRef.value.validate(async (valid) => {
|
|
|
|
|
- // if (valid) {
|
|
|
|
|
- // authorizeLoading.value = true;
|
|
|
|
|
- // try {
|
|
|
|
|
- // const res = await AccountAPI.authorizeApply({
|
|
|
|
|
- // enterprise_id: authorizeForm.enterprise_id || currentEnterpriseId.value!,
|
|
|
|
|
- // });
|
|
|
|
|
- // authorizeResult.sign_url = res.data.sign_url || "";
|
|
|
|
|
- // } finally {
|
|
|
|
|
- // authorizeLoading.value = false;
|
|
|
|
|
- // }
|
|
|
|
|
- // }
|
|
|
|
|
- // });
|
|
|
|
|
-
|
|
|
|
|
|
|
+async function handleAuthorize(signScene?: string) {
|
|
|
try {
|
|
try {
|
|
|
const res = await AccountAPI.authorizeApply({
|
|
const res = await AccountAPI.authorizeApply({
|
|
|
enterprise_id: currentEnterpriseId.value!,
|
|
enterprise_id: currentEnterpriseId.value!,
|
|
|
|
|
+ sign_scene: signScene || authorizeResult.sign_scene || "DEFAULT|DEFAULT",
|
|
|
});
|
|
});
|
|
|
const signHtml = res.data.data?.sign_url || "";
|
|
const signHtml = res.data.data?.sign_url || "";
|
|
|
const externalAgreementNo = res.data.data?.external_agreement_no || "";
|
|
const externalAgreementNo = res.data.data?.external_agreement_no || "";
|
|
@@ -1266,6 +1253,7 @@ async function handleQueryAgreement() {
|
|
|
const res = await AccountAPI.queryAgreement(
|
|
const res = await AccountAPI.queryAgreement(
|
|
|
currentEnterpriseId.value!,
|
|
currentEnterpriseId.value!,
|
|
|
authorizeResult.external_agreement_no,
|
|
authorizeResult.external_agreement_no,
|
|
|
|
|
+ authorizeResult.sign_scene,
|
|
|
);
|
|
);
|
|
|
const agreementNo = res.data.data?.agreement_no || "";
|
|
const agreementNo = res.data.data?.agreement_no || "";
|
|
|
if (agreementNo) {
|
|
if (agreementNo) {
|
|
@@ -1704,7 +1692,22 @@ function handleOverviewRefresh(data: any) {
|
|
|
async function handleGoTab(tab: string) {
|
|
async function handleGoTab(tab: string) {
|
|
|
console.log("goTab => ", tab);
|
|
console.log("goTab => ", tab);
|
|
|
if (tab === "authorize") {
|
|
if (tab === "authorize") {
|
|
|
- await handleAuthorize();
|
|
|
|
|
|
|
+ // 弹出场景码选择框(external_agreement_no 不为空时 sign_scene 不能为 DEFAULT|DEFAULT)
|
|
|
|
|
+ try {
|
|
|
|
|
+ const { value: signScene } = await ElMessageBox.prompt("请选择签约场景码", "转账授权签约", {
|
|
|
|
|
+ confirmButtonText: "确认签约",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ inputType: "textarea" as any,
|
|
|
|
|
+ inputValue: authorizeResult.sign_scene || "INDUSTRY|PURCHASE",
|
|
|
|
|
+ inputPlaceholder: "格式: INDUSTRY|XXXX,如 INDUSTRY|PURCHASE",
|
|
|
|
|
+ });
|
|
|
|
|
+ if (signScene) {
|
|
|
|
|
+ authorizeResult.sign_scene = signScene;
|
|
|
|
|
+ await handleAuthorize(signScene);
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch {
|
|
|
|
|
+ // 用户取消
|
|
|
|
|
+ }
|
|
|
} else if (tab === "create") {
|
|
} else if (tab === "create") {
|
|
|
await handleCreate();
|
|
await handleCreate();
|
|
|
} else if (tab === "deposit") {
|
|
} else if (tab === "deposit") {
|