Merge remote-tracking branch 'origin/main'

product
chuang 2 years ago
commit 2c05c79baf

@ -272,7 +272,7 @@ public class MybatisPlusConfig {
public MybatisConfiguration configuration(DataSource dataSource){
MybatisConfiguration mybatisConfiguration = new MybatisConfiguration();
mybatisConfiguration.setMapUnderscoreToCamelCase(false);
mybatisConfiguration.setMapUnderscoreToCamelCase(true);
mybatisConfiguration.setCacheEnabled(false);
mybatisConfiguration.addInterceptor(mybatisPlusInterceptor());
mybatisConfiguration.setLogImpl(Slf4jImpl.class);

@ -131,14 +131,9 @@ public class ArinvoicesController {
@PostMapping
@Transactional
public ActionResult create(@RequestBody @Valid ArinvoicesCrForm arinvoicesCrForm) throws DataException {
if (arinvoicesCrForm.getAmount() != null && arinvoicesCrForm.getInvoiceAmount()!=null){
if (arinvoicesCrForm.getAmount().compareTo(arinvoicesCrForm.getInvoiceAmount()) == -1){
return ActionResult.fail("发票金额不能大于金额");
}
}
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
arinvoicesCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("arinvoices", false));
// arinvoicesCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("arinvoices", false));
ArinvoicesEntity entity = JsonUtil.getJsonToBean(arinvoicesCrForm, ArinvoicesEntity.class);
SaleorderitemEntity saleorderitemEntity = saleorderitemService.getInfo(entity.getSalesOrderId());
saleorderitemEntity.setStatus("2");//修改销售订单状态
@ -153,7 +148,11 @@ public class ArinvoicesController {
PoundlistEntity poundlistEntity = poundlistService.getInfo(salesorder_item0Entity.getPoundlistId());
if (ObjectUtils.isNotEmpty(poundlistEntity)){
poundlistEntity.setSalesStatus("2");//修改磅单状态
poundlistEntity.setIsExpense("1");//修改销项票状态
if (arinvoicesCrForm.getAmount() != null && arinvoicesCrForm.getInvoiceAmount()!=null){
if (arinvoicesCrForm.getInvoiceAmount().compareTo(arinvoicesCrForm.getAmount()) > -1){
poundlistEntity.setIsExpense("1");//修改销项票状态
}
}
poundlistService.updateById(poundlistEntity);
}
}
@ -413,7 +412,22 @@ public class ArinvoicesController {
saleorderitemEntity.setInvoiceNum(arinvoicesEntity.getInvoiceQuantity());
saleorderitemEntity.setInvoiceAmount(arinvoicesEntity.getInvoiceAmount());
saleorderitemService.updateById(saleorderitemEntity);
QueryWrapper<Salesorder_item0Entity> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.lambda().eq(Salesorder_item0Entity::getSalesOrderId,saleorderitemEntity.getId());
List<Salesorder_item0Entity> salesorder_item0EntityList = salesorder_item0Service.list(queryWrapper1);
if (salesorder_item0EntityList.size()>0){
for (Salesorder_item0Entity salesorder_item0Entity : salesorder_item0EntityList){
PoundlistEntity poundlistEntity = poundlistService.getInfo(salesorder_item0Entity.getPoundlistId());
if (ObjectUtils.isNotEmpty(poundlistEntity)){
if (arinvoicesUpForm.getAmount() != null && arinvoicesUpForm.getInvoiceAmount()!=null){
if (arinvoicesUpForm.getInvoiceAmount().compareTo(arinvoicesUpForm.getAmount()) > -1){
poundlistEntity.setIsExpense("1");//修改销项票状态
}
}
poundlistService.updateById(poundlistEntity);
}
}
}
QueryWrapper<Arinvoices_item1Entity> Arinvoices_item1queryWrapper = new QueryWrapper<>();
Arinvoices_item1queryWrapper.lambda().eq(Arinvoices_item1Entity::getArinvoicesId, entity.getId());
arinvoices_item1Service.remove(Arinvoices_item1queryWrapper);

@ -23,6 +23,8 @@ import jnpf.saleorder.entity.Salesorder_item0Entity;
import jnpf.saleorder.service.SaleorderitemService;
import jnpf.saleorder.service.Salesorder_item0Service;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.ibatis.annotations.Param;
import org.bytedeco.opencv.presets.opencv_core;
import org.springframework.transaction.annotation.Transactional;
import jnpf.base.entity.ProvinceEntity;
import jnpf.collection.model.collection.*;
@ -97,6 +99,13 @@ public class CollectionController {
@Autowired
private PoundlistService poundlistService;
@GetMapping("/autoSerialNum")
@Transactional
public ActionResult autoSerialNum(@Param("param") String param,@Param("batchNum") String batchNum) throws DataException {
String result = generaterSwapUtil.getBillNumber(param, false);
return ActionResult.success(result);
}
/**
*
*
@ -109,21 +118,75 @@ public class CollectionController {
String[] idList = ids.split(",");
for (String id : idList) {
CollectionEntity collectionEntity = collectionService.getInfo(id);
if (ObjectUtils.isNotEmpty(collectionEntity)) {
if (collectionEntity.getStatus().equals("1")) {
return ActionResult.fail("已提交,无需再次提交");
}
if (collectionEntity.getStatus().equals("2")) {
return ActionResult.fail("已认款,无需再次提交");
}
if (collectionEntity.getAmountCollected() == null || collectionEntity.getAmountCollected().compareTo(BigDecimal.ZERO) < 1) {
return ActionResult.fail("请先输入收款金额");
if (collectionEntity.getStatus().equals("1")){
return ActionResult.fail("已提交");
}
if (collectionEntity.getStatus().equals("2")){
return ActionResult.fail("已认款");
}
if (collectionEntity.getStatus().equals("0")) {
QueryWrapper<Collection_item0Entity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(Collection_item0Entity::getCollectionId, id);
List<Collection_item0Entity> collection_item0EntityList = collection_item0Service.list(queryWrapper);//查询收款单子表信息
for (Collection_item0Entity collection_item0Entity : collection_item0EntityList) {
BigDecimal sum = new BigDecimal(0);
SaleorderitemEntity saleordercetEntity = saleorderitemService.getById(collection_item0Entity.getSalesorderId());//查询销售订单信息
if (saleordercetEntity.getAmountCollected() == null) {
saleordercetEntity.setAmountCollected(new BigDecimal(0));
}
// if (saleordercetEntity.getAmountCollected().equals(saleordercetEntity.getPrice())) {
// return ActionResult.fail("已回款金额等于金额");
// }
if (collectionEntity.getAmountCollected() == null || collectionEntity.getAmountCollected().compareTo(BigDecimal.ZERO) < 1) {
return ActionResult.fail("请先输入回款金额");
} else {
sum = saleordercetEntity.getAmountCollected().add(collection_item0Entity.getAmount());
if (sum.compareTo(saleordercetEntity.getPrice()) > 0) {
return ActionResult.fail("总回款金额大于金额");
}
}
QueryWrapper<Salesorder_item0Entity> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.lambda().eq(Salesorder_item0Entity::getSalesOrderId,saleordercetEntity.getId());
List<Salesorder_item0Entity> list = salesorder_item0Service.list(queryWrapper1);
List<PoundlistEntity> poundlist = new ArrayList<>();
for (Salesorder_item0Entity saleItem : list){
PoundlistEntity poundlistEntity = collectionService.queryPoundInfo(saleItem.getPoundlistId());
if (ObjectUtils.isNotEmpty(poundlistEntity)) {
poundlist.add(poundlistEntity);
}
}
if (poundlist.size() > 0) {
poundlist = poundlist.stream().sorted(Comparator.comparing(PoundlistEntity::getAdvance).reversed()
.thenComparing(Comparator.comparing(PoundlistEntity::getPoundDate))).collect(Collectors.toList());
}else{
return ActionResult.fail("磅单为空");
}
BigDecimal amount = new BigDecimal(0);
List<PoundlistEntity> poundlist1 = new ArrayList<>();
for (PoundlistEntity pound : poundlist){
if (pound.getSalesPrice()!=null && pound.getSettlement()!=null) {
amount = amount.add(pound.getSalesPrice().multiply(pound.getSettlement()));
if (amount.compareTo(sum) < 1) {
poundlist1.add(pound);
}else{
break;
}
}
}
for (PoundlistEntity poundlistEntity : poundlist1){
poundlistEntity.setIsCollection("1");
if (poundlistEntity.getPaymentDate() == null){
poundlistEntity.setPaymentDate(new Date());
}
poundlistService.updateById(poundlistEntity);
}
saleordercetEntity.setAmountCollected(sum);
// saleordercetEntity.setStatus("3");
saleorderitemService.updateById(saleordercetEntity);
collectionEntity.setStatus("1");
collectionService.updateById(collectionEntity);
return ActionResult.success("提交成功");
}
collectionEntity.setStatus("1");
collectionService.updateById(collectionEntity);
return ActionResult.success("提交成功");
} else {
return ActionResult.fail("数据为空");
}
}
return ActionResult.fail("请选择一条数据");
@ -140,83 +203,24 @@ public class CollectionController {
public ActionResult confirmPrice(@PathVariable("ids") String ids) {
String[] idList = ids.split(",");
for (String id : idList) {
CollectionEntity collectionEntity = collectionService.getInfo(id);
if (collectionEntity.getStatus().equals("0")){
return ActionResult.fail("提交中");
}
if (collectionEntity.getStatus().equals("2")){
return ActionResult.fail("已认款");
}
if (collectionEntity.getStatus().equals("1")) {
QueryWrapper<Collection_item0Entity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(Collection_item0Entity::getCollectionId, id);
List<Collection_item0Entity> collection_item0EntityList = collection_item0Service.list(queryWrapper);//查询收款单子表信息
for (Collection_item0Entity collection_item0Entity : collection_item0EntityList) {
BigDecimal sum = new BigDecimal(0);
SaleorderitemEntity saleordercetEntity = saleorderitemService.getById(collection_item0Entity.getSalesorderId());//查询销售订单信息
if (saleordercetEntity.getAmountCollected() == null) {
saleordercetEntity.setAmountCollected(new BigDecimal(0));
}
if (saleordercetEntity.getAmountCollected().equals(saleordercetEntity.getPrice())) {
return ActionResult.fail("已回款金额等于金额");
}
if (saleordercetEntity.getAmountCollected() != null && collection_item0Entity.getAmount() != null) {
sum = saleordercetEntity.getAmountCollected().add(collection_item0Entity.getAmount());
if (sum.compareTo(saleordercetEntity.getPrice()) > 0) {
return ActionResult.fail("总回款金额大于金额");
}
// saleordercetEntity.setAmountCollected(sum);
// saleordercetEntity.setStatus("3");
// saleorderitemService.updateById(saleordercetEntity);
} else {
return ActionResult.fail("已回款金额或回款金额不能为空");
}
QueryWrapper<Salesorder_item0Entity> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.lambda().eq(Salesorder_item0Entity::getSalesOrderId,saleordercetEntity.getId());
List<Salesorder_item0Entity> list = salesorder_item0Service.list(queryWrapper1);
List<PoundlistEntity> poundlist = new ArrayList<>();
// List<PoundlistEntity> poundsort = new LinkedList<>();
for (Salesorder_item0Entity saleItem : list){
PoundlistEntity poundlistEntity = collectionService.queryPoundInfo(saleItem.getPoundlistId());
if (ObjectUtils.isNotEmpty(poundlistEntity)) {
poundlist.add(poundlistEntity);
}
}
if (poundlist.size() > 0) {
poundlist = poundlist.stream().sorted(Comparator.comparing(PoundlistEntity::getAdvance).reversed()
.thenComparing(Comparator.comparing(PoundlistEntity::getPoundDate))).collect(Collectors.toList());
}else{
return ActionResult.fail("磅单为空");
CollectionEntity collectionEntity = collectionService.getInfo(id);
if (ObjectUtils.isNotEmpty(collectionEntity)) {
if (collectionEntity.getStatus().equals("0")) {
return ActionResult.fail("请先提交");
}
BigDecimal amount = new BigDecimal(0);
List<PoundlistEntity> poundlist1 = new ArrayList<>();
for (PoundlistEntity pound : poundlist){
if (pound.getSalesPrice()!=null && pound.getSettlement()!=null) {
amount = amount.add(pound.getSalesPrice().multiply(pound.getSettlement()));
if (amount.compareTo(sum) < 1) {
poundlist1.add(pound);
}else{
break;
}
}
if (collectionEntity.getStatus().equals("2")) {
return ActionResult.fail("已认款,无需再次提交");
}
for (PoundlistEntity poundlistEntity : poundlist1){
poundlistEntity.setIsCollection("1");
if (poundlistEntity.getPaymentDate() == null){
poundlistEntity.setPaymentDate(new Date());
}
saleordercetEntity.setAmountCollected(sum);
// saleordercetEntity.setStatus("3");
saleorderitemService.updateById(saleordercetEntity);
poundlistService.updateById(poundlistEntity);
collectionEntity.setStatus("2");
collectionService.updateById(collectionEntity);
return ActionResult.success("认款成功");
if (collectionEntity.getAmountCollected() == null || collectionEntity.getAmountCollected().compareTo(BigDecimal.ZERO) < 1) {
return ActionResult.fail("请先输入收款金额");
}
return ActionResult.fail("收款金额不足");
collectionEntity.setStatus("2");
collectionService.updateById(collectionEntity);
return ActionResult.success("认款成功");
} else {
return ActionResult.fail("数据为空");
}
}
}
return ActionResult.fail("请选择一条数据");
}
/**
@ -258,9 +262,21 @@ public class CollectionController {
@PostMapping
@Transactional
public ActionResult create(@RequestBody @Valid CollectionCrForm collectionCrForm) throws DataException {
if (collectionCrForm.getCollection_item0List().size()>0) {
SaleorderitemEntity saleorderitemEntity = saleorderitemService.getInfo(collectionCrForm.getCollection_item0List().get(0).getSalesorderId());
if (saleorderitemEntity.getAmountCollected() == null){
saleorderitemEntity.setAmountCollected(new BigDecimal(0));
}
if (saleorderitemEntity.getAmountCollected().equals(saleorderitemEntity.getPrice()) ||
saleorderitemEntity.getAmountCollected().compareTo(saleorderitemEntity.getPrice()) == 1){
return ActionResult.fail("已回完款,无需回款");
}
}else {
return ActionResult.fail("销售订单不存在");
}
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
collectionCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("collection", false));
// collectionCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("collection", false));
CollectionEntity entity = JsonUtil.getJsonToBean(collectionCrForm, CollectionEntity.class);
entity.setId(mainId);
collectionService.save(entity);
@ -437,20 +453,22 @@ public class CollectionController {
//子表
List<Collection_item0Entity> Collection_item0List = collectionService.GetCollection_item0List(id);
for(Collection_item0Entity collection_item0Entity : Collection_item0List){
QueryWrapper<SaleorderitemEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(SaleorderitemEntity::getId,collection_item0Entity.getSalesorderId());
SaleorderitemEntity saleorderitemEntity = saleorderitemService.getOne(queryWrapper);
collection_item0Entity.setPrice(saleorderitemEntity.getPrice());
collection_item0Entity.setAmountCollected(saleorderitemEntity.getAmountCollected());
collection_item0Entity.setContractId(saleorderitemEntity.getContractId());
collection_item0Entity.setSalesorderId(saleorderitemEntity.getId());
collection_item0Entity.setCreatorTime(saleorderitemEntity.getCreatorTime());
collection_item0Entity.setNum(saleorderitemEntity.getNum());
collection_item0Entity.setAdvanceAmount(saleorderitemEntity.getAdvanceAmount());
collection_item0Entity.setRate(saleorderitemEntity.getRate());
collection_item0Entity.setNotPrice(saleorderitemEntity.getNotPrice());
}
for(Collection_item0Entity collection_item0Entity : Collection_item0List) {
QueryWrapper<SaleorderitemEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(SaleorderitemEntity::getId, collection_item0Entity.getSalesorderId());
SaleorderitemEntity saleorderitemEntity = saleorderitemService.getOne(queryWrapper);
if (ObjectUtils.isNotEmpty(saleorderitemEntity)) {
collection_item0Entity.setPrice(saleorderitemEntity.getPrice());
collection_item0Entity.setAmountCollected(saleorderitemEntity.getAmountCollected());
collection_item0Entity.setContractId(saleorderitemEntity.getContractId());
collection_item0Entity.setSalesorderId(saleorderitemEntity.getId());
collection_item0Entity.setCreatorTime(saleorderitemEntity.getCreatorTime());
collection_item0Entity.setNum(saleorderitemEntity.getNum());
collection_item0Entity.setAdvanceAmount(saleorderitemEntity.getAdvanceAmount());
collection_item0Entity.setRate(saleorderitemEntity.getRate());
collection_item0Entity.setNotPrice(saleorderitemEntity.getNotPrice());
}
}
vo.setCollection_item0List(JsonUtil.getJsonToList(Collection_item0List,Collection_item0Model.class ));
//副表
return ActionResult.success(vo);
@ -470,23 +488,25 @@ public class CollectionController {
//子表数据转换
List<Collection_item0Entity> jg_collection_item0List = collectionService.GetCollection_item0List(id);
List<Collection_item0Model> jg_collection_item0ModelList = JsonUtil.getJsonToList(jg_collection_item0List,Collection_item0Model.class);
for(Collection_item0Model jg_collection_item0Model : jg_collection_item0ModelList){
for(Collection_item0Model jg_collection_item0Model : jg_collection_item0ModelList) {
QueryWrapper<SaleorderitemEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(SaleorderitemEntity::getId,jg_collection_item0Model.getSalesorderId());
queryWrapper.lambda().eq(SaleorderitemEntity::getId, jg_collection_item0Model.getSalesorderId());
SaleorderitemEntity saleorderitemEntity = saleorderitemService.getOne(queryWrapper);
jg_collection_item0Model.setPrice(String.valueOf(saleorderitemEntity.getPrice()));
jg_collection_item0Model.setAmountCollected(String.valueOf(saleorderitemEntity.getAmountCollected()));
jg_collection_item0Model.setContractId(saleorderitemEntity.getContractId());
jg_collection_item0Model.setSalesorderId(saleorderitemEntity.getDocumentNo());
jg_collection_item0Model.setNum(String.valueOf(saleorderitemEntity.getNum()));
jg_collection_item0Model.setAdvanceAmount(String.valueOf(saleorderitemEntity.getAdvanceAmount()));
jg_collection_item0Model.setRate(String.valueOf(saleorderitemEntity.getRate()));
jg_collection_item0Model.setNotPrice(String.valueOf(saleorderitemEntity.getNotPrice()));
if (ObjectUtils.isNotEmpty(saleorderitemEntity)) {
jg_collection_item0Model.setPrice(String.valueOf(saleorderitemEntity.getPrice()));
jg_collection_item0Model.setAmountCollected(String.valueOf(saleorderitemEntity.getAmountCollected()));
jg_collection_item0Model.setContractId(saleorderitemEntity.getContractId());
jg_collection_item0Model.setSalesorderId(saleorderitemEntity.getDocumentNo());
jg_collection_item0Model.setNum(String.valueOf(saleorderitemEntity.getNum()));
jg_collection_item0Model.setAdvanceAmount(String.valueOf(saleorderitemEntity.getAdvanceAmount()));
jg_collection_item0Model.setRate(String.valueOf(saleorderitemEntity.getRate()));
jg_collection_item0Model.setNotPrice(String.valueOf(saleorderitemEntity.getNotPrice()));
// Map<String,Object> salesorderIdMap = new HashMap<>();
// jg_collection_item0Model.setSalesorderId(generaterSwapUtil.getPopupSelectValue("400235058386036741","id","document_no",jg_collection_item0Model.getSalesorderId(),salesorderIdMap));
Map<String,Object> deleteTimeMap = new HashMap<>();
jg_collection_item0Model.setContractId(generaterSwapUtil.getPopupSelectValue("398848549678332037","id","contract_code",jg_collection_item0Model.getContractId(),deleteTimeMap));
}
Map<String, Object> deleteTimeMap = new HashMap<>();
jg_collection_item0Model.setContractId(generaterSwapUtil.getPopupSelectValue("398848549678332037", "id", "contract_code", jg_collection_item0Model.getContractId(), deleteTimeMap));
}
}
vo.setCollection_item0List(jg_collection_item0ModelList);
//附表数据转换

@ -37,5 +37,7 @@ public interface CollectionService extends IService<CollectionEntity> {
PoundlistEntity queryPoundInfo(String poundlistId);
PoundlistEntity test (String poundlistId);
//列表子表数据方法
}

@ -277,6 +277,11 @@ public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, Collect
// return collectionMapper.queryPound(poundlistId);
}
@Override
public PoundlistEntity test(String poundlistId) {
return collectionMapper.queryPound(poundlistId);
}
//列表子表数据方法

@ -99,7 +99,7 @@ public class ContractFileController {
* @return
*/
@PostMapping("/getList")
public ActionResult list(@RequestBody ContractFilePagination contractFilePagination) throws IOException {
public ActionResult list(@RequestBody ContractFilePagination contractFilePagination) throws IOException {
List<ContractFileEntity> list = contractFileService.getList(contractFilePagination);
//处理id字段转名称若无需转或者为空可删除
for (ContractFileEntity entity : list) {

@ -17,5 +17,5 @@ public class ContractFileListQueryModel {
/**
* id
*/
// private String menuId;
private String menuId;
}

@ -14,6 +14,12 @@ import jnpf.base.Pagination;
*/
@Data
public class ContractFilePagination extends Pagination {
/** 合同编码 */
private String contractCode;
/** 合同名称 */
private String contractName;
/**
* id
*/

@ -20,4 +20,10 @@ public class ContractFilePaginationExportModel extends Pagination {
private String dataType;
/** 合同编码 */
private String contractCode;
/** 合同名称 */
private String contractName;
}

@ -133,6 +133,17 @@ public class ContractFileServiceImpl extends ServiceImpl<ContractFileMapper, Con
}
}
if(StringUtil.isNotEmpty(contractFilePagination.getContractCode())){
contract_item0Num++;
contractFileQueryWrapper.lambda().like(ContractFileEntity::getContractCode,contractFilePagination.getContractCode());
}
if(StringUtil.isNotEmpty(contractFilePagination.getContractName())){
contract_item0Num++;
contractFileQueryWrapper.lambda().like(ContractFileEntity::getContractName,contractFilePagination.getContractName());
}
if (AllIdList.size() > 0) {
contractFileQueryWrapper.lambda().in(ContractFileEntity::getId, AllIdList);
}
@ -231,6 +242,16 @@ public class ContractFileServiceImpl extends ServiceImpl<ContractFileMapper, Con
}
}
if(StringUtil.isNotEmpty(contractFilePagination.getContractCode())){
contract_item0Num++;
contractFileQueryWrapper.lambda().like(ContractFileEntity::getContractCode,contractFilePagination.getContractCode());
}
if(StringUtil.isNotEmpty(contractFilePagination.getContractName())){
contract_item0Num++;
contractFileQueryWrapper.lambda().like(ContractFileEntity::getContractName,contractFilePagination.getContractName());
}
if (AllIdList.size() > 0) {
contractFileQueryWrapper.lambda().in(ContractFileEntity::getId, AllIdList);
}

@ -16,9 +16,11 @@ import java.util.Map;
*/
public class BaiduUtils {
// 官网获取的 API Ke
private static String clientId="adcBcYqcGzoyDjQTsWTSp8No";
// private static String clientId="adcBcYqcGzoyDjQTsWTSp8No";
private static String clientId="mIAtIhkixrmfGiSrvKfNPGl3";
// 官网获取的 Secret Key
private static String clientSecret="YMOhZfVoVYvgLcTXjoOF62ZYfvGgMpr4";
// private static String clientSecret="YMOhZfVoVYvgLcTXjoOF62ZYfvGgMpr4";
private static String clientSecret=" kbGa5y0tZtwNsNMlC2C401v7CrGMmAzO";
// 必须参数固定为client_credentials
private String grant="grant_type";
@ -34,9 +36,11 @@ public class BaiduUtils {
*/
public static String getAuth() {
// 官网获取的 API Key 更新为你注册的
String clientId ="adcBcYqcGzoyDjQTsWTSp8No" ;
// String clientId ="adcBcYqcGzoyDjQTsWTSp8No" ;
String clientId ="mIAtIhkixrmfGiSrvKfNPGl3" ;
// 官网获取的 Secret Key 更新为你注册的
String clientSecret = "YMOhZfVoVYvgLcTXjoOF62ZYfvGgMpr4";
// String clientSecret = "YMOhZfVoVYvgLcTXjoOF62ZYfvGgMpr4";
String clientSecret = "kbGa5y0tZtwNsNMlC2C401v7CrGMmAzO";
return getAuth(clientId, clientSecret);
}

@ -14,6 +14,8 @@ import jnpf.base.vo.PaginationVO;
import jnpf.base.UserInfo;
import jnpf.base.vo.DownloadVO;
import jnpf.config.ConfigValueUtil;
import jnpf.contractfile.entity.ContractFileEntity;
import jnpf.contractfile.service.ContractFileService;
import jnpf.exception.DataException;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
@ -73,6 +75,8 @@ public class PoundlistController {
@Autowired
private PoundlistService poundlistService;
@Autowired
private ContractFileService contractFileService;
/**
*
@ -81,7 +85,7 @@ public class PoundlistController {
* @return
*/
@PostMapping("/createsale/{ids}")
public ActionResult createSale(@PathVariable("ids") String ids){
public ActionResult createSale(@PathVariable("ids") String ids) throws DataException {
String[] idList = ids.split(",");
List<PoundlistEntity> list = new ArrayList<>();
for (String allId : idList){
@ -91,6 +95,9 @@ public class PoundlistController {
queryWrapper.lambda().eq(PoundlistEntity::getSalesStatus,"99");
PoundlistEntity poundlistEntity = poundlistService.getOne(queryWrapper);
if (ObjectUtils.isNotEmpty(poundlistEntity)) {
ContractFileEntity entity = contractFileService.getInfo(poundlistEntity.getSalesId());
poundlistEntity.setContractNo(entity.getContractNo());
poundlistEntity.setDocumentNo(generaterSwapUtil.getBillNumber("salesOrder", false));
list.add(poundlistEntity);
}
}
@ -223,7 +230,6 @@ public class PoundlistController {
entity.setNaturalId(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",entity.getNaturalId(),naturalIdMap));
Map<String,Object> purchaseIdMap = new HashMap<>();
entity.setPurchaseId(generaterSwapUtil.getPopupSelectValue("397408984857931205","id","contract_name",entity.getPurchaseId(),purchaseIdMap));
entity.setOriginPlace(generaterSwapUtil.provinceData(entity.getOriginPlace()));
}
List<PoundlistListVO> listVO=JsonUtil.getJsonToList(list,PoundlistListVO.class);
for(PoundlistListVO poundlistVO:listVO){
@ -291,9 +297,6 @@ public class PoundlistController {
case "transportPrice" :
entitys.add(new ExcelExportEntity("运费" ,"transportPrice"));
break;
case "originPlace" :
entitys.add(new ExcelExportEntity("起始地" ,"originPlace"));
break;
case "salesPrice" :
entitys.add(new ExcelExportEntity("销售价格" ,"salesPrice"));
break;

@ -207,6 +207,10 @@ public class PoundlistEntity {
@TableField(exist = false)
private String purchaseName;
@TableField(exist = false)
private String contractNo;
@TableField(exist = false)
private String purchaseContractNo;
@TableField(exist = false)
private String documentNo;
}

@ -178,7 +178,7 @@ public class ReceiptoutController {
public ActionResult create(@RequestBody @Valid ReceiptoutCrForm receiptoutCrForm) throws DataException {
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
receiptoutCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("chuku", false));
// receiptoutCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("chuku", false));
receiptoutCrForm.setCreatorTime(DateUtil.getNow());
receiptoutCrForm.setCreatorUserName(userInfo.getUserId());
ReceiptoutEntity entity = JsonUtil.getJsonToBean(receiptoutCrForm, ReceiptoutEntity.class);
@ -188,6 +188,7 @@ public class ReceiptoutController {
for(Receiptout_item0Entity entitys : Receiptout_item0List){
entitys.setId(RandomUtil.uuId());
entitys.setReceiptinId(entity.getId());
// entitys.setBatchNo(generaterSwapUtil.getBillNumber("receiptout-num", false));
receiptout_item0Service.save(entitys);
}
return ActionResult.success("创建成功");

@ -21,6 +21,9 @@ public class ReceiptoutPagination extends Pagination {
/** 业务类型 */
private String type;
/** 出库日期 */
private List<String> issueDate;
/**
* id
*/

@ -137,7 +137,7 @@ public class SalebackController {
public ActionResult create(@RequestBody @Valid SalebackCrForm salebackCrForm) throws DataException {
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
salebackCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("salesBack", false));
// salebackCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("salesBack", false));
salebackCrForm.setCreatorTime(DateUtil.getNow());
salebackCrForm.setCreatorUserName(userInfo.getUserId());
SalebackEntity entity = JsonUtil.getJsonToBean(salebackCrForm, SalebackEntity.class);

@ -35,6 +35,8 @@ import jnpf.reservoirarea.entity.ReservoirareaEntity;
import jnpf.reservoirarea.service.ReservoirareaService;
import jnpf.saleorder.mapper.ReceiptoutsoitemMapper;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.ibatis.annotations.Param;
import org.bytedeco.opencv.presets.opencv_core;
import org.springframework.security.core.parameters.P;
import org.springframework.transaction.annotation.Transactional;
import jnpf.base.entity.ProvinceEntity;
@ -144,6 +146,18 @@ public class SaleorderitemController {
@Autowired
private Arinvoices_item1Service arinvoices_item1Service;
/**
*
*
* @param poundlistEntity
* @return
*/
@PostMapping("/updatePrice")
@Transactional
public ActionResult updatePrice(@RequestBody PoundlistEntity poundlistEntity){
poundlistService.updateById(poundlistEntity);
return ActionResult.success("修改单价成功");
}
/**
*
@ -152,7 +166,8 @@ public class SaleorderitemController {
* @return
*/
@PostMapping("/delivery/{ids}")
public ActionResult delivery(@PathVariable("ids") String ids){
@Transactional
public ActionResult delivery(@PathVariable("ids") String ids) throws DataException {
String[] idList = ids.split(",");
List<SaleorderitemEntity> list = new ArrayList<>();
for (String id : idList){
@ -173,13 +188,17 @@ public class SaleorderitemController {
QueryWrapper<ReservoirareaEntity> queryWrapper3 = new QueryWrapper<>();
queryWrapper3.lambda().eq(ReservoirareaEntity::getId,materialEntity.getOutArea());
ReservoirareaEntity reservoirareaEntity = reservoirareaService.getOne(queryWrapper3);
entity.setWarehouseId(reservoirareaEntity.getWarehouseId());
if (ObjectUtils.isNotEmpty(reservoirareaEntity)) {
entity.setWarehouseId(reservoirareaEntity.getWarehouseId());
}
}
QueryWrapper<PoundlistEntity> queryWrapper3 = new QueryWrapper<>();
queryWrapper3.lambda().eq(PoundlistEntity::getId,entity.getPoundlistId());
PoundlistEntity poundlistEntity = poundlistService.getOne(queryWrapper3);
entity.setPoundEntity(poundlistEntity);
entity.setBatchNo(generaterSwapUtil.getBillNumber("receiptout-num", false));
}
saleorderitemEntity.setDocumentNo(generaterSwapUtil.getBillNumber("chuku", false));
saleorderitemEntity.setList(dList);
list.add(saleorderitemEntity);
}else{
@ -196,7 +215,8 @@ public class SaleorderitemController {
*/
@PostMapping("/invoiceentry/{ids}")
public ActionResult invoiceEntry(@PathVariable("ids") String ids){
@Transactional
public ActionResult invoiceEntry(@PathVariable("ids") String ids) throws DataException {
String[] idList = ids.split(",");
for (String id : idList) {
QueryWrapper<ArinvoicesEntity> queryWrapper2 = new QueryWrapper<>();
@ -229,6 +249,7 @@ public class SaleorderitemController {
entity.setPoundEntity(poundlistEntity);
}
saleorderitemEntity.setList(dList);
saleorderitemEntity.setDocumentNo(generaterSwapUtil.getBillNumber("arinvoices", false));
list.add(saleorderitemEntity);
return ActionResult.success(list);
} else {
@ -246,6 +267,7 @@ public class SaleorderitemController {
* @return
*/
@PostMapping("/archive/{ids}")
@Transactional
public ActionResult archive(@PathVariable("ids") String ids){
String[] idList = ids.split(",");
for (String id : idList) {
@ -291,7 +313,8 @@ public class SaleorderitemController {
* @return
*/
@PostMapping("/materialback/{ids}")
public ActionResult materialBack(@PathVariable("ids") String ids) {
@Transactional
public ActionResult materialBack(@PathVariable("ids") String ids) throws DataException {
String[] idList = ids.split(",");
List<SaleorderitemEntity> list = new ArrayList<>();
for (String id : idList){
@ -315,6 +338,7 @@ public class SaleorderitemController {
entity.setPoundEntity(poundlistEntity);
}
saleorderitemEntity.setList(dList);
saleorderitemEntity.setDocumentNo(generaterSwapUtil.getBillNumber("salesBack", false));
list.add(saleorderitemEntity);
}else{
return ActionResult.fail("未找到该数据");
@ -330,7 +354,8 @@ public class SaleorderitemController {
* @return
*/
@PostMapping("/collection/{ids}")
public ActionResult collection(@PathVariable("ids") String ids) {
@Transactional
public ActionResult collection(@PathVariable("ids") String ids) throws DataException {
String[] idList = ids.split(",");
List<SaleorderitemEntity> list = new ArrayList<>();
for (String id : idList){
@ -349,6 +374,7 @@ public class SaleorderitemController {
entity.setPoundEntity(poundlistEntity);
}
sale.setList(dList);
sale.setDocumentNo(generaterSwapUtil.getBillNumber("collection", false));
list.add(sale);
}else{
return ActionResult.fail("数据状态无法回款");
@ -399,11 +425,14 @@ public class SaleorderitemController {
public ActionResult create(@RequestBody @Valid SaleorderitemCrForm saleorderitemCrForm) throws DataException {
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
saleorderitemCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("salesOrder", false));
// saleorderitemCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("salesOrder", false));
saleorderitemCrForm.setCreatorUserName(userInfo.getUserId());
saleorderitemCrForm.setCreatorTime(DateUtil.getNow());
SaleorderitemEntity entity = JsonUtil.getJsonToBean(saleorderitemCrForm, SaleorderitemEntity.class);
entity.setId(mainId);
if (entity.getPrice() != null && entity.getNotPrice()!=null) {
entity.setRate(entity.getPrice().subtract(entity.getNotPrice()));
}
saleorderitemService.save(entity);
List<Salesorder_item0Entity> Salesorder_item0List = JsonUtil.getJsonToList(saleorderitemCrForm.getSalesorder_item0List(),Salesorder_item0Entity.class);
for(Salesorder_item0Entity entitys : Salesorder_item0List){
@ -680,9 +709,10 @@ public class SaleorderitemController {
}
vo.setSalesorder_item0List(jg_salesorder_item0ModelList);
List<ReceiptoutsoitemEntity> jg_receiptoutList = saleorderitemService.GetReceiptoutsoitemList(id);
List<ReceiptoutsoitemModel> jg_receiptoutModelList = new ArrayList<>();
if (jg_receiptoutList.size()>0) {
List<Receiptout_item0Entity> list = saleorderitemService.getReceiptout(jg_receiptoutList.get(0).getId());
List<ReceiptoutsoitemModel> jg_receiptoutModelList = JsonUtil.getJsonToList(list, ReceiptoutsoitemModel.class);
jg_receiptoutModelList = JsonUtil.getJsonToList(list, ReceiptoutsoitemModel.class);
for (ReceiptoutsoitemModel jg_receiptoutModel : jg_receiptoutModelList) {
jg_receiptoutModel.setDocumentNo(jg_receiptoutList.get(0).getDocumentNo());
jg_receiptoutModel.setIssueDate(jg_receiptoutList.get(0).getIssueDate().getTime());
@ -695,19 +725,20 @@ public class SaleorderitemController {
Map<String,Object> warehouseMap = new HashMap<>();
jg_receiptoutModel.setWarehouseId(generaterSwapUtil.getPopupSelectValue("399117969575232581","id","name",jg_receiptoutModel.getWarehouseId(),warehouseMap));
}
vo.setReceiptoutsoitemList(jg_receiptoutModelList);
}
vo.setReceiptoutsoitemList(jg_receiptoutModelList);
QueryWrapper<ArinvoicesEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ArinvoicesEntity::getSalesOrderId,id);
ArinvoicesEntity arinvoicesEntity = arinvoicesService.getOne(queryWrapper);
List<Arinvoices_item0soitemModel> jg_arinvoices_item0ModelList = new ArrayList<>();
if (ObjectUtils.isNotEmpty(arinvoicesEntity)) {
List<Arinvoices_item0soitemEntity> jg_arinvoices_item0List = saleorderitemService.GetArinvoices_item0soitemList(arinvoicesEntity.getId());
List<Arinvoices_item0soitemModel> jg_arinvoices_item0ModelList = JsonUtil.getJsonToList(jg_arinvoices_item0List, Arinvoices_item0soitemModel.class);
jg_arinvoices_item0ModelList = JsonUtil.getJsonToList(jg_arinvoices_item0List, Arinvoices_item0soitemModel.class);
for (Arinvoices_item0soitemModel jg_arinvoices_item0Model : jg_arinvoices_item0ModelList) {
jg_arinvoices_item0Model.setAttachMent(generaterSwapUtil.getFileNameInJson(jg_arinvoices_item0Model.getAttachMent()));
}
vo.setArinvoices_item0soitemList(jg_arinvoices_item0ModelList);
}
vo.setArinvoices_item0soitemList(jg_arinvoices_item0ModelList);
QueryWrapper<Collection_item0Entity> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.lambda().eq(Collection_item0Entity::getSalesorderId,id);
List<Collection_item0Entity> collection_item0Entity = collection_item0Service.list(queryWrapper1);
@ -717,11 +748,11 @@ public class SaleorderitemController {
List<CollectionsoitemEntity> jg_collectionList = saleorderitemService.GetCollectionsoitemList(collection_item0Entity1.getCollectionId());
collectionsoitemEntityList.addAll(jg_collectionList);
}
List<CollectionsoitemModel> jg_collectionModelList = JsonUtil.getJsonToList(collectionsoitemEntityList, CollectionsoitemModel.class);
for (CollectionsoitemModel jg_collectionModel : jg_collectionModelList) {
}
vo.setCollectionsoitemList(jg_collectionModelList);
}
List<CollectionsoitemModel> jg_collectionModelList = JsonUtil.getJsonToList(collectionsoitemEntityList, CollectionsoitemModel.class);
for (CollectionsoitemModel jg_collectionModel : jg_collectionModelList) {
}
vo.setCollectionsoitemList(jg_collectionModelList);
List<SalesbacksoitemEntity> jg_salesbackList = saleorderitemService.GetSalesbacksoitemList(id);
List<SalesbacksoitemModel> jg_salesbackModelList = JsonUtil.getJsonToList(jg_salesbackList,SalesbacksoitemModel.class);
for(SalesbacksoitemModel jg_salesbackModel : jg_salesbackModelList){
@ -775,6 +806,12 @@ public class SaleorderitemController {
entitys.setId(RandomUtil.uuId());
entitys.setSalesOrderId(entity.getId());
salesorder_item0Service.save(entitys);
if (entitys.getUnitPrice() != null && entitys.getPoundlistId() !=null) {
PoundlistEntity poundlistEntity = new PoundlistEntity();
poundlistEntity.setSalesPrice(entitys.getUnitPrice());
poundlistEntity.setId(entitys.getPoundlistId());
poundlistService.updateById(poundlistEntity);
}
}
return ActionResult.success("更新成功");
}else{

@ -149,6 +149,9 @@ public class Salesorder_item0Entity {
@TableField(exist = false)
private PoundlistEntity poundEntity;
@TableField(exist = false)
private String batchNo;
}

@ -21,6 +21,9 @@ public class SaleorderitemPagination extends Pagination {
/** 单据状态 */
private String status;
/** 单据状态 */
private List<String> creatorTime;
/**
* id
*/

@ -1,5 +1,6 @@
package jnpf.saleorder.service.impl;
import jnpf.arinvoices.entity.ArinvoicesEntity;
import jnpf.receiptout.entity.Receiptout_item0Entity;
import jnpf.receiptout.service.Receiptout_item0Service;
import jnpf.saleorder.entity.*;
@ -227,6 +228,16 @@ public class SaleorderitemServiceImpl extends ServiceImpl<SaleorderitemMapper, S
saleorderitemNum++;
saleorderitemQueryWrapper.lambda().eq(SaleorderitemEntity::getStatus,saleorderitemPagination.getStatus());
}
if(StringUtil.isNotEmpty(saleorderitemPagination.getCreatorTime())){
saleorderitemNum++;
List<String> creatorTime = saleorderitemPagination.getCreatorTime();
Long fir = Long.valueOf(creatorTime.get(0));
Long sec = Long.valueOf(creatorTime.get(1));
saleorderitemQueryWrapper.lambda().ge(SaleorderitemEntity::getCreatorTime, new Date(fir))
.le(SaleorderitemEntity::getCreatorTime, DateUtil.stringToDate(DateUtil.daFormatYmd(sec) + " 23:59:59"));
}
if(AllIdList.size()>0){
saleorderitemQueryWrapper.lambda().in(SaleorderitemEntity::getId, AllIdList);

@ -39,7 +39,7 @@ const units = {
GB: 1024 * 1024 * 1024
}
export default {
name: 'UploadImg',
name: 'UploadImg2',
props: {
value: {
type: Array,
@ -167,4 +167,4 @@ export default {
.upload-btn {
display: inline-block;
}
</style>
</style>

@ -0,0 +1,170 @@
<template>
<div class="UploadFile-container">
<template v-if="fileList.length">
<transition-group class="el-upload-list el-upload-list--picture-card" tag="ul" name="el-list">
<li class="el-upload-list__item is-success" v-for="(file,index) in fileList"
:key="file.fileId">
<el-image :src="define.comUrl+file.url" class="el-upload-list__item-thumbnail"
:preview-src-list="getImgList(fileList)" :z-index="10000" :ref="'image'+index">
</el-image>
<span class="el-upload-list__item-actions">
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(index)">
<i class="el-icon-zoom-in"></i>
</span>
<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(index)">
<i class="el-icon-delete"></i>
</span>
</span>
</li>
</transition-group>
</template>
<template v-if="!detailed">
<el-upload :action="define.comUploadPoundUrl+'/'+type" :headers="uploadHeaders" ref="elUpload"
:on-success="handleSuccess" :multiple="limit!==1" :show-file-list="false" accept="image/*"
:before-upload="beforeUpload" :on-exceed="handleExceed" :disabled="disabled"
list-type="picture-card" :limit="limit" class="upload-btn">
<i class="el-icon-plus"></i>
<div slot="tip" class="el-upload__tip" v-show="showTip">
只能上传不超过{{fileSize}}{{sizeUnit}}{{accept}}图片
</div>
</el-upload>
</template>
</div>
</template>
<script>
const units = {
KB: 1024,
MB: 1024 * 1024,
GB: 1024 * 1024 * 1024
}
export default {
name: 'UploadImg',
props: {
value: {
type: Array,
default: () => []
},
type: {
type: String,
default: 'annexpic'
},
disabled: {
type: Boolean,
default: false
},
detailed: {
type: Boolean,
default: false
},
showTip: {
type: Boolean,
default: false
},
limit: {
type: Number,
default: 0
},
accept: {
type: String,
default: 'image/*'
},
sizeUnit: {
type: String,
default: 'MB'
},
fileSize: {
default: 5
},
},
data() {
return {
fileList: [],
uploadHeaders: { Authorization: this.$store.getters.token }
}
},
watch: {
value: {
immediate: true,
handler(val) {
this.fileList = val
this.$nextTick(() => {
if (!val.length) {
this.$refs.elUpload && this.$refs.elUpload.uploadFiles.splice(0)
} else {
if (!this.$refs.elUpload) return
this.$refs.elUpload.uploadFiles = val.map(o => ({
...o,
uid: o.fileId
}))
}
})
}
}
},
methods: {
beforeUpload(file) {
const unitNum = units[this.sizeUnit];
if (!this.fileSize) return true
let isRightSize = file.size / unitNum < this.fileSize
if (!isRightSize) {
this.$message.error(`图片大小超过${this.fileSize}${this.sizeUnit}`)
return isRightSize;
}
let isAccept = new RegExp('image/*').test(file.type)
if (!isAccept) {
this.$message.error(`请上传图片`)
return isAccept;
}
return isRightSize && isAccept;
},
handleSuccess(res, file, fileList) {
if (res.code == 200) {
this.fileList.push({
name: file.name,
fileId: res.data.vo.name,
url: res.data.vo.url
})
this.$emit('input', this.fileList)
this.$emit('change', res)
} else {
this.$refs.elUpload.uploadFiles.splice(fileList.length - 1, 1)
fileList.filter(o => o.uid != file.uid)
this.$emit('input', this.fileList)
this.$emit('change', this.fileList)
this.$message({ message: res.msg, type: 'error', duration: 1500 })
}
},
handleExceed(files, fileList) {
this.$message.warning(`当前限制最多可以上传${this.limit}张图片`)
},
handlePictureCardPreview(index) {
this.$refs['image' + index][0].clickHandler()
},
handleRemove(index) {
this.fileList.splice(index, 1)
this.$refs.elUpload.uploadFiles.splice(index, 1)
this.$emit("input", this.fileList)
this.$emit('change', this.fileList)
},
getImgList(list) {
const newList = list.map(o => this.define.comUrl + o.url)
return newList
}
}
}
</script>
<style lang="scss" scoped>
>>> .el-upload-list--picture-card .el-upload-list__item {
width: 120px;
height: 120px;
}
>>> .el-upload--picture-card {
width: 120px;
height: 120px;
line-height: 120px;
}
.upload-btn {
display: inline-block;
}
</style>

@ -17,6 +17,7 @@ import JnpfQrcode from '@/components/Generator/components/JnpfQrcode'
import JnpfButton from '@/components/Generator/components/JnpfButton'
import JNPFUploadFz from '@/components/Generator/components/Upload/UploadFz'
import JNPFUploadImg from '@/components/Generator/components/Upload/UploadImg'
import JNPFUploadImg2 from '@/components/Generator/components/Upload/UploadImg2'
import PopupSelect from '@/components/Generator/components/PopupSelect'
import PopupAttr from '@/components/Generator/components/PopupAttr'
import NumRange from '@/components/Generator/components/NumRange'
@ -48,6 +49,7 @@ export default {
Vue.component('JnpfButton', JnpfButton)
Vue.component('JNPFUploadFz', JNPFUploadFz)
Vue.component('JNPFUploadImg', JNPFUploadImg)
Vue.component('JNPFUploadImg2', JNPFUploadImg2)
Vue.component('PopupSelect', PopupSelect)
Vue.component('PopupAttr', PopupAttr)
Vue.component('NumRange', NumRange)

@ -90,7 +90,7 @@
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="销售订单号"
<el-form-item label="来源单号"
prop="salesOrderId" >
<popupSelect v-model="dataForm.salesOrderId"
placeholder="请选择" clearable field="salesOrderId" interfaceId="398359995269352069" :columnOptions="salesOrderIdcolumnOptions" propsValue="id" relationField="document_no" popupType="dialog"
@ -130,9 +130,9 @@
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.arinvoices_item1List" size='mini' >
<el-table :data="dataForm.arinvoices_item1List" size='mini' show-summary :summary-method="getSummaries">
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="materialId" label="物料">
<el-table-column prop="materialId" label="物料" align="center" width="180">
<template slot-scope="scope">
<popupSelect v-model="scope.row.materialId"
placeholder="请选择" clearable :field="'materialId'+scope.$index" interfaceId="397736371898382533" :columnOptions="arinvoices_item1materialIdcolumnOptions" propsValue="id" relationField="item_name" popupType="dialog"
@ -141,21 +141,21 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="quantity" label="数量">
<el-table-column prop="quantity" label="数量" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.quantity"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价">
<el-table-column prop="unitPrice" label="单价" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.unitPrice"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="unit" label="单位">
<el-table-column prop="unit" label="单位" align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.unit"
placeholder="请选择" clearable :style='{"width":"100%"}'>
@ -163,14 +163,14 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="amount" label="金额">
<el-table-column prop="amount" label="金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.amount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="taxRate" label="税率 ">
<el-table-column prop="taxRate" label="税率 " align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.taxRate"
placeholder="请选择" clearable :style='{"width":"100%"}'>
@ -178,21 +178,21 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="taxAmount" label="税额">
<el-table-column prop="taxAmount" label="税额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.taxAmount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="amountNotTax" label="不含税金额">
<el-table-column prop="amountNotTax" label="不含税金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.amountNotTax"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注信息">
<el-table-column prop="remark" label="备注信息" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'>
@ -217,7 +217,7 @@
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.arinvoices_item0List" size='mini' >
<el-table :data="dataForm.arinvoices_item0List" size='mini' show-summary :summary-method="getSummaries2" >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="invoiceCode" label="发票代码">
<template slot-scope="scope">
@ -226,28 +226,28 @@
</el-input>
</template>
</el-table-column>
<el-table-column prop="invoiceNo" label="发票号码">
<el-table-column prop="invoiceNo" label="发票号码" align="center" width="130">
<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="发票数量" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.invoiceQuantity"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="involceAmount" label="发票金额">
<el-table-column prop="involceAmount" label="发票金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.involceAmount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="taxRate" label="税率 ">
<el-table-column prop="taxRate" label="税率 " align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.taxRate"
placeholder="请选择" clearable :style='{"width":"100%"}'>
@ -255,21 +255,21 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="taxAmount" label="税额">
<el-table-column prop="taxAmount" label="税额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.taxAmount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="amountNotTax" label="不含税金额">
<el-table-column prop="amountNotTax" label="不含税金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.amountNotTax"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="invoiceStatus" label="发票状态">
<el-table-column prop="invoiceStatus" label="发票状态" align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.invoiceStatus"
placeholder="请选择" clearable :style='{"width":"100%"}'>
@ -277,14 +277,14 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="creatorUserName" label="开票人">
<el-table-column prop="creatorUserName" label="开票人" align="center" width="130">
<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="invoiceDate" label="开票日期">
<el-table-column prop="invoiceDate" label="开票日期" align="center" width="130">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.invoiceDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
@ -364,6 +364,54 @@
},
mounted() {},
methods: {
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 2 || index === 3 || index === 5 || index === 7 || index === 8)) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
} else {
sums[index] = '';
}
});
return sums;
},
getSummaries2(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 3 || index === 4 || index === 6 || index === 7 )) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
} else {
sums[index] = '';
}
});
return sums;
},
arinvoices_item1Exist() {
let isOk = true;
for(let i=0;i<this.dataForm.arinvoices_item1List.length;i++){
@ -388,6 +436,17 @@
data[key] = "";
}
}
let param = {
"param" : 'arinvoices'
}
request({
url: '/api/collection/Collection/autoSerialNum',
method: 'get',
data: param
}).then(res => {
this.dataForm.documentNo = res.msg
this.loading = false
});
},
init(id, isDetail) {
this.dataForm.id = id || 0;

@ -1,116 +1,6 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<el-form-item label="单据编号">
<el-input v-model="query.documentNo" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<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-form-item>
</el-col>
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="primary" v-has="'btn_add'" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<!-- <el-button type="text" icon="el-icon-download" @click="exportData()">-->
<!-- </el-button>-->
<!-- <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">-->
<!-- </el-button>-->
<el-button type="text" v-has="'btn_edit'" icon="el-icon-plus" @click="1">
</el-button>
<el-button type="text" icon="el-icon-plus" @click="1">
</el-button>
<el-button type="text" icon="el-icon-plus" @click="1">
</el-button>
<el-button type="text" icon="el-icon-plus" @click="1">
</el-button>
<el-button type="text" icon="el-icon-plus" @click="1">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
</el-tooltip>
<screenfull isContainer/>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange" border>
<el-table-column type="index" width="50" label="序号" fixed="left" align="center"/>
<el-table-column prop="documentNo" label="单据编号" sortable width="200" align="center" fixed="left"
/>
<el-table-column prop="customerName" label="客户名称" sortable width="150" align="center" fixed="left"
/>
<el-table-column prop="amount" label="金额" width="120" sortable align="center"
/>
<el-table-column prop="quantity" label="数量" width="120" sortable align="center"
/>
<el-table-column label="币别" width="80" sortable prop="currency" align="center">
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column prop="invoiceAmount" label="发票金额" sortable width="120" align="center"
/>
<el-table-column prop="invoiceQuantity" label="发票数量" sortable width="120" align="center"
/>
<el-table-column prop="salesOrderNo" label="销售订单号" sortable width="200" align="center"
/>
<el-table-column prop="contractName" label="合同名称" sortable width="200" align="center"
/>
<el-table-column label="单据状态" width="120" sortable prop="status" align="center">
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column prop="creatorUserName" label="制单人" width="120" sortable align="center"
/>
<el-table-column label="操作" fixed="right" align="center"
width="200">
<template slot-scope="scope">
<el-button type="text" v-has="'btn_edit'"
@click="addOrUpdateHandle(scope.row.id)">编辑
</el-button>
<!-- <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">-->
<!-- </el-button>-->
<!-- <el-button type="text"-->
<!-- @click="goDetail(scope.row.id)">详情-->
<!-- </el-button>-->
<el-button type="text"
@click="goDetail">撤回申请
</el-button>
<el-button type="text"
@click="goDetail">审核
</el-button>
<el-button type="text"
@click="goDetail">弃审
</el-button>
<el-button type="text"
@click="goDetail">提交
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
</div>
=======
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
@ -174,7 +64,7 @@
/>
<el-table-column prop="invoiceQuantity" label="发票数量" width="0" align="left"
/>
<el-table-column prop="salesOrderId" label="销售订单号" width="0" align="left"
<el-table-column prop="salesOrderId" label="来源单号" width="0" align="left"
/>
<el-table-column prop="contractId" label="合同名称" width="0" align="left"
/>
@ -206,7 +96,6 @@ width="150" >
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
</div>
</template>

@ -32,7 +32,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="收款金额" prop="amountCollected">
<el-input v-model="dataForm.amountCollected" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="dataForm.amountCollected" placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</el-form-item>
@ -116,32 +116,28 @@
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.collection_item0List" size='mini' >
<el-table :data="dataForm.collection_item0List" size='mini' show-summary :summary-method="getSummaries">
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="amount" label="收款金额" align="center" >
<el-table-column prop="amount" label="收款金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.amount" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.amount" placeholder="请输入" clearable :style='{"width":"100%"}' @change="amountSum">
</el-input>
</template>
</el-table-column>
<el-table-column prop="price" label="订单金额" align="center" >
<el-table-column prop="price" label="订单金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.price" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="amountCollected" label="已收款金额" align="center" >
<el-table-column prop="amountCollected" label="已收款金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.amountCollected" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<!--<<<<<<< HEAD-->
<el-table-column prop="salesorderId" label="销售订单编号" align="center" >
<!--=======-->
<!-- <el-table-column prop="deleteTime" label="销售订单编号" align="center" >-->
<!--&gt;>>>>>> 6b66ea0276198dd5eb24cd6f115f6e164cbd7df3-->
<el-table-column prop="salesorderId" label="销售订单编号" align="center" width="130">
<template slot-scope="scope">
<popupSelect v-model="scope.row.salesorderId" placeholder="请选择" clearable
:field="'salesorderId'+scope.$index" interfaceId="393372436705378053"
@ -151,7 +147,7 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="contractId" label="合同编号" align="center" >
<el-table-column prop="contractId" label="合同编号" align="center" width="130">
<template slot-scope="scope">
<popupSelect v-model="scope.row.contractId" placeholder="请选择" clearable
:field="'contractId'+scope.$index" interfaceId="398848549678332037"
@ -161,7 +157,7 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="num" label="数量" align="center" >
<el-table-column prop="num" label="数量" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.num" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
@ -175,26 +171,26 @@
<!-- </el-select>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="advanceAmount" label="垫资金额" align="center" >
<el-table-column prop="advanceAmount" label="垫资金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.advanceAmount" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="rate" label="税额" align="center" >
<el-table-column prop="rate" label="税额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.rate" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="notPrice" label="不含税金额" align="center" >
<el-table-column prop="notPrice" label="不含税金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.notPrice" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="creatorTime" label="业务日期" align="center" >
<el-table-column prop="creatorTime" label="业务日期" align="center" width="130">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.creatorTime" placeholder="请选择" clearable
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
@ -396,6 +392,37 @@
created() {},
mounted() {},
methods: {
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 1 || index === 2 || index === 3 || index === 6 || index === 7 || index === 8 || index === 9)) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
} else {
sums[index] = '';
}
});
return sums;
},
amountSum(){
let sum = 0;
for (let i = 0; i<this.dataForm.collection_item0List.length;i++){
sum = sum + parseFloat(this.dataForm.collection_item0List[i].amount);
}
this.dataForm.amountCollected = sum;
},
popupSelect(e, d) {
debugger
this.dataForm.code = d.id;
@ -433,18 +460,19 @@
data[key] = "";
}
}
// request({
// url: '/api/collection/Collection/autoCreate',
// method: 'get'
// }).then(res => {
// debugger
// this.dataForm.documentNo = res.msg
// debugger
// this.loading = false
// });
let params = {
"param" : 'collection'
}
request({
url: '/api/collection/Collection/autoSerialNum',
method: 'get',
data: params
}).then(res => {
this.dataForm.documentNo = res.msg
this.loading = false
});
},
init(id, isDetail) {
debugger
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;

@ -20,16 +20,16 @@
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="text" icon="el-icon-plus" v-has="'btn_add'" @click="addOrUpdateHandle()">
<el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" v-has="'btn_download'" @click="exportData()">
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-delete" v-has="'btn_batchRemove'" @click="handleBatchRemoveDel()">
</el-button>
<el-button type="text" icon="el-icon-check" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-close" @click="exportData()">
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
<!-- <el-button type="text" icon="el-icon-check" @click="exportData()">-->
<!-- </el-button>-->
<!-- <el-button type="text" icon="el-icon-close" @click="exportData()">-->
<!-- </el-button>-->
<el-button type="text" icon="el-icon-check" @click="commit()">
</el-button>
<el-button type="text" icon="el-icon-check" @click="confirmprice()">
@ -74,17 +74,17 @@
<el-table-column prop="creatorUserName" sortable label="制单人" width="150" align="center" />
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text" v-has="'btn_edit'" @click="addOrUpdateHandle(scope.row.id)">
<el-button type="text" @click="addOrUpdateHandle(scope.row)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" v-has="'btn_remove'" @click="handleDel(scope.row.id)">
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text" v-has="'btn_detail'" @click="goDetail(scope.row.id)">
<el-button type="text" @click="goDetail(scope.row.id)">
</el-button>
<el-button type="text" @click="">撤回申请</el-button>
<el-button type="text" @click="">审核</el-button>
<el-button type="text" @click="">弃审</el-button>
<el-button type="text" @click="">提交</el-button>
<!-- <el-button type="text" @click="">撤回申请</el-button>-->
<!-- <el-button type="text" @click="">审核</el-button>-->
<!-- <el-button type="text" @click="">弃审</el-button>-->
<!-- <el-button type="text" @click="">提交</el-button>-->
</template>
</el-table-column>
@ -412,7 +412,25 @@
}
}
},
addOrUpdateHandle(id, isDetail) {
addOrUpdateHandle(row, isDetail) {
var id = undefined;
if (row){
id = row.id;
if(row.status != '0'){
var msg = '';
if(row.status == '1'){
msg = '已提交';
}else if(row.status == '2'){
msg = '已认款';
}
this.$message({
type: 'error',
message: msg +'无法编辑',
duration: 1500
});
return
}
}
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)

@ -20,7 +20,7 @@
prop="contractCode" >
<popupSelect v-model="dataForm.contractId"
placeholder="请选择" clearable field="contractId" interfaceId="391146878474963333" :columnOptions="contractCodecolumnOptions" propsValue="id" relationField="contract_name" popupType="dialog"
popupTitle="选择数据" popupWidth="800px" @change="contractSelect"
popupTitle="选择数据" popupWidth="800px" @change="contractSelect" disabled
>
</popupSelect>
@ -31,7 +31,7 @@
prop="costomerCode" >
<popupSelect v-model="dataForm.customerId"
placeholder="请选择" clearable field="customerId" interfaceId="398016916830126469" :columnOptions="costomerCodecolumnOptions" propsValue="id" relationField="supplier_nm" popupType="dialog"
popupTitle="选择数据" popupWidth="800px"
popupTitle="选择数据" popupWidth="800px" disabled
>
</popupSelect>
@ -60,7 +60,7 @@
<el-form-item label="垫资金额"
prop="advanceAmount" >
<el-input-number v-model="dataForm.advanceAmount"
placeholder="数字文本" :step="1" :style='{"width":"100%"}'>
placeholder="数字文本" :step="1" :style='{"width":"100%"}' disabled>
</el-input-number>
</el-form-item>
@ -69,7 +69,7 @@
<el-form-item label="重量"
prop="num" >
<el-input-number v-model="dataForm.num"
placeholder="数字文本" :step="1" :style='{"width":"100%"}'>
placeholder="数字文本" :step="1" :style='{"width":"100%"}' disabled>
</el-input-number>
</el-form-item>
@ -78,7 +78,7 @@
<el-form-item label="金额"
prop="price" >
<el-input-number v-model="dataForm.price"
placeholder="数字文本" :step="1" :style='{"width":"100%"}'>
placeholder="数字文本" :step="1" :style='{"width":"100%"}' disabled>
</el-input-number>
</el-form-item>
@ -87,7 +87,7 @@
<el-form-item label="不含税金额"
prop="notPrice" >
<el-input-number v-model="dataForm.notPrice"
placeholder="数字文本" :step="1" :style='{"width":"100%"}'>
placeholder="数字文本" :step="1" :style='{"width":"100%"}' disabled>
</el-input-number>
</el-form-item>
@ -173,73 +173,73 @@
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.salesorder_item0List" size='mini' >
<el-table :data="dataForm.salesorder_item0List" size='mini' show-summary :summary-method="getSummaries" >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="vehicleId" label="车号">
<el-table-column prop="vehicleId" label="车号" align="center" width="130">
<template slot-scope="scope">
<popupSelect v-model="scope.row.vehicleId"
placeholder="请选择" clearable :field="'vehicleId'+scope.$index" interfaceId="398732963950472005"
:columnOptions="salesorder_item0vehicleIdcolumnOptions" propsValue="id" relationField="ticketno"
popupType="dialog" :excludeFields="excludeFields"
popupWidth="800px" @change="poundInfoSelect" >
popupWidth="800px" @change="poundInfoSelect" disabled>
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="materialId" label="物料名称">
<el-table-column prop="materialId" label="物料名称" width="180">
<template slot-scope="scope">
<popupSelect v-model="scope.row.materialId"
placeholder="请选择" clearable :field="'materialId'+scope.$index" interfaceId="398108817931470725" :columnOptions="salesorder_item0materialIdcolumnOptions" propsValue="id" relationField="item_name" popupType="dialog"
popupWidth="800px"
popupWidth="800px" disabled
>
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="poundType" label="类型">
<el-table-column prop="poundType" label="类型" align="center" width="110">
<template slot-scope="scope">
<el-select v-model="scope.row.poundType"
placeholder="请选择" clearable :style='{"width":"100%"}'>
placeholder="请选择" clearable :style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in poundTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="netWeight" label="净重">
<el-table-column prop="netWeight" label="净重" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.netWeight"
placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="unit" label="单位">
<el-table-column prop="unit" label="单位" align="center" >
<template slot-scope="scope">
<el-select v-model="scope.row.unit"
placeholder="请选择" clearable :style='{"width":"100%"}'>
placeholder="请选择" clearable :style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="advance" label="是否垫资">
<el-table-column prop="advance" label="是否垫资" align="center" >
<template slot-scope="scope">
<el-select v-model="scope.row.advance"
placeholder="请选择" clearable :style='{"width":"100%"}'>
placeholder="请选择" clearable :style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价">
<el-table-column prop="unitPrice" label="单价" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.unitPrice"
placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"100%"}' @change="editPrice(scope.row)">
</el-input>
</template>
</el-table-column>
<el-table-column prop="settlement" label="结算重量">
<el-table-column prop="settlement" label="结算重量" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.settlement"
placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="rate" label="税率 ">
<el-table-column prop="rate" label="税率 " align="center" width="110">
<template slot-scope="scope">
<el-select v-model="scope.row.rate"
placeholder="请选择" clearable :style='{"width":"100%"}' @change="computeNoPrice">
@ -247,36 +247,36 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="price" label="金额">
<el-table-column prop="price" label="金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.price"
placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="noPrice" label="不含税金额">
<el-table-column prop="noPrice" label="不含税金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.noPrice"
placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注">
<el-table-column prop="remark" label="备注"align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</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="delsalesorder_item0List(scope.$index)"></el-button>
</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="delsalesorder_item0List(scope.$index)"></el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<div class="table-actions" @click="addsalesorder_item0List()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
<!-- <div class="table-actions" @click="addsalesorder_item0List()">-->
<!-- <el-button type="text" icon="el-icon-plus">添加</el-button>-->
<!-- </div>-->
</el-form-item>
</el-col>
</el-tab-pane >
@ -757,13 +757,77 @@
},
mounted() {},
methods: {
editPrice(row){
var advanceAmount = 0;
var price = 0;
var notPrice = 0;
var rate = 13;
this.taxRateOptions.forEach((item, index)=>{
if(item.id == row.rate){
rate = parseInt(item.fullName);
}
});
// for (let i = 0;i<this.dataForm.salesorder_item0List.length;i++) {
// this.dataForm.salesorder_item0List[i].price = this.dataForm.salesorder_item0List[i].unitPrice * this.dataForm.salesorder_item0List[i].settlement;
// price = price + parseFloat(this.dataForm.salesorder_item0List[i].price);
// }
this.dataForm.salesorder_item0List.forEach((item, index)=>{
if(row.vehicleId == item.vehicleId){
item.price = parseFloat(item.settlement) * parseFloat(item.unitPrice);//
item.notPrice = item.price * (100 - rate) / 100;//
// request({
// url: '/api/saleorder/Saleorderitem/updatePrice'+row.poundlistId,
// method: 'post',
// data: item.price
// }).then((res) => {
// this.$message({
// message: res.msg,
// type: 'success',
// duration: 1000,
// })
// })
}
if(item.advance == '1'){//
advanceAmount = advanceAmount + item.price;//
}
price = price + item.price;//
notPrice = notPrice + parseFloat(item.notPrice);//
});
this.dataForm.advanceAmount = advanceAmount;
this.dataForm.price = price;
this.dataForm.notPrice = notPrice;
},
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 3 || index === 5 || index === 7 || index === 8 )) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
} else {
sums[index] = '';
}
});
return sums;
},
computeNoPrice(){
let notPrice = 0;
for (let i = 0;i<this.dataForm.salesorder_item0List.length;i++) {
this.rateOptions.find((item) => {
if (this.dataForm.salesorder_item0List[i].rate == item.id) {
this.dataForm.salesorder_item0List[i].noPrice = this.dataForm.salesorder_item0List[i].price*(100-item.fullName)/100
notPrice = notPrice + this.dataForm.salesorder_item0List[i].noPrice
notPrice = notPrice + parseFloat(this.dataForm.salesorder_item0List[i].noPrice)
}
})
this.dataForm.notPrice = notPrice;
@ -856,24 +920,38 @@
this.visible = true;
this.dataForm.salesorder_item0List = list;
debugger
this.dataForm.documentNo = list[0].documentNo;
this.dataForm.contractId = list[0].salesId;
this.dataForm.customerId = list[0].customerId;
this.dataForm.contractNo = list[0].contractNo;
var num = 0;
var amount = 0;
var advance = 0;
var notPrice = 0;
var rate = 0;
for (let i = 0;i<list.length; i++){
this.dataForm.salesorder_item0List[i].unitPrice = list[i].salesPrice;
this.dataForm.salesorder_item0List[i].poundlistId = list[i].id;
this.dataForm.salesorder_item0List[i].price = list[i].salesPrice*list[i].settlement;
// this.rateOptions.find((item) => {
// if (rate == item.id) {
// this.dataForm.salesorder_item0List[i].rate = item.fullName
// debugger
// this.dataForm.salesorder_item0List[i].noPrice = this.dataForm.salesorder_item0List[i].price*(100-item.fullName)/100
// notPrice = notPrice + parseFloat(this.dataForm.salesorder_item0List[i].noPrice)
// }
// })
if (list[i].advance == 1){
advance = advance + list[i].salesPrice*list[i].settlement;
}
num = num + list[i].settlement;
amount = amount + list[i].price;
}
this.dataForm.notPrice = notPrice;
this.dataForm.advanceAmount = advance;
this.dataForm.num = num;
this.dataForm.price = amount;
debugger
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//

@ -2,7 +2,7 @@
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="1000px">
width="1500px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<template v-if="!loading">
@ -110,9 +110,9 @@
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.receiptout_item0List" size='mini' >
<el-table :data="dataForm.receiptout_item0List" size='mini' show-summary :summary-method="getSummaries" >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="vehicleId" label="车牌号">
<el-table-column prop="vehicleId" label="车牌号" align="center" width="130">
<template slot-scope="scope">
<popupSelect v-model="scope.row.vehicleId"
placeholder="请选择" clearable :field="'vehicleId'+scope.$index" interfaceId="398732963950472005" :columnOptions="receiptout_item0vehicleIdcolumnOptions" propsValue="id" relationField="ticketno" popupType="dialog"
@ -121,7 +121,7 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="materialId" label="物料名称">
<el-table-column prop="materialId" label="物料名称" align="center" width="180">
<template slot-scope="scope">
<popupSelect v-model="scope.row.materialId"
placeholder="请选择" clearable :field="'materialId'+scope.$index" interfaceId="398719564478785669" :columnOptions="receiptout_item0materialIdcolumnOptions" propsValue="id" relationField="item_name" popupType="dialog"
@ -130,7 +130,7 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="reservoirareaId" label="库区名称">
<el-table-column prop="reservoirareaId" label="库区名称" align="center" width="130">
<template slot-scope="scope">
<popupSelect v-model="scope.row.reservoirareaId"
placeholder="请选择" clearable :field="'reservoirareaId'+scope.$index" interfaceId="392939299932268421" :columnOptions="receiptout_item0reservoirareaIdcolumnOptions" propsValue="id" relationField="areaname" popupType="dialog"
@ -139,7 +139,7 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="warehouseId" label="仓库名称">
<el-table-column prop="warehouseId" label="仓库名称" align="center" width="130">
<template slot-scope="scope">
<popupSelect v-model="scope.row.warehouseId"
placeholder="请选择" clearable :field="'reservoirareaId'+scope.$index" interfaceId="399117969575232581" :columnOptions="receiptout_item0reservoirareaIdcolumnOptions" propsValue="id" relationField="name" popupType="dialog"
@ -147,14 +147,14 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="deliveryNum" label="出库数量">
<el-table-column prop="deliveryNum" label="出库数量" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.deliveryNum"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="unit" label="计量单位">
<el-table-column prop="unit" label="计量单位" align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.unit"
placeholder="请选择" clearable :style='{"width":"100%"}'>
@ -162,14 +162,14 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="price" label="单价">
<el-table-column prop="price" label="单价" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.price"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="rate" label="税率">
<el-table-column prop="rate" label="税率" align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.rate"
placeholder="请选择" clearable :style='{"width":"100%"}'>
@ -177,28 +177,28 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="amount" label="金额">
<el-table-column prop="amount" label="金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.amount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="rateAmount" label="税额">
<el-table-column prop="rateAmount" label="税额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.rateAmount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="batchNo" label="批次号">
<el-table-column prop="batchNo" label="批次号" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.batchNo"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="poundType" label="磅单类型">
<el-table-column prop="poundType" label="磅单类型" align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.poundType"
placeholder="请选择" clearable :style='{"width":"100%"}'>
@ -296,6 +296,30 @@
},
mounted() {},
methods: {
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 5 || index === 7 || index === 9 || index === 10 )) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
} else {
sums[index] = '';
}
});
return sums;
},
receiptout_item0Exist() {
let isOk = true;
for(let i=0;i<this.dataForm.receiptout_item0List.length;i++){
@ -313,6 +337,18 @@
data[key] = "";
}
}
let param = {
"param" : 'chuku',
"batchNum" : 'receiptout-num'
}
request({
url: '/api/collection/Collection/autoSerialNum',
method: 'get',
data: param
}).then(res => {
this.dataForm.documentNo = res.msg
this.loading = false
});
},
init(id, isDetail) {
this.dataForm.id = id || 0;

@ -1,99 +1,6 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<el-form-item label="单据编号">
<el-input v-model="query.documentNo" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="业务类型">
<el-select v-model="query.type" placeholder="请选择" clearable>
<el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="客户名称">
<el-input v-model="query.customerName" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<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-form-item>
</el-col>
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="text" v-has="'btn_add'" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" v-has="'btn_download'" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" v-has="'btn_batchRemove'" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
<el-button type="text" icon="el-icon-check" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-close" @click="exportData()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="reset()"/>
</el-tooltip>
<screenfull isContainer/>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange" border>
<el-table-column type="index" width="50" label="序号" fixed="left" align="center"/>
<el-table-column prop="documentNo" label="单据编号" width="200" sortable align="center" fixed="left"/>
<el-table-column prop="customerName" label="客户名称" width="150" sortable align="center" fixed="left"/>
<el-table-column prop="amount" label="出库金额" width="120" sortable align="center"/>
<el-table-column prop="num" label="出库数量" width="120" sortable align="center"/>
<el-table-column label="币别" width="80" sortable prop="currency" align="center">
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column prop="issueDate" label="出库日期" width="120" sortable align="center" sortable="custom"/>
<el-table-column prop="sourceNo" label="来源单号" width="200" sortable align="center"/>
<el-table-column label="业务类型" width="120" sortable prop="type" align="center">
<template slot-scope="scope">
{{ scope.row.type | dynamicText(typeOptions) }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="120" sortable align="center"/>
<el-table-column label="单据状态" width="120" sortable prop="status" align="center">
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column prop="creatorTime" label="创建时间" width="120" sortable align="center"/>
<el-table-column prop="creatorUserName" label="创建人名称" width="120" sortable align="center"/>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text" v-has="'btn_edit'" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text" v-has="'btn_detail'" @click="goDetail(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
</div>
<!-- 测试-->
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
@ -123,7 +30,7 @@
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
<el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
@ -179,13 +86,11 @@
<el-table-column label="操作" fixed="right"
width="150">
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)">编辑
<el-button type="text" v-has="'btn_edit'" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
<el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text"
@click="goDetail(scope.row.id)">详情
<el-button type="text" v-has="'btn_detail'" @click="goDetail(scope.row.id)">
</el-button>
</template>
</el-table-column>
@ -199,7 +104,6 @@
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
</div>
</div>
</template>
<script>

@ -62,21 +62,9 @@
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.saleback_item0List" size='mini'>
<el-table :data="dataForm.saleback_item0List" size='mini' show-summary :summary-method="getSummaries">
<el-table-column type="index" width="50" label="序号" align="center" />
<!--<<<<<<< HEAD-->
<!-- <el-table-column prop="licenseNum" label="车牌号">-->
<!-- <template slot-scope="scope">-->
<!-- <popupSelect v-model="scope.row.licenseNum" placeholder="请选择"-->
<!-- clearable :field="'licenseNum'+scope.$index"-->
<!-- interfaceId="383568082196537541" :bissId="dataForm.salesOrderId" :excludeFields="excludeFields"-->
<!-- :columnOptions="saleback_item0licenseNumcolumnOptions"-->
<!-- propsValue="license_num" relationField="license_num"-->
<!-- popupType="dialog" popupWidth="800px" @change="popupSelectChange2">-->
<!-- </popupSelect>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="vehicleId" label="车辆ID">
<el-table-column prop="vehicleId" label="车牌号" align="center" width="130">
<template slot-scope="scope">
<popupSelect v-model="scope.row.vehicleId"
placeholder="请选择" clearable :field="'vehicleId'+scope.$index" interfaceId="400554150653457925"
@ -86,7 +74,7 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="materialId" label="物料名称">
<el-table-column prop="materialId" label="物料名称" align="center" width="180">
<template slot-scope="scope">
<popupSelect v-model="scope.row.materialId"
placeholder="请选择" clearable :field="'materialId'+scope.$index" interfaceId="381037852907038533" :columnOptions="jg_salesback_item0materialIdcolumnOptions" propsValue="id" relationField="item_name" popupType="dialog"
@ -94,34 +82,14 @@
</popupSelect>
</template>
</el-table-column>
<!--=======-->
<!-- <el-table-column prop="licenseNum" label="车牌号">-->
<!-- <template slot-scope="scope">-->
<!-- <popupSelect v-model="scope.row.licenseNum" placeholder="请选择"-->
<!-- clearable :field="'licenseNum'+scope.$index"-->
<!-- interfaceId="383568082196537541" :bissId="dataForm.salesOrderId" :excludeFields="excludeFields"-->
<!-- :columnOptions="saleback_item0licenseNumcolumnOptions"-->
<!-- propsValue="license_num" relationField="license_num"-->
<!-- popupType="dialog" popupWidth="800px" @change="popupSelectChange2">-->
<!-- </popupSelect>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="materialName" label="物料名称">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.materialName" placeholder="请输入"-->
<!-- clearable :style='{"width":"100%"}'>-->
<!-- </el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!--&gt;>>>>>> 6b66ea0276198dd5eb24cd6f115f6e164cbd7df3-->
<el-table-column prop="settlement" label="结算重量 ">
<el-table-column prop="settlement" label="结算重量 " align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.settlement" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="unit" label="计量单位 ">
<el-table-column prop="unit" label="计量单位 " align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.unit" placeholder="请选择" clearable
:style='{"width":"100%"}'>
@ -131,14 +99,14 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="price" label="采购单价">
<el-table-column prop="price" label="采购单价" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.price" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="rate" label="税率">
<el-table-column prop="rate" label="税率" align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.rate" placeholder="请选择" clearable
:style='{"width":"100%"}'>
@ -148,21 +116,21 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="amount" label="应退金额">
<el-table-column prop="amount" label="应退金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.amount" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="notAmount" label="税额">
<el-table-column prop="notAmount" label="税额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.notAmount" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="businessId" label="业务员">
<el-table-column prop="businessId" label="业务员" align="center" width="130">
<template slot-scope="scope">
<popupSelect v-model="scope.row.businessId"
placeholder="请选择" clearable :field="'businessId'+scope.$index" interfaceId="ebcc44be142e43b795c0d769abd6d25a" :columnOptions="jg_salesback_item0businessIdcolumnOptions" propsValue="F_Id" relationField="F_RealName" popupType="dialog"
@ -170,7 +138,7 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="pountType" label="磅单类型 ">
<el-table-column prop="pountType" label="磅单类型 " align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.pountType" placeholder="请选择" clearable
:style='{"width":"100%"}'>
@ -367,10 +335,33 @@
created() {},
mounted() {},
methods: {
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 3 || index === 5 || index === 7 || index === 8 )) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
} else {
sums[index] = '';
}
});
return sums;
},
popupSelectChange2(a, b){
var excludeFields = [];
for (let i = 0; i < this.dataForm.saleback_item0List.length; i++) {
// <<<<<<< HEAD
excludeFields.push(this.dataForm.saleback_item0List[i].vehicleId);
if(a == this.dataForm.saleback_item0List[i].vehicleId){
this.dataForm.saleback_item0List[i].materialId = b.material_id;
@ -387,19 +378,6 @@
this.dataForm.saleback_item0List[i].notAmount = this.dataForm.saleback_item0List[i].amount*item.fullName/100
}
})
// =======
// excludeFields.push(this.dataForm.saleback_item0List[i].licenseNo);
// if(a == this.dataForm.saleback_item0List[i].licenseNum){
// this.dataForm.saleback_item0List[i].materialName = b.material_name;
// this.dataForm.saleback_item0List[i].settlement = b.settlement;
// this.dataForm.saleback_item0List[i].unit = b.unit;
// this.dataForm.saleback_item0List[i].price = b.unit_price;
// this.dataForm.saleback_item0List[i].rate = b.rate;
// this.dataForm.saleback_item0List[i].amount = b.amount;
// this.dataForm.saleback_item0List[i].notAmount = b.not_amount;
// this.dataForm.saleback_item0List[i].pountUser = b.pound_user;
// this.dataForm.saleback_item0List[i].pountType = b.pound_type;
// >>>>>>> 6b66ea0276198dd5eb24cd6f115f6e164cbd7df3
}
}
let price =
@ -427,6 +405,17 @@
data[key] = "";
}
}
let param = {
"param" : 'salesBack'
}
request({
url: '/api/collection/Collection/autoSerialNum',
method: 'get',
data: param
}).then(res => {
this.dataForm.documentNo = res.msg
this.loading = false
});
},
init(id, isDetail) {
this.dataForm.id = id || 0;

@ -2,7 +2,7 @@
<el-dialog title="详情"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="1000px">
width="1500px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" >
<template v-if="!loading">

File diff suppressed because it is too large Load Diff

@ -2,7 +2,7 @@
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="1000px">
width="1500px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<template v-if="!loading">
@ -61,16 +61,16 @@
</el-input>
</el-form-item>
</el-col>
<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" :disabled="item.disabled" disabled></el-option>
<!-- <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" :disabled="item.disabled" disabled></el-option>-->
</el-select>
</el-form-item>
</el-col>
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8" >
<el-form-item label="发票金额"
prop="invoiceAmount" >
@ -130,9 +130,9 @@
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.arinvoices_item1List" size='mini' >
<el-table :data="dataForm.arinvoices_item1List" size='mini' show-summary :summary-method="getSummaries" >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="materialId" label="物料">
<el-table-column prop="materialId" label="物料" align="center" width="180">
<template slot-scope="scope">
<popupSelect v-model="scope.row.materialId"
placeholder="请选择" clearable :field="'materialId'+scope.$index" interfaceId="397736371898382533" :columnOptions="arinvoices_item1materialIdcolumnOptions" propsValue="id" relationField="item_name" popupType="dialog"
@ -141,21 +141,21 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="quantity" label="数量">
<el-table-column prop="quantity" label="数量" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.quantity"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价">
<el-table-column prop="unitPrice" label="单价" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.unitPrice"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="unit" label="单位">
<el-table-column prop="unit" label="单位" align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.unit"
placeholder="请选择" clearable :style='{"width":"100%"}' disabled>
@ -163,14 +163,14 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="amount" label="金额">
<el-table-column prop="amount" label="金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.amount"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="taxRate" label="税率 ">
<el-table-column prop="taxRate" label="税率 " align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.taxRate"
placeholder="请选择" clearable :style='{"width":"100%"}' disabled @change="computeAmount">
@ -178,36 +178,36 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="taxAmount" label="税额">
<el-table-column prop="taxAmount" label="税额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.taxAmount"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="amountNotTax" label="不含税金额">
<el-table-column prop="amountNotTax" label="不含税金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.amountNotTax"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注信息">
<el-table-column prop="remark" label="备注信息" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.remark"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</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="delarinvoices_item1List(scope.$index)" disabled>删除</el-button>
</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="delarinvoices_item1List(scope.$index)" disabled>删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<div class="table-actions" @click="addarinvoices_item1List()">
<el-button type="text" icon="el-icon-plus" disabled>添加</el-button>
</div>
<!-- <div class="table-actions" @click="addarinvoices_item1List()">-->
<!-- <el-button type="text" icon="el-icon-plus" disabled>添加</el-button>-->
<!-- </div>-->
</el-form-item>
</el-col>
</el-tab-pane >
@ -217,37 +217,37 @@
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.arinvoices_item0List" size='mini' >
<el-table :data="dataForm.arinvoices_item0List" size='mini' show-summary :summary-method="getSummaries2" >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="invoiceCode" label="发票代码">
<el-table-column prop="invoiceCode" label="发票代码" align="center" width="130">
<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="发票号码" align="center" width="130">
<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="发票数量" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.invoiceQuantity"
placeholder="请输入" clearable :style='{"width":"100%"}' @change="invoiceQuantitySum">
</el-input>
</template>
</el-table-column>
<el-table-column prop="involceAmount" label="发票金额">
<el-table-column prop="involceAmount" label="发票金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.involceAmount"
placeholder="请输入" clearable :style='{"width":"100%"}' @change="involceAmountSum">
</el-input>
</template>
</el-table-column>
<el-table-column prop="taxRate" label="税率 ">
<el-table-column prop="taxRate" label="税率 " align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.taxRate"
placeholder="请选择" clearable :style='{"width":"100%"}' @change="rateCompute">
@ -255,36 +255,36 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="taxAmount" label="税额">
<el-table-column prop="taxAmount" label="税额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.taxAmount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="amountNotTax" label="不含税金额">
<el-table-column prop="amountNotTax" label="不含税金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.amountNotTax"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="invoiceStatus" label="发票状态">
<el-table-column prop="invoiceStatus" label="发票状态" align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.invoiceStatus"
placeholder="请选择" clearable :style='{"width":"100%"}'>
placeholder="请选择" clearable :style='{"width":"100%"}' >
<el-option v-for="(item, index) in invoiceStatusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="creatorUserName" label="开票人">
<el-table-column prop="creatorUserName" label="开票人" align="center" width="130">
<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="invoiceDate" label="开票日期">
<el-table-column prop="invoiceDate" label="开票日期" align="center" width="130">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.invoiceDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
@ -318,6 +318,7 @@
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
@ -367,6 +368,54 @@
},
mounted() {},
methods: {
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 2 || index === 3 || index === 5 || index === 7 || index === 8)) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
} else {
sums[index] = '';
}
});
return sums;
},
getSummaries2(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 3 || index === 4 || index === 6 || index === 7 )) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
} else {
sums[index] = '';
}
});
return sums;
},
invoiceQuantitySum(){
debugger
let sum = 0;
@ -428,10 +477,12 @@
}
},
init(list) {
this.dataForm.businessDate = new Date().getTime();
debugger
this.visible = true;
let amount = 0;
let num = 0;
this.dataForm.documentNo = list[0].documentNo;
this.dataForm.contractId = list[0].contractId;
this.dataForm.customerId = list[0].customerId;
debugger
@ -457,6 +508,7 @@
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
init2(list2) {
this.dataForm.businessDate = new Date().getTime();
debugger
this.visible = true;
let amount = 0;

@ -20,7 +20,7 @@
prop="customerId" >
<popupSelect v-model="dataForm.customerId"
placeholder="请选择" clearable field="customerId" interfaceId="393371066040385285" :columnOptions="customerIdcolumnOptions" propsValue="id" relationField="supplier_nm" popupType="dialog"
popupTitle="选择数据" popupWidth="800px"
popupTitle="选择数据" popupWidth="800px" disabled
>
</popupSelect>
@ -30,7 +30,7 @@
<el-form-item label="收款金额"
prop="amountCollected" >
<el-input v-model="dataForm.amountCollected"
placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</el-form-item>
@ -128,30 +128,30 @@
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.collection_item0List" size='mini' >
<el-table :data="dataForm.collection_item0List" size='mini' show-summary :summary-method="getSummaries" >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="amount" label="收款金额">
<el-table-column prop="amount" label="收款金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.amount"
placeholder="请输入" clearable :style='{"width":"100%"}' @change="amountSum">
</el-input>
</template>
</el-table-column>
<el-table-column prop="price" label="订单金额">
<el-table-column prop="price" label="订单金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.price"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="amountCollected" label="已收款金额">
<el-table-column prop="amountCollected" label="已收款金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.amountCollected"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="salesorderId" label="销售订单">
<el-table-column prop="salesorderId" label="销售订单" align="center" width="130">
<template slot-scope="scope">
<popupSelect v-model="scope.row.salesorderId"
placeholder="请选择" clearable :field="'salesorderId'+scope.$index" interfaceId="399077559599480261" :columnOptions="collection_item0salesorderIdcolumnOptions" propsValue="id" relationField="document_no" popupType="dialog"
@ -160,7 +160,7 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="contractId" label="合同编码">
<el-table-column prop="contractId" label="合同编码" align="center" width="130">
<template slot-scope="scope">
<popupSelect v-model="scope.row.contractId"
placeholder="请选择" clearable :field="'deleteTime'+scope.$index" interfaceId="398848549678332037" :columnOptions="collection_item0deleteTimecolumnOptions" propsValue="id" relationField="contract_code" popupType="dialog"
@ -169,50 +169,50 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="num" label="重量">
<el-table-column prop="num" label="重量" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.num"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="advanceAmount" label="垫资金额">
<el-table-column prop="advanceAmount" label="垫资金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.advanceAmount"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="rate" label="税额">
<el-table-column prop="rate" label="税额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.rate"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="notPrice" label="不含税金额">
<el-table-column prop="notPrice" label="不含税金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.notPrice"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="creatorTime" label="业务日期">
<el-table-column prop="creatorTime" label="业务日期" align="center" width="130">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.creatorTime"
placeholder="请选择" clearable :style='{"width":"200%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" disabled>
</el-date-picker>
</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="delcollection_item0List(scope.$index)" disabled>删除</el-button>
</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="delcollection_item0List(scope.$index)" disabled>删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<div class="table-actions" @click="addcollection_item0List()" >
<el-button type="text" icon="el-icon-plus" disabled>添加</el-button>
</div>
<!-- <div class="table-actions" @click="addcollection_item0List()" >-->
<!-- <el-button type="text" icon="el-icon-plus" disabled>添加</el-button>-->
<!-- </div>-->
</el-form-item>
</el-col>
</el-tab-pane >
@ -231,6 +231,7 @@
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { message } from '@/utils/message'
export default {
components: {},
props: [],
@ -276,6 +277,30 @@
},
mounted() {},
methods: {
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 1 || index === 2 || index === 3 || index === 6 || index === 7 || index === 8 || index === 9)) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
} else {
sums[index] = '';
}
});
return sums;
},
amountSum(){
let sum = 0;
for (let i = 0;i<this.dataForm.collection_item0List.length;i++){
@ -288,7 +313,7 @@
for(let i=0;i<this.dataForm.collection_item0List.length;i++){
const e = this.dataForm.collection_item0List[i];
}
return isOk;
return isOk;
},
clearData(data){
for (let key in data) {
@ -302,7 +327,9 @@
}
},
init(list) {
this.dataForm.amountCollected = null;
this.visible = true;
this.dataForm.documentNo = list[0].documentNo;
this.dataForm.customerId = list[0].customerId;
this.dataForm.contractId = list[0].contractId;
this.dataForm.collection_item0List = list;
@ -325,6 +352,16 @@
},
request() {
var _data =this.dataList()
for(let i=0;i<this.dataForm.collection_item0List.length;i++) {
if (this.dataForm.collection_item0List[i].amount > this.dataForm.collection_item0List[i].price) {
this.$message({
message: '收款金额不能大于金额',
type: 'error',
duration: 1000
})
return this.$message
}
}
if (!this.dataForm.id) {
request({
url: '/api/collection/Collection',

@ -1,98 +1,6 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<el-form-item label="单据编号">
<el-input v-model="query.documentNo" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="单据状态 ">
<el-select v-model="query.status" placeholder="请选择" clearable>
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
</el-select>
</el-form-item>
</el-col>
<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-form-item>
</el-col>
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="text" v-has="'btn_add'" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" v-has="'btn_download'" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" v-has="'btn_batchRemove'" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
<el-button type="text" icon="el-icon-check" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-close" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-check" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-close" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-check" @click="exportData()">退
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="reset()" />
</el-tooltip>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange" border>
<el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="documentNo" label="单据编号" sortable fixed="left" width="200" align="center" />
<el-table-column prop="costomerName" label="客户名称" sortable fixed="left" width="150" align="center" />
<el-table-column prop="price" label="金额" sortable width="150" align="center" />
<el-table-column prop="num" label="数量" sortable width="150" align="center" />
<el-table-column label="币别" width="100" sortable prop="currency" align="center" >
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column prop="amountCollected" sortable label="已回款金额" width="150" align="center" />
<el-table-column prop="invoiceNum" sortable label="发票数量" width="150" align="center" />
<el-table-column prop="invoiceAmount" sortable label="发票金额" width="150" align="center" />
<el-table-column label="来源系统" width="150" sortable prop="sourceSystem" align="center" >
<template slot-scope="scope">
{{ scope.row.sourceSystem | dynamicText(sourceSystemOptions) }}
</template>
</el-table-column>
<el-table-column label="单据状态 " width="150" sortable prop="status" align="center" >
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column prop="creatorUserName" label="制单人" sortable width="150" align="center" />
<el-table-column label="操作" fixed="right" width="150" align="center" >
<template slot-scope="scope">
<el-button type="text" v-has="'btn_edit'" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text" v-has="'btn_detail'" @click="goDetail(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
<!--测试-->
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
@ -111,6 +19,14 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="制单日期">
<el-date-picker v-model="query.creatorTime" type="daterange"
value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期"
end-placeholder="结束日期" >
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
@ -122,7 +38,7 @@
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
<el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >导出
</el-button>
@ -148,47 +64,47 @@
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange" border>
<el-table-column prop="documentNo" label="单据编号" width="0" align="left"
<el-table-column prop="documentNo" label="单据编号" width="0" align="center"
/>
<el-table-column prop="erpNo" label="ERP订单号" width="0" align="left"
<el-table-column prop="erpNo" label="ERP订单号" width="0" align="center"
/>
<el-table-column prop="contractId" label="合同名称" width="0" align="left"
<el-table-column prop="contractId" label="合同名称" width="0" align="center"
/>
<el-table-column prop="customerId" label="客户名称" width="0" align="left"
<el-table-column prop="customerId" label="客户名称" width="0" align="center"
/>
<el-table-column prop="price" label="金额" width="0" align="left"
<el-table-column prop="price" label="金额" width="0" align="center"
/>
<el-table-column prop="num" label="重量" width="0" align="left"
<el-table-column prop="num" label="重量" width="0" align="center"
/>
<el-table-column label="币别" width="0" prop="currency" algin="left"
<el-table-column label="币别" width="0" prop="currency" algin="center"
>
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column prop="amountCollected" label="已回款金额" width="0" align="left"
<el-table-column prop="amountCollected" label="已回款金额" width="0" align="center"
/>
<el-table-column prop="invoiceNum" label="发票数量" width="0" align="left"
<el-table-column prop="invoiceNum" label="发票数量" width="0" align="center"
/>
<el-table-column prop="invoiceAmount" label="发票金额" width="0" align="left"
<el-table-column prop="invoiceAmount" label="发票金额" width="0" align="center"
/>
<el-table-column prop="advanceAmount" label="垫资金额" width="0" align="left"
<el-table-column prop="advanceAmount" label="垫资金额" width="0" align="center"
/>
<el-table-column prop="creatorTime" label="制单时间" width="0" align="left"
<el-table-column prop="creatorTime" label="制单时间" width="0" align="center"
/>
<el-table-column label="单据状态 " width="0" prop="status" algin="left"
<el-table-column label="单据状态 " width="0" prop="status" algin="center"
>
<template slot-scope="scope">
{{ scope.row.status | dynamicText(statusOptions) }}
</template>
</el-table-column>
<el-table-column prop="creatorUserName" label="制单人" width="0" align="left"
<el-table-column prop="creatorUserName" label="制单人" width="0" align="center"
/>
<el-table-column label="操作" fixed="right"
<el-table-column label="操作" fixed="right" algin="center"
width="150" >
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
@click="addOrUpdateHandle(scope.row)" >编辑
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
@ -208,8 +124,6 @@ width="150" >
<JNPF-Form5 v-if="formVisible" ref="JNPFForm5" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
</div>
</div>
</template>
@ -268,7 +182,7 @@ width="150" >
],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
currencyProps:{"label":"fullName","value":"id"},
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"开票","id":"1"},{"fullName":"付款申请","id":"2"},{"fullName":"待回款","id":"3"},{"fullName":"回款中","id":"4"},{"fullName":"归档","id":"5"}],
statusOptions:[{"fullName":"待发货","id":"0"},{"fullName":"开票","id":"1"},{"fullName":"待回款","id":"2"},{"fullName":"归档","id":"3"}],
statusProps:{"label":"fullName","value":"id"},
}
},
@ -551,7 +465,19 @@ width="150" >
}).catch(() => {
})
},
addOrUpdateHandle(id, isDetail) {
addOrUpdateHandle(row, isDetail) {
var id = undefined;
if(row){
id = row.id;
if(row.status != '0'){
this.$message({
type: 'error',
message: '发货后无法编辑',
duration: 1500
});
return
}
}
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)

@ -2,7 +2,7 @@
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="1000px">
width="1500px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<template v-if="!loading">
@ -19,7 +19,7 @@
<el-form-item label="业务类型"
prop="type" >
<el-select v-model="dataForm.type"
placeholder="请选择" clearable :style='{"width":"100%"}'>
placeholder="请选择" clearable :style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
@ -30,7 +30,7 @@
prop="sourceNo" >
<popupSelect v-model="dataForm.sourceNo"
placeholder="请选择" clearable field="salesId" interfaceId="392956668264114117" :columnOptions="salesIdcolumnOptions" propsValue="id" relationField="document_no" popupType="dialog"
popupTitle="选择数据" popupWidth="800px"
popupTitle="选择数据" popupWidth="800px" disabled
hasPage :pageSize="20" >
</popupSelect>
@ -40,7 +40,7 @@
<el-form-item label="出库金额"
prop="amount" >
<el-input v-model="dataForm.amount"
placeholder="请输入出库金额" readonly clearable :style='{"width":"100%"}'>
placeholder="请输入出库金额" readonly clearable :style='{"width":"100%"}' disabled>
</el-input>
</el-form-item>
@ -49,7 +49,7 @@
<el-form-item label="币别"
prop="currency" >
<el-select v-model="dataForm.currency"
placeholder="请选择" clearable :style='{"width":"100%"}'>
placeholder="请选择" clearable :style='{"width":"100%"}' disabled>
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
@ -59,7 +59,7 @@
<el-form-item label="出库数量"
prop="num" >
<el-input v-model="dataForm.num"
placeholder="请输入出库数量" readonly clearable :style='{"width":"100%"}'>
placeholder="请输入出库数量" readonly clearable :style='{"width":"100%"}' disabled>
</el-input>
</el-form-item>
@ -69,7 +69,7 @@
prop="customerId" >
<popupSelect v-model="dataForm.customerId"
placeholder="请选择" clearable field="customerId" interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" propsValue="id" relationField="supplier_nm" popupType="dialog"
popupTitle="选择数据" popupWidth="800px"
popupTitle="选择数据" popupWidth="800px" disabled
hasPage :pageSize="20" >
</popupSelect>
</el-form-item>
@ -110,9 +110,9 @@
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.receiptout_item0List" size='mini' >
<el-table :data="dataForm.receiptout_item0List" size='mini' show-summary :summary-method="getSummaries" >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="vehicleId" label="车牌号">
<el-table-column prop="vehicleId" label="车牌号" align="center" width="130">
<template slot-scope="scope">
<popupSelect v-model="scope.row.vehicleId"
placeholder="请选择" clearable :field="'vehicleId'+scope.$index" interfaceId="398732963950472005" :columnOptions="receiptout_item0vehicleIdcolumnOptions" propsValue="id" relationField="ticketno" popupType="dialog"
@ -121,7 +121,7 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="materialId" label="物料名称">
<el-table-column prop="materialId" label="物料名称" align="center" width="180">
<template slot-scope="scope">
<popupSelect v-model="scope.row.materialId"
placeholder="请选择" clearable :field="'materialId'+scope.$index" interfaceId="398719564478785669" :columnOptions="receiptout_item0materialIdcolumnOptions" propsValue="id" relationField="item_name" popupType="dialog"
@ -130,7 +130,7 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="reservoirareaId" label="库区名称">
<el-table-column prop="reservoirareaId" label="库区名称" align="center" width="130">
<template slot-scope="scope">
<popupSelect v-model="scope.row.reservoirareaId"
placeholder="请选择" clearable :field="'reservoirareaId'+scope.$index" interfaceId="381404161809350213" :columnOptions="receiptout_item0reservoirareaIdcolumnOptions" propsValue="id" relationField="areaname" popupType="dialog"
@ -139,7 +139,7 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="warehouseId" label="仓库名称">
<el-table-column prop="warehouseId" label="仓库名称" align="center" width="130">
<template slot-scope="scope">
<popupSelect v-model="scope.row.warehouseId"
placeholder="请选择" clearable :field="'reservoirareaId'+scope.$index" interfaceId="399117969575232581" :columnOptions="receiptout_item0reservoirareaIdcolumnOptions" propsValue="id" relationField="name" popupType="dialog"
@ -147,14 +147,21 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="deliveryNum" label="出库数量">
<el-table-column prop="batchNo" label="批次号" align="center" width="180">
<template slot-scope="scope">
<el-input v-model="scope.row.batchNo"
placeholder="系统自动生成" readonly>
</el-input>
</template>
</el-table-column>
<el-table-column prop="deliveryNum" label="出库数量" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.deliveryNum"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="unit" label="计量单位">
<el-table-column prop="unit" label="计量单位" align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.unit"
placeholder="请选择" clearable :style='{"width":"100%"}' disabled>
@ -162,14 +169,14 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="price" label="单价">
<el-table-column prop="price" label="单价" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.price"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="rate" label="税率">
<el-table-column prop="rate" label="税率" align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.rate"
placeholder="请选择" clearable :style='{"width":"100%"}' disabled>
@ -177,28 +184,21 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="amount" label="金额">
<el-table-column prop="amount" label="金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.amount"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="rateAmount" label="税额">
<el-table-column prop="rateAmount" label="税额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.rateAmount"
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="batchNo" label="批次号">
<template slot-scope="scope">
<el-input v-model="scope.row.batchNo"
placeholder="系统自动生成" readonly>
</el-input>
</template>
</el-table-column>
<el-table-column prop="poundType" label="磅单类型">
<el-table-column prop="poundType" label="磅单类型" align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.poundType"
placeholder="请选择" clearable :style='{"width":"100%"}' disabled>
@ -206,15 +206,15 @@
</el-select>
</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="delreceiptout_item0List(scope.$index)" disabled>删除</el-button>
</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="delreceiptout_item0List(scope.$index)" disabled>删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<div class="table-actions" @click="addreceiptout_item0List()" disabled="">
<el-button type="text" icon="el-icon-plus" disabled >添加</el-button>
</div>
<!-- <div class="table-actions" @click="addreceiptout_item0List()" disabled="">-->
<!-- <el-button type="text" icon="el-icon-plus" disabled >添加</el-button>-->
<!-- </div>-->
</el-form-item>
</el-col>
</el-tab-pane >
@ -295,6 +295,30 @@
},
mounted() {},
methods: {
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 5 || index === 7 || index === 9 || index === 10 )) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
} else {
sums[index] = '';
}
});
return sums;
},
areaSelect(a,b){
for (let i = 0;i<this.dataForm.receiptout_item0List.length;i++) {
if (a == this.dataForm.receiptout_item0List[i].reservoirareaId) {
@ -322,6 +346,7 @@
},
init(list) {
this.visible = true;
this.dataForm.documentNo = list[0].documentNo;
this.dataForm.amount = list[0].price;
this.dataForm.num = list[0].num;
this.dataForm.sourceNo = list[0].id;

@ -62,7 +62,7 @@
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.saleback_item0List" size='mini'>
<el-table :data="dataForm.saleback_item0List" size='mini' show-summary :summary-method="getSummaries">
<el-table-column type="index" width="50" label="序号" align="center" />
<!-- <el-table-column prop="licenseNum" label="车牌号">-->
<!-- <template slot-scope="scope">-->
@ -75,7 +75,7 @@
<!-- </popupSelect>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="vehicleId" label="车辆ID">
<el-table-column prop="vehicleId" label="车牌号" align="center" width="130">
<template slot-scope="scope">
<popupSelect v-model="scope.row.vehicleId"
placeholder="请选择" clearable :field="'vehicleId'+scope.$index" interfaceId="400554150653457925"
@ -85,7 +85,7 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="materialId" label="物料名称">
<el-table-column prop="materialId" label="物料名称" align="center" width="180">
<template slot-scope="scope">
<popupSelect v-model="scope.row.materialId"
placeholder="请选择" clearable :field="'materialId'+scope.$index" interfaceId="381037852907038533" :columnOptions="jg_salesback_item0materialIdcolumnOptions" propsValue="id" relationField="item_name" popupType="dialog"
@ -93,14 +93,14 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="settlement" label="结算重量 ">
<el-table-column prop="settlement" label="结算重量 " align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.settlement" placeholder="请输入" clearable
:style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="unit" label="计量单位 ">
<el-table-column prop="unit" label="计量单位 " align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.unit" placeholder="请选择" clearable
:style='{"width":"100%"}' disabled>
@ -110,14 +110,14 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="price" label="销售单价">
<el-table-column prop="price" label="销售单价" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.price" placeholder="请输入" clearable
:style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="rate" label="税率">
<el-table-column prop="rate" label="税率" align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.rate" placeholder="请选择" clearable
:style='{"width":"100%"}' disabled>
@ -127,21 +127,21 @@
</el-select>
</template>
</el-table-column>
<el-table-column prop="amount" label="应退金额">
<el-table-column prop="amount" label="应退金额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.amount" placeholder="请输入" clearable
:style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="notAmount" label="税额">
<el-table-column prop="notAmount" label="税额" align="center" width="130">
<template slot-scope="scope">
<el-input v-model="scope.row.notAmount" placeholder="请输入" clearable
:style='{"width":"100%"}' disabled>
</el-input>
</template>
</el-table-column>
<el-table-column prop="businessId" label="业务员">
<el-table-column prop="businessId" label="业务员" align="center" width="130">
<template slot-scope="scope">
<popupSelect v-model="scope.row.businessId"
placeholder="请选择" clearable :field="'businessId'+scope.$index" interfaceId="ebcc44be142e43b795c0d769abd6d25a" :columnOptions="jg_salesback_item0businessIdcolumnOptions" propsValue="F_Id" relationField="F_RealName" popupType="dialog"
@ -149,7 +149,7 @@
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="pountType" label="磅单类型 ">
<el-table-column prop="pountType" label="磅单类型 " align="center" width="130">
<template slot-scope="scope">
<el-select v-model="scope.row.pountType" placeholder="请选择" clearable
:style='{"width":"100%"}' disabled>
@ -306,6 +306,30 @@
created() {},
mounted() {},
methods: {
getSummaries(param) {
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 3 || index === 5 || index === 7 || index === 8 )) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
} else {
sums[index] = '';
}
});
return sums;
},
popupSelectChange2(a, b){
debugger
var excludeFields = [];
@ -355,6 +379,7 @@
},
init(list) {
this.visible = true;
this.dataForm.documentNo = list[0].documentNo;
this.dataForm.salesOrderId = list[0].id;
this.dataForm.refundAmount = list[0].price;
this.dataForm.refundNum = list[0].num;

@ -4,54 +4,18 @@
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<template v-if="!loading">
<!-- <el-col :span="24">
<el-col :span="12">
<el-form-item label="磅单上传" prop="poundPictures">
<el-upload class="avatar-uploader" :action="action" :show-file-list="false"
:on-success="handleAvatarSuccess">
<img v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<JNPF-UploadImg v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="1" :disabled="true">
</JNPF-UploadImg>
</el-form-item>
</el-col> -->
<el-col :span="24">
<el-form-item label="磅单上传" prop="poundPictures">
<!-- <JNPF-UploadImg v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="1">
</JNPF-UploadImg> -->
<template>
<div class="UploadFile-container">
<template v-if="fileList.length">
<transition-group class="el-upload-list el-upload-list--picture-card" tag="ul" name="el-list">
<li class="el-upload-list__item is-success" v-for="(file,index) in fileList"
:key="file.fileId">
<el-image :src="define.comUrl+file.url" class="el-upload-list__item-thumbnail"
:preview-src-list="getImgList(fileList)" :z-index="10000" :ref="'image'+index">
</el-image>
<span class="el-upload-list__item-actions">
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(index)">
<i class="el-icon-zoom-in"></i>
</span>
<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(index)">
<i class="el-icon-delete"></i>
</span>
</span>
</li>
</transition-group>
</template>
<template v-if="!detailed">
<el-upload :action="define.comUploadPoundUrl+'/'+type" :headers="uploadHeaders" ref="elUpload"
:on-success="handleSuccess" :multiple="limit!==1" :show-file-list="false" accept="image/*"
:before-upload="beforeUpload" :on-exceed="handleExceed" :disabled="disabled"
list-type="picture-card" :limit="limit" class="upload-btn">
<i class="el-icon-plus"></i>
<div slot="tip" class="el-upload__tip" v-show="showTip">
只能上传不超过{{fileSize}}{{sizeUnit}}{{accept}}图片
</div>
</el-upload>
</template>
</div>
</template>
</el-col>
<el-col :span="12">
<el-form-item label="车辆图片" prop="vehiclePictures">
<JNPF-UploadImg v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9">
</JNPF-UploadImg>
</el-form-item>
</el-col>
<el-col :span="6">
@ -94,13 +58,6 @@
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="车辆图片" prop="vehiclePictures">
<JNPF-UploadImg v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9">
</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%"}'
@ -568,9 +525,6 @@
},
init(id, isDetail) {
this.value = [];
this.dataForm.businessId = this.$store.state.user.userInfo.userId;
this.dataForm.businessName = this.$store.state.user.userInfo.userName;
this.dataForm.poundDate = new Date();
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;
@ -587,6 +541,9 @@
});
} else {
this.clearData(this.dataForm)
this.dataForm.businessId = this.$store.state.user.userInfo.userId;
this.dataForm.businessName = this.$store.state.user.userInfo.userName;
this.dataForm.poundDate = new Date();
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})

@ -4,54 +4,18 @@
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<template v-if="!loading">
<!-- <el-col :span="24">
<el-col :span="12">
<el-form-item label="磅单上传" prop="poundPictures">
<el-upload class="avatar-uploader" :action="action" :show-file-list="false"
:on-success="handleAvatarSuccess">
<img v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-col> -->
<el-col :span="24">
<el-form-item label="磅单上传" prop="poundPictures">
<!-- <JNPF-UploadImg v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="1">
<JNPF-UploadImg2 v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="1" @change="imgChange">
</JNPF-UploadImg> -->
<template>
<div class="UploadFile-container">
<template v-if="fileList.length">
<transition-group class="el-upload-list el-upload-list--picture-card" tag="ul" name="el-list">
<li class="el-upload-list__item is-success" v-for="(file,index) in fileList"
:key="file.fileId">
<el-image :src="define.comUrl+file.url" class="el-upload-list__item-thumbnail"
:preview-src-list="getImgList(fileList)" :z-index="10000" :ref="'image'+index">
</el-image>
<span class="el-upload-list__item-actions">
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(index)">
<i class="el-icon-zoom-in"></i>
</span>
<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(index)">
<i class="el-icon-delete"></i>
</span>
</span>
</li>
</transition-group>
</template>
<template v-if="!detailed">
<el-upload :action="define.comUploadPoundUrl+'/'+type" :headers="uploadHeaders" ref="elUpload"
:on-success="handleSuccess" :multiple="limit!==1" :show-file-list="false" accept="image/*"
:before-upload="beforeUpload" :on-exceed="handleExceed" :disabled="disabled"
list-type="picture-card" :limit="limit" class="upload-btn">
<i class="el-icon-plus"></i>
<div slot="tip" class="el-upload__tip" v-show="showTip">
只能上传不超过{{fileSize}}{{sizeUnit}}{{accept}}图片
</div>
</el-upload>
</template>
</div>
</template>
</JNPF-UploadImg2>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车辆图片" prop="vehiclePictures">
<JNPF-UploadImg v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9">
</JNPF-UploadImg>
</el-form-item>
</el-col>
<el-col :span="6">
@ -94,13 +58,6 @@
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="车辆图片" prop="vehiclePictures">
<JNPF-UploadImg v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9">
</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%"}'
@ -448,7 +405,7 @@
},
computed: {},
watch: {
value: {
/* value: {
immediate: true,
handler(val) {
this.fileList = val
@ -464,11 +421,28 @@
}
})
}
}
} */
},
created() {},
mounted() {},
methods: {
imgChange(res){
this.dataForm.customerId = res.data.customerId;
this.dataForm.customerName = res.data.customerName;
this.dataForm.salesId = res.data.salesId;
this.dataForm.salesName = res.data.salesName;
this.dataForm.vehicleId = res.data.vehicleId;
this.dataForm.poundDate = res.data.poundDate;
this.dataForm.poundlistNo = res.data.poundlistNo;
this.dataForm.tareWeight = res.data.tareWeight;
this.dataForm.grossWeight = res.data.grossWeight;
this.dataForm.buckleWeight = res.data.buckleWeight;
this.dataForm.netWeight = res.data.netWeight;
if(res.data.grossWeight>=1000){
this.dataForm.unit = '1';
this.unit = '1';
}
},
grossWeightChange(){
var grossWeight = this.dataForm.grossWeight;
if(grossWeight>=1000){
@ -565,9 +539,6 @@
},
init(id, isDetail) {
this.value = [];
this.dataForm.businessId = this.$store.state.user.userInfo.userId;
this.dataForm.businessName = this.$store.state.user.userInfo.userName;
this.dataForm.poundDate = new Date();
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;
@ -580,6 +551,9 @@
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.dataForm.businessId = this.$store.state.user.userInfo.userId;
this.dataForm.businessName = this.$store.state.user.userInfo.userName;
this.dataForm.poundDate = new Date();
this.loading = false
});
} else {
@ -621,6 +595,14 @@
})
return
}
if(netWeight <= 0){
this.$message({
message: '净重必须大于0',
type: 'success',
duration: 1000
})
return
}
this.$refs['elForm'].validate((valid) => {
if (valid) {
this.request2()
@ -788,8 +770,8 @@
if (res.code == 200) {
this.fileList.push({
name: file.name,
fileId: res.data.name,
url: res.data.url
fileId: res.data.vo.name,
url: res.data.vo.url
})
this.dataForm.customerId = res.data.customerId;
this.dataForm.customerName = res.data.customerName;

@ -4,13 +4,20 @@
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<template v-if="!loading">
<el-col :span="24">
<el-col :span="12">
<el-form-item label="磅单上传" prop="poundPictures">
<JNPF-UploadImg v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="1" :disabled="true">
</JNPF-UploadImg>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="车辆图片" prop="vehiclePictures">
<JNPF-UploadImg v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9">
</JNPF-UploadImg>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="物料名称" prop="materialId">
<popupSelect v-model="dataForm.materialId" placeholder="请选择物料编码" clearable field="materialId"
@ -76,13 +83,6 @@
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="车辆图片" prop="vehiclePictures">
<JNPF-UploadImg v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9">
</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%"}'
@ -150,10 +150,10 @@
<el-input-number v-model="dataForm.transportPrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-col :span="6">
<el-form-item label="起始地" prop="originPlace">
<el-input v-model="dataForm.originPlace" placeholder="请输入起始地" clearable :style='{"width":"100%"}'>
</el-input>
<JNPF-Address v-model="dataForm.originPlace" placeholder="请选择省市区" clearable :level='2' >
</JNPF-Address>
</el-form-item>
</el-col>
<el-col :span="6">
@ -236,6 +236,7 @@
netWeight: 0,
unit: "0",
transportType: "0",
originPlace:[],
advance: "0",
transportPrice: 0,
salesPrice: 0,
@ -543,7 +544,6 @@
}
},
init(id, isDetail) {
this.dataForm.poundDate = new Date();
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;
@ -560,11 +560,12 @@
});
} else {
this.clearData(this.dataForm)
this.dataForm.poundDate = new Date();
this.dataForm.businessId = this.$store.state.user.userInfo.userId;
this.dataForm.businessName = this.$store.state.user.userInfo.userName;
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
this.dataForm.businessId = this.$store.state.user.userInfo.userId;
this.dataForm.businessName = this.$store.state.user.userInfo.userName;
},
//
dataFormSubmit() {
@ -719,12 +720,18 @@
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.poundPictures = JSON.stringify(_data.poundPictures)
_data.vehiclePictures = JSON.stringify(_data.vehiclePictures)
_data.originPlace = JSON.stringify(_data.originPlace)
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.poundPictures = JSON.parse(_dataAll.poundPictures)
_dataAll.vehiclePictures = JSON.parse(_dataAll.vehiclePictures)
if(_dataAll.originPlace.length > 0){
_dataAll.originPlace = JSON.parse(_dataAll.originPlace)
}else{
_dataAll.originPlace = []
}
this.dataForm = _dataAll
},
},

Loading…
Cancel
Save