qsh 3 weeks ago
parent 518d64bca4
commit 98b64c9533
  1. 15
      src/views/Clue/Order/Comp/DialogExtraPay.vue

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

Loading…
Cancel
Save