|
@ -23,6 +23,9 @@
|
|
|
$name: $('#inp_name'),
|
|
|
$mobile: $('#inp_mobile'),
|
|
|
$type: $("#inp_type"),
|
|
|
$jobNo:$("#inp_jobNo"),
|
|
|
$seat:$("#inp_seat"),
|
|
|
$phone:$("#inp_phone"),
|
|
|
//$roles:$("#inp_roles"),
|
|
|
$organization: $("#inp_organizationId"),
|
|
|
init: function () {
|
|
@ -35,15 +38,21 @@
|
|
|
data: [
|
|
|
{text: '管理员', typeId: '1'},
|
|
|
{text: '医生', typeId: '2'},
|
|
|
{text: '客服管理员', typeId: '3'},
|
|
|
{text: '普通客服', typeId: '4'},
|
|
|
{text: '其他', typeId: '0'}
|
|
|
],
|
|
|
initIsTriggerEvent: false,
|
|
|
valueField: 'typeId',
|
|
|
|
|
|
});
|
|
|
this.$jobNo.ligerTextBox({width: 240});
|
|
|
this.$seat.ligerTextBox({width: 240});
|
|
|
this.$phone.ligerTextBox({width: 240});
|
|
|
},
|
|
|
initForm: function () {
|
|
|
_this = this;
|
|
|
this.bindEvents();
|
|
|
//修改、查看
|
|
|
if (isNoEmpty(id) && id != 0) {
|
|
|
$.ajax({
|
|
@ -65,6 +74,9 @@
|
|
|
code: data.code,
|
|
|
name: data.name,
|
|
|
mobile: data.mobile,
|
|
|
jobNo:data.jobNo,
|
|
|
seat:data.seat,
|
|
|
phone:data.phone
|
|
|
});
|
|
|
_this.typeBox.selectValue(data.type);
|
|
|
} else {
|
|
@ -89,7 +101,6 @@
|
|
|
$("#btn_save_close").css("display", "block");
|
|
|
}
|
|
|
this.$form.show();
|
|
|
this.bindEvents();
|
|
|
},
|
|
|
|
|
|
//绑定事件
|
|
@ -153,13 +164,25 @@
|
|
|
|
|
|
var self = this;
|
|
|
$("#btn_save").click(function () {
|
|
|
var values = self.$form.Fields.getValues();
|
|
|
if (!validator.validate()) {
|
|
|
return;
|
|
|
}
|
|
|
values.type = self.typeBox.getValue();
|
|
|
update(values);
|
|
|
});
|
|
|
var values = self.$form.Fields.getValues();
|
|
|
if (!validator.validate()) {
|
|
|
return;
|
|
|
}
|
|
|
values.type = self.typeBox.getValue();
|
|
|
update(values);
|
|
|
});
|
|
|
|
|
|
$("#inp_type").change(function () {
|
|
|
var val = self.typeBox.getValue();
|
|
|
if(val==3||val==4){
|
|
|
$("#customer").show();
|
|
|
}else{
|
|
|
$("#customer").hide();
|
|
|
}
|
|
|
debugger
|
|
|
});
|
|
|
|
|
|
|
|
|
function update(values) {
|
|
|
var dataModel = $.DataModel.init();
|
|
|
var url = "update";
|