Merge branch 'master' of http://121.40.234.130:8899/root/hl_one
This commit is contained in:
@@ -232,6 +232,12 @@
|
|||||||
<version>${mysql.version}</version>
|
<version>${mysql.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.oracle.database.jdbc</groupId>
|
||||||
|
<artifactId>ojdbc5</artifactId>
|
||||||
|
<version>11.2.0.4</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.microsoft.sqlserver</groupId>
|
<groupId>com.microsoft.sqlserver</groupId>
|
||||||
<artifactId>mssql-jdbc</artifactId>
|
<artifactId>mssql-jdbc</artifactId>
|
||||||
|
|||||||
@@ -1,21 +1,93 @@
|
|||||||
package org.nl.config;
|
package org.nl.config;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.druid.pool.DruidDataSource;
|
import com.alibaba.druid.pool.DruidDataSource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.wms.common.DataTypeEnum;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
|
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
|
import java.sql.DriverManager;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class DataBaseConfig {
|
public class DataBaseConfig {
|
||||||
|
@Value("${erp.oracle.enabled}")
|
||||||
|
private boolean oracleIsConnect;
|
||||||
|
@Value("${erp.oracle.jdbcurl}")
|
||||||
|
private String oracleJdbcUrl;
|
||||||
|
@Value("${erp.oracle.username}")
|
||||||
|
private String oracleUserName;
|
||||||
|
@Value("${erp.oracle.password}")
|
||||||
|
private String oraclePassword;
|
||||||
|
|
||||||
@Primary
|
@Primary
|
||||||
@Bean(name = "dataSource")
|
@Bean(name = "dataSource")
|
||||||
@ConfigurationProperties(prefix = "spring.datasource.druid")
|
@ConfigurationProperties(prefix = "spring.datasource.druid")
|
||||||
public DataSource dataSource() {
|
public DataSource dataSource() {
|
||||||
return new DruidDataSource();
|
return new DruidDataSource();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean(name = "dataSource1")
|
||||||
|
@ConditionalOnExpression("${erp.oracle.enabled:true}")
|
||||||
|
public DataSource dataSource1() {
|
||||||
|
System.out.println("是否连接oracle:"+oracleIsConnect);
|
||||||
|
System.out.println("erp.oracle.jdbcurl:"+oracleJdbcUrl);
|
||||||
|
System.out.println("erp.oracle.username:"+oracleUserName);
|
||||||
|
System.out.println("erp.oracle.password:"+oraclePassword);
|
||||||
|
log.info("是否连接oracle:"+oracleIsConnect);
|
||||||
|
log.info("erp.oracle.jdbcurl:"+oracleJdbcUrl);
|
||||||
|
log.info("erp.oracle.username:"+oracleUserName);
|
||||||
|
log.info("erp.oracle.password:"+oraclePassword);
|
||||||
|
|
||||||
|
String jdbcUrl = oracleJdbcUrl;
|
||||||
|
String userName = oracleUserName;
|
||||||
|
String password =oraclePassword;
|
||||||
|
|
||||||
|
DruidDataSource druidDataSource = new DruidDataSource();
|
||||||
|
String className;
|
||||||
|
try {
|
||||||
|
className = DriverManager.getDriver(jdbcUrl.trim()).getClass().getName();
|
||||||
|
} catch (SQLException e) {
|
||||||
|
throw new RuntimeException("Get class name error: =" + jdbcUrl);
|
||||||
|
}
|
||||||
|
if (StrUtil.isEmpty(className)) {
|
||||||
|
DataTypeEnum dataTypeEnum = DataTypeEnum.urlOf(jdbcUrl);
|
||||||
|
if (null == dataTypeEnum) {
|
||||||
|
throw new RuntimeException("Not supported data type: jdbcUrl=" + jdbcUrl);
|
||||||
|
}
|
||||||
|
druidDataSource.setDriverClassName(dataTypeEnum.getDriver());
|
||||||
|
} else {
|
||||||
|
druidDataSource.setDriverClassName(className);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
druidDataSource.setUrl(jdbcUrl);
|
||||||
|
druidDataSource.setUsername(userName);
|
||||||
|
druidDataSource.setPassword(password);
|
||||||
|
// 配置获取连接等待超时的时间
|
||||||
|
druidDataSource.setMaxWait(3000);
|
||||||
|
// 配置初始化大小、最小、最大
|
||||||
|
druidDataSource.setInitialSize(5);
|
||||||
|
druidDataSource.setMinIdle(5);
|
||||||
|
druidDataSource.setMaxActive(10);
|
||||||
|
|
||||||
|
// 如果链接出现异常则直接判定为失败而不是一直重试
|
||||||
|
druidDataSource.setBreakAfterAcquireFailure(true);
|
||||||
|
try {
|
||||||
|
druidDataSource.init();
|
||||||
|
} catch (SQLException e) {
|
||||||
|
log.error("Exception during pool initialization", e);
|
||||||
|
throw new RuntimeException(e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
return druidDataSource;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.nl.wms;
|
package org.nl.wms;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@@ -17,6 +18,7 @@ import java.util.Map;
|
|||||||
* @author zds 2018-12-27 16:33:50
|
* @author zds 2018-12-27 16:33:50
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
public class WebServiceUtil {
|
public class WebServiceUtil {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -64,7 +66,7 @@ public class WebServiceUtil {
|
|||||||
String ret="默认值";
|
String ret="默认值";
|
||||||
|
|
||||||
if(200 == responseCode){//表示服务端响应成功
|
if(200 == responseCode){//表示服务端响应成功
|
||||||
|
log.info("请求成功!");
|
||||||
//获取当前连接请求返回的数据流
|
//获取当前连接请求返回的数据流
|
||||||
InputStream is = connection.getInputStream();
|
InputStream is = connection.getInputStream();
|
||||||
|
|
||||||
@@ -98,6 +100,7 @@ public class WebServiceUtil {
|
|||||||
connection.disconnect();
|
connection.disconnect();
|
||||||
}
|
}
|
||||||
os.close();
|
os.close();
|
||||||
|
log.info("返回参数ret为:"+ret);
|
||||||
return ret;
|
return ret;
|
||||||
// return result;
|
// return result;
|
||||||
}
|
}
|
||||||
@@ -127,7 +130,7 @@ public class WebServiceUtil {
|
|||||||
sb.append("</urn:"+method+">");
|
sb.append("</urn:"+method+">");
|
||||||
sb.append("</soapenv:Body>");
|
sb.append("</soapenv:Body>");
|
||||||
sb.append("</soapenv:Envelope>");
|
sb.append("</soapenv:Envelope>");
|
||||||
System.out.println("getXML发送数据-----------------"+sb.toString());
|
log.info("getXML组织参数为-----------------"+sb.toString());
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ package org.nl.wms.basedata.master.rest;
|
|||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.nl.common.anno.Log;
|
import org.nl.common.anno.Log;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
|
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
|
||||||
@@ -90,9 +91,8 @@ public class MaterialbaseController {
|
|||||||
@Log("物料同步")
|
@Log("物料同步")
|
||||||
@ApiOperation("物料同步")
|
@ApiOperation("物料同步")
|
||||||
//@PreAuthorize("@el.check('materialtype:list')")
|
//@PreAuthorize("@el.check('materialtype:list')")
|
||||||
public ResponseEntity<Object> synchronize(@RequestBody Map whereJson) {
|
public ResponseEntity<Object> synchronize(@RequestBody JSONObject whereJson) {
|
||||||
materialBaseService.synchronize(whereJson);
|
return new ResponseEntity<>(materialBaseService.synchronize(whereJson), HttpStatus.OK);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log("查询产品系列类型")
|
@Log("查询产品系列类型")
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ public interface MaterialbaseService {
|
|||||||
*/
|
*/
|
||||||
JSONObject getMaterOptType(String materOpt_code);
|
JSONObject getMaterOptType(String materOpt_code);
|
||||||
|
|
||||||
void synchronize(Map whereJson);
|
JSONObject synchronize(JSONObject whereJson);
|
||||||
|
|
||||||
JSONArray getProductSeries(String parent_class_id);
|
JSONArray getProductSeries(String parent_class_id);
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,140 @@
|
|||||||
|
/*
|
||||||
|
* <<
|
||||||
|
* Davinci
|
||||||
|
* ==
|
||||||
|
* Copyright (C) 2016 - 2019 EDP
|
||||||
|
* ==
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
* >>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.nl.wms.common;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author /
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@SuppressWarnings({"unchecked","all"})
|
||||||
|
public enum DataTypeEnum {
|
||||||
|
|
||||||
|
/** mysql */
|
||||||
|
MYSQL("mysql", "mysql", "com.mysql.jdbc.Driver", "`", "`", "'", "'"),
|
||||||
|
|
||||||
|
/** oracle */
|
||||||
|
ORACLE("oracle", "oracle", "oracle.jdbc.driver.OracleDriver", "\"", "\"", "\"", "\""),
|
||||||
|
|
||||||
|
/** sql server */
|
||||||
|
SQLSERVER("sqlserver", "sqlserver", "com.microsoft.sqlserver.jdbc.SQLServerDriver", "\"", "\"", "\"", "\""),
|
||||||
|
|
||||||
|
/** h2 */
|
||||||
|
H2("h2", "h2", "org.h2.Driver", "`", "`", "\"", "\""),
|
||||||
|
|
||||||
|
/** phoenix */
|
||||||
|
PHOENIX("phoenix", "hbase phoenix", "org.apache.phoenix.jdbc.PhoenixDriver", "", "", "\"", "\""),
|
||||||
|
|
||||||
|
/** mongo */
|
||||||
|
MONGODB("mongo", "mongodb", "mongodb.jdbc.MongoDriver", "`", "`", "\"", "\""),
|
||||||
|
|
||||||
|
/** sql4es */
|
||||||
|
ELASTICSEARCH("sql4es", "elasticsearch", "nl.anchormen.sql4es.jdbc.ESDriver", "", "", "'", "'"),
|
||||||
|
|
||||||
|
/** presto */
|
||||||
|
PRESTO("presto", "presto", "com.facebook.presto.jdbc.PrestoDriver", "", "", "\"", "\""),
|
||||||
|
|
||||||
|
/** moonbox */
|
||||||
|
MOONBOX("moonbox", "moonbox", "moonbox.jdbc.MbDriver", "`", "`", "`", "`"),
|
||||||
|
|
||||||
|
/** cassandra */
|
||||||
|
CASSANDRA("cassandra", "cassandra", "com.github.adejanovski.cassandra.jdbc.CassandraDriver", "", "", "'", "'"),
|
||||||
|
|
||||||
|
/** click house */
|
||||||
|
CLICKHOUSE("clickhouse", "clickhouse", "ru.yandex.clickhouse.ClickHouseDriver", "", "", "\"", "\""),
|
||||||
|
|
||||||
|
/** kylin */
|
||||||
|
KYLIN("kylin", "kylin", "org.apache.kylin.jdbc.Driver", "\"", "\"", "\"", "\""),
|
||||||
|
|
||||||
|
/** vertica */
|
||||||
|
VERTICA("vertica", "vertica", "com.vertica.jdbc.Driver", "", "", "'", "'"),
|
||||||
|
|
||||||
|
/** sap */
|
||||||
|
HANA("sap", "sap hana", "com.sap.db.jdbc.Driver", "", "", "'", "'"),
|
||||||
|
|
||||||
|
/** impala */
|
||||||
|
IMPALA("impala", "impala", "com.cloudera.impala.jdbc41.Driver", "", "", "'", "'");
|
||||||
|
|
||||||
|
private String feature;
|
||||||
|
private String desc;
|
||||||
|
private String driver;
|
||||||
|
private String keywordPrefix;
|
||||||
|
private String keywordSuffix;
|
||||||
|
private String aliasPrefix;
|
||||||
|
private String aliasSuffix;
|
||||||
|
|
||||||
|
private static final String JDBC_URL_PREFIX = "jdbc:";
|
||||||
|
|
||||||
|
DataTypeEnum(String feature, String desc, String driver, String keywordPrefix, String keywordSuffix, String aliasPrefix, String aliasSuffix) {
|
||||||
|
this.feature = feature;
|
||||||
|
this.desc = desc;
|
||||||
|
this.driver = driver;
|
||||||
|
this.keywordPrefix = keywordPrefix;
|
||||||
|
this.keywordSuffix = keywordSuffix;
|
||||||
|
this.aliasPrefix = aliasPrefix;
|
||||||
|
this.aliasSuffix = aliasSuffix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DataTypeEnum urlOf(String jdbcUrl) {
|
||||||
|
String url = jdbcUrl.toLowerCase().trim();
|
||||||
|
for (DataTypeEnum dataTypeEnum : values()) {
|
||||||
|
if (url.startsWith(JDBC_URL_PREFIX + dataTypeEnum.feature)) {
|
||||||
|
try {
|
||||||
|
Class<?> aClass = Class.forName(dataTypeEnum.getDriver());
|
||||||
|
if (null == aClass) {
|
||||||
|
throw new RuntimeException("Unable to get driver instance for jdbcUrl: " + jdbcUrl);
|
||||||
|
}
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
throw new RuntimeException("Unable to get driver instance: " + jdbcUrl);
|
||||||
|
}
|
||||||
|
return dataTypeEnum;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFeature() {
|
||||||
|
return feature;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDriver() {
|
||||||
|
return driver;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKeywordPrefix() {
|
||||||
|
return keywordPrefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKeywordSuffix() {
|
||||||
|
return keywordSuffix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAliasPrefix() {
|
||||||
|
return aliasPrefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAliasSuffix() {
|
||||||
|
return aliasSuffix;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
|
||||||
|
package org.nl.wms.ext.sap.rest;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.anno.Log;
|
||||||
|
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||||
|
import org.nl.wms.ext.sap.service.WmsToSapService;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhouz
|
||||||
|
* @date 2021-07-21
|
||||||
|
**/
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "wms发送sap")
|
||||||
|
@RequestMapping("/api/sap/")
|
||||||
|
@Slf4j
|
||||||
|
public class WmsToSapController {
|
||||||
|
private final WmsToSapService wmsToSapService;
|
||||||
|
|
||||||
|
@PostMapping("/getMater")
|
||||||
|
@Log("获取物料基础信息")
|
||||||
|
@ApiOperation("获取物料基础信息")
|
||||||
|
public ResponseEntity<Object> getMater(@RequestBody JSONObject form) {
|
||||||
|
return new ResponseEntity<>(wmsToSapService.getMater(form), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getSaleOrder")
|
||||||
|
@Log("获取销售订单")
|
||||||
|
@ApiOperation("获取销售订单")
|
||||||
|
public ResponseEntity<Object> getSaleOrder(@RequestBody JSONObject form) {
|
||||||
|
return new ResponseEntity<>(wmsToSapService.getSaleOrder(form), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getDeliveryNote")
|
||||||
|
@Log("获取物料基础信息")
|
||||||
|
@ApiOperation("获取物料基础信息")
|
||||||
|
public ResponseEntity<Object> getDeliveryNote(@RequestBody JSONObject form) {
|
||||||
|
return new ResponseEntity<>(wmsToSapService.getDeliveryNote(form), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package org.nl.wms.ext.sap.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface WmsToSapService {
|
||||||
|
/**
|
||||||
|
* WMS客户端--->SAP服务端
|
||||||
|
* 获取物料信息
|
||||||
|
*
|
||||||
|
* @param form
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
|
||||||
|
JSONObject getMater(JSONObject form);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WMS客户端--->SAP服务端
|
||||||
|
* 获取销售订单
|
||||||
|
*
|
||||||
|
* @param form
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
|
||||||
|
JSONObject getSaleOrder(JSONObject form);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WMS客户端--->SAP服务端
|
||||||
|
* 获取交货单
|
||||||
|
*
|
||||||
|
* @param form
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
|
||||||
|
JSONObject getDeliveryNote(JSONObject form);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,323 @@
|
|||||||
|
package org.nl.wms.ext.sap.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.github.pagehelper.util.StringUtil;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.json.XML;
|
||||||
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
|
import org.nl.modules.wql.exception.WDKException;
|
||||||
|
import org.nl.wms.WebServiceUtil;
|
||||||
|
import org.nl.wms.ext.sap.service.WmsToSapService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Slf4j
|
||||||
|
public class WmsToSapServiceImpl implements WmsToSapService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject getMater(JSONObject form) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getDateStr(int day) {
|
||||||
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
Date todayDate = new Date();
|
||||||
|
long beforeTime = (todayDate.getTime() / 1000) - 60 * 60 * 24 * day;
|
||||||
|
todayDate.setTime(beforeTime * 1000);
|
||||||
|
String beforeDate = formatter.format(todayDate);
|
||||||
|
return beforeDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject getSaleOrder(JSONObject form) {
|
||||||
|
log.info("导入方法开始");
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
|
||||||
|
String url = "http://192.168.0.82:8000/sap/bc/srt/rfc/sap/zfg_ecc_to_zhwl/800/zfg_ecc_to_zhwl/binding";
|
||||||
|
String method = "ZfmGetSo";
|
||||||
|
|
||||||
|
if (StrUtil.equals(form.getString("is_auto"), "1")) {
|
||||||
|
form.put("IErdatFrm", getDateStr(1));
|
||||||
|
form.put("IErdatTo", getDateStr(0));
|
||||||
|
form.put("IVbeln", ""); // 非必填字段
|
||||||
|
}
|
||||||
|
|
||||||
|
String bill_code = form.getString("bill_code");
|
||||||
|
String date_begin = form.getString("date_begin");
|
||||||
|
String date_end = form.getString("date_end");
|
||||||
|
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("IVbeln", "");
|
||||||
|
map.put("IErdatFrm", "");
|
||||||
|
map.put("IErdatTo", "");
|
||||||
|
if (StrUtil.isNotEmpty(bill_code)) {
|
||||||
|
map.put("IVbeln", bill_code);
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(date_begin)) {
|
||||||
|
map.put("IErdatFrm", date_begin);
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(date_end)) {
|
||||||
|
map.put("IErdatTo", date_end);
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject ZfmGetSoResponse = null;
|
||||||
|
try {
|
||||||
|
String response = WebServiceUtil.process(url, method, map);
|
||||||
|
JSONObject ret = JSONObject.parseObject(XML.toJSONObject(response).toString());
|
||||||
|
log.info("getXML发送数据-----------------" + ret.toString());
|
||||||
|
JSONObject Envelope = ret.getJSONObject("soap-env:Envelope");
|
||||||
|
JSONObject Body = Envelope.getJSONObject("soap-env:Body");
|
||||||
|
ZfmGetSoResponse = Body.getJSONObject("n0:ZfmGetSoResponse");
|
||||||
|
String check = ZfmGetSoResponse.getString("OResultcode");
|
||||||
|
if ("1005".equals(check)) {
|
||||||
|
System.out.println(ZfmGetSoResponse.getString("OResultmsg"));
|
||||||
|
throw new BadRequestException("sap返回:" + ZfmGetSoResponse.getString("OResultmsg"));
|
||||||
|
} else if (!"1000".equals(check)) {
|
||||||
|
throw new BadRequestException("sap返回:" + ZfmGetSoResponse.getString("OResultmsg"));
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject TZtsalesorder = ZfmGetSoResponse.getJSONObject("TZtsalesorder");
|
||||||
|
log.info("TZtsalesorder为:" + TZtsalesorder.toString());
|
||||||
|
JSONArray item = TZtsalesorder.getJSONArray("item");
|
||||||
|
|
||||||
|
if (TZtsalesorder == null || item == null || item.size() == 0) {
|
||||||
|
result.put("message", "sap无可同步数据");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
int err_num = 0;
|
||||||
|
for (int i = 0; i < item.size(); i++) {
|
||||||
|
JSONObject row = item.getJSONObject(i);
|
||||||
|
boolean need_update = false;
|
||||||
|
JSONObject sale_jo = WQLObject.getWQLObject("pcs_sale_order").query("sale_code = '" + row.getString("Vbeln") + "' AND seq_no = '" + row.getString("Posnr") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(sale_jo)) {
|
||||||
|
sale_jo = new JSONObject();
|
||||||
|
sale_jo.put("sale_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||||
|
} else {
|
||||||
|
need_update = true;
|
||||||
|
if (!sale_jo.getString("status").equals("10")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sale_jo.put("is_success", "1");
|
||||||
|
sale_jo.put("sale_code", row.getString("Vbeln"));
|
||||||
|
sale_jo.put("seq_no", row.getString("Posnr"));
|
||||||
|
sale_jo.put("sale_type", row.getString("Auart"));
|
||||||
|
String material_code = row.getString("Matnr").replaceAll("^(0+)", "");
|
||||||
|
//获取物料对应的物料标识
|
||||||
|
JSONObject mater_jo = WQLObject.getWQLObject("MD_ME_MaterialBase").query("material_code = '" + material_code + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(mater_jo)) {
|
||||||
|
sale_jo.put("material_id", "0");
|
||||||
|
sale_jo.put("is_success", "0");
|
||||||
|
sale_jo.put("remark", "未查询到该销售订单对应的物料主数据:" + material_code);
|
||||||
|
err_num++;
|
||||||
|
} else {
|
||||||
|
String material_id = mater_jo.getString("material_id");
|
||||||
|
sale_jo.put("material_id", material_id);
|
||||||
|
}
|
||||||
|
sale_jo.put("status", "10");
|
||||||
|
sale_jo.put("sale_qty", row.getString("Kwmeng"));
|
||||||
|
sale_jo.put("produce_seq", "1");
|
||||||
|
String cust_code = row.getString("Kunnr");
|
||||||
|
JSONObject cust_jo = WQLObject.getWQLObject("md_cs_customerbase").query("cust_code = '" + cust_code + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(cust_jo)) {
|
||||||
|
sale_jo.put("cust_id", cust_jo.getString("cust_id"));
|
||||||
|
sale_jo.put("cust_code", cust_jo.getString("cust_code"));
|
||||||
|
sale_jo.put("cust_name", cust_jo.getString("cust_name"));
|
||||||
|
} else {
|
||||||
|
sale_jo.put("is_success", "0");
|
||||||
|
sale_jo.put("remark", "未查询到该销售订单对应的客户信息:" + cust_code);
|
||||||
|
err_num++;
|
||||||
|
}
|
||||||
|
String unit_code = row.getString("Vrkme");
|
||||||
|
JSONObject unit_jo = WQLObject.getWQLObject("md_pb_measureunit").query("unit_name = '" + unit_code + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(unit_jo)) {
|
||||||
|
sale_jo.put("qty_unit_id", "0");
|
||||||
|
sale_jo.put("remark", "未查询到该销售订单对应的单位信息:" + unit_code);
|
||||||
|
err_num++;
|
||||||
|
} else {
|
||||||
|
sale_jo.put("qty_unit_id", unit_jo.getString("measure_unit_id"));
|
||||||
|
}
|
||||||
|
sale_jo.put("plandeliver_date", row.getString("Edaut"));
|
||||||
|
sale_jo.put("create_id", SecurityUtils.getCurrentUserId());
|
||||||
|
sale_jo.put("create_name", SecurityUtils.getCurrentNickName());
|
||||||
|
sale_jo.put("create_time", DateUtil.now());
|
||||||
|
sale_jo.put("update_optid", SecurityUtils.getCurrentUserId());
|
||||||
|
sale_jo.put("update_optname", SecurityUtils.getCurrentNickName());
|
||||||
|
sale_jo.put("update_time", DateUtil.now());
|
||||||
|
|
||||||
|
if (need_update) {
|
||||||
|
WQLObject.getWQLObject("pcs_sale_order").update(sale_jo);
|
||||||
|
} else {
|
||||||
|
WQLObject.getWQLObject("pcs_sale_order").insert(sale_jo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if (err_num > 0) {
|
||||||
|
result.put("message", "导入成功!一共导入:" + item.size() + "条数据,其中有误数据:" + err_num + "条!");
|
||||||
|
} else {
|
||||||
|
result.put("message", "导入成功!一共导入:" + item.size() + "条数据!");
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject getDeliveryNote(JSONObject form) {
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
|
||||||
|
String url = "http://192.168.0.82:8000/sap/bc/srt/rfc/sap/zfg_ecc_to_zhwl/800/zfg_ecc_to_zhwl/binding";
|
||||||
|
String method = "ZfmGetDnZjwl";
|
||||||
|
|
||||||
|
if (StrUtil.equals(form.getString("is_auto"), "1")) {
|
||||||
|
form.put("IErdatFrm", getDateStr(1));
|
||||||
|
form.put("IErdatTo", getDateStr(0));
|
||||||
|
form.put("IVbeln", ""); // 非必填字段
|
||||||
|
}
|
||||||
|
|
||||||
|
String bill_code = form.getString("bill_code");
|
||||||
|
String date_begin = form.getString("date_begin");
|
||||||
|
String date_end = form.getString("date_end");
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("IVbeln", "");
|
||||||
|
map.put("IErdatFrm", "");
|
||||||
|
map.put("IErdatTo", "");
|
||||||
|
if (StrUtil.isNotEmpty(bill_code)) {
|
||||||
|
map.put("IVbeln", bill_code);
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(date_begin)) {
|
||||||
|
map.put("IErdatFrm", date_begin);
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotEmpty(date_end)) {
|
||||||
|
map.put("IErdatTo", date_end);
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject ZfmGetSoResponse = null;
|
||||||
|
try {
|
||||||
|
String response = WebServiceUtil.process(url, method, map);
|
||||||
|
JSONObject ret = JSONObject.parseObject(XML.toJSONObject(response).toString());
|
||||||
|
log.info("getXML发送数据-----------------" + ret.toString());
|
||||||
|
JSONObject Envelope = ret.getJSONObject("soap-env:Envelope");
|
||||||
|
JSONObject Body = Envelope.getJSONObject("soap-env:Body");
|
||||||
|
ZfmGetSoResponse = Body.getJSONObject("n0:ZfmGetDnZjwlResponse");
|
||||||
|
String check = ZfmGetSoResponse.getString("OResultcode");
|
||||||
|
if ("1005".equals(check)) {
|
||||||
|
System.out.println(ZfmGetSoResponse.getString("OResultmsg"));
|
||||||
|
throw new BadRequestException("sap返回:" + ZfmGetSoResponse.getString("OResultmsg"));
|
||||||
|
} else if (!"1000".equals(check)) {
|
||||||
|
throw new BadRequestException("sap返回:" + ZfmGetSoResponse.getString("OResultmsg"));
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
log.info(ZfmGetSoResponse.toString());
|
||||||
|
JSONObject TZtsalesorder = ZfmGetSoResponse.getJSONObject("TZtdn");
|
||||||
|
log.info("TZtsalesorder数据为:-------------------" + TZtsalesorder.toString());
|
||||||
|
JSONArray item = TZtsalesorder.getJSONArray("item");
|
||||||
|
log.info(item.size() + "");
|
||||||
|
|
||||||
|
if (TZtsalesorder == null || item == null || item.size() == 0) {
|
||||||
|
result.put("message", "sap无可同步数据");
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
int err_num = 0;
|
||||||
|
for (int i = 0; i < item.size(); i++) {
|
||||||
|
boolean need_update = false;
|
||||||
|
JSONObject row = item.getJSONObject(i);
|
||||||
|
JSONObject deliver_jo = WQLObject.getWQLObject("pcs_delivery_order").query("deliver_code = '" + row.getString("Vbeln") + "' AND seq_no = '" + row.getString("Posnr") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(deliver_jo)) {
|
||||||
|
deliver_jo = new JSONObject();
|
||||||
|
deliver_jo.put("deliver_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||||
|
} else {
|
||||||
|
need_update = true;
|
||||||
|
if (!deliver_jo.getString("status").equals("10")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deliver_jo.put("deliver_code", row.getString("Vbeln"));
|
||||||
|
deliver_jo.put("seq_no", row.getString("Posnr"));
|
||||||
|
deliver_jo.put("deliver_type", row.getString("Lfart"));
|
||||||
|
String material_code = row.getString("Matnr").replaceAll("^(0+)", "");
|
||||||
|
//获取物料对应的物料标识
|
||||||
|
JSONObject mater_jo = WQLObject.getWQLObject("MD_ME_MaterialBase").query("material_code = '" + material_code + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(mater_jo)) {
|
||||||
|
deliver_jo.put("material_id", "0");
|
||||||
|
deliver_jo.put("is_success", "0");
|
||||||
|
deliver_jo.put("remark", "未查询到该交货单对应的物料主数据:" + material_code);
|
||||||
|
err_num++;
|
||||||
|
} else {
|
||||||
|
String material_id = mater_jo.getString("material_id");
|
||||||
|
deliver_jo.put("material_id", material_id);
|
||||||
|
}
|
||||||
|
deliver_jo.put("status", "10");
|
||||||
|
deliver_jo.put("delivery_qty", row.getString("Lfimg"));
|
||||||
|
String cust_code = row.getString("Kunnr");
|
||||||
|
JSONObject cust_jo = WQLObject.getWQLObject("md_cs_customerbase").query("cust_code = '" + cust_code + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(cust_jo)) {
|
||||||
|
deliver_jo.put("cust_id", cust_jo.getString("cust_id"));
|
||||||
|
deliver_jo.put("cust_code", cust_jo.getString("cust_code"));
|
||||||
|
deliver_jo.put("cust_name", cust_jo.getString("cust_name"));
|
||||||
|
} else {
|
||||||
|
deliver_jo.put("is_success", "0");
|
||||||
|
deliver_jo.put("remark", "未查询到该交货单对应的客户信息:" + cust_code);
|
||||||
|
err_num++;
|
||||||
|
}
|
||||||
|
String unit_code = row.getString("Vrkme");
|
||||||
|
JSONObject unit_jo = WQLObject.getWQLObject("md_pb_measureunit").query("unit_name = '" + unit_code + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(unit_jo)) {
|
||||||
|
deliver_jo.put("qty_unit_id", "0");
|
||||||
|
deliver_jo.put("remark", "未查询到该交货单对应的单位信息:" + unit_code);
|
||||||
|
err_num++;
|
||||||
|
} else {
|
||||||
|
deliver_jo.put("qty_unit_id", unit_jo.getString("measure_unit_id"));
|
||||||
|
}
|
||||||
|
String sale_code = row.getString("Vgbel");
|
||||||
|
String seq_no = row.getString("Vgpos");
|
||||||
|
JSONObject sale_jo = WQLObject.getWQLObject("pcs_sale_order").query("sale_code = '" + sale_code + "' AND seq_no = '" + seq_no + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(sale_jo)) {
|
||||||
|
deliver_jo.put("remark", "未查询到该交货单对应的销售订单:" + unit_code + "行号为:" + seq_no);
|
||||||
|
deliver_jo.put("is_success", "0");
|
||||||
|
} else {
|
||||||
|
deliver_jo.put("sale_id", sale_jo.getString("sale_id"));
|
||||||
|
deliver_jo.put("sale_code", sale_jo.getString("sale_code"));
|
||||||
|
deliver_jo.put("sale_seq_no", sale_jo.getString("seq_no"));
|
||||||
|
}
|
||||||
|
deliver_jo.put("create_id", SecurityUtils.getCurrentUserId());
|
||||||
|
deliver_jo.put("create_name", SecurityUtils.getCurrentNickName());
|
||||||
|
deliver_jo.put("create_time", DateUtil.now());
|
||||||
|
deliver_jo.put("update_optid", SecurityUtils.getCurrentUserId());
|
||||||
|
deliver_jo.put("update_optname", SecurityUtils.getCurrentNickName());
|
||||||
|
deliver_jo.put("update_time", DateUtil.now());
|
||||||
|
if (need_update) {
|
||||||
|
WQLObject.getWQLObject("pcs_delivery_order").update(deliver_jo);
|
||||||
|
} else {
|
||||||
|
WQLObject.getWQLObject("pcs_delivery_order").insert(deliver_jo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (err_num > 0) {
|
||||||
|
result.put("message", "导入成功!一共导入:" + item.size() + "条数据,其中有误数据:" + err_num + "条!");
|
||||||
|
} else {
|
||||||
|
result.put("message", "导入成功!一共导入:" + item.size() + "条数据!");
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,160 @@
|
|||||||
|
[交易说明]
|
||||||
|
交易名: 库区分页查询
|
||||||
|
所属模块:
|
||||||
|
功能简述:
|
||||||
|
版权所有:
|
||||||
|
表引用:
|
||||||
|
版本经历:
|
||||||
|
|
||||||
|
[数据库]
|
||||||
|
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||||
|
|
||||||
|
[IO定义]
|
||||||
|
#################################################
|
||||||
|
## 表字段对应输入参数
|
||||||
|
#################################################
|
||||||
|
|
||||||
|
|
||||||
|
输入.flag TYPEAS s_string
|
||||||
|
输入.import_date1 TYPEAS s_string
|
||||||
|
输入.import_date2 TYPEAS s_string
|
||||||
|
输入.import_date3 TYPEAS s_string
|
||||||
|
输入.import_date4 TYPEAS s_string
|
||||||
|
输入.begin_time TYPEAS s_string
|
||||||
|
输入.end_time TYPEAS s_string
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[临时表]
|
||||||
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
|
|
||||||
|
[临时变量]
|
||||||
|
--所有中间过程变量均可在此处定义
|
||||||
|
|
||||||
|
[业务过程]
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 1、输入输出检查 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 2、主过程前处理 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 3、业务主过程 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
IF 输入.flag = "1"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
mater.*
|
||||||
|
FROM
|
||||||
|
V_SAP_ORG mater
|
||||||
|
WHERE 1=1
|
||||||
|
OPTION 输入.import_date3 <> ""
|
||||||
|
(pp.UPDATED_DATE > to_date(输入.import_date3,'yyyy-mm-dd HH24:MI:SS')
|
||||||
|
OR
|
||||||
|
pp.CREATE_DATE > to_date(输入.import_date3,'yyyy-mm-dd HH24:MI:SS')
|
||||||
|
)
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.begin_time <> ""
|
||||||
|
mater.EDIT_TIME >= to_date(输入.begin_time,'yyyy-mm-dd HH24:MI:SS')
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.end_time <> ""
|
||||||
|
mater.EDIT_TIME <= to_date(输入.end_time,'yyyy-mm-dd HH24:MI:SS')
|
||||||
|
ENDOPTION
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "2"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
ITEM
|
||||||
|
WHERE
|
||||||
|
(UPDATED_DATE > to_date(输入.import_date2,'yyyy-mm-dd HH24:MI:SS')
|
||||||
|
OR
|
||||||
|
CREATE_DATE > to_date(输入.import_date2,'yyyy-mm-dd HH24:MI:SS')
|
||||||
|
)
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "3"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
pp.*
|
||||||
|
FROM
|
||||||
|
PURCHASE pp
|
||||||
|
WHERE 1=1
|
||||||
|
OPTION 输入.import_date3 <> ""
|
||||||
|
(pp.UPDATED_DATE > to_date(输入.import_date3,'yyyy-mm-dd HH24:MI:SS')
|
||||||
|
OR
|
||||||
|
pp.CREATE_DATE > to_date(输入.import_date3,'yyyy-mm-dd HH24:MI:SS')
|
||||||
|
)
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.begin_time <> ""
|
||||||
|
pp.CREATE_DATE >= to_date(输入.begin_time,'yyyy-mm-dd HH24:MI:SS')
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.end_time <> ""
|
||||||
|
pp.CREATE_DATE <= to_date(输入.end_time,'yyyy-mm-dd HH24:MI:SS')
|
||||||
|
ENDOPTION
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "4"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
pp.*
|
||||||
|
FROM
|
||||||
|
SALE_OUT pp
|
||||||
|
WHERE 1=1
|
||||||
|
|
||||||
|
OPTION 输入.begin_time <> ""
|
||||||
|
pp.dbilldate >= 输入.begin_time
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.end_time <> ""
|
||||||
|
pp.dbilldate <= 输入.end_time
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.fbillflag <> ""
|
||||||
|
pp.fbillflag = 输入.fbillflag
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.vbillcode <> ""
|
||||||
|
pp.vbillcode like 输入.vbillcode
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.cmaterialvid <> ""
|
||||||
|
pp.cmaterialvid = 输入.cmaterialvid
|
||||||
|
ENDOPTION
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "5"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
pp.*
|
||||||
|
FROM
|
||||||
|
PURCHASE_IN pp
|
||||||
|
WHERE 1=1
|
||||||
|
OPTION 输入.import_date4 <> ""
|
||||||
|
pp.CREATIONTIME > 输入.import_date4
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.begin_time <> ""
|
||||||
|
pp.CREATIONTIME >= 输入.begin_time
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.end_time <> ""
|
||||||
|
pp.CREATIONTIME <= 输入.end_time
|
||||||
|
ENDOPTION
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -50,12 +50,14 @@ public class DeliveryOrderServiceImpl implements DeliveryOrderService {
|
|||||||
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||||
String end_time = MapUtil.getStr(whereJson, "end_time");
|
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||||
String status = MapUtil.getStr(whereJson, "status");
|
String status = MapUtil.getStr(whereJson, "status");
|
||||||
|
String is_success = MapUtil.getStr(whereJson, "is_success");
|
||||||
String product_series = "";
|
String product_series = "";
|
||||||
HashMap<String, String> map = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
map.put("flag", "1");
|
map.put("flag", "1");
|
||||||
map.put("begin_time", begin_time);
|
map.put("begin_time", begin_time);
|
||||||
map.put("end_time", end_time);
|
map.put("end_time", end_time);
|
||||||
map.put("status", status);
|
map.put("status", status);
|
||||||
|
map.put("is_success", is_success);
|
||||||
if (StrUtil.isNotEmpty(material)) {
|
if (StrUtil.isNotEmpty(material)) {
|
||||||
map.put("material", "%" + material + "%");
|
map.put("material", "%" + material + "%");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,12 +50,14 @@ public class SaleOrderServiceImpl implements SaleOrderService {
|
|||||||
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||||
String end_time = MapUtil.getStr(whereJson, "end_time");
|
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||||
String status = MapUtil.getStr(whereJson, "status");
|
String status = MapUtil.getStr(whereJson, "status");
|
||||||
|
String is_success = MapUtil.getStr(whereJson, "is_success");
|
||||||
String product_series = "";
|
String product_series = "";
|
||||||
HashMap<String, String> map = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
map.put("flag", "1");
|
map.put("flag", "1");
|
||||||
map.put("begin_time", begin_time);
|
map.put("begin_time", begin_time);
|
||||||
map.put("end_time", end_time);
|
map.put("end_time", end_time);
|
||||||
map.put("status", status);
|
map.put("status", status);
|
||||||
|
map.put("is_success", is_success);
|
||||||
if (StrUtil.isNotEmpty(sale_code)) {
|
if (StrUtil.isNotEmpty(sale_code)) {
|
||||||
map.put("sale_code", "%" + sale_code + "%");
|
map.put("sale_code", "%" + sale_code + "%");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
输入.material TYPEAS s_string
|
输入.material TYPEAS s_string
|
||||||
输入.product_series TYPEAS f_string
|
输入.product_series TYPEAS f_string
|
||||||
输入.status TYPEAS s_string
|
输入.status TYPEAS s_string
|
||||||
|
输入.is_success TYPEAS s_string
|
||||||
输入.begin_time TYPEAS s_string
|
输入.begin_time TYPEAS s_string
|
||||||
输入.end_time TYPEAS s_string
|
输入.end_time TYPEAS s_string
|
||||||
|
|
||||||
@@ -62,6 +63,9 @@
|
|||||||
OPTION 输入.status <> ""
|
OPTION 输入.status <> ""
|
||||||
deliveryorder.status = 输入.status
|
deliveryorder.status = 输入.status
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
OPTION 输入.is_success <> ""
|
||||||
|
deliveryorder.is_success = 输入.is_success
|
||||||
|
ENDOPTION
|
||||||
OPTION 输入.product_series <> ""
|
OPTION 输入.product_series <> ""
|
||||||
material.product_series in 输入.product_series
|
material.product_series in 输入.product_series
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
输入.material TYPEAS s_string
|
输入.material TYPEAS s_string
|
||||||
输入.product_series TYPEAS f_string
|
输入.product_series TYPEAS f_string
|
||||||
输入.status TYPEAS s_string
|
输入.status TYPEAS s_string
|
||||||
|
输入.is_success TYPEAS s_string
|
||||||
输入.begin_time TYPEAS s_string
|
输入.begin_time TYPEAS s_string
|
||||||
输入.end_time TYPEAS s_string
|
输入.end_time TYPEAS s_string
|
||||||
|
|
||||||
@@ -62,6 +63,9 @@
|
|||||||
OPTION 输入.status <> ""
|
OPTION 输入.status <> ""
|
||||||
saleorder.status = 输入.status
|
saleorder.status = 输入.status
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
OPTION 输入.is_success <> ""
|
||||||
|
saleorder.is_success = 输入.is_success
|
||||||
|
ENDOPTION
|
||||||
OPTION 输入.product_series <> ""
|
OPTION 输入.product_series <> ""
|
||||||
material.product_series in 输入.product_series
|
material.product_series in 输入.product_series
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,22 @@
|
|||||||
|
package org.nl.wms.sch.manage;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.wms.ext.sap.service.WmsToSapService;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AutoImportDeliverOrder {
|
||||||
|
private final WmsToSapService wmsToSapService;
|
||||||
|
|
||||||
|
public void run() {
|
||||||
|
//通过ACS接口获取温度
|
||||||
|
JSONObject form = new JSONObject();
|
||||||
|
form.put("is_auto", "1");
|
||||||
|
wmsToSapService.getDeliveryNote(form);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package org.nl.wms.sch.manage;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.wql.WQL;
|
||||||
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
|
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||||
|
import org.nl.wms.ext.sap.service.WmsToSapService;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AutoImportSaleOrder {
|
||||||
|
private final WmsToSapService wmsToSapService;
|
||||||
|
|
||||||
|
public void run() {
|
||||||
|
//通过ACS接口获取温度
|
||||||
|
JSONObject form = new JSONObject();
|
||||||
|
form.put("is_auto", "1");
|
||||||
|
wmsToSapService.getSaleOrder(form);
|
||||||
|
}
|
||||||
|
}
|
||||||
27
mes/qd/src/api/wms/ext/sap.js
Normal file
27
mes/qd/src/api/wms/ext/sap.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function getSaleOrder(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/sap/getSaleOrder',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDeliveryNote(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/sap/getDeliveryNote',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getMater(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/sap/getMater',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { getSaleOrder, getDeliveryNote, getMater }
|
||||||
97
mes/qd/src/views/wms/basedata/master/material/Dialog.vue
Normal file
97
mes/qd/src/views/wms/basedata/master/material/Dialog.vue
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="物料导入"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
destroy-on-close
|
||||||
|
:show-close="true"
|
||||||
|
width="500px"
|
||||||
|
v-loading.fullscreen.lock="fullscreenLoading"
|
||||||
|
@close="close"
|
||||||
|
>
|
||||||
|
<div class="head-container">
|
||||||
|
<div>
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-form ref="form" :model="form1" :rules="rules" size="mini" label-width="110px">
|
||||||
|
<el-form-item label="日期区间:" prop="createTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.createTime"
|
||||||
|
type="daterange"
|
||||||
|
vvalue-format="yyyy-MM-dd"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="起始物料号:" prop="bill_code1">
|
||||||
|
<el-input v-model="form.bill_code1" style="width: 350px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="终止物料号:" prop="bill_code2">
|
||||||
|
<el-input v-model="form.bill_code2" style="width: 350px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="queryStruct">确认
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import CRUD, {header, presenter} from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||||
|
import crudSap from '@/api/wms/ext/sap'
|
||||||
|
import crudMaterialbase from "@/api/wms/basedata/master/materialbase";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'importOrder',
|
||||||
|
components: {rrOperation, pagination, DateRangePicker},
|
||||||
|
cruds() {
|
||||||
|
},
|
||||||
|
mixins: [presenter(), header()],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fullscreenLoading: false,
|
||||||
|
dialogVisible: false,
|
||||||
|
form: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
close() {
|
||||||
|
this.form = {}
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.$emit('tableChanged', this.rows)
|
||||||
|
},
|
||||||
|
queryStruct() {
|
||||||
|
debugger
|
||||||
|
this.fullscreenLoading = true
|
||||||
|
if (this.form.createTime) {
|
||||||
|
this.form.date_begin = this.form.createTime[0]
|
||||||
|
this.form.date_end = this.form.createTime[1]
|
||||||
|
}
|
||||||
|
crudMaterialbase.synchronize(this.form).then(res => {
|
||||||
|
this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
@@ -174,6 +174,7 @@
|
|||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
|
<Dialog :dialog-show.sync="dialogShow"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -184,6 +185,7 @@ import rrOperation from '@crud/RR.operation'
|
|||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import udOperation from '@crud/UD.operation'
|
import udOperation from '@crud/UD.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
|
import Dialog from '@/views/wms/basedata/master/material/Dialog'
|
||||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||||
@@ -227,7 +229,7 @@ export default {
|
|||||||
name: 'Materialbase',
|
name: 'Materialbase',
|
||||||
// 数据字典
|
// 数据字典
|
||||||
dicts: ['is_used'],
|
dicts: ['is_used'],
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
|
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect, Dialog },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -244,6 +246,7 @@ export default {
|
|||||||
classes1: [],
|
classes1: [],
|
||||||
classes2: [],
|
classes2: [],
|
||||||
classes3: [],
|
classes3: [],
|
||||||
|
dialogShow: false,
|
||||||
fullscreenLoading: false,
|
fullscreenLoading: false,
|
||||||
measure_unit: [],
|
measure_unit: [],
|
||||||
productSeries: [],
|
productSeries: [],
|
||||||
@@ -347,13 +350,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
synchronize() {
|
synchronize() {
|
||||||
this.fullscreenLoading = true
|
this.dialogShow = true
|
||||||
crudMaterialbase.synchronize(this.crud.query).then(res => {
|
|
||||||
this.fullscreenLoading = false
|
|
||||||
this.crud.notify('同步成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
}).catch(() => {
|
|
||||||
this.fullscreenLoading = false
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
queryClassId() {
|
queryClassId() {
|
||||||
const param = {
|
const param = {
|
||||||
|
|||||||
93
mes/qd/src/views/wms/pcs/deliveryorder/Dialog.vue
Normal file
93
mes/qd/src/views/wms/pcs/deliveryorder/Dialog.vue
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="发货单导入"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
destroy-on-close
|
||||||
|
:show-close="true"
|
||||||
|
width="500px"
|
||||||
|
v-loading.fullscreen.lock="fullscreenLoading"
|
||||||
|
@close="close"
|
||||||
|
>
|
||||||
|
<div class="head-container">
|
||||||
|
<div>
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-form ref="form" :model="form1" :rules="rules" size="mini" label-width="110px">
|
||||||
|
<el-form-item label="日期区间:" prop="createTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.createTime"
|
||||||
|
type="daterange"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发货单号:" prop="bill_code">
|
||||||
|
<el-input v-model="form.bill_code" style="width: 350px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="queryStruct">确认
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import CRUD, {header, presenter} from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||||
|
import crudSap from '@/api/wms/ext/sap'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'importOrder',
|
||||||
|
components: {rrOperation, pagination, DateRangePicker},
|
||||||
|
cruds() {
|
||||||
|
},
|
||||||
|
mixins: [presenter(), header()],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fullscreenLoading: false,
|
||||||
|
dialogVisible: false,
|
||||||
|
form: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
close() {
|
||||||
|
this.form = {}
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.$emit('tableChanged', this.rows)
|
||||||
|
},
|
||||||
|
queryStruct() {
|
||||||
|
debugger
|
||||||
|
this.fullscreenLoading = true
|
||||||
|
if (this.form.createTime) {
|
||||||
|
this.form.date_begin = this.form.createTime[0]
|
||||||
|
this.form.date_end = this.form.createTime[1]
|
||||||
|
}
|
||||||
|
crudSap.getDeliveryNote(this.form).then(res => {
|
||||||
|
this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
@@ -12,7 +12,8 @@
|
|||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
<el-form-item label="发货单号">
|
<el-form-item label="发货单号">
|
||||||
<el-input v-model="query.deliver_code" clearable placeholder="发货单号" style="width: 200px;" class="filter-item" />
|
<el-input v-model="query.deliver_code" clearable placeholder="发货单号" style="width: 200px;"
|
||||||
|
class="filter-item"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物料搜索">
|
<el-form-item label="物料搜索">
|
||||||
<el-input
|
<el-input
|
||||||
@@ -62,13 +63,42 @@
|
|||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<rrOperation :crud="crud" />
|
<el-form-item label="是否正常">
|
||||||
|
<el-select
|
||||||
|
v-model="query.is_success"
|
||||||
|
style="width: 200px"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
placeholder="请选择"
|
||||||
|
@change="crud.toQuery"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.IS_OR_NOT"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation :crud="crud"/>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission" />
|
<crudOperation :permission="permission">
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-position"
|
||||||
|
size="mini"
|
||||||
|
@click="importin"
|
||||||
|
>
|
||||||
|
同步
|
||||||
|
</el-button>
|
||||||
|
</crudOperation>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0"
|
||||||
|
:title="crud.status.title" width="500px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@@ -77,33 +107,35 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;"
|
||||||
<el-table-column type="selection" width="55" />
|
@selection-change="crud.selectionChangeHandler">
|
||||||
<el-table-column prop="deliver_code" label="发货单号" />
|
<el-table-column type="selection" width="55"/>
|
||||||
<el-table-column prop="seq_no" label="明细序号" />
|
<el-table-column prop="deliver_code" label="发货单号"/>
|
||||||
<el-table-column prop="deliver_type" label="发货单类型">
|
<el-table-column prop="seq_no" label="明细序号"/>
|
||||||
|
<el-table-column prop="deliver_type" label="发货单类型" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ dict.label.PCS_DELIVER_TYPE[scope.row.deliver_type] }}
|
{{ dict.label.PCS_DELIVER_TYPE[scope.row.deliver_type] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="material_code" label="物料编码" />
|
<el-table-column prop="material_code" label="物料编码"/>
|
||||||
<el-table-column prop="material_name" label="物料名称" />
|
<el-table-column prop="material_name" label="物料名称"/>
|
||||||
<el-table-column prop="status" label="状态">
|
<el-table-column prop="status" label="状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ dict.label.PCS_DELI_STATUS[scope.row.status] }}
|
{{ dict.label.PCS_DELI_STATUS[scope.row.status] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="delivery_qty" label="发货数量" />
|
<el-table-column prop="delivery_qty" label="发货数量"/>
|
||||||
<el-table-column prop="cust_code" label="客户编码" />
|
<el-table-column prop="cust_code" label="客户编码"/>
|
||||||
<el-table-column prop="cust_coname" label="客户名称" />
|
<el-table-column prop="cust_coname" label="客户名称"/>
|
||||||
<el-table-column prop="unit_name" label="计量单位" show-overflow-tooltip min-width="150" />
|
<el-table-column prop="unit_name" label="计量单位" show-overflow-tooltip min-width="150"/>
|
||||||
<el-table-column prop="sale_code" label="销售单号" />
|
<el-table-column prop="sale_code" label="销售单号"/>
|
||||||
<el-table-column prop="sale_seq_no" label="销售明细序号" show-overflow-tooltip min-width="150" />
|
<el-table-column prop="sale_seq_no" label="销售明细序号" show-overflow-tooltip min-width="150"/>
|
||||||
<el-table-column prop="create_name" label="创建人" />
|
<el-table-column prop="remark" label="备注" show-overflow-tooltip min-width="200"/>
|
||||||
<el-table-column prop="create_time" label="创建时间" />
|
<el-table-column prop="create_name" label="创建人"/>
|
||||||
<el-table-column prop="update_optname" label="修改人" />
|
<el-table-column prop="create_time" label="创建时间"/>
|
||||||
<el-table-column prop="update_time" label="修改时间" />
|
<el-table-column prop="update_optname" label="修改人"/>
|
||||||
<!-- <el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
<el-table-column prop="update_time" label="修改时间"/>
|
||||||
|
<!-- <el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<udOperation
|
<udOperation
|
||||||
:data="scope.row"
|
:data="scope.row"
|
||||||
@@ -113,30 +145,54 @@
|
|||||||
</el-table-column>-->
|
</el-table-column>-->
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination/>
|
||||||
</div>
|
</div>
|
||||||
|
<Dialog :dialog-show.sync="dialogShow"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import crudDeliveryOrder from '@/api/wms/pcs/deliveryOrder'
|
import crudDeliveryOrder from '@/api/wms/pcs/deliveryOrder'
|
||||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
import CRUD, {presenter, header, form, crud} from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import udOperation from '@crud/UD.operation'
|
import udOperation from '@crud/UD.operation'
|
||||||
|
import Dialog from '@/views/wms/pcs/deliveryorder/Dialog'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import Treeselect, {LOAD_CHILDREN_OPTIONS} from '@riophae/vue-treeselect'
|
import Treeselect, {LOAD_CHILDREN_OPTIONS} from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||||
|
|
||||||
const defaultForm = { deliver_id: null, deliver_code: null, seq_no: null, deliver_type: null, material_id: null, status: null, delivery_qty: null, cust_id: null, qty_unit_id: null, sale_id: null, sale_code: null, sale_seq_no: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, cust_code: null, cust_name: null }
|
const defaultForm = {
|
||||||
|
deliver_id: null,
|
||||||
|
deliver_code: null,
|
||||||
|
seq_no: null,
|
||||||
|
deliver_type: null,
|
||||||
|
material_id: null,
|
||||||
|
status: null,
|
||||||
|
delivery_qty: null,
|
||||||
|
cust_id: null,
|
||||||
|
qty_unit_id: null,
|
||||||
|
sale_id: null,
|
||||||
|
sale_code: null,
|
||||||
|
sale_seq_no: null,
|
||||||
|
create_id: null,
|
||||||
|
create_name: null,
|
||||||
|
create_time: null,
|
||||||
|
update_optid: null,
|
||||||
|
update_optname: null,
|
||||||
|
update_time: null,
|
||||||
|
cust_code: null,
|
||||||
|
cust_name: null
|
||||||
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'DeliveryOrder',
|
name: 'DeliveryOrder',
|
||||||
dicts: ['PCS_DELIVER_TYPE', 'PCS_DELI_STATUS'],
|
dicts: ['PCS_DELIVER_TYPE', 'PCS_DELI_STATUS'],
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
|
components: {pagination, crudOperation, rrOperation, udOperation, Treeselect, Dialog},
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '发货单', url: 'api/deliveryOrder', idField: 'deliver_id', sort: 'deliver_id,desc',
|
return CRUD({
|
||||||
|
title: '发货单', url: 'api/deliveryOrder', idField: 'deliver_id', sort: 'deliver_id,desc',
|
||||||
optShow: {
|
optShow: {
|
||||||
add: false,
|
add: false,
|
||||||
edit: false,
|
edit: false,
|
||||||
@@ -144,17 +200,17 @@ export default {
|
|||||||
reset: true,
|
reset: true,
|
||||||
download: false
|
download: false
|
||||||
},
|
},
|
||||||
crudMethod: { ...crudDeliveryOrder }})
|
crudMethod: {...crudDeliveryOrder}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
classes3: [],
|
classes3: [],
|
||||||
permission: {
|
dialogShow: false,
|
||||||
},
|
permission: {},
|
||||||
rules: {
|
rules: {},
|
||||||
},
|
|
||||||
queryTypeOptions: [
|
queryTypeOptions: [
|
||||||
{ key: 'deliver_code', display_name: '发货单号' }
|
{key: 'deliver_code', display_name: '发货单号'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -175,6 +231,9 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
importin() {
|
||||||
|
this.dialogShow = true
|
||||||
|
},
|
||||||
buildTree(classes) {
|
buildTree(classes) {
|
||||||
classes.forEach(data => {
|
classes.forEach(data => {
|
||||||
if (data.children) {
|
if (data.children) {
|
||||||
@@ -186,10 +245,10 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 获取子节点数据
|
// 获取子节点数据
|
||||||
loadChildNodes({ action, parentNode, callback }) {
|
loadChildNodes({action, parentNode, callback}) {
|
||||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
crudClassstandard.getClass({pid: parentNode.id}).then(res => {
|
||||||
parentNode.children = res.content.map(function(obj) {
|
parentNode.children = res.content.map(function (obj) {
|
||||||
if (obj.hasChildren) {
|
if (obj.hasChildren) {
|
||||||
obj.children = null
|
obj.children = null
|
||||||
}
|
}
|
||||||
|
|||||||
93
mes/qd/src/views/wms/pcs/saleorder/Dialog.vue
Normal file
93
mes/qd/src/views/wms/pcs/saleorder/Dialog.vue
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="销售订单导入"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
destroy-on-close
|
||||||
|
:show-close="true"
|
||||||
|
width="500px"
|
||||||
|
v-loading.fullscreen.lock="fullscreenLoading"
|
||||||
|
@close="close"
|
||||||
|
>
|
||||||
|
<div class="head-container">
|
||||||
|
<div>
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-form ref="form" :model="form1" :rules="rules" size="mini" label-width="110px">
|
||||||
|
<el-form-item label="日期区间:" prop="createTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.createTime"
|
||||||
|
type="daterange"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="销售订单号:" prop="bill_code">
|
||||||
|
<el-input v-model="form.bill_code" style="width: 350px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="queryStruct">确认
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import CRUD, {header, presenter} from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||||
|
import crudSap from '@/api/wms/ext/sap'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'importOrder',
|
||||||
|
components: {rrOperation, pagination, DateRangePicker},
|
||||||
|
cruds() {
|
||||||
|
},
|
||||||
|
mixins: [presenter(), header()],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fullscreenLoading: false,
|
||||||
|
dialogVisible: false,
|
||||||
|
form: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
close() {
|
||||||
|
this.form = {}
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.$emit('tableChanged', this.rows)
|
||||||
|
},
|
||||||
|
queryStruct() {
|
||||||
|
debugger
|
||||||
|
this.fullscreenLoading = true
|
||||||
|
if (this.form.createTime) {
|
||||||
|
this.form.date_begin = this.form.createTime[0]
|
||||||
|
this.form.date_end = this.form.createTime[1]
|
||||||
|
}
|
||||||
|
crudSap.getSaleOrder(this.form).then(res => {
|
||||||
|
this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
@@ -62,14 +62,41 @@
|
|||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="是否正常">
|
||||||
|
<el-select
|
||||||
|
v-model="query.is_success"
|
||||||
|
style="width: 200px"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
placeholder="请选择"
|
||||||
|
@change="crud.toQuery"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.IS_OR_NOT"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<rrOperation :crud="crud" />
|
<rrOperation :crud="crud" />
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<crudOperation :permission="permission">
|
||||||
<crudOperation :permission="permission" />
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-position"
|
||||||
|
size="mini"
|
||||||
|
@click="importin"
|
||||||
|
>
|
||||||
|
同步
|
||||||
|
</el-button>
|
||||||
|
</crudOperation>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
<el-form ref="form" :model="form" size="mini" label-width="80px">
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||||
@@ -99,6 +126,7 @@
|
|||||||
<el-table-column prop="cust_name" label="客户名称" min-width="100" show-overflow-tooltip/>
|
<el-table-column prop="cust_name" label="客户名称" min-width="100" show-overflow-tooltip/>
|
||||||
<el-table-column prop="unit_name" label="计量单位" show-overflow-tooltip min-width="150" />
|
<el-table-column prop="unit_name" label="计量单位" show-overflow-tooltip min-width="150" />
|
||||||
<el-table-column prop="plandeliver_date" label="计划交期" min-width="100" show-overflow-tooltip/>
|
<el-table-column prop="plandeliver_date" label="计划交期" min-width="100" show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="remark" label="备注" show-overflow-tooltip min-width="200"/>
|
||||||
<el-table-column prop="create_name" label="创建人" />
|
<el-table-column prop="create_name" label="创建人" />
|
||||||
<el-table-column prop="create_time" label="创建时间" min-width="120" show-overflow-tooltip/>
|
<el-table-column prop="create_time" label="创建时间" min-width="120" show-overflow-tooltip/>
|
||||||
<el-table-column prop="update_time" label="修改时间" min-width="120" show-overflow-tooltip/>
|
<el-table-column prop="update_time" label="修改时间" min-width="120" show-overflow-tooltip/>
|
||||||
@@ -114,6 +142,7 @@
|
|||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
|
<Dialog :dialog-show.sync="dialogShow" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -122,7 +151,7 @@ import crudSaleOrder from '@/api/wms/pcs/saleOrder'
|
|||||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import udOperation from '@crud/UD.operation'
|
import Dialog from '@/views/wms/pcs/saleorder/Dialog'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import Treeselect, {LOAD_CHILDREN_OPTIONS} from '@riophae/vue-treeselect'
|
import Treeselect, {LOAD_CHILDREN_OPTIONS} from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
@@ -131,8 +160,8 @@ import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
|||||||
const defaultForm = { sale_id: null, sale_code: null, seq_no: null, sale_type: null, material_id: null, status: null, sale_qty: null, produce_seq: null, cust_id: null, qty_unit_id: null, plandeliver_date: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, cust_code: null, cust_name: null }
|
const defaultForm = { sale_id: null, sale_code: null, seq_no: null, sale_type: null, material_id: null, status: null, sale_qty: null, produce_seq: null, cust_id: null, qty_unit_id: null, plandeliver_date: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, cust_code: null, cust_name: null }
|
||||||
export default {
|
export default {
|
||||||
name: 'SaleOrder',
|
name: 'SaleOrder',
|
||||||
dicts: ['PCS_SALE_STATUS', 'PCS_SAL_TYPE'],
|
dicts: ['PCS_SALE_STATUS', 'PCS_SAL_TYPE', 'IS_OR_NOT'],
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
|
components: { pagination, crudOperation, rrOperation, Treeselect, Dialog },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '销售订单', url: 'api/saleOrder', idField: 'sale_id', sort: 'sale_id,desc',
|
return CRUD({ title: '销售订单', url: 'api/saleOrder', idField: 'sale_id', sort: 'sale_id,desc',
|
||||||
@@ -148,10 +177,9 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
classes3: [],
|
classes3: [],
|
||||||
|
dialogShow: false,
|
||||||
permission: {
|
permission: {
|
||||||
},
|
},
|
||||||
rules: {
|
|
||||||
},
|
|
||||||
queryTypeOptions: [
|
queryTypeOptions: [
|
||||||
{ key: 'sale_code', display_name: '销售单号' }
|
{ key: 'sale_code', display_name: '销售单号' }
|
||||||
]
|
]
|
||||||
@@ -174,6 +202,9 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
importin() {
|
||||||
|
this.dialogShow = true
|
||||||
|
},
|
||||||
buildTree(classes) {
|
buildTree(classes) {
|
||||||
classes.forEach(data => {
|
classes.forEach(data => {
|
||||||
if (data.children) {
|
if (data.children) {
|
||||||
|
|||||||
Reference in New Issue
Block a user