This commit is contained in:
李狗蛋 2025-04-07 22:14:52 +08:00
commit 490577d411
35 changed files with 27894 additions and 0 deletions

37
README.md Normal file
View File

@ -0,0 +1,37 @@
# 密封报价
#### 介绍
天大系统中密封报价前端页面,后端都是金蝶的云星空;密封报价功能前端由王康负责开发,后端接口由阿民负责。
#### 软件架构
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

33
gatedge/.gitignore vendored Normal file
View File

@ -0,0 +1,33 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/

115
gatedge/pom.xml Normal file
View File

@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gatedge</groupId>
<artifactId>gatedge</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>gatedge</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<spring-boot.version>2.6.13</spring-boot.version>
<fastjson.version>2.0.2</fastjson.version>
<maven-compiler-source.version>1.8</maven-compiler-source.version>
<maven-compiler-target.version>1.8</maven-compiler-target.version>
</properties>
<dependencies>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.2.6.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
<executions>
<execution>
<id>enforce-no-snapshots</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireReleaseDeps>
<message>No Snapshots Allowed!</message>
</requireReleaseDeps>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${maven-compiler-source.version}</source>
<target>${maven-compiler-target.version}</target>
<encoding>UTF-8</encoding>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<encoding>UTF-8</encoding>
<overwrite>true</overwrite>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,14 @@
package com.gatedge;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class GatedgeApplication {
public static void main(String[] args) {
SpringApplication.run(GatedgeApplication.class, args);
System.out.println("服务启动成功");
}
}

View File

@ -0,0 +1,20 @@
package com.gatedge.jindie.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
/**
* @param
* @Author: 王康
* @return
* @DateTime: 2023/7/13 10:12
* 描述
**/
@Configuration
public class Restful {
@Bean
public RestTemplate getRestTemplate(){
return new RestTemplate();
}
}

View File

@ -0,0 +1,90 @@
package com.gatedge.jindie.controller;
import com.gatedge.jindie.entity.Entity;
import com.gatedge.jindie.entity.EntityItem;
import com.gatedge.jindie.entity.EntityVO;
import com.gatedge.jindie.result.ActionResult;
import com.gatedge.jindie.result.ListResult;
import com.gatedge.jindie.result.ResponseBodyMessage;
import com.gatedge.jindie.result.ResultBuilder;
import com.gatedge.jindie.service.SealedQuotationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import sun.misc.BASE64Encoder;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @param
* @Author: 王康
* @Description: TODO
* @return
* @DateTime: 2023/8/24 15:49
* 描述
**/
@RestController
@RequestMapping("/admin/")
public class SealedQuotationController {
@Autowired
private SealedQuotationService sealedQuotationService;
private ResponseBodyMessage responseBodyMessage;
//记录单据编号用于上传到单据附件管理
private String UploadFbillNo;
@GetMapping("login")
public ActionResult login(@RequestParam("FBILLNO") String FBILLNO, @RequestParam("Username") String username, @RequestParam("Password") String password) {
sealedQuotationService.login(FBILLNO, username, password);
return ResultBuilder.buildActionSuccess();
}
@PostMapping("queryData")
public ListResult queryData(@RequestBody Map<String, String> map) {
String FBILLNO = map.get("FBILLNO");
UploadFbillNo = map.get("UploadFbillNo");
List<Entity> data = null;
if (sealedQuotationService.loginChack(map)) {
data= sealedQuotationService.queryData(FBILLNO);
}
return ResultBuilder.buildEntitySuccess(data);
}
@PostMapping("queryDataItem")
public ListResult queryDataItem(@RequestBody Map<String, String> map) {
String FBILLNO = map.get("FBILLNO");
UploadFbillNo = map.get("UploadFbillNo");
List<EntityItem> data = null;
if (sealedQuotationService.loginChack(map)) {
data= sealedQuotationService.queryDataItem(FBILLNO);
}
return ResultBuilder.buildEntitySuccess(data);
}
@PostMapping("saveData")
public ListResult saveData(@RequestBody Map<String, Object> params) {
Map<String, Object> map = sealedQuotationService.saveData(params);
return ResultBuilder.buildEntitySuccess(map);
}
@PostMapping("/upload")
public ResponseBodyMessage upload(@RequestParam("file") MultipartFile file) throws IOException {
if (!file.isEmpty()) {
//获取上传文件文件名
String fileName = file.getOriginalFilename();
//获取上传文件的Base64
BASE64Encoder base64Encoder =new BASE64Encoder();
String fileBase64 = base64Encoder.encode(file.getBytes());
String FIDrestful = sealedQuotationService.InterId(UploadFbillNo);
responseBodyMessage = sealedQuotationService.uploadFile(FIDrestful,fileName,fileBase64,UploadFbillNo);
System.out.println("解析JSON数据"+ responseBodyMessage.getMessage());
return responseBodyMessage;
}
return new ResponseBodyMessage(0,"未选择文件,附近上传失败");
}
}

View File

@ -0,0 +1,313 @@
package com.gatedge.jindie.entity;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
/**
* @param
* @Author: 王康
* @Description: TODO
* @return
* @StringTime: 2023/9/6 11:47
* 描述
**/
public class Entity {
/**
* 主键
*/
@JsonProperty("FID")
private String FID;
/**
* 报价编号
*/
@JsonProperty("FBILLNO")
private String FBILLNO;
/**
* 询价名称
*/
@JsonProperty("FProjectName")
private String FProjectName;
/**
* 询价单号
*/
@JsonProperty("FSrcBillNo")
private String FSrcBillNo;
/**
* 供应商编码
*/
@JsonProperty("FSupplierId")
private String FSupplierId; // 必填项
/**
* 供应商名称
*/
@JsonProperty("FSupplierName")
private String FSupplierName;
/**
* 开标日期
*/
@JsonProperty("FOpenDate")
private String FOpenDate; // 必填项
/**
* 报价状态
*/
@JsonProperty("FPriceStatus")
private String FPriceStatus;
/**
* 报价日期
*/
@JsonProperty("FQuoteDate")
private String FQuoteDate;
/**
* 报价截止日期
*/
@JsonProperty("FExpiryDate")
private String FExpiryDate; // 必填项
/**
* 联系人
*/
@JsonProperty("FContact")
private String FContact;
/**
* 电话
*/
@JsonProperty("FPhone")
private String FPhone;
/**
* 邮箱
*/
@JsonProperty("FMail")
private String FMail;
/**
* 币别
*/
@JsonProperty("FCurrId")
private String FCurrId;
/**
* 含税
*/
@JsonProperty("FIsIncludedTax")
private String FIsIncludedTax;
/*
* 询价日期
* */
@JsonProperty("FDate")
private String FDate;
/*
* 询价员
* */
@JsonProperty("FBuyer")
private String FBuyer;
/*
* 审核人
* */
@JsonProperty("FCheckerId")
private String FCheckerId;
/*
* 数据状态 C为审核
* */
@JsonProperty("FDocumentStatus")
private String FDocumentStatus;
/*
* 状态
* */
@JsonProperty("Status")
private boolean Status;
public Entity() {
}
public Entity(String FID, String FBILLNO, String FProjectName, String FSrcBillNo, String FSupplierId, String FSupplierName, String FOpenDate, String FPriceStatus, String FQuoteDate, String FExpiryDate, String FContact, String FPhone, String FMail, String FCurrId, String FIsIncludedTax,String FDate,String FBuyer,String FCheckerId,String FDocumentStatus) {
this.FID = FID;
this.FBILLNO = FBILLNO;
this.FProjectName = FProjectName;
this.FSrcBillNo = FSrcBillNo;
this.FSupplierId = FSupplierId;
this.FSupplierName = FSupplierName;
this.FOpenDate = FOpenDate;
this.FPriceStatus = FPriceStatus;
this.FQuoteDate = FQuoteDate;
this.FExpiryDate = FExpiryDate;
this.FContact = FContact;
this.FPhone = FPhone;
this.FMail = FMail;
this.FCurrId = FCurrId;
this.FIsIncludedTax = FIsIncludedTax;
this.FDate = FDate;
this.FBuyer = FBuyer;
this.FCheckerId = FCheckerId;
this.FDocumentStatus = FDocumentStatus;
}
public String getFID() {
return FID;
}
public void setFID(String FID) {
this.FID = FID;
}
public String getFBILLNO() {
return FBILLNO;
}
public void setFBILLNO(String FBILLNO) {
this.FBILLNO = FBILLNO;
}
public String getFProjectName() {
return FProjectName;
}
public void setFProjectName(String FProjectName) {
this.FProjectName = FProjectName;
}
public String getFSrcBillNo() {
return FSrcBillNo;
}
public void setFSrcBillNo(String FSrcBillNo) {
this.FSrcBillNo = FSrcBillNo;
}
public String getFSupplierId() {
return FSupplierId;
}
public void setFSupplierId(String FSupplierId) {
this.FSupplierId = FSupplierId;
}
public String getFSupplierName() {
return FSupplierName;
}
public void setFSupplierName(String FSupplierName) {
this.FSupplierName = FSupplierName;
}
public String getFOpenDate() {
return FOpenDate;
}
public void setFOpenDate(String FOpenDate) {
this.FOpenDate = FOpenDate;
}
public String getFPriceStatus() {
return FPriceStatus;
}
public void setFPriceStatus(String FPriceStatus) {
this.FPriceStatus = FPriceStatus;
}
public String getFQuoteDate() {
return FQuoteDate;
}
public void setFQuoteDate(String FQuoteDate) {
this.FQuoteDate = FQuoteDate;
}
public String getFExpiryDate() {
return FExpiryDate;
}
public void setFExpiryDate(String FExpiryDate) {
this.FExpiryDate = FExpiryDate;
}
public String getFContact() {
return FContact;
}
public void setFContact(String FContact) {
this.FContact = FContact;
}
public String getFPhone() {
return FPhone;
}
public void setFPhone(String FPhone) {
this.FPhone = FPhone;
}
public String getFMail() {
return FMail;
}
public void setFMail(String FMail) {
this.FMail = FMail;
}
public String getFCurrId() {
return FCurrId;
}
public void setFCurrId(String FCurrId) {
this.FCurrId = FCurrId;
}
public String getFIsIncludedTax() {
return FIsIncludedTax;
}
public void setFIsIncludedTax(String FIsIncludedTax) {
this.FIsIncludedTax = FIsIncludedTax;
}
public boolean isStatus() {
return Status;
}
public void setStatus(boolean status) {
Status = status;
}
public String getFDate() {
return FDate;
}
public void setFDate(String FDate) {
this.FDate = FDate;
}
public String getFBuyer() {
return FBuyer;
}
public void setFBuyer(String FBuyer) {
this.FBuyer = FBuyer;
}
public String getFCheckerId() {
return FCheckerId;
}
public void setFCheckerId(String FCheckerId) {
this.FCheckerId = FCheckerId;
}
public String getFDocumentStatus() {
return FDocumentStatus;
}
public void setFDocumentStatus(String FDocumentStatus) {
this.FDocumentStatus = FDocumentStatus;
}
}

View File

@ -0,0 +1,197 @@
package com.gatedge.jindie.entity;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
/**
* @param
* @Author: 王康
* @Description: TODO
* @return
* @DateTime: 2023/9/6 13:54
* 描述
**/
public class EntityItem {
/**
* 主键
*/
@JsonProperty("FEntryID")
private String FEntryID;
/**
* 物料代码
*/
@JsonProperty("FMaterialId")
private String FMaterialId; // 必填项
/*
* 物料名称
* */
@JsonProperty("FMaterialName")
private String FMaterialName;
/**
* 规格型号
*/
@JsonProperty("FMaterialModel")
private String FMaterialModel;
/**
* 单位
*/
@JsonProperty("FUnitID")
private String FUnitID;
/**
* 询价数量
*/
@JsonProperty("FQty")
private String FQty;
/**
* 单价
*/
@JsonProperty("FPrice")
private String FPrice;
/**
* 税率%
*/
@JsonProperty("FTaxRate")
private String FTaxRate;
/**
* 含税单价
*/
@JsonProperty("FTaxPrice")
private String FTaxPrice;
/*
* 备注
* */
@JsonProperty("FNote")
private String FNote;
/**
* 付款方式
*/
@JsonProperty("FPayConditionId")
private String FPayConditionId;
/*
* 序号
* */
@JsonProperty("FSEQ")
private String FSEQ;
public EntityItem() {
}
public EntityItem(String FEntryID, String FMaterialId,String FMaterialName, String FUnitID, String FQty, String FPrice, String FTaxRate, String FTaxPrice, String FNote, String FPayConditionId) {
this.FEntryID = FEntryID;
this.FMaterialId = FMaterialId;
this.FMaterialName = FMaterialName;
// this.FMaterialModel = FMaterialModel;
this.FUnitID = FUnitID;
this.FQty = FQty;
this.FPrice = FPrice;
this.FTaxRate = FTaxRate;
this.FTaxPrice = FTaxPrice;
this.FNote = FNote;
this.FPayConditionId = FPayConditionId;
}
public String getFEntryID() {
return FEntryID;
}
public void setFEntryID(String FEntryID) {
this.FEntryID = FEntryID;
}
public String getFMaterialId() {
return FMaterialId;
}
public void setFMaterialId(String FMaterialId) {
this.FMaterialId = FMaterialId;
}
public String getFMaterialModel() {
return FMaterialModel;
}
public void setFMaterialModel(String FMaterialModel) {
this.FMaterialModel = FMaterialModel;
}
public String getFUnitID() {
return FUnitID;
}
public void setFUnitID(String FUnitID) {
this.FUnitID = FUnitID;
}
public String getFQty() {
return FQty;
}
public void setFQty(String FQty) {
this.FQty = FQty;
}
public String getFPrice() {
return FPrice;
}
public void setFPrice(String FPrice) {
this.FPrice = FPrice;
}
public String getFTaxRate() {
return FTaxRate;
}
public void setFTaxRate(String FTaxRate) {
this.FTaxRate = FTaxRate;
}
public String getFTaxPrice() {
return FTaxPrice;
}
public void setFTaxPrice(String FTaxPrice) {
this.FTaxPrice = FTaxPrice;
}
public String getFPayConditionId() {
return FPayConditionId;
}
public void setFPayConditionId(String FPayConditionId) {
this.FPayConditionId = FPayConditionId;
}
public String getFMaterialName() {
return FMaterialName;
}
public void setFMaterialName(String FMaterialName) {
this.FMaterialName = FMaterialName;
}
public String getFNote() {
return FNote;
}
public void setFNote(String FNote) {
this.FNote = FNote;
}
public String getFSEQ() {
return FSEQ;
}
public void setFSEQ(String FSEQ) {
this.FSEQ = FSEQ;
}
}

View File

@ -0,0 +1,25 @@
package com.gatedge.jindie.entity;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
/**
* @param
* @Author: 王康
* @Description: TODO
* @return
* @DateTime: 2023/9/6 14:17
* 描述
**/
public class EntityVO implements Serializable {
private Map<String, Object> fields = new HashMap<>();
public void setField(String fieldName, Object value) {
fields.put(fieldName, value);
}
public Object getField(String fieldName) {
return fields.get(fieldName);
}
}

View File

@ -0,0 +1,42 @@
package com.gatedge.jindie.result;
import java.io.Serializable;
/**
* HTTP的返回响应类
*
* @版权所有 珠海格致软件有限公司 www.gatedge.cn
*/
public class ActionResult implements Serializable {
private static final long serialVersionUID = -8041820346732720877L;
private int status;// 状态编码
private String message;// 消息
public ActionResult() {
super();
}
public ActionResult(int status, String message) {
super();
this.status = status;
this.message = message;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}

View File

@ -0,0 +1,52 @@
package com.gatedge.jindie.result;
import java.io.Serializable;
/**
* HTTP的返回响应类
*
* @版权所有 珠海格致软件有限公司 www.gatedge.cn
*/
public class ListResult<T> implements Serializable {
private static final long serialVersionUID = -3755143195269176337L;
private int status;// 状态编码
private T data;// 数据 NOSONAR
private String message;// 消息
public ListResult() {
super();
}
public ListResult(int status, T data, String message) {
super();
this.status = status;
this.data = data;
this.message = message;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}

View File

@ -0,0 +1,30 @@
package com.gatedge.jindie.result;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
* 构建分页信息
*
* @版权所有 珠海格致软件有限公司 www.gatedge.cn
*/
public class PaginationBuilder {
private PaginationBuilder() {
}
public static synchronized Map<String, Object> buildResult(List<LinkedHashMap<String, Object>> resultList, long total, Integer currentPage,
Integer pageSize) {
LinkedHashMap<String, Object> resultMap = new LinkedHashMap<>();
resultMap.put("list", resultList);
LinkedHashMap<String, Long> paginationMap = new LinkedHashMap<>();
paginationMap.put("total", total);
paginationMap.put("pageSize", (long) pageSize);
paginationMap.put("current", (long) currentPage);
resultMap.put("pagination", paginationMap);
return resultMap;
}
}

View File

@ -0,0 +1,32 @@
package com.gatedge.jindie.result;
/**
* @author 李天华
* @create 2024-12-24 9:43
* 文件上传的返回JSON实体类
*/
public class ResponseBodyMessage {
private int status; //状态码
private String message;
public ResponseBodyMessage(int status, String message) {
this.status = status;
this.message = message;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}

View File

@ -0,0 +1,105 @@
package com.gatedge.jindie.result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
* 构建结果返回信息
*
* @版权所有 珠海格致软件有限公司 www.gatedge.cn
*/
public class ResultBuilder {
private static final Logger LOGGER = LoggerFactory.getLogger(ResultBuilder.class);
private static final String SUCCESS = "success";
private ResultBuilder() {
}
public static synchronized ListResult<Object> buildListSuccess(String data) {
ListResult<Object> listResult = new ListResult<>();
try {
listResult.setData(data);
listResult.setStatus(HttpStatus.OK.value());
listResult.setMessage(SUCCESS);
} catch (Exception e) {
ResultBuilder.buildListWarn(listResult, e);
}
return listResult;
}
public static synchronized ListResult<Object> buildListSuccess(Map<String, Object> data) {
ListResult<Object> listResult = new ListResult<>();
try {
listResult.setData(data);
listResult.setStatus(HttpStatus.OK.value());
listResult.setMessage(SUCCESS);
} catch (Exception e) {
ResultBuilder.buildListWarn(listResult, e);
}
return listResult;
}
/** added by Hunter on 2022-8-3
* @return
*/
public static synchronized ListResult<Object> buildEntitySuccess(Object entity) {
ListResult<Object> listResult = new ListResult<>();
try {
listResult.setData(entity);
listResult.setStatus(HttpStatus.OK.value());
listResult.setMessage(SUCCESS);
} catch (Exception e) {
ResultBuilder.buildListWarn(listResult, e);
}
return listResult;
}
public static synchronized ListResult<Object> buildListSuccess(List<?> data) {
ListResult<Object> listResult = new ListResult<>();
try {
listResult.setData(data);
listResult.setStatus(HttpStatus.OK.value());
listResult.setMessage(SUCCESS);
} catch (Exception e) {
ResultBuilder.buildListWarn(listResult, e);
}
return listResult;
}
public static synchronized void buildListWarn(ListResult<Object> result, Exception e) {
result.setData(Collections.emptyMap());
result.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
result.setMessage(e.getMessage());
if (LOGGER.isWarnEnabled()) {
LOGGER.warn(e.toString());
}
}
public static synchronized ActionResult buildActionSuccess() {
ActionResult actionResult = new ActionResult();
try {
actionResult.setStatus(HttpStatus.OK.value());
actionResult.setMessage(SUCCESS);
} catch (Exception e) {
ResultBuilder.buildActionWarn(actionResult, e);
}
return actionResult;
}
public static synchronized void buildActionWarn(ActionResult result, Exception e) {
result.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
result.setMessage(e.getMessage());
if (LOGGER.isWarnEnabled()) {
LOGGER.warn(e.toString());
}
}
}

View File

@ -0,0 +1,59 @@
package com.gatedge.jindie.service;
import com.gatedge.jindie.entity.Entity;
import com.gatedge.jindie.entity.EntityItem;
import com.gatedge.jindie.entity.EntityVO;
import com.gatedge.jindie.result.ResponseBodyMessage;
import java.util.List;
import java.util.Map;
/**
* @param
* @Author: 王康
* @Description: TODO
* @return
* @DateTime: 2023/8/24 15:49
* 描述
**/
public interface SealedQuotationService {
/**
* @param FBILLNO
* @param username
* @param password
* deprecated供应商登录验证
* DateTime: 2023/9/6
**/
void login(String FBILLNO,String username, String password);
/**
* @param FBILLNO
* deprecated获取数据
* DateTime: 2023/9/6
**/
List<Entity> queryData(String FBILLNO);
/**
* @param FBILLNO
* deprecated获取明细数据
* DateTime: 2023/9/6
**/
List<EntityItem> queryDataItem(String FBILLNO);
/**
* @param params
* deprecated保存
* DateTime: 2023/9/7
**/
Map<String, Object> saveData(Map<String, Object> params);
Boolean loginChack(Map<String, String> params);
//获取单据内码
String InterId(String FBillNo);
//根据获取到的单据内码FID对单据进行附件上传
ResponseBodyMessage uploadFile(String FID, String fileName, String fileBase64, String FBillNo);
}

View File

@ -0,0 +1,367 @@
package com.gatedge.jindie.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.gatedge.jindie.entity.Entity;
import com.gatedge.jindie.entity.EntityItem;
import com.gatedge.jindie.entity.EntityVO;
import com.gatedge.jindie.result.ResponseBodyMessage;
import com.gatedge.jindie.service.SealedQuotationService;
import com.jayway.jsonpath.JsonPath;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @param
* @Author: 王康
* @Description: TODO
* @return
* @DateTime: 2023/8/24 15:53
* 描述
**/
@Service
public class SealedQuotationServiceImpl implements SealedQuotationService {
@Autowired
private RestTemplate restTemplate;
//主表
private String Primary_Meter="Fid,FBILLNO,FProjectName,FSrcBillNo,FSupplierId.FNumber,FSupplierName,FOpenDate,FPriceStatus,FQuoteDate,FExpiryDate,FContact,FPhone,FMail,FCurrId.FName,FIsIncludedTax,FDATE,FBuyer.FName,FCheckerId,FDocumentStatus";
private String Detailed_List="FEntity_FEntryID, FMATERIALID.FNumber,FMaterialId.FName, FUnitID.FName,FQty, FPrice, FTaxRate, FTaxPrice,FNote,FPayConditionId.FName";
//查询表单的FID
private String UploadPrimary_Meter = "FID";
private String QUERY_DATA_URL="http://192.168.61.20:18081/K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExecuteBillQuery.common.kdsvc";
private String SAVA_DATA_URL="http://192.168.61.20:18081/k3cloud/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save.common.kdsvc";
//上传文件的Url
private String UploadFile = "http://192.168.10.105/K3Cloud/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.AttachmentUpLoad.common.kdsvc";
//查询单据FID的Url
private String QueryInterId = "http://192.168.10.105/K3Cloud/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExecuteBillQuery.common.kdsvc";
@Override
public void login(String FBILLNO, String username, String password) {
Map<String, Object> data = new HashMap<>();
Map<String, Object> params = new HashMap<>();
params.put("FormId", "kafe2f22a0498441f9109c31cf5586da5");
params.put("FieldKeys", "FSupplierName,FSupplierId.FNumber");
params.put("FilterString", "FBILLNO like'%" + FBILLNO + "'");
params.put("OrderString", "");
params.put("TopRowCount", "0");
params.put("StartRow", "0");
params.put("Limit", "100");
data.put("data", params);
String api = loginAPI(null);
loginAPI(api);
String input = API(api, data,QUERY_DATA_URL);
if (input != null) {
input = input.substring(2, input.length() - 2); // 截取字符串去掉 "[[" "]]"
String[] parts = input.split(",");
List<String> list = new ArrayList<>();
for (String part : parts) {
String cleanedPart = part.replaceAll("[\"\\s+]", ""); // 去掉多余的双引号和空格
list.add(cleanedPart);
}
if (!list.get(0).equals(username)) {
throw new IllegalArgumentException("供应商名称有误");
}
if (!list.get(1).equals(password)) {
throw new IllegalArgumentException("供应商编号有误");
}
} else {
throw new IllegalArgumentException("未找到供应商相关数据");
}
}
@Override
public List<Entity> queryData(String FBILLNO) {
Map<String, Object> data = new HashMap<>();
Map<String, Object> params = new HashMap<>();
params.put("FormId", "kafe2f22a0498441f9109c31cf5586da5");
params.put("FieldKeys", Primary_Meter);
params.put("FilterString", "FBILLNO like'%" + FBILLNO + "'");
params.put("OrderString", "");
params.put("TopRowCount", "0");
params.put("StartRow", "0");
params.put("Limit", "100");
data.put("data", params);
String api = loginAPI(null);
loginAPI(api);
String input = API(api, data,QUERY_DATA_URL);
List<Entity> result = new ArrayList<>();
if (input != null) {
input = input.substring(2, input.length() - 2); // 截取字符串去掉 "[[" "]]"
String[] parts = input.split(",");
List<String> list = new ArrayList<>();
for (String part : parts) {
String cleanedPart = part.replaceAll("[\"\\s+]", ""); // 去掉多余的双引号和空格
list.add(cleanedPart);
}
Entity entity = new Entity(list.get(0),list.get(1),list.get(2),list.get(3),list.get(4),list.get(5),list.get(6),list.get(7),list.get(8),list.get(9),list.get(10),list.get(11),list.get(12),list.get(13),list.get(14),list.get(15),list.get(16),list.get(17),list.get(18));
if (!entity.getFCheckerId().equals("0") && entity.getFDocumentStatus().equals("C")){
entity.setStatus(false);
}else {
entity.setStatus(true);
}
result.add(entity);
}
return result;
}
@Override
public List<EntityItem> queryDataItem(String FBILLNO) {
Map<String, Object> data = new HashMap<>();
Map<String, Object> params = new HashMap<>();
params.put("FormId", "kafe2f22a0498441f9109c31cf5586da5");
params.put("FieldKeys", Detailed_List);
params.put("FilterString", "FBILLNO like'%" + FBILLNO + "'");
params.put("OrderString", "");
params.put("TopRowCount", "0");
params.put("StartRow", "0");
params.put("Limit", "100");
data.put("data",params);
String api = loginAPI(null);
loginAPI(api);
//业务API
String json = API(api, data,QUERY_DATA_URL);
List<EntityItem> result = new ArrayList<>();
if (json != null) {
//可能返回的是个集合需要处理一下
try {
ObjectMapper objectMapper = new ObjectMapper();
JsonNode jsonArray = objectMapper.readTree(json);
if (jsonArray.isArray()) {
int FSEQ=1;
for (JsonNode jsonItem : jsonArray) {
String input = jsonItem.toString();
input = input.substring(1, input.length() - 1); // 截取字符串去掉 "[[" "]]"
String[] parts = input.split(",");
List<String> list = new ArrayList<>();
for (String part : parts) {
String cleanedPart = part.replaceAll("[\"\\s+]", ""); // 去掉多余的双引号和空格
list.add(cleanedPart);
}
EntityItem entityItem = new EntityItem(list.get(0),list.get(1),list.get(2),list.get(3),list.get(4),list.get(5),list.get(6),list.get(7),list.get(8),list.get(9));
entityItem.setFSEQ(String.valueOf(FSEQ));
FSEQ++;
result.add(entityItem);
}
} else {
System.err.println("Invalid JSON array format.");
}
} catch (JsonProcessingException e) {
e.printStackTrace();
}
}
return result;
}
@Override
public Map<String, Object> saveData(Map<String, Object> params) {
String isAutoAdjustField = params.get("IsAutoAdjustField").toString();
params.remove("IsAutoAdjustField");
Map<String, Object> data = new HashMap<>();
data.put("Creator","String");
data.put("NeedUpDateFields",new ArrayList<>());
data.put("IsAutoSubmitAndAudit",isAutoAdjustField);
SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String format = simpleDateFormat.format(new Date());
params.put("FQuoteDate",format);
if (isAutoAdjustField.equals("true")) {
data.put("FIsConfirm",true);
params.put("FConfirmDate",format);
}
data.put("Model",params);
Map<String, Object> data1 = new HashMap<>();
data1.put("FormId", "kafe2f22a0498441f9109c31cf5586da5");
data1.put("data",data);
String api = loginAPI(null);
loginAPI(api);
//业务API
String json = API(api, data1,SAVA_DATA_URL);
ObjectMapper objectMapper = new ObjectMapper();
Map<String, Object> map = null;
try {
map = objectMapper.readValue(json, new TypeReference<Map<String, Object>>(){});
} catch (JsonProcessingException e) {
e.printStackTrace();
}
return map;
}
public String API(String apiCookie, Map<String, Object> data,String url) {
// 设置请求头信息
HttpHeaders headers = new HttpHeaders();
headers.set("Content-Type", "application/json");
headers.set("kdservice-sessionid", apiCookie);
// 设置请求参数
ObjectMapper objectMapper = new ObjectMapper();
String jsonData = null;
try {
jsonData = objectMapper.writeValueAsString(data);
} catch (JsonProcessingException e) {
e.printStackTrace();
}
// String url = "http://192.168.61.20:18081/K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExecuteBillQuery.common.kdsvc";
HttpEntity<String> requestEntity = new HttpEntity<>(jsonData, headers);
System.out.println(jsonData);
// 发送POST请求
ResponseEntity<String> responseEntity = restTemplate.exchange(url, HttpMethod.POST, requestEntity, String.class);
// 获取返回信息
String response = responseEntity.getBody();
if (Objects.equals(response, "[]")) {
return null;
} else {
return response;
}
}
public String loginAPI(String apiCookie) {
Map<String, Object> params = new HashMap<>();
// params.put("acctID", "63e200975197e2");
params.put("acctID", "639130a0cbb6ae");
params.put("Username", "ERP1");
// params.put("Username", "王扶民");
params.put("Password", "888888");
params.put("Lcid", "2052");
// 设置请求头信息
HttpHeaders headers = new HttpHeaders();
headers.set("Content-Type", "application/json");
if (apiCookie != null) {
headers.set("kdservice-sessionid", "95db4c18-10cd-420c-a0eb-96e2ee2db7f8");
}
// 设置请求参数
ObjectMapper objectMapper = new ObjectMapper();
String jsonData = null;
try {
jsonData = objectMapper.writeValueAsString(params);
} catch (JsonProcessingException e) {
e.printStackTrace();
}
String url = "http://192.168.61.20:18081/K3Cloud/Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc";
// String url = "http://1.14.142.111:9090/K3Cloud/Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc";
HttpEntity<String> requestEntity = new HttpEntity<>(jsonData, headers);
// 发送POST请求
ResponseEntity<String> responseEntity = restTemplate.exchange(url, HttpMethod.POST, requestEntity, String.class);
HttpHeaders headersResponse = responseEntity.getHeaders();
List<String> list = headersResponse.get("Set-Cookie");
// 获取返回信息
String sessionId = null;
String str = list.get(0);
Pattern pattern = Pattern.compile("kdservice-sessionid=(.*?);");
Matcher matcher = pattern.matcher(str);
if (matcher.find()) {
sessionId = matcher.group(1);
System.out.println(sessionId); // 输出d57b692d-9358-4242-a6ee-553d6f6b3b4f
}
return sessionId;
}
@Override
public Boolean loginChack(Map<String, String> paramsData) {
String username = paramsData.get("username");
String password = paramsData.get("password");
String FBILLNO = paramsData.get("FBILLNO");
Map<String, Object> data = new HashMap<>();
Map<String, Object> params = new HashMap<>();
params.put("FormId", "kafe2f22a0498441f9109c31cf5586da5");
params.put("FieldKeys", "FSupplierName,FSupplierId.FNumber");
params.put("FilterString", "FBILLNO like'%" + FBILLNO + "'");
params.put("OrderString", "");
params.put("TopRowCount", "0");
params.put("StartRow", "0");
params.put("Limit", "100");
data.put("data", params);
String api = loginAPI(null);
loginAPI(api);
String input = API(api, data,QUERY_DATA_URL);
if (input != null) {
input = input.substring(2, input.length() - 2); // 截取字符串去掉 "[[" "]]"
String[] parts = input.split(",");
List<String> list = new ArrayList<>();
for (String part : parts) {
String cleanedPart = part.replaceAll("[\"\\s+]", ""); // 去掉多余的双引号和空格
list.add(cleanedPart);
}
if (!list.get(0).equals(username)) {
return false;
}
if (!list.get(1).equals(password)) {
return false;
}
return true;
} else {
return false;
}
}
@Override
public String InterId(String FBillNo) {
Map<String, Object> data = new HashMap<>();
Map<String, Object> params = new HashMap<>();
params.put("FormId","kafe2f22a0498441f9109c31cf5586da5");
params.put("FieldKeys",UploadPrimary_Meter);
params.put("FilterString", "FBILLNO like'%" + FBillNo + "'");
data.put("data", params);
String api = loginAPI(null);
loginAPI(api);
String input = API(api,data,QueryInterId);
if (input != null) {
//截取字符串去掉[[]]
input = input.substring(2, input.length() - 2);
}
return input;
}
@Override
public ResponseBodyMessage uploadFile(String FID, String fileName, String fileBase64, String FBillNo) {
Map<String,Object> data = new HashMap<>();
Map<String,Object> params = new HashMap<>();
params.put("FileName",fileName);
params.put("FormId","kafe2f22a0498441f9109c31cf5586da5");
params.put("IsLast",true);
params.put("InterId",FID);
params.put("BillNO",FBillNo);
params.put("SendByte",fileBase64);
data.put("data",params);
String api = loginAPI(null);
loginAPI(api);
String Json =API(api,data,UploadFile);
System.out.println(Json);
Boolean Success = JsonPath.read(Json,"$.Result.ResponseStatus.IsSuccess");
if(Success){
return new ResponseBodyMessage(1,"附件上传成功");
}else {
String message = JsonPath.read(Json,"$.Result.ResponseStatus.Errors[0].Message");
return new ResponseBodyMessage(0,"附件上传失败,失败原因:"+message);
}
}
}

View File

@ -0,0 +1,61 @@
package com.gatedge.jindie;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.gatedge.jindie.entity.EntityItem;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* @param
* @Author: 王康
* @Description: TODO
* @return
* @DateTime: 2023/9/6 10:50
* 描述
**/
public class test {
public static void main(String[] args) {
// String jsonString = "[[100046,\"1.01.001.0057\",\"侧板-50KW系列\",\"Pcs\",100,0,16,0,\" \",\"先收30%70%在应收单后30天收\"],[100047,\"1.01.001.0055\",\"接板-A系列\",\"Pcs\",200,0,16,0,\" \",\"先收30%70%在应收单后30天收\"]]";
// String jsonString1 = "[[100007,\"BJ23060006\",\"测试密封报价\",\"XJ23060001\",101643,\"手机事业部\",\"2023-06-28T00:00:00\",\"A\",\"2023-06-22T00:00:00\",\"2023-06-26T00:00:00\",\" \",\" \",\" \",1,true,\"156628\",\"C\"]]";
// t1(jsonString);
// t1(jsonString1);
SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String format = simpleDateFormat.format(new Date());
System.out.println(new Date());
System.out.println(format);
}
static void t1(String jsonString){
try {
ObjectMapper objectMapper = new ObjectMapper();
JsonNode jsonArray = objectMapper.readTree(jsonString);
if (jsonArray.isArray()) {
int FSEQ=1;
for (JsonNode jsonItem : jsonArray) {
String input = jsonItem.toString();
String substring = input.substring(0, 2);
input = input.substring(1, input.length() - 1); // 截取字符串去掉 "[[" "]]"
String[] parts = input.split(",");
List<String> list = new ArrayList<>();
for (String part : parts) {
String cleanedPart = part.replaceAll("[\"\\s+]", ""); // 去掉多余的双引号和空格
list.add(cleanedPart);
}
EntityItem entityItem = new EntityItem(list.get(0),list.get(1),list.get(2),list.get(3),list.get(4),list.get(5),list.get(6),list.get(7),list.get(8),list.get(9));
entityItem.setFSEQ(String.valueOf(FSEQ));
FSEQ++;
}
} else {
System.err.println("Invalid JSON array format.");
}
} catch (JsonProcessingException e) {
e.printStackTrace();
}
}
}

View File

@ -0,0 +1,7 @@
server:
port: 10002
spring:
servlet:
multipart:
max-file-size: 100MB
max-request-size: 100MB

View File

@ -0,0 +1,6 @@
<html>
<body>
<h1>hello word!!!</h1>
<p>this is a html page</p>
</body>
</html>

View File

@ -0,0 +1,13 @@
package com.gatedge;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class GatedgeApplicationTests {
@Test
void contextLoads() {
}
}

6
node_modules/.package-lock.json generated vendored Normal file
View File

@ -0,0 +1,6 @@
{
"name": "TianDaMFBJ_Test",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}

6
package-lock.json generated Normal file
View File

@ -0,0 +1,6 @@
{
"name": "TianDaMFBJ_Test",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}

1
tdtest/.npmrc Normal file
View File

@ -0,0 +1 @@
shamefully-flatten=true

10
tdtest/package.json Normal file
View File

@ -0,0 +1,10 @@
{
"name": "tdtest",
"version": "0.1.0",
"private": true,
"devDependencies": {
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "~5.0.0"
}
}

23
vue/.gitignore vendored Normal file
View File

@ -0,0 +1,23 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

24
vue/README.md Normal file
View File

@ -0,0 +1,24 @@
# vue2_element
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

3
vue/babel.config.js Normal file
View File

@ -0,0 +1,3 @@
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"],
};

19
vue/jsconfig.json Normal file
View File

@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}

18347
vue/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

35
vue/package.json Normal file
View File

@ -0,0 +1,35 @@
{
"name": "vue2_element",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^1.4.0",
"core-js": "^3.8.3",
"element-ui": "^2.15.14",
"js-cookie": "^3.0.5",
"vue": "^3.5.13",
"vue-router": "^4.5.0",
"vuex": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@vue/cli-plugin-babel": "^5.0.8",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-plugin-vuex": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"prettier": "^2.4.1",
"sass": "^1.32.7",
"sass-loader": "^12.0.0",
"vue-template-compiler": "^2.6.14"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}

7721
vue/pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

BIN
vue/public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

17
vue/public/index.html Normal file
View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

31
vue/src/App.vue Normal file
View File

@ -0,0 +1,31 @@
<template>
<div id="app">
<router-view />
</div>
</template>
<style lang="scss">
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
height: calc(100vh - 16px);
}
nav {
padding: 30px;
a {
font-weight: bold;
color: #2c3e50;
&.router-link-exact-active {
color: #42b983;
}
}
}
</style>

33
vue/src/api/login.js Normal file
View File

@ -0,0 +1,33 @@
import request from "@/utils/request";
export function login(query) {
return request({
url: "/api/admin/login",
method: "get",
params:query,
});
}
export function queryData(data) {
return request({
url: "/api/admin/queryData",
method: "post",
data,
});
}
export function queryDataItem(data) {
return request({
url: "/api/admin/queryDataItem",
method: "post",
data,
});
}
export function saveData(data) {
return request({
url: "/api/admin/saveData",
method: "post",
data,
});
}