| | |
| | | //新增 |
| | | $.ajax({ |
| | | type:"get", |
| | | url: "../../static/js/priQuoteBudget/data.txt", |
| | | url: baseUrl + "/static/js/priQuoteBudget/data.txt", |
| | | dataType:"text", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | success:function(res) { |
| | |
| | | //修改 |
| | | $.ajax({ |
| | | type:"get", |
| | | url: "/priQuoteBudget/" + getUrlParams('id') + "/auth", |
| | | url: baseUrl + "/priQuoteBudget/" + getUrlParams('id') + "/auth", |
| | | dataType:"json", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | success:function(res) { |
| | |
| | | if(getUrlParams('id') == false || getUrlParams('id') == undefined){ |
| | | //新增 |
| | | $.ajax({ |
| | | url: "/priQuoteBudget/add/auth", |
| | | url: baseUrl + "/priQuoteBudget/add/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | title: luckysheet.toJson().title, |
| | |
| | | }else { |
| | | //修改 |
| | | $.ajax({ |
| | | url: "/priQuoteBudget/update/auth", |
| | | url: baseUrl + "/priQuoteBudget/update/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | id: getUrlParams('id'), |
| | |
| | | }else { |
| | | //另存 |
| | | $.ajax({ |
| | | url: "/priQuoteBudget/addOther/auth", |
| | | url: baseUrl + "/priQuoteBudget/addOther/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | id: getUrlParams('id'), |
| | |
| | | |
| | | $("#download").on("click",() => { |
| | | $.ajax({ |
| | | url: "/priQuoteBudget/excel/downfile", |
| | | url: baseUrl + "/priQuoteBudget/excel/downfile", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify({ |
| | | exceldata: JSON.stringify(luckysheet.getAllSheets()) |
| | |
| | | contentType:'application/json;charset=UTF-8', |
| | | success: function (res) { |
| | | if(res.code == 200){ |
| | | window.open(res.msg) |
| | | window.open(baseUrl+res.msg) |
| | | } |
| | | } |
| | | }) |