中扬CRM客户关系管理系统
#
LSH
2023-12-02 afa3bc1e2f39f66f59ee9b15d6af16593acdc9a4
src/main/webapp/views/priQuote/priQuote_detail.html
@@ -27,7 +27,7 @@
  <div><button type="button" class="layui-btn layui-btn-primary layui-btn-xs btn-edit" id="otherSave">另存为</button></div>
  <div><button type="button" class="layui-btn layui-btn-primary layui-btn-xs btn-edit" id="allprint">全部打印</button></div>
  <div><button type="button" class="layui-btn layui-btn-primary layui-btn-xs btn-edit" id="print">选区打印</button></div>
  <div><button type="button" class="layui-btn layui-btn-primary layui-btn-xs btn-edit" id="download">下载</button></div>
<!--  <div><button type="button" class="layui-btn layui-btn-primary layui-btn-xs btn-edit" id="download">下载</button></div>-->
</div>
<div id="luckysheet" style="margin:0px;padding:0px;position:absolute;width:100%;height: 100vh;left: 0px;top: 0px;"></div>
<script>
@@ -49,11 +49,10 @@
      //新增
      $.ajax({
        type:"get",
        url: "../../static/js/priQuote/data.txt",
        dataType:"text",
        headers: {'token': localStorage.getItem('token')},
        success:function(res) {
          options.data = unzip(res)
        url: baseUrl + "/static/js/priQuote/data" + getUrlParams('template') + ".txt",
        success:function(sheetData) {
          options.data = unzip(sheetData)
          // options.title = getUrlParams('name')
          luckysheet.create(options)
          $("#luckysheet_info_detail_update").hide()
          $("#luckysheet_info_detail_save").hide()
@@ -64,7 +63,7 @@
      //修改
      $.ajax({
        type:"get",
        url: "/priQuote/" + getUrlParams('id') + "/auth",
        url: baseUrl + "/priQuote/" + getUrlParams('id') + "/auth",
        dataType:"json",
        headers: {'token': localStorage.getItem('token')},
        success:function(res) {
@@ -125,12 +124,13 @@
      if(getUrlParams('id') == false || getUrlParams('id') == undefined){
        //新增
        $.ajax({
          url: "/priQuote/add/auth",
          url: baseUrl + "/priQuote/add/auth",
          headers: {'token': localStorage.getItem('token')},
          data: JSON.stringify({
            title: luckysheet.toJson().title,
            sheetData: zip(luckysheet.getAllSheets()),
            priQuoteBudgetId: getUrlParams('priQuoteBudgetId')
            priQuoteBudgetId: getUrlParams('priQuoteBudgetId'),
            template: getUrlParams('template')
          }),
          method: 'POST',
          dataType: "json",
@@ -148,7 +148,7 @@
      }else {
        //修改
        $.ajax({
          url: "/priQuote/update/auth",
          url: baseUrl + "/priQuote/update/auth",
          headers: {'token': localStorage.getItem('token')},
          data: JSON.stringify({
            id: getUrlParams('id'),
@@ -178,7 +178,7 @@
      }else {
        //另存
        $.ajax({
          url: "/priQuote/addOther/auth",
          url: baseUrl + "/priQuote/addOther/auth",
          headers: {'token': localStorage.getItem('token')},
          data: JSON.stringify({
            id: getUrlParams('id'),
@@ -203,17 +203,18 @@
    $("#download").on("click",() => {
      $.ajax({
        url: "/priQuote/excel/downfile",
        url: baseUrl + "/priQuote/excel/downfile",
        headers: {'token': localStorage.getItem('token')},
        data: JSON.stringify({
          exceldata: JSON.stringify(luckysheet.getAllSheets())
          exceldata: JSON.stringify(luckysheet.getAllSheets()),
          template: getUrlParams('template')
        }),
        method: 'POST',
        dataType: "json",
        contentType:'application/json;charset=UTF-8',
        success: function (res) {
          if(res.code == 200){
            window.open(res.msg)
            window.open(baseUrl+res.msg)
          }
        }
      })