Merge branch 'main-20240105'

main
jwg 7 months ago
commit 9b1f427f1b

@ -14,3 +14,4 @@ VUE_APP_API= '/'
# 方楠 # 方楠
VUE_APP_BASE_API = 'http://expense-h5.lyrfp.com' VUE_APP_BASE_API = 'http://expense-h5.lyrfp.com'
# VUE_APP_BASE_API = 'http://60.204.223.58:8080'

@ -7,7 +7,8 @@ VUE_APP_TITLE = 链友融财务数字一体化信息系统
# 链友融财务数字一体化信息系统/开发环境 # 链友融财务数字一体化信息系统/开发环境
# VUE_APP_BASE_API = 'https://2537287x0n.imdo.co' # VUE_APP_BASE_API = 'https://2537287x0n.imdo.co'
# VUE_APP_BASE_API = 'https://351009q0x9.oicp.vip' # VUE_APP_BASE_API = 'https://351009q0x9.oicp.vip'
VUE_APP_BASE_API = 'https://60.204.223.58:8080' # VUE_APP_BASE_API = 'https://60.204.223.58:8080'
VUE_APP_BASE_API = 'http://60.204.223.58:8080'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -1,15 +1,25 @@
<template> <template>
<van-popup v-model="isShow" position="bottom" round safe-area-inset-bottom lock-scroll lazy-render get-container="#app" :close-on-click-overlay="false" @close="hanleCancel"> <van-popup
v-model="isShow"
position="bottom"
round
safe-area-inset-bottom
lock-scroll
lazy-render
get-container="#app"
:close-on-click-overlay="false"
@close="hanleCancel"
>
<div class="Re-select-header"> <div class="Re-select-header">
<div class="Re-select-header-cancel" @click="hanleCancel"></div> <div class="Re-select-header-cancel" @click="hanleCancel"></div>
<div class="Re-select-header-title">同行人</div> <div class="Re-select-header-title">同行人</div>
<div class="Re-select-header-confirm" @click="handleConfirm"></div> <div class="Re-select-header-confirm" @click="handleConfirm"></div>
</div> </div>
<div class="box-1" v-if="tripPartners.length && type!=1"> <div class="box-1" v-if="tripPartners.length && type != 1">
<div class="new-item-box" v-for="(item,index) in userTable" :key="index"> <div class="new-item-box" v-for="(item, index) in userTable" :key="index">
<div class="new-lf"> <div class="new-lf">
<div>姓名 {{item.nickname}}</div> <div>姓名 {{ item.nickname }}</div>
<div>电话 {{item.mobile}}</div> <div>电话 {{ item.mobile }}</div>
</div> </div>
<div class="new-rt" v-if="!disabled" @click="handleNewDel(index)"> <div class="new-rt" v-if="!disabled" @click="handleNewDel(index)">
<van-icon name="delete-o" size="20" /> <van-icon name="delete-o" size="20" />
@ -17,33 +27,77 @@
</div> </div>
</div> </div>
<div class="box-2" v-else> <div class="box-2" v-else>
<van-form ref="form" :show-error-message="false" validate-trigger="" :submit-on-enter="false"> <van-form
<div class="item-box" v-for="(item,index) in form.tripPartners" :key="index"> ref="form"
:show-error-message="false"
validate-trigger=""
:submit-on-enter="false"
>
<div
class="item-box"
v-for="(item, index) in form.tripPartners"
:key="index"
>
<div class="box-top"> <div class="box-top">
<div class="box-lf">同行人{{index + 1}}</div> <div class="box-lf">同行人{{ index + 1 }}</div>
<div class="box-rt"> <div class="box-rt">
<div class="tp-rt" v-if="!(form.tripPartners.length == 1)" @click="handleDel(index)"> <div
class="tp-rt"
v-if="!(form.tripPartners.length == 1)"
@click="handleDel(index)"
>
<van-icon name="delete-o" size="20" /> <van-icon name="delete-o" size="20" />
</div> </div>
</div> </div>
</div> </div>
<div class="picker-box"> <div class="picker-box">
<RePick v-model="item.dept" label="部门" name="dept" @change="handleDept($event,index)" :list="userDeptTree" isRequrie isCascader isShowSearch title="部门" titleKey="name" isCell clearable /> <RePick
<RePick v-model="item.userId" label="同行人" name="ids" :list="item.userList" multiple isRequrie isShowSearch title="同行人" titleKey="nickname" isCell clearable /> v-model="item.dept"
label="部门"
name="dept"
@change="handleDept($event, index)"
:list="userDeptTree"
isRequrie
isCascader
isShowSearch
title="部门"
titleKey="name"
isCell
clearable
/>
<RePick
v-model="item.userId"
label="同行人"
name="ids"
:list="item.userList"
multiple
isRequrie
isShowSearch
title="同行人"
titleKey="nickname"
isCell
clearable
/>
</div> </div>
</div> </div>
</van-form> </van-form>
<div class="add-box"> <div class="add-box">
<van-button type="info" round @click.stop="handleAdd" native-type="button" icon="plus" size="small">添加</van-button> <van-button
type="info"
round
@click.stop="handleAdd"
native-type="button"
icon="plus"
size="small"
>添加</van-button
>
</div> </div>
</div> </div>
</van-popup> </van-popup>
</template> </template>
<script> <script>
import { import { listUser } from '@/api/system/user'
listUser,
} from "@/api/system/user";
export default { export default {
props: { props: {
isOpen: Boolean, isOpen: Boolean,
@ -70,12 +124,14 @@ export default {
userTable: [], userTable: [],
isShow: false, isShow: false,
form: { form: {
tripPartners: [{ tripPartners: [
{
dept: null, dept: null,
userId: [], userId: [],
userList: [] userList: [],
}], },
} ],
},
} }
}, },
watch: { watch: {
@ -85,10 +141,9 @@ export default {
if (val) { if (val) {
this.handleInitList() this.handleInitList()
} }
}, },
deep: true, deep: true,
immediate: true immediate: true,
}, },
}, },
methods: { methods: {
@ -99,18 +154,20 @@ export default {
handleInitList() { handleInitList() {
// this.userLis // this.userLis
let objList = [] let objList = []
this.userList.forEach(element => { this.userList.forEach((element) => {
if (this.tripPartners.includes(element.id)) { if (this.tripPartners.includes(element.id)) {
objList.push(element) objList.push(element)
} }
}); })
this.userTable = objList this.userTable = objList
this.form = { this.form = {
tripPartners: [{ tripPartners: [
{
dept: null, dept: null,
userId: [], userId: [],
userList: [] userList: [],
}], },
],
} }
this.$nextTick(() => { this.$nextTick(() => {
// this.$refs.form.resetValidation() // this.$refs.form.resetValidation()
@ -121,8 +178,8 @@ export default {
}, },
// //
getisRepeat(arr) { getisRepeat(arr) {
var ary = arr; var ary = arr
var nary = ary.sort(); var nary = ary.sort()
for (var i = 0; i < ary.length; i++) { for (var i = 0; i < ary.length; i++) {
if (nary[i] == nary[i + 1]) { if (nary[i] == nary[i + 1]) {
return nary[i] return nary[i]
@ -139,42 +196,47 @@ export default {
mobile: undefined, mobile: undefined,
status: undefined, status: undefined,
deptId: id, deptId: id,
createTime: [] createTime: [],
} }
listUser(queryParams).then(response => { listUser(queryParams).then((response) => {
resolve(response.data && response.data.list || []) resolve((response.data && response.data.list) || [])
}) })
}) })
}, },
handleConfirm() { handleConfirm() {
this.$nextTick(() => { this.$nextTick(() => {
if (this.type == 1) { if (this.type == 1) {
this.$refs.form.validate().then(() => { this.$refs.form
.validate()
.then(() => {
let arr = [] let arr = []
this.form.tripPartners.forEach((n) => { this.form.tripPartners.forEach((n) => {
n.userId.forEach((z) => { n.userId.forEach((z) => {
arr.push(z) arr.push(z)
}) })
}) })
if (this.tripPartners.length) { // if (this.tripPartners.length) {
arr = arr.concat(this.tripPartners) // arr = arr.concat(this.tripPartners)
} // }
let newArr = arr.concat(this.allTripPartners) let newArr = arr.concat(this.allTripPartners)
let repeatId = this.getisRepeat(newArr) let repeatId = this.getisRepeat(newArr)
if (repeatId) { if (repeatId) {
const { nickname } = this.userList.find(item => item.id == repeatId) || {} const { nickname } =
this.userList.find((item) => item.id == repeatId) || {}
this.$fm(`同行人${nickname}已经被添加,请勿重复添加!`) this.$fm(`同行人${nickname}已经被添加,请勿重复添加!`)
} else { } else {
console.log(arr, 169)
this.$emit('onConfirm', arr || []) this.$emit('onConfirm', arr || [])
} }
}).catch((err) => { })
.catch((err) => {
if (err && err.length > 0 && err[0].name) { if (err && err.length > 0 && err[0].name) {
this.$refs.form.scrollToField(err[0].name, false) this.$refs.form.scrollToField(err[0].name, false)
} }
}) })
} else { } else {
let newArr = this.userTable.map(item => item.id) let newArr = this.userTable.map((item) => item.id)
this.$emit('onNewConfirm', newArr) this.$emit('onNewConfirm', newArr)
} }
}) })
@ -199,10 +261,9 @@ export default {
this.form.tripPartners.push({ this.form.tripPartners.push({
dept: null, dept: null,
userId: [], userId: [],
userList: [] userList: [],
}) })
}, },
}, },
} }
</script> </script>

@ -749,14 +749,14 @@
</div> </div>
</div> </div>
<div class="section mt5" v-if="['show'].includes(typeStr)"> <!-- <div class="section mt5" v-if="['show'].includes(typeStr)">
<span class="line"> </span>审批流程 <span class="line"> </span>审批流程
</div> </div>
<ApprovalProcess <ApprovalProcess
v-if="['show'].includes(typeStr)" v-if="['show'].includes(typeStr)"
:processInstanceId="form.processInstanceId" :processInstanceId="form.processInstanceId"
@onSetId="handleSetAccessId" @onSetId="handleSetAccessId"
/> /> -->
<!-- 申请单关联 --> <!-- 申请单关联 -->
<div class="section mt5"><span class="line"> </span>申请单关联</div> <div class="section mt5"><span class="line"> </span>申请单关联</div>
@ -1268,26 +1268,6 @@ export default {
handleConfirmIe(arr, index, nIndex) { handleConfirmIe(arr, index, nIndex) {
console.log(arr) console.log(arr)
// 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.expenseClaimTrips[index].expenseClaimDetails[nIndex],
'invoiceIds',
arr
)
this.$set(
this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex],
'show',
false
)
this.$set(
this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex],
'invoiceCount',
this.totalCount(arr)
)
this.$set(
this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex],
'invoiceName',
'已关联发票'
) */
this.$set( this.$set(
this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex],
'invoiceIds', 'invoiceIds',
@ -1314,16 +1294,6 @@ export default {
// 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)
/* this.$set(
this.form.expenseClaimDetails[nIndex],
'invoiceCount',
this.totalCount(arr)
)
this.$set(
this.form.expenseClaimDetails[nIndex],
'invoiceName',
'已关联发票'
) */
this.$set( this.$set(
this.form.expenseClaimDetails[nIndex], this.form.expenseClaimDetails[nIndex],
'invoiceCount', 'invoiceCount',
@ -1432,6 +1402,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.BottomBtn.handleFilterBtnList() this.$refs.BottomBtn.handleFilterBtnList()
}) })
this.handleGetInvoiceList(this.form.expenseApplyIds || [])
}) })
.finally(() => { .finally(() => {
this.$loading(false, 'loadingSb') this.$loading(false, 'loadingSb')
@ -1457,6 +1428,7 @@ export default {
this.$set(this.form.expenseClaimTrips[index], 'isOpen', false) this.$set(this.form.expenseClaimTrips[index], 'isOpen', false)
}, },
handleConfirmPo(arr, index) { handleConfirmPo(arr, index) {
console.log(arr, 1431)
let nameArr = let nameArr =
(this.form.expenseClaimTrips[index].tripPartnersName && (this.form.expenseClaimTrips[index].tripPartnersName &&
this.form.expenseClaimTrips[index].tripPartnersName.split('、')) || this.form.expenseClaimTrips[index].tripPartnersName.split('、')) ||
@ -1477,7 +1449,6 @@ export default {
this.$set(this.form.expenseClaimTrips[index], 'isOpen', false) this.$set(this.form.expenseClaimTrips[index], 'isOpen', false)
}, },
handlePoShow(index) { handlePoShow(index) {
// if (this.disabled) return
if (this.form.expenseClaimTrips[index].tripPartners.length) { if (this.form.expenseClaimTrips[index].tripPartners.length) {
this.$set(this.form.expenseClaimTrips[index], 'type', 0) this.$set(this.form.expenseClaimTrips[index], 'type', 0)
this.$set(this.form.expenseClaimTrips[index], 'isOpen', true) this.$set(this.form.expenseClaimTrips[index], 'isOpen', true)
@ -1522,27 +1493,8 @@ export default {
], ],
}) })
}, },
handleInitList() { handleGetInvoiceList(ids = []) {
console.log('......')
this.$loading(true)
return new Promise((resolve) => { return new Promise((resolve) => {
listData({
pageNo: 1,
pageSize: this.$store.getters.requestPageSize,
dictType: 'bs_trip_type',
}).then((res) => {
//
this.tripTypeList = res.data.list || []
console.log('tripTypeList..', this.tripTypeList)
})
listData({
pageNo: 1,
pageSize: this.$store.getters.requestPageSize,
dictType: 'bs_fee_type',
}).then((res) => {
//
this.feeTypeList = res.data.list || []
})
getInvoicePage({ getInvoicePage({
pageNo: 1, pageNo: 1,
pageSize: this.$store.getters.requestPageSize, pageSize: this.$store.getters.requestPageSize,
@ -1553,7 +1505,11 @@ export default {
pageSize: 1000, pageSize: 1000,
billType: this.$route.query.billType === 'RCBX' ? 'RCSQ' : 'CLSQ', billType: this.$route.query.billType === 'RCBX' ? 'RCSQ' : 'CLSQ',
expenseFlag: 0, expenseFlag: 0,
ids: [], // ids: [],
// sortingFieldStr: encodeURIComponent(
// JSON.stringify([{ field: 'id', order: 'desc' }])
// ),
ids: ids.length ? ids.join(',') : null,
sortingFieldStr: encodeURIComponent( sortingFieldStr: encodeURIComponent(
JSON.stringify([{ field: 'id', order: 'desc' }]) JSON.stringify([{ field: 'id', order: 'desc' }])
), ),
@ -1615,14 +1571,41 @@ export default {
disabled: item.status != 2 ? true : false, disabled: item.status != 2 ? true : false,
} }
}) })
console.log(this.expenseApplyList) console.log(
console.log('dkldsjlkdsjl') 'this.expenseApplyList',
this.expenseApplyList.filter((item) => item.id == 179)
)
resolve() resolve()
this.$loading(false) this.$loading(false)
}) })
}) })
}) })
}, },
handleInitList() {
this.$loading(true)
return new Promise((resolve) => {
listData({
pageNo: 1,
pageSize: this.$store.getters.requestPageSize,
dictType: 'bs_trip_type',
}).then((res) => {
//
this.tripTypeList = res.data.list || []
console.log('tripTypeList..', this.tripTypeList)
})
listData({
pageNo: 1,
pageSize: this.$store.getters.requestPageSize,
dictType: 'bs_fee_type',
}).then((res) => {
//
this.feeTypeList = res.data.list || []
})
this.handleGetInvoiceList([]).then(() => {
resolve()
})
})
},
handleDateShow(index, obj) { handleDateShow(index, obj) {
if (this.disabled) { if (this.disabled) {
return return

@ -595,6 +595,7 @@ export default {
this.$set(this.form.expenseApplyTrips[index], 'isOpen', false) this.$set(this.form.expenseApplyTrips[index], 'isOpen', false)
}, },
handleConfirmPo(arr, index) { handleConfirmPo(arr, index) {
console.log(arr, 598)
let nameArr = let nameArr =
(this.form.expenseApplyTrips[index].tripPartnersName && (this.form.expenseApplyTrips[index].tripPartnersName &&
this.form.expenseApplyTrips[index].tripPartnersName.split('、')) || this.form.expenseApplyTrips[index].tripPartnersName.split('、')) ||

Loading…
Cancel
Save