diff --git a/public/index.html b/public/index.html index 7820691..6d816c6 100644 --- a/public/index.html +++ b/public/index.html @@ -50,6 +50,7 @@ }) initHtml() document.body.addEventListener('touchstart', function () {}) + diff --git a/src/api/login.js b/src/api/login.js index d92e87f..38c0f22 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -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 }) diff --git a/src/components/ConnectInvoice/index.vue b/src/components/ConnectInvoice/index.vue index 2f6c63b..0070532 100644 --- a/src/components/ConnectInvoice/index.vue +++ b/src/components/ConnectInvoice/index.vue @@ -42,7 +42,13 @@ :key="index" >
+ 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) diff --git a/src/views/company/claim/index.vue b/src/views/company/claim/index.vue index 9a8ba47..9302f8f 100644 --- a/src/views/company/claim/index.vue +++ b/src/views/company/claim/index.vue @@ -116,6 +116,88 @@ isCell clearable /> +
附件
@@ -383,17 +465,43 @@ label="关联发票" clear-trigger="always" input-align="right" - placeholder="请关联" + :placeholder=" + nitem.invoiceCount > 0 ? '已关联发票' : '请关联' + " /> + + @@ -547,7 +655,7 @@ type="textarea" />
-
+ +
+ 费用明细超出费控设置金额,费控设置金额为:{{ + handleCountAmount(form.expenseClaimDetails) + }} --> + +
-
审批流程 @@ -612,6 +757,7 @@ :processInstanceId="form.processInstanceId" @onSetId="handleSetAccessId" /> +
申请单关联
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) }) diff --git a/src/views/home/components/QuickMenu.vue b/src/views/home/components/QuickMenu.vue index 218e7f5..b66ec2c 100644 --- a/src/views/home/components/QuickMenu.vue +++ b/src/views/home/components/QuickMenu.vue @@ -1,5 +1,10 @@ @@ -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 {