|
|
@ -74,6 +74,9 @@ |
|
|
|
<script setup name="DialogExtraPay"> |
|
|
|
<script setup name="DialogExtraPay"> |
|
|
|
import { signAddPay, getSignExtraPayList } from '@/api/clue/sign' |
|
|
|
import { signAddPay, getSignExtraPayList } from '@/api/clue/sign' |
|
|
|
import * as ExtraFeeApi from '@/api/clue/extraFee' |
|
|
|
import * as ExtraFeeApi from '@/api/clue/extraFee' |
|
|
|
|
|
|
|
import { useAppStore } from '@/store/modules/app' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const appStore = useAppStore() |
|
|
|
|
|
|
|
|
|
|
|
const extraPayOptions = ref([]) |
|
|
|
const extraPayOptions = ref([]) |
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
@ -92,13 +95,13 @@ defineExpose({ |
|
|
|
const form = ref({}) |
|
|
|
const form = ref({}) |
|
|
|
function resetForm(id) { |
|
|
|
function resetForm(id) { |
|
|
|
form.value = { |
|
|
|
form.value = { |
|
|
|
signOrderId: id, |
|
|
|
id: id, |
|
|
|
extraPay: [] |
|
|
|
extraPay: [] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function getFormList() { |
|
|
|
function getFormList() { |
|
|
|
getSignExtraPayList({ id: form.value.signOrderId }).then((data) => { |
|
|
|
getSignExtraPayList({ id: form.value.id }).then((data) => { |
|
|
|
form.value.extraPay = data.map((it) => ({ |
|
|
|
form.value.extraPay = data.map((it) => ({ |
|
|
|
...it, |
|
|
|
...it, |
|
|
|
editabled: false |
|
|
|
editabled: false |
|
|
@ -121,10 +124,14 @@ async function onSubmit() { |
|
|
|
// 提交请求 |
|
|
|
// 提交请求 |
|
|
|
formLoading.value = true |
|
|
|
formLoading.value = true |
|
|
|
try { |
|
|
|
try { |
|
|
|
const params = { |
|
|
|
let params = { |
|
|
|
signOrderId: form.value.signOrderId, |
|
|
|
|
|
|
|
extraPay: form.value.extraPay.filter((it) => it.editabled) |
|
|
|
extraPay: form.value.extraPay.filter((it) => it.editabled) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (appStore.getAppInfo?.instanceType == 1) { |
|
|
|
|
|
|
|
params.signId = form.value.id |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
params.signOrderId = form.value.id |
|
|
|
|
|
|
|
} |
|
|
|
await signAddPay(params) |
|
|
|
await signAddPay(params) |
|
|
|
message.success('添加额外支出成功!') |
|
|
|
message.success('添加额外支出成功!') |
|
|
|
getFormList() |
|
|
|
getFormList() |
|
|
|