采购修改

product
17602169347 2 years ago
parent 3c059850ed
commit 83438cb471

@ -82,6 +82,8 @@ public class WebFilterConfig implements WebMvcConfigurer {
list.add("/api/oauth/getConfig/{account}");
list.add("/error");
list.add("/favicon.ico");
list.add("/api/info/exportPdf/**");
return list;
}

@ -15,6 +15,7 @@ import jnpf.base.UserInfo;
import jnpf.base.vo.DownloadVO;
import jnpf.config.ConfigValueUtil;
import jnpf.exception.DataException;
import jnpf.model.EmployeeModel;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService;
import jnpf.purchaseback.entity.PurchaseorderEntity;
@ -50,10 +51,13 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.Valid;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import jnpf.util.GeneraterSwapUtil;
import java.math.BigDecimal;
import java.util.*;
import jnpf.util.file.UploadUtil;
@ -160,12 +164,28 @@ public class InvoicesController {
purchaseorderEntity.setInvoiceAmount(entity.getInvoiceAmount());
purchaseorderEntity.setInvoiceNum(entity.getInvoiceQuantity());
purchaseorderService.updateById(purchaseorderEntity);
List<Purchaseorder_item0Entity> jg_purchaseorder_item0List = purchaseorderitemService.GetPurchaseorder_item0List(entity.getPurchaseorderId());
for (Purchaseorder_item0Entity purchaseorder_item0Entity: jg_purchaseorder_item0List) {
PoundlistEntity poundlistEntity = poundlistService.getById(purchaseorder_item0Entity.getPoundlistId());
poundlistEntity.setPurchaseStatus("1");
poundlistEntity.setIsInvoicing("1");
poundlistService.updateById(poundlistEntity);
List<Purchaseorder_item0Entity> Purchaseorder_item0List = purchaseorderitemService.GetPurchaseorder_item0List(entity.getPurchaseorderId());
List<PoundlistEntity> poundlistEntityList = purchaseorderitemService.getPoundList(entity.getPurchaseorderId());
Purchaseorder_item0Entity orderItem = Purchaseorder_item0List.stream().filter(item0 -> ObjectUtil.equals(item0.getPoundlistId(), poundlistEntityList.get(0).getId())).findAny().get();
BigDecimal total = orderItem.getAmount();
int i = 0;
while (entity.getInvoiceAmount().compareTo(total) >= 0){
i++;
if(i < poundlistEntityList.size()){
String poundlistId = poundlistEntityList.get(i).getId();
orderItem = Purchaseorder_item0List.stream().filter(item0 -> ObjectUtil.equals(item0.getPoundlistId(), poundlistId)).findAny().get();
total = total.add(orderItem.getAmount());
}else{
break;
}
}
for (int j = 0;j<poundlistEntityList.size();j++) {
if(j < i){
poundlistEntityList.get(j).setIsInvoicing("1");
poundlistEntityList.get(j).setInputDate(new Date());
}
poundlistEntityList.get(j).setPurchaseStatus("1");
poundlistService.updateById(poundlistEntityList.get(j));
}
return ActionResult.success("创建成功");
}
@ -183,8 +203,8 @@ public class InvoicesController {
UserInfo userInfo=userProvider.get();
DownloadVO vo=DownloadVO.builder().build();
try{
vo.setName("职员信息.xlsx");
vo.setUrl(UploaderUtil.uploaderFile("/api/Common/DownloadModel?encryption=" ,userInfo.getId()+"#"+"职员信息.xlsx"+"#"+"Temporary"));
vo.setName("采购发票数据模板.xlsx");
vo.setUrl(UploaderUtil.uploaderFile("/api/Common/DownloadModel?encryption=" ,userInfo.getId()+"#"+"采购发票数据模板.xlsx"+"#"+"Temporary"));
}catch(Exception e){
log.error("信息导出Excel错误:{}" ,e.getMessage());
}
@ -371,6 +391,7 @@ public class InvoicesController {
List<InvoicesItem0Entity> jg_invoices_item0List = invoicesService.GetInvoicesItem0List(id);
List<InvoicesItem0Model> jg_invoices_item0ModelList = JsonUtil.getJsonToList(jg_invoices_item0List,InvoicesItem0Model.class);
for(InvoicesItem0Model jg_invoices_item0Model : jg_invoices_item0ModelList){
jg_invoices_item0Model.setInvoiceAttachment(generaterSwapUtil.getFileNameInJson(jg_invoices_item0Model.getInvoiceAttachment()));
}
vo.setInvoicesItem0List(jg_invoices_item0ModelList);
@ -423,17 +444,43 @@ public class InvoicesController {
invoicesItem0Service.save(entitys);
}
//更新采购订单状态
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(entity.getPurchaseorderId());
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(subentity.getPurchaseorderId());
purchaseorderEntity.setStatus("1");//开票中
purchaseorderEntity.setInvoiceAmount(subentity.getInvoiceAmount());
purchaseorderEntity.setInvoiceNum(subentity.getInvoiceQuantity());
purchaseorderService.updateById(purchaseorderEntity);
List<Purchaseorder_item0Entity> jg_purchaseorder_item0List = purchaseorderitemService.GetPurchaseorder_item0List(entity.getPurchaseorderId());
/*List<Purchaseorder_item0Entity> jg_purchaseorder_item0List = purchaseorderitemService.GetPurchaseorder_item0List(entity.getPurchaseorderId());
for (Purchaseorder_item0Entity purchaseorder_item0Entity: jg_purchaseorder_item0List) {
PoundlistEntity poundlistEntity = poundlistService.getById(purchaseorder_item0Entity.getPoundlistId());
poundlistEntity.setPurchaseStatus("1");
poundlistEntity.setIsInvoicing("1");
poundlistService.updateById(poundlistEntity);
}*/
List<Purchaseorder_item0Entity> Purchaseorder_item0List = purchaseorderitemService.GetPurchaseorder_item0List(subentity.getPurchaseorderId());
List<PoundlistEntity> poundlistEntityList = purchaseorderitemService.getPoundList(subentity.getPurchaseorderId());
Purchaseorder_item0Entity orderItem = Purchaseorder_item0List.stream().filter(item0 -> ObjectUtil.equals(item0.getPoundlistId(), poundlistEntityList.get(0).getId())).findAny().get();
BigDecimal total = orderItem.getAmount();
int i = 0;
while (entity.getInvoiceAmount().compareTo(total) >= 0){
i++;
if(i < poundlistEntityList.size()){
String poundlistId = poundlistEntityList.get(i).getId();
orderItem = Purchaseorder_item0List.stream().filter(item0 -> ObjectUtil.equals(item0.getPoundlistId(), poundlistId)).findAny().get();
total = total.add(orderItem.getAmount());
}else{
break;
}
}
for (int j = 0;j<poundlistEntityList.size();j++) {
if(j < i){
poundlistEntityList.get(j).setIsInvoicing("1");
poundlistEntityList.get(j).setInputDate(new Date());
}else{
poundlistEntityList.get(j).setIsInvoicing("0");
poundlistEntityList.get(j).setInputDate(null);
}
poundlistEntityList.get(j).setPurchaseStatus("1");
poundlistService.updateById(poundlistEntityList.get(j));
}
return ActionResult.success("更新成功");
}else{
@ -467,11 +514,47 @@ public class InvoicesController {
}
/**
*
*
* @return
*/
@ApiOperation("导入预览")
@GetMapping("/ImportPreview")
public ActionResult ImportPreview(String fileName) {
String filePath = configValueUtil.getTemporaryFilePath();
File temporary = new File(XSSEscape.escapePath(filePath + fileName));
//得到数据
List<InvoicesItem0Entity> personList = ExcelUtil.importExcel(temporary, 0, 4, InvoicesItem0Entity.class);
//预览数据
Map<String, Object> map = invoicesItem0Service.importPreview(personList);
return ActionResult.success(map);
}
/**
* (excel)
*
* @return
*/
@ApiOperation("上传文件")
@PostMapping("/Uploader")
public ActionResult Uploader() {
List<MultipartFile> list = UpUtil.getFileAll();
MultipartFile file = list.get(0);
if (file.getOriginalFilename().endsWith(".xlsx") || file.getOriginalFilename().endsWith(".xls")) {
String filePath = configValueUtil.getTemporaryFilePath();
String fileName = RandomUtil.uuId() + "." + UpUtil.getFileType(file);
fileName = XSSEscape.escape(fileName);
//上传文件
FileUtil.upFile(file, filePath, fileName);
DownloadVO vo = DownloadVO.builder().build();
vo.setName(fileName);
return ActionResult.success(vo);
} else {
return ActionResult.fail("选择文件不符合导入");
}
}

@ -1,5 +1,6 @@
package jnpf.invoices.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@ -32,6 +33,7 @@ public class InvoicesItem0Entity {
@TableField("CREATOR_USER_ID")
private String creatorUserId;
@Excel(name = "购方企业名称")
@TableField("CREATOR_USER_NAME")
private String creatorUserName;
@ -65,21 +67,27 @@ public class InvoicesItem0Entity {
@TableField("DEPARTMENT_ID")
private String departmentId;
@Excel(name = "发票代码")
@TableField("INVOICE_CODE")
private String invoiceCode;
@Excel(name = "发票号码")
@TableField("INVOICE_NO")
private String invoiceNo;
@Excel(name = "数量")
@TableField("INVOICE_QUANTITY")
private BigDecimal invoiceQuantity;
@Excel(name = "金额")
@TableField("INVOICE_AMOUNT")
private BigDecimal invoiceAmount;
@Excel(name = "税率")
@TableField("TAX_RATE")
private String taxRate;
@Excel(name = "税额")
@TableField("TAX_AMOUNT")
private BigDecimal taxAmount;
@ -92,6 +100,7 @@ public class InvoicesItem0Entity {
@TableField("INVOICE_ATTACHMENT")
private String invoiceAttachment;
@Excel(name = "开票日期")
@TableField("INVOICING_DATE")
private Date invoicingDate;
@ -101,6 +110,7 @@ public class InvoicesItem0Entity {
@TableField("INVOICES_ID")
private String invoicesId;
@Excel(name = "商品名称")
@TableField("MATERIAL_NAME")
private String materialName;

@ -62,4 +62,7 @@ public class InvoicesItem0Model {
@JsonProperty("invoicingDate")
private Long invoicingDate;
/** 发票附件 **/
@JsonProperty("invoiceAttachment")
private String invoiceAttachment;
}

@ -2,6 +2,10 @@ package jnpf.invoices.service;
import jnpf.invoices.entity.InvoicesItem0Entity;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
import java.util.Map;
/**
*
* jg_invoices_item0
@ -11,5 +15,11 @@ import com.baomidou.mybatisplus.extension.service.IService;
* 2023-02-22
*/
public interface InvoicesItem0Service extends IService<InvoicesItem0Entity> {
/**
*
*
* @param personList
* @return
*/
Map<String, Object> importPreview(List<InvoicesItem0Entity> personList);
}

@ -38,4 +38,78 @@ import java.util.*;
public class InvoicesItem0ServiceImpl extends ServiceImpl<InvoicesItem0Mapper, InvoicesItem0Entity> implements InvoicesItem0Service{
/*@Override
public Map<String, Object> importPreview(List<InvoicesItem0Entity> personList) {
return null;
}*/
@Override
public Map<String, Object> importPreview(List<InvoicesItem0Entity> personList) {
List<Map<String, Object>> dataRow = new ArrayList<>();
List<Map<String, Object>> columns = new ArrayList<>();
if(personList != null) {
for (int i = 0; i < personList.size(); i++) {
Map<String, Object> dataRowMap = new HashMap<>();
InvoicesItem0Entity model = personList.get(i);
dataRowMap.put("materialName", model.getMaterialName());
dataRowMap.put("invoiceCode", model.getInvoiceCode());
dataRowMap.put("invoiceNo", model.getInvoiceNo());
dataRowMap.put("invoiceQuantity", model.getInvoiceQuantity());
dataRowMap.put("invoiceAmount", model.getInvoiceAmount());
dataRowMap.put("taxRate", model.getTaxRate());
dataRowMap.put("taxAmount", model.getTaxAmount());
dataRowMap.put("amountNotTax", model.getInvoiceAmount().subtract(model.getTaxAmount()));
dataRowMap.put("invoiceStatus", "0");
dataRowMap.put("creatorUserName", model.getCreatorUserName());
dataRowMap.put("invoicingDate", model.getInvoicingDate());
dataRow.add(dataRowMap);
}
for (int i = 1; i < 12; i++) {
Map<String, Object> columnsMap = new HashMap<>();
columnsMap.put("AllowDBNull", true);
columnsMap.put("AutoIncrement", false);
columnsMap.put("AutoIncrementSeed", 0);
columnsMap.put("AutoIncrementStep", 1);
columnsMap.put("Caption", this.getColumns(i));
columnsMap.put("ColumnMapping", 1);
columnsMap.put("ColumnName", this.getColumns(i));
columnsMap.put("Container", null);
columnsMap.put("DataType", "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
columnsMap.put("DateTimeMode", 3);
columnsMap.put("DefaultValue", null);
columnsMap.put("DesignMode", false);
columnsMap.put("Expression", "");
columnsMap.put("ExtendedProperties", "");
columnsMap.put("MaxLength", -1);
columnsMap.put("Namespace", "");
columnsMap.put("Ordinal", 0);
columnsMap.put("Prefix", "");
columnsMap.put("ReadOnly", false);
columnsMap.put("Site", null);
columnsMap.put("Table", personList);
columnsMap.put("Unique", false);
columns.add(columnsMap);
}
}
Map<String, Object> map = new HashMap<>();
map.put("dataRow", dataRow);
map.put("columns", columns);
return map;
}
private String getColumns(Integer key) {
Map<Integer, String> map = new HashMap<>();
map.put(1, "物料名称");
map.put(2, "发票代码");
map.put(3, "发票号码");
map.put(4, "发票数量");
map.put(5, "发票金额");
map.put(6, "税率");
map.put(7, "税额");
map.put(8, "不含税金额");
map.put(9, "发票状态");
map.put(10, "开票人");
map.put(11, "开票日期");
return map.get(key);
}
}

@ -140,13 +140,7 @@ public class PaymentController {
purchaseorderitemEntity.setPayPrice(purchaseorderitemEntity.getPayPrice().add(paymentdocItem0Entity.getAmount()));
purchaseorderitemService.updateById(purchaseorderitemEntity);
List<Purchaseorder_item0Entity> Purchaseorder_item0List = purchaseorderitemService.GetPurchaseorder_item0List(purchaseorderitemEntity.getId());
List<String> poundlistIds = new ArrayList<>();
for (Purchaseorder_item0Entity purchaseorder_item0Entity: Purchaseorder_item0List) {
poundlistIds.add(purchaseorder_item0Entity.getPoundlistId());
}
QueryWrapper<PoundlistEntity> poundlistQueryWrapper=new QueryWrapper<>();
poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, poundlistIds).orderByAsc(PoundlistEntity::getPoundDate);
List<PoundlistEntity> poundlistEntityList = poundlistService.list(poundlistQueryWrapper);
List<PoundlistEntity> poundlistEntityList = purchaseorderitemService.getPoundList(paymentdocItem0Entity.getPurchaseorderId());
Purchaseorder_item0Entity orderItem = Purchaseorder_item0List.stream().filter(item0 -> ObjectUtil.equals(item0.getPoundlistId(), poundlistEntityList.get(0).getId())).findAny().get();
BigDecimal total = orderItem.getAmount();
int i = 0;
@ -179,6 +173,7 @@ public class PaymentController {
List<PaymentEntity> list= paymentService.getList(paymentPagination);
//处理id字段转名称若无需转或者为空可删除
for(PaymentEntity entity:list){
entity.setVoucher(generaterSwapUtil.getFileNameInJson(entity.getVoucher()));
}
List<PaymentListVO> listVO=JsonUtil.getJsonToList(list,PaymentListVO.class);
for(PaymentListVO paymentVO:listVO){
@ -263,6 +258,7 @@ public class PaymentController {
List<PaymentEntity> list= paymentService.getTypeList(paymentPagination,paymentPaginationExportModel.getDataType());
//处理id字段转名称若无需转或者为空可删除
for(PaymentEntity entity:list){
entity.setVoucher(generaterSwapUtil.getFileNameInJson(entity.getVoucher()));
}
List<PaymentListVO> listVO=JsonUtil.getJsonToList(list,PaymentListVO.class);
for(PaymentListVO paymentVO:listVO){
@ -327,6 +323,8 @@ public class PaymentController {
case "status" :
entitys.add(new ExcelExportEntity("单据状态" ,"status"));
break;
case "voucher" :
entitys.add(new ExcelExportEntity("付款凭证" ,"voucher"));
default:
break;
}
@ -444,7 +442,7 @@ public class PaymentController {
//附表数据转换
//添加到详情表单对象中
vo.setVoucher(generaterSwapUtil.getFileNameInJson(vo.getVoucher()));
return ActionResult.success(vo);
}

@ -114,4 +114,8 @@ public class PaymentEntity {
@TableField("PAYMENTBANK")
private String paymentbank;
@TableField("voucher")
private String voucher;
}

@ -2,6 +2,7 @@
package jnpf.payment.model.payment;
import com.baomidou.mybatisplus.annotation.TableField;
import jnpf.payment.model.payment.Payment_item0Model;
import lombok.Data;
import java.util.List;
@ -80,6 +81,10 @@ public class PaymentCrForm {
@JsonProperty("status")
private String status;
/** 付款凭证 **/
@JsonProperty("voucher")
private String voucher;
/** 子表数据 **/
@JsonProperty("payment_item0List")
private List<Payment_item0Model> payment_item0List;

@ -84,6 +84,10 @@ public class PaymentInfoVO{
@JsonProperty("status")
private String status;
/** 付款凭证 **/
@JsonProperty("voucher")
private String voucher;
/** 子表数据 **/
@JsonProperty("payment_item0List")
private List<Payment_item0Model> payment_item0List;

@ -99,5 +99,7 @@ public class PaymentListVO{
@JsonProperty("status")
private String status;
/** 付款凭证 **/
@JsonProperty("voucher")
private String voucher;
}

@ -100,6 +100,10 @@ public class PaymentUpForm{
@JsonProperty("status")
private String status;
/** 付款凭证 **/
@JsonProperty("voucher")
private String voucher;
/** 子表数据 **/
@JsonProperty("payment_item0List")
private List<Payment_item0Model> payment_item0List;

@ -136,7 +136,7 @@ public class PaymentServiceImpl extends ServiceImpl<PaymentMapper, PaymentEntity
}
//排序
if(StringUtil.isEmpty(paymentPagination.getSidx())){
paymentQueryWrapper.lambda().orderByDesc(PaymentEntity::getBusinessdate);
paymentQueryWrapper.lambda().orderByDesc(PaymentEntity::getCreatorTime);
}else{
try {
String sidx = paymentPagination.getSidx();

@ -127,31 +127,10 @@ public class PoundlistController {
//处理id字段转名称若无需转或者为空可删除
for(PoundlistEntity entity:list){
entity.setPoundPictures(generaterSwapUtil.getFileNameInJson(entity.getPoundPictures()));
Map<String,Object> materialIdMap = new HashMap<>();
entity.setMaterialName(generaterSwapUtil.getPopupSelectValue("381037852907038533","id","item_name",entity.getMaterialId(),materialIdMap));
Map<String,Object> customerIdMap = new HashMap<>();
entity.setCustomerName(generaterSwapUtil.getPopupSelectValue("395936123471343749","id","supplier_nm",entity.getCustomerId(),customerIdMap));
Map<String,Object> salesIdMap = new HashMap<>();
entity.setSalesName(generaterSwapUtil.getPopupSelectValue("381038993740949317","id","contract_name",entity.getSalesId(),salesIdMap));
Map<String,Object> vehicleIdMap = new HashMap<>();
entity.setVehicleName(generaterSwapUtil.getPopupSelectValue("381432451370615173","id","ticketno",entity.getVehicleId(),vehicleIdMap));
entity.setVehiclePictures(generaterSwapUtil.getFileNameInJson(entity.getVehiclePictures()));
Map<String,Object> businessIdMap = new HashMap<>();
entity.setBusinessName(generaterSwapUtil.getPopupSelectValue("ebcc44be142e43b795c0d769abd6d25a","F_Id","F_RealName",entity.getBusinessId(),businessIdMap));
Map<String,Object> naturalIdMap = new HashMap<>();
entity.setNaturalName(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",entity.getNaturalId(),naturalIdMap));
Map<String,Object> purchaseIdMap = new HashMap<>();
entity.setPurchaseName(generaterSwapUtil.getPopupSelectValue("397408984857931205","id","contract_name",entity.getPurchaseId(),purchaseIdMap));
Map<String,Object> supplierIdMap = new HashMap<>();
entity.setSupplierName(generaterSwapUtil.getPopupSelectValue("382494924156735557","id","supplier_name",entity.getSupplierId(),supplierIdMap));
entity.setOriginPlace(generaterSwapUtil.provinceData(entity.getOriginPlace()));
entity.setPurchaseContractNo(generaterSwapUtil.getPopupSelectValue("397408984857931205","id","contract_no",entity.getPurchaseId(),purchaseIdMap));
}
List<PoundlistListVO> listVO=JsonUtil.getJsonToList(list,PoundlistListVO.class);
for(PoundlistListVO poundlistVO:listVO){
}
PageListVO vo=new PageListVO();
vo.setList(listVO);
PaginationVO page=JsonUtil.getJsonToBean(poundlistPagination,PaginationVO.class);

@ -7,6 +7,8 @@ import jnpf.poundlist.entity.PoundlistEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.poundlist.entity.PoundlistSEntity;
import jnpf.poundlist.entity.PoundlistTwoEntity;
import jnpf.poundlist.model.poundlist.PoundlistListVO;
import jnpf.poundlist.model.poundlist.PoundlistPagination;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -21,7 +23,7 @@ import java.util.List;
*/
public interface PoundlistMapper extends BaseMapper<PoundlistEntity> {
IPage<PoundlistEntity> queryByKeyword(@Param("page") Page<PoundlistEntity> page, @Param("keyword") String keyword);
IPage<PoundlistEntity> queryByKeyword(@Param("page") Page<PoundlistEntity> page, @Param("poundlistPagination") PoundlistPagination poundlistPagination);
//销售毛利表
List<PoundlistSEntity> qureylist(PoundlistSEntity poundlistSEntity);
//废钢采购销售统计明细表(按磅单)

@ -3,6 +3,8 @@ package jnpf.poundlist.model.poundlist;
import lombok.Data;
import jnpf.base.Pagination;
import java.util.Date;
import java.util.List;
/**
@ -33,6 +35,8 @@ public class PoundlistPagination extends Pagination {
private String isPay;
private String isCollection;
private String isExpense;
private Date startDate;
private Date endDate;
/**
* id
*/

@ -8,6 +8,7 @@ import jnpf.materialvo.entity.MaterialEntity;
import jnpf.materialvo.service.MaterialService;
import jnpf.poundlist.entity.*;
import jnpf.poundlist.mapper.PoundlistMapper;
import jnpf.poundlist.model.poundlist.PoundlistListVO;
import jnpf.poundlist.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.supplier.entity.SupplierEntity;
@ -104,114 +105,15 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
}
}
if(StringUtil.isNotEmpty(poundlistPagination.getPoundDate())){
poundlistNum++;
List<String> PoundDateList = poundlistPagination.getPoundDate();
Long fir = Long.valueOf(PoundDateList.get(0));
Long sec = Long.valueOf(PoundDateList.get(1));
poundlistQueryWrapper.lambda().ge(PoundlistEntity::getPoundDate, new Date(fir))
.le(PoundlistEntity::getPoundDate, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
}
if(StringUtil.isNotEmpty(poundlistPagination.getPoundlistNo())){
poundlistNum++;
poundlistQueryWrapper.lambda().like(PoundlistEntity::getPoundlistNo,poundlistPagination.getPoundlistNo());
}
if(StringUtil.isNotEmpty(poundlistPagination.getIsInvoicing())){
poundlistNum++;
poundlistQueryWrapper.lambda().eq(PoundlistEntity::getIsInvoicing,poundlistPagination.getIsInvoicing());
}
if(StringUtil.isNotEmpty(poundlistPagination.getIsPay())){
poundlistNum++;
poundlistQueryWrapper.lambda().eq(PoundlistEntity::getIsPay,poundlistPagination.getIsPay());
poundlistPagination.setStartDate(new Date(fir));
poundlistPagination.setEndDate(DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
}
if(StringUtil.isNotEmpty(poundlistPagination.getIsCollection())){
poundlistNum++;
poundlistQueryWrapper.lambda().eq(PoundlistEntity::getIsCollection,poundlistPagination.getIsCollection());
}
if(StringUtil.isNotEmpty(poundlistPagination.getIsExpense())){
poundlistNum++;
poundlistQueryWrapper.lambda().eq(PoundlistEntity::getIsExpense,poundlistPagination.getIsExpense());
}
if(StringUtil.isNotEmpty(poundlistPagination.getMaterialName())){
QueryWrapper<MaterialEntity> materialQueryWrapper =new QueryWrapper<>();
materialQueryWrapper.lambda().like(MaterialEntity::getItemName, poundlistPagination.getMaterialName());
materialQueryWrapper.lambda().select(MaterialEntity::getId);
List<String> materialIdList = materialService.listObjs(materialQueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
poundlistNum++;
if(materialIdList.size() > 0){
poundlistQueryWrapper.lambda().in(PoundlistEntity::getMaterialId,materialIdList);
}else{
poundlistQueryWrapper.lambda().eq(PoundlistEntity::getMaterialId, poundlistPagination.getMaterialName());
}
}
if(StringUtil.isNotEmpty(poundlistPagination.getVehicleName())){
QueryWrapper<VehicleEntity> vehicleQueryWrapper =new QueryWrapper<>();
vehicleQueryWrapper.lambda().like(VehicleEntity::getTicketno, poundlistPagination.getVehicleName());
vehicleQueryWrapper.lambda().select(VehicleEntity::getId);
List<String> customerIdList = vehicleService.listObjs(vehicleQueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
poundlistNum++;
if(customerIdList.size() > 0){
poundlistQueryWrapper.lambda().in(PoundlistEntity::getVehicleId,customerIdList);
}else{
poundlistQueryWrapper.lambda().eq(PoundlistEntity::getVehicleId, poundlistPagination.getVehicleName());
}
}
if(StringUtil.isNotEmpty(poundlistPagination.getPurchaseName())){
QueryWrapper<ContractFileEntity> contractFileQueryWrapper =new QueryWrapper<>();
contractFileQueryWrapper.lambda().like(ContractFileEntity::getContractName, poundlistPagination.getPurchaseName());
contractFileQueryWrapper.lambda().select(ContractFileEntity::getId);
List<String> customerIdList = contractFileService.listObjs(contractFileQueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
poundlistNum++;
if(customerIdList.size() > 0){
poundlistQueryWrapper.lambda().in(PoundlistEntity::getPurchaseId,customerIdList);
}else{
poundlistQueryWrapper.lambda().eq(PoundlistEntity::getPurchaseId, poundlistPagination.getPurchaseName());
}
}
if(StringUtil.isNotEmpty(poundlistPagination.getSalesName())){
QueryWrapper<ContractFileEntity> contractFileQueryWrapper =new QueryWrapper<>();
contractFileQueryWrapper.lambda().like(ContractFileEntity::getContractName, poundlistPagination.getSalesName());
contractFileQueryWrapper.lambda().select(ContractFileEntity::getId);
List<String> customerIdList = contractFileService.listObjs(contractFileQueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
poundlistNum++;
if(customerIdList.size() > 0){
poundlistQueryWrapper.lambda().in(PoundlistEntity::getSalesId,customerIdList);
}else{
poundlistQueryWrapper.lambda().eq(PoundlistEntity::getSalesId, poundlistPagination.getSalesName());
}
}
if(StringUtil.isNotEmpty(poundlistPagination.getCustomerName())){
QueryWrapper<CustomerEntity> customerQueryWrapper =new QueryWrapper<>();
customerQueryWrapper.lambda().like(CustomerEntity::getSupplierNm, poundlistPagination.getCustomerName());
customerQueryWrapper.lambda().select(CustomerEntity::getId);
List<String> customerIdList = customerService.listObjs(customerQueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
poundlistNum++;
if(customerIdList.size() > 0){
poundlistQueryWrapper.lambda().in(PoundlistEntity::getCustomerId,customerIdList);
}else{
poundlistQueryWrapper.lambda().eq(PoundlistEntity::getCustomerId, poundlistPagination.getCustomerName());
}
}
if(StringUtil.isNotEmpty(poundlistPagination.getSupplierName())){
QueryWrapper<SupplierEntity> customerQueryWrapper =new QueryWrapper<>();
customerQueryWrapper.lambda().like(SupplierEntity::getSupplierName, poundlistPagination.getSupplierName());
customerQueryWrapper.lambda().select(SupplierEntity::getId);
List<String> customerIdList = supplierService.listObjs(customerQueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
poundlistNum++;
if(customerIdList.size() > 0){
poundlistQueryWrapper.lambda().in(PoundlistEntity::getSupplierId,customerIdList);
}else{
poundlistQueryWrapper.lambda().eq(PoundlistEntity::getSupplierId, poundlistPagination.getSupplierName());
}
}
if(AllIdList.size()>0){
poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, AllIdList);
}
//排序
if(StringUtil.isEmpty(poundlistPagination.getSidx())){
poundlistQueryWrapper.lambda().orderByDesc(PoundlistEntity::getId);
poundlistPagination.setSidx("CREATOR_TIME");
poundlistPagination.setSort("DESC");
}else{
try {
String sidx = poundlistPagination.getSidx();
@ -219,19 +121,14 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
Field declaredField = poundlistEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
poundlistQueryWrapper="asc".equals(poundlistPagination.getSort().toLowerCase())?poundlistQueryWrapper.orderByAsc(value):poundlistQueryWrapper.orderByDesc(value);
poundlistPagination.setSidx(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
if((total>0 && AllIdList.size()>0) || total==0){
Page<PoundlistEntity> page=new Page<>(poundlistPagination.getCurrentPage(), poundlistPagination.getPageSize());
IPage<PoundlistEntity> userIPage=this.page(page, poundlistQueryWrapper);
return poundlistPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{
List<PoundlistEntity> list = new ArrayList();
return poundlistPagination.setData(list, list.size());
}
IPage<PoundlistEntity> iPage = poundlistMapper.queryByKeyword(page, poundlistPagination);
return poundlistPagination.setData(iPage.getRecords(),iPage.getTotal());
}
@Override
public List<PoundlistEntity> getTypeList(PoundlistPagination poundlistPagination,String dataType){

@ -16,20 +16,32 @@ import jnpf.base.vo.DownloadVO;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
import jnpf.config.ConfigValueUtil;
import jnpf.contractfile.entity.ContractFileEntity;
import jnpf.contractfile.service.ContractFileService;
import jnpf.exception.DataException;
import jnpf.materialvo.entity.MaterialEntity;
import jnpf.materialvo.service.MaterialService;
import jnpf.mobilePort.utils.FileCopy;
import jnpf.payment.model.payment.PaymentListVO;
import jnpf.payment.service.PaymentService;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService;
import jnpf.purchaseback.entity.PurchasebackEntity;
import jnpf.purchaseback.entity.PurchaseorderEntity;
import jnpf.purchaseback.service.PurchasebackService;
import jnpf.purchaseback.service.PurchaseorderService;
import jnpf.purchaseorder.entity.*;
import jnpf.purchaseorder.model.purchaseorder.*;
import jnpf.purchaseorder.service.*;
import jnpf.reservoirarea.entity.ReservoirareaEntity;
import jnpf.reservoirarea.service.ReservoirareaService;
import jnpf.util.*;
import jnpf.util.enums.FileTypeEnum;
import jnpf.util.file.UploadUtil;
import jnpf.warehouse.service.WareHouseService;
import lombok.Cleanup;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
@ -71,10 +83,12 @@ public class PurchaseorderController {
@Autowired
private UserProvider userProvider;
@Autowired
private PaymentService paymentService;
@Autowired
private PurchaseorderitemService purchaseorderitemService;
@Autowired
private PurchasebackService purchasebackService;
@Autowired
private Purchaseorder_item0Service purchaseorder_item0Service;
@Autowired
@ -91,7 +105,16 @@ public class PurchaseorderController {
private InvoicesitemService invoicesitemService;
@Autowired
private PurchaseorderService purchaseorderService;
@Autowired
private PoundlistService poundlistService;
@Autowired
private MaterialService materialService;
@Autowired
private ReservoirareaService reservoirareaService;
@Autowired
private WareHouseService wareHouseService;
@Autowired
private ContractFileService contractFileService;
/**
*
@ -106,6 +129,11 @@ public class PurchaseorderController {
if (purchaseorder.getInvoiceAmount().equals(purchaseorder.getAmount()) && purchaseorder.getInvoiceAmount().equals(purchaseorder.getPayPrice())){
purchaseorder.setStatus("3");
purchaseorderitemService.updateById(purchaseorder);
List<PoundlistEntity> poundlistEntityList = purchaseorderitemService.getPoundList(purchaseorder.getId());
for (PoundlistEntity poundlistEntity : poundlistEntityList) {
poundlistEntity.setPurchaseStatus("3");
poundlistService.updateById(poundlistEntity);
}
return ActionResult.success("归档成功!");
}else{
return ActionResult.fail("发票金额、金额、已付款金额三者不一致!");
@ -155,15 +183,15 @@ public class PurchaseorderController {
List<PurchaseorderitemEntity> list= purchaseorderitemService.getList(purchaseorderPagination);
//处理id字段转名称若无需转或者为空可删除
for(PurchaseorderitemEntity entity:list){
Map<String,Object> contractNameMap = new HashMap<>();
entity.setContractName(generaterSwapUtil.getPopupSelectValue("390143765857220229","contract_name","contract_name",entity.getContractName(),contractNameMap));
Map<String,Object> contractCodeMap = new HashMap<>();
entity.setContractName(generaterSwapUtil.getPopupSelectValue("390143765857220229","id","contract_name",entity.getContractCode(),contractCodeMap));
Map<String,Object> supplierIdMap = new HashMap<>();
entity.setSupplierName(generaterSwapUtil.getPopupSelectValue("397751667988199621","id","supplier_name",entity.getSupplierId(),supplierIdMap));
entity.setCreatorUserName(generaterSwapUtil.userSelectValue(entity.getCreatorUserName()));
}
List<PurchaseorderListVO> listVO=JsonUtil.getJsonToList(list,PurchaseorderListVO.class);
for(PurchaseorderListVO purchaseorderVO:listVO){
}
PageListVO vo=new PageListVO();
vo.setList(listVO);
PaginationVO page=JsonUtil.getJsonToBean(purchaseorderPagination,PaginationVO.class);
@ -186,15 +214,23 @@ public class PurchaseorderController {
purchaseorderCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("cgdj", false));
purchaseorderCrForm.setCreatorUserName(userInfo.getUserId());
purchaseorderCrForm.setCreatorTime(DateUtil.getNow());
purchaseorderCrForm.setStatus("0");//待开票
purchaseorderCrForm.setSourceSystem("0");//人工创建
purchaseorderCrForm.setIsSettle("0");//未结算
purchaseorderCrForm.setIsTransfer("0");//未转销售
PurchaseorderitemEntity entity = JsonUtil.getJsonToBean(purchaseorderCrForm, PurchaseorderitemEntity.class);
entity.setId(mainId);
entity.setStatus(null);
purchaseorderitemService.save(entity);
List<Purchaseorder_item0Entity> Purchaseorder_item0List = JsonUtil.getJsonToList(purchaseorderCrForm.getPurchaseorder_item0List(),Purchaseorder_item0Entity.class);
for(Purchaseorder_item0Entity entitys : Purchaseorder_item0List){
entitys.setId(RandomUtil.uuId());
entitys.setPurchaseorderId(entity.getId());
purchaseorder_item0Service.save(entitys);
PoundlistEntity poundlistEntity = poundlistService.getById(entitys.getPoundlistId());
poundlistEntity.setSettlement(entitys.getSettlement());
poundlistEntity.setPurchasePrice(entitys.getPrice());
poundlistEntity.setPurchaseStatus("0");
poundlistService.updateById(poundlistEntity);
}
//
// List<Invoices_item0itemEntity> Invoices_item0itemList = JsonUtil.getJsonToList(purchaseorderCrForm.getInvoices_item0itemList(),Invoices_item0itemEntity.class);
@ -458,6 +494,32 @@ public class PurchaseorderController {
}
/**
*
*
* @param ids
* @return
*/
@GetMapping("/batchQueryPurchaseorder/{ids}")
@Transactional
public ActionResult<List<PurchaseorderitemEntity>> batchQueryPurchaseorder(@PathVariable("ids") String ids){
List<PurchaseorderitemEntity> list = new ArrayList<>();
String[] idList = ids.split(",");
for (String id: idList) {
PurchaseorderitemEntity entity= purchaseorderitemService.getInfo(id);
List<PoundlistEntity> poundlistEntityList = purchaseorderitemService.getPoundList(id);
entity.setPoundlistEntityList(poundlistEntityList);
if(entity != null && StringUtils.isNotEmpty(entity.getContractCode())){
ContractFileEntity contractFileEntity = contractFileService.getById(entity.getContractCode());
if(contractFileEntity != null && StringUtils.isNotEmpty(contractFileEntity.getContractName())){
entity.setContractNo(contractFileEntity.getContractCode());
}
}
list.add(entity);
}
return ActionResult.success(list);
}
/**
*
*
@ -476,6 +538,16 @@ public class PurchaseorderController {
//子表
List<Purchaseorder_item0Entity> Purchaseorder_item0List = purchaseorderitemService.GetPurchaseorder_item0List(id);
for(Purchaseorder_item0Entity purchaseorder_item0Entity : Purchaseorder_item0List){
if(StringUtils.isNotEmpty(purchaseorder_item0Entity.getMaterialId())){
MaterialEntity materialEntity = materialService.getById(purchaseorder_item0Entity.getMaterialId());
if(materialEntity != null && StringUtils.isNotEmpty(materialEntity.getInArea())){
purchaseorder_item0Entity.setReservoirareaId(materialEntity.getInArea());
ReservoirareaEntity reservoirareaEntity = reservoirareaService.getById(materialEntity.getInArea());
if(reservoirareaEntity != null && StringUtils.isNotEmpty(reservoirareaEntity.getWarehouseId())){
purchaseorder_item0Entity.setWarehouseId(reservoirareaEntity.getWarehouseId());
}
}
}
}
vo.setPurchaseorder_item0List(JsonUtil.getJsonToList(Purchaseorder_item0List,Purchaseorder_item0Model.class ));
QueryWrapper<InvoicesitemEntity> invoicesitemWrapper = new QueryWrapper<>();
@ -489,22 +561,12 @@ public class PurchaseorderController {
for(Invoices_item0itemEntity invoices_item0itemEntity : Invoices_item0itemList){
}
vo.setInvoices_item0itemList(JsonUtil.getJsonToList(Invoices_item0itemList,Invoices_item0itemModel.class ));
QueryWrapper<PaymentdocpoEntity> PaymentdocpoWrapper = new QueryWrapper<>();
PaymentdocpoWrapper.lambda().eq(PaymentdocpoEntity::getPurchaseOrderNo,entity.getDocumentNo());
List<PaymentdocpoEntity> paymentdocList = paymentdocpoService.list(PaymentdocpoWrapper);
List<PaymentitemEntity> PaymentitemList = new ArrayList<>();
for (PaymentdocpoEntity paymentdocpoEntity : paymentdocList) {
List<PaymentitemEntity> paymentitemlist = purchaseorderitemService.GetPaymentitemList(paymentdocpoEntity.getDocumentNo());
PaymentitemList.addAll(paymentitemlist);
}
for(PaymentitemEntity paymentitemEntity : PaymentitemList){
}
vo.setPaymentList(JsonUtil.getJsonToList(PaymentitemList, PaymentListVO.class ));
List<PurchasebackitemEntity> PurchasebackitemList = purchaseorderitemService.GetPurchasebackitemList(id);
for(PurchasebackitemEntity purchasebackitemEntity : PurchasebackitemList){
}
vo.setPurchasebackList(JsonUtil.getJsonToList(PurchasebackitemList, PurchasebackEntity.class ));
List<PaymentListVO> paymentList = paymentService.queryByPurchaseorderId(id);
vo.setPaymentList(paymentList);
QueryWrapper<PurchasebackEntity> purchasebackWrapper = new QueryWrapper<>();
purchasebackWrapper.lambda().eq(PurchasebackEntity::getPurchaseOrderId, id);
List<PurchasebackEntity> PurchasebackList = purchasebackService.list(purchasebackWrapper);
vo.setPurchasebackList(PurchasebackList);
List<CollectionpoEntity> CollectionitemList = purchaseorderitemService.GetCollectionitemList(entity.getDocumentNo());
for(CollectionpoEntity collectionpoEntity : CollectionitemList){
}
@ -513,6 +575,20 @@ public class PurchaseorderController {
return ActionResult.success(vo);
}
/**
*
*
* @param id
* @return
*/
@GetMapping("guidang/{id}")
public ActionResult<PurchaseorderInfoVO> guidang(@PathVariable("id") String id){
PurchaseorderitemEntity entity= purchaseorderitemService.getInfo(id);
entity.setStatus("3");
purchaseorderitemService.updateById(entity);
return ActionResult.success("归档成功");
}
/**
* ()
*
@ -528,15 +604,17 @@ public class PurchaseorderController {
List<Purchaseorder_item0Entity> jg_purchaseorder_item0List = purchaseorderitemService.GetPurchaseorder_item0List(id);
List<Purchaseorder_item0Model> jg_purchaseorder_item0ModelList = JsonUtil.getJsonToList(jg_purchaseorder_item0List,Purchaseorder_item0Model.class);
for(Purchaseorder_item0Model jg_purchaseorder_item0Model : jg_purchaseorder_item0ModelList){
// Map<String,Object> licenseNumMap = new HashMap<>();
// jg_purchaseorder_item0Model.setLicenseNum(generaterSwapUtil.getPopupSelectValue("389754644018016581","license_no","license_no",jg_purchaseorder_item0Model.getLicenseNum(),licenseNumMap));
Map<String,Object> vehicleIdMap = new HashMap<>();
jg_purchaseorder_item0Model.setVehicleId(generaterSwapUtil.getPopupSelectValue("389754644018016581","vehicle_id","ticketno",jg_purchaseorder_item0Model.getVehicleId(),vehicleIdMap));
Map<String,Object> materialIdMap = new HashMap<>();
jg_purchaseorder_item0Model.setMaterialId(generaterSwapUtil.getPopupSelectValue("397736371898382533","id","item_name",jg_purchaseorder_item0Model.getMaterialId(),materialIdMap));
}
vo.setPurchaseorder_item0List(jg_purchaseorder_item0ModelList);
// List<Invoices_item0itemEntity> jg_invoices_item0List = purchaseorderitemService.GetInvoices_item0itemList(id);
// List<Invoices_item0itemModel> jg_invoices_item0ModelList = JsonUtil.getJsonToList(jg_invoices_item0List,Invoices_item0itemModel.class);
// for(Invoices_item0itemModel jg_invoices_item0Model : jg_invoices_item0ModelList){
// }
// vo.setInvoices_item0itemList(jg_invoices_item0ModelList);
List<Invoices_item0itemEntity> jg_invoices_item0List = purchaseorderitemService.GetInvoices_item0itemList(id);
List<Invoices_item0itemModel> jg_invoices_item0ModelList = JsonUtil.getJsonToList(jg_invoices_item0List,Invoices_item0itemModel.class);
for(Invoices_item0itemModel jg_invoices_item0Model : jg_invoices_item0ModelList){
}
vo.setInvoices_item0itemList(jg_invoices_item0ModelList);
QueryWrapper<InvoicesitemEntity> invoicesitemWrapper = new QueryWrapper<>();
invoicesitemWrapper.lambda().eq(InvoicesitemEntity::getPurchaseorderId,id);
@ -550,34 +628,17 @@ public class PurchaseorderController {
}
vo.setInvoices_item0itemList(JsonUtil.getJsonToList(Invoices_item0itemList,Invoices_item0itemModel.class ));
// List<PaymentitemEntity> jg_paymentList = purchaseorderitemService.GetPaymentitemList(id);
// List<PaymentitemModel> jg_paymentModelList = JsonUtil.getJsonToList(jg_paymentList,PaymentitemModel.class);
// for(PaymentitemModel jg_paymentModel : jg_paymentModelList){
// }
// vo.setPaymentitemList(jg_paymentModelList);
QueryWrapper<PaymentdocpoEntity> PaymentdocpoWrapper = new QueryWrapper<>();
PaymentdocpoWrapper.lambda().eq(PaymentdocpoEntity::getPurchaseOrderNo,entity.getDocumentNo());
List<PaymentdocpoEntity> paymentdocList = paymentdocpoService.list(PaymentdocpoWrapper);
List<PaymentitemEntity> PaymentitemList = new ArrayList<>();
for (PaymentdocpoEntity paymentdocpoEntity : paymentdocList) {
List<PaymentitemEntity> paymentitemlist = purchaseorderitemService.GetPaymentitemList(paymentdocpoEntity.getDocumentNo());
PaymentitemList.addAll(paymentitemlist);
}
for(PaymentitemEntity paymentitemEntity : PaymentitemList){
}
vo.setPaymentList(JsonUtil.getJsonToList(PaymentitemList,PaymentListVO.class ));
List<PurchasebackitemEntity> jg_purchasebackList = purchaseorderitemService.GetPurchasebackitemList(id);
List<PurchasebackEntity> jg_purchasebackModelList = JsonUtil.getJsonToList(jg_purchasebackList,PurchasebackEntity.class);
for(PurchasebackEntity jg_purchasebackModel : jg_purchasebackModelList){
List<PaymentListVO> paymentList = paymentService.queryByPurchaseorderId(id);
vo.setPaymentList(paymentList);
QueryWrapper<PurchasebackEntity> purchasebackWrapper = new QueryWrapper<>();
purchasebackWrapper.lambda().eq(PurchasebackEntity::getPurchaseOrderId, id);
List<PurchasebackEntity> PurchasebackList = purchasebackService.list(purchasebackWrapper);
vo.setPurchasebackList(PurchasebackList);
List<CollectionpoEntity> jg_collectionList = purchaseorderitemService.GetCollectionitemList(id);
List<CollectionitemModel> jg_collectionModelList = JsonUtil.getJsonToList(jg_collectionList,CollectionitemModel.class);
for(CollectionitemModel jg_collectionModel : jg_collectionModelList){
}
vo.setPurchasebackList(jg_purchasebackModelList);
// List<CollectionpoEntity> jg_collectionList = purchaseorderitemService.GetCollectionitemList(id);
// List<CollectionitemModel> jg_collectionModelList = JsonUtil.getJsonToList(jg_collectionList,CollectionitemModel.class);
// for(CollectionitemModel jg_collectionModel : jg_collectionModelList){
// }
// vo.setCollectionitemList(jg_collectionModelList);
vo.setCollectionitemList(jg_collectionModelList);
List<CollectionpoEntity> CollectionitemList = purchaseorderitemService.GetCollectionitemList(entity.getDocumentNo());
for(CollectionpoEntity collectionpoEntity : CollectionitemList){
@ -587,8 +648,10 @@ public class PurchaseorderController {
//附表数据转换
//添加到详情表单对象中
Map<String,Object> contractNameMap = new HashMap<>();
// vo.setContractName(generaterSwapUtil.getPopupSelectValue("390143765857220229","contract_name","contract_name",vo.getContractName(),contractNameMap));
Map<String,Object> contractCodeMap = new HashMap<>();
vo.setContractCode(generaterSwapUtil.getPopupSelectValue("390143765857220229","id","contract_name",vo.getContractCode(),contractCodeMap));
Map<String,Object> supplierIdMap = new HashMap<>();
vo.setSupplierId(generaterSwapUtil.getPopupSelectValue("397751667988199621","id","supplier_name",vo.getSupplierId(),supplierIdMap));
vo.setCreatorUserName(generaterSwapUtil.userSelectValue(vo.getCreatorUserName()));
return ActionResult.success(vo);
@ -638,6 +701,11 @@ public class PurchaseorderController {
entitys.setId(RandomUtil.uuId());
entitys.setPurchaseorderId(entity.getId());
purchaseorder_item0Service.save(entitys);
PoundlistEntity poundlistEntity = poundlistService.getById(entitys.getPoundlistId());
poundlistEntity.setSettlement(entitys.getSettlement());
poundlistEntity.setPurchasePrice(entitys.getPrice());
poundlistService.updateById(poundlistEntity);
}
QueryWrapper<Invoices_item0itemEntity> Invoices_item0itemqueryWrapper = new QueryWrapper<>();
Invoices_item0itemqueryWrapper.lambda().eq(Invoices_item0itemEntity::getPurchaseorderId, entity.getId());
@ -659,12 +727,12 @@ public class PurchaseorderController {
paymentitemService.remove(queryWrapper);
}
List<PaymentitemEntity> PaymentitemList = JsonUtil.getJsonToList(purchaseorderUpForm.getPaymentList(), PaymentitemEntity.class);
/*List<PaymentitemEntity> PaymentitemList = JsonUtil.getJsonToList(purchaseorderUpForm.getPaymentitemList(), PaymentitemEntity.class);
for (PaymentitemEntity entitys : PaymentitemList) {
entitys.setId(RandomUtil.uuId());
entitys.setPaymentno(entitys.getPaymentno());
paymentitemService.save(entitys);
}
}*/
// QueryWrapper<PaymentitemEntity> PaymentitemqueryWrapper = new QueryWrapper<>();
// PaymentitemqueryWrapper.lambda().eq(PaymentitemEntity::getDocumentno, entity.getDocumentNo());
// paymentitemService.remove(PaymentitemqueryWrapper);
@ -675,11 +743,11 @@ public class PurchaseorderController {
// entitys.setDocumentno(entity.getDocumentNo());
// paymentitemService.save(entitys);
// }
QueryWrapper<PurchasebackitemEntity> PurchasebackitemqueryWrapper = new QueryWrapper<>();
/*QueryWrapper<PurchasebackitemEntity> PurchasebackitemqueryWrapper = new QueryWrapper<>();
PurchasebackitemqueryWrapper.lambda().eq(PurchasebackitemEntity::getPurchaseOrderId, entity.getId());
purchasebackitemService.remove(PurchasebackitemqueryWrapper);
List<PurchasebackitemEntity> PurchasebackitemList = JsonUtil.getJsonToList(purchaseorderUpForm.getPurchasebackList(), PurchasebackitemEntity.class);
List<PurchasebackitemEntity> PurchasebackitemList = JsonUtil.getJsonToList(purchaseorderUpForm.getPurchasebackitemList(), PurchasebackitemEntity.class);
for (PurchasebackitemEntity entitys : PurchasebackitemList) {
entitys.setId(RandomUtil.uuId());
entitys.setPurchaseOrderId(entity.getId());
@ -694,7 +762,7 @@ public class PurchaseorderController {
entitys.setId(RandomUtil.uuId());
entitys.setSalesOrderNo(entity.getDocumentNo());
collectionpoService.save(entitys);
}
}*/
return ActionResult.success("更新成功");
} else {

@ -4,6 +4,7 @@ import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jnpf.poundlist.entity.PoundlistEntity;
import lombok.Data;
import java.util.Date;
@ -17,6 +18,8 @@ import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
@ -149,4 +152,6 @@ public class PurchaseorderitemEntity {
@TableField("SUPPLIER_ID")
private String supplierId;
@TableField(exist = false)
private List<PoundlistEntity> poundlistEntityList;
}

@ -3,6 +3,7 @@ package jnpf.purchaseorder.service;
import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.exception.DataException;
import jnpf.mobilePort.entity.PurchaseOrderVO;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.purchaseorder.entity.*;
import jnpf.purchaseorder.model.purchaseorder.PurchaseorderDTO;
import jnpf.purchaseorder.model.purchaseorder.PurchaseorderPagination;
@ -55,5 +56,6 @@ public interface PurchaseorderitemService extends IService<PurchaseorderitemEnti
PurchaseOrderImportVo importData(List<PurchaseorderDTO> dataList) throws ParseException, DataException;
List<PoundlistEntity> getPoundList(String id);
//列表子表数据方法
}

@ -15,8 +15,12 @@ import jnpf.base.UserInfo;
import jnpf.base.vo.DownloadVO;
import jnpf.config.ConfigValueUtil;
import jnpf.exception.DataException;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService;
import jnpf.purchaseback.entity.PurchaseorderEntity;
import jnpf.purchaseback.service.PurchaseorderService;
import jnpf.purchaseorder.entity.PurchaseorderitemEntity;
import jnpf.purchaseorder.service.PurchaseorderitemService;
import org.springframework.transaction.annotation.Transactional;
import jnpf.base.entity.ProvinceEntity;
import jnpf.receiptin.model.receiptin.*;
@ -83,6 +87,12 @@ public class ReceiptinController {
@Autowired
private PurchaseorderService purchaseorderService;
@Autowired
private PurchaseorderitemService purchaseorderitemService;
@Autowired
private PoundlistService poundlistService;
/**
*
*
@ -139,10 +149,15 @@ public class ReceiptinController {
}
//采购订单状态为2
if(ObjectUtil.equal("0", entity.getType())){//采购入库
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(entity.getSouceno());
PurchaseorderitemEntity purchaseorderEntity = purchaseorderitemService.getById(entity.getSouceno());
purchaseorderEntity.setStatus("2");
purchaseorderEntity.setIssue("1");
purchaseorderService.updateById(purchaseorderEntity);
purchaseorderitemService.updateById(purchaseorderEntity);
List<PoundlistEntity> poundlistEntityList = purchaseorderitemService.getPoundList(purchaseorderEntity.getId());
for (PoundlistEntity poundlistEntity : poundlistEntityList) {
poundlistEntity.setPurchaseStatus("2");
poundlistService.updateById(poundlistEntity);
}
}
return ActionResult.success("创建成功");
}

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.poundlist.mapper.PoundlistMapper">
<resultMap id="purchorderItemMap" type="jnpf.poundlist.entity.PoundlistEntity" >
<!-- 制单人 -->
<result property="supplierId" column="SUPPLIER_ID"/>
<!-- 订单日期 -->
<result property="salesId" column="SALES_ID"/>
<!-- 对方合同号-->
<result property="id" column="id"/>
</resultMap>
<select id="queryByKeyword" resultMap="purchorderItemMap">
SELECT a.* from jg_poundlist a LEFT JOIN jg_vehicle b on a.vehicle_id = b.id
LEFT JOIN jg_supplier c on a.supplier_id = c.id
LEFT JOIN jg_customer d on a.customer_id = d.id
where a.is_examine = '1'
<if test="keyword != null and keyword != ''">
AND (b.ticketno LIKE CONCAT('%',#{keyword},'%') OR c.supplier_name LIKE CONCAT('%',#{keyword},'%') OR d.supplier_nm LIKE CONCAT('%',#{keyword},'%')) ORDER BY a.creator_time desc
</if>
</select>
</mapper>

@ -55,4 +55,60 @@ WHERE
</select>
<select id="queryByKeyword" resultType="jnpf.poundlist.entity.PoundlistEntity">
SELECT a.*,b.ticketno vehicleName,c.supplier_name supplierName,d.supplier_nm customerName,e.item_name materialName,f.contract_name salesName,g.contract_name purchaseName,h.F_RealName businessName,i.name naturalName,g.contract_no purchaseContractNo
from jg_poundlist a
LEFT JOIN jg_vehicle b on a.vehicle_id = b.id
LEFT JOIN jg_supplier c on a.supplier_id = c.id
LEFT JOIN jg_customer d on a.customer_id = d.id
LEFT JOIN jg_material e on a.material_id = e.id
LEFT JOIN jg_contract f on a.sales_id = f.id
LEFT JOIN jg_contract g on a.purchase_id = g.id
LEFT JOIN base_user h on a.business_id = h.f_id
LEFT JOIN jg_natural i on a.natural_id = i.id
where a.is_examine = '1'
<if test="poundlistPagination.keyword != null and poundlistPagination.keyword != ''">
AND (b.ticketno LIKE CONCAT('%',#{poundlistPagination.keyword},'%') OR c.supplier_name LIKE CONCAT('%',#{poundlistPagination.keyword},'%') OR d.supplier_nm LIKE CONCAT('%',#{poundlistPagination.keyword},'%'))
</if>
<if test="poundlistPagination.startDate != null and poundlistPagination.endDate != null">
AND a.POUND_DATE &gt; #{poundlistPagination.startDate} AND a.POUND_DATE &lt;= #{poundlistPagination.endDate}
</if>
<if test="poundlistPagination.poundlistNo != null and poundlistPagination.poundlistNo != ''">
AND a.POUNDLIST_NO LIKE CONCAT('%',#{poundlistPagination.poundlistNo},'%')
</if>
<if test="poundlistPagination.isInvoicing != null and poundlistPagination.isInvoicing != ''">
AND a.is_Invoicing = #{poundlistPagination.isInvoicing}
</if>
<if test="poundlistPagination.isPay != null and poundlistPagination.isPay != ''">
AND a.is_pay = #{poundlistPagination.isPay}
</if>
<if test="poundlistPagination.isCollection != null and poundlistPagination.isCollection != ''">
AND a.is_collection = #{poundlistPagination.isCollection}
</if>
<if test="poundlistPagination.isExpense != null and poundlistPagination.isExpense != ''">
AND a.is_expense = #{poundlistPagination.isExpense}
</if>
<if test="poundlistPagination.materialName != null and poundlistPagination.materialName != ''">
AND e.item_name LIKE CONCAT('%',#{poundlistPagination.materialName},'%')
</if>
<if test="poundlistPagination.vehicleName != null and poundlistPagination.vehicleName != ''">
AND b.ticketno LIKE CONCAT('%',#{poundlistPagination.vehicleName},'%')
</if>
<if test="poundlistPagination.purchaseName != null and poundlistPagination.purchaseName != ''">
AND g.contract_name LIKE CONCAT('%',#{poundlistPagination.purchaseName},'%')
</if>
<if test="poundlistPagination.salesName != null and poundlistPagination.salesName != ''">
AND f.contract_name LIKE CONCAT('%',#{poundlistPagination.salesName},'%')
</if>
<if test="poundlistPagination.customerName != null and poundlistPagination.customerName != ''">
AND d.supplier_nm LIKE CONCAT('%',#{poundlistPagination.customerName},'%')
</if>
<if test="poundlistPagination.supplierName != null and poundlistPagination.supplierName != ''">
AND c.supplier_name LIKE CONCAT('%',#{poundlistPagination.supplierName},'%')
</if>
<if test="poundlistPagination.sidx != null and poundlistPagination.sidx != ''">
ORDER BY ${poundlistPagination.sidx} ${poundlistPagination.sort}
</if>
</select>
</mapper>

@ -0,0 +1,25 @@
import request from '@/utils/request'
// 导入
export function ImportData(data) {
return request({
url: '/api/invoices/Invoices/ImportData',
method: 'post',
data
})
}
// 导入预览
export function ImportPreview(data) {
return request({
url: '/api/invoices/Invoices/ImportPreview',
method: 'get',
data
})
}
//模板下载
export function TemplateDownload() {
return request({
url: '/api/invoices/Invoices/TemplateDownload',
method: 'get'
})
}

@ -0,0 +1,25 @@
import request from '@/utils/request'
// 导入
export function ImportData(data) {
return request({
url: '/api/purchaseorder/Purchaseorder/ImportData',
method: 'post',
data
})
}
// 导入预览
export function ImportPreview(data) {
return request({
url: '/api/purchaseorder/Purchaseorder/ImportPreview',
method: 'get',
data
})
}
//模板下载
export function TemplateDownload() {
return request({
url: '/api/purchaseorder/Purchaseorder/TemplateDownload',
method: 'get'
})
}

@ -77,7 +77,7 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="相关附件" prop="fileJson">
<el-form-item label="相关附件1" prop="fileJson">
<ul class="el-upload-list el-upload-list--text">
<li class="el-upload-list__item" v-for="(item,i) in fileList" :key="i"
@click="download(item.fileId)">

@ -193,23 +193,24 @@
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.invoicesitem0List" size='mini' show-summary :summary-method="getSummaries2" >
<el-table :data="dataForm.invoicesitem0List" size='mini' show-summary
:summary-method="getSummaries2">
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="materialName" label="物料名称">
<el-table-column prop="materialName" width="150" label="物料名称">
<template slot-scope="scope">
<el-input v-model="scope.row.materialName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="invoiceCode" label="发票代码">
<el-table-column prop="invoiceCode" width="150" label="发票代码">
<template slot-scope="scope">
<el-input v-model="scope.row.invoiceCode" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="invoiceNo" label="发票号码">
<el-table-column prop="invoiceNo" width="150" label="发票号码">
<template slot-scope="scope">
<el-input v-model="scope.row.invoiceNo" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
@ -220,22 +221,24 @@
<!-- <el-input v-model="scope.row.invoiceQuantity" placeholder="请输入" clearable
:style='{"width":"100%"}' @change="invoiceQuantityChange">
</el-input> -->
<el-input-number v-model="scope.row.invoiceQuantity" placeholder="数字文本" :step="1" :style='{"width":"100%"}' @change="invoiceQuantityChange">
<el-input-number v-model="scope.row.invoiceQuantity" placeholder="数字文本" :step="1"
:style='{"width":"100%"}' @change="invoiceQuantityChange">
</el-input-number>
</template>
</el-table-column>
<el-table-column prop="invoiceAmount" label="发票金额" width="150" >
<el-table-column prop="invoiceAmount" label="发票金额" width="200">
<template slot-scope="scope">
<!-- <el-input v-model="scope.row.invoiceAmount" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input> -->
<el-input-number v-model="scope.row.invoiceAmount" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' @change="invoiceAmountChange">
<el-input-number v-model="scope.row.invoiceAmount" placeholder="数字文本" :step="1" :precision="6"
:style='{"width":"100%"}' @change="invoiceAmountChange">
</el-input-number>
</template>
</el-table-column>
<el-table-column prop="taxRate" label="税率">
<el-table-column prop="taxRate" label="税率" width="200">
<template slot-scope="scope">
<el-select v-model="scope.row.taxRate" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName"
@ -243,20 +246,23 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="taxAmount" label="税额">
<el-table-column prop="taxAmount" label="税额" width="200">
<template slot-scope="scope">
<el-input v-model="scope.row.taxAmount" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
<el-input-number v-model="scope.row.taxAmount" placeholder="数字文本" :step="1" :precision="6"
:style='{"width":"100%"}'>
</el-input-number>
</template>
</el-table-column>
<el-table-column prop="amountNotTax" label="不含税金额">
<el-table-column prop="amountNotTax" label="不含税金额" width="200">
<template slot-scope="scope">
<el-input v-model="scope.row.amountNotTax" placeholder="请输入" clearable
<el-input-number v-model="scope.row.amountNotTax" placeholder="数字文本" :step="1" :precision="6"
:style='{"width":"100%"}'>
</el-input>
</el-input-number>
</template>
</el-table-column>
<el-table-column prop="invoiceStatus" label="发票状态 ">
<el-table-column prop="invoiceStatus" label="发票状态 " width="150">
<template slot-scope="scope">
<el-select v-model="scope.row.invoiceStatus" placeholder="请选择" clearable
:style='{"width":"100%"}'>
@ -265,30 +271,36 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="creatorUserName" label="开票人">
<el-table-column prop="creatorUserName" label="开票人" width="200">
<template slot-scope="scope">
<el-input v-model="scope.row.creatorUserName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="invoicingDate" label="开票日期">
<el-table-column prop="invoicingDate" label="开票日期" width="200">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.invoicingDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</template>
</el-table-column>
<el-table-column label="操作" width="50">
<el-table-column prop="invoiceAttachment" label="发票附件" width="200">
<template slot-scope="scope">
<JNPF-UploadFz v-model="scope.row.invoiceAttachment" :fileSize="20" sizeUnit="MB" :limit="9" buttonText="点击上传">
</JNPF-UploadFz>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delinvoicesitem0List(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<div class="table-actions" @click="addinvoicesitem0List()">
<!-- <div class="table-actions" @click="addinvoicesitem0List()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</div> -->
</el-form-item>
</el-col>
</el-tab-pane>
@ -669,6 +681,7 @@
invoiceStatus: undefined,
creatorUserName: undefined,
invoicingDate: undefined,
invoiceAttachment:undefined,
}
this.dataForm.invoicesitem0List.push(item)
},
@ -682,6 +695,7 @@
}
for (let i = 0; i < _data.invoicesitem0List.length; i++) {
var _list = _data.invoicesitem0List[i];
_list.invoiceAttachment = JSON.stringify(_list.invoiceAttachment)
}
return _data;
},
@ -692,6 +706,7 @@
}
for (let i = 0; i < _dataAll.invoicesitem0List.length; i++) {
var _list = _dataAll.invoicesitem0List[i];
_list.invoiceAttachment = JSON.parse(_list.invoiceAttachment)
}
this.dataForm = _dataAll
},

@ -6,7 +6,8 @@
<template v-if="!loading">
<el-col :span="8">
<el-form-item label="单据编号" prop="documentNo">
<el-input v-model="dataForm.documentNo" placeholder="请输入单据编号" clearable :style='{"width":"100%"}' readonly>
<el-input v-model="dataForm.documentNo" placeholder="请输入单据编号" clearable :style='{"width":"100%"}'
readonly>
</el-input>
</el-form-item>
@ -21,14 +22,16 @@
</el-col>
<el-col :span="8">
<el-form-item label="金额" prop="amount">
<el-input-number v-model="dataForm.amount" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' :disabled="true">
<el-input-number v-model="dataForm.amount" placeholder="数字文本" :step="1" :precision="6"
:style='{"width":"100%"}' :disabled="true">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="数量" prop="quantity">
<el-input-number v-model="dataForm.quantity" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' :disabled="true">
<el-input-number v-model="dataForm.quantity" placeholder="数字文本" :step="1" :precision="6"
:style='{"width":"100%"}' :disabled="true">
</el-input-number>
</el-form-item>
@ -44,8 +47,10 @@
</el-col>
<el-col :span="8">
<el-form-item label="币别 " prop="currency">
<el-select v-model="dataForm.currency" placeholder="请选择" clearable :style='{"width":"100%"}' :disabled="true">
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id"></el-option>
<el-select v-model="dataForm.currency" placeholder="请选择" clearable :style='{"width":"100%"}'
:disabled="true">
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName"
:value="item.id"></el-option>
</el-select>
</el-form-item>
@ -61,14 +66,16 @@
</el-col> -->
<el-col :span="8">
<el-form-item label="发票金额" prop="invoiceAmount">
<el-input-number v-model="dataForm.invoiceAmount" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' :disabled="true">
<el-input-number v-model="dataForm.invoiceAmount" placeholder="数字文本" :step="1" :precision="6"
:style='{"width":"100%"}' :disabled="true">
</el-input-number>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="发票数量" prop="invoiceQuantity">
<el-input-number v-model="dataForm.invoiceQuantity" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' :disabled="true">
<el-input-number v-model="dataForm.invoiceQuantity" placeholder="数字文本" :step="1" :precision="6"
:style='{"width":"100%"}' :disabled="true">
</el-input-number>
</el-form-item>
@ -117,38 +124,44 @@
<el-form-item label-width="0">
<div class="JNPF-common-title">
</div>
<el-table :data="dataForm.invoicesitem1List" size='mini' show-summary :summary-method="getSummaries" >
<el-table :data="dataForm.invoicesitem1List" size='mini' show-summary
:summary-method="getSummaries">
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="materialId" label="物料">
<template slot-scope="scope">
<popupSelect v-model="scope.row.materialId" placeholder="请选择" clearable
:field="'materialId'+scope.$index" interfaceId="397736371898382533"
:columnOptions="invoicesitem1materialIdcolumnOptions" propsValue="id"
relationField="item_name" popupType="dialog" popupWidth="800px" hasPage :pageSize="20" :disabled="true">
relationField="item_name" popupType="dialog" popupWidth="800px" hasPage :pageSize="20"
:disabled="true">
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="quantity" label="结算重量">
<template slot-scope="scope">
<el-input v-model="scope.row.quantity" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
<el-input v-model="scope.row.quantity" placeholder="请输入" clearable :style='{"width":"100%"}'
:disabled="true">
</el-input>
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope">
<el-input v-model="scope.row.unitPrice" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
<el-input v-model="scope.row.unitPrice" placeholder="请输入" clearable :style='{"width":"100%"}'
:disabled="true">
</el-input>
</template>
</el-table-column>
<el-table-column prop="amount" label="金额">
<template slot-scope="scope">
<el-input v-model="scope.row.amount" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
<el-input v-model="scope.row.amount" placeholder="请输入" clearable :style='{"width":"100%"}'
:disabled="true">
</el-input>
</template>
</el-table-column>
<el-table-column prop="taxRate" label="税率">
<template slot-scope="scope">
<el-select v-model="scope.row.taxRate" placeholder="请选择 " clearable :style='{"width":"100%"}' :disabled="true">
<el-select v-model="scope.row.taxRate" placeholder="请选择 " clearable :style='{"width":"100%"}'
:disabled="true">
<el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
@ -156,7 +169,8 @@
</el-table-column>
<el-table-column prop="taxAmount" label="税额">
<template slot-scope="scope">
<el-input v-model="scope.row.taxAmount" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
<el-input v-model="scope.row.taxAmount" placeholder="请输入" clearable :style='{"width":"100%"}'
:disabled="true">
</el-input>
</template>
</el-table-column>
@ -169,7 +183,8 @@
</el-table-column>
<el-table-column prop="remark" label="备注信息">
<template slot-scope="scope">
<el-input v-model="scope.row.remark" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
<el-input v-model="scope.row.remark" placeholder="请输入" clearable :style='{"width":"100%"}'
:disabled="true">
</el-input>
</template>
</el-table-column>
@ -192,23 +207,24 @@
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.invoicesitem0List" size='mini' show-summary :summary-method="getSummaries2" >
<el-table :data="dataForm.invoicesitem0List" size='mini' show-summary
:summary-method="getSummaries2">
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="materialName" label="物料名称">
<el-table-column prop="materialName" width="150" label="物料名称">
<template slot-scope="scope">
<el-input v-model="scope.row.materialName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="invoiceCode" label="发票代码">
<el-table-column prop="invoiceCode" width="150" label="发票代码">
<template slot-scope="scope">
<el-input v-model="scope.row.invoiceCode" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="invoiceNo" label="发票号码">
<el-table-column prop="invoiceNo" width="150" label="发票号码">
<template slot-scope="scope">
<el-input v-model="scope.row.invoiceNo" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
@ -219,22 +235,24 @@
<!-- <el-input v-model="scope.row.invoiceQuantity" placeholder="请输入" clearable
:style='{"width":"100%"}' @change="invoiceQuantityChange">
</el-input> -->
<el-input-number v-model="scope.row.invoiceQuantity" placeholder="数字文本" :step="1" :style='{"width":"100%"}' @change="invoiceQuantityChange">
<el-input-number v-model="scope.row.invoiceQuantity" placeholder="数字文本" :step="1"
:style='{"width":"100%"}' @change="invoiceQuantityChange">
</el-input-number>
</template>
</el-table-column>
<el-table-column prop="invoiceAmount" label="发票金额" width="150" >
<el-table-column prop="invoiceAmount" label="发票金额" width="200">
<template slot-scope="scope">
<!-- <el-input v-model="scope.row.invoiceAmount" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input> -->
<el-input-number v-model="scope.row.invoiceAmount" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' @change="invoiceAmountChange">
<el-input-number v-model="scope.row.invoiceAmount" placeholder="数字文本" :step="1" :precision="6"
:style='{"width":"100%"}' @change="invoiceAmountChange">
</el-input-number>
</template>
</el-table-column>
<el-table-column prop="taxRate" label="税率">
<el-table-column prop="taxRate" label="税率" width="200">
<template slot-scope="scope">
<el-select v-model="scope.row.taxRate" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName"
@ -242,21 +260,23 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="taxAmount" label="税额">
<el-table-column prop="taxAmount" label="税额" width="200">
<template slot-scope="scope">
<el-input-number v-model="scope.row.taxAmount" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}'>
<el-input-number v-model="scope.row.taxAmount" placeholder="数字文本" :step="1" :precision="6"
:style='{"width":"100%"}'>
</el-input-number>
</template>
</el-table-column>
<el-table-column prop="amountNotTax" label="不含税金额">
<el-table-column prop="amountNotTax" label="不含税金额" width="200">
<template slot-scope="scope">
<el-input-number v-model="scope.row.amountNotTax" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}'>
<el-input-number v-model="scope.row.amountNotTax" placeholder="数字文本" :step="1" :precision="6"
:style='{"width":"100%"}'>
</el-input-number>
</template>
</el-table-column>
<el-table-column prop="invoiceStatus" label="发票状态 ">
<el-table-column prop="invoiceStatus" label="发票状态 " width="150">
<template slot-scope="scope">
<el-select v-model="scope.row.invoiceStatus" placeholder="请选择" clearable
:style='{"width":"100%"}'>
@ -265,20 +285,26 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="creatorUserName" label="开票人">
<el-table-column prop="creatorUserName" label="开票人" width="200">
<template slot-scope="scope">
<el-input v-model="scope.row.creatorUserName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="invoicingDate" label="开票日期">
<el-table-column prop="invoicingDate" label="开票日期" width="200">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.invoicingDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</template>
</el-table-column>
<el-table-column prop="invoiceAttachment" label="发票附件" width="200">
<template slot-scope="scope">
<JNPF-UploadFz v-model="scope.row.invoiceAttachment" :fileSize="20" sizeUnit="MB" :limit="9" buttonText="点击上传">
</JNPF-UploadFz>
</template>
</el-table-column>
<el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@ -298,13 +324,16 @@
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button type="primary" icon="el-icon-upload2" @click="uploadForm"></el-button>
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button>
</span>
<ImportForm v-if="importFormVisible" ref="importForm" @importData="importData" />
</el-dialog>
</template>
<script>
import request from '@/utils/request'
import ImportForm from '../purchaseorder/ImportForm'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
@ -312,10 +341,11 @@
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
components: { ImportForm },
props: [],
data() {
return {
importFormVisible: false,
visible: false,
loading: false,
isDetail: false,
@ -476,8 +506,35 @@
created() {},
mounted() {},
methods: {
importData(param){
param.checkedList.forEach((column, index) => {
if(column.taxRate == '0.13'){
column.taxRate = '0';
}else if(column.taxRate == '0.09'){
column.taxRate = '1';
}else if(column.taxRate == '0.06'){
column.taxRate = '2';
}else if(column.taxRate == '0.05'){
column.taxRate = '3';
}else if(column.taxRate == '0.03'){
column.taxRate = '4';
}else if(column.taxRate == '0'){
column.taxRate = '5';
}
this.dataForm.invoicesitem0List.push(column);
});
},
uploadForm() {
this.importFormVisible = true
this.$nextTick(() => {
this.$refs.importForm.init()
})
},
getSummaries(param) {
const { columns, data } = param;
const {
columns,
data
} = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
@ -502,7 +559,10 @@
return sums;
},
getSummaries2(param) {
const { columns, data } = param;
const {
columns,
data
} = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
@ -669,6 +729,7 @@
invoiceStatus: undefined,
creatorUserName: undefined,
invoicingDate: undefined,
invoiceAttachment:undefined,
}
this.dataForm.invoicesitem0List.push(item)
},
@ -682,6 +743,7 @@
}
for (let i = 0; i < _data.invoicesitem0List.length; i++) {
var _list = _data.invoicesitem0List[i];
_list.invoiceAttachment = JSON.stringify(_list.invoiceAttachment)
}
return _data;
},
@ -692,6 +754,7 @@
}
for (let i = 0; i < _dataAll.invoicesitem0List.length; i++) {
var _list = _dataAll.invoicesitem0List[i];
_list.invoiceAttachment = JSON.parse(_list.invoiceAttachment)
}
this.dataForm = _dataAll
},

@ -9,6 +9,7 @@
<el-input v-model="query.documentNo" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<template v-if="showAll">
<el-col :span="6">
<el-form-item label="采购订单号">
<el-input v-model="query.souceno" placeholder="请输入" clearable> </el-input>
@ -32,10 +33,15 @@
</el-date-picker>
</el-form-item>
</el-col>
</template>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">展开</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
收起</el-button>
</el-form-item>
</el-col>
</el-form>
@ -126,6 +132,7 @@
},
data() {
return {
showAll: false,
detailVisible: false,
query: {
documentNo: undefined,

@ -118,6 +118,13 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="付款凭证" prop="voucher">
<JNPF-UploadFz v-model="dataForm.voucher" :fileSize="15" :showTip="true" sizeUnit="MB" :limit="9"
buttonText="点击上传">
</JNPF-UploadFz>
</el-form-item>
</el-col>
<el-col :span="24">
<el-tabs v-model="activeivpzpd" tab-position="top" class="mb-20">
<el-tab-pane label="申请明细">
@ -258,6 +265,7 @@
remark: '',
status: "0",
payment_item0List: [],
voucher : [],
},
activeivpzpd: '0',
rules: {
@ -482,6 +490,7 @@
},
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.voucher = JSON.stringify(_data.voucher)
for (let i = 0; i < _data.payment_item0List.length; i++) {
var _list = _data.payment_item0List[i];
}
@ -489,6 +498,7 @@
},
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.voucher = JSON.parse( _dataAll.voucher)
for (let i = 0; i < _dataAll.payment_item0List.length; i++) {
var _list = _dataAll.payment_item0List[i];
}

@ -64,7 +64,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="申请金额" prop="requestedamount">
<el-input v-model="dataForm.requestedamount" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.requestedamount" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</el-input>
</el-form-item>
@ -72,7 +72,7 @@
<el-col :span="8">
<el-form-item label="应付日期" prop="duedate">
<el-date-picker v-model="dataForm.duedate" placeholder="请选择" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp">
type="date" format="yyyy-MM-dd" value-format="timestamp" :disabled="true">
</el-date-picker>
</el-form-item>
@ -97,7 +97,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="来源单号" prop="paymentno">
<el-input v-model="dataForm.paymentno" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.paymentno" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</el-input>
</el-form-item>
@ -109,7 +109,7 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<!-- <el-col :span="8">
<el-form-item label="单据状态" prop="status">
<el-select v-model="dataForm.status" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
@ -117,6 +117,13 @@
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="8">
<el-form-item label="付款凭证" prop="voucher">
<JNPF-UploadFz v-model="dataForm.voucher" :fileSize="15" :showTip="true" sizeUnit="MB" :limit="9"
buttonText="点击上传">
</JNPF-UploadFz>
</el-form-item>
</el-col>
<el-col :span="24">
<el-tabs v-model="activeivpzpd" tab-position="top" class="mb-20">
@ -200,16 +207,16 @@
</el-date-picker>
</template>
</el-table-column>
<el-table-column label="操作" width="50" align="center" >
<!-- <el-table-column label="操作" width="50" align="center" >
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delpayment_item0List(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<div class="table-actions" @click="addpayment_item0List()">
<!-- <div class="table-actions" @click="addpayment_item0List()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</div> -->
</el-form-item>
</el-col>
</el-tab-pane>
@ -258,6 +265,7 @@
remark: '',
status: "0",
payment_item0List: [],
voucher : [],
},
activeivpzpd: '0',
rules: {
@ -276,7 +284,7 @@
],
},
paymenttypeOptions: [{
"fullName": "款",
"fullName": "款",
"id": "0"
}, {
"fullName": "运费",
@ -352,7 +360,7 @@
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 1 || index === 2 || index === 5 || index === 6|| index === 7|| index === 8 )) {
if (!values.every(value => isNaN(value)) && (index === 1 || index === 2 || index === 3 || index === 4|| index === 7|| index === 8|| index === 9|| index === 10 )) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
@ -482,6 +490,7 @@
},
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.voucher = JSON.stringify(_data.voucher)
for (let i = 0; i < _data.payment_item0List.length; i++) {
var _list = _data.payment_item0List[i];
}
@ -489,6 +498,7 @@
},
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.voucher = JSON.parse( _dataAll.voucher)
for (let i = 0; i < _dataAll.payment_item0List.length; i++) {
var _list = _dataAll.payment_item0List[i];
}

@ -192,7 +192,7 @@
},
],
paymenttypeOptions: [{
"fullName": "款",
"fullName": "款",
"id": "0"
}, {
"fullName": "运费",

@ -43,28 +43,32 @@
</el-col>
<el-col :span="8">
<el-form-item label="付款金额" prop="paymentamount">
<el-input v-model="dataForm.paymentamount" placeholder="请输入付款金额" clearable :style='{"width":"100%"}' :disabled="true">
<el-input v-model="dataForm.paymentamount" placeholder="请输入付款金额" clearable :style='{"width":"100%"}'
:disabled="true">
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="收款账户" prop="collectionaccount">
<el-input v-model="dataForm.collectionaccount" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
<el-input v-model="dataForm.collectionaccount" placeholder="请输入" clearable :style='{"width":"100%"}'
:disabled="true">
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="收款银行" prop="collectionbank">
<el-input v-model="dataForm.collectionbank" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
<el-input v-model="dataForm.collectionbank" placeholder="请输入" clearable :style='{"width":"100%"}'
:disabled="true">
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="申请金额" prop="requestedamount">
<el-input v-model="dataForm.requestedamount" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
<el-input v-model="dataForm.requestedamount" placeholder="请输入" clearable :style='{"width":"100%"}'
:disabled="true">
</el-input>
</el-form-item>
@ -97,7 +101,8 @@
</el-col>
<el-col :span="8">
<el-form-item label="来源单号" prop="paymentno">
<el-input v-model="dataForm.paymentno" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
<el-input v-model="dataForm.paymentno" placeholder="请输入" clearable :style='{"width":"100%"}'
:disabled="true">
</el-input>
</el-form-item>
@ -109,13 +114,22 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<!-- <el-col :span="8">
<el-form-item label="单据状态" prop="status">
<el-select v-model="dataForm.status" placeholder="请选择" clearable :style='{"width":"100%"}' :disabled="true">
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"></el-option>
<el-select v-model="dataForm.status" placeholder="请选择" clearable :style='{"width":"100%"}'
:disabled="true">
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="8">
<el-form-item label="付款凭证" prop="voucher">
<JNPF-UploadFz v-model="dataForm.voucher" :fileSize="15" :showTip="true" sizeUnit="MB" :limit="9"
buttonText="点击上传">
</JNPF-UploadFz>
</el-form-item>
</el-col>
<el-col :span="24">
<el-tabs v-model="activeivpzpd" tab-position="top" class="mb-20">
@ -143,34 +157,36 @@
</el-table-column>
<el-table-column prop="allAmount" width="150" label="订单金额">
<template slot-scope="scope">
<el-input v-model="scope.row.allAmount" placeholder="请输入" clearable
:style='{"width":"100%"}' readonly>
<el-input v-model="scope.row.allAmount" placeholder="请输入" clearable :style='{"width":"100%"}'
readonly>
</el-input>
</template>
</el-table-column>
<el-table-column prop="payPrice" width="150" label="已付金额" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.payPrice" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
<el-input v-model="scope.row.payPrice" placeholder="请输入" clearable :style='{"width":"100%"}'
readonly>
</el-input>
</template>
</el-table-column>
<el-table-column prop="documentNo" width="150" label="订单编号" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.documentNo" placeholder="请输入" clearable
:style='{"width":"100%"}' readonly>
<el-input v-model="scope.row.documentNo" placeholder="请输入" clearable :style='{"width":"100%"}'
readonly>
</el-input>
</template>
</el-table-column>
<el-table-column prop="contractNo" width="150" label="合同编码" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.contractNo" placeholder="请输入" clearable
:style='{"width":"100%"}' readonly>
<el-input v-model="scope.row.contractNo" placeholder="请输入" clearable :style='{"width":"100%"}'
readonly>
</el-input>
</template>
</el-table-column>
<el-table-column prop="num" width="150" label="结算重量" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.num" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
<el-input v-model="scope.row.num" placeholder="请输入" clearable :style='{"width":"100%"}'
readonly>
</el-input>
</template>
</el-table-column>
@ -183,13 +199,15 @@
</el-table-column>
<el-table-column prop="rate" width="150" label="税额" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.rate" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
<el-input v-model="scope.row.rate" placeholder="请输入" clearable :style='{"width":"100%"}'
readonly>
</el-input>
</template>
</el-table-column>
<el-table-column prop="notAmount" width="150" label="不含税金额" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.notAmount" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
<el-input v-model="scope.row.notAmount" placeholder="请输入" clearable :style='{"width":"100%"}'
readonly>
</el-input>
</template>
</el-table-column>
@ -258,6 +276,7 @@
remark: '',
status: "0",
payment_item0List: [],
voucher : [],
},
activeivpzpd: '0',
rules: {
@ -276,7 +295,7 @@
],
},
paymenttypeOptions: [{
"fullName": "款",
"fullName": "款",
"id": "0"
}, {
"fullName": "运费",
@ -400,6 +419,7 @@
}
},
init(paymentdoc) {
this.fileList = []
this.dataForm.id = '';
this.visible = true;
this.dataForm.paymenttype = paymentdoc.paymentType
@ -484,6 +504,7 @@
},
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.voucher = JSON.stringify(_data.voucher)
for (let i = 0; i < _data.payment_item0List.length; i++) {
var _list = _data.payment_item0List[i];
}
@ -491,6 +512,7 @@
},
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.voucher = JSON.parse( _dataAll.voucher)
for (let i = 0; i < _dataAll.payment_item0List.length; i++) {
var _list = _dataAll.payment_item0List[i];
}

@ -84,18 +84,8 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="磅单时间" prop="poundDate">
<el-date-picker v-model="dataForm.poundDate" placeholder="请选择" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="磅单号" prop="poundlistNo">
<el-input v-model="dataForm.poundlistNo" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</el-input>
<el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
@ -118,6 +108,21 @@
<el-input-number v-model="dataForm.netWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="磅单时间" prop="poundDate">
<el-date-picker v-model="dataForm.poundDate" placeholder="请选择" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="磅单号" prop="poundlistNo">
<el-input v-model="dataForm.poundlistNo" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="单位 " prop="unit">
<el-select v-model="unit" placeholder="请选择" clearable :style='{"width":"100%"}' @change="unitChange">
@ -156,11 +161,6 @@
</JNPF-Address>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="业务员" prop="businessId">
<popupSelect v-model="dataForm.businessId" placeholder="请选择业务员" clearable field="businessId"

@ -83,21 +83,6 @@
</JNPF-UploadImg>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="磅单日期" prop="poundDate">
<el-date-picker v-model="dataForm.poundDate" placeholder="请选择" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="磅单号" prop="poundlistNo">
<el-input v-model="dataForm.poundlistNo" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="皮重" prop="tareWeight">
<el-input-number v-model="dataForm.tareWeight" :style='{"width":"100%"}'></el-input-number>
@ -118,6 +103,26 @@
<el-input-number v-model="dataForm.netWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="磅单日期" prop="poundDate">
<el-date-picker v-model="dataForm.poundDate" placeholder="请选择" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="磅单号" prop="poundlistNo">
<el-input v-model="dataForm.poundlistNo" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="单位 " prop="unit">
<el-select v-model="unit" placeholder="请选择" clearable :style='{"width":"100%"}' @change="unitChange">
@ -156,11 +161,6 @@
</JNPF-Address>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="业务员" prop="businessId">
<popupSelect v-model="dataForm.businessId" placeholder="请选择业务员" clearable field="businessId"

@ -9,6 +9,7 @@
<el-input v-model="query.poundlistNo" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<template v-if="showAll">
<el-col :span="6">
<el-form-item label="物料名称">
<el-input v-model="query.materialName" placeholder="请输入" clearable></el-input>
@ -75,10 +76,15 @@
</el-select>
</el-form-item>
</el-col>
</template>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">展开</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
收起</el-button>
</el-form-item>
</el-col>
</el-form>
@ -171,8 +177,8 @@
<el-table-column prop="remark" sortable label="备注" width="150" align="center" />
<el-table-column prop="poundPictures" label="磅单图片" width="150" align="center">
<template slot-scope="scope">
<span v-for="(item,index) in JSON.parse(scope.row.poundPictures)" :key="index">
<el-popover placement="bottom" trigger="click" width="1000">
<span v-if="scope.row.poundPictures != ''" v-for="(item,index) in JSON.parse(scope.row.poundPictures)" :key="index">
<el-popover placement="bottom" trigger="click" width="500">
<img :src="define.comUrl + `${item.url}`" width="100%" />
<img
slot="reference"
@ -186,8 +192,8 @@
</el-table-column>
<el-table-column prop="vehiclePictures" label="车辆图片" width="150" align="center">
<template slot-scope="scope">
<span v-for="(item,index) in JSON.parse(scope.row.vehiclePictures)" :key="index">
<el-popover placement="bottom" trigger="click" width="1000">
<span v-if="scope.row.vehiclePictures != ''" v-for="(item,index) in JSON.parse(scope.row.vehiclePictures)" :key="index">
<el-popover placement="bottom" trigger="click" width="500">
<img :src="define.comUrl + `${item.url}`" width="100%" />
<img
slot="reference"
@ -201,8 +207,8 @@
</el-table-column>
<el-table-column label="操作" fixed="right" width="100" align="center">
<template slot-scope="scope">
<!-- <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button> -->
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row)">
</el-button>
<el-button type="text" @click="goDetail(scope.row.id)">
@ -249,6 +255,7 @@
},
data() {
return {
showAll: false,
detailVisible: false,
query: {
materialName: undefined,

@ -0,0 +1,247 @@
<template>
<el-dialog title="批量导入" :close-on-click-modal="false" :visible.sync="visible"
class="JNPF-dialog JNPF-dialog_center JNPF-dialog-import" lock-scroll width="1000px" :modal="false" :modal-append-to-body="false">
<el-steps :active="active" align-center>
<el-step title="上传文件"></el-step>
<el-step title="数据预览"></el-step>
<el-step title="导入数据"></el-step>
</el-steps>
<div class="import-main" v-show="active==1">
<div class="upload">
<div class="up_left">
<img src="@/assets/images/upload.png">
</div>
<div class="up_right">
<p class="title">上传填好的数据表</p>
<p class="tip">文件后缀名必须是xls或xlsx文件大小不超过500KB最多支持导入1000条数据</p>
<el-upload :action="define.comUrl+'/api/invoices/Invoices/Uploader'"
:headers="{ Authorization: $store.getters.token}" :on-success="handleSuccess"
:on-remove="handleRemove" :before-remove="beforeRemove" :on-change="handleChange"
:file-list="fileList" accept=".xls,.xlsx" :before-upload="beforeUpload"
class="upload-area">
<el-button type="text">上传文件</el-button>
</el-upload>
</div>
</div>
<div class="upload">
<div class="up_left">
<img src="@/assets/images/import.png">
</div>
<div class="up_right">
<p class="title">填写导入数据信息</p>
<p class="tip">请按照数据模板的格式准备导入数据模板中的表头名称不可更改表头行不能删除</p>
<el-button type="text" @click="templateDownload"></el-button>
</div>
</div>
</div>
<div class="import-main" v-show="active==2">
<JNPF-table v-loading="listLoading" :data="list">
<el-table-column prop="materialName" label="物料名称" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.materialName" />
</template>
</el-table-column>
<el-table-column prop="invoiceCode" label="发票代码" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.invoiceCode" />
</template>
</el-table-column>
<el-table-column prop="invoiceNo" label="发票号码" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.invoiceNo" />
</template>
</el-table-column>
<el-table-column prop="invoiceQuantity" label="发票数量" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.invoiceQuantity" />
</template>
</el-table-column>
<el-table-column prop="invoiceAmount" label="发票金额" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.invoiceAmount" />
</template>
</el-table-column>
<el-table-column prop="taxRate" label="税率" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.taxRate" />
</template>
</el-table-column>
<el-table-column prop="taxAmount" label="税额" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.taxAmount" />
</template>
</el-table-column>
<el-table-column prop="amountNotTax" label="不含税金额" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.amountNotTax" />
</template>
</el-table-column>
<!-- <el-table-column prop="invoiceStatus" label="发票状态" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.invoiceStatus" />
</template>
</el-table-column> -->
<el-table-column prop="creatorUserName" label="开票人" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.creatorUserName" />
</template>
</el-table-column>
<el-table-column prop="invoicingDate" label="开票日期" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.invoicingDate" />
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="handleDel(scope.$index)">删除</el-button>
</template>
</el-table-column>
</JNPF-table>
</div>
<div class="import-main" v-show="active==3">
<div class="success" v-if="!result.resultType">
<img src="@/assets/images/success.png" alt="">
<p class="success-title">批量导入成功</p>
<p class="success-tip">您已成功导入数据</p>
</div>
<div class="unsuccess" v-if="result.resultType">
<el-alert title="错误提醒:导入失败数据展示" type="warning" show-icon :closable="false" />
<div class="upload error-show">
<div class="up_left">
<img class="" src="@/assets/images/tip.png">
</div>
<div class="up_right">
<p class="tip">正常数量条数<el-link type="success" :underline="false">{{result.snum}}
</el-link>
</p>
<p class="tip">异常数量条数<el-link type="danger" :underline="false">{{result.fnum}}
</el-link>
</p>
</div>
</div>
<p class="contips">以下文件数据为导入异常数据</p>
<JNPF-table :data="resultList" height="280px">
<el-table-column prop="materialName" label="物料名称" width="100" />
<el-table-column prop="invoiceCode" label="发票代码" width="100" />
<el-table-column prop="invoiceNo" label="发票号码" width="80" />
<el-table-column prop="invoiceQuantity" label="发票数量" width="120" />
<el-table-column prop="invoiceAmount" label="发票金额" width="120" />
<el-table-column prop="taxRate" label="税率" width="100" />
<el-table-column prop="taxAmount" label="税额" width="150" />
<el-table-column prop="amountNotTax" label="不含税金额" width="100" />
<!-- <el-table-column prop="invoiceStatus" label="发票状态" width="100" /> -->
<el-table-column prop="creatorUserName" label="开票人" width="100" />
<el-table-column prop="invoicingDate" label="开票日期" width="100" />
</JNPF-table>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="cancel()" v-if="active == 1"> </el-button>
<el-button @click="prev" v-if="active == 2"></el-button>
<el-button @click="next" type="primary" v-if="active < 3" :loading="btnLoading"
:disabled="active == 1 && !fileName">下一步
</el-button>
<el-button @click="cancel(true)" type="primary" v-else> </el-button>
</span>
</el-dialog>
</template>
<script>
import { TemplateDownload, ImportData, ImportPreview } from '@/api/scm/invoices'
export default {
data() {
return {
visible: false,
btnLoading: false,
listLoading: false,
fileName: '',
fileList: [],
active: 1,
list: [],
resultList: [],
result: {
resultType: 0,
snum: 0,
fnum: 0
}
}
},
methods: {
prev() {
if (this.active == 1) return
this.active--
},
next() {
if (this.active == 2) {
if (!this.list.length) return this.$message({ message: '导入数据为空', type: 'warning' })
this.btnLoading = true
this.btnLoading = false
this.result = this.list
console.log('rrrrrrr', this.list);
//this.$emit('importData', this.list)
this.active++
/* ImportData({ list: this.list }).then(res => {
this.result = res.data
this.resultList = res.data.failResult
this.btnLoading = false
this.active++
}).catch(() => { this.btnLoading = false }) */
}
if (this.active == 1) {
if (!this.fileList.length || !this.fileName) return this.$message({ message: '请先上传文件', type: 'warning' })
this.btnLoading = true
ImportPreview({ fileName: this.fileName }).then(res => {
this.list = res.data.dataRow
this.btnLoading = false
this.active++
}).catch(() => { this.btnLoading = false })
}
},
cancel(isRefresh) {
this.visible = false
this.$emit('importData', {
checkedList: this.result
})
//if (isRefresh) this.$emit('refresh')
},
init() {
this.active = 1
this.fileList = []
this.fileName = ''
this.visible = true
},
handleDel(index) {
this.list.splice(index, 1)
},
templateDownload() {
TemplateDownload().then(res => {
this.jnpf.downloadFile(res.data.url)
})
},
beforeUpload(file) {
let isRightSize = file.size / 1024 < 500
if (!isRightSize) this.$message.error(`文件大小不能超过500KB`)
return isRightSize
},
handleRemove(file, fileList) {
this.fileList = []
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`).catch(() => { })
},
handleChange(file, fileList) {
this.fileList = fileList.slice(-1)
},
handleSuccess(res, file, fileList) {
if (res.code == 200) {
this.fileList = fileList.slice(-1)
this.fileName = res.data.name
} else {
this.fileList = fileList.filter(o => o.uid != file.uid)
this.$message({ message: res.msg, type: 'error', duration: 1000 })
}
}
}
}
</script>

@ -195,39 +195,39 @@
</div>
<el-table :data="dataForm.invoicesitem0List" size='mini' show-summary :summary-method="getSummaries2">
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="materialName" label="物料名称">
<el-table-column prop="materialName" label="物料名称" width="200">
<template slot-scope="scope">
<el-input v-model="scope.row.materialName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="invoiceCode" label="发票代码">
<el-table-column prop="invoiceCode" label="发票代码" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.invoiceCode" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="invoiceNo" label="发票号码">
<el-table-column prop="invoiceNo" label="发票号码" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.invoiceNo" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="invoiceQuantity" label="发票数量">
<el-table-column prop="invoiceQuantity" label="发票数量" width="150">
<template slot-scope="scope">
<el-input-number v-model="scope.row.invoiceQuantity" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' @change="invoiceQuantityChange(scope.row)">
</el-input-number>
</template>
</el-table-column>
<el-table-column prop="invoiceAmount" label="发票金额">
<el-table-column prop="invoiceAmount" label="发票金额" width="200">
<template slot-scope="scope">
<el-input-number v-model="scope.row.invoiceAmount" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' @change="invoiceAmountChange(scope.row)">
</el-input-number>
</template>
</el-table-column>
<el-table-column prop="taxRate" label="税率">
<el-table-column prop="taxRate" label="税率" width="100">
<template slot-scope="scope">
<el-select v-model="scope.row.taxRate" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName"
@ -235,19 +235,19 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="taxAmount" label="税额">
<el-table-column prop="taxAmount" label="税额" width="200">
<template slot-scope="scope">
<el-input-number v-model="scope.row.taxAmount" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}'>
</el-input-number>
</template>
</el-table-column>
<el-table-column prop="amountNotTax" label="不含税金额">
<el-table-column prop="amountNotTax" label="不含税金额" width="200">
<template slot-scope="scope">
<el-input-number v-model="scope.row.amountNotTax" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}'>
</el-input-number>
</template>
</el-table-column>
<el-table-column prop="invoiceStatus" label="发票状态 ">
<el-table-column prop="invoiceStatus" label="发票状态 " width="100">
<template slot-scope="scope">
<el-select v-model="scope.row.invoiceStatus" placeholder="请选择" clearable
:style='{"width":"100%"}'>
@ -256,20 +256,26 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="creatorUserName" label="开票人">
<el-table-column prop="creatorUserName" label="开票人" width="200">
<template slot-scope="scope">
<el-input v-model="scope.row.creatorUserName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="invoicingDate" label="开票日期">
<el-table-column prop="invoicingDate" label="开票日期" width="160">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.invoicingDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</template>
</el-table-column>
<el-table-column prop="invoiceAttachment" label="发票附件" width="150">
<template slot-scope="scope">
<JNPF-UploadFz v-model="scope.row.invoiceAttachment" :fileSize="20" sizeUnit="MB" :limit="9" buttonText="点击上传">
</JNPF-UploadFz>
</template>
</el-table-column>
<el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@ -289,13 +295,16 @@
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button type="primary" icon="el-icon-upload2" @click="uploadForm"></el-button>
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button>
</span>
<ImportForm v-if="importFormVisible" ref="importForm" @importData="importData" />
</el-dialog>
</template>
<script>
import request from '@/utils/request'
import ImportForm from './ImportForm'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
@ -303,10 +312,11 @@
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
components: { ImportForm },
props: [],
data() {
return {
importFormVisible: false,
visible: false,
loading: false,
isDetail: false,
@ -467,6 +477,30 @@
created() {},
mounted() {},
methods: {
importData(param){
param.checkedList.forEach((column, index) => {
if(column.taxRate == '0.13'){
column.taxRate = '0';
}else if(column.taxRate == '0.09'){
column.taxRate = '1';
}else if(column.taxRate == '0.06'){
column.taxRate = '2';
}else if(column.taxRate == '0.05'){
column.taxRate = '3';
}else if(column.taxRate == '0.03'){
column.taxRate = '4';
}else if(column.taxRate == '0'){
column.taxRate = '5';
}
this.dataForm.invoicesitem0List.push(column);
});
},
uploadForm() {
this.importFormVisible = true
this.$nextTick(() => {
this.$refs.importForm.init()
})
},
getSummaries(param) {
const { columns, data } = param;
const sums = [];
@ -660,6 +694,7 @@
invoiceStatus: undefined,
creatorUserName: undefined,
invoicingDate: undefined,
invoiceAttachment:undefined,
}
this.dataForm.invoicesitem0List.push(item)
},
@ -673,6 +708,7 @@
}
for (let i = 0; i < _data.invoicesitem0List.length; i++) {
var _list = _data.invoicesitem0List[i];
_list.invoiceAttachment = JSON.stringify(_list.invoiceAttachment)
}
return _data;
},
@ -683,6 +719,7 @@
}
for (let i = 0; i < _dataAll.invoicesitem0List.length; i++) {
var _list = _dataAll.invoicesitem0List[i];
_list.invoiceAttachment = JSON.parse(_list.invoiceAttachment)
}
this.dataForm = _dataAll
},

@ -0,0 +1,299 @@
<template>
<el-dialog title="批量导入" :close-on-click-modal="false" :visible.sync="visible"
class="JNPF-dialog JNPF-dialog_center JNPF-dialog-import" lock-scroll width="1000px">
<el-steps :active="active" align-center>
<el-step title="上传文件"></el-step>
<el-step title="数据预览"></el-step>
<el-step title="导入数据"></el-step>
</el-steps>
<div class="import-main" v-show="active==1">
<div class="upload">
<div class="up_left">
<img src="@/assets/images/upload.png">
</div>
<div class="up_right">
<p class="title">上传填好的数据表</p>
<p class="tip">文件后缀名必须是xls或xlsx文件大小不超过15MB最多支持导入1000条数据</p>
<el-upload :action="define.comUrl+'/api/purchaseorder/Purchaseorder/Uploader'"
:headers="{ Authorization: $store.getters.token}" :on-success="handleSuccess"
:on-remove="handleRemove" :before-remove="beforeRemove" :on-change="handleChange"
:file-list="fileList" accept=".zip" :before-upload="beforeUpload"
class="upload-area">
<el-button type="text">上传文件</el-button>
</el-upload>
</div>
</div>
<div class="upload">
<div class="up_left">
<img src="@/assets/images/import.png">
</div>
<div class="up_right">
<p class="title">填写导入数据信息</p>
<p class="tip">请按照数据模板的格式准备导入数据模板中的表头名称不可更改表头行不能删除</p>
<el-button type="text" @click="templateDownload"></el-button>
</div>
</div>
</div>
<div class="import-main" v-show="active==2">
<JNPF-table v-loading="listLoading" :data="list">
<el-table-column prop="poundDate" label="收货日期" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.poundDate" />
</template>
</el-table-column>
<el-table-column prop="vehicleId" label="送货车号" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.vehicleId" />
</template>
</el-table-column>
<el-table-column prop="materialId" label="货物" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.materialId" />
</template>
</el-table-column>
<el-table-column prop="unit" label="单位" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.unit" />
</template>
</el-table-column>
<el-table-column prop="grossWeight" label="毛重" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.grossWeight" />
</template>
</el-table-column>
<el-table-column prop="tartareWeighte" label="皮重" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.tartareWeighte" />
</template>
</el-table-column>
<el-table-column prop="buckleWeight" label="扣重" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.buckleWeight" />
</template>
</el-table-column>
<el-table-column prop="netWeight" label="净重" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.netWeight" />
</template>
</el-table-column>
<el-table-column prop="settlement" label="结算重量" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.settlement" />
</template>
</el-table-column>
<el-table-column prop="imgPicturess" label="磅单图片" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.imgPicturess" />
</template>
</el-table-column>
<el-table-column prop="advance" label="是否垫资" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.advance" />
</template>
</el-table-column>
<el-table-column prop="naturalId" label="自然人" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.naturalId" />
</template>
</el-table-column>
<el-table-column prop="purchasePrice" label="采购单价" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.purchasePrice" />
</template>
</el-table-column>
<el-table-column prop="salesPrice" label="销售单价" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.salesPrice" />
</template>
</el-table-column>
<el-table-column prop="transportPrice" label="运费" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.transportPrice" />
</template>
</el-table-column>
<el-table-column prop="originPrice" label="起始地" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.originPrice" />
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.remark" />
</template>
</el-table-column>
<el-table-column prop="causeError" label="错误原因" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.causeError" />
</template>
</el-table-column>
<el-table-column prop="salesId" label="销售合同编码" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.salesId" />
</template>
</el-table-column>
<el-table-column prop="purchaseId" label="采购合同编码" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.purchaseId" />
</template>
</el-table-column>
<el-table-column prop="customerId" label="客户" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.customerId" />
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="handleDel(scope.$index)">删除</el-button>
</template>
</el-table-column>
</JNPF-table>
</div>
<div class="import-main" v-show="active==3">
<div class="success" v-if="!result.resultType">
<img src="@/assets/images/success.png" alt="">
<p class="success-title">批量导入成功</p>
<p class="success-tip">您已成功导入{{result.snum}}条数据</p>
</div>
<div class="unsuccess" v-if="result.resultType">
<el-alert title="错误提醒:导入失败数据展示" type="warning" show-icon :closable="false" />
<div class="upload error-show">
<div class="up_left">
<img class="" src="@/assets/images/tip.png">
</div>
<div class="up_right">
<p class="tip">正常数量条数<el-link type="success" :underline="false">{{result.snum}}
</el-link>
</p>
<p class="tip">异常数量条数<el-link type="danger" :underline="false">{{result.fnum}}
</el-link>
</p>
</div>
</div>
<p class="contips">以下文件数据为导入异常数据</p>
<JNPF-table :data="resultList" height="280px">
<el-table-column prop="poundDate" label="收货日期" width="100" />
<el-table-column prop="vehicleId" label="送货车号" width="100" />
<el-table-column prop="materialId" label="货物" width="80" />
<el-table-column prop="unit" label="单位" width="120" />
<el-table-column prop="grossWeight" label="毛重" width="120" />
<el-table-column prop="tartareWeighte" label="皮重" width="100" />
<el-table-column prop="buckleWeight" label="扣重" width="150" />
<el-table-column prop="netWeight" label="净重" width="100" />
<el-table-column prop="settlement" label="结算重量" width="100" />
<el-table-column prop="imgPicturess" label="磅单图片" width="100" />
<el-table-column prop="advance" label="是否垫资" width="100" />
<el-table-column prop="naturalId" label="自然人" width="120" />
<el-table-column prop="purchasePrice" label="采购单价" width="150" />
<el-table-column prop="salesPrice" label="销售单价" width="100" />
<el-table-column prop="transportPrice" label="运费" width="100" />
<el-table-column prop="originPrice" label="起始地" width="100" />
<el-table-column prop="remark" label="备注" width="100" />
<el-table-column prop="causeError" label="错误原因" width="100" />
<el-table-column prop="salesId" label="销售合同编码" width="100" />
<el-table-column prop="purchaseId" label="采购合同编码" width="100" />
<el-table-column prop="customerId" label="客户" width="100" />
</JNPF-table>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="cancel()" v-if="active == 1"> </el-button>
<el-button @click="prev" v-if="active == 2"></el-button>
<el-button @click="next" type="primary" v-if="active < 3" :loading="btnLoading"
:disabled="active == 1 && !fileName">下一步
</el-button>
<el-button @click="cancel(true)" type="primary" v-else> </el-button>
</span>
</el-dialog>
</template>
<script>
import { TemplateDownload, ImportData, ImportPreview } from '@/api/scm/purchaseorder'
export default {
data() {
return {
visible: false,
btnLoading: false,
listLoading: false,
fileName: '',
fileList: [],
active: 1,
list: [],
resultList: [],
result: {
resultType: 0,
snum: 0,
fnum: 0
}
}
},
methods: {
prev() {
if (this.active == 1) return
this.active--
},
next() {
if (this.active == 2) {
if (!this.list.length) return this.$message({ message: '导入数据为空', type: 'warning' })
this.btnLoading = true
ImportData({ list: this.list }).then(res => {
this.result = res.data
this.resultList = res.data.failResult
this.btnLoading = false
this.active++
}).catch(() => { this.btnLoading = false })
}
if (this.active == 1) {
if (!this.fileList.length || !this.fileName) return this.$message({ message: '请先上传文件', type: 'warning' })
this.btnLoading = true
ImportPreview({ fileName: this.fileName }).then(res => {
this.list = res.data.dataRow
this.btnLoading = false
this.active++
}).catch(() => { this.btnLoading = false })
}
},
cancel(isRefresh) {
this.visible = false
if (isRefresh) this.$emit('refresh')
},
init() {
this.active = 1
this.fileList = []
this.fileName = ''
this.visible = true
},
handleDel(index) {
this.list.splice(index, 1)
},
templateDownload() {
TemplateDownload().then(res => {
this.jnpf.downloadFile(res.data.url)
})
},
beforeUpload(file) {
let isRightSize = file.size < (15 * 1024 * 1024)
if (!isRightSize) this.$message.error(`文件大小不能超过15MB`)
return isRightSize
},
handleRemove(file, fileList) {
this.fileList = []
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`).catch(() => { })
},
handleChange(file, fileList) {
this.fileList = fileList.slice(-1)
},
handleSuccess(res, file, fileList) {
if (res.code == 200) {
this.fileList = fileList.slice(-1)
this.fileName = res.data.name
} else {
this.fileList = fileList.filter(o => o.uid != file.uid)
this.$message({ message: res.msg, type: 'error', duration: 1000 })
}
}
}
}
</script>

@ -9,6 +9,7 @@
<el-input v-model="query.documentNo" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<template v-if="showAll">
<el-col :span="6">
<el-form-item label="采购合同">
<el-input v-model="query.purchaseName" placeholder="请输入" clearable></el-input>
@ -34,10 +35,15 @@
</el-select>
</el-form-item>
</el-col>
</template>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">展开</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
收起</el-button>
</el-form-item>
</el-col>
</el-form>
@ -47,8 +53,10 @@
<div>
<!-- <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button> -->
<el-button type="text" icon="el-icon-upload2" @click="uploadForm"></el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" @click="downLoadPDF" icon="el-icon-download">开票文件下载</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
<el-button type="text" icon="el-icon-delete" @click="fapiaoluruHandle()">
@ -120,6 +128,7 @@
<FlowBox v-if="flowVisible" ref="FlowBox" @close="colseFlow" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
<ImportForm v-if="importFormVisible" ref="importForm" @refresh="reset()" />
</div>
</template>
@ -134,6 +143,7 @@
import JNPFForm4 from './PaymentdocForm'
import JNPFForm5 from './purchasebackForm'
import FlowBox from '@/views/workFlow/components/FlowBox'
import ImportForm from './PurchaseorderImportForm'
import ExportBox from './ExportBox'
import {
getDataInterfaceRes
@ -142,6 +152,7 @@
export default {
components: {
ImportForm,
JNPFForm,
JNPFForm2,
JNPFForm3,
@ -153,6 +164,8 @@
},
data() {
return {
showAll: false,
importFormVisible: false,
flowVisible: false,
detailVisible: false,
query: {
@ -291,6 +304,23 @@
this.initData()
},
methods: {
downLoadPDF(){
if (!this.multipleSelectionItem.length || this.multipleSelectionItem.length != 1) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500
})
return
}
window.open(this.define.APIURl + '/api/info/exportPdf/' + this.multipleSelectionItem[0].documentNo)
},
uploadForm() {
this.importFormVisible = true
this.$nextTick(() => {
this.$refs.importForm.init()
})
},
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
@ -513,14 +543,23 @@
}
const ids = this.multipleSelection.join()
request({
url: `/api/purchaseorder/Purchaseorder/batchQueryPurchaseorder/${ids}`,
url: `/api/purchaseorderNum = '';/Purchaseorder/batchQueryPurchaseorder/${ids}`,
method: 'get'
}).then(res => {
var amountFlag = true;
var collectionFlag = true;
var purchaseorderNum = '';
for(var i=0;i<res.data.length;i++){
if(res.data[i].payPrice >= res.data[i].amount){
amountFlag = false;
}
var poundlistEntityList = res.data[i].poundlistEntityList;
for(var j=0;j<poundlistEntityList.length;j++){
if(poundlistEntityList.advance == '1' && poundlistEntityList.isCollection == '0'){
collectionFlag = false;
purchaseorderNum = res.data[i].documentNo;
}
}
}
if(!amountFlag){
this.$message({
@ -530,6 +569,14 @@
})
return
}
if(!collectionFlag){
this.$message({
type: 'error',
message: purchaseorderNum + '订单存在未回款的垫资磅单,请核查',
duration: 1500
})
return
}
let data = {
id: '',
enCode: 'paymentdoc',

@ -9,6 +9,7 @@
<el-input v-model="query.documentno" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<template v-if="showAll">
<el-col :span="6">
<el-form-item label="来源单号">
<el-input v-model="query.souceno" placeholder="请输入" clearable> </el-input>
@ -35,10 +36,15 @@
</el-select>
</el-form-item>
</el-col>
</template>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">展开</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
收起</el-button>
</el-form-item>
</el-col>
</el-form>
@ -128,6 +134,7 @@
},
data() {
return {
showAll: false,
detailVisible: false,
query: {
documentno: undefined,

@ -58,6 +58,31 @@
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="皮重" prop="tareWeight">
<el-input-number v-model="dataForm.tareWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="毛重" prop="grossWeight">
<el-input-number v-model="dataForm.grossWeight" :style='{"width":"100%"}' @change="grossWeightChange"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="扣重" prop="buckleWeight">
<el-input-number v-model="dataForm.buckleWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="净重" prop="netWeight">
<el-input-number v-model="dataForm.netWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="磅单时间" prop="poundDate">
<el-date-picker v-model="dataForm.poundDate" placeholder="请选择" clearable :style='{"width":"100%"}'
@ -89,27 +114,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="皮重" prop="tareWeight">
<el-input-number v-model="dataForm.tareWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="毛重" prop="grossWeight">
<el-input-number v-model="dataForm.grossWeight" :style='{"width":"100%"}' @change="grossWeightChange"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="扣重" prop="buckleWeight">
<el-input-number v-model="dataForm.buckleWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="净重" prop="netWeight">
<el-input-number v-model="dataForm.netWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否垫资" prop="advance">
<el-select v-model="advance" placeholder="请选择" clearable :style='{"width":"100%"}' @change="advanceChange">
@ -124,20 +128,12 @@
<el-input-number v-model="dataForm.transportPrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="起始地" prop="originPlace">
<JNPF-Address v-model="dataForm.originPlace" placeholder="请选择省市区" clearable :level='2' >
</JNPF-Address>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="业务员" prop="businessId">
<popupSelect v-model="dataForm.businessId" placeholder="请选择业务员" clearable field="businessId"

@ -58,6 +58,31 @@
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="皮重" prop="tareWeight">
<el-input-number v-model="dataForm.tareWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="毛重" prop="grossWeight">
<el-input-number v-model="dataForm.grossWeight" :style='{"width":"100%"}' @change="grossWeightChange"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="扣重" prop="buckleWeight">
<el-input-number v-model="dataForm.buckleWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="净重" prop="netWeight">
<el-input-number v-model="dataForm.netWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="磅单日期" prop="poundDate">
<el-date-picker v-model="dataForm.poundDate" placeholder="请选择" clearable :style='{"width":"100%"}'
@ -89,27 +114,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="皮重" prop="tareWeight">
<el-input-number v-model="dataForm.tareWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="毛重" prop="grossWeight">
<el-input-number v-model="dataForm.grossWeight" :style='{"width":"100%"}' @change="grossWeightChange"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="扣重" prop="buckleWeight">
<el-input-number v-model="dataForm.buckleWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="净重" prop="netWeight">
<el-input-number v-model="dataForm.netWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否垫资" prop="advance">
<el-select v-model="advance" placeholder="请选择" clearable :style='{"width":"100%"}' @change="advanceChange">
@ -132,12 +136,6 @@
</JNPF-Address>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="业务员" prop="businessId">
<popupSelect v-model="dataForm.businessId" placeholder="请选择业务员" clearable field="businessId"

@ -73,6 +73,31 @@
<el-input-number v-model="dataForm.purchasePrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="皮重" prop="tareWeight">
<el-input-number v-model="dataForm.tareWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="毛重" prop="grossWeight">
<el-input-number v-model="dataForm.grossWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="扣重" prop="buckleWeight">
<el-input-number v-model="dataForm.buckleWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="净重" prop="netWeight">
<el-input-number v-model="dataForm.netWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="车牌号" prop="vehicleId">
<popupSelect v-model="dataForm.vehicleId" placeholder="请选择车辆" clearable field="vehicleId"
@ -98,26 +123,6 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="皮重" prop="tareWeight">
<el-input-number v-model="dataForm.tareWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="毛重" prop="grossWeight">
<el-input-number v-model="dataForm.grossWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="扣重" prop="buckleWeight">
<el-input-number v-model="dataForm.buckleWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="净重" prop="netWeight">
<el-input-number v-model="dataForm.netWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="单位 " prop="unit">
<el-select v-model="unit" placeholder="请选择" clearable :style='{"width":"100%"}' @change="unitChange">
@ -156,11 +161,6 @@
</JNPF-Address>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="业务员" prop="businessId">
<popupSelect v-model="dataForm.businessId" placeholder="请选择业务员" clearable field="businessId"

@ -9,6 +9,7 @@
<el-input v-model="query.poundlistNo" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<template v-if="showAll">
<el-col :span="6">
<el-form-item label="物料名称">
<el-input v-model="query.materialName" placeholder="请输入" clearable></el-input>
@ -42,10 +43,15 @@
</el-date-picker>
</el-form-item>
</el-col>
</template>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
v-if="!showAll">展开</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
收起</el-button>
</el-form-item>
</el-col>
</el-form>
@ -118,7 +124,7 @@
<el-table-column prop="poundPictures" label="磅单图片" width="150" align="center">
<template slot-scope="scope">
<span v-for="(item,index) in JSON.parse(scope.row.poundPictures)" :key="index">
<el-popover placement="bottom" trigger="click" width="1000">
<el-popover placement="bottom" trigger="click" width="500">
<img :src="define.comUrl + `${item.url}`" width="100%" />
<img
slot="reference"
@ -133,7 +139,7 @@
<el-table-column prop="vehiclePictures" label="车辆图片" width="150" align="center">
<template slot-scope="scope">
<span v-for="(item,index) in JSON.parse(scope.row.vehiclePictures)" :key="index">
<el-popover placement="bottom" trigger="click" width="1000">
<el-popover placement="bottom" trigger="click" width="500">
<img :src="define.comUrl + `${item.url}`" width="100%" />
<img
slot="reference"
@ -187,6 +193,7 @@
components: { JNPFForm, JNPFForm2, ExportBox, Detail },
data() {
return {
showAll: false,
detailVisible: false,
query: {
poundDate: undefined,

Loading…
Cancel
Save