diff --git a/App.vue b/App.vue index 77ceb18..6dc2038 100644 --- a/App.vue +++ b/App.vue @@ -2,7 +2,7 @@ //#ifdef APP-PLUS const jpushModule = uni.requireNativePlugin("JG-JPush"); // #endif - import { loginShopAccount } from "@/api/oaUser.js" + import { loginShopAccount, userInfo } from "@/api/oaUser.js" export default { onLaunch: async function(info) { // let noticeArr = [] @@ -33,10 +33,13 @@ user: data, token: res.data.token }) + this.$store.dispatch('initConfig'); let { data } = await userInfo(); this.$store.commit('setUserInfo', data); + // uni.$emit('home_initUserInfo', data); + return ; }catch(e){ console.log(e); } diff --git a/api/oaUser.js b/api/oaUser.js index d685271..f298d6c 100644 --- a/api/oaUser.js +++ b/api/oaUser.js @@ -25,6 +25,11 @@ export const userInfo = (data) => oahttp.get('/user/info', data) */ export const changePassword = (data) => oahttp.post('/user/changePassword', data) +/** + * 获取当前公司已创建的小队 + */ +export const userCompanyBrigade = (data) => oahttp.get('/user/company_brigade', data) + /** * 新增人员 */ @@ -35,7 +40,6 @@ export const loginAdd = (data) => oahttp.post('/login/add', data) */ export const userSetInfo = (data) => oahttp.post('/user/setInfo', data) - /** * 设置是否为队长 */ @@ -64,4 +68,4 @@ export const destroyAccount = (data) => oahttp.post('/user/destroy_account', dat /** * 商城登录 */ -export const loginShopAccount = (data) => oahttp.post('/login/shop_account', data) +export const loginShopAccount = (data) => oahttp.post('/login/shop_account', data, { noAuth: true }) diff --git a/components/companyFinance/companyFinance.vue b/components/companyFinance/companyFinance.vue index b6666ad..33b3bdc 100644 --- a/components/companyFinance/companyFinance.vue +++ b/components/companyFinance/companyFinance.vue @@ -2,7 +2,7 @@ - 履约保证总金额(元) + 押金(元) {{cCount(+company.deposit)}} 0.00 @@ -115,8 +115,9 @@ }); uni.navigateTo({ url: url, - success() { - uni.hideLoading() + success:(res)=> { + uni.hideLoading(); + res.eventChannel.emit('company_money', { company_money: this.company.company_money }) } }) }else Toast('暂未开放') @@ -125,9 +126,9 @@ this.loadConfig.page = 1; this.loadConfig.status = "loadmore"; this.list = []; - this.initList(); + this.loadList(); }, - async initList() { + async loadList() { if (this.loadConfig.status == "nomore") return; this.loadConfig.status = "loading"; let res; diff --git a/components/districtSelector/districtSelectorTow.vue b/components/districtSelector/districtSelectorTow.vue index 8218591..915fbb0 100644 --- a/components/districtSelector/districtSelectorTow.vue +++ b/components/districtSelector/districtSelectorTow.vue @@ -18,7 +18,7 @@ - + @@ -36,6 +36,9 @@ commonVillage, commonBrigade } from "@/api/oaPbulic.js" + import { + userCompanyBrigade + } from "@/api/oaUser.js" import { Toast } from "../../libs/uniApi" @@ -163,7 +166,10 @@ changeCity(type, toast=false) { if(toast) return Toast('不可修改该区域') if (this.$props.readonly) return ; - if (this[type + 'List'].length == 0) return Toast('请先选择上一级地区'); + if (this[type + 'List'].length == 0) { + if(type=='brigade') return Toast('小队已经建立完毕'); + return Toast('请先选择上一级地区'); + } this.changeType = type; this.showProvince = true; }, @@ -229,10 +235,20 @@ commonBrigade({ brigade: code }).then(res => { + // 过滤掉不能选择的小队,只能选择本公司负责的小队 let f_arr = this.$store.state.app.userInfo.company?.responsible_area?.split(',')||[]; this.brigadeList = res.data.filter(item=>{ return f_arr.find(t=>item.id==t); }); + // 过滤掉公司已经创建的小队 + userCompanyBrigade().then((e)=>{ + this.brigadeList = this.brigadeList.filter(item=>{ + return !e.data.find(t=>t==item.id); + }) + this.formData.brigade = ''; + this.formDataRead.brigade = ''; + this.formDataText.brigade = ''; + }) }) }, } diff --git a/components/newArchives/banquetBirthday.vue b/components/newArchives/banquetBirthday.vue index 6f40702..f4a7ba2 100644 --- a/components/newArchives/banquetBirthday.vue +++ b/components/newArchives/banquetBirthday.vue @@ -1,61 +1,88 @@ - \ No newline at end of file diff --git a/components/newArchives/deepProcessing.vue b/components/newArchives/deepProcessing.vue index aabf1e7..b07e573 100644 --- a/components/newArchives/deepProcessing.vue +++ b/components/newArchives/deepProcessing.vue @@ -1,183 +1,202 @@ \ No newline at end of file diff --git a/components/newArchives/houseRenovate.vue b/components/newArchives/houseRenovate.vue index 4d74f45..2609004 100644 --- a/components/newArchives/houseRenovate.vue +++ b/components/newArchives/houseRenovate.vue @@ -1,133 +1,164 @@ - - - - - \ No newline at end of file diff --git a/components/newArchives/houseRepair.vue b/components/newArchives/houseRepair.vue index 7ed750e..b7178f1 100644 --- a/components/newArchives/houseRepair.vue +++ b/components/newArchives/houseRepair.vue @@ -1,66 +1,103 @@ \ No newline at end of file diff --git a/components/newArchives/houseTransaction.vue b/components/newArchives/houseTransaction.vue index 789f666..003c79e 100644 --- a/components/newArchives/houseTransaction.vue +++ b/components/newArchives/houseTransaction.vue @@ -1,57 +1,84 @@ \ No newline at end of file diff --git a/components/newArchives/store.vue b/components/newArchives/store.vue index 3616408..839343c 100644 --- a/components/newArchives/store.vue +++ b/components/newArchives/store.vue @@ -1,15 +1,9 @@