文档
测试

ly_site

POST
/ly_site/getAll.action

接口描述

请求后端调取车间列表信息

请求参数

参数名
类型
描述
必填
page
数字
页码
必填
rows
数字
每页页数
必填
ly_site.facno
数字
工厂分号
必填

响应参数

参数名
类型
描述
必填
dataType: "json"
JSON
返回信息格式
必填

说明 / 示例

$.ajax({ type: "POST", url: url, async: false, cache: false, dataType: "json", success: function (data) { //console.info(data); layui.use('table', function () { var table = layui.table; console.info(data.rows); //展示已知数据 table.render({ elem: '#demo' , cols: [[ //标题栏 { field: 'id', title: '车间ID', width: 100, sort: true } , { field: 'site', title: '车间编号', width: 200, sort: true } , { field: 'siteName', title: '车间名称', width: 220, sort: true } , { field: 'class_name', title: '车间班次', width: 100, sort: true } , { field: 'start_time1', title: '早班起止时间', width: 140, sort: true } , { field: 'start_time2', title: '晚班起止时间', width: 140, sort: true } , { field: 'createTime1', title: '车间创建时间', width: 140, sort: true } , { field: 'status', title: '操作', width: 150, toolbar: '#barDemo' } ]] , data: data.rows , even: true , page: true //是否显示分页 //,limits: [5, 7, 10] , limit: 10 //每页默认显示的数量 }); table.on('tool(demo)', function(obj){ var data = obj.data; //console.log(data); if(obj.event === 'del'){ layer.confirm('真的要删除吗?', function(index) { isdelect(data.id); }); } else if(obj.event === 'edit'){ go_Update(data.id); } }); }); } });