|
|
@@ -192,20 +192,11 @@ export default {
|
|
|
async onLoad(opt) {
|
|
|
this.isEdit = opt.isEdit?true:false;
|
|
|
this.id = opt.id;
|
|
|
- if(opt.saleNo){
|
|
|
- console.log(opt.saleNo)
|
|
|
- this.saleNo = opt.saleNo
|
|
|
- req.setStorage('saleNo',this.saleNo)
|
|
|
- }else{
|
|
|
- console.log(req.getStorage('saleNo'))
|
|
|
- opt.saleNo = req.getStorage('saleNo')
|
|
|
- this.saleNo = opt.saleNo
|
|
|
- }
|
|
|
|
|
|
await req.silenceLogin(opt.saleNo)
|
|
|
console.log('getUserCard')
|
|
|
+ await this.getUserInfo()
|
|
|
this.getUserCard()
|
|
|
- this.getEmploymentInfo()
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
@@ -214,13 +205,16 @@ export default {
|
|
|
req.getRequest('/api/user/info',{},res=>{
|
|
|
this.avatar = res.avatar;
|
|
|
this.phone = res.mobile;
|
|
|
+ this.saleNo = res.saleNo
|
|
|
+ req.setStorage('saleNo',this.saleNo)
|
|
|
+ // this.getEmploymentInfo()
|
|
|
resolve();
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
getEmploymentInfo(){
|
|
|
return new Promise((resolve,reject)=>{
|
|
|
- req.getRequest('/api/visiting/card/employmentInfo',{jobNumber:req.getStorage('userInfo').saleNo},res=>{
|
|
|
+ req.getRequest('/api/visiting/card/employmentInfo',{jobNumber:this.saleNo},res=>{
|
|
|
if(res.name){
|
|
|
this.employmentInfo = res;
|
|
|
this.realName = this.employmentInfo.name;
|
|
|
@@ -243,7 +237,7 @@ export default {
|
|
|
this.userCard = res
|
|
|
if(!res){
|
|
|
this.isEdit = true
|
|
|
- this.getUserInfo()
|
|
|
+ // this.getUserInfo()
|
|
|
}else{
|
|
|
if(!this.isEdit){
|
|
|
if(res.auditState==0){
|