补卡默认工地修改
parent
8951dfe254
commit
a27b093d7d
pagesA/signRecord
unpackage/dist/dev
.sourcemap/mp-weixin/pagesA/signRecord
mp-weixin/pagesA/signRecord
|
@ -130,8 +130,10 @@
|
|||
this.worksiteList = res.data.list;
|
||||
if(uni.getStorageSync('worksite_id')){
|
||||
this.worksiteIndex = this.worksiteList.findIndex(item=> item.id === uni.getStorageSync('worksite_id'));
|
||||
}else{
|
||||
}else if(uni.getStorageSync('baseWorksiteId')!==0){
|
||||
this.worksiteIndex = this.worksiteList.findIndex(item=> item.id === uni.getStorageSync('baseWorksiteId'));
|
||||
}else{
|
||||
this.worksiteIndex = -1;
|
||||
}
|
||||
this.isLoding = true;
|
||||
}
|
||||
|
@ -158,7 +160,7 @@
|
|||
submitEv(){
|
||||
let params = {
|
||||
day:this.curDate,
|
||||
worksite_id:this.worksiteList[this.worksiteIndex].id,
|
||||
worksite_id:this.worksiteIndex!==-1?this.worksiteList[this.worksiteIndex].id:0,
|
||||
type:this.radioList[this.radioIndex].type
|
||||
}
|
||||
this.$requst.post('/api/v1/user/replenish',params).then(res=>{
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -277,10 +277,12 @@ var _default = {
|
|||
_this.worksiteIndex = _this.worksiteList.findIndex(function (item) {
|
||||
return item.id === uni.getStorageSync('worksite_id');
|
||||
});
|
||||
} else {
|
||||
} else if (uni.getStorageSync('baseWorksiteId') !== 0) {
|
||||
_this.worksiteIndex = _this.worksiteList.findIndex(function (item) {
|
||||
return item.id === uni.getStorageSync('baseWorksiteId');
|
||||
});
|
||||
} else {
|
||||
_this.worksiteIndex = -1;
|
||||
}
|
||||
_this.isLoding = true;
|
||||
}
|
||||
|
@ -305,7 +307,7 @@ var _default = {
|
|||
var _this2 = this;
|
||||
var params = {
|
||||
day: this.curDate,
|
||||
worksite_id: this.worksiteList[this.worksiteIndex].id,
|
||||
worksite_id: this.worksiteIndex !== -1 ? this.worksiteList[this.worksiteIndex].id : 0,
|
||||
type: this.radioList[this.radioIndex].type
|
||||
};
|
||||
this.$requst.post('/api/v1/user/replenish', params).then(function (res) {
|
||||
|
|
Loading…
Reference in New Issue