采购功能修改

product
17602169347 2 years ago
parent d91ced5fca
commit ac9365a6b4

@ -425,8 +425,8 @@ public class InvoicesController {
//更新采购订单状态 //更新采购订单状态
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(entity.getPurchaseorderId()); PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(entity.getPurchaseorderId());
purchaseorderEntity.setStatus("1");//开票中 purchaseorderEntity.setStatus("1");//开票中
purchaseorderEntity.setInvoiceAmount(entity.getInvoiceAmount()); purchaseorderEntity.setInvoiceAmount(subentity.getInvoiceAmount());
purchaseorderEntity.setInvoiceNum(entity.getInvoiceQuantity()); purchaseorderEntity.setInvoiceNum(subentity.getInvoiceQuantity());
purchaseorderService.updateById(purchaseorderEntity); purchaseorderService.updateById(purchaseorderEntity);
List<Purchaseorder_item0Entity> jg_purchaseorder_item0List = purchaseorderitemService.GetPurchaseorder_item0List(entity.getPurchaseorderId()); List<Purchaseorder_item0Entity> jg_purchaseorder_item0List = purchaseorderitemService.GetPurchaseorder_item0List(entity.getPurchaseorderId());
for (Purchaseorder_item0Entity purchaseorder_item0Entity: jg_purchaseorder_item0List) { for (Purchaseorder_item0Entity purchaseorder_item0Entity: jg_purchaseorder_item0List) {

@ -206,14 +206,21 @@ public class PaymentController {
UserInfo userInfo=userProvider.get(); UserInfo userInfo=userProvider.get();
paymentCrForm.setDocumentno(generaterSwapUtil.getBillNumber("payment", false)); paymentCrForm.setDocumentno(generaterSwapUtil.getBillNumber("payment", false));
PaymentEntity entity = JsonUtil.getJsonToBean(paymentCrForm, PaymentEntity.class); PaymentEntity entity = JsonUtil.getJsonToBean(paymentCrForm, PaymentEntity.class);
entity.setId(mainId); entity.setId(mainId);
paymentService.save(entity); paymentService.save(entity);
List<Payment_item0Entity> Payment_item0List = JsonUtil.getJsonToList(paymentCrForm.getPayment_item0List(),Payment_item0Entity.class); QueryWrapper<PaymentdocEntity> paymentdocEntityWrapper = new QueryWrapper<>();
for(Payment_item0Entity entitys : Payment_item0List){ paymentdocEntityWrapper.lambda().eq(PaymentdocEntity::getDocumentNo, entity.getPaymentno());
entitys.setId(RandomUtil.uuId()); List<PaymentdocEntity> list = paymentdocService.list(paymentdocEntityWrapper);
entitys.setPaymentId(entity.getId()); for (PaymentdocEntity paymentdocEntity: list) {
payment_item0Service.save(entitys); paymentdocEntity.setDocStatus("3");//已付款
} paymentdocService.updateById(paymentdocEntity);
}
List<Payment_item0Entity> Payment_item0List = JsonUtil.getJsonToList(paymentCrForm.getPayment_item0List(),Payment_item0Entity.class);
for(Payment_item0Entity entitys : Payment_item0List){
entitys.setId(RandomUtil.uuId());
entitys.setPaymentId(entity.getId());
payment_item0Service.save(entitys);
}

@ -117,25 +117,26 @@ public class PoundlistController {
@PostMapping("/getList") @PostMapping("/getList")
public ActionResult list(@RequestBody PoundlistPagination poundlistPagination)throws IOException{ public ActionResult list(@RequestBody PoundlistPagination poundlistPagination)throws IOException{
List<PoundlistEntity> list= poundlistService.getList(poundlistPagination); List<PoundlistEntity> list= poundlistService.getList(poundlistPagination);
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
//处理id字段转名称若无需转或者为空可删除 //处理id字段转名称若无需转或者为空可删除
for(PoundlistEntity entity:list){ for(PoundlistEntity entity:list){
entity.setPoundPictures(generaterSwapUtil.getFileNameInJson(entity.getPoundPictures())); entity.setPoundPictures(generaterSwapUtil.getFileNameInJson(entity.getPoundPictures()));
Map<String,Object> materialIdMap = new HashMap<>(); Map<String,Object> materialIdMap = new HashMap<>();
entity.setMaterialId(generaterSwapUtil.getPopupSelectValue("381037852907038533","id","item_name",entity.getMaterialId(),materialIdMap)); entity.setMaterialName(generaterSwapUtil.getPopupSelectValue("381037852907038533","id","item_name",entity.getMaterialId(),materialIdMap));
Map<String,Object> customerIdMap = new HashMap<>(); Map<String,Object> customerIdMap = new HashMap<>();
entity.setCustomerId(generaterSwapUtil.getPopupSelectValue("395936123471343749","id","supplier_nm",entity.getCustomerId(),customerIdMap)); entity.setCustomerName(generaterSwapUtil.getPopupSelectValue("395936123471343749","id","supplier_nm",entity.getCustomerId(),customerIdMap));
Map<String,Object> salesIdMap = new HashMap<>(); Map<String,Object> salesIdMap = new HashMap<>();
entity.setSalesId(generaterSwapUtil.getPopupSelectValue("381038993740949317","id","contract_name",entity.getSalesId(),salesIdMap)); entity.setSalesName(generaterSwapUtil.getPopupSelectValue("381038993740949317","id","contract_name",entity.getSalesId(),salesIdMap));
Map<String,Object> vehicleIdMap = new HashMap<>(); Map<String,Object> vehicleIdMap = new HashMap<>();
entity.setVehicleId(generaterSwapUtil.getPopupSelectValue("381432451370615173","id","ticketno",entity.getVehicleId(),vehicleIdMap)); entity.setVehicleName(generaterSwapUtil.getPopupSelectValue("381432451370615173","id","ticketno",entity.getVehicleId(),vehicleIdMap));
entity.setVehiclePictures(generaterSwapUtil.getFileNameInJson(entity.getVehiclePictures())); entity.setVehiclePictures(generaterSwapUtil.getFileNameInJson(entity.getVehiclePictures()));
Map<String,Object> businessIdMap = new HashMap<>(); Map<String,Object> businessIdMap = new HashMap<>();
entity.setBusinessId(generaterSwapUtil.getPopupSelectValue("ebcc44be142e43b795c0d769abd6d25a","F_Id","F_RealName",entity.getBusinessId(),businessIdMap)); entity.setBusinessName(generaterSwapUtil.getPopupSelectValue("ebcc44be142e43b795c0d769abd6d25a","F_Id","F_RealName",entity.getBusinessId(),businessIdMap));
Map<String,Object> naturalIdMap = new HashMap<>(); Map<String,Object> naturalIdMap = new HashMap<>();
entity.setNaturalId(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",entity.getNaturalId(),naturalIdMap)); entity.setNaturalName(generaterSwapUtil.getPopupSelectValue("395933800510599301","id","name",entity.getNaturalId(),naturalIdMap));
Map<String,Object> purchaseIdMap = new HashMap<>(); Map<String,Object> purchaseIdMap = new HashMap<>();
entity.setPurchaseId(generaterSwapUtil.getPopupSelectValue("397408984857931205","id","contract_name",entity.getPurchaseId(),purchaseIdMap)); entity.setPurchaseName(generaterSwapUtil.getPopupSelectValue("397408984857931205","id","contract_name",entity.getPurchaseId(),purchaseIdMap));
} }
List<PoundlistListVO> listVO=JsonUtil.getJsonToList(list,PoundlistListVO.class); List<PoundlistListVO> listVO=JsonUtil.getJsonToList(list,PoundlistListVO.class);
for(PoundlistListVO poundlistVO:listVO){ for(PoundlistListVO poundlistVO:listVO){
} }

@ -186,4 +186,24 @@ public class PoundlistEntity {
@TableField("IS_EXPENSE") @TableField("IS_EXPENSE")
private String isExpense; private String isExpense;
@TableField(exist = false)
private String materialName;
@TableField(exist = false)
private String customerName;
@TableField(exist = false)
private String salesName;
@TableField(exist = false)
private String vehicleName;
@TableField(exist = false)
private String businessName;
@TableField(exist = false)
private String naturalName;
@TableField(exist = false)
private String purchaseName;
} }

@ -1,8 +1,11 @@
package jnpf.poundlist.mapper; package jnpf.poundlist.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.poundlist.entity.PoundlistEntity; import jnpf.poundlist.entity.PoundlistEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
/** /**
* *
@ -14,4 +17,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface PoundlistMapper extends BaseMapper<PoundlistEntity> { public interface PoundlistMapper extends BaseMapper<PoundlistEntity> {
IPage<PoundlistEntity> queryByKeyword(@Param("page") Page<PoundlistEntity> page, @Param("keyword") String keyword);
} }

@ -15,7 +15,7 @@ import java.math.BigDecimal;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-21 * @ 2023-01-05
*/ */
@Data @Data
public class PoundlistListVO{ public class PoundlistListVO{
@ -24,45 +24,57 @@ public class PoundlistListVO{
private String id; private String id;
/** 磅单上传 **/ /** 物料编码 **/
@JsonProperty("poundPictures") @JsonProperty("materialCode")
private String poundPictures; private String materialCode;
/** 物料名称 **/ /** 物料名称 **/
@JsonProperty("materialId") @JsonProperty("materialName")
private String materialId; private String materialName;
/** 销售合同 **/
@JsonProperty("salesName")
private String salesName;
/** 客户名称 **/ /** 客户名称 **/
@JsonProperty("customerId") @JsonProperty("customerName")
private String customerId; private String customerName;
/** 销售合同 **/ /** 是否垫资 **/
@JsonProperty("salesId") @JsonProperty("advance")
private String salesId; private String advance;
/** 车牌号 **/ /** 销售价格 **/
@JsonProperty("vehicleId") @JsonProperty("salesPrice")
private String vehicleId; private Integer salesPrice;
/** 运输方式 **/
@JsonProperty("transportType")
private String transportType;
/** 车辆图片 **/
@JsonProperty("vehiclePictures")
private String vehiclePictures;
/** 运费 **/
@JsonProperty("departmentId")
private Integer departmentId;
/** 磅单日期 **/ /** 车号 **/
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") @JsonProperty("licenseNo")
@JsonProperty("poundDate") private String licenseNo;
private Date poundDate;
/** 业务员名称 **/
@JsonProperty("businessName")
private String businessName;
/** 磅单号 **/ /** 磅单图片 **/
@JsonProperty("poundlistNo") @JsonProperty("poundPictures")
private String poundlistNo; private String poundPictures;
/** 皮重 **/ /** 皮重 **/
@ -81,47 +93,61 @@ public class PoundlistListVO{
@JsonProperty("netWeight") @JsonProperty("netWeight")
private Integer netWeight; private Integer netWeight;
/** 单位 **/ /** 备注 **/
@JsonProperty("unit") @JsonProperty("remark")
private String unit; private String remark;
/** 运输类型 **/ /** 司机名称 **/
@JsonProperty("transportType") @JsonProperty("driverName")
private String transportType; private String driverName;
/** 是否垫资 **/ /** 车辆图片 **/
@JsonProperty("advance") @JsonProperty("vehiclePictures")
private String advance; private String vehiclePictures;
/** 运费 **/ /** 制单人 **/
@JsonProperty("transportPrice") @JsonProperty("creatorusername")
private Integer transportPrice; private String creatorusername;
/** 销售价格 **/ /** 供应商ID **/
@JsonProperty("salesPrice") @JsonProperty("supplierId")
private Integer salesPrice; private String supplierId;
/** 业务员 **/ /** 供应商名称 **/
@JsonProperty("businessId") @JsonProperty("supplierName")
private String businessId; private String supplierName;
/** 车牌号 **/
@JsonProperty("vehicleId")
private String vehicleId;
/** 物料 **/
@JsonProperty("materialId")
private String materialId;
/** 自然人 **/ /** 磅单类型 **/
@JsonProperty("naturalId") @JsonProperty("poundType")
private String naturalId; private String poundType;
/** 采购合同 **/ /** 采购合同 **/
@JsonProperty("purchaseName")
private String purchaseName;
@JsonProperty("isExamine")
private String isExamine;
@JsonProperty("purchaseStatus")
private String purchaseStatus;
@JsonProperty("purchaseId") @JsonProperty("purchaseId")
private String purchaseId; private String purchaseId;
/** 单位 **/
/** 供应商名称 **/ @JsonProperty("unit")
@JsonProperty("supplierName") private String unit;
private String supplierName;
/** 结算重量 **/ /** 结算重量 **/
@ -135,32 +161,33 @@ public class PoundlistListVO{
/** 进项票日期 **/ /** 进项票日期 **/
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@JsonProperty("inputDate") @JsonProperty("inputDate")
private Date inputDate; private Date inputDate;
/** 销项票日期 **/ /** 销项票日期 **/
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@JsonProperty("outputDate") @JsonProperty("outputDate")
private Date outputDate; private Date outputDate;
/** 付款日期 **/ /** 付款日期 **/
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@JsonProperty("payDate") @JsonProperty("payDate")
private Date payDate; private Date payDate;
/** 回款日期 **/ /** 回款日期 **/
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@JsonProperty("paymentDate") @JsonProperty("paymentDate")
private Date paymentDate; private Date paymentDate;
/** 备注 **/ /** 磅单日期 **/
@JsonProperty("remark") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private String remark; @JsonProperty("poundDate")
private Date poundDate;
@JsonProperty("isInvoicing") @JsonProperty("isInvoicing")
private String isInvoicing; private String isInvoicing;
@ -172,4 +199,10 @@ public class PoundlistListVO{
/** 税率 **/ /** 税率 **/
@JsonProperty("rate") @JsonProperty("rate")
private String rate; private String rate;
@JsonProperty("vehicleName")
private String vehicleName;
@JsonProperty("naturalName")
private String naturalName;
} }

@ -18,10 +18,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import jnpf.vehicle.entity.VehicleEntity;
import jnpf.vehicle.service.VehicleService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -49,8 +47,10 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
@Autowired @Autowired
private AuthorizeService authorizeService; private AuthorizeService authorizeService;
@Autowired
private VehicleService vehicleService;
@Autowired
private PoundlistMapper poundlistMapper;
@ -62,7 +62,6 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
int poundlistNum =0; int poundlistNum =0;
QueryWrapper<PoundlistEntity> poundlistQueryWrapper=new QueryWrapper<>(); QueryWrapper<PoundlistEntity> poundlistQueryWrapper=new QueryWrapper<>();
poundlistQueryWrapper.lambda().eq(PoundlistEntity::getIsExamine,"1"); poundlistQueryWrapper.lambda().eq(PoundlistEntity::getIsExamine,"1");
// poundlistQueryWrapper.lambda().eq(PoundlistEntity::getSalesStatus,"99");
boolean pcPermission = false; boolean pcPermission = false;
boolean appPermission = false; boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
@ -77,19 +76,11 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
} }
} }
} }
if(!isPc && appPermission){ /*if(!isPc){
if (!userProvider.get().getIsAdministrator()){ Page<PoundlistEntity> page=new Page<>(poundlistPagination.getCurrentPage(), poundlistPagination.getPageSize());
Object poundlistObj=authorizeService.getCondition(new AuthorizeConditionModel(poundlistQueryWrapper,poundlistPagination.getMenuId(),"poundlist")); IPage<PoundlistEntity> poundlistEntityIPage = poundlistMapper.queryByKeyword(page, poundlistPagination.getKeyword());
if (ObjectUtil.isEmpty(poundlistObj)){ return poundlistPagination.setData(poundlistEntityIPage.getRecords(),poundlistEntityIPage.getTotal());
return new ArrayList<>(); }*/
} else {
poundlistQueryWrapper = (QueryWrapper<PoundlistEntity>)poundlistObj;
poundlistNum++;
}
}
}
if(StringUtil.isNotEmpty(poundlistPagination.getPoundDate())){ if(StringUtil.isNotEmpty(poundlistPagination.getPoundDate())){
poundlistNum++; poundlistNum++;
List<String> PoundDateList = poundlistPagination.getPoundDate(); List<String> PoundDateList = poundlistPagination.getPoundDate();
@ -105,7 +96,6 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
poundlistNum++; poundlistNum++;
poundlistQueryWrapper.lambda().like(PoundlistEntity::getPoundlistNo,poundlistPagination.getPoundlistNo()); poundlistQueryWrapper.lambda().like(PoundlistEntity::getPoundlistNo,poundlistPagination.getPoundlistNo());
} }
if(AllIdList.size()>0){ if(AllIdList.size()>0){
poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, AllIdList); poundlistQueryWrapper.lambda().in(PoundlistEntity::getId, AllIdList);
} }

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.PoundlistMapper">
</mapper>

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

@ -1,298 +1,642 @@
<template> <template>
<el-dialog title="详情" <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:close-on-click-modal="false" append-to-body :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll <el-row :gutter="15" class="">
width="800px"> <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<el-row :gutter="15" class=""> <template v-if="!loading">
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" > <el-col :span="8">
<template v-if="!loading"> <el-form-item label="单据编号" prop="documentNo">
<el-col :span="8" > <el-input v-model="dataForm.documentNo" placeholder="请输入单据编号" clearable :style='{"width":"100%"}' readonly>
<el-form-item label="单据编号"
prop="documentNo" > </el-input>
<p>{{dataForm.documentNo}}</p> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="8">
<el-col :span="8" > <el-form-item label="业务日期" prop="businessDate">
<el-form-item label="业务日期" <el-date-picker v-model="dataForm.businessDate" placeholder="请选择业务日期" clearable :style='{"width":"100%"}'
prop="businessDate" > type="date" format="yyyy-MM-dd" value-format="timestamp">
<p>{{jnpf.dateFormat(dataForm.businessDate)}}</p>
</el-form-item> </el-date-picker>
</el-col> </el-form-item>
<el-col :span="8" > </el-col>
<el-form-item label="金额" <el-col :span="8">
prop="amount" > <el-form-item label="金额" prop="amount">
<p>{{dataForm.amount}}</p> <el-input-number v-model="dataForm.amount" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' readonly>
</el-form-item>
</el-col> </el-input-number>
<el-col :span="8" > </el-form-item>
<el-form-item label="数量" </el-col>
prop="quantity" > <el-col :span="8">
<p>{{dataForm.quantity}}</p> <el-form-item label="数量" prop="quantity">
</el-form-item> <el-input-number v-model="dataForm.quantity" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' readonly>
</el-col>
<el-col :span="8" > </el-input-number>
<el-form-item label="发票类型" </el-form-item>
prop="invoiceType" > </el-col>
<p>{{ dataForm.invoiceType | dynamicText(invoiceTypeOptions) }} </p> <el-col :span="8">
</el-form-item> <el-form-item label="发票类型" prop="invoiceType">
</el-col> <el-select v-model="dataForm.invoiceType" placeholder="请选择" :style='{"width":"100%"}'>
<el-col :span="8" > <el-option v-for="(item, index) in invoiceTypeOptions" :key="index" :label="item.fullName"
<el-form-item label="币别 " :value="item.id" :disabled="item.disabled"></el-option>
prop="currency" >
<p>{{ dataForm.currency | dynamicText(currencyOptions) }} </p> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="备注" <el-form-item label="币别 " prop="currency">
prop="remark" > <el-select v-model="dataForm.currency" placeholder="请选择" clearable :style='{"width":"100%"}'>
<p>{{dataForm.remark}}</p> <el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id"
</el-form-item> :disabled="item.disabled"></el-option>
</el-col>
<el-col :span="8" > </el-select>
<el-form-item label="单据状态" </el-form-item>
prop="status" > </el-col>
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p> <el-col :span="8">
</el-form-item> <el-form-item label="备注" prop="remark">
</el-col> <el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="8" >
<el-form-item label="发票金额" </el-input>
prop="invoiceAmount" > </el-form-item>
<p>{{dataForm.invoiceAmount}}</p> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="单据状态" prop="status">
<el-col :span="8" > <el-select v-model="dataForm.status" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-form-item label="发票数量" <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
prop="invoiceQuantity" > :disabled="item.disabled"></el-option>
<p>{{dataForm.invoiceQuantity}}</p>
</el-form-item> </el-select>
</el-col> </el-form-item>
<el-col :span="8" > </el-col>
<el-form-item label="采购订单号" <el-col :span="8">
prop="purchaseorderId" > <el-form-item label="发票金额" prop="invoiceAmount">
<p>{{dataForm.purchaseorderId}}</p> <el-input-number v-model="dataForm.invoiceAmount" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' readonly>
</el-form-item>
</el-col> </el-input-number>
<el-col :span="8" > </el-form-item>
<el-form-item label="合同名称" </el-col>
prop="contractId" > <el-col :span="8">
<p>{{dataForm.contractId}}</p> <el-form-item label="发票数量" prop="invoiceQuantity">
</el-form-item> <el-input-number v-model="dataForm.invoiceQuantity" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' readonly>
</el-col>
<el-col :span="8" > </el-input-number>
<el-form-item label="供应商" </el-form-item>
prop="supplierId" > </el-col>
<p>{{dataForm.supplierId}}</p> <el-col :span="8">
</el-form-item> <el-form-item label="采购订单号" prop="purchaseorderId">
</el-col> <popupSelect v-model="dataForm.purchaseorderId" placeholder="请选择" clearable field="purchaseorderId"
<el-col :span="24"> interfaceId="389673535976550149" :columnOptions="purchaseorderIdcolumnOptions" propsValue="id"
<el-tabs v-model="activebzsrnx" tab-position="top" class="mb-20"> relationField="document_no" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
<el-tab-pane label="应付明细"> :pageSize="20">
<el-col :span="24" >
<el-form-item label-width="0"> </popupSelect>
<div class="JNPF-common-title"> </el-form-item>
<h2>设计子表</h2> </el-col>
</div> <el-col :span="8">
<el-table :data="dataForm.invoicesitem1List" size='mini' > <el-form-item label="合同" prop="contractId">
<el-table-column type="index" width="50" label="序号" align="center" /> <popupSelect v-model="dataForm.contractId" placeholder="请选择" clearable field="contractId"
<el-table-column prop="materialId" label="物料"> interfaceId="389673903103979269" :columnOptions="contractIdcolumnOptions" propsValue="id"
<template slot-scope="scope"> relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
<p>{{scope.row.materialId}}</p> :pageSize="20">
</template>
</el-table-column> </popupSelect>
<el-table-column prop="quantity" label="数量"> </el-form-item>
<template slot-scope="scope"> </el-col>
<p>{{scope.row.quantity}}</p> <el-col :span="8">
</template> <el-form-item label="供应商" prop="supplierId">
</el-table-column> <popupSelect v-model="dataForm.supplierId" placeholder="请选择" clearable field="supplierId"
<el-table-column prop="unitPrice" label="单价"> interfaceId="389674191453990661" :columnOptions="supplierIdcolumnOptions" propsValue="id"
<template slot-scope="scope"> relationField="supplier_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
<p>{{scope.row.unitPrice}}</p> :pageSize="20">
</template>
</el-table-column> </popupSelect>
<el-table-column prop="amount" label="金额"> </el-form-item>
<template slot-scope="scope"> </el-col>
<p>{{scope.row.amount}}</p> <el-col :span="24">
</template> <el-tabs v-model="activebzsrnx" tab-position="top" class="mb-20">
</el-table-column> <el-tab-pane label="应付明细">
<el-table-column prop="taxRate" label="税率"> <el-col :span="24">
<template slot-scope="scope"> <el-form-item label-width="0">
<p>{{ scope.row.taxRate | dynamicText(taxRateOptions) }}</p> <div class="JNPF-common-title">
</template> </div>
</el-table-column> <el-table :data="dataForm.invoicesitem1List" size='mini'>
<el-table-column prop="taxAmount" label="税额"> <el-table-column type="index" width="50" label="序号" align="center" />
<template slot-scope="scope"> <el-table-column prop="materialId" label="物料">
<p>{{scope.row.taxAmount}}</p> <template slot-scope="scope">
</template> <popupSelect v-model="scope.row.materialId" placeholder="请选择" clearable
</el-table-column> :field="'materialId'+scope.$index" interfaceId="397736371898382533"
<el-table-column prop="amountNotTax" label="不含税金额"> :columnOptions="invoicesitem1materialIdcolumnOptions" propsValue="id"
<template slot-scope="scope"> relationField="item_name" popupType="dialog" popupWidth="800px" hasPage :pageSize="20" :disabled="true">
<p>{{scope.row.amountNotTax}}</p> </popupSelect>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注信息"> <el-table-column prop="quantity" label="结算重量">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.remark}}</p> <el-input v-model="scope.row.quantity" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</template> </el-input>
</el-table-column> </template>
</el-table> </el-table-column>
</el-form-item> <el-table-column prop="unitPrice" label="单价">
</el-col> <template slot-scope="scope">
</el-tab-pane > <el-input v-model="scope.row.unitPrice" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
<el-tab-pane label="发票明细"> </el-input>
<el-col :span="24" > </template>
<el-form-item label-width="0"> </el-table-column>
<div class="JNPF-common-title"> <el-table-column prop="amount" label="金额">
<h2></h2> <template slot-scope="scope">
</div> <el-input v-model="scope.row.amount" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
<el-table :data="dataForm.invoicesitem0List" size='mini' > </el-input>
<el-table-column type="index" width="50" label="序号" align="center" /> </template>
<el-table-column prop="materialName" label="物料名称"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="taxRate" label="税率">
<p>{{scope.row.materialName}}</p> <template slot-scope="scope">
</template> <el-select v-model="scope.row.taxRate" placeholder="请选择 " clearable :style='{"width":"100%"}' :disabled="true">
</el-table-column> <el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName"
<el-table-column prop="invoiceCode" label="发票代码"> :value="item.id" :disabled="item.disabled"></el-option>
<template slot-scope="scope"> </el-select>
<p>{{scope.row.invoiceCode}}</p> </template>
</template> </el-table-column>
</el-table-column> <el-table-column prop="taxAmount" label="税额">
<el-table-column prop="invoiceNo" label="发票号码"> <template slot-scope="scope">
<template slot-scope="scope"> <el-input v-model="scope.row.taxAmount" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
<p>{{scope.row.invoiceNo}}</p> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="invoiceQuantity" label="发票数量"> <el-table-column prop="amountNotTax" label="不含税金额">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.invoiceQuantity}}</p> <el-input v-model="scope.row.amountNotTax" placeholder="请输入" clearable
</template> :style='{"width":"100%"}' :disabled="true">
</el-table-column> </el-input>
<el-table-column prop="invoiceAmount" label="发票金额"> </template>
<template slot-scope="scope"> </el-table-column>
<p>{{scope.row.invoiceAmount}}</p> <el-table-column prop="remark" label="备注信息">
</template> <template slot-scope="scope">
</el-table-column> <el-input v-model="scope.row.remark" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
<el-table-column prop="taxRate" label="税率"> </el-input>
<template slot-scope="scope"> </template>
<p>{{ scope.row.taxRate | dynamicText(taxRateOptions) }}</p> </el-table-column>
</template> <el-table-column label="操作" width="50">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="taxAmount" label="税额"> <el-button size="mini" type="text" class="JNPF-table-delBtn"
<template slot-scope="scope"> @click="delinvoicesitem1List(scope.$index)">删除</el-button>
<p>{{scope.row.taxAmount}}</p> </template>
</template> </el-table-column>
</el-table-column> </el-table>
<el-table-column prop="amountNotTax" label="不含税金额"> <div class="table-actions" @click="addinvoicesitem1List()">
<template slot-scope="scope"> <el-button type="text" icon="el-icon-plus">添加</el-button>
<p>{{scope.row.amountNotTax}}</p> </div>
</template> </el-form-item>
</el-table-column> </el-col>
<el-table-column prop="invoiceStatus" label="发票状态 "> </el-tab-pane>
<template slot-scope="scope"> <el-tab-pane label="发票明细">
<p>{{ scope.row.invoiceStatus | dynamicText(invoiceStatusOptions) }}</p> <el-col :span="24">
</template> <el-form-item label-width="0">
</el-table-column> <div class="JNPF-common-title">
<el-table-column prop="creatorUserName" label="开票人"> <h2></h2>
<template slot-scope="scope"> </div>
<p>{{scope.row.creatorUserName}}</p> <el-table :data="dataForm.invoicesitem0List" size='mini'>
</template> <el-table-column type="index" width="50" label="序号" align="center" />
</el-table-column> <el-table-column prop="materialName" label="物料名称">
<el-table-column prop="invoicingDate" label="开票日期"> <template slot-scope="scope">
<template slot-scope="scope"> <el-input v-model="scope.row.materialName" placeholder="请输入" clearable
<p>{{jnpf.dateFormat(scope.row.invoicingDate)}}</p> :style='{"width":"100%"}'>
</template> </el-input>
</el-table-column> </template>
</el-table> </el-table-column>
</el-form-item> <el-table-column prop="invoiceCode" label="发票代码">
</el-col> <template slot-scope="scope">
</el-tab-pane > <el-input v-model="scope.row.invoiceCode" placeholder="请输入" clearable
</el-tabs> :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="invoiceNo" label="发票号码">
<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="发票数量" width="150" >
<template slot-scope="scope">
<!-- <el-input v-model="scope.row.invoiceQuantity" placeholder="请输入" clearable
:style='{"width":"100%"}' @change="invoiceQuantityChange">
</el-input> -->
<el-input-number v-model="scope.row.invoiceQuantity" placeholder="数字文本" :step="1" :style='{"width":"100%"}' @change="invoiceQuantityChange">
</el-input-number>
</template>
</el-table-column>
<el-table-column prop="invoiceAmount" label="发票金额" width="150" >
<template slot-scope="scope">
<!-- <el-input v-model="scope.row.invoiceAmount" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input> -->
<el-input-number v-model="scope.row.invoiceAmount" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' @change="invoiceAmountChange">
</el-input-number>
</template>
</el-table-column>
<el-table-column prop="taxRate" label="税率">
<template slot-scope="scope">
<el-select v-model="scope.row.taxRate" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="taxAmount" label="税额">
<template slot-scope="scope">
<el-input v-model="scope.row.taxAmount" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="amountNotTax" label="不含税金额">
<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="发票状态 ">
<template slot-scope="scope">
<el-select v-model="scope.row.invoiceStatus" 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="开票人">
<template slot-scope="scope">
<el-input v-model="scope.row.creatorUserName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="invoicingDate" label="开票日期">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.invoicingDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</template>
</el-table-column>
<el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delinvoicesitem0List(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addinvoicesitem0List()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</el-form-item>
</el-col> </el-col>
</template> </el-tab-pane>
</el-form> </el-tabs>
</el-col>
</template>
</el-form>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<!-- <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button> -->
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import PrintBrowse from '@/components/PrintBrowse' import {
import jnpf from '@/utils/jnpf' getDataInterfaceRes
export default { } from '@/api/systemData/dataInterface'
components: {PrintBrowse}, import {
props: [], getDictionaryDataSelector
data() { } from '@/api/systemData/dictionary'
return { export default {
visible: false, components: {},
loading: false, props: [],
printBrowseVisible: false, data() {
printId: '', return {
dataForm: { visible: false,
id :'', loading: false,
documentNo : '', isDetail: false,
businessDate : '', dataForm: {
amount : 0, documentNo: '',
quantity : 0, businessDate: '',
invoiceType : "1", amount: 0,
currency : "", quantity: 0,
remark : '', invoiceType: "1",
status : "0", currency: "",
invoiceAmount : 0, remark: '',
invoiceQuantity : 0, status: "0",
purchaseorderId : "", invoiceAmount: 0,
contractId : "", invoiceQuantity: 0,
supplierId : "", purchaseorderId: "",
invoicesitem1List:[], contractId: "",
invoicesitem0List:[], supplierId: "",
}, invoicesitem1List: [],
activebzsrnx:'1', invoicesitem0List: [],
invoiceTypeOptions:[{"fullName":"普通增值税发票","id":"1"},{"fullName":"专用增值税发票","id":"2"},{"fullName":"增值税电子普通发票","id":"3"},{"fullName":"增值税电子发票","id":"4"}],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
taxRateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
taxRateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
invoiceStatusOptions:[{"fullName":"正常","id":"0"},{"fullName":"红冲","id":"1"},{"fullName":"作废","id":"2"}],
}
},
computed: {},
watch: {},
created() {
}, },
mounted() {}, activebzsrnx: '0',
methods: { rules: {},
dataInfo(dataAll){ invoiceTypeOptions: [{
let _dataAll =dataAll "fullName": "普通增值税发票",
for(let i=0;i<_dataAll.invoicesitem1List.length;i++){ "id": "1"
var _list = _dataAll.invoicesitem1List[i]; }, {
} "fullName": "专用增值税发票",
for(let i=0;i<_dataAll.invoicesitem0List.length;i++){ "id": "2"
var _list = _dataAll.invoicesitem0List[i]; }, {
_list.invoicingDate = _list.invoicingDate ? jnpf.dateFormat(_list.invoicingDate) : '' "fullName": "增值税电子普通发票",
} "id": "3"
this.dataForm = _dataAll }, {
}, "fullName": "增值税电子发票",
"id": "4"
init(id) { }],
this.dataForm.id = id || 0; currencyOptions: [{
this.visible = true; "fullName": "人民币",
this.$nextTick(() => { "id": "0"
if(this.dataForm.id){ }, {
this.loading = true "fullName": "美元",
request({ "id": "1"
url: '/api/invoices/Invoices/detail/'+this.dataForm.id, }, {
method: 'get' "fullName": "英镑",
}).then(res => { "id": "2"
this.dataInfo(res.data) }],
this.loading = false statusOptions: [{
}) "fullName": "已保存",
} "id": "0"
}, {
}) "fullName": "审批中",
}, "id": "1"
}, }, {
} "fullName": "已审批",
"id": "2"
}],
purchaseorderIdcolumnOptions: [{
"label": "采购订单号",
"value": "document_no"
}, {
"label": "合同",
"value": "contractName"
}, {
"label": "供应商",
"value": "supplier"
}, {
"label": "金额",
"value": "amount"
}, {
"label": "数量",
"value": "num"
}, ],
contractIdcolumnOptions: [{
"label": "合同编码",
"value": "contract_code"
}, {
"label": "合同名称",
"value": "contract_name"
}, ],
supplierIdcolumnOptions: [{
"label": "供应商编码",
"value": "supplier_code"
}, {
"label": "供应商名称",
"value": "supplier_name"
}, {
"label": "供应商地点",
"value": "supplier_site_code"
}, ],
invoicesitem1materialIdcolumnOptions: [{
"label": "物料编码",
"value": "item_code"
}, {
"label": "物料名称",
"value": "item_name"
}, {
"label": "单位",
"value": "primary_unit_of_measure"
}, {
"label": "可采购",
"value": "purchase_flag_name"
}, {
"label": "可销售",
"value": "sales_flag_name"
}, ],
taxRateOptions: [{
"fullName": "13",
"id": "0"
}, {
"fullName": "9",
"id": "1"
}, {
"fullName": "6",
"id": "2"
}, {
"fullName": "5",
"id": "3"
}, {
"fullName": "3",
"id": "4"
}, {
"fullName": "0",
"id": "5"
}],
taxRateOptions: [{
"fullName": "13",
"id": "0"
}, {
"fullName": "9",
"id": "1"
}, {
"fullName": "6",
"id": "2"
}, {
"fullName": "5",
"id": "3"
}, {
"fullName": "3",
"id": "4"
}, {
"fullName": "0",
"id": "5"
}],
invoiceStatusOptions: [{
"fullName": "正常",
"id": "0"
}, {
"fullName": "红冲",
"id": "1"
}, {
"fullName": "作废",
"id": "2"
}],
}
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
invoiceQuantityChange(e){
var invoiceQuantity = 0;
this.dataForm.invoicesitem0List.forEach((item, index)=>{
invoiceQuantity = invoiceQuantity + parseFloat(item.invoiceQuantity);
});
this.dataForm.invoiceQuantity = invoiceQuantity;
},
invoiceAmountChange(e){
var invoiceAmount = 0
this.dataForm.invoicesitem0List.forEach((item, index)=>{
invoiceAmount = invoiceAmount + parseFloat(item.invoiceAmount);
});
this.dataForm.invoiceAmount = invoiceAmount;
},
invoicesitem1Exist() {
let isOk = true;
for (let i = 0; i < this.dataForm.invoicesitem1List.length; i++) {
const e = this.dataForm.invoicesitem1List[i];
}
return isOk;
},
invoicesitem0Exist() {
let isOk = true;
for (let i = 0; i < this.dataForm.invoicesitem0List.length; i++) {
const e = this.dataForm.invoicesitem0List[i];
}
return isOk;
},
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
} else if (data[key] instanceof Object) {
this.clearData(data[key]);
} else {
data[key] = "";
}
}
},
init(id, isDetail) {
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/invoices/Invoices/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
} else {
this.clearData(this.dataForm)
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
dataFormSubmit() {
this.$refs['elForm'].validate((valid) => {
if (valid) {
if (!this.invoicesitem1Exist()) return
if (!this.invoicesitem0Exist()) return
this.request()
}
})
},
request() {
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/invoices/Invoices',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
} else {
request({
url: '/api/invoices/Invoices/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}
},
addinvoicesitem1List() {
let item = {
materialId: undefined,
quantity: undefined,
unitPrice: undefined,
amount: undefined,
taxRate: undefined,
taxAmount: undefined,
amountNotTax: undefined,
remark: undefined,
}
this.dataForm.invoicesitem1List.push(item)
},
delinvoicesitem1List(index) {
this.dataForm.invoicesitem1List.splice(index, 1);
},
addinvoicesitem0List() {
let item = {
materialName: undefined,
invoiceCode: undefined,
invoiceNo: undefined,
invoiceQuantity: undefined,
invoiceAmount: undefined,
taxRate: undefined,
taxAmount: undefined,
amountNotTax: undefined,
invoiceStatus: undefined,
creatorUserName: undefined,
invoicingDate: undefined,
}
this.dataForm.invoicesitem0List.push(item)
},
delinvoicesitem0List(index) {
this.dataForm.invoicesitem0List.splice(index, 1);
},
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
for (let i = 0; i < _data.invoicesitem1List.length; i++) {
var _list = _data.invoicesitem1List[i];
}
for (let i = 0; i < _data.invoicesitem0List.length; i++) {
var _list = _data.invoicesitem0List[i];
}
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
for (let i = 0; i < _dataAll.invoicesitem1List.length; i++) {
var _list = _dataAll.invoicesitem1List[i];
}
for (let i = 0; i < _dataAll.invoicesitem0List.length; i++) {
var _list = _dataAll.invoicesitem0List[i];
}
this.dataForm = _dataAll
},
},
}
</script> </script>

@ -155,12 +155,12 @@
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="taxAmount" label="税额"> <el-table-column prop="taxAmount" label="税额">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.taxAmount" placeholder="请输入" clearable :style='{"width":"100%"}'> <el-input v-model="scope.row.taxAmount" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</el-input> </el-input>
</template> </template>
</el-table-column> --> </el-table-column>
<el-table-column prop="amountNotTax" label="不含税金额"> <el-table-column prop="amountNotTax" label="不含税金额">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.amountNotTax" placeholder="请输入" clearable <el-input v-model="scope.row.amountNotTax" placeholder="请输入" clearable

@ -1,254 +1,499 @@
<template> <template>
<el-dialog title="详情" <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:close-on-click-modal="false" append-to-body :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll <el-row :gutter="15" class="">
width="1000px"> <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<el-row :gutter="15" class=""> <template v-if="!loading">
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" > <el-col :span="8">
<template v-if="!loading"> <el-form-item label="单据编号" prop="documentno">
<el-col :span="8" > <el-input v-model="dataForm.documentno" placeholder="系统自动生成" readonly>
<el-form-item label="单据编号"
prop="documentno" > </el-input>
<p>{{dataForm.documentno}}</p> </el-form-item>
</el-form-item> </el-col>
</el-col> <!-- <el-col :span="8">
<el-col :span="8" > <el-form-item label="供应商" required prop="suppliername">
<el-form-item label="供应商" <el-input v-model="dataForm.suppliername" placeholder="请输入付款账户" clearable :style='{"width":"100%"}'>
prop="suppliername" >
<p>{{dataForm.suppliername}}</p> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="8" > <el-col :span="8">
<el-form-item label="付款类型" <el-form-item label="付款类型" prop="paymenttype">
prop="paymenttype" > <el-select v-model="dataForm.paymenttype" placeholder="请选择付款类型" clearable :style='{"width":"100%"}'>
<p>{{ dataForm.paymenttype | dynamicText(paymenttypeOptions) }} </p> <el-option v-for="(item, index) in paymenttypeOptions" :key="index" :label="item.fullName"
</el-form-item> :value="item.id" :disabled="item.disabled"></el-option>
</el-col>
<el-col :span="8" > </el-select>
<el-form-item label="付款账户" </el-form-item>
prop="paymentaccount" > </el-col>
<p>{{dataForm.paymentaccount}}</p> <el-col :span="8">
</el-form-item> <el-form-item label="付款账户" prop="paymentaccount">
</el-col> <el-input v-model="dataForm.paymentaccount" placeholder="请输入付款账户" clearable :style='{"width":"100%"}'>
<el-col :span="8" >
<el-form-item label="付款银行" </el-input>
prop="paymentbank" > </el-form-item>
<p>{{dataForm.paymentbank}}</p> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="付款银行" prop="paymentbank">
<el-col :span="8" > <el-input v-model="dataForm.paymentbank" placeholder="请输入付款银行" clearable :style='{"width":"100%"}'>
<el-form-item label="付款金额"
prop="paymentamount" > </el-input>
<p>{{dataForm.paymentamount}}</p> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="8">
<el-col :span="8" > <el-form-item label="付款金额" prop="paymentamount">
<el-form-item label="收款账户" <el-input v-model="dataForm.paymentamount" placeholder="请输入付款金额" clearable :style='{"width":"100%"}'>
prop="collectionaccount" >
<p>{{dataForm.collectionaccount}}</p> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="收款银行" <el-form-item label="收款账户" prop="collectionaccount">
prop="collectionbank" > <el-input v-model="dataForm.collectionaccount" placeholder="请输入" clearable :style='{"width":"100%"}'>
<p>{{dataForm.collectionbank}}</p>
</el-form-item> </el-input>
</el-col> </el-form-item>
<el-col :span="8" > </el-col>
<el-form-item label="申请金额" <el-col :span="8">
prop="requestedamount" > <el-form-item label="收款银行" prop="collectionbank">
<p>{{dataForm.requestedamount}}</p> <el-input v-model="dataForm.collectionbank" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-form-item>
</el-col> </el-input>
<el-col :span="8" > </el-form-item>
<el-form-item label="应付日期" </el-col>
prop="duedate" > <el-col :span="8">
<p>{{jnpf.dateFormat(dataForm.duedate)}}</p> <el-form-item label="申请金额" prop="requestedamount">
</el-form-item> <el-input v-model="dataForm.requestedamount" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-col>
<el-col :span="8" > </el-input>
<el-form-item label="币别 " </el-form-item>
prop="currency" > </el-col>
<p>{{ dataForm.currency | dynamicText(currencyOptions) }} </p> <el-col :span="8">
</el-form-item> <el-form-item label="应付日期" prop="duedate">
</el-col> <el-date-picker v-model="dataForm.duedate" placeholder="请选择" clearable :style='{"width":"100%"}'
<el-col :span="8" > type="date" format="yyyy-MM-dd" value-format="timestamp">
<el-form-item label="结算类型"
prop="settlementtype" > </el-date-picker>
<p>{{ dataForm.settlementtype | dynamicText(settlementtypeOptions) }} </p> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="8">
<el-col :span="8" > <el-form-item label="币别 " prop="currency">
<el-form-item label="来源单号" <el-select v-model="dataForm.currency" placeholder="请选择" clearable :style='{"width":"100%"}'>
prop="paymentno" > <el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id"
<p>{{dataForm.paymentno}}</p> :disabled="item.disabled"></el-option>
</el-form-item>
</el-col> </el-select>
<el-col :span="16" > </el-form-item>
<el-form-item label="备注" </el-col>
prop="remark" > <el-col :span="8">
<p>{{dataForm.remark}}</p> <el-form-item label="结算类型" required prop="settlementtype">
</el-form-item> <el-select v-model="dataForm.settlementtype" placeholder="请选择" clearable :style='{"width":"100%"}'>
</el-col> <el-option v-for="(item, index) in settlementtypeOptions" :key="index" :label="item.fullName"
<el-col :span="8" > :value="item.id" :disabled="item.disabled"></el-option>
<el-form-item label="单据状态"
prop="status" > </el-select>
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="8">
<el-col :span="24"> <el-form-item label="来源单号" prop="paymentno">
<el-tabs v-model="activeivpzpd" tab-position="top" class="mb-20"> <el-input v-model="dataForm.paymentno" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-tab-pane label="申请明细">
<el-col :span="24" > </el-input>
<el-form-item label-width="0"> </el-form-item>
<div class="JNPF-common-title"> </el-col>
<h2></h2> <el-col :span="16">
</div> <el-form-item label="备注" prop="remark">
<el-table :data="dataForm.payment_item0List" size='mini' > <el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="amount" label="付款金额"> </el-input>
<template slot-scope="scope"> </el-form-item>
<p>{{scope.row.amount}}</p> </el-col>
</template> <el-col :span="8">
</el-table-column> <el-form-item label="单据状态" prop="status">
<el-table-column prop="creatorUserId" label="申请金额"> <el-select v-model="dataForm.status" placeholder="请选择" clearable :style='{"width":"100%"}'>
<template slot-scope="scope"> <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
<p>{{scope.row.creatorUserId}}</p> :disabled="item.disabled"></el-option>
</template>
</el-table-column> </el-select>
<el-table-column prop="creatorUserName" label="订单金额"> </el-form-item>
<template slot-scope="scope"> </el-col>
<p>{{scope.row.creatorUserName}}</p> <el-col :span="24">
</template> <el-tabs v-model="activeivpzpd" tab-position="top" class="mb-20">
</el-table-column> <el-tab-pane label="申请明细">
<el-table-column prop="lastModifyUserId" label="已付金额"> <el-col :span="24">
<template slot-scope="scope"> <el-form-item label-width="0">
<p>{{scope.row.lastModifyUserId}}</p> <div class="JNPF-common-title">
</template> <h2></h2>
</el-table-column> </div>
<el-table-column prop="lastModifyUserName" label="订单编号"> <el-table :data="dataForm.payment_item0List" size='mini' show-summary :summary-method="getSummaries" >
<template slot-scope="scope"> <el-table-column type="index" width="50" label="序号" align="center" />
<p>{{scope.row.lastModifyUserName}}</p> <el-table-column prop="amount" width="150" label="付款金额" align="center">
</template> <template slot-scope="scope">
</el-table-column> <el-input v-model="scope.row.amount" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-table-column prop="lastModifyTime" label="合同编码"> </el-input>
<template slot-scope="scope"> </template>
<p>{{scope.row.lastModifyTime}}</p> </el-table-column>
</template> <el-table-column prop="requestAmount" width="150" label="申请金额">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="deleteUserId" label="重量"> <el-input v-model="scope.row.requestAmount" placeholder="请输入" clearable
<template slot-scope="scope"> :style='{"width":"100%"}' readonly>
<p>{{scope.row.deleteUserId}}</p> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="deleteTime" label="垫资金额"> <el-table-column prop="allAmount" width="150" label="订单金额">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.deleteTime}}</p> <el-input v-model="scope.row.allAmount" placeholder="请输入" clearable
</template> :style='{"width":"100%"}' readonly>
</el-table-column> </el-input>
<el-table-column prop="orgnizeId" label="税额"> </template>
<template slot-scope="scope"> </el-table-column>
<p>{{scope.row.orgnizeId}}</p> <el-table-column prop="payPrice" width="150" label="已付金额" align="center">
</template> <template slot-scope="scope">
</el-table-column> <el-input v-model="scope.row.payPrice" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
<el-table-column prop="departmentId" label="不含税金额"> </el-input>
<template slot-scope="scope"> </template>
<p>{{scope.row.departmentId}}</p> </el-table-column>
</template> <el-table-column prop="documentNo" width="150" label="订单编号" align="center">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="creatorTime" label="业务日期"> <el-input v-model="scope.row.documentNo" placeholder="请输入" clearable
<template slot-scope="scope"> :style='{"width":"100%"}' readonly>
<p>{{jnpf.dateFormat(scope.row.creatorTime)}}</p> </el-input>
</template> </template>
</el-table-column> </el-table-column>
</el-table> <el-table-column prop="contractNo" width="150" label="合同编码" align="center">
</el-form-item> <template slot-scope="scope">
</el-col> <el-input v-model="scope.row.contractNo" placeholder="请输入" clearable
</el-tab-pane > :style='{"width":"100%"}' readonly>
</el-tabs> </el-input>
</template>
</el-table-column>
<el-table-column prop="num" width="150" label="结算重量" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.num" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</el-input>
</template>
</el-table-column>
<el-table-column prop="advanceAmount" width="150" label="垫资金额" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.advanceAmount" placeholder="请输入" clearable
:style='{"width":"100%"}' readonly>
</el-input>
</template>
</el-table-column>
<el-table-column prop="rate" width="150" label="税额" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.rate" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</el-input>
</template>
</el-table-column>
<el-table-column prop="notAmount" width="150" label="不含税金额" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.notAmount" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</el-input>
</template>
</el-table-column>
<el-table-column prop="creatorTime" label="业务日期" align="center" width="160">
<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" readonly>
</el-date-picker>
</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="delpayment_item0List(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addpayment_item0List()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</el-form-item>
</el-col> </el-col>
</template> </el-tab-pane>
</el-form> </el-tabs>
</el-col>
</template>
</el-form>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<!-- <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button> -->
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import PrintBrowse from '@/components/PrintBrowse' import {
import jnpf from '@/utils/jnpf' getDataInterfaceRes
export default { } from '@/api/systemData/dataInterface'
components: {PrintBrowse}, import {
props: [], getDictionaryDataSelector
data() { } from '@/api/systemData/dictionary'
return { export default {
visible: false, components: {},
loading: false, props: [],
printBrowseVisible: false, data() {
printId: '', return {
dataForm: { excludeFields: [],
id :'', visible: false,
documentno : '', loading: false,
suppliername : '', isDetail: false,
paymenttype : "0", dataForm: {
paymentaccount : '', documentno: '',
paymentbank : '', suppliername: '',
paymentamount : '', paymenttype: "0",
collectionaccount : '', paymentaccount: '',
collectionbank : '', paymentbank: '',
requestedamount : '', paymentamount: '',
duedate : '', collectionaccount: '',
currency : "0", collectionbank: '',
settlementtype : "0", requestedamount: '',
paymentno : '', duedate: '',
remark : '', currency: "0",
status : "0", settlementtype: "0",
payment_item0List:[], paymentno: '',
remark: '',
status: "0",
payment_item0List: [],
},
activeivpzpd: '0',
rules: {
suppliername: [],
paymentaccount: [],
paymentamount: [{
required: true,
message: '请输入付款金额',
trigger: 'blur'
},
{
pattern: /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/,
message: '请输入正确的金额',
trigger: 'blur'
}, },
activeivpzpd:'0', ],
paymenttypeOptions:[{"fullName":"贷款","id":"0"},{"fullName":"运费","id":"1"},{"fullName":"仓储","id":"2"}], },
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}], paymenttypeOptions: [{
settlementtypeOptions:[{"fullName":"现金","id":"0"},{"fullName":"赊购","id":"1"},{"fullName":"网银","id":"2"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}], "fullName": "贷款",
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"},{"fullName":"已付款","id":"3"}], "id": "0"
}, {
"fullName": "运费",
"id": "1"
}, {
"fullName": "仓储",
"id": "2"
}],
currencyOptions: [{
"fullName": "人民币",
"id": "0"
}, {
"fullName": "美元",
"id": "1"
}, {
"fullName": "英镑",
"id": "2"
}],
settlementtypeOptions: [{
"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"
}],
}
},
computed: {},
watch: {
dataForm: {
deep: true,
handler: function() {
this.popupSelect()
} }
}, }
computed: {}, },
watch: {}, created() {},
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 === 5 || index === 6|| 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;
mounted() {}, },
methods: {
dataInfo(dataAll){
let _dataAll =dataAll
for(let i=0;i<_dataAll.payment_item0List.length;i++){
var _list = _dataAll.payment_item0List[i];
_list.creatorTime = _list.creatorTime ? jnpf.dateFormat(_list.creatorTime) : ''
}
this.dataForm = _dataAll
},
init(id) { popupSelect() {
this.dataForm.id = id || 0; let amount = 0
this.visible = true; for (let i = 0; i < this.dataForm.payment_item0List.length; i++) {
this.$nextTick(() => { amount = amount + parseFloat(this.dataForm.payment_item0List[i].amount);
if(this.dataForm.id){ }
this.loading = true parseFloat(this.dataForm.paymentamount = amount)
request({ },
url: '/api/payment/Payment/detail/'+this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
})
}
})
},
},
}
payment_item0Exist() {
let isOk = true;
for (let i = 0; i < this.dataForm.payment_item0List.length; i++) {
const e = this.dataForm.payment_item0List[i];
}
return isOk;
},
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
} else if (data[key] instanceof Object) {
this.clearData(data[key]);
} else {
data[key] = "";
}
}
},
init(id, isDetail) {
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/payment/Payment/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
} else {
this.clearData(this.dataForm)
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
dataFormSubmit() {
this.$refs['elForm'].validate((valid) => {
if (valid) {
if (!this.payment_item0Exist()) return
this.request()
}
})
},
request() {
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/payment/Payment',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
} else {
request({
url: '/api/payment/Payment/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}
},
addpayment_item0List() {
let item = {
amount: undefined,
creatorUserId: undefined,
creatorUserName: undefined,
lastModifyUserId: undefined,
lastModifyUserName: undefined,
lastModifyTime: undefined,
deleteUserId: undefined,
deleteTime: undefined,
orgnizeId: undefined,
departmentId: undefined,
creatorTime: undefined,
}
this.dataForm.payment_item0List.push(item)
},
delpayment_item0List(index) {
this.dataForm.payment_item0List.splice(index, 1);
},
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
for (let i = 0; i < _data.payment_item0List.length; i++) {
var _list = _data.payment_item0List[i];
}
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
for (let i = 0; i < _dataAll.payment_item0List.length; i++) {
var _list = _dataAll.payment_item0List[i];
}
this.dataForm = _dataAll
},
},
}
</script> </script>

@ -29,23 +29,24 @@
<screenfull isContainer /> <screenfull isContainer />
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange'> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false" border>
<el-table-column prop="documentNo" label="单据编号" width="200" align="center" sortable="custom" /> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="documentNo" label="单据编号" fixed="left" width="200" align="center" sortable="custom" />
<!-- <el-table-column prop="purchaseId" label="采购订单" width="200" align="center" sortable="custom" /> <!-- <el-table-column prop="purchaseId" label="采购订单" width="200" align="center" sortable="custom" />
<el-table-column prop="contractId" label="合同" width="150" align="center" sortable="custom" /> <el-table-column prop="contractId" label="合同" width="150" align="center" sortable="custom" />
<el-table-column prop="supplierId" label="供应商" width="200" align="center" sortable="custom" /> --> <el-table-column prop="supplierId" label="供应商" width="200" align="center" sortable="custom" /> -->
<el-table-column label="付款类型" width="150" prop="paymentType" algin="center" sortable="custom"> <el-table-column label="付款类型" width="150" fixed="left" prop="paymentType" align="center" sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.paymentType | dynamicText(paymentTypeOptions) }} {{ scope.row.paymentType | dynamicText(paymentTypeOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="businessDate" label="业务日期" width="150" align="center" sortable="custom" /> <el-table-column prop="businessDate" label="业务日期" width="150" align="center" sortable="custom" />
<el-table-column label="币别" width="150" prop="currency" algin="center" sortable="custom"> <el-table-column label="币别" width="150" prop="currency" align="center" sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }} {{ scope.row.currency | dynamicText(currencyOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="结算类型" width="150" prop="settlementType" algin="center" sortable="custom"> <el-table-column label="结算类型" width="150" prop="settlementType" align="center" sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.settlementType | dynamicText(settlementTypeOptions) }} {{ scope.row.settlementType | dynamicText(settlementTypeOptions) }}
</template> </template>
@ -56,7 +57,7 @@
<el-table-column prop="collectionAccount" label="收款账户" width="150" align="center" sortable="custom" /> <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="colectionBank" label="收款银行" width="150" align="center" sortable="custom" />
<el-table-column prop="dueDate" 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" algin="center" sortable="custom"> <el-table-column label="是否付款" width="150" prop="isPay" align="center" sortable="custom">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.isPay | dynamicText(isPayOptions) }} {{ scope.row.isPay | dynamicText(isPayOptions) }}
</template> </template>
@ -83,7 +84,7 @@
<el-button size="mini" type="text" :disabled="!scope.row.flowState" <el-button size="mini" type="text" :disabled="!scope.row.flowState"
@click="addOrUpdateHandle(scope.row.id,scope.row.flowState)">详情</el-button> @click="addOrUpdateHandle(scope.row.id,scope.row.flowState)">详情</el-button>
<el-button size="mini" type="text" :disabled="!scope.row.flowState" <el-button size="mini" type="text" :disabled="!scope.row.flowState"
@click="fukuanHandle(scope.row.id,scope.row.flowState)">付款</el-button> @click="fukuanHandle(scope.row.id,scope.row.flowState, scope.row.docStatus)">付款</el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
@ -342,17 +343,27 @@
}) })
}).catch(() => {}); }).catch(() => {});
}, },
fukuanHandle(id, flowState){ fukuanHandle(id, flowState, docStatus){
if(flowState == 2){ if(flowState == 2){
this.formVisible = true if(docStatus == 0){
this.$nextTick(() => { this.formVisible = true
request({ this.$nextTick(() => {
url: '/api/paymentdoc/Paymentdoc/' + id, request({
method: 'get' url: '/api/paymentdoc/Paymentdoc/' + id,
}).then(res => { method: 'get'
this.$refs.JNPFForm.init(res.data) }).then(res => {
}) this.$refs.JNPFForm.init(res.data)
}) })
})
}else{
this.$message({
type: 'error',
message: '该订单已付款',
duration: 1000
});
return
}
}else{ }else{
this.$message({ this.$message({
type: 'error', type: 'error',

@ -28,7 +28,7 @@
</el-button> </el-button>
<el-button type="text" icon="el-icon-check" @click="handleBatchCaigou()"> <el-button type="text" icon="el-icon-check" @click="handleBatchCaigou()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-close" @click="createSale()"> <el-button type="text" icon="el-icon-close" @click="handleBatchXiaoshou()">
</el-button> </el-button>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
@ -42,13 +42,12 @@
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false" <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange" border> @selection-change="handleSelectionChange" border>
<el-table-column type="index" width="50" label="序号" fixed="left" align="center" /> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="vehicleId" label="车号" fixed="left" sortable width="120" align="center" /> <el-table-column prop="vehicleName" label="车号" fixed="left" sortable width="120" align="center" />
<el-table-column prop="customerId" label="客户名称" sortable width="150" align="center" /> <el-table-column prop="customerName" label="客户名称" sortable width="150" align="center" />
<el-table-column prop="salesId" label="销售合同" sortable width="150" align="center" /> <el-table-column prop="salesName" label="销售合同" sortable width="150" align="center" />
<el-table-column prop="supplierId" label="供应商名称" sortable width="150" align="center" /> <el-table-column prop="supplierName" label="供应商名称" sortable width="150" align="center" />
<el-table-column prop="purchaseId" label="采购合同" sortable width="150" align="center" /> <el-table-column prop="purchaseName" label="采购合同" sortable width="150" align="center" />
<!-- <el-table-column prop="materialCode" label="物料编码" sortable width="150" align="center" />--> <el-table-column prop="materialName" label="物料名称" sortable width="150" align="center" />
<el-table-column prop="materialId" label="物料名称" sortable width="150" align="center" />
<el-table-column prop="advance" label="是否垫资" sortable width="100" align="center" > <el-table-column prop="advance" label="是否垫资" sortable width="100" align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.advance | dynamicText(advanceOptions) }} {{ scope.row.advance | dynamicText(advanceOptions) }}
@ -119,7 +118,6 @@
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<JNPF-Form2 v-if="formVisible2" ref="JNPFForm2" @refresh="refresh2" /> <JNPF-Form2 v-if="formVisible2" ref="JNPFForm2" @refresh="refresh2" />
<JNPF-Form3 v-if="formVisible3" ref="JNPFForm3" @refresh="refresh3" /> <JNPF-Form3 v-if="formVisible3" ref="JNPFForm3" @refresh="refresh3" />
<JNPF-Form5 v-if="formVisible" ref="JNPFForm5" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" /> <Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div> </div>
@ -133,7 +131,6 @@
import JNPFForm from './Form' import JNPFForm from './Form'
import JNPFForm2 from './PurchaseOrderForm' import JNPFForm2 from './PurchaseOrderForm'
import JNPFForm3 from './PurchaseOrderForm' import JNPFForm3 from './PurchaseOrderForm'
import JNPFForm5 from './salesForm'
import ExportBox from './ExportBox' import ExportBox from './ExportBox'
import { import {
getDataInterfaceRes getDataInterfaceRes
@ -145,7 +142,6 @@
JNPFForm, JNPFForm,
JNPFForm2, JNPFForm2,
JNPFForm3, JNPFForm3,
JNPFForm5,
ExportBox, ExportBox,
Detail Detail
}, },
@ -176,31 +172,31 @@
formVisible3: false, formVisible3: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [{ columnList: [{
prop: 'vehicleId', prop: 'licenseNo',
label: '车号' label: '车号'
}, },
{ {
prop: 'customerId', prop: 'customerName',
label: '客户名称' label: '客户名称'
}, },
{ {
prop: 'salesId', prop: 'salesName',
label: '销售合同' label: '销售合同'
}, },
{ {
prop: 'supplierId', prop: 'supplierName',
label: '供应商名称' label: '供应商名称'
}, },
{ {
prop: 'purchaseId', prop: 'purchaseName',
label: '采购合同' label: '采购合同'
}, },
{ {
prop: 'materialId', prop: 'materialCode',
label: '物料名称' label: '物料编码'
}, },
{ {
prop: 'materialId', prop: 'materialName',
label: '物料名称' label: '物料名称'
}, },
{ {
@ -400,9 +396,11 @@
this.multipleSelectionItem.forEach((item, index)=>{ this.multipleSelectionItem.forEach((item, index)=>{
item.settlement = item.netWeight; item.settlement = item.netWeight;
item.pountType = item.poundType; item.pountType = item.poundType;
item.price = item.purchasePrice
item.amount = item.settlement * item.purchasePrice; item.amount = item.settlement * item.purchasePrice;
item.notAmount = item.amount * (100 - 13) / 100; item.notAmount = item.amount * (100 - 13) / 100;
item.rateAmount = item.amount - item.notAmount; item.rateAmount = item.amount - item.notAmount;
item.rate = '0';
purchaseIdArr.push(item.purchaseId); purchaseIdArr.push(item.purchaseId);
if(item.purchaseStatus != '99' || item.isExamine != '1'){ if(item.purchaseStatus != '99' || item.isExamine != '1'){
statusFlag = false; statusFlag = false;

@ -1,235 +1,508 @@
<template> <template>
<el-dialog title="详情" <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:close-on-click-modal="false" append-to-body :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll <el-row :gutter="15" class="">
width="1000px"> <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
<el-row :gutter="15" class=""> label-position="right">
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" > <template v-if="!loading">
<template v-if="!loading"> <el-col :span="8">
<el-col :span="8" > <el-form-item label="单据编号" prop="documentNo">
<el-form-item label="单据编号" <el-input v-model="dataForm.documentNo" placeholder="请输入" clearable
prop="documentNo" > :style='{"width":"100%"}' :disabled="true">
<p>{{dataForm.documentNo}}</p>
</el-form-item> </el-input>
</el-col> </el-form-item>
<el-col :span="8" > </el-col>
<el-form-item label="采购订单" <el-col :span="8">
prop="purchaseOrderId" > <el-form-item label="采购订单" prop="purchaseOrderId">
<p>{{dataForm.purchaseOrderId}}</p> <popupSelect v-model="dataForm.purchaseOrderId" placeholder="请选择" clearable
</el-form-item> field="purchaseOrderId" interfaceId="383149471917185157"
</el-col> :columnOptions="purchaseOrderIdcolumnOptions" :excludeFields="excludeFields" propsValue="id"
<el-col :span="8" > relationField="document_no" popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="popupSelectChange">
<el-form-item label="币别 "
prop="currency" > </popupSelect>
<p>{{ dataForm.currency | dynamicText(currencyOptions) }} </p> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="8">
<el-col :span="8" > <el-form-item label="币别 " prop="currency">
<el-form-item label="退货金额" <el-select v-model="dataForm.currency" placeholder="请选择" clearable
prop="refundAmount" > :style='{"width":"100%"}'>
<p>{{dataForm.refundAmount}}</p> <el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName"
</el-form-item> :value="item.id" :disabled="item.disabled"></el-option>
</el-col>
<el-col :span="8" >
<el-form-item label="退货数量"
prop="refundNum" >
<p>{{dataForm.refundNum}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="备注"
prop="remark" >
<p>{{dataForm.remark}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="合同名称"
prop="jnpf_jg_purchaseorder_jnpf_contractName" >
<p>{{dataForm.jnpf_jg_purchaseorder_jnpf_contractName}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="供应商名称"
prop="jnpf_jg_purchaseorder_jnpf_supplierName" >
<p>{{dataForm.jnpf_jg_purchaseorder_jnpf_supplierName}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="实退金额"
prop="actualAmount" >
<p>{{dataForm.actualAmount}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="单据状态 "
prop="status" >
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="创建时间"
prop="creatorTime" >
<p>{{dataForm.creatorTime}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="创建人"
prop="creatorUserName" >
<p>{{dataForm.creatorUserName}}</p>
</el-form-item>
</el-col>
<el-col :span="24">
<el-tabs v-model="activeyrmekt" tab-position="top" class="mb-20">
<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.purchaseback_item0List" size='mini' >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="licenseNum" label="车牌号">
<template slot-scope="scope">
<p>{{scope.row.licenseNum}}</p>
</template>
</el-table-column>
<el-table-column prop="materialName" label="物料名称">
<template slot-scope="scope">
<p>{{scope.row.materialName}}</p>
</template>
</el-table-column>
<el-table-column prop="settlement" label="结算重量 ">
<template slot-scope="scope">
<p>{{scope.row.settlement}}</p>
</template>
</el-table-column>
<el-table-column prop="unit" label="计量单位 ">
<template slot-scope="scope">
<p>{{ scope.row.unit | dynamicText(unitOptions) }}</p>
</template>
</el-table-column>
<el-table-column prop="price" label="采购单价">
<template slot-scope="scope">
<p>{{scope.row.price}}</p>
</template>
</el-table-column>
<el-table-column prop="rate" label="税率 ">
<template slot-scope="scope">
<p>{{ scope.row.rate | dynamicText(rateOptions) }}</p>
</template>
</el-table-column>
<el-table-column prop="amount" label="应退金额">
<template slot-scope="scope">
<p>{{scope.row.amount}}</p>
</template>
</el-table-column>
<el-table-column prop="notAmount" label="税额">
<template slot-scope="scope">
<p>{{scope.row.notAmount}}</p>
</template>
</el-table-column>
<el-table-column prop="pountUser" label="业务员">
<template slot-scope="scope">
<p>{{scope.row.pountUser}}</p>
</template>
</el-table-column>
<el-table-column prop="pountType" label="磅单类型 ">
<template slot-scope="scope">
<p>{{ scope.row.pountType | dynamicText(pountTypeOptions) }}</p>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
</el-tab-pane >
</el-tabs>
</el-col>
</template>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
</span>
</el-dialog>
</template>
<script>
import request from '@/utils/request'
import PrintBrowse from '@/components/PrintBrowse'
import jnpf from '@/utils/jnpf'
export default {
components: {PrintBrowse},
props: [],
data() {
return {
visible: false,
loading: false,
printBrowseVisible: false,
printId: '',
dataForm: {
id :'',
documentNo : '',
purchaseOrderId : "",
currency : "0",
refundAmount : '',
refundNum : '',
remark : '',
actualAmount : '',
status : "0",
creatorTime : "",
creatorUserName : "",
purchaseback_item0List:[],
jg_purchaseorder:
{
contractName:'',
supplierName:'',
},
jnpf_jg_purchaseorder_jnpf_contractName:'',
jnpf_jg_purchaseorder_jnpf_supplierName:'',
},
activeyrmekt:'0',
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}], </el-select>
rateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}], </el-form-item>
pountTypeOptions:[{"fullName":"贸易","id":"0"},{"fullName":"其他","id":"1"}], </el-col>
} <el-col :span="8">
}, <el-form-item label="退货金额" prop="refundAmount">
computed: {}, <el-input v-model="dataForm.refundAmount" clearable :style='{"width":"100%"}' :disabled="true">
watch: {},
created() {
}, </el-input>
mounted() {}, </el-form-item>
methods: { </el-col>
dataInfo(dataAll){ <el-col :span="8">
let _dataAll =dataAll <el-form-item label="退货数量" prop="refundNum">
_dataAll.jnpf_jg_purchaseorder_jnpf_contractName = _dataAll.jg_purchaseorder.contractName <el-input v-model="dataForm.refundNum" clearable :style='{"width":"100%"}' :disabled="true">
_dataAll.jnpf_jg_purchaseorder_jnpf_supplierName = _dataAll.jg_purchaseorder.supplierName
for(let i=0;i<_dataAll.purchaseback_item0List.length;i++){
var _list = _dataAll.purchaseback_item0List[i];
}
this.dataForm = _dataAll
},
init(id) { </el-input>
this.dataForm.id = id || 0; </el-form-item>
this.visible = true; </el-col>
this.$nextTick(() => { <el-col :span="8">
if(this.dataForm.id){ <el-form-item label="备注" prop="remark">
this.loading = true <el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
request({
url: '/api/purchaseback/Purchaseback/detail/'+this.dataForm.id, </el-input>
method: 'get' </el-form-item>
}).then(res => { </el-col>
this.dataInfo(res.data) <el-col :span="24">
this.loading = false <el-tabs v-model="activeyrmekt" tab-position="top" class="mb-20">
}) <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.purchaseback_item0List" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<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="389754644018016581"
:columnOptions="purchaseorderitem0vehicleIdcolumnOptions" propsValue="vehicle_id"
relationField="ticketno" popupType="dialog" popupWidth="800px" hasPage :pageSize="20">
</popupSelect>
</template>
</el-table-column>
<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="purchaseorderitem0materialIdcolumnOptions" propsValue="id"
relationField="item_name" popupType="dialog" popupWidth="800px" hasPage :pageSize="20"
:disabled="true">
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="settlement" label="结算重量 ">
<template slot-scope="scope">
<el-input v-model="scope.row.settlement" placeholder="请输入" clearable
:style='{"width":"100%"}' :disabled="true">
</el-input>
</template>
</el-table-column>
<el-table-column prop="unit" label="计量单位 ">
<template slot-scope="scope">
<el-select v-model="scope.row.unit" placeholder="请选择" clearable
:style='{"width":"100%"}' :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" label="采购单价">
<template slot-scope="scope">
<el-input v-model="scope.row.price" placeholder="请输入" clearable
:style='{"width":"100%"}' :disabled="true">
</el-input>
</template>
</el-table-column>
<el-table-column prop="rate" label="税率 ">
<template slot-scope="scope">
<el-select v-model="scope.row.rate" placeholder="请选择" clearable
:style='{"width":"100%"}' :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" label="应退金额">
<template slot-scope="scope">
<el-input v-model="scope.row.amount" placeholder="请输入" clearable
:style='{"width":"100%"}' :disabled="true">
</el-input>
</template>
</el-table-column>
<el-table-column prop="notAmount" label="税额">
<template slot-scope="scope">
<el-input v-model="scope.row.notAmount" placeholder="请输入" clearable
:style='{"width":"100%"}' :disabled="true">
</el-input>
</template>
</el-table-column>
<el-table-column prop="pountUser" label="业务员">
<template slot-scope="scope">
<el-input v-model="scope.row.pountUser" placeholder="请输入" clearable
:style='{"width":"100%"}' :disabled="true">
</el-input>
</template>
</el-table-column>
<el-table-column prop="pountType" label="磅单类型 ">
<template slot-scope="scope">
<el-select v-model="scope.row.pountType" placeholder="请选择" clearable
:style='{"width":"100%"}' :disabled="true">
<el-option v-for="(item, index) in pountTypeOptions"
:key="index" :label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
</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="delpurchaseback_item0List(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addpurchaseback_item0List()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</el-form-item>
</el-col>
</el-tab-pane>
</el-tabs>
</el-col>
</template>
<Form v-if="formVisible" ref="form" />
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
<!-- <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button> -->
</span>
</el-dialog>
</template>
<script>
import request from '@/utils/request'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: { },
props: [],
data() {
return {
bissId: '380716763022647941',
excludeFields: [],
formVisible: false,
visible: false,
loading: false,
isDetail: false,
dataForm: {
documentNo: '',
purchaseOrderId: "",
currency: "0",
refundAmount: '',
refundNum: '',
remark: '',
actualAmount: '',
status: "0",
creatorTime: "",
creatorUserName: "",
purchaseback_item0List: [],
jg_purchaseorder: {
contractName: '',
supplierName: '',
},
jnpf_jg_purchaseorder_jnpf_contractName: '',
jnpf_jg_purchaseorder_jnpf_supplierName: '',
},
activeyrmekt: '0',
rules: {},
purchaseOrderIdcolumnOptions: [{
"label": "ID",
"value": "id"
}, {
"label": "采购订单号",
"value": "document_no"
}, {
"label": "合同名称",
"value": "contract_name"
}, {
"label": "供应商名称",
"value": "supplier_name"
}, {
"label": "币别",
"value": "currency"
}, {
"label": "状态",
"value": "status"
}, ],
currencyOptions: [{
"fullName": "人民币",
"id": "0"
}, {
"fullName": "美元",
"id": "1"
}, {
"fullName": "英镑",
"id": "2"
}],
statusOptions: [{
"fullName": "已保存",
"id": "0"
}, {
"fullName": "审批中",
"id": "1"
}, {
"fullName": "已审批",
"id": "2"
}],
}) purchaseback_item0licenseNumcolumnOptions: [{
}, "label": "车牌号",
}, "value": "license_num"
} }, {
"label": "物料名称",
"value": "material_name"
}, {
"label": "结算重量",
"value": "settlement"
}, {
"label": "计量单位",
"value": "unit"
}, {
"label": "采购单价",
"value": "price"
}, {
"label": "税率",
"value": "rate"
}, {
"label": "应退金额",
"value": "amount"
}, {
"label": "税额",
"value": "not_amount"
}, {
"label": "业务员",
"value": "pount_user"
}, {
"label": "磅单类型",
"value": "pount_type"
}, ],
purchaseorderitem0materialIdcolumnOptions: [{
"label": "物料编码",
"value": "item_code"
}, {
"label": "物料名称",
"value": "item_name"
}, {
"label": "单位",
"value": "primary_unit_of_measure"
}, {
"label": "可采购",
"value": "purchase_flag_name"
}, {
"label": "可销售",
"value": "sales_flag_name"
}, ],
purchaseorderitem0vehicleIdcolumnOptions: [{
"label": "车牌号",
"value": "ticketno"
}, {
"label": "物料名称",
"value": "item_name"
}, {
"label": "结算重量",
"value": "settlement"
}, {
"label": "计量单位",
"value": "unitName"
}, {
"label": "采购单价",
"value": "purchase_price"
}, {
"label": "磅单类型",
"value": "poundTypeName"
}, ],
unitOptions: [{
"fullName": "吨",
"id": "0"
}, {
"fullName": "千克",
"id": "1"
}],
rateOptions: [{
"fullName": "13",
"id": "0"
}, {
"fullName": "9",
"id": "1"
}, {
"fullName": "6",
"id": "2"
}, {
"fullName": "5",
"id": "3"
}, {
"fullName": "3",
"id": "4"
}, {
"fullName": "0",
"id": "5"
}],
pountTypeOptions: [{
"fullName": "贸易",
"id": "0"
}, {
"fullName": "其他",
"id": "1"
}],
}
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
popupSelectChange2(a, b){
var excludeFields = [];
for (let i = 0; i < this.dataForm.purchaseback_item0List.length; i++) {
excludeFields.push(this.dataForm.purchaseback_item0List[i].licenseNo);
if(a == this.dataForm.purchaseback_item0List[i].licenseNum){
this.dataForm.purchaseback_item0List[i].materialName = b.material_name;
this.dataForm.purchaseback_item0List[i].settlement = b.settlement;
this.dataForm.purchaseback_item0List[i].unit = b.unit;
this.dataForm.purchaseback_item0List[i].price = b.price;
this.dataForm.purchaseback_item0List[i].rate = b.rate;
this.dataForm.purchaseback_item0List[i].amount = b.amount;
this.dataForm.purchaseback_item0List[i].notAmount = b.not_amount;
this.dataForm.purchaseback_item0List[i].pountUser = b.pount_user;
this.dataForm.purchaseback_item0List[i].pountType = b.pount_type;
}
}
this.excludeFields = excludeFields;
},
popupSelectChange(e,d){
this.dataForm.currency = d.currency;
this.excludeFields = [];
this.dataForm.receiptout_item0List = [];
},
purchaseback_item0Exist() {
let isOk = true;
for (let i = 0; i < this.dataForm.purchaseback_item0List.length; i++) {
const e = this.dataForm.purchaseback_item0List[i];
}
return isOk;
},
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
} else if (data[key] instanceof Object) {
this.clearData(data[key]);
} else {
data[key] = "";
}
}
},
init(id, isDetail) {
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/purchaseback/Purchaseback/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
} else {
this.clearData(this.dataForm)
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
dataFormSubmit() {
this.$refs['elForm'].validate((valid) => {
if (valid) {
if (!this.purchaseback_item0Exist()) return
this.request()
}
})
},
request() {
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/purchaseback/Purchaseback',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
} else {
request({
url: '/api/purchaseback/Purchaseback/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}
},
addpurchaseback_item0List() {
let item = {
licenseNum: undefined,
materialName: undefined,
settlement: undefined,
unit: undefined,
price: undefined,
rate: undefined,
amount: undefined,
notAmount: undefined,
pountUser: undefined,
pountType: undefined,
}
this.dataForm.purchaseback_item0List.push(item)
},
delpurchaseback_item0List(index) {
this.dataForm.purchaseback_item0List.splice(index, 1);
},
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.jg_purchaseorder.contractName = _data.jnpf_jg_purchaseorder_jnpf_contractName
_data.jg_purchaseorder.supplierName = _data.jnpf_jg_purchaseorder_jnpf_supplierName
for (let i = 0; i < _data.purchaseback_item0List.length; i++) {
var _list = _data.purchaseback_item0List[i];
}
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.jnpf_jg_purchaseorder_jnpf_contractName = _dataAll.jg_purchaseorder.contractName
_dataAll.jnpf_jg_purchaseorder_jnpf_supplierName = _dataAll.jg_purchaseorder.supplierName
for (let i = 0; i < _dataAll.purchaseback_item0List.length; i++) {
var _list = _dataAll.purchaseback_item0List[i];
}
this.dataForm = _dataAll
},
},
}
</script> </script>

@ -155,12 +155,12 @@
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="taxAmount" label="税额"> <el-table-column prop="taxAmount" label="税额">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.taxAmount" placeholder="请输入" clearable :style='{"width":"100%"}'> <el-input v-model="scope.row.taxAmount" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</el-input> </el-input>
</template> </template>
</el-table-column> --> </el-table-column>
<el-table-column prop="amountNotTax" label="不含税金额"> <el-table-column prop="amountNotTax" label="不含税金额">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.amountNotTax" placeholder="请输入" clearable <el-input v-model="scope.row.amountNotTax" placeholder="请输入" clearable
@ -510,6 +510,7 @@
} }
}, },
init(purchaseorder) { init(purchaseorder) {
debugger
this.dataForm.id = ''; this.dataForm.id = '';
this.visible = true this.visible = true
this.dataForm.businessDate = new Date( ); this.dataForm.businessDate = new Date( );
@ -526,6 +527,7 @@
item.unitPrice = item.price; item.unitPrice = item.price;
item.taxRate = item.rate; item.taxRate = item.rate;
item.amountNotTax = item.notAmount; item.amountNotTax = item.notAmount;
item.taxAmount = item.amount - item.notAmount;
}); });
this.dataForm.invoicesitem1List = purchaseorder.purchaseorder_item0List; this.dataForm.invoicesitem1List = purchaseorder.purchaseorder_item0List;
}, },

@ -1,227 +1,671 @@
<template> <template>
<el-dialog title="详情" <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:close-on-click-modal="false" append-to-body :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll <el-row :gutter="15" class="">
width="1000px"> <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<el-row :gutter="15" class=""> <template v-if="!loading">
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" > <el-col :span="8">
<template v-if="!loading"> <el-form-item label="单据编号" prop="documentno">
<el-col :span="8" > <el-input v-model="dataForm.documentno" placeholder="系统自动生成" readonly>
<el-form-item label="单据编号"
prop="documentno" > </el-input>
<p>{{dataForm.documentno}}</p> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="8">
<el-col :span="8" > <el-form-item label="业务类型" required prop="type">
<el-form-item label="业务类型" <el-select v-model="dataForm.type" placeholder="请选择业务类型" clearable :style='{"width":"100%"}'>
prop="type" > <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" :value="item.id"
<p>{{ dataForm.type | dynamicText(typeOptions) }} </p> :disabled="item.disabled"></el-option>
</el-form-item>
</el-col> </el-select>
<el-col :span="8" > </el-form-item>
<el-form-item label="来源单号" </el-col>
prop="souceno" > <el-col :span="8">
<p>{{dataForm.souceno}}</p> <!-- <el-form-item label="来源单号" required prop="souceno">
</el-form-item> <popupSelect v-model="dataForm.souceno" placeholder="请选择" clearable field="souceno"
</el-col> interfaceId="392931756640102277" :columnOptions="soucenocolumnOptions" propsValue="document_no"
<el-col :span="8" > relationField="document_no" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
<el-form-item label="入库金额" @change="popupSelect">
prop="receiptamount" >
<p>{{dataForm.receiptamount}}</p> </popupSelect>
</el-form-item> </el-form-item> -->
</el-col>
<el-col :span="8" > <el-form-item label="来源单号" prop="souceno">
<el-form-item label="币别" <popupSelect v-model="dataForm.souceno" placeholder="请选择" clearable field="souceno"
prop="currency" > interfaceId="392931756640102277" :columnOptions="soucenocolumnOptions" propsValue="id"
<p>{{ dataForm.currency | dynamicText(currencyOptions) }} </p> relationField="document_no" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
</el-form-item> :pageSize="20">
</el-col>
<el-col :span="8" > </popupSelect>
<el-form-item label="入库数量" </el-form-item>
prop="receiptnum" > </el-col>
<p>{{dataForm.receiptnum}}</p> <el-col :span="8">
</el-form-item> <el-form-item label="入库金额" prop="receiptamount">
</el-col> <el-input v-model="dataForm.receiptamount" placeholder="请输入入库金额" readonly>
<el-col :span="8" >
<el-form-item label="供应商名称" </el-input>
prop="suppliername" > </el-form-item>
<p>{{dataForm.suppliername}}</p> </el-col>
</el-form-item> <el-col :span="8">
</el-col> <el-form-item label="币别" prop="currency">
<el-col :span="16" > <el-select v-model="dataForm.currency" placeholder="请选择币别" readonly>
<el-form-item label="备注" <el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id"
prop="remark" > :disabled="item.disabled"></el-option>
<p>{{dataForm.remark}}</p>
</el-form-item> </el-select>
</el-col> </el-form-item>
<el-col :span="12" > </el-col>
<el-form-item label="入库日期" <el-col :span="8">
prop="warehousingdate" > <el-form-item label="入库重量" prop="receiptnum">
<p>{{jnpf.dateFormat(dataForm.warehousingdate)}}</p> <el-input v-model="dataForm.receiptnum" placeholder="请输入入库重量" readonly>
</el-form-item>
</el-col> </el-input>
<el-col :span="12" > </el-form-item>
<el-form-item label="单据状态" </el-col>
prop="status" > <el-col :span="8">
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p> <!-- <el-form-item label="供应商名称" prop="suppliername">
</el-form-item> <el-input v-model="dataForm.suppliername" placeholder="请输入供应商名称" readonly>
</el-col>
<el-col :span="24"> </el-input>
<el-tabs v-model="activevpzhms" tab-position="top" class="mb-20"> </el-form-item> -->
<el-tab-pane label="磅单明细"> <el-form-item label="供应商id" prop="supplierId">
<el-col :span="24" > <popupSelect v-model="dataForm.supplierId" placeholder="请选择" clearable field="supplierId"
<el-form-item label-width="0"> interfaceId="397751667988199621" :columnOptions="supplierIdcolumnOptions" propsValue="id"
<div class="JNPF-common-title"> relationField="supplier_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
<h2></h2> :pageSize="20">
</div>
<el-table :data="dataForm.receiptin_item0List" size='mini' > </popupSelect>
<el-table-column type="index" width="50" label="序号" align="center" /> </el-form-item>
<el-table-column prop="licenseno" label="车牌号"> </el-col>
<template slot-scope="scope"> <el-col :span="16">
<p>{{scope.row.licenseno}}</p> <el-form-item label="备注" prop="remark">
</template> <el-input v-model="dataForm.remark" placeholder="请输入供应商名称" clearable :style='{"width":"100%"}'>
</el-table-column>
<el-table-column prop="materialname" label="物料名称"> </el-input>
<template slot-scope="scope"> </el-form-item>
<p>{{scope.row.materialname}}</p> </el-col>
</template> <!-- <el-col :span="12" >-->
</el-table-column> <!-- <el-form-item label="入库日期"-->
<el-table-column prop="reservoirareaId" label="库区名称"> <!-- prop="warehousingdate" >-->
<template slot-scope="scope"> <!-- <el-date-picker v-model="dataForm.warehousingdate"-->
<p>{{scope.row.reservoirareaId}}</p> <!-- placeholder="请选择入库日期" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >-->
</template>
</el-table-column> <!-- </el-date-picker>-->
<el-table-column prop="warehouseId" label="仓库名称"> <!-- </el-form-item>-->
<template slot-scope="scope"> <!-- </el-col>-->
<p>{{scope.row.warehouseId}}</p> <!-- <el-col :span="12" >-->
</template> <!-- <el-form-item label="单据状态"-->
</el-table-column> <!-- prop="status" >-->
<el-table-column prop="num" label="入库重量"> <!-- <el-select v-model="dataForm.status"-->
<template slot-scope="scope"> <!-- placeholder="请选择单据状态" clearable :style='{"width":"100%"}'>-->
<p>{{scope.row.num}}</p> <!-- <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>-->
</template>
</el-table-column> <!-- </el-select>-->
<el-table-column prop="unit" label="计量单位"> <!-- </el-form-item>-->
<template slot-scope="scope"> <!-- </el-col>-->
<p>{{ scope.row.unit | dynamicText(unitOptions) }}</p> <el-col :span="24">
</template> <el-tabs v-model="activevpzhms" tab-position="top" class="mb-20">
</el-table-column> <el-tab-pane label="磅单明细">
<el-table-column prop="price" label="单价"> <el-col :span="24">
<template slot-scope="scope"> <el-form-item label-width="0">
<p>{{scope.row.price}}</p> <div class="JNPF-common-title">
</template> <h2></h2>
</el-table-column> </div>
<el-table-column prop="rate" label="税率"> <el-table :data="dataForm.receiptin_item0List" size='mini' show-summary
<template slot-scope="scope"> :summary-method="getSummaries">
<p>{{ scope.row.rate | dynamicText(rateOptions) }}</p> <el-table-column type="index" width="50" label="序号" align="center" />
</template> <!-- <el-table-column prop="licenseno" width="140" label="车牌号" align="center">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="amount" label="金额"> <popupSelect v-model="scope.row.licenseno" placeholder="请选择" clearable
<template slot-scope="scope"> :field="'licenseno'+scope.$index" interfaceId="392933121244325765"
<p>{{scope.row.amount}}</p> :columnOptions="receiptin_item0licensenocolumnOptions" propsValue="license_num"
</template> relationField="license_num" popupType="dialog" popupWidth="1000px" popupTitle="选择车牌"
</el-table-column> :bissId="dataForm.souceno" :excludeFields="excludeFields" @change="popupSelect2">
<el-table-column prop="rateamount" label="税额"> </popupSelect>
<template slot-scope="scope"> </template>
<p>{{scope.row.rateamount}}</p> </el-table-column> -->
</template>
</el-table-column> <el-table-column prop="vehicleId" width="150" label="车辆">
<el-table-column prop="batchno" label="批次号"> <template slot-scope="scope">
<template slot-scope="scope"> <popupSelect v-model="scope.row.vehicleId" placeholder="请选择" clearable
<p>{{scope.row.batchno}}</p> :field="'vehicleId'+scope.$index" interfaceId="392933121244325765"
</template> :columnOptions="jg_receiptin_item0vehicleIdcolumnOptions" propsValue="vehicle_id"
</el-table-column> relationField="ticketno" :bissId="dataForm.souceno" popupType="dialog" popupWidth="800px" @change="popupSelect2"
<el-table-column prop="poundType" label="磅单类型"> hasPage :pageSize="20" :disabled="true">
<template slot-scope="scope"> </popupSelect>
<p>{{ scope.row.poundType | dynamicText(poundTypeOptions) }}</p> </template>
</template> </el-table-column>
</el-table-column> <el-table-column prop="materialId" width="200" label="物料">
</el-table> <template slot-scope="scope">
</el-form-item> <popupSelect v-model="scope.row.materialId" placeholder="请选择" clearable
</el-col> :field="'materialId'+scope.$index" interfaceId="398448695651178885"
</el-tab-pane > :columnOptions="jg_receiptin_item0materialIdcolumnOptions" propsValue="id"
</el-tabs> relationField="item_name" popupType="dialog" popupWidth="800px" hasPage :pageSize="20" :disabled="true">
</popupSelect>
</template>
</el-table-column>
<!-- <el-table-column prop="materialname" width="140" label="物料名称" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.materialname" placeholder="请输入" :disabled="true">
</el-input>
</template>
</el-table-column> -->
<!-- <el-table-column prop="reservoirareaId" width="140" label="库区" align="center">
<template slot-scope="scope">
<popupSelect v-model="scope.row.reservoirareaId" placeholder="请选择" clearable
:field="'reservoirareaId'+scope.$index" interfaceId="392939299932268421"
:columnOptions="receiptin_item0reservoirareaIdcolumnOptions" propsValue="id"
relationField="areaname" popupType="dialog" popupWidth="800px" @change="popupSelect3">
</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" @change="popupSelect3">
</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="warehouseId" width="140" label="仓库名称" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.warehouseId" placeholder="请输入" clearable :disabled="true">
</el-input>
</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 @input="inputChange()"
: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 @input="inputChange()"
: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 prop="batchno" width="140" label="批次号" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.batchno" placeholder="请输入" clearable :disabled="true">
</el-input>
</template>
</el-table-column>
<el-table-column prop="poundType" width="140" label="磅单类型" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.poundType" placeholder="请选择" clearable :disabled="true">
<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 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-col>
</template> </el-tab-pane>
</el-form> </el-tabs>
</el-col>
</template>
</el-form>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<!-- <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button> -->
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import PrintBrowse from '@/components/PrintBrowse' import {
import jnpf from '@/utils/jnpf' getDataInterfaceRes
export default { } from '@/api/systemData/dataInterface'
components: {PrintBrowse}, import {
props: [], getDictionaryDataSelector
data() { } from '@/api/systemData/dictionary'
return { export default {
visible: false, components: {},
loading: false, props: [],
printBrowseVisible: false, data() {
printId: '', return {
dataForm: { excludeFields: [],
id :'', visible: false,
documentno : '', loading: false,
type : "", isDetail: false,
souceno : "", dataForm: {
receiptamount : '', documentno: '',
currency : "0", type: "",
receiptnum : '', souceno: "",
suppliername : '', receiptamount: 0,
remark : '', currency: "0",
warehousingdate : '', receiptnum: 0,
status : "0", suppliername: '',
creatorTime : "", remark: '',
creatorUserName : "", warehousingdate: '',
receiptin_item0List:[], status: "0",
}, creatorTime: "",
activevpzhms:'0', creatorUserName: "",
typeOptions:[{"fullName":"采购入库","id":"0"},{"fullName":"购销入库","id":"1"}], receiptin_item0List: [],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
rateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
poundTypeOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
}
}, },
computed: {}, activevpzhms: '0',
watch: {}, rules: {},
created() { typeOptions: [{
"fullName": "采购入库",
"id": "0"
}, {
"fullName": "购销入库",
"id": "1"
}],
soucenocolumnOptions: [{
"label": "采购订单",
"value": "document_no"
}, {
"label": "供应商名称",
"value": "supplier_name"
}, {
"label": "币别",
"value": "currencyLabel"
}, ],
currencyOptions: [{
"fullName": "人民币",
"id": "0"
}, {
"fullName": "美元",
"id": "1"
}, {
"fullName": "英镑",
"id": "2"
}],
statusOptions: [{
"fullName": "已保存",
"id": "0"
}, {
"fullName": "审批中",
"id": "1"
}, {
"fullName": "已审批",
"id": "2"
}],
}, jg_receiptin_item0vehicleIdcolumnOptions: [{
mounted() {}, "label": "车牌号",
methods: { "value": "ticketno"
dataInfo(dataAll){ }, {
let _dataAll =dataAll "label": "物料名称",
for(let i=0;i<_dataAll.receiptin_item0List.length;i++){ "value": "material"
var _list = _dataAll.receiptin_item0List[i]; }, {
} "label": "库区名称",
this.dataForm = _dataAll "value": "areaName"
}, }, {
"label": "仓库名称",
init(id) { "value": "houseName"
this.dataForm.id = id || 0; }, {
this.visible = true; "label": "入库数量",
this.$nextTick(() => { "value": "settlement"
if(this.dataForm.id){ }, {
this.loading = true "label": "计量单位",
request({ "value": "unitName"
url: '/api/receiptin/Receiptin/detail/'+this.dataForm.id, }, {
method: 'get' "label": "单价",
}).then(res => { "value": "price"
this.dataInfo(res.data) }, {
this.loading = false "label": "税率",
}) "value": "rate"
} }, {
"label": "金额",
}) "value": "amount"
}, }, {
}, "label": "批次号",
} "value": "poundlist_id"
}, {
"label": "磅单类型",
"value": "pount_type"
}, ],
supplierIdcolumnOptions: [{
"label": "供应商编码",
"value": "supplier_code"
}, {
"label": "供应商名称",
"value": "supplier_name"
}, {
"label": "供应商地址",
"value": "supplier_site_code"
}, ],
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"
}, ],
unitOptions: [{
"fullName": "吨",
"id": "0"
}, {
"fullName": "千克",
"id": "1"
}],
rateOptions: [{
"fullName": "13",
"id": "0"
}, {
"fullName": "9",
"id": "1"
}, {
"fullName": "6",
"id": "2"
}, {
"fullName": "5",
"id": "3"
}, {
"fullName": "3",
"id": "4"
}, {
"fullName": "0",
"id": "5"
}],
poundTypeOptions: [{
"fullName": "吨",
"id": "0"
}, {
"fullName": "千克",
"id": "1"
}],
}
},
computed: {},
watch: {},
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 === 5 || 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;
},
inputChange(value) {
var num = 0;
var amount = 0;
for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) {
num = num + parseFloat(this.dataForm.receiptin_item0List[i].num);
amount = amount + parseFloat(this.dataForm.receiptin_item0List[i].amount);
}
this.dataForm.receiptamount = amount;
this.dataForm.receiptnum = num;
},
popupSelect(e, d) {
this.dataForm.currency = d.currency;
this.dataForm.suppliername = d.supplier_name;
this.excludeFields = [];
this.dataForm.receiptin_item0List = [];
},
popupSelect2(a, b) {
var excludeFields = [];
var num = 0;
var amount = 0;
for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) {
excludeFields.push(this.dataForm.receiptin_item0List[i].licenseno);
if (a == this.dataForm.receiptin_item0List[i].licenseno) {
this.dataForm.receiptin_item0List[i].vehicleId = b.vehicleId;
this.dataForm.receiptin_item0List[i].materialId = b.materialId;
this.dataForm.receiptin_item0List[i].reservoirareaId = b.areaId;
this.dataForm.receiptin_item0List[i].warehouseId = b.houseId;
this.dataForm.receiptin_item0List[i].num = b.settlement;
this.dataForm.receiptin_item0List[i].unit = b.unit;
this.dataForm.receiptin_item0List[i].price = b.price;
this.dataForm.receiptin_item0List[i].rate = b.rate;
this.dataForm.receiptin_item0List[i].amount = b.amount;
this.dataForm.receiptin_item0List[i].batchno = b.poundlist_id;
this.dataForm.receiptin_item0List[i].poundType = b.pound_type;
this.rateOptions.forEach((column, index) => {
if (column.id == b.rate) {
this.dataForm.receiptin_item0List[i].rateamount = b.amount * column.fullName;
}
});
}
num = num + parseFloat(this.dataForm.receiptin_item0List[i].num);
amount = amount + parseFloat(this.dataForm.receiptin_item0List[i].amount);
}
this.dataForm.receiptamount = amount;
this.dataForm.receiptnum = num;
this.excludeFields = excludeFields;
},
popupSelect3(j, k) {
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;
}
}
},
receiptin_item0Exist() {
let isOk = true;
for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) {
const e = this.dataForm.receiptin_item0List[i];
}
return isOk;
},
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
} else if (data[key] instanceof Object) {
this.clearData(data[key]);
} else if (data[key] instanceof Number) {
data[key] = 0;
} else {
data[key] = "";
}
}
},
init(id, isDetail) {
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/receiptin/Receiptin/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
} else {
this.clearData(this.dataForm)
this.dataForm.receiptamount = 0.0;
this.dataForm.receiptnum = 0.0;
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
dataFormSubmit() {
this.$refs['elForm'].validate((valid) => {
if (valid) {
if (!this.receiptin_item0Exist()) return
this.request()
}
})
},
request() {
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/receiptin/Receiptin',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
} else {
request({
url: '/api/receiptin/Receiptin/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}
},
addreceiptin_item0List() {
let item = {
licenseno: undefined,
materialname: undefined,
reservoirareaId: undefined,
warehouseId: undefined,
num: undefined,
unit: undefined,
price: undefined,
rate: undefined,
amount: undefined,
rateamount: undefined,
batchno: undefined,
poundType: undefined,
}
this.dataForm.receiptin_item0List.push(item)
},
delreceiptin_item0List(index) {
this.dataForm.receiptin_item0List.splice(index, 1);
},
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
for (let i = 0; i < _data.receiptin_item0List.length; i++) {
var _list = _data.receiptin_item0List[i];
}
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
for (let i = 0; i < _dataAll.receiptin_item0List.length; i++) {
var _list = _dataAll.receiptin_item0List[i];
}
this.dataForm = _dataAll
},
},
}
</script> </script>

@ -1,226 +1,762 @@
<template> <template>
<el-dialog title="详情" <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:close-on-click-modal="false" append-to-body :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll <el-row :gutter="15" class="">
width="1000px"> <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<el-row :gutter="15" class=""> <template v-if="!loading">
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" > <el-col :span="24">
<template v-if="!loading"> <el-form-item label="磅单上传" prop="poundPictures">
<el-col :span="24" > <el-upload class="avatar-uploader" :action="action" :show-file-list="false"
<el-form-item label="磅单上传" :on-success="handleAvatarSuccess">
prop="poundPictures" > <img v-if="imageUrl" :src="imageUrl" class="avatar">
<JNPF-UploadFz v-model="dataForm.poundPictures" <i v-else class="el-icon-plus avatar-uploader-icon"></i>
disabled </el-upload>
detailed :fileSize="500" sizeUnit="MB" :limit="9" buttonText="点击上传" > </el-form-item>
</JNPF-UploadFz> </el-col>
</el-form-item> <el-col :span="6">
</el-col> <el-form-item label="物料名称" prop="materialId">
<el-col :span="12" > <popupSelect v-model="dataForm.materialId" placeholder="请选择物料编码" clearable field="materialId"
<el-form-item label="物料名称" interfaceId="381037852907038533" :columnOptions="materialIdcolumnOptions" propsValue="id"
prop="materialId" > relationField="item_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
<p>{{dataForm.materialId}}</p> :pageSize="20">
</el-form-item>
</el-col> </popupSelect>
<el-col :span="12" > </el-form-item>
<el-form-item label="客户名称" </el-col>
prop="customerId" > <el-col :span="6">
<p>{{dataForm.customerId}}</p> <el-form-item label="客户名称" prop="customerId">
</el-form-item> <popupSelect v-model="dataForm.customerId" placeholder="请选择客户" clearable field="customerId"
</el-col> interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" propsValue="id"
<el-col :span="12" > relationField="supplier_nm" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
<el-form-item label="销售合同" :pageSize="20" @change="customerSelect">
prop="salesId" >
<p>{{dataForm.salesId}}</p> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="6">
<el-form-item label="车牌号" <el-form-item label="销售合同" prop="salesId">
prop="vehicleId" > <popupSelect v-model="dataForm.salesId" placeholder="请选择合同" clearable field="salesId"
<p>{{dataForm.vehicleId}}</p> interfaceId="396203872441416837" :columnOptions="salesIdcolumnOptions" propsValue="id"
</el-form-item> relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" :bissId="dataForm.customerId"
</el-col> hasPage :pageSize="20">
<el-col :span="24" >
<el-form-item label="车辆图片" </popupSelect>
prop="vehiclePictures" > </el-form-item>
<JNPF-UploadImg v-model="dataForm.vehiclePictures" </el-col>
disabled <el-col :span="6">
detailed :fileSize="500" sizeUnit="MB" :limit="9" > <el-form-item label="供应商" prop="supplierId">
</JNPF-UploadImg> <popupSelect v-model="dataForm.supplierId" placeholder="请选择客户" clearable field="supplierId"
</el-form-item> interfaceId="382494924156735557" :columnOptions="supplierIdcolumnOptions" propsValue="id"
</el-col> relationField="supplier_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
<el-col :span="12" > :pageSize="20" >
<el-form-item label="磅单时间"
prop="poundDate" > </popupSelect>
<p>{{jnpf.dateFormat(dataForm.poundDate)}}</p> </el-form-item>
</el-form-item> </el-col>
</el-col> <el-col :span="6">
<el-col :span="12" > <el-form-item label="采购合同" prop="purchaseId">
<el-form-item label="磅单号" <popupSelect v-model="dataForm.purchaseId" placeholder="请选择合同" clearable field="purchaseId"
prop="poundlistNo" > interfaceId="397408984857931205" :columnOptions="salesIdcolumnOptions" propsValue="id"
<p>{{dataForm.poundlistNo}}</p> relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
</el-form-item> hasPage :pageSize="20" @change="customerSelect2">
</el-col>
<el-col :span="12" > </popupSelect>
<el-form-item label="皮重" </el-form-item>
prop="tareWeight" > </el-col>
<p>{{dataForm.tareWeight}}</p> <el-col :span="6">
</el-form-item> <el-form-item label="采购价格" prop="purchasePrice">
</el-col> <el-input-number v-model="dataForm.purchasePrice" :style='{"width":"100%"}'></el-input-number>
<el-col :span="12" > </el-form-item>
<el-form-item label="毛重" </el-col>
prop="grossWeight" > <el-col :span="6">
<p>{{dataForm.grossWeight}}</p> <el-form-item label="车牌号" prop="vehicleId">
</el-form-item> <popupSelect v-model="dataForm.vehicleId" placeholder="请选择车辆" clearable field="vehicleId"
</el-col> interfaceId="381432451370615173" :columnOptions="vehicleIdcolumnOptions" propsValue="id"
<el-col :span="12" > relationField="ticketno" popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="changePicture"
<el-form-item label="扣重" hasPage :pageSize="20">
prop="buckleWeight" >
<p>{{dataForm.buckleWeight}}</p> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="24">
<el-form-item label="净重" <el-form-item label="车辆图片" prop="vehiclePictures">
prop="netWeight" > <JNPF-UploadImg v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9">
<p>{{dataForm.netWeight}}</p>
</el-form-item> </JNPF-UploadImg>
</el-col> </el-form-item>
<el-col :span="12" > </el-col>
<el-form-item label="单位 " <el-col :span="6">
prop="unit" > <el-form-item label="磅单时间" prop="poundDate">
<p>{{ dataForm.unit | dynamicText(unitOptions) }} </p> <el-date-picker v-model="dataForm.poundDate" placeholder="请选择" clearable :style='{"width":"100%"}'
</el-form-item> type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-col>
<el-col :span="12" > </el-date-picker>
<el-form-item label="运输类型" </el-form-item>
prop="transportType" > </el-col>
<p>{{ dataForm.transportType | dynamicText(transportTypeOptions) }} </p> <el-col :span="6">
</el-form-item> <el-form-item label="磅单号" prop="poundlistNo">
</el-col> <el-input v-model="dataForm.poundlistNo" placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-col :span="12" >
<el-form-item label="是否垫资" </el-input>
prop="advance" > </el-form-item>
<p>{{ dataForm.advance | dynamicText(advanceOptions) }} </p> </el-col>
</el-form-item> <el-col :span="6">
</el-col> <el-form-item label="皮重" prop="tareWeight">
<el-col :span="12" > <el-input-number v-model="dataForm.tareWeight" :style='{"width":"100%"}'></el-input-number>
<el-form-item label="运费" </el-form-item>
prop="transportPrice" > </el-col>
<p>{{dataForm.transportPrice}}</p> <el-col :span="6">
</el-form-item> <el-form-item label="毛重" prop="grossWeight">
</el-col> <el-input-number v-model="dataForm.grossWeight" :style='{"width":"100%"}'></el-input-number>
<el-col :span="12" > </el-form-item>
<el-form-item label="销售价格" </el-col>
prop="salesPrice" > <el-col :span="6">
<p>{{dataForm.salesPrice}}</p> <el-form-item label="扣重" prop="buckleWeight">
</el-form-item> <el-input-number v-model="dataForm.buckleWeight" :style='{"width":"100%"}'></el-input-number>
</el-col> </el-form-item>
<el-col :span="12" > </el-col>
<el-form-item label="业务员" <el-col :span="6">
prop="businessId" > <el-form-item label="净重" prop="netWeight">
<p>{{dataForm.businessId}}</p> <el-input-number v-model="dataForm.netWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="6">
<el-form-item label="自然人" <el-form-item label="单位 " prop="unit">
prop="naturalId" > <el-select v-model="unit" placeholder="请选择" clearable :style='{"width":"100%"}' @change="unitChange">
<p>{{dataForm.naturalId}}</p> <el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id"
</el-form-item> :disabled="item.disabled"></el-option>
</el-col>
<el-col :span="12" > </el-select>
<el-form-item label="备注" </el-form-item>
prop="remark" > </el-col>
<p>{{dataForm.remark}}</p> <el-col :span="6">
</el-form-item> <el-form-item label="运输类型" prop="transportType">
</el-col> <el-select v-model="transportType" placeholder="请选择" clearable :style='{"width":"100%"}' @change="transportTypeChange">
<el-col :span="24" > <el-option v-for="(item, index) in transportTypeOptions" :key="index" :label="item.fullName"
<el-form-item label="磅单日期" :value="item.id" :disabled="item.disabled"></el-option>
prop="creatorTime" >
<p>{{dataForm.creatorTime}}</p> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> <el-col :span="6">
</el-form> <el-form-item label="是否垫资" prop="advance">
<el-select v-model="advance" placeholder="请选择" clearable :style='{"width":"100%"}' @change="advanceChange">
<el-option v-for="(item, index) in advanceOptions" :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="运费" prop="transportPrice">
<el-input-number v-model="dataForm.transportPrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="起始地" prop="originPlace">
<el-input v-model="dataForm.originPlace" placeholder="请输入起始地" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="业务员" prop="businessId">
<popupSelect v-model="dataForm.businessId" placeholder="请选择业务员" clearable field="businessId"
interfaceId="ebcc44be142e43b795c0d769abd6d25a" :columnOptions="businessIdcolumnOptions"
propsValue="F_Id" relationField="F_RealName" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
hasPage :pageSize="20" :bissId="dataForm.businessId">
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="自然人" prop="naturalId">
<popupSelect v-model="dataForm.naturalId" placeholder="请选择自然人" clearable field="naturalId"
interfaceId="395933800510599301" :columnOptions="naturalIdcolumnOptions" propsValue="id"
relationField="name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20">
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入备注信息" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
</template>
</el-form>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<!-- <el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button>-->
<!-- <el-button type="primary" @click="continueUpload()"> </el-button>-->
</span> </span>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import PrintBrowse from '@/components/PrintBrowse' import {
import jnpf from '@/utils/jnpf' getDataInterfaceRes
export default { } from '@/api/systemData/dataInterface'
components: {PrintBrowse}, import {
props: [], getDictionaryDataSelector
data() { } from '@/api/systemData/dictionary'
return { export default {
visible: false, components: {},
loading: false, props: [],
printBrowseVisible: false, data() {
printId: '', return {
dataForm: { unit: "0",
id :'', transportType: "0",
poundPictures : [], advance: "0",
materialId : "", action: this.define.APIURl + '/api/tradeupload/Tradeupload/UploaderPondList/annexpic',
customerId : "", imageUrl: '',
salesId : "", code: '100',
vehicleId : "", fileList: [],
vehiclePictures : [], visible: false,
poundDate : '', loading: false,
poundlistNo : '', isDetail: false,
tareWeight : 0, dataForm: {
grossWeight : 0, poundPictures: [],
buckleWeight : 0, materialId: "",
netWeight : 0, customerId: "",
unit : "0", supplierId: "",
transportType : "0", salesId: "",
advance : "0", vehicleId: "",
transportPrice : 0, vehiclePictures: [],
salesPrice : '', poundDate: '',
businessId : "", poundlistNo: '',
naturalId : "", tareWeight: 0,
remark : '', grossWeight: 0,
creatorTime : "", buckleWeight: 0,
}, netWeight: 0,
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}], unit: "0",
transportTypeOptions:[{"fullName":"汽运","id":"0"},{"fullName":"船运","id":"1"},{"fullName":"火车","id":"2"}], transportType: "0",
advanceOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}], advance: "0",
transportPrice: 0,
} salesPrice: 0,
purchasePrice: 0,
businessId: "",
naturalId: "",
remark: '',
creatorTime: "",
isExamine: "",
}, },
computed: {}, rules: {
watch: {}, materialId: [{
created() { required: true,
message: '请选择物料编码',
trigger: 'change'
}, ],
customerId: [{
required: true,
message: '请选择客户',
trigger: 'change'
}, ],
supplierId: [{
required: true,
message: '请选择供应商',
trigger: 'change'
}, ],
purchaseId: [{
required: true,
message: '请选择采购合同',
trigger: 'change'
}, ],
salesId: [{
required: true,
message: '请选择合同',
trigger: 'change'
}, ],
vehicleId: [{
required: true,
message: '请选择车辆',
trigger: 'change'
}, ],
vehiclePictures: [{
required: true,
message: '请至少选择一个',
trigger: 'click'
}, ],
poundDate: [{
required: true,
message: '请选择',
trigger: 'change'
}, ],
poundlistNo: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
tareWeight: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
grossWeight: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
buckleWeight: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
netWeight: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
salesPrice: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
purchasePrice: [{
required: true,
message: '请输入',
trigger: 'blur'
}, ],
businessId: [{
required: true,
message: '请选择业务员',
trigger: 'change'
}, ],
}, },
mounted() {}, materialIdcolumnOptions: [{
methods: { "label": "物料编码",
dataInfo(dataAll){ "value": "item_code"
let _dataAll =dataAll }, {
_dataAll.poundPictures = _dataAll.poundPictures ? JSON.parse( _dataAll.poundPictures):[] "label": "物料名称",
_dataAll.vehiclePictures = _dataAll.vehiclePictures ? JSON.parse( _dataAll.vehiclePictures):[] "value": "item_name"
this.dataForm = _dataAll }, {
}, "label": "单位",
"value": "primary_unit_of_measure"
init(id) { }, {
this.dataForm.id = id || 0; "label": "默认入库区",
this.visible = true; "value": "in_area"
this.$nextTick(() => { }, {
if(this.dataForm.id){ "label": "默认出库区",
this.loading = true "value": "out_area"
request({ }, ],
url: '/api/tradeupload/Tradeupload/detail/'+this.dataForm.id, customerIdcolumnOptions: [{
method: 'get' "label": "客户编码",
}).then(res => { "value": "supplier_cd"
this.dataInfo(res.data) }, {
this.loading = false "label": "客户名称",
}) "value": "supplier_nm"
} }, {
"label": "地址",
}) "value": "address"
}, }, {
}, "label": "银行账号",
} "value": "bank_account"
}, ],
supplierIdcolumnOptions: [{
"label": "供应商编码",
"value": "supplier_code"
}, {
"label": "供应商名称",
"value": "supplier_name"
}],
salesIdcolumnOptions: [{
"label": "合同编码",
"value": "contract_code"
}, {
"label": "合同名称",
"value": "contract_name"
}, {
"label": "合同类型",
"value": "contract_type"
}, {
"label": "供应商/客户名称",
"value": "name"
}, ],
vehicleIdcolumnOptions: [{
"label": "车牌号",
"value": "ticketno"
}, {
"label": "司机",
"value": "drivername"
}, {
"label": "车辆照片",
"value": "vehiclephotos"
}, {
"label": "手机号",
"value": "contact"
}, ],
unitOptions: [{
"fullName": "吨",
"id": "0"
}, {
"fullName": "千克",
"id": "1"
}],
transportTypeOptions: [{
"fullName": "汽运",
"id": "0"
}, {
"fullName": "船运",
"id": "1"
}, {
"fullName": "火车",
"id": "2"
}],
advanceOptions: [{
"fullName": "否",
"id": "0"
}, {
"fullName": "是",
"id": "1"
}],
businessIdcolumnOptions: [{
"label": "人员名称",
"value": "F_RealName"
}, {
"label": "人员职位",
"value": "F_FullName"
}, ],
naturalIdcolumnOptions: [{
"label": "自然人名称",
"value": "name"
}, {
"label": "自然人手机号",
"value": "contact"
}, {
"label": "自然人地址",
"value": "adress"
}, ],
}
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
unitChange(e){
this.dataForm.unit = e;
},
transportTypeChange(e){
this.dataForm.transportType = e;
},
advanceChange(e){
this.dataForm.advance = e;
},
customerSelect(e, d) {
const query = {
code: d.id
}
request({
url: '/api/example/ContractFile/getListByCustomer',
method: 'post',
data: query
}).then((res) => {
if(res.data.length > 0){
// type
this.dataForm.salesId = res.data[0].id
this.dataForm.salesName = res.data[0].contractName
}
})
},
customerSelect2(a, b) {
this.dataForm.supplierId = b.code;
debugger
},
handleAvatarSuccess(res, file) {
this.imageUrl = URL.createObjectURL(file.raw);
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;
this.dataForm.vehiclePictures = JSON.parse(res.data.vehiclePictures);
},
changePicture(a, b) {
this.dataForm.vehiclePictures = JSON.parse(b.vehiclephotos);
},
continueUpload() {
var tareWeight = this.dataForm.tareWeight;//
var grossWeight = this.dataForm.grossWeight;//
var buckleWeight = this.dataForm.buckleWeight;//
var netWeight = this.dataForm.netWeight;//
if(grossWeight < tareWeight + buckleWeight + netWeight){
this.$message({
message: '毛重不得小于皮重+扣重+净重',
type: 'success',
duration: 1000
})
return
}
if(buckleWeight >= netWeight){
this.$message({
message: '扣重不得大于净重',
type: 'success',
duration: 1000
})
return
}
if(buckleWeight >= grossWeight){
this.$message({
message: '扣重不得大于毛重',
type: 'success',
duration: 1000
})
return
}
this.$refs['elForm'].validate((valid) => {
if (valid) {
this.request3()
}
})
},
// poundAI(){
// let formData = new FormData();
// let file = this.dataForm.poundPictures
// formData.append('file',file);
// request({
// url: '/api/tradeupload/Tradeupload/poundai',
// method: 'post',
// data: formData
// }).then(res => {
// this.dataInfo(res.data)
// this.loading = false
// });
// },
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
} else if (data[key] instanceof Object) {
this.clearData(data[key]);
} else {
data[key] = "";
}
}
},
init(id, isDetail) {
this.dataForm.poundDate = new Date();
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
} else {
this.clearData(this.dataForm)
}
});
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() {
var tareWeight = this.dataForm.tareWeight;//
var grossWeight = this.dataForm.grossWeight;//
var buckleWeight = this.dataForm.buckleWeight;//
var netWeight = this.dataForm.netWeight;//
this.dataForm.isExamine = '1';
this.dataForm.unit = this.dataForm.unit ? this.dataForm.unit : 0;
this.dataForm.transportType = this.dataForm.transportType ? this.dataForm.transportType : 0;
this.dataForm.advance = this.dataForm.advance ? this.dataForm.advance : 0;
if(grossWeight < tareWeight + buckleWeight + netWeight){
this.$message({
message: '毛重不得小于皮重+扣重+净重',
type: 'success',
duration: 1000
})
return
}
if(buckleWeight >= netWeight){
this.$message({
message: '扣重不得大于净重',
type: 'success',
duration: 1000
})
return
}
if(buckleWeight >= grossWeight){
this.$message({
message: '扣重不得大于毛重',
type: 'success',
duration: 1000
})
return
}
this.$refs['elForm'].validate((valid) => {
if (valid) {
this.request2()
}
})
},
request2() {
var _data = this.dataList()
debugger
if (!this.dataForm.id) {
request({
url: '/api/tradeupload/Tradeupload',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
} else {
request({
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}
},
request3() {
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/tradeupload/Tradeupload',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
})
})
} else {
request({
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
})
})
}
this.dataForm.vehicleId = null;
this.dataForm.vehiclePictures = null;
this.dataForm.poundDate = null;
this.dataForm.poundlistNo = null;
this.dataForm.tareWeight = null;
this.dataForm.grossWeight = null;
this.dataForm.buckleWeight = null;
this.dataForm.netWeight = null;
},
request() {
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/tradeupload/Tradeupload',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
} else {
request({
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}
},
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.poundPictures = JSON.stringify(_data.poundPictures)
_data.vehiclePictures = JSON.stringify(_data.vehiclePictures)
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.poundPictures = JSON.parse(_dataAll.poundPictures)
_dataAll.vehiclePictures = JSON.parse(_dataAll.vehiclePictures)
this.dataForm = _dataAll
},
},
}
</script> </script>
<style>
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409EFF;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 120px;
height: 120px;
line-height: 120px;
text-align: center;
}
.avatar {
width: 120px;
height: 120px;
display: block;
}
</style>

@ -1,6 +1,6 @@
<template> <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="1000px"> :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right"> <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
<template v-if="!loading"> <template v-if="!loading">
@ -13,7 +13,7 @@
</el-upload> </el-upload>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="物料名称" prop="materialId"> <el-form-item label="物料名称" prop="materialId">
<popupSelect v-model="dataForm.materialId" placeholder="请选择物料编码" clearable field="materialId" <popupSelect v-model="dataForm.materialId" placeholder="请选择物料编码" clearable field="materialId"
interfaceId="381037852907038533" :columnOptions="materialIdcolumnOptions" propsValue="id" interfaceId="381037852907038533" :columnOptions="materialIdcolumnOptions" propsValue="id"
@ -23,7 +23,7 @@
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="客户名称" prop="customerId"> <el-form-item label="客户名称" prop="customerId">
<popupSelect v-model="dataForm.customerId" placeholder="请选择客户" clearable field="customerId" <popupSelect v-model="dataForm.customerId" placeholder="请选择客户" clearable field="customerId"
interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" propsValue="id" interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" propsValue="id"
@ -33,7 +33,7 @@
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="销售合同" prop="salesId"> <el-form-item label="销售合同" prop="salesId">
<popupSelect v-model="dataForm.salesId" placeholder="请选择合同" clearable field="salesId" <popupSelect v-model="dataForm.salesId" placeholder="请选择合同" clearable field="salesId"
interfaceId="396203872441416837" :columnOptions="salesIdcolumnOptions" propsValue="id" interfaceId="396203872441416837" :columnOptions="salesIdcolumnOptions" propsValue="id"
@ -43,7 +43,7 @@
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="供应商" prop="supplierId"> <el-form-item label="供应商" prop="supplierId">
<popupSelect v-model="dataForm.supplierId" placeholder="请选择客户" clearable field="supplierId" <popupSelect v-model="dataForm.supplierId" placeholder="请选择客户" clearable field="supplierId"
interfaceId="382494924156735557" :columnOptions="supplierIdcolumnOptions" propsValue="id" interfaceId="382494924156735557" :columnOptions="supplierIdcolumnOptions" propsValue="id"
@ -53,7 +53,7 @@
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="采购合同" prop="purchaseId"> <el-form-item label="采购合同" prop="purchaseId">
<popupSelect v-model="dataForm.purchaseId" placeholder="请选择合同" clearable field="purchaseId" <popupSelect v-model="dataForm.purchaseId" placeholder="请选择合同" clearable field="purchaseId"
interfaceId="397408984857931205" :columnOptions="salesIdcolumnOptions" propsValue="id" interfaceId="397408984857931205" :columnOptions="salesIdcolumnOptions" propsValue="id"
@ -63,12 +63,12 @@
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="采购价格" prop="purchasePrice"> <el-form-item label="采购价格" prop="purchasePrice">
<el-input-number v-model="dataForm.purchasePrice" :style='{"width":"100%"}'></el-input-number> <el-input-number v-model="dataForm.purchasePrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="车牌号" prop="vehicleId"> <el-form-item label="车牌号" prop="vehicleId">
<popupSelect v-model="dataForm.vehicleId" placeholder="请选择车辆" clearable field="vehicleId" <popupSelect v-model="dataForm.vehicleId" placeholder="请选择车辆" clearable field="vehicleId"
interfaceId="381432451370615173" :columnOptions="vehicleIdcolumnOptions" propsValue="id" interfaceId="381432451370615173" :columnOptions="vehicleIdcolumnOptions" propsValue="id"
@ -85,7 +85,7 @@
</JNPF-UploadImg> </JNPF-UploadImg>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <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%"}' <el-date-picker v-model="dataForm.poundDate" placeholder="请选择" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp"> type="date" format="yyyy-MM-dd" value-format="timestamp">
@ -93,34 +93,34 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="磅单号" prop="poundlistNo"> <el-form-item label="磅单号" prop="poundlistNo">
<el-input v-model="dataForm.poundlistNo" placeholder="请输入" clearable :style='{"width":"100%"}'> <el-input v-model="dataForm.poundlistNo" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="皮重" prop="tareWeight"> <el-form-item label="皮重" prop="tareWeight">
<el-input-number v-model="dataForm.tareWeight" :style='{"width":"100%"}'></el-input-number> <el-input-number v-model="dataForm.tareWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="毛重" prop="grossWeight"> <el-form-item label="毛重" prop="grossWeight">
<el-input-number v-model="dataForm.grossWeight" :style='{"width":"100%"}'></el-input-number> <el-input-number v-model="dataForm.grossWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="扣重" prop="buckleWeight"> <el-form-item label="扣重" prop="buckleWeight">
<el-input-number v-model="dataForm.buckleWeight" :style='{"width":"100%"}'></el-input-number> <el-input-number v-model="dataForm.buckleWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="净重" prop="netWeight"> <el-form-item label="净重" prop="netWeight">
<el-input-number v-model="dataForm.netWeight" :style='{"width":"100%"}'></el-input-number> <el-input-number v-model="dataForm.netWeight" :style='{"width":"100%"}'></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="单位 " prop="unit"> <el-form-item label="单位 " prop="unit">
<el-select v-model="unit" placeholder="请选择" clearable :style='{"width":"100%"}' @change="unitChange"> <el-select v-model="unit" placeholder="请选择" clearable :style='{"width":"100%"}' @change="unitChange">
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id" <el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id"
@ -129,7 +129,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="运输类型" prop="transportType"> <el-form-item label="运输类型" prop="transportType">
<el-select v-model="transportType" placeholder="请选择" clearable :style='{"width":"100%"}' @change="transportTypeChange"> <el-select v-model="transportType" placeholder="请选择" clearable :style='{"width":"100%"}' @change="transportTypeChange">
<el-option v-for="(item, index) in transportTypeOptions" :key="index" :label="item.fullName" <el-option v-for="(item, index) in transportTypeOptions" :key="index" :label="item.fullName"
@ -138,7 +138,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="是否垫资" prop="advance"> <el-form-item label="是否垫资" prop="advance">
<el-select v-model="advance" placeholder="请选择" clearable :style='{"width":"100%"}' @change="advanceChange"> <el-select v-model="advance" placeholder="请选择" clearable :style='{"width":"100%"}' @change="advanceChange">
<el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName" :value="item.id" <el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName" :value="item.id"
@ -147,17 +147,23 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="运费" prop="transportPrice"> <el-form-item label="运费" prop="transportPrice">
<el-input-number v-model="dataForm.transportPrice" :style='{"width":"100%"}'></el-input-number> <el-input-number v-model="dataForm.transportPrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="起始地" prop="originPlace">
<el-input v-model="dataForm.originPlace" placeholder="请输入起始地" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售价格" prop="salesPrice"> <el-form-item label="销售价格" prop="salesPrice">
<el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}'></el-input-number> <el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}'></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="业务员" prop="businessId"> <el-form-item label="业务员" prop="businessId">
<popupSelect v-model="dataForm.businessId" placeholder="请选择业务员" clearable field="businessId" <popupSelect v-model="dataForm.businessId" placeholder="请选择业务员" clearable field="businessId"
interfaceId="ebcc44be142e43b795c0d769abd6d25a" :columnOptions="businessIdcolumnOptions" interfaceId="ebcc44be142e43b795c0d769abd6d25a" :columnOptions="businessIdcolumnOptions"
@ -167,7 +173,7 @@
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="6">
<el-form-item label="自然人" prop="naturalId"> <el-form-item label="自然人" prop="naturalId">
<popupSelect v-model="dataForm.naturalId" placeholder="请选择自然人" clearable field="naturalId" <popupSelect v-model="dataForm.naturalId" placeholder="请选择自然人" clearable field="naturalId"
interfaceId="395933800510599301" :columnOptions="naturalIdcolumnOptions" propsValue="id" interfaceId="395933800510599301" :columnOptions="naturalIdcolumnOptions" propsValue="id"

Loading…
Cancel
Save