安全规范 安全目标
This commit is contained in:
parent
bf58046a87
commit
96251e4c81
@ -1,81 +1,61 @@
|
||||
|
||||
<template>
|
||||
<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="160px">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合同编号">
|
||||
{{ formData.contract.contract_name }}
|
||||
<el-form-item label="组织名称">
|
||||
{{ formData.org_name }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目名称">
|
||||
{{ formData.project.name
|
||||
<el-form-item label="部门名称">
|
||||
{{ formData.dept_name
|
||||
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.project.project_code
|
||||
<el-form-item label="规范名称">
|
||||
{{ formData.name
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户名称">
|
||||
{{ formData.custom.name
|
||||
<el-form-item label="规范类别">
|
||||
{{ formData.type
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="退款日期">
|
||||
{{ formData.reason
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="退款金额">
|
||||
{{ formData.amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="金额大写">
|
||||
{{ formData.amount_daxie }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="退款方式">
|
||||
<dict-value :options="dictData.refund_type" :value="formData.refund_type" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="退款人">
|
||||
{{ formData.refunder }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="收款账号">
|
||||
{{ formData.collection_acccount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="收款银行">
|
||||
{{ formData.collection_bank }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item label="发布部门">
|
||||
{{ formData.publish_dep
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注">
|
||||
{{ formData.remark
|
||||
}}
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
@ -103,7 +83,7 @@ defineProps({
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
|
||||
const formDataannex = reactive([])
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
@ -123,7 +103,22 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
if (data.file && data.file.length > 0) {
|
||||
if (data.file.includes(",")) {
|
||||
const arry1 = data.file.split(',').map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
} else {
|
||||
const arry1 = [{ name: `文件1`, uri: data.file }]
|
||||
Object.assign(formDataannex, arry1)
|
||||
console.log(formDataannex)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -25,6 +25,7 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item label="规范类别" prop="type">
|
||||
<el-input v-model="formData.type" clearable placeholder="请输入规范类别" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
@ -158,7 +159,7 @@ const formData = reactive({
|
||||
content: "",
|
||||
file: '',
|
||||
name: "",
|
||||
typen: "",
|
||||
type: "",
|
||||
dept_id: '',
|
||||
org_id: "",
|
||||
|
||||
@ -213,7 +214,7 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.return_desc = formDataannex.map((item: any) => item.uri).toString()
|
||||
formData.file = formDataannex.map((item: any) => item.uri).toString()
|
||||
}
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
@ -2,13 +2,15 @@
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="合同编号" prop="project_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.contract_no" clearable placeholder="请输入合同编号" />
|
||||
<el-form-item label="规范类别" prop="type">
|
||||
<el-input class="w-[280px]" v-model="queryParams.type" clearable placeholder="请输入规范类别" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同名称" prop="project_role_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.contract_name" clearable placeholder="请输入合同名称" />
|
||||
<el-form-item label="规范名称" prop="name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.name" clearable placeholder="请输入规范名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发布部门" prop="publish_dep">
|
||||
<el-input class="w-[280px]" v-model="queryParams.publish_dep" clearable placeholder="请输入发布部门" />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||
@ -30,20 +32,16 @@
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="退款单号" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="客户名称" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_role_name" show-overflow-tooltip />
|
||||
<el-table-column label="合同编号" prop="admin_name" show-overflow-tooltip />
|
||||
<el-table-column label="退款原因" prop="reason" show-overflow-tooltip />
|
||||
<el-table-column label="退款日期" prop="refund_date" show-overflow-tooltip />
|
||||
<el-table-column label="退款金额" prop="amount" show-overflow-tooltip />
|
||||
<el-table-column label="退款方式" prop="refund_type" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.refund_type" :value="row.refund_type" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退款人" prop="refunder" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" 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="name" show-overflow-tooltip />
|
||||
<el-table-column label="规范类别" prop="type" show-overflow-tooltip />
|
||||
<el-table-column label="发布部门" prop="publish_dep" show-overflow-tooltip />
|
||||
<el-table-column label="内容" prop="amount" show-overflow-tooltip />
|
||||
|
||||
|
||||
<el-table-column label="规范附件" prop="file" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['refund.refund/edit']" type="primary" link @click="handleEdit(row)">
|
||||
@ -87,8 +85,9 @@ const showDtail = ref(false)
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
contract_no: '',
|
||||
contract_name: '',
|
||||
publish_dep: '',
|
||||
name: '',
|
||||
type: '',
|
||||
|
||||
})
|
||||
|
||||
|
@ -1,81 +1,79 @@
|
||||
|
||||
<template>
|
||||
<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="160px">
|
||||
<el-card class="mb-2">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合同编号">
|
||||
{{ formData.contract.contract_name }}
|
||||
<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.project.name
|
||||
{{ formData.project_name
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目编码">
|
||||
{{ formData.project.project_code
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item label="项目类别">
|
||||
{{ formData.project_type
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户名称">
|
||||
{{ formData.custom.name
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="退款日期">
|
||||
{{ formData.reason
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="退款金额">
|
||||
{{ formData.amount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="金额大写">
|
||||
{{ formData.amount_daxie }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="退款方式">
|
||||
<dict-value :options="dictData.refund_type" :value="formData.refund_type" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="退款人">
|
||||
{{ formData.refunder }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="收款账号">
|
||||
{{ formData.collection_acccount }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="收款银行">
|
||||
{{ formData.collection_bank }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item label="安全目标">
|
||||
{{ formData.target
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注">
|
||||
{{ formData.remark
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="基本要求">
|
||||
{{ formData.require
|
||||
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="目标规范">
|
||||
{{ formData.target_standard }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="合格率">
|
||||
{{ formData.pass_rate }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="允许偏差">
|
||||
{{ formData.deviation }}
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
@ -103,7 +101,7 @@ defineProps({
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
|
||||
const formDataannex = reactive([])
|
||||
const datas = reactive({
|
||||
provinceOptions: [],
|
||||
cityOptions: [],
|
||||
@ -123,7 +121,22 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
Object.assign(formData, data)
|
||||
|
||||
|
||||
if (data.file && data.file.length > 0) {
|
||||
if (data.file.includes(",")) {
|
||||
const arry1 = data.file.split(',').map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
};
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
} else {
|
||||
const arry1 = [{ name: `文件1`, uri: data.file }]
|
||||
Object.assign(formDataannex, arry1)
|
||||
console.log(formDataannex)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
|
@ -1,84 +1,66 @@
|
||||
<template>
|
||||
<div class="edit-popup">
|
||||
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="80%" @confirm="handleSubmit" @close="handleClose">
|
||||
<el-steps :active="active" align-center style="margin-bottom: 20px;">
|
||||
<el-step title="商务部发起" />
|
||||
<el-step title="商务总监" />
|
||||
<el-step title="财务经理" />
|
||||
<el-step title="总经理" />
|
||||
</el-steps>
|
||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit" @close="handleClose">
|
||||
|
||||
<el-form ref="formRef" :model="formData" label-width="auto" :rules="formRules">
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称" prop="customer_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-input v-model="custom_name" @click="showDialog = true" clearable placeholder="请选择客户" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="退款日期" prop="return_date">
|
||||
<el-date-picker class="flex-1 !flex" v-model="formData.return_date" clearable type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目名称" prop="contract_id" @click="showDialog1 = true">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入项目名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="项目编码" prop="contract_id">
|
||||
<el-input v-model="project_code" clearable placeholder="请输入项目编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同编号" prop="contract_no">
|
||||
<el-input v-model="contract_no" clearable placeholder="请输入合同编号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称" prop="contract_name">
|
||||
<el-input v-model="contract_name" clearable placeholder="请输入合同名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="退款原因" prop="reason">
|
||||
<el-input v-model="formData.reason" type='textarea' clearable placeholder="请输入退款原因" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="退款金额" prop="amount">
|
||||
<el-input v-model="formData.amount" clearable placeholder="请输入退款金额" @input="amountinput" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="金额大写" prop="amount_daxie">
|
||||
<el-input v-model="formData.amount_daxie" readonly clearable placeholder="请输入金额大写" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="退款方式" prop="contacts">
|
||||
<el-select class="flex-1" v-model="formData.refund_type" clearable placeholder="请选择退款方式">
|
||||
<el-option v-for="(item, index) in dictData.refund_type" :key="index" :label="item.name" :value="parseInt(item.value)" />
|
||||
<el-col :span="24">
|
||||
<el-form-item label="组织名称" prop="org_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select v-model="formData.org_id" clearable placeholder="请选择组织" @change="deptrmt">
|
||||
<el-option v-for="(item, index) in list1" :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="退款人" prop="refunder">
|
||||
<el-input v-model="formData.refunder" readonly clearable placeholder="请输入退款人" />
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="部门名称" prop="dept_id" :rules="[{ required: true, message: '不可为空', trigger: 'blur' }]">
|
||||
<el-select v-model="formData.dept_id" clearable placeholder="请选择部门">
|
||||
<el-option v-for="( item, index ) in list2 " :key="index" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="项目名称" prop="project_id" @click="showDialog = true">
|
||||
<el-input v-model="project_name" clearable placeholder="请输入项目名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="formData.remark" type="textarea" clearable placeholder="请输入备注" />
|
||||
<el-col :span="24">
|
||||
<el-form-item label="项目类别" prop="project_type">
|
||||
<el-input v-model="formData.project_type" clearable placeholder="请输入项目类别" />
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="安全目标" prop="target">
|
||||
<el-input v-model="formData.target" clearable placeholder="请输入安全目标" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="基本要求" prop="require">
|
||||
<el-input v-model="formData.require" clearable placeholder="请输入基本要求" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="目标规范" prop="target_standard">
|
||||
<el-input v-model="formData.target_standard" type="textarea" clearable placeholder="请输入目标规范" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="合格率" prop="pass_rate">
|
||||
<el-input v-model="formData.pass_rate" type="number" clearable placeholder="请输入合格率" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="允许偏差" prop="deviation">
|
||||
<el-input v-model="formData.deviation" type="number" clearable placeholder="请输入允许偏差" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
<el-col :span="24">
|
||||
|
||||
<el-form-item label="附件" prop="field127">
|
||||
@ -89,7 +71,7 @@
|
||||
</el-upload>
|
||||
|
||||
<div>
|
||||
<div v-for="(item, index) in formDataannex" style="margin-left: 5px;display: block;">
|
||||
<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>
|
||||
@ -98,34 +80,11 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div style="margin: 20px 0;">客户收款信息</div>
|
||||
|
||||
<el-row :gutter="10">
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收款账号" prop="collection_acccount" @click="showDialog2 = true">
|
||||
<el-input v-model="formData.collection_acccount" clearable placeholder="请输入收款账号" />
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收款银行" prop="collection_bank">
|
||||
<el-input v-model="formData.collection_bank" clearable placeholder="请输入收款银行" />
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-dialog v-model="showDialog" title="选择客户" width="70%">
|
||||
<customDialog @customEvent="customEvent"></customDialog>
|
||||
<el-dialog v-model="showDialog" title="选择项目" width="70%">
|
||||
<porjectDialog @customEvent="customEvent"></porjectDialog>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="showDialog1" title="选择合同" width="70%">
|
||||
<salescontractDialog @customEvent="customEvent1"></salescontractDialog>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
</el-form>
|
||||
@ -135,12 +94,10 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="projectEdit">
|
||||
import customDialog from '@/components/custom-dialog/index.vue'
|
||||
import porjectDialog from '@/components/project/index.vue'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import salescontractDialog from '@/components/salescontract/index.vue'
|
||||
|
||||
import { apirefundapplyAdd, apirefundapplyEdit, apirefundapplyDetail } from '@/api/refund'
|
||||
import { safetytargetAdd, safetytargetEdit, safetytargetDetail } from '@/api/safety_target'
|
||||
import { toChinesNum } from "@/utils/util";
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
@ -153,12 +110,12 @@ const base_url = configs.baseUrl + configs.urlPrefix
|
||||
const userStore = useUserStore();
|
||||
const active = ref(0)
|
||||
const formDataannex = reactive([])
|
||||
const contract_name = ref('')
|
||||
const list1 = reactive([])
|
||||
const list2 = reactive([])
|
||||
const showDialog = ref(false)
|
||||
const project_name = ref('')
|
||||
const project_code = ref('')
|
||||
const project_amount = ref('')
|
||||
const contract_no = ref('')
|
||||
const custom_name = ref('')
|
||||
import { deptAll } from '@/api/org/department'
|
||||
import { getAll } from '@/api/org/organization'
|
||||
const userInfo = userStore.userInfo
|
||||
console.log(userInfo, '222222')
|
||||
// 上传文件
|
||||
@ -176,31 +133,7 @@ const handleAvatarSuccess_four = (
|
||||
|
||||
);
|
||||
};
|
||||
//验证
|
||||
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) => {
|
||||
|
||||
// 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)) {
|
||||
callback(new Error('请输入正确的邮箱格式'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
|
||||
};
|
||||
// 删除上传的文件
|
||||
const delFileFn = (index: number) => {
|
||||
formDataannex.splice(index, 1)
|
||||
@ -215,54 +148,49 @@ const emit = defineEmits(['success', 'close'])
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
||||
const mode = ref('add')
|
||||
const amount_daxie = ref('')
|
||||
const showDialog = ref(false)
|
||||
const showDialog1 = ref(false)
|
||||
|
||||
//获取值
|
||||
const customEvent = (e: any) => {
|
||||
formData.customer_id = e.id;
|
||||
custom_name.value = e.name;
|
||||
formData.project_id = e.id;
|
||||
project_name.value = e.name;
|
||||
showDialog.value = false;
|
||||
};
|
||||
const customEvent1 = (e: any) => {
|
||||
formData.contract_id = e.id;
|
||||
project_name.value = e.project_name;
|
||||
project_code.value = e.project_code;
|
||||
contract_name.value = e.contract_name;
|
||||
contract_no.value = e.contract_code
|
||||
showDialog1.value = false;
|
||||
};
|
||||
|
||||
//获取所有组织
|
||||
const getlist = () => {
|
||||
getAll().then((res) => {
|
||||
Object.assign(list1, res)
|
||||
|
||||
|
||||
//监听输入
|
||||
const amountinput = (e) => {
|
||||
// console.log(e)
|
||||
if (e && e > 0) {
|
||||
formData.amount_daxie = toChinesNum(e)
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取部门
|
||||
const deptrmt = (e) => {
|
||||
getlist1(e)
|
||||
}
|
||||
//获取所有部门
|
||||
const getlist1 = (id: any) => {
|
||||
deptAll({ 'org_id': id }).then((res) => {
|
||||
Object.assign(list2, res)
|
||||
})
|
||||
}
|
||||
|
||||
// 弹窗标题
|
||||
const popupTitle = computed(() => {
|
||||
return mode.value == 'edit' ? '编辑退款申请表' : '新增退款申请表'
|
||||
return mode.value == 'edit' ? '编辑安全目标表' : '新增安全目标表'
|
||||
})
|
||||
|
||||
// 表单数据
|
||||
const formData = reactive({
|
||||
id: '',
|
||||
customer_id: "",
|
||||
contract_id: "",
|
||||
approve_id: 0,
|
||||
refund_date: "",
|
||||
reason: "",
|
||||
amount: 0,
|
||||
amount_daxie: "",
|
||||
refund_type: "",
|
||||
refunder: userInfo.name,
|
||||
return_total_amount: "",
|
||||
return_desc: "",
|
||||
collection_bank: "",
|
||||
collection_acccount: ""
|
||||
project_id: "",
|
||||
project_type: "",
|
||||
target: "",
|
||||
require: "",
|
||||
file: '',
|
||||
deviation: "",
|
||||
pass_rate: "",
|
||||
dept_id: '',
|
||||
org_id: "",
|
||||
|
||||
})
|
||||
|
||||
|
||||
@ -274,9 +202,9 @@ const formRules = reactive<any>({
|
||||
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
if (data.return_desc && data.return_desc.length > 0) {
|
||||
if (data.return_desc.includes(",")) {
|
||||
const arry1 = data.return_desc.split(',').map((item: any, index: any) => {
|
||||
if (data.file && data.file.length > 0) {
|
||||
if (data.file.includes(",")) {
|
||||
const arry1 = data.file.split(',').map((item: any, index: any) => {
|
||||
return {
|
||||
name: `文件${index + 1}`,
|
||||
uri: item
|
||||
@ -284,7 +212,7 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
});
|
||||
Object.assign(formDataannex, arry1)
|
||||
} else {
|
||||
const arry1 = [{ name: `文件1`, uri: data.return_desc }]
|
||||
const arry1 = [{ name: `文件1`, uri: data.file }]
|
||||
Object.assign(formDataannex, arry1)
|
||||
console.log(formDataannex)
|
||||
|
||||
@ -298,18 +226,14 @@ const setFormData = async (data: Record<any, any>) => {
|
||||
formData[key] = data[key]
|
||||
}
|
||||
}
|
||||
custom_name.value = data.custom.name
|
||||
project_name.value = data.project.name
|
||||
project_code.value = data.project.project_code
|
||||
project_amount.value = data.contract.amount
|
||||
contract_name.value = data.contract.contract_name;
|
||||
contract_no.value = data.contract.contract_code
|
||||
|
||||
|
||||
project_name.value = data.project_name
|
||||
|
||||
|
||||
}
|
||||
const getDetail = async (row: Record<string, any>) => {
|
||||
const data = await apirefundapplyDetail({
|
||||
const data = await safetytargetDetail({
|
||||
id: row.id
|
||||
})
|
||||
setFormData(data)
|
||||
@ -319,16 +243,16 @@ const getDetail = async (row: Record<string, any>) => {
|
||||
// 提交按钮
|
||||
const handleSubmit = async () => {
|
||||
if (formDataannex.length > 0) {
|
||||
formData.return_desc = formDataannex.map((item: any) => item.uri).toString()
|
||||
formData.file = formDataannex.map((item: any) => item.uri).toString()
|
||||
}
|
||||
console.log(formRef.value?.validate(), '22222222')
|
||||
|
||||
await formRef.value?.validate()
|
||||
|
||||
|
||||
const data = { ...formData }
|
||||
mode.value == 'edit'
|
||||
? await apirefundapplyEdit(data)
|
||||
: await apirefundapplyAdd(data)
|
||||
? await safetytargetEdit(data)
|
||||
: await safetytargetAdd(data)
|
||||
popupRef.value?.close()
|
||||
emit('success')
|
||||
}
|
||||
@ -337,11 +261,8 @@ const handleSubmit = async () => {
|
||||
const open = (type = 'add') => {
|
||||
mode.value = type
|
||||
popupRef.value?.open()
|
||||
getlist()
|
||||
|
||||
getAllProjectTypes().then((res) => {
|
||||
|
||||
protype.splice(0, protype.length, ...res);
|
||||
})
|
||||
}
|
||||
|
||||
// 关闭回调
|
||||
|
@ -2,11 +2,11 @@
|
||||
<div>
|
||||
<el-card class="!border-none mb-4" shadow="never">
|
||||
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||
<el-form-item label="合同编号" prop="project_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.contract_no" clearable placeholder="请输入合同编号" />
|
||||
<el-form-item label="项目类别" prop="project_type">
|
||||
<el-input class="w-[280px]" v-model="queryParams.project_type" clearable placeholder="请输入项目类别" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合同名称" prop="project_role_name">
|
||||
<el-input class="w-[280px]" v-model="queryParams.contract_name" clearable placeholder="请输入合同名称" />
|
||||
<el-form-item label="安全目标" prop="target">
|
||||
<el-input class="w-[280px]" v-model="queryParams.target" clearable placeholder="请输入安全目标" />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
@ -30,20 +30,21 @@
|
||||
<div class="mt-4">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column label="退款单号" prop="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="客户名称" prop="project_code" show-overflow-tooltip />
|
||||
<el-table-column label="项目名称" prop="project_role_name" show-overflow-tooltip />
|
||||
<el-table-column label="合同编号" prop="admin_name" show-overflow-tooltip />
|
||||
<el-table-column label="退款原因" prop="reason" show-overflow-tooltip />
|
||||
<el-table-column label="退款日期" prop="refund_date" show-overflow-tooltip />
|
||||
<el-table-column label="退款金额" prop="amount" show-overflow-tooltip />
|
||||
<el-table-column label="退款方式" prop="refund_type" 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="project_name" show-overflow-tooltip />
|
||||
<el-table-column label="项目类别" prop="project_type" show-overflow-tooltip />
|
||||
<el-table-column label="安全目标" prop="target" show-overflow-tooltip />
|
||||
<el-table-column label="基本要求" prop="require" show-overflow-tooltip />
|
||||
<el-table-column label="目标规范" prop="target_standard" show-overflow-tooltip />
|
||||
<el-table-column label="合格率" prop="pass_rate" show-overflow-tooltip />
|
||||
<el-table-column label="允许偏差" prop="deviation" show-overflow-tooltip />
|
||||
<el-table-column label="附件" prop="amount" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<dict-value :options="dictData.refund_type" :value="row.refund_type" />
|
||||
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退款人" prop="refunder" show-overflow-tooltip />
|
||||
<el-table-column label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column label="操作" width="150" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button v-perms="['refund.refund/edit']" type="primary" link @click="handleEdit(row)">
|
||||
@ -72,7 +73,7 @@
|
||||
<script lang="ts" setup name="projectLists">
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useDictData } from '@/hooks/useDictOptions'
|
||||
import { apirefundapplyLists, apirefundapplyDelete, apirefundapplyDetail } from '@/api/refund'
|
||||
import { safetytargetLists, safetytargetDelete, safetytargetDetail } from '@/api/safety_target'
|
||||
import { timeFormat } from '@/utils/util'
|
||||
import { getAllProjectTypes } from '@/api/projecttype'
|
||||
const protype = reactive([])
|
||||
@ -87,8 +88,8 @@ const showDtail = ref(false)
|
||||
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
contract_no: '',
|
||||
contract_name: '',
|
||||
project_type: '',
|
||||
target: '',
|
||||
|
||||
})
|
||||
|
||||
@ -106,7 +107,7 @@ const handleSelectionChange = (val: any[]) => {
|
||||
const { dictData } = useDictData('refund_type')
|
||||
// 分页相关
|
||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||
fetchFun: apirefundapplyLists,
|
||||
fetchFun: safetytargetLists,
|
||||
params: queryParams
|
||||
})
|
||||
|
||||
@ -121,7 +122,7 @@ const handleAdd = async () => {
|
||||
// 编辑
|
||||
const handleEdit = async (data: any) => {
|
||||
console.log(data.id)
|
||||
let res = await apirefundapplyDetail({ id: data.id })
|
||||
let res = await safetytargetDetail({ id: data.id })
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
editRef.value?.open('edit')
|
||||
@ -131,11 +132,11 @@ const handleEdit = async (data: any) => {
|
||||
// 删除
|
||||
const handleDelete = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apirefundapplyDelete({ id })
|
||||
await safetytargetDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
const handledetail = async (data: any) => {
|
||||
let res = await apirefundapplyDetail({ id: data.id })
|
||||
let res = await safetytargetDetail({ id: data.id })
|
||||
showDtail.value = true
|
||||
await nextTick()
|
||||
detailRef.value?.open()
|
||||
|
Loading…
x
Reference in New Issue
Block a user