feat(checkout): 添加 appId 功能

- 在 CheckoutItemConfigEdit组件中添加 appId 属性
- 在表单初始化时打印 appId- 在表单提交时将 appId 设置为表单值
This commit is contained in:
DaxPay
2024-12-04 19:23:30 +08:00
parent 2546c3fc82
commit 7412e0b565

View File

@@ -85,6 +85,9 @@
} from './CheckoutConfig.api'
import { useDict } from '@/hooks/bootx/useDict'
const props = defineProps({
appId: String,
})
const {
initFormEditType,
handleCancel,
@@ -136,6 +139,7 @@
* 入口
*/
function init(id, editType: FormEditType, groupId: string) {
console.log(props.appId)
initFormEditType(editType)
resetForm()
form.value.groupId = unref(groupId)
@@ -162,6 +166,7 @@
function handleOk() {
formRef.value?.validate().then(async () => {
confirmLoading.value = true
form.value.appId = props.appId
if (formEditType.value === FormEditType.Add) {
await saveItemConfig(form.value).finally(() => (confirmLoading.value = false))
} else if (formEditType.value === FormEditType.Edit) {