Merge branch 'main-20240105'

main
jwg 7 months ago
commit 4091e48054

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

@ -42,7 +42,11 @@
:key="index"
>
<div class="new-lf">
<van-checkbox v-model="item.checked" shape="square"></van-checkbox>
<van-checkbox
v-model="item.checked"
shape="square"
@change="handleSetCheck(index, item, true)"
></van-checkbox>
<!-- <van-image @click="handleShowImg(item)" width="2.5rem" height="2.5rem" src="https://img01.yzcdn.cn/vant/cat.jpeg" /> -->
</div>
<div
@ -233,14 +237,21 @@ export default {
// }
},
methods: {
handleSetCheck(index) {
handleSetCheck(index, item, type) {
// this.tableList
let _this = this
this.$set(
/* this.$set(
this.tableList[index],
'checked',
!this.tableList[index].checked
)
) */
if (!type) {
this.$set(
this.tableList[index],
'checked',
!this.tableList[index].checked
)
}
if (this.tableList[index].checked) {
if (!_this.invoiceIdsCopy.hasOwnProperty(_this.invoiceType)) {
_this.invoiceIdsCopy[_this.invoiceType] = []

@ -1120,7 +1120,7 @@ export default {
handleConfirmIe(arr, index, nIndex) {
console.log(arr, 'nIndex', nIndex)
// 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],
'invoiceIds',
arr
@ -1139,13 +1139,33 @@ export default {
this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex],
'invoiceName',
'已关联发票'
) */
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) == 0 ? '' : this.totalCount(arr)
)
this.$set(
this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex],
'invoiceName',
this.totalCount(arr) == 0 ? '请关联' : '已关联发票'
)
},
handleConfirmIe1(arr, nIndex) {
// 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.$set(
this.form.expenseClaimDetails[nIndex],
'invoiceCount',
this.totalCount(arr)
@ -1154,6 +1174,16 @@ export default {
this.form.expenseClaimDetails[nIndex],
'invoiceName',
'已关联发票'
) */
this.$set(
this.form.expenseClaimDetails[nIndex],
'invoiceCount',
this.totalCount(arr) == 0 ? '' : this.totalCount(arr)
)
this.$set(
this.form.expenseClaimDetails[nIndex],
'invoiceName',
this.totalCount(arr) == 0 ? '请关联' : '已关联发票'
)
},

@ -59,7 +59,7 @@
import { mapGetters, mapActions } from 'vuex'
import { getCaptchaEnable, getTenantEnable } from '@/utils/ruoyi'
import { getTenantIdByName } from '@/api/system/tenant'
import { Wxlogin } from '@/api/login'
import { Wxlogin, sendCode } from '@/api/login'
import { setTenantId } from '@/utils/auth'
export default {
data() {
@ -104,9 +104,24 @@ export default {
},
methods: {
handleWxLogin() {
Wxlogin({ type: 30, redirectUri: '/home' }).then((res) => {
//
Wxlogin({
appid: 'ww844f700e3bdef940',
response_type: 'code',
scope: 'snsapi_privateinfo',
agentid: '1000002',
type: 30,
redirectUri: encodeURIComponent('http://expense-h5.lyrfp.com/#/login'),
}).then((res) => {
console.log(res)
window.location.href = res.data
// window.location.href = res.data
// let urlParams = new URLSearchParams(window.location.href.split('?')[1])
// let code = urlParams.get('code')
// // code
// sendCode({ code }).then((res) => {
// //访
// console.log(res)
// })
})
},
handleSetLoginInfo() {

@ -23,8 +23,8 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy
['/proxy-api']: {
// target: `http://localhost:48080`,
// target: `http://192.168.3.81:48080`,
target: `http://192.168.3.243:48080`,
target: `http://192.168.3.81:48080`,
// target: `http://192.168.3.243:48080`,
// target: `http://api-dashboard.yudao.iocoder.cn`,
changeOrigin: true,
pathRewrite: {

Loading…
Cancel
Save