3.19提交修改

product
17602169347 2 years ago
parent b96f371a4c
commit d53350f84c

@ -136,7 +136,7 @@ public class InvoicesController {
public ActionResult create(@RequestBody @Valid InvoicesCrForm invoicesCrForm) throws DataException {
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
invoicesCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("yffp", false));
//invoicesCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("yffp", false));
InvoicesEntity entity = JsonUtil.getJsonToBean(invoicesCrForm, InvoicesEntity.class);
entity.setId(mainId);
invoicesService.save(entity);

@ -199,7 +199,7 @@ public class PaymentController {
public ActionResult create(@RequestBody @Valid PaymentCrForm paymentCrForm) throws DataException {
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
paymentCrForm.setDocumentno(generaterSwapUtil.getBillNumber("payment", false));
//paymentCrForm.setDocumentno(generaterSwapUtil.getBillNumber("payment", false));
PaymentEntity entity = JsonUtil.getJsonToBean(paymentCrForm, PaymentEntity.class);
entity.setId(mainId);
paymentService.save(entity);

@ -160,7 +160,7 @@ public class PaymentdocController {
VisualdevEntity visualdevEntity =generaterSwapUtil.getVisualEntity(visualId);
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
paymentdocCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("fukuanshenqing", false));
//paymentdocCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("fukuanshenqing", false));
PaymentdocEntity entity = JsonUtil.getJsonToBean(paymentdocCrForm, PaymentdocEntity.class);
entity.setId(mainId);
paymentdocService.save(entity);

@ -144,6 +144,26 @@ public class PoundlistController {
entity.setOriginPlace(generaterSwapUtil.provinceData(entity.getOriginPlace()));
}
List<PoundlistListVO> listVO=JsonUtil.getJsonToList(list,PoundlistListVO.class);
for(PoundlistListVO poundlistListVO:listVO){
if(StringUtils.isEmpty(poundlistListVO.getSettlement())){
poundlistListVO.setSettlement(poundlistListVO.getNetWeight());
if(StringUtils.isEmpty(poundlistListVO.getSettlement())){
poundlistListVO.setSettlement("0");
}
}
if(StringUtils.isEmpty(poundlistListVO.getPrice())){
poundlistListVO.setPrice(poundlistListVO.getPurchasePrice());
if(StringUtils.isEmpty(poundlistListVO.getPrice())){
poundlistListVO.setPrice("0");
}
}
poundlistListVO.setPrice(poundlistListVO.getPurchasePrice());
poundlistListVO.setRate("0");
poundlistListVO.setPountType(poundlistListVO.getPoundType());
poundlistListVO.setAmount(String.valueOf(Double.parseDouble(poundlistListVO.getSettlement()) * Double.parseDouble(poundlistListVO.getPrice())));
poundlistListVO.setNotAmount(String.valueOf(Double.parseDouble(poundlistListVO.getAmount()) * 0.87));
poundlistListVO.setRateAmount(String.valueOf(Double.parseDouble(poundlistListVO.getAmount()) - Double.parseDouble(poundlistListVO.getNotAmount())));
}
PageListVO vo=new PageListVO();
vo.setList(listVO);
PaginationVO page=JsonUtil.getJsonToBean(poundlistPagination,PaginationVO.class);

@ -227,4 +227,7 @@ public class PoundlistEntity {
private BigDecimal price;
@TableField(exist = false)
private String salesContractNo;
@TableField(exist = false)
private String purchaseorderItem0Id;
}

@ -28,4 +28,6 @@ public interface PoundlistMapper extends BaseMapper<PoundlistEntity> {
List<PoundlistSEntity> qureylist(PoundlistSEntity poundlistSEntity);
//废钢采购销售统计明细表(按磅单)
List<PoundlistTwoEntity> qureylist2(PoundlistTwoEntity poundlistTwoEntity);
PoundlistEntity queryPoundById(String poundlistId);
}

@ -230,18 +230,30 @@ public class PoundlistListVO{
private String poundlistNo;
@JsonProperty("purchaseContractNo")
private String purchaseContractNo;
@TableField("salesContractNo")
@JsonProperty("salesContractNo")
private String salesContractNo;
@TableField("businessId")
@JsonProperty("businessId")
private String businessId;
@TableField("customerId")
@JsonProperty("customerId")
private String customerId;
@TableField("salesId")
@JsonProperty("salesId")
private String salesId;
@JsonProperty("pountType")
private String pountType;
@JsonProperty("amount")
private String amount;
@JsonProperty("notAmount")
private String notAmount;
@JsonProperty("rateAmount")
private String rateAmount;
/** 创建时间 **/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@JsonProperty("creatorTime")
private Date creatorTime;
@JsonProperty("purchaseorderItem0Id")
private String purchaseorderItem0Id;
}

@ -37,6 +37,9 @@ public class PoundlistPagination extends Pagination {
private String isExpense;
private Date startDate;
private Date endDate;
private String purchaseOrderId;
private List<String> poundlistIds;
/**
* id
*/

@ -33,7 +33,9 @@ public interface PoundlistService extends IService<PoundlistEntity> {
List<PoundlistSEntity> qureylist(PoundlistSEntity poundlistSEntity);
//废钢采购销售统计明细表(按磅单)
List<PoundlistTwoEntity> purchasesalesPricelist(PoundlistTwoEntity poundlistTwoEntity);
PoundlistEntity queryPoundById(String poundlistId);
// 子表方法
//列表子表数据方法

@ -243,6 +243,11 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
return list;
}
@Override
public PoundlistEntity queryPoundById(String poundlistId) {
return poundlistMapper.queryPoundById(poundlistId);
}
@Override
public void delete(PoundlistEntity entity){
if(entity!=null){

@ -101,11 +101,10 @@ public class PurchasebackController {
public ActionResult list(@RequestBody PurchasebackPagination purchasebackPagination) throws IOException {
List<PurchasebackEntity> list = purchasebackService.getList(purchasebackPagination);
//处理id字段转名称若无需转或者为空可删除
/*for (PurchasebackEntity entity : list) {
Map<String, Object> purchaseOrderIdMap = new HashMap<>();
entity.setPurchaseOrderId(generaterSwapUtil.getPopupSelectValue("383149471917185157", "id", "document_no", entity.getPurchaseOrderId(), purchaseOrderIdMap));
entity.setCreatorUserName(generaterSwapUtil.userSelectValue(entity.getCreatorUserName()));
}*/
for (PurchasebackEntity entity : list) {
List<Purchaseback_item0Entity> purchaseback_item0List = purchasebackService.GetPurchaseback_item0List(entity.getId());
entity.setPurchaseback_item0List(purchaseback_item0List);
}
List<PurchasebackListVO> listVO = JsonUtil.getJsonToList(list, PurchasebackListVO.class);
for (PurchasebackListVO purchasebackVO : listVO) {
PurchaseorderEntity purchaseorderEntity = purchasebackService.getPurchaseorder(purchasebackVO.getPurchaseOrderId());
@ -113,8 +112,6 @@ public class PurchasebackController {
purchasebackVO.setJg_purchaseorder(JsonUtil.getJsonToBean(purchaseorderEntity, PurchaseorderListVO.class));
}
}
PageListVO vo = new PageListVO();
vo.setList(listVO);
PaginationVO page = JsonUtil.getJsonToBean(purchasebackPagination, PaginationVO.class);
@ -134,7 +131,7 @@ public class PurchasebackController {
public ActionResult create(@RequestBody @Valid PurchasebackCrForm purchasebackCrForm) throws DataException {
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
purchasebackCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("cgth", false));
//purchasebackCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("cgth", false));
purchasebackCrForm.setCreatorTime(DateUtil.getNow());
purchasebackCrForm.setCreatorUserName(userInfo.getUserId());
PurchasebackEntity entity = JsonUtil.getJsonToBean(purchasebackCrForm, PurchasebackEntity.class);
@ -143,7 +140,7 @@ public class PurchasebackController {
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(entity.getPurchaseOrderId());
purchaseorderEntity.setRefundableAmount(entity.getRefundAmount());
purchaseorderEntity.setRefundableNum(entity.getRefundNum());
purchaseorderService.save(purchaseorderEntity);
purchaseorderService.updateById(purchaseorderEntity);
List<Purchaseback_item0Entity> Purchaseback_item0List = JsonUtil.getJsonToList(purchasebackCrForm.getPurchaseback_item0List(),Purchaseback_item0Entity.class);
for(Purchaseback_item0Entity entitys : Purchaseback_item0List){
entitys.setId(RandomUtil.uuId());
@ -415,7 +412,7 @@ public class PurchasebackController {
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(subentity.getPurchaseOrderId());
purchaseorderEntity.setRefundableAmount(subentity.getRefundAmount());
purchaseorderEntity.setRefundableNum(subentity.getRefundNum());
purchaseorderService.save(purchaseorderEntity);
purchaseorderService.saveOrUpdate(purchaseorderEntity);
QueryWrapper<Purchaseback_item0Entity> Purchaseback_item0queryWrapper = new QueryWrapper<>();
Purchaseback_item0queryWrapper.lambda().eq(Purchaseback_item0Entity::getPurchasebackId, entity.getId());
purchaseback_item0Service.remove(Purchaseback_item0queryWrapper);

@ -11,6 +11,8 @@ import java.util.Date;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
@ -95,5 +97,8 @@ public class PurchasebackEntity {
private String contractName;
@TableField(exist = false)
private String supplierName;
@TableField(exist = false)
private String contractNo;
@TableField(exist = false)
private List<Purchaseback_item0Entity> purchaseback_item0List;
}

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jnpf.poundlist.entity.PoundlistEntity;
import lombok.Data;
import java.util.Date;
@ -110,4 +111,7 @@ public class Purchaseback_item0Entity {
@TableField(exist = false)
private String materialId;
@TableField(exist = false)
private PoundlistEntity poundlistEntity;
}

@ -3,12 +3,15 @@
package jnpf.purchaseback.model.purchaseback;
import jnpf.purchaseback.entity.Purchaseback_item0Entity;
import lombok.Data;
import java.sql.Time;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.util.List;
/**
*
*
@ -86,4 +89,10 @@ public class PurchasebackListVO{
private String contractName;
@JsonProperty("supplierName")
private String supplierName;
@JsonProperty("contractNo")
private String contractNo;
@JsonProperty("purchaseback_item0List")
private List<Purchaseback_item0Entity> purchaseback_item0List;
}

@ -1,5 +1,7 @@
package jnpf.purchaseback.service.impl;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService;
import jnpf.purchaseback.entity.*;
import jnpf.purchaseback.mapper.PurchasebackMapper;
import jnpf.purchaseback.service.*;
@ -57,7 +59,8 @@ public class PurchasebackServiceImpl extends ServiceImpl<PurchasebackMapper, Pur
private Purchaseback_item0Service purchaseback_item0Service;
@Autowired
private PurchasebackMapper purchasebackMapper;
@Autowired
private PoundlistService poundlistService;
@ -316,7 +319,12 @@ public class PurchasebackServiceImpl extends ServiceImpl<PurchasebackMapper, Pur
public List<Purchaseback_item0Entity> GetPurchaseback_item0List(String id){
QueryWrapper<Purchaseback_item0Entity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(Purchaseback_item0Entity::getPurchasebackId, id);
return purchaseback_item0Service.list(queryWrapper);
List<Purchaseback_item0Entity> purchaseback_item0EntityList = purchaseback_item0Service.list(queryWrapper);
for (Purchaseback_item0Entity purchaseback_item0Entity: purchaseback_item0EntityList) {
PoundlistEntity poundlistEntity = poundlistService.queryPoundById(purchaseback_item0Entity.getPoundlistId());
purchaseback_item0Entity.setPoundlistEntity(poundlistEntity);
}
return purchaseback_item0EntityList;
}
//列表子表数据方法

@ -72,6 +72,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* purchaseorder
@ -216,6 +217,17 @@ public class PurchaseorderController {
}*/
List<PurchaseorderListVO> listVO = JsonUtil.getJsonToList(list, PurchaseorderListVO.class);
for (PurchaseorderListVO purchaseorderVO : listVO) {
QueryWrapper<Purchaseorder_item0Entity> purchaseorder_item0Wrapper = new QueryWrapper<>();
purchaseorder_item0Wrapper.lambda().eq(Purchaseorder_item0Entity::getPurchaseorderId, purchaseorderVO.getId());
purchaseorder_item0Wrapper.lambda().select(Purchaseorder_item0Entity::getPoundlistId);
List<String> poundIdList = purchaseorder_item0Service.listObjs(purchaseorder_item0Wrapper).stream().map(o -> (String) o).collect(Collectors.toList());
QueryWrapper<PoundlistEntity> poundlistWrapper = new QueryWrapper<>();
poundlistWrapper.lambda().in(PoundlistEntity::getId, poundIdList);
List<PoundlistEntity> poundlistEntityList = new ArrayList<>();
if(poundIdList.size() > 0){
poundlistEntityList = poundlistService.list(poundlistWrapper);
}
purchaseorderVO.setPoundlistEntityList(poundlistEntityList);
}
PageListVO vo = new PageListVO();
vo.setList(listVO);
@ -236,7 +248,7 @@ public class PurchaseorderController {
public ActionResult create(@RequestBody @Valid PurchaseorderCrForm purchaseorderCrForm) throws DataException {
String mainId = RandomUtil.uuId();
UserInfo userInfo = userProvider.get();
purchaseorderCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("cgdj", false));
//purchaseorderCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("cgdj", false));
purchaseorderCrForm.setCreatorUserName(userInfo.getUserId());
purchaseorderCrForm.setCreatorTime(DateUtil.getNow());
purchaseorderCrForm.setStatus("0");//待开票
@ -611,6 +623,7 @@ public class PurchaseorderController {
receiptinitem0Wrapper.lambda().eq(Receiptin_item0Entity::getReceiptinId, receiptinEntity.getId());
List<Receiptin_item0Entity> receiptin_item0EntityList = receiptin_item0Service.list(receiptinitem0Wrapper);
receiptinEntity.setReceiptin_item0List(receiptin_item0EntityList);
vo.setReceiptin_item0List(JsonUtil.getJsonToList(receiptin_item0EntityList,Receiptin_item0Model.class ));
vo.setReceiptinEntity(receiptinEntity);
}else{
vo.setReceiptinEntity(new ReceiptinEntity());

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jnpf.paymentdoc.entity.PaymentdocEntity;
import jnpf.poundlist.entity.PoundlistEntity;
import lombok.Data;
@ -155,4 +156,6 @@ public class PurchaseorderitemEntity {
@TableField(exist = false)
private List<PoundlistEntity> poundlistEntityList;
@TableField(exist = false)
private List<PaymentdocEntity> paymentdocEntityList;
}

@ -3,12 +3,15 @@
package jnpf.purchaseorder.model.purchaseorder;
import jnpf.poundlist.entity.PoundlistEntity;
import lombok.Data;
import java.sql.Time;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
import java.util.List;
/**
*
*
@ -128,4 +131,7 @@ public class PurchaseorderListVO{
@JsonProperty("supplierId")
private String supplierId;
@JsonProperty("poundlistEntityList")
private List<PoundlistEntity> poundlistEntityList;
}

@ -134,7 +134,7 @@ public class ReceiptinController {
public ActionResult create(@RequestBody @Valid ReceiptinCrForm receiptinCrForm) throws DataException {
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
receiptinCrForm.setDocumentno(generaterSwapUtil.getBillNumber("rukudanhao", false));
//receiptinCrForm.setDocumentno(generaterSwapUtil.getBillNumber("rukudanhao", false));
receiptinCrForm.setCreatorTime(DateUtil.getNow());
receiptinCrForm.setCreatorUserName(userInfo.getUserId());
ReceiptinEntity entity = JsonUtil.getJsonToBean(receiptinCrForm, ReceiptinEntity.class);

@ -734,7 +734,7 @@ public class TradeuploadController {
if(vo.getCreatorTime()!=null){
vo.setCreatorTime(vo.getCreatorTime());
}
vo.setOriginPlace(generaterSwapUtil.provinceData(vo.getOriginPlace()));
//vo.setOriginPlace(generaterSwapUtil.provinceData(vo.getOriginPlace()));
//子表
//副表
return ActionResult.success(vo);

@ -56,7 +56,7 @@ WHERE
</select>
<select id="queryByKeyword" resultType="jnpf.poundlist.entity.PoundlistEntity">
SELECT a.*,b.ticketno vehicleName,c.supplier_name supplierName,d.supplier_nm customerName,e.item_name materialName,f.contract_name salesName,g.contract_name purchaseName,h.F_RealName businessName,i.name naturalName,g.contract_no purchaseContractNo,f.contract_no salesContractNo
SELECT a.*,b.ticketno vehicleName,c.supplier_name supplierName,d.supplier_nm customerName,e.item_name materialName,f.contract_name salesName,g.contract_name purchaseName,h.F_RealName businessName,i.name naturalName,g.contract_no purchaseContractNo,f.contract_no salesContractNo, j.id purchaseorderItem0Id
from jg_poundlist a
LEFT JOIN jg_vehicle b on a.vehicle_id = b.id
LEFT JOIN jg_supplier c on a.supplier_id = c.id
@ -66,6 +66,7 @@ WHERE
LEFT JOIN jg_contract g on a.purchase_id = g.id
LEFT JOIN base_user h on a.business_id = h.f_id
LEFT JOIN jg_natural i on a.natural_id = i.id
LEFT JOIN jg_purchaseorder_item0 j on a.id = j.poundlist_id
where a.is_examine = '1'
<if test="poundlistPagination.keyword != null and poundlistPagination.keyword != ''">
AND (b.ticketno LIKE CONCAT('%',#{poundlistPagination.keyword},'%') OR c.supplier_name LIKE CONCAT('%',#{poundlistPagination.keyword},'%') OR d.supplier_nm LIKE CONCAT('%',#{poundlistPagination.keyword},'%'))
@ -107,8 +108,33 @@ WHERE
<if test="poundlistPagination.supplierName != null and poundlistPagination.supplierName != ''">
AND c.supplier_name LIKE CONCAT('%',#{poundlistPagination.supplierName},'%')
</if>
<if test="poundlistPagination.purchaseOrderId != null and poundlistPagination.purchaseOrderId != ''">
AND a.id IN (SELECT poundlist_id from jg_purchaseorder_item0 where purchaseorder_id = #{poundlistPagination.purchaseOrderId})
</if>
<if test="poundlistPagination.poundlistIds != null and poundlistPagination.poundlistIds.size()!=0">
AND a.id NOT IN
<foreach collection="poundlistPagination.poundlistIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="poundlistPagination.sidx != null and poundlistPagination.sidx != ''">
ORDER BY ${poundlistPagination.sidx} ${poundlistPagination.sort}
</if>
</select>
<select id="queryPoundById" resultType="jnpf.poundlist.entity.PoundlistEntity">
SELECT a.*,b.ticketno vehicleName,c.supplier_name supplierName,d.supplier_nm customerName,e.item_name materialName,f.contract_name salesName,g.contract_name purchaseName,h.F_RealName businessName,i.name naturalName,g.contract_no purchaseContractNo,f.contract_no salesContractNo
from jg_poundlist a
LEFT JOIN jg_vehicle b on a.vehicle_id = b.id
LEFT JOIN jg_supplier c on a.supplier_id = c.id
LEFT JOIN jg_customer d on a.customer_id = d.id
LEFT JOIN jg_material e on a.material_id = e.id
LEFT JOIN jg_contract f on a.sales_id = f.id
LEFT JOIN jg_contract g on a.purchase_id = g.id
LEFT JOIN base_user h on a.business_id = h.f_id
LEFT JOIN jg_natural i on a.natural_id = i.id
where a.id = #{id}
</select>
</mapper>

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.purchaseback.mapper.PurchasebackMapper">
<select id="queryByKeyword" resultType="jnpf.purchaseback.entity.PurchasebackEntity">
SELECT a.*,b.document_no purchaseorderdocumentno,c.contract_name contractName,d.supplier_name supplierName
SELECT a.*,b.document_no purchaseorderdocumentno,c.contract_name contractName,c.contract_no contractNo,d.supplier_name supplierName
from jg_purchaseback a
LEFT JOIN jg_purchaseorder b on a.purchase_order_id = b.id
LEFT JOIN jg_contract c on b.contract_code = c.id

@ -522,6 +522,16 @@
this.dataForm.paymentAmount = paymentAmount;
this.dataForm.unpaymentAmount = unpaymentAmount;
this.dataForm.paymentdocitem0List = data.purchaseorder;
let param = {
param : 'fukuanshenqing'
}
request({
url: '/api/collection/Collection/autoSerialNum',
method: 'get',
data: param
}).then(res => {
this.dataForm.documentNo = res.msg
});
}
this.$emit('setPageLoad')
})

@ -254,7 +254,7 @@
</el-table-column>
<el-table-column prop="taxRate" label="税率" width="200">
<template slot-scope="scope">
<el-select v-model="scope.row.taxRate" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-select v-model="scope.row.taxRate" placeholder="请选择" clearable :style='{"width":"100%"}' @change="taxRateChange(scope.row)">
<el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
@ -593,12 +593,36 @@
});
this.dataForm.invoiceQuantity = invoiceQuantity;
},
invoiceAmountChange(e) {
var invoiceAmount = 0
this.dataForm.invoicesitem0List.forEach((item, index) => {
invoiceAmount = invoiceAmount + parseFloat(item.invoiceAmount);
});
this.dataForm.invoiceAmount = invoiceAmount;
invoiceAmountChange(e){
var invoiceAmount = 0;
var taxRateName = 87;
this.taxRateOptions.forEach((model, i) => {
if(e.taxRate == model.id){
taxRateName = 100 - parseInt(model.fullName)
}
})
this.dataForm.invoicesitem0List.forEach((model, i) => {
invoiceAmount = invoiceAmount + parseFloat(model.invoiceAmount);
if(e.invoiceAmount == model.invoiceAmount && e.taxRate == model.taxRate){
model.amountNotTax = model.invoiceAmount * taxRateName / 100;
model.taxAmount = model.invoiceAmount - model.amountNotTax
}
})
this.dataForm.invoiceAmount = invoiceAmount
},
taxRateChange(e){
var taxRateName = 87;
this.taxRateOptions.forEach((model, i) => {
if(e.taxRate == model.id){
taxRateName = 100 - parseInt(model.fullName)
}
})
this.dataForm.invoicesitem0List.forEach((model, i) => {
if(e.invoiceAmount == model.invoiceAmount && e.taxRate == model.taxRate){
model.amountNotTax = model.invoiceAmount * taxRateName / 100;
model.taxAmount = model.invoiceAmount - model.amountNotTax
}
})
},
invoicesitem1Exist() {
let isOk = true;

@ -63,9 +63,9 @@
<el-table-column prop="collectionAccount" label="收款账户" width="150" align="center" sortable="custom" />
<el-table-column prop="colectionBank" label="收款银行" width="150" align="center" sortable="custom" />
<el-table-column prop="dueDate" label="应付日期" width="150" align="center" sortable="custom" />
<el-table-column label="是否付款" width="150" prop="isPay" align="center" sortable="custom">
<el-table-column label="是否付款" width="150" prop="docStatus" align="center" sortable="custom">
<template slot-scope="scope">
{{ scope.row.isPay | dynamicText(isPayOptions) }}
{{ scope.row.docStatus | dynamicText(isPayOptions) }}
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" width="150" align="center" sortable="custom" />
@ -264,8 +264,14 @@
"fullName": "否",
"id": "0"
}, {
"fullName": "",
"fullName": "",
"id": "1"
}, {
"fullName": "否",
"id": "2"
}, {
"fullName": "是",
"id": "3"
}],
isPayProps: {
"label": "fullName",
@ -351,7 +357,7 @@
},
fukuanHandle(id, flowState, docStatus){
if(flowState == 2){
//if(docStatus != 3){
if(docStatus != 3){
this.formVisible = true
this.$nextTick(() => {
request({
@ -361,14 +367,14 @@
this.$refs.JNPFForm.init(res.data)
})
})
/* }else{
}else{
this.$message({
type: 'error',
message: '该订单已付款',
message: '该订单已提交付款',
duration: 1000
});
return
} */
}
}else{
this.$message({

@ -443,7 +443,7 @@
this.dataForm.collectionaccount = paymentdoc.collectionAccount
this.dataForm.collectionbank = paymentdoc.colectionBank
this.dataForm.duedate = paymentdoc.dueDate
this.dataForm.businessdate = paymentdoc.businessdate
this.dataForm.businessdate = (paymentdoc.businessdate ? paymentdoc.businessdate : new Date().getTime())
this.dataForm.currency = paymentdoc.currency
this.dataForm.settlementtype = paymentdoc.settlementType
this.dataForm.paymentno = paymentdoc.documentNo
@ -453,6 +453,16 @@
item.id = '';
});
this.dataForm.payment_item0List = paymentdoc.paymentdocitem0List
let param = {
param : 'payment'
}
request({
url: '/api/collection/Collection/autoSerialNum',
method: 'get',
data: param
}).then(res => {
this.dataForm.documentno = res.msg
});
},
//
dataFormSubmit() {

@ -1,12 +1,12 @@
<template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
<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="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">
<el-col :span="12">
<el-form-item label="磅单上传" prop="poundPictures">
<JNPF-UploadImg v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="9" :disabled="true">
<JNPF-UploadImg v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="1" :disabled="true">
</JNPF-UploadImg>
</el-form-item>
@ -89,6 +89,11 @@
<el-input-number v-model="dataForm.collectPrice" :style='{"width":"100%"}' :precision="6"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}' :precision="6"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="毛重" prop="grossWeight">
<el-input-number v-model="dataForm.grossWeight" :style='{"width":"100%"}' :precision="6"></el-input-number>
@ -110,13 +115,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}' :precision="6"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="磅单日期" prop="poundDate">
<el-form-item label="磅单时间" prop="poundDate">
<el-date-picker v-model="dataForm.poundDate" placeholder="请选择" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp">
@ -125,7 +124,7 @@
</el-col>
<el-col :span="6">
<el-form-item label="磅单号" prop="poundlistNo">
<el-input v-model="dataForm.poundlistNo" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
<el-input v-model="dataForm.poundlistNo" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
@ -170,7 +169,7 @@
</el-col>
<el-col :span="6">
<el-form-item label="业务员1" prop="businessId">
<popupSelect v-model="dataForm.businessId" placeholder="请选择业务员1" clearable field="businessId"
<popupSelect v-model="dataForm.businessId" placeholder="请选择业务员" clearable field="businessId"
interfaceId="ebcc44be142e43b795c0d769abd6d25a" :columnOptions="businessIdcolumnOptions"
propsValue="F_Id" relationField="F_RealName" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
hasPage :pageSize="20" :bissId="dataForm.businessId">
@ -247,9 +246,9 @@
transportType: "0",
advance: "0",
transportPrice: 0,
collectPrice: 0,
salesPrice: 0,
purchasePrice: 0,
collectPrice: 0,
businessId: "",
naturalId: "",
remark: '',
@ -392,6 +391,9 @@
}, {
"label": "司机",
"value": "drivername"
}, {
"label": "车辆照片",
"value": "vehiclephotos"
}, {
"label": "手机号",
"value": "contact"
@ -475,6 +477,7 @@
},
customerSelect2(a, b) {
this.dataForm.supplierId = b.code;
debugger
},
handleAvatarSuccess(res, file) {
this.imageUrl = URL.createObjectURL(file.raw);
@ -618,6 +621,7 @@
},
request2() {
var _data = this.dataList()
debugger
if (!this.dataForm.id) {
request({
url: '/api/tradeupload/Tradeupload',

@ -938,6 +938,16 @@
this.dataForm.notAmount = notAmount;
this.dataForm.rate = amount - notAmount;
this.dataForm.purchaseorder_item0List = itemArr;
let param = {
param : 'cgdj'
}
request({
url: '/api/collection/Collection/autoSerialNum',
method: 'get',
data: param
}).then(res => {
this.dataForm.documentNo = res.msg
});
/* this.$nextTick(() => {
this.$refs['elForm'].resetFields()
if (this.dataForm.id) {

@ -592,13 +592,13 @@
var statusFlag = true;
var purchaseIdArr = [];
this.multipleSelectionItem.forEach((item, index)=>{
item.settlement = item.netWeight;
/* //item.settlement = item.netWeight;
item.pountType = item.poundType;
item.price = item.purchasePrice
item.amount = item.settlement * item.purchasePrice;
//item.price = item.purchasePrice
item.amount = item.settlement * item.price;
item.notAmount = item.amount * (100 - 13) / 100;
item.rateAmount = item.amount - item.notAmount;
item.rate = '0';
item.rate = '0'; */
purchaseIdArr.push(item.purchaseId);
if(item.purchaseStatus != '99' || item.isExamine != '1'){
statusFlag = false;
@ -635,13 +635,11 @@
})
return
}
const ids = this.multipleSelection.join()
request({
url: `/api/poundlist/Poundlist/createsale/${ids}`,
method: 'post'
}).then(res => {
var list = []
for (let i = 0; i < res.data.length; i++) {
// res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0,
@ -713,21 +711,22 @@
})
}).catch(() => {})
},
addOrUpdateHandle(row, isDetail) {
addOrUpdateHandle(row) {
var id = undefined;
if(row.isInvoicing == '1'){
var msg = '开进项票';
this.$message({
type: 'error',
message: '已' + msg +'无法删除',
message: '已' + msg +'无法编辑',
duration: 1500
});
return
}
id = row.id;
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
this.$refs.JNPFForm.init(id, false)
})
},
addOvheicle(id,isDetail){
@ -755,6 +754,7 @@
data: query
}).then(res => {
if (!res.data.url) return
debugger
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false

@ -7,7 +7,7 @@
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<template v-if="!loading">
<el-col :span="8" >
<el-form-item label="单据编号"
<el-form-item label="单据编号11"
prop="documentNo" >
<el-input v-model="dataForm.documentNo"
placeholder="系统自动生成" readonly >
@ -919,7 +919,6 @@
init(list) {
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;
@ -948,7 +947,6 @@
this.dataForm.advanceAmount = advance;
this.dataForm.num = num;
this.dataForm.price = amount;
debugger
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//

@ -82,7 +82,7 @@
<el-col :span="8">
<el-form-item label="税额" prop="rate">
<el-input-number v-model="dataForm.rate" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}'>
</el-input-number>
</el-form-item>
</el-col>
@ -369,6 +369,115 @@
</el-form-item>
</el-col>
</el-tab-pane>
<el-tab-pane label="入库信息">
<el-col :span="24">
<el-form-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.receiptin_item0List" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="vehicleId" width="150" label="车辆">
<template slot-scope="scope">
<popupSelect v-model="scope.row.vehicleId" placeholder="请选择" clearable
:field="'vehicleId'+scope.$index" interfaceId="392933121244325765"
:columnOptions="jg_receiptin_item0vehicleIdcolumnOptions" propsValue="vehicle_id"
relationField="ticketno" :bissId="dataForm.souceno" popupType="dialog" popupWidth="800px"
hasPage :pageSize="20" :disabled="true">
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="materialId" width="200" label="物料">
<template slot-scope="scope">
<popupSelect v-model="scope.row.materialId" placeholder="请选择" clearable
:field="'materialId'+scope.$index" interfaceId="398448695651178885"
:columnOptions="jg_receiptin_item0materialIdcolumnOptions" propsValue="id"
relationField="item_name" popupType="dialog" popupWidth="800px" hasPage :pageSize="20" :disabled="true">
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="reservoirareaId" width="150" label="库区">
<template slot-scope="scope">
<popupSelect v-model="scope.row.reservoirareaId" placeholder="请选择" clearable
:field="'reservoirareaId'+scope.$index" interfaceId="392939299932268421"
:columnOptions="jg_receiptin_item0reservoirareaIdcolumnOptions" propsValue="id"
relationField="areaname" popupType="dialog" popupWidth="800px" :disabled="true">
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="warehouseId" width="150" label="仓库">
<template slot-scope="scope">
<popupSelect v-model="scope.row.warehouseId" placeholder="请选择" clearable
:field="'warehouseId'+scope.$index" interfaceId="398450221434116485"
:columnOptions="jg_receiptin_item0warehouseIdcolumnOptions" propsValue="id"
relationField="name" popupType="dialog" popupWidth="800px" hasPage :pageSize="20" :disabled="true">
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="num" width="140" label="入库重量" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.num" placeholder="请输入" clearable
:disabled="true">
</el-input>
</template>
</el-table-column>
<el-table-column prop="unit" width="140" label="计量单位" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.unit" placeholder="请选择" clearable :disabled="true">
<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="price" width="140" label="单价" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.price" placeholder="请输入" clearable :disabled="true">
</el-input>
</template>
</el-table-column>
<el-table-column prop="rate" width="140" label="税率" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.rate" placeholder="请选择" clearable :disabled="true">
<el-option v-for="(item, index) in rateOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="amount" width="140" label="金额" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.amount" placeholder="请输入" clearable
:disabled="true">
</el-input>
</template>
</el-table-column>
<el-table-column prop="rateamount" width="140" label="税额" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.rateamount" placeholder="请输入" clearable :disabled="true">
</el-input>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="50" align="center">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delreceiptin_item0List(scope.$index)">删除</el-button>
</template>
</el-table-column> -->
</el-table>
<!-- <div class="table-actions" @click="addreceiptin_item0List()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div> -->
</el-form-item>
</el-col>
</el-tab-pane>
<el-tab-pane label="付款信息">
<el-col :span="24">
<el-form-item label-width="0">
@ -660,7 +769,82 @@
"fullName": "归档",
"id": "5"
}],
jg_receiptin_item0vehicleIdcolumnOptions: [{
"label": "车牌号",
"value": "ticketno"
}, {
"label": "物料名称",
"value": "material"
}, {
"label": "库区名称",
"value": "areaName"
}, {
"label": "仓库名称",
"value": "houseName"
}, {
"label": "入库数量",
"value": "settlement"
}, {
"label": "计量单位",
"value": "unitName"
}, {
"label": "单价",
"value": "price"
}, {
"label": "税率",
"value": "rate"
}, {
"label": "金额",
"value": "amount"
}, {
"label": "批次号",
"value": "poundlist_id"
}, {
"label": "磅单类型",
"value": "pount_type"
}, ],
jg_receiptin_item0materialIdcolumnOptions: [{
"label": "物料编码",
"value": "item_code"
}, {
"label": "物料名称",
"value": "item_name"
}, {
"label": "单位",
"value": "primary_unit_of_measure"
}, ],
jg_receiptin_item0reservoirareaIdcolumnOptions: [{
"label": "库区编码",
"value": "areacode"
}, {
"label": "库区名称",
"value": "areaname"
}, {
"label": "最高库存",
"value": "maximum"
}, {
"label": "安全库存",
"value": "safety"
}, {
"label": "最低库存",
"value": "minimum"
}, {
"label": "计量单位",
"value": "unit"
}, {
"label": "仓库名称",
"value": "name"
}, ],
jg_receiptin_item0warehouseIdcolumnOptions: [{
"label": "仓库编码",
"value": "code"
}, {
"label": "仓库名称",
"value": "name"
}, {
"label": "仓库地点",
"value": "location"
}, ],
purchaseorderitem0vehicleIdcolumnOptions: [{
"label": "车牌号",
"value": "ticketno"

@ -229,7 +229,7 @@
</el-table-column>
<el-table-column prop="taxRate" label="税率" width="100">
<template slot-scope="scope">
<el-select v-model="scope.row.taxRate" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-select v-model="scope.row.taxRate" placeholder="请选择" clearable :style='{"width":"100%"}' @change="taxRateChange(scope.row)">
<el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
@ -558,12 +558,36 @@
});
this.dataForm.invoiceQuantity = invoiceQuantity;
},
invoiceAmountChange(row){
invoiceAmountChange(e){
var invoiceAmount = 0;
this.dataForm.invoicesitem0List.forEach((item, index)=>{
invoiceAmount = invoiceAmount + parseFloat(item.invoiceAmount);
});
this.dataForm.invoiceAmount = invoiceAmount;
var taxRateName = 87;
this.taxRateOptions.forEach((model, i) => {
if(e.taxRate == model.id){
taxRateName = 100 - parseInt(model.fullName)
}
})
this.dataForm.invoicesitem0List.forEach((model, i) => {
invoiceAmount = invoiceAmount + parseFloat(model.invoiceAmount);
if(e.invoiceAmount == model.invoiceAmount && e.taxRate == model.taxRate){
model.amountNotTax = model.invoiceAmount * taxRateName / 100;
model.taxAmount = model.invoiceAmount - model.amountNotTax
}
})
this.dataForm.invoiceAmount = invoiceAmount
},
taxRateChange(e){
var taxRateName = 87;
this.taxRateOptions.forEach((model, i) => {
if(e.taxRate == model.id){
taxRateName = 100 - parseInt(model.fullName)
}
})
this.dataForm.invoicesitem0List.forEach((model, i) => {
if(e.invoiceAmount == model.invoiceAmount && e.taxRate == model.taxRate){
model.amountNotTax = model.invoiceAmount * taxRateName / 100;
model.taxAmount = model.invoiceAmount - model.amountNotTax
}
})
},
invoicesitem1Exist() {
let isOk = true;
@ -610,6 +634,16 @@
item.taxAmount = item.amount - item.notAmount;
});
this.dataForm.invoicesitem1List = purchaseorder.purchaseorder_item0List;
let param = {
param : 'yffp'
}
request({
url: '/api/collection/Collection/autoSerialNum',
method: 'get',
data: param
}).then(res => {
this.dataForm.documentNo = res.msg
});
},
//
dataFormSubmit() {
@ -683,18 +717,18 @@
},
addinvoicesitem0List() {
let item = {
materialName: undefined,
invoiceCode: undefined,
invoiceNo: undefined,
invoiceQuantity: undefined,
invoiceAmount: undefined,
taxRate: undefined,
taxAmount: undefined,
amountNotTax: undefined,
invoiceStatus: undefined,
materialName: undefined,
invoiceQuantity: 0,
invoiceAmount: 0,
taxRate: '0',
taxAmount: 0,
amountNotTax: 0,
invoiceStatus: '0',
creatorUserName: undefined,
invoicingDate: undefined,
invoiceAttachment:undefined,
invoicingDate: new Date(),
invoiceAttachment: [],
}
this.dataForm.invoicesitem0List.push(item)
},

@ -67,6 +67,8 @@
</el-button>
<el-button type="text" icon="el-icon-delete" @click="guidangHandle()">
</el-button>
<el-button type="text" icon="el-icon-delete" @click="toSaleHandle()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
@ -125,6 +127,7 @@
<JNPF-Form3 v-if="formVisible3" ref="JNPFForm3" @refresh="refresh3" />
<JNPF-Form4 v-if="formVisible4" ref="JNPFForm4" @refresh="refresh4" />
<JNPF-Form5 v-if="formVisible5" ref="JNPFForm5" @refresh="refresh5" />
<JNPF-Form6 v-if="formVisible6" ref="JNPFForm6" @refresh="refresh6" />
<FlowBox v-if="flowVisible" ref="FlowBox" @close="colseFlow" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
@ -142,6 +145,7 @@
import JNPFForm3 from './receiptinForm'
import JNPFForm4 from './PaymentdocForm'
import JNPFForm5 from './purchasebackForm'
import JNPFForm6 from '../poundlist/salesForm'
import FlowBox from '@/views/workFlow/components/FlowBox'
import ImportForm from './PurchaseorderImportForm'
import ExportBox from './ExportBox'
@ -158,6 +162,7 @@
JNPFForm3,
JNPFForm4,
JNPFForm5,
JNPFForm6,
FlowBox,
ExportBox,
Detail
@ -192,6 +197,7 @@
formVisible3: false,
formVisible4: false,
formVisible5: false,
formVisible6: false,
exportBoxVisible: false,
columnList: [{
prop: 'documentNo',
@ -472,6 +478,46 @@
})
}).catch(() => {})
},
toSaleHandle(){
if (!this.multipleSelectionItem.length || this.multipleSelectionItem.length != 1) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500
})
return
}
console.log('aaaaaaa', this.multipleSelectionItem)
var ids = '';
this.multipleSelectionItem[0].poundlistEntityList.forEach((item, index)=>{
ids = ids + item.id + ',';
});
if(ids.length > 0){
ids = ids.substring(0, ids.length - 1);
}
request({
url: `/api/poundlist/Poundlist/createsale/${ids}`,
method: 'post'
}).then(res => {
var list = []
for (let i = 0; i < res.data.length; i++) {
let _data = res.data[i]
list.push(_data)
}
if (list.length>0) {
this.formVisible6 = true
this.$nextTick(() => {
this.$refs.JNPFForm6.init(list)
})
}else {
this.$message({
message: '未找到符合条件数据',
type: 'error',
duration: 1000
})
}
})
},
guidangHandle(){
if (!this.multipleSelectionItem.length || this.multipleSelectionItem.length != 1) {
this.$message({
@ -743,6 +789,10 @@
this.formVisible5 = false
if (isrRefresh) this.reset()
},
refresh6(isrRefresh) {
this.formVisible6 = false
if (isrRefresh) this.reset()
},
colseFlow(isrRefresh) {
this.flowVisible = false
if (isrRefresh) this.reset()

@ -423,7 +423,6 @@
}
},
init(purchaseorder) {
debugger
this.dataForm.id = '';
this.visible = true;
this.dataForm.purchaseOrderId = purchaseorder.id;
@ -438,6 +437,16 @@
this.dataForm.refundAmount = refundAmount;
this.dataForm.refundNum = refundNum;
this.dataForm.purchaseback_item0List = purchaseorder.purchaseorder_item0List;
let param = {
param : 'cgth'
}
request({
url: '/api/collection/Collection/autoSerialNum',
method: 'get',
data: param
}).then(res => {
this.dataForm.documentNo = res.msg
});
},
//
dataFormSubmit() {

@ -537,9 +537,18 @@
this.excludeFields = excludeFields;
},
popupSelect3(j, k) {
var index = -1;
var that = this;
for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) {
if (j == this.dataForm.receiptin_item0List[i].reservoirareaId) {
this.dataForm.receiptin_item0List[i].warehouseId = k.warehouseId;
index = i;
}
if(index == 0){
this.dataForm.receiptin_item0List.forEach((column, index) => {
column.reservoirareaId = j;
column.warehouseId = that.dataForm.receiptin_item0List[0].warehouseId;
});
}
}
},
@ -580,6 +589,16 @@
item.rateamount = item.amount - item.notAmount;
item.id = '';
});
let param = {
param : 'rukudanhao'
}
request({
url: '/api/collection/Collection/autoSerialNum',
method: 'get',
data: param
}).then(res => {
this.dataForm.documentNo = res.msg
});
/* this.dataForm.businessDate = new Date( );
this.dataForm.amount = purchaseorder.amount;
this.dataForm.quantity = purchaseorder.num;

@ -57,7 +57,7 @@
<el-form-item label="币别" prop="currency">
<el-select v-model="dataForm.currency" placeholder="请选择币别" :disabled="true">
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -537,9 +537,18 @@
this.excludeFields = excludeFields;
},
popupSelect3(j, k) {
var index = -1;
var that = this;
for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) {
if (j == this.dataForm.receiptin_item0List[i].reservoirareaId) {
this.dataForm.receiptin_item0List[i].warehouseId = k.warehouseId;
index = i;
}
if(index == 0){
this.dataForm.receiptin_item0List.forEach((column, index) => {
column.reservoirareaId = j;
column.warehouseId = that.dataForm.receiptin_item0List[0].warehouseId;
});
}
}
},

Loading…
Cancel
Save