| | |
| | | var pageCurr; |
| | | var billNO; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', align: 'center',title: 'ID'} |
| | | //,{field: 'id', align: 'center',title: 'ID'} |
| | | ,{field: 'billNo', align: 'center',title: '检验编号'} |
| | | ,{align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 140, width: 140} |
| | | ,{field: 'auditStatus$', align: 'center',title: '审核状态', width: 100} |
| | | ,{field: 'auditStatus$', align: 'center',title: '审核状态'} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide:true} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', width: 100} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', width: 200} |
| | | ,{field: 'appeUser$', align: 'center',title: '创建者', hide:true} |
| | | ,{field: 'appeTime$', align: 'center',title: '添加时间', hide:true} |
| | | ,{align: 'center', title: '明细', toolbar: '#tbLook'} |
| | | ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'createBy$', align: 'center',title: '创建者', hide:true} |
| | | ,{field: 'createTime$', align: 'center',title: '添加时间', hide:true} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
| | | ]], |
| | |
| | | // 监听行工具事件 |
| | | table.on('tool(quality)', function(obj){ |
| | | var data = obj.data; |
| | | billNO=data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | |
| | | layer.open({ |
| | | type: 1, |
| | | title: false, |
| | | area: '2000px', |
| | | area: '1000px', |
| | | offset: [offset.top + 'px', (offset.left - 530 + $a.outerWidth()) + 'px'], |
| | | shade: .01, |
| | | shadeClose: true, |
| | |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/qualityDetl/list/auth', |
| | | where: { |
| | | quality_id: data.id |
| | | bill_no: data.billNo |
| | | }, |
| | | limit: 5, |
| | | page: true, |
| | |
| | | cols: [[ |
| | | // {type: 'numbers'}, |
| | | // {field: 'billNo', title: '检验编号', align: 'center'}, |
| | | {field: 'seqNo', title: '单据行号', align: 'center',width: 100}, |
| | | {field: 'orderNo', title: '入库单号', align: 'center',width: 150}, |
| | | {field: 'anfme', title: '待入库数量', align: 'center',width: 100}, |
| | | {field: 'matnr', title: '产品ID', align: 'center',width: 150}, |
| | | {field: 'maktx', title: '产品名称', align: 'center',width: 150}, |
| | | {field: 'seqNo', title: '单据行号', align: 'center'}, |
| | | {field: 'orderNo', title: '入库单号', align: 'center'}, |
| | | {field: 'anfme', title: '待入库数量', align: 'center'}, |
| | | {field: 'matnr', title: '产品ID', align: 'center'}, |
| | | {field: 'maktx', title: '产品名称', align: 'center'}, |
| | | // {field: 'maktx', title: '产品名称', align: 'center'}, |
| | | {field: 'prodDate$', title: '生产日期', align: 'center',width: 150}, |
| | | {field: 'quaStatus$', title: '检验状态', align: 'center',width: 100}, |
| | | {field: 'rejectQty', title: '不合格数量', align: 'center',width: 100}, |
| | | {field: 'rejectReason', title: '不合格原因', align: 'center',width: 150}, |
| | | {field: 'prodDate$', title: '生产日期', align: 'center'}, |
| | | {field: 'quaStatus$', title: '检验状态', align: 'center'}, |
| | | {field: 'rejectQty', title: '不合格数量', align: 'center'}, |
| | | {field: 'rejectReason', title: '不合格原因', align: 'center'}, |
| | | |
| | | ]], |
| | | request: { |
| | |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(); |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | location.reload(); |
| | | } |
| | | }) |
| | | return false; |
| | |
| | | // 时间选择器 |
| | | function layDateRender() { |
| | | layDate.render({ |
| | | elem: '#modiTime\\$', |
| | | type: 'datetime' |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime', |
| | | value: new Date() |
| | | }); |
| | | layDate.render({ |
| | | elem: '#appeTime\\$', |
| | |
| | | // 提取产品 |
| | | var locDetlLayerIdx; |
| | | function getLocDetl() { |
| | | |
| | | locDetlLayerIdx = layer.open({ |
| | | type: 2, |
| | | title: '质检明细', |
| | |
| | | success: function(layero, index){ |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function getbillData(){ |
| | | return billNO; |
| | | } |
| | | |
| | | function initOrderNo1() { |
| | | $.ajax({ |
| | | url: baseUrl+"/quality/orderNo/init1", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | async: false, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | $('#billNo').val(res.data) |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | notice.error({ |
| | | title: '消息通知', |
| | | message: res.msg |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |