Merge branch 'main-20240105'

main
jwg 8 months ago
commit 19f9d69416

@ -50,6 +50,7 @@
}) })
initHtml() initHtml()
document.body.addEventListener('touchstart', function () {}) document.body.addEventListener('touchstart', function () {})
</script> </script>
</body> </body>

@ -14,7 +14,7 @@ export function loginIn(data) {
// 企业微信登录获取code 构造网页授权链接 // 企业微信登录获取code 构造网页授权链接
export function Wxlogin(query) { export function Wxlogin(query) {
return request({ return request({
url: 'system/auth/social-auth-redirect', url: 'system/auth/social-auth-redirectByWeCom',
method: 'get', method: 'get',
headers: { headers: {
isToken: false isToken: false
@ -25,7 +25,7 @@ export function Wxlogin(query) {
// 通过code 后端获取访问用户身份 // 通过code 后端获取访问用户身份
export function sendCode(query) { export function sendCode(query) {
return request({ return request({
url: '', url: '/system/auth/social-WeCom-login',
method: 'get', method: 'get',
params: query params: query
}) })

@ -42,7 +42,13 @@
:key="index" :key="index"
> >
<div class="new-lf"> <div class="new-lf">
<!-- <van-checkbox
v-model="item.checked"
shape="square"
@change="handleSetCheck(index, item, true)"
></van-checkbox> -->
<van-checkbox <van-checkbox
:disabled="disabled"
v-model="item.checked" v-model="item.checked"
shape="square" shape="square"
@change="handleSetCheck(index, item, true)" @change="handleSetCheck(index, item, true)"
@ -161,6 +167,7 @@ export default {
tripPartners: Array, // tripPartners: Array, //
list: Array, // list: Array, //
type: [Number, String], type: [Number, String],
disabled: Boolean,
}, },
components: { components: {
RePick: () => import('@/components/ReComponents/RePick'), RePick: () => import('@/components/ReComponents/RePick'),
@ -203,10 +210,12 @@ export default {
} }
}, },
created() { created() {
this.$nextTick(() => { // this.$nextTick(() => {
this.invoiceIdsCopy = this.invoiceIds // this.invoiceIdsCopy = this.invoiceIds
this.getList('init') // console.log(this.invoiceIds)
}) // console.log('212121')
// this.getList('init')
// })
}, },
watch: { watch: {
isOpen: { isOpen: {
@ -235,9 +244,20 @@ export default {
// deep: true, // deep: true,
// immediate: true // immediate: true
// } // }
invoiceIds: {
handler(newData) {
this.invoiceIdsCopy = newData
this.getList('init')
},
deep: true,
immediate: true,
},
}, },
methods: { methods: {
handleSetCheck(index, item, type) { handleSetCheck(index, item, type) {
if (this.disabled) {
return
}
// this.tableList // this.tableList
let _this = this let _this = this
/* this.$set( /* this.$set(
@ -252,13 +272,30 @@ export default {
!this.tableList[index].checked !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)) {
_this.invoiceIdsCopy[_this.invoiceType] = [] _this.invoiceIdsCopy[_this.invoiceType] = []
} }
_this.invoiceIdsCopy[_this.invoiceType].push(this.tableList[index].id) if (
!_this.invoiceIdsCopy[_this.invoiceType].includes(
_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].splice(index, 1) _this.invoiceIdsCopy[_this.invoiceType].forEach(function (
item,
indexs
) {
if (item == _this.tableList[index].id) {
_this.invoiceIdsCopy[_this.invoiceType].splice(indexs, 1)
}
})
} }
this.$forceUpdate() this.$forceUpdate()
console.log(_this.invoiceIdsCopy) console.log(_this.invoiceIdsCopy)

@ -116,6 +116,88 @@
isCell isCell
clearable clearable
/> />
<!-- <van-field
v-model="form.claimNo"
disabled
label="单号"
clear-trigger="always"
input-align="right"
/>
<van-field
v-model="cn"
disabled
label="公司名称"
clear-trigger="always"
input-align="right"
/>
<van-field
v-model="userInfo.nickname"
disabled
label="申请人"
clear-trigger="always"
input-align="right"
maxlength="50"
placeholder="请输入"
/>
<van-field
v-model="userInfo.dept.name"
disabled
label="申请部门"
clear-trigger="always"
input-align="right"
maxlength="50"
placeholder="请输入"
/>
<van-field
v-model="form.projectName"
:disabled="disabled"
label="项目名称"
required
:rules="[{ required: true, message: '请输入' }]"
clear-trigger="always"
input-align="right"
placeholder="请输入"
/>
<van-field
v-model="form.reason"
:disabled="disabled"
name="reason"
autosize
rows="2"
label="报销事由"
required
:rules="[{ required: true, message: '请输入' }]"
clear-trigger="always"
input-align="right"
placeholder="请输入"
type="textarea"
/>
<van-field
v-model="form.remark"
:disabled="disabled"
name="remark"
autosize
rows="2"
label="备注信息"
clear-trigger="always"
input-align="right"
placeholder="请输入"
type="textarea"
/>
<RePick
v-model="form.costDeptId"
:disabled="disabled"
label="费用归属部门"
:name="`costDeptId`"
:list="userDeptTree"
isRequrie
isCascader
isShowSearch
title="费用归属部门"
titleKey="name"
isCell
clearable
/> -->
</div> </div>
</div> </div>
<div class="section mt5"><span class="line"> </span>附件</div> <div class="section mt5"><span class="line"> </span>附件</div>
@ -383,17 +465,43 @@
label="关联发票" label="关联发票"
clear-trigger="always" clear-trigger="always"
input-align="right" input-align="right"
placeholder="请关联" :placeholder="
nitem.invoiceCount > 0 ? '已关联发票' : '请关联'
"
/> />
</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"
:list="nitem.ieList" :list="nitem.ieList"
:temClaimNo="form.claimNo" :temClaimNo="form.claimNo"
:invoiceIds="nitem.invoiceIds" :invoiceIds="nitem.invoiceIds"
@onCancel="nitem.show = false" @onCancel="nitem.show = false"
:isOpen="nitem.show" :isOpen="nitem.show"
@onConfirm="handleConfirmIe($event, index, nIndex)" @onConfirm="
(arr) => {
handleConfirmIe(arr, index, nIndex)
}
"
/> />
</div> </div>
</div> </div>
@ -547,7 +655,7 @@
type="textarea" type="textarea"
/> />
<div @click="handleShowIe1(nIndex)"> <div @click="handleShowIe1(nIndex)">
<van-field <!-- <van-field
disabled disabled
:class=" :class="
nitem.invoiceName ? 'actived-disabled tag-blue' : 'tag-blue' nitem.invoiceName ? 'actived-disabled tag-blue' : 'tag-blue'
@ -562,8 +670,46 @@
placeholder="请关联" placeholder="请关联"
/> />
</div> </div>
<ConnectInvoice
:list="nitem.ieList"
:invoiceIds="nitem.invoiceIds"
@onCancel="nitem.show = false"
:isOpen="nitem.show"
@onConfirm="
(arr) => {
handleConfirmIe1(arr, nIndex)
}
"
/>
<div
style="color: red; margin-top: 10px"
v-if="
nitem.amount > handleCountAmount(form.expenseClaimDetails)
"
>
费用明细超出费控设置金额,费控设置金额为{{
handleCountAmount(form.expenseClaimDetails)
}} -->
<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="
nitem.invoiceCount > 0 ? '已关联发票' : '请关联'
"
/>
</div>
<!--关联发票 --> <!--关联发票 -->
<ConnectInvoice <ConnectInvoice
:disabled="disabled"
:list="nitem.ieList" :list="nitem.ieList"
:invoiceIds="nitem.invoiceIds" :invoiceIds="nitem.invoiceIds"
@onCancel="nitem.show = false" @onCancel="nitem.show = false"
@ -602,7 +748,6 @@
> >
</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>审批流程
@ -612,6 +757,7 @@
: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>
<RePick <RePick
@ -794,6 +940,7 @@ export default {
}, },
], ],
}, },
times: null,
} }
}, },
// //
@ -1091,12 +1238,13 @@ export default {
}) })
}, },
handleShowIe(type, index, nIndex) { handleShowIe(type, index, nIndex) {
if (this.disabled) return // if (this.disabled) return
// this.indexOne = index // this.indexOne = index
// this.indexTwo = nIndex // this.indexTwo = nIndex
// this.claimType = type // this.claimType = type
// let obj = this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex] // let obj = this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex]
// this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'ieList', arr) // this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'ieList', arr)
this.$set( this.$set(
this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex],
'show', 'show',
@ -1108,7 +1256,7 @@ export default {
// }) // })
}, },
handleShowIe1(nIndex) { handleShowIe1(nIndex) {
if (this.disabled) return // if (this.disabled) return
// let obj = this.form.expenseClaimDetails[nIndex] // let obj = this.form.expenseClaimDetails[nIndex]
// this.$set(this.form.expenseClaimDetails[nIndex], 'ieList', arr) // this.$set(this.form.expenseClaimDetails[nIndex], 'ieList', arr)
@ -1118,7 +1266,7 @@ export default {
// }) // })
}, },
handleConfirmIe(arr, index, nIndex) { handleConfirmIe(arr, index, nIndex) {
console.log(arr, 'nIndex', nIndex) 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.$set(
this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex],
@ -1162,6 +1310,7 @@ export default {
) )
}, },
handleConfirmIe1(arr, nIndex) { handleConfirmIe1(arr, nIndex) {
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.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)
@ -1466,6 +1615,8 @@ export default {
disabled: item.status != 2 ? true : false, disabled: item.status != 2 ? true : false,
} }
}) })
console.log(this.expenseApplyList)
console.log('dkldsjlkdsjl')
resolve() resolve()
this.$loading(false) this.$loading(false)
}) })

@ -1,5 +1,10 @@
<template> <template>
<van-popup position="right" v-model="isDialog" get-container="#app" class="quick-pop"> <van-popup
position="right"
v-model="isDialog"
get-container="#app"
class="quick-pop"
>
<div class="drag-contain"> <div class="drag-contain">
<div class="drag-header"> <div class="drag-header">
<div class="darg-header-title">设置</div> <div class="darg-header-title">设置</div>
@ -15,14 +20,27 @@
</div> </div>
</div> </div>
<div class="drag-list"> <div class="drag-list">
<draggable v-model="btnList" handle=".list-drag-sort" animation="300" @end="handleDrag"> <draggable
v-model="btnList"
handle=".list-drag-sort"
animation="300"
@end="handleDrag"
>
<div class="drag-list-item" v-for="item in btnList" :key="item.title"> <div class="drag-list-item" v-for="item in btnList" :key="item.title">
<div class="list-title">{{ item.title }}</div> <div class="list-title">{{ item.title }}</div>
<div class="list-darg-switch"> <div class="list-darg-switch">
<van-switch v-model="item.isShow" size="1rem" @change="handleDrag" /> <van-switch
v-model="item.isShow"
size="1rem"
@change="handleDrag"
/>
</div> </div>
<div class="list-drag-sort"> <div class="list-drag-sort">
<img src="@/assets/images/home/drag.png" style="width: 1rem; height: auto;" alt=""> <img
src="@/assets/images/home/drag.png"
style="width: 1rem; height: auto"
alt=""
/>
<!-- <van-icon name="setting-o" /> --> <!-- <van-icon name="setting-o" /> -->
</div> </div>
</div> </div>
@ -40,16 +58,16 @@ export default {
props: { props: {
isOpen: { isOpen: {
default: false, default: false,
type: Boolean type: Boolean,
}, },
quickName: String, quickName: String,
btnListProp: Array btnListProp: Array,
}, },
components: { draggable }, components: { draggable },
data() { data() {
return { return {
isDialog: false, isDialog: false,
btnList: [] btnList: [],
} }
}, },
watch: { watch: {
@ -62,30 +80,32 @@ export default {
btnListProp: { btnListProp: {
handler(val) { handler(val) {
if (val) { if (val) {
this.btnList = val.map(item => { this.btnList = val.map((item) => {
return { ...item } return { ...item }
}) })
} }
}, },
immediate: true, immediate: true,
deep: true deep: true,
} },
}, },
methods: { methods: {
...mapActions('common/db', ['set']), ...mapActions('common/db', ['set']),
handleDrag() { handleDrag() {
const list = this.btnList.map((item, index) => { const list = this.btnList
.map((item, index) => {
item.num = index item.num = index
return item return item
}).sort((a, b) => a.num < b.num) })
.sort((a, b) => a.num < b.num)
this.set({ this.set({
argu: this.quickName, argu: this.quickName,
value: list, value: list,
user: true user: true,
}) })
this.$emit('onDealBtnList', list) this.$emit('onDealBtnList', list)
} },
} },
} }
</script> </script>

@ -7,20 +7,27 @@
<div class="logo-text logo-text-new">OA办公每一天都高效</div> <div class="logo-text logo-text-new">OA办公每一天都高效</div>
<div class="round"></div> <div class="round"></div>
</div> </div>
<div style="width: 90%; z-index: 10"> <!-- 密码登录 -->
<div v-if="firstLogin" style="width: 90%; z-index: 10">
<div class="login-form"> <div class="login-form">
<div style="border-bottom: 1px solid #ddd; padding-bottom: 0.3rem"> <div
style="border-bottom: 0.0125rem solid #ddd; padding-bottom: 24px"
>
<div class="userName">企业</div> <div class="userName">企业</div>
<input <input
v-model="loginForm.tenantName" v-model="loginForm.tenantName"
placeholder="请输入企业名称" placeholder="请输入企业名称"
/> />
</div> </div>
<div style="border-bottom: 1px solid #ddd; padding-bottom: 0.3rem"> <div
style="border-bottom: 0.0125rem solid #ddd; padding-bottom: 24px"
>
<div class="userName">账号</div> <div class="userName">账号</div>
<input v-model="loginForm.username" placeholder="请输入用户名" /> <input v-model="loginForm.username" placeholder="请输入用户名" />
</div> </div>
<div style="border-bottom: 1px solid #ddd; padding-bottom: 0.3rem"> <div
style="border-bottom: 0.0125rem solid #ddd; padding-bottom: 24px"
>
<div class="password">密码</div> <div class="password">密码</div>
<input <input
v-model="loginForm.password" v-model="loginForm.password"
@ -45,13 +52,16 @@
> >
</div> </div>
</div> </div>
</div>
<!-- 企业微信登录 --> <!-- 企业微信登录 -->
<van-button type="primary" @click="handleWxLogin" <van-button
type="primary"
@click="handleWxLogin"
style="left: 50%; transform: translateX(-50%)"
>企业微信登录</van-button >企业微信登录</van-button
> >
</div>
<!-- 图形验证码 --> <!-- 图形验证码 -->
<!-- <Verify ref="verify" :captcha-type="'blockPuzzle'" :img-size="{width:'10rem',height:'5rem'}" @success="handleLogin" /> --> <!-- <Verify ref="verify" :captcha-type="'blockPuzzle'" :img-size="{width:'800px',height:'400px'}" @success="handleLogin" /> -->
</div> </div>
</template> </template>
@ -61,6 +71,7 @@ import { getCaptchaEnable, getTenantEnable } from '@/utils/ruoyi'
import { getTenantIdByName } from '@/api/system/tenant' import { getTenantIdByName } from '@/api/system/tenant'
import { Wxlogin, sendCode } from '@/api/login' import { Wxlogin, sendCode } from '@/api/login'
import { setTenantId } from '@/utils/auth' import { setTenantId } from '@/utils/auth'
import { Toast } from 'vant'
export default { export default {
data() { data() {
return { return {
@ -79,6 +90,7 @@ export default {
tenantEnable: false, tenantEnable: false,
captchaEnable: false, captchaEnable: false,
isRemeber: false, isRemeber: false,
firstLogin: true,
} }
}, },
components: { components: {
@ -106,22 +118,44 @@ export default {
handleWxLogin() { handleWxLogin() {
// //
Wxlogin({ Wxlogin({
appid: 'ww844f700e3bdef940', // appid: 'ww844f700e3bdef940',
response_type: 'code', // response_type: 'code',
scope: 'snsapi_privateinfo', // scope: 'snsapi_privateinfo',
agentid: '1000002', // agentid: '1000002',
type: 30, // type: 30,
redirectUri: encodeURIComponent('http://expense-h5.lyrfp.com/#/login'), redirectUri: 'http://expense-h5.lyrfp.com/#/login',
}).then((res) => { }).then((res) => {
console.log(res)
window.location.href = res.data window.location.href = res.data
// let urlParams = new URLSearchParams(window.location.href.split('?')[1]) Toast.loading({
// let code = urlParams.get('code') duration: 1.5, // toast
forbidClick: true,
message: res.data + '1次',
})
let urlParams = new URLSearchParams(window.location.href.split('?')[1])
let code = urlParams.get('code')
let state = urlParams.get('state')
// // code // // code
// sendCode({ code }).then((res) => { sendCode({ code, state, type: 40 })
// //访 .then((res) => {
// console.log(res) Toast.loading({
// }) duration: 1.5, // toast
forbidClick: true,
message: res.code + 'code200',
})
//访
console.log(res, '用户敏感信息')
})
.catch((error) => {
Toast.loading({
duration: 1.5, // toast
forbidClick: true,
message: res.code + 'error500',
})
if (error.code == 500) {
this.$fm('首次登录请先账号密码登录绑定')
this.firstLogin = true
}
})
}) })
}, },
handleSetLoginInfo() { handleSetLoginInfo() {
@ -135,7 +169,7 @@ export default {
password, password,
} }
} else { } else {
window.localStorage.removeItem('loginInfo') window.localStorageNaNpxoveItem('loginInfo')
} }
}, },
handleSetTenantId() { handleSetTenantId() {
@ -161,7 +195,7 @@ export default {
if (val) { if (val) {
window.localStorage.setItem('isRemeber', true) window.localStorage.setItem('isRemeber', true)
} else { } else {
window.localStorage.removeItem('isRemeber') window.localStorageNaNpxoveItem('isRemeber')
} }
}, },
getCode() { getCode() {
@ -229,4 +263,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import './login.scss'; @import './login.scss';
.oo {
text-align: left;
}
</style> </style>

Loading…
Cancel
Save