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