add:日常需求迭代
This commit is contained in:
@@ -53,7 +53,6 @@ public class LogAspect {
|
|||||||
|
|
||||||
//org.nl.ext.lk.rest org.nl.pda.pdm.rest
|
//org.nl.ext.lk.rest org.nl.pda.pdm.rest
|
||||||
@Pointcut("execution(* org.nl.*.*..rest..*.*(..)) " +
|
@Pointcut("execution(* org.nl.*.*..rest..*.*(..)) " +
|
||||||
"&& !execution(* org.nl.modules.system.rest.EsLogController.*(..)) " +
|
|
||||||
"&& !execution(* org.nl.pda.pdm.rest.PfScreenController.*(..)) ")
|
"&& !execution(* org.nl.pda.pdm.rest.PfScreenController.*(..)) ")
|
||||||
public void logPointCut() {
|
public void logPointCut() {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,10 +24,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -286,20 +283,28 @@ public class WmsToErpServiceImpl implements WmsToErpService {
|
|||||||
|
|
||||||
JSONArray ja = WQL.getWO("QERP").setDbname("dataSource1").addParamMap(whereMap).addParam("flag", "3").process().getResultJSONArray(0);
|
JSONArray ja = WQL.getWO("QERP").setDbname("dataSource1").addParamMap(whereMap).addParam("flag", "3").process().getResultJSONArray(0);
|
||||||
log.info("采购订单导入数据---------:" + ja.toString());
|
log.info("采购订单导入数据---------:" + ja.toString());
|
||||||
|
List<String> list = new ArrayList<>();
|
||||||
for (int i = 0; i < ja.size(); i++) {
|
for (int i = 0; i < ja.size(); i++) {
|
||||||
|
|
||||||
JSONObject jo2 = ja.getJSONObject(i);
|
JSONObject jo2 = ja.getJSONObject(i);
|
||||||
|
String VBILLCODE = jo2.getString("vbillcode");
|
||||||
|
if (list.contains(VBILLCODE)){
|
||||||
|
log.warn("采购相同:{}",JSON.toJSONString(jo2));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
list.add(VBILLCODE);
|
||||||
//判断该采购订单是否存在,存在的话判断状态是否为生成,生成删除再添加,其他状态不操作
|
//判断该采购订单是否存在,存在的话判断状态是否为生成,生成删除再添加,其他状态不操作
|
||||||
String PURCHASE_ID_B = jo2.getString("purchase_id_b");
|
String PURCHASE_ID_B = jo2.getString("purchase_id_b");
|
||||||
|
|
||||||
JSONObject purchase_jo = purchase_proc_wql.query("PURCHASE_ID_B = '" + PURCHASE_ID_B + "'").uniqueResult(0);
|
JSONObject purchase_jo = purchase_proc_wql.query("PURCHASE_ID_B = '" + PURCHASE_ID_B + "'").uniqueResult(0);
|
||||||
|
|
||||||
if (ObjectUtil.isNotEmpty(purchase_jo)) {
|
if (ObjectUtil.isNotEmpty(purchase_jo)) {
|
||||||
//判断是否生成了入库单
|
//判断对于已经生成出入库单/采购通知单的订单不做处理
|
||||||
JSONObject dtl = WQLObject.getWQLObject("st_ivt_iostorinvdtl").query("source_billdtl_id = '" + purchase_jo.getString("id") + "'").uniqueResult(0);
|
JSONObject dtl = WQLObject.getWQLObject("st_ivt_iostorinvdtl").query("source_billdtl_id = '" + purchase_jo.getString("id") + "'").uniqueResult(0);
|
||||||
if (purchase_jo.getString("proc_status").equals("01") && ObjectUtil.isEmpty(dtl)) {
|
JSONObject dtlTab = WQLObject.getWQLObject("pcs_rc_receivedtl").query("source_billdtl_id = '" + purchase_jo.getString("id") + "'").uniqueResult(0);
|
||||||
|
if (purchase_jo.getString("proc_status").equals("01") && ObjectUtil.isEmpty(dtl) && ObjectUtil.isEmpty(dtlTab)) {
|
||||||
//删除
|
//删除
|
||||||
purchase_wql.delete("PURCHASE_ID_B = '" + PURCHASE_ID_B + "'");
|
purchase_wql.delete("PURCHASE_ID_B = '" + PURCHASE_ID_B + "'");
|
||||||
purchase_proc_wql.delete("PURCHASE_ID_B = '" + PURCHASE_ID_B + "'");
|
purchase_proc_wql.delete("PURCHASE_ID_B = '" + PURCHASE_ID_B + "'");
|
||||||
|
log.info("order_back_up PURCHASE_ID_B:{},DATA:{}",PURCHASE_ID_B,JSON.toJSONString(purchase_jo));
|
||||||
} else {
|
} else {
|
||||||
//跳过
|
//跳过
|
||||||
continue;
|
continue;
|
||||||
@@ -311,7 +316,7 @@ public class WmsToErpServiceImpl implements WmsToErpService {
|
|||||||
String PK_DEPT = jo2.getString("pk_dept");
|
String PK_DEPT = jo2.getString("pk_dept");
|
||||||
String VEND_ID = jo2.getString("vend_id");
|
String VEND_ID = jo2.getString("vend_id");
|
||||||
String CEMPLOYEEID = jo2.getString("cemployeeid");
|
String CEMPLOYEEID = jo2.getString("cemployeeid");
|
||||||
String VBILLCODE = jo2.getString("vbillcode");
|
|
||||||
String CROWNO = jo2.getString("crowno");
|
String CROWNO = jo2.getString("crowno");
|
||||||
String CREATE_BY = jo2.getString("create_by");
|
String CREATE_BY = jo2.getString("create_by");
|
||||||
String CREATE_DATE = jo2.getString("create_date");
|
String CREATE_DATE = jo2.getString("create_date");
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Liuxy
|
* @author Liuxy
|
||||||
@@ -45,6 +46,8 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
|||||||
@Autowired
|
@Autowired
|
||||||
private WmsToErpService wmsToErpService;
|
private WmsToErpService wmsToErpService;
|
||||||
|
|
||||||
|
final ReentrantLock lock = new ReentrantLock();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||||
HashMap<String, String> map = new HashMap<>(whereJson);
|
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||||
@@ -142,6 +145,9 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void importData(Map whereJson) {
|
public void importData(Map whereJson) {
|
||||||
|
boolean b = lock.tryLock();
|
||||||
|
try {
|
||||||
|
if (b){
|
||||||
ArrayList<String> arr = (ArrayList<String>) whereJson.get("createTime");
|
ArrayList<String> arr = (ArrayList<String>) whereJson.get("createTime");
|
||||||
HashMap<String, String> map = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
if (arr != null && arr.size() != 0) {
|
if (arr != null && arr.size() != 0) {
|
||||||
@@ -153,6 +159,14 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
wmsToErpService.getPurchaseInfo(map);
|
wmsToErpService.getPurchaseInfo(map);
|
||||||
|
}else {
|
||||||
|
throw new BadRequestException("正在执行导入数据任务,请稍后再试");
|
||||||
|
}
|
||||||
|
}finally {
|
||||||
|
if(b){
|
||||||
|
lock.unlock();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ public class ReceivemstServiceImpl implements ReceivemstService {
|
|||||||
jsonMst.put("sysdeptid", deptId);
|
jsonMst.put("sysdeptid", deptId);
|
||||||
jsonMst.put("syscompanyid", deptId);
|
jsonMst.put("syscompanyid", deptId);
|
||||||
|
|
||||||
//明细
|
//明细:对应采购订单导入
|
||||||
JSONArray jsonArr = JSONArray.parseArray(JSON.toJSONString(whereJson.get("tableData")));
|
JSONArray jsonArr = JSONArray.parseArray(JSON.toJSONString(whereJson.get("tableData")));
|
||||||
for (int i = 0; i < jsonArr.size(); i++) {
|
for (int i = 0; i < jsonArr.size(); i++) {
|
||||||
JSONObject json = jsonArr.getJSONObject(i);
|
JSONObject json = jsonArr.getJSONObject(i);
|
||||||
|
|||||||
@@ -5237,7 +5237,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
for(int i=0;i<now_ivts.size();i++){
|
for(int i=0;i<now_ivts.size();i++){
|
||||||
|
|
||||||
JSONObject now_ivt = now_ivts.getJSONObject(i);
|
JSONObject now_ivt = now_ivts.getJSONObject(i);
|
||||||
//查询该物料的厂家质保书是否含有添加剂
|
//查询该物料的厂家质保书是否含有添加剂:纯粉是没有添加剂
|
||||||
JSONArray is_tjj = WQL.getWO("QPF_AUTOFORMULA01")
|
JSONArray is_tjj = WQL.getWO("QPF_AUTOFORMULA01")
|
||||||
.addParam("material_id",now_ivt.getString("material_id"))
|
.addParam("material_id",now_ivt.getString("material_id"))
|
||||||
.addParam("pcsn",now_ivt.getString("pcsn"))
|
.addParam("pcsn",now_ivt.getString("pcsn"))
|
||||||
@@ -5580,7 +5580,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
|||||||
if(C_bu>0){
|
if(C_bu>0){
|
||||||
//Wp=Wp+W补
|
//Wp=Wp+W补
|
||||||
Cp = Cp + C_bu;
|
Cp = Cp + C_bu;
|
||||||
if(true){//cw_limit_down
|
if(true){//Cp > cw_limit_down
|
||||||
//计算非碳化钨需补重量
|
//计算非碳化钨需补重量
|
||||||
double finalR3p_jian = R3p_jian;
|
double finalR3p_jian = R3p_jian;
|
||||||
bj_bomdlts_map.forEach((key, bj_bomdlt)->{
|
bj_bomdlts_map.forEach((key, bj_bomdlt)->{
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
输入.flag TYPEAS s_string
|
输入.flag TYPEAS s_string
|
||||||
输入.ext_id TYPEAS s_string
|
输入.ext_id TYPEAS s_string
|
||||||
输入.material_id TYPEAS s_string
|
输入.material_id TYPEAS s_string
|
||||||
|
输入.source_name TYPEAS s_string
|
||||||
|
输入.hide TYPEAS s_string
|
||||||
输入.pcsn TYPEAS s_string
|
输入.pcsn TYPEAS s_string
|
||||||
输入.mater_ids TYPEAS f_string
|
输入.mater_ids TYPEAS f_string
|
||||||
|
|
||||||
@@ -150,7 +152,8 @@
|
|||||||
PURCHASE.ITEM_NAME as material_name,
|
PURCHASE.ITEM_NAME as material_name,
|
||||||
PURCHASE.NAME,
|
PURCHASE.NAME,
|
||||||
PURCHASE.NORIGTAXPRICE,
|
PURCHASE.NORIGTAXPRICE,
|
||||||
PURCHASE.NORIGTAXMNY
|
PURCHASE.NORIGTAXMNY,
|
||||||
|
sum(PURCHASE.QTY_ZT)*PURCHASE.NORIGTAXPRICE as notmny
|
||||||
FROM
|
FROM
|
||||||
PURCHASE_CONTRACT_VIEW PURCHASE
|
PURCHASE_CONTRACT_VIEW PURCHASE
|
||||||
where
|
where
|
||||||
@@ -162,7 +165,16 @@
|
|||||||
OPTION 输入.mater_ids <> ""
|
OPTION 输入.mater_ids <> ""
|
||||||
PURCHASE.ITEM_ID in 输入.mater_ids
|
PURCHASE.ITEM_ID in 输入.mater_ids
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
OPTION 输入.mater_ids <> ""
|
||||||
|
PURCHASE.NAME like "%" 输入.source_name "%"
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.hide <> ""
|
||||||
|
sum(PURCHASE.QTY_ZT) > 0
|
||||||
|
ENDOPTION
|
||||||
GROUP BY PURCHASE.ITEM_ID,PURCHASE.VBILLCODE, PURCHASE.ITEM_CODE, PURCHASE.ITEM_NAME,PURCHASE.NAME,PURCHASE.NORIGTAXPRICE,PURCHASE.NORIGTAXMNY
|
GROUP BY PURCHASE.ITEM_ID,PURCHASE.VBILLCODE, PURCHASE.ITEM_CODE, PURCHASE.ITEM_NAME,PURCHASE.NAME,PURCHASE.NORIGTAXPRICE,PURCHASE.NORIGTAXMNY
|
||||||
|
OPTION 输入.hide <> ""
|
||||||
|
HAVING sum( PURCHASE.QTY_ZT ) > 0
|
||||||
|
ENDOPTION
|
||||||
ORDER BY PURCHASE.ITEM_CODE, PURCHASE.VBILLCODE
|
ORDER BY PURCHASE.ITEM_CODE, PURCHASE.VBILLCODE
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
|
|||||||
@@ -539,10 +539,12 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
|||||||
HashMap<String, String> map = new HashMap<>(whereJson);
|
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||||
|
|
||||||
String material_id = map.get("material_id");
|
String material_id = map.get("material_id");
|
||||||
|
String sourceName = map.get("source_name");
|
||||||
|
|
||||||
JSONArray ja = WQL.getWO("statistical_report_query_02")
|
JSONArray ja = WQL.getWO("statistical_report_query_02")
|
||||||
.addParam("flag", "2")
|
.addParam("flag", "2")
|
||||||
.addParam("material_id", material_id)
|
.addParam("material_id", material_id)
|
||||||
|
.addParam("source_name", sourceName)
|
||||||
.process().getResultJSONArray(0);
|
.process().getResultJSONArray(0);
|
||||||
return ja;
|
return ja;
|
||||||
}
|
}
|
||||||
@@ -552,6 +554,8 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
|||||||
HashMap<String, String> map = new HashMap<>(whereJson);
|
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||||
WQLObject mater_wql = WQLObject.getWQLObject("md_me_materialbase");
|
WQLObject mater_wql = WQLObject.getWQLObject("md_me_materialbase");
|
||||||
String material_id = map.get("material_id");
|
String material_id = map.get("material_id");
|
||||||
|
String sourceName = map.get("source_name");
|
||||||
|
String hide = map.get("hide");
|
||||||
String ext_id = "";
|
String ext_id = "";
|
||||||
if(StrUtil.isNotEmpty(material_id)){
|
if(StrUtil.isNotEmpty(material_id)){
|
||||||
JSONObject mater_jo = mater_wql.query("is_delete='0' and material_id = '" + material_id + "'").uniqueResult(0);
|
JSONObject mater_jo = mater_wql.query("is_delete='0' and material_id = '" + material_id + "'").uniqueResult(0);
|
||||||
@@ -572,6 +576,8 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
|||||||
.setDbname("dataSource1")
|
.setDbname("dataSource1")
|
||||||
.addParam("flag", "6")
|
.addParam("flag", "6")
|
||||||
.addParam("material_id", ext_id)
|
.addParam("material_id", ext_id)
|
||||||
|
.addParam("source_name", sourceName)
|
||||||
|
.addParam("hide", hide)
|
||||||
.addParam("mater_ids", allmaterialId)
|
.addParam("mater_ids", allmaterialId)
|
||||||
.process().getResultJSONArray(0);
|
.process().getResultJSONArray(0);
|
||||||
return ja;
|
return ja;
|
||||||
@@ -722,7 +728,7 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
|||||||
list.add(MapOf.ofJ("receive_code", " ","material_code"," ", "material_name"," ","pcsn"," ","receive_qty",rHalfUp,"noin_qty",nHalfUp ,"source_name"," "));
|
list.add(MapOf.ofJ("receive_code", " ","material_code"," ", "material_name"," ","pcsn"," ","receive_qty",rHalfUp,"noin_qty",nHalfUp ,"source_name"," "));
|
||||||
break;
|
break;
|
||||||
case "3":
|
case "3":
|
||||||
headers.putAll(MapOf.of("receive_code", "合同号","material_code","物料编码","material_name","物料名称","sumqty","合同重量","notqty","在途重量","norigtaxprice","含税单价","norigtaxmny","金额","name","供应商"));
|
headers.putAll(MapOf.of("receive_code", "合同号","material_code","物料编码","material_name","物料名称","sumqty","合同重量","notqty","在途重量","norigtaxprice","含税单价","norigtaxmny","金额","notmny","在途金额","name","供应商"));
|
||||||
list = query3(whereJson);
|
list = query3(whereJson);
|
||||||
// byte[] bytes = Files.readAllBytes(Paths.get("/Users/mima0000/Desktop/data.txt"));
|
// byte[] bytes = Files.readAllBytes(Paths.get("/Users/mima0000/Desktop/data.txt"));
|
||||||
// String s = new String(bytes);
|
// String s = new String(bytes);
|
||||||
@@ -733,18 +739,22 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
|||||||
String notqty = new BigDecimal(item.getDoubleValue("notqty")).setScale(2, RoundingMode.HALF_UP).toString();
|
String notqty = new BigDecimal(item.getDoubleValue("notqty")).setScale(2, RoundingMode.HALF_UP).toString();
|
||||||
String norigtaxprice = new BigDecimal(item.getDoubleValue("norigtaxprice")).setScale(2, RoundingMode.HALF_UP).toString();
|
String norigtaxprice = new BigDecimal(item.getDoubleValue("norigtaxprice")).setScale(2, RoundingMode.HALF_UP).toString();
|
||||||
String norigtaxmny = new BigDecimal(item.getDoubleValue("norigtaxmny")).setScale(2, RoundingMode.HALF_UP).toString();
|
String norigtaxmny = new BigDecimal(item.getDoubleValue("norigtaxmny")).setScale(2, RoundingMode.HALF_UP).toString();
|
||||||
|
String notmny = new BigDecimal(item.getDoubleValue("notmny")).setScale(2, RoundingMode.HALF_UP).toString();
|
||||||
item.put("sumqty",sumqty);
|
item.put("sumqty",sumqty);
|
||||||
item.put("notqty",notqty);
|
item.put("notqty",notqty);
|
||||||
item.put("norigtaxprice",norigtaxprice);
|
item.put("norigtaxprice",norigtaxprice);
|
||||||
item.put("norigtaxmny",norigtaxmny);
|
item.put("norigtaxmny",norigtaxmny);
|
||||||
|
item.put("notmny",notmny);
|
||||||
});
|
});
|
||||||
double sumqtyD = list.stream().mapToDouble(o -> ((JSONObject) o).getDouble("sumqty")).sum();
|
double sumqtyD = list.stream().mapToDouble(o -> ((JSONObject) o).getDouble("sumqty")).sum();
|
||||||
double notqtyD = list.stream().mapToDouble(o -> ((JSONObject) o).getDouble("notqty")).sum();
|
double notqtyD = list.stream().mapToDouble(o -> ((JSONObject) o).getDouble("notqty")).sum();
|
||||||
double norigtaxmnyD = list.stream().mapToDouble(o -> ((JSONObject) o).getDouble("norigtaxmny")).sum();
|
double norigtaxmnyD = list.stream().mapToDouble(o -> ((JSONObject) o).getDouble("norigtaxmny")).sum();
|
||||||
|
double notmnyD = list.stream().mapToDouble(o -> ((JSONObject) o).getDouble("notmny")).sum();
|
||||||
String sumqtySum = new BigDecimal(sumqtyD).setScale(2, RoundingMode.HALF_UP).toString();
|
String sumqtySum = new BigDecimal(sumqtyD).setScale(2, RoundingMode.HALF_UP).toString();
|
||||||
String notqtySum = new BigDecimal(notqtyD).setScale(2, RoundingMode.HALF_UP).toString();
|
String notqtySum = new BigDecimal(notqtyD).setScale(2, RoundingMode.HALF_UP).toString();
|
||||||
String norigtaxmnySum = new BigDecimal(norigtaxmnyD).setScale(2, RoundingMode.HALF_UP).toString();
|
String norigtaxmnySum = new BigDecimal(norigtaxmnyD).setScale(2, RoundingMode.HALF_UP).toString();
|
||||||
list.add(MapOf.ofJ("receive_code", " ","material_code"," ","material_name"," ","sumqty",sumqtySum,"notqty",notqtySum,"norigtaxprice"," ","norigtaxmny",norigtaxmnySum,"name"," "));
|
String notmnySum = new BigDecimal(notmnyD).setScale(2, RoundingMode.HALF_UP).toString();
|
||||||
|
list.add(MapOf.ofJ("receive_code", " ","material_code"," ","material_name"," ","sumqty",sumqtySum,"notqty",notqtySum,"norigtaxprice"," ","norigtaxmny",norigtaxmnySum,"notmny",notmnySum,"name"," "));
|
||||||
break;
|
break;
|
||||||
default: ;
|
default: ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
输入.end_date TYPEAS s_string
|
输入.end_date TYPEAS s_string
|
||||||
输入.pcsn TYPEAS s_string
|
输入.pcsn TYPEAS s_string
|
||||||
输入.material_code TYPEAS s_string
|
输入.material_code TYPEAS s_string
|
||||||
|
输入.source_name TYPEAS s_string
|
||||||
输入.storagevehicle_code TYPEAS s_string
|
输入.storagevehicle_code TYPEAS s_string
|
||||||
输入.bill_code TYPEAS s_string
|
输入.bill_code TYPEAS s_string
|
||||||
输入.io_type TYPEAS s_string
|
输入.io_type TYPEAS s_string
|
||||||
@@ -106,6 +107,9 @@
|
|||||||
OPTION 输入.material_id <> ""
|
OPTION 输入.material_id <> ""
|
||||||
dtl.material_id = 输入.material_id
|
dtl.material_id = 输入.material_id
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
OPTION 输入.source_name <> ""
|
||||||
|
mst.source_name like "%" 输入.source_name "%"
|
||||||
|
ENDOPTION
|
||||||
order by mater.material_code
|
order by mater.material_code
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
|
v-loading.fullscreen.lock="fullscreenLoading"
|
||||||
append-to-body
|
append-to-body
|
||||||
title="待检入库量"
|
title="待检入库量"
|
||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
v-loading.fullscreen.lock="fullscreenLoading"
|
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
fullscreen
|
fullscreen
|
||||||
@@ -28,7 +28,16 @@
|
|||||||
:value="item.material_id"
|
:value="item.material_id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
供应商:<el-input
|
||||||
|
v-model="queryrow.source_name"
|
||||||
|
size="mini"
|
||||||
|
style="width: 200px"
|
||||||
|
clearable
|
||||||
|
placeholder="模糊查询"
|
||||||
|
@change="MyQuery3"
|
||||||
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<span>
|
<span>
|
||||||
<!--左侧插槽-->
|
<!--左侧插槽-->
|
||||||
@@ -98,7 +107,7 @@ export default {
|
|||||||
cxjList: [],
|
cxjList: [],
|
||||||
XLList: [],
|
XLList: [],
|
||||||
fullscreenLoading: false,
|
fullscreenLoading: false,
|
||||||
queryrow: { material_id: '' },
|
queryrow: { material_id: '', source_name: '' },
|
||||||
sortable: null,
|
sortable: null,
|
||||||
rows: []
|
rows: []
|
||||||
}
|
}
|
||||||
@@ -151,6 +160,7 @@ export default {
|
|||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.queryrow.material_id = ''
|
this.queryrow.material_id = ''
|
||||||
|
this.queryrow.source_name = ''
|
||||||
this.tableDtl = []
|
this.tableDtl = []
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
},
|
},
|
||||||
@@ -164,6 +174,16 @@ export default {
|
|||||||
this.fullscreenLoading = false
|
this.fullscreenLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
MyQuery3(value) {
|
||||||
|
this.queryrow.source_name = value
|
||||||
|
this.fullscreenLoading = true
|
||||||
|
report.query2(this.queryrow).then(res => {
|
||||||
|
this.tableDtl = res
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
getSummaries(param) {
|
getSummaries(param) {
|
||||||
const { columns, data } = param
|
const { columns, data } = param
|
||||||
const sums = []
|
const sums = []
|
||||||
|
|||||||
@@ -28,6 +28,19 @@
|
|||||||
:value="item.material_id"
|
:value="item.material_id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
供应商:<el-input
|
||||||
|
v-model="queryrow.source_name"
|
||||||
|
size="mini"
|
||||||
|
style="width: 200px"
|
||||||
|
clearable
|
||||||
|
placeholder="模糊查询"
|
||||||
|
@change="MyQuery3"
|
||||||
|
/>
|
||||||
|
<el-checkbox
|
||||||
|
v-model="queryrow.hide"
|
||||||
|
style="color: red"
|
||||||
|
@change="MyQuery4"
|
||||||
|
>隐藏在途重量为零</el-checkbox>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<span>
|
<span>
|
||||||
@@ -67,6 +80,7 @@
|
|||||||
<el-table-column prop="notqty" label="在途重量" min-width="100" :formatter="crud.formatNum2" />
|
<el-table-column prop="notqty" label="在途重量" min-width="100" :formatter="crud.formatNum2" />
|
||||||
<el-table-column prop="norigtaxprice" label="含税单价" min-width="100" :formatter="crud.formatNum2" />
|
<el-table-column prop="norigtaxprice" label="含税单价" min-width="100" :formatter="crud.formatNum2" />
|
||||||
<el-table-column prop="norigtaxmny" label="金额" min-width="100" :formatter="crud.formatNum2" />
|
<el-table-column prop="norigtaxmny" label="金额" min-width="100" :formatter="crud.formatNum2" />
|
||||||
|
<el-table-column prop="notmny" label="在途金额" min-width="100" :formatter="crud.formatNum2" />
|
||||||
<el-table-column prop="name" label="供应商" min-width="150" />
|
<el-table-column prop="name" label="供应商" min-width="150" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -99,7 +113,7 @@ export default {
|
|||||||
cxjList: [],
|
cxjList: [],
|
||||||
XLList: [],
|
XLList: [],
|
||||||
fullscreenLoading: false,
|
fullscreenLoading: false,
|
||||||
queryrow: { material_id: '' },
|
queryrow: { material_id: '', source_name: '', hide: true },
|
||||||
sortable: null,
|
sortable: null,
|
||||||
rows: []
|
rows: []
|
||||||
}
|
}
|
||||||
@@ -152,6 +166,8 @@ export default {
|
|||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.queryrow.material_id = ''
|
this.queryrow.material_id = ''
|
||||||
|
this.queryrow.source_name = ''
|
||||||
|
this.queryrow.hide = true
|
||||||
this.tableDtl = []
|
this.tableDtl = []
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
},
|
},
|
||||||
@@ -165,6 +181,26 @@ export default {
|
|||||||
this.fullscreenLoading = false
|
this.fullscreenLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
MyQuery3(value) {
|
||||||
|
this.queryrow.source_name = value
|
||||||
|
this.fullscreenLoading = true
|
||||||
|
report.query3(this.queryrow).then(res => {
|
||||||
|
this.tableDtl = res
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
MyQuery4(value) {
|
||||||
|
this.queryrow.hide = value
|
||||||
|
this.fullscreenLoading = true
|
||||||
|
report.query3(this.queryrow).then(res => {
|
||||||
|
this.tableDtl = res
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.fullscreenLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
getSummaries(param) {
|
getSummaries(param) {
|
||||||
const { columns, data } = param
|
const { columns, data } = param
|
||||||
const sums = []
|
const sums = []
|
||||||
@@ -212,6 +248,18 @@ export default {
|
|||||||
sums[index] = parseFloat(total).toFixed(3)
|
sums[index] = parseFloat(total).toFixed(3)
|
||||||
sums[index]
|
sums[index]
|
||||||
}
|
}
|
||||||
|
if (column.property === 'notmny') {
|
||||||
|
const total = values.reduce((prev, curr) => {
|
||||||
|
const value = Number(curr)
|
||||||
|
if (!isNaN(value)) {
|
||||||
|
return prev + curr
|
||||||
|
} else {
|
||||||
|
return prev
|
||||||
|
}
|
||||||
|
}, 0)
|
||||||
|
sums[index] = parseFloat(total).toFixed(3)
|
||||||
|
sums[index]
|
||||||
|
}
|
||||||
})
|
})
|
||||||
return sums
|
return sums
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -69,7 +69,9 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</template>
|
</template>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<div ref="topScroll" class="top-scroll" @scroll="handleScrollTop">
|
||||||
|
<div class="top-scroll-content" :style="{ width: topScrollWidth }" />
|
||||||
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
ref="dtl_table"
|
ref="dtl_table"
|
||||||
v-loading="crud.loading"
|
v-loading="crud.loading"
|
||||||
@@ -94,13 +96,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style>
|
<style>
|
||||||
|
/*顶部滚动条*/
|
||||||
|
.top-scroll {
|
||||||
|
overflow-x: auto;
|
||||||
|
overflow-y: hidden;
|
||||||
|
}
|
||||||
|
.top-scroll .top-scroll-content {
|
||||||
|
background-color: #fff;
|
||||||
|
height: 15px;
|
||||||
|
}
|
||||||
.el-table .warning-row {
|
.el-table .warning-row {
|
||||||
background: oldlace;
|
background: oldlace;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-table .success-row {
|
.el-table .success-row {
|
||||||
background: #f0f9eb;
|
background: #f0f9eb;
|
||||||
}
|
}
|
||||||
|
.el-table__body-wrapper {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import report from '@/api/wms/statistics/report'
|
import report from '@/api/wms/statistics/report'
|
||||||
@@ -140,6 +153,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
topScrollWidth: 10,
|
||||||
cols: [],
|
cols: [],
|
||||||
cols2: [],
|
cols2: [],
|
||||||
dtlList: [],
|
dtlList: [],
|
||||||
@@ -163,6 +177,12 @@ export default {
|
|||||||
this.crud.query.createTime = [new Date(), new Date().daysLater(30)]
|
this.crud.query.createTime = [new Date(), new Date().daysLater(30)]
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleScrollTop() {
|
||||||
|
if (this.$refs.topScroll) {
|
||||||
|
var scrollLeft = this.$refs.topScroll.scrollLeft
|
||||||
|
this.$refs.dtl_table.bodyWrapper.scrollTo(scrollLeft, 0)
|
||||||
|
}
|
||||||
|
},
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
report.getHeader().then(res => {
|
report.getHeader().then(res => {
|
||||||
@@ -179,6 +199,12 @@ export default {
|
|||||||
const data = this.crud.query
|
const data = this.crud.query
|
||||||
report.materPlanDtlQuery(data).then(res => {
|
report.materPlanDtlQuery(data).then(res => {
|
||||||
this.dtlList = res.content
|
this.dtlList = res.content
|
||||||
|
this.topScrollWidth = this.$refs.dtl_table.bodyWrapper.scrollWidth + 'px'
|
||||||
|
this.tableDom = this.$refs.dtl_table.bodyWrapper
|
||||||
|
this.tableDom.addEventListener('scroll', () => {
|
||||||
|
var scrollLeft = this.tableDom.scrollLeft
|
||||||
|
this.$refs.topScroll.scrollTo(scrollLeft, 0)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
crudInspectionsheetmst.getStatus().then(res => {
|
crudInspectionsheetmst.getStatus().then(res => {
|
||||||
this.statusList = res
|
this.statusList = res
|
||||||
|
|||||||
Reference in New Issue
Block a user