opt:add:新增手持软废直接出库功能;rev:1.合同台账优化2.厂家质保书优化
This commit is contained in:
@@ -492,7 +492,7 @@ public class HandPFOutIvtServiceImpl implements HandPFOutIvtService {
|
|||||||
String point_code = jsonObject.get("point_code");
|
String point_code = jsonObject.get("point_code");
|
||||||
String storagevehicle_code = jsonObject.get("storagevehicle_code");
|
String storagevehicle_code = jsonObject.get("storagevehicle_code");
|
||||||
// 手工出库
|
// 手工出库
|
||||||
String bill_type= "010601";
|
String bill_type= "010302";
|
||||||
|
|
||||||
JSONObject vehicleObj = WQLObject.getWQLObject("MD_PB_StorageVehicleInfo").query("storagevehicle_code='" + storagevehicle_code + "'").uniqueResult(0);
|
JSONObject vehicleObj = WQLObject.getWQLObject("MD_PB_StorageVehicleInfo").query("storagevehicle_code='" + storagevehicle_code + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(vehicleObj)) {
|
if (ObjectUtil.isEmpty(vehicleObj)) {
|
||||||
|
|||||||
@@ -16,9 +16,13 @@ import org.springframework.security.access.prepost.PreAuthorize;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Liuxy
|
* @author Liuxy
|
||||||
* @date 2021-12-15
|
* @date 2021-12-15
|
||||||
@@ -122,4 +126,11 @@ public class PcsIfPurchaseorderprocController {
|
|||||||
public ResponseEntity<Object> receiveQuery(@RequestParam Map whereJson, Pageable page){
|
public ResponseEntity<Object> receiveQuery(@RequestParam Map whereJson, Pageable page){
|
||||||
return new ResponseEntity<>(pcsIfPurchaseorderprocService.receiveQuery(whereJson,page),HttpStatus.OK);
|
return new ResponseEntity<>(pcsIfPurchaseorderprocService.receiveQuery(whereJson,page),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping(value = "/download")
|
||||||
|
@Log("导出合同台账")
|
||||||
|
@ApiOperation("导出合同台账")
|
||||||
|
public void download(HttpServletResponse response, @RequestParam Map whereJson) throws IOException {
|
||||||
|
pcsIfPurchaseorderprocService.download(pcsIfPurchaseorderprocService.ledgerQueryDownloadQuery(whereJson), response);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,4 +106,18 @@ public interface PcsIfPurchaseorderprocService {
|
|||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
*/
|
*/
|
||||||
void saveRemark(JSONObject whereJson);
|
void saveRemark(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同台账导出查询
|
||||||
|
* @param whereJson 、
|
||||||
|
* @return 、
|
||||||
|
*/
|
||||||
|
List<JSONObject> ledgerQueryDownloadQuery(Map whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同台账
|
||||||
|
* @param ledgerQueryDownloadQuery 、
|
||||||
|
* @param response 、
|
||||||
|
*/
|
||||||
|
void download(List<JSONObject> ledgerQueryDownloadQuery, HttpServletResponse response) throws IOException;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.exception.BadRequestException;
|
import org.nl.exception.BadRequestException;
|
||||||
import org.nl.ext.erp.service.WmsToErpService;
|
import org.nl.ext.erp.service.WmsToErpService;
|
||||||
|
import org.nl.utils.FileUtil;
|
||||||
import org.nl.utils.PageUtil;
|
import org.nl.utils.PageUtil;
|
||||||
import org.nl.utils.SecurityUtils;
|
import org.nl.utils.SecurityUtils;
|
||||||
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
|
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
|
||||||
@@ -30,6 +31,9 @@ import org.springframework.data.domain.Pageable;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.locks.ReentrantLock;
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
@@ -418,8 +422,14 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
|||||||
erp.put("norigtaxmny", erp.getString("norigtaxmny"));
|
erp.put("norigtaxmny", erp.getString("norigtaxmny"));
|
||||||
// 未到货重量
|
// 未到货重量
|
||||||
erp.put("qty_zt", erp.getString("qty_zt"));
|
erp.put("qty_zt", erp.getString("qty_zt"));
|
||||||
// 处理状态: 合同未到货重量 = 0则为【完成】;合同未到货重量 <> 0则为【采购中】
|
// 处理状态: 合同未到货重量 = 0则为【完成】; 合同未到货重量 = 合同重量则为【生成】;否则为【采购中】
|
||||||
erp.put("proc_status", erp.getString("qty_zt").equals("0") ? "完成" : "采购中");
|
if (erp.getString("qty_zt").equals("0")) {
|
||||||
|
erp.put("proc_status","完成");
|
||||||
|
} else if (erp.getDoubleValue("qty_zt") == erp.getDoubleValue("qty_ht")) {
|
||||||
|
erp.put("proc_status","生成");
|
||||||
|
} else {
|
||||||
|
erp.put("proc_status","在途");
|
||||||
|
}
|
||||||
|
|
||||||
// 账龄:取供应商【honour_days】字段
|
// 账龄:取供应商【honour_days】字段
|
||||||
JSONObject jsonSupp = suppList.stream()
|
JSONObject jsonSupp = suppList.stream()
|
||||||
@@ -447,6 +457,13 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
|||||||
resultList.add(erp);
|
resultList.add(erp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 判断是否有处理状态查询条件
|
||||||
|
if (ObjectUtil.isNotEmpty(MapUtil.getStr(whereJson, "proc_status"))) {
|
||||||
|
resultList = resultList.stream()
|
||||||
|
.filter(row -> row.getString("proc_status").equals(MapUtil.getStr(whereJson, "proc_status")))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
// 根据签订时间排序(倒序)
|
// 根据签订时间排序(倒序)
|
||||||
resultList = resultList.stream()
|
resultList = resultList.stream()
|
||||||
.sorted(Comparator.comparing(row -> row.getString("subscribedate"),Comparator.reverseOrder()))
|
.sorted(Comparator.comparing(row -> row.getString("subscribedate"),Comparator.reverseOrder()))
|
||||||
@@ -457,7 +474,62 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
|||||||
PageUtil.toPage(page.getPageNumber(), page.getPageSize(), resultList),
|
PageUtil.toPage(page.getPageNumber(), page.getPageSize(), resultList),
|
||||||
resultList.size()
|
resultList.size()
|
||||||
);
|
);
|
||||||
return json;
|
|
||||||
|
return calculateTotal(json,resultList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同台账计算合计
|
||||||
|
* @param json 分页数据
|
||||||
|
* @param resultList 全部数据集合
|
||||||
|
*/
|
||||||
|
private Map<String, Object> calculateTotal(Map<String, Object> json, List<JSONObject> resultList) {
|
||||||
|
// 格式化
|
||||||
|
List<JSONObject> content = JSON.parseArray(json.get("content").toString(), JSONObject.class);
|
||||||
|
|
||||||
|
// 计算合同重量
|
||||||
|
double qty_ht = resultList.stream()
|
||||||
|
.map(row -> NumberUtil.round(row.getDoubleValue("qty_ht"), 3))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||||
|
.doubleValue();
|
||||||
|
// 计算合同金额
|
||||||
|
double norigtaxmny = resultList.stream()
|
||||||
|
.map(row -> NumberUtil.round(row.getDoubleValue("norigtaxmny"), 3))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||||
|
.doubleValue();
|
||||||
|
// 计算合同未到货重量
|
||||||
|
double qty_zt = resultList.stream()
|
||||||
|
.map(row -> NumberUtil.round(row.getDoubleValue("qty_zt"), 3))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||||
|
.doubleValue();
|
||||||
|
// 计算账龄
|
||||||
|
double honour_days = resultList.stream()
|
||||||
|
.map(row -> NumberUtil.round(row.getDoubleValue("honour_days"), 3))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||||
|
.doubleValue();
|
||||||
|
// 合计重量
|
||||||
|
double allqty = resultList.stream()
|
||||||
|
.map(row -> NumberUtil.round(row.getDoubleValue("allqty"), 3))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||||
|
.doubleValue();
|
||||||
|
// 合计金额
|
||||||
|
double all_valmoney = resultList.stream()
|
||||||
|
.map(row -> NumberUtil.round(row.getDoubleValue("all_valmoney"), 3))
|
||||||
|
.reduce(BigDecimal.ZERO, BigDecimal::add)
|
||||||
|
.doubleValue();
|
||||||
|
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("subscribedate", "合计");
|
||||||
|
param.put("qty_ht", qty_ht);
|
||||||
|
param.put("norigtaxmny", norigtaxmny);
|
||||||
|
param.put("qty_zt", qty_zt);
|
||||||
|
param.put("honour_days", honour_days);
|
||||||
|
param.put("allqty", allqty);
|
||||||
|
param.put("all_valmoney", all_valmoney);
|
||||||
|
content.add(param);
|
||||||
|
|
||||||
|
json.put("content",content);
|
||||||
|
return json ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -486,6 +558,149 @@ public class PcsIfPurchaseorderprocServiceImpl implements PcsIfPurchaseorderproc
|
|||||||
tab.update(jsonObject);
|
tab.update(jsonObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<JSONObject> ledgerQueryDownloadQuery(Map whereJson) {
|
||||||
|
// 供应商表
|
||||||
|
WQLObject suppTab = WQLObject.getWQLObject("md_cs_supplierbase");
|
||||||
|
// 采购订单接口处理表
|
||||||
|
WQLObject procTab = WQLObject.getWQLObject("pcs_if_purchaseorderproc");
|
||||||
|
|
||||||
|
String material_code = MapUtil.getStr(whereJson, "material_code");
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("flag", "88");
|
||||||
|
map.put("begin_time", MapUtil.getStr(whereJson, "begin_time"));
|
||||||
|
map.put("end_time", MapUtil.getStr(whereJson, "end_time"));
|
||||||
|
map.put("iszero", MapUtil.getStr(whereJson, "iszero"));
|
||||||
|
|
||||||
|
if (!ObjectUtil.isEmpty(material_code)) {
|
||||||
|
//处理转义字符
|
||||||
|
if (material_code.contains("\\")) {
|
||||||
|
material_code = material_code.replace("\\", "\\\\\\");
|
||||||
|
}
|
||||||
|
map.put("material_code", "%" + material_code + "%");
|
||||||
|
}
|
||||||
|
String contract_no = MapUtil.getStr(whereJson, "contract_no");
|
||||||
|
String supp_name = MapUtil.getStr(whereJson, "supp_name");
|
||||||
|
if (!ObjectUtil.isEmpty(contract_no)) {
|
||||||
|
map.put("contract_no", "%" + contract_no + "%");
|
||||||
|
}
|
||||||
|
if (!ObjectUtil.isEmpty(supp_name)) {
|
||||||
|
map.put("supp_name", "%" + supp_name + "%");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询erp合同信息
|
||||||
|
List<JSONObject> erpList = WQL.getWO("QERP").setDbname("dataSource1").addParamMap(map).process().getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||||
|
// 查询所有供应商
|
||||||
|
List<JSONObject> suppList = suppTab.query("is_used = '1' and is_delete = '0'")
|
||||||
|
.getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||||
|
// 根据合同编码找所有采购订单
|
||||||
|
String vbillcode_in = erpList.stream()
|
||||||
|
.map(row -> row.getString("vbillcode"))
|
||||||
|
.collect(Collectors.joining("','"));
|
||||||
|
List<JSONObject> procList = procTab.query("contract_no IN ('" + vbillcode_in + "') AND dr = '0'")
|
||||||
|
.getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||||
|
// 根据采购订单id查询所有有效的到货通知单明细
|
||||||
|
String proc_id_in = procList.stream()
|
||||||
|
.map(row -> row.getString("id"))
|
||||||
|
.collect(Collectors.joining("','"));
|
||||||
|
List<JSONObject> dtlList = WQL.getWO("QPCS_IF_PURCHASEORDERPROC02").addParam("flag", "14").addParam("proc_id", "('" + proc_id_in + "')")
|
||||||
|
.process().getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||||
|
|
||||||
|
// 处理erp返回数据
|
||||||
|
List<JSONObject> resultList = new ArrayList<>();
|
||||||
|
for (JSONObject erp : erpList) {
|
||||||
|
// 签订时间
|
||||||
|
erp.put("subscribedate", erp.getString("subscribedate"));
|
||||||
|
// 合同编码
|
||||||
|
erp.put("contract_no", erp.getString("vbillcode"));
|
||||||
|
// 供应商
|
||||||
|
erp.put("supp_name", erp.getString("name"));
|
||||||
|
// 物料编码
|
||||||
|
erp.put("material_code", erp.getString("item_code"));
|
||||||
|
// 物料名称
|
||||||
|
erp.put("material_name", erp.getString("item_name"));
|
||||||
|
// 单价含税
|
||||||
|
erp.put("price_tax", erp.getString("norigtaxprice"));
|
||||||
|
// 合同重量
|
||||||
|
erp.put("qty_ht", erp.getString("qty_ht"));
|
||||||
|
// 合同金额
|
||||||
|
erp.put("norigtaxmny", erp.getString("norigtaxmny"));
|
||||||
|
// 未到货重量
|
||||||
|
erp.put("qty_zt", erp.getString("qty_zt"));
|
||||||
|
// 处理状态: 合同未到货重量 = 0则为【完成】; 合同未到货重量 = 合同重量则为【生成】;否则为【采购中】
|
||||||
|
if (erp.getString("qty_zt").equals("0")) {
|
||||||
|
erp.put("proc_status","完成");
|
||||||
|
} else if (erp.getDoubleValue("qty_zt") == erp.getDoubleValue("qty_ht")) {
|
||||||
|
erp.put("proc_status","生成");
|
||||||
|
} else {
|
||||||
|
erp.put("proc_status","采购中");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 账龄:取供应商【honour_days】字段
|
||||||
|
JSONObject jsonSupp = suppList.stream()
|
||||||
|
.filter(row -> row.getString("ext_id").equals(erp.getString("cvendorid")))
|
||||||
|
.findFirst().orElse(null);
|
||||||
|
if (ObjectUtil.isEmpty(jsonSupp)) {
|
||||||
|
throw new BadRequestException("外部标志为【"+erp.getString("cvendorid")+"】的供应商不存在或未启用!");
|
||||||
|
}
|
||||||
|
erp.put("honour_days", jsonSupp.getString("honour_days"));
|
||||||
|
|
||||||
|
// 合计重量:1.根据此【合同编码】和【物料编码】找采购订单 2.根据采购订单【标识】找到所有到货通知单明细数量的和
|
||||||
|
String procId_contains = procList.stream()
|
||||||
|
.filter(row -> row.getString("contract_no").equals(erp.getString("vbillcode"))
|
||||||
|
&& row.getString("item_id").equals(erp.getString("item_id"))
|
||||||
|
)
|
||||||
|
.map(row -> row.getString("id"))
|
||||||
|
.collect(Collectors.joining("','"));
|
||||||
|
double allqty = dtlList.stream()
|
||||||
|
.filter(row -> procId_contains.contains(row.getString("source_billdtl_id")))
|
||||||
|
.map(row -> row.getDoubleValue("receive_qty"))
|
||||||
|
.reduce(Double::sum).orElse(0.00);
|
||||||
|
// 合计金额:合计重量 * 含税单价
|
||||||
|
erp.put("allqty", allqty);
|
||||||
|
erp.put("all_valmoney", NumberUtil.mul(allqty, erp.getDoubleValue("norigtaxprice")));
|
||||||
|
resultList.add(erp);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断是否有处理状态查询条件
|
||||||
|
if (ObjectUtil.isNotEmpty(MapUtil.getStr(whereJson, "proc_status"))) {
|
||||||
|
resultList = resultList.stream()
|
||||||
|
.filter(row -> row.getString("proc_status").equals(MapUtil.getStr(whereJson, "proc_status")))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据签订时间排序(倒序)
|
||||||
|
resultList = resultList.stream()
|
||||||
|
.sorted(Comparator.comparing(row -> row.getString("subscribedate"),Comparator.reverseOrder()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void download(List<JSONObject> ledgerQueryDownloadQuery, HttpServletResponse response) throws IOException {
|
||||||
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
|
for (int i = 0; i < ledgerQueryDownloadQuery.size(); i++) {
|
||||||
|
JSONObject jo = ledgerQueryDownloadQuery.get(i);
|
||||||
|
Map<String, Object> dtl_map = new LinkedHashMap<>();
|
||||||
|
dtl_map.put("签订时间", jo.getString("subscribedate"));
|
||||||
|
dtl_map.put("合同编码", jo.getString("contract_no"));
|
||||||
|
dtl_map.put("处理状态", jo.getString("proc_status"));
|
||||||
|
dtl_map.put("供应商", jo.getString("supp_name"));
|
||||||
|
dtl_map.put("物料编码", jo.getString("material_code"));
|
||||||
|
dtl_map.put("物料名称", jo.getString("material_name"));
|
||||||
|
dtl_map.put("单价含税", NumberUtil.round(jo.getDoubleValue("price_tax"), 3));
|
||||||
|
dtl_map.put("合同重量", NumberUtil.round(jo.getDoubleValue("qty_ht"), 3));
|
||||||
|
dtl_map.put("合同金额", NumberUtil.round(jo.getDoubleValue("norigtaxmny"), 3));
|
||||||
|
dtl_map.put("合同未到货重量", NumberUtil.round(jo.getDoubleValue("qty_zt"), 3));
|
||||||
|
dtl_map.put("账龄", jo.getString("honour_days"));
|
||||||
|
dtl_map.put("合计重量", NumberUtil.round(jo.getDoubleValue("allqty"), 3));
|
||||||
|
dtl_map.put("合计金额", NumberUtil.round(jo.getDoubleValue("all_valmoney"), 3));
|
||||||
|
list.add(dtl_map);
|
||||||
|
}
|
||||||
|
FileUtil.downloadExcel(list, response);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public static long getDaySize(String start_datetime, String end_datetime) {
|
public static long getDaySize(String start_datetime, String end_datetime) {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
|
|||||||
@@ -222,6 +222,7 @@
|
|||||||
mst.receive_code,
|
mst.receive_code,
|
||||||
LEFT(mst.input_time,10) as input_time,
|
LEFT(mst.input_time,10) as input_time,
|
||||||
dtl.receive_qty,
|
dtl.receive_qty,
|
||||||
|
dtl.pcsn,
|
||||||
dtl.receive_qty * oder.PRICE_TAX AS valmoney,
|
dtl.receive_qty * oder.PRICE_TAX AS valmoney,
|
||||||
DATE_ADD(LEFT(mst.input_time,10),INTERVAL supp.honour_days DAY) AS plan_date
|
DATE_ADD(LEFT(mst.input_time,10),INTERVAL supp.honour_days DAY) AS plan_date
|
||||||
FROM
|
FROM
|
||||||
|
|||||||
@@ -123,6 +123,13 @@ public class FactorywarrantymstController {
|
|||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log("复核")
|
||||||
|
@ApiOperation("复核")
|
||||||
|
@PostMapping("/checkData")
|
||||||
|
public ResponseEntity<Object> checkData(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(factorywarrantymstService.checkData(whereJson),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping({"/pictures/{inspection_id}"})
|
@PostMapping({"/pictures/{inspection_id}"})
|
||||||
@ApiOperation("质保书上传")
|
@ApiOperation("质保书上传")
|
||||||
public ResponseEntity<Object> upload(@RequestParam MultipartFile file, @PathVariable String inspection_id) {
|
public ResponseEntity<Object> upload(@RequestParam MultipartFile file, @PathVariable String inspection_id) {
|
||||||
|
|||||||
@@ -89,4 +89,9 @@ public interface FactorywarrantymstService {
|
|||||||
void confirm(JSONObject whereJson);
|
void confirm(JSONObject whereJson);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 复核
|
||||||
|
* @param whereJson 、
|
||||||
|
*/
|
||||||
|
JSONObject checkData(JSONObject whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ package org.nl.wms.ql.service.impl;
|
|||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -512,6 +513,24 @@ public class FactorywarrantymstServiceImpl implements FactorywarrantymstService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject checkData(JSONObject whereJson) {
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
WQLObject tab = WQLObject.getWQLObject("ql_test_factorywarrantydtl");
|
||||||
|
JSONObject json = tab.query("inspection_id = '" + whereJson.getString("inspection_id") + "' AND inspection_item_id = '1510155749437870083'").uniqueResult(0);
|
||||||
|
|
||||||
|
// 比较
|
||||||
|
boolean is_check = false;
|
||||||
|
if (NumberUtil.round(whereJson.getDoubleValue("value"), 4).doubleValue() != NumberUtil.round(json.getDoubleValue("value"), 4).doubleValue()) {
|
||||||
|
result.put("value",NumberUtil.round(json.getDoubleValue("value"), 4).doubleValue());
|
||||||
|
} else {
|
||||||
|
is_check = true;
|
||||||
|
}
|
||||||
|
result.put("is_check", is_check);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> localStorage(Map whereJson, Pageable page) {
|
public Map<String, Object> localStorage(Map whereJson, Pageable page) {
|
||||||
HashMap<String, String> map = new HashMap<>(whereJson);
|
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||||
|
|||||||
@@ -55,4 +55,12 @@ export function confirm(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, getStatus, getParameter, sure, confirm }
|
export function checkData(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/factorywarrantymst/checkData',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del, getStatus, getParameter, sure, confirm, checkData }
|
||||||
|
|||||||
357
mes/qd/src/views/wms/ql/factorywarranty/checkDialog.vue
Normal file
357
mes/qd/src/views/wms/ql/factorywarranty/checkDialog.vue
Normal file
@@ -0,0 +1,357 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="结果录入"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
destroy-on-close
|
||||||
|
fullscreen
|
||||||
|
@close="close"
|
||||||
|
@open="open"
|
||||||
|
>
|
||||||
|
<el-form ref="form2" :inline="true" :model="form" size="mini" label-width="110px" style="border: 1px solid #cfe0df;">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="物料:" prop="material_code">
|
||||||
|
<el-input v-model.trim="form.material_code" disabled class="input-with-select" style="width: 250px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="批号:" prop="pcsn">
|
||||||
|
<el-input v-model.trim="form.pcsn" disabled class="input-with-select" style="width: 250px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="单据号:" prop="inspection_code">
|
||||||
|
<el-input v-model.trim="form.inspection_code" disabled class="input-with-select" style="width: 250px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="厂家:" prop="manufactor">
|
||||||
|
<el-input v-model.trim="form.manufactor" disabled class="input-with-select" style="width: 250px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="等级:" prop="grade">
|
||||||
|
<el-select
|
||||||
|
v-model="form.grade"
|
||||||
|
:disabled="form.bill_status === '99'"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请选择"
|
||||||
|
class="filter-item"
|
||||||
|
style="width: 250px;"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.ST_IVT_LEVEL"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="结果:" prop="result">
|
||||||
|
<el-select
|
||||||
|
v-model="form.result"
|
||||||
|
:disabled="form.bill_status === '99'"
|
||||||
|
size="mini"
|
||||||
|
class="filter-item"
|
||||||
|
style="width: 250px;"
|
||||||
|
@change="changeType"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in this.resulfList"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="备注:" prop="remark">
|
||||||
|
<el-input v-model.trim="form.remark" :disabled="form.bill_status === '99'" type="textarea" class="input-with-select" style="width: 750px" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||||
|
<span class="crud-opts-right2">
|
||||||
|
<!--左侧插槽-->
|
||||||
|
<slot name="right" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
:data="form.tableData"
|
||||||
|
style="width: 100%;"
|
||||||
|
height="250"
|
||||||
|
:cell-style="cellStyle"
|
||||||
|
border
|
||||||
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||||
|
<el-table-column v-if="false" prop="is_ok" label="是否合格" align="center" />
|
||||||
|
<el-table-column v-if="false" prop="form_remark" label="表格备注" align="center" />
|
||||||
|
<el-table-column prop="inspection_item_code" label="项点编码" align="center" />
|
||||||
|
<el-table-column prop="inspection_item_name" label="项点名称" align="center" />
|
||||||
|
<el-table-column prop="inspection_item_type_name" label="项点类别" align="center" />
|
||||||
|
<el-table-column prop="down_limit" label="标准值下限" align="center" :formatter="crud.formatQlNum4" />
|
||||||
|
<el-table-column prop="up_limit" label="标准值上限" align="center" :formatter="crud.formatQlNum4" />
|
||||||
|
<el-table-column prop="value" label="检测值" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.tableData[scope.$index].value"
|
||||||
|
:controls="false"
|
||||||
|
size="mini"
|
||||||
|
type="number"
|
||||||
|
:disabled="form.tableData[scope.$index].inspection_item_code !== 'CJZB00004'"
|
||||||
|
:precision="4"
|
||||||
|
/>
|
||||||
|
<el-button
|
||||||
|
v-if="form.tableData[scope.$index].inspection_item_code === 'CJZB00004'"
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-check"
|
||||||
|
size="mini"
|
||||||
|
@click="checkData(form.tableData[scope.$index])"
|
||||||
|
>
|
||||||
|
复核
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="dtl_remark" label="备注" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model.trim="form.tableData[scope.$index].dtl_remark" size="mini" :disabled="form.bill_status === '99'" class="edit-input" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="confirm">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import CRUD, { crud } from '@crud/crud'
|
||||||
|
import crudFactorywarrantymst from '@/api/wms/ql/factorywarrantymst'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ResultPutDialog',
|
||||||
|
dicts: ['ST_IVT_LEVEL'],
|
||||||
|
components: { },
|
||||||
|
mixins: [crud()],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
openParam: {
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
is_check: false,
|
||||||
|
resulfList: [
|
||||||
|
{ 'label': '合格', 'value': '01' },
|
||||||
|
{ 'label': '不合格', 'value': '02' }
|
||||||
|
],
|
||||||
|
form: {
|
||||||
|
grade: '01',
|
||||||
|
resultRemark: '',
|
||||||
|
tableData: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
this.form = this.openParam.form
|
||||||
|
if (this.openParam.form.grade === '') {
|
||||||
|
this.form.grade = '01'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'form.tableData': {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
// this.computerResult()
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClose(done) {
|
||||||
|
this.$confirm('确认关闭?')
|
||||||
|
.then(_ => {
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
.catch(_ => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.$refs['form2'].resetFields()
|
||||||
|
this.$refs['tableData'].resetFields()
|
||||||
|
},
|
||||||
|
open() {
|
||||||
|
this.is_check = false
|
||||||
|
for (const item of this.form.tableData) {
|
||||||
|
if (item.inspection_item_code === 'CJZB00004') {
|
||||||
|
item.value = ''
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.is_check = true
|
||||||
|
},
|
||||||
|
hand(value) {
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
count() {
|
||||||
|
},
|
||||||
|
confirm() {
|
||||||
|
if (this.is_check) {
|
||||||
|
crudFactorywarrantymst.confirm(this.form).then(res => {
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.crud.notify('确认成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.crud.notify('请点击复核按钮并校验数据正确后进行确认!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
}
|
||||||
|
/*for (const item of this.form.tableData) {
|
||||||
|
if (item.inspection_item_code === 'CJZB00004') {
|
||||||
|
if (!item.value) {
|
||||||
|
this.crud.notify('请填写检测值,并复核', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
crudFactorywarrantymst.sure(this.form).then(res => {
|
||||||
|
crudFactorywarrantymst.confirm(this.form).then(res => {
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.crud.notify('确认成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
|
})
|
||||||
|
})*/
|
||||||
|
},
|
||||||
|
sure() {
|
||||||
|
const rows = this.form.tableData
|
||||||
|
var flag = 0
|
||||||
|
for (var row of rows) {
|
||||||
|
if (!row.value) {
|
||||||
|
flag = flag + 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (flag === rows.length) {
|
||||||
|
this.crud.notify('请至少填写一项检测值', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const data = this.form
|
||||||
|
crudFactorywarrantymst.sure(data).then(res => {
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.crud.toQuery()
|
||||||
|
this.crud.notify('录入成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
cellStyle({ row, column, rowIndex, columnIndex }) {
|
||||||
|
const inspection_type = row.inspection_type
|
||||||
|
const value = parseFloat(row.value)
|
||||||
|
const up_limit = parseFloat(row.up_limit)
|
||||||
|
const down_limit = parseFloat(row.down_limit)
|
||||||
|
// 检测项
|
||||||
|
if (inspection_type === '02') {
|
||||||
|
if (column.property === 'value') {
|
||||||
|
if ((value < down_limit) || (value > up_limit)) {
|
||||||
|
row.is_ok = '0'
|
||||||
|
if (value < down_limit) {
|
||||||
|
row.form_remark = row.inspection_item_name + '超下限'
|
||||||
|
}
|
||||||
|
if (value > up_limit) {
|
||||||
|
row.form_remark = row.inspection_item_name + '超上限'
|
||||||
|
}
|
||||||
|
return 'background: red'
|
||||||
|
} else {
|
||||||
|
row.form_remark = ''
|
||||||
|
row.is_ok = '1'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computerResult() {
|
||||||
|
const rows = this.form.tableData
|
||||||
|
debugger
|
||||||
|
for (let i = 0; i < rows.length; i++) {
|
||||||
|
if (rows[i].up_limit !== '') {
|
||||||
|
if (rows[i].value === undefined) {
|
||||||
|
this.crud.notify('有标准项点未输入完', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if (rows[i].value === 0) {
|
||||||
|
// this.crud.notify(rows[i].inspection_item_name + '项点未维护', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
// return false
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
this.form.result = '01'
|
||||||
|
for (var row of rows) {
|
||||||
|
if (row.is_ok === '0') {
|
||||||
|
this.form.result = '02'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.form.result === '01') return this.crud.notify('计算结果为合格', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
if (this.form.result === '02') return this.crud.notify('计算结果为不合格', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
},
|
||||||
|
changeType() {
|
||||||
|
const rows = this.form.tableData
|
||||||
|
const flag = rows.some(row => row.value === '')
|
||||||
|
if (flag) {
|
||||||
|
this.crud.notify('请输入检验值', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
this.form.result = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
checkData(data) {
|
||||||
|
data.inspection_id = this.form.inspection_id
|
||||||
|
crudFactorywarrantymst.checkData(data).then(res => {
|
||||||
|
this.is_check = res.is_check
|
||||||
|
if (!this.is_check) {
|
||||||
|
this.crud.notify('当前数据不正确,原数据为【' + res.value + '】', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
this.crud.notify('数据正确', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.crud-opts2 {
|
||||||
|
padding: 4px 0;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.crud-opts2 .crud-opts-right2 {
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -188,6 +188,7 @@
|
|||||||
|
|
||||||
<AddDialog />
|
<AddDialog />
|
||||||
<ResultPutDialog :dialog-show.sync="resultPutDialog" :open-param="openParam" />
|
<ResultPutDialog :dialog-show.sync="resultPutDialog" :open-param="openParam" />
|
||||||
|
<checkDialog :dialog-show.sync="checkDialog" :open-param="openParam" />
|
||||||
<PicDialog ref="child" :dialog-show.sync="PicDialog" />
|
<PicDialog ref="child" :dialog-show.sync="PicDialog" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -202,6 +203,7 @@ import pagination from '@crud/Pagination'
|
|||||||
import DateRangePicker from '@/components/DateRangePicker'
|
import DateRangePicker from '@/components/DateRangePicker'
|
||||||
import AddDialog from '@/views/wms/ql/factorywarranty/AddDialog'
|
import AddDialog from '@/views/wms/ql/factorywarranty/AddDialog'
|
||||||
import ResultPutDialog from '@/views/wms/ql/factorywarranty/ResultPutDialog'
|
import ResultPutDialog from '@/views/wms/ql/factorywarranty/ResultPutDialog'
|
||||||
|
import checkDialog from '@/views/wms/ql/factorywarranty/checkDialog'
|
||||||
import PicDialog from '@/views/wms/ql/factorywarranty/PicDialog'
|
import PicDialog from '@/views/wms/ql/factorywarranty/PicDialog'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
@@ -209,7 +211,7 @@ import { getToken } from '@/utils/auth'
|
|||||||
export default {
|
export default {
|
||||||
name: 'Factorywarranty',
|
name: 'Factorywarranty',
|
||||||
dicts: ['QC_INV_TYPE'],
|
dicts: ['QC_INV_TYPE'],
|
||||||
components: { PicDialog, AddDialog, pagination, crudOperation, rrOperation, udOperation, DateRangePicker, ResultPutDialog },
|
components: { PicDialog, AddDialog, pagination, crudOperation, rrOperation, udOperation, DateRangePicker, ResultPutDialog, checkDialog },
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -235,6 +237,7 @@ export default {
|
|||||||
openParam: {},
|
openParam: {},
|
||||||
PicDialog: false,
|
PicDialog: false,
|
||||||
resultPutDialog: false,
|
resultPutDialog: false,
|
||||||
|
checkDialog: false,
|
||||||
permission: {
|
permission: {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -327,6 +330,15 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
|
const _selectData = this.$refs.table.selection
|
||||||
|
const inspection_id = _selectData[0].inspection_id
|
||||||
|
const material_id = _selectData[0].material_id
|
||||||
|
crudFactorywarrantymst.getParameter({ 'inspection_id': inspection_id, 'material_id': material_id }).then(res => {
|
||||||
|
this.openParam = res
|
||||||
|
this.checkDialog = true
|
||||||
|
})
|
||||||
|
},
|
||||||
|
confirm2() {
|
||||||
const _selectData = this.$refs.table.selection
|
const _selectData = this.$refs.table.selection
|
||||||
if (_selectData.length === 0 || _selectData.length > 1) {
|
if (_selectData.length === 0 || _selectData.length > 1) {
|
||||||
this.crud.notify('请选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('请选择一条记录', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
>
|
>
|
||||||
<el-table-column prop="receive_code" label="到货通知单" width="120px" show-overflow-tooltip/>
|
<el-table-column prop="receive_code" label="到货通知单" width="120px" show-overflow-tooltip/>
|
||||||
<el-table-column prop="input_time" label="到货时间" width="150px" show-overflow-tooltip />
|
<el-table-column prop="input_time" label="到货时间" width="150px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="pcsn" label="批次" width="150px" show-overflow-tooltip />
|
||||||
<el-table-column prop="receive_qty" label="到货重量" show-overflow-tooltip :formatter="crud.formatNum3" />
|
<el-table-column prop="receive_qty" label="到货重量" show-overflow-tooltip :formatter="crud.formatNum3" />
|
||||||
<el-table-column prop="valmoney" label="到货金额" show-overflow-tooltip :formatter="crud.formatNum3" />
|
<el-table-column prop="valmoney" label="到货金额" show-overflow-tooltip :formatter="crud.formatNum3" />
|
||||||
<el-table-column prop="plan_date" label="资金计划" width="150px" show-overflow-tooltip />
|
<el-table-column prop="plan_date" label="资金计划" width="150px" show-overflow-tooltip />
|
||||||
|
|||||||
@@ -88,7 +88,18 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission" />
|
<crudOperation :permission="permission">
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="warning"
|
||||||
|
icon="el-icon-position"
|
||||||
|
size="mini"
|
||||||
|
@click="downdtl()"
|
||||||
|
>
|
||||||
|
导出excel
|
||||||
|
</el-button>
|
||||||
|
</crudOperation>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table
|
<el-table
|
||||||
@@ -165,6 +176,8 @@ import crudOrderproc from '@/api/wms/pcs/orderproc'
|
|||||||
import DateRangePicker from '@/components/DateRangePicker'
|
import DateRangePicker from '@/components/DateRangePicker'
|
||||||
import ReceiveDialog from '@/views/wms/statistics/ledgerQuery/ReceiveDialog'
|
import ReceiveDialog from '@/views/wms/statistics/ledgerQuery/ReceiveDialog'
|
||||||
import remarkDaing from '@/views/wms/statistics/ledgerQuery/remarkDaing'
|
import remarkDaing from '@/views/wms/statistics/ledgerQuery/remarkDaing'
|
||||||
|
import { download } from '@/api/data'
|
||||||
|
import { downloadFile } from '@/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LedgerQuery',
|
name: 'LedgerQuery',
|
||||||
@@ -193,17 +206,16 @@ export default {
|
|||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
procStatusList: [],
|
procStatusList: [
|
||||||
|
{ 'name': '生成', 'code': '生成' },
|
||||||
|
{ 'name': '在途', 'code': '在途' },
|
||||||
|
{ 'name': '完成', 'code': '完成' }
|
||||||
|
],
|
||||||
openParam: null,
|
openParam: null,
|
||||||
receiveDialog: false,
|
receiveDialog: false,
|
||||||
remarkDaing: false
|
remarkDaing: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
crudOrderproc.getProcStatus().then(res => {
|
|
||||||
this.procStatusList = res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
@@ -226,6 +238,15 @@ export default {
|
|||||||
openRemarkDaing(row) {
|
openRemarkDaing(row) {
|
||||||
this.openParam = row.id
|
this.openParam = row.id
|
||||||
this.remarkDaing = true
|
this.remarkDaing = true
|
||||||
|
},
|
||||||
|
downdtl() {
|
||||||
|
crud.downloadLoading = true
|
||||||
|
download('/api/purchaseorderproc/download', this.crud.query).then(result => {
|
||||||
|
downloadFile(result, '合同台账', 'xlsx')
|
||||||
|
crud.downloadLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
crud.downloadLoading = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user