add
This commit is contained in:
parent
6a19cfd885
commit
d636dce1a7
@ -30,11 +30,12 @@
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="审批记录" label-align="left" align="left">
|
<el-descriptions-item label="审批记录" label-align="left" align="left">
|
||||||
<div class="steps-cls">
|
<div class="steps-cls">
|
||||||
<el-steps direction="vertical" :active="formData.record.length" :align-center="true" :space="50"
|
<el-steps direction="vertical" :active="4" :align-center="true" :space="50"
|
||||||
style="margin-top: 20px">
|
style="margin-top: 20px">
|
||||||
<el-step :title="item.check_time + ' ' + item.title"
|
<el-step :title="item.check_time + ' ' + item.title" v-for="(item, index) in formData.record"
|
||||||
v-for="(item, index) in formData.record" :key="index" />
|
:key="index" />
|
||||||
</el-steps>
|
</el-steps>
|
||||||
|
<!-- {{ formData.record.length }} -->
|
||||||
</div>
|
</div>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<div>
|
<div>
|
||||||
@ -173,7 +174,7 @@ const getStep = (item: Object, index: Number) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
flowapproveDetail({ id: props.approve_id }).then(res => {
|
flowapproveDetail({ id: props.approve_id }).then(res => {
|
||||||
activeStep.value = res.step.findIndex((item: Object) => item?.is_active == 1)
|
activeStep.value = (res.step.findIndex((item: Object) => item?.is_active == 1)) + 1
|
||||||
setFormData(res)
|
setFormData(res)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -75,5 +75,8 @@ const getImgById = (id: number) => {
|
|||||||
else if (id == 1548) {
|
else if (id == 1548) {
|
||||||
return { img: '/index/CWGLACT.png', actImg: "/index/CWGL.png", color: '#F7BB20' }
|
return { img: '/index/CWGLACT.png', actImg: "/index/CWGL.png", color: '#F7BB20' }
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return { img: 'https:\/\/ceshi-engineering.lihaink.cn\/uploads\/files\/20240401\/202404011436288470d1853.png', actImg: "/index/CWGL.png", color: 'red' }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
@ -141,7 +141,7 @@
|
|||||||
|
|
||||||
</el-col> <el-col :span="8">
|
</el-col> <el-col :span="8">
|
||||||
<el-form-item label="账号" prop="bank_accnout">
|
<el-form-item label="账号" prop="bank_accnout">
|
||||||
<el-input v-model="formData.bank_accnout" clearable placeholder="请输入开票公司名称" />
|
<el-input v-model="formData.bank_accnout" clearable placeholder="请输入开票公司名称" type="number" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-col> <el-col :span="8">
|
</el-col> <el-col :span="8">
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -22,8 +21,7 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="项目估算" prop="project_estimation"
|
<el-form-item label="项目估算" prop="project_estimation"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-input v-model="formData.project_estimation" clearable placeholder="请输入项目估算"
|
<el-input v-model="formData.project_estimation" clearable placeholder="请输入项目估算" type="number" />
|
||||||
type="number" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -38,9 +36,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="投标时间" prop="bidding_time">
|
<el-form-item label="投标时间" prop="bidding_time">
|
||||||
<el-date-picker v-model="formData.bidding_time" format="YYYY-MM-DD"
|
<el-date-picker v-model="formData.bidding_time" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
|
||||||
value-format="YYYY-MM-DD" placeholder="请选择投标时间" class="!flex flex-1"
|
placeholder="请选择投标时间" class="!flex flex-1" clearable></el-date-picker>
|
||||||
clearable></el-date-picker>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -79,7 +76,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="保证金退还时间" prop="margin_amount_return_date">
|
<el-form-item label="保证金退还时间" prop="margin_amount_return_date" :rules="[
|
||||||
|
{
|
||||||
|
validator: chekcDate,
|
||||||
|
trigger: ['blur']
|
||||||
|
}]">
|
||||||
<el-date-picker v-model="formData.margin_amount_return_date" format="YYYY-MM-DD"
|
<el-date-picker v-model="formData.margin_amount_return_date" format="YYYY-MM-DD"
|
||||||
class="!flex flex-1" value-format="YYYY-MM-DD" placeholder="请输入保证金退还时间"
|
class="!flex flex-1" value-format="YYYY-MM-DD" placeholder="请输入保证金退还时间"
|
||||||
clearable></el-date-picker>
|
clearable></el-date-picker>
|
||||||
@ -97,8 +98,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="项目把握度" label-width="130px" prop="project_assurance">
|
<el-form-item label="项目把握度" label-width="130px" prop="project_assurance">
|
||||||
<el-select v-model="formData.project_assurance" clearable placeholder="请选择项目把握度"
|
<el-select v-model="formData.project_assurance" clearable placeholder="请选择项目把握度" class="flex-1">
|
||||||
class="flex-1">
|
|
||||||
<el-option v-for="(item, index) in dictData.project_assurance" :key="index"
|
<el-option v-for="(item, index) in dictData.project_assurance" :key="index"
|
||||||
:label="item.name" :value="parseInt(item.value)" />
|
:label="item.name" :value="parseInt(item.value)" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@ -116,22 +116,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<el-form-item label="附件">
|
<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>
|
<UploadAnnex :formData="formData"></UploadAnnex>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -195,6 +180,15 @@ const formData = reactive({
|
|||||||
approve_id: 0
|
approve_id: 0
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const chekcDate = (rule: any, value: any, callback: any) => {
|
||||||
|
if (new Date(formData.margin_amount_return_date) < new Date(formData.bid_opening_date)) {
|
||||||
|
callback(new Error('保证金退还时间早于开标日期'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//获取值
|
//获取值
|
||||||
const customEvent = (e: any) => {
|
const customEvent = (e: any) => {
|
||||||
formData.project_id = e.id;
|
formData.project_id = e.id;
|
||||||
|
@ -1,29 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
|
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||||
|
<el-col>
|
||||||
|
|
||||||
|
|
||||||
<el-row :gutter="10">
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="分部工程" prop="division_engineering"
|
<el-form-item label="分部工程" prop="division_engineering"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-input v-model="formData.division_engineering" clearable placeholder="请输入分部工程" />
|
<el-input v-model="formData.division_engineering" clearable placeholder="请输入分部工程" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col>
|
||||||
<el-form-item label="子分部工程" prop="sub_division_engineering"
|
<el-form-item label="子分部工程" prop="sub_division_engineering"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-input v-model="formData.sub_division_engineering" clearable placeholder="请输入子分部工程" />
|
<el-input v-model="formData.sub_division_engineering" clearable placeholder="请输入子分部工程" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col>
|
||||||
<el-form-item label="分项工程" prop="subentry_engineering"
|
<el-form-item label="分项工程" prop="subentry_engineering"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-input v-model="formData.subentry_engineering" clearable placeholder="请输入分项工程" />
|
<el-input v-model="formData.subentry_engineering" clearable placeholder="请输入分项工程" />
|
||||||
@ -31,22 +25,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col>
|
||||||
<el-form-item label="分项工程编码" prop="subentry_engineering_code"
|
<el-form-item label="分项工程编码" prop="subentry_engineering_code"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]" v-type="'code'">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]" v-type="'code'">
|
||||||
<el-input v-model="formData.subentry_engineering_code" clearable placeholder="请输入分项工程编码" />
|
<el-input v-model="formData.subentry_engineering_code" clearable placeholder="请输入分项工程编码" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</popup>
|
</popup>
|
||||||
|
|
||||||
@ -57,10 +41,7 @@
|
|||||||
|
|
||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
|
|
||||||
import { builddivisionAdd, builddivisionEdit, builddivisionDetail } from '@/api/build/build_division'
|
import { builddivisionAdd, builddivisionEdit, builddivisionDetail } from '@/api/build/build_division'
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
|
|
||||||
|
|
||||||
@ -124,10 +105,7 @@ const getDetail = async (row: Record<string, any>) => {
|
|||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
|
|
||||||
|
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
|
|
||||||
const data = { ...formData }
|
const data = { ...formData }
|
||||||
mode.value == 'edit'
|
mode.value == 'edit'
|
||||||
? await builddivisionEdit(data)
|
? await builddivisionEdit(data)
|
||||||
@ -140,10 +118,6 @@ const handleSubmit = async () => {
|
|||||||
const open = (type = 'add') => {
|
const open = (type = 'add') => {
|
||||||
mode.value = type
|
mode.value = type
|
||||||
popupRef.value?.open()
|
popupRef.value?.open()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关闭回调
|
// 关闭回调
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
<el-table-column label="分项工程" prop="subentry_engineering" show-overflow-tooltip />
|
<el-table-column label="分项工程" prop="subentry_engineering" show-overflow-tooltip />
|
||||||
<el-table-column label="分项工程编码" prop="subentry_engineering_code" show-overflow-tooltip />
|
<el-table-column label="分项工程编码" prop="subentry_engineering_code" show-overflow-tooltip />
|
||||||
|
|
||||||
<el-table-column label="操作" width="150" fixed="right">
|
<el-table-column label="操作" width="170" fixed="right">
|
||||||
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['build.build_division/edit']" type="primary" link @click="handleEdit(row)">
|
<el-button v-perms="['build.build_division/edit']" type="primary" link @click="handleEdit(row)">
|
||||||
|
@ -2,127 +2,76 @@
|
|||||||
<div class="detail-popup">
|
<div class="detail-popup">
|
||||||
<popup ref="popupRef" title="施工计划详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
<popup ref="popupRef" title="施工计划详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||||
<el-form ref="formRef" :model="formData" label-width="120px">
|
<el-form ref="formRef" :model="formData" label-width="120px">
|
||||||
|
<el-descriptions :column="3" border>
|
||||||
<el-row>
|
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label">
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目名称">
|
|
||||||
{{ formData.project_name }}
|
{{ formData.project_name }}
|
||||||
</el-form-item>
|
</el-descriptions-item>
|
||||||
</el-col>
|
<el-descriptions-item label="项目编码" label-align="left" align="left" label-class-name="my-label">
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="项目编码">
|
|
||||||
{{ formData.project_code }}
|
{{ formData.project_code }}
|
||||||
</el-form-item>
|
</el-descriptions-item>
|
||||||
</el-col>
|
<el-descriptions-item label="计划开始日期" label-align="left" align="left" label-class-name="my-label">
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="计划开始日期">
|
|
||||||
{{ formData.plan_start_date }}
|
{{ formData.plan_start_date }}
|
||||||
</el-form-item>
|
</el-descriptions-item>
|
||||||
</el-col>
|
<el-descriptions-item label="计划结束日期" label-align="left" align="left" label-class-name="my-label">
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="计划结束日期">
|
|
||||||
{{ formData.plan_end_date }}
|
{{ formData.plan_end_date }}
|
||||||
</el-form-item>
|
</el-descriptions-item>
|
||||||
</el-col>
|
<el-descriptions-item label="工序步骤号" label-align="left" align="left" label-class-name="my-label">
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工序步骤号">
|
|
||||||
{{ formData.process_step_no }}
|
{{ formData.process_step_no }}
|
||||||
</el-form-item>
|
</el-descriptions-item>
|
||||||
</el-col>
|
<el-descriptions-item label="工序步骤" label-align="left" align="left" label-class-name="my-label">
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工序步骤">
|
|
||||||
{{ formData.process_step }}
|
{{ formData.process_step }}
|
||||||
</el-form-item>
|
</el-descriptions-item>
|
||||||
</el-col>
|
<el-descriptions-item label="质量控制点" label-align="left" align="left" label-class-name="my-label">
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="图例说明">
|
|
||||||
<div v-if="formData.file && formData.file.length > 0"> <img :src="item.uri"
|
|
||||||
v-for="item in formData.file" style="width:200px" /></div>
|
|
||||||
<div v-else>暂无文件</div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="质量控制点">
|
|
||||||
{{ formData.quality_control_points }}
|
{{ formData.quality_control_points }}
|
||||||
</el-form-item>
|
</el-descriptions-item>
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-descriptions-item label="班组长" label-align="left" align="left" label-class-name="my-label">
|
||||||
<el-form-item label="班组长">
|
|
||||||
{{ formData.project_member_name }}
|
{{ formData.project_member_name }}
|
||||||
</el-form-item>
|
</el-descriptions-item>
|
||||||
</el-col>
|
<el-descriptions-item label="施工人员" label-align="left" align="left" label-class-name="my-label">
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="施工人员">
|
|
||||||
{{ formData.work_user }}
|
{{ formData.work_user }}
|
||||||
</el-form-item>
|
</el-descriptions-item>
|
||||||
</el-col>
|
<el-descriptions-item label="施工内容" label-align="left" align="left" label-class-name="my-label">
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="施工内容">
|
|
||||||
{{ formData.work_content }}
|
{{ formData.work_content }}
|
||||||
</el-form-item>
|
</el-descriptions-item>
|
||||||
</el-col>
|
<el-descriptions-item label="作业量" label-align="left" align="left" label-class-name="my-label">
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="作业量">
|
|
||||||
{{ formData.workload }}
|
{{ formData.workload }}
|
||||||
</el-form-item>
|
</el-descriptions-item>
|
||||||
</el-col>
|
<el-descriptions-item label="单位" label-align="left" align="left" label-class-name="my-label">
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="单位">
|
|
||||||
{{ formData.unit }}
|
{{ formData.unit }}
|
||||||
</el-form-item>
|
</el-descriptions-item>
|
||||||
</el-col>
|
<el-descriptions-item label="单价" label-align="left" align="left" label-class-name="my-label">
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="单价">
|
|
||||||
{{ formData.price }}
|
{{ formData.price }}
|
||||||
</el-form-item>
|
</el-descriptions-item>
|
||||||
</el-col>
|
<el-descriptions-item label="金额" label-align="left" align="left" label-class-name="my-label">
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="金额">
|
|
||||||
{{ formData.amount }}
|
{{ formData.amount }}
|
||||||
</el-form-item>
|
</el-descriptions-item>
|
||||||
</el-col>
|
<el-descriptions-item label="完工作业量" label-align="left" align="left" label-class-name="my-label">
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="完工作业量">
|
|
||||||
{{ formData.done_workload }}
|
{{ formData.done_workload }}
|
||||||
</el-form-item>
|
</el-descriptions-item> <el-descriptions-item label="剩余作业量" label-align="left" align="left"
|
||||||
</el-col>
|
label-class-name="my-label">
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="剩余作业量">
|
|
||||||
{{ formData.residue_workload }}
|
{{ formData.residue_workload }}
|
||||||
</el-form-item>
|
</el-descriptions-item> <el-descriptions-item label="进度" label-align="left" align="left"
|
||||||
</el-col>
|
label-class-name="my-label">
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="进度(%)">
|
|
||||||
{{ formData.completion_degree }}
|
{{ formData.completion_degree }}
|
||||||
</el-form-item>
|
</el-descriptions-item>
|
||||||
</el-col>
|
|
||||||
|
<el-descriptions-item label="图例说明" label-align="left" align="left" label-class-name="my-label">
|
||||||
|
<annexLink :annex="formData.file"></annexLink>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<div style="margin:10px 0">施工汇报</div>
|
<div style="margin:10px 0">施工汇报</div>
|
||||||
<div>
|
<div>
|
||||||
<el-table :data="buildreportsList">
|
<el-table :data="buildreportsList">
|
||||||
|
|
||||||
<el-table-column label="施工汇报单号" prop="report_code" show-overflow-tooltip />
|
<el-table-column label="施工汇报单号" prop="report_code" 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="填报日期" prop="create_time" show-overflow-tooltip />
|
<el-table-column label="填报日期" prop="create_time" show-overflow-tooltip />
|
||||||
<el-table-column label="现场照片" prop="process_step_no">
|
<el-table-column label="现场照片" prop="process_step_no">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
|
||||||
<div v-if="row.scene_file && row.scene_file.length > 0">
|
<div v-if="row.scene_file && row.scene_file.length > 0">
|
||||||
<!--
|
|
||||||
<material-picker
|
|
||||||
v-model="row.scene_file" /> -->
|
|
||||||
|
|
||||||
<img v-for="item in row.scene_file" :src="item" style="width:50px">
|
<img v-for="item in row.scene_file" :src="item" style="width:50px">
|
||||||
|
|
||||||
<!-- {{ row.scene_file }} -->
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else>暂无文件</div>
|
<div v-else>暂无文件</div>
|
||||||
</template>
|
</template>
|
||||||
@ -131,38 +80,32 @@
|
|||||||
<el-table-column label="单价" prop="price" show-overflow-tooltip />
|
<el-table-column label="单价" prop="price" show-overflow-tooltip />
|
||||||
<el-table-column label="金额" prop="report_amount" show-overflow-tooltip />
|
<el-table-column label="金额" prop="report_amount" show-overflow-tooltip />
|
||||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||||
|
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-end mt-4">
|
<div class="flex justify-end mt-4">
|
||||||
|
|
||||||
<el-pagination v-model:current-page="pager1.page" v-model:page-size="pager1.size"
|
<el-pagination v-model:current-page="pager1.page" v-model:page-size="pager1.size"
|
||||||
:page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper"
|
:page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="totalnum1"
|
||||||
:total="totalnum1" @size-change="handleSizeChange1" @current-change="handleCurrentChange1" />
|
@size-change="handleSizeChange1" @current-change="handleCurrentChange1" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div style="margin:10px 0">人工明细</div>
|
<div style="margin:10px 0">人工明细</div>
|
||||||
<div>
|
<div>
|
||||||
<el-table :data="buildpersonsList">
|
<el-table :data="buildpersonsList">
|
||||||
|
|
||||||
<el-table-column label="施工汇报单号" prop="report_code" show-overflow-tooltip />
|
<el-table-column label="施工汇报单号" prop="report_code" show-overflow-tooltip />
|
||||||
<el-table-column label="日期" prop="report_date" show-overflow-tooltip />
|
<el-table-column label="日期" prop="report_date" show-overflow-tooltip />
|
||||||
<el-table-column label="姓名" prop="user_name" show-overflow-tooltip />
|
<el-table-column label="姓名" prop="user_name" show-overflow-tooltip />
|
||||||
<el-table-column label="身份证号" prop="user_idcard" show-overflow-tooltip />
|
<el-table-column label="身份证号" prop="user_idcard" show-overflow-tooltip />
|
||||||
<el-table-column label="工种" prop="user_work_type" show-overflow-tooltip />
|
<el-table-column label="工种" prop="user_work_type" show-overflow-tooltip />
|
||||||
<el-table-column label="今日完工量" prop="work_num" show-overflow-tooltip />
|
<el-table-column label="今日完工量" prop="work_num" show-overflow-tooltip />
|
||||||
|
|
||||||
<el-table-column label="单价" prop="price" show-overflow-tooltip />
|
<el-table-column label="单价" prop="price" show-overflow-tooltip />
|
||||||
<el-table-column label="金额" prop="amount" 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="备注" prop="remark" show-overflow-tooltip />
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-end mt-4">
|
<div class="flex justify-end mt-4">
|
||||||
<el-pagination v-model:current-page="pager.page" v-model:page-size="pager.size"
|
<el-pagination v-model:current-page="pager.page" v-model:page-size="pager.size"
|
||||||
:page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper"
|
:page-sizes="[10, 20, 30, 40]" layout="total, sizes, prev, pager, next, jumper" :total="totalnum"
|
||||||
:total="totalnum" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
@size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</popup>
|
</popup>
|
||||||
@ -174,8 +117,6 @@ import { usePaging } from '@/hooks/usePaging'
|
|||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
import { apiCustomDetail } from '@/api/custom'
|
import { apiCustomDetail } from '@/api/custom'
|
||||||
import { buildreportsDetail, buildpersonsDetail } from '@/api/build/build_plan'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import { buildreportLists } from "@/api/build/build_report.ts"
|
import { buildreportLists } from "@/api/build/build_report.ts"
|
||||||
import { buildreportDetaillists } from "@/api/build/build_report_detail.ts"
|
import { buildreportDetaillists } from "@/api/build/build_report_detail.ts"
|
||||||
|
|
||||||
@ -256,10 +197,6 @@ const formData = reactive({
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const getLists = (e) => {
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
Object.assign(formData, data)
|
Object.assign(formData, data)
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
|
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||||
|
|
||||||
@ -35,12 +34,6 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24" v-if="anneximg && anneximg.length > 0">
|
<el-col :span="24" v-if="anneximg && anneximg.length > 0">
|
||||||
<el-form-item label="图例说明">
|
<el-form-item label="图例说明">
|
||||||
<!-- <div v-if="anneximg && anneximg.length > 0">
|
|
||||||
<material-picker v-model="anneximg" />
|
|
||||||
</div>
|
|
||||||
<div v-else>暂无图例</div> -->
|
|
||||||
|
|
||||||
|
|
||||||
<div v-if="formData.file?.length > 0">
|
<div v-if="formData.file?.length > 0">
|
||||||
<img :src="item.uri" v-for="item in formData.file" style="width:200px" />
|
<img :src="item.uri" v-for="item in formData.file" style="width:200px" />
|
||||||
</div>
|
</div>
|
||||||
@ -58,8 +51,8 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="计划开始日期" prop="plan_start_date"
|
<el-form-item label="计划开始日期" prop="plan_start_date"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-date-picker class="flex-1 !flex" v-model="formData.plan_start_date" clearable
|
<el-date-picker class="flex-1 !flex" v-model="formData.plan_start_date" clearable type="date"
|
||||||
type="date" value-format="YYYY-MM-DD" placeholder="选择计划开始日期">
|
value-format="YYYY-MM-DD" placeholder="选择计划开始日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
<el-table-column label="单价" prop="price" show-overflow-tooltip />
|
<el-table-column label="单价" prop="price" show-overflow-tooltip />
|
||||||
<el-table-column label="金额" prop="amount" show-overflow-tooltip />
|
<el-table-column label="金额" prop="amount" show-overflow-tooltip />
|
||||||
|
|
||||||
<el-table-column label="操作" width="150" fixed="right">
|
<el-table-column label="操作" width="170" fixed="right">
|
||||||
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['build.build_plan/edit']" type="primary" link @click="handleEdit(row)">
|
<el-button v-perms="['build.build_plan/edit']" type="primary" link @click="handleEdit(row)">
|
||||||
|
37
src/views/build_process_settings/detail.js
Normal file
37
src/views/build_process_settings/detail.js
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
const detailConfig = {
|
||||||
|
title: "施工工序",
|
||||||
|
config: [
|
||||||
|
{
|
||||||
|
label: "分部工程",
|
||||||
|
value: "division_engineering"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "子分部工程",
|
||||||
|
value: "sub_division_engineering"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "分项工程",
|
||||||
|
value: "subentry_engineering"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "分项工程编码",
|
||||||
|
value: "subentry_engineering_code"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "工序步骤号",
|
||||||
|
value: "process_step_no"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "图例说明",
|
||||||
|
value: "annex",
|
||||||
|
column: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "质量控制点",
|
||||||
|
value: "quality_control_points"
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
export default detailConfig;
|
@ -1,154 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="detail-popup">
|
|
||||||
<popup ref="popupRef" title="分部分项划分详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="120px">
|
|
||||||
<el-card class="mb-2">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="分部工程">
|
|
||||||
{{ formData.division_engineering }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="子分部工程">
|
|
||||||
{{ formData.sub_division_engineering }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="分项工程">
|
|
||||||
{{ formData.subentry_engineering }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="分项工程编码">
|
|
||||||
{{ formData.subentry_engineering_code }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工序步骤号">
|
|
||||||
{{ formData.process_step_no }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工序步骤">
|
|
||||||
{{ formData.process_step }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="质量控制点">
|
|
||||||
{{ formData.quality_control_points }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="质量控制点">
|
|
||||||
{{ formData.quality_control_points }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="图例说明">
|
|
||||||
<!-- <div v-if="formData.annex && formData.annex.length > 0">
|
|
||||||
<material-picker v-model="formData.annex" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
暂无文件
|
|
||||||
</div> -->
|
|
||||||
<annexLink :annex="formData.annex"></annexLink>
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
</el-card>
|
|
||||||
</el-form>
|
|
||||||
</popup>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup name="customdetail">
|
|
||||||
|
|
||||||
import type { FormInstance } from 'element-plus'
|
|
||||||
import Popup from '@/components/popup/index.vue'
|
|
||||||
import { apiCustomDetail } from '@/api/custom'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import type { PropType } from 'vue'
|
|
||||||
defineProps({
|
|
||||||
dictData: {
|
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const emit = defineEmits(['success', 'close'])
|
|
||||||
const formRef = shallowRef<FormInstance>()
|
|
||||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
|
||||||
|
|
||||||
const datas = reactive({
|
|
||||||
provinceOptions: [],
|
|
||||||
cityOptions: [],
|
|
||||||
areaOptions: [],
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 表单数据
|
|
||||||
const formData = reactive({
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取详情
|
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
|
||||||
Object.assign(formData, data)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
|
||||||
const data = await apiCustomDetail({
|
|
||||||
id: row.id
|
|
||||||
})
|
|
||||||
setFormData(data)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 提交按钮
|
|
||||||
const handleSubmit = async () => {
|
|
||||||
popupRef.value?.close()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//打开弹窗
|
|
||||||
const open = () => {
|
|
||||||
popupRef.value?.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 关闭回调
|
|
||||||
const handleClose = () => {
|
|
||||||
emit('close')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
open,
|
|
||||||
setFormData,
|
|
||||||
getDetail
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.tit {
|
|
||||||
font-size: 1.2em;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.my-label) {
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,32 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
|
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="分部工程" prop="division_id" @click="showDialog = true"
|
<el-form-item label="分部工程" prop="division_id" @click="showDialog = true"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-input v-model="division_engineering" readonly clearable placeholder="点击选择分部分项工程" />
|
<el-input v-model="formData.division_engineering" readonly clearable placeholder="点击选择分部分项工程" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="子分部工程" prop="division_id"
|
<el-form-item label="子分部工程" prop="division_id"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-input v-model="sub_division_engineering" clearable disabled placeholder="系统自动填写" />
|
<el-input v-model="formData.sub_division_engineering" clearable disabled placeholder="系统自动填写" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="分项工程" prop="division_id"
|
<el-form-item label="分项工程" prop="division_id"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-input v-model="subentry_engineering" clearable disabled placeholder="系统自动填写" />
|
<el-input v-model="formData.subentry_engineering" clearable disabled placeholder="系统自动填写" />
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -34,7 +28,8 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="分项工程编码" prop="division_id"
|
<el-form-item label="分项工程编码" prop="division_id"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-input v-model="subentry_engineering_code" clearable disabled placeholder="系统自动填写" />
|
<el-input v-model="formData.subentry_engineering_code" clearable disabled
|
||||||
|
placeholder="系统自动填写" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
@ -80,12 +75,8 @@ import Popup from '@/components/popup/index.vue'
|
|||||||
import { buildprocesssettingsAdd, buildprocesssettingsEdit, buildprocesssettingsDetail } from '@/api/build/build_process_settings'
|
import { buildprocesssettingsAdd, buildprocesssettingsEdit, buildprocesssettingsDetail } from '@/api/build/build_process_settings'
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
|
|
||||||
|
|
||||||
const showDialog = ref(false)
|
const showDialog = ref(false)
|
||||||
const subentry_engineering = ref('')
|
|
||||||
const subentry_engineering_code = ref('')
|
|
||||||
const sub_division_engineering = ref('')
|
|
||||||
const division_engineering = ref('')
|
|
||||||
defineProps({
|
defineProps({
|
||||||
dictData: {
|
dictData: {
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
type: Object as PropType<Record<string, any[]>>,
|
||||||
@ -101,12 +92,16 @@ const mode = ref('add')
|
|||||||
|
|
||||||
// 弹窗标题
|
// 弹窗标题
|
||||||
const popupTitle = computed(() => {
|
const popupTitle = computed(() => {
|
||||||
return mode.value == 'edit' ? '编辑分部分项划分表' : '新增分部分项划分表'
|
return mode.value == 'edit' ? '编辑施工工序' : '新增施工工序表'
|
||||||
})
|
})
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
|
"division_engineering": "",
|
||||||
|
"sub_division_engineering": "",
|
||||||
|
"subentry_engineering": "",
|
||||||
|
"subentry_engineering_code": "",
|
||||||
process_step_no: '',
|
process_step_no: '',
|
||||||
process_step: '',
|
process_step: '',
|
||||||
quality_control_points: '',
|
quality_control_points: '',
|
||||||
@ -116,10 +111,10 @@ const formData = reactive({
|
|||||||
|
|
||||||
const customEvent = (e) => {
|
const customEvent = (e) => {
|
||||||
formData.division_id = e.id;
|
formData.division_id = e.id;
|
||||||
subentry_engineering.value = e.subentry_engineering
|
formData.subentry_engineering = e.subentry_engineering
|
||||||
subentry_engineering_code.value = e.subentry_engineering_code
|
formData.subentry_engineering_code = e.subentry_engineering_code
|
||||||
sub_division_engineering.value = e.sub_division_engineering
|
formData.sub_division_engineering = e.sub_division_engineering
|
||||||
division_engineering.value = e.division_engineering
|
formData.division_engineering = e.division_engineering
|
||||||
showDialog.value = false
|
showDialog.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,8 +127,6 @@ const formRules = reactive<any>({
|
|||||||
|
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
|
|
||||||
|
|
||||||
for (const key in formData) {
|
for (const key in formData) {
|
||||||
if (data[key] != null && data[key] != undefined) {
|
if (data[key] != null && data[key] != undefined) {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
|
@ -35,9 +35,7 @@
|
|||||||
<el-table-column label="工序步骤号" prop="process_step_no" show-overflow-tooltip />
|
<el-table-column label="工序步骤号" prop="process_step_no" show-overflow-tooltip />
|
||||||
<el-table-column label="工序步骤" prop="process_step" show-overflow-tooltip />
|
<el-table-column label="工序步骤" prop="process_step" show-overflow-tooltip />
|
||||||
<el-table-column label="质量控制点" prop="quality_control_points" show-overflow-tooltip />
|
<el-table-column label="质量控制点" prop="quality_control_points" show-overflow-tooltip />
|
||||||
|
<el-table-column label="操作" width="170" fixed="right">
|
||||||
<el-table-column label="操作" width="150" fixed="right">
|
|
||||||
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['build.build_process_settings/edit']" type="primary" link
|
<el-button v-perms="['build.build_process_settings/edit']" type="primary" link
|
||||||
@click="handleEdit(row)">
|
@click="handleEdit(row)">
|
||||||
@ -47,7 +45,8 @@
|
|||||||
@click="handleDelete(row.id)">
|
@click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-perms="['build.build_process_settings/detail']" link @click="handledetail(row)">
|
|
||||||
|
<el-button v-perms="['build.build_process_settings/detail']" link @click="handleDetail(row.id)">
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
@ -60,7 +59,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
<detailPage v-if="showDetail" ref="detailRef" @close="showEdit = false" :detailConfig="detailConfig" width="30vw"
|
||||||
|
:column="1" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -73,12 +73,13 @@ import { getAllProjectTypes } from '@/api/projecttype'
|
|||||||
const protype = reactive([])
|
const protype = reactive([])
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import DetailPopup from './detail.vue'
|
import detailConfig from './detail'
|
||||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
|
const detailRef = ref('')
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
const showDtail = ref(false)
|
const showDetail = ref(false)
|
||||||
const dtimevalue = ref([])
|
const dtimevalue = ref([])
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
@ -139,14 +140,16 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
await buildprocesssettingsDelete({ id })
|
await buildprocesssettingsDelete({ id })
|
||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
const handledetail = async (data: any) => {
|
// 详情
|
||||||
let res = await buildprocesssettingsDetail({ id: data.id })
|
const handleDetail = async (id: any) => {
|
||||||
showDtail.value = true
|
let res = await buildprocesssettingsDetail({ id })
|
||||||
|
showDetail.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
detailRef.value?.open()
|
detailRef.value?.open()
|
||||||
detailRef.value?.setFormData(res)
|
detailRef.value?.setFormData(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
getLists()
|
getLists()
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,156 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="detail-popup">
|
|
||||||
<popup ref="popupRef" title="施工汇报详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="120px">
|
|
||||||
<el-card class="mb-2">
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="作业编码">
|
|
||||||
{{ formData.zy_code }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<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.subentry_engineering }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="工序步骤">
|
|
||||||
{{ formData.process_step }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="计划开始日期">
|
|
||||||
{{ formData.plan_start_date }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="计划结束日期">
|
|
||||||
{{ formData.plan_end_date
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="班组长">
|
|
||||||
{{ formData.project_member_name
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="作业量">
|
|
||||||
{{ formData.workload }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="施工人员">
|
|
||||||
{{ formData.work_user }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="施工内容">
|
|
||||||
{{ formData.work_content }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-card>
|
|
||||||
</el-form>
|
|
||||||
</popup>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup name="customdetail">
|
|
||||||
|
|
||||||
import type { FormInstance } from 'element-plus'
|
|
||||||
import Popup from '@/components/popup/index.vue'
|
|
||||||
import { apiCustomDetail } from '@/api/custom'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import type { PropType } from 'vue'
|
|
||||||
defineProps({
|
|
||||||
dictData: {
|
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const emit = defineEmits(['success', 'close'])
|
|
||||||
const formRef = shallowRef<FormInstance>()
|
|
||||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
|
||||||
|
|
||||||
const datas = reactive({
|
|
||||||
provinceOptions: [],
|
|
||||||
cityOptions: [],
|
|
||||||
areaOptions: [],
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 表单数据
|
|
||||||
const formData = reactive({
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取详情
|
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
|
||||||
Object.assign(formData, data)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
|
||||||
const data = await apiCustomDetail({
|
|
||||||
id: row.id
|
|
||||||
})
|
|
||||||
setFormData(data)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 提交按钮
|
|
||||||
const handleSubmit = async () => {
|
|
||||||
popupRef.value?.close()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//打开弹窗
|
|
||||||
const open = () => {
|
|
||||||
popupRef.value?.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 关闭回调
|
|
||||||
const handleClose = () => {
|
|
||||||
emit('close')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
open,
|
|
||||||
setFormData,
|
|
||||||
getDetail
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.tit {
|
|
||||||
font-size: 1.2em;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.my-label) {
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -99,14 +99,7 @@
|
|||||||
<el-input v-model="filluser" clearable disabled placeholder="系统自动填写" />
|
<el-input v-model="filluser" clearable disabled placeholder="系统自动填写" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="8">
|
|
||||||
<el-form-item label="填报日期" prop="plan_id"
|
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
|
||||||
<el-date-picker class="flex-1 !flex" v-model="filluserdate" clearable type="date"
|
|
||||||
value-format="YYYY-MM-DD " disabled placeholder="系统自动填写">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col> -->
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="tit" style="margin:10px 0">
|
<div class="tit" style="margin:10px 0">
|
||||||
人工明细
|
人工明细
|
||||||
|
@ -17,10 +17,14 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="项目编码">
|
<el-form-item label="项目编码">
|
||||||
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||||
</el-form-item></el-col>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="投标编号" prop="buy_bidding_document_id" @click="showDialog1 = true">
|
<el-form-item label="投标编号" prop="buy_bidding_document_id">
|
||||||
<el-input v-model="bidding_code" readonly clearable placeholder="请选择投标编号" />
|
<el-input v-model="bidding_code" readonly clearable placeholder="请选择投标编号"
|
||||||
|
@click="showDialog1 = true" class="!flex flex-1" />
|
||||||
|
<toolTip content="可在投标管理-投标决策里面添加" url="/construction/tender/bid_bidding_decision" />
|
||||||
|
|
||||||
</el-form-item></el-col>
|
</el-form-item></el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="合同名称" prop="contract_name"
|
<el-form-item label="合同名称" prop="contract_name"
|
||||||
@ -54,11 +58,11 @@
|
|||||||
<el-form-item label="甲方主要负责人" prop="party_a_diretor">
|
<el-form-item label="甲方主要负责人" prop="party_a_diretor">
|
||||||
<el-input v-model="formData.party_a_diretor" clearable placeholder="请输入甲方主要负责人" />
|
<el-input v-model="formData.party_a_diretor" clearable placeholder="请输入甲方主要负责人" />
|
||||||
</el-form-item></el-col><el-col :span="8">
|
</el-form-item></el-col><el-col :span="8">
|
||||||
<el-form-item label="甲方电话" prop="party_a_phone"
|
<el-form-item label="甲方电话" prop="party_a_phone">
|
||||||
:rules="[{ validator: checkPhone, trigger: 'blur' }]">
|
|
||||||
<el-input v-model="formData.party_a_phone" clearable placeholder="请输入甲方电话" />
|
<el-input v-model="formData.party_a_phone" clearable placeholder="请输入甲方电话" />
|
||||||
</el-form-item></el-col><el-col :span="8">
|
</el-form-item></el-col><el-col :span="8">
|
||||||
<el-form-item label="甲方手机" prop="party_a_mobile">
|
<el-form-item label="甲方手机" prop="party_a_mobile"
|
||||||
|
:rules="[{ validator: checkPhone, trigger: 'blur' }]">
|
||||||
<el-input v-model="formData.party_a_mobile" clearable placeholder="请输入甲方手机" />
|
<el-input v-model="formData.party_a_mobile" clearable placeholder="请输入甲方手机" />
|
||||||
</el-form-item></el-col><el-col :span="8">
|
</el-form-item></el-col><el-col :span="8">
|
||||||
<el-form-item label="甲方邮箱" prop="party_a_email"
|
<el-form-item label="甲方邮箱" prop="party_a_email"
|
||||||
@ -77,7 +81,7 @@
|
|||||||
</el-form-item></el-col><el-col :span="8">
|
</el-form-item></el-col><el-col :span="8">
|
||||||
<el-form-item label="乙方电话" prop="party_b_phone"
|
<el-form-item label="乙方电话" prop="party_b_phone"
|
||||||
:rules="[{ validator: checkPhone, trigger: 'blur' }]">
|
:rules="[{ validator: checkPhone, trigger: 'blur' }]">
|
||||||
<el-input v-model="formData.party_b_phone" clearable placeholder="请输入乙方电话" />
|
<el-input v-model="formData.party_b_phone" clearable placeholder="请输入乙方电话" type="number" />
|
||||||
</el-form-item></el-col><el-col :span="8">
|
</el-form-item></el-col><el-col :span="8">
|
||||||
<el-form-item label="乙方手机" prop="party_b_mobile">
|
<el-form-item label="乙方手机" prop="party_b_mobile">
|
||||||
<el-input v-model="formData.party_b_mobile" clearable placeholder="请输入乙方手机" />
|
<el-input v-model="formData.party_b_mobile" clearable placeholder="请输入乙方手机" />
|
||||||
@ -88,7 +92,8 @@
|
|||||||
</el-form-item></el-col><el-col :span="8">
|
</el-form-item></el-col><el-col :span="8">
|
||||||
<el-form-item label="金额" prop="amount"
|
<el-form-item label="金额" prop="amount"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-input v-model="formData.amount" clearable placeholder="请输入金额" @input="amountinput" />
|
<el-input v-model="formData.amount" clearable placeholder="请输入金额" @input="amountinput"
|
||||||
|
type="number" />
|
||||||
</el-form-item></el-col><el-col :span="8">
|
</el-form-item></el-col><el-col :span="8">
|
||||||
<el-form-item label="金额大写" prop="amount_daxie">
|
<el-form-item label="金额大写" prop="amount_daxie">
|
||||||
<el-input v-model="amount_daxie" disabled clearable placeholder="系统自动填写" />
|
<el-input v-model="amount_daxie" disabled clearable placeholder="系统自动填写" />
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="auto">
|
<el-form ref="formRef" :model="formData" label-width="auto">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -22,8 +21,11 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="合同号" prop="contract_id" @click="showDialog2 = true">
|
<el-form-item label="合同号" prop="contract_id">
|
||||||
<el-input v-model="formData.contract_code" clearable readonly placeholder="系统自动填写" />
|
<el-input v-model="formData.contract_code" clearable readonly placeholder="点击选择合同"
|
||||||
|
@click="showDialog2 = true" class="!flex flex-1" />
|
||||||
|
<toolTip content="可在合同管理-项目合同-项目合同添加" url="/construction/contract/ProjectContracts/contract">
|
||||||
|
</toolTip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -49,8 +51,8 @@
|
|||||||
<el-form-item label="分类" prop="classification"
|
<el-form-item label="分类" prop="classification"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-select class="flex-1" v-model="formData.classification" clearable placeholder="请选择分类">
|
<el-select class="flex-1" v-model="formData.classification" clearable placeholder="请选择分类">
|
||||||
<el-option v-for="(item, index) in dictData.classification" :key="index"
|
<el-option v-for="(item, index) in dictData.classification" :key="index" :label="item.name"
|
||||||
:label="item.name" :value="parseInt(item.value)" />
|
:value="parseInt(item.value)" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -74,8 +76,7 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="指定处理人" prop="processed_user" @click="userclick"
|
<el-form-item label="指定处理人" prop="processed_user" @click="userclick"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<el-input v-model="formData.processed_user_name" clearable readonly
|
<el-input v-model="formData.processed_user_name" clearable readonly placeholder="请输入指定处理人" />
|
||||||
placeholder="请输入指定处理人" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
|
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
@ -106,15 +105,15 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
<div v-if="formData.contract_cate == 1 && showDialog1">
|
<div v-if="formData.contract_cate == 1 && showDialog1">
|
||||||
<el-dialog v-model="showDialog1" title="选择采购合同" width="70%">
|
<el-dialog v-model="showDialog1" title="选择采购合同" width="70%">
|
||||||
<dialogTable :config="procurement_contract"
|
<dialogTable :config="procurement_contract" :query="{ supplier_id: formData?.supplier_id || '' }"
|
||||||
:query="{ supplier_id: formData?.supplier_id || '' }" @customEvent="customEvent1" />
|
@customEvent="customEvent1" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="formData.contract_cate == 2 && showDialog1">
|
<div v-if="formData.contract_cate == 2 && showDialog1">
|
||||||
<el-dialog v-model="showDialog1" title="选择分包合同" width="70%">
|
<el-dialog v-model="showDialog1" title="选择分包合同" width="70%">
|
||||||
<dialogTable :config="subcontracting_contract"
|
<dialogTable :config="subcontracting_contract" :query="{ supplier_id: formData?.supplier_id || '' }"
|
||||||
:query="{ supplier_id: formData?.supplier_id || '' }" @customEvent="customEvent1" />
|
@customEvent="customEvent1" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -215,7 +214,7 @@ const formData = reactive({
|
|||||||
period: "",
|
period: "",
|
||||||
amount: "",
|
amount: "",
|
||||||
foreign_currency_remark: "",
|
foreign_currency_remark: "",
|
||||||
status: '',
|
// status: '',
|
||||||
remark: "",
|
remark: "",
|
||||||
annex: [],
|
annex: [],
|
||||||
contract_cate: 1,
|
contract_cate: 1,
|
||||||
|
61
src/views/material_list/detail.js
Normal file
61
src/views/material_list/detail.js
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
const detailConfig = {
|
||||||
|
title: "自购材料表",
|
||||||
|
config: [
|
||||||
|
{
|
||||||
|
label: "材料大类",
|
||||||
|
value: "first_level_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "材料中类",
|
||||||
|
value: "second_level_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "材料小类",
|
||||||
|
value: "three_level_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "材料编码",
|
||||||
|
value: "code"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "品牌",
|
||||||
|
value: "brand"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "材料名称",
|
||||||
|
value: "name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "规格型号",
|
||||||
|
value: "specs"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "单位",
|
||||||
|
value: "unit"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "安全库存量",
|
||||||
|
value: "inventory"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "参数说明",
|
||||||
|
value: "parameter_description"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "附件",
|
||||||
|
value: "annex",
|
||||||
|
column: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "销售指导价",
|
||||||
|
value: "sales_price"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "预算成本价",
|
||||||
|
value: "cost_price"
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
export default detailConfig;
|
@ -1,178 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="detail-popup">
|
|
||||||
<popup ref="popupRef" title="自购材料详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
|
||||||
<el-card class="mb-2">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="材料大类">
|
|
||||||
{{ formData.first_level_name }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="材料中类">
|
|
||||||
{{ formData.second_level_name }}
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="材料小类">
|
|
||||||
{{ formData.three_level_name
|
|
||||||
}}
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="材料名称">
|
|
||||||
{{ formData.name }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="材料编码">
|
|
||||||
{{ formData.code }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="品牌">
|
|
||||||
{{ formData.brand
|
|
||||||
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="规格型号">
|
|
||||||
{{ formData.specs }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="参数说明">
|
|
||||||
{{ formData.parameter_description }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="单位">
|
|
||||||
{{ formData.unit }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="附件">
|
|
||||||
<annexLink :annex="formData.annex"></annexLink>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-card>
|
|
||||||
</el-form>
|
|
||||||
</popup>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup name="customdetail">
|
|
||||||
|
|
||||||
import type { FormInstance } from 'element-plus'
|
|
||||||
import Popup from '@/components/popup/index.vue'
|
|
||||||
import { apiCustomDetail } from '@/api/custom'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import type { PropType } from 'vue'
|
|
||||||
defineProps({
|
|
||||||
dictData: {
|
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const emit = defineEmits(['success', 'close'])
|
|
||||||
const formRef = shallowRef<FormInstance>()
|
|
||||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
|
||||||
const formDataannex = reactive([])
|
|
||||||
const datas = reactive({
|
|
||||||
provinceOptions: [],
|
|
||||||
cityOptions: [],
|
|
||||||
areaOptions: [],
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 表单数据
|
|
||||||
const formData = reactive({
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取详情
|
|
||||||
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
|
|
||||||
// formData[key] = data[key]
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
Object.assign(formData, data)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
|
||||||
const data = await apiCustomDetail({
|
|
||||||
id: formData.id
|
|
||||||
})
|
|
||||||
setFormData(data)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 提交按钮
|
|
||||||
const handleSubmit = async () => {
|
|
||||||
popupRef.value?.close()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//打开弹窗
|
|
||||||
const open = () => {
|
|
||||||
popupRef.value?.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 关闭回调
|
|
||||||
const handleClose = () => {
|
|
||||||
emit('close')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
open,
|
|
||||||
setFormData,
|
|
||||||
getDetail
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.tit {
|
|
||||||
font-size: 1.2em;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.my-label) {
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -82,16 +82,12 @@
|
|||||||
placeholder="请输入参数说明" />
|
placeholder="请输入参数说明" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
|
|
||||||
<el-form-item label="附件">
|
<el-form-item label="附件">
|
||||||
<uploadAnnex :formData="formData"></uploadAnnex>
|
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="销售指导价" prop="sales_price">
|
<el-form-item label="销售指导价" prop="sales_price">
|
||||||
<el-input v-model="formData.sales_price" clearable placeholder="请输入销售指导价" type="number" />
|
<el-input v-model="formData.sales_price" clearable placeholder="请输入销售指导价" type="number" />
|
||||||
@ -103,9 +99,6 @@
|
|||||||
<el-input v-model="formData.cost_price" clearable placeholder="请输入预算成本价" type="number" />
|
<el-input v-model="formData.cost_price" clearable placeholder="请输入预算成本价" type="number" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,9 +20,6 @@
|
|||||||
<el-form-item label="材料名称" prop="name">
|
<el-form-item label="材料名称" prop="name">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.name" clearable placeholder="请输入材料名称" />
|
<el-input class="w-[280px]" v-model="queryParams.name" clearable placeholder="请输入材料名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
<el-button @click="resetParams">重置</el-button>
|
<el-button @click="resetParams">重置</el-button>
|
||||||
@ -30,16 +27,16 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/add']" type="primary" @click="handleAdd">
|
<el-button v-perms="['material.material/add']" type="primary" @click="handleAdd">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<icon name="el-icon-Plus" />
|
<icon name="el-icon-Plus" />
|
||||||
</template>
|
</template>
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" :disabled="!selectData.length"
|
<!-- <el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" :disabled="!selectData.length"
|
||||||
@click="handleDelete(selectData)">
|
@click="handleDelete(selectData)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button> -->
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<el-table border :data="pager.lists" @selection-change="handleSelectionChange">
|
<el-table border :data="pager.lists" @selection-change="handleSelectionChange">
|
||||||
@ -54,19 +51,17 @@
|
|||||||
<el-table-column label="规格型号" prop="specs" show-overflow-tooltip />
|
<el-table-column label="规格型号" prop="specs" show-overflow-tooltip />
|
||||||
<el-table-column label="参数说明" prop="parameter_description" show-overflow-tooltip />
|
<el-table-column label="参数说明" prop="parameter_description" show-overflow-tooltip />
|
||||||
<el-table-column label="单位" prop="unit" show-overflow-tooltip />
|
<el-table-column label="单位" prop="unit" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="160" fixed="right">
|
<el-table-column label="操作" width="170" fixed="right">
|
||||||
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/edit']" type="primary" link
|
<el-button v-perms="['material.material/edit']" type="primary" link @click="handleEdit(row)">
|
||||||
@click="handleEdit(row)">
|
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" type="danger" link
|
<el-button v-perms="['material.material/delete']" type="danger" link
|
||||||
@click="handleDelete(row.id)">
|
@click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/detail']" link
|
<el-button v-perms="['material.material/detail']" link @click="handleDetail(row.id)">
|
||||||
@click="handledetail(row)">
|
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -78,7 +73,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
<detailPage v-if="showDetail" ref="detailRef" @close="showEdit = false" :detailConfig="detailConfig" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -91,16 +87,15 @@ import { timeFormat } from '@/utils/util'
|
|||||||
import { apiContractLists } from '@/api/contract'
|
import { apiContractLists } from '@/api/contract'
|
||||||
import { apiCustomLists } from '@/api/custom'
|
import { apiCustomLists } from '@/api/custom'
|
||||||
import { getAllProjectTypes } from '@/api/projecttype'
|
import { getAllProjectTypes } from '@/api/projecttype'
|
||||||
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import DetailPopup from './detail.vue'
|
import detailConfig from './detail'
|
||||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
|
const detailRef = ref('')
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
|
const showDetail = ref(false)
|
||||||
const showDtail = ref(false)
|
|
||||||
|
|
||||||
const imaterialList = ref([])
|
const imaterialList = ref([])
|
||||||
|
|
||||||
@ -156,16 +151,15 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
// 详情
|
// 详情
|
||||||
const handledetail = async (data: any) => {
|
const handleDetail = async (id: any) => {
|
||||||
let res = await materialDetail({ id: data.id })
|
let res = await materialDetail({ id })
|
||||||
showDtail.value = true
|
showDetail.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
detailRef.value?.open()
|
detailRef.value?.open()
|
||||||
detailRef.value?.setFormData(res)
|
detailRef.value?.setFormData(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//获取分类列表
|
//获取分类列表
|
||||||
const imateriallist = () => {
|
const imateriallist = () => {
|
||||||
apimaterialLists({ page_no: 1, page_size: 9999 }).then((res) => {
|
apimaterialLists({ page_no: 1, page_size: 9999 }).then((res) => {
|
||||||
|
@ -13,18 +13,8 @@
|
|||||||
formData.remark
|
formData.remark
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
<el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label">
|
<el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label">
|
||||||
<div v-if="formData.annex.length > 0">
|
<annexLink :annex="formData.annex"></annexLink>
|
||||||
<div v-for="(item, index) in formData.annex" style="margin-left: 5px;display: block;">
|
|
||||||
<el-link style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item"
|
|
||||||
target="_blank">文件{{ index + 1 }}查看</el-link>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
暂无附件
|
|
||||||
</div>
|
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
@ -37,7 +27,6 @@
|
|||||||
<el-table-column label="材料名称" prop='material_name' />
|
<el-table-column label="材料名称" prop='material_name' />
|
||||||
<el-table-column label="材料编码" prop='material_code' />
|
<el-table-column label="材料编码" prop='material_code' />
|
||||||
<el-table-column label="规格型号" prop='material_specs' />
|
<el-table-column label="规格型号" prop='material_specs' />
|
||||||
|
|
||||||
<el-table-column label="品牌" prop='material_brand' />
|
<el-table-column label="品牌" prop='material_brand' />
|
||||||
<el-table-column label="参数说明" prop='material_parameter_description' width="200px" />
|
<el-table-column label="参数说明" prop='material_parameter_description' width="200px" />
|
||||||
<el-table-column label="单位" prop='material_unit' />
|
<el-table-column label="单位" prop='material_unit' />
|
||||||
@ -56,14 +45,6 @@
|
|||||||
:submitApi="apimaterial_purchase_requestApprove" :id="formData?.id" @off="handleClose">
|
:submitApi="apimaterial_purchase_requestApprove" :id="formData?.id" @off="handleClose">
|
||||||
</flowProcess>
|
</flowProcess>
|
||||||
<flowDetail v-else :approve_id="formData?.approve_id" @off="handleClose" />
|
<flowDetail v-else :approve_id="formData?.approve_id" @off="handleClose" />
|
||||||
<!-- import { apimaterial_purchase_requestApprove, apimaterial_purchase_requestFlows } from '@/api/flowSet'
|
|
||||||
// 获取审批流程
|
|
||||||
const flows = ref([])
|
|
||||||
const getbidDocumentExaminationFlows = async () => {
|
|
||||||
if (formData?.approve_id) return
|
|
||||||
let res = await apimaterial_purchase_requestFlows()
|
|
||||||
flows.value = res
|
|
||||||
} -->
|
|
||||||
</popup>
|
</popup>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -131,16 +112,6 @@ const budgetDetailLists = (id) => {
|
|||||||
const setFormData = async (data: Record<any, any>) => {
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
Object.assign(formData, data)
|
Object.assign(formData, data)
|
||||||
budgetDetailLists(data.id)
|
budgetDetailLists(data.id)
|
||||||
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)
|
|
||||||
}
|
|
||||||
getbidDocumentExaminationFlows()
|
getbidDocumentExaminationFlows()
|
||||||
|
|
||||||
|
|
||||||
|
@ -178,10 +178,7 @@ const handleDelete = (row: any) => {
|
|||||||
tablist1.splice(index, 1);
|
tablist1.splice(index, 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 删除上传的文件
|
|
||||||
const delFileFn = (index: number) => {
|
|
||||||
formDataannex.splice(index, 1)
|
|
||||||
}
|
|
||||||
//获取所有组织
|
//获取所有组织
|
||||||
const getlist = () => {
|
const getlist = () => {
|
||||||
getAll().then((res) => {
|
getAll().then((res) => {
|
||||||
@ -271,18 +268,6 @@ const formRules = reactive<any>({
|
|||||||
|
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, 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)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (data.dept_id) {
|
if (data.dept_id) {
|
||||||
getlist1(data.org_id)
|
getlist1(data.org_id)
|
||||||
}
|
}
|
||||||
@ -293,7 +278,6 @@ const setFormData = async (data: Record<any, any>) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
project_name.value = data.project_name;
|
project_name.value = data.project_name;
|
||||||
project_code.value = data.project_code
|
project_code.value = data.project_code
|
||||||
materialrequestDetailLists({ project_material_budget_detail_id: formData.id }).then(res => {
|
materialrequestDetailLists({ project_material_budget_detail_id: formData.id }).then(res => {
|
||||||
@ -314,9 +298,6 @@ const getDetail = async (row: Record<string, any>) => {
|
|||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
if (formDataannex.length > 0) {
|
|
||||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
|
||||||
}
|
|
||||||
if (tablist1.length > 0) {
|
if (tablist1.length > 0) {
|
||||||
formData.purchase_request_detail = tablist1.map((item) => ({
|
formData.purchase_request_detail = tablist1.map((item) => ({
|
||||||
"project_material_budget_detail_id": item.id,
|
"project_material_budget_detail_id": item.id,
|
||||||
@ -324,10 +305,7 @@ const handleSubmit = async () => {
|
|||||||
"remark": item.remark
|
"remark": item.remark
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
|
|
||||||
|
|
||||||
const data = { ...formData }
|
const data = { ...formData }
|
||||||
mode.value == 'edit'
|
mode.value == 'edit'
|
||||||
? await materialrequestEdit(data)
|
? await materialrequestEdit(data)
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="detail-popup">
|
<div class="detail-popup">
|
||||||
<popup ref="popupRef" title="项目材料采购申请明细调整" :async="true" width="80%" @confirm="handleSubmit"
|
<popup ref="popupRef" title="项目材料采购申请明细调整" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
<el-descriptions :column="2" border>
|
<el-descriptions :column="2" border>
|
||||||
|
|
||||||
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{
|
<el-descriptions-item label="项目名称" label-align="left" align="left" label-class-name="my-label"> {{
|
||||||
@ -25,9 +24,6 @@
|
|||||||
formData.material_three_level }}</el-descriptions-item>
|
formData.material_three_level }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="单位" label-align="left" align="left" label-class-name="my-label"> {{
|
<el-descriptions-item label="单位" label-align="left" align="left" label-class-name="my-label"> {{
|
||||||
formData.material_unit }}</el-descriptions-item>
|
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"> {{
|
<el-descriptions-item label="数量" label-align="left" align="left" label-class-name="my-label"> {{
|
||||||
formData.num
|
formData.num
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
@ -39,10 +35,9 @@
|
|||||||
formData.material_parameter_description
|
formData.material_parameter_description
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="备注" label-align="left" align="left" label-class-name="my-label"> {{
|
||||||
<!-- <el-descriptions-item label="备注" label-align="left" align="left" label-class-name="my-label"> {{
|
|
||||||
formData.remark
|
formData.remark
|
||||||
}}</el-descriptions-item> -->
|
}}</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
58
src/views/material_warehouse/detail.js
Normal file
58
src/views/material_warehouse/detail.js
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
const detailConfig = {
|
||||||
|
title: "仓库管理表",
|
||||||
|
config: [
|
||||||
|
{
|
||||||
|
label: "部门",
|
||||||
|
value: "dept_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "组织",
|
||||||
|
value: "org_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "项目名称",
|
||||||
|
value: "project_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "项目编码",
|
||||||
|
value: "project_code"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "仓库编码",
|
||||||
|
value: "code"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "仓库名称",
|
||||||
|
value: "name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "MRP仓库",
|
||||||
|
value: "is_mrp_text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "负责人",
|
||||||
|
value: "head_user_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "地址",
|
||||||
|
value: "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "联系电话",
|
||||||
|
value: "telephone"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "备注",
|
||||||
|
value: "remark",
|
||||||
|
column: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "附件",
|
||||||
|
value: "annex",
|
||||||
|
column: 1
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
export default detailConfig;
|
@ -1,198 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="detail-popup">
|
|
||||||
<popup ref="popupRef" title="仓库管理详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
|
||||||
<el-card class="mb-2">
|
|
||||||
<el-row>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="组织名称">
|
|
||||||
{{ formData.org_name
|
|
||||||
}}
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="部门名称">
|
|
||||||
{{ formData.dept_name
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="项目名称">
|
|
||||||
{{ formData.project_name }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="项目编码">
|
|
||||||
{{ formData.project_code
|
|
||||||
}}
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="仓库编码">
|
|
||||||
{{ formData.code }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="仓库名称">
|
|
||||||
{{ formData.name
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="是否MRP仓库">
|
|
||||||
{{ formData.is_mrp_text
|
|
||||||
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="负责人">
|
|
||||||
{{ formData.head_user_name
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="地址">
|
|
||||||
{{ formData.address
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="备注">
|
|
||||||
{{ formData.remark }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="附件">
|
|
||||||
<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>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
</el-card>
|
|
||||||
</el-form>
|
|
||||||
</popup>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup name="customdetail">
|
|
||||||
|
|
||||||
import type { FormInstance } from 'element-plus'
|
|
||||||
import Popup from '@/components/popup/index.vue'
|
|
||||||
import { apiCustomDetail } from '@/api/custom'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import type { PropType } from 'vue'
|
|
||||||
defineProps({
|
|
||||||
dictData: {
|
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const emit = defineEmits(['success', 'close'])
|
|
||||||
const formRef = shallowRef<FormInstance>()
|
|
||||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
|
||||||
const formDataannex = reactive([])
|
|
||||||
const datas = reactive({
|
|
||||||
provinceOptions: [],
|
|
||||||
cityOptions: [],
|
|
||||||
areaOptions: [],
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 表单数据
|
|
||||||
const formData = reactive({
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取详情
|
|
||||||
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
|
|
||||||
// formData[key] = data[key]
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
Object.assign(formData, data)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
|
||||||
const data = await apiCustomDetail({
|
|
||||||
id: formData.id
|
|
||||||
})
|
|
||||||
setFormData(data)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 提交按钮
|
|
||||||
const handleSubmit = async () => {
|
|
||||||
popupRef.value?.close()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//打开弹窗
|
|
||||||
const open = () => {
|
|
||||||
popupRef.value?.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 关闭回调
|
|
||||||
const handleClose = () => {
|
|
||||||
emit('close')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
open,
|
|
||||||
setFormData,
|
|
||||||
getDetail
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.tit {
|
|
||||||
font-size: 1.2em;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.my-label) {
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,19 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
|
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
|
|
||||||
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||||
<div
|
<div style="display: flex; flex-direction: row-reverse; justify-content: flex-start;margin-bottom: 30px;">
|
||||||
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-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-option v-for="(item, index) in list2" :key="index" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织"
|
<el-select class="w-[180px]" v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||||
@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-select>
|
||||||
</div>
|
</div>
|
||||||
@ -41,7 +38,6 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="MRP仓库" prop="is_mrp"
|
<el-form-item label="MRP仓库" prop="is_mrp"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
<!-- <el-input v-model="project_code" clearable disabled placeholder="MRP仓库" /> -->
|
|
||||||
<el-switch v-model="formData.is_mrp" :active-value="1" :inactive-value="0" inline-prompt
|
<el-switch v-model="formData.is_mrp" :active-value="1" :inactive-value="0" inline-prompt
|
||||||
active-text="是" inactive-text="否" />
|
active-text="是" inactive-text="否" />
|
||||||
|
|
||||||
@ -73,25 +69,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="附件">
|
<el-form-item label="附件">
|
||||||
<el-upload
|
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||||
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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -136,31 +114,9 @@ const personnel = ref<any>()
|
|||||||
const next = () => {
|
const next = () => {
|
||||||
if (active.value++ > 3) active.value = 0
|
if (active.value++ > 3) active.value = 0
|
||||||
}
|
}
|
||||||
// 上传文件
|
|
||||||
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 userEmail = (rule: any, value: string, callback: (arg0: Error | undefined) => void) => {
|
const userEmail = (rule: any, value: string, callback: (arg0: Error | undefined) => void) => {
|
||||||
|
|
||||||
// const mailReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/
|
|
||||||
// // if (!value) {
|
|
||||||
// // return callback(new Error('邮箱不能为空'))
|
|
||||||
// // }
|
|
||||||
|
|
||||||
|
|
||||||
if (value && !mailReg.test(value)) {
|
if (value && !mailReg.test(value)) {
|
||||||
callback(new Error('请输入正确的邮箱格式'))
|
callback(new Error('请输入正确的邮箱格式'))
|
||||||
} else {
|
} else {
|
||||||
@ -257,19 +213,6 @@ const submituser = (e: any) => {
|
|||||||
}
|
}
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, 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) {
|
for (const key in formData) {
|
||||||
if (data[key] != null && data[key] != undefined) {
|
if (data[key] != null && data[key] != undefined) {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
@ -284,11 +227,6 @@ const setFormData = async (data: Record<any, any>) => {
|
|||||||
project_code.value = data.project_code
|
project_code.value = data.project_code
|
||||||
code.value = data.code
|
code.value = data.code
|
||||||
head_user_name.value = data.head_user_name
|
head_user_name.value = data.head_user_name
|
||||||
|
|
||||||
// contract_name.value = data.contract.contract_name;
|
|
||||||
// contract_no.value = data.contract.contract_code
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
const getDetail = async (row: Record<string, any>) => {
|
||||||
const data = await materialwarehouseDetail({
|
const data = await materialwarehouseDetail({
|
||||||
@ -300,11 +238,7 @@ const getDetail = async (row: Record<string, any>) => {
|
|||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
|
||||||
|
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
|
|
||||||
|
|
||||||
const data = { ...formData }
|
const data = { ...formData }
|
||||||
mode.value == 'edit'
|
mode.value == 'edit'
|
||||||
? await materialwarehouseEdit(data)
|
? await materialwarehouseEdit(data)
|
||||||
|
@ -30,13 +30,13 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/add']" type="primary" @click="handleAdd">
|
<el-button v-perms="['material.material_warehouse//add']" type="primary" @click="handleAdd">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<icon name="el-icon-Plus" />
|
<icon name="el-icon-Plus" />
|
||||||
</template>
|
</template>
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" :disabled="!selectData.length"
|
<el-button v-perms="['material.material_warehouse/delete']" :disabled="!selectData.length"
|
||||||
@click="handleDelete(selectData)">
|
@click="handleDelete(selectData)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -55,16 +55,15 @@
|
|||||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="160" fixed="right">
|
<el-table-column label="操作" width="160" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/edit']" type="primary" link
|
<el-button v-perms="['material.material_warehouse/edit']" type="primary" link
|
||||||
@click="handleEdit(row)">
|
@click="handleEdit(row)">
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/delete']" type="danger" link
|
<el-button v-perms="['material.material_warehouse/delete']" type="danger" link
|
||||||
@click="handleDelete(row.id)">
|
@click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-perms="['InvoicingRequests.InvoicingRequests/detail']" link
|
<el-button v-perms="['material.material_warehouse/detail']" link @click="handleDetail(row.id)">
|
||||||
@click="handledetail(row)">
|
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@ -76,7 +75,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
<detailPage v-if="showDetail" ref="detailRef" @close="showEdit = false" :detailConfig="detailConfig" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -88,12 +87,13 @@ import { timeFormat } from '@/utils/util'
|
|||||||
const protype = reactive([])
|
const protype = reactive([])
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import DetailPopup from './detail.vue'
|
import detailConfig from './detail'
|
||||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
|
const detailRef = ref('')
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
const showDtail = ref(false)
|
const showDetail = ref(false)
|
||||||
|
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
@ -146,9 +146,9 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
// 详情
|
// 详情
|
||||||
const handledetail = async (data: any) => {
|
const handleDetail = async (id: any) => {
|
||||||
let res = await materialwarehouseDetail({ id: data.id })
|
let res = await materialwarehouseDetail({ id })
|
||||||
showDtail.value = true
|
showDetail.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
detailRef.value?.open()
|
detailRef.value?.open()
|
||||||
detailRef.value?.setFormData(res)
|
detailRef.value?.setFormData(res)
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
{{ formData.department }}</el-descriptions-item>
|
{{ formData.department }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="联系人职位" label-align="left" align="left" label-class-name="my-label">
|
<el-descriptions-item label="联系人职位" label-align="left" align="left" label-class-name="my-label">
|
||||||
{{ formData.position }}</el-descriptions-item>
|
{{ formData.position }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="关系度" label-align="left" align="left" label-class-name="my-label">
|
<el-descriptions-item label="联系电话" label-align="left" align="left" label-class-name="my-label">
|
||||||
{{ formData.telephone }}</el-descriptions-item>
|
{{ formData.telephone }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="发现时间" label-align="left" align="left" label-class-name="my-label">
|
<el-descriptions-item label="发现时间" label-align="left" align="left" label-class-name="my-label">
|
||||||
{{ formData.discovery_time }}</el-descriptions-item>
|
{{ formData.discovery_time }}</el-descriptions-item>
|
||||||
@ -66,15 +66,7 @@
|
|||||||
formData.my_construction_recognition_text
|
formData.my_construction_recognition_text
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label">
|
<el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label">
|
||||||
<div v-if="formData.annex && formData.annex.length > 0">
|
<annexLink :annex="formData.annex"></annexLink>
|
||||||
<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">文件{{ index + 1 }} 查看</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
暂无文件
|
|
||||||
</div>
|
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</template>
|
</template>
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="联系电话" prop="telephone">
|
<el-form-item label="联系电话" prop="telephone">
|
||||||
<el-input v-model="formData.telephone" clearable placeholder="请输入联系电话" />
|
<el-input v-model="formData.telephone" clearable placeholder="请输入联系电话" type="number" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -231,6 +231,7 @@ import Popup from '@/components/popup/index.vue'
|
|||||||
import { apiProjectAdd, apiProjectEdit, apiProjectDetail } from '@/api/project'
|
import { apiProjectAdd, apiProjectEdit, apiProjectDetail } from '@/api/project'
|
||||||
import { getAllProjectTypes } from '@/api/projecttype'
|
import { getAllProjectTypes } from '@/api/projecttype'
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
|
import { checkPhone } from "@/utils/validate"
|
||||||
|
|
||||||
const protype = reactive([])
|
const protype = reactive([])
|
||||||
|
|
||||||
@ -297,6 +298,17 @@ const formData = reactive({
|
|||||||
|
|
||||||
// 表单验证
|
// 表单验证
|
||||||
const formRules = reactive<any>({
|
const formRules = reactive<any>({
|
||||||
|
telephone: [
|
||||||
|
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请输入电话号码',
|
||||||
|
trigger: ['blur']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
validator: checkPhone,
|
||||||
|
trigger: ['blur']
|
||||||
|
}]
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="60%" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="60%" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true"
|
<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="请输入项目名称" />
|
<el-input v-model="project_name" readonly clearable placeholder="请输入项目名称" />
|
||||||
</el-form-item></el-col><el-col :span="12">
|
</el-form-item></el-col><el-col :span="12">
|
||||||
<el-form-item label="项目编码" prop="project_id">
|
<el-form-item label="项目编码" prop="project_id">
|
||||||
@ -14,10 +12,18 @@
|
|||||||
</el-form-item></el-col><el-col :span="12">
|
</el-form-item></el-col><el-col :span="12">
|
||||||
<el-form-item label="客户名称" prop="project_id">
|
<el-form-item label="客户名称" prop="project_id">
|
||||||
<el-input v-model="custom_name" disabled placeholder="系统自动填写" />
|
<el-input v-model="custom_name" disabled placeholder="系统自动填写" />
|
||||||
</el-form-item></el-col><el-col :span="12">
|
</el-form-item></el-col>
|
||||||
|
<el-col :span="12">
|
||||||
<el-form-item label="需求名称" prop="customer_demand_id" @click="demandclck">
|
<el-form-item label="需求名称" prop="customer_demand_id" @click="demandclck">
|
||||||
<el-input v-model="customer_demand_name" clearable readonly placeholder="请选择需求" />
|
<el-input v-model="customer_demand_name" clearable readonly placeholder="请选择需求" />
|
||||||
</el-form-item></el-col><el-col :span="12">
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="需求记录时间">
|
||||||
|
<el-input v-model="formData.recording_time" clearable placeholder="系统自动获取" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
|
||||||
<el-form-item label="联系人" prop="contact_id" @click="showDialog2 = true">
|
<el-form-item label="联系人" prop="contact_id" @click="showDialog2 = true">
|
||||||
<el-input v-model="contact_name" clearable readonly placeholder="请选择联系人" />
|
<el-input v-model="contact_name" clearable readonly placeholder="请选择联系人" />
|
||||||
@ -42,7 +48,15 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="报价日期" prop="quotation_date">
|
<el-form-item label="报价日期" prop="quotation_date" :rules="[{
|
||||||
|
required: true,
|
||||||
|
message: '报价日期不能为空',
|
||||||
|
trigger: ['blur']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
validator: chekcDate,
|
||||||
|
trigger: ['blur']
|
||||||
|
}]">
|
||||||
<el-date-picker class="flex-1 !flex" v-model="formData.quotation_date" clearable type="date"
|
<el-date-picker class="flex-1 !flex" v-model="formData.quotation_date" clearable type="date"
|
||||||
value-format="YYYY-MM-DD" placeholder="选择报价日期">
|
value-format="YYYY-MM-DD" placeholder="选择报价日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
@ -146,6 +160,7 @@ const formData = reactive({
|
|||||||
customer_demand_id: '',
|
customer_demand_id: '',
|
||||||
estimate_source: '',
|
estimate_source: '',
|
||||||
create_user: '',
|
create_user: '',
|
||||||
|
recording_time: "",
|
||||||
quotation_date: '',
|
quotation_date: '',
|
||||||
invoice_type: '',
|
invoice_type: '',
|
||||||
technician: '',
|
technician: '',
|
||||||
@ -182,6 +197,7 @@ if (props.project) customEvent(props.project);
|
|||||||
|
|
||||||
const customEvent1 = (e: any) => {
|
const customEvent1 = (e: any) => {
|
||||||
formData.customer_demand_id = e.id;
|
formData.customer_demand_id = e.id;
|
||||||
|
formData.recording_time = e.recording_time
|
||||||
customer_demand_name.value = e.theme
|
customer_demand_name.value = e.theme
|
||||||
showDialog1.value = false;
|
showDialog1.value = false;
|
||||||
};
|
};
|
||||||
@ -234,11 +250,26 @@ const popupTitle = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const chekcDate = (rule: any, value: any, callback: any) => {
|
||||||
|
if (new Date(formData.quotation_date) < new Date(formData.recording_time)) {
|
||||||
|
callback(new Error('报价日期不能早于客户需求记录时间'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 表单验证
|
// 表单验证
|
||||||
const formRules = reactive<any>({
|
const formRules = reactive<any>({
|
||||||
|
quotation_date: [{
|
||||||
|
required: true,
|
||||||
|
message: '报价日期不能为空',
|
||||||
|
trigger: ['blur']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
validator: chekcDate,
|
||||||
|
trigger: ['blur']
|
||||||
|
}],
|
||||||
|
project_id: [{ required: true, message: '不可为空', trigger: 'change' }]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@ -271,6 +302,7 @@ const getDetail = async (row: Record<string, any>) => {
|
|||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
// await formRef.value?.validate()
|
// await formRef.value?.validate()
|
||||||
|
// alert(4545)
|
||||||
const data = { ...formData, }
|
const data = { ...formData, }
|
||||||
mode.value == 'edit'
|
mode.value == 'edit'
|
||||||
? await apiProjectEstimateEdit(data)
|
? await apiProjectEstimateEdit(data)
|
||||||
|
@ -58,13 +58,19 @@
|
|||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item> </el-col>
|
</el-form-item> </el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="试用期起始日期" prop="trial_start_date">
|
<el-form-item label="试用期起始日期" prop="trial_start_date" :rules="[{
|
||||||
|
validator: chekcDate1,
|
||||||
|
trigger: ['blur']
|
||||||
|
}]">
|
||||||
<el-date-picker class="flex-1 !flex" v-model="formData.trial_start_date" clearable type="date"
|
<el-date-picker class="flex-1 !flex" v-model="formData.trial_start_date" clearable type="date"
|
||||||
value-format="YYYY-MM-DD" placeholder="选择计划开始日期">
|
value-format="YYYY-MM-DD" placeholder="选择计划开始日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item> </el-col>
|
</el-form-item> </el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="试用期结束日期" prop="per_daily_living">
|
<el-form-item label="试用期结束日期" prop="per_daily_living" :rules="[{
|
||||||
|
validator: chekcDate,
|
||||||
|
trigger: ['blur']
|
||||||
|
}]">
|
||||||
<el-date-picker class="flex-1 !flex" v-model="formData.trial_end_date" clearable type="date"
|
<el-date-picker class="flex-1 !flex" v-model="formData.trial_end_date" clearable type="date"
|
||||||
value-format="YYYY-MM-DD" placeholder="选择计划开始日期">
|
value-format="YYYY-MM-DD" placeholder="选择计划开始日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
@ -75,14 +81,19 @@
|
|||||||
value-format="YYYY-MM-DD" placeholder="选择计划开始日期">
|
value-format="YYYY-MM-DD" placeholder="选择计划开始日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item> </el-col><el-col :span="8">
|
</el-form-item> </el-col><el-col :span="8">
|
||||||
<el-form-item label="终止时间" prop="end_date"
|
<el-form-item label="终止时间" prop="end_date" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }, {
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
validator: chekcDate2,
|
||||||
|
trigger: ['blur']
|
||||||
|
}]">
|
||||||
<el-date-picker class="flex-1 !flex" v-model="formData.end_date" clearable type="date"
|
<el-date-picker class="flex-1 !flex" v-model="formData.end_date" clearable type="date"
|
||||||
value-format="YYYY-MM-DD" placeholder="选择计划开始日期">
|
value-format="YYYY-MM-DD" placeholder="选择计划开始日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item> </el-col>
|
</el-form-item> </el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="解除时间" prop="release_time">
|
<el-form-item label="解除时间" prop="release_time" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }, {
|
||||||
|
validator: chekcDate3,
|
||||||
|
trigger: ['blur']
|
||||||
|
}]">
|
||||||
<el-date-picker class="flex-1 !flex" v-model="formData.release_time" clearable type="date"
|
<el-date-picker class="flex-1 !flex" v-model="formData.release_time" clearable type="date"
|
||||||
value-format="YYYY-MM-DD" placeholder="选择解除时间">
|
value-format="YYYY-MM-DD" placeholder="选择解除时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
@ -189,7 +200,35 @@ const popupTitle = computed(() => {
|
|||||||
return mode.value == 'edit' ? '编辑劳动合同' : '新增劳动合同'
|
return mode.value == 'edit' ? '编辑劳动合同' : '新增劳动合同'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const chekcDate = (rule: any, value: any, callback: any) => {
|
||||||
|
if (new Date(formData.trial_end_date) < new Date(formData.trial_start_date)) {
|
||||||
|
callback(new Error('试用期结束日不能早于试用期起始日'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const chekcDate1 = (rule: any, value: any, callback: any) => {
|
||||||
|
if (new Date(formData.trial_start_date) < new Date(formData.signing_date)) {
|
||||||
|
callback(new Error('试用期起始日期不能早于合同签定日期'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const chekcDate2 = (rule: any, value: any, callback: any) => {
|
||||||
|
if (new Date(formData.end_date) < new Date(formData.start_date)) {
|
||||||
|
callback(new Error('终止时间不能早于起始时间'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const chekcDate3 = (rule: any, value: any, callback: any) => {
|
||||||
|
if (new Date(formData.release_time) < new Date(formData.signing_date)) {
|
||||||
|
callback(new Error('解除时间不能早于合同签定日期'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 表单验证
|
// 表单验证
|
||||||
const formRules = reactive<any>({
|
const formRules = reactive<any>({
|
||||||
|
@ -108,7 +108,7 @@ const formData = reactive({
|
|||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
Object.assign(formData, data)
|
Object.assign(formData, data)
|
||||||
let res = await projectsalaryDetailLists({ payment_salary_id: data.id })
|
let res = await projectsalaryDetailLists({ salary_payment_id: data.id })
|
||||||
formData.payment_detail = res.lists
|
formData.payment_detail = res.lists
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -243,7 +243,7 @@ const setFormData = async (data: Record<any, any>) => {
|
|||||||
project_code.value = data.project_code
|
project_code.value = data.project_code
|
||||||
idcard.value = data.person_idcard
|
idcard.value = data.person_idcard
|
||||||
person_name.value = data.person_name
|
person_name.value = data.person_name
|
||||||
let res = await projectsalaryDetailLists({ payment_salary_id: data.id })
|
let res = await projectsalaryDetailLists({ salary_payment_id: data.id })
|
||||||
Object.assign(paymentlist, res.lists)
|
Object.assign(paymentlist, res.lists)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<br />
|
<br />
|
||||||
<el-row>
|
<!-- <el-row>
|
||||||
<el-table :data="tableData" :summary-method="getSummaries" show-summary>
|
<el-table :data="tableData" :summary-method="getSummaries" show-summary>
|
||||||
<el-table-column label="序号" type="index" width="56">
|
<el-table-column label="序号" type="index" width="56">
|
||||||
|
|
||||||
@ -70,7 +70,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-row>
|
</el-row> -->
|
||||||
|
|
||||||
<el-row style="margin: 20px 0;">
|
<el-row style="margin: 20px 0;">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
@ -145,34 +145,34 @@ const list2 = reactive([])
|
|||||||
const project_amount = ref(0)
|
const project_amount = ref(0)
|
||||||
const project_rate = ref(0)
|
const project_rate = ref(0)
|
||||||
|
|
||||||
const tableData = reactive([{
|
// const tableData = reactive([{
|
||||||
name: "材料/设备成本(元)",
|
// name: "材料/设备成本(元)",
|
||||||
text: '用于控制材料成本',
|
// text: '用于控制材料成本',
|
||||||
cost: "", rate: "",
|
// cost: "", rate: "",
|
||||||
cl_cost: ''
|
// cl_cost: ''
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: "分包成本(元)",
|
// name: "分包成本(元)",
|
||||||
text: '用于控制分包成本', cost: "", rate: "",
|
// text: '用于控制分包成本', cost: "", rate: "",
|
||||||
fb_cost: '',
|
// fb_cost: '',
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: "人工成本(元)",
|
// name: "人工成本(元)",
|
||||||
text: '用于控制工时成本及项目人力成本', cost: "", rate: "",
|
// text: '用于控制工时成本及项目人力成本', cost: "", rate: "",
|
||||||
rg_cost: ''
|
// rg_cost: ''
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: "费用成本(元)",
|
// name: "费用成本(元)",
|
||||||
text: '用于控制费用报销及差旅报销', cost: "", rate: "",
|
// text: '用于控制费用报销及差旅报销', cost: "", rate: "",
|
||||||
fy_cost: ''
|
// fy_cost: ''
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: "机械 & 工具成本(元)",
|
// name: "机械 & 工具成本(元)",
|
||||||
text: '用于控制机械及设备成本', cost: "", rate: "",
|
// text: '用于控制机械及设备成本', cost: "", rate: "",
|
||||||
jj_cost: ''
|
// jj_cost: ''
|
||||||
},
|
// },
|
||||||
|
|
||||||
])
|
// ])
|
||||||
const contract_name = ref('')
|
const contract_name = ref('')
|
||||||
const project_name = ref('')
|
const project_name = ref('')
|
||||||
const project_code = ref('')
|
const project_code = ref('')
|
||||||
@ -193,13 +193,6 @@ const checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
const userEmail = (rule: any, value: string, callback: (arg0: Error | undefined) => void) => {
|
const userEmail = (rule: any, value: string, callback: (arg0: Error | undefined) => void) => {
|
||||||
|
|
||||||
// const mailReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/
|
|
||||||
// // if (!value) {
|
|
||||||
// // return callback(new Error('邮箱不能为空'))
|
|
||||||
// // }
|
|
||||||
|
|
||||||
|
|
||||||
if (value && !mailReg.test(value)) {
|
if (value && !mailReg.test(value)) {
|
||||||
callback(new Error('请输入正确的邮箱格式'))
|
callback(new Error('请输入正确的邮箱格式'))
|
||||||
} else {
|
} else {
|
||||||
@ -241,42 +234,42 @@ const customEvent2 = (e: any) => {
|
|||||||
custom_name.value = e.custom_name;
|
custom_name.value = e.custom_name;
|
||||||
showDialog2.value = false;
|
showDialog2.value = false;
|
||||||
};
|
};
|
||||||
const updateCost = () => {
|
// const updateCost = () => {
|
||||||
|
|
||||||
for (let i = 0; i < tableData.length; i++) {
|
// for (let i = 0; i < tableData.length; i++) {
|
||||||
const row = tableData[i];
|
// const row = tableData[i];
|
||||||
|
|
||||||
if (row.cost && row.cost > 0) {
|
// if (row.cost && row.cost > 0) {
|
||||||
row.rate = (row.cost / Number(totalenum.value)).toFixed(2) + '%';
|
// row.rate = (row.cost / Number(totalenum.value)).toFixed(2) + '%';
|
||||||
} else {
|
// } else {
|
||||||
row.rate = ''
|
// row.rate = ''
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
|
|
||||||
|
|
||||||
//监听获取成本%
|
//监听获取成本%
|
||||||
const costinput = (row, index) => {
|
// const costinput = (row, index) => {
|
||||||
|
|
||||||
row.rate = (row.cost / Number(totalenum.value)).toFixed(2) + '%'
|
// row.rate = (row.cost / Number(totalenum.value)).toFixed(2) + '%'
|
||||||
|
|
||||||
if (index == 0) {
|
// if (index == 0) {
|
||||||
formData.cl_cost = row.cost
|
// formData.cl_cost = row.cost
|
||||||
} else if (index == 2) {
|
// } else if (index == 2) {
|
||||||
formData.fb_cost = row.cost
|
// formData.fb_cost = row.cost
|
||||||
} else if (index == 3) {
|
// } else if (index == 3) {
|
||||||
formData.rg_cost = row.cost
|
// formData.rg_cost = row.cost
|
||||||
} else if (index == 4) {
|
// } else if (index == 4) {
|
||||||
formData.fy_cost = row.cost
|
// formData.fy_cost = row.cost
|
||||||
} else if (index == 5) {
|
// } else if (index == 5) {
|
||||||
formData.jj_cost = row.cost
|
// formData.jj_cost = row.cost
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
//打开弹窗
|
//打开弹窗
|
||||||
@ -290,68 +283,68 @@ const submituser = (e: any) => {
|
|||||||
formData.project_manager = e.id;
|
formData.project_manager = e.id;
|
||||||
manage_name.value = e.name;
|
manage_name.value = e.name;
|
||||||
}
|
}
|
||||||
interface Product {
|
// interface Product {
|
||||||
id: string
|
// id: string
|
||||||
name: string
|
// name: string
|
||||||
text: string
|
// text: string
|
||||||
cost: number
|
// cost: number
|
||||||
rate: string
|
// rate: string
|
||||||
cl_cost: number
|
// cl_cost: number
|
||||||
|
|
||||||
}
|
// }
|
||||||
interface SummaryMethodProps<T = Product> {
|
// interface SummaryMethodProps<T = Product> {
|
||||||
columns: TableColumnCtx<T>[]
|
// columns: TableColumnCtx<T>[]
|
||||||
data: T[]
|
// data: T[]
|
||||||
}
|
// }
|
||||||
const getSummaries = (param: SummaryMethodProps) => {
|
// const getSummaries = (param: SummaryMethodProps) => {
|
||||||
// FIXME
|
// // FIXME
|
||||||
updateCost();
|
// updateCost();
|
||||||
if (formData && formData.contract_amount && project_amount.value) {
|
// if (formData && formData.contract_amount && project_amount.value) {
|
||||||
project_amount.value = Number(formData.contract_amount) - Number(project_amount.value);
|
// project_amount.value = Number(formData.contract_amount) - Number(project_amount.value);
|
||||||
project_rate.value = (Number(project_amount.value) / Number(formData.contract_amount)).toFixed(2) + '%';
|
// project_rate.value = (Number(project_amount.value) / Number(formData.contract_amount)).toFixed(2) + '%';
|
||||||
}
|
// }
|
||||||
if (project_amount.value) {
|
// if (project_amount.value) {
|
||||||
project_amount.value = Number(formData.contract_amount) - Number(project_amount.value);
|
// project_amount.value = Number(formData.contract_amount) - Number(project_amount.value);
|
||||||
project_rate.value = (Number(project_amount.value) / Number(formData.contract_amount)).toFixed(2) + '%';
|
// project_rate.value = (Number(project_amount.value) / Number(formData.contract_amount)).toFixed(2) + '%';
|
||||||
}
|
// }
|
||||||
const { columns, data } = param
|
// const { columns, data } = param
|
||||||
const sums: string[] = []
|
// const sums: string[] = []
|
||||||
columns.map((column, index) => {
|
// columns.map((column, index) => {
|
||||||
|
|
||||||
if (column.label == '序号') {
|
// if (column.label == '序号') {
|
||||||
sums[index] = '合计'
|
// sums[index] = '合计'
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if (column.label == '分项') {
|
// if (column.label == '分项') {
|
||||||
sums[index] = ''
|
// sums[index] = ''
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if (column.label === '成本占比') {
|
// if (column.label === '成本占比') {
|
||||||
sums[index] = ''
|
// sums[index] = ''
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
const values = data.map((item: any) => Number(item[column.property]))
|
// const values = data.map((item: any) => Number(item[column.property]))
|
||||||
|
|
||||||
if (!values.every((value) => Number.isNaN(value))) {
|
// if (!values.every((value) => Number.isNaN(value))) {
|
||||||
|
|
||||||
sums[index] = `${values.reduce((prev, curr) => {
|
// sums[index] = `${values.reduce((prev, curr) => {
|
||||||
const value = Number(curr)
|
// const value = Number(curr)
|
||||||
if (!Number.isNaN(value)) {
|
// if (!Number.isNaN(value)) {
|
||||||
return prev + curr
|
// return prev + curr
|
||||||
} else {
|
// } else {
|
||||||
return prev
|
// return prev
|
||||||
}
|
// }
|
||||||
}, 0)}`
|
// }, 0)}`
|
||||||
} else {
|
// } else {
|
||||||
sums[index] = 'N/A'
|
// sums[index] = 'N/A'
|
||||||
}
|
// }
|
||||||
|
|
||||||
})
|
// })
|
||||||
totalenum.value = sums[2]
|
// totalenum.value = sums[2]
|
||||||
project_amount.value = sums[2]
|
// project_amount.value = sums[2]
|
||||||
return sums
|
// return sums
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
//监听输入
|
//监听输入
|
||||||
@ -420,19 +413,6 @@ const getlist1 = (id: any) => {
|
|||||||
|
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
if (data.budget_list && data.budget_list.length > 0) {
|
|
||||||
|
|
||||||
const arry1 = data.budget_list.map((item: any, index: any) => {
|
|
||||||
return {
|
|
||||||
name: `文件${index + 1}`,
|
|
||||||
uri: item
|
|
||||||
};
|
|
||||||
});
|
|
||||||
Object.assign(formDataannex, arry1)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
for (const key in formData) {
|
for (const key in formData) {
|
||||||
if (data[key] != null && data[key] != undefined) {
|
if (data[key] != null && data[key] != undefined) {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
@ -443,17 +423,6 @@ const setFormData = async (data: Record<any, any>) => {
|
|||||||
project_name.value = data.project_name
|
project_name.value = data.project_name
|
||||||
project_code.value = data.project_code
|
project_code.value = data.project_code
|
||||||
|
|
||||||
tableData[0].cost = data.cl_cost
|
|
||||||
|
|
||||||
tableData[1].cost = data.fb_cost
|
|
||||||
|
|
||||||
tableData[2].cost = data.rg_cost
|
|
||||||
|
|
||||||
tableData[3].cost = data.fy_cost
|
|
||||||
|
|
||||||
tableData[4].cost = data.jj_cost
|
|
||||||
|
|
||||||
|
|
||||||
if (data && data.contract_name) {
|
if (data && data.contract_name) {
|
||||||
contract_name.value = data.contract_name;
|
contract_name.value = data.contract_name;
|
||||||
|
|
||||||
@ -471,8 +440,6 @@ const getDetail = async (row: Record<string, any>) => {
|
|||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
|
|
||||||
|
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
|
|
||||||
const data = { ...formData }
|
const data = { ...formData }
|
||||||
@ -500,27 +467,27 @@ const handleClose = () => {
|
|||||||
emit('close')
|
emit('close')
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
// watch(
|
||||||
[totalenum, project_amount, project_rate,], (newValue, oldValue) => {
|
// [totalenum, project_amount, project_rate,], (newValue, oldValue) => {
|
||||||
updateCost();
|
// updateCost();
|
||||||
if (formData && formData.contract_amount && project_amount.value) {
|
// if (formData && formData.contract_amount && project_amount.value) {
|
||||||
project_amount.value = Number(formData.contract_amount) - Number(project_amount.value);
|
// project_amount.value = Number(formData.contract_amount) - Number(project_amount.value);
|
||||||
project_rate.value = (Number(project_amount.value) / Number(formData.contract_amount)).toFixed(2) + '%';
|
// project_rate.value = (Number(project_amount.value) / Number(formData.contract_amount)).toFixed(2) + '%';
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
|
|
||||||
)
|
// )
|
||||||
|
|
||||||
watch(
|
// watch(
|
||||||
() => formData.contract_amount,
|
// () => formData.contract_amount,
|
||||||
(newValue, oldValue) => {
|
// (newValue, oldValue) => {
|
||||||
|
|
||||||
if (project_amount.value) {
|
// if (project_amount.value) {
|
||||||
project_amount.value = Number(formData.contract_amount) - Number(project_amount.value);
|
// project_amount.value = Number(formData.contract_amount) - Number(project_amount.value);
|
||||||
project_rate.value = (Number(project_amount.value) / Number(formData.contract_amount)).toFixed(2) + '%';
|
// project_rate.value = (Number(project_amount.value) / Number(formData.contract_amount)).toFixed(2) + '%';
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
)
|
// )
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
|
527
src/views/project_total_budget/edit1.vue
Normal file
527
src/views/project_total_budget/edit1.vue
Normal file
@ -0,0 +1,527 @@
|
|||||||
|
<template>
|
||||||
|
<div class="edit-popup">
|
||||||
|
|
||||||
|
<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;">
|
||||||
|
<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>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="项目名称" prop="project_id" @click="showDialog2 = true"
|
||||||
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
|
<el-input v-model="project_name" clearable placeholder="请输入项目名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="项目编码" prop="project_id"
|
||||||
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
|
<el-input v-model="project_code" clearable disabled placeholder="系统自动填写" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<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" @change="getSummaries" clearable
|
||||||
|
placeholder="请输入合同金额(元)" />
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="项目利润(元)" prop="project_id"
|
||||||
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
|
<el-input v-model="project_amount" clearable disabled placeholder="请输入项目利润(元)" />
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="项目利润率(%)" prop="project_id"
|
||||||
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
|
<el-input v-model="project_rate" clearable disabled placeholder="请输入项目利润率(%)" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<br />
|
||||||
|
<!-- <el-row>
|
||||||
|
<el-table :data="tableData" :summary-method="getSummaries" show-summary>
|
||||||
|
<el-table-column label="序号" type="index" width="56">
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="分项">
|
||||||
|
<template #default="{ row, $index }">
|
||||||
|
<div>{{ row.name }}</div>
|
||||||
|
<div>{{ row.text }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="预算成本" prop="cost">
|
||||||
|
|
||||||
|
<template #default="{ row, $index }">
|
||||||
|
<el-input v-model="row.cost" @input="costinput(row, $index)" /> </template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="成本占比" prop="rate" width="156">
|
||||||
|
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.rate }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-row> -->
|
||||||
|
|
||||||
|
<el-row style="margin: 20px 0;">
|
||||||
|
<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 :span="8">
|
||||||
|
<el-form-item label="项目经理" prop="project_manager"
|
||||||
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
|
<el-input v-model="formData.project_manager" clearable placeholder="请输入项目经理" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="预算日期" prop="budget_date"
|
||||||
|
:rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||||
|
<el-date-picker v-model="formData.budget_date" clearable type="date" value-format="YYYY-MM-DD "
|
||||||
|
placeholder="选择预算日期">
|
||||||
|
</el-date-picker>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="预算清单">
|
||||||
|
<uploadAnnex :formData="formData" value='budget_list'></uploadAnnex>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-dialog v-model="showDialog1" title="选择合同" width="70%">
|
||||||
|
<salescontractDialog @customEvent="customEvent1"></salescontractDialog>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog v-model="showDialog2" title="选择项目" width="70%">
|
||||||
|
<projectDialog @customEvent="customEvent2"></projectDialog>
|
||||||
|
</el-dialog>
|
||||||
|
<personnelselector ref="personnel" @confirm="submituser" type="1"></personnelselector>
|
||||||
|
</el-form>
|
||||||
|
</popup>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup name="projectEdit">
|
||||||
|
import customDialog from '@/components/custom-dialog/index.vue'
|
||||||
|
import type { FormInstance } from 'element-plus'
|
||||||
|
import Popup from '@/components/popup/index.vue'
|
||||||
|
import salescontractDialog from '@/components/salescontract/index.vue'
|
||||||
|
import projectDialog from '@/components/project/index.vue'
|
||||||
|
import type { TableColumnCtx } from 'element-plus'
|
||||||
|
import { apiProjectbudgetAdd, apiProjectbudgetEdit, apiProjectbudgetDetail } from '@/api/project_total_budget'
|
||||||
|
import { toChinesNum } from "@/utils/util";
|
||||||
|
import { getAllProjectTypes } from '@/api/projecttype'
|
||||||
|
import { timeFormat } from '@/utils/util'
|
||||||
|
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
||||||
|
import { deptAll } from '@/api/org/department'
|
||||||
|
import { getAll } from '@/api/org/organization'
|
||||||
|
import type { PropType } from 'vue'
|
||||||
|
import configs from "@/config"
|
||||||
|
import useUserStore from "@/stores/modules/user";
|
||||||
|
import { number } from 'echarts/core'
|
||||||
|
const protype = reactive([])
|
||||||
|
const base_url = configs.baseUrl + configs.urlPrefix
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const active = ref(0)
|
||||||
|
const formDataannex = reactive([])
|
||||||
|
const list1 = reactive([])
|
||||||
|
const list2 = reactive([])
|
||||||
|
|
||||||
|
|
||||||
|
const project_amount = ref(0)
|
||||||
|
const project_rate = ref(0)
|
||||||
|
|
||||||
|
const tableData = reactive([{
|
||||||
|
name: "材料/设备成本(元)",
|
||||||
|
text: '用于控制材料成本',
|
||||||
|
cost: "", rate: "",
|
||||||
|
cl_cost: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "分包成本(元)",
|
||||||
|
text: '用于控制分包成本', cost: "", rate: "",
|
||||||
|
fb_cost: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "人工成本(元)",
|
||||||
|
text: '用于控制工时成本及项目人力成本', cost: "", rate: "",
|
||||||
|
rg_cost: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "费用成本(元)",
|
||||||
|
text: '用于控制费用报销及差旅报销', cost: "", rate: "",
|
||||||
|
fy_cost: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "机械 & 工具成本(元)",
|
||||||
|
text: '用于控制机械及设备成本', cost: "", rate: "",
|
||||||
|
jj_cost: ''
|
||||||
|
},
|
||||||
|
|
||||||
|
])
|
||||||
|
const contract_name = ref('')
|
||||||
|
const project_name = ref('')
|
||||||
|
const project_code = ref('')
|
||||||
|
const contract_no = ref('')
|
||||||
|
const custom_name = ref('')
|
||||||
|
const manage_name = ref('')
|
||||||
|
const userInfo = userStore.userInfo
|
||||||
|
const personnel = ref<any>()
|
||||||
|
|
||||||
|
//验证
|
||||||
|
const checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => {
|
||||||
|
|
||||||
|
if (value && !/^1\d{10}$/.test(value)) {
|
||||||
|
callback(new Error('请输入正确的手机号码'));
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
const userEmail = (rule: any, value: string, callback: (arg0: Error | undefined) => void) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (value && !mailReg.test(value)) {
|
||||||
|
callback(new Error('请输入正确的邮箱格式'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
dictData: {
|
||||||
|
type: Object as PropType<Record<string, any[]>>,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const emit = defineEmits(['success', 'close'])
|
||||||
|
const formRef = shallowRef<FormInstance>()
|
||||||
|
const popupRef = shallowRef<InstanceType<Popup>>()
|
||||||
|
const mode = ref('add')
|
||||||
|
const totalenum = ref('')
|
||||||
|
const showDialog = ref(false)
|
||||||
|
const showDialog1 = ref(false)
|
||||||
|
const showDialog2 = ref(false)
|
||||||
|
const customEvent = (e: any) => {
|
||||||
|
formData.customer_id = e.id;
|
||||||
|
custom_name.value = e.name;
|
||||||
|
showDialog.value = false;
|
||||||
|
};
|
||||||
|
const customEvent1 = (e: any) => {
|
||||||
|
formData.contract_id = e.id;
|
||||||
|
contract_name.value = e.contract_name;
|
||||||
|
contract_no.value = e.contract_code
|
||||||
|
showDialog1.value = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const customEvent2 = (e: any) => {
|
||||||
|
formData.project_id = e.id;
|
||||||
|
project_name.value = e.name;
|
||||||
|
project_code.value = e.project_code;
|
||||||
|
custom_name.value = e.custom_name;
|
||||||
|
showDialog2.value = false;
|
||||||
|
};
|
||||||
|
const updateCost = () => {
|
||||||
|
|
||||||
|
for (let i = 0; i < tableData.length; i++) {
|
||||||
|
const row = tableData[i];
|
||||||
|
|
||||||
|
if (row.cost && row.cost > 0) {
|
||||||
|
row.rate = (row.cost / Number(totalenum.value)).toFixed(2) + '%';
|
||||||
|
} else {
|
||||||
|
row.rate = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
//监听获取成本%
|
||||||
|
const costinput = (row, index) => {
|
||||||
|
|
||||||
|
row.rate = (row.cost / Number(totalenum.value)).toFixed(2) + '%'
|
||||||
|
|
||||||
|
if (index == 0) {
|
||||||
|
formData.cl_cost = row.cost
|
||||||
|
} else if (index == 2) {
|
||||||
|
formData.fb_cost = row.cost
|
||||||
|
} else if (index == 3) {
|
||||||
|
formData.rg_cost = row.cost
|
||||||
|
} else if (index == 4) {
|
||||||
|
formData.fy_cost = row.cost
|
||||||
|
} else if (index == 5) {
|
||||||
|
formData.jj_cost = row.cost
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//打开弹窗
|
||||||
|
|
||||||
|
const userclick = () => {
|
||||||
|
personnel.value.open()
|
||||||
|
|
||||||
|
}
|
||||||
|
//确认
|
||||||
|
const submituser = (e: any) => {
|
||||||
|
formData.project_manager = e.id;
|
||||||
|
manage_name.value = e.name;
|
||||||
|
}
|
||||||
|
interface Product {
|
||||||
|
id: string
|
||||||
|
name: string
|
||||||
|
text: string
|
||||||
|
cost: number
|
||||||
|
rate: string
|
||||||
|
cl_cost: number
|
||||||
|
|
||||||
|
}
|
||||||
|
interface SummaryMethodProps<T = Product> {
|
||||||
|
columns: TableColumnCtx<T>[]
|
||||||
|
data: T[]
|
||||||
|
}
|
||||||
|
const getSummaries = (param: SummaryMethodProps) => {
|
||||||
|
// FIXME
|
||||||
|
updateCost();
|
||||||
|
if (formData && formData.contract_amount && project_amount.value) {
|
||||||
|
project_amount.value = Number(formData.contract_amount) - Number(project_amount.value);
|
||||||
|
project_rate.value = (Number(project_amount.value) / Number(formData.contract_amount)).toFixed(2) + '%';
|
||||||
|
}
|
||||||
|
if (project_amount.value) {
|
||||||
|
project_amount.value = Number(formData.contract_amount) - Number(project_amount.value);
|
||||||
|
project_rate.value = (Number(project_amount.value) / Number(formData.contract_amount)).toFixed(2) + '%';
|
||||||
|
}
|
||||||
|
const { columns, data } = param
|
||||||
|
const sums: string[] = []
|
||||||
|
columns.map((column, index) => {
|
||||||
|
|
||||||
|
if (column.label == '序号') {
|
||||||
|
sums[index] = '合计'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (column.label == '分项') {
|
||||||
|
sums[index] = ''
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (column.label === '成本占比') {
|
||||||
|
sums[index] = ''
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const values = data.map((item: any) => Number(item[column.property]))
|
||||||
|
|
||||||
|
if (!values.every((value) => Number.isNaN(value))) {
|
||||||
|
|
||||||
|
sums[index] = `${values.reduce((prev, curr) => {
|
||||||
|
const value = Number(curr)
|
||||||
|
if (!Number.isNaN(value)) {
|
||||||
|
return prev + curr
|
||||||
|
} else {
|
||||||
|
return prev
|
||||||
|
}
|
||||||
|
}, 0)}`
|
||||||
|
} else {
|
||||||
|
sums[index] = 'N/A'
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
totalenum.value = sums[2]
|
||||||
|
project_amount.value = sums[2]
|
||||||
|
return sums
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//监听输入
|
||||||
|
const amountinput = (e) => {
|
||||||
|
if (e && e > 0) {
|
||||||
|
formData.amount_daxie = toChinesNum(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 弹窗标题
|
||||||
|
const popupTitle = computed(() => {
|
||||||
|
return mode.value == 'edit' ? '编辑总预算表' : '新增总预算表'
|
||||||
|
})
|
||||||
|
|
||||||
|
// 表单数据
|
||||||
|
const formData = reactive({
|
||||||
|
id: '',
|
||||||
|
org_id: "",
|
||||||
|
dept_id: "",
|
||||||
|
project_id: "",
|
||||||
|
contract_amount: 0,
|
||||||
|
cl_cost: "",
|
||||||
|
fb_cost: "",
|
||||||
|
rg_cost: "",
|
||||||
|
fy_cost: "",
|
||||||
|
jj_cost: "",
|
||||||
|
remark: "",
|
||||||
|
budget_list: [],
|
||||||
|
budget_date: "",
|
||||||
|
project_manager: "",
|
||||||
|
approve_detail: {}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// 表单验证
|
||||||
|
const formRules = reactive<any>({
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
//获取所有组织
|
||||||
|
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 setFormData = async (data: Record<any, any>) => {
|
||||||
|
if (data.budget_list && data.budget_list.length > 0) {
|
||||||
|
|
||||||
|
const arry1 = data.budget_list.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
|
||||||
|
formData[key] = data[key]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
project_name.value = data.project_name
|
||||||
|
project_code.value = data.project_code
|
||||||
|
|
||||||
|
tableData[0].cost = data.cl_cost
|
||||||
|
|
||||||
|
tableData[1].cost = data.fb_cost
|
||||||
|
|
||||||
|
tableData[2].cost = data.rg_cost
|
||||||
|
|
||||||
|
tableData[3].cost = data.fy_cost
|
||||||
|
|
||||||
|
tableData[4].cost = data.jj_cost
|
||||||
|
|
||||||
|
|
||||||
|
if (data && data.contract_name) {
|
||||||
|
contract_name.value = data.contract_name;
|
||||||
|
|
||||||
|
}
|
||||||
|
getlist1(formData.org_id)
|
||||||
|
}
|
||||||
|
|
||||||
|
const getDetail = async (row: Record<string, any>) => {
|
||||||
|
const data = await apiProjectbudgetDetail({
|
||||||
|
id: row.id
|
||||||
|
})
|
||||||
|
setFormData(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 提交按钮
|
||||||
|
const handleSubmit = async () => {
|
||||||
|
|
||||||
|
|
||||||
|
await formRef.value?.validate()
|
||||||
|
|
||||||
|
const data = { ...formData }
|
||||||
|
mode.value == 'edit'
|
||||||
|
? await apiProjectbudgetEdit(data)
|
||||||
|
: await apiProjectbudgetAdd(data)
|
||||||
|
popupRef.value?.close()
|
||||||
|
emit('success')
|
||||||
|
}
|
||||||
|
|
||||||
|
//打开弹窗
|
||||||
|
const open = (type = 'add') => {
|
||||||
|
mode.value = type
|
||||||
|
popupRef.value?.open()
|
||||||
|
|
||||||
|
getAllProjectTypes().then((res) => {
|
||||||
|
protype.splice(0, protype.length, ...res);
|
||||||
|
})
|
||||||
|
getlist()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关闭回调
|
||||||
|
const handleClose = () => {
|
||||||
|
emit('close')
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
[totalenum, project_amount, project_rate,], (newValue, oldValue) => {
|
||||||
|
updateCost();
|
||||||
|
if (formData && formData.contract_amount && project_amount.value) {
|
||||||
|
project_amount.value = Number(formData.contract_amount) - Number(project_amount.value);
|
||||||
|
project_rate.value = (Number(project_amount.value) / Number(formData.contract_amount)).toFixed(2) + '%';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
)
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => formData.contract_amount,
|
||||||
|
(newValue, oldValue) => {
|
||||||
|
|
||||||
|
if (project_amount.value) {
|
||||||
|
project_amount.value = Number(formData.contract_amount) - Number(project_amount.value);
|
||||||
|
project_rate.value = (Number(project_amount.value) / Number(formData.contract_amount)).toFixed(2) + '%';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
open,
|
||||||
|
setFormData,
|
||||||
|
getDetail
|
||||||
|
})
|
||||||
|
</script>
|
@ -47,7 +47,7 @@
|
|||||||
<el-table-column label="费用预算成本" prop="fy_cost" show-overflow-tooltip width="120" />
|
<el-table-column label="费用预算成本" prop="fy_cost" show-overflow-tooltip width="120" />
|
||||||
<el-table-column label="机具预算成本" prop="jj_cost" show-overflow-tooltip width="120" />
|
<el-table-column label="机具预算成本" prop="jj_cost" show-overflow-tooltip width="120" />
|
||||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="150" fixed="right">
|
<el-table-column label="操作" width="170" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['project.project_manager_apiprojectbudget/edit']" type="primary" link
|
<el-button v-perms="['project.project_manager_apiprojectbudget/edit']" type="primary" link
|
||||||
@click="handleEdit(row)">
|
@click="handleEdit(row)">
|
||||||
|
55
src/views/quality_accept/detail.js
Normal file
55
src/views/quality_accept/detail.js
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
const detailConfig = {
|
||||||
|
title: "质量验收表",
|
||||||
|
config: [
|
||||||
|
{
|
||||||
|
label: "组织名称",
|
||||||
|
value: "org_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "部门名称",
|
||||||
|
value: "dept_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "项目名称",
|
||||||
|
value: "project_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "项目编码",
|
||||||
|
value: "project_code"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "验收日期",
|
||||||
|
value: "accept_date"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "验收类型",
|
||||||
|
value: "type"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "验收工程师",
|
||||||
|
value: "engineer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "验收内容",
|
||||||
|
value: "content"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "验收类型",
|
||||||
|
value: "type"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "备注",
|
||||||
|
value: "remark",
|
||||||
|
column: 1
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "附件",
|
||||||
|
value: "file",
|
||||||
|
column: 1
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
export default detailConfig;
|
@ -1,168 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="detail-popup">
|
|
||||||
<popup ref="popupRef" title="安全规范详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
|
||||||
<el-card class="mb-2">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="组织名称">
|
|
||||||
{{ formData.org_name }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="部门名称">
|
|
||||||
{{ formData.dept_name
|
|
||||||
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="规范名称">
|
|
||||||
{{ formData.name
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="规范类别">
|
|
||||||
{{ formData.type
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="发布部门">
|
|
||||||
{{ formData.publish_dep
|
|
||||||
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="内容">
|
|
||||||
{{ formData.content }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="规范附件">
|
|
||||||
<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-card>
|
|
||||||
</el-form>
|
|
||||||
</popup>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup name="customdetail">
|
|
||||||
|
|
||||||
import type { FormInstance } from 'element-plus'
|
|
||||||
import Popup from '@/components/popup/index.vue'
|
|
||||||
import { apiCustomDetail } from '@/api/custom'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import type { PropType } from 'vue'
|
|
||||||
defineProps({
|
|
||||||
dictData: {
|
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const emit = defineEmits(['success', 'close'])
|
|
||||||
const formRef = shallowRef<FormInstance>()
|
|
||||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
|
||||||
const formDataannex = reactive([])
|
|
||||||
const datas = reactive({
|
|
||||||
provinceOptions: [],
|
|
||||||
cityOptions: [],
|
|
||||||
areaOptions: [],
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 表单数据
|
|
||||||
const formData = reactive({
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取详情
|
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
|
||||||
Object.assign(formData, data)
|
|
||||||
|
|
||||||
|
|
||||||
if (data.file && data.file.length > 0) {
|
|
||||||
|
|
||||||
const arry1 = data.file.map((item: any, index: any) => {
|
|
||||||
return {
|
|
||||||
name: `文件${index + 1}`,
|
|
||||||
uri: item
|
|
||||||
};
|
|
||||||
});
|
|
||||||
Object.assign(formDataannex, arry1)
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
|
||||||
const data = await apiCustomDetail({
|
|
||||||
id: row.id
|
|
||||||
})
|
|
||||||
setFormData(data)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 提交按钮
|
|
||||||
const handleSubmit = async () => {
|
|
||||||
popupRef.value?.close()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//打开弹窗
|
|
||||||
const open = () => {
|
|
||||||
popupRef.value?.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 关闭回调
|
|
||||||
const handleClose = () => {
|
|
||||||
emit('close')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
open,
|
|
||||||
setFormData,
|
|
||||||
getDetail
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.tit {
|
|
||||||
font-size: 1.2em;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.my-label) {
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
|
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
@ -62,36 +61,14 @@
|
|||||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
|
|
||||||
<el-form-item label="附件">
|
<el-form-item label="附件">
|
||||||
<el-upload
|
<uploadAnnex :formData="formData" value="file"></uploadAnnex>
|
||||||
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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||||
<porjectDialog @customEvent="customEvent"></porjectDialog>
|
<porjectDialog @customEvent="customEvent"></porjectDialog>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@ -108,45 +85,17 @@ import porjectDialog from '@/components/project/index.vue'
|
|||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
import { qualityacceptAdd, qualityacceptEdit, qualityacceptDetail } from '@/api/quality_accept'
|
import { qualityacceptAdd, qualityacceptEdit, qualityacceptDetail } from '@/api/quality_accept'
|
||||||
import { toChinesNum } from "@/utils/util";
|
|
||||||
import { getAllProjectTypes } from '@/api/projecttype'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import configs from "@/config"
|
import configs from "@/config"
|
||||||
import useUserStore from "@/stores/modules/user";
|
import useUserStore from "@/stores/modules/user";
|
||||||
const protype = reactive([])
|
|
||||||
const base_url = configs.baseUrl + configs.urlPrefix
|
|
||||||
const userStore = useUserStore();
|
|
||||||
const active = ref(0)
|
|
||||||
const formDataannex = reactive([])
|
|
||||||
const list1 = reactive([])
|
const list1 = reactive([])
|
||||||
const list2 = reactive([])
|
const list2 = reactive([])
|
||||||
const showDialog = ref(false)
|
const showDialog = ref(false)
|
||||||
const project_name = ref('')
|
const project_name = ref('')
|
||||||
import { deptAll } from '@/api/org/department'
|
import { deptAll } from '@/api/org/department'
|
||||||
import { getAll } from '@/api/org/organization'
|
import { getAll } from '@/api/org/organization'
|
||||||
const userInfo = userStore.userInfo
|
|
||||||
// 上传文件
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
defineProps({
|
defineProps({
|
||||||
dictData: {
|
dictData: {
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
type: Object as PropType<Record<string, any[]>>,
|
||||||
@ -186,7 +135,7 @@ const getlist1 = (id: any) => {
|
|||||||
|
|
||||||
// 弹窗标题
|
// 弹窗标题
|
||||||
const popupTitle = computed(() => {
|
const popupTitle = computed(() => {
|
||||||
return mode.value == 'edit' ? '编辑质量目标表' : '新增质量目标表'
|
return mode.value == 'edit' ? '编辑质量验收表' : '新增质量验收表'
|
||||||
})
|
})
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
@ -213,20 +162,6 @@ const formRules = reactive<any>({
|
|||||||
|
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
if (data.file && data.file.length > 0) {
|
|
||||||
|
|
||||||
const arry1 = data.file.map((item: any, index: any) => {
|
|
||||||
return {
|
|
||||||
name: `文件${index + 1}`,
|
|
||||||
uri: item
|
|
||||||
};
|
|
||||||
});
|
|
||||||
Object.assign(formDataannex, arry1)
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
for (const key in formData) {
|
for (const key in formData) {
|
||||||
if (data[key] != null && data[key] != undefined) {
|
if (data[key] != null && data[key] != undefined) {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
@ -234,8 +169,7 @@ const setFormData = async (data: Record<any, any>) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.dept_id) {
|
if (data.dept_id) {
|
||||||
getlist1(data.dept_id
|
getlist1(data.org_id)
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
project_name.value = data.project_name
|
project_name.value = data.project_name
|
||||||
@ -252,11 +186,7 @@ const getDetail = async (row: Record<string, any>) => {
|
|||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
formData.file = formDataannex.map((item) => item.uri)
|
|
||||||
|
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
|
|
||||||
|
|
||||||
const data = { ...formData }
|
const data = { ...formData }
|
||||||
mode.value == 'edit'
|
mode.value == 'edit'
|
||||||
? await qualityacceptEdit(data)
|
? await qualityacceptEdit(data)
|
||||||
|
@ -38,29 +38,12 @@
|
|||||||
<el-table-column label="序号" type="index" width="55" />
|
<el-table-column label="序号" type="index" width="55" />
|
||||||
<el-table-column label="组织名称" prop="org_name" show-overflow-tooltip />
|
<el-table-column label="组织名称" prop="org_name" show-overflow-tooltip />
|
||||||
<el-table-column label="部门名称" prop="dept_name" show-overflow-tooltip />
|
<el-table-column label="部门名称" prop="dept_name" 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="type" show-overflow-tooltip />
|
<el-table-column label="验收类型" prop="type" show-overflow-tooltip />
|
||||||
<el-table-column label="验收日期" prop="accept_date" show-overflow-tooltip />
|
<el-table-column label="验收日期" prop="accept_date" show-overflow-tooltip />
|
||||||
<el-table-column label="验收内容" prop="content" show-overflow-tooltip />
|
<el-table-column label="验收内容" prop="content" show-overflow-tooltip />
|
||||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||||
|
<el-table-column label="操作" width="170" fixed="right">
|
||||||
<el-table-column label="规范附件" prop="file" show-overflow-tooltip>
|
|
||||||
|
|
||||||
<template #default="{ row }">
|
|
||||||
<div v-if="row.file && row.file.length > 0">
|
|
||||||
<div v-for="(item, i) in row.file " :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="操作" width="150" fixed="right">
|
|
||||||
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['quality.quality_accept/edit']" type="primary" link
|
<el-button v-perms="['quality.quality_accept/edit']" type="primary" link
|
||||||
@click="handleEdit(row)">
|
@click="handleEdit(row)">
|
||||||
@ -70,10 +53,9 @@
|
|||||||
@click="handleDelete(row.id)">
|
@click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button v-perms="['quality.quality_accept/detail']" link @click="handledetail(row)">
|
<el-button v-perms="['quality.quality_accept/detail']" link @click="handleDetail(row.id)">
|
||||||
详情
|
详情
|
||||||
</el-button> -->
|
</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -83,7 +65,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
<detailPage v-if="showDetail" ref="detailRef" @close="showEdit = false" :detailConfig="detailConfig" width="30vw"
|
||||||
|
:column="1" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -91,18 +74,16 @@
|
|||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { qualityacceptLists, qualityacceptDelete, qualityacceptDetail } from '@/api/quality_accept'
|
import { qualityacceptLists, qualityacceptDelete, qualityacceptDetail } from '@/api/quality_accept'
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import { getAllProjectTypes } from '@/api/projecttype'
|
|
||||||
const protype = reactive([])
|
const protype = reactive([])
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import DetailPopup from './detail.vue'
|
import detailConfig from './detail'
|
||||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
|
const detailRef = ref('')
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
const showDtail = ref(false)
|
const showDetail = ref(false)
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
accept_date: '',
|
accept_date: '',
|
||||||
@ -152,14 +133,14 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
await qualityacceptDelete({ id })
|
await qualityacceptDelete({ id })
|
||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
const handledetail = async (data: any) => {
|
// 详情
|
||||||
let res = await qualityacceptDetail({ id: data.id })
|
const handleDetail = async (id: any) => {
|
||||||
showDtail.value = true
|
let res = await qualityacceptDetail({ id })
|
||||||
|
showDetail.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
detailRef.value?.open()
|
detailRef.value?.open()
|
||||||
detailRef.value?.setFormData(res)
|
detailRef.value?.setFormData(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getLists()
|
getLists()
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const detailConfig = {
|
const detailConfig = {
|
||||||
title: "质量事件表",
|
title: "安全事故表",
|
||||||
config: [
|
config: [
|
||||||
{
|
{
|
||||||
label: "组织名称",
|
label: "组织名称",
|
||||||
|
@ -74,29 +74,20 @@
|
|||||||
<el-input v-model="formData.content" type="textarea" clearable placeholder="请输入内容" />
|
<el-input v-model="formData.content" type="textarea" clearable placeholder="请输入内容" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
|
|
||||||
<el-form-item label="附件">
|
<el-form-item label="附件">
|
||||||
<uploadAnnex :formData="formData" value="file"></uploadAnnex>
|
<uploadAnnex :formData="formData" value="file"></uploadAnnex>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||||
<porjectDialog @customEvent="customEvent"></porjectDialog>
|
<porjectDialog @customEvent="customEvent"></porjectDialog>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</popup>
|
</popup>
|
||||||
|
|
||||||
@ -108,18 +99,9 @@ import porjectDialog from '@/components/project/index.vue'
|
|||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
import { qualityaccidentAdd, qualityaccidentEdit, qualityaccidentDetail } from '@/api/quality_accident'
|
import { qualityaccidentAdd, qualityaccidentEdit, qualityaccidentDetail } from '@/api/quality_accident'
|
||||||
import { toChinesNum } from "@/utils/util";
|
|
||||||
import { getAllProjectTypes } from '@/api/projecttype'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import configs from "@/config"
|
|
||||||
import useUserStore from "@/stores/modules/user";
|
import useUserStore from "@/stores/modules/user";
|
||||||
const protype = reactive([])
|
|
||||||
const base_url = configs.baseUrl + configs.urlPrefix
|
|
||||||
const userStore = useUserStore();
|
|
||||||
const active = ref(0)
|
|
||||||
const formDataannex = reactive([])
|
|
||||||
const list1 = reactive([])
|
const list1 = reactive([])
|
||||||
const list2 = reactive([])
|
const list2 = reactive([])
|
||||||
const showDialog = ref(false)
|
const showDialog = ref(false)
|
||||||
@ -127,7 +109,6 @@ const project_name = ref('')
|
|||||||
const project_code = ref('')
|
const project_code = ref('')
|
||||||
import { deptAll } from '@/api/org/department'
|
import { deptAll } from '@/api/org/department'
|
||||||
import { getAll } from '@/api/org/organization'
|
import { getAll } from '@/api/org/organization'
|
||||||
const userInfo = userStore.userInfo
|
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
dictData: {
|
dictData: {
|
||||||
@ -209,9 +190,7 @@ const setFormData = async (data: Record<any, any>) => {
|
|||||||
getlist1(data.dept_id
|
getlist1(data.dept_id
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
project_name.value = data.project_name
|
project_name.value = data.project_name
|
||||||
|
|
||||||
project_code.value = data.project_code
|
project_code.value = data.project_code
|
||||||
}
|
}
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
const getDetail = async (row: Record<string, any>) => {
|
||||||
|
87
src/views/quality_detection/detail.js
Normal file
87
src/views/quality_detection/detail.js
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
const detailConfig = {
|
||||||
|
title: "质量检测表",
|
||||||
|
config: [
|
||||||
|
{
|
||||||
|
label: "组织名称",
|
||||||
|
value: "org_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "部门名称",
|
||||||
|
value: "dept_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "项目名称",
|
||||||
|
value: "project_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "检测任务",
|
||||||
|
value: "detection_task"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "所属阶段",
|
||||||
|
value: "owning_stage"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "责任人",
|
||||||
|
value: "standard_duration"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "计划开始时间",
|
||||||
|
value: "scheduled_start_time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "计划结束时间",
|
||||||
|
value: "scheduled_end_time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "是否完成",
|
||||||
|
value: "complete"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "实际开始时间",
|
||||||
|
value: "actual_start_time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "实际结束时间",
|
||||||
|
value: "actual_end_time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "资料编号",
|
||||||
|
value: "document_number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "资料名称",
|
||||||
|
value: "document_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "文件稿本",
|
||||||
|
value: "document_manuscript"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "是否归档",
|
||||||
|
value: "archiving"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "资料内容要求",
|
||||||
|
value: "data_content_requirements"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "detection_situation",
|
||||||
|
value: "detection_situation"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "备注",
|
||||||
|
value: "remark",
|
||||||
|
column: 1
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "附件",
|
||||||
|
value: "file",
|
||||||
|
column: 1
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
export default detailConfig;
|
@ -1,169 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="detail-popup">
|
|
||||||
<popup ref="popupRef" title="安全规范详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
|
||||||
<el-card class="mb-2">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="组织名称">
|
|
||||||
{{ formData.org_name }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="部门名称">
|
|
||||||
{{ formData.dept_name
|
|
||||||
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="规范名称">
|
|
||||||
{{ formData.name
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="规范类别">
|
|
||||||
{{ formData.type
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="发布部门">
|
|
||||||
{{ formData.publish_dep
|
|
||||||
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="内容">
|
|
||||||
{{ formData.content }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="规范附件">
|
|
||||||
<!-- <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> -->
|
|
||||||
<annexLink :annex='formData.file'></annexLink>
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-row>
|
|
||||||
</el-card>
|
|
||||||
</el-form>
|
|
||||||
</popup>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup name="customdetail">
|
|
||||||
|
|
||||||
import type { FormInstance } from 'element-plus'
|
|
||||||
import Popup from '@/components/popup/index.vue'
|
|
||||||
import { apiCustomDetail } from '@/api/custom'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import type { PropType } from 'vue'
|
|
||||||
defineProps({
|
|
||||||
dictData: {
|
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const emit = defineEmits(['success', 'close'])
|
|
||||||
const formRef = shallowRef<FormInstance>()
|
|
||||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
|
||||||
const formDataannex = reactive([])
|
|
||||||
const datas = reactive({
|
|
||||||
provinceOptions: [],
|
|
||||||
cityOptions: [],
|
|
||||||
areaOptions: [],
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 表单数据
|
|
||||||
const formData = reactive({
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取详情
|
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
|
||||||
Object.assign(formData, data)
|
|
||||||
|
|
||||||
|
|
||||||
if (data.file && data.file.length > 0) {
|
|
||||||
|
|
||||||
const arry1 = data.file.map((item: any, index: any) => {
|
|
||||||
return {
|
|
||||||
name: `文件${index + 1}`,
|
|
||||||
uri: item
|
|
||||||
};
|
|
||||||
});
|
|
||||||
Object.assign(formDataannex, arry1)
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
|
||||||
const data = await apiCustomDetail({
|
|
||||||
id: row.id
|
|
||||||
})
|
|
||||||
setFormData(data)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 提交按钮
|
|
||||||
const handleSubmit = async () => {
|
|
||||||
popupRef.value?.close()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//打开弹窗
|
|
||||||
const open = () => {
|
|
||||||
popupRef.value?.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 关闭回调
|
|
||||||
const handleClose = () => {
|
|
||||||
emit('close')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
open,
|
|
||||||
setFormData,
|
|
||||||
getDetail
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.tit {
|
|
||||||
font-size: 1.2em;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.my-label) {
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
|
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
@ -156,18 +155,11 @@ import porjectDialog from '@/components/project/index.vue'
|
|||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
import { qualitydetectionAdd, qualitydetectionEdit, qualitydetectionDetail } from '@/api/quality_detection'
|
import { qualitydetectionAdd, qualitydetectionEdit, qualitydetectionDetail } from '@/api/quality_detection'
|
||||||
import { toChinesNum } from "@/utils/util";
|
|
||||||
import { getAllProjectTypes } from '@/api/projecttype'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import configs from "@/config"
|
import configs from "@/config"
|
||||||
import useUserStore from "@/stores/modules/user";
|
import useUserStore from "@/stores/modules/user";
|
||||||
const protype = reactive([])
|
|
||||||
const base_url = configs.baseUrl + configs.urlPrefix
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const active = ref(0)
|
|
||||||
const formDataannex = reactive([])
|
|
||||||
const list1 = reactive([])
|
const list1 = reactive([])
|
||||||
const list2 = reactive([])
|
const list2 = reactive([])
|
||||||
const showDialog = ref(false)
|
const showDialog = ref(false)
|
||||||
@ -175,7 +167,6 @@ const project_name = ref('')
|
|||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import { deptAll } from '@/api/org/department'
|
import { deptAll } from '@/api/org/department'
|
||||||
import { getAll } from '@/api/org/organization'
|
import { getAll } from '@/api/org/organization'
|
||||||
const userInfo = userStore.userInfo
|
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
dictData: {
|
dictData: {
|
||||||
@ -262,7 +253,7 @@ const setFormData = async (data: Record<any, any>) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.dept_id) {
|
if (data.dept_id) {
|
||||||
getlist1(data.dept_id
|
getlist1(data.org_id
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
<el-table-column label="检测情况" prop="detection_situation" show-overflow-tooltip />
|
<el-table-column label="检测情况" prop="detection_situation" show-overflow-tooltip />
|
||||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||||
|
|
||||||
<el-table-column label="操作" width="150" fixed="right">
|
<el-table-column label="操作" width="170" fixed="right">
|
||||||
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['quality.quality_detection/edit']" type="primary" link
|
<el-button v-perms="['quality.quality_detection/edit']" type="primary" link
|
||||||
@ -72,10 +72,10 @@
|
|||||||
@click="handleDelete(row.id)">
|
@click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button v-perms="['quality.quality_detection/detail']" link @click="handledetail(row)">
|
<el-button v-perms="['quality.quality_detection_temp/detail']" link
|
||||||
|
@click="handleDetail(row.id)">
|
||||||
详情
|
详情
|
||||||
</el-button> -->
|
</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -85,7 +85,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
<detailPage v-if="showDetail" ref="detailRef" @close="showEdit = false" :detailConfig="detailConfig" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -93,17 +93,17 @@
|
|||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { qualitydetectionLists, qualitydetectionDelete, qualitydetectionDetail } from '@/api/quality_detection'
|
import { qualitydetectionLists, qualitydetectionDelete, qualitydetectionDetail } from '@/api/quality_detection'
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import { getAllProjectTypes } from '@/api/projecttype'
|
|
||||||
const protype = reactive([])
|
const protype = reactive([])
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import DetailPopup from './detail.vue'
|
import detailConfig from './detail'
|
||||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
|
const detailRef = ref('')
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
const showDtail = ref(false)
|
const showDetail = ref(false)
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
@ -157,9 +157,10 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
await qualitydetectionDelete({ id })
|
await qualitydetectionDelete({ id })
|
||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
const handledetail = async (data: any) => {
|
// 详情
|
||||||
let res = await qualitydetectionDetail({ id: data.id })
|
const handleDetail = async (id: any) => {
|
||||||
showDtail.value = true
|
let res = await qualitydetectionDetail({ id })
|
||||||
|
showDetail.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
detailRef.value?.open()
|
detailRef.value?.open()
|
||||||
detailRef.value?.setFormData(res)
|
detailRef.value?.setFormData(res)
|
||||||
|
39
src/views/quality_detection_temp/detail.js
Normal file
39
src/views/quality_detection_temp/detail.js
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
const detailConfig = {
|
||||||
|
title: "质量检测模板表",
|
||||||
|
config: [
|
||||||
|
{
|
||||||
|
label: "组织名称",
|
||||||
|
value: "org_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "部门名称",
|
||||||
|
value: "dept_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "质量检测节点",
|
||||||
|
value: "node_text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "序号",
|
||||||
|
value: "serial_number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "标准工期",
|
||||||
|
value: "standard_duration"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "备注",
|
||||||
|
value: "remark",
|
||||||
|
column: 1
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "附件",
|
||||||
|
value: "file",
|
||||||
|
column: 1
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
export default detailConfig;
|
@ -1,168 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="detail-popup">
|
|
||||||
<popup ref="popupRef" title="安全规范详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
|
||||||
<el-card class="mb-2">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="组织名称">
|
|
||||||
{{ formData.org_name }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="部门名称">
|
|
||||||
{{ formData.dept_name
|
|
||||||
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="规范名称">
|
|
||||||
{{ formData.name
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="规范类别">
|
|
||||||
{{ formData.type
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="发布部门">
|
|
||||||
{{ formData.publish_dep
|
|
||||||
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="内容">
|
|
||||||
{{ formData.content }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="规范附件">
|
|
||||||
<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-card>
|
|
||||||
</el-form>
|
|
||||||
</popup>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup name="customdetail">
|
|
||||||
|
|
||||||
import type { FormInstance } from 'element-plus'
|
|
||||||
import Popup from '@/components/popup/index.vue'
|
|
||||||
import { apiCustomDetail } from '@/api/custom'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import type { PropType } from 'vue'
|
|
||||||
defineProps({
|
|
||||||
dictData: {
|
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const emit = defineEmits(['success', 'close'])
|
|
||||||
const formRef = shallowRef<FormInstance>()
|
|
||||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
|
||||||
const formDataannex = reactive([])
|
|
||||||
const datas = reactive({
|
|
||||||
provinceOptions: [],
|
|
||||||
cityOptions: [],
|
|
||||||
areaOptions: [],
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 表单数据
|
|
||||||
const formData = reactive({
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取详情
|
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
|
||||||
Object.assign(formData, data)
|
|
||||||
|
|
||||||
|
|
||||||
if (data.file && data.file.length > 0) {
|
|
||||||
|
|
||||||
const arry1 = data.file.map((item: any, index: any) => {
|
|
||||||
return {
|
|
||||||
name: `文件${index + 1}`,
|
|
||||||
uri: item
|
|
||||||
};
|
|
||||||
});
|
|
||||||
Object.assign(formDataannex, arry1)
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
|
||||||
const data = await apiCustomDetail({
|
|
||||||
id: row.id
|
|
||||||
})
|
|
||||||
setFormData(data)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 提交按钮
|
|
||||||
const handleSubmit = async () => {
|
|
||||||
popupRef.value?.close()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//打开弹窗
|
|
||||||
const open = () => {
|
|
||||||
popupRef.value?.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 关闭回调
|
|
||||||
const handleClose = () => {
|
|
||||||
emit('close')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
open,
|
|
||||||
setFormData,
|
|
||||||
getDetail
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.tit {
|
|
||||||
font-size: 1.2em;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.my-label) {
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
|
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
@ -55,31 +54,9 @@
|
|||||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
|
|
||||||
<el-form-item label="附件">
|
<el-form-item label="附件">
|
||||||
<el-upload
|
<uploadAnnex :formData="formData" value="file"></uploadAnnex>
|
||||||
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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -98,43 +75,15 @@
|
|||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
import { qualitydetectiontempAdd, qualitydetectiontempEdit, qualitydetectiontempDetail } from '@/api/quality_detection_temp'
|
import { qualitydetectiontempAdd, qualitydetectiontempEdit, qualitydetectiontempDetail } from '@/api/quality_detection_temp'
|
||||||
import { toChinesNum } from "@/utils/util";
|
|
||||||
import { getAllProjectTypes } from '@/api/projecttype'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import configs from "@/config"
|
|
||||||
import useUserStore from "@/stores/modules/user";
|
import useUserStore from "@/stores/modules/user";
|
||||||
const base_url = configs.baseUrl + configs.urlPrefix
|
|
||||||
const userStore = useUserStore();
|
|
||||||
const formDataannex = reactive([])
|
|
||||||
const list1 = reactive([])
|
const list1 = reactive([])
|
||||||
const list2 = reactive([])
|
const list2 = reactive([])
|
||||||
|
|
||||||
const project_name = ref('')
|
const project_name = ref('')
|
||||||
import { deptAll } from '@/api/org/department'
|
import { deptAll } from '@/api/org/department'
|
||||||
import { getAll } from '@/api/org/organization'
|
import { getAll } from '@/api/org/organization'
|
||||||
const userInfo = userStore.userInfo
|
|
||||||
// 上传文件
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
defineProps({
|
defineProps({
|
||||||
dictData: {
|
dictData: {
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
type: Object as PropType<Record<string, any[]>>,
|
||||||
@ -194,19 +143,6 @@ const formRules = reactive<any>({
|
|||||||
|
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
if (data.file && data.file.length > 0) {
|
|
||||||
|
|
||||||
const arry1 = data.file.map((item: any, index: any) => {
|
|
||||||
return {
|
|
||||||
name: `文件${index + 1}`,
|
|
||||||
uri: item
|
|
||||||
};
|
|
||||||
});
|
|
||||||
Object.assign(formDataannex, arry1)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
for (const key in formData) {
|
for (const key in formData) {
|
||||||
if (data[key] != null && data[key] != undefined) {
|
if (data[key] != null && data[key] != undefined) {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
@ -214,7 +150,7 @@ const setFormData = async (data: Record<any, any>) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.dept_id) {
|
if (data.dept_id) {
|
||||||
getlist1(data.dept_id
|
getlist1(data.org_id
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,8 +168,6 @@ const getDetail = async (row: Record<string, any>) => {
|
|||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
formData.file = formDataannex.map((item) => item.uri)
|
|
||||||
|
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,20 +37,14 @@
|
|||||||
<el-table-column label="组织名称" prop="org_name" show-overflow-tooltip />
|
<el-table-column label="组织名称" prop="org_name" show-overflow-tooltip />
|
||||||
<el-table-column label="部门名称" prop="dept_name" show-overflow-tooltip />
|
<el-table-column label="部门名称" prop="dept_name" show-overflow-tooltip />
|
||||||
<el-table-column label="质量检测节点" prop="project_name" show-overflow-tooltip>
|
<el-table-column label="质量检测节点" prop="project_name" show-overflow-tooltip>
|
||||||
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<dict-value :options="dictData.quality_detection_node" :value="row.node" />
|
<dict-value :options="dictData.quality_detection_node" :value="row.node" />
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="序号" prop="serial_number" show-overflow-tooltip />
|
<el-table-column label="序号" prop="serial_number" show-overflow-tooltip />
|
||||||
<el-table-column label="标准工期" prop="standard_duration" show-overflow-tooltip />
|
<el-table-column label="标准工期" prop="standard_duration" show-overflow-tooltip />
|
||||||
|
|
||||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||||
|
<el-table-column label="操作" width="170" fixed="right">
|
||||||
|
|
||||||
<el-table-column label="操作" width="150" fixed="right">
|
|
||||||
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['quality.quality_detection_temp/edit']" type="primary" link
|
<el-button v-perms="['quality.quality_detection_temp/edit']" type="primary" link
|
||||||
@click="handleEdit(row)">
|
@click="handleEdit(row)">
|
||||||
@ -60,10 +54,10 @@
|
|||||||
@click="handleDelete(row.id)">
|
@click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button v-perms="['quality.quality_detection_temp/detail']" link @click="handledetail(row)">
|
<el-button v-perms="['quality.quality_detection_temp/detail']" link
|
||||||
|
@click="handleDetail(row.id)">
|
||||||
详情
|
详情
|
||||||
</el-button> -->
|
</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -73,7 +67,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
<detailPage v-if="showDetail" ref="detailRef" @close="showEdit = false" :detailConfig="detailConfig" width="30vw"
|
||||||
|
:column="1" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -81,28 +76,22 @@
|
|||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { qualitydetectiontempLists, qualitydetectiontempDelete, qualitydetectiontempDetail } from '@/api/quality_detection_temp'
|
import { qualitydetectiontempLists, qualitydetectiontempDelete, qualitydetectiontempDetail } from '@/api/quality_detection_temp'
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import { getAllProjectTypes } from '@/api/projecttype'
|
|
||||||
const protype = reactive([])
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import DetailPopup from './detail.vue'
|
import detailConfig from './detail'
|
||||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
|
const detailRef = ref('')
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
const showDtail = ref(false)
|
const showDetail = ref(false)
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
serial_number: '',
|
serial_number: '',
|
||||||
node: '',
|
node: '',
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 选中数据
|
// 选中数据
|
||||||
const selectData = ref<any[]>([])
|
const selectData = ref<any[]>([])
|
||||||
|
|
||||||
@ -142,9 +131,10 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
await qualitydetectiontempDelete({ id })
|
await qualitydetectiontempDelete({ id })
|
||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
const handledetail = async (data: any) => {
|
// 详情
|
||||||
let res = await qualitydetectiontempDetail({ id: data.id })
|
const handleDetail = async (id: any) => {
|
||||||
showDtail.value = true
|
let res = await qualitydetectiontempDetail({ id })
|
||||||
|
showDetail.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
detailRef.value?.open()
|
detailRef.value?.open()
|
||||||
detailRef.value?.setFormData(res)
|
detailRef.value?.setFormData(res)
|
||||||
|
43
src/views/quality_supervise/detail.js
Normal file
43
src/views/quality_supervise/detail.js
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
const detailConfig = {
|
||||||
|
title: "质量监督表",
|
||||||
|
config: [
|
||||||
|
{
|
||||||
|
label: "组织名称",
|
||||||
|
value: "org_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "部门名称",
|
||||||
|
value: "dept_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "项目名称",
|
||||||
|
value: "project_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "项目编码",
|
||||||
|
value: "project_code"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "发生日期",
|
||||||
|
value: "happen_date"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "内容",
|
||||||
|
value: "content"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "备注",
|
||||||
|
value: "remark",
|
||||||
|
column: 1
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "附件",
|
||||||
|
value: "file",
|
||||||
|
column: 1
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
export default detailConfig;
|
@ -1,168 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="detail-popup">
|
|
||||||
<popup ref="popupRef" title="安全规范详情" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="160px">
|
|
||||||
<el-card class="mb-2">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="组织名称">
|
|
||||||
{{ formData.org_name }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="部门名称">
|
|
||||||
{{ formData.dept_name
|
|
||||||
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="规范名称">
|
|
||||||
{{ formData.name
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="规范类别">
|
|
||||||
{{ formData.type
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="发布部门">
|
|
||||||
{{ formData.publish_dep
|
|
||||||
|
|
||||||
}}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="内容">
|
|
||||||
{{ formData.content }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="规范附件">
|
|
||||||
<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-card>
|
|
||||||
</el-form>
|
|
||||||
</popup>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup name="customdetail">
|
|
||||||
|
|
||||||
import type { FormInstance } from 'element-plus'
|
|
||||||
import Popup from '@/components/popup/index.vue'
|
|
||||||
import { apiCustomDetail } from '@/api/custom'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import type { PropType } from 'vue'
|
|
||||||
defineProps({
|
|
||||||
dictData: {
|
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
|
||||||
default: () => ({})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const emit = defineEmits(['success', 'close'])
|
|
||||||
const formRef = shallowRef<FormInstance>()
|
|
||||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
|
||||||
const formDataannex = reactive([])
|
|
||||||
const datas = reactive({
|
|
||||||
provinceOptions: [],
|
|
||||||
cityOptions: [],
|
|
||||||
areaOptions: [],
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
// 表单数据
|
|
||||||
const formData = reactive({
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取详情
|
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
|
||||||
Object.assign(formData, data)
|
|
||||||
|
|
||||||
|
|
||||||
if (data.file && data.file.length > 0) {
|
|
||||||
|
|
||||||
const arry1 = data.file.map((item: any, index: any) => {
|
|
||||||
return {
|
|
||||||
name: `文件${index + 1}`,
|
|
||||||
uri: item
|
|
||||||
};
|
|
||||||
});
|
|
||||||
Object.assign(formDataannex, arry1)
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const getDetail = async (row: Record<string, any>) => {
|
|
||||||
const data = await apiCustomDetail({
|
|
||||||
id: row.id
|
|
||||||
})
|
|
||||||
setFormData(data)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 提交按钮
|
|
||||||
const handleSubmit = async () => {
|
|
||||||
popupRef.value?.close()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//打开弹窗
|
|
||||||
const open = () => {
|
|
||||||
popupRef.value?.open()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 关闭回调
|
|
||||||
const handleClose = () => {
|
|
||||||
emit('close')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
open,
|
|
||||||
setFormData,
|
|
||||||
getDetail
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.tit {
|
|
||||||
font-size: 1.2em;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.my-label) {
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
|
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
@ -56,25 +55,7 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
|
|
||||||
<el-form-item label="附件">
|
<el-form-item label="附件">
|
||||||
<el-upload
|
<uploadAnnex :formData="formData" value="file"></uploadAnnex>
|
||||||
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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -96,45 +77,15 @@ import porjectDialog from '@/components/project/index.vue'
|
|||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
import { qualitysuperviseAdd, qualitysuperviseEdit, qualitysuperviseDetail } from '@/api/quality_supervise'
|
import { qualitysuperviseAdd, qualitysuperviseEdit, qualitysuperviseDetail } from '@/api/quality_supervise'
|
||||||
import { toChinesNum } from "@/utils/util";
|
|
||||||
import { getAllProjectTypes } from '@/api/projecttype'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import { isEmail, isIdCard, isPhone } from '@/utils/validate'
|
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import configs from "@/config"
|
|
||||||
import useUserStore from "@/stores/modules/user";
|
import useUserStore from "@/stores/modules/user";
|
||||||
const protype = reactive([])
|
|
||||||
const base_url = configs.baseUrl + configs.urlPrefix
|
|
||||||
const userStore = useUserStore();
|
|
||||||
const active = ref(0)
|
|
||||||
const formDataannex = reactive([])
|
|
||||||
const list1 = reactive([])
|
const list1 = reactive([])
|
||||||
const list2 = reactive([])
|
const list2 = reactive([])
|
||||||
import { deptAll } from '@/api/org/department'
|
import { deptAll } from '@/api/org/department'
|
||||||
import { getAll } from '@/api/org/organization'
|
import { getAll } from '@/api/org/organization'
|
||||||
const userInfo = userStore.userInfo
|
|
||||||
const showDialog = ref(false)
|
const showDialog = ref(false)
|
||||||
const project_name = ref('')
|
const project_name = ref('')
|
||||||
// 上传文件
|
|
||||||
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)
|
|
||||||
}
|
|
||||||
defineProps({
|
defineProps({
|
||||||
dictData: {
|
dictData: {
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
type: Object as PropType<Record<string, any[]>>,
|
||||||
@ -200,18 +151,6 @@ const formRules = reactive<any>({
|
|||||||
|
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
if (data.file && data.file.length > 0) {
|
|
||||||
|
|
||||||
const arry1 = data.file.map((item: any, index: any) => {
|
|
||||||
return {
|
|
||||||
name: `文件${index + 1}`,
|
|
||||||
uri: item
|
|
||||||
};
|
|
||||||
});
|
|
||||||
Object.assign(formDataannex, arry1)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
project_name.value = data.project_name;
|
project_name.value = data.project_name;
|
||||||
for (const key in formData) {
|
for (const key in formData) {
|
||||||
if (data[key] != null && data[key] != undefined) {
|
if (data[key] != null && data[key] != undefined) {
|
||||||
@ -220,8 +159,7 @@ const setFormData = async (data: Record<any, any>) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (data.dept_id) {
|
if (data.dept_id) {
|
||||||
getlist1(data.dept_id
|
getlist1(data.org_id)
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -237,11 +175,7 @@ const getDetail = async (row: Record<string, any>) => {
|
|||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
formData.file = formDataannex.map((item) => item.uri)
|
|
||||||
|
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
|
|
||||||
|
|
||||||
const data = { ...formData }
|
const data = { ...formData }
|
||||||
mode.value == 'edit'
|
mode.value == 'edit'
|
||||||
? await qualitysuperviseEdit(data)
|
? await qualitysuperviseEdit(data)
|
||||||
|
@ -32,29 +32,11 @@
|
|||||||
<el-table-column label="序号" type="index" width="55" />
|
<el-table-column label="序号" type="index" width="55" />
|
||||||
<el-table-column label="组织名称" prop="org_name" show-overflow-tooltip />
|
<el-table-column label="组织名称" prop="org_name" show-overflow-tooltip />
|
||||||
<el-table-column label="部门名称" prop="dept_name" show-overflow-tooltip />
|
<el-table-column label="部门名称" prop="dept_name" 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="happen_date" show-overflow-tooltip />
|
<el-table-column label="发生日期" prop="happen_date" show-overflow-tooltip />
|
||||||
|
|
||||||
<el-table-column label="内容" prop="content" show-overflow-tooltip />
|
<el-table-column label="内容" prop="content" show-overflow-tooltip />
|
||||||
|
|
||||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||||
<el-table-column label="附件" prop="file" show-overflow-tooltip>
|
<el-table-column label="操作" width="170" fixed="right">
|
||||||
|
|
||||||
<template #default="{ row }">
|
|
||||||
<div v-if="row.file && row.file.length > 0">
|
|
||||||
<div v-for="(item, i) in row.file " :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="操作" width="150" fixed="right">
|
|
||||||
|
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['safety.safety_standard/edit']" type="primary" link
|
<el-button v-perms="['safety.safety_standard/edit']" type="primary" link
|
||||||
@click="handleEdit(row)">
|
@click="handleEdit(row)">
|
||||||
@ -64,9 +46,9 @@
|
|||||||
@click="handleDelete(row.id)">
|
@click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button v-perms="['safety.safety_standard/detail']" link @click="handledetail(row)">
|
<el-button v-perms="['safety.safety_standard/detail']" link @click="handleDetail(row.id)">
|
||||||
详情
|
详情
|
||||||
</el-button> -->
|
</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -77,7 +59,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||||
<detail-popup v-if="showDtail" ref="detailRef" :dict-data="dictData" @close="showDtail = false" />
|
<detailPage v-if="showDetail" ref="detailRef" @close="showEdit = false" :detailConfig="detailConfig" width="30vw"
|
||||||
|
:column="1" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -85,18 +68,15 @@
|
|||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { qualitysuperviseLists, qualitysuperviseDelete, qualitysuperviseDetail } from '@/api/quality_supervise'
|
import { qualitysuperviseLists, qualitysuperviseDelete, qualitysuperviseDetail } from '@/api/quality_supervise'
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import { getAllProjectTypes } from '@/api/projecttype'
|
|
||||||
const protype = reactive([])
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import DetailPopup from './detail.vue'
|
import detailConfig from './detail'
|
||||||
const detailRef = shallowRef<InstanceType<typeof DetailPopup>>()
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
|
const detailRef = ref('')
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
const showDtail = ref(false)
|
const showDetail = ref(false)
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
happen_date: '',
|
happen_date: '',
|
||||||
@ -145,9 +125,10 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
await qualitysuperviseDelete({ id })
|
await qualitysuperviseDelete({ id })
|
||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
const handledetail = async (data: any) => {
|
// 详情
|
||||||
let res = await qualitysuperviseDetail({ id: data.id })
|
const handleDetail = async (id: any) => {
|
||||||
showDtail.value = true
|
let res = await qualitysuperviseDetail({ id })
|
||||||
|
showDetail.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
detailRef.value?.open()
|
detailRef.value?.open()
|
||||||
detailRef.value?.setFormData(res)
|
detailRef.value?.setFormData(res)
|
||||||
|
@ -194,8 +194,29 @@ if (props.project) {
|
|||||||
project_code.value = props.project.project_code;
|
project_code.value = props.project.project_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const chekcDate = (rule: any, value: any, callback: any) => {
|
||||||
|
if (new Date(formData.warranty_expire_date) < new Date(formData.sign_date)) {
|
||||||
|
callback(new Error('洽商质保到期时间早于签订日期'))
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 表单验证
|
// 表单验证
|
||||||
const formRules = reactive<any>({});
|
const formRules = reactive<any>({
|
||||||
|
|
||||||
|
warranty_expire_date: [{
|
||||||
|
required: true,
|
||||||
|
message: '洽商质保到期时间',
|
||||||
|
trigger: ['blur']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
validator: chekcDate,
|
||||||
|
trigger: ['blur']
|
||||||
|
}],
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
|
@ -47,15 +47,7 @@
|
|||||||
formData.remark
|
formData.remark
|
||||||
}}</el-descriptions-item>
|
}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label">
|
<el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label">
|
||||||
<div v-if="formData?.annex?.length > 0">
|
<annexLink :annex="formData.annex"></annexLink>
|
||||||
<div v-for="(item, index) in formData.annex" style="margin-left: 5px;display: block;">
|
|
||||||
<el-link style="margin-left: 10px; color: #4a5dff; align-self: flex-start"
|
|
||||||
:href="item" target="_blank">文件{{ index + 1 }}查看</el-link>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
暂无附件
|
|
||||||
</div>
|
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-descriptions title="开票信息" border style="margin:20px 0">
|
<el-descriptions title="开票信息" border style="margin:20px 0">
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
<el-descriptions-item label="传真" label-align="left" align="left" label-class-name="my-label"> {{
|
<el-descriptions-item label="传真" label-align="left" align="left" label-class-name="my-label"> {{
|
||||||
formData.fax }}</el-descriptions-item>
|
formData.fax }}</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
<el-descriptions-item label="邮编" label-align="left" align="left" label-class-name="my-label"> {{
|
<el-descriptions-item label="邮编" label-align="left" align="left" label-class-name="my-label"> {{
|
||||||
formData.zip_code }}</el-descriptions-item>
|
formData.zip_code }}</el-descriptions-item>
|
||||||
|
|
||||||
@ -44,20 +43,10 @@
|
|||||||
formData.id_type_text }}</el-descriptions-item>
|
formData.id_type_text }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="家庭住址" label-align="left" align="left" label-class-name="my-label"> {{
|
<el-descriptions-item label="家庭住址" label-align="left" align="left" label-class-name="my-label"> {{
|
||||||
formData.family_address }}</el-descriptions-item>
|
formData.family_address }}</el-descriptions-item>
|
||||||
<!-- <el-descriptions-item label="爱好" label-align="left" align="left" label-class-name="my-label"> {{ formData.next_follow_date }}</el-descriptions-item> -->
|
|
||||||
<el-descriptions-item label="备注" label-align="left" align="left" label-class-name="my-label"> {{
|
<el-descriptions-item label="备注" label-align="left" align="left" label-class-name="my-label"> {{
|
||||||
formData.remark }}</el-descriptions-item>
|
formData.remark }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label">
|
<el-descriptions-item label="附件" label-align="left" align="left" label-class-name="my-label">
|
||||||
<div v-if="formData.annex && formData.annex.length > 0">
|
<annexLink :annex="formData.annex"></annexLink>
|
||||||
<div v-for="(item, index) in formData.annex" style="margin-left: 5px;display: block;">
|
|
||||||
<el-link style="margin-left: 10px; color: #4a5dff; align-self: flex-start" :href="item"
|
|
||||||
target="_blank">文件{{ index + 1 }}查看</el-link>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div v-else>
|
|
||||||
暂无文件
|
|
||||||
</div>
|
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||||
@close="handleClose">
|
|
||||||
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
|
||||||
|
|
||||||
|
|
||||||
@ -9,8 +8,7 @@
|
|||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="供应商" prop="supplier_id"
|
<el-form-item label="供应商" prop="supplier_id"
|
||||||
:rules="[{ required: true, message: '不可为空', trigger: 'change' }]"
|
:rules="[{ required: true, message: '不可为空', trigger: 'change' }]" @click="showDialog = true">
|
||||||
@click="showDialog = true">
|
|
||||||
<el-input v-model="supplier_name" readonly clearable placeholder="选择供应商" />
|
<el-input v-model="supplier_name" readonly clearable placeholder="选择供应商" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -35,8 +33,8 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="联系人分类" prop="contacts_type">
|
<el-form-item label="联系人分类" prop="contacts_type">
|
||||||
<el-select class="flex-1" v-model="formData.contacts_type" clearable placeholder="请选择联系人分类">
|
<el-select class="flex-1" v-model="formData.contacts_type" clearable placeholder="请选择联系人分类">
|
||||||
<el-option v-for="(item, index) in dictData.contacts_type" :key="index"
|
<el-option v-for="(item, index) in dictData.contacts_type" :key="index" :label="item.name"
|
||||||
:label="item.name" :value="parseInt(item.value)" />
|
:value="parseInt(item.value)" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -56,8 +54,8 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="联系人类型" prop="contacts_cate">
|
<el-form-item label="联系人类型" prop="contacts_cate">
|
||||||
<el-select class="flex-1" v-model="formData.contacts_cate" clearable placeholder="请选择联系人类型">
|
<el-select class="flex-1" v-model="formData.contacts_cate" clearable placeholder="请选择联系人类型">
|
||||||
<el-option v-for="(item, index) in dictData.contacts_cate" :key="index"
|
<el-option v-for="(item, index) in dictData.contacts_cate" :key="index" :label="item.name"
|
||||||
:label="item.name" :value="parseInt(item.value)" />
|
:value="parseInt(item.value)" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -75,8 +73,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="工作电话" prop="work_phone"
|
<el-form-item label="工作电话" prop="work_phone" :rules="[{ validator: checkPhone, trigger: 'blur' }]">
|
||||||
:rules="[{ validator: checkPhone, trigger: 'blur' }]">
|
|
||||||
<el-input v-model="formData.work_phone" clearable placeholder="请输入工作电话" />
|
<el-input v-model="formData.work_phone" clearable placeholder="请输入工作电话" />
|
||||||
</el-form-item></el-col>
|
</el-form-item></el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -124,27 +121,9 @@
|
|||||||
</el-form-item></el-col>
|
</el-form-item></el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="附件">
|
<el-form-item label="附件">
|
||||||
<el-upload
|
<uploadAnnex :formData="formData"></uploadAnnex>
|
||||||
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"
|
</el-form-item>
|
||||||
class="upload-demo" :show-file-list="false" aria-hidden="true"
|
</el-col>
|
||||||
: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-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@ -159,9 +138,7 @@
|
|||||||
<script lang="ts" setup name="bidBiddingDecisionEdit">
|
<script lang="ts" setup name="bidBiddingDecisionEdit">
|
||||||
import type { FormInstance } from 'element-plus'
|
import type { FormInstance } from 'element-plus'
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
|
|
||||||
import supplierTable from "@/components/supplier/index.vue"
|
import supplierTable from "@/components/supplier/index.vue"
|
||||||
|
|
||||||
import { suppliercontactsAdd, suppliercontactsEdit, suppliercontactsDetail } from '@/api/suppler_contact'
|
import { suppliercontactsAdd, suppliercontactsEdit, suppliercontactsDetail } from '@/api/suppler_contact'
|
||||||
import { timeFormat } from '@/utils/util'
|
import { timeFormat } from '@/utils/util'
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
@ -184,24 +161,7 @@ const base_url = configs.baseUrl + configs.urlPrefix
|
|||||||
import useUserStore from "@/stores/modules/user";
|
import useUserStore from "@/stores/modules/user";
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const formDataannex = reactive([])
|
const formDataannex = reactive([])
|
||||||
// 上传文件
|
|
||||||
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 customEvent = (e: any) => {
|
const customEvent = (e: any) => {
|
||||||
formData.supplier_id = e.id;
|
formData.supplier_id = e.id;
|
||||||
@ -278,16 +238,6 @@ const IDcard = (rule: any, value: string, callback: (arg0: Error | undefined) =>
|
|||||||
const setFormData = async (data: Record<any, any>) => {
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
supplier_name.value = data.supplier_name
|
supplier_name.value = data.supplier_name
|
||||||
supplier_code.value = data.supplier_code
|
supplier_code.value = data.supplier_code
|
||||||
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) {
|
for (const key in formData) {
|
||||||
if (data[key] != null && data[key] != undefined) {
|
if (data[key] != null && data[key] != undefined) {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
@ -308,8 +258,6 @@ const getDetail = async (row: Record<string, any>) => {
|
|||||||
|
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
|
|
||||||
formData.annex = formDataannex.map((item: any) => item.uri)
|
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
const data = { ...formData, }
|
const data = { ...formData, }
|
||||||
mode.value == 'edit'
|
mode.value == 'edit'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user