文档
测试

operation_add_view

POST
/operation_new/getAll.action

接口描述

请求后端调取工序&产品自定义的信息资料

请求参数

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

响应参数

参数名
类型
描述
必填
dataType: "json"
JSON
服务器返回的数据类型
必填

说明 / 示例

$.ajax({ type: "POST", url: url, async:false, cache: false, dataType: "json",//预期服务器返回的数据类型 //contentType: "application/json; charset=utf-8", data : param, success: function (data) { //console.info(data); if (data.rows.length > 0) { layui.use('table', function () { var table = layui.table; var form = layui.form; console.info(data.rows); //展示已知数据 table.render({ elem: '#demo' , cols: [[ //标题栏 { field: 'operation_product', title: '产品名称', width: 100, sort: true } , { field: 'program', title: '程序名称', width: 180, sort: true } , { field: 'order_num', title: '产品订单总数量', width: 180, sort: true } , { field: 'one_runtime', title: '预计单件加工时间(秒)', width: 180, sort: true } , { field: 'into_time', title: '上下料时间(秒)', width: 150, sort: true } , { field: 'jiagong_num', title: '实际合格数量', width: 120, sort: true} , { field: 'ng_num', title: '不良品数量', width: 120, sort: true} , { field: 'operator_name', title: '操作人', width: 120, sort: true} , { field: '', title: '操作', width: 200, toolbar: '#barDemo' } ]] , data: data.rows , even: true , page: true //是否显示分页 //,limits: [5, 7, 10] , limit: 15 //每页默认显示的数量 }); table.on('tool(demo)', function(obj){ var data = obj.data; console.log(data); if(obj.event === 'del'){ //console.log(data.id); layer.confirm('真的要删除吗?', function(index) { isdelect(data.id); }); } else if(obj.event === 'edit'){ $('#ed_id').val('100'); $('#id').val(data.id); $(".tip").fadeIn(100); $(".mengban").fadeIn(100); $('#program').val(data.program); $('#operation_product').val(data.operation_product); $('#order_num').val(data.order_num); $('#one_runtime').val(data.one_runtime); $('#into_time').val(data.into_time); $('#byUser').val(data.byUser); $('#ng_num').val(data.ng_num); $('#title_bz').html('产品工序信息'); } }); }); } } });