Merge branch 'main-20240105'

main
jwg 8 months ago
commit 19f9d69416

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

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

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

@ -116,6 +116,88 @@
isCell
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 class="section mt5"><span class="line"> </span>附件</div>
@ -383,17 +465,43 @@
label="关联发票"
clear-trigger="always"
input-align="right"
placeholder="请关联"
:placeholder="
nitem.invoiceCount > 0 ? '已关联发票' : '请关联'
"
/>
</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"
:list="nitem.ieList"
:temClaimNo="form.claimNo"
:invoiceIds="nitem.invoiceIds"
@onCancel="nitem.show = false"
:isOpen="nitem.show"
@onConfirm="handleConfirmIe($event, index, nIndex)"
@onConfirm="
(arr) => {
handleConfirmIe(arr, index, nIndex)
}
"
/>
</div>
</div>
@ -547,7 +655,7 @@
type="textarea"
/>
<div @click="handleShowIe1(nIndex)">
<van-field
<!-- <van-field
disabled
:class="
nitem.invoiceName ? 'actived-disabled tag-blue' : 'tag-blue'
@ -562,8 +670,46 @@
placeholder="请关联"
/>
</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
:disabled="disabled"
:list="nitem.ieList"
:invoiceIds="nitem.invoiceIds"
@onCancel="nitem.show = false"
@ -602,7 +748,6 @@
>
</div>
</div>
<!-- 日常费用列表结束 -->
<div class="section mt5" v-if="['show'].includes(typeStr)">
<span class="line"> </span>审批流程
@ -612,6 +757,7 @@
:processInstanceId="form.processInstanceId"
@onSetId="handleSetAccessId"
/>
<!-- 申请单关联 -->
<div class="section mt5"><span class="line"> </span>申请单关联</div>
<RePick
@ -794,6 +940,7 @@ export default {
},
],
},
times: null,
}
},
//
@ -1091,12 +1238,13 @@ export default {
})
},
handleShowIe(type, index, nIndex) {
if (this.disabled) return
// if (this.disabled) return
// this.indexOne = index
// this.indexTwo = nIndex
// this.claimType = type
// 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],
'show',
@ -1108,7 +1256,7 @@ export default {
// })
},
handleShowIe1(nIndex) {
if (this.disabled) return
// if (this.disabled) return
// let obj = this.form.expenseClaimDetails[nIndex]
// this.$set(this.form.expenseClaimDetails[nIndex], 'ieList', arr)
@ -1118,7 +1266,7 @@ export default {
// })
},
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('')
/* this.$set(
this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex],
@ -1162,6 +1310,7 @@ export default {
)
},
handleConfirmIe1(arr, nIndex) {
console.log(arr)
// 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)
@ -1466,6 +1615,8 @@ export default {
disabled: item.status != 2 ? true : false,
}
})
console.log(this.expenseApplyList)
console.log('dkldsjlkdsjl')
resolve()
this.$loading(false)
})

@ -1,5 +1,10 @@
<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-header">
<div class="darg-header-title">设置</div>
@ -15,14 +20,27 @@
</div>
</div>
<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="list-title">{{item.title}}</div>
<div class="list-title">{{ item.title }}</div>
<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 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" /> -->
</div>
</div>
@ -40,16 +58,16 @@ export default {
props: {
isOpen: {
default: false,
type: Boolean
type: Boolean,
},
quickName: String,
btnListProp: Array
btnListProp: Array,
},
components: { draggable },
data() {
return {
isDialog: false,
btnList: []
btnList: [],
}
},
watch: {
@ -62,30 +80,32 @@ export default {
btnListProp: {
handler(val) {
if (val) {
this.btnList = val.map(item => {
this.btnList = val.map((item) => {
return { ...item }
})
}
},
immediate: true,
deep: true
}
deep: true,
},
},
methods: {
...mapActions('common/db', ['set']),
handleDrag() {
const list = this.btnList.map((item, index) => {
item.num = index
return item
}).sort((a, b) => a.num < b.num)
const list = this.btnList
.map((item, index) => {
item.num = index
return item
})
.sort((a, b) => a.num < b.num)
this.set({
argu: this.quickName,
value: list,
user: true
user: true,
})
this.$emit('onDealBtnList', list)
}
}
},
},
}
</script>

@ -7,20 +7,27 @@
<div class="logo-text logo-text-new">OA办公每一天都高效</div>
<div class="round"></div>
</div>
<div style="width: 90%; z-index: 10">
<!-- 密码登录 -->
<div v-if="firstLogin" style="width: 90%; z-index: 10">
<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>
<input
v-model="loginForm.tenantName"
placeholder="请输入企业名称"
/>
</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>
<input v-model="loginForm.username" placeholder="请输入用户名" />
</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>
<input
v-model="loginForm.password"
@ -45,13 +52,16 @@
>
</div>
</div>
<!-- 企业微信登录 -->
<van-button type="primary" @click="handleWxLogin"
>企业微信登录</van-button
>
</div>
<!-- 企业微信登录 -->
<van-button
type="primary"
@click="handleWxLogin"
style="left: 50%; transform: translateX(-50%)"
>企业微信登录</van-button
>
<!-- 图形验证码 -->
<!-- <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>
</template>
@ -61,6 +71,7 @@ import { getCaptchaEnable, getTenantEnable } from '@/utils/ruoyi'
import { getTenantIdByName } from '@/api/system/tenant'
import { Wxlogin, sendCode } from '@/api/login'
import { setTenantId } from '@/utils/auth'
import { Toast } from 'vant'
export default {
data() {
return {
@ -79,6 +90,7 @@ export default {
tenantEnable: false,
captchaEnable: false,
isRemeber: false,
firstLogin: true,
}
},
components: {
@ -106,22 +118,44 @@ export default {
handleWxLogin() {
//
Wxlogin({
appid: 'ww844f700e3bdef940',
response_type: 'code',
scope: 'snsapi_privateinfo',
agentid: '1000002',
type: 30,
redirectUri: encodeURIComponent('http://expense-h5.lyrfp.com/#/login'),
// appid: 'ww844f700e3bdef940',
// response_type: 'code',
// scope: 'snsapi_privateinfo',
// agentid: '1000002',
// type: 30,
redirectUri: 'http://expense-h5.lyrfp.com/#/login',
}).then((res) => {
console.log(res)
window.location.href = res.data
// let urlParams = new URLSearchParams(window.location.href.split('?')[1])
// let code = urlParams.get('code')
Toast.loading({
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
// sendCode({ code }).then((res) => {
// //访
// console.log(res)
// })
sendCode({ code, state, type: 40 })
.then((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() {
@ -135,7 +169,7 @@ export default {
password,
}
} else {
window.localStorage.removeItem('loginInfo')
window.localStorageNaNpxoveItem('loginInfo')
}
},
handleSetTenantId() {
@ -161,7 +195,7 @@ export default {
if (val) {
window.localStorage.setItem('isRemeber', true)
} else {
window.localStorage.removeItem('isRemeber')
window.localStorageNaNpxoveItem('isRemeber')
}
},
getCode() {
@ -229,4 +263,7 @@ export default {
<style lang="scss" scoped>
@import './login.scss';
.oo {
text-align: left;
}
</style>

Loading…
Cancel
Save