pull/480/head
parent
3e917bb783
commit
e79cdbad76
|
|
@ -75,8 +75,12 @@ export const MainApi = {
|
||||||
return await request.get({ url: `/apply/main/page`, params })
|
return await request.get({ url: `/apply/main/page`, params })
|
||||||
},
|
},
|
||||||
|
|
||||||
generateContract: async (data: MainVO) => {
|
generateContract: async (params: any) => {
|
||||||
return await request.post({ url: `/contract/main/generateContract`, data })
|
return await request.post({ url: `/contract/main/generateContract`, params })
|
||||||
|
},
|
||||||
|
//提宝
|
||||||
|
presentingContract: async (params: any) => {
|
||||||
|
return await request.post({ url: `/contract/main/presentingContract`, params })
|
||||||
},
|
},
|
||||||
// ==================== 子表(任务书详细信息) ====================
|
// ==================== 子表(任务书详细信息) ====================
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="项目负责人" prop="projectLeader">
|
<el-form-item label="项目负责人" prop="projectLeader">
|
||||||
<el-input v-model="formData.projectLeader" placeholder="请输入项目负责人" />
|
<el-input v-model="formData.projectLeader" placeholder="请输入项目负责人" disabled/>
|
||||||
</el-form-item></el-col>
|
</el-form-item></el-col>
|
||||||
<!-- <el-col :span="12">
|
<!-- <el-col :span="12">
|
||||||
<el-form-item label="项目负责人Id" prop="projectLeaderId">
|
<el-form-item label="项目负责人Id" prop="projectLeaderId">
|
||||||
|
|
@ -211,7 +211,9 @@ import FundsForm from './components/FundsForm.vue'
|
||||||
import UnitForm from './components/UnitForm.vue'
|
import UnitForm from './components/UnitForm.vue'
|
||||||
import DeviceForm from './components/DeviceForm.vue'
|
import DeviceForm from './components/DeviceForm.vue'
|
||||||
import ParticipantForm from './components/ParticipantForm.vue'
|
import ParticipantForm from './components/ParticipantForm.vue'
|
||||||
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||||
|
const { wsCache } = useCache()
|
||||||
|
const user = wsCache.get(CACHE_KEY.USER).user
|
||||||
/** 任务书主 表单 */
|
/** 任务书主 表单 */
|
||||||
defineOptions({ name: 'MainForm' })
|
defineOptions({ name: 'MainForm' })
|
||||||
|
|
||||||
|
|
@ -225,8 +227,8 @@ const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
id: undefined,
|
id: undefined,
|
||||||
projectName: undefined,
|
projectName: undefined,
|
||||||
projectLeader: undefined,
|
projectLeader: user.nickname,
|
||||||
projectLeaderId: undefined,
|
projectLeaderId: user.id,
|
||||||
projectCode: undefined,
|
projectCode: undefined,
|
||||||
technicalField: undefined,
|
technicalField: undefined,
|
||||||
year: undefined,
|
year: undefined,
|
||||||
|
|
@ -412,8 +414,8 @@ const resetForm = () => {
|
||||||
formData.value = {
|
formData.value = {
|
||||||
id: undefined,
|
id: undefined,
|
||||||
projectName: undefined,
|
projectName: undefined,
|
||||||
projectLeader: undefined,
|
projectLeader: user.nickname,
|
||||||
projectLeaderId: undefined,
|
projectLeaderId: user.id,
|
||||||
projectCode: undefined,
|
projectCode: undefined,
|
||||||
technicalField: undefined,
|
technicalField: undefined,
|
||||||
year: undefined,
|
year: undefined,
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,12 @@
|
||||||
<el-button link type="danger" @click="handleDelete(scope.row.id)" v-hasPermi="['contract:main:delete']">
|
<el-button link type="danger" @click="handleDelete(scope.row.id)" v-hasPermi="['contract:main:delete']">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button link type="primary" @click="handlePresenting(scope.row.id)" v-if="scope.row.state == '1'">
|
||||||
|
提报
|
||||||
|
</el-button>
|
||||||
|
<el-button link type="primary" @click="handleauditContract(scope.row.id)" v-if="scope.row.state == '2'">
|
||||||
|
审核
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -90,28 +96,45 @@
|
||||||
<!-- 导入立项 -->
|
<!-- 导入立项 -->
|
||||||
<Dialog title="导入立项" v-model="dialogVisible">
|
<Dialog title="导入立项" v-model="dialogVisible">
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading1" :data="list1" :stripe="true" :show-overflow-tooltip="true" highlight-current-row>
|
<el-table v-loading="loading1" :data="list1" :stripe="true" :show-overflow-tooltip="true" highlight-current-row>
|
||||||
<el-table-column align="center" width="65">
|
<el-table-column align="center" width="65">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-radio :label="scope.row.id" v-model="currentRowValue" @change="handleCurrentChange(scope.row)">
|
<el-checkbox :label="scope.row.id" v-model="currentRowValue" @change="handleCurrentChange(scope.row)">
|
||||||
|
|
||||||
</el-radio>
|
</el-checkbox>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||||
<el-table-column label="立项年度" align="center" prop="year" />
|
<el-table-column label="立项年度" align="center" prop="year" />
|
||||||
<!-- <el-table-column label="项目负责人Id" align="center" prop="projectLeaderId" /> -->
|
<!-- <el-table-column label="项目负责人Id" align="center" prop="projectLeaderId" /> -->
|
||||||
<el-table-column label="审核状态" align="center" prop="state" />
|
<el-table-column label="审核状态" align="center" prop="state" />
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<Pagination :total="total1" v-model:page="queryParams1.pageNo" v-model:limit="queryParams1.pageSize"
|
<Pagination :total="total1" v-model:page="queryParams1.pageNo" v-model:limit="queryParams1.pageSize"
|
||||||
@pagination="getList1" />
|
@pagination="getList1" />
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button :disabled="!currentRow" type="primary" @click="submitForm">确 定</el-button>
|
<el-button :disabled="!currentRow" type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
<Dialog title="审核" v-model="dialogVisible1">
|
||||||
|
<ContentWrap>
|
||||||
|
<el-form label-width="80px" :model="formData" class="m-t-8px" :rules="formRules">
|
||||||
|
<el-form-item label="" prop="column">
|
||||||
|
<el-radio label="1">审核通过</el-radio>
|
||||||
|
<el-radio label="0">审核不通过</el-radio>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审核意见" prop="des" v-if="formData.type == 0">
|
||||||
|
<el-input type="textarea" v-model="formData.des" resize="vertical" :autosize="{ minRows: 2, maxRows: 4 }" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</ContentWrap>
|
||||||
|
<template #footer>
|
||||||
|
<el-button :disabled="!currentRow" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="dialogVisible1 = false">取 消</el-button>
|
||||||
|
</template>
|
||||||
|
</Dialog>
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<MainForm ref="formRef" @success="getList" />
|
<MainForm ref="formRef" @success="getList" />
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -130,6 +153,7 @@ const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
|
||||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||||
|
const dialogVisible1 = ref(false) // 弹窗的是否展示
|
||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
const loading1 = ref(true) // 列表的加载中
|
const loading1 = ref(true) // 列表的加载中
|
||||||
const list = ref<MainVO[]>([]) // 列表的数据
|
const list = ref<MainVO[]>([]) // 列表的数据
|
||||||
|
|
@ -145,6 +169,7 @@ const queryParams = reactive({
|
||||||
technicalField: undefined,
|
technicalField: undefined,
|
||||||
year: undefined,
|
year: undefined,
|
||||||
})
|
})
|
||||||
|
|
||||||
const queryParams1 = reactive({
|
const queryParams1 = reactive({
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
|
@ -154,6 +179,14 @@ const queryParams1 = reactive({
|
||||||
technicalField: undefined,
|
technicalField: undefined,
|
||||||
year: undefined,
|
year: undefined,
|
||||||
})
|
})
|
||||||
|
const formData = ref({
|
||||||
|
id: undefined,
|
||||||
|
type: 1,
|
||||||
|
des: '',
|
||||||
|
})
|
||||||
|
const formRules = reactive({
|
||||||
|
des: [{ required: true, message: '审核意见不能为空', trigger: 'blur' }],
|
||||||
|
})
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
const exportLoading = ref(false) // 导出的加载中
|
const exportLoading = ref(false) // 导出的加载中
|
||||||
|
|
||||||
|
|
@ -186,11 +219,11 @@ const handleCurrentChange = (row) => {
|
||||||
}
|
}
|
||||||
const submitForm = async () => {
|
const submitForm = async () => {
|
||||||
try {
|
try {
|
||||||
const data = await MainApi.generateContract({id:currentRow.value})
|
const data = await MainApi.generateContract({ id: currentRow.value })
|
||||||
console.log(data)
|
|
||||||
} finally {
|
} finally {
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
currentRow.value =undefined
|
currentRow.value = undefined
|
||||||
|
currentRowValue.value = undefined
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -213,6 +246,7 @@ const openForm = (type: string, id?: number) => {
|
||||||
}
|
}
|
||||||
// 点击导入立项
|
// 点击导入立项
|
||||||
const handleInsert = async () => {
|
const handleInsert = async () => {
|
||||||
|
currentRowValue.value = undefined
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
getList1()
|
getList1()
|
||||||
|
|
||||||
|
|
@ -230,7 +264,18 @@ const handleDelete = async (id: number) => {
|
||||||
await getList()
|
await getList()
|
||||||
} catch { }
|
} catch { }
|
||||||
}
|
}
|
||||||
|
//提报
|
||||||
|
const handlePresenting = async (id: number) => {
|
||||||
|
try {
|
||||||
|
var par = { id: id }
|
||||||
|
await MainApi.presentingContract(par)
|
||||||
|
await getList()
|
||||||
|
} catch { }
|
||||||
|
}
|
||||||
|
//审核
|
||||||
|
const handleauditContract = async (id: number) => {
|
||||||
|
|
||||||
|
}
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
const handleExport = async () => {
|
const handleExport = async () => {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue