From 391c8925d9375a0d2eed2e1af12d0dc7a6c98d1e Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期六, 29 七月 2023 18:15:51 +0800
Subject: [PATCH] #售前规划申请单上传文件
---
src/main/webapp/static/js/priOnline/priOnline.js | 25 ++++++++++++++++---------
1 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/src/main/webapp/static/js/priOnline/priOnline.js b/src/main/webapp/static/js/priOnline/priOnline.js
index 9ba71ad..8a2c1cc 100644
--- a/src/main/webapp/static/js/priOnline/priOnline.js
+++ b/src/main/webapp/static/js/priOnline/priOnline.js
@@ -215,7 +215,7 @@
case "upload":
$.ajax({
type:"get",
- url: "/priOnline/viewCheck/" + data.id + "/auth",
+ url: baseUrl+"/priOnline/viewCheck/" + data.id + "/auth",
dataType:"json",
headers: {'token': localStorage.getItem('token')},
success:function(res) {
@@ -248,16 +248,23 @@
return;
}
+ let formData = new FormData($("#uploadFile")[0]);
+ formData.append("id", data.id);
+ formData.append("checkData", zip(exportJson.sheets));
$.ajax({
- url: "/priOnline/uploadCheck/auth",
+ url: baseUrl+"/priOnline/uploadCheck/auth",
headers: {'token': localStorage.getItem('token')},
- data: JSON.stringify({
- id: data.id,
- checkData: zip(exportJson.sheets)
- }),
+ data: formData,
+ // data: JSON.stringify({
+ // id: data.id,
+ // checkData: zip(exportJson.sheets)
+ // }),
+ // dataType: "json",
method: 'POST',
- dataType: "json",
- contentType:'application/json;charset=UTF-8',
+ cache: false,
+ processData: false,
+ contentType: false,
+ // contentType:'application/json;charset=UTF-8',
success: function (res) {
if (res.code == 200) {
layer.msg('涓婁紶鎴愬姛',{time:1000},() => {
@@ -277,7 +284,7 @@
//鏌ョ湅璇环
$.ajax({
type:"get",
- url: "/priOnline/viewCheck/" + data.id + "/auth",
+ url: baseUrl+"/priOnline/viewCheck/" + data.id + "/auth",
dataType:"json",
headers: {'token': localStorage.getItem('token')},
success:function(res) {
--
Gitblit v1.9.1