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