我的申请 资金来源

haicang
jwg 3 months ago
parent ad785d3e8c
commit 29ef38f7e3

@ -78,6 +78,15 @@
input-align="right"
placeholder="请输入"
/>
<van-field
v-model="fundingSourceLabel"
:disabled="disabled"
label="项目资金来源"
clear-trigger="always"
input-align="right"
placeholder="请输入"
@click="showPicker = true"
/>
<van-field
v-model="form.amount"
v-if="!CLSQ"
@ -91,8 +100,8 @@
required: false,
message: '预计费用格式错误',
validator: VerifyFunc.validatorMoney,
type: 1,
},
type: 1
}
]"
label="预计费用"
clear-trigger="always"
@ -271,8 +280,8 @@
{
required: false,
message: '预计费用格式错误',
validator: VerifyFunc.validatorMoney,
},
validator: VerifyFunc.validatorMoney
}
]"
v-model="item.amount"
:name="`amount`"
@ -348,6 +357,15 @@
color="#0088FE"
@confirm="handleDateSelect"
/>
<van-popup v-model="showPicker" position="bottom">
<van-picker
show-toolbar
title="选择资金来源"
:columns="fundingSourceList"
@confirm="selectFundingSource"
@cancel="showPicker = false"
/>
</van-popup>
</div>
</template>
@ -356,7 +374,7 @@ import dayjs from 'dayjs'
import {
createExpenseApply,
getExpenseApply,
getMyExpenseApply,
getMyExpenseApply
} from '@/api/bs/expenseApply'
import { listData } from '@/api/system/dict/data'
import VerifyFunc from '@/utils/verify'
@ -371,10 +389,19 @@ export default {
FollowPeoPle: () => import('@/components/FollowPeoPle'),
UploadFile: () => import('@/components/UploadFile'),
ApprovalProcess: () => import('@/components/ApprovalProcess'),
BottomBtn: () => import('@/components/BottomBtn'),
BottomBtn: () => import('@/components/BottomBtn')
},
//
computed: {
fundingSourceList() {
const list = this.getDictDatas('funding_source')?.map((e) => {
return {
text: e.label,
value: e.value
}
})
return list || []
},
allTripPartners() {
let arr = []
this.form.expenseApplyTrips.forEach((v) => {
@ -404,7 +431,7 @@ export default {
},
CLSQ() {
return ['CLSQ'].includes(this.$route.query.billType)
},
}
},
// 访this
created() {
@ -418,6 +445,7 @@ export default {
},
data() {
return {
showPicker: false,
//
areaTree: [],
VerifyFunc,
@ -432,7 +460,9 @@ export default {
maxDate: new Date('2030/01/01'),
defaultDate: new Date(),
dateShow: false,
fundingSourceLabel: '',
form: {
fundingSource: null,
companyName: window.localStorage.getItem('cn'), //
nickname: JSON.parse(
window.localStorage.getItem('userInfo') || { dept: {} }
@ -465,10 +495,10 @@ export default {
tripPartnersName: '',
amount: undefined,
type: 0,
isOpen: false,
},
],
},
isOpen: false
}
]
}
}
},
@ -476,6 +506,11 @@ export default {
watch: {},
//
methods: {
selectFundingSource(val) {
this.form.fundingSource = val.value
this.fundingSourceLabel = val.text
this.showPicker = false
},
//
getTree() {
getAreaTree().then((res) => {
@ -512,10 +547,10 @@ export default {
expenseApplyTrips: (this.form.expenseApplyTrips || []).map(
(item) => {
return {
...item,
...item
}
}
),
)
}
this.$loading(true, 'form')
createExpenseApply(newForm).then((res) => {
@ -574,11 +609,14 @@ export default {
).format('YY/MM/DD')}`,
tripPartnersName: nameArr.join('、'),
departureLocation: Number(item.departureLocation),
destinationLocation: Number(item.destinationLocation),
destinationLocation: Number(item.destinationLocation)
}
}
),
)
}
this.fundingSourceLabel = this.fundingSourceList.find(
(e) => e.value == this.form.fundingSource
).text
this.fileList = res.data.files || []
this.isAuthorised = res.data.isAuthorised
this.$nextTick(() => {
@ -663,7 +701,7 @@ export default {
tripPartnersName: '',
amount: undefined,
isOpen: false,
type: 0,
type: 0
})
},
handleInitList() {
@ -672,7 +710,7 @@ export default {
listData({
pageNo: 1,
pageSize: 50,
dictType: 'bs_trip_type',
dictType: 'bs_trip_type'
}).then((res) => {
this.tripTypeList = res.data.list || []
})
@ -687,7 +725,7 @@ export default {
if (startTime && endTime) {
this.defaultDate = [
dayjs(startTime).toDate(),
dayjs(endTime).toDate(),
dayjs(endTime).toDate()
]
}
})
@ -736,10 +774,10 @@ export default {
Number(dayjs(list[1]).diff(dayjs(list[0]), 'day')) + 1
this.$set(this.form.expenseApplyTrips[this.index], 'tripDay', day)
this.dateShow = false
},
},
}
}
}
</script>
<style scoped lang="scss">
@import '~@/assets/style/common/form.scss';
</style>
</style>

Loading…
Cancel
Save