| | |
| | | {field: 'createTime$', title: '创建时间', minWidth: 200, width: 200}, |
| | | {field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl', minWidth: 160, width: 160}, |
| | | {field: 'memo', align: 'center',title: '备注', hide: true}, |
| | | {align: 'center', title: '操作', toolbar: '#operate', width: 180} |
| | | {align: 'center', title: '操作', toolbar: '#operate', width: 280} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | showWrkTrace(data.id); |
| | | } else if (layEvent === 'del') { |
| | | doDel(data.id); |
| | | } else if (layEvent === 'exportData') { |
| | | doExport(obj); |
| | | } else if (layEvent === 'complete') { |
| | | doModify(data.id, 4); |
| | | } else if (layEvent === 'look') { |
| | |
| | | }); |
| | | } |
| | | |
| | | // 导出单据 |
| | | function doExport(obj) { |
| | | layer.confirm('确定导出Excel吗?', { |
| | | shade: .1, |
| | | }, function (i) { |
| | | var titles=['订单号','商品编号','商品名称','规格','订单数量','作业数量']; |
| | | $.ajax({ |
| | | url: baseUrl+"/order/exportOrder/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | orderId: obj.data.id |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200){ |
| | | var tableName = '订单 ' + res.data[0][0] |
| | | table.exportFile(titles,res.data,'xls',tableName); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 修改订单状态 |
| | | function doModify(orderId, settle) { |
| | | layer.confirm('确定要手动完结吗?', { |
| | |
| | | }, function (i) { |
| | | layer.close(i); |
| | | layer.load(2); |
| | | console.log(orderId); |
| | | console.log(settle); |
| | | $.ajax({ |
| | | url: baseUrl+"/order/update/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |