add
This commit is contained in:
parent
537a3984f0
commit
2c7e66c9fb
@ -57,7 +57,6 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="附件">
|
||||
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</popup>
|
||||
@ -75,14 +74,8 @@ import { getAll } from '@/api/org/organization'
|
||||
import projectTable from "@/components/project/index.vue"
|
||||
import { apiCustomerDemandAdd, apiCustomerDemandEdit, apiCustomerDemandDetail } from '@/api/customer_demand'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
// 上传文件
|
||||
import annexUpload from "@/components/annexUpload/index.vue"
|
||||
const handleAvatarSuccess_four = (response: any) => {
|
||||
// @ts-ignore
|
||||
response.code != 0 ? formData.annex.push({ uri: response.data.uri, name: response.data.name }) : ElMessage.error(response.msg);
|
||||
};
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => { formData.annex.splice(index, 1) }
|
||||
|
||||
|
||||
|
||||
let props = defineProps({
|
||||
project: Object
|
||||
|
@ -77,16 +77,6 @@ import { apiCustomerDemandSolutionAdd, apiCustomerDemandSolutionEdit, apiCustome
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
|
||||
|
||||
// 上传文件
|
||||
import annexUpload from "@/components/annexUpload/index.vue"
|
||||
const handleAvatarSuccess_four = (response: any) => {
|
||||
formData.annex ||= []
|
||||
// @ts-ignore
|
||||
response.code != 0 ? formData.annex.push({ uri: response.data.uri, name: response.data.name }) : ElMessage.error(response.msg);
|
||||
};
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => { formData.annex.splice(index, 1) }
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
|
@ -81,7 +81,6 @@
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="送审概算、预算、结算资料" prop="ssgsysjs_file" label-width="200px">
|
||||
<!-- <material-picker v-model="formData.ssgsysjs_file" /> -->
|
||||
<annexUpload :annex="formData.ssgsysjs_file"
|
||||
@handleAvatarSuccess="handleAvatarSuccess_four4" @delFile="delFileFn4" />
|
||||
</el-form-item>
|
||||
@ -94,7 +93,6 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="其他资料" prop="other_file">
|
||||
<!-- <material-picker v-model="formData.other_file" /> -->
|
||||
<annexUpload :annex="formData.other_file" @handleAvatarSuccess="handleAvatarSuccess_four6"
|
||||
@delFile="delFileFn6" />
|
||||
</el-form-item>
|
||||
|
@ -229,7 +229,6 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="附件">
|
||||
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -249,15 +248,6 @@ import Popup from '@/components/popup/index.vue'
|
||||
import { apiProjectAdd, apiProjectEdit, apiProjectDetail } from '@/api/project'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
import type { PropType } from 'vue'
|
||||
// 上传文件
|
||||
import annexUpload from "@/components/annexUpload/index.vue"
|
||||
const handleAvatarSuccess_four = (response: any) => {
|
||||
formData.annex ||= []
|
||||
// @ts-ignore
|
||||
response.code != 0 ? formData.annex.push({ uri: response.data.uri, name: response.data.name }) : ElMessage.error(response.msg);
|
||||
};
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => { formData.annex.splice(index, 1) }
|
||||
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单据编号" prop="num">
|
||||
@ -43,17 +43,17 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目回款总额" prop="hk" label-width="120px">
|
||||
<el-form-item label="项目回款总额" prop="hk">
|
||||
<el-input v-model="formData.hk" clearable placeholder="请输入项目回款总额" type="number" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="提成比例(%)" prop="rate" label-width="120px">
|
||||
<el-form-item label="提成比例(%)" prop="rate">
|
||||
<el-input v-model="formData.rate" clearable placeholder="请输入提成比例(%)" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="应提成总金额" prop="ticheng" label-width="120px">
|
||||
<el-form-item label="应提成总金额" prop="ticheng">
|
||||
<el-input v-model="formData.ticheng" clearable placeholder="请输入应提成总金额" type="number" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -65,7 +65,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="本次支付总额" prop="bczfze" label-width="120px">
|
||||
<el-form-item label="本次支付总额" prop="bczfze">
|
||||
<el-input v-model="formData.bczfze" clearable placeholder="请输入本次支付总额" type="number" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -128,7 +128,6 @@
|
||||
<el-option v-for="(item, index) in dictData.task_type" :key="index" :label="item.name"
|
||||
:value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
<!-- {{ dictData.task_type }} -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="专业类型" prop="professional_type" width="200px">
|
||||
@ -140,7 +139,6 @@
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
</template>
|
||||
<!-- {{ dictData.major_type }} -->
|
||||
</el-table-column>
|
||||
<el-table-column label="造价金额" prop="zj_amount" width="200px">
|
||||
|
||||
@ -169,13 +167,13 @@
|
||||
<el-table-column label="应提成金额" prop="tc_amount" width="200px">
|
||||
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.tc_amount" :disabled="mode != 'add'" type="number" />
|
||||
<el-input v-model="row.tc_amount" disabled type="number" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本次支付金额" prop="pay_amount" width="200px">
|
||||
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.pay_amount" :disabled="mode != 'add'" type="number" />
|
||||
<el-input v-model="row.pay_amount" @change="getBczfze" :disabled="mode != 'add'"
|
||||
type="number" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark" width="200px">
|
||||
@ -196,6 +194,7 @@ import Popup from '@/components/popup/index.vue'
|
||||
import { apiProjectCommissionAdd, apiProjectCommissionEdit, } from '@/api/project_commission'
|
||||
import type { PropType } from 'vue'
|
||||
import { cost_project } from "@/components/dialogTable/dialogTableConfig"
|
||||
import { watch } from "vue"
|
||||
|
||||
defineProps({
|
||||
dictData: {
|
||||
@ -262,6 +261,9 @@ const customEvent = (e) => {
|
||||
formData.head = e.principal
|
||||
formData.affcontract = e.contract.id
|
||||
formData.affcontract_name = e.contract.contract_name
|
||||
formData.industry = e.industry
|
||||
// formData.hk=e.
|
||||
// formData.hk=e.
|
||||
showDialog.value = false
|
||||
}
|
||||
|
||||
@ -290,6 +292,30 @@ const handleDelete = (row: any) => {
|
||||
formData.project_commission_detail.splice(index, 1);
|
||||
}
|
||||
|
||||
|
||||
// 金额计算
|
||||
watch(formData.project_commission_detail, (newVal, oldVal) => {
|
||||
formData.project_commission_detail.forEach(item => {
|
||||
item.tc_amount = (Number(item.sk_amount || 0) + Number(item.other_fee || 0)) * (item.tc_rate / 100)
|
||||
item.tc_amount = item.tc_amount.toFixed(2)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
// 计算本次支付金额
|
||||
const getBczfze = () => {
|
||||
formData.bczfze = 0
|
||||
formData.project_commission_detail.forEach(item => {
|
||||
formData.bczfze += Number(item.pay_amount)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
formData.ticheng ||= computed(() => {
|
||||
return Number(formData.hk) * (Number(formData.rate) / 100) || 0
|
||||
})
|
||||
|
||||
|
||||
const tableIndex = ref(0)
|
||||
const tableKey = ref('')
|
||||
//打开弹窗
|
||||
@ -317,6 +343,7 @@ const formRules = reactive<any>({
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
delete data.ticheng
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
@ -332,12 +359,6 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apiProjectCommissionDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
}
|
||||
|
||||
|
||||
// 提交按钮
|
||||
@ -367,6 +388,5 @@ const handleClose = () => {
|
||||
defineExpose({
|
||||
open,
|
||||
setFormData,
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
|
@ -96,6 +96,11 @@ const formData = reactive({
|
||||
|
||||
})
|
||||
|
||||
|
||||
formData.tc_amount = computed(() => {
|
||||
return (Number(formData.sk_amount || 0) + Number(formData.other_fee || 0)) * (formData.tc_rate / 100) || 0
|
||||
})
|
||||
|
||||
//打开弹窗
|
||||
const userclick = async (e: any) => {
|
||||
showDialog3.value = true
|
||||
@ -118,6 +123,7 @@ const formRules = reactive<any>({
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
delete data.tc_amount
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
|
@ -113,15 +113,6 @@ import Popup from '@/components/popup/index.vue'
|
||||
import { apiProjectFollowUpAdd, apiProjectFollowUpEdit, apiProjectFollowUpDetail } from '@/api/project_follow_up'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
|
||||
// 上传文件
|
||||
import annexUpload from "@/components/annexUpload/index.vue"
|
||||
const handleAvatarSuccess_four = (response: any) => {
|
||||
formData.annex ||= []
|
||||
// @ts-ignore
|
||||
response.code != 0 ? formData.annex.push({ uri: response.data.uri, name: response.data.name }) : ElMessage.error(response.msg);
|
||||
};
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => { formData.annex.splice(index, 1) }
|
||||
|
||||
const props = defineProps({
|
||||
project: Object
|
||||
|
@ -121,24 +121,13 @@ import projectDialog from '@/components/project/index.vue'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import { projectsalarypaymentAdd, projectsalarypaymentEdit, projectsalarypaymentDetail } from '@/api/project_salary_payment'
|
||||
import customDialog from '@/components/project_personnel/index.vue'
|
||||
import type { PropType } from 'vue'
|
||||
import feedback from '@/utils/feedback'
|
||||
import { watch } from "vue"
|
||||
import { projectsalaryDetailLists } from "@/api/project_salary_detail.ts"
|
||||
|
||||
// 上传文件
|
||||
import annexUpload from "@/components/annexUpload/index.vue"
|
||||
const handleAvatarSuccess_four = (response: any) => {
|
||||
// @ts-ignore
|
||||
response.code != 0 ? formData.annex.push({ uri: response.data.uri, name: response.data.name }) : ElMessage.error(response.msg);
|
||||
};
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => { formData.annex.splice(index, 1) }
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
|
||||
const { dictData } = useDictData('salary_payment_type')
|
||||
|
||||
const { dictData } = useDictData('salary_payment_type')
|
||||
let props = defineProps({
|
||||
project: Object
|
||||
})
|
||||
|
@ -191,7 +191,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="部门负责人核定价" prop="bmhd" label-width="140px">
|
||||
<el-form-item label="部门负责人核定价" prop="bmhd">
|
||||
<el-input v-model="formData.bmhd" clearable placeholder="请输入部门负责人核定价" type="number" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -231,13 +231,13 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="项目负责人附件" prop="master_annex" label-width="140px">
|
||||
<el-form-item label="项目负责人附件" prop="master_annex">
|
||||
<annexUpload :annex="formData.master_annex" @handleAvatarSuccess="handleAvatarSuccess"
|
||||
@delFile="delFileFn1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="部门负责人附件" prop="bm_annex" label-width="140px">
|
||||
<el-form-item label="部门负责人附件" prop="bm_annex">
|
||||
<annexUpload :annex="formData.bm_annex" @handleAvatarSuccess="handleAvatarSuccess2"
|
||||
@delFile="delFileFn2" />
|
||||
</el-form-item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user