Compare commits

..

No commits in common. 'a3531d18e439ad9f57d6584bd8bc32c1cfe45039' and '84ef2953061ec179752fb843521ad861b251d32c' have entirely different histories.

@ -156,7 +156,7 @@ import {
getInvoicePage02, getInvoicePage02,
getInvoicePage03, getInvoicePage03,
getInvoicePage04, getInvoicePage04,
getInvoicePage05 getInvoicePage05,
} from '@/api/bs/invoice' } from '@/api/bs/invoice'
export default { export default {
props: { props: {
@ -167,11 +167,11 @@ export default {
tripPartners: Array, // tripPartners: Array, //
list: Array, // list: Array, //
type: [Number, String], type: [Number, String],
disabled: Boolean disabled: Boolean,
}, },
components: { components: {
RePick: () => import('@/components/ReComponents/RePick'), RePick: () => import('@/components/ReComponents/RePick'),
RMList: () => import('@/components/ReComponents/RMList') RMList: () => import('@/components/ReComponents/RMList'),
}, },
// //
computed: { computed: {
@ -190,11 +190,10 @@ export default {
}, },
userList() { userList() {
return this.$store.getters.userList return this.$store.getters.userList
} },
}, },
data() { data() {
return { return {
amount: null,
tableList: [], tableList: [],
demo: false, demo: false,
isShow: false, isShow: false,
@ -206,8 +205,8 @@ export default {
listQuery: { listQuery: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
temClaimNo: 0 temClaimNo: 0,
} },
} }
}, },
created() { created() {
@ -228,7 +227,7 @@ export default {
} }
}, },
deep: true, deep: true,
immediate: true immediate: true,
}, },
// list: { // list: {
// handler(val) { // handler(val) {
@ -251,8 +250,8 @@ export default {
this.getList('init') this.getList('init')
}, },
deep: true, deep: true,
immediate: true immediate: true,
} },
}, },
methods: { methods: {
handleSetCheck(index, item, type) { handleSetCheck(index, item, type) {
@ -273,13 +272,6 @@ export default {
!this.tableList[index].checked !this.tableList[index].checked
) )
} }
//
this.amount = this.tableList
.filter((e) => e.checked)
.reduce((prev, next) => {
return prev + Number(next.amountInFiguers)
}, 0)
.toFixed(2)
console.log(this.tableList[index].checked) console.log(this.tableList[index].checked)
if (this.tableList[index].checked) { if (this.tableList[index].checked) {
if (!_this.invoiceIdsCopy.hasOwnProperty(_this.invoiceType)) { if (!_this.invoiceIdsCopy.hasOwnProperty(_this.invoiceType)) {
@ -294,7 +286,6 @@ export default {
_this.tableList[index].id _this.tableList[index].id
) )
} }
// _this.invoiceIdsCopy[_this.invoiceType].push(this.tableList[index].id) // _this.invoiceIdsCopy[_this.invoiceType].push(this.tableList[index].id)
} else { } else {
_this.invoiceIdsCopy[_this.invoiceType].forEach(function ( _this.invoiceIdsCopy[_this.invoiceType].forEach(function (
@ -320,10 +311,7 @@ export default {
handleConfirm() { handleConfirm() {
// let arr = (this.tableList.filter(item => item.checked)).map(item => item.id) || [] // let arr = (this.tableList.filter(item => item.checked)).map(item => item.id) || []
this.$emit('onConfirm', { this.$emit('onConfirm', this.invoiceIdsCopy)
invoiceIdsCopy: this.invoiceIdsCopy,
amount: this.amount
})
console.log(this.invoiceIdsCopy, 'this.invoiceIdsCopy') console.log(this.invoiceIdsCopy, 'this.invoiceIdsCopy')
}, },
@ -397,8 +385,8 @@ export default {
this.$loading(false, 'tableLoading') this.$loading(false, 'tableLoading')
}) })
}) })
} },
} },
} }
</script> </script>

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

Loading…
Cancel
Save