Compare commits

..

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

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

@ -311,6 +311,7 @@
label="出差类型"
:name="`tripType_${index}`"
:list="tripTypeList"
isRequrie
isCell
clearable
/>
@ -370,31 +371,30 @@
:key="nIndex"
>
<div class="box-tp" style="margin-bottom: 1rem">
<div class="tp-lf">
<div
class="tp-lf"
>
费用 &nbsp;{{ 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
style="color: #1989fa; padding: 5px"
@click="addInvoice"
/>
</span
>
<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,6 +482,25 @@
"
/>
</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"
@ -491,8 +510,8 @@
@onCancel="nitem.show = false"
:isOpen="nitem.show"
@onConfirm="
({ invoiceIdsCopy, amount }) => {
handleConfirmIe(invoiceIdsCopy, index, nIndex, amount)
(arr) => {
handleConfirmIe(arr, index, nIndex)
}
"
/>
@ -520,8 +539,8 @@
{
required: true,
message: '请输入',
validator: VerifyFunc.validatorMoney
}
validator: VerifyFunc.validatorMoney,
},
]"
v-model="item.amount"
type="number"
@ -612,8 +631,8 @@
required: true,
trigger: 'onBlur',
message: '格式错误',
validator: VerifyFunc.validatorMoney
}
validator: VerifyFunc.validatorMoney,
},
]"
type="number"
label="金额"
@ -708,8 +727,8 @@
@onCancel="nitem.show = false"
:isOpen="nitem.show"
@onConfirm="
({ invoiceIdsCopy, amount }) => {
handleConfirmIe1(invoiceIdsCopy, nIndex, amount)
(arr) => {
handleConfirmIe1(arr, nIndex)
}
"
/>
@ -817,7 +836,7 @@ import {
createExpenseClaim,
findClaimRules,
getExpenseClaim,
getMyExpenseClaim
getMyExpenseClaim,
} from '@/api/bs/expenseClaim'
import { getInvoicePage } from '@/api/bs/invoice'
import { listData } from '@/api/system/dict/data'
@ -838,7 +857,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() {
@ -869,7 +888,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: [], //
@ -918,10 +937,10 @@ export default {
feeType: null,
amount: undefined,
invoiceCount: undefined,
remark: null
}
]
}
remark: null,
},
],
},
],
//
expenseClaimDetails: [
@ -933,11 +952,11 @@ export default {
feeType: null,
amount: undefined,
invoiceCount: undefined,
remark: null
}
]
remark: null,
},
],
},
times: null
times: null,
}
},
//
@ -975,7 +994,7 @@ export default {
},
RCBX() {
return ['RCBX'].includes(this.$route.query.billType)
}
},
},
// data
watch: {},
@ -986,10 +1005,10 @@ export default {
this.$router.push({
path: '/myInvoice',
query: {
isAdd: 'isAdd'
isAdd:'isAdd'
}
})
},
},
getTree() {
getAreaTree().then((res) => {
let tree = res.data || []
@ -1031,7 +1050,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('-'),
@ -1043,7 +1062,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
})
@ -1093,7 +1112,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
@ -1127,7 +1146,7 @@ export default {
if (!response.data) {
Dialog.confirm({
title: '提示',
message: `${response.msg} 您确认要提交吗?`
message: `${response.msg} 您确认要提交吗?`,
}).then(() => {
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('')
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',
@ -1303,7 +1317,7 @@ export default {
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('')
this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceIds', arr)
this.$set(this.form.expenseClaimDetails[nIndex], 'show', false)
@ -1317,7 +1331,6 @@ export default {
'invoiceName',
this.totalCount(arr) == 0 ? '请关联' : '已关联发票'
)
this.$set(this.form.expenseClaimDetails[nIndex], 'amount', amount)
},
totalCount(obj) {
@ -1348,7 +1361,7 @@ export default {
feeType: null,
amount: undefined,
invoiceCount: undefined,
remark: null
remark: null,
})
},
@ -1358,7 +1371,7 @@ export default {
feeType: null,
amount: undefined,
invoiceCount: undefined,
remark: null
remark: null,
})
},
handleInitForm() {
@ -1390,10 +1403,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) => {
@ -1501,16 +1514,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({
@ -1525,7 +1538,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 {
@ -1545,7 +1558,7 @@ export default {
(
findAreaIdName(this.areaTree, item.destinationLocation) ||
{}
).name
).name,
]
}),
time:
@ -1558,7 +1571,7 @@ export default {
item.expenseApplyTrips.length - 1
].endTime
).format('YYYY/MM/DD')}`
: '-'
: '-',
}
})
list.forEach((element) => {
@ -1581,7 +1594,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,
}
})
@ -1597,7 +1610,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 || []
@ -1605,7 +1618,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 || []
@ -1627,7 +1640,7 @@ export default {
if (startTime && endTime) {
this.defaultDate = [
dayjs(startTime).toDate(),
dayjs(endTime).toDate()
dayjs(endTime).toDate(),
]
}
})
@ -1676,10 +1689,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>
Loading…
Cancel
Save