|
|
|
@ -311,7 +311,6 @@
|
|
|
|
|
label="出差类型"
|
|
|
|
|
:name="`tripType_${index}`"
|
|
|
|
|
:list="tripTypeList"
|
|
|
|
|
isRequrie
|
|
|
|
|
isCell
|
|
|
|
|
clearable
|
|
|
|
|
/>
|
|
|
|
@ -371,30 +370,31 @@
|
|
|
|
|
:key="nIndex"
|
|
|
|
|
>
|
|
|
|
|
<div class="box-tp" style="margin-bottom: 1rem">
|
|
|
|
|
<div
|
|
|
|
|
class="tp-lf"
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
<div class="tp-lf">
|
|
|
|
|
费用 {{ nIndex + 1 }}
|
|
|
|
|
<span class="rules" style="color: #1989fa" @click.stop="showRules(nitem, index, nIndex)" >
|
|
|
|
|
<span
|
|
|
|
|
class="rules"
|
|
|
|
|
style="color: #1989fa"
|
|
|
|
|
@click.stop="showRules(nitem, index, nIndex)"
|
|
|
|
|
>
|
|
|
|
|
<van-icon
|
|
|
|
|
|
|
|
|
|
size="18"
|
|
|
|
|
name="coupon-o"
|
|
|
|
|
color="#1989fa"
|
|
|
|
|
/>报销规则
|
|
|
|
|
|
|
|
|
|
</span
|
|
|
|
|
/>报销规则
|
|
|
|
|
</span>
|
|
|
|
|
<span
|
|
|
|
|
style="color: #1989fa; padding: 5px"
|
|
|
|
|
@click="addInvoice"
|
|
|
|
|
>
|
|
|
|
|
<span style="color: #1989fa; padding:5px" @click="addInvoice">
|
|
|
|
|
<van-icon
|
|
|
|
|
size="18"
|
|
|
|
|
name="plus"
|
|
|
|
|
color="#1989fa"
|
|
|
|
|
/>新增发票
|
|
|
|
|
/>新增发票
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
class="tp-rt"
|
|
|
|
|
v-if="!(item.expenseClaimDetails.length == 1)"
|
|
|
|
@ -427,8 +427,8 @@
|
|
|
|
|
required: true,
|
|
|
|
|
trigger: 'onBlur',
|
|
|
|
|
message: '格式错误',
|
|
|
|
|
validator: VerifyFunc.validatorMoney,
|
|
|
|
|
},
|
|
|
|
|
validator: VerifyFunc.validatorMoney
|
|
|
|
|
}
|
|
|
|
|
]"
|
|
|
|
|
type="number"
|
|
|
|
|
label="金额"
|
|
|
|
@ -482,25 +482,6 @@
|
|
|
|
|
"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div @click="handleShowIe('1', index, nIndex)">
|
|
|
|
|
<van-field
|
|
|
|
|
disabled
|
|
|
|
|
:class="
|
|
|
|
|
nitem.invoiceName
|
|
|
|
|
? 'actived-disabled tag-blue'
|
|
|
|
|
: 'tag-blue'
|
|
|
|
|
"
|
|
|
|
|
v-model="nitem.invoiceName"
|
|
|
|
|
name="reason"
|
|
|
|
|
autosize
|
|
|
|
|
rows="2"
|
|
|
|
|
label="关联发票"
|
|
|
|
|
clear-trigger="always"
|
|
|
|
|
input-align="right"
|
|
|
|
|
placeholder="请关联"
|
|
|
|
|
/>
|
|
|
|
|
</div> -->
|
|
|
|
|
<!--关联发票 -->
|
|
|
|
|
<!--关联发票 -->
|
|
|
|
|
<ConnectInvoice
|
|
|
|
|
:disabled="disabled"
|
|
|
|
@ -510,8 +491,8 @@
|
|
|
|
|
@onCancel="nitem.show = false"
|
|
|
|
|
:isOpen="nitem.show"
|
|
|
|
|
@onConfirm="
|
|
|
|
|
(arr) => {
|
|
|
|
|
handleConfirmIe(arr, index, nIndex)
|
|
|
|
|
({ invoiceIdsCopy, amount }) => {
|
|
|
|
|
handleConfirmIe(invoiceIdsCopy, index, nIndex, amount)
|
|
|
|
|
}
|
|
|
|
|
"
|
|
|
|
|
/>
|
|
|
|
@ -539,8 +520,8 @@
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入',
|
|
|
|
|
validator: VerifyFunc.validatorMoney,
|
|
|
|
|
},
|
|
|
|
|
validator: VerifyFunc.validatorMoney
|
|
|
|
|
}
|
|
|
|
|
]"
|
|
|
|
|
v-model="item.amount"
|
|
|
|
|
type="number"
|
|
|
|
@ -631,8 +612,8 @@
|
|
|
|
|
required: true,
|
|
|
|
|
trigger: 'onBlur',
|
|
|
|
|
message: '格式错误',
|
|
|
|
|
validator: VerifyFunc.validatorMoney,
|
|
|
|
|
},
|
|
|
|
|
validator: VerifyFunc.validatorMoney
|
|
|
|
|
}
|
|
|
|
|
]"
|
|
|
|
|
type="number"
|
|
|
|
|
label="金额"
|
|
|
|
@ -727,8 +708,8 @@
|
|
|
|
|
@onCancel="nitem.show = false"
|
|
|
|
|
:isOpen="nitem.show"
|
|
|
|
|
@onConfirm="
|
|
|
|
|
(arr) => {
|
|
|
|
|
handleConfirmIe1(arr, nIndex)
|
|
|
|
|
({ invoiceIdsCopy, amount }) => {
|
|
|
|
|
handleConfirmIe1(invoiceIdsCopy, nIndex, amount)
|
|
|
|
|
}
|
|
|
|
|
"
|
|
|
|
|
/>
|
|
|
|
@ -836,7 +817,7 @@ import {
|
|
|
|
|
createExpenseClaim,
|
|
|
|
|
findClaimRules,
|
|
|
|
|
getExpenseClaim,
|
|
|
|
|
getMyExpenseClaim,
|
|
|
|
|
getMyExpenseClaim
|
|
|
|
|
} from '@/api/bs/expenseClaim'
|
|
|
|
|
import { getInvoicePage } from '@/api/bs/invoice'
|
|
|
|
|
import { listData } from '@/api/system/dict/data'
|
|
|
|
@ -857,7 +838,7 @@ export default {
|
|
|
|
|
FollowPeoPle: () => import('@/components/FollowPeoPle'),
|
|
|
|
|
ConnectInvoice: () => import('@/components/ConnectInvoice'),
|
|
|
|
|
UploadFile: () => import('@/components/UploadFile'),
|
|
|
|
|
Rules: () => import('./components/Rules'),
|
|
|
|
|
Rules: () => import('./components/Rules')
|
|
|
|
|
},
|
|
|
|
|
// 生命周期,创建完成时(可以访问当前this实例)
|
|
|
|
|
created() {
|
|
|
|
@ -888,7 +869,7 @@ export default {
|
|
|
|
|
{ title: '暂存', icon: 'star-o', color: '#909399', key: 0 },
|
|
|
|
|
{ title: '提交', icon: 'edit', color: '#ff9900', key: 1 },
|
|
|
|
|
{ title: '同意', icon: 'certificate', color: '#19be6b', key: 2 },
|
|
|
|
|
{ title: '驳回', icon: 'exchange', color: '#fa3534', key: 3 },
|
|
|
|
|
{ title: '驳回', icon: 'exchange', color: '#fa3534', key: 3 }
|
|
|
|
|
],
|
|
|
|
|
tripTypeList: [], // 出差类型
|
|
|
|
|
feeTypeList: [], // 费用类型
|
|
|
|
@ -937,10 +918,10 @@ export default {
|
|
|
|
|
feeType: null,
|
|
|
|
|
amount: undefined,
|
|
|
|
|
invoiceCount: undefined,
|
|
|
|
|
remark: null,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
remark: null
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
// 日常申请的
|
|
|
|
|
expenseClaimDetails: [
|
|
|
|
@ -952,11 +933,11 @@ export default {
|
|
|
|
|
feeType: null,
|
|
|
|
|
amount: undefined,
|
|
|
|
|
invoiceCount: undefined,
|
|
|
|
|
remark: null,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
remark: null
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
times: null,
|
|
|
|
|
times: null
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 计算属性
|
|
|
|
@ -994,7 +975,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
RCBX() {
|
|
|
|
|
return ['RCBX'].includes(this.$route.query.billType)
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 监听data中的数据变化
|
|
|
|
|
watch: {},
|
|
|
|
@ -1005,10 +986,10 @@ export default {
|
|
|
|
|
this.$router.push({
|
|
|
|
|
path: '/myInvoice',
|
|
|
|
|
query: {
|
|
|
|
|
isAdd:'isAdd'
|
|
|
|
|
isAdd: 'isAdd'
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
getTree() {
|
|
|
|
|
getAreaTree().then((res) => {
|
|
|
|
|
let tree = res.data || []
|
|
|
|
@ -1050,7 +1031,7 @@ export default {
|
|
|
|
|
? destinationLocation[destinationLocation.length - 1]
|
|
|
|
|
: destinationLocation,
|
|
|
|
|
feeType,
|
|
|
|
|
costDeptId: this.form.costDeptId,
|
|
|
|
|
costDeptId: this.form.costDeptId
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
this.dialogObj = {
|
|
|
|
|
dept: getTreeIds(this.userDeptTree, this.form.costDeptId).join('-'),
|
|
|
|
@ -1062,7 +1043,7 @@ export default {
|
|
|
|
|
).join('-'),
|
|
|
|
|
feetypeName: this.feeTypeList.find((item) => item.value == feeType)
|
|
|
|
|
.label,
|
|
|
|
|
maxMoney: res.data === 0 || res.data ? res.data : '未设置',
|
|
|
|
|
maxMoney: res.data === 0 || res.data ? res.data : '未设置'
|
|
|
|
|
}
|
|
|
|
|
this.isShow = true
|
|
|
|
|
})
|
|
|
|
@ -1112,7 +1093,7 @@ export default {
|
|
|
|
|
files: this.fileList,
|
|
|
|
|
billType: this.$route.query.billType,
|
|
|
|
|
ignoreFeeTip,
|
|
|
|
|
status: key,
|
|
|
|
|
status: key
|
|
|
|
|
}
|
|
|
|
|
if (this.$route.query.billType === 'RCBX') {
|
|
|
|
|
delete newForm.expenseClaimTrips
|
|
|
|
@ -1146,7 +1127,7 @@ export default {
|
|
|
|
|
if (!response.data) {
|
|
|
|
|
Dialog.confirm({
|
|
|
|
|
title: '提示',
|
|
|
|
|
message: `${response.msg} 您确认要提交吗?`,
|
|
|
|
|
message: `${response.msg} 您确认要提交吗?`
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.handleBtConfirm(key, 1)
|
|
|
|
|
})
|
|
|
|
@ -1294,13 +1275,18 @@ export default {
|
|
|
|
|
//
|
|
|
|
|
// })
|
|
|
|
|
},
|
|
|
|
|
handleConfirmIe(arr, index, nIndex) {
|
|
|
|
|
handleConfirmIe(arr, index, nIndex, amount) {
|
|
|
|
|
// let nameArr = ((this.ieList.filter(item => arr.includes(item.id)) || []).map(item => item.invoiceCode)).join('、')
|
|
|
|
|
this.$set(
|
|
|
|
|
this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex],
|
|
|
|
|
'invoiceIds',
|
|
|
|
|
arr
|
|
|
|
|
)
|
|
|
|
|
this.$set(
|
|
|
|
|
this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex],
|
|
|
|
|
'amount',
|
|
|
|
|
amount
|
|
|
|
|
)
|
|
|
|
|
this.$set(
|
|
|
|
|
this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex],
|
|
|
|
|
'show',
|
|
|
|
@ -1317,7 +1303,7 @@ export default {
|
|
|
|
|
this.totalCount(arr) == 0 ? '请关联' : '已关联发票'
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
handleConfirmIe1(arr, nIndex) {
|
|
|
|
|
handleConfirmIe1(arr, nIndex, amount) {
|
|
|
|
|
// let nameArr = ((this.ieList.filter(item => arr.includes(item.id)) || []).map(item => item.invoiceCode)).join('、')
|
|
|
|
|
this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceIds', arr)
|
|
|
|
|
this.$set(this.form.expenseClaimDetails[nIndex], 'show', false)
|
|
|
|
@ -1331,6 +1317,7 @@ export default {
|
|
|
|
|
'invoiceName',
|
|
|
|
|
this.totalCount(arr) == 0 ? '请关联' : '已关联发票'
|
|
|
|
|
)
|
|
|
|
|
this.$set(this.form.expenseClaimDetails[nIndex], 'amount', amount)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
totalCount(obj) {
|
|
|
|
@ -1361,7 +1348,7 @@ export default {
|
|
|
|
|
feeType: null,
|
|
|
|
|
amount: undefined,
|
|
|
|
|
invoiceCount: undefined,
|
|
|
|
|
remark: null,
|
|
|
|
|
remark: null
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -1371,7 +1358,7 @@ export default {
|
|
|
|
|
feeType: null,
|
|
|
|
|
amount: undefined,
|
|
|
|
|
invoiceCount: undefined,
|
|
|
|
|
remark: null,
|
|
|
|
|
remark: null
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleInitForm() {
|
|
|
|
@ -1403,10 +1390,10 @@ export default {
|
|
|
|
|
).format('YY/MM/DD')}`,
|
|
|
|
|
tripPartnersName: nameArr.join('、'),
|
|
|
|
|
departureLocation: Number(item.departureLocation),
|
|
|
|
|
destinationLocation: Number(item.destinationLocation),
|
|
|
|
|
destinationLocation: Number(item.destinationLocation)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
if (Array.isArray(this.form.expenseClaimTrips)) {
|
|
|
|
|
this.form.expenseClaimTrips.forEach((n) => {
|
|
|
|
@ -1514,16 +1501,16 @@ export default {
|
|
|
|
|
feeType: null,
|
|
|
|
|
amount: undefined,
|
|
|
|
|
invoiceCount: undefined,
|
|
|
|
|
remark: null,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
remark: null
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleGetInvoiceList(ids = []) {
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
getInvoicePage({
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
pageSize: this.$store.getters.requestPageSize,
|
|
|
|
|
pageSize: this.$store.getters.requestPageSize
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
this.ieList = (res.data && res.data.list) || []
|
|
|
|
|
getExpenseApplyMyPage({
|
|
|
|
@ -1538,7 +1525,7 @@ export default {
|
|
|
|
|
ids: ids.length ? ids.join(',') : null,
|
|
|
|
|
sortingFieldStr: encodeURIComponent(
|
|
|
|
|
JSON.stringify([{ field: 'id', order: 'desc' }])
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
let list = (res.data.list || []).map((item) => {
|
|
|
|
|
return {
|
|
|
|
@ -1558,7 +1545,7 @@ export default {
|
|
|
|
|
(
|
|
|
|
|
findAreaIdName(this.areaTree, item.destinationLocation) ||
|
|
|
|
|
{}
|
|
|
|
|
).name,
|
|
|
|
|
).name
|
|
|
|
|
]
|
|
|
|
|
}),
|
|
|
|
|
time:
|
|
|
|
@ -1571,7 +1558,7 @@ export default {
|
|
|
|
|
item.expenseApplyTrips.length - 1
|
|
|
|
|
].endTime
|
|
|
|
|
).format('YYYY/MM/DD')}`
|
|
|
|
|
: '-',
|
|
|
|
|
: '-'
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
list.forEach((element) => {
|
|
|
|
@ -1594,7 +1581,7 @@ export default {
|
|
|
|
|
title: `序号:${index + 1} 编号:${item.applyNo}申请人:${
|
|
|
|
|
item.nickname
|
|
|
|
|
}行程路线:${item.rode}出差天数:${item.tripDay || 0}天`,
|
|
|
|
|
disabled: item.status != 2 ? true : false,
|
|
|
|
|
disabled: item.status != 2 ? true : false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -1610,7 +1597,7 @@ export default {
|
|
|
|
|
listData({
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
pageSize: this.$store.getters.requestPageSize,
|
|
|
|
|
dictType: 'bs_trip_type',
|
|
|
|
|
dictType: 'bs_trip_type'
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
// 出差类型
|
|
|
|
|
this.tripTypeList = res.data.list || []
|
|
|
|
@ -1618,7 +1605,7 @@ export default {
|
|
|
|
|
listData({
|
|
|
|
|
pageNo: 1,
|
|
|
|
|
pageSize: this.$store.getters.requestPageSize,
|
|
|
|
|
dictType: 'bs_fee_type',
|
|
|
|
|
dictType: 'bs_fee_type'
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
// 出差类型
|
|
|
|
|
this.feeTypeList = res.data.list || []
|
|
|
|
@ -1640,7 +1627,7 @@ export default {
|
|
|
|
|
if (startTime && endTime) {
|
|
|
|
|
this.defaultDate = [
|
|
|
|
|
dayjs(startTime).toDate(),
|
|
|
|
|
dayjs(endTime).toDate(),
|
|
|
|
|
dayjs(endTime).toDate()
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -1689,10 +1676,10 @@ export default {
|
|
|
|
|
Number(dayjs(list[1]).diff(dayjs(list[0]), 'day')) + 1
|
|
|
|
|
this.$set(this.form.expenseClaimTrips[this.index], 'tripDay', day)
|
|
|
|
|
this.dateShow = false
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
@import '~@/assets/style/common/form.scss';
|
|
|
|
|
</style>
|
|
|
|
|
</style>
|
|
|
|
|