Browse Source

经费开支app2.0发起

应县
ndbs 1 year ago
parent
commit
8aab436ab2
1 changed files with 82 additions and 17 deletions
  1. +82
    -17
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AssetManagementSystem/FundsApply/single.vue

+ 82
- 17
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AssetManagementSystem/FundsApply/single.vue View File

@@ -16,12 +16,20 @@
<l-input @input="setValue('FundsApply.EnCode', $event)" :value="getValue('FundsApply.EnCode')"
title="申报单号" /> <!-- v-if="!edit" :disabled="!edit" -->
<l-select @input="setValue('FundsApply.ApplyDept', $event)" :value="getValue('FundsApply.ApplyDept')"
:range="dataSource.FundsApply.ApplyDept" title="报部门" disabled />
:range="dataSource.FundsApply.ApplyDept" title="报部门" disabled />
<!-- :disabled="!edit" v-if="!edit" -->
<l-datetime-picker @input="setValue('FundsApply.ApplyTime', $event)"
:value="getValue('FundsApply.ApplyTime')" title="填报时间" disabled /> <!-- required :disabled="!edit" -->
<l-select @input="setValue('FundsApply.ApplyUser', $event)" :value="getValue('FundsApply.ApplyUser')"
:range="dataSource.FundsApply.ApplyUser" title="填报人" disabled /> <!-- v-if="!edit" -->
:range="dataSource.FundsApply.ApplyUser" title="报批人" disabled /> <!-- v-if="!edit" -->
<l-datetime-picker @input="setValue('FundsApply.ApplyTime', $event)"
:value="getValue('FundsApply.ApplyTime')" title="填报时间" disabled /> <!-- required :disabled="!edit" -->
<l-select @input="($event)=>{DeclarationDeptChange($event)}" :value="getValue('FundsApply.DeclarationDept')"
:range="dataSource.FundsApply.DeclarationDept" title="申报部门" :disabled="!edit" />
<!-- :disabled="!edit" v-if="!edit" -->
<l-select @input="setValue('FundsApply.Informant', $event)" :value="getValue('FundsApply.Informant')"
:range="dataSource.FundsApply.Informant" title="申报人" :disabled="!edit"/>
<l-select @input="setValue('FundsApply.DeclarationType', $event)"
:value="getValue('FundsApply.DeclarationType')" :range="dataSource.FundsApply.DeclarationType"
title="申报类型" :disabled="!edit" />
<l-select @input="setValue('FundsApply.IsFixedAssets', $event)"
:value="getValue('FundsApply.IsFixedAssets')" :range="dataSource.FundsApply.IsFixedAssets"
title="是否固定资产" :disabled="!edit" /> <!-- v-if="!edit" -->
@@ -184,6 +192,21 @@
dataSource: '1',
dataSourceId: 'ApplyUser'
},
DeclarationDept: {
type: "select",
dataSource: '1',
dataSourceId: 'DeclarationDept'
},
Informant: {
type: "select",
dataSource: '1',
dataSourceId: 'Informant'
},
DeclarationType: {
type: "select",
title: '申报类别',
dataSourceId: 'DeclarationType',
},
IsFixedAssets: {
type: "select",
title: '是否固定资产',
@@ -226,10 +249,16 @@
FundsApply: {
ApplyDept: [],
ApplyUser: [],
Informant: [],
DeclarationDept: [],
IsFixedAssets: Object.values(this.GET_GLOBAL('dataDictionary').YesOrNoInt).map(t => ({
value: t.value,
text: t.text
})),
DeclarationType: Object.values(this.GET_GLOBAL('dataDictionary').DeclarationType).map(t => ({
value: t.value,
text: t.text
})),
Unit:Object.values(this.GET_GLOBAL('dataDictionary').sldw).map(t => ({
value: t.value,
text: t.text
@@ -245,6 +274,8 @@
type,
id
}) {
// console.log(this.GET_GLOBAL('dataDictionary').sldw,"1")
// console.log(this.GET_GLOBAL('dataDictionary').DeclarationType,"2")
await this.init(type, id)
// console.log(this.dataSource.FundsApply.Unit)
},
@@ -274,8 +305,20 @@
value: t.f_userid
}));
}),
// this.FETCH_DATASOURCE('ConferenceRoom').then(result => {
// this.dataSource.FundsApply.CheckStatus = result.data.map(t => ({ text: t.name, value: t.id }))
this.FETCH_DATASOURCE('classdata').then(result => {
this.dataSource.FundsApply.DeclarationDept = result.data.filter(t=>t.f_deletemark===0).map(t => ({
text: t.name,
value: t.id
}));
}),
this.FETCH_DATASOURCE('teacheruserdata').then(result => {
this.dataSource.FundsApply.Informant = result.data.map(t => ({
text: t.f_realname,
value: t.f_userid
}));
}),
// this.dataSource.FundsApply.DeclarationType = Object.values(this.GET_GLOBAL('dataDictionary').DeclarationType).map(t => ({ value: t.value, text: t.text })),// this.FETCH_DATASOURCE('DeclarationType').then(result => {
// this.dataSource.FundsApply.DeclarationType = result.data.map(t => ({ value: t.value, text: t.text }))
// }),
])
await this.fetchForm()
@@ -315,17 +358,17 @@
this.current = this.COPY(this.origin)
//加载附件值数据
// console.log('附件值赋值前:'+this.getValue('FundsApply.Files'));
if (this.getValue('FundsApply.Path') == ""||this.getValue('FundsApply.Path') == undefined ||this.getValue('FundsApply.Path') == null) {
this.setValue('FundsApply.Path',this.folderId);
// console.log('附件值赋值后:'+this.getValue('FundsApply.Path'));
}else{
this.folderId=this.getValue('FundsApply.Path');
// console.log('文件夹id赋值后:'+this.folderId);
//请求‘获取附件列表’接口
this.fileList =[]
this.fileList = await this.FETCH_FILEList(this.getValue('FundsApply.Path'));
}
// console.log('附件值赋值前:'+this.getValue('FundsApply.Files'));
if (this.getValue('FundsApply.Path') == ""||this.getValue('FundsApply.Path') == undefined ||this.getValue('FundsApply.Path') == null) {
this.setValue('FundsApply.Path',this.folderId);
// console.log('附件值赋值后:'+this.getValue('FundsApply.Path'));
}else{
this.folderId=this.getValue('FundsApply.Path');
// console.log('文件夹id赋值后:'+this.folderId);
//请求‘获取附件列表’接口
this.fileList =[]
this.fileList = await this.FETCH_FILEList(this.getValue('FundsApply.Path'));
}
},

// 点击 「编辑」、「重置」、「保存」、「删除」 按钮
@@ -428,6 +471,28 @@
setValue(path, val) {
set(this.current, path, val)
},
async DeclarationDeptChange($event){
this.setValue('FundsApply.DeclarationDept', $event)
this.setValue('FundsApply.Informant', '')
if (this.getValue('FundsApply.DeclarationDept')) {
this.FETCH_DATASOURCE('teacheruserdata').then(result => {
this.dataSource.FundsApply.Informant = result.data.sort((a,b)=>{return a.f_realname-b.f_realname}).filter(t=>t.f_departmentid===this.getValue('FundsApply.DeclarationDept')).map(t => ({
text: t.f_realname,
value: t.f_userid
}))
})
// this.FETCH_DATASOURCE('Acc_FloorData').then(result => {
// this.dataSource.Acc_GoodsDemage.Floor = result.data.sort((a,b)=>{return a.dno-b.dno}).filter(t=>t.parentid===this.getValue('FundsApply.DeclarationDept')).map(t => ({ text: t.name, value: t.id }))
// })
}else{
this.FETCH_DATASOURCE('teacheruserdata').then(result => {
this.dataSource.FundsApply.Informant = result.data.map(t => ({
text: t.f_realname,
value: t.f_userid
}));
})
}
},
Statusitem(data) {
if (data == '0') {
return '草稿'


Loading…
Cancel
Save