|
@ -4,16 +4,12 @@
|
|
|
(function ($, win) {
|
|
|
$(function () {
|
|
|
var Util = $.Util;
|
|
|
var id = $('#inp_id').val();
|
|
|
var deviceInfo = "";
|
|
|
var jValidation = $.jValidation;
|
|
|
var deviceCodeOld = '';
|
|
|
|
|
|
function pageInit() {
|
|
|
deviceInfo.init();
|
|
|
if (id) {
|
|
|
deviceInfo.initForm();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
deviceInfo = {
|
|
@ -38,91 +34,36 @@
|
|
|
$("#inp_deviceModel").ligerTextBox({width: 240})//设备型号
|
|
|
$("#inp_deviceCode").ligerTextBox({width: 240})//设备唯一标识
|
|
|
$("#inp_sim").ligerTextBox({width: 240})//设备sim码
|
|
|
$("#inp_manufacturer").ligerTextBox({width: 240})//厂家名称
|
|
|
//$("#inp_manufacturer").ligerTextBox({width: 240})//厂家名称
|
|
|
$("#inp_address").ligerTextBox({width: 240})//厂家地址
|
|
|
$("#inp_representative").ligerTextBox({width: 240})//法人代表
|
|
|
$("#inp_applicantName").ligerTextBox({width: 240})//申请注册人
|
|
|
$("#inp_applicantIdentity").ligerTextBox({width: 240})//申请人身份证号
|
|
|
$("#inp_applicantTel").ligerTextBox({width: 240})//申请人手机
|
|
|
$("#inp_applicantMail").ligerTextBox({width: 240})//申请人邮箱
|
|
|
$("#sel_manufacturer").ligerComboBox({
|
|
|
data: [
|
|
|
{text: '三诺生物传感股份有限公司', id: 'threeNod'},
|
|
|
{text: '深圳市优瑞恩科技有限公司', id: 'urion'},
|
|
|
{text: '爱奥乐医疗器械(深圳)有限公司', id: 'bioland'} ,
|
|
|
{text: '中兴云湃*脉搏波', id: 'yunpai'} ,
|
|
|
{text: '康为血糖仪', id: 'comvee'}
|
|
|
]
|
|
|
});
|
|
|
|
|
|
|
|
|
this.bindEvents();
|
|
|
},
|
|
|
//请求初始化设备厂商
|
|
|
initComboBox: function () {
|
|
|
this.rAjax( this.url.manufacturerList, function (data) {
|
|
|
var that = this;
|
|
|
this.rAjax( this.url.manufacturerList,{} ,function (data) {
|
|
|
var d = [];
|
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
|
for (var i = 0; i < data.data.length; i++) {
|
|
|
d.push({
|
|
|
text: data.list[i].manufacturerName,
|
|
|
statusId: data.list[i].manufacturerCode
|
|
|
text: data.data[i].manufacturerName,
|
|
|
id: data.data[i].manufacturerCode
|
|
|
});
|
|
|
}
|
|
|
me.initInpCat( d, me);
|
|
|
that.initInpCat( d, that);
|
|
|
})
|
|
|
},
|
|
|
//设备厂商下拉框
|
|
|
initInpCat: function ( d, me) {
|
|
|
$("#inp_manufacturer").ligerComboBox({
|
|
|
width: 150,
|
|
|
$("#sel_manufacturer").ligerComboBox({
|
|
|
data: d,
|
|
|
initIsTriggerEvent: false,
|
|
|
valueField: 'statusId',
|
|
|
});
|
|
|
},
|
|
|
initForm: function () {
|
|
|
var _this = this;
|
|
|
|
|
|
//修改、查看
|
|
|
$.ajax({
|
|
|
url: ctx + "/admin/device/device",
|
|
|
method: "post",
|
|
|
dataType: "json",
|
|
|
async: false,
|
|
|
data: {id: id},
|
|
|
success: function (result) {
|
|
|
if (result.status == '200') {
|
|
|
var data = result.data;
|
|
|
deviceCodeOld = data.deviceCode;
|
|
|
_this.$form.Fields.fillValues({
|
|
|
applyDate: data.applyDate,
|
|
|
orgName: data.orgName,
|
|
|
linkman: data.linkman,
|
|
|
tel: data.tel,
|
|
|
serverIp: data.serverIp,
|
|
|
deviceName: data.deviceName,
|
|
|
sim: data.sim,
|
|
|
deviceModel: data.deviceModel,
|
|
|
address: data.address,
|
|
|
representative: data.representative,
|
|
|
applicantName: data.applicantName,
|
|
|
applicantIdentity: data.applicantIdentity,
|
|
|
applicantTel: data.applicantTel,
|
|
|
applicantMail: data.applicantMail
|
|
|
});
|
|
|
|
|
|
//填值
|
|
|
$("#sel_manufacturer").ligerComboBox("selectValue",data.manufacturerCode);
|
|
|
} else {
|
|
|
$.Notice.error(result.msg);
|
|
|
}
|
|
|
},
|
|
|
error: function (data) {
|
|
|
$.Notice.error("系统异常,请联系管理员!");
|
|
|
}
|
|
|
});
|
|
|
this.$form.show();
|
|
|
},
|
|
|
|
|
|
//绑定事件
|
|
|
bindEvents: function () {
|