Merge branch 'main-20240105'

main
jwg 8 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://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://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

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

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

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

Loading…
Cancel
Save