add
This commit is contained in:
parent
b2818ff4f2
commit
263eb68548
@ -1,34 +1,36 @@
|
||||
import request from '@/utils/request'
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 工种记录列表
|
||||
export function projectjobtypeLists(params: any) {
|
||||
return request.get({ url: '/project.project_job_type/lists', params })
|
||||
return request.get({ url: "/project.project_job_type/lists", params });
|
||||
}
|
||||
|
||||
// 添加工种记录
|
||||
export function projectjobtypeAdd(params: any) {
|
||||
return request.post({ url: '/project.project_job_type/add', params })
|
||||
return request.post({ url: "/project.project_job_type/add", params });
|
||||
}
|
||||
|
||||
// 编辑工种记录
|
||||
export function projectjobtypeEdit(params: any) {
|
||||
return request.post({ url: '/project.project_job_type/edit', params })
|
||||
return request.post({ url: "/project.project_job_type/edit", params });
|
||||
}
|
||||
|
||||
// 删除工种记录
|
||||
export function projectjobtypeDelete(params: any) {
|
||||
return request.post({ url: '/project.project_job_type/delete', params })
|
||||
return request.post({ url: "/project.project_job_type/delete", params });
|
||||
}
|
||||
|
||||
// 工种记录详情
|
||||
export function projectjobtypeDetail(params: any) {
|
||||
return request.get({ url: '/project.project_job_type/detail', params })
|
||||
return request.get({ url: "/project.project_job_type/detail", params });
|
||||
}
|
||||
|
||||
|
||||
// 工种列表
|
||||
export function projectjobtypeAll(params: any) {
|
||||
return request.get({ url: '/project.project_job_type/all', params })
|
||||
return request.get({ url: "/project.project_job_type/all", params });
|
||||
}
|
||||
|
||||
|
||||
// 工种列表
|
||||
export function projectjobtypeSearch(params: any) {
|
||||
return request.get({ url: "/project.project_job_type/datas", params });
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-tooltip :content="content" v-if="settingStore.showToolTip">
|
||||
<el-icon :class="class" @click="navGo(url)">
|
||||
<el-icon :class="class" @click="navGo(url)" class="cursor-pointer">
|
||||
<InfoFilled />
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
|
@ -1,17 +1,14 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<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;">
|
||||
<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-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>
|
||||
@ -64,7 +61,9 @@
|
||||
<el-col :span="24" v-if="mode == 'add'">
|
||||
<div style=" display: flex;justify-content: flex-end;margin-bottom: 30px;">
|
||||
<el-button @click="showDialog = true" type="primary" plain>选择材料</el-button>
|
||||
<toolTip content="可在项目管理-项目预算-材料预算-材料预算添加"></toolTip>
|
||||
<toolTip content="可在项目管理-项目预算-材料预算-材料预算添加"
|
||||
url="/construction/project/project_cost/project_material_budget/project_material_budget">
|
||||
</toolTip>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-row v-if="mode == 'add'">
|
||||
|
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
@ -19,8 +18,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
<el-input v-model="project_name" readonly clearable placeholder="请选择项目"
|
||||
:disabled="project" />
|
||||
<el-input v-model="project_name" readonly clearable placeholder="请选择项目" :disabled="project" />
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码" prop="project_id"
|
||||
@ -97,7 +95,8 @@
|
||||
<div style=" display: flex;justify-content: flex-end;margin-bottom: 30px;">
|
||||
<el-button @click="showDialog2 = true" type="primary" :disabled="!formData.project_id"
|
||||
plain>选择采购申请</el-button>
|
||||
<toolTip content="可在材料管理-采购申请-采购申请添加"></toolTip>
|
||||
<toolTip content="可在材料管理-采购申请-采购申请添加"
|
||||
url="/construction/material/material_purchase_request/material_purchase_request"></toolTip>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
@ -159,8 +158,7 @@
|
||||
<el-table-column label="税率(%)" prop="tax_rate">
|
||||
|
||||
<template #default="{ row, $index }">
|
||||
<el-select v-model="row.tax_rate" clearable placeholder="请选择税率"
|
||||
value-key="name">
|
||||
<el-select v-model="row.tax_rate" clearable placeholder="请选择税率" value-key="name">
|
||||
<el-option v-for="(item, index) in dictData.tax_rate" :key="index"
|
||||
:label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
|
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
@ -18,7 +17,8 @@
|
||||
<el-option v-for="(item, index) in protype" :key="index" :label="item.name"
|
||||
:value="parseInt(item.id)" />
|
||||
</el-select>
|
||||
<ToolTip content="可在项目管理--项目设置--项目类型设置里面添加项目类型"></ToolTip>
|
||||
<ToolTip content="可在项目管理--项目设置--项目类型设置里面添加项目类型"
|
||||
url="/construction/project/project_configure/project_type_set"></ToolTip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -120,8 +120,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="建设方付款方式" prop="construction_payment_method">
|
||||
<el-input v-model="formData.construction_payment_method" clearable
|
||||
placeholder="请输入建设方付款方式" />
|
||||
<el-input v-model="formData.construction_payment_method" clearable placeholder="请输入建设方付款方式" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -153,8 +152,8 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="建设方财务状况" prop="construction_financial_status">
|
||||
<el-radio-group v-model="formData.construction_financial_status" placeholder="请选择建设方财务状况">
|
||||
<el-radio v-for="( item, index ) in dictData.construction_financial_status "
|
||||
:key="index" :label="parseInt(item.value)">
|
||||
<el-radio v-for="( item, index ) in dictData.construction_financial_status " :key="index"
|
||||
:label="parseInt(item.value)">
|
||||
{{ item.name }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
|
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules" inline>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
@ -53,8 +52,7 @@
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="投保金额(元)" prop="insured_amount">
|
||||
<el-input v-model="formData.insured_amount" clearable type="number"
|
||||
placeholder="请输入投保金额(元)" />
|
||||
<el-input v-model="formData.insured_amount" clearable type="number" placeholder="请输入投保金额(元)" />
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="保险公司" prop="insurance_company">
|
||||
@ -78,23 +76,7 @@
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="合同附件">
|
||||
<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>
|
||||
|
||||
<uplaodAnnex :formData="formData"></uplaodAnnex>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -182,26 +164,8 @@ const customEvent1 = (e) => {
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑保险管理' : '新增保险管理'
|
||||
})
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
|
||||
|
||||
// 表单验证
|
||||
const formRules = reactive<any>({
|
||||
@ -213,18 +177,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}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
|
||||
}
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
@ -248,9 +200,6 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
||||
}
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
|
@ -40,33 +40,20 @@
|
||||
<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="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目编码" prop="project_code" :render-header="pager.calcWidth" />
|
||||
<el-table-column label="项目名称" prop="project_name" :render-header="pager.calcWidth" />
|
||||
<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="insurance_date" show-overflow-tooltip />
|
||||
<el-table-column label="到期日期" prop="due_date" show-overflow-tooltip />
|
||||
<el-table-column label="保险种类" prop="type" show-overflow-tooltip />
|
||||
<el-table-column label="保单号" prop="insurance_no" show-overflow-tooltip />
|
||||
<el-table-column label="保费(元)" prop="insurance" show-overflow-tooltip />
|
||||
<el-table-column label="投保金额(元)" prop="insured_amount" show-overflow-tooltip />
|
||||
<el-table-column label="保费(元)" prop="insurance" show-overflow-tooltip width="100" />
|
||||
<el-table-column label="投保金额(元)" prop="insured_amount" show-overflow-tooltip width="130" />
|
||||
<el-table-column label="保险公司" prop="insurance_company" show-overflow-tooltip />
|
||||
<el-table-column label="保单明细" prop="insurance_detail" show-overflow-tooltip />
|
||||
<el-table-column label="发票编号" prop="invoice_no" show-overflow-tooltip />
|
||||
<el-table-column label="经办人" prop="handler" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="annex" show-overflow-tooltip>
|
||||
|
||||
<template #default="{ row }">
|
||||
<div v-if="row.annex && row.annex.length > 0">
|
||||
<div v-for="(item, i) in row.annex " :key='i'>
|
||||
<el-link :href="item" target="_blank">文件{{ i + 1 }}查看</el-link>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
暂无文件
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="人员标识" prop="per_daily_living" show-overflow-tooltip /> -->
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
|
||||
|
@ -1,16 +1,13 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="85vw" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="85vw" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
||||
<div
|
||||
style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||
<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-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>
|
||||
@ -27,22 +24,7 @@
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件">
|
||||
<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 formData.annex" 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>
|
||||
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -178,18 +160,6 @@ const customEvent = (e) => {
|
||||
}
|
||||
if (props.project) customEvent(props.project);
|
||||
|
||||
// 上传文件
|
||||
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 formRules = reactive<any>({
|
||||
|
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules" inline>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
@ -12,8 +11,7 @@
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码" prop="project_id">
|
||||
<el-input class="w-[220px]" v-model="project_code" clearable placeholder="请输入项目编码"
|
||||
disabled />
|
||||
<el-input class="w-[220px]" v-model="project_code" clearable placeholder="请输入项目编码" disabled />
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="姓名" prop="project_person_id" @click="showDialog1 = true"
|
||||
@ -36,8 +34,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同状态" prop="contract_status"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select class="flex-1" v-model="formData.contract_status" clearable
|
||||
placeholder="请选择合同状态">
|
||||
<el-select class="flex-1" v-model="formData.contract_status" clearable placeholder="请选择合同状态">
|
||||
<el-option v-for="(item, index) in dictData.labor_contract_status" :key="index"
|
||||
:label="item.name" :value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
@ -63,8 +60,8 @@
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="试用期起始日期" prop="trial_start_date">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.trial_start_date" clearable
|
||||
type="date" value-format="YYYY-MM-DD" placeholder="选择计划开始日期">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.trial_start_date" clearable type="date"
|
||||
value-format="YYYY-MM-DD" placeholder="选择计划开始日期">
|
||||
</el-date-picker>
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="8">
|
||||
@ -92,31 +89,14 @@
|
||||
</el-date-picker>
|
||||
</el-form-item> </el-col><el-col :span="8">
|
||||
<el-form-item label="解除原因" prop="release_reason">
|
||||
<el-input class="w-[220px]" v-model="formData.release_reason" clearable
|
||||
placeholder="请输入合同名称" />
|
||||
<el-input class="w-[220px]" v-model="formData.release_reason" clearable placeholder="请输入合同名称" />
|
||||
</el-form-item> </el-col><el-col :span="8">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input class="w-[220px]" v-model="formData.remark" clearable placeholder="请输入合同名称" />
|
||||
</el-form-item> </el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="合同附件">
|
||||
<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>
|
||||
|
||||
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -208,25 +188,6 @@ const customEvent1 = (e) => {
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑劳动合同' : '新增劳动合同'
|
||||
})
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
|
||||
);
|
||||
};
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -240,18 +201,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}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
|
||||
|
||||
}
|
||||
for (const key in formData) {
|
||||
if (data[key] != null && data[key] != undefined) {
|
||||
//@ts-ignore
|
||||
@ -275,9 +224,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
||||
}
|
||||
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
|
@ -12,8 +12,8 @@
|
||||
|
||||
<el-form-item label="合同状态" prop="contract_status">
|
||||
<el-select class="w-[280px]" v-model="queryParams.contract_status" clearable placeholder="请选择合同状态">
|
||||
<el-option v-for="(item, index) in dictData.labor_contract_status" :key="index"
|
||||
:label="item.name" :value="parseInt(item.value)" />
|
||||
<el-option v-for="(item, index) in dictData.labor_contract_status" :key="index" :label="item.name"
|
||||
:value="parseInt(item.value)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同名称" prop="contract_title">
|
||||
@ -43,44 +43,29 @@
|
||||
<div class="mt-4">
|
||||
<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="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目编码" prop="project_code" :render-header="pager.calcWidth" />
|
||||
<el-table-column label="项目名称" prop="project_name" :render-header="pager.calcWidth" />
|
||||
<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="per_daily_living" show-overflow-tooltip>
|
||||
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.labor_contract_status" :value="row.contract_status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同类别" prop="per_daily_living" show-overflow-tooltip>
|
||||
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.labor_contract_type" :value="row.contract_type" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同名称" prop="contract_title_text" show-overflow-tooltip>
|
||||
<!-- <template #default="{ row }">
|
||||
<dict-value :options="dictData.labor_contract_name" :value="row.contract_name" />
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<el-table-column label="合同签定日期" prop="signing_date" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="试用期起始日期" prop="trial_start_date" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="试用期结束日期" prop="trial_end_date" show-overflow-tooltip />
|
||||
|
||||
<el-table-column label="合同签定日期" prop="signing_date" show-overflow-tooltip width="120" />
|
||||
<el-table-column label="试用期起始日期" prop="trial_start_date" show-overflow-tooltip width="140" />
|
||||
<el-table-column label="试用期结束日期" prop="trial_end_date" show-overflow-tooltip width="140" />
|
||||
<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="release_time" show-overflow-tooltip />
|
||||
|
||||
|
||||
<!-- <el-table-column label="人员标识" prop="per_daily_living" show-overflow-tooltip /> -->
|
||||
<el-table-column label="操作" width="160" fixed="right">
|
||||
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['project.project/edit']" type="primary" link @click="handleEdit(row)">
|
||||
编辑
|
||||
@ -92,7 +77,6 @@
|
||||
<el-button v-perms="['project.project/detail']" link @click="handledetail(row)">
|
||||
详情
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -1,16 +1,13 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="100px" :rules="formRules">
|
||||
<div
|
||||
style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||
<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-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>
|
||||
@ -20,7 +17,9 @@
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="project_name" readonly clearable placeholder="点击选择项目" :disabled="project"
|
||||
class="flex-1" />
|
||||
<toolTip content="需要在项目管理-项目预算-总预算编制的总预算项目"></toolTip>
|
||||
<toolTip content="需要在项目管理-项目预算-总预算编制的总预算项目"
|
||||
url="/construction/project/project_cost/project_total_budget/project_total_budget">
|
||||
</toolTip>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
@ -3,89 +3,51 @@
|
||||
<popup ref="popupRef" title="项目人员详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px">
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目名称">
|
||||
{{ formData.project_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.project_code }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="项目名称" label-align="left" align="left">
|
||||
{{ formData.project_name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="项目编码" label-align="left" align="left">
|
||||
{{ formData.project_code }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="姓名" label-align="left" align="left">
|
||||
{{ formData.name }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号" label-align="left" align="left">
|
||||
{{ formData.idcard }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工种" label-align="left" align="left">
|
||||
{{ formData.work_type_text }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="人工单价" label-align="left" align="left">
|
||||
{{ formData.unit_price }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证正面" label-align="left" align="left">
|
||||
<el-link :href="formData.idcard_front" type="primary">身份证正面</el-link>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证反面" label-align="left" align="left">
|
||||
<!-- {{ formData.project_name }} -->
|
||||
<el-link :href="formData.idcard_backend" type="primary">身份证反面</el-link>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名">
|
||||
{{ formData.name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="身份证号">
|
||||
{{ formData.idcard
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工种">
|
||||
{{ formData.work_type_text }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="人工单价">
|
||||
{{ formData.unit_price }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="身份证正面">
|
||||
<div v-if="formData.idcard_front && formData.idcard_front.length > 0">
|
||||
<material-picker v-model="formData.idcard_front" />
|
||||
</div>
|
||||
<div v-else>暂无照片</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="银行卡照片" label-align="left" align="left">
|
||||
<!-- {{ formData.bank_card }} -->
|
||||
<el-link :href="formData.bank_card" type="primary">银行卡照片</el-link>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="身份证反面">
|
||||
<div v-if="formData.idcard_backend && formData.idcard_backend.length > 0">
|
||||
<material-picker v-model="formData.idcard_backend" />
|
||||
</div>
|
||||
<div v-else>暂无照片</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="银行卡照片">
|
||||
<div v-if="formData.bank_card && formData.bank_card.length > 0">
|
||||
<material-picker v-model="formData.bank_card" />
|
||||
</div>
|
||||
<div v-else>暂无照片</div>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="银行卡号">
|
||||
{{ formData.bank_no }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开户银行">
|
||||
{{ formData.deposit_bank }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注">
|
||||
{{ formData.remark }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="银行卡号" label-align="left" align="left">
|
||||
{{ formData.bank_no }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开户银行" label-align="left" align="left">
|
||||
{{ formData.deposit_bank }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注" label-align="left" align="left">
|
||||
{{ formData.remark }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-tabs v-model="activeName" class="demo-tabs mt-[10px]" @tab-click="handleClick">
|
||||
<el-tab-pane label="劳动合同" name="first">
|
||||
<el-table :data="laborContractsList">
|
||||
|
||||
|
||||
<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="contract_status_text" show-overflow-tooltip />
|
||||
@ -95,9 +57,7 @@
|
||||
<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="remark" show-overflow-tooltip />
|
||||
|
||||
</el-table>
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="保险记录" name="second">
|
||||
<el-table :data="insurancesList">
|
||||
|
@ -37,7 +37,6 @@
|
||||
<el-input v-model="formData.mobile" clearable placeholder="请输入手机号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工种" prop="work_type"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'change' }]">
|
||||
@ -45,6 +44,8 @@
|
||||
<el-option v-for="(item, index) in allJobType" :key="index" :label="item.type_name"
|
||||
:value="parseInt(item.id)" />
|
||||
</el-select>
|
||||
<toolTip content="可在项目管理-项目人力-工种设置添加"
|
||||
url="/construction/project/project_personnel/project_job_type"></toolTip>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
@ -61,20 +62,26 @@
|
||||
type="number" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="身份证正面">
|
||||
<material-picker v-model="formData.idcard_front" />
|
||||
<!-- <uploadAnnex :formData="formData" value="idcard_front"></uploadAnnex> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="身份证反面">
|
||||
<material-picker v-model="formData.idcard_backend" />
|
||||
<!-- <uploadAnnex :formData="formData" value="idcard_backend"></uploadAnnex> -->
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="银行卡照片">
|
||||
<material-picker v-model="formData.bank_card" />
|
||||
<!-- <uploadAnnex :formData="formData" value="bank_card"></uploadAnnex> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
@ -97,15 +104,7 @@
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<el-dialog v-model="showDialog2" title="选择项目" width="70%">
|
||||
<projectDialog @customEvent="customEvent2"></projectDialog>
|
||||
</el-dialog>
|
||||
|
@ -9,10 +9,8 @@
|
||||
<el-input class="w-[280px]" v-model="queryParams.name" clearable placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工种" prop="work_type">
|
||||
<el-select v-model="queryParams.work_type" clearable placeholder="请选择工种">
|
||||
<el-option v-for="(item, index) in dictData.work_type" :key="index" :label="item.name"
|
||||
:value="parseInt(item.value)" />
|
||||
</el-select></el-form-item>
|
||||
<select-remote :formData="queryParams" model="work_type" :api="projectjobtypeSearch"></select-remote>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
<el-button @click="resetParams">重置</el-button>
|
||||
@ -34,17 +32,11 @@
|
||||
<div class="mt-4">
|
||||
<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="ID" prop="id" 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="project_name" :render-header="pager.calcWidth" />
|
||||
<el-table-column label="项目编码" prop="project_code" :render-header="pager.calcWidth" />
|
||||
<el-table-column label="姓名" prop="name" show-overflow-tooltip />
|
||||
<el-table-column label="身份证号" prop="idcard" show-overflow-tooltip />
|
||||
<el-table-column label="工种" show-overflow-tooltip>
|
||||
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.work_type" :value="row.work_type" />
|
||||
</template>
|
||||
<el-table-column label="工种" show-overflow-tooltip prop="work_type_text">
|
||||
</el-table-column>
|
||||
<el-table-column label="人工单价" prop="unit_price" show-overflow-tooltip />
|
||||
<el-table-column label="银行卡号" prop="bank_no" show-overflow-tooltip />
|
||||
@ -86,6 +78,10 @@ const protype = reactive([])
|
||||
import feedback from '@/utils/feedback'
|
||||
import EditPopup from './edit.vue'
|
||||
import DetailPopup from './detail.vue'
|
||||
import { projectjobtypeSearch } from '@/api/project_job_type'
|
||||
|
||||
|
||||
|
||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
// 是否显示编辑框
|
||||
|
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
@ -20,8 +19,7 @@
|
||||
<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-input v-model="formData.settlement_amount" clearable placeholder="请输入结算金额" @input="amountinput" />
|
||||
</el-form-item>
|
||||
<el-form-item label="结算金额大写" prop="settlement_amount_uppercase">
|
||||
<el-input v-model="formData.settlement_amount_uppercase" readonly disabled placeholder="系统自动填写" />
|
||||
@ -38,23 +36,7 @@
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="结算明细附件">
|
||||
<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>
|
||||
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
@ -104,24 +86,7 @@ const base_url = configs.baseUrl + configs.urlPrefix
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
|
||||
const userStore = useUserStore();
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
);
|
||||
};
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
// dialog
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
@ -225,15 +190,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
deptAll({ 'org_id': data.org_id }).then((res) => {
|
||||
Object.assign(jobs, res)
|
||||
})
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
}
|
||||
|
||||
project_name.value = data.project_name
|
||||
custom_name.value = data.custom_name
|
||||
project_code.value = data.project_code
|
||||
@ -258,9 +215,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
|
@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
||||
@close="handleClose">
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true"
|
||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
@ -11,8 +10,7 @@
|
||||
<el-input v-model="formData.contract_name" clearable readonly placeholder="系统自动填写" />
|
||||
</el-form-item>
|
||||
<el-form-item label="结算金额" prop="settlement_amount">
|
||||
<el-input v-model="formData.settlement_amount" clearable placeholder="请输入结算金额"
|
||||
@input="amountinput" />
|
||||
<el-input v-model="formData.settlement_amount" clearable placeholder="请输入结算金额" @input="amountinput" />
|
||||
</el-form-item>
|
||||
<el-form-item label="结算金额大写" prop="settlement_amount_uppercase">
|
||||
<el-input v-model="formData.settlement_amount_uppercase" readonly disabled placeholder="系统自动填写" />
|
||||
@ -29,24 +27,8 @@
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="结算明细附件">
|
||||
<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>
|
||||
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
</popup>
|
||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||
@ -94,24 +76,7 @@ const base_url = configs.baseUrl + configs.urlPrefix
|
||||
import useUserStore from "@/stores/modules/user";
|
||||
|
||||
const userStore = useUserStore();
|
||||
// 上传文件
|
||||
const handleAvatarSuccess_four = (
|
||||
response,
|
||||
uploadFile
|
||||
) => {
|
||||
if (response.code == 0) {
|
||||
ElMessage.error(response.msg);
|
||||
return;
|
||||
}
|
||||
formDataannex.push(
|
||||
{ uri: response.data.uri, name: response.data.name }
|
||||
|
||||
);
|
||||
};
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
}
|
||||
// dialog
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
@ -191,15 +156,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
deptAll({ 'org_id': data.org_id }).then((res) => {
|
||||
Object.assign(jobs, res)
|
||||
})
|
||||
if (data.annex && data.annex.length > 0) {
|
||||
const arry1 = data.annex.map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
}
|
||||
|
||||
project_name.value = data.project_name
|
||||
custom_name.value = data.custom_name
|
||||
project_code.value = data.project_code
|
||||
@ -224,9 +181,6 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.annex = formDataannex.map((item) => item.uri)
|
||||
}
|
||||
await formRef.value?.validate()
|
||||
const data = { ...formData, }
|
||||
mode.value == 'edit'
|
||||
|
@ -10,7 +10,8 @@
|
||||
<el-option v-for="(item, index) in list" :key="index" :label="item.name"
|
||||
:value="parseInt(item.id)" />
|
||||
</el-select>
|
||||
<toolTip content="项目管理-项目设置-项目类型设置添加"></toolTip>
|
||||
<toolTip content="项目管理-项目设置-项目类型设置添加"
|
||||
url="/construction/project/project_configure/project_type_set"></toolTip>
|
||||
</el-form-item>
|
||||
</el-col><el-col :span="8">
|
||||
<el-form-item label="父级WBS编码" prop="sup_wbs_code">
|
||||
@ -41,7 +42,8 @@
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name"
|
||||
:value="parseInt(item.id)" />
|
||||
</el-select>
|
||||
<toolTip content="项目管理-项目设置-项目WBS设置添加"></toolTip>
|
||||
<toolTip content="项目管理-项目设置-项目WBS设置添加"
|
||||
url="/construction/project/project_configure/project_wbs_set"></toolTip>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
|
@ -122,7 +122,7 @@
|
||||
<el-col :span="8">
|
||||
<el-form-item label="账户编码" @click="showDialog2 = true">
|
||||
<el-input v-model="account_sn" readonly clearable placeholder="请选择收款账户" class="!flex flex-1" />
|
||||
<toolTip content="可在财务管理--银行账户--银行账户添加"></toolTip>
|
||||
<toolTip content="可在财务管理--银行账户--银行账户添加" url="/construction/finance/bank/bank_account"></toolTip>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
|
@ -105,7 +105,7 @@
|
||||
<el-form-item label="账户编码" prop="collection_account">
|
||||
<el-input v-model="formData.bank_account_info.account_sn" @click="showDialog = true" readonly
|
||||
clearable placeholder="请输入收款账号" class="!flex flex-1" />
|
||||
<toolTip content="可在财务管理--银行账户--银行账户添加"></toolTip>
|
||||
<toolTip content="可在财务管理--银行账户--银行账户添加" url="/construction/finance/bank/bank_account"></toolTip>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user