version 1
This commit is contained in:
parent
d17141a17a
commit
481bc10d43
33
gatedge/.gitignore
vendored
Normal file
33
gatedge/.gitignore
vendored
Normal 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/
|
108
gatedge/pom.xml
Normal file
108
gatedge/pom.xml
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
<?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>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>
|
13
gatedge/src/main/java/com/gatedge/GatedgeApplication.java
Normal file
13
gatedge/src/main/java/com/gatedge/GatedgeApplication.java
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
20
gatedge/src/main/java/com/gatedge/jindie/config/Restful.java
Normal file
20
gatedge/src/main/java/com/gatedge/jindie/config/Restful.java
Normal 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();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,64 @@
|
|||||||
|
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.ResultBuilder;
|
||||||
|
import com.gatedge.jindie.service.SealedQuotationService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
@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");
|
||||||
|
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");
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
313
gatedge/src/main/java/com/gatedge/jindie/entity/Entity.java
Normal file
313
gatedge/src/main/java/com/gatedge/jindie/entity/Entity.java
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
197
gatedge/src/main/java/com/gatedge/jindie/entity/EntityItem.java
Normal file
197
gatedge/src/main/java/com/gatedge/jindie/entity/EntityItem.java
Normal 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
package com.gatedge.jindie.service;
|
||||||
|
|
||||||
|
import com.gatedge.jindie.entity.Entity;
|
||||||
|
import com.gatedge.jindie.entity.EntityItem;
|
||||||
|
import com.gatedge.jindie.entity.EntityVO;
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
@ -0,0 +1,334 @@
|
|||||||
|
package com.gatedge.jindie.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
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.service.SealedQuotationService;
|
||||||
|
|
||||||
|
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.*;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @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";
|
||||||
|
|
||||||
|
private String QUERY_DATA_URL="http://1.14.142.111:9090/K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExecuteBillQuery.common.kdsvc";
|
||||||
|
private String SAVA_DATA_URL="http://1.14.142.111:9090/k3cloud/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save.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());
|
||||||
|
data.put("FQuoteDate",format);
|
||||||
|
if (isAutoAdjustField.equals("true")) {
|
||||||
|
data.put("FIsConfirm",true);
|
||||||
|
data.put("FConfirmDate",true);
|
||||||
|
}
|
||||||
|
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://1.14.142.111:9090/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 SAVA_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://1.14.142.111:9090/K3CLOUD/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExecuteBillQuery.common.kdsvc";
|
||||||
|
HttpEntity<String> requestEntity = new HttpEntity<>(jsonData, headers);
|
||||||
|
|
||||||
|
// 发送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("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", "54f0d8ff-00a7-4db0-992b-cfe9abed566e");
|
||||||
|
}
|
||||||
|
// 设置请求参数
|
||||||
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
String jsonData = null;
|
||||||
|
try {
|
||||||
|
jsonData = objectMapper.writeValueAsString(params);
|
||||||
|
} catch (JsonProcessingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
|
||||||
|
// 获取返回信息
|
||||||
|
String response = responseEntity.getBody();
|
||||||
|
Map<String, Object> resultMap = JSON.parseObject(response);
|
||||||
|
return resultMap.get("KDSVCSessionId").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
@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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
61
gatedge/src/main/java/com/gatedge/jindie/test.java
Normal file
61
gatedge/src/main/java/com/gatedge/jindie/test.java
Normal 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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
3
gatedge/src/main/resources/application.yml
Normal file
3
gatedge/src/main/resources/application.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
server:
|
||||||
|
port: 10002
|
||||||
|
|
6
gatedge/src/main/resources/static/index.html
Normal file
6
gatedge/src/main/resources/static/index.html
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<h1>hello word!!!</h1>
|
||||||
|
<p>this is a html page</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -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() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
23
vue/.gitignore
vendored
Normal file
23
vue/.gitignore
vendored
Normal 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
24
vue/README.md
Normal 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
3
vue/babel.config.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
module.exports = {
|
||||||
|
presets: ["@vue/cli-plugin-babel/preset"],
|
||||||
|
};
|
19
vue/jsconfig.json
Normal file
19
vue/jsconfig.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es5",
|
||||||
|
"module": "esnext",
|
||||||
|
"baseUrl": "./",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"paths": {
|
||||||
|
"@/*": [
|
||||||
|
"src/*"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"lib": [
|
||||||
|
"esnext",
|
||||||
|
"dom",
|
||||||
|
"dom.iterable",
|
||||||
|
"scripthost"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
17713
vue/package-lock.json
generated
Normal file
17713
vue/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
35
vue/package.json
Normal file
35
vue/package.json
Normal 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.13",
|
||||||
|
"js-cookie": "^3.0.5",
|
||||||
|
"vue": "^2.6.14",
|
||||||
|
"vue-router": "^3.5.1",
|
||||||
|
"vuex": "^3.6.2"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.12.16",
|
||||||
|
"@vue/cli-plugin-babel": "~5.0.0",
|
||||||
|
"@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"
|
||||||
|
]
|
||||||
|
}
|
BIN
vue/public/favicon.ico
Normal file
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
17
vue/public/index.html
Normal 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
31
vue/src/App.vue
Normal 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
33
vue/src/api/login.js
Normal 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,
|
||||||
|
});
|
||||||
|
}
|
9
vue/src/api/user.js
Normal file
9
vue/src/api/user.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
export function getTenantCodeByUser(data) {
|
||||||
|
return request({
|
||||||
|
url: "/api/account/sysuserdetail/getTenantCodeByUser",
|
||||||
|
method: "post",
|
||||||
|
params: data,
|
||||||
|
});
|
||||||
|
}
|
BIN
vue/src/assets/logo.png
Normal file
BIN
vue/src/assets/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
130
vue/src/components/HelloWorld.vue
Normal file
130
vue/src/components/HelloWorld.vue
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
<template>
|
||||||
|
<div class="hello">
|
||||||
|
<h1>{{ msg }}</h1>
|
||||||
|
<p>
|
||||||
|
For a guide and recipes on how to configure / customize this project,<br />
|
||||||
|
check out the
|
||||||
|
<a href="https://cli.vuejs.org" target="_blank" rel="noopener"
|
||||||
|
>vue-cli documentation</a
|
||||||
|
>.
|
||||||
|
</p>
|
||||||
|
<h3>Installed CLI Plugins</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
>babel</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
>router</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-vuex"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
>vuex</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
>eslint</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h3>Essential Links</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="https://forum.vuejs.org" target="_blank" rel="noopener"
|
||||||
|
>Forum</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="https://chat.vuejs.org" target="_blank" rel="noopener"
|
||||||
|
>Community Chat</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="https://twitter.com/vuejs" target="_blank" rel="noopener"
|
||||||
|
>Twitter</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h3>Ecosystem</h3>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="https://router.vuejs.org" target="_blank" rel="noopener"
|
||||||
|
>vue-router</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href="https://github.com/vuejs/vue-devtools#vue-devtools"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
>vue-devtools</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener"
|
||||||
|
>vue-loader</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href="https://github.com/vuejs/awesome-vue"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener"
|
||||||
|
>awesome-vue</a
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "HelloWorld",
|
||||||
|
props: {
|
||||||
|
msg: String,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||||
|
<style scoped lang="scss">
|
||||||
|
h3 {
|
||||||
|
margin: 40px 0 0;
|
||||||
|
}
|
||||||
|
ul {
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
li {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 10px;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: #42b983;
|
||||||
|
}
|
||||||
|
</style>
|
22
vue/src/main.js
Normal file
22
vue/src/main.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import Vue from "vue";
|
||||||
|
import App from "./App.vue";
|
||||||
|
import router from "./router";
|
||||||
|
import store from "./store";
|
||||||
|
import Cookies from "js-cookie";
|
||||||
|
import Element from "element-ui";
|
||||||
|
import "./styles/element-variables.scss";
|
||||||
|
|
||||||
|
import axios from "axios";
|
||||||
|
|
||||||
|
Vue.prototype.$axios = axios;
|
||||||
|
Vue.config.productionTip = false;
|
||||||
|
Vue.use(Element, {
|
||||||
|
size: Cookies.get("size") || "small", // set element-ui default size
|
||||||
|
});
|
||||||
|
Element.Dialog.props.closeOnClickModal.default = false; // 全局关闭,点击遮罩层关闭弹窗
|
||||||
|
|
||||||
|
new Vue({
|
||||||
|
router,
|
||||||
|
store,
|
||||||
|
render: (h) => h(App),
|
||||||
|
}).$mount("#app");
|
31
vue/src/router/index.js
Normal file
31
vue/src/router/index.js
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import Vue from "vue";
|
||||||
|
import VueRouter from "vue-router";
|
||||||
|
|
||||||
|
Vue.use(VueRouter);
|
||||||
|
|
||||||
|
const routes = [
|
||||||
|
{
|
||||||
|
path: "/",
|
||||||
|
component: () => import("@/views/login/login"),
|
||||||
|
name: "SysUrl",
|
||||||
|
meta: { title: "sysurl", icon: "el-icon-set-up" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/about",
|
||||||
|
component: () => import("@/views/AboutView"),
|
||||||
|
name: "SysRole",
|
||||||
|
meta: { icon: "el-icon-postcard" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/master",
|
||||||
|
component: () => import("@/views/master/master"),
|
||||||
|
name: "master",
|
||||||
|
meta: { icon: "el-icon-postcard" },
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const router = new VueRouter({
|
||||||
|
routes,
|
||||||
|
});
|
||||||
|
|
||||||
|
export default router;
|
5
vue/src/store/getters.js
Normal file
5
vue/src/store/getters.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
const getters = {
|
||||||
|
token: (state) => state.user.token,
|
||||||
|
cookie: (state) => state.user.cookie,
|
||||||
|
};
|
||||||
|
export default getters;
|
25
vue/src/store/index.js
Normal file
25
vue/src/store/index.js
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import Vue from "vue";
|
||||||
|
|
||||||
|
import Vuex from "vuex";
|
||||||
|
import getters from "./getters";
|
||||||
|
Vue.use(Vuex);
|
||||||
|
|
||||||
|
// https://webpack.js.org/guides/dependency-management/#requirecontext
|
||||||
|
const modulesFiles = require.context("./modules", true, /\.js$/);
|
||||||
|
|
||||||
|
// you do not need `import app from './modules/app'`
|
||||||
|
// it will auto require all vuex module from modules file
|
||||||
|
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
|
||||||
|
// set './app.js' => 'app'
|
||||||
|
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, "$1");
|
||||||
|
const value = modulesFiles(modulePath);
|
||||||
|
modules[moduleName] = value.default;
|
||||||
|
return modules;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
const store = new Vuex.Store({
|
||||||
|
modules,
|
||||||
|
getters,
|
||||||
|
});
|
||||||
|
|
||||||
|
export default store;
|
17
vue/src/store/modules/user.js
Normal file
17
vue/src/store/modules/user.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import { getToken, setToken, removeToken, getCookie } from "@/utils/auth";
|
||||||
|
|
||||||
|
const state = {
|
||||||
|
token: getToken(),
|
||||||
|
cookie: getCookie(),
|
||||||
|
};
|
||||||
|
|
||||||
|
const mutations = {};
|
||||||
|
|
||||||
|
const actions = {};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
namespaced: true,
|
||||||
|
state,
|
||||||
|
mutations,
|
||||||
|
actions,
|
||||||
|
};
|
106
vue/src/styles/btn.scss
Normal file
106
vue/src/styles/btn.scss
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
@import './variables.scss';
|
||||||
|
|
||||||
|
@mixin colorBtn($color) {
|
||||||
|
background: $color;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: $color;
|
||||||
|
|
||||||
|
&:before,
|
||||||
|
&:after {
|
||||||
|
background: $color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.blue-btn {
|
||||||
|
@include colorBtn($blue)
|
||||||
|
}
|
||||||
|
|
||||||
|
.light-blue-btn {
|
||||||
|
@include colorBtn($light-blue)
|
||||||
|
}
|
||||||
|
|
||||||
|
.red-btn {
|
||||||
|
@include colorBtn($red)
|
||||||
|
}
|
||||||
|
|
||||||
|
.pink-btn {
|
||||||
|
@include colorBtn($pink)
|
||||||
|
}
|
||||||
|
|
||||||
|
.green-btn {
|
||||||
|
@include colorBtn($green)
|
||||||
|
}
|
||||||
|
|
||||||
|
.tiffany-btn {
|
||||||
|
@include colorBtn($tiffany)
|
||||||
|
}
|
||||||
|
|
||||||
|
.yellow-btn {
|
||||||
|
@include colorBtn($yellow)
|
||||||
|
}
|
||||||
|
|
||||||
|
.pan-btn {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #fff;
|
||||||
|
padding: 14px 36px;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
transition: 600ms ease all;
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: #fff;
|
||||||
|
|
||||||
|
&:before,
|
||||||
|
&:after {
|
||||||
|
width: 100%;
|
||||||
|
transition: 600ms ease all;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:before,
|
||||||
|
&:after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 2px;
|
||||||
|
width: 0;
|
||||||
|
transition: 400ms ease all;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
right: inherit;
|
||||||
|
top: inherit;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-button {
|
||||||
|
display: inline-block;
|
||||||
|
line-height: 1;
|
||||||
|
white-space: nowrap;
|
||||||
|
cursor: pointer;
|
||||||
|
background: #fff;
|
||||||
|
color: #fff;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
outline: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 10px 15px;
|
||||||
|
font-size: 14px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.svg-icon-arrow {
|
||||||
|
cursor: pointer;
|
||||||
|
color: #1890ff;
|
||||||
|
padding-left: 10px;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
83
vue/src/styles/element-ui.scss
Normal file
83
vue/src/styles/element-ui.scss
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
// cover some element-ui styles
|
||||||
|
|
||||||
|
.el-breadcrumb__inner,
|
||||||
|
.el-breadcrumb__inner a {
|
||||||
|
font-weight: 400 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-upload {
|
||||||
|
input[type="file"] {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-upload__input {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cell {
|
||||||
|
.el-tag {
|
||||||
|
margin-right: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.small-padding {
|
||||||
|
.cell {
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed-width {
|
||||||
|
.el-button--mini {
|
||||||
|
padding: 7px 10px;
|
||||||
|
min-width: 60px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-col {
|
||||||
|
.cell {
|
||||||
|
padding: 0 10px;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.el-tag {
|
||||||
|
margin-right: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-dialog {
|
||||||
|
transform: none;
|
||||||
|
left: 0;
|
||||||
|
position: relative;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
// refine element ui upload
|
||||||
|
.upload-container {
|
||||||
|
.el-upload {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.el-upload-dragger {
|
||||||
|
width: 100%;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// dropdown
|
||||||
|
.el-dropdown-menu {
|
||||||
|
a {
|
||||||
|
display: block
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// fix date-picker ui bug in filter-item
|
||||||
|
.el-range-editor.el-input__inner {
|
||||||
|
display: inline-flex !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
// to fix el-date-picker css style
|
||||||
|
.el-range-separator {
|
||||||
|
box-sizing: content-box;
|
||||||
|
}
|
31
vue/src/styles/element-variables.scss
Normal file
31
vue/src/styles/element-variables.scss
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/**
|
||||||
|
* I think element-ui's default theme color is too light for long-term use.
|
||||||
|
* So I modified the default color and you can modify it to your liking.
|
||||||
|
**/
|
||||||
|
|
||||||
|
/* theme color */
|
||||||
|
$--color-primary: #1890ff;
|
||||||
|
$--color-success: #13ce66;
|
||||||
|
$--color-warning: #ffba00;
|
||||||
|
$--color-danger: #ff4949;
|
||||||
|
// $--color-info: #1E1E1E;
|
||||||
|
|
||||||
|
$--button-font-weight: 400;
|
||||||
|
|
||||||
|
// $--color-text-regular: #1f2d3d;
|
||||||
|
|
||||||
|
$--border-color-light: #dfe4ed;
|
||||||
|
$--border-color-lighter: #e6ebf5;
|
||||||
|
|
||||||
|
$--table-border: 1px solid #dfe6ec;
|
||||||
|
|
||||||
|
/* icon font path, required */
|
||||||
|
$--font-path: "~element-ui/lib/theme-chalk/fonts";
|
||||||
|
|
||||||
|
@import "~element-ui/packages/theme-chalk/src/index";
|
||||||
|
|
||||||
|
// the :export directive is the magic sauce for webpack
|
||||||
|
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
|
||||||
|
:export {
|
||||||
|
theme: $--color-primary;
|
||||||
|
}
|
271
vue/src/styles/formgeneratorhome.scss
Normal file
271
vue/src/styles/formgeneratorhome.scss
Normal file
@ -0,0 +1,271 @@
|
|||||||
|
$selectedColor: #f6f7ff;
|
||||||
|
$lighterBlue: #409EFF;
|
||||||
|
|
||||||
|
.container {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.components-list {
|
||||||
|
padding: 8px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 100%;
|
||||||
|
.components-item {
|
||||||
|
display: inline-block;
|
||||||
|
width: 48%;
|
||||||
|
margin: 1%;
|
||||||
|
transition: transform 0ms !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.components-draggable {
|
||||||
|
padding-bottom: 20px;
|
||||||
|
}
|
||||||
|
.components-title {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #222;
|
||||||
|
margin: 6px 2px;
|
||||||
|
.svg-icon {
|
||||||
|
color: #666;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.components-body {
|
||||||
|
padding: 8px 10px;
|
||||||
|
background: $selectedColor;
|
||||||
|
font-size: 12px;
|
||||||
|
cursor: move;
|
||||||
|
border: 1px dashed $selectedColor;
|
||||||
|
border-radius: 3px;
|
||||||
|
.svg-icon {
|
||||||
|
color: #777;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
border: 1px dashed #787be8;
|
||||||
|
color: #787be8;
|
||||||
|
.svg-icon {
|
||||||
|
color: #787be8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-board {
|
||||||
|
width: 260px;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
.left-scrollbar{
|
||||||
|
height: calc(100vh - 42px);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.center-scrollbar {
|
||||||
|
height: calc(100vh - 42px);
|
||||||
|
overflow: hidden;
|
||||||
|
border-left: 1px solid #f1e8e8;
|
||||||
|
border-right: 1px solid #f1e8e8;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.center-board {
|
||||||
|
height: 100vh;
|
||||||
|
width: auto;
|
||||||
|
margin: 0 350px 0 260px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.empty-info {
|
||||||
|
position: absolute;
|
||||||
|
top: 46%;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #ccb1ea;
|
||||||
|
letter-spacing: 4px;
|
||||||
|
}
|
||||||
|
.action-bar {
|
||||||
|
position: relative;
|
||||||
|
height: 42px;
|
||||||
|
text-align: right;
|
||||||
|
padding: 0 15px;
|
||||||
|
box-sizing: border-box;;
|
||||||
|
border: 1px solid #f1e8e8;
|
||||||
|
border-top: none;
|
||||||
|
border-left: none;
|
||||||
|
.delete-btn {
|
||||||
|
color: #F56C6C;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.logo-wrapper {
|
||||||
|
position: relative;
|
||||||
|
height: 42px;
|
||||||
|
background: #fff;
|
||||||
|
border-bottom: 1px solid #f1e8e8;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
.logo {
|
||||||
|
position: absolute;
|
||||||
|
left: 12px;
|
||||||
|
top: 6px;
|
||||||
|
line-height: 30px;
|
||||||
|
color: #00afff;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 17px;
|
||||||
|
white-space: nowrap;
|
||||||
|
> img {
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
.github {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: sub;
|
||||||
|
margin-left: 15px;
|
||||||
|
> img {
|
||||||
|
height: 22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.center-board-row {
|
||||||
|
padding: 12px 12px 15px 12px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
& > .el-form {
|
||||||
|
// 69 = 12+15+42
|
||||||
|
height: calc(100vh - 69px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.drawing-board {
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
.components-body {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
font-size: 0;
|
||||||
|
}
|
||||||
|
.sortable-ghost {
|
||||||
|
position: relative;
|
||||||
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
|
&::before {
|
||||||
|
content: " ";
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
height: 3px;
|
||||||
|
background: rgb(89, 89, 223);
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.components-item.sortable-ghost {
|
||||||
|
width: 100%;
|
||||||
|
height: 60px;
|
||||||
|
background-color: $selectedColor;
|
||||||
|
}
|
||||||
|
.active-from-item {
|
||||||
|
& > .el-form-item {
|
||||||
|
background: $selectedColor;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
& > .drawing-item-copy, & > .drawing-item-delete {
|
||||||
|
display: initial;
|
||||||
|
}
|
||||||
|
& > .component-name {
|
||||||
|
color: $lighterBlue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.drawing-item {
|
||||||
|
position: relative;
|
||||||
|
cursor: move;
|
||||||
|
&.unfocus-bordered:not(.active-from-item) > div:first-child {
|
||||||
|
border: 1px dashed #ccc;
|
||||||
|
}
|
||||||
|
.el-form-item {
|
||||||
|
padding: 12px 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.drawing-row-item {
|
||||||
|
position: relative;
|
||||||
|
cursor: move;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 1px dashed #ccc;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 0 2px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
.drawing-row-item {
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
.el-col {
|
||||||
|
margin-top: 22px;
|
||||||
|
}
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
.drag-wrapper {
|
||||||
|
min-height: 80px;
|
||||||
|
}
|
||||||
|
&.active-from-item {
|
||||||
|
border: 1px dashed $lighterBlue;
|
||||||
|
}
|
||||||
|
.component-name {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #bbb;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.drawing-item, .drawing-row-item {
|
||||||
|
&:hover {
|
||||||
|
& > .el-form-item {
|
||||||
|
background: $selectedColor;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
& > .drawing-item-copy, & > .drawing-item-delete {
|
||||||
|
display: initial;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
& > .drawing-item-copy, & > .drawing-item-delete {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
top: -10px;
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
line-height: 22px;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
font-size: 12px;
|
||||||
|
border: 1px solid;
|
||||||
|
cursor: pointer;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
& > .drawing-item-copy {
|
||||||
|
right: 56px;
|
||||||
|
border-color: $lighterBlue;
|
||||||
|
color: $lighterBlue;
|
||||||
|
background: #fff;
|
||||||
|
&:hover {
|
||||||
|
background: $lighterBlue;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
& > .drawing-item-delete {
|
||||||
|
right: 24px;
|
||||||
|
border-color: #F56C6C;
|
||||||
|
color: #F56C6C;
|
||||||
|
background: #fff;
|
||||||
|
&:hover {
|
||||||
|
background: #F56C6C;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
527
vue/src/styles/index.scss
Normal file
527
vue/src/styles/index.scss
Normal file
@ -0,0 +1,527 @@
|
|||||||
|
@import './variables.scss';
|
||||||
|
@import './mixin.scss';
|
||||||
|
@import './transition.scss';
|
||||||
|
@import './element-ui.scss';
|
||||||
|
@import './sidebar.scss';
|
||||||
|
@import './btn.scss';
|
||||||
|
|
||||||
|
body {
|
||||||
|
height: 100%;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
height: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
*,
|
||||||
|
*:before,
|
||||||
|
*:after {
|
||||||
|
box-sizing: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-padding {
|
||||||
|
padding: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.padding-content {
|
||||||
|
padding: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:focus,
|
||||||
|
a:active {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a,
|
||||||
|
a:focus,
|
||||||
|
a:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div:focus {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fr {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fl {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pr-5 {
|
||||||
|
padding-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pl-5 {
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.block {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pointer {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inlineBlock {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.clearfix {
|
||||||
|
&:after {
|
||||||
|
visibility: hidden;
|
||||||
|
display: block;
|
||||||
|
font-size: 0;
|
||||||
|
content: " ";
|
||||||
|
clear: both;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
aside {
|
||||||
|
background: #eef1f6;
|
||||||
|
padding: 8px 24px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
border-radius: 2px;
|
||||||
|
display: block;
|
||||||
|
line-height: 32px;
|
||||||
|
font-size: 16px;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
||||||
|
color: #2c3e50;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #337ab7;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: rgb(32, 160, 255);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//main-container全局样式
|
||||||
|
.app-container {
|
||||||
|
padding: 20px;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.components-container {
|
||||||
|
margin: 30px 50px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination-container {
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-center {
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub-navbar {
|
||||||
|
height: 50px;
|
||||||
|
line-height: 50px;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 20px;
|
||||||
|
transition: 600ms ease position;
|
||||||
|
background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%);
|
||||||
|
|
||||||
|
.subtitle {
|
||||||
|
font-size: 20px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.draft {
|
||||||
|
background: #d0d0d0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.deleted {
|
||||||
|
background: #d0d0d0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-type,
|
||||||
|
.link-type:focus {
|
||||||
|
color: #337ab7;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: rgb(32, 160, 255);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-container {
|
||||||
|
padding-bottom: 10px;
|
||||||
|
|
||||||
|
.filter-input {
|
||||||
|
width: 150px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-item {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//refine vue-multiselect plugin
|
||||||
|
.multiselect {
|
||||||
|
line-height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.multiselect--active {
|
||||||
|
z-index: 1000 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.center-tabs {
|
||||||
|
.el-tabs__header {
|
||||||
|
margin-bottom: 0!important;
|
||||||
|
}
|
||||||
|
.el-tabs__item {
|
||||||
|
width: 50%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.el-tabs__nav {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
}
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background-color: #C0D4F0;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
// formgenerator
|
||||||
|
$editorTabsborderColor: #121315;
|
||||||
|
.editor-tabs {
|
||||||
|
background: $editorTabsborderColor;
|
||||||
|
.el-tabs__header {
|
||||||
|
margin: 0;
|
||||||
|
border-bottom-color: $editorTabsborderColor;
|
||||||
|
.el-tabs__nav {
|
||||||
|
border-color: $editorTabsborderColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-tabs__item {
|
||||||
|
height: 32px;
|
||||||
|
line-height: 32px;
|
||||||
|
color: #888a8e;
|
||||||
|
border-left: 1px solid $editorTabsborderColor!important;
|
||||||
|
background: #363636;
|
||||||
|
margin-right: 5px;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
.el-tabs__item.is-active {
|
||||||
|
background: #1e1e1e;
|
||||||
|
border-bottom-color: #1e1e1e!important;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.el-icon-edit {
|
||||||
|
color: #f1fa8c;
|
||||||
|
}
|
||||||
|
.el-icon-document {
|
||||||
|
color: #a95812;
|
||||||
|
}
|
||||||
|
:focus.is-active.is-focus:not(:active) {
|
||||||
|
box-shadow: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-scrollbar {
|
||||||
|
.el-scrollbar__view {
|
||||||
|
padding: 12px 18px 15px 15px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.reg-item {
|
||||||
|
padding: 12px 6px;
|
||||||
|
background: #f8f8f8;
|
||||||
|
position: relative;
|
||||||
|
border-radius: 4px;
|
||||||
|
.close-btn {
|
||||||
|
position: absolute;
|
||||||
|
right: -6px;
|
||||||
|
top: -6px;
|
||||||
|
display: block;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
line-height: 16px;
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
border-radius: 50%;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
z-index: 1;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 12px;
|
||||||
|
&:hover {
|
||||||
|
background: rgba(210, 23, 23, 0.5)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
& + .reg-item {
|
||||||
|
margin-top: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-bar {
|
||||||
|
& .el-button+.el-button {
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
& i {
|
||||||
|
font-size: 20px;
|
||||||
|
vertical-align: middle;
|
||||||
|
position: relative;
|
||||||
|
top: -1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-tree-node {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 14px;
|
||||||
|
.node-operation {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
i[class*="el-icon"] + i[class*="el-icon"] {
|
||||||
|
margin-left: 6px;
|
||||||
|
}
|
||||||
|
.el-icon-plus {
|
||||||
|
color: #409EFF;
|
||||||
|
}
|
||||||
|
.el-icon-delete {
|
||||||
|
color: #157a0c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
.popoverTo {
|
||||||
|
.el-popover__title {
|
||||||
|
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 弹窗和内弹窗
|
||||||
|
.pop-up,
|
||||||
|
.inner-pop-up,
|
||||||
|
.pop-up-height {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
// 弹窗内边据
|
||||||
|
.el-dialog__body {
|
||||||
|
padding: 0px 20px;
|
||||||
|
}
|
||||||
|
.dataForm {
|
||||||
|
border-top: 1px solid #ccc;
|
||||||
|
padding: 20px 0;
|
||||||
|
}
|
||||||
|
// 弹窗里面的表单的外边距设置 el-dialog-bottom
|
||||||
|
.el-dialog-bottom {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
// 弹窗标题加粗 title 粘性定位固定在顶部
|
||||||
|
.el-dialog__header {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
background-color: #FFFFFF;
|
||||||
|
box-shadow: 0 1px 2px 1px #f0f0f0;
|
||||||
|
z-index: 9999;
|
||||||
|
.el-dialog__title {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 限制弹窗的高度
|
||||||
|
.el-dialog {
|
||||||
|
max-height: calc(100% - 10vh ) !important;
|
||||||
|
// min-height: 20vh;
|
||||||
|
margin: auto !important;
|
||||||
|
overflow: auto;
|
||||||
|
position: relative;
|
||||||
|
// 个性化-固定在容器顶部
|
||||||
|
.content-fixed-top {
|
||||||
|
position: fixed;
|
||||||
|
padding-top: 10px;
|
||||||
|
margin-top: 2px;
|
||||||
|
z-index: 9999;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
// 个性化-中部
|
||||||
|
.content-fixed-conter {
|
||||||
|
padding-top: 50px;
|
||||||
|
}
|
||||||
|
// 个性化-固定底部
|
||||||
|
.content-fixed-bottom {
|
||||||
|
position: sticky;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 9999;
|
||||||
|
background-color: #fff;
|
||||||
|
.pagination-container {
|
||||||
|
margin-top: 0;
|
||||||
|
padding: 25px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.filter-container {
|
||||||
|
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.pop-up-height {
|
||||||
|
.el-dialog {
|
||||||
|
height: calc(100% - 10vh ) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 表单里面的input框 手动添加icon 图标
|
||||||
|
.icon_style {
|
||||||
|
|
||||||
|
.el-form-item__content{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
width: calc(100% - 47px);
|
||||||
|
height: calc(100% - 2px);
|
||||||
|
color: #C0C4CC;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
display: flex;
|
||||||
|
align-content: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
position: absolute ;
|
||||||
|
top: 50%;
|
||||||
|
left: 0;
|
||||||
|
.el-icon-circle-close{
|
||||||
|
line-height: inherit;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 0 8px;
|
||||||
|
&:hover {
|
||||||
|
color: #1890FF;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-input__suffix {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-sticky {
|
||||||
|
width: 100%;
|
||||||
|
height: calc(100vh - 84px);
|
||||||
|
overflow-y: auto;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 20px;
|
||||||
|
// 表格的导航栏 粘性定位国定
|
||||||
|
.positionStl {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 20;
|
||||||
|
background-color: #fff;
|
||||||
|
padding-top: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.filter-container {
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.pagination-container {
|
||||||
|
margin-top: 0;
|
||||||
|
padding: 10px 16px !important;
|
||||||
|
position: sticky;
|
||||||
|
bottom: 0;
|
||||||
|
z-index: 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
#screenfull-container {
|
||||||
|
height: calc( 100% - 94px - 52px );
|
||||||
|
.mainHeight {
|
||||||
|
height: calc( 100% - 23px )
|
||||||
|
}
|
||||||
|
#tableData {
|
||||||
|
tr td .cell {
|
||||||
|
line-height: initial !important;
|
||||||
|
// 超出两行 以省略号显示
|
||||||
|
overflow : hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 2; // 控制几行
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.el-button--small {
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 黑色字体
|
||||||
|
.el-input.is-disabled .el-input__inner {
|
||||||
|
color: #000;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 让input number类型的标签不产生上下加减的按钮
|
||||||
|
input::-webkit-outer-spin-button,
|
||||||
|
input::-webkit-inner-spin-button {
|
||||||
|
-webkit-appearance: none !important;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 自定义加载
|
||||||
|
.daoru .el-loading-mask .el-loading-spinner {
|
||||||
|
font-size: 50px;
|
||||||
|
.el-loading-text {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// el-divider 组件的修改样式
|
||||||
|
.divider {
|
||||||
|
margin: 30px 0 !important;
|
||||||
|
.el-divider__text {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 17px;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 加载中 .el-loading-spinner .circular
|
||||||
|
.el-loading-spinner .circular {
|
||||||
|
width: 70px;
|
||||||
|
height: 70px;
|
||||||
|
}
|
100
vue/src/styles/mixin.scss
Normal file
100
vue/src/styles/mixin.scss
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
@mixin clearfix {
|
||||||
|
&:after {
|
||||||
|
content: "";
|
||||||
|
display: table;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin scrollBar {
|
||||||
|
&::-webkit-scrollbar-track-piece {
|
||||||
|
background: #d3dce6;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb {
|
||||||
|
background: #99a9bf;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin relative {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin pct($pct) {
|
||||||
|
width: #{$pct};
|
||||||
|
position: relative;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin triangle($width, $height, $color, $direction) {
|
||||||
|
$width: $width/2;
|
||||||
|
$color-border-style: $height solid $color;
|
||||||
|
$transparent-border-style: $width solid transparent;
|
||||||
|
height: 0;
|
||||||
|
width: 0;
|
||||||
|
|
||||||
|
@if $direction==up {
|
||||||
|
border-bottom: $color-border-style;
|
||||||
|
border-left: $transparent-border-style;
|
||||||
|
border-right: $transparent-border-style;
|
||||||
|
}
|
||||||
|
|
||||||
|
@else if $direction==right {
|
||||||
|
border-left: $color-border-style;
|
||||||
|
border-top: $transparent-border-style;
|
||||||
|
border-bottom: $transparent-border-style;
|
||||||
|
}
|
||||||
|
|
||||||
|
@else if $direction==down {
|
||||||
|
border-top: $color-border-style;
|
||||||
|
border-left: $transparent-border-style;
|
||||||
|
border-right: $transparent-border-style;
|
||||||
|
}
|
||||||
|
|
||||||
|
@else if $direction==left {
|
||||||
|
border-right: $color-border-style;
|
||||||
|
border-top: $transparent-border-style;
|
||||||
|
border-bottom: $transparent-border-style;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin action-bar {
|
||||||
|
.action-bar {
|
||||||
|
height: 33px;
|
||||||
|
background: #f2fafb;
|
||||||
|
padding: 0 15px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.bar-btn {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 6px;
|
||||||
|
line-height: 32px;
|
||||||
|
color: #8285f5;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 14px;
|
||||||
|
user-select: none;
|
||||||
|
& i {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
color: #4348d4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bar-btn + .bar-btn {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
.delete-btn {
|
||||||
|
color: #f56c6c;
|
||||||
|
&:hover {
|
||||||
|
color: #ea0b30;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
226
vue/src/styles/sidebar.scss
Normal file
226
vue/src/styles/sidebar.scss
Normal file
@ -0,0 +1,226 @@
|
|||||||
|
#app {
|
||||||
|
|
||||||
|
.main-container {
|
||||||
|
min-height: 100%;
|
||||||
|
transition: margin-left .28s;
|
||||||
|
margin-left: $sideBarWidth;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-container {
|
||||||
|
transition: width 0.28s;
|
||||||
|
width: $sideBarWidth !important;
|
||||||
|
background-color: $menuBg;
|
||||||
|
height: 100%;
|
||||||
|
position: fixed;
|
||||||
|
font-size: 0px;
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 1001;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
// reset element-ui css
|
||||||
|
.horizontal-collapse-transition {
|
||||||
|
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scrollbar-wrapper {
|
||||||
|
overflow-x: hidden !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-scrollbar__bar.is-vertical {
|
||||||
|
right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-scrollbar {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.has-logo {
|
||||||
|
.el-scrollbar {
|
||||||
|
height: calc(100% - 50px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-horizontal {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.svg-icon {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub-el-icon {
|
||||||
|
margin-right: 12px;
|
||||||
|
margin-left: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-menu {
|
||||||
|
border: none;
|
||||||
|
height: 100%;
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
// menu hover
|
||||||
|
.submenu-title-noDropdown,
|
||||||
|
.el-submenu__title {
|
||||||
|
&:hover {
|
||||||
|
background-color: $menuHover !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-active>.el-submenu__title {
|
||||||
|
color: $subMenuActiveText !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
& .nest-menu .el-submenu>.el-submenu__title,
|
||||||
|
& .el-submenu .el-menu-item {
|
||||||
|
min-width: $sideBarWidth !important;
|
||||||
|
background-color: $subMenuBg !important;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: $subMenuHover !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.hideSidebar {
|
||||||
|
.sidebar-container {
|
||||||
|
width: 54px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-container {
|
||||||
|
margin-left: 54px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.submenu-title-noDropdown {
|
||||||
|
padding: 0 !important;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.el-tooltip {
|
||||||
|
padding: 0 !important;
|
||||||
|
|
||||||
|
.svg-icon {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub-el-icon {
|
||||||
|
margin-left: 19px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-submenu {
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
&>.el-submenu__title {
|
||||||
|
padding: 0 !important;
|
||||||
|
|
||||||
|
.svg-icon {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub-el-icon {
|
||||||
|
margin-left: 19px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-submenu__icon-arrow {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-menu--collapse {
|
||||||
|
.el-submenu {
|
||||||
|
&>.el-submenu__title {
|
||||||
|
&>span {
|
||||||
|
height: 0;
|
||||||
|
width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
visibility: hidden;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-menu--collapse .el-menu .el-submenu {
|
||||||
|
min-width: $sideBarWidth !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
// mobile responsive
|
||||||
|
.mobile {
|
||||||
|
.main-container {
|
||||||
|
margin-left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-container {
|
||||||
|
transition: transform .28s;
|
||||||
|
width: $sideBarWidth !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.hideSidebar {
|
||||||
|
.sidebar-container {
|
||||||
|
pointer-events: none;
|
||||||
|
transition-duration: 0.3s;
|
||||||
|
transform: translate3d(-$sideBarWidth, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.withoutAnimation {
|
||||||
|
|
||||||
|
.main-container,
|
||||||
|
.sidebar-container {
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// when menu collapsed
|
||||||
|
.el-menu--vertical {
|
||||||
|
&>.el-menu {
|
||||||
|
.svg-icon {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
.sub-el-icon {
|
||||||
|
margin-right: 12px;
|
||||||
|
margin-left: -2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.nest-menu .el-submenu>.el-submenu__title,
|
||||||
|
.el-menu-item {
|
||||||
|
&:hover {
|
||||||
|
// you can use $subMenuHover
|
||||||
|
background-color: $menuHover !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// the scroll bar appears when the subMenu is too long
|
||||||
|
>.el-menu--popup {
|
||||||
|
max-height: 100vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-track-piece {
|
||||||
|
background: #d3dce6;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb {
|
||||||
|
background: #99a9bf;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
48
vue/src/styles/transition.scss
Normal file
48
vue/src/styles/transition.scss
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
// global transition css
|
||||||
|
|
||||||
|
/* fade */
|
||||||
|
.fade-enter-active,
|
||||||
|
.fade-leave-active {
|
||||||
|
transition: opacity 0.28s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fade-enter,
|
||||||
|
.fade-leave-active {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* fade-transform */
|
||||||
|
.fade-transform-leave-active,
|
||||||
|
.fade-transform-enter-active {
|
||||||
|
transition: all .5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fade-transform-enter {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateX(-30px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fade-transform-leave-to {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateX(30px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* breadcrumb transition */
|
||||||
|
.breadcrumb-enter-active,
|
||||||
|
.breadcrumb-leave-active {
|
||||||
|
transition: all .5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb-enter,
|
||||||
|
.breadcrumb-leave-active {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateX(20px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb-move {
|
||||||
|
transition: all .5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb-leave-active {
|
||||||
|
position: absolute;
|
||||||
|
}
|
35
vue/src/styles/variables.scss
Normal file
35
vue/src/styles/variables.scss
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// base color
|
||||||
|
$blue:#324157;
|
||||||
|
$light-blue:#3A71A8;
|
||||||
|
$red:#C03639;
|
||||||
|
$pink: #E65D6E;
|
||||||
|
$green: #30B08F;
|
||||||
|
$tiffany: #4AB7BD;
|
||||||
|
$yellow:#FEC171;
|
||||||
|
$panGreen: #30B08F;
|
||||||
|
|
||||||
|
// sidebar
|
||||||
|
$menuText:#bfcbd9;
|
||||||
|
$menuActiveText:#409EFF;
|
||||||
|
$subMenuActiveText:#f4f4f5;
|
||||||
|
|
||||||
|
$menuBg:#304156;
|
||||||
|
$menuHover:#263445;
|
||||||
|
|
||||||
|
$subMenuBg:#1f2d3d;
|
||||||
|
$subMenuHover:#001528;
|
||||||
|
|
||||||
|
$sideBarWidth: 210px;
|
||||||
|
|
||||||
|
// the :export directive is the magic sauce for webpack
|
||||||
|
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
|
||||||
|
:export {
|
||||||
|
menuText: $menuText;
|
||||||
|
menuActiveText: $menuActiveText;
|
||||||
|
subMenuActiveText: $subMenuActiveText;
|
||||||
|
menuBg: $menuBg;
|
||||||
|
menuHover: $menuHover;
|
||||||
|
subMenuBg: $subMenuBg;
|
||||||
|
subMenuHover: $subMenuHover;
|
||||||
|
sideBarWidth: $sideBarWidth;
|
||||||
|
}
|
31
vue/src/utils/auth.js
Normal file
31
vue/src/utils/auth.js
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import Cookies from "js-cookie";
|
||||||
|
|
||||||
|
const TokenKey = "kdservice-sessionid";
|
||||||
|
|
||||||
|
export function getToken() {
|
||||||
|
// console.log('取出to'+Cookies.get(TokenKey))
|
||||||
|
return Cookies.get(TokenKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setToken(token) {
|
||||||
|
// console.log('设置传入to'+token)
|
||||||
|
return Cookies.set(TokenKey, token);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function removeToken() {
|
||||||
|
return Cookies.remove(TokenKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
const CookieKey = "cookie";
|
||||||
|
|
||||||
|
export function getCookie() {
|
||||||
|
return Cookies.get(CookieKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setCookie(cookie) {
|
||||||
|
return Cookies.set(CookieKey, cookie);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function removeCookie() {
|
||||||
|
return Cookies.remove(CookieKey);
|
||||||
|
}
|
61
vue/src/utils/request.js
Normal file
61
vue/src/utils/request.js
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
import axios from "axios";
|
||||||
|
import { Message } from "element-ui";
|
||||||
|
import store from "@/store";
|
||||||
|
import { getCookie, getToken } from "@/utils/auth";
|
||||||
|
|
||||||
|
// create an axios instance
|
||||||
|
const service = axios.create({
|
||||||
|
// baseURL: "http://1.14.142.111:9090", // url = base url + request url
|
||||||
|
// withCredentials: true, // send cookies when cross-domain requests
|
||||||
|
timeout: 5000, // request timeout
|
||||||
|
});
|
||||||
|
|
||||||
|
// request interceptor
|
||||||
|
service.interceptors.request.use(
|
||||||
|
(config) => {
|
||||||
|
// do something before request is sent
|
||||||
|
if (store.getters.token) {
|
||||||
|
// config.headers['Cookie'] = 'kdservice-sessionid=' + getToken()
|
||||||
|
// config.headers['kdservice'] = getToken()
|
||||||
|
}
|
||||||
|
config.headers["Cookie"] = "kdservice-sessionid=" + getToken();
|
||||||
|
config.headers["Content-Type"] = "application/json";
|
||||||
|
|
||||||
|
return config;
|
||||||
|
},
|
||||||
|
(error) => {
|
||||||
|
// do something with request error
|
||||||
|
console.log(error); // for debug
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// response interceptor
|
||||||
|
service.interceptors.response.use(
|
||||||
|
/**
|
||||||
|
* If you want to get http information such as headers or status
|
||||||
|
* Please return response => response
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine the request status by custom code
|
||||||
|
* Here is just an example
|
||||||
|
* You can also judge the status by HTTP Status Code
|
||||||
|
*/
|
||||||
|
(response) => {
|
||||||
|
const res = response.data;
|
||||||
|
// if the custom code is not 200, it is judged as an error.
|
||||||
|
if (res.code && res.code !== 200) {
|
||||||
|
Message({
|
||||||
|
message: res.message || "Error",
|
||||||
|
type: "error",
|
||||||
|
duration: 5 * 1000,
|
||||||
|
});
|
||||||
|
return Promise.reject(new Error(res.message || "Error"));
|
||||||
|
} else {
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
export default service;
|
5
vue/src/views/AboutView.vue
Normal file
5
vue/src/views/AboutView.vue
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<template>
|
||||||
|
<div class="about">
|
||||||
|
<h1>This is an about page</h1>
|
||||||
|
</div>
|
||||||
|
</template>
|
18
vue/src/views/HomeView.vue
Normal file
18
vue/src/views/HomeView.vue
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<template>
|
||||||
|
<div class="home">
|
||||||
|
<img alt="Vue logo" src="../assets/logo.png">
|
||||||
|
<HelloWorld msg="Welcome to Your Vue.js App"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// @ is an alias to /src
|
||||||
|
import HelloWorld from '@/components/HelloWorld.vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'HomeView',
|
||||||
|
components: {
|
||||||
|
HelloWorld
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
317
vue/src/views/login/login.vue
Normal file
317
vue/src/views/login/login.vue
Normal file
@ -0,0 +1,317 @@
|
|||||||
|
<template>
|
||||||
|
<div class="login-container">
|
||||||
|
<div class="login-form">
|
||||||
|
|
||||||
|
<div class="title-container">
|
||||||
|
<h3 class="title">
|
||||||
|
供应商验证
|
||||||
|
</h3>
|
||||||
|
<div class="desc"> </div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-tabs v-model="activeName" stretch>
|
||||||
|
<el-tab-pane label="供应商登录" name="first">
|
||||||
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" autocomplete="on" label-position="left">
|
||||||
|
<el-form-item prop="Username">
|
||||||
|
<span class="svg-container">
|
||||||
|
<svg-icon icon-class="user" />
|
||||||
|
</span>
|
||||||
|
<el-input
|
||||||
|
ref="Username"
|
||||||
|
v-model="loginForm.Username"
|
||||||
|
placeholder="供应商名称"
|
||||||
|
name="Username"
|
||||||
|
type="text"
|
||||||
|
tabindex="2"
|
||||||
|
autocomplete="on"
|
||||||
|
style="width: 85%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-tooltip content="Caps lock is On" placement="right" manual>
|
||||||
|
<el-form-item prop="Password">
|
||||||
|
<span class="svg-container">
|
||||||
|
<svg-icon icon-class="password" />
|
||||||
|
</span>
|
||||||
|
<el-input
|
||||||
|
key="passwordType"
|
||||||
|
ref="Password"
|
||||||
|
v-model="loginForm.Password"
|
||||||
|
placeholder="供应商编码"
|
||||||
|
name="Password"
|
||||||
|
tabindex="3"
|
||||||
|
autocomplete="on"
|
||||||
|
style="width: 85%"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-tooltip>
|
||||||
|
</el-form>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
<div>
|
||||||
|
<el-button v-if="loginType" :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="loginSubmit()">
|
||||||
|
登录
|
||||||
|
</el-button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- <div class="forgotregister">-->
|
||||||
|
<!-- <router-link :to="{path: '/forgotpassword', query: { } }">-->
|
||||||
|
<!-- <span style="float: left">{{ $t('login.forgotPassword') }}</span>-->
|
||||||
|
<!-- </router-link>-->
|
||||||
|
|
||||||
|
<!-- </div>-->
|
||||||
|
</div>
|
||||||
|
<div class="globalFooter">
|
||||||
|
<div class="copyright">Copyright ©2022 珠海格致软件有限公司</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import {login} from "@/api/login";
|
||||||
|
import * as auth from "@/utils/auth.js"
|
||||||
|
import {getToken} from "@/utils/auth.js";
|
||||||
|
import axios from "axios";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Login',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading : false,
|
||||||
|
activeName:'first',
|
||||||
|
loginType:false,
|
||||||
|
FBILLNO:'',
|
||||||
|
loginForm:{
|
||||||
|
Username:"",
|
||||||
|
Password:"",
|
||||||
|
},
|
||||||
|
loginRules: {
|
||||||
|
Username: [{ required: true, message: "请输入用户名", trigger: "blur" }],
|
||||||
|
Password: [{ required: true, message: "请输入密码", trigger: "blur" }],
|
||||||
|
},
|
||||||
|
data:{
|
||||||
|
FormId:"kafe2f22a0498441f9109c31cf5586da5",
|
||||||
|
FieldKeys:"FBILLNO,FSupplierId.FName",
|
||||||
|
FilterString:"",
|
||||||
|
OrderString:"",
|
||||||
|
TopRowCount:"0",
|
||||||
|
StartRow:"0",
|
||||||
|
Limit:100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.FBILLNO=this.$route.query.FBILLNO
|
||||||
|
if (this.$route.query.FBILLNO !== undefined){
|
||||||
|
this.loginType=true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
loginSubmit(){
|
||||||
|
let this_=this
|
||||||
|
this.$refs.loginForm.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
let FilterString="FBILLNO like'%"+this.FBILLNO+"'";
|
||||||
|
this.data.FilterString=FilterString;
|
||||||
|
let query={}
|
||||||
|
query.FBILLNO=this.FBILLNO;
|
||||||
|
query.Username=this.loginForm.Username;
|
||||||
|
query.Password=this.loginForm.Password;
|
||||||
|
login(query).then((response) => {
|
||||||
|
if (response.status===200){
|
||||||
|
this.$router.push({
|
||||||
|
path: "/master?FBILLNO="+this_.FBILLNO+"&username="+this_.loginForm.Username+"&password="+this_.loginForm.Password,
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
this.handleWarning("登录失败,请联系管理员")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
handleWarning(response) {
|
||||||
|
this.$message({
|
||||||
|
message: response.message || response,
|
||||||
|
type: 'warning',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSuccess(response) {
|
||||||
|
this.$message({
|
||||||
|
message: response.message || response,
|
||||||
|
type: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
|
||||||
|
$bg:#283443;
|
||||||
|
$light_gray:#fff;
|
||||||
|
$cursor: #fff;
|
||||||
|
|
||||||
|
@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
|
||||||
|
.login-container .el-input input {
|
||||||
|
color: $cursor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* reset element-ui css */
|
||||||
|
.login-container {
|
||||||
|
.el-input {
|
||||||
|
display: inline-block;
|
||||||
|
height: 47px;
|
||||||
|
// width: 85%;
|
||||||
|
|
||||||
|
input {
|
||||||
|
background: transparent;
|
||||||
|
border: 0px;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
border-radius: 0px;
|
||||||
|
padding: 12px 5px 12px 15px;
|
||||||
|
color: $light_gray;
|
||||||
|
height: 47px;
|
||||||
|
caret-color: $cursor;
|
||||||
|
|
||||||
|
&:-webkit-autofill {
|
||||||
|
box-shadow: 0 0 0px 1000px $bg inset !important;
|
||||||
|
-webkit-text-fill-color: $cursor !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item {
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
background: rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 5px;
|
||||||
|
color: #454545;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
$bg:#2d3a4b;
|
||||||
|
$dark_gray:#889aa4;
|
||||||
|
$light_gray:#eee;
|
||||||
|
|
||||||
|
::v-deep .el-tabs__item {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-tabs__item.is-active {
|
||||||
|
color: #1890ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-container {
|
||||||
|
min-height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background-color: $bg;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.login-form {
|
||||||
|
position: relative;
|
||||||
|
width: 520px;
|
||||||
|
max-width: 100%;
|
||||||
|
padding: 160px 35px 0;
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tips {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #fff;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
span {
|
||||||
|
&:first-of-type {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.svg-container {
|
||||||
|
padding: 6px 5px 6px 15px;
|
||||||
|
color: $dark_gray;
|
||||||
|
vertical-align: middle;
|
||||||
|
width: 30px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-container {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 26px;
|
||||||
|
color: $light_gray;
|
||||||
|
margin: 0px auto 40px auto;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.desc {
|
||||||
|
margin-top: 0px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
color: white;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.set-language {
|
||||||
|
color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
top: 3px;
|
||||||
|
font-size: 18px;
|
||||||
|
right: 0px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.show-pwd {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 7px;
|
||||||
|
font-size: 16px;
|
||||||
|
color: $dark_gray;
|
||||||
|
cursor: pointer;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.globalFooter {
|
||||||
|
margin: 48px 0 24px 0;
|
||||||
|
padding: 0 16px;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.links {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.copyright {
|
||||||
|
color: rgba(0,0,0,0.45);
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.forgotregister {
|
||||||
|
text-align: right;
|
||||||
|
font-size: 14px;
|
||||||
|
color: white;
|
||||||
|
|
||||||
|
.register {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
498
vue/src/views/master/master.vue
Normal file
498
vue/src/views/master/master.vue
Normal file
@ -0,0 +1,498 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<div div style="font-size:25px;text-align:left ; position:relative;">
|
||||||
|
<el-button v-if="view" type="primary" @click="saveData('false')">
|
||||||
|
{{ '保存' }}
|
||||||
|
</el-button>
|
||||||
|
<el-button v-if="view" type="primary" @click="saveData('true')">
|
||||||
|
{{ '提交' }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
<el-divider></el-divider>
|
||||||
|
<el-form ref="ContractSalaryForm" :rules="rules" :model="ruleFrom" :label-position="labelPosition"
|
||||||
|
label-width="auto" style="width: 100%" :disabled="!view">
|
||||||
|
<!-- 基础信息 -->
|
||||||
|
<div class="form-dataForm">
|
||||||
|
<el-row>基本信息</el-row>
|
||||||
|
</div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label='报价单号' prop="FBILLNO">
|
||||||
|
<el-input v-model="ruleFrom.FBILLNO" readonly></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label='询价名称' prop="FProjectName">
|
||||||
|
<el-input v-model="ruleFrom.FProjectName" readonly></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="询价单号" prop="FSrcBillNo">
|
||||||
|
<el-input v-model="ruleFrom.FSrcBillNo" readonly/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="供应商编码" prop="FSupplierId">
|
||||||
|
<el-input maxlength="64" v-model="ruleFrom.FSupplierId" readonly></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="供应商名称" prop="FSupplierName">
|
||||||
|
<el-input maxlength="64" v-model="ruleFrom.FSupplierName" readonly></el-input>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="开标日期" prop="FOpenDate">
|
||||||
|
<el-date-picker
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="ruleFrom.FOpenDate"
|
||||||
|
type="date"
|
||||||
|
format="yyyy年MM月dd日 HH时mm分ss秒"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
readonly>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label='报价状态' prop="FPriceStatus">
|
||||||
|
<el-input v-model="ruleFrom.FPriceStatus" readonly></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label='报价日期' prop="FQuoteDate">
|
||||||
|
<el-date-picker
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="ruleFrom.FQuoteDate"
|
||||||
|
type="date"
|
||||||
|
format="yyyy年MM月dd日 HH时mm分ss秒"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
readonly>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="报价截至日期" prop="FExpiryDate">
|
||||||
|
<el-date-picker
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="ruleFrom.FExpiryDate"
|
||||||
|
type="date"
|
||||||
|
format="yyyy年MM月dd日 HH时mm分ss秒"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
readonly>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label='联系人' prop="FContact">
|
||||||
|
<el-input v-model="ruleFrom.FContact" readonly></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label='电话' prop="FPhone">
|
||||||
|
<el-input v-model="ruleFrom.FPhone" placeholder='请输入电话' readonly></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="邮箱" prop="FMail">
|
||||||
|
<el-input v-model="ruleFrom.FMail" maxlength="64" placeholder="请输入邮箱" readonly/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label='币别' prop="FCurrId">
|
||||||
|
<el-input v-model="ruleFrom.FCurrId" readonly></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="含税" prop="FIsIncludedTax" style="text-align: left">
|
||||||
|
<el-switch v-model="ruleFrom.FIsIncludedTax" :active-value="'true'" :inactive-value="'false'"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949" :disabled="true">
|
||||||
|
<!-- @change="priceInputView()"-->
|
||||||
|
</el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 其他信息 -->
|
||||||
|
<el-collapse v-model="activeNames">
|
||||||
|
<el-collapse-item title="其他信息" class="form-title" name="1">
|
||||||
|
<div class="form-content" v-if="activeNames=='1'">
|
||||||
|
<el-divider content-position="left"></el-divider>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label='采购组织' prop="FPurOrgId">
|
||||||
|
<el-input v-model="ruleFrom.FPurOrgId" readonly/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label='询价日期' prop="FDate">
|
||||||
|
<el-date-picker type="date" format="yyyy年MM月dd日 HH时mm分ss秒"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss" v-model="ruleFrom.FDate"
|
||||||
|
style="width: 100%;" readonly/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label='询价员' prop="FBuyer">
|
||||||
|
<el-input v-model="ruleFrom.FBuyer" readonly/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</el-collapse-item>
|
||||||
|
</el-collapse>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<el-tabs type="border-card" style="margin-top: 50px">
|
||||||
|
<el-tab-pane label="明细信息">
|
||||||
|
<div>
|
||||||
|
<el-table
|
||||||
|
:key="tableKey"
|
||||||
|
:data="list"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
highlight-current-row
|
||||||
|
show-summary
|
||||||
|
max-height="500px"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-table-column prop="FSEQ" label="序号" align="center" width="50" fixed="left"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="FMaterialId"
|
||||||
|
label="物料代码"
|
||||||
|
min-width="150"
|
||||||
|
fixed="left"
|
||||||
|
align="center">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="FMaterialName"
|
||||||
|
label="物料名称"
|
||||||
|
min-width="150"
|
||||||
|
align="center">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="FMaterialModel"
|
||||||
|
label="规格型号"
|
||||||
|
min-width="150"
|
||||||
|
align="center">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="FUnitID"
|
||||||
|
label="单位"
|
||||||
|
min-width="150"
|
||||||
|
align="center">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="FQty"
|
||||||
|
label="询价数量"
|
||||||
|
min-width="100"
|
||||||
|
align="center">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="FPrice"
|
||||||
|
label="单价"
|
||||||
|
min-width="100"
|
||||||
|
align="center">
|
||||||
|
<template slot-scope="scop">
|
||||||
|
<el-input type="number" v-model="scop.row.FPrice" v-show="priceInput"
|
||||||
|
@input="updatePrice(scop.row)"></el-input>
|
||||||
|
<span v-show="!priceInput">{{ scop.row.FPrice }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="FTaxRate"
|
||||||
|
label="税率%"
|
||||||
|
min-width="100"
|
||||||
|
align="center">
|
||||||
|
<template slot-scope="scop">
|
||||||
|
<el-input type="number" v-model="scop.row.FTaxRate" v-show="priceInput"
|
||||||
|
@input="updatePrice(scop.row)"></el-input>
|
||||||
|
<span v-show="!priceInput">{{ scop.row.FTaxRate }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="FTaxPrice"
|
||||||
|
label="含税单价"
|
||||||
|
min-width="110"
|
||||||
|
align="center">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="FNote"
|
||||||
|
label="备注"
|
||||||
|
align="center"
|
||||||
|
width="240">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="FPayConditionId"
|
||||||
|
label="付款方式"
|
||||||
|
align="center"
|
||||||
|
width="240">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
|
||||||
|
import {queryData, queryDataItem, saveData} from "@/api/login";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "master",
|
||||||
|
components: {},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
labelPosition: 'right',
|
||||||
|
list: [],
|
||||||
|
data: {
|
||||||
|
FormId: "kafe2f22a0498441f9109c31cf5586da5",
|
||||||
|
FieldKeys: '',
|
||||||
|
FilterString: "FBILLNO like'%BJ23060004'",
|
||||||
|
OrderString: "",
|
||||||
|
TopRowCount: "0",
|
||||||
|
StartRow: "0",
|
||||||
|
Limit: 100
|
||||||
|
},
|
||||||
|
tableKey: 0,
|
||||||
|
FBILLNO: undefined,
|
||||||
|
username: undefined,
|
||||||
|
password: undefined,
|
||||||
|
// 折叠信息激活状态
|
||||||
|
activeNames: '1',
|
||||||
|
//组件的刷新
|
||||||
|
timer: '',
|
||||||
|
priceInput: false,
|
||||||
|
view: true,
|
||||||
|
//多选
|
||||||
|
multipleSelection: [],
|
||||||
|
listQuery: {
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
id: undefined,
|
||||||
|
type: undefined,
|
||||||
|
},
|
||||||
|
ruleFrom: {},
|
||||||
|
saveFrom: {
|
||||||
|
Creator: "String",
|
||||||
|
NeedUpDateFields: [],
|
||||||
|
IsAutoSubmitAndAudit: true,
|
||||||
|
Model: {
|
||||||
|
FID: '',
|
||||||
|
//供应商确认
|
||||||
|
FIsConfirm: true,
|
||||||
|
//供应商确认时间
|
||||||
|
FConfirmDate: '',
|
||||||
|
//供应商提交时间
|
||||||
|
FQuoteDate: '',
|
||||||
|
//供应商信息明细表:FEntryID 分录ID,FQty 询价数量,FPrice 单价,FTaxRate 税率,FTaxPrice 含税单价
|
||||||
|
FEntity: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
FSupplierId: [{required: true, message: '请输入供应商编码', trigger: ['blur', 'change']}],
|
||||||
|
FExpiryDate: [{required: true, message: '请选择报价截至日期', trigger: ['blur', 'change']}],
|
||||||
|
FOpenDate: [{required: true, message: '请选择开标日期', trigger: ['blur', 'change']}],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
if (this.$route.query.FBILLNO!==undefined && this.$route.query.username!==undefined && this.$route.query.password!==undefined){
|
||||||
|
this.FBILLNO = this.$route.query.FBILLNO
|
||||||
|
this.username = this.$route.query.username
|
||||||
|
this.password = this.$route.query.password
|
||||||
|
this.ruleFromData();
|
||||||
|
this.listData();
|
||||||
|
}else {
|
||||||
|
this.handleWarning("请重新登录");
|
||||||
|
if (this.$route.query.FBILLNO!==undefined){
|
||||||
|
this.$router.push({
|
||||||
|
path: "/?FBILLNO="+this.$route.query.FBILLNO,
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
this.handleWarning("请重新打开链接");
|
||||||
|
this.$router.push({
|
||||||
|
path: "/",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
methods: {
|
||||||
|
updatePrice(row) {
|
||||||
|
row.FTaxPrice = (Number(row.FPrice == "" ? 0 : row.FPrice) * (1 + (Number(row.FTaxRate == "" ? 0 : row.FTaxRate) / 100))).toFixed(2);
|
||||||
|
console.log(row)
|
||||||
|
},
|
||||||
|
// priceInputView() {
|
||||||
|
// if (this.ruleFrom.FIsIncludedTax == 1) {
|
||||||
|
// this.priceInput = true;
|
||||||
|
// } else {
|
||||||
|
// this.priceInput = false;
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
saveData(IsAutoAdjustField) {
|
||||||
|
let query = {
|
||||||
|
FID: this.ruleFrom.FID,
|
||||||
|
IsAutoAdjustField: IsAutoAdjustField,
|
||||||
|
FEntity: []
|
||||||
|
}
|
||||||
|
if (IsAutoAdjustField === 'true') {
|
||||||
|
query.FQuoteDate = this.ruleFrom.FQuoteDate
|
||||||
|
}
|
||||||
|
if (this.list !== undefined && this.list.length > 0) {
|
||||||
|
for (let i = 0; i < this.list.length; i++) {
|
||||||
|
let item = {
|
||||||
|
FEntryID: this.list[i].FEntryID,
|
||||||
|
FQty: this.list[i].FQty,
|
||||||
|
FPrice: this.list[i].FPrice,
|
||||||
|
FTaxRate: this.list[i].FTaxRate,
|
||||||
|
FTaxPrice: this.list[i].FTaxPrice,
|
||||||
|
// FMaterialId: this.list[i].FMaterialId,
|
||||||
|
}
|
||||||
|
query.FEntity.push(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
saveData(query).then(res => {
|
||||||
|
console.log(res.data.Result.ResponseStatus.IsSuccess)
|
||||||
|
if (res.data.Result.ResponseStatus.IsSuccess === true){
|
||||||
|
switch (IsAutoAdjustField){
|
||||||
|
case 'true':
|
||||||
|
this.handleSuccess('提交成功');
|
||||||
|
break;
|
||||||
|
case 'false':
|
||||||
|
this.handleSuccess('保存成功');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
this.listData()
|
||||||
|
this.ruleFromData();
|
||||||
|
}else {
|
||||||
|
switch (IsAutoAdjustField){
|
||||||
|
case 'true':
|
||||||
|
this.handleWarning('提交失败');
|
||||||
|
break;
|
||||||
|
case 'false':
|
||||||
|
this.handleWarning('保存失败');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
ruleFromData() {
|
||||||
|
// this.data.FieldKeys = this.FieldKeysMaster
|
||||||
|
let query = {
|
||||||
|
FBILLNO: this.FBILLNO,
|
||||||
|
username: this.username,
|
||||||
|
password: this.password
|
||||||
|
}
|
||||||
|
queryData(query).then(res => {
|
||||||
|
if (res.data==null){
|
||||||
|
this.handleWarning('获取数据失败,5秒后跳转至重新登录');
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$router.push({
|
||||||
|
path: "/?FBILLNO="+this.$route.query.FBILLNO,
|
||||||
|
});
|
||||||
|
}, 5000);
|
||||||
|
}else {
|
||||||
|
this.ruleFrom = res.data[0]
|
||||||
|
this.view = res.data[0].Status
|
||||||
|
this.priceInput = res.data[0].Status
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
listData() {
|
||||||
|
let query = {
|
||||||
|
FBILLNO: this.FBILLNO,
|
||||||
|
username: this.username,
|
||||||
|
password: this.password
|
||||||
|
}
|
||||||
|
queryDataItem(query).then(res => {
|
||||||
|
this.list = res.data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleWarning(response) {
|
||||||
|
this.$message({
|
||||||
|
message: response.message || response,
|
||||||
|
type: 'warning',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSuccess(response) {
|
||||||
|
this.$message({
|
||||||
|
message: response.message || response,
|
||||||
|
type: 'success',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
/* 设置表单的居中 */
|
||||||
|
.dataForm-style {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 设置基础信息标题的样式 */
|
||||||
|
.form-dataForm {
|
||||||
|
width: 100%;
|
||||||
|
height: 47px;
|
||||||
|
text-align: left;
|
||||||
|
line-height: 47px;
|
||||||
|
font-size: 17px;
|
||||||
|
font-weight: 600;
|
||||||
|
margin: 15px 0;
|
||||||
|
border-bottom: 1px solid #e6ebf5;
|
||||||
|
/* border-bottom: 1px solid #0efc61; */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 去掉折叠上边框线 */
|
||||||
|
::v-deep .el-collapse {
|
||||||
|
border-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 修改折叠标题样式 */
|
||||||
|
::v-deep .form-title .el-collapse-item__header {
|
||||||
|
font-size: 17px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 修改折叠标题样式 */
|
||||||
|
::v-deep .form-title .el-collapse-item__content {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 修改折叠标题箭头样式 */
|
||||||
|
::v-deep .form-title .el-collapse-item__header .el-collapse-item__arrow {
|
||||||
|
margin: 0 0 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .el-divider--horizontal {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 去掉数字输入框上下加减按钮 */
|
||||||
|
::v-deep input::-webkit-outer-spin-button,
|
||||||
|
::v-deep input::-webkit-inner-spin-button {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
</style>
|
20
vue/vue.config.js
Normal file
20
vue/vue.config.js
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
const { defineConfig } = require("@vue/cli-service");
|
||||||
|
module.exports = defineConfig({
|
||||||
|
transpileDependencies: true,
|
||||||
|
});
|
||||||
|
const port=1573;
|
||||||
|
module.exports = {
|
||||||
|
devServer: {
|
||||||
|
port:port,
|
||||||
|
proxy: {
|
||||||
|
'/api': {
|
||||||
|
target: 'http://localhost:10002', // 后端接口的地址
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: {
|
||||||
|
'^/api': '', // 如果您的后端API路径不包含'/api',可以删除这一行
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user