Merge pull request 'dd' (#422) from dd into master
Reviewed-on: http://git.feashow.cn/clay/mosr-web/pulls/422
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
v-model="formData.apportionmentMonth"
|
v-model="formData.apportionmentMonth"
|
||||||
type="month"
|
type="month"
|
||||||
format="YYYY-MM"
|
format="YYYY-MM"
|
||||||
value-format="YYYY-MM-DD HH:mm:ss"
|
value-format="YYYY-MM"
|
||||||
placeholder="选择月"
|
placeholder="选择月"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ const searchConfig = reactive([
|
|||||||
component: 'el-date-picker',
|
component: 'el-date-picker',
|
||||||
props: {
|
props: {
|
||||||
clearable: true,
|
clearable: true,
|
||||||
type: 'datetimerange',
|
type: 'daterange',
|
||||||
startPlaceholder: '开始日期',
|
startPlaceholder: '开始日期',
|
||||||
endPlaceholder: '结束日期',
|
endPlaceholder: '结束日期',
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
|
|||||||
@@ -119,8 +119,10 @@ const searchConfig = reactive([
|
|||||||
prop: 'time',
|
prop: 'time',
|
||||||
component: 'el-date-picker',
|
component: 'el-date-picker',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择时间',
|
type:'month',
|
||||||
|
placeholder: '请选择月份',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
|
format: 'YYYY-MM',
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
},
|
},
|
||||||
colProps: {}
|
colProps: {}
|
||||||
|
|||||||
@@ -88,7 +88,13 @@ const getFileParam = (item) => {
|
|||||||
const handleSubmit = (instance) => {
|
const handleSubmit = (instance) => {
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) {
|
||||||
|
return ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请完善数据,再提交!',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
let files = []
|
let files = []
|
||||||
otherFileList.value.forEach(item => {
|
otherFileList.value.forEach(item => {
|
||||||
files.push(getFileParam(item))
|
files.push(getFileParam(item))
|
||||||
@@ -132,7 +138,13 @@ const handleSubmit = (instance) => {
|
|||||||
const handleResubmit = (instance) => {
|
const handleResubmit = (instance) => {
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) {
|
||||||
|
return ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请完善数据,再提交!',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
let otherFiles = []
|
let otherFiles = []
|
||||||
if (name.value === 'Implementation/edit') {
|
if (name.value === 'Implementation/edit') {
|
||||||
attachment.value.allFileList?.forEach(item => {
|
attachment.value.allFileList?.forEach(item => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="apply-block">
|
<div class="apply-block" v-loading="loading">
|
||||||
<baseTitle title="基础信息"></baseTitle>
|
<baseTitle title="基础信息"></baseTitle>
|
||||||
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
|
<fvForm :schema="schema" @getInstance="(e)=>baseForm = e"></fvForm>
|
||||||
<el-form :model="formData" label-width="auto">
|
<el-form :model="formData" label-width="auto">
|
||||||
@@ -47,7 +47,7 @@ const route = useRoute()
|
|||||||
const attachment = ref()
|
const attachment = ref()
|
||||||
const userPicker = ref()
|
const userPicker = ref()
|
||||||
const name = ref(router.currentRoute.value.name)
|
const name = ref(router.currentRoute.value.name)
|
||||||
const loading = ref(false)
|
const loading = ref(true)
|
||||||
const formData = ref({})
|
const formData = ref({})
|
||||||
const file = ref({})
|
const file = ref({})
|
||||||
const deploymentId = ref()
|
const deploymentId = ref()
|
||||||
@@ -269,6 +269,7 @@ const getDetailInfo = async () => {
|
|||||||
type: res.code === 1000 ? 'success' : 'error'
|
type: res.code === 1000 ? 'success' : 'error'
|
||||||
})
|
})
|
||||||
if (res.code === 1000) {
|
if (res.code === 1000) {
|
||||||
|
userList.value=res.data.userInfoList
|
||||||
formData.value = res.data
|
formData.value = res.data
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,35 +37,23 @@ const schema = computed(() => {
|
|||||||
const baseForm = ref()
|
const baseForm = ref()
|
||||||
const searchConfig = reactive([
|
const searchConfig = reactive([
|
||||||
{
|
{
|
||||||
label: '关键词',
|
label: '项目人员',
|
||||||
prop: 'requirementName',
|
prop: 'researchPersonnel',
|
||||||
component: 'el-input',
|
component: 'el-input',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请输入关键词查询',
|
placeholder: '请输入项目人员查询'
|
||||||
clearable: true,
|
|
||||||
filterable: true,
|
|
||||||
checkStrictly: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '项目人员',
|
|
||||||
prop: 'projectCost',
|
|
||||||
component: shallowRef(fvSelect),
|
|
||||||
props: {
|
|
||||||
placeholder: '请选择项目人员查询',
|
|
||||||
clearable: true,
|
|
||||||
filterable: true,
|
|
||||||
checkStrictly: true,
|
|
||||||
cacheKey: ''
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '时间',
|
label: '时间',
|
||||||
prop: 'datetime',
|
prop: 'time',
|
||||||
component: 'el-date-picker',
|
component: 'el-date-picker',
|
||||||
props: {
|
props: {
|
||||||
placeholder: '请选择时间',
|
type:'month',
|
||||||
|
placeholder: '请选择月份',
|
||||||
clearable: true,
|
clearable: true,
|
||||||
|
format: 'YYYY-MM',
|
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
@@ -87,10 +75,7 @@ const tableConfig = reactive({
|
|||||||
{
|
{
|
||||||
prop: 'researchPersonnel',
|
prop: 'researchPersonnel',
|
||||||
label: '研发人员',
|
label: '研发人员',
|
||||||
align: 'center',
|
align: 'center'
|
||||||
currentRender:({row})=>{
|
|
||||||
return <span>{getResearchName(row.researchPersonnel)}</span>
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'wagesPayable',
|
prop: 'wagesPayable',
|
||||||
@@ -138,21 +123,25 @@ const tableConfig = reactive({
|
|||||||
projectId: route.query.id
|
projectId: route.query.id
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const researchOptions = ref([])
|
const search = (val) => {
|
||||||
const getResearchOptions = async () => {
|
tableConfig.params = {...val, projectId: route.query.id}
|
||||||
const res = await getResearchUser()
|
tableIns.value.refresh()
|
||||||
researchOptions.value = res.data
|
|
||||||
}
|
|
||||||
const getResearchName=(id)=>{
|
|
||||||
if(!id)return;
|
|
||||||
let label=''
|
|
||||||
researchOptions.value.forEach(item=>{
|
|
||||||
if(item.value==id){
|
|
||||||
label=item.label
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return label
|
|
||||||
}
|
}
|
||||||
|
// const researchOptions = ref([])
|
||||||
|
// const getResearchOptions = async () => {
|
||||||
|
// const res = await getResearchUser()
|
||||||
|
// researchOptions.value = res.data
|
||||||
|
// }
|
||||||
|
// const getResearchName=(id)=>{
|
||||||
|
// if(!id)return;
|
||||||
|
// let label=''
|
||||||
|
// researchOptions.value.forEach(item=>{
|
||||||
|
// if(item.value==id){
|
||||||
|
// label=item.label
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// return label
|
||||||
|
// }
|
||||||
const getBaseInfo = async () => {
|
const getBaseInfo = async () => {
|
||||||
try {
|
try {
|
||||||
const {code, data} = await getBaseInfoApi(route.query.id)
|
const {code, data} = await getBaseInfoApi(route.query.id)
|
||||||
@@ -161,7 +150,7 @@ const getBaseInfo = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getResearchOptions()
|
// getResearchOptions()
|
||||||
getBaseInfo()
|
getBaseInfo()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -168,7 +168,13 @@ const getFile = (val) => {
|
|||||||
const handleSubmit = async (instance) => {
|
const handleSubmit = async (instance) => {
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) {
|
||||||
|
return ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请完善数据,再提交!',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
let params = {
|
let params = {
|
||||||
fileList: fileList.value,
|
fileList: fileList.value,
|
||||||
projectId: route.query.id,
|
projectId: route.query.id,
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
<el-form-item prop="time" :rules="scope.row.time?'1':rules.time">
|
<el-form-item prop="time" :rules="scope.row.time?'1':rules.time">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="scope.row.time"
|
v-model="scope.row.time"
|
||||||
type="date"
|
type="month"
|
||||||
format="YYYY-MM-DD"
|
format="YYYY-MM"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM"
|
||||||
placeholder="选择时间"
|
placeholder="选择时间"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<el-table-column prop="afterTax" label="税后余额(元)" width="220">
|
<el-table-column prop="afterTax" label="税后余额(元)" width="220">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-form-item prop="afterTax" :rules="scope.row.afterTax?'1':rules.afterTax">
|
<el-form-item prop="afterTax" :rules="scope.row.afterTax?'1':rules.afterTax">
|
||||||
<el-input-number v-model="scope.row.afterTax" placeholder="请输入税后余额" :controls="false">
|
<el-input-number v-model="scope.row.afterTax" placeholder="请输入税后余额" :controls="false">
|
||||||
</el-input-number>
|
</el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -158,7 +158,13 @@ const handleDelete = (index) => {
|
|||||||
const handleSubmit = (instance) => {
|
const handleSubmit = (instance) => {
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) {
|
||||||
|
return ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请完善数据,再提交!',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
instance.clearValidate()
|
instance.clearValidate()
|
||||||
tableForm.tableData.forEach(item=>{
|
tableForm.tableData.forEach(item=>{
|
||||||
item.projectName=projectName.value
|
item.projectName=projectName.value
|
||||||
|
|||||||
@@ -137,7 +137,13 @@ const getFileParam = (item) => {
|
|||||||
const handleSubmit = (instance) => {
|
const handleSubmit = (instance) => {
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) {
|
||||||
|
return ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请完善数据,再提交!',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
let files = []
|
let files = []
|
||||||
otherFileList.value.forEach(item => {
|
otherFileList.value.forEach(item => {
|
||||||
files.push(getFileParam(item))
|
files.push(getFileParam(item))
|
||||||
|
|||||||
@@ -187,7 +187,13 @@ const submitParam = (item) => {
|
|||||||
const handleSubmit = async (instance) => {
|
const handleSubmit = async (instance) => {
|
||||||
if (!instance) return
|
if (!instance) return
|
||||||
instance.validate(async (valid) => {
|
instance.validate(async (valid) => {
|
||||||
if (!valid) return
|
if (!valid) {
|
||||||
|
return ElNotification({
|
||||||
|
title: '提示',
|
||||||
|
message: '请完善数据,再提交!',
|
||||||
|
type: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
const {msg, code} = await addFund(submitParam(formData.value))
|
const {msg, code} = await addFund(submitParam(formData.value))
|
||||||
ElNotification({
|
ElNotification({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
|
|||||||
Reference in New Issue
Block a user