|
@@ -415,6 +415,7 @@ import { onMounted, reactive, ref } from "vue";
|
|
|
import { ElMessage, type FormInstance, type FormRules } from "element-plus";
|
|
import { ElMessage, type FormInstance, type FormRules } from "element-plus";
|
|
|
import dayjs from "dayjs";
|
|
import dayjs from "dayjs";
|
|
|
import HarAPI, {
|
|
import HarAPI, {
|
|
|
|
|
+ HAR_BIZ_UN_STAGE,
|
|
|
HAR_NOTIFY_STATUS_TEXT,
|
|
HAR_NOTIFY_STATUS_TEXT,
|
|
|
HAR_TRADE_STATUS_TAG,
|
|
HAR_TRADE_STATUS_TAG,
|
|
|
HAR_TRADE_STATUS_TEXT,
|
|
HAR_TRADE_STATUS_TEXT,
|
|
@@ -471,7 +472,10 @@ const defaultForm = (): OrderForm => ({
|
|
|
out_biz_no: "",
|
|
out_biz_no: "",
|
|
|
price: undefined,
|
|
price: undefined,
|
|
|
title: "",
|
|
title: "",
|
|
|
- trade_type: "alipay_payment",
|
|
|
|
|
|
|
+ trade_type: "alipay_un_stage",
|
|
|
|
|
+ // 非分期要带业务类型(规范 260924)。后端纯透传、不推导,所以这里就得给上;
|
|
|
|
|
+ // 分期那个取值规范没写,留空 —— 真缺了上游会点名报出来。
|
|
|
|
|
+ biz: HAR_BIZ_UN_STAGE,
|
|
|
stage_num: "",
|
|
stage_num: "",
|
|
|
percent: "",
|
|
percent: "",
|
|
|
third_shop_code: "",
|
|
third_shop_code: "",
|
|
@@ -576,8 +580,14 @@ function handleTradeTypeChange(v: string) {
|
|
|
if (v !== "alipay_stage") {
|
|
if (v !== "alipay_stage") {
|
|
|
form.stage_num = "";
|
|
form.stage_num = "";
|
|
|
form.percent = "";
|
|
form.percent = "";
|
|
|
- } else if (!form.percent) {
|
|
|
|
|
- form.percent = "100";
|
|
|
|
|
|
|
+ // 切回非分期要把业务类型补回来:清掉它再切回来仍是「非分期却不带 biz」
|
|
|
|
|
+ form.biz = HAR_BIZ_UN_STAGE;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 分期的业务类型取值规范没给,不猜
|
|
|
|
|
+ form.biz = "";
|
|
|
|
|
+ if (!form.percent) {
|
|
|
|
|
+ form.percent = "100";
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -597,6 +607,7 @@ async function handleCreate() {
|
|
|
// 已过表单必填校验,此处 price 必然有值
|
|
// 已过表单必填校验,此处 price 必然有值
|
|
|
price: form.price as number,
|
|
price: form.price as number,
|
|
|
out_biz_no: form.out_biz_no || undefined,
|
|
out_biz_no: form.out_biz_no || undefined,
|
|
|
|
|
+ biz: form.biz || undefined,
|
|
|
stage_num: form.stage_num || undefined,
|
|
stage_num: form.stage_num || undefined,
|
|
|
percent: form.percent || undefined,
|
|
percent: form.percent || undefined,
|
|
|
third_shop_code: form.third_shop_code || undefined,
|
|
third_shop_code: form.third_shop_code || undefined,
|