|  |  | 
 |  |  | var pageCurr; | 
 |  |  | var wrkNo; | 
 |  |  | var wmsWrkNo; | 
 |  |  | layui.config({ | 
 |  |  |     base: baseUrl + "/static/wms/layui/lay/modules/" | 
 |  |  | }).extend({ | 
 |  |  | 
 |  |  |     var form = layui.form; | 
 |  |  |  | 
 |  |  |     $('#wrkNo').val(parent.wrkNo); | 
 |  |  |     $('#wmsWrkNo').val(parent.wmsWrkNo); | 
 |  |  |  | 
 |  |  |     // 数据渲染 | 
 |  |  |     tableIns = table.render({ | 
 |  |  |         elem: '#wrkMast', | 
 |  |  |         headers: {token: localStorage.getItem('token')}, | 
 |  |  |         url: baseUrl + '/wrkMast/list/auth', | 
 |  |  |         where: {wrk_no: parent.wrkNo}, | 
 |  |  |         where: {wrk_no: parent.wrkNo, wms_wrk_no: parent.wmsWrkNo}, | 
 |  |  |         page: true, | 
 |  |  |         limit: 16, | 
 |  |  |         limits: [16, 30, 50, 100, 200, 500], | 
 |  |  | 
 |  |  |         cellMinWidth: 50, | 
 |  |  |         cols: [[ | 
 |  |  |             {type: 'checkbox'} | 
 |  |  |             , {field: 'wrkNo', align: 'center', title: '工作号', sort: true, width: 85} | 
 |  |  |             , {field: 'ioTime$', align: 'center', title: '工作时间', sort: true, width: 160} | 
 |  |  |             , {field: 'wrkSts$', align: 'center', title: '工作状态'} | 
 |  |  |             , {field: 'ioType$', align: 'center', title: '入出库类型'} | 
 |  |  |             , {field: 'wmsWrkNo', align: 'center', title: 'WMS任务号', sort: true, width: 85} | 
 |  |  |             , {field: 'wrkNo', align: 'center', title: '任务号', sort: true, width: 85} | 
 |  |  |             , {field: 'ioTime$', align: 'center', title: '任务时间', sort: true, width: 160} | 
 |  |  |             , {field: 'durationTime', align: 'center', title: '持续时长', width: 160} | 
 |  |  |             , {field: 'wrkSts$', align: 'center', title: '任务状态'} | 
 |  |  |             , {field: 'ioType$', align: 'center', title: '任务类型'} | 
 |  |  |             , {field: 'ioPri', align: 'center', title: '优先级'} | 
 |  |  |             , {field: 'crnNo$', align: 'center', title: '堆垛机'} | 
 |  |  |             , {field: 'sourceStaNo$', align: 'center', title: '源站'} | 
 |  |  |             , {field: 'staNo$', align: 'center', title: '目标站'} | 
 |  |  |             , {field: 'sourceLocNo$', align: 'center', title: '源库位'} | 
 |  |  |             , {field: 'locNo$', align: 'center', title: '目标库位'} | 
 |  |  |             , {field: 'sourceLocNo$', align: 'center', title: '起始点'} | 
 |  |  |             , {field: 'locNo$', align: 'center', title: '目标点'} | 
 |  |  |             , {field: 'barcode', align: 'center', title: '条码'} | 
 |  |  |             , {field: 'preHave', align: 'center', title: '先入品', hide: true} | 
 |  |  |             , {field: 'takeNone', align: 'center', title: '空操作', hide: true} | 
 |  |  | 
 |  |  |             //         return html; | 
 |  |  |             //     }} | 
 |  |  |  | 
 |  |  |             , {fixed: 'right', title: '操作', align: 'left', toolbar: '#operate', width: 120} | 
 |  |  |             , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 110} | 
 |  |  |         ]], | 
 |  |  |         request: { | 
 |  |  |             pageName: 'curr', | 
 |  |  | 
 |  |  |                 // 弹层显示 | 
 |  |  |                 layer.open({ | 
 |  |  |                     type: 2, | 
 |  |  |                     title: '工作档明细', | 
 |  |  |                     title: '任务档明细', | 
 |  |  |                     maxmin: true, | 
 |  |  |                     area: [top.detailWidth, top.detailHeight], | 
 |  |  |                     shadeClose: true, | 
 |  |  | 
 |  |  |                 break; | 
 |  |  |             // 完成 | 
 |  |  |             case 'complete': | 
 |  |  |                 layer.confirm('确认完成该笔工作档?', {title: '工作号:' + data.wrkNo, shadeClose: true}, function () { | 
 |  |  |                 layer.confirm('确认完成该笔任务档?', {title: '任务号:' + data.wrkNo, shadeClose: true}, function () { | 
 |  |  |                     http.post(baseUrl + "/hand/control/wrkMast", {workNo: data.wrkNo, type: 1}, function (res) { | 
 |  |  |                         $(".layui-laypage-btn")[0].click(); | 
 |  |  |                         layer.msg(data.wrkNo + res.msg); | 
 |  |  | 
 |  |  |             case 'cancel': | 
 |  |  |                 if (data.pdcType === "Y") { | 
 |  |  |                     layer.confirm('当前任务关联ERP销售单,取消将重新生成出库作业,是否继续?', { | 
 |  |  |                         title: '工作号:' + data.wrkNo, | 
 |  |  |                         title: '任务号:' + data.wrkNo, | 
 |  |  |                         shadeClose: true | 
 |  |  |                     }, function () { | 
 |  |  |                         http.post(baseUrl + "/hand/control/wrkMast", {workNo: data.wrkNo, type: 2}, function (res) { | 
 |  |  | 
 |  |  |                         layer.closeAll(); | 
 |  |  |                     }); | 
 |  |  |                 } else { | 
 |  |  |                     layer.confirm('确认取消该笔工作档?', { | 
 |  |  |                         title: '工作号:' + data.wrkNo, | 
 |  |  |                     layer.confirm('确认取消该笔任务档?', { | 
 |  |  |                         title: '任务号:' + data.wrkNo, | 
 |  |  |                         shadeClose: true | 
 |  |  |                     }, function () { | 
 |  |  |                         http.post(baseUrl + "/hand/control/wrkMast", {workNo: data.wrkNo, type: 2}, function (res) { | 
 |  |  | 
 |  |  |                 break; | 
 |  |  |             //  拣料入库 | 
 |  |  |             case 'pick': | 
 |  |  |                 layer.confirm('拣料入库该笔工作档?', {title: '工作号:' + data.wrkNo, shadeClose: true}, function () { | 
 |  |  |                 layer.confirm('拣料入库该笔任务档?', {title: '任务号:' + data.wrkNo, shadeClose: true}, function () { | 
 |  |  |                     http.post(baseUrl + "/hand/control/wrkMast", {workNo: data.wrkNo, type: 3}, function (res) { | 
 |  |  |                         $(".layui-laypage-btn")[0].click(); | 
 |  |  |                         layer.msg(data.wrkNo + res.msg); | 
 |  |  | 
 |  |  |             //  先入品 | 
 |  |  |             case 'preHave': | 
 |  |  |                 layer.confirm('任务发生先入品异常。如需重新入库,请确保货物已放至堆垛机出库站!', { | 
 |  |  |                     title: '工作号:' + data.wrkNo, | 
 |  |  |                     title: '任务号:' + data.wrkNo, | 
 |  |  |                     shadeClose: true | 
 |  |  |                 }, function () { | 
 |  |  |                     http.post(baseUrl + "/deal/preHave/start", {wrkNo: data.wrkNo}, function (res) { | 
 |  |  | 
 |  |  |             //  空操作 | 
 |  |  |             case 'takeNone': | 
 |  |  |                 layer.confirm('任务发送空操作异常!是否。。。。。。。。?', { | 
 |  |  |                     title: '工作号:' + data.wrkNo, | 
 |  |  |                     title: '任务号:' + data.wrkNo, | 
 |  |  |                     shadeClose: true | 
 |  |  |                 }, function () { | 
 |  |  |                 }); | 
 |  |  | 
 |  |  |             cellMinWidth: 50, | 
 |  |  |             cols: [[ | 
 |  |  |                 {type: 'checkbox'} | 
 |  |  |                 , {field: 'wrkNo', align: 'center', title: '工作号'} | 
 |  |  |                 , {field: 'ioTime$', align: 'center', title: '工作时间'} | 
 |  |  |                 , {field: 'wrkNo', align: 'center', title: '任务号'} | 
 |  |  |                 , {field: 'ioTime$', align: 'center', title: '任务时间'} | 
 |  |  |                 , {field: 'matnr', align: 'center', title: '物料'} | 
 |  |  |                 , {field: 'lgnum', align: 'center', title: '仓库号'} | 
 |  |  |                 , {field: 'tbnum', align: 'center', title: '转储请求编号'} |