bug修复
This commit is contained in:
parent
d5735af588
commit
1d9eef5236
@ -15,20 +15,17 @@
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
|
||||
<el-table-column label="项目id" prop="project_id" show-overflow-tooltip />
|
||||
<el-table-column label="费用报销单号" prop="expense_reimbursement_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="报销人" prop="apply_user" show-overflow-tooltip />
|
||||
<el-table-column label="报销日期" prop="apply_date" show-overflow-tooltip />
|
||||
<el-table-column label="报销类型" prop="reimbursement_type" show-overflow-tooltip />
|
||||
<el-table-column label="借款单id" prop="loan_apply_id" show-overflow-tooltip />
|
||||
<el-table-column label="初始报销金额" prop="reimbursement_amount" show-overflow-tooltip />
|
||||
<el-table-column label="实际报销金额" prop="actual_reimbursement_amount" show-overflow-tooltip />
|
||||
<el-table-column label="借款单编号" prop="loan_apply_code" show-overflow-tooltip />
|
||||
<el-table-column label="借款金额" prop="loan_amount" show-overflow-tooltip />
|
||||
<el-table-column label="报销金额" prop="total_amount" show-overflow-tooltip />
|
||||
<el-table-column label="付款金额" prop="pay_amount" show-overflow-tooltip />
|
||||
<el-table-column label="本次冲抵借款金额" prop="offset_loan_amount" show-overflow-tooltip />
|
||||
<el-table-column label="收款人姓名" prop="payee_name" show-overflow-tooltip />
|
||||
<el-table-column label="收款银行" prop="payee_bank" show-overflow-tooltip />
|
||||
<el-table-column label="收款账号" prop="payee_account" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip />
|
||||
<el-table-column label="付款银行账户id" prop="bank_account_id" show-overflow-tooltip />
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
|
64
src/components/project_labor_budget/index.vue
Normal file
64
src/components/project_labor_budget/index.vue
Normal file
@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="!border-none" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="查询" prop="name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.name" clearable placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<!-- <el-table-column label="项目id" prop="project_id" show-overflow-tooltip /> -->
|
||||
<el-table-column label="人工预算单号" prop="labor_budget_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目编码" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
<pagination v-model="pager" @change="getLists" />
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { usePaging } from "@/hooks/usePaging"
|
||||
import { useDictData } from "@/hooks/useDictOptions"
|
||||
import { apiProjectLaborBudgetLists, } from '@/api/project_labor_budget'
|
||||
import { defineEmits } from "vue"
|
||||
const props = defineProps({
|
||||
project_id: {
|
||||
type: String
|
||||
}
|
||||
})
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
project_id: props.project_id,
|
||||
});
|
||||
|
||||
|
||||
// 选中数据
|
||||
const emits = defineEmits(["customEvent"]);
|
||||
|
||||
// 选中数据子父传递
|
||||
const handleCurrentChange = (value: any) => {
|
||||
emits("customEvent", value);
|
||||
};
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apiProjectLaborBudgetLists,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
getLists();
|
||||
</script>
|
@ -39,13 +39,17 @@
|
||||
import { usePaging } from "@/hooks/usePaging"
|
||||
import { useDictData } from "@/hooks/useDictOptions"
|
||||
import { apiProjectLoanApplyLists } from '@/api/project_loan_apply'
|
||||
import { defineEmits } from "vue"
|
||||
import { defineEmits, defineProps } from "vue"
|
||||
import { timeFormat } from '@/utils/util'
|
||||
const props = defineProps({
|
||||
project_id: Number
|
||||
})
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
// custom_name: '',
|
||||
// project_type: ""
|
||||
project_id: props.project_id
|
||||
});
|
||||
const { dictData } = useDictData('contract_type,contract_pricing_method')
|
||||
|
||||
|
@ -68,7 +68,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { usePaging } from "@/hooks/usePaging"
|
||||
import { useDictData } from "@/hooks/useDictOptions"
|
||||
import { personneToProject } from '@/api/project_personnel'
|
||||
import { projectpersonnelLists } from '@/api/project_personnel'
|
||||
import { defineEmits } from "vue"
|
||||
const props = defineProps({
|
||||
project_id: {
|
||||
@ -91,7 +91,7 @@ const handleCurrentChange = (value: any) => {
|
||||
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: personneToProject,
|
||||
fetchFun: projectpersonnelLists,
|
||||
params: queryParams,
|
||||
});
|
||||
|
||||
|
@ -15,21 +15,17 @@
|
||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
|
||||
<el-table-column label="出差申请单id" prop="trip_apply_id" show-overflow-tooltip />
|
||||
<el-table-column label="项目id" prop="project_id" show-overflow-tooltip />
|
||||
<el-table-column label="出差申请单编号" prop="trip_reimbursement_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="报销类型" prop="reimbursement_type" show-overflow-tooltip />
|
||||
<el-table-column label="借款单id" prop="loan_apply_id" show-overflow-tooltip />
|
||||
<el-table-column label="初始报销金额" prop="reimbursement_amount" show-overflow-tooltip />
|
||||
<el-table-column label="实际报销金额" prop="actual_reimbursement_amount" show-overflow-tooltip />
|
||||
<el-table-column label="借款单编号" prop="loan_apply_code" show-overflow-tooltip />
|
||||
<el-table-column label="借款金额" prop="loan_amount" show-overflow-tooltip />
|
||||
<el-table-column label="报销金额" prop="total_amount" show-overflow-tooltip />
|
||||
<el-table-column label="冲抵借款金额" prop="offset_loan_amount" show-overflow-tooltip />
|
||||
<el-table-column label="付款金额" prop="pay_amount" show-overflow-tooltip />
|
||||
<el-table-column label="报销人" prop="apply_user" show-overflow-tooltip />
|
||||
<el-table-column label="报销日期" prop="apply_date" show-overflow-tooltip />
|
||||
<el-table-column label="收款人姓名" prop="payee_name" show-overflow-tooltip />
|
||||
<el-table-column label="收款银行" prop="payee_bank" show-overflow-tooltip />
|
||||
<el-table-column label="收款账号" prop="payee_account" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip />
|
||||
<el-table-column label="付款银行账户id" prop="bank_account_id" show-overflow-tooltip />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex justify-end mt-4">
|
||||
|
@ -16,11 +16,11 @@
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="项目id" prop="project_id" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="申请单号" prop="trip_apply_code" show-overflow-tooltip />
|
||||
<el-table-column label="出差起始地" prop="origin_address" show-overflow-tooltip />
|
||||
<el-table-column label="出差目的地" prop="target_address" show-overflow-tooltip />
|
||||
<el-table-column label="交通工具" prop="traffic" show-overflow-tooltip />
|
||||
<el-table-column label="交通工具" prop="traffic_text" show-overflow-tooltip />
|
||||
<el-table-column label="出差时间" prop="start_date" show-overflow-tooltip />
|
||||
<el-table-column label="结束时间" prop="end_date" show-overflow-tooltip />
|
||||
<el-table-column label="出差事由" prop="reason" show-overflow-tooltip />
|
||||
|
@ -306,9 +306,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
@ -10,46 +10,54 @@
|
||||
<el-row :gutter="10">
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="分部工程" prop="division_id" @click="showDialog = true" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-form-item label="分部工程" prop="division_id" @click="showDialog = true"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="division_engineering" readonly clearable placeholder="点击选择分部分项工程" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="子分部工程" prop="division_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-form-item label="子分部工程" prop="division_id"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="sub_division_engineering" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="分项工程" prop="division_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-form-item label="分项工程" prop="division_id"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="subentry_engineering" clearable disabled placeholder="系统自动填写" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="分项工程编码" prop="division_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-form-item label="分项工程编码" prop="division_id"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="subentry_engineering_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="工序步骤号" prop="process_step_no" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-form-item label="工序步骤号" prop="process_step_no"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.process_step_no" clearable placeholder="请输入工序步骤号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="工序步骤" prop="process_step" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-form-item label="工序步骤" prop="process_step"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.process_step" clearable placeholder="请输入工序步骤" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="图例说明">
|
||||
<material-picker v-model="formData.annex" :limit="100" />
|
||||
|
||||
<!-- <material-picker v-model="formData.annex" :limit="100" /> -->
|
||||
<annexUpload :annex="formData.annex" @handleAvatarSuccess="handleAvatarSuccess_four"
|
||||
@delFile="delFileFn" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="质量控制点" prop="quality_control_points" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-form-item label="质量控制点" prop="quality_control_points"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.quality_control_points" clearable placeholder="请输入质量控制点" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -74,12 +82,19 @@
|
||||
import customDialog from '@/components/build_division/index.vue'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
|
||||
import { buildprocesssettingsAdd, buildprocesssettingsEdit, buildprocesssettingsDetail } from '@/api/build/build_process_settings'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
||||
import type { PropType } from 'vue'
|
||||
// 上传文件
|
||||
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) }
|
||||
const showDialog = ref(false)
|
||||
const subentry_engineering = ref('')
|
||||
const subentry_engineering_code = ref('')
|
||||
@ -110,6 +125,7 @@ const formData = reactive({
|
||||
process_step: '',
|
||||
quality_control_points: '',
|
||||
division_id: '',
|
||||
annex: []
|
||||
})
|
||||
|
||||
const customEvent = (e) => {
|
||||
|
@ -263,10 +263,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
||||
}
|
||||
|
||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
@ -2,12 +2,6 @@
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-steps :active="active" align-center style="margin-bottom: 20px;">
|
||||
<el-step title="项目经理" description="Some description" />
|
||||
<el-step title="采购确认" description="Some description" />
|
||||
|
||||
</el-steps>
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<div style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||
|
||||
@ -262,7 +256,7 @@ const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
tablist1.splice(0, tablist1.length, {
|
||||
tablist1.push({
|
||||
'id': e.id,
|
||||
'material_name': e.material_name,
|
||||
'material_code': e.material_code,
|
||||
|
@ -4,30 +4,45 @@
|
||||
<popup ref="popupRef" title="项目材料采购申请明细调整" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-descriptions :column="2" border>
|
||||
|
||||
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{ formData.project_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="项目编码" label-align="left" align="left" label-class-name="my-label"> {{ formData.project_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请日期" label-align="left" align="left" label-class-name="my-label"> {{ formData.apply_date }}</el-descriptions-item>
|
||||
<el-descriptions-item label="希望到货日期" label-align="left" align="left" label-class-name="my-label"> {{ formData.arrival_date }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料名称" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料编码" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料大类" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_first_level }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料中类" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_second_level
|
||||
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.project_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="项目编码" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.project_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请日期" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.apply_date }}</el-descriptions-item>
|
||||
<el-descriptions-item label="希望到货日期" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.arrival_date }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料名称" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料编码" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料大类" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_first_level }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料中类" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_second_level
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料小类" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_three_level }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_unit }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="单价" label-align="left" align="left" label-class-name="my-label"> {{ formData.price }}</el-descriptions-item>
|
||||
<el-descriptions-item label="数量" label-align="left" align="left" label-class-name="my-label"> {{ formData.num
|
||||
<el-descriptions-item label="材料小类" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_three_level }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_unit }}</el-descriptions-item>
|
||||
<!--
|
||||
<el-descriptions-item label="单价" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.price }}</el-descriptions-item> -->
|
||||
<el-descriptions-item label="数量" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.num
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="品牌" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_brand
|
||||
<el-descriptions-item label="品牌" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_brand
|
||||
}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="参数说明" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_parameter_description
|
||||
<el-descriptions-item label="参数说明" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_parameter_description
|
||||
}}</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="备注" label-align="left" align="left" label-class-name="my-label"> {{ formData.remark
|
||||
}}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="备注" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.remark
|
||||
}}</el-descriptions-item> -->
|
||||
|
||||
|
||||
|
||||
|
@ -18,7 +18,8 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="申请日期" prop="apply_date">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="apply_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择申请日期">
|
||||
<el-date-picker class="flex-1 !flex" v-model="apply_date" clearable type="date"
|
||||
value-format="YYYY-MM-DD" placeholder="选择申请日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
@ -26,7 +27,8 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="希望到货日期" prop="arrival_date">
|
||||
|
||||
<el-date-picker class="flex-1 !flex" v-model="arrival_date" clearable type="date" value-format="YYYY-MM-DD " placeholder="选择希望到货日期">
|
||||
<el-date-picker class="flex-1 !flex" v-model="arrival_date" clearable type="date"
|
||||
value-format="YYYY-MM-DD " placeholder="选择希望到货日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
@ -91,11 +93,11 @@
|
||||
<el-input v-model="formData.num" clearable placeholder="请输入数量" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
@ -5,6 +5,15 @@
|
||||
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<div style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||
|
||||
<el-select class="w-[180px]" v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true">
|
||||
@ -109,6 +118,8 @@ import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
||||
import type { PropType } from 'vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
const protype = reactive([])
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
@ -118,7 +129,8 @@ const head_user_name = ref('')
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const code = ref('')
|
||||
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
const personnel = ref<any>()
|
||||
const next = () => {
|
||||
if (active.value++ > 3) active.value = 0
|
||||
@ -200,7 +212,34 @@ const formData = reactive({
|
||||
annex: [],
|
||||
})
|
||||
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
getAll().then((res) => {
|
||||
Object.assign(list1, res)
|
||||
if (res.length > 0 && !formData.org_id) {
|
||||
formData.org_id = res[0].id
|
||||
deptAll({ 'org_id': res[0].id }).then((res) => {
|
||||
if (res.length > 0) {
|
||||
Object.assign(list2, res)
|
||||
formData.dept_id = res[0].id
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取部门
|
||||
const deptrmt = (e: any) => {
|
||||
formData.dept_id = ''
|
||||
getlist1(e)
|
||||
|
||||
}
|
||||
//获取所有部门
|
||||
const getlist1 = (id: any) => {
|
||||
deptAll({ 'org_id': id }).then((res) => {
|
||||
list2.splice(0, list2.length, ...res)
|
||||
})
|
||||
}
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
|
||||
@ -240,7 +279,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
if (formData.invoicing_amount) {
|
||||
toChinesNum(formData.invoicing_amount)
|
||||
}
|
||||
|
||||
getlist1(formData.org_id)
|
||||
project_name.value = data.project_name;
|
||||
project_code.value = data.project_code
|
||||
code.value = data.code
|
||||
@ -261,11 +300,8 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
||||
}
|
||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
||||
|
||||
console.log(formRef.value?.validate(), '22222222')
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
@ -286,6 +322,7 @@ const open = (type = 'add') => {
|
||||
|
||||
protype.splice(0, protype.length, ...res);
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
@ -293,6 +330,7 @@ const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
getlist()
|
||||
|
||||
|
||||
defineExpose({
|
||||
|
@ -23,7 +23,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="姓名" prop="person_id" @click="showDialog1 = true">
|
||||
<el-input v-model="formData.people" clearable readonly placeholder="请选择人员"
|
||||
<el-input v-model="formData.person_name" clearable readonly placeholder="请选择人员"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -202,7 +202,8 @@ const formData = reactive({
|
||||
daily_other: '',
|
||||
daily_income: '',
|
||||
remark: '',
|
||||
people: ""
|
||||
people: "",
|
||||
person_name: ""
|
||||
|
||||
})
|
||||
|
||||
|
@ -8,7 +8,8 @@
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['project.project_attendance_record/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
<el-button v-perms="['project.project_attendance_record/delete']" :disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
@ -19,7 +20,7 @@
|
||||
<el-table-column label="日记工单号" prop="person_idcard" show-overflow-tooltip />
|
||||
<el-table-column label="项目编码" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="日期" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="日期" prop="attendance_date" show-overflow-tooltip />
|
||||
<el-table-column label="姓名" prop="person_name" show-overflow-tooltip />
|
||||
<el-table-column label="身份证号" prop="person_idcard" show-overflow-tooltip />
|
||||
<el-table-column label="工种" prop="work_type_text" show-overflow-tooltip />
|
||||
@ -35,13 +36,16 @@
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['project.project_attendance_record/edit']" type="primary" link @click="handleEdit(row)">
|
||||
<el-button v-perms="['project.project_attendance_record/edit']" type="primary" link
|
||||
@click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['project.project_attendance_record/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
<el-button v-perms="['project.project_attendance_record/delete']" type="danger" link
|
||||
@click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-perms="['project.project_attendance_record/detail']" link @click="handledetail(row)">
|
||||
<el-button v-perms="['project.project_attendance_record/detail']" link
|
||||
@click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
|
||||
|
@ -69,7 +69,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="姓名" prop="name">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.name" readonly placeholder="点击选择" @click="showDialog1 = true" />
|
||||
<el-input v-model="row.name" readonly placeholder="点击选择" @click="chosePersnol(row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="身份证号" prop="code">
|
||||
@ -159,6 +159,7 @@ import projectPersonnel from '@/components/project_personnel/index.vue'
|
||||
import type { PropType } from 'vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
import { watch } from "vue"
|
||||
|
||||
defineProps({
|
||||
dictData: {
|
||||
@ -175,11 +176,12 @@ const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const renshu = ref('')
|
||||
// const renshu = ref('')
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const formDataannex = reactive([])
|
||||
const userInfo = userStore.userInfo
|
||||
|
||||
const handleAdd = (row: any) => {
|
||||
const index = formData.attendance_detail.indexOf(row);
|
||||
formData.attendance_detail.splice(index + 1, 0, {});
|
||||
@ -196,14 +198,23 @@ const customEvent = (e) => {
|
||||
project_code.value = e.project_code
|
||||
showDialog.value = false
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
let rowIndex = 0
|
||||
const chosePersnol = (row) => {
|
||||
showDialog1.value = true
|
||||
rowIndex = formData.attendance_detail.indexOf(row);
|
||||
}
|
||||
|
||||
//获取值
|
||||
const customEvent1 = (e) => {
|
||||
formData.attendance_detail[formData.attendance_detail.length - 1].name = e.name
|
||||
formData.attendance_detail[formData.attendance_detail.length - 1].idcard = e.idcard
|
||||
formData.attendance_detail[formData.attendance_detail.length - 1].work_type_text = e.work_type_text
|
||||
formData.attendance_detail[formData.attendance_detail.length - 1].person_id = e.id
|
||||
formData.attendance_detail[rowIndex].name = e.name
|
||||
formData.attendance_detail[rowIndex].idcard = e.idcard
|
||||
formData.attendance_detail[rowIndex].work_type_text = e.work_type_text
|
||||
formData.attendance_detail[rowIndex].person_id = e.id
|
||||
showDialog1.value = false
|
||||
console.log(e)
|
||||
}
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
@ -244,9 +255,18 @@ const formData = reactive({
|
||||
const formRules = reactive<any>({
|
||||
|
||||
})
|
||||
let renshu = computed(() => {
|
||||
return formData.attendance_detail.length
|
||||
})
|
||||
|
||||
|
||||
|
||||
// // formData.attendance_date
|
||||
// watch(formData.attendance_detail, () => {
|
||||
// formData
|
||||
// console.log(556)
|
||||
// })
|
||||
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
|
@ -29,12 +29,11 @@
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="流程步骤" prop="person_idcard" show-overflow-tooltip />
|
||||
<el-table-column label="日记工单号" prop="attendance_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目编码" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="日期" prop="attendance_date" show-overflow-tooltip />
|
||||
<el-table-column label="出勤人数" prop=" " show-overflow-tooltip />
|
||||
<el-table-column label="出勤人数" prop="cqrs" show-overflow-tooltip />
|
||||
<el-table-column label="记工数量" prop="work_record_num_total" show-overflow-tooltip />
|
||||
<el-table-column label="日工资合计" prop="daily_salary_total" show-overflow-tooltip />
|
||||
<el-table-column label="日生活费合计" prop="daily_living_total" show-overflow-tooltip />
|
||||
|
@ -7,7 +7,10 @@
|
||||
@click="showDialog = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="调整日期" prop="adjust_date">
|
||||
<el-input v-model="formData.adjust_date" clearable placeholder="请输入调整日期" />
|
||||
<!-- <el-input v-model="formData.adjust_date" clearable placeholder="请输入调整日期" /> -->
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.adjust_date" clearable value-format="YYYY-MM-DD "
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="调整金额" prop="adjust_amount">
|
||||
<el-input v-model="formData.adjust_amount" clearable placeholder="请输入调整金额" />
|
||||
@ -83,17 +86,18 @@ const popupTitle = computed(() => {
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
"project_id": 2,
|
||||
"adjust_date": "2024-01-17",
|
||||
"adjust_amount": "1000",
|
||||
"remark": "bbb",
|
||||
"annex": []
|
||||
"project_id": '',
|
||||
"adjust_date": "",
|
||||
"adjust_amount": "",
|
||||
"remark": "",
|
||||
"annex": [],
|
||||
project_name: ""
|
||||
})
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
console.log(e)
|
||||
formData.project_id = e.id
|
||||
formData.project_code = e.project_code
|
||||
formData.project_name = e.name
|
||||
showDialog.value = false
|
||||
}
|
||||
// 表单验证
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
<div style="margin-bottom: 30px;">机器预算清单</div>
|
||||
<div style="margin-bottom: 30px;">费用预算清单</div>
|
||||
<div style="margin-bottom: 30px;">
|
||||
<el-table :data="formData.cost_budget_detail">
|
||||
<el-table-column label="序号">
|
||||
@ -56,8 +56,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="一级科目">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.project_cost_temp_name" @click="openDialog1(scope)"
|
||||
readonly placeholder="点击选择" />
|
||||
<el-input v-model="scope.row.first_level_subject" @click="openDialog1(scope)" readonly
|
||||
placeholder="点击选择" />
|
||||
</template>
|
||||
<!-- <template #default="scope">
|
||||
<div style="display: flex; align-items: center">
|
||||
@ -116,6 +116,7 @@ import projectcostTemLists from '@/components/projectcostTemLists/index.vue'
|
||||
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
import { apiProjectCostBudgetDetailLists } from "@/api/project_cost_budget_detail.ts"
|
||||
|
||||
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
@ -146,21 +147,21 @@ const popupTitle = computed(() => {
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
"org_id": 1,
|
||||
"dept_id": 2,
|
||||
"project_id": 1,
|
||||
"org_id": '',
|
||||
"dept_id": '',
|
||||
"project_id": '',
|
||||
project_code: "",
|
||||
"remark": "bbb",
|
||||
"remark": "",
|
||||
"annex": [],
|
||||
project_name: "",
|
||||
"cost_budget_detail": [
|
||||
{
|
||||
"project_cost_temp_id": 2,
|
||||
project_cost_temp_name: "",
|
||||
"unit": "元",
|
||||
"amount": 100,
|
||||
"standard": "aaaa22",
|
||||
"remark": "bbbb"
|
||||
"project_cost_temp_id": '',
|
||||
first_level_subject: "",
|
||||
"unit": "",
|
||||
"amount": 0,
|
||||
"standard": "",
|
||||
"remark": ""
|
||||
}
|
||||
]
|
||||
})
|
||||
@ -179,7 +180,7 @@ const openDialog1 = (e: any) => {
|
||||
showDialog1.value = true
|
||||
}
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.cost_budget_detail[rowIndex].project_cost_temp_name = e.project_type_name
|
||||
formData.cost_budget_detail[rowIndex].first_level_subject = e.first_level_subject
|
||||
formData.cost_budget_detail[rowIndex].project_cost_temp_id = e.id
|
||||
showDialog1.value = false
|
||||
}
|
||||
@ -228,7 +229,10 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
getlist1(data.org_id)
|
||||
let res = await apiProjectCostBudgetDetailLists({ cost_budget_id: data.id })
|
||||
formData.cost_budget_detail = []
|
||||
Object.assign(formData.cost_budget_detail, res.lists)
|
||||
|
||||
}
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="700px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="项目名称" prop="cost_budget_id">
|
||||
<el-input v-model="formData.cost_budget_name" clearable placeholder="点击选择" @click="showDialog = true"
|
||||
<el-input v-model="formData.project_name" clearable placeholder="点击选择" @click="showDialog = true"
|
||||
readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目费用模板" prop="project_cost_temp_id" label-width="120px">
|
||||
<el-input v-model="formData.project_cost_temp_name" clearable placeholder="点击选择"
|
||||
<el-input v-model="formData.first_level_subject" clearable placeholder="点击选择"
|
||||
@click="showDialog1 = true" readonly />
|
||||
</el-form-item>
|
||||
|
||||
@ -67,7 +67,8 @@ const formData = reactive({
|
||||
"cost_budget_id": '',
|
||||
cost_budget_name: "",
|
||||
"project_cost_temp_id": '',
|
||||
project_cost_temp_name: "",
|
||||
first_level_subject: "",
|
||||
project_name: "",
|
||||
"unit": "",
|
||||
"amount": '',
|
||||
"standard": "",
|
||||
@ -76,12 +77,12 @@ const formData = reactive({
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
formData.cost_budget_id = e.id
|
||||
formData.cost_budget_name = e.project_name
|
||||
formData.project_name = e.project_name
|
||||
showDialog.value = false
|
||||
}
|
||||
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.project_cost_temp_name = e.project_type_name
|
||||
formData.first_level_subject = e.first_level_subject
|
||||
formData.project_cost_temp_id = e.id
|
||||
showDialog1.value = false
|
||||
}
|
||||
|
@ -28,13 +28,15 @@
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="项目id" prop="project_id" show-overflow-tooltip />
|
||||
<el-table-column label="费用预算id" prop="cost_budget_id" show-overflow-tooltip />
|
||||
<el-table-column label="项目费用模板id" prop="project_cost_temp_id" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="费用预算单号" prop="cost_budget_code" show-overflow-tooltip />
|
||||
<el-table-column label="一级科目" prop="first_level_subject" show-overflow-tooltip />
|
||||
<el-table-column label="二级科目" prop="second_level_subject" show-overflow-tooltip />
|
||||
<el-table-column label="三级科目" prop="third_level_subject" show-overflow-tooltip />
|
||||
<el-table-column label="是否差旅科目" prop="is_travel_text" show-overflow-tooltip />
|
||||
<el-table-column label="单位" prop="unit" show-overflow-tooltip />
|
||||
<el-table-column label="预算金额" prop="amount" show-overflow-tooltip />
|
||||
<el-table-column label="编制标准" prop="standard" show-overflow-tooltip />
|
||||
<el-table-column label="" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['project.project_cost_budget_detail/edit']" type="primary" link
|
||||
@ -60,7 +62,7 @@
|
||||
<script lang="ts" setup name="projectCostBudgetDetailLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiProjectCostBudgetDetailLists, apiProjectCostBudgetDetailDelete } from '@/api/project_cost_budget_detail'
|
||||
import { apiProjectCostBudgetDetailLists, apiProjectCostBudgetDetailDelete, apiProjectCostBudgetDetailDetail } from '@/api/project_cost_budget_detail'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
@ -102,10 +104,11 @@ const handleAdd = async () => {
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiProjectCostBudgetDetailDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
|
@ -115,6 +115,7 @@ import useUserStore from "@/stores/modules/user";
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
import projectDialog from '@/components/project/index.vue'
|
||||
import { apiProjectEquipmentBudgetDetailLists } from "@/api/project_equipment_budget_detail.ts"
|
||||
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
@ -211,7 +212,9 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
let res = await apiProjectEquipmentBudgetDetailLists({ equipment_budget_id: data.id })
|
||||
formData.equipment_budget_detail = []
|
||||
Object.assign(formData.equipment_budget_detail, res.lists)
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -6,24 +6,35 @@
|
||||
<el-input v-model="formData.project_name" clearable placeholder="点击选择" readonle
|
||||
@click="showDialog = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报销类型" prop="reimbursement_type">
|
||||
|
||||
<!-- <el-form-item label="报销类型" prop="reimbursement_type">
|
||||
<el-radio-group v-model="formData.reimbursement_type" class="ml-4">
|
||||
<el-radio :label="item.value" size="large" v-for="item in dictData.reimbursement_type ">{{ item.name
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="报销类型" prop="reimbursement_type">
|
||||
<el-checkbox-group v-model="formData.reimbursement_type" placeholder="报销类型">
|
||||
<el-checkbox v-for="(item, index) in dictData.reimbursement_type" :key="index" :label="item.value">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="借款单号" prop="loan_apply_id">
|
||||
|
||||
<el-form-item label="借款单号" prop="loan_apply_id" v-if="formData.reimbursement_type.includes('1')">
|
||||
<el-input v-model="formData.loan_apply_code" clearable placeholder="点击选择" readonly
|
||||
@click="showDialog1 = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="冲抵借款金额" prop="offset_loan_amount">
|
||||
<el-form-item label="冲抵借款金额" prop="offset_loan_amount" v-if="formData.reimbursement_type.includes('1')">
|
||||
<el-input v-model="formData.offset_loan_amount" clearable placeholder="请输入冲抵借款金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报销人" prop="apply_user">
|
||||
<el-input v-model="formData.apply_user" clearable placeholder="请输入报销人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报销日期" prop="apply_date">
|
||||
<el-input v-model="formData.apply_date" clearable placeholder="请输入报销日期" />
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.apply_date" clearable value-format="YYYY-MM-DD "
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="收款人姓名" prop="payee_name">
|
||||
<el-input v-model="formData.payee_name" clearable placeholder="请输入收款人姓名" />
|
||||
@ -54,9 +65,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="付款银行账户" prop="bank_account_id">
|
||||
<!-- <el-form-item label="付款银行账户" prop="bank_account_id">
|
||||
<el-input v-model="formData.account_name" clearable placeholder="点击选择银行" readonly
|
||||
@click="showDialog2 = true" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="账户编码" prop="bank_account_id">
|
||||
<el-input v-model="formData.bank_account.account_sn" clearable placeholder="点击选择银行" readonly
|
||||
@click="showDialog2 = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开户银行" prop="bank_account_id">
|
||||
<el-input v-model="formData.bank_account.deposit_bank" clearable readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="开户名称" prop="bank_account_id">
|
||||
<el-input v-model="formData.bank_account.account_name" clearable readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="开户账号" prop="bank_account_id">
|
||||
<el-input v-model="formData.bank_account.account" clearable readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-col :span="24">
|
||||
@ -71,8 +95,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="一级科目">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.project_cost_temp_name" @click="openDialog1(scope)"
|
||||
readonly placeholder="点击选择" />
|
||||
<el-input v-model="scope.row.first_level_subject" @click="openDialog1(scope)" readonly
|
||||
placeholder="点击选择" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -169,9 +193,12 @@
|
||||
<project @customEvent="customEvent">
|
||||
</project>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="showDialog1" title="选择项目" width="70%">
|
||||
<projectLoanApply @customEvent="customEvent1"></projectLoanApply>
|
||||
</el-dialog>
|
||||
<div v-if="showDialog1">
|
||||
<el-dialog v-model="showDialog1" title="选择项目" width="70%">
|
||||
<projectLoanApply @customEvent="customEvent1" :project_id="formData.project_id"></projectLoanApply>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<el-dialog v-model="showDialog2" title="选择账户" width="70%">
|
||||
<bankaccount @customEvent="customEvent2"></bankaccount>
|
||||
</el-dialog>
|
||||
@ -192,6 +219,9 @@ import project from "@/components/project/index.vue"
|
||||
import projectLoanApply from "@/components/project_loan_apply/index.vue"
|
||||
import bankaccount from "@/components/bankaccount/index.vue"
|
||||
import projectcostTemLists from '@/components/projectcostTemLists/index.vue'
|
||||
import { apiProjectExpenseReimbursementDetailLists } from "@/api/project_expense_reimbursement_detail.ts"
|
||||
import { apiProjectExpenseReimbursementInvoiceDetailLists } from "@/api/project_expense_reimbursement_invoice_detail.ts"
|
||||
|
||||
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
@ -226,8 +256,13 @@ const customEvent1 = (e) => {
|
||||
const customEvent2 = (e) => {
|
||||
formData.account_name = e.account_name
|
||||
formData.bank_account_id = e.id
|
||||
formData.bank_account = {
|
||||
"account_sn": e.account_sn,
|
||||
"deposit_bank": e.deposit_bank,
|
||||
"account_name": e.account_name,
|
||||
"account": e.account
|
||||
}
|
||||
showDialog2.value = false
|
||||
console.log(e)
|
||||
}
|
||||
// 获取点击行的index
|
||||
let rowIndex = 0
|
||||
@ -236,7 +271,7 @@ const openDialog1 = (e: any) => {
|
||||
showDialog3.value = true
|
||||
}
|
||||
const customEvent3 = (e: any) => {
|
||||
formData.reimbursement_detail[rowIndex].project_cost_temp_name = e.project_type_name
|
||||
formData.reimbursement_detail[rowIndex].first_level_subject = e.first_level_subject
|
||||
formData.reimbursement_detail[rowIndex].project_cost_temp_id = e.id
|
||||
showDialog3.value = false
|
||||
}
|
||||
@ -252,39 +287,45 @@ const formData = reactive({
|
||||
id: '',
|
||||
project_id: "",
|
||||
project_name: "",
|
||||
"reimbursement_type": "1,2", //必填,报销类型
|
||||
"reimbursement_type": [], //必填,报销类型
|
||||
"loan_apply_id": "", //借款单id,当报销类型包含借款冲抵选项时必填
|
||||
"loan_apply_code": "", //借款单id,当报销类型包含借款冲抵选项时必填
|
||||
"offset_loan_amount": "50", //冲抵借款金额,当报销类型包含借款冲抵选项时必填
|
||||
"apply_user": "test", //必填,报销人
|
||||
"apply_date": "2024-01-18", //必填,报销日期
|
||||
"payee_name": "aaa", //必填,收款人姓名
|
||||
"payee_bank": "bbb", //必填,收款银行
|
||||
"payee_account": "ccc", //必填,收款账号
|
||||
"offset_loan_amount": "", //冲抵借款金额,当报销类型包含借款冲抵选项时必填
|
||||
"apply_user": "", //必填,报销人
|
||||
"apply_date": "", //必填,报销日期
|
||||
"payee_name": "", //必填,收款人姓名
|
||||
"payee_bank": "", //必填,收款银行
|
||||
"payee_account": "", //必填,收款账号
|
||||
"remark": "", //可选,备注
|
||||
"annex": [], //可选,附件
|
||||
"bank_account_id": "1", //必填,付款银行账户id
|
||||
"bank_account_id": "", //必填,付款银行账户id
|
||||
account_name: "",
|
||||
"reimbursement_detail": [ //必填,报销明细
|
||||
{
|
||||
"project_cost_temp_id": "1", //必填 项目费用模板id
|
||||
project_cost_temp_name: "",
|
||||
"amount": "50", //必填 金额
|
||||
"remark": "aaa",//选填 备注,
|
||||
"project_cost_temp_id": "", //必填 项目费用模板id
|
||||
first_level_subject: "",
|
||||
"amount": "", //必填 金额
|
||||
"remark": "",//选填 备注,
|
||||
|
||||
}
|
||||
],
|
||||
"invoice_detail": [ //必填,发票明细
|
||||
{
|
||||
"invoice_type": "1", //必填,发票类型
|
||||
"invoice_sn": "FPSN-0001", //必填,发票号
|
||||
"tax_rate": "1", //必填,发票税率
|
||||
"invoice_form": "1", //必填,发票形式
|
||||
"invoice_amount": "150", //必填,发票金额
|
||||
"invoice_type": "", //必填,发票类型
|
||||
"invoice_sn": "", //必填,发票号
|
||||
"tax_rate": "", //必填,发票税率
|
||||
"invoice_form": "", //必填,发票形式
|
||||
"invoice_amount": "", //必填,发票金额
|
||||
"annex": [], //可选,发票附件
|
||||
"remark": "test" //可选,备注
|
||||
"remark": "" //可选,备注
|
||||
}
|
||||
]
|
||||
],
|
||||
"bank_account": {
|
||||
"account_sn": "",
|
||||
"deposit_bank": "",
|
||||
"account_name": "",
|
||||
"account": ""
|
||||
}
|
||||
})
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (response: any) => {
|
||||
@ -411,7 +452,11 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
formData.reimbursement_type = formData.reimbursement_type.split(',')
|
||||
let res = await apiProjectExpenseReimbursementDetailLists({ expense_reimbursement_id: data.id })
|
||||
formData.reimbursement_detail = res.lists
|
||||
let res2 = await apiProjectExpenseReimbursementInvoiceDetailLists({ expense_reimbursement_id: data.id })
|
||||
formData.invoice_detail = res2.lists
|
||||
|
||||
}
|
||||
|
||||
@ -426,6 +471,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
formData.reimbursement_type = formData.reimbursement_type.join(',')
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiProjectExpenseReimbursementEdit(data)
|
||||
|
@ -2,18 +2,14 @@
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="报销人" prop="apply_user">
|
||||
<el-input class="w-[280px]" v-model="queryParams.apply_user" clearable placeholder="请输入报销人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报销类型" prop="reimbursement_type">
|
||||
<el-input class="w-[280px]" v-model="queryParams.reimbursement_type" clearable placeholder="请输入报销类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收款人姓名" prop="payee_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.payee_name" clearable placeholder="请输入收款人姓名" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
@ -34,20 +30,17 @@
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="项目id" prop="project_id" show-overflow-tooltip />
|
||||
<el-table-column label="费用报销单号" prop="expense_reimbursement_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="报销人" prop="apply_user" show-overflow-tooltip />
|
||||
<el-table-column label="报销日期" prop="apply_date" show-overflow-tooltip />
|
||||
<el-table-column label="报销类型" prop="reimbursement_type" show-overflow-tooltip />
|
||||
<el-table-column label="借款单id" prop="loan_apply_id" show-overflow-tooltip />
|
||||
<el-table-column label="初始报销金额" prop="reimbursement_amount" show-overflow-tooltip />
|
||||
<el-table-column label="实际报销金额" prop="actual_reimbursement_amount" show-overflow-tooltip />
|
||||
<el-table-column label="借款单编号" prop="loan_apply_code" show-overflow-tooltip />
|
||||
<el-table-column label="借款金额" prop="loan_amount" show-overflow-tooltip />
|
||||
<el-table-column label="报销金额" prop="total_amount" show-overflow-tooltip />
|
||||
<el-table-column label="付款金额" prop="pay_amount" show-overflow-tooltip />
|
||||
<el-table-column label="本次冲抵借款金额" prop="offset_loan_amount" show-overflow-tooltip />
|
||||
<el-table-column label="收款人姓名" prop="payee_name" show-overflow-tooltip />
|
||||
<el-table-column label="收款银行" prop="payee_bank" show-overflow-tooltip />
|
||||
<el-table-column label="收款账号" prop="payee_account" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip />
|
||||
<el-table-column label="付款银行账户id" prop="bank_account_id" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['project.project_expense_reimbursement/edit']" type="primary" link
|
||||
@ -73,7 +66,7 @@
|
||||
<script lang="ts" setup name="projectExpenseReimbursementLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiProjectExpenseReimbursementLists, apiProjectExpenseReimbursementDelete } from '@/api/project_expense_reimbursement'
|
||||
import { apiProjectExpenseReimbursementLists, apiProjectExpenseReimbursementDelete, apiProjectExpenseReimbursementDetail } from '@/api/project_expense_reimbursement'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
@ -117,10 +110,11 @@ const handleAdd = async () => {
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiProjectExpenseReimbursementDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
|
@ -2,12 +2,12 @@
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="40vw" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
||||
<el-form-item label="费用报销单" prop="expense_reimbursement_id">
|
||||
<el-input v-model="formData.project_name" clearable placeholder="请输入费用报销单id"
|
||||
<el-form-item label="报销单号" prop="expense_reimbursement_id">
|
||||
<el-input v-model="formData.expense_reimbursement_code" clearable placeholder="请输入费用报销单id"
|
||||
@click="showDialog = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目费用模板id" prop="project_cost_temp_id">
|
||||
<el-input v-model="formData.project_cost_temp_name" clearable placeholder="请选额项目费用模板" readonly
|
||||
<el-form-item label="项目费用模板" prop="project_cost_temp_id">
|
||||
<el-input v-model="formData.first_level_subject" clearable placeholder="请选额项目费用模板" readonly
|
||||
@click="showDialog3 = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="金额" prop="amount">
|
||||
@ -60,9 +60,9 @@ const popupTitle = computed(() => {
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
expense_reimbursement_id: '',
|
||||
project_name: "",
|
||||
expense_reimbursement_code: "",
|
||||
project_cost_temp_id: '',
|
||||
project_cost_temp_name: "",
|
||||
first_level_subject: "",
|
||||
amount: '',
|
||||
remark: '',
|
||||
})
|
||||
@ -89,12 +89,12 @@ const formRules = reactive<any>({
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
formData.expense_reimbursement_id = e.id
|
||||
formData.project_name = e.project_name
|
||||
formData.expense_reimbursement_code = e.expense_reimbursement_code
|
||||
showDialog.value = false
|
||||
}
|
||||
|
||||
const customEvent3 = (e: any) => {
|
||||
formData.project_cost_temp_name = e.project_type_name
|
||||
formData.first_level_subject = e.first_level_subject
|
||||
formData.project_cost_temp_id = e.id
|
||||
showDialog3.value = false
|
||||
}
|
||||
|
@ -26,8 +26,11 @@
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="费用报销单id" prop="expense_reimbursement_id" show-overflow-tooltip />
|
||||
<el-table-column label="项目费用模板id" prop="project_cost_temp_id" show-overflow-tooltip />
|
||||
<el-table-column label="费用报销单号" prop="expense_reimbursement_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="一级科目" prop="first_level_subject" show-overflow-tooltip />
|
||||
<el-table-column label="二级科目" prop="second_level_subject" show-overflow-tooltip />
|
||||
<el-table-column label="三级科目" prop="third_level_subject" show-overflow-tooltip />
|
||||
<el-table-column label="金额" prop="amount" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
@ -55,7 +58,7 @@
|
||||
<script lang="ts" setup name="projectExpenseReimbursementDetailLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiProjectExpenseReimbursementDetailLists, apiProjectExpenseReimbursementDetailDelete } from '@/api/project_expense_reimbursement_detail'
|
||||
import { apiProjectExpenseReimbursementDetailLists, apiProjectExpenseReimbursementDetailDelete, apiProjectExpenseReimbursementDetailDetail } from '@/api/project_expense_reimbursement_detail'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
@ -96,10 +99,11 @@ const handleAdd = async () => {
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiProjectExpenseReimbursementDetailDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
|
@ -32,7 +32,7 @@
|
||||
<el-input v-model="formData.invoice_amount" clearable placeholder="请输入发票金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发票税额" prop="tax_amount">
|
||||
<el-input v-model="formData.tax_amount" clearable placeholder="请输入发票税额" />
|
||||
<el-input v-model="tax_amount" disabled clearable placeholder="请输入发票税额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload
|
||||
@ -55,7 +55,7 @@
|
||||
<el-input v-model="formData.remark" clearable placeholder="请输入发票备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-dialog v-model="showDialog" title="选择报销单" width="70%">
|
||||
<el-dialog v-model="showDialog" title="选择报销qwq单" width="70%">
|
||||
<projectExpenseReimbursement @customEvent="customEvent"></projectExpenseReimbursement>
|
||||
</el-dialog>
|
||||
</popup>
|
||||
@ -73,8 +73,7 @@ import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
|
||||
defineProps({
|
||||
var props = defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
@ -101,11 +100,16 @@ const formData = reactive({
|
||||
tax_rate: '',
|
||||
invoice_form: '',
|
||||
invoice_amount: '',
|
||||
tax_amount: '',
|
||||
annex: [],
|
||||
remark: '',
|
||||
|
||||
})
|
||||
|
||||
let tax_amount = computed(() => {
|
||||
let index = props.dictData.tax_rate.findIndex((item) => item.value == formData.tax_rate)
|
||||
console.log(index)
|
||||
return (formData.invoice_amount * (props.dictData.tax_rate[index]?.name / 100)).toFixed(2) || 0
|
||||
})
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (response: any) => {
|
||||
// @ts-ignore
|
||||
|
@ -36,14 +36,20 @@
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="费用报销单id" prop="expense_reimbursement_id" show-overflow-tooltip />
|
||||
<el-table-column label="发票类型" prop="invoice_type" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="费用报销单号" prop="expense_reimbursement_code" show-overflow-tooltip />
|
||||
<el-table-column label="发票类型" prop="invoice_form_text" show-overflow-tooltip />
|
||||
<el-table-column label="发票号" prop="invoice_sn" show-overflow-tooltip />
|
||||
<el-table-column label="发票税率" prop="tax_rate" show-overflow-tooltip />
|
||||
<el-table-column label="发票形式" prop="invoice_form" show-overflow-tooltip />
|
||||
<el-table-column label="发票税率" prop="tax_rate" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
{{ row.tax_rate_text }}%
|
||||
</template>
|
||||
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="发票形式" prop="invoice_type_text" show-overflow-tooltip />
|
||||
<el-table-column label="发票金额" prop="invoice_amount" show-overflow-tooltip />
|
||||
<el-table-column label="发票税额" prop="tax_amount" show-overflow-tooltip />
|
||||
<el-table-column label="发票附件" prop="annex" show-overflow-tooltip />
|
||||
<el-table-column label="发票备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
|
@ -107,11 +107,12 @@ import { apiProjectLaborBudgetAdd, apiProjectLaborBudgetEdit, apiProjectLaborBud
|
||||
import type { PropType } from 'vue'
|
||||
import projectDialog from '@/components/project/index.vue'
|
||||
import { projectjobtypeLists } from "@/api/project_job_type.ts";
|
||||
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
import { apiProjectLaborBudgetDetailLists } from "@/api/project_labor_budget_detail.ts"
|
||||
|
||||
|
||||
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
@ -147,6 +148,7 @@ const popupTitle = computed(() => {
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: "",
|
||||
"org_id": '',
|
||||
"dept_id": '',
|
||||
"project_id": '',
|
||||
@ -222,8 +224,11 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
console.log(data)
|
||||
console.log(formData, "formdata")
|
||||
let res = await apiProjectLaborBudgetDetailLists({ labor_budget_id: data.id })
|
||||
formData.labor_budget_detail.splice(0, 9999)
|
||||
Object.assign(formData.labor_budget_detail, res.lists)
|
||||
getlist1(data.org_id)
|
||||
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -28,7 +28,7 @@
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="项目id" prop="project_id" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="项目id" prop="project_id" show-overflow-tooltip /> -->
|
||||
<el-table-column label="人工预算单号" prop="labor_budget_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目编码" prop="project_code" show-overflow-tooltip />
|
||||
|
@ -44,7 +44,7 @@ import Popup from '@/components/popup/index.vue'
|
||||
import { apiProjectLaborBudgetDetailAdd, apiProjectLaborBudgetDetailEdit, apiProjectLaborBudgetDetailDetail } from '@/api/project_labor_budget_detail'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import type { PropType } from 'vue'
|
||||
import projectDialog from "@/components/project_labor_contract/index.vue"
|
||||
import projectDialog from "@/components/project_labor_budget/index.vue"
|
||||
import { projectjobtypeLists } from "@/api/project_job_type.ts ";
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="工种id" prop="job_type_id" show-overflow-tooltip />
|
||||
<el-table-column label="工种名称" prop="job_type_name" show-overflow-tooltip />
|
||||
<el-table-column label="人工说明" prop="desc" show-overflow-tooltip />
|
||||
<el-table-column label="单位" prop="unit" show-overflow-tooltip />
|
||||
<el-table-column label="数量" prop="num" show-overflow-tooltip />
|
||||
|
@ -13,7 +13,12 @@
|
||||
<el-input v-model="formData.apply_user" clearable placeholder="请输入借款人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="借款申请日期" prop="loan_date">
|
||||
<el-input v-model="formData.loan_date" clearable placeholder="请输入借款申请日期" />
|
||||
<!-- <el-input v-model="formData.loan_date" clearable placeholder="请输入借款申请日期" /> -->
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.loan_date" clearable value-format="YYYY-MM-DD "
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="借款金额" prop="loan_amount">
|
||||
<el-input v-model="formData.loan_amount" clearable placeholder="请输入借款金额" />
|
||||
@ -50,9 +55,18 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item label="付款银行账户" prop="bank_account_id">
|
||||
<el-input v-model="formData.bank_account_name" clearable placeholder="点击选择" @click="showDialog1 = true"
|
||||
readonly />
|
||||
<el-form-item label="账户编码" prop="bank_account_id">
|
||||
<el-input v-model="formData.bank_account.account_sn" clearable placeholder="点击选择"
|
||||
@click="showDialog1 = true" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="开户银行">
|
||||
<el-input v-model="formData.bank_account.deposit_bank" clearable readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="开户名称">
|
||||
<el-input v-model="formData.bank_account.account_name" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="开户账号">
|
||||
<el-input v-model="formData.bank_account.account" readonly />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@ -102,18 +116,24 @@ const popupTitle = computed(() => {
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
"project_id": 2,
|
||||
"project_id": '',
|
||||
project_name: "",
|
||||
"apply_user": "张三",
|
||||
"loan_date": "2024-01-17",
|
||||
"loan_amount": 1000,
|
||||
"payee_name": "张三",
|
||||
"payee_bank": "收款银行",
|
||||
"payee_account": "123456789",
|
||||
"remark": "bbb",
|
||||
"apply_user": "",
|
||||
"loan_date": "",
|
||||
"loan_amount": 0,
|
||||
"payee_name": "",
|
||||
"payee_bank": "",
|
||||
"payee_account": "",
|
||||
"remark": "",
|
||||
"annex": [],
|
||||
"bank_account_id": 1,
|
||||
"bank_account_name": ''
|
||||
"bank_account_id": '',
|
||||
bank_account: {
|
||||
"account_sn": "",
|
||||
"deposit_bank": "",
|
||||
"account_name": "",
|
||||
"account": ""
|
||||
}
|
||||
|
||||
})
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (response: any) => {
|
||||
@ -128,7 +148,12 @@ const customEvent = (e: any) => {
|
||||
}
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.bank_account_id = e.id
|
||||
formData.bank_account_name = e.account_name
|
||||
formData.bank_account = {
|
||||
"account_sn": e.account_sn,
|
||||
"deposit_bank": e.deposit_bank,
|
||||
"account_name": e.account_name,
|
||||
"account": e.account
|
||||
}
|
||||
showDialog1.value = false
|
||||
}
|
||||
// 表单验证
|
||||
|
@ -5,38 +5,12 @@
|
||||
<el-form-item label="借款单号" prop="loan_apply_code">
|
||||
<el-input class="w-[280px]" v-model="queryParams.loan_apply_code" clearable placeholder="请输入借款单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="借款人" prop="apply_user">
|
||||
<el-input class="w-[280px]" v-model="queryParams.apply_user" clearable placeholder="请输入借款人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="借款申请日期" prop="loan_date">
|
||||
<el-input class="w-[280px]" v-model="queryParams.loan_date" clearable placeholder="请输入借款申请日期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="借款金额" prop="loan_amount">
|
||||
<el-input class="w-[280px]" v-model="queryParams.loan_amount" clearable placeholder="请输入借款金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收款人姓名" prop="payee_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.payee_name" clearable placeholder="请输入收款人姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收款银行" prop="payee_bank">
|
||||
<el-input class="w-[280px]" v-model="queryParams.payee_bank" clearable placeholder="请输入收款银行" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收款账号" prop="payee_account">
|
||||
<el-input class="w-[280px]" v-model="queryParams.payee_account" clearable placeholder="请输入收款账号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input class="w-[280px]" v-model="queryParams.remark" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="annex">
|
||||
<!-- <template #default="{ row }">
|
||||
<el-link style="margin-right: 4px;" type="primary" :href="item.uri"
|
||||
v-for="(item, index) in row.annex">文件{{
|
||||
index + 1 }}</el-link>
|
||||
</template> -->
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
@ -58,7 +32,7 @@
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="借款单号" prop="loan_apply_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目id" prop="project_id" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="借款人" prop="apply_user" show-overflow-tooltip />
|
||||
<el-table-column label="借款申请日期" prop="loan_date" show-overflow-tooltip />
|
||||
<el-table-column label="借款金额" prop="loan_amount" show-overflow-tooltip />
|
||||
@ -66,8 +40,6 @@
|
||||
<el-table-column label="收款银行" prop="payee_bank" show-overflow-tooltip />
|
||||
<el-table-column label="收款账号" prop="payee_account" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip />
|
||||
<el-table-column label="付款银行账户id" prop="bank_account_id" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['project_loan_apply/edit']" type="primary" link @click="handleEdit(row)">
|
||||
@ -92,7 +64,7 @@
|
||||
<script lang="ts" setup name="projectLoanApplyLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiProjectLoanApplyLists, apiProjectLoanApplyDelete } from '@/api/project_loan_apply'
|
||||
import { apiProjectLoanApplyLists, apiProjectLoanApplyDelete, apiProjectLoanApplyDetail } from '@/api/project_loan_apply'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
@ -143,10 +115,11 @@ const handleAdd = async () => {
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiProjectLoanApplyDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
|
@ -22,12 +22,37 @@
|
||||
<el-input v-model="project_code" disabled clearable placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload
|
||||
accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv"
|
||||
class="upload-demo" :show-file-list="false" aria-hidden="true"
|
||||
:headers="{ Token: userStore.token }" :action="base_url + '/upload/file'"
|
||||
:on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri"
|
||||
target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" style="width:60vw" clearable
|
||||
placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<div style=" display: flex;justify-content: flex-end;margin-bottom: 30px;">
|
||||
<el-button @click="showDialog1 = true" type="primary" plain>选择材料</el-button>
|
||||
<el-button @click="showDialog1 = true" type="primary" plain>下载导入表</el-button>
|
||||
<el-button @click="showDialog1 = true" type="primary" plain>导入预算</el-button>
|
||||
<el-button @click="showDialog1 = true" type="primary" plain>清空</el-button>
|
||||
<el-button type="primary" plain>清空</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
@ -40,31 +65,31 @@
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="材料名称">
|
||||
<template #default="{ row }"> <el-input v-model="row.name" />
|
||||
<template #default="{ row }"> <el-input v-model="row.name" disabled />
|
||||
</template></el-table-column>
|
||||
<el-table-column label="材料编码">
|
||||
<template #default="{ row }"> <el-input v-model="row.code" />
|
||||
<template #default="{ row }"> <el-input v-model="row.code" disabled />
|
||||
</template></el-table-column>
|
||||
|
||||
<el-table-column label="规格型号">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.specs" />
|
||||
<el-input v-model="row.specs" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="品牌">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.brand" />
|
||||
<el-input v-model="row.brand" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参数说明">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.parameter_description" />
|
||||
<el-input v-model="row.parameter_description" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" prop="unit">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.unit" />
|
||||
<el-input v-model="row.unit" disabled />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" prop="num">
|
||||
@ -94,31 +119,7 @@
|
||||
</el-table>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload
|
||||
accept="doc, docx, xls, xlsx, ppt, pptx, pdf, txt, zip, rar, tar, jpg, png, gif, jpeg, webp, wmv, avi, mpg, mpeg, 3gp, mov, mp4, flv, f4v, rmvb, mkv"
|
||||
class="upload-demo" :show-file-list="false" aria-hidden="true"
|
||||
:headers="{ Token: userStore.token }" :action="base_url + '/upload/file'"
|
||||
:on-success="handleAvatarSuccess_four" ref="upload">
|
||||
<el-button type="primary">
|
||||
上传
|
||||
</el-button>
|
||||
</el-upload>
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<a style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item.uri"
|
||||
target="_blank">{{ item.name }}</a>
|
||||
<span style="cursor: pointer;margin-left: 5px;" @click="delFileFn(index)">x</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
</popup>
|
||||
|
@ -3,30 +3,45 @@
|
||||
<div class="detail-popup">
|
||||
<popup ref="popupRef" title="项目材料预算调整" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="预算单号" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_budget_code
|
||||
<el-descriptions-item label="预算单号" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_budget_code
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{ formData.project_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="项目编码" label-align="left" align="left" label-class-name="my-label"> {{ formData.project_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="类型" label-align="left" align="left" label-class-name="my-label"> {{ formData.budget_type_text }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料名称" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料编码" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料大类" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_first_level }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料中类" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_second_level
|
||||
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.project_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="项目编码" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.project_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="类型" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.budget_type_text }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料名称" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料编码" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料大类" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_first_level }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料中类" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_second_level
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料小类" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_three_level }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_unit }}</el-descriptions-item>
|
||||
<el-descriptions-item label="材料小类" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_three_level }}</el-descriptions-item>
|
||||
<el-descriptions-item label="单位" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_unit }}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="单价" label-align="left" align="left" label-class-name="my-label"> {{ formData.price }}</el-descriptions-item>
|
||||
<el-descriptions-item label="数量" label-align="left" align="left" label-class-name="my-label"> {{ formData.num
|
||||
<el-descriptions-item label="单价" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.price }}</el-descriptions-item>
|
||||
<el-descriptions-item label="数量" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.num
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="品牌" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_brand
|
||||
<el-descriptions-item label="品牌" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_brand
|
||||
}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="参数说明" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_parameter_description
|
||||
<el-descriptions-item label="参数说明" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.material_parameter_description
|
||||
}}</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="备注" label-align="left" align="left" label-class-name="my-label"> {{ formData.remark
|
||||
<el-descriptions-item label="备注" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.remark
|
||||
}}</el-descriptions-item>
|
||||
|
||||
|
||||
@ -129,13 +144,11 @@ defineExpose({
|
||||
getDetail
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tit {
|
||||
<style lang="scss" scoped>.tit {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
:deep(.my-label) {
|
||||
width: 150px;
|
||||
}
|
||||
</style>
|
||||
}</style>
|
||||
|
@ -17,7 +17,6 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="类型" prop="budget_type">
|
||||
<el-select v-model="formData.budget_type" clearable placeholder="请选择类型">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option v-for="(item, index) in dictData.budget_type" :key="index" :label="item.name"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
@ -174,6 +173,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
material_brand.value = data.material_brand
|
||||
material_unit.value = data.material_unit
|
||||
material_specs.value = data.material_specs
|
||||
formData.budget_type = String(formData.budget_type)
|
||||
|
||||
}
|
||||
|
||||
|
@ -60,27 +60,30 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="姓名" prop="name">
|
||||
<template #default="{ row, $index }">
|
||||
<el-input v-model="row.name" :disabled="!formData.project_id"
|
||||
@click="paymentdetail(row, $index)" />
|
||||
<el-input v-model="row.person_name" :disabled="!formData.project_id"
|
||||
@click="paymentdetail(row, $index)" readonly placeholder="点击选择人员" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工种" prop="work_type_text">
|
||||
<template #default="{ row }">
|
||||
<el-input v-model="row.work_type_text" />
|
||||
<el-input v-model="row.person_work_type_text" disabled placeholder="系统自动获取" />
|
||||
</template></el-table-column>
|
||||
<el-table-column label="银行卡号" prop="bank_no">
|
||||
<template #default="{ row }"> <el-input v-model="row.bank_no" /> </template></el-table-column>
|
||||
|
||||
<el-table-column label="总收入" prop="total_income">
|
||||
<template #default="{ row }"> <el-input v-model="row.total_income" />
|
||||
<template #default="{ row }"> <el-input v-model="row.person_idcard" placeholder="系统自动获取"
|
||||
disabled />
|
||||
</template></el-table-column>
|
||||
|
||||
<el-table-column label="总支出" prop="total_pay_out">
|
||||
<template #default="{ row }"> <el-input v-model="row.total_pay_out" />
|
||||
<el-table-column label="总收入" prop="total_income">
|
||||
<template #default="{ row }"> <el-input v-model="row.total_income" placeholder="系统自动获取"
|
||||
disabled />
|
||||
</template></el-table-column>
|
||||
|
||||
<el-table-column label="总支出" prop="pay_out">
|
||||
<template #default="{ row }"> <el-input v-model="row.pay_out" placeholder="系统自动获取" disabled />
|
||||
</template></el-table-column>
|
||||
|
||||
<el-table-column label="未发放" prop="balance">
|
||||
<template #default="{ row }"> <el-input v-model="row.balance" readonly />
|
||||
<template #default="{ row }"> <el-input v-model="row.balance" placeholder="系统自动获取" disabled />
|
||||
</template></el-table-column>
|
||||
|
||||
<el-table-column label="本次申请付款金额" prop="apply_amount">
|
||||
@ -116,6 +119,7 @@ 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"
|
||||
@ -161,9 +165,12 @@ const customEvent = (e) => {
|
||||
}
|
||||
const customEvent1 = (e) => {
|
||||
paymentlist[num.value].person_id = e.id
|
||||
paymentlist[num.value].name = e.name
|
||||
paymentlist[num.value].bank_no = e.bank_no
|
||||
paymentlist[num.value].work_type_text = e.work_type_text
|
||||
paymentlist[num.value].person_name = e.name
|
||||
paymentlist[num.value].person_idcard = e.bank_no
|
||||
paymentlist[num.value].person_work_type_text = e.work_type_text
|
||||
paymentlist[num.value].total_income = e.total_income
|
||||
paymentlist[num.value].balance = e.balance
|
||||
paymentlist[num.value].pay_out = e.pay_out
|
||||
showDialog1.value = false
|
||||
}
|
||||
|
||||
@ -213,7 +220,7 @@ watch(
|
||||
() => {
|
||||
formData.total_amount = 0
|
||||
paymentlist.forEach(item => {
|
||||
item.balance = (item.total_income - item.total_pay_out) || 0
|
||||
// item.balance = (item.total_income - item.total_pay_out) || 0
|
||||
formData.total_amount += (+item.apply_amount)
|
||||
})
|
||||
formData.total_amount_uppercase = toChinesNum(formData.total_amount)
|
||||
@ -228,7 +235,6 @@ const formRules = reactive<any>({
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
@ -249,6 +255,8 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
project_code.value = data.project_code
|
||||
idcard.value = data.person_idcard
|
||||
person_name.value = data.person_name
|
||||
let res = await projectsalaryDetailLists({ payment_salary_id: data.id })
|
||||
Object.assign(paymentlist, res.lists)
|
||||
|
||||
}
|
||||
|
||||
|
@ -41,10 +41,9 @@
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="流程步骤" prop="person_idcard" show-overflow-tooltip />
|
||||
<el-table-column label="工资付款单号" prop="payment_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="姓名" prop="person_name" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="姓名" prop="person_name" show-overflow-tooltip /> -->
|
||||
<el-table-column label="付款类型" prop="payment_type" show-overflow-tooltip />
|
||||
<el-table-column label="申请日期" prop="apply_date" show-overflow-tooltip />
|
||||
<el-table-column label="合计金额" prop="total_amount" show-overflow-tooltip />
|
||||
|
@ -6,24 +6,18 @@
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入项目id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目编码" prop="project_id">
|
||||
<el-form-item label="项目编码">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同名称" prop="project_id" @click="showDialog1 = true">
|
||||
<el-input v-model="project_code" clearable readonly placeholder="系统自动填写" />
|
||||
<el-form-item label="合同名称" prop="contract_id" @click="showDialog1 = true">
|
||||
<el-input v-model="formData.contract_name" clearable readonly placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同编号" prop="project_id">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户名称" prop="project_id">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同金额" prop="project_id">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同金额大写" prop="project_id">
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
<el-form-item label="合同编号" prop="contract_code">
|
||||
<el-input v-model="formData.contract_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="客户名称" prop="custom_name">
|
||||
<el-input v-model="formData.custom_name" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="结算金额" prop="settlement_amount">
|
||||
<el-input v-model="formData.settlement_amount" clearable placeholder="请输入结算金额" @input="amountinput" />
|
||||
</el-form-item>
|
||||
@ -79,8 +73,7 @@ import Popup from '@/components/popup/index.vue'
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
import projectTable from "@/components/project/index.vue"
|
||||
import contractTable from "@/components/project_contract/index.vue"
|
||||
|
||||
import contractTable from "@/components/contract/index.vue"
|
||||
import { apiprojectsettlementAdd, apiprojectsettlementEdit, apiprojectsettlementDetail } from '@/api/project_settlement'
|
||||
import { timeFormat, toChinesNum } from '@/utils/util'
|
||||
|
||||
@ -138,13 +131,19 @@ const customEvent = (e: any) => {
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.project_id = e.id;
|
||||
project_name.value = e.name;
|
||||
project_code
|
||||
.value = e.project_code;
|
||||
custom_name
|
||||
.value = e.custom_name;
|
||||
showDialog.value = false;
|
||||
formData.contract_id = e.id
|
||||
formData.contract_name = e.contract_name
|
||||
formData.contract_code = e.contract_code
|
||||
showDialog1.value = false
|
||||
// formData.custom_name=e
|
||||
|
||||
// formData.project_id = e.id;
|
||||
// project_name.value = e.name;
|
||||
// project_code
|
||||
// .value = e.project_code;
|
||||
// custom_name
|
||||
// .value = e.custom_name;
|
||||
// showDialog.value = false;
|
||||
};
|
||||
|
||||
const getlista = () => {
|
||||
|
@ -28,10 +28,7 @@
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
|
||||
<el-table-column label="流程步骤" prop="person_idcard" show-overflow-tooltip />
|
||||
<el-table-column label="结算单号" prop="settlement_code" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="合同名称" prop="contract_name" show-overflow-tooltip />
|
||||
<el-table-column label="合同编号" prop="contract_code" show-overflow-tooltip />
|
||||
@ -41,7 +38,6 @@
|
||||
<el-table-column label="结算差异" prop="remaining_amount" show-overflow-tooltip />
|
||||
<el-table-column label="添加人" prop="add_user_name" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="负责人" prop="add_user_name" show-overflow-tooltip /> -->
|
||||
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<!-- <el-button v-perms="['project.project_settlement/edit']" type="primary" link @click="handleEdit(row)">
|
||||
|
@ -114,6 +114,8 @@ const showDialog1 = ref(false)
|
||||
const customEvent = (e: any) => {
|
||||
formData.project_id = e.id;
|
||||
formData.project_name = e.name;
|
||||
formData.contract_id = '';
|
||||
formData.contract_name = '';
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
|
@ -28,7 +28,6 @@
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />、
|
||||
<el-table-column label="流程步骤" prop="person_idcard" show-overflow-tooltip />
|
||||
<el-table-column label="结算单号" prop="settlement_code" show-overflow-tooltip />
|
||||
<el-table-column label="供应商名称" prop="supplier_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
|
@ -22,13 +22,6 @@
|
||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div style=" display: flex;justify-content: flex-end;margin-bottom: 30px;">
|
||||
<el-button type="primary" plain>下载导入表</el-button>
|
||||
<el-button type="primary" plain>下载导入表</el-button>
|
||||
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<div style="margin-bottom: 30px;">分包预算清单</div>
|
||||
<div style="margin-bottom: 30px;">
|
||||
@ -329,9 +322,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
||||
}
|
||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
||||
if (tableData.value.length > 0) {
|
||||
formData.subpackage_budget_detail = tableData.value.map((item: any) => ({
|
||||
'id': item.id,
|
||||
|
@ -4,36 +4,48 @@
|
||||
<popup ref="popupRef" title="分包预算明细详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-descriptions :column="2" border>
|
||||
|
||||
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{ formData.project_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="项目编码" label-align="left" align="left" label-class-name="my-label"> {{ formData.project_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="分包预算明细单号" label-align="left" align="left" label-class-name="my-label"> {{ formData.material_budget_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工作类型" label-align="left" align="left" label-class-name="my-label"> {{ formData.work_type
|
||||
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.project_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="项目编码" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.project_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="分包预算明细单号" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.subpackage_budget_code }}</el-descriptions-item>
|
||||
<el-descriptions-item label="工作类型" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.work_type
|
||||
}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="工作内容" label-align="left" align="left" label-class-name="my-label"> {{ formData.work_content
|
||||
<el-descriptions-item label="工作内容" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.work_content
|
||||
}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="项目特征" label-align="left" align="left" label-class-name="my-label"> {{ formData.project_features
|
||||
<el-descriptions-item label="项目特征" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.project_features
|
||||
}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="单位" label-align="left" align="left" label-class-name="my-label"> {{ formData.unit
|
||||
<el-descriptions-item label="单位" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.unit
|
||||
}}</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="工作量" label-align="left" align="left" label-class-name="my-label"> {{ formData.num
|
||||
<el-descriptions-item label="工作量" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.num
|
||||
}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="单价" label-align="left" align="left" label-class-name="my-label"> {{ formData.price
|
||||
<el-descriptions-item label="单价" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.price
|
||||
}}</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="剩余预算工作量" label-align="left" align="left" label-class-name="my-label"> {{ formData.residue_num
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="已分包工作量" label-align="left" align="left" label-class-name="my-label"> {{ formData.has_subcontract_num
|
||||
}}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="剩余预算工作量" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.residue_num
|
||||
}}</el-descriptions-item> -->
|
||||
<!-- <el-descriptions-item label="已分包工作量" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.has_subcontract_num
|
||||
}}</el-descriptions-item> -->
|
||||
|
||||
|
||||
<el-descriptions-item label="备注" label-align="left" align="left" label-class-name="my-label"> {{ formData.remark
|
||||
<el-descriptions-item label="备注" label-align="left" align="left" label-class-name="my-label"> {{
|
||||
formData.remark
|
||||
}}</el-descriptions-item>
|
||||
|
||||
|
||||
|
@ -36,7 +36,8 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同金额(元)" prop="contract_amount"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="formData.contract_amount" type="number" clearable placeholder="请输入合同金额(元)" />
|
||||
<el-input v-model="formData.contract_amount" type="number" @change="getSummaries" clearable
|
||||
placeholder="请输入合同金额(元)" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -520,7 +521,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
contract_name.value = data.contract_name;
|
||||
|
||||
}
|
||||
|
||||
getlist1(formData.org_id)
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -33,7 +33,6 @@
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="序号" type="index" width="55" />
|
||||
<el-table-column label="流程步骤" prop="" show-overflow-tooltip />
|
||||
<el-table-column label="预算单号" prop="total_budget_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目编码" prop="project_code" show-overflow-tooltip />
|
||||
|
@ -2,28 +2,36 @@
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="85vw" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
||||
<!-- <el-form-item label="项目名称" prop="project_name">
|
||||
<el-input v-model="formData.project_name" clearable placeholder="点击选择" readonle
|
||||
@click="showDialog4 = true" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="出差申请单号" prop="trip_apply_id">
|
||||
<el-input v-model="formData.trip_apply_code" clearable placeholder="点击选择" readonle
|
||||
@click="showDialog = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报销类型" prop="reimbursement_type">
|
||||
<el-radio-group v-model="formData.reimbursement_type" class="ml-4">
|
||||
<el-radio :label="item.value" size="large" v-for="item in dictData.reimbursement_type ">{{ item.name
|
||||
}}</el-radio>
|
||||
</el-radio-group>
|
||||
<el-checkbox-group v-model="formData.reimbursement_type" placeholder="报销类型">
|
||||
<el-checkbox v-for="(item, index) in dictData.reimbursement_type" :key="index" :label="item.value">
|
||||
{{ item.name }}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="借款单号" prop="loan_apply_id">
|
||||
<el-form-item label="借款单号" prop="loan_apply_id" v-if="formData.reimbursement_type.includes('1')">
|
||||
<el-input v-model="formData.loan_apply_code" clearable placeholder="点击选择" readonly
|
||||
@click="showDialog1 = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="冲抵借款金额" prop="offset_loan_amount">
|
||||
<el-form-item label="冲抵借款金额" prop="offset_loan_amount" v-if="formData.reimbursement_type.includes('1')">
|
||||
<el-input v-model="formData.offset_loan_amount" clearable placeholder="请输入冲抵借款金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报销人" prop="apply_user">
|
||||
<el-input v-model="formData.apply_user" clearable placeholder="请输入报销人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报销日期" prop="apply_date">
|
||||
<el-input v-model="formData.apply_date" clearable placeholder="请输入报销日期" />
|
||||
<!-- <el-input v-model="formData.apply_date" clearable placeholder="请输入报销日期" /> -->
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.apply_date" clearable value-format="YYYY-MM-DD "
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="收款人姓名" prop="payee_name">
|
||||
<el-input v-model="formData.payee_name" clearable placeholder="请输入收款人姓名" />
|
||||
@ -54,10 +62,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="付款银行账户" prop="bank_account_id">
|
||||
<el-input v-model="formData.account_name" clearable placeholder="点击选择银行" readonly
|
||||
<el-form-item label="账户编码" prop="bank_account_id">
|
||||
<el-input v-model="formData.bank_account.account_sn" clearable placeholder="点击选择银行" readonly
|
||||
@click="showDialog2 = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开户银行" prop="bank_account_id">
|
||||
<el-input v-model="formData.bank_account.deposit_bank" clearable readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="开户名称" prop="bank_account_id">
|
||||
<el-input v-model="formData.bank_account.account_name" clearable readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="开户账号" prop="bank_account_id">
|
||||
<el-input v-model="formData.bank_account.account" clearable readonly />
|
||||
</el-form-item>
|
||||
|
||||
<el-col :span="24">
|
||||
<div style="margin-bottom: 30px;">报销明细</div>
|
||||
@ -71,8 +88,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="一级科目">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.project_cost_temp_name" @click="openDialog1(scope)"
|
||||
readonly placeholder="点击选择" />
|
||||
<el-input v-model="scope.row.first_level_subject" @click="openDialog1(scope)" readonly
|
||||
placeholder="点击选择" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@ -124,7 +141,6 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="发票号">
|
||||
<template #default="{ row }"> <el-input v-model="row.invoice_sn" type="number" />
|
||||
</template></el-table-column>
|
||||
@ -180,18 +196,24 @@
|
||||
</el-col>
|
||||
</el-form>
|
||||
|
||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||
<el-dialog v-model="showDialog" title="选择出差申请单" width="70%">
|
||||
<projectTripApply @customEvent="customEvent"></projectTripApply>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="showDialog1" title="选择项目" width="70%">
|
||||
<projectLoanApply @customEvent="customEvent1"></projectLoanApply>
|
||||
</el-dialog>
|
||||
<div v-if="showDialog1">
|
||||
<el-dialog v-model="showDialog1" title="选择项目" width="70%">
|
||||
<projectLoanApply @customEvent="customEvent1" :project_id="formData.project_id"></projectLoanApply>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<el-dialog v-model="showDialog2" title="选择账户" width="70%">
|
||||
<bankaccount @customEvent="customEvent2"></bankaccount>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="showDialog3" title="选择科目" width="70%">
|
||||
<projectcostTemLists @customEvent="customEvent3"></projectcostTemLists>
|
||||
</el-dialog>
|
||||
<!-- <el-dialog v-model="showDialog4" title="选择科目" width="70%">
|
||||
<projectTripApply @customEvent="customEvent3"></projectTripApply>
|
||||
</el-dialog> -->
|
||||
|
||||
</popup>
|
||||
</div>
|
||||
@ -200,6 +222,7 @@
|
||||
<script lang="ts" setup name="projectTravelReimbursementEdit">
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
// import projectTripApply from '@/components/project_trip_apply.vue'
|
||||
import { apiProjectTravelReimbursementAdd, apiProjectTravelReimbursementEdit, apiProjectTravelReimbursementDetail } from '@/api/project_travel_reimbursement'
|
||||
import type { PropType } from 'vue'
|
||||
import projectTripApply from "@/components/project_trip_apply/index.vue"
|
||||
@ -208,6 +231,9 @@ import bankaccount from "@/components/bankaccount/index.vue"
|
||||
import projectcostTemLists from '@/components/projectcostTemLists/index.vue'
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
import { apiProjectTravelReimbursementDetailLists } from "@/api/project_travel_reimbursement_detail.ts"
|
||||
import { apiProjectTravelReimbursementInvoiceDetailLists } from "@/api/project_travel_reimbursement_invoice_detail.ts"
|
||||
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
defineProps({
|
||||
@ -224,9 +250,11 @@ const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
const showDialog2 = ref(false)
|
||||
const showDialog3 = ref(false)
|
||||
const showDialog4 = ref(false)
|
||||
|
||||
const customEvent = (e) => {
|
||||
formData.trip_apply_id = e.id
|
||||
formData.project_id = e.project_id
|
||||
formData.trip_apply_code = e.trip_apply_code
|
||||
showDialog.value = false
|
||||
}
|
||||
@ -238,9 +266,22 @@ const customEvent1 = (e) => {
|
||||
const customEvent2 = (e) => {
|
||||
formData.account_name = e.account_name
|
||||
formData.bank_account_id = e.id
|
||||
formData.bank_account = {
|
||||
"account_sn": e.account_sn,
|
||||
"deposit_bank": e.deposit_bank,
|
||||
"account_name": e.account_name,
|
||||
"account": e.account
|
||||
}
|
||||
showDialog2.value = false
|
||||
console.log(e)
|
||||
}
|
||||
const customEvent4 = (e) => {
|
||||
// formData.project_name = e.project_name
|
||||
// formData.account_name = e.account_name
|
||||
// formData.bank_account_id = e.id
|
||||
// showDialog2.value = false
|
||||
console.log(e)
|
||||
}
|
||||
// 获取点击行的index
|
||||
let rowIndex = 0
|
||||
const openDialog1 = (e: any) => {
|
||||
@ -248,7 +289,7 @@ const openDialog1 = (e: any) => {
|
||||
showDialog3.value = true
|
||||
}
|
||||
const customEvent3 = (e: any) => {
|
||||
formData.reimbursement_detail[rowIndex].project_cost_temp_name = e.project_type_name
|
||||
formData.reimbursement_detail[rowIndex].first_level_subject = e.project_type_name
|
||||
formData.reimbursement_detail[rowIndex].project_cost_temp_id = e.id
|
||||
showDialog3.value = false
|
||||
}
|
||||
@ -262,44 +303,51 @@ const popupTitle = computed(() => {
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
"trip_apply_id": "1", //必填,出差申请单id
|
||||
"trip_apply_code": "1", //必填,出差申请单id
|
||||
"reimbursement_type": "1,2", //必填,报销类型
|
||||
project_id: "",
|
||||
"trip_apply_id": "", //必填,出差申请单id
|
||||
"trip_apply_code": "", //必填,出差申请单id
|
||||
"reimbursement_type": [], //必填,报销类型
|
||||
"loan_apply_id": "", //借款单id,当报销类型包含借款冲抵选项时必填
|
||||
"loan_apply_code": "", //借款单id,当报销类型包含借款冲抵选项时必填
|
||||
"offset_loan_amount": "50", //冲抵借款金额,当报销类型包含借款冲抵选项时必填
|
||||
"apply_user": "test", //必填,报销人
|
||||
"apply_date": "2024-01-18", //必填,报销日期
|
||||
"payee_name": "aaa", //必填,收款人姓名
|
||||
"payee_bank": "bbb", //必填,收款银行
|
||||
"payee_account": "ccc", //必填,收款账号
|
||||
"offset_loan_amount": "", //冲抵借款金额,当报销类型包含借款冲抵选项时必填
|
||||
"apply_user": "", //必填,报销人
|
||||
"apply_date": "", //必填,报销日期
|
||||
"payee_name": "", //必填,收款人姓名
|
||||
"payee_bank": "", //必填,收款银行
|
||||
"payee_account": "", //必填,收款账号
|
||||
"remark": "", //可选,备注
|
||||
"annex": [], //可选,附件
|
||||
"bank_account_id": "1", //必填,付款银行账户id
|
||||
"bank_account_id": "", //必填,付款银行账户id
|
||||
account_name: "",
|
||||
"reimbursement_detail": [ //必填,报销明细
|
||||
{
|
||||
"project_cost_temp_id": "1", //必填,项目费用模板id
|
||||
project_cost_temp_name: "",
|
||||
"traffic_fee": "15", //可选,交通
|
||||
"stay_fee": "24", //可选,住宿
|
||||
"restaurant_fee": "30", //可选,餐饮
|
||||
"subsidy_fee": "40", //可选,补助
|
||||
"other_fee": "50", //可选,其它
|
||||
"project_cost_temp_id": "", //必填,项目费用模板id
|
||||
first_level_subject: "",
|
||||
"traffic_fee": "", //可选,交通
|
||||
"stay_fee": "", //可选,住宿
|
||||
"restaurant_fee": "", //可选,餐饮
|
||||
"subsidy_fee": "", //可选,补助
|
||||
"other_fee": "", //可选,其它
|
||||
"remark": "" //可选,备注
|
||||
}
|
||||
],
|
||||
"invoice_detail": [ //必填,发票明细
|
||||
{
|
||||
"invoice_type": "1", //必填,发票类型
|
||||
"invoice_sn": "FPSN-0001", //必填,发票号
|
||||
"tax_rate": "1", //必填,发票税率
|
||||
"invoice_form": "1", //必填,发票形式
|
||||
"invoice_amount": "150", //必填,发票金额
|
||||
"invoice_type": "", //必填,发票类型
|
||||
"invoice_sn": "", //必填,发票号
|
||||
"tax_rate": "", //必填,发票税率
|
||||
"invoice_form": "", //必填,发票形式
|
||||
"invoice_amount": "", //必填,发票金额
|
||||
"annex": [], //可选,发票附件
|
||||
"remark": "test" //可选,备注
|
||||
"remark": "" //可选,备注
|
||||
}
|
||||
]
|
||||
],
|
||||
"bank_account": {
|
||||
"account_sn": "",
|
||||
"deposit_bank": "",
|
||||
"account_name": "",
|
||||
"account": ""
|
||||
}
|
||||
})
|
||||
|
||||
// 上传文件
|
||||
@ -431,8 +479,11 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
formData.reimbursement_type = formData.reimbursement_type.split(',')
|
||||
let res = await apiProjectTravelReimbursementDetailLists({ travel_reimbursement_id: data.id })
|
||||
formData.reimbursement_detail = res.lists
|
||||
let res2 = await apiProjectTravelReimbursementInvoiceDetailLists({ travel_reimbursement_id: data.id })
|
||||
formData.invoice_detail = res2.lists
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
@ -446,6 +497,9 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
await formRef.value?.validate()
|
||||
formData.reimbursement_type = formData.reimbursement_type.join(',')
|
||||
formData.annex.length ? "" : formData.annex = []
|
||||
console.log(formData.reimbursement_type)
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
? await apiProjectTravelReimbursementEdit(data)
|
||||
|
@ -37,21 +37,17 @@
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="出差申请单id" prop="trip_apply_id" show-overflow-tooltip />
|
||||
<el-table-column label="项目id" prop="project_id" show-overflow-tooltip />
|
||||
<el-table-column label="出差申请单编号" prop="trip_reimbursement_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="报销类型" prop="reimbursement_type" show-overflow-tooltip />
|
||||
<el-table-column label="借款单id" prop="loan_apply_id" show-overflow-tooltip />
|
||||
<el-table-column label="初始报销金额" prop="reimbursement_amount" show-overflow-tooltip />
|
||||
<el-table-column label="实际报销金额" prop="actual_reimbursement_amount" show-overflow-tooltip />
|
||||
<el-table-column label="借款单编号" prop="loan_apply_code" show-overflow-tooltip />
|
||||
<el-table-column label="借款金额" prop="loan_amount" show-overflow-tooltip />
|
||||
<el-table-column label="报销金额" prop="total_amount" show-overflow-tooltip />
|
||||
<el-table-column label="冲抵借款金额" prop="offset_loan_amount" show-overflow-tooltip />
|
||||
<el-table-column label="付款金额" prop="pay_amount" show-overflow-tooltip />
|
||||
<el-table-column label="报销人" prop="apply_user" show-overflow-tooltip />
|
||||
<el-table-column label="报销日期" prop="apply_date" show-overflow-tooltip />
|
||||
<el-table-column label="收款人姓名" prop="payee_name" show-overflow-tooltip />
|
||||
<el-table-column label="收款银行" prop="payee_bank" show-overflow-tooltip />
|
||||
<el-table-column label="收款账号" prop="payee_account" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip />
|
||||
<el-table-column label="付款银行账户id" prop="bank_account_id" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['project.project_travel_reimbursement/edit']" type="primary" link
|
||||
@ -77,7 +73,7 @@
|
||||
<script lang="ts" setup name="projectTravelReimbursementLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiProjectTravelReimbursementLists, apiProjectTravelReimbursementDelete } from '@/api/project_travel_reimbursement'
|
||||
import { apiProjectTravelReimbursementLists, apiProjectTravelReimbursementDelete, apiProjectTravelReimbursementDetail } from '@/api/project_travel_reimbursement'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
@ -122,10 +118,11 @@ const handleAdd = async () => {
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiProjectTravelReimbursementDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
|
@ -2,12 +2,12 @@
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
||||
<el-form-item label="项目名称" prop="travel_reimbursement_id">
|
||||
<el-input v-model="formData.project_name" clearable placeholder="请输入差旅报销单id" @click="showDialog = true"
|
||||
readonly />
|
||||
<el-form-item label="报销单号" prop="travel_reimbursement_id">
|
||||
<el-input v-model="formData.trip_reimbursement_code" clearable placeholder="请输入报销单号"
|
||||
@click="showDialog = true" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目费用模板" prop="project_cost_temp_id">
|
||||
<el-input v-model="formData.project_type_name" clearable placeholder="请输入项目费用模板id"
|
||||
<el-input v-model="formData.first_level_subject" clearable placeholder="请输入项目费用模板id"
|
||||
@click="showDialog1 = true" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="交通" prop="traffic_fee">
|
||||
@ -77,26 +77,26 @@ const popupTitle = computed(() => {
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
"travel_reimbursement_id": "1",
|
||||
project_name: "",
|
||||
"project_cost_temp_id": "2",
|
||||
project_type_name: "",
|
||||
"traffic_fee": "100",
|
||||
"stay_fee": "110",
|
||||
"restaurant_fee": "130",
|
||||
"subsidy_fee": "150",
|
||||
"other_fee": "170",
|
||||
"remark": "aaa"
|
||||
"travel_reimbursement_id": "",
|
||||
trip_reimbursement_code: "",
|
||||
"project_cost_temp_id": "",
|
||||
first_level_subject: "",
|
||||
"traffic_fee": "",
|
||||
"stay_fee": "",
|
||||
"restaurant_fee": "",
|
||||
"subsidy_fee": "",
|
||||
"other_fee": "",
|
||||
"remark": ""
|
||||
})
|
||||
|
||||
const customEvent = (e: any) => {
|
||||
formData.travel_reimbursement_id = e.id
|
||||
formData.project_name = e.project_name
|
||||
formData.trip_reimbursement_code = e.trip_reimbursement_code
|
||||
showDialog.value = false
|
||||
}
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.project_cost_temp_id = e.id
|
||||
formData.project_type_name = e.project_type_name
|
||||
formData.first_level_subject = e.first_level_subject
|
||||
showDialog1.value = false
|
||||
|
||||
}
|
||||
|
@ -26,8 +26,10 @@
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="差旅报销单id" prop="travel_reimbursement_id" show-overflow-tooltip />
|
||||
<el-table-column label="项目费用模板id" prop="project_cost_temp_id" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="出差申请单" prop="trip_apply_code" show-overflow-tooltip />
|
||||
<el-table-column label="差旅报销单" prop="trip_reimbursement_code" show-overflow-tooltip />
|
||||
<el-table-column label="一级科目" prop="first_level_subject" show-overflow-tooltip />
|
||||
<el-table-column label="交通" prop="traffic_fee" show-overflow-tooltip />
|
||||
<el-table-column label="住宿" prop="stay_fee" show-overflow-tooltip />
|
||||
<el-table-column label="餐饮" prop="restaurant_fee" show-overflow-tooltip />
|
||||
@ -59,7 +61,7 @@
|
||||
<script lang="ts" setup name="projectTravelReimbursementDetailLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiProjectTravelReimbursementDetailLists, apiProjectTravelReimbursementDetailDelete } from '@/api/project_travel_reimbursement_detail'
|
||||
import { apiProjectTravelReimbursementDetailLists, apiProjectTravelReimbursementDetailDelete, apiProjectTravelReimbursementDetailDetail } from '@/api/project_travel_reimbursement_detail'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
@ -100,10 +102,12 @@ const handleAdd = async () => {
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
|
||||
let res = await apiProjectTravelReimbursementDetailDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
|
@ -2,9 +2,9 @@
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<el-form-item label="差旅报销id" prop="travel_reimbursement_id">
|
||||
<el-input v-model="formData.project_name" clearable placeholder="点击选则" @click="showDialog = true"
|
||||
readonly />
|
||||
<el-form-item label="差旅报销单号" prop="travel_reimbursement_id">
|
||||
<el-input v-model="formData.trip_reimbursement_code" clearable placeholder="点击选则"
|
||||
@click="showDialog = true" readonly />
|
||||
</el-form-item>
|
||||
<el-form-item label="发票类型" prop="invoice_type">
|
||||
<el-select v-model="formData.invoice_type" placeholder="请选择">
|
||||
@ -27,8 +27,8 @@
|
||||
<el-form-item label="发票金额" prop="invoice_amount">
|
||||
<el-input v-model="formData.invoice_amount" clearable placeholder="请输入发票金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发票税额" prop="tax_amount">
|
||||
<el-input v-model="formData.tax_amount" clearable placeholder="请输入发票税额" />
|
||||
<el-form-item label="发票税额">
|
||||
<el-input v-model="tax_amount" clearable disabled placeholder="请输入发票税额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload
|
||||
@ -70,9 +70,10 @@ import type { PropType } from 'vue'
|
||||
import projectTravelReimbursement from "@/components/project_travel_reimbursement/index.vue"
|
||||
import configs from "@/config"
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
import { computed } from "vue"
|
||||
const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
defineProps({
|
||||
let props = defineProps({
|
||||
dictData: {
|
||||
type: Object as PropType<Record<string, any[]>>,
|
||||
default: () => ({})
|
||||
@ -94,15 +95,23 @@ const popupTitle = computed(() => {
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
"travel_reimbursement_id": "1",
|
||||
project_name: "",
|
||||
"invoice_type": "2",
|
||||
"invoice_sn": "100",
|
||||
"tax_rate": "1",
|
||||
"invoice_form": "1",
|
||||
"invoice_amount": "150",
|
||||
trip_reimbursement_code: "",
|
||||
"invoice_type": "",
|
||||
"invoice_sn": "",
|
||||
"tax_rate": "",
|
||||
"invoice_form": "",
|
||||
"invoice_amount": "",
|
||||
"annex": [],
|
||||
"remark": "灌灌灌灌"
|
||||
"remark": ""
|
||||
})
|
||||
|
||||
let tax_amount = computed(() => {
|
||||
let index = props.dictData.tax_rate.findIndex((item) => item.value == formData.tax_rate)
|
||||
console.log(index)
|
||||
return (formData.invoice_amount * (props.dictData.tax_rate[index]?.name / 100)).toFixed(2) || 0
|
||||
})
|
||||
|
||||
// let formData.tax_rate
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (response: any) => {
|
||||
// @ts-ignore
|
||||
@ -114,7 +123,7 @@ const delFileFn = (index: number) => {
|
||||
}
|
||||
const customEvent = (e: any) => {
|
||||
formData.travel_reimbursement_id = e.id
|
||||
formData.project_name = e.project_name
|
||||
formData.trip_reimbursement_code = e.trip_reimbursement_code
|
||||
showDialog.value = false
|
||||
}
|
||||
// 表单验证
|
||||
|
@ -2,10 +2,10 @@
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="差旅报销id" prop="travel_reimbursement_id">
|
||||
<!-- <el-form-item label="差旅报销id" prop="travel_reimbursement_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.travel_reimbursement_id" clearable
|
||||
placeholder="请输入差旅报销id" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="发票类型" prop="invoice_type">
|
||||
<el-input class="w-[280px]" v-model="queryParams.invoice_type" clearable placeholder="请输入发票类型" />
|
||||
</el-form-item>
|
||||
@ -36,14 +36,18 @@
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="差旅报销id" prop="travel_reimbursement_id" show-overflow-tooltip />
|
||||
<el-table-column label="发票类型" prop="invoice_type" show-overflow-tooltip />
|
||||
<el-table-column label="差旅报销单号" prop="trip_reimbursement_code" show-overflow-tooltip />
|
||||
<el-table-column label="发票类型" prop="invoice_type_text" show-overflow-tooltip />
|
||||
<el-table-column label="发票号" prop="invoice_sn" show-overflow-tooltip />
|
||||
<el-table-column label="发票税率" prop="tax_rate" show-overflow-tooltip />
|
||||
<el-table-column label="发票形式" prop="invoice_form" show-overflow-tooltip />
|
||||
<el-table-column label="发票税率" prop="tax_rate_text" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
{{ row.tax_rate_text }}%
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="发票形式" prop="invoice_form_text" show-overflow-tooltip />
|
||||
<el-table-column label="发票金额" prop="invoice_amount" show-overflow-tooltip />
|
||||
<el-table-column label="发票税额" prop="tax_amount" show-overflow-tooltip />
|
||||
<el-table-column label="发票附件" prop="annex" show-overflow-tooltip />
|
||||
<el-table-column label="发票备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
|
@ -6,9 +6,9 @@
|
||||
<el-input v-model="formData.project_name" clearable placeholder="点击选择" readonly
|
||||
@click="showDialog = true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请单号" prop="trip_apply_code">
|
||||
<el-input v-model="formData.trip_apply_code" clearable placeholder="请输入申请单号" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="申请单号" prop="trip_apply_code">
|
||||
<el-input v-model="formData.trip_apply_code" disabled clearable placeholder="后台zi" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="出差起始地" prop="origin_address" label-width="100px">
|
||||
<el-input v-model="formData.origin_address" clearable placeholder="请输入出差起始地" />
|
||||
</el-form-item>
|
||||
@ -109,14 +109,15 @@ const formData = reactive({
|
||||
id: '',
|
||||
"project_id": '',
|
||||
"project_name": '',
|
||||
"origin_address": 1,
|
||||
"target_address": 1,
|
||||
"traffic": '2',
|
||||
"start_date": "2024-01-17",
|
||||
"end_date": "2024-02-20",
|
||||
"reason": "aaa",
|
||||
"remark": "bbb",
|
||||
"annex": []
|
||||
"origin_address": '',
|
||||
"target_address": '',
|
||||
"traffic": '',
|
||||
"start_date": "",
|
||||
"end_date": "",
|
||||
"reason": "",
|
||||
"remark": "",
|
||||
"annex": [],
|
||||
days: ""
|
||||
})
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (response: any) => {
|
||||
@ -178,8 +179,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
formData.traffic = String(formData.traffic)
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
@ -212,7 +212,9 @@ const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
const delFileFn = (index: number) => {
|
||||
formData.annex.splice(index, 1)
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
|
@ -2,9 +2,9 @@
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="项目id" prop="project_id">
|
||||
<!-- <el-form-item label="项目id" prop="project_id">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="申请单号" prop="trip_apply_code">
|
||||
<el-input class="w-[280px]" v-model="queryParams.trip_apply_code" clearable placeholder="请输入申请单号" />
|
||||
</el-form-item>
|
||||
@ -15,7 +15,12 @@
|
||||
<el-input class="w-[280px]" v-model="queryParams.target_address" clearable placeholder="请输入出差目的地" />
|
||||
</el-form-item>
|
||||
<el-form-item label="交通工具" prop="traffic">
|
||||
<el-input class="w-[280px]" v-model="queryParams.traffic" clearable placeholder="请输入交通工具" />
|
||||
<el-select class="w-[280px]" v-model="queryParams.traffic" clearable placeholder="请选择交通工具">
|
||||
<el-option v-for="(item, index) in dictData.traffic" :key="index" :label="item.name"
|
||||
:value="item.value" />
|
||||
</el-select>
|
||||
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
@ -37,17 +42,17 @@
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="项目id" prop="project_id" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="申请单号" prop="trip_apply_code" show-overflow-tooltip />
|
||||
<el-table-column label="出差起始地" prop="origin_address" show-overflow-tooltip />
|
||||
<el-table-column label="出差目的地" prop="target_address" show-overflow-tooltip />
|
||||
<el-table-column label="交通工具" prop="traffic" show-overflow-tooltip />
|
||||
<el-table-column label="交通工具" prop="traffic_text" show-overflow-tooltip />
|
||||
<el-table-column label="出差时间" prop="start_date" show-overflow-tooltip />
|
||||
<el-table-column label="结束时间" prop="end_date" show-overflow-tooltip />
|
||||
<el-table-column label="出差事由" prop="reason" show-overflow-tooltip />
|
||||
<el-table-column label="历时天数" prop="days" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="附件" prop="annex" show-overflow-tooltip /> -->
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['project.project_trip_apply/edit']" type="primary" link
|
||||
@ -73,7 +78,7 @@
|
||||
<script lang="ts" setup name="projectTripApplyLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apiProjectTripApplyLists, apiProjectTripApplyDelete } from '@/api/project_trip_apply'
|
||||
import { apiProjectTripApplyLists, apiProjectTripApplyDelete, apiProjectTripApplyDetail } from '@/api/project_trip_apply'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
@ -118,10 +123,11 @@ const handleAdd = async () => {
|
||||
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
let res = await apiProjectTripApplyDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
editRef.value?.setFormData(data)
|
||||
editRef.value?.setFormData(res)
|
||||
}
|
||||
|
||||
// 删除
|
||||
|
@ -249,9 +249,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
@ -272,10 +272,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
|
@ -6,17 +6,21 @@
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="组织名称" prop="org_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-form-item label="组织名称" prop="org_id"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="部门名称" prop="dept_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-form-item label="部门名称" prop="dept_id"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="( item, index ) in list2 " :key="index" :label="item.name" :value="item.id" />
|
||||
<el-option v-for="( item, index ) in list2 " :key="index" :label="item.name"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -39,7 +43,8 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="检查日期" prop="check_date">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.check_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择检查日期">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.check_date" clearable type="date"
|
||||
value-format="YYYY-MM-DD" placeholder="选择检查日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -240,6 +245,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
}
|
||||
project_name.value = data.project_name
|
||||
project_code.value = data.project_code
|
||||
getlist1(formData.org_id)
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await qualitycheckDetail({
|
||||
|
@ -328,9 +328,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
|
||||
|
||||
|
||||
|
@ -229,9 +229,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
@ -7,7 +7,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="质量检测节点" prop="node">
|
||||
<el-select v-model="queryParams.node" clearable placeholder="请选择质量检测节点">
|
||||
<el-option v-for="(item, index) in dictData.quality_detection_node" :key="index" :label="item.name" :value="parseInt(item.value)" />
|
||||
<el-option v-for="(item, index) in dictData.quality_detection_node" :key="index" :label="item.name"
|
||||
:value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
@ -24,7 +25,8 @@
|
||||
</template>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button v-perms="['quality.quality_detection_temp/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
|
||||
<el-button v-perms="['quality.quality_detection_temp/delete']" :disabled="!selectData.length"
|
||||
@click="handleDelete(selectData)">
|
||||
删除
|
||||
</el-button>
|
||||
|
||||
@ -48,10 +50,12 @@
|
||||
|
||||
<el-table-column label="操作" width="150" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['quality.quality_detection_temp/edit']" type="primary" link @click="handleEdit(row)">
|
||||
<el-button v-perms="['quality.quality_detection_temp/edit']" type="primary" link
|
||||
@click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-perms="['quality.quality_detection_temp/delete']" type="danger" link @click="handleDelete(row.id)">
|
||||
<el-button v-perms="['quality.quality_detection_temp/delete']" type="danger" link
|
||||
@click="handleDelete(row.id)">
|
||||
删除
|
||||
</el-button>
|
||||
<!-- <el-button v-perms="['quality.quality_detection_temp/detail']" link @click="handledetail(row)">
|
||||
@ -124,7 +128,7 @@ const handleAdd = async () => {
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
console.log(data.id)
|
||||
let res = awaitqualitydetectiontempDetail({ id: data.id })
|
||||
let res = await qualitydetectiontempDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
@ -138,7 +142,7 @@ const handleDelete = async (id: number | any[]) => {
|
||||
getLists()
|
||||
}
|
||||
const handledetail = async (data: any) => {
|
||||
let res = awaitqualitydetectiontempDetail({ id: data.id })
|
||||
let res = await qualitydetectiontempDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
|
@ -213,7 +213,7 @@ const formRules = reactive<any>({
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.file && data.file.length > 0) {
|
||||
|
||||
const arry1 = data.file.split(',').map((item: any, index: any) => {
|
||||
const arry1 = data.file.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
@ -249,10 +249,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
|
@ -229,11 +229,8 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
if (data.dept_id) {
|
||||
getlist1(data.dept_id
|
||||
)
|
||||
}
|
||||
|
||||
getlist1(data.dept_id)
|
||||
project_name.value = data.project_name
|
||||
|
||||
|
||||
@ -248,9 +245,9 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
@ -6,17 +6,21 @@
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="组织名称" prop="org_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-form-item label="组织名称" prop="org_id"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="部门名称" prop="dept_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-form-item label="部门名称" prop="dept_id"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="( item, index ) in list2 " :key="index" :label="item.name" :value="item.id" />
|
||||
<el-option v-for="( item, index ) in list2 " :key="index" :label="item.name"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -39,7 +43,8 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="检查日期" prop="check_date">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.check_date" clearable type="date" value-format="YYYY-MM-DD" placeholder="选择检查日期">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.check_date" clearable type="date"
|
||||
value-format="YYYY-MM-DD" placeholder="选择检查日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -244,6 +249,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
}
|
||||
project_name.value = data.project_name
|
||||
project_code.value = data.project_code
|
||||
getlist1(formData.org_id)
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await qualitymodifyDetail({
|
||||
@ -266,6 +272,7 @@ const handleSubmit = async () => {
|
||||
: await qualitymodifyAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
|
||||
}
|
||||
|
||||
//打开弹窗
|
||||
|
@ -230,13 +230,8 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await qualityspecificationEdit(data)
|
||||
|
@ -235,9 +235,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
@ -248,7 +248,6 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -266,6 +265,8 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
project_name.value = data.project_name
|
||||
|
||||
project_code.value = data.project_code
|
||||
|
||||
getlist1(formData.org_id);
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await safetyaccidentDetail({
|
||||
@ -277,9 +278,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
@ -328,9 +328,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
@ -230,6 +230,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
project_name.value = data.project_name
|
||||
|
||||
project_code.value = data.project_code
|
||||
getlist1(formData.org_id)
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await safetyemergencyplanDetail({
|
||||
@ -241,9 +242,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
@ -241,9 +241,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
@ -5,7 +5,25 @@
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="组织名称" prop="org_id"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="部门名称" prop="dept_id"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="( item, index ) in list2 " :key="index" :label="item.name"
|
||||
:value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入项目名称" />
|
||||
@ -97,6 +115,8 @@ const list2 = reactive([])
|
||||
const showDialog = ref(false)
|
||||
const project_name = ref('')
|
||||
const userInfo = userStore.userInfo
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
@ -112,6 +132,25 @@ const handleAvatarSuccess_four = (
|
||||
|
||||
);
|
||||
};
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
getAll().then((res) => {
|
||||
Object.assign(list1, res)
|
||||
|
||||
})
|
||||
}
|
||||
//获取部门
|
||||
const deptrmt = (e: any) => {
|
||||
formData.dept_id = ''
|
||||
getlist1(e)
|
||||
|
||||
}
|
||||
//获取所有部门
|
||||
const getlist1 = (id: any) => {
|
||||
deptAll({ 'org_id': id }).then((res) => {
|
||||
list2.splice(0, list2.length, ...res)
|
||||
})
|
||||
}
|
||||
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
@ -145,6 +184,8 @@ const popupTitle = computed(() => {
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
dept_id: '',
|
||||
org_id: "",
|
||||
project_id: '',
|
||||
name: "",
|
||||
happen_time: "",
|
||||
@ -152,7 +193,6 @@ const formData = reactive({
|
||||
file: [],
|
||||
remark: "",
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
@ -182,8 +222,8 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
getlist1(formData.org_id);
|
||||
project_name.value = data.project_name
|
||||
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
@ -196,9 +236,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
@ -224,7 +262,7 @@ const handleClose = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
|
||||
getlist();
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
|
@ -318,13 +318,8 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await safetyhazardEdit(data)
|
||||
|
@ -104,15 +104,15 @@
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
<!-- <el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
<!-- <el-col :span="24">
|
||||
|
||||
<el-form-item label="附件" prop="field127">
|
||||
<el-upload
|
||||
@ -134,7 +134,7 @@
|
||||
</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
|
||||
|
||||
@ -309,9 +309,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
@ -265,13 +265,8 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await safetyproductmonthEdit(data)
|
||||
|
@ -230,6 +230,8 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
project_name.value = data.project_name
|
||||
|
||||
project_code.value = data.project_code
|
||||
getlist1(formData.org_id)
|
||||
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await safetyrehearsalDetail({
|
||||
@ -241,13 +243,8 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await safetyrehearsalEdit(data)
|
||||
|
@ -222,9 +222,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
@ -243,9 +243,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
@ -200,6 +200,7 @@ const formData = reactive({
|
||||
pass_rate: "",
|
||||
dept_id: '',
|
||||
org_id: "",
|
||||
target_standard: ''
|
||||
|
||||
})
|
||||
|
||||
@ -250,9 +251,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
formData.file = formDataannex.map((item) => item.uri)
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
@ -200,7 +200,6 @@
|
||||
</el-tabs>
|
||||
|
||||
</el-form>
|
||||
<reviewprocess />
|
||||
</popup>
|
||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||
<projectTable @customEvent="customEvent"></projectTable>
|
||||
|
@ -309,9 +309,8 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
||||
}
|
||||
|
||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
|
Loading…
x
Reference in New Issue
Block a user