|
@ -30,23 +30,22 @@
|
|
$element: $('.m-retrieve-area'),
|
|
$element: $('.m-retrieve-area'),
|
|
$searchBtn: $('#btn_search'),
|
|
$searchBtn: $('#btn_search'),
|
|
$addBtn: $('#btn_add'),
|
|
$addBtn: $('#btn_add'),
|
|
$name: $("#inp_name"),//人员姓名
|
|
|
|
$code: $("#inp_code"),//医生code
|
|
|
|
$mobile: $("#inp_mobile"),
|
|
|
|
$hospital: $("#inp_hospital"),//医院code
|
|
|
|
|
|
$type: $("#inp_type"),//奖品类型
|
|
|
|
$name: $("#inp_name"),//获奖人姓名
|
|
|
|
$idcard: $("#inp_idcard"),//获奖人身份证
|
|
init: function () {
|
|
init: function () {
|
|
this.$element.show();
|
|
this.$element.show();
|
|
this.$element.attrScan();
|
|
this.$element.attrScan();
|
|
window.form = this.$element;
|
|
window.form = this.$element;
|
|
this.$name.ligerTextBox({width: 200}); //姓名
|
|
|
|
this.$code.ligerTextBox({width: 200}); //姓名
|
|
|
|
this.$mobile.ligerTextBox({width: 200})//手机号
|
|
|
|
this.$hospital.ligerTextBox({width: 200})//医院code
|
|
|
|
|
|
this.$type.ligerTextBox({width: 200});
|
|
|
|
this.$name.ligerTextBox({width: 200});
|
|
|
|
this.$idcard.ligerTextBox({width: 200});
|
|
this.bindEvents();
|
|
this.bindEvents();
|
|
},
|
|
},
|
|
bindEvents: function () {
|
|
bindEvents: function () {
|
|
var self = this;
|
|
var self = this;
|
|
self.$searchBtn.click(function () {
|
|
self.$searchBtn.click(function () {
|
|
|
|
console.log(self);
|
|
master.grid.options.newPage = 1;
|
|
master.grid.options.newPage = 1;
|
|
master.reloadGrid();
|
|
master.reloadGrid();
|
|
});
|
|
});
|
|
@ -67,21 +66,19 @@
|
|
ajaxHeaderValue: ajaxHeaderValue,
|
|
ajaxHeaderValue: ajaxHeaderValue,
|
|
columns: [
|
|
columns: [
|
|
{display: 'ID', name: 'id', hide: true},
|
|
{display: 'ID', name: 'id', hide: true},
|
|
{display: '医生编码', name: 'code', width: '20%', align: "center"},
|
|
|
|
{display: '医生姓名', name: 'name', width: '8%', align: "center"},
|
|
|
|
|
|
{display: '姓名', name: 'userName', width: '10%', align: "center"},
|
|
|
|
{display: '身份证号', name: 'userIdcard', width: '15%', align: "center"},
|
|
|
|
{display: '微信标识', name: 'userOpenid', width: '20%', align: "center"},
|
|
{
|
|
{
|
|
display: '性别', name: 'sex', width: '5%', align: "center",
|
|
|
|
|
|
display: '奖品类型', name: 'prizeType', width: '10%', align: "center",
|
|
render: function (item) {
|
|
render: function (item) {
|
|
if (!item.sex | item.sex == 0) return "未知";
|
|
|
|
if (parseInt(item.sex) == 1) return '男';
|
|
|
|
if (parseInt(item.sex) == 2) return '女';
|
|
|
|
return '未知';
|
|
|
|
|
|
if (parseInt(item.prizeType) == 1) return '电影票';
|
|
|
|
return '其他';
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{display: '身份证号', name: 'idCard', width: '12%', align: "center"},
|
|
|
|
{display: '手机号码', name: 'mobile', width: '10%', align: "center"},
|
|
|
|
{display: '机构编码', name: 'hospital', width: '10%', align: "center"},
|
|
|
|
{display: '所属机构', name: 'hospitalName', width: '20%', align: "left"},
|
|
|
|
|
|
{display: '兑奖码', name: 'prizeCode', width: '15%', align: "center"},
|
|
|
|
{display: '有效期', name: 'validity', width: '10%', align: "center"},
|
|
|
|
{display: '领取地址', name: 'address', width: '20%', align: "left"},
|
|
],
|
|
],
|
|
|
|
|
|
}));
|
|
}));
|