add:日常需求迭代
This commit is contained in:
@@ -53,7 +53,6 @@ public class LogAspect {
|
||||
|
||||
//org.nl.ext.lk.rest org.nl.pda.pdm.rest
|
||||
@Pointcut("execution(* org.nl.*.*..rest..*.*(..)) " +
|
||||
"&& !execution(* org.nl.modules.system.rest.EsLogController.*(..)) " +
|
||||
"&& !execution(* org.nl.pda.pdm.rest.PfScreenController.*(..)) ")
|
||||
public void logPointCut() {
|
||||
}
|
||||
|
||||
@@ -24,10 +24,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
@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);
|
||||
log.info("采购订单导入数据---------:" + ja.toString());
|
||||
List<String> list = new ArrayList<>();
|
||||
for (int i = 0; i < ja.size(); 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");
|
||||
|
||||
JSONObject purchase_jo = purchase_proc_wql.query("PURCHASE_ID_B = '" + PURCHASE_ID_B + "'").uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(purchase_jo)) {
|
||||
//判断是否生成了入库单
|
||||
//判断对于已经生成出入库单/采购通知单的订单不做处理
|
||||
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_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 {
|
||||
//跳过
|
||||
continue;
|
||||
@@ -311,7 +316,7 @@ public class WmsToErpServiceImpl implements WmsToErpService {
|
||||
String PK_DEPT = jo2.getString("pk_dept");
|
||||
String VEND_ID = jo2.getString("vend_id");
|
||||
String CEMPLOYEEID = jo2.getString("cemployeeid");
|
||||
String VBILLCODE = jo2.getString("vbillcode");
|
||||
|
||||
String CROWNO = jo2.getString("crowno");
|
||||
String CREATE_BY = jo2.getString("create_by");
|
||||
String CREATE_DATE = jo2.getString("create_date");
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
/**
|
||||
* @author Liuxy
|
||||
@@ -45,6 +46,8 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
||||
@Autowired
|
||||
private WmsToErpService wmsToErpService;
|
||||
|
||||
final ReentrantLock lock = new ReentrantLock();
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||
@@ -142,17 +145,28 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void importData(Map whereJson) {
|
||||
ArrayList<String> arr = (ArrayList<String>) whereJson.get("createTime");
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
if (arr != null && arr.size() != 0) {
|
||||
if (StrUtil.isNotEmpty(arr.get(0))) {
|
||||
map.put("begin_time", arr.get(0));
|
||||
boolean b = lock.tryLock();
|
||||
try {
|
||||
if (b){
|
||||
ArrayList<String> arr = (ArrayList<String>) whereJson.get("createTime");
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
if (arr != null && arr.size() != 0) {
|
||||
if (StrUtil.isNotEmpty(arr.get(0))) {
|
||||
map.put("begin_time", arr.get(0));
|
||||
}
|
||||
if (StrUtil.isNotEmpty(arr.get(1))) {
|
||||
map.put("end_time", arr.get(1));
|
||||
}
|
||||
}
|
||||
wmsToErpService.getPurchaseInfo(map);
|
||||
}else {
|
||||
throw new BadRequestException("正在执行导入数据任务,请稍后再试");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(arr.get(1))) {
|
||||
map.put("end_time", arr.get(1));
|
||||
}finally {
|
||||
if(b){
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
wmsToErpService.getPurchaseInfo(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -169,7 +169,7 @@ public class ReceivemstServiceImpl implements ReceivemstService {
|
||||
jsonMst.put("sysdeptid", deptId);
|
||||
jsonMst.put("syscompanyid", deptId);
|
||||
|
||||
//明细
|
||||
//明细:对应采购订单导入
|
||||
JSONArray jsonArr = JSONArray.parseArray(JSON.toJSONString(whereJson.get("tableData")));
|
||||
for (int i = 0; i < jsonArr.size(); i++) {
|
||||
JSONObject json = jsonArr.getJSONObject(i);
|
||||
|
||||
@@ -5237,7 +5237,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
for(int i=0;i<now_ivts.size();i++){
|
||||
|
||||
JSONObject now_ivt = now_ivts.getJSONObject(i);
|
||||
//查询该物料的厂家质保书是否含有添加剂
|
||||
//查询该物料的厂家质保书是否含有添加剂:纯粉是没有添加剂
|
||||
JSONArray is_tjj = WQL.getWO("QPF_AUTOFORMULA01")
|
||||
.addParam("material_id",now_ivt.getString("material_id"))
|
||||
.addParam("pcsn",now_ivt.getString("pcsn"))
|
||||
@@ -5580,7 +5580,7 @@ public class AutoformulaServiceImpl implements AutoformulaService {
|
||||
if(C_bu>0){
|
||||
//Wp=Wp+W补
|
||||
Cp = Cp + C_bu;
|
||||
if(true){//cw_limit_down
|
||||
if(true){//Cp > cw_limit_down
|
||||
//计算非碳化钨需补重量
|
||||
double finalR3p_jian = R3p_jian;
|
||||
bj_bomdlts_map.forEach((key, bj_bomdlt)->{
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
输入.flag TYPEAS s_string
|
||||
输入.ext_id TYPEAS s_string
|
||||
输入.material_id TYPEAS s_string
|
||||
输入.source_name TYPEAS s_string
|
||||
输入.hide TYPEAS s_string
|
||||
输入.pcsn TYPEAS s_string
|
||||
输入.mater_ids TYPEAS f_string
|
||||
|
||||
@@ -150,7 +152,8 @@
|
||||
PURCHASE.ITEM_NAME as material_name,
|
||||
PURCHASE.NAME,
|
||||
PURCHASE.NORIGTAXPRICE,
|
||||
PURCHASE.NORIGTAXMNY
|
||||
PURCHASE.NORIGTAXMNY,
|
||||
sum(PURCHASE.QTY_ZT)*PURCHASE.NORIGTAXPRICE as notmny
|
||||
FROM
|
||||
PURCHASE_CONTRACT_VIEW PURCHASE
|
||||
where
|
||||
@@ -162,7 +165,16 @@
|
||||
OPTION 输入.mater_ids <> ""
|
||||
PURCHASE.ITEM_ID in 输入.mater_ids
|
||||
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
|
||||
OPTION 输入.hide <> ""
|
||||
HAVING sum( PURCHASE.QTY_ZT ) > 0
|
||||
ENDOPTION
|
||||
ORDER BY PURCHASE.ITEM_CODE, PURCHASE.VBILLCODE
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
|
||||
@@ -539,10 +539,12 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
||||
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||
|
||||
String material_id = map.get("material_id");
|
||||
String sourceName = map.get("source_name");
|
||||
|
||||
JSONArray ja = WQL.getWO("statistical_report_query_02")
|
||||
.addParam("flag", "2")
|
||||
.addParam("material_id", material_id)
|
||||
.addParam("source_name", sourceName)
|
||||
.process().getResultJSONArray(0);
|
||||
return ja;
|
||||
}
|
||||
@@ -552,6 +554,8 @@ public class StatisticalReportServiceImpl implements StatisticalReportService {
|
||||
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||
WQLObject mater_wql = WQLObject.getWQLObject("md_me_materialbase");
|
||||
String material_id = map.get("material_id");
|
||||
String sourceName = map.get("source_name");
|
||||
String hide = map.get("hide");
|
||||
String ext_id = "";
|
||||
if(StrUtil.isNotEmpty(material_id)){
|
||||
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")
|
||||
.addParam("flag", "6")
|
||||
.addParam("material_id", ext_id)
|
||||
.addParam("source_name", sourceName)
|
||||
.addParam("hide", hide)
|
||||
.addParam("mater_ids", allmaterialId)
|
||||
.process().getResultJSONArray(0);
|
||||
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"," "));
|
||||
break;
|
||||
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);
|
||||
// byte[] bytes = Files.readAllBytes(Paths.get("/Users/mima0000/Desktop/data.txt"));
|
||||
// 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 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 notmny = new BigDecimal(item.getDoubleValue("notmny")).setScale(2, RoundingMode.HALF_UP).toString();
|
||||
item.put("sumqty",sumqty);
|
||||
item.put("notqty",notqty);
|
||||
item.put("norigtaxprice",norigtaxprice);
|
||||
item.put("norigtaxmny",norigtaxmny);
|
||||
item.put("notmny",notmny);
|
||||
});
|
||||
double sumqtyD = list.stream().mapToDouble(o -> ((JSONObject) o).getDouble("sumqty")).sum();
|
||||
double notqtyD = list.stream().mapToDouble(o -> ((JSONObject) o).getDouble("notqty")).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 notqtySum = new BigDecimal(notqtyD).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;
|
||||
default: ;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
输入.end_date TYPEAS s_string
|
||||
输入.pcsn TYPEAS s_string
|
||||
输入.material_code TYPEAS s_string
|
||||
输入.source_name TYPEAS s_string
|
||||
输入.storagevehicle_code TYPEAS s_string
|
||||
输入.bill_code TYPEAS s_string
|
||||
输入.io_type TYPEAS s_string
|
||||
@@ -106,6 +107,9 @@
|
||||
OPTION 输入.material_id <> ""
|
||||
dtl.material_id = 输入.material_id
|
||||
ENDOPTION
|
||||
OPTION 输入.source_name <> ""
|
||||
mst.source_name like "%" 输入.source_name "%"
|
||||
ENDOPTION
|
||||
order by mater.material_code
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
append-to-body
|
||||
title="待检入库量"
|
||||
:visible.sync="dialogVisible"
|
||||
v-loading.fullscreen.lock="fullscreenLoading"
|
||||
destroy-on-close
|
||||
:show-close="false"
|
||||
fullscreen
|
||||
@@ -13,39 +13,48 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="20" style="border: 1px solid white">
|
||||
物料:<el-select
|
||||
v-model="queryrow.material_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择物料"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
@change="MyQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in XLList"
|
||||
:key="item.material_id"
|
||||
:label="item.material_name"
|
||||
:value="item.material_id"
|
||||
/>
|
||||
v-model="queryrow.material_id"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择物料"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
@change="MyQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in XLList"
|
||||
:key="item.material_id"
|
||||
:label="item.material_name"
|
||||
:value="item.material_id"
|
||||
/>
|
||||
</el-select>
|
||||
供应商:<el-input
|
||||
v-model="queryrow.source_name"
|
||||
size="mini"
|
||||
style="width: 200px"
|
||||
clearable
|
||||
placeholder="模糊查询"
|
||||
@change="MyQuery3"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button slot="left" type="success" @click="MyQuery2">查询</el-button>
|
||||
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
size="mini"
|
||||
@click="downExcel"
|
||||
>
|
||||
</el-row>
|
||||
<el-col :span="4">
|
||||
<span>
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button slot="left" type="success" @click="MyQuery2">查询</el-button>
|
||||
<el-button slot="left" type="info" @click="dialogVisible = false">关闭</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
size="mini"
|
||||
@click="downExcel"
|
||||
>
|
||||
导出Excel
|
||||
</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
@@ -66,7 +75,7 @@
|
||||
<el-table-column prop="pcsn" label="批次" min-width="100" />
|
||||
<el-table-column prop="receive_qty" label="订单重量" min-width="100" :formatter="crud.formatNum2" />
|
||||
<el-table-column prop="noin_qty" label="剩余重量" min-width="100" :formatter="crud.formatNum2" />
|
||||
<el-table-column prop="source_name" label="供应商" min-width="100" />
|
||||
<el-table-column prop="source_name" label="供应商" min-width="100" />
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@@ -98,7 +107,7 @@ export default {
|
||||
cxjList: [],
|
||||
XLList: [],
|
||||
fullscreenLoading: false,
|
||||
queryrow: { material_id: '' },
|
||||
queryrow: { material_id: '', source_name: '' },
|
||||
sortable: null,
|
||||
rows: []
|
||||
}
|
||||
@@ -151,6 +160,7 @@ export default {
|
||||
},
|
||||
close() {
|
||||
this.queryrow.material_id = ''
|
||||
this.queryrow.source_name = ''
|
||||
this.tableDtl = []
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
@@ -164,6 +174,16 @@ export default {
|
||||
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) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
|
||||
@@ -28,6 +28,19 @@
|
||||
:value="item.material_id"
|
||||
/>
|
||||
</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 :span="4">
|
||||
<span>
|
||||
@@ -42,8 +55,8 @@
|
||||
size="mini"
|
||||
@click="downExcel"
|
||||
>
|
||||
导出Excel
|
||||
</el-button>
|
||||
导出Excel
|
||||
</el-button>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -67,6 +80,7 @@
|
||||
<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="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>
|
||||
</el-dialog>
|
||||
@@ -99,7 +113,7 @@ export default {
|
||||
cxjList: [],
|
||||
XLList: [],
|
||||
fullscreenLoading: false,
|
||||
queryrow: { material_id: '' },
|
||||
queryrow: { material_id: '', source_name: '', hide: true },
|
||||
sortable: null,
|
||||
rows: []
|
||||
}
|
||||
@@ -152,6 +166,8 @@ export default {
|
||||
},
|
||||
close() {
|
||||
this.queryrow.material_id = ''
|
||||
this.queryrow.source_name = ''
|
||||
this.queryrow.hide = true
|
||||
this.tableDtl = []
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
@@ -165,6 +181,26 @@ export default {
|
||||
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) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
@@ -212,6 +248,18 @@ export default {
|
||||
sums[index] = parseFloat(total).toFixed(3)
|
||||
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
|
||||
},
|
||||
|
||||
@@ -12,16 +12,16 @@
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="统计日期">
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@input="onInput()"
|
||||
@change="mytoQuery"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.createTime"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
:default-time="['00:00:00', '23:59:59']"
|
||||
@input="onInput()"
|
||||
@change="mytoQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属组织">
|
||||
<el-select
|
||||
@@ -69,7 +69,9 @@
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
|
||||
<div ref="topScroll" class="top-scroll" @scroll="handleScrollTop">
|
||||
<div class="top-scroll-content" :style="{ width: topScrollWidth }" />
|
||||
</div>
|
||||
<el-table
|
||||
ref="dtl_table"
|
||||
v-loading="crud.loading"
|
||||
@@ -94,13 +96,24 @@
|
||||
</div>
|
||||
</template>
|
||||
<style>
|
||||
/*顶部滚动条*/
|
||||
.top-scroll {
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.top-scroll .top-scroll-content {
|
||||
background-color: #fff;
|
||||
height: 15px;
|
||||
}
|
||||
.el-table .warning-row {
|
||||
background: oldlace;
|
||||
}
|
||||
|
||||
.el-table .success-row {
|
||||
background: #f0f9eb;
|
||||
}
|
||||
.el-table__body-wrapper {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import report from '@/api/wms/statistics/report'
|
||||
@@ -140,6 +153,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
topScrollWidth: 10,
|
||||
cols: [],
|
||||
cols2: [],
|
||||
dtlList: [],
|
||||
@@ -163,6 +177,12 @@ export default {
|
||||
this.crud.query.createTime = [new Date(), new Date().daysLater(30)]
|
||||
},
|
||||
methods: {
|
||||
handleScrollTop() {
|
||||
if (this.$refs.topScroll) {
|
||||
var scrollLeft = this.$refs.topScroll.scrollLeft
|
||||
this.$refs.dtl_table.bodyWrapper.scrollTo(scrollLeft, 0)
|
||||
}
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
report.getHeader().then(res => {
|
||||
@@ -179,6 +199,12 @@ export default {
|
||||
const data = this.crud.query
|
||||
report.materPlanDtlQuery(data).then(res => {
|
||||
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 => {
|
||||
this.statusList = res
|
||||
|
||||
Reference in New Issue
Block a user