| | |
| | | var pageCurr; |
| | | var tableData; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'steNo', align: 'center',title: '穿梭车号'} |
| | | ,{field: 'inEnable', align: 'center',title: '可入'} |
| | | ,{field: 'outEnable', align: 'center',title: '可出'} |
| | | ,{field: 'inEnable', align: 'center',title: '可入', templet: '#inEnableTpl'} |
| | | ,{field: 'outEnable', align: 'center',title: '可出', templet: '#outEnableTpl'} |
| | | ,{field: 'steSts', align: 'center',title: '作业态'} |
| | | ,{field: 'wrkNo', align: 'center',title: '任务号'} |
| | | ,{field: 'crnNo', align: 'center',title: '堆垛机号'} |
| | |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | tableData = table.cache.basSte; |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | |
| | | }); |
| | | }); |
| | | |
| | | form.on('switch(inEnableSwitch)', function (obj) { |
| | | let index = obj.othis.parents('tr').attr("data-index"); |
| | | let data = tableData[index]; |
| | | data[this.name] = obj.elem.checked?'Y':'N'; |
| | | http.post(baseUrl+"/basSte/update/auth", {steNo: data.steNo, inEnable: data[this.name]}, function (res) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | }) |
| | | }) |
| | | |
| | | form.on('switch(outEnableSwitch)', function (obj) { |
| | | let index = obj.othis.parents('tr').attr("data-index"); |
| | | let data = tableData[index]; |
| | | data[this.name] = obj.elem.checked?'Y':'N'; |
| | | http.post(baseUrl+"/basSte/update/auth", {steNo: data.steNo, outEnable: data[this.name]}, function (res) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | }) |
| | | }) |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(basSte)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |