sc
This commit is contained in:
@@ -66,3 +66,8 @@ export const removeOrderProduct = (id) => {
|
||||
export const getOrderProductList = (params) => {
|
||||
return request.get({ url: '/admin-api/crm/sign-prodcut/list', params })
|
||||
}
|
||||
|
||||
//
|
||||
export const createSignOnRemark = (data) => {
|
||||
return request.post({ url: '/admin-api/crm/sign/xj-create', data })
|
||||
}
|
||||
|
||||
@@ -176,18 +176,16 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" :offset="0" class="mb-18px">
|
||||
<el-divider direction="horizontal" content-position="left">
|
||||
其他费用<span v-if="extraTotalPrice">,应收:{{ extraTotalPrice }}</span>
|
||||
</el-divider>
|
||||
<el-divider direction="horizontal" content-position="left"> 其他费用 </el-divider>
|
||||
<el-button
|
||||
class="mb-5px"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="form.extraPay.push({ extraPayType: undefined, extraPayMoney: 0 })"
|
||||
@click="form.otherPay.push({ extraPayType: undefined, extraPayMoney: 0 })"
|
||||
>
|
||||
添加其他费用
|
||||
</el-button>
|
||||
<el-table :data="form.extraPay" border size="small">
|
||||
<el-table :data="form.otherPay" border size="small">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column prop="extraPayType" label="费用类型" width="200px">
|
||||
<template #default="{ row }">
|
||||
@@ -198,7 +196,7 @@
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in extraPayOptions"
|
||||
v-for="item in otherPayOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -221,7 +219,7 @@
|
||||
<Icon
|
||||
icon="ep:remove-filled"
|
||||
class="text-red-500"
|
||||
@click="handleRemove('extraPay', $index)"
|
||||
@click="handleRemove('otherPay', $index)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -257,9 +255,9 @@
|
||||
>
|
||||
<el-option
|
||||
v-for="item in extraPayOptions"
|
||||
:key="item.id"
|
||||
:label="item.extraPayName"
|
||||
:value="item.id"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
@@ -311,7 +309,7 @@
|
||||
|
||||
<script setup>
|
||||
import * as ClueApi from '@/api/clue'
|
||||
import { createSign, getSignProfit } from '@/api/clue/sign'
|
||||
import { createSignOnRemark, getSignProfit } from '@/api/clue/sign'
|
||||
import { getClueRemarkByRemarkId } from '@/api/clue/clueRemark'
|
||||
import { getDiyFieldList } from '@/api/clue/orderField'
|
||||
import { getPlaceList } from '@/api/school/place'
|
||||
@@ -340,13 +338,10 @@ const formLoading = ref(false)
|
||||
const route = useRoute()
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const extraTotalPrice = computed(() => {
|
||||
return form.value.extraPay?.reduce((pre, cur) => pre + cur.extraPayMoney, 0)
|
||||
})
|
||||
|
||||
const showSchema = ref([])
|
||||
|
||||
const extraPayOptions = getDictOptions('other_pay_type')
|
||||
const otherPayOptions = getDictOptions('other_pay_type')
|
||||
const extraPayOptions = getDictOptions('extra_pay_type')
|
||||
|
||||
const remarkInfo = ref({})
|
||||
|
||||
@@ -394,6 +389,7 @@ async function resetForm() {
|
||||
isCompanyReceipts: data.configValue == 'true',
|
||||
receiver: remarkInfo.value.enterUser,
|
||||
extraPay: [],
|
||||
otherPay: [],
|
||||
signProducts: [],
|
||||
installStatus: 3
|
||||
}
|
||||
@@ -423,10 +419,14 @@ async function handleSave() {
|
||||
const valid = await formRef.value.validate()
|
||||
if (!valid) return
|
||||
|
||||
if (form.value.extraPay.some((it) => !it.extraPayType || it.extraPayMoney == null)) {
|
||||
if (form.value.otherPay.some((it) => !it.extraPayType || it.extraPayMoney == null)) {
|
||||
message.info('请将费用类型及费用金额填写完整!')
|
||||
return
|
||||
}
|
||||
if (form.value.extraPay.some((it) => !it.extraPayType || it.extraPayMoney == null)) {
|
||||
message.info('请将支出类型及支出金额填写完整!')
|
||||
return
|
||||
}
|
||||
|
||||
// 提交请求
|
||||
formLoading.value = true
|
||||
@@ -441,9 +441,8 @@ async function handleSave() {
|
||||
params.diyParams[key] = params[key]
|
||||
}
|
||||
}
|
||||
await createSign(params)
|
||||
await createSignOnRemark(params)
|
||||
message.success('登记成功!')
|
||||
show.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user