From dbbf9e789e30e27cd2e26b3d1394e1d4487acbaa Mon Sep 17 00:00:00 2001
From: weipengfei <2187978347@qq.com>
Date: Thu, 7 Sep 2023 10:31:06 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug,=E8=B0=83=E6=95=B4?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/oaUser.js | 6 +++++-
components/companyFinance/companyFinance.vue | 9 +++++----
.../districtSelector/districtSelectorTow.vue | 20 +++++++++++++++++--
subpkg/companyInfo/companyInfo.vue | 4 +++-
subpkg/newPersonnel/newPersonnel.vue | 4 ++--
subpkg/orderDetail/orderDetail.vue | 2 +-
subpkg/personnel/personnel.vue | 1 +
subpkg/withdrawDeposit/withdrawDeposit.vue | 12 ++++++++---
8 files changed, 44 insertions(+), 14 deletions(-)
diff --git a/api/oaUser.js b/api/oaUser.js
index d685271..e594548 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)
-
/**
* 设置是否为队长
*/
diff --git a/components/companyFinance/companyFinance.vue b/components/companyFinance/companyFinance.vue
index 3d0382d..33b3bdc 100644
--- a/components/companyFinance/companyFinance.vue
+++ b/components/companyFinance/companyFinance.vue
@@ -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/subpkg/companyInfo/companyInfo.vue b/subpkg/companyInfo/companyInfo.vue
index 261b4e5..cfca9fb 100644
--- a/subpkg/companyInfo/companyInfo.vue
+++ b/subpkg/companyInfo/companyInfo.vue
@@ -93,7 +93,7 @@
-
+
@@ -153,6 +153,7 @@
},
onReachBottom() {
if (this.current == 1) this.loadCompanyList();
+ else if (this.current == 2) this.$refs.financeRef.loadList();
else if (this.current == 3) this.$refs.taskRef.loadList();
},
methods: {
@@ -212,6 +213,7 @@
},
onPullDownRefresh() {
if (this.current == 1) this.initLoad();
+ else if (this.current == 2) this.$refs.financeRef.initLoad();
else if (this.current == 3) this.$refs.taskRef.initLoadConfig();
this.$u.sleep(500).then(() => {
uni.stopPullDownRefresh()
diff --git a/subpkg/newPersonnel/newPersonnel.vue b/subpkg/newPersonnel/newPersonnel.vue
index 8188f72..8913172 100644
--- a/subpkg/newPersonnel/newPersonnel.vue
+++ b/subpkg/newPersonnel/newPersonnel.vue
@@ -296,8 +296,8 @@
upLoadImage
} from "@/api/file.js"
import {
- loginAdd
- } from "@/api/oaUser.js"
+ loginAdd,
+ } from "@/api/oaUser.js"
import districtSelector from "@/components/districtSelector/districtSelector.vue" //地区选择器
import districtSelectorTow from "@/components/districtSelector/districtSelectorTow.vue" //地区选择器
import { Toast } from "../../libs/uniApi"
diff --git a/subpkg/orderDetail/orderDetail.vue b/subpkg/orderDetail/orderDetail.vue
index dbb75b1..dcda432 100644
--- a/subpkg/orderDetail/orderDetail.vue
+++ b/subpkg/orderDetail/orderDetail.vue
@@ -75,7 +75,7 @@
},
loadConfig:{
page: 1,
- limit: 25,
+ limit: 15,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '没有更多账单了~~',
diff --git a/subpkg/personnel/personnel.vue b/subpkg/personnel/personnel.vue
index cc06a34..619b262 100644
--- a/subpkg/personnel/personnel.vue
+++ b/subpkg/personnel/personnel.vue
@@ -203,6 +203,7 @@