manager update

master
james.zhao 6 years ago
parent c9d3368242
commit 36f22ebabb

@ -24,6 +24,8 @@ public class ManagerInfo {
@Email
private String email;
private String phone;
@JSONField(name = "nation_code")
private String nationCode;
private String wechat;
private boolean admin;
private boolean operator;
@ -58,6 +60,7 @@ public class ManagerInfo {
}
account.put("email", email);
account.put("phone", phone);
account.put("nation_code", "+"+nationCode);
account.put("wechat", wechat);
int role = 0;
if (admin) {
@ -296,4 +299,12 @@ public class ManagerInfo {
public void setSalesmanager(boolean salesmanager) {
this.salesmanager = salesmanager;
}
public String getNationCode() {
return nationCode;
}
public void setNationCode(String nationCode) {
this.nationCode = nationCode;
}
}

@ -14,6 +14,7 @@
SELECT m.manager_id,
m.org_id,
m.display_name,
SUBSTRING(m.nation_code,2) nation_code,
m.username,m.role,m.is_valid,m.create_time,m.last_login,o.name org_name,
m.email,m.phone,m.wechat,m.wx_openid,
co.headimg,
@ -102,4 +103,4 @@
</select>
</mapper>
</mapper>

@ -141,6 +141,7 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
app.controller('newManagerDialogCtrl', ['$scope', '$http', function ($scope, $http) {
$scope.params = {};
$scope.manager = {};
$scope.manager.nation_code = 61;
if(($scope.currentUser.role & parseInt('1000000000000', 2)) > 0 && $scope.currentUser.org_id){
var params = angular.copy($scope.params);
params.org_id = $scope.currentUser.org_id;
@ -208,4 +209,4 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
}
}]);
return app;
});
});

@ -37,8 +37,30 @@
</div>
<div class="form-group">
<label class="control-label" for="phone-input">Phone</label>
<input class="form-control" type="text" id="phone-input" name="phone"
ng-model="manager.phone">
<div>
<div class="col-md-4">
<div class="input-group">
<div class="input-group-addon">+</div>
<input class="form-control" required type="text"
ng-model="manager.nation_code"
name="nation_code" id="nation_code"
maxlength="3" minlength="1"
placeholder="country code">
</div>
<div ng-messages="accountForm.nation_code.$error"
ng-if="accountForm.nation_code.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less
Than 3 Characters</p>
</div>
</div>
<div class="col-md-8">
<input class="form-control" type="text" id="phone-input" name="phone"
ng-model="manager.phone">
</div>
</div>
</div>
<div class="form-group">
<label class="control-label" for="wechat-input">WeChat Account</label>
@ -130,4 +152,4 @@
<div class="btn-group">
<button class="btn btn-danger" type="button" ng-click="$dismiss()">Cancel</button>
</div>
</div>
</div>

@ -43,8 +43,30 @@
</div>
<div class="form-group" ng-class="{'has-error':accountForm.phone.$invalid && accountForm.phone.$dirty}">
<label class="control-label" for="phone-input">Phone</label>
<input class="form-control" type="text" id="phone-input" name="phone"
ng-model="manager.phone">
<div>
<div class="col-md-4">
<div class="input-group">
<div class="input-group-addon">+</div>
<input class="form-control" required type="text"
ng-model="manager.nation_code"
name="nation_code" id="nation_code"
maxlength="3" minlength="1"
placeholder="country code">
</div>
<div ng-messages="accountForm.nation_code.$error"
ng-if="accountForm.nation_code.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less
Than 3 Characters</p>
</div>
</div>
<div class="col-md-8">
<input class="form-control" type="text" id="phone-input" name="phone"
ng-model="manager.phone">
</div>
</div>
</div>
<div class="form-group" ng-class="{'has-error':accountForm.wechat.$invalid && accountForm.wechat.$dirty}">
<label class="control-label" for="wechat-input">WeChat Account</label>
@ -140,4 +162,4 @@
<div class="btn-group">
<button class="btn btn-danger" type="button" ng-click="$dismiss()">Cancel</button>
</div>
</div>
</div>

@ -2528,6 +2528,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
app.controller('partnerAddAccountDialogCtrl', ['$scope', '$http', 'partner', function ($scope, $http, partner) {
$scope.account = {role: 1};
$scope.partnerRoles = partnerRoles;
$scope.account.nation_code = 61;
$scope.saveAccount = function (form) {
if (form.$invalid) {
angular.forEach(form, function (item, key) {

Loading…
Cancel
Save