|
...
|
...
|
@@ -17,15 +17,32 @@ Page({ |
|
|
|
defineremark:util.trim(e.detail.value)
|
|
|
|
})
|
|
|
|
},
|
|
|
|
//选择常用备注
|
|
|
|
taplabel:function(e){
|
|
|
|
var _target=e.currentTarget.dataset;
|
|
|
|
var mylabel=this.data.mylabel;
|
|
|
|
console.log(_target.id,_target.type);
|
|
|
|
this.setlabel(_target.id,_target.type);
|
|
|
|
var oftenlabel=0,alllabel=this.data.alllabel;
|
|
|
|
alllabel.forEach(function(v,i){
|
|
|
|
if(v.often_use!=''){
|
|
|
|
oftenlabel++;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
if(_target.type=='often'){
|
|
|
|
this.setlabel(_target.id,_target.type);
|
|
|
|
}else{
|
|
|
|
if(oftenlabel<10){
|
|
|
|
this.setlabel(_target.id,_target.type);
|
|
|
|
}else{
|
|
|
|
wx.showToast({
|
|
|
|
title:'最多可添加10个',
|
|
|
|
icon:'none',
|
|
|
|
duration:2000
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
getlabellist:function(){
|
|
|
|
App.User.GetCustomRemark({
|
|
|
|
uid:util.cache('enter_params')['manager_id']
|
|
|
|
uid:util.cache('enter_params')['manage_id']
|
|
|
|
}).then(res=>{
|
|
|
|
console.log(res)
|
|
|
|
this.setData({
|
|
...
|
...
|
@@ -38,7 +55,7 @@ Page({ |
|
|
|
},
|
|
|
|
setlabel:function(id,flag){
|
|
|
|
App.User.GetCustomRemark({
|
|
|
|
uid:util.cache('enter_params')['manager_id'],
|
|
|
|
uid:util.cache('enter_params')['manage_id'],
|
|
|
|
kid:id,
|
|
|
|
flag:flag,
|
|
|
|
}).then(res=>{
|
|
...
|
...
|
@@ -60,7 +77,7 @@ Page({ |
|
|
|
//添加自定义标签
|
|
|
|
addlabel:function(custom){
|
|
|
|
App.User.AddCustomRemark({
|
|
|
|
uid:util.cache('enter_params')['manager_id'],
|
|
|
|
uid:util.cache('enter_params')['manage_id'],
|
|
|
|
custom:custom,
|
|
|
|
}).then(res=>{
|
|
|
|
console.log(res)
|
|
...
|
...
|
@@ -69,6 +86,15 @@ Page({ |
|
|
|
defineremark:null,
|
|
|
|
})
|
|
|
|
this.getlabellist();
|
|
|
|
}else{
|
|
|
|
this.setData({
|
|
|
|
defineremark:null,
|
|
|
|
})
|
|
|
|
wx.showToast({
|
|
|
|
title:'最多可添加20个备注',
|
|
|
|
icon:'none',
|
|
|
|
duration:2000
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
...
|
...
|
|