From 483d5ffa26e08673c4a39f76200e054aec76ccee Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Fri, 21 Jun 2024 09:34:11 +0800 Subject: [PATCH] '123' --- .../com/ruoyi/web/controller/quot/QuotController.java | 6 ++++++ .../main/java/com/ruoyi/common/utils/http/HttpUtils.java | 9 +++------ ruoyi-ui/src/views/quot/quot/index.vue | 4 ++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java index d233a95..0da6853 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java @@ -721,6 +721,12 @@ public class QuotController extends BaseController @PostMapping("/commitOAQuot") public AjaxResult commitOAQuot(@RequestBody Quot quot) { + //金思维协助中不允许提交OA + String quot_jsw_approval_status = quot.getQuotJswApprovalStatus(); + if("1".equals(quot_jsw_approval_status)){ + return error("金思维协助还未完成"); + } + // 报价单提交OA,插入中间表 sys_oa_quot sys_oa_quot_material SysOaQuot sysOaQuot = new SysOaQuot(); SysOaQuot oauser = quotService.selectOAUserByUserName(getUsername());// 查询OA用户 diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java index 179acc3..44a1e45 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java @@ -1,10 +1,6 @@ package com.ruoyi.common.utils.http; -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.PrintWriter; +import java.io.*; import java.net.*; import java.nio.charset.StandardCharsets; import java.security.cert.X509Certificate; @@ -217,6 +213,7 @@ public class HttpUtils conn.setRequestProperty("connection", "Keep-Alive"); conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); conn.setRequestProperty("Accept-Charset", "utf-8"); + conn.setRequestProperty("Charset", "UTF-8"); conn.setRequestProperty("contentType", "application/json; charset=utf-8"); conn.setRequestProperty("Content-Type", "application/json; charset=utf-8"); // 设置Cookie头部 @@ -246,7 +243,7 @@ public class HttpUtils conn.setDoOutput(true); conn.setDoInput(true); - out = new PrintWriter(conn.getOutputStream()); + out = new PrintWriter(new OutputStreamWriter(conn.getOutputStream(),"utf-8")); out.print(param); out.flush(); in = new BufferedReader(new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8)); diff --git a/ruoyi-ui/src/views/quot/quot/index.vue b/ruoyi-ui/src/views/quot/quot/index.vue index eda3bae..bd81efa 100644 --- a/ruoyi-ui/src/views/quot/quot/index.vue +++ b/ruoyi-ui/src/views/quot/quot/index.vue @@ -1500,8 +1500,8 @@ export default { commitForm() { this.$refs["form"].validate(valid => { if (valid) { - if(this.quotMaterialList.length == 0 && this.quotXjFileList == 0){ - this.$message.warning("无报价产品 或 未提交询价附件!"); + if(this.quotXjFileList == 0){ + this.$message.warning("未上传询价清单附件!"); return; }