fix : 征集公司校验,单文件显示改为表格,手机端审批后刷新,需求征集回车触发搜索,组织机构管理搜索
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" style="margin-bottom: -25px">
|
||||
<el-form-item label="征集公司" prop="companyIds" class="tree-select" label-width="96">
|
||||
<el-form-item label="征集公司" :required="true" prop="" class="tree-select" label-width="96">
|
||||
<div style="width: 100%">
|
||||
<el-button color="#DED0B2" @click="showCompany">{{ selectedCompanyList.length === 0 ? '请选择征集公司' : '更改' }}
|
||||
</el-button>
|
||||
@@ -170,11 +170,11 @@ const processInstanceData = ref()
|
||||
const formPermMap = ref(new Map());
|
||||
const companyNameArray = ref([])
|
||||
const rules = reactive({
|
||||
requirementName: [{required: true, message: '请输入征集名称', trigger: 'blur'}],
|
||||
companyIds: [{required: true, message: '请选择征集公司', trigger: 'blur'}],
|
||||
collectType: [{required: true, message: '请选择征集类型', trigger: 'blur'}],
|
||||
deadline: [{required: true, message: '请选择截止时间', trigger: 'blur'}],
|
||||
specialFundId: [{required: true, message: '请选择专项资金名称', trigger: 'blur'}],
|
||||
requirementName: [{required: true, message: '请输入征集名称', trigger: ['blur','change']}],
|
||||
// companyIds: [{required: true, message: '请选择征集公司', trigger: ['blur','change']}],
|
||||
collectType: [{required: true, message: '请选择征集类型', trigger: ['blur','change']}],
|
||||
deadline: [{required: true, message: '请选择截止时间', trigger: ['blur','change']}],
|
||||
specialFundId: [{required: true, message: '请选择专项资金名称', trigger: ['blur','change']}],
|
||||
})
|
||||
|
||||
const tableConfig = reactive({
|
||||
@@ -344,14 +344,6 @@ const init = async () => {
|
||||
})
|
||||
}
|
||||
const submitParam = (item) => {
|
||||
if (item.companyIds.length === 0) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请选择征集公司',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}
|
||||
let files = []
|
||||
item.fileList.forEach(item => {
|
||||
let obj = {
|
||||
@@ -385,6 +377,14 @@ const handleSubmit = async (instance) => {
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (formData.value.companyIds.length === 0) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请选择征集公司',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}
|
||||
const {msg, code} = await addRequirement(submitParam(formData.value))
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
|
||||
@@ -117,7 +117,7 @@ onMounted(async () => {
|
||||
}
|
||||
|
||||
:deep(.el-table--fit ) {
|
||||
height: 300px !important;
|
||||
height: 162px !important;
|
||||
}
|
||||
|
||||
.detail-block {
|
||||
|
||||
@@ -3,12 +3,13 @@
|
||||
<el-row gutter="20">
|
||||
<el-col :span="5">
|
||||
<el-form-item prop="requirementName" label="征集名称">
|
||||
<el-input v-model="selectForm.requirementName" placeholder="请输入征集名称" clearable/>
|
||||
<el-input v-model="selectForm.requirementName" placeholder="请输入征集名称" clearable @keyup.enter.native="getList"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1">
|
||||
<el-form-item prop="collectType" label="征集类型">
|
||||
<el-select v-model="selectForm.collectType" placeholder="请选择征集类型" clearable filterable>
|
||||
<el-select v-model="selectForm.collectType" ref="collectTypeSelectRef" placeholder="请选择征集类型" clearable filterable
|
||||
@change="getList">
|
||||
<el-option
|
||||
v-for="item in cacheStore.getDict('collect_type')"
|
||||
:key="item.value"
|
||||
@@ -20,7 +21,7 @@
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1">
|
||||
<el-form-item prop="state" label="状态">
|
||||
<el-select v-model="selectForm.state" placeholder="请选择状态" clearable filterable>
|
||||
<el-select v-model="selectForm.state" placeholder="请选择状态" clearable filterable @change="getList">
|
||||
<el-option
|
||||
v-for="item in stateOption"
|
||||
:key="item.value"
|
||||
@@ -59,6 +60,7 @@ import {getRequirementStatePerm} from "@/api/project-demand";
|
||||
const cacheStore = useCacheStore()
|
||||
const authStore = useAuthStore()
|
||||
const router = useRouter()
|
||||
const collectTypeSelectRef=ref()
|
||||
const searchConfig = reactive([
|
||||
{
|
||||
label: '征集名称',
|
||||
@@ -201,6 +203,7 @@ const tableConfig = reactive({
|
||||
],
|
||||
params: {}
|
||||
})
|
||||
|
||||
const getStatePerm = () => {
|
||||
getRequirementStatePerm().then(res => {
|
||||
stateOption.value=res.data
|
||||
|
||||
@@ -17,7 +17,7 @@ import {getFundOption} from "@/api/special-fund";
|
||||
import {getSubCompOpt} from "@/api/user/user";
|
||||
import {matterTree} from "@/utils/matterTree";
|
||||
import CollectionDetailMoblie from './CollectionDetailMoblie.vue'
|
||||
import OpinionMoblie from './OpinionMoblie.vue'
|
||||
import OpinionMoblie from '@/views/project-management/mobledetail/OpinionMoblie.vue'
|
||||
|
||||
const tagsViewStore = useTagsView()
|
||||
const router = useRouter()
|
||||
@@ -67,7 +67,11 @@ const init = async () => {
|
||||
}
|
||||
loading.value = false
|
||||
let data = res.data
|
||||
data.formData.companyIds = getCompanyOptionItem(data.formData.companyIds)
|
||||
if (data.formData.companyIds[0] == -1) {
|
||||
data.formData.companyIds = ['所有公司']
|
||||
} else {
|
||||
data.formData.companyIds = getCompanyOptionItem(data.formData.companyIds)
|
||||
}
|
||||
collectData.value = data
|
||||
formData.value = data.formData;
|
||||
if (data.formData.specialFund) {
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
<div class="oper-page-btn">
|
||||
<!-- <el-button type="info" @click="staging">存为草稿</el-button>-->
|
||||
<el-button color="#DED0B2" v-if="name==='Summary/add'" @click="handleSubmit(summaryForm)">发布</el-button>
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit">重新发布</el-button>
|
||||
<el-button color="#DED0B2" v-else @click="handleResubmit(summaryForm)">重新发布</el-button>
|
||||
<el-button @click="handleBack">返回</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -472,47 +472,58 @@ const handleSubmit = debounce(async (instance) => {
|
||||
}
|
||||
})
|
||||
})
|
||||
const handleResubmit = debounce(() => {
|
||||
let otherFiles = []
|
||||
if (name.value === 'Summary/edit') {
|
||||
attachment.value.allFileList.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
// formData.value.resultForm=JSON.stringify(formData.value.resultForm)
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
if (formData.value.isSpecialFund && formData.value.specialFund === null) {
|
||||
formData.value.specialFund = getFundName(formData.value.specialFundId)
|
||||
}
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: otherFiles,
|
||||
requirementId: route.query.id ? route.query.id : '-1'
|
||||
}
|
||||
// console.log('重新提交params', params, formData.value.specialFund, formData.value.specialFundId)
|
||||
resubmitReported(params).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Summary'
|
||||
const handleResubmit = debounce((instance) => {
|
||||
if (!instance) return
|
||||
instance.validate(async (valid, fields) => {
|
||||
if (!valid) {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请完善数据,再提交!',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
}
|
||||
let otherFiles = []
|
||||
if (name.value === 'Summary/edit') {
|
||||
attachment.value.allFileList.forEach(item => {
|
||||
otherFiles.push(getFileParam(item))
|
||||
})
|
||||
}
|
||||
if (formData.value.isSpecialFund && formData.value.specialFund === null) {
|
||||
formData.value.specialFund = getFundName(formData.value.specialFundId)
|
||||
}
|
||||
if (attachment.value.singleFile == null) {
|
||||
attachment.value.validate()
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: '请上传附件',
|
||||
type: 'error'
|
||||
})
|
||||
return;
|
||||
} else {
|
||||
// formData.value.resultForm=JSON.stringify(formData.value.resultForm)
|
||||
attachment.value.clearValidate()
|
||||
}
|
||||
let params = {
|
||||
...formData.value,
|
||||
deploymentId: deploymentId.value,
|
||||
fileList: otherFiles,
|
||||
requirementId: route.query.id ? route.query.id : '-1'
|
||||
}
|
||||
// console.log('重新提交params', params, formData.value.specialFund, formData.value.specialFundId)
|
||||
resubmitReported(params).then(res => {
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
message: res.msg,
|
||||
type: res.code === 1000 ? 'success' : 'error'
|
||||
})
|
||||
if (res.code === 1000) {
|
||||
tagsViewStore.delVisitedViews(router.currentRoute.value.path)
|
||||
router.push({
|
||||
name: 'Summary'
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -348,13 +348,25 @@ const handleEdit = (row) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
// const handleDetail = (row) => {
|
||||
// router.push({
|
||||
// name: 'Summary/detail',
|
||||
// query: {
|
||||
// id: row.requirementId == null ? '-1' : row.requirementId,
|
||||
// projectId: row.projectId,
|
||||
// state: row.state
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
const handleDetail = (row) => {
|
||||
router.push({
|
||||
name: 'Summary/detail',
|
||||
name: 'Implementation/detail',
|
||||
query: {
|
||||
id: row.requirementId == null ? '-1' : row.requirementId,
|
||||
projectId: row.projectId,
|
||||
state: row.state
|
||||
state: row.state,
|
||||
step: '10'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user