修复bug,调整功能
This commit is contained in:
parent
edab952d33
commit
dbbf9e789e
@ -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)
|
||||
|
||||
|
||||
/**
|
||||
* 设置是否为队长
|
||||
*/
|
||||
|
@ -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;
|
||||
|
@ -18,7 +18,7 @@
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
<u-form-item label="小队" :required="!readonly" prop="brigade" @click="changeCity('brigade')" borderBottom>
|
||||
<u--input :value="formDataText.brigade" disabled disabledColor="#fff" placeholder="请选择小队"></u--input>
|
||||
<u--input :value="formDataText.brigade" style="pointer-events: none;" disabled disabledColor="#fff" placeholder="请选择小队"></u--input>
|
||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
@ -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 = '';
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
|
@ -93,7 +93,7 @@
|
||||
<!-- <u-button class="btns" type="primary" icon="plus" text="新建签约"></u-button> -->
|
||||
</view>
|
||||
<view class="company_info" v-show="current==2">
|
||||
<companyFinance></companyFinance>
|
||||
<companyFinance ref="financeRef"></companyFinance>
|
||||
</view>
|
||||
<view v-show="current==3">
|
||||
<task ref="taskRef" style="width: 100vw;"></task>
|
||||
@ -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()
|
||||
|
@ -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"
|
||||
|
@ -75,7 +75,7 @@
|
||||
},
|
||||
loadConfig:{
|
||||
page: 1,
|
||||
limit: 25,
|
||||
limit: 15,
|
||||
loadingText: '努力加载中',
|
||||
loadmoreText: '轻轻上拉',
|
||||
nomoreText: '没有更多账单了~~',
|
||||
|
@ -203,6 +203,7 @@
|
||||
<style lang="scss">
|
||||
.personnel {
|
||||
padding: 28rpx 0;
|
||||
padding-bottom: 160rpx;
|
||||
.new_btn {
|
||||
position: fixed;
|
||||
bottom: 30rpx;
|
||||
|
@ -11,7 +11,8 @@
|
||||
</view>
|
||||
<view class="item">
|
||||
<text>可用余额</text>
|
||||
<text>{{$store.state.app.userInfo.user_money||'0.00'}}元</text>
|
||||
<text>{{company_money||'0.00'}}元</text>
|
||||
<!-- <text>{{$store.state.app.userInfo.user_money||'0.00'}}元</text> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -43,6 +44,7 @@
|
||||
return {
|
||||
priceList: ['10元','50元','100元','500元','1000元','5000元','全部', '自定义'],
|
||||
changeMoney: -1,
|
||||
company_money: "0.00",
|
||||
payMoney: {
|
||||
money: ''
|
||||
},
|
||||
@ -58,8 +60,12 @@
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {},
|
||||
onLoad() {
|
||||
const eventChannel = this.getOpenerEventChannel();
|
||||
eventChannel.on('company_money', (e)=>{
|
||||
this.company_money = e.company_money;
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
copyPhone(str = "") {
|
||||
uni.setClipboardData({
|
||||
|
Loading…
x
Reference in New Issue
Block a user