Compare commits

..

4 Commits

@ -13,9 +13,10 @@ VUE_APP_API= '/'
# 请求环境
# 方楠
VUE_APP_BASE_API = 'http://139.224.253.31:8081'
# VUE_APP_BASE_API = 'http://one-h5.lyrfp.com'
# 开发环境 不要删
VUE_APP_BASE_API = 'http://192.168.3.128:58088'
# VUE_APP_BASE_API = 'http://192.168.3.128:58088'
# VUE_APP_BASE_API = 'http://60.204.223.58:8080'
#线上预览

@ -106,14 +106,37 @@ export default {
hanleCancel() {
this.isShow = false
},
handleConfirm(key) {
handleConfirm() {
this.$nextTick(() => {
if (key == 2) {
this.$refs.form.validate().then(() => {
let obj = {
id: this.accessId,
reason: ''
reason: this.form.reason
}
this.$loading(true, 'loadingSb')
if (this.key == 2) {
/* approveTask(obj)
.then(() => {
this.$EventBus.$emit('handleResetLive', 'company-myTrips')
this.$EventBus.$emit('handleResetLive', 'company-myClaim')
history.back()
this.$loading(false, 'loadingSb')
})
.catch(() => {
this.$loading(false, 'loadingSb')
})
} else {
rejectTask(obj)
.then(() => {
this.$EventBus.$emit('handleResetLive', 'company-myTrips')
this.$EventBus.$emit('handleResetLive', 'company-myClaim')
history.back()
this.$loading(false, 'loadingSb')
})
.catch(() => {
this.$loading(false, 'loadingSb')
}) */
approveTask(obj)
.then(() => {
this.$forceCloseLoading()
@ -127,12 +150,6 @@ export default {
this.$loading(false, 'loadingSb')
})
} else {
this.$refs.form.validate().then(() => {
let obj = {
id: this.accessId,
reason: this.form.reason
}
this.$loading(true, 'loadingSb')
rejectTask(obj)
.then(() => {
this.$forceCloseLoading()
@ -145,9 +162,9 @@ export default {
this.$forceCloseLoading()
this.$loading(false, 'loadingSb')
})
})
}
})
})
},
handleSubmit(key) {
if (key == 2) {
@ -155,7 +172,7 @@ export default {
this.title = '同意'
this.form.reason = '已同意'
//
this.handleConfirm(2)
this.handleConfirm()
} else if (key == 3) {
this.key = key
this.title = '驳回'

@ -15,93 +15,35 @@
</div> -->
<div class="ct-md">
<div class="mt5">
申请类型{{
getDictDataLabel(DICT_TYPE.BS_BILL_TYPE, itemData.billType) ||
''
}}
申请类型{{getDictDataLabel(DICT_TYPE.BS_BILL_TYPE,itemData.billType) || ''}}
</div>
<div class="mt5">申请人{{ itemData.nickname }}</div>
<div class="mt5">项目名称 {{ itemData.projectName }}</div>
<div class="mt5">申请部门 {{ userInfo.dept.name }}</div>
<div style="margin-top: 0.3rem">
申请时间
{{ dayjs(itemData.createTime).format('YY/MM/DD HH:ss') }}
<div class="mt5">
申请人{{itemData.nickname}}
</div>
<div class="mt5">
项目名称 {{itemData.projectName}}
</div>
<div class="mt5">
申请部门 {{userInfo.dept.name}}
</div>
<div style="margin-top: 0.3rem;">
申请时间 {{dayjs(itemData.createTime).format('YY/MM/DD HH:ss')}}
</div>
<div class="cr-bt" style="margin-top: 0.6rem">
<div
class="tags"
:style="`border: 1px solid ${
handleFilterStatus(
DICT_TYPE.BS_EXPENSE_APPLY_STATUS,
itemData.status
).color
};color:${
handleFilterStatus(
DICT_TYPE.BS_EXPENSE_APPLY_STATUS,
itemData.status
).color
}`"
>
{{
handleFilterStatus(
DICT_TYPE.BS_EXPENSE_APPLY_STATUS,
itemData.status
).label
}}
</div>
<div class="cr-bt" style="margin-top: 0.6rem;">
<div class="tags" :style="`border: 1px solid ${handleFilterStatus(DICT_TYPE.BS_EXPENSE_APPLY_STATUS,itemData.status).color};color:${handleFilterStatus(DICT_TYPE.BS_EXPENSE_APPLY_STATUS,itemData.status).color}`"> {{handleFilterStatus(DICT_TYPE.BS_EXPENSE_APPLY_STATUS,itemData.status).label}}</div>
</div>
</div>
<div class="box-rt">
<!-- {{listType}} -->
<van-icon
class="icon-box"
v-hasPermi="[
listType === 'myNewTrips'
? 'bs:expense-apply:myquery'
: 'bs:expense-apply:query'
]"
@click="handleShow(itemData)"
name="eye-o"
color="#05A9FF"
size="25"
/>
<van-icon class="icon-box" v-hasPermi="[listType === 'myNewTrips' ? 'bs:expense-apply:myquery' : 'bs:expense-apply:query']" @click="handleShow(itemData)" name="eye-o" color="#05A9FF" size="25" />
<!-- <van-icon class="icon-box" v-hasPermi="['bs:expense-apply:create']" v-if="listType !== 'myNewTrips'" @click="handleEdit(itemData.id,itemData.status)" name="edit" :color="!(itemData.status==0 || (itemData.status==3 && userInfo.id ==itemData.creator)) ?'#ccc':''" size="25" />
<van-icon class="icon-box" v-hasPermi="['bs:expense-apply:delete']" v-if="listType !== 'myNewTrips'" @click="handleDel(itemData.id,itemData.status,temData.creator)" name="delete-o" :color="!(itemData.status==0 || (itemData.status==3 && userInfo.id ==itemData.creator)) ?'#ccc':'#EC3359'" size="25" />
-->
<van-icon
class="icon-box"
v-hasPermi="['bs:expense-apply:create']"
v-if="listType == 'myNewTrips'"
@click="handleEdit(itemData)"
name="edit"
:color="
!(
itemData.status == 0 ||
(itemData.status == 3 && userInfo.id == itemData.creator)
)
? '#ccc'
: ''
"
size="25"
/>
<van-icon
class="icon-box"
v-hasPermi="['bs:expense-apply:mydelete']"
v-if="listType == 'myNewTrips'"
@click="handleDel(itemData.id, itemData.status, itemData.creator)"
name="delete-o"
:color="
!(
itemData.status == 0 ||
(itemData.status == 3 && userInfo.id == itemData.creator)
)
? '#ccc'
: '#EC3359'
"
size="25"
/>
<van-icon class="icon-box" v-hasPermi="['bs:expense-apply:create']" v-if="listType == 'myNewTrips'" @click="handleEdit(itemData)" name="edit" :color="!(itemData.status==0 || (itemData.status==3 && userInfo.id ==itemData.creator)) ?'#ccc':''" size="25" />
<van-icon class="icon-box" v-hasPermi="['bs:expense-apply:mydelete']" v-if="listType == 'myNewTrips'" @click="handleDel(itemData.id,itemData.status,temData.creator)" name="delete-o" :color="!(itemData.status==0 || (itemData.status==3 && userInfo.id ==itemData.creator)) ?'#ccc':'#EC3359'" size="25" />
</div>
</div>
</div>
@ -109,8 +51,8 @@
</template>
<script>
import { handleFilterStatus } from '@/utils/dict'
import { deleteExpenseApply, deleteMyExpenseApply } from '@/api/bs/expenseApply'
import { handleFilterStatus } from "@/utils/dict";
import { deleteExpenseApply, deleteMyExpenseApply } from "@/api/bs/expenseApply";
import dayjs from 'dayjs'
import { Dialog } from 'vant'
export default {
@ -118,10 +60,13 @@ export default {
listType: String,
itemData: {
required: true,
default: () => {}
}
default: () => { }
},
},
components: {
},
components: {},
data() {
return {
jumoStudentId: null
@ -132,11 +77,13 @@ export default {
this.handleUpdataInfo()
}
},
mounted() {},
mounted() {
},
computed: {
userInfo() {
return JSON.parse(window.localStorage.getItem('userInfo') || { dept: {} })
}
},
},
methods: {
handleShow(obj) {
@ -148,7 +95,7 @@ export default {
},
handleEdit(obj) {
const { id, status, billType, creator } = obj
if (!(status == 0 || (status == 3 && this.userInfo.id == creator))) {
if (!(status==0 || (status ==3 && this.userInfo.id ==creator))) {
return
}
this.jumoStudentId = id
@ -157,18 +104,16 @@ export default {
query: { id, type: 'edit', listType: this.listType, billType }
})
},
handleDel(id, status, creator) {
if (!(status == 0 || (status == 3 && this.userInfo.id == creator))) {
handleDel(id, status,creator) {
if (!(status==0 || (status ==3 && this.userInfo.id ==creator))) {
return
}
Dialog.confirm({
title: '提示',
message: '你确定要删除吗?'
}).then(() => {
let api =
this.listType === 'myNewTrips'
? deleteMyExpenseApply
: deleteExpenseApply
message: '你确定要删除吗?',
})
.then(() => {
let api = this.listType === 'myNewTrips' ? deleteMyExpenseApply : deleteExpenseApply
api(id).then(() => {
this.$emit('onAllRefresh')
})
@ -179,7 +124,7 @@ export default {
handleUpdataInfo() {
this.jumoStudentId = null
this.$emit('onUpdataInfo', this.itemData.id)
}
},
}
}
</script>

@ -22,12 +22,8 @@ export default {
areaTree: [],
userDeptTree: [],
userList: [],
bankInfo: [], // 账户信息
},
mutations: {
SET_BANKINFO: (state, bankInfo) => {
state.bankInfo = bankInfo.length > 0 ? bankInfo : []
},
SET_AUTHORIZATION(state, authorization) {
state.authorization = authorization
},
@ -211,7 +207,6 @@ export default {
setLocalStorage('userInfo', JSON.stringify(res.data))
let res1 = res.data
commit('SET_USERINFO', res.data)
commit('SET_BANKINFO', res.data.bankInfoList || [])
getAreaTree().then(res => {
let tree = res.data || []
handleAreaLoop(tree)
@ -242,6 +237,7 @@ export default {
reject(res.response.code)
})
//
// huoqu
}).catch(e => {
console.log(e)

@ -9,8 +9,6 @@ const getters = {
userList: state => state.common.user.userList,
dict_datas: state => state.dict.dictDatas,
requestPageSize: state => state.common.global.requestPageSize,
// 银行信息
bankInfo: state => state.common.user.bankInfo,
}
export default getters

@ -77,25 +77,6 @@
input-align="right"
placeholder="请输入"
/>
<van-field
v-model="fundingSourceLabel"
:disabled="disabled"
label="项目资金来源"
clear-trigger="always"
input-align="right"
placeholder="请输入"
@click="showPicker = true"
/>
<van-field
v-model="form.bankAccount"
:disabled="disabled"
required
label="收款账号"
clear-trigger="always"
input-align="right"
placeholder="请输入"
@click="showPicker2 = true"
/>
<van-field
v-model="form.reason"
:disabled="disabled"
@ -827,28 +808,6 @@
}
"
/>
<!-- 资金来源底部框 -->
<van-popup v-model="showPicker" position="bottom">
<van-picker
show-toolbar
title="选择资金来源"
:columns="fundingSourceList"
@confirm="selectFundingSource"
@cancel="showPicker = false"
/>
</van-popup>
<!-- 银行账号底部框 -->
<van-popup v-model="showPicker2" position="bottom">
<van-picker
show-toolbar
title="选择银行账号"
:columns="bankAccountList1"
@confirm="selectBankAccount"
@cancel="showPicker2 = false"
/>
</van-popup>
</div>
</template>
@ -889,15 +848,9 @@ export default {
this.getTree()
},
// 访DOM
mounted() {
console.log(this.$store.getters.bankInfo, 'this.$store.getters.bankInfo')
},
mounted() {},
data() {
return {
showPicker2: false,
showPicker: false,
//
bankAccountList: this.$store.getters.bankInfo,
areaTree: [],
indexOne: 1,
indexTwo: 1,
@ -925,9 +878,7 @@ export default {
maxDate: new Date('2030/01/01'),
defaultDate: new Date(),
dateShow: false,
fundingSourceLabel: '',
form: {
fundingSource: null,
companyName: window.localStorage.getItem('cn'), //
nickname: JSON.parse(
window.localStorage.getItem('userInfo') || { dept: {} }
@ -945,9 +896,7 @@ export default {
projectName: null,
reason: null,
remark: null,
costDeptId: JSON.parse(
window.localStorage.getItem('userInfo') || { dept: {} }
).deptId, //,
costDeptId: null,
expenseApplyIds: [],
expenseClaimTrips: [
{
@ -994,18 +943,6 @@ export default {
//
// bs_fee_type
computed: {
bankAccountList1() {
return this.bankAccountList.map((e) => e.bankNumber)
},
fundingSourceList() {
const list = this.getDictDatas('funding_source')?.map((e) => {
return {
text: e.label,
value: e.value
}
})
return list || []
},
allTripPartners() {
let arr = []
this.form.expenseClaimTrips.forEach((v) => {
@ -1044,16 +981,6 @@ export default {
watch: {},
//
methods: {
selectBankAccount(val) {
console.log(val, 'valvalval')
this.form.bankAccount = val
this.showPicker2 = false
},
selectFundingSource(val) {
this.form.fundingSource = val.value
this.fundingSourceLabel = val.text
this.showPicker = false
},
//
addInvoice() {
this.$router.push({
@ -1468,9 +1395,6 @@ export default {
}
)
}
this.fundingSourceLabel = this.fundingSourceList.find(
(e) => e.value == this.form.fundingSource
).text
if (Array.isArray(this.form.expenseClaimTrips)) {
this.form.expenseClaimTrips.forEach((n) => {
n.expenseClaimDetails.forEach((z) => {

@ -78,15 +78,6 @@
input-align="right"
placeholder="请输入"
/>
<van-field
v-model="fundingSourceLabel"
:disabled="disabled"
label="项目资金来源"
clear-trigger="always"
input-align="right"
placeholder="请输入"
@click="showPicker = true"
/>
<van-field
v-model="form.amount"
v-if="!CLSQ"
@ -100,8 +91,8 @@
required: false,
message: '预计费用格式错误',
validator: VerifyFunc.validatorMoney,
type: 1
}
type: 1,
},
]"
label="预计费用"
clear-trigger="always"
@ -245,7 +236,7 @@
label="出差类型"
:name="`tripType_${index}`"
:list="tripTypeList"
isRequrie
isCell
clearable
/>
@ -280,8 +271,8 @@
{
required: false,
message: '预计费用格式错误',
validator: VerifyFunc.validatorMoney
}
validator: VerifyFunc.validatorMoney,
},
]"
v-model="item.amount"
:name="`amount`"
@ -357,15 +348,6 @@
color="#0088FE"
@confirm="handleDateSelect"
/>
<van-popup v-model="showPicker" position="bottom">
<van-picker
show-toolbar
title="选择资金来源"
:columns="fundingSourceList"
@confirm="selectFundingSource"
@cancel="showPicker = false"
/>
</van-popup>
</div>
</template>
@ -374,7 +356,7 @@ import dayjs from 'dayjs'
import {
createExpenseApply,
getExpenseApply,
getMyExpenseApply
getMyExpenseApply,
} from '@/api/bs/expenseApply'
import { listData } from '@/api/system/dict/data'
import VerifyFunc from '@/utils/verify'
@ -389,19 +371,10 @@ export default {
FollowPeoPle: () => import('@/components/FollowPeoPle'),
UploadFile: () => import('@/components/UploadFile'),
ApprovalProcess: () => import('@/components/ApprovalProcess'),
BottomBtn: () => import('@/components/BottomBtn')
BottomBtn: () => import('@/components/BottomBtn'),
},
//
computed: {
fundingSourceList() {
const list = this.getDictDatas('funding_source')?.map((e) => {
return {
text: e.label,
value: e.value
}
})
return list || []
},
allTripPartners() {
let arr = []
this.form.expenseApplyTrips.forEach((v) => {
@ -431,7 +404,7 @@ export default {
},
CLSQ() {
return ['CLSQ'].includes(this.$route.query.billType)
}
},
},
// 访this
created() {
@ -445,7 +418,6 @@ export default {
},
data() {
return {
showPicker: false,
//
areaTree: [],
VerifyFunc,
@ -460,9 +432,7 @@ export default {
maxDate: new Date('2030/01/01'),
defaultDate: new Date(),
dateShow: false,
fundingSourceLabel: '',
form: {
fundingSource: null,
companyName: window.localStorage.getItem('cn'), //
nickname: JSON.parse(
window.localStorage.getItem('userInfo') || { dept: {} }
@ -495,10 +465,10 @@ export default {
tripPartnersName: '',
amount: undefined,
type: 0,
isOpen: false
}
]
}
isOpen: false,
},
],
},
}
},
@ -506,11 +476,6 @@ export default {
watch: {},
//
methods: {
selectFundingSource(val) {
this.form.fundingSource = val.value
this.fundingSourceLabel = val.text
this.showPicker = false
},
//
getTree() {
getAreaTree().then((res) => {
@ -547,10 +512,10 @@ export default {
expenseApplyTrips: (this.form.expenseApplyTrips || []).map(
(item) => {
return {
...item
...item,
}
}
)
),
}
this.$loading(true, 'form')
createExpenseApply(newForm).then((res) => {
@ -609,14 +574,11 @@ export default {
).format('YY/MM/DD')}`,
tripPartnersName: nameArr.join('、'),
departureLocation: Number(item.departureLocation),
destinationLocation: Number(item.destinationLocation)
destinationLocation: Number(item.destinationLocation),
}
}
)
),
}
this.fundingSourceLabel = this.fundingSourceList.find(
(e) => e.value == this.form.fundingSource
).text
this.fileList = res.data.files || []
this.isAuthorised = res.data.isAuthorised
this.$nextTick(() => {
@ -701,7 +663,7 @@ export default {
tripPartnersName: '',
amount: undefined,
isOpen: false,
type: 0
type: 0,
})
},
handleInitList() {
@ -710,7 +672,7 @@ export default {
listData({
pageNo: 1,
pageSize: 50,
dictType: 'bs_trip_type'
dictType: 'bs_trip_type',
}).then((res) => {
this.tripTypeList = res.data.list || []
})
@ -725,7 +687,7 @@ export default {
if (startTime && endTime) {
this.defaultDate = [
dayjs(startTime).toDate(),
dayjs(endTime).toDate()
dayjs(endTime).toDate(),
]
}
})
@ -774,8 +736,8 @@ export default {
Number(dayjs(list[1]).diff(dayjs(list[0]), 'day')) + 1
this.$set(this.form.expenseApplyTrips[this.index], 'tripDay', day)
this.dateShow = false
}
}
},
},
}
</script>
<style scoped lang="scss">

Loading…
Cancel
Save