This commit is contained in:
zmj 2024-04-10 11:24:59 +08:00
parent 9b34cf4f0c
commit a2c77b4f5d
15 changed files with 656 additions and 354 deletions

View File

@ -1,26 +1,31 @@
import request from '@/utils/request'
import request from "@/utils/request";
// 市场经营--合同信息列表
export function apiMarketingContractLists(params: any) {
return request.get({ url: '/marketing.marketing_contract/lists', params })
return request.get({ url: "/marketing.marketing_contract/lists", params });
}
// 添加市场经营--合同信息
export function apiMarketingContractAdd(params: any) {
return request.post({ url: '/marketing.marketing_contract/add', params })
return request.post({ url: "/marketing.marketing_contract/add", params });
}
// 编辑市场经营--合同信息
export function apiMarketingContractEdit(params: any) {
return request.post({ url: '/marketing.marketing_contract/edit', params })
return request.post({ url: "/marketing.marketing_contract/edit", params });
}
// 删除市场经营--合同信息
export function apiMarketingContractDelete(params: any) {
return request.post({ url: '/marketing.marketing_contract/delete', params })
return request.post({ url: "/marketing.marketing_contract/delete", params });
}
// 市场经营--合同信息详情
export function apiMarketingContractDetail(params: any) {
return request.get({ url: '/marketing.marketing_contract/detail', params })
}
return request.get({ url: "/marketing.marketing_contract/detail", params });
}
// 市场经营--合同信息列表
export function apiMarketingContractSearch(params: any) {
return request.get({ url: "/marketing.marketing_contract/datas", params });
}

View File

@ -1,26 +1,65 @@
import request from '@/utils/request'
import request from "@/utils/request";
// 市场经营--项目备案列表
export function apiMarketingProjectFilingLists(params: any) {
return request.get({ url: '/marketing.marketing_project_filing/lists', params })
return request.get({
url: "/marketing.marketing_project_filing/lists",
params,
});
}
// 添加市场经营--项目备案
export function apiMarketingProjectFilingAdd(params: any) {
return request.post({ url: '/marketing.marketing_project_filing/add', params })
return request.post({
url: "/marketing.marketing_project_filing/add",
params,
});
}
// 编辑市场经营--项目备案
export function apiMarketingProjectFilingEdit(params: any) {
return request.post({ url: '/marketing.marketing_project_filing/edit', params })
return request.post({
url: "/marketing.marketing_project_filing/edit",
params,
});
}
// 删除市场经营--项目备案
export function apiMarketingProjectFilingDelete(params: any) {
return request.post({ url: '/marketing.marketing_project_filing/delete', params })
return request.post({
url: "/marketing.marketing_project_filing/delete",
params,
});
}
// 市场经营--项目备案详情
export function apiMarketingProjectFilingDetail(params: any) {
return request.get({ url: '/marketing.marketing_project_filing/detail', params })
}
return request.get({
url: "/marketing.marketing_project_filing/detail",
params,
});
}
// 市场经营--
export function apiMarketingProjectFilingDetailDelete(params: any) {
return request.post({
url: "/marketing.marketing_project_filing_detail/delete",
params,
});
}
// 市场经营--项目备案详情
export function apiMarketingProjectFilingDetailLists(params: any) {
return request.get({
url: "/marketing.marketing_project_filing_detail/lists",
params,
});
}
// 市场经营--项目备案列表
export function apiMarketingProjectFilingSearch(params: any) {
return request.get({
url: "/marketing.marketing_project_filing/datas",
params,
});
}

View File

@ -1,11 +1,11 @@
<template>
<el-col :span="8" v-if="flag">
<el-form-item label="创建人" prop="create_user">
<el-form-item :label="name + '人'" prop="create_user">
<el-input v-model="formData.create_user" clearable placeholder="请输入填表人" />
</el-form-item>
</el-col>
<el-col :span="8" v-if="flag">
<el-form-item label="创建时间" prop="create_time">
<el-form-item :label="name + '时间'" prop="create_time">
<el-date-picker class="flex-1 !flex" v-model="formData.create_time" clearable type="datetime"
value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择创建时间">
</el-date-picker>

View File

@ -899,3 +899,21 @@ export const marketing_contract: Iconfig = {
{ end_date: "计划结束日期" },
],
};
import { apiMarketingProjectFilingLists } from "@/api/marketing_project_filing";
export const marketing_project_filing: Iconfig = {
fetchFn: apiMarketingProjectFilingLists,
serchList: [
{
label: "录入人",
value: "create_user",
},
],
tableList: [
{ contract_name: "合同名称" },
{ create_user: "录入人" },
{ create_time: "录入日期" },
{ remark: "备注" },
],
};

View File

@ -71,11 +71,10 @@
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiFinancialRepaymentLists, apiFinancialRepaymentDelete, apiFinancialRepaymentDetail } from '@/api/financial_repayment'
import { timeFormat } from '@/utils/util'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import detailConfig from './detail'
import { apiFinancialBorrowMoneySearch } from '@/api/financial_borrow_money'
import detailConfig from './detail'
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
const detailRef = ref('')

View File

@ -0,0 +1,109 @@
const detailConfig = {
title: "财务管理--分支机构备案",
config: [
{
label: "机构名称",
value: "org_name"
},
{
label: "备案类型",
value: "filing_type_text"
},
{
label: "法定代表人",
value: "fddbr"
},
{
label: "联系电话",
value: "telephone"
},
{
label: "营业执照编号",
value: "yyzzbh",
},
{
label: "资质证书编号",
value: "zzzsbh"
},
{
label: "组织机构代码证",
value: "zzjgdmz"
},
{
label: "总公司联系电话",
value: "zgslxdh"
},
{
label: "主项监理范围",
value: "zyxjlfw"
},
{
label: "增项监理范围",
value: "zjxjlfw"
},
{
label: "本地办公地址",
value: "bdbgdz"
},
{
label: "本地公司联系电话",
value: "bdgslxdh"
},
{
label: "人员信息",
value: "ryxx"
},
{
label: "机构注册地址",
value: "jgzcdz"
},
{
label: "备案开始期",
value: "baksq"
},
{
label: "备案结束期",
value: "bajsq"
},
{
label: "备案时间",
value: "basj"
},
{
label: "经办人",
value: "jbr"
},
{
label: "年检时间",
value: "njsj"
},
{
label: "负责人",
value: "fzr"
},
{
label: "负责人手机",
value: "fzrsj"
},
{
label: "技术负责人",
value: "jsfzrsj"
},
{
label: "备注",
value: "remark",
column: 1
},
{
label: "附件",
value: "annex",
column: 1
},
],
}
export default detailConfig;

View File

@ -1,89 +1,150 @@
<template>
<div class="edit-popup">
<popup
ref="popupRef"
:title="popupTitle"
:async="true"
width="550px"
@confirm="handleSubmit"
@close="handleClose"
>
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-form-item label="机构名称" prop="org_name">
<el-input v-model="formData.org_name" clearable placeholder="请输入机构名称" />
</el-form-item>
<el-form-item label="备案类型" prop="filing_type">
<el-input v-model="formData.filing_type" clearable placeholder="请输入备案类型" />
</el-form-item>
<el-form-item label="法定代表人" prop="fddbr">
<el-input v-model="formData.fddbr" clearable placeholder="请输入法定代表人" />
</el-form-item>
<el-form-item label="联系电话" prop="telephone">
<el-input v-model="formData.telephone" clearable placeholder="请输入联系电话" />
</el-form-item>
<el-form-item label="营业执照编号" prop="yyzzbh">
<el-input v-model="formData.yyzzbh" clearable placeholder="请输入营业执照编号" />
</el-form-item>
<el-form-item label="资质证书编号" prop="zzzsbh">
<el-input v-model="formData.zzzsbh" clearable placeholder="请输入资质证书编号" />
</el-form-item>
<el-form-item label="组织机构代码证" prop="zzjgdmz">
<el-input v-model="formData.zzjgdmz" clearable placeholder="请输入组织机构代码证" />
</el-form-item>
<el-form-item label="总公司联系电话" prop="zgslxdh">
<el-input v-model="formData.zgslxdh" clearable placeholder="请输入总公司联系电话" />
</el-form-item>
<el-form-item label="主项监理范围" prop="zyxjlfw">
<el-input v-model="formData.zyxjlfw" clearable placeholder="请输入主项监理范围" />
</el-form-item>
<el-form-item label="增项监理范围" prop="zjxjlfw">
<el-input v-model="formData.zjxjlfw" clearable placeholder="请输入增项监理范围" />
</el-form-item>
<el-form-item label="本地办公地址" prop="bdbgdz">
<el-input v-model="formData.bdbgdz" clearable placeholder="请输入本地办公地址" />
</el-form-item>
<el-form-item label="本地公司联系电话" prop="bdgslxdh">
<el-input v-model="formData.bdgslxdh" clearable placeholder="请输入本地公司联系电话" />
</el-form-item>
<el-form-item label="人员信息" prop="ryxx">
<el-input v-model="formData.ryxx" clearable placeholder="请输入人员信息" />
</el-form-item>
<el-form-item label="机构注册地址" prop="jgzcdz">
<el-input v-model="formData.jgzcdz" clearable placeholder="请输入机构注册地址" />
</el-form-item>
<el-form-item label="备案开始期" prop="baksq">
<el-input v-model="formData.baksq" clearable placeholder="请输入备案开始期" />
</el-form-item>
<el-form-item label="备案结束期" prop="bajsq">
<el-input v-model="formData.bajsq" clearable placeholder="请输入备案结束期" />
</el-form-item>
<el-form-item label="备案时间" prop="basj">
<el-input v-model="formData.basj" clearable placeholder="请输入备案时间" />
</el-form-item>
<el-form-item label="经办人" prop="jbr">
<el-input v-model="formData.jbr" clearable placeholder="请输入经办人" />
</el-form-item>
<el-form-item label="年检时间" prop="njsj">
<el-input v-model="formData.njsj" clearable placeholder="请输入年检时间" />
</el-form-item>
<el-form-item label="负责人" prop="fzr">
<el-input v-model="formData.fzr" clearable placeholder="请输入负责人" />
</el-form-item>
<el-form-item label="负责人手机" prop="fzrsj">
<el-input v-model="formData.fzrsj" clearable placeholder="请输入负责人手机" />
</el-form-item>
<el-form-item label="技术负责人" prop="jsfzr">
<el-input v-model="formData.jsfzr" clearable placeholder="请输入技术负责人" />
</el-form-item>
<el-form-item label="技术负责人手机" prop="jsfzrsj">
<el-input v-model="formData.jsfzrsj" clearable placeholder="请输入技术负责人手机" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" clearable placeholder="请输入备注" />
</el-form-item>
<el-form-item label="" prop="annex">
<el-input v-model="formData.annex" clearable placeholder="请输入" />
</el-form-item>
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="140px" :rules="formRules">
<el-row>
<el-col :span="8">
<el-form-item label="机构名称" prop="org_name">
<el-input v-model="formData.org_name" clearable placeholder="请输入机构名称" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备案类型" prop="filing_type">
<el-select class='flex-1' v-model="formData.filing_type">
<el-option v-for="(item, index) in dictData.filing_type " :key="index" :label="item.name"
:value="parseInt(item.value)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="法定代表人">
<el-input v-model="formData.fddbr" clearable placeholder="请输入法定代表人" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系电话" prop="telephone">
<el-input v-model="formData.telephone" clearable placeholder="请输入联系电话" type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="营业执照编号">
<el-input v-model="formData.yyzzbh" clearable placeholder="请输入营业执照编号" v-type="'code'" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="资质证书编号">
<el-input v-model="formData.zzzsbh" clearable placeholder="请输入资质证书编号" v-type="'code'" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="组织机构代码证">
<el-input v-model="formData.zzjgdmz" clearable placeholder="请输入组织机构代码证" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="总公司联系电话">
<el-input v-model="formData.zgslxdh" clearable placeholder="请输入总公司联系电话" type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="主项监理范围">
<el-input v-model="formData.zyxjlfw" clearable placeholder="请输入主项监理范围" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="增项监理范围">
<el-input v-model="formData.zjxjlfw" clearable placeholder="请输入增项监理范围" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="本地办公地址">
<el-input v-model="formData.bdbgdz" clearable placeholder="请输入本地办公地址" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="本地公司联系电话" prop="bdgslxdh">
<el-input v-model="formData.bdgslxdh" clearable placeholder="请输入本地公司联系电话" type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="人员信息">
<el-input v-model="formData.ryxx" clearable placeholder="请输入人员信息" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="机构注册地址" prop="jgzcdz">
<el-input v-model="formData.jgzcdz" clearable placeholder="请输入机构注册地址" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备案开始期" prop="baksq">
<!-- <el-input v-model="formData.baksq" clearable placeholder="请输入备案开始期" /> -->
<el-date-picker class="flex-1 !flex" v-model="formData.baksq" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择备案开始期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备案结束期" prop="bajsq">
<el-date-picker class="flex-1 !flex" v-model="formData.bajsq" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择备案结束期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备案时间" prop="basj">
<el-date-picker class="flex-1 !flex" v-model="formData.basj" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择备案时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="经办人">
<el-input v-model="formData.jbr" clearable placeholder="请输入经办人" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="年检时间">
<el-date-picker class="flex-1 !flex" v-model="formData.njsj" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择年检时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="负责人">
<el-input v-model="formData.fzr" clearable placeholder="请输入负责人" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="负责人手机" prop="fzrsj">
<el-input v-model="formData.fzrsj" clearable placeholder="请输入负责人手机" type="number" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="技术负责人">
<el-input v-model="formData.jsfzr" clearable placeholder="请输入技术负责人" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="技术负责人手机" prop="jsfzrsj">
<el-input v-model="formData.jsfzrsj" clearable placeholder="请输入技术负责人手机" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注">
<el-input v-model="formData.remark" clearable placeholder="请输入备注" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="附件">
<upload-annex :form-data="formData"></upload-annex>
</el-form-item>
</el-col>
</el-row>
</el-form>
</popup>
</div>
@ -93,8 +154,9 @@
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiMarketingBranchFilingAdd, apiMarketingBranchFilingEdit, apiMarketingBranchFilingDetail } from '@/api/marketing_branch_filing'
import { timeFormat } from '@/utils/util'
import type { PropType } from 'vue'
import { checkPhone } from '@/utils/validate'
defineProps({
dictData: {
type: Object as PropType<Record<string, any[]>>,
@ -143,6 +205,15 @@ const formData = reactive({
})
const checkDate = (rule: any, value: any, callback: any) => {
if (new Date(formData.bajsq) < new Date(formData.baksq)) {
callback(new Error('备案结束期不能早于备案开始期'))
} else {
callback()
}
}
//
const formRules = reactive<any>({
org_name: [{
@ -155,51 +226,20 @@ const formRules = reactive<any>({
message: '请输入备案类型',
trigger: ['blur']
}],
fddbr: [{
required: true,
message: '请输入法定代表人',
trigger: ['blur']
}],
telephone: [{
required: true,
message: '请输入联系电话',
trigger: ['blur']
}],
yyzzbh: [{
required: true,
message: '请输入营业执照编号',
trigger: ['blur']
}],
zzzsbh: [{
required: true,
message: '请输入资质证书编号',
trigger: ['blur']
}],
zzjgdmz: [{
required: true,
message: '请输入组织机构代码证',
trigger: ['blur']
}],
telephone: [
{
validator: checkPhone,
trigger: ['blur']
}
],
zgslxdh: [{
required: true,
message: '请输入总公司联系电话',
trigger: ['blur']
}],
zyxjlfw: [{
required: true,
message: '请输入主项监理范围',
trigger: ['blur']
}],
zjxjlfw: [{
required: true,
message: '请输入增项监理范围',
trigger: ['blur']
}],
bdbgdz: [{
required: true,
message: '请输入本地办公地址',
trigger: ['blur']
}],
bdgslxdh: [{
required: true,
message: '请输入本地公司联系电话',
@ -224,6 +264,10 @@ const formRules = reactive<any>({
required: true,
message: '请输入备案结束期',
trigger: ['blur']
},
{
validator: checkDate,
trigger: ['blur']
}],
basj: [{
required: true,
@ -246,8 +290,7 @@ const formRules = reactive<any>({
trigger: ['blur']
}],
fzrsj: [{
required: true,
message: '请输入负责人手机',
validator: checkPhone,
trigger: ['blur']
}],
jsfzr: [{
@ -256,8 +299,7 @@ const formRules = reactive<any>({
trigger: ['blur']
}],
jsfzrsj: [{
required: true,
message: '请输入技术负责人手机',
validator: checkPhone,
trigger: ['blur']
}],
remark: [{
@ -265,11 +307,7 @@ const formRules = reactive<any>({
message: '请输入备注',
trigger: ['blur']
}],
annex: [{
required: true,
message: '请输入',
trigger: ['blur']
}]
})
@ -281,8 +319,8 @@ const setFormData = async (data: Record<any, any>) => {
formData[key] = data[key]
}
}
}
const getDetail = async (row: Record<string, any>) => {
@ -296,9 +334,9 @@ const getDetail = async (row: Record<string, any>) => {
//
const handleSubmit = async () => {
await formRef.value?.validate()
const data = { ...formData, }
mode.value == 'edit'
? await apiMarketingBranchFilingEdit(data)
const data = { ...formData, }
mode.value == 'edit'
? await apiMarketingBranchFilingEdit(data)
: await apiMarketingBranchFilingAdd(data)
popupRef.value?.close()
emit('success')

View File

@ -1,27 +1,37 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form
class="mb-[-16px]"
:model="queryParams"
inline
>
<el-form-item label="机构名称" prop="org_name">
<el-input class="w-[280px]" v-model="queryParams.org_name" clearable placeholder="请输入机构名称" />
</el-form-item>
<el-form-item label="法定代表人" prop="fddbr">
<el-input class="w-[280px]" v-model="queryParams.fddbr" clearable placeholder="请输入法定代表人" />
</el-form-item>
<el-form-item label="联系电话" prop="telephone">
<el-input class="w-[280px]" v-model="queryParams.telephone" clearable placeholder="请输入联系电话" />
</el-form-item>
<el-form-item label="机构注册地址" prop="jgzcdz">
<el-input class="w-[280px]" v-model="queryParams.jgzcdz" clearable placeholder="请输入机构注册地址" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
<el-form class="mb-[-16px]" :model="queryParams" label-width="120px">
<el-row>
<el-col :span="8">
<el-form-item label="机构名称" prop="org_name">
<el-input class="w-[280px]" v-model="queryParams.org_name" clearable placeholder="请输入机构名称" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="法定代表人" prop="fddbr">
<el-input class="w-[280px]" v-model="queryParams.fddbr" clearable placeholder="请输入法定代表人" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系电话" prop="telephone">
<el-input class="w-[280px]" v-model="queryParams.telephone" clearable placeholder="请输入联系电话" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="机构注册地址" prop="jgzcdz">
<el-input class="w-[280px]" v-model="queryParams.jgzcdz" clearable placeholder="请输入机构注册地址" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
@ -31,11 +41,8 @@
</template>
新增
</el-button>
<el-button
v-perms="['marketing.marketing_branch_filing/delete']"
:disabled="!selectData.length"
@click="handleDelete(selectData)"
>
<el-button v-perms="['marketing.marketing_branch_filing/delete']" :disabled="!selectData.length"
@click="handleDelete(selectData)">
删除
</el-button>
<div class="mt-4">
@ -51,24 +58,20 @@
<el-table-column label="年检时间" prop="njsj" show-overflow-tooltip />
<el-table-column label="负责人" prop="fzr" show-overflow-tooltip />
<el-table-column label="负责人手机" prop="fzrsj" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<el-table-column label="操作" width="170" fixed="right">
<template #default="{ row }">
<el-button
v-perms="['marketing.marketing_branch_filing/edit']"
type="primary"
link
@click="handleEdit(row)"
>
<el-button v-perms="['marketing.marketing_branch_filing/edit']" type="primary" link
@click="handleEdit(row)">
编辑
</el-button>
<el-button
v-perms="['marketing.marketing_branch_filing/delete']"
type="danger"
link
@click="handleDelete(row.id)"
>
<el-button v-perms="['marketing.marketing_branch_filing/delete']" type="danger" link
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['marketing.marketing_branch_filing/detail']" link
@click="handleDetail(row.id)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
@ -78,21 +81,23 @@
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
<detailPage v-if="showDetail" ref="detailRef" @close="showDetail = false" :detailConfig="detailConfig" />
</div>
</template>
<script lang="ts" setup name="marketingBranchFilingLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiMarketingBranchFilingLists, apiMarketingBranchFilingDelete } from '@/api/marketing_branch_filing'
import { timeFormat } from '@/utils/util'
import { apiMarketingBranchFilingLists, apiMarketingBranchFilingDelete, apiMarketingBranchFilingDetail } from '@/api/marketing_branch_filing'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import detailConfig from './detail'
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
const detailRef = ref('')
//
const showEdit = ref(false)
const showDetail = ref(false)
//
const queryParams = reactive({
@ -111,7 +116,7 @@ const handleSelectionChange = (val: any[]) => {
}
//
const { dictData } = useDictData('')
const { dictData } = useDictData('filing_type')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
@ -128,10 +133,11 @@ const handleAdd = async () => {
//
const handleEdit = async (data: any) => {
let res = await apiMarketingBranchFilingDetail({ id: data.id })
showEdit.value = true
await nextTick()
editRef.value?.open('edit')
editRef.value?.setFormData(data)
editRef.value?.setFormData(res)
}
//
@ -141,6 +147,17 @@ const handleDelete = async (id: number | any[]) => {
getLists()
}
//
const handleDetail = async (id: any) => {
let res = await apiMarketingBranchFilingDetail({ id })
showDetail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
getLists()
</script>

View File

@ -197,7 +197,7 @@ const personnel = ref(null)
//
const popupTitle = computed(() => {
return mode.value == 'edit' ? '编辑市场经营--合同信息' : '新增市场经营--合同信息'
return mode.value == 'edit' ? '编辑市场经营--框架协议' : '新增市场经营--框架协议'
})
//

View File

@ -0,0 +1,58 @@
import { apiMarketingProjectFilingDetailLists } from '@/api/marketing_project_filing'
const detailConfig = {
title: "市场经营--项目备案",
config: [
{
label: "合同名称",
value: "contract_name"
},
{
label: "录入人",
value: "create_user"
},
{
label: "录入日期",
value: "create_time"
},
{
label: "备注",
value: "remark",
column: 1
},
{
label: "附件",
value: "annex",
column: 1
},
],
table: {
title: "备案人员信息",
tableConfig: [
{
label: "备案人员",
value: 'filing_user',
},
{
label: "备案角色",
value: 'filing_role_text'
},
{
label: "登记时间",
value: 'reg_time',
},
{
label: "状态",
value: 'status_text',
},
],
query: 'project_filing_id',
fetchFun: apiMarketingProjectFilingDetailLists,
}
}
export default detailConfig;

View File

@ -1,29 +1,33 @@
<template>
<div class="edit-popup">
<popup
ref="popupRef"
:title="popupTitle"
:async="true"
width="550px"
@confirm="handleSubmit"
@close="handleClose"
>
<popup ref="popupRef" :title="popupTitle" :async="true" width="60vw" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-form-item label="合同id" prop="contract_id">
<el-input v-model="formData.contract_id" clearable placeholder="请输入合同id" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" clearable placeholder="请输入备注" />
</el-form-item>
<el-form-item label="附件" prop="annex">
<el-input v-model="formData.annex" clearable placeholder="请输入附件" />
</el-form-item>
<el-form-item label="录入人" prop="create_user">
<el-input v-model="formData.create_user" clearable placeholder="请输入录入人" />
</el-form-item>
<el-form-item label="录入日期" prop="create_time">
<el-input v-model="formData.create_time" clearable placeholder="请输入录入日期" />
</el-form-item>
<el-row>
<el-col :span="8">
<el-form-item label="合同名称" prop="contract_id">
<el-input v-model="formData.contract_name" clearable placeholder="点击选择合同" readonly
@click="showDialog = true" />
</el-form-item>
</el-col>
<CreateUserLable :form-data="formData" name="录入" flag></CreateUserLable>
<el-col :span="8">
<el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" clearable placeholder="请输入备注" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="附件" prop="annex">
<UploadAnnex :form-data="formData"></UploadAnnex>
</el-form-item>
</el-col>
</el-row>
<formTable :formData="formData.detail" :config="tableConfig" :dict-data="dictData" />
<el-dialog v-model="showDialog" title="选择合同" width="70%">
<dialogTable :config="marketing_contract" @customEvent="customEvent">
</dialogTable>
</el-dialog>
</el-form>
</popup>
</div>
@ -32,8 +36,8 @@
<script lang="ts" setup name="marketingProjectFilingEdit">
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiMarketingProjectFilingAdd, apiMarketingProjectFilingEdit, apiMarketingProjectFilingDetail } from '@/api/marketing_project_filing'
import { timeFormat } from '@/utils/util'
import { apiMarketingProjectFilingAdd, apiMarketingProjectFilingEdit, apiMarketingProjectFilingDetail, apiMarketingProjectFilingDetailDelete, apiMarketingProjectFilingDetailLists } from '@/api/marketing_project_filing'
import { marketing_contract } from "@/components/dialogTable/dialogTableConfig";
import type { PropType } from 'vue'
defineProps({
dictData: {
@ -45,6 +49,7 @@ const emit = defineEmits(['success', 'close'])
const formRef = shallowRef<FormInstance>()
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const mode = ref('add')
const showDialog = ref(false)
//
@ -57,34 +62,53 @@ const formData = reactive({
id: '',
contract_id: '',
remark: '',
annex: '',
contract_name: "",
annex: [],
create_user: '',
create_time: '',
detail: []
})
const tableConfig = reactive(
{
title: "备案人员信息",
tableConfig: [
{
label: "备案人员",
value: 'filing_user',
},
{
label: "备案角色",
value: 'filing_role',
select: "filing_role"
},
{
label: "登记时间",
value: 'reg_time',
date: true
},
{
label: "状态",
value: 'status',
select: "filing_status"
},
],
deleteApi: apiMarketingProjectFilingDetailDelete,
}
)
const customEvent = (e) => {
formData.contract_id = e.id
formData.contract_name = e.contract_name
showDialog.value = false
}
//
const formRules = reactive<any>({
contract_id: [{
required: true,
message: '请输入合同id',
trigger: ['blur']
}],
remark: [{
required: true,
message: '请输入备注',
trigger: ['blur']
}],
create_user: [{
required: true,
message: '请输入录入人',
trigger: ['blur']
}],
create_time: [{
required: true,
message: '请输入录入日期',
trigger: ['blur']
}]
})
@ -96,8 +120,9 @@ const setFormData = async (data: Record<any, any>) => {
formData[key] = data[key]
}
}
let res = await apiMarketingProjectFilingDetailLists({ project_filing_id: data.id })
formData.detail = res.lists
}
const getDetail = async (row: Record<string, any>) => {
@ -111,9 +136,9 @@ const getDetail = async (row: Record<string, any>) => {
//
const handleSubmit = async () => {
await formRef.value?.validate()
const data = { ...formData, }
mode.value == 'edit'
? await apiMarketingProjectFilingEdit(data)
const data = { ...formData, }
mode.value == 'edit'
? await apiMarketingProjectFilingEdit(data)
: await apiMarketingProjectFilingAdd(data)
popupRef.value?.close()
emit('success')

View File

@ -1,19 +1,18 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form
class="mb-[-16px]"
:model="queryParams"
inline
>
<el-form-item label="合同id" prop="contract_id">
<el-input class="w-[280px]" v-model="queryParams.contract_id" clearable placeholder="请输入合同id" />
</el-form-item>
<el-form class="mb-[-16px]" :model="queryParams" inline>
<!-- <el-form-item label="合同id" prop="contract_id">
<SelectRemote :form-data="queryParams" :api="apiMarketingContractSearch" model="contract_id">
</SelectRemote>
</el-form-item> -->
<el-form-item label="录入人" prop="create_user">
<el-input class="w-[280px]" v-model="queryParams.create_user" clearable placeholder="请输入录入人" />
</el-form-item>
<el-form-item label="录入日期" prop="create_time">
<el-input class="w-[280px]" v-model="queryParams.create_time" clearable placeholder="请输入录入日期" />
<el-date-picker class="flex-1 !flex" v-model="queryParams.create_time" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择录入日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
@ -28,39 +27,31 @@
</template>
新增
</el-button>
<el-button
v-perms="['marketing.marketing_project_filing/delete']"
:disabled="!selectData.length"
@click="handleDelete(selectData)"
>
<el-button v-perms="['marketing.marketing_project_filing/delete']" :disabled="!selectData.length"
@click="handleDelete(selectData)">
删除
</el-button>
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column label="合同id" prop="contract_id" show-overflow-tooltip />
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
<el-table-column label="附件" prop="annex" show-overflow-tooltip />
<el-table-column label="合同名称" prop="contract_name" show-overflow-tooltip />
<el-table-column label="录入人" prop="create_user" show-overflow-tooltip />
<el-table-column label="录入日期" prop="create_time" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
<el-table-column label="操作" width="170" fixed="right">
<template #default="{ row }">
<el-button
v-perms="['marketing.marketing_project_filing/edit']"
type="primary"
link
@click="handleEdit(row)"
>
<el-button v-perms="['marketing.marketing_project_filing/edit']" type="primary" link
@click="handleEdit(row)">
编辑
</el-button>
<el-button
v-perms="['marketing.marketing_project_filing/delete']"
type="danger"
link
@click="handleDelete(row.id)"
>
<el-button v-perms="['marketing.marketing_project_filing/delete']" type="danger" link
@click="handleDelete(row.id)">
删除
</el-button>
<el-button v-perms="['marketing.marketing_project_filing/detail']" link
@click="handleDetail(row)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
@ -70,20 +61,26 @@
</div>
</el-card>
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
<detailPage v-if="showDetail" ref="detailRef" @close="showDetail = false" :detailConfig="detailConfig" width="60vw"
:column="2" />
</div>
</template>
<script lang="ts" setup name="marketingProjectFilingLists">
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiMarketingProjectFilingLists, apiMarketingProjectFilingDelete } from '@/api/marketing_project_filing'
import { timeFormat } from '@/utils/util'
import { apiMarketingProjectFilingLists, apiMarketingProjectFilingDelete, apiMarketingProjectFilingDetail } from '@/api/marketing_project_filing'
import { apiMarketingContractSearch } from '@/api/marketing_contract'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
import detailConfig from './detail'
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
const detailRef = ref('')
//
const showEdit = ref(false)
const showDetail = ref(false)
//
@ -102,7 +99,7 @@ const handleSelectionChange = (val: any[]) => {
}
//
const { dictData } = useDictData('')
const { dictData } = useDictData('filing_role,filing_status')
//
const { pager, getLists, resetParams, resetPage } = usePaging({
@ -119,10 +116,11 @@ const handleAdd = async () => {
//
const handleEdit = async (data: any) => {
let res = await apiMarketingProjectFilingDetail({ id: data.id })
showEdit.value = true
await nextTick()
editRef.value?.open('edit')
editRef.value?.setFormData(data)
editRef.value?.setFormData(res)
}
//
@ -132,6 +130,15 @@ const handleDelete = async (id: number | any[]) => {
getLists()
}
//
const handleDetail = async (row) => {
let res = await apiMarketingProjectFilingDetail({ id: row.id })
showDetail.value = true
await nextTick()
detailRef.value?.open()
detailRef.value?.setFormData(res)
}
getLists()
</script>

View File

@ -2,22 +2,35 @@
<div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-form-item label="项目备案id" prop="project_filing_id">
<el-input v-model="formData.project_filing_id" clearable placeholder="请输入项目备案id" />
<el-form-item label="所属合同" prop="project_filing_id">
<el-input v-model="formData.contract_name" clearable placeholder="点击选择项目备案所属合同" readonly
@click="showDialog = true" />
</el-form-item>
<el-form-item label="备案人员" prop="filing_user">
<el-input v-model="formData.filing_user" clearable placeholder="请输入备案人员" />
</el-form-item>
<el-form-item label="备案角色" prop="filing_role">
<el-input v-model="formData.filing_role" clearable placeholder="请输入备案角色" />
<el-select class=' flex-1' v-model="formData.filing_role">
<el-option v-for="(item, index) in dictData.filing_role " :key="index" :label="item.name"
:value="parseInt(item.value)"></el-option>
</el-select>
</el-form-item>
<el-form-item label="登记时间" prop="reg_time">
<el-input v-model="formData.reg_time" clearable placeholder="请输入登记时间" />
<el-date-picker class="flex-1 !flex" v-model="formData.reg_time" clearable type="date"
value-format="YYYY-MM-DD" placeholder="选择登记时间">
</el-date-picker>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-input v-model="formData.status" clearable placeholder="请输入状态" />
<el-select class=' flex-1' v-model="formData.status">
<el-option v-for="(item, index) in dictData.filing_status " :key="index" :label="item.name"
:value="parseInt(item.value)"></el-option>
</el-select>
</el-form-item>
</el-form>
<el-dialog v-model="showDialog" title="选择框架协议" width="70%">
<dialogTable :config="marketing_project_filing" @customEvent="customEvent">
</dialogTable>
</el-dialog>
</popup>
</div>
</template>
@ -26,7 +39,8 @@
import type { FormInstance } from 'element-plus'
import Popup from '@/components/popup/index.vue'
import { apiMarketingProjectFilingDetailAdd, apiMarketingProjectFilingDetailEdit, apiMarketingProjectFilingDetailDetail } from '@/api/marketing_project_filing_detail'
import { timeFormat } from '@/utils/util'
import { marketing_project_filing } from "@/components/dialogTable/dialogTableConfig";
import type { PropType } from 'vue'
defineProps({
dictData: {
@ -38,6 +52,7 @@ const emit = defineEmits(['success', 'close'])
const formRef = shallowRef<FormInstance>()
const popupRef = shallowRef<InstanceType<typeof Popup>>()
const mode = ref('add')
const showDialog = ref(false)
//
@ -49,40 +64,22 @@ const popupTitle = computed(() => {
const formData = reactive({
id: '',
project_filing_id: '',
contract_name: '',
filing_user: '',
filing_role: '',
reg_time: '',
status: '',
})
const customEvent = (e) => {
formData.project_filing_id = e.id
formData.contract_name = e.contract_name
showDialog.value = false
}
//
const formRules = reactive<any>({
project_filing_id: [{
required: true,
message: '请输入项目备案id',
trigger: ['blur']
}],
filing_user: [{
required: true,
message: '请输入备案人员',
trigger: ['blur']
}],
filing_role: [{
required: true,
message: '请输入备案角色',
trigger: ['blur']
}],
reg_time: [{
required: true,
message: '请输入登记时间',
trigger: ['blur']
}],
status: [{
required: true,
message: '请输入状态',
trigger: ['blur']
}]
})

View File

@ -1,22 +1,22 @@
<template>
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form
class="mb-[-16px]"
:model="queryParams"
inline
>
<el-form-item label="项目备案id" prop="project_filing_id">
<el-input class="w-[280px]" v-model="queryParams.project_filing_id" clearable placeholder="请输入项目备案id" />
</el-form-item>
<el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="备案人员" prop="filing_user">
<el-input class="w-[280px]" v-model="queryParams.filing_user" clearable placeholder="请输入备案人员" />
</el-form-item>
<el-form-item label="备案角色" prop="filing_role">
<el-input class="w-[280px]" v-model="queryParams.filing_role" clearable placeholder="请输入备案角色" />
<el-select class=' flex-1' v-model="queryParams.filing_role">
<el-option v-for="(item, index) in dictData.filing_role " :key="index" :label="item.name"
:value="parseInt(item.value)"></el-option>
</el-select>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-input class="w-[280px]" v-model="queryParams.status" clearable placeholder="请输入状态" />
<el-select class=' flex-1' v-model="queryParams.status">
<el-option v-for="(item, index) in dictData.filing_role " :key="index" :label="item.name"
:value="parseInt(item.value)"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button>
@ -31,37 +31,27 @@
</template>
新增
</el-button>
<el-button
v-perms="['marketing.marketing_project_filing_detail/delete']"
:disabled="!selectData.length"
@click="handleDelete(selectData)"
>
<el-button v-perms="['marketing.marketing_project_filing_detail/delete']" :disabled="!selectData.length"
@click="handleDelete(selectData)">
删除
</el-button>
<div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column label="项目备案id" prop="project_filing_id" show-overflow-tooltip />
<el-table-column label="备案人员" prop="filing_user" show-overflow-tooltip />
<el-table-column label="备案角色" prop="filing_role" show-overflow-tooltip />
<el-table-column label="登记时间" prop="reg_time" show-overflow-tooltip />
<el-table-column label="状态" prop="status" show-overflow-tooltip />
<el-table-column label="合同名称" prop="contract_name" show-overflow-tooltip />
<el-table-column label="合同编号" prop="contract_code" show-overflow-tooltip />
<el-table-column label="建设区域" prop="const_area" show-overflow-tooltip />
<el-table-column label="业务性质" prop="business_nature" show-overflow-tooltip />
<el-table-column label="备案角色" prop="filing_role_text" show-overflow-tooltip />
<el-table-column label="状态" prop="status_text" show-overflow-tooltip />
<el-table-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button
v-perms="['marketing.marketing_project_filing_detail/edit']"
type="primary"
link
@click="handleEdit(row)"
>
<el-button v-perms="['marketing.marketing_project_filing_detail/edit']" type="primary" link
@click="handleEdit(row)">
编辑
</el-button>
<el-button
v-perms="['marketing.marketing_project_filing_detail/delete']"
type="danger"
link
@click="handleDelete(row.id)"
>
<el-button v-perms="['marketing.marketing_project_filing_detail/delete']" type="danger" link
@click="handleDelete(row.id)">
删除
</el-button>
</template>
@ -80,7 +70,7 @@
import { usePaging } from '@/hooks/usePaging'
import { useDictData } from '@/hooks/useDictOptions'
import { apiMarketingProjectFilingDetailLists, apiMarketingProjectFilingDetailDelete } from '@/api/marketing_project_filing_detail'
import { timeFormat } from '@/utils/util'
import { apiMarketingProjectFilingSearch } from '@/api/marketing_project_filing'
import feedback from '@/utils/feedback'
import EditPopup from './edit.vue'
@ -106,7 +96,7 @@ const handleSelectionChange = (val: any[]) => {
}
//
const { dictData } = useDictData('')
const { dictData } = useDictData('filing_role,filing_status')
//
const { pager, getLists, resetParams, resetPage } = usePaging({

View File

@ -298,7 +298,7 @@ const customEvent1 = (e) => {
showDialog2.value = false
}
const chekcDate = (rule: any, value: any, callback: any) => {
const checkDate = (rule: any, value: any, callback: any) => {
if (new Date(formData.end_time) < new Date(formData.start_time)) {
callback(new Error('巡视结束时间不能早于巡视开始时间'))
} else {
@ -354,7 +354,7 @@ const formRules = reactive<any>({
trigger: ['blur']
},
{
validator: chekcDate,
validator: checkDate,
trigger: ['blur']
}],
inspection_user: [{