| | |
| | | var pageCurr; |
| | | var tableData; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'docId', align: 'center',title: '类型编号'} |
| | | ,{field: 'docName', align: 'center',title: '类型名称'} |
| | | ,{field: 'status$', align: 'center',title: '状态'} |
| | | ,{field: 'docId', align: 'center',title: 'Номер типа'} |
| | | ,{field: 'docName', align: 'center',title: 'Название типа'} |
| | | ,{field: 'pakin', align: 'center',title: 'Поступление на склад', templet: '#pakinTpl', width: 190, unresize: true} |
| | | ,{field: 'pakout', align: 'center',title: 'Вывоз со склада', templet: '#pakoutTpl', width: 190, unresize: true} |
| | | ,{field: 'status$', align: 'center',title: 'Статус'} |
| | | // ,{field: 'createBy$', align: 'center',title: '添加人员'} |
| | | // ,{field: 'createTime$', align: 'center',title: '添加时间'} |
| | | ,{field: 'updateBy$', align: 'center',title: '修改人员'} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间'} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide: true} |
| | | ,{field: 'updateBy$', align: 'center',title: 'Редактировал'} |
| | | ,{field: 'updateTime$', align: 'center',title: 'Время редактирования'} |
| | | ,{field: 'memo', align: 'center',title: 'Примечание', hide: true} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ,{fixed: 'right', title:'Операция', align: 'center', toolbar: '#operate', width:180} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | tableData = table.cache.docType; |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | |
| | | }); |
| | | }); |
| | | |
| | | form.on('switch(pakinSwitch)', function (obj) { |
| | | let index = obj.othis.parents('tr').attr("data-index"); |
| | | let data = tableData[index]; |
| | | data[this.name] = obj.elem.checked?1:0; |
| | | http.post(baseUrl+"/docType/update/auth", {docId: data.docId, pakin: data[this.name]}, function (res) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | }) |
| | | }) |
| | | |
| | | form.on('switch(pakoutSwitch)', function (obj) { |
| | | let index = obj.othis.parents('tr').attr("data-index"); |
| | | let data = tableData[index]; |
| | | data[this.name] = obj.elem.checked?1:0; |
| | | http.post(baseUrl+"/docType/update/auth", {docId: data.docId, pakout: data[this.name]}, function (res) { |
| | | layer.msg(res.msg, {icon: 1}); |
| | | }) |
| | | }) |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(docType)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | |
| | | })); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | admin.confirm('Подтвердить экспорт в Excel?', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | title: (mData ? 'Изменить' : 'Добавить') + 'Статус заказа', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | layer.confirm('Вы уверены, что хотите удалить эту запись?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |