|
@@ -139,15 +139,15 @@ Page({
|
|
|
hidden: true,
|
|
|
storeName: '',
|
|
|
storePhone: '',
|
|
|
+ inputName: '',
|
|
|
+ inputPhone: '',
|
|
|
});
|
|
|
},
|
|
|
/**
|
|
|
* 提交
|
|
|
*/
|
|
|
confirm: function(){
|
|
|
- this.setData({
|
|
|
- hidden: false
|
|
|
- });
|
|
|
+ let that = this
|
|
|
var resName = this.data.inputName;
|
|
|
var resPhone = this.data.inputPhone;
|
|
|
if(resName == null || resName =='' || resName == undefined){
|
|
@@ -169,7 +169,17 @@ Page({
|
|
|
duration: 1500
|
|
|
})
|
|
|
} else {
|
|
|
- this.goAddStaff(resName,resPhone);
|
|
|
+ this.setData({
|
|
|
+ hidden: true
|
|
|
+ });
|
|
|
+ wx.showToast({
|
|
|
+ title: '新增店员已提交',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 1500,
|
|
|
+ success: function(){
|
|
|
+ that.goAddStaff(resName,resPhone);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -210,17 +220,14 @@ Page({
|
|
|
storeNo: that.data.storeNo,
|
|
|
staffName: resName,
|
|
|
staffMobile: resPhone,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ that.cancel();
|
|
|
+ that.getStoreStaffList();
|
|
|
+ }
|
|
|
+ }).catch(_ => {
|
|
|
+ console.log(_)
|
|
|
});
|
|
|
- that.cancel();
|
|
|
- wx.showToast({
|
|
|
- title: '新增店员已提交',
|
|
|
- icon: 'none',
|
|
|
- duration: 1500,
|
|
|
- success: function(){
|
|
|
- that.getStoreStaffList();
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
},
|
|
|
|
|
|
/**
|