Merge branch 'main-20240105'

main
jwg 8 months ago
commit 4091e48054

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

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

@ -1120,7 +1120,7 @@ export default {
handleConfirmIe(arr, index, nIndex) { handleConfirmIe(arr, index, nIndex) {
console.log(arr, 'nIndex', nIndex) console.log(arr, 'nIndex', nIndex)
// 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],
'invoiceIds', 'invoiceIds',
arr arr
@ -1139,13 +1139,33 @@ export default {
this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex],
'invoiceName', '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) { handleConfirmIe1(arr, nIndex) {
// 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)
this.$set( /* this.$set(
this.form.expenseClaimDetails[nIndex], this.form.expenseClaimDetails[nIndex],
'invoiceCount', 'invoiceCount',
this.totalCount(arr) this.totalCount(arr)
@ -1154,6 +1174,16 @@ export default {
this.form.expenseClaimDetails[nIndex], this.form.expenseClaimDetails[nIndex],
'invoiceName', '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 { mapGetters, mapActions } from 'vuex'
import { getCaptchaEnable, getTenantEnable } from '@/utils/ruoyi' import { getCaptchaEnable, getTenantEnable } from '@/utils/ruoyi'
import { getTenantIdByName } from '@/api/system/tenant' import { getTenantIdByName } from '@/api/system/tenant'
import { Wxlogin } from '@/api/login' import { Wxlogin, sendCode } from '@/api/login'
import { setTenantId } from '@/utils/auth' import { setTenantId } from '@/utils/auth'
export default { export default {
data() { data() {
@ -104,9 +104,24 @@ export default {
}, },
methods: { methods: {
handleWxLogin() { 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) 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() { handleSetLoginInfo() {

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

Loading…
Cancel
Save