| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- /**
- * 随访管理
- * */
- $(document).ready(function() {
- //初始化时间
- laydate.render({
- elem: '#starttimeSearch',
- range: '~',
- theme: '#1ab394',
- calendar: true
- });
- laydate.render({
- elem: '#sftimeSearch',
- theme: '#1ab394',
- calendar: true
- });
- //搜索
- $("#sc_btns").click(function() {
- initTable();
- })
- initTable();
- });
- var datas = [{
- "F_AdmissionDept": "内科",
- "F_Age": "30",
- "F_Code": "HY001",
- "xingbie": "男",
- "judge": "急性肠胃炎",
- "F_FirstLevel": "一附院",
- "F_Id": 1,
- "F_InDate": "14:00~15:00",
- "F_Name": "测试人",
- "fangshi": "线上",
- "F_Phone": "123456789",
- "state": "处理",
- "F_TubeDoctor": "张医生",
- "IDcard":"4101545445454545",
- "id": 1,
- },
- {
- "F_AdmissionDept": "内科",
- "F_Age": "30",
- "F_Code": "HY002",
- "xingbie": "男",
- "judge": "急性肠胃炎",
- "F_FirstLevel": "一附院",
- "F_Id": 2,
- "F_InDate": "14:00~15:00",
- "F_Name": "王五",
- "fangshi": "线上",
- "F_Phone": "123456789",
- "state": "处理",
- "F_TubeDoctor": "张医生",
- "IDcard":"4101545445454545",
- "id": 2,
- },
- {
- "F_AdmissionDept": "内科",
- "F_Age": "30",
- "F_Code": "HY003",
- "xingbie": "男",
- "judge": "头疼",
- "F_FirstLevel": "一附院",
- "F_Id": 3,
- "F_InDate": "14:00~15:00",
- "F_Name": "张三",
- "fangshi": "线上",
- "F_Phone": "123456789",
- "state": "处理",
- "F_TubeDoctor": "李医生",
- "IDcard":"4101545445454545",
- "id": 3,
- }
- ]
- // 随访管理列表
- function initTable() {
- //先销毁表格
- $('#accessList').bootstrapTable('destroy');
- //初始化表格,动态从服务器加载数据
- $('#accessList').bootstrapTable({
- method: 'get',
- data: datas,
- queryParams: "queryParams",
- striped: true, //表格显示条纹
- pagination: true, //启动分页
- pageSize: 10, //每页显示的记录数
- pageNumber: 1, //当前第几页
- pageList: [10, 20, 50, 100], //记录数可选列表
- search: false, //是否启用查询
- showColumns: false, //显示下拉框勾选要显示的列
- showRefresh: false, //显示刷新按钮
- columns: [{
- field: 'F_Code',
- title: '预约码',
- align: 'center',
- },
- {
- field: 'F_Name',
- title: '姓名',
- align: 'center',
- },
- {
- field: 'F_Age',
- title: '年龄',
- align: 'center',
- },
- {
- field: 'xingbie',
- title: '性别',
- align: 'center',
- },
- {
- field: 'F_FirstLevel',
- title: '挂号院区',
- align: 'center',
- },
- {
- field: 'F_Phone',
- title: '联系电话',
- align: 'center',
- },
- {
- field: 'F_InDate',
- title: '预约时间',
- align: 'center',
- },
- {
- field: 'state',
- title: '状态',
- align: 'center',
- },
- {
- field: 'F_AdmissionDept',
- title: '科室',
- align: 'center',
- },
- {
- field: 'IDcard',
- title: '身份证号码',
- align: 'center',
- },
- {
- field: 'fangshi',
- title: '挂号方式',
- align: 'center',
- },
- {
- field: 'price',
- title: '操作',
- width: 120,
- align: 'center',
- valign: 'middle',
- formatter: actionFormatter,
- },
- ]
- });
- }
- //操作栏的格式化
- function actionFormatter(value, row, index) {
- var id = value;
- var result = "";
- result += "<span class='btn btn-xs green' onclick=\"removeById('" + id +
- "', view='view')\" >取消预约</span>";
- result += "<span class='btn btn-xs green' onclick=\"EditViewById('" + id +
- "', view='view')\" >查看</span>";
- return result;
- }
- //随访登记
- function btn_access(custelid, name, phone, address) {
- // var custelid = row.F_Id; //随访记录id
- // var name = row.F_Name; //姓名
- // var phone = row.F_Phone; //联系人电话
- // var address = row.F_Addr; //住址
- var name = encodeURI(name);
- var address = encodeURI(address);
- layer.open({
- type: 2,
- title: '随访登记',
- maxmin: true, //开启最大化最小化按钮
- area: ['90%', '90%'],
- content: "./template/accessRegister.html?custelid=" + custelid + "&name=" + name + "&phone=" + phone + "&address=" +
- address,
- })
- }
- //预约信息查看
- function EditViewById(val) {
- var id = val;
- layer.open({
- type: 2,
- title: '预约患者信息',
- maxmin: true, //开启最大化最小化按钮
- area: ['60%', '80%'],
- content: './bookingDetail.html?id=' + id
- })
- }
|