Merge remote-tracking branch 'origin/main'

# Conflicts:
#	SC-boot/linkage-scm/src/main/java/jnpf/poundlist/controller/PoundlistController.java
#	SC-boot/linkage-scm/src/main/java/jnpf/poundlist/model/poundlist/PoundlistListVO.java
product
杨世强 2 years ago
commit 23fb59bc07

@ -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) {

@ -208,6 +208,13 @@ public class PaymentController {
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);
QueryWrapper<PaymentdocEntity> paymentdocEntityWrapper = new QueryWrapper<>();
paymentdocEntityWrapper.lambda().eq(PaymentdocEntity::getDocumentNo, entity.getPaymentno());
List<PaymentdocEntity> list = paymentdocService.list(paymentdocEntityWrapper);
for (PaymentdocEntity paymentdocEntity: list) {
paymentdocEntity.setDocStatus("3");//已付款
paymentdocService.updateById(paymentdocEntity);
}
List<Payment_item0Entity> Payment_item0List = JsonUtil.getJsonToList(paymentCrForm.getPayment_item0List(),Payment_item0Entity.class); List<Payment_item0Entity> Payment_item0List = JsonUtil.getJsonToList(paymentCrForm.getPayment_item0List(),Payment_item0Entity.class);
for(Payment_item0Entity entitys : Payment_item0List){ for(Payment_item0Entity entitys : Payment_item0List){
entitys.setId(RandomUtil.uuId()); entitys.setId(RandomUtil.uuId());

@ -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);
} }

@ -176,4 +176,10 @@ public class PoundlistListVO{
/** 采购单格 **/ /** 采购单格 **/
@JsonProperty("supplierId") @JsonProperty("supplierId")
private String supplierId; private String supplierId;
@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="">
<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="单据编号" <el-form-item label="单据编号" prop="documentNo">
prop="documentNo" > <el-input v-model="dataForm.documentNo" placeholder="请输入单据编号" clearable :style='{"width":"100%"}' readonly>
<p>{{dataForm.documentNo}}</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="businessDate">
prop="businessDate" > <el-date-picker v-model="dataForm.businessDate" placeholder="请选择业务日期" clearable :style='{"width":"100%"}'
<p>{{jnpf.dateFormat(dataForm.businessDate)}}</p> type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</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="amount">
prop="amount" > <el-input-number v-model="dataForm.amount" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' readonly>
<p>{{dataForm.amount}}</p>
</el-input-number>
</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="quantity">
prop="quantity" > <el-input-number v-model="dataForm.quantity" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' readonly>
<p>{{dataForm.quantity}}</p>
</el-input-number>
</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="invoiceType">
prop="invoiceType" > <el-select v-model="dataForm.invoiceType" placeholder="请选择" :style='{"width":"100%"}'>
<p>{{ dataForm.invoiceType | dynamicText(invoiceTypeOptions) }} </p> <el-option v-for="(item, index) in invoiceTypeOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</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="currency" > <el-select v-model="dataForm.currency" placeholder="请选择" clearable :style='{"width":"100%"}'>
<p>{{ dataForm.currency | dynamicText(currencyOptions) }} </p> <el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
</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="remark">
prop="remark" > <el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
<p>{{dataForm.remark}}</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="status">
prop="status" > <el-select v-model="dataForm.status" placeholder="请选择" clearable :style='{"width":"100%"}'>
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p> <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="发票金额" <el-form-item label="发票金额" prop="invoiceAmount">
prop="invoiceAmount" > <el-input-number v-model="dataForm.invoiceAmount" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' readonly>
<p>{{dataForm.invoiceAmount}}</p>
</el-input-number>
</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="invoiceQuantity">
prop="invoiceQuantity" > <el-input-number v-model="dataForm.invoiceQuantity" placeholder="数字文本" :step="1" :precision="6" :style='{"width":"100%"}' readonly>
<p>{{dataForm.invoiceQuantity}}</p>
</el-input-number>
</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="purchaseorderId">
prop="purchaseorderId" > <popupSelect v-model="dataForm.purchaseorderId" placeholder="请选择" clearable field="purchaseorderId"
<p>{{dataForm.purchaseorderId}}</p> interfaceId="389673535976550149" :columnOptions="purchaseorderIdcolumnOptions" propsValue="id"
relationField="document_no" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20">
</popupSelect>
</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="contractId">
prop="contractId" > <popupSelect v-model="dataForm.contractId" placeholder="请选择" clearable field="contractId"
<p>{{dataForm.contractId}}</p> interfaceId="389673903103979269" :columnOptions="contractIdcolumnOptions" propsValue="id"
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20">
</popupSelect>
</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="supplierId">
prop="supplierId" > <popupSelect v-model="dataForm.supplierId" placeholder="请选择" clearable field="supplierId"
<p>{{dataForm.supplierId}}</p> interfaceId="389674191453990661" :columnOptions="supplierIdcolumnOptions" propsValue="id"
relationField="supplier_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-tabs v-model="activebzsrnx" tab-position="top" class="mb-20"> <el-tabs v-model="activebzsrnx" tab-position="top" class="mb-20">
<el-tab-pane label="应付明细"> <el-tab-pane label="应付明细">
<el-col :span="24" > <el-col :span="24">
<el-form-item label-width="0"> <el-form-item label-width="0">
<div class="JNPF-common-title"> <div class="JNPF-common-title">
<h2>设计子表</h2>
</div> </div>
<el-table :data="dataForm.invoicesitem1List" size='mini' > <el-table :data="dataForm.invoicesitem1List" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" /> <el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="materialId" label="物料"> <el-table-column prop="materialId" label="物料">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.materialId}}</p> <popupSelect v-model="scope.row.materialId" placeholder="请选择" clearable
:field="'materialId'+scope.$index" interfaceId="397736371898382533"
:columnOptions="invoicesitem1materialIdcolumnOptions" propsValue="id"
relationField="item_name" popupType="dialog" popupWidth="800px" hasPage :pageSize="20" :disabled="true">
</popupSelect>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="quantity" label="数量"> <el-table-column prop="quantity" label="结算重量">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.quantity}}</p> <el-input v-model="scope.row.quantity" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="unitPrice" label="单价"> <el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.unitPrice}}</p> <el-input v-model="scope.row.unitPrice" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="amount" label="金额"> <el-table-column prop="amount" label="金额">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.amount}}</p> <el-input v-model="scope.row.amount" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="taxRate" label="税率"> <el-table-column prop="taxRate" label="税率">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{ scope.row.taxRate | dynamicText(taxRateOptions) }}</p> <el-select v-model="scope.row.taxRate" placeholder="请选择 " clearable :style='{"width":"100%"}' :disabled="true">
<el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</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">
<p>{{scope.row.taxAmount}}</p> <el-input v-model="scope.row.taxAmount" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</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">
<p>{{scope.row.amountNotTax}}</p> <el-input v-model="scope.row.amountNotTax" placeholder="请输入" clearable
:style='{"width":"100%"}' :disabled="true">
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注信息"> <el-table-column prop="remark" label="备注信息">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.remark}}</p> <el-input v-model="scope.row.remark" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</el-input>
</template>
</el-table-column>
<el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delinvoicesitem1List(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="table-actions" @click="addinvoicesitem1List()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-tab-pane > </el-tab-pane>
<el-tab-pane label="发票明细"> <el-tab-pane label="发票明细">
<el-col :span="24" > <el-col :span="24">
<el-form-item label-width="0"> <el-form-item label-width="0">
<div class="JNPF-common-title"> <div class="JNPF-common-title">
<h2></h2> <h2></h2>
</div> </div>
<el-table :data="dataForm.invoicesitem0List" size='mini' > <el-table :data="dataForm.invoicesitem0List" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" /> <el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="materialName" label="物料名称"> <el-table-column prop="materialName" label="物料名称">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.materialName}}</p> <el-input v-model="scope.row.materialName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="invoiceCode" label="发票代码"> <el-table-column prop="invoiceCode" label="发票代码">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.invoiceCode}}</p> <el-input v-model="scope.row.invoiceCode" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="invoiceNo" label="发票号码"> <el-table-column prop="invoiceNo" label="发票号码">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.invoiceNo}}</p> <el-input v-model="scope.row.invoiceNo" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="invoiceQuantity" label="发票数量"> <el-table-column prop="invoiceQuantity" label="发票数量" width="150" >
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.invoiceQuantity}}</p> <!-- <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="invoiceAmount" label="发票金额"> <el-table-column prop="invoiceAmount" label="发票金额" width="150" >
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.invoiceAmount}}</p> <!-- <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="taxRate" label="税率"> <el-table-column prop="taxRate" label="税率">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{ scope.row.taxRate | dynamicText(taxRateOptions) }}</p> <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> </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">
<p>{{scope.row.taxAmount}}</p> <el-input v-model="scope.row.taxAmount" placeholder="请输入" clearable :style='{"width":"100%"}'>
</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">
<p>{{scope.row.amountNotTax}}</p> <el-input v-model="scope.row.amountNotTax" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="invoiceStatus" label="发票状态 "> <el-table-column prop="invoiceStatus" label="发票状态 ">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{ scope.row.invoiceStatus | dynamicText(invoiceStatusOptions) }}</p> <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creatorUserName" label="开票人"> <el-table-column prop="creatorUserName" label="开票人">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.creatorUserName}}</p> <el-input v-model="scope.row.creatorUserName" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="invoicingDate" label="开票日期"> <el-table-column prop="invoicingDate" label="开票日期">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{jnpf.dateFormat(scope.row.invoicingDate)}}</p> <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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="table-actions" @click="addinvoicesitem0List()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-tab-pane > </el-tab-pane>
</el-tabs> </el-tabs>
</el-col> </el-col>
</template> </template>
</el-form> </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
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default { export default {
components: {PrintBrowse}, components: {},
props: [], props: [],
data() { data() {
return { return {
visible: false, visible: false,
loading: false, loading: false,
printBrowseVisible: false, isDetail: false,
printId: '',
dataForm: { dataForm: {
id :'', documentNo: '',
documentNo : '', businessDate: '',
businessDate : '', amount: 0,
amount : 0, quantity: 0,
quantity : 0, invoiceType: "1",
invoiceType : "1", currency: "",
currency : "", remark: '',
remark : '', status: "0",
status : "0", invoiceAmount: 0,
invoiceAmount : 0, invoiceQuantity: 0,
invoiceQuantity : 0, purchaseorderId: "",
purchaseorderId : "", contractId: "",
contractId : "", supplierId: "",
supplierId : "", invoicesitem1List: [],
invoicesitem1List:[], invoicesitem0List: [],
invoicesitem0List:[],
}, },
activebzsrnx:'1', activebzsrnx: '0',
invoiceTypeOptions:[{"fullName":"普通增值税发票","id":"1"},{"fullName":"专用增值税发票","id":"2"},{"fullName":"增值税电子普通发票","id":"3"},{"fullName":"增值税电子发票","id":"4"}], rules: {},
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}], invoiceTypeOptions: [{
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}], "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"
}],
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"
}, ],
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"}], invoicesitem1materialIdcolumnOptions: [{
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"}], "label": "物料编码",
invoiceStatusOptions:[{"fullName":"正常","id":"0"},{"fullName":"红冲","id":"1"},{"fullName":"作废","id":"2"}], "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: {}, computed: {},
watch: {}, watch: {},
created() { created() {},
},
mounted() {}, mounted() {},
methods: { methods: {
dataInfo(dataAll){ invoiceQuantityChange(e){
let _dataAll =dataAll var invoiceQuantity = 0;
for(let i=0;i<_dataAll.invoicesitem1List.length;i++){ this.dataForm.invoicesitem0List.forEach((item, index)=>{
var _list = _dataAll.invoicesitem1List[i]; 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];
} }
for(let i=0;i<_dataAll.invoicesitem0List.length;i++){ return isOk;
var _list = _dataAll.invoicesitem0List[i]; },
_list.invoicingDate = _list.invoicingDate ? jnpf.dateFormat(_list.invoicingDate) : '' invoicesitem0Exist() {
let isOk = true;
for (let i = 0; i < this.dataForm.invoicesitem0List.length; i++) {
const e = this.dataForm.invoicesitem0List[i];
} }
this.dataForm = _dataAll return isOk;
}, },
clearData(data) {
init(id) { 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.dataForm.id = id || 0;
this.visible = true; this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => { this.$nextTick(() => {
if(this.dataForm.id){ this.$refs['elForm'].resetFields();
if (this.dataForm.id) {
this.loading = true this.loading = true
request({ request({
url: '/api/invoices/Invoices/detail/'+this.dataForm.id, url: '/api/invoices/Invoices/' + this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
this.loading = false 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="">
<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="单据编号" <el-form-item label="单据编号" prop="documentno">
prop="documentno" > <el-input v-model="dataForm.documentno" placeholder="系统自动生成" readonly>
<p>{{dataForm.documentno}}</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="供应商" required prop="suppliername">
prop="suppliername" > <el-input v-model="dataForm.suppliername" placeholder="请输入付款账户" clearable :style='{"width":"100%"}'>
<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"
:value="item.id" :disabled="item.disabled"></el-option>
</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="paymentaccount">
prop="paymentaccount" > <el-input v-model="dataForm.paymentaccount" placeholder="请输入付款账户" clearable :style='{"width":"100%"}'>
<p>{{dataForm.paymentaccount}}</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="paymentbank">
prop="paymentbank" > <el-input v-model="dataForm.paymentbank" placeholder="请输入付款银行" clearable :style='{"width":"100%"}'>
<p>{{dataForm.paymentbank}}</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="paymentamount">
prop="paymentamount" > <el-input v-model="dataForm.paymentamount" placeholder="请输入付款金额" clearable :style='{"width":"100%"}'>
<p>{{dataForm.paymentamount}}</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="collectionaccount" > <el-input v-model="dataForm.collectionaccount" placeholder="请输入" clearable :style='{"width":"100%"}'>
<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="collectionbank">
prop="collectionbank" > <el-input v-model="dataForm.collectionbank" placeholder="请输入" clearable :style='{"width":"100%"}'>
<p>{{dataForm.collectionbank}}</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="requestedamount">
prop="requestedamount" > <el-input v-model="dataForm.requestedamount" placeholder="请输入" clearable :style='{"width":"100%"}'>
<p>{{dataForm.requestedamount}}</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="duedate">
prop="duedate" > <el-date-picker v-model="dataForm.duedate" placeholder="请选择" clearable :style='{"width":"100%"}'
<p>{{jnpf.dateFormat(dataForm.duedate)}}</p> type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker>
</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="currency" > <el-select v-model="dataForm.currency" placeholder="请选择" clearable :style='{"width":"100%"}'>
<p>{{ dataForm.currency | dynamicText(currencyOptions) }} </p> <el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
</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="结算类型" required prop="settlementtype">
prop="settlementtype" > <el-select v-model="dataForm.settlementtype" placeholder="请选择" clearable :style='{"width":"100%"}'>
<p>{{ dataForm.settlementtype | dynamicText(settlementtypeOptions) }} </p> <el-option v-for="(item, index) in settlementtypeOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</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="paymentno">
prop="paymentno" > <el-input v-model="dataForm.paymentno" placeholder="请输入" clearable :style='{"width":"100%"}'>
<p>{{dataForm.paymentno}}</p>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="16" > <el-col :span="16">
<el-form-item label="备注" <el-form-item label="备注" prop="remark">
prop="remark" > <el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
<p>{{dataForm.remark}}</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="status">
prop="status" > <el-select v-model="dataForm.status" placeholder="请选择" clearable :style='{"width":"100%"}'>
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p> <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-tabs v-model="activeivpzpd" tab-position="top" class="mb-20"> <el-tabs v-model="activeivpzpd" tab-position="top" class="mb-20">
<el-tab-pane label="申请明细"> <el-tab-pane label="申请明细">
<el-col :span="24" > <el-col :span="24">
<el-form-item label-width="0"> <el-form-item label-width="0">
<div class="JNPF-common-title"> <div class="JNPF-common-title">
<h2></h2> <h2></h2>
</div> </div>
<el-table :data="dataForm.payment_item0List" size='mini' > <el-table :data="dataForm.payment_item0List" size='mini' show-summary :summary-method="getSummaries" >
<el-table-column type="index" width="50" label="序号" align="center" /> <el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="amount" label="付款金额"> <el-table-column prop="amount" width="150" label="付款金额" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.amount" placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="requestAmount" width="150" label="申请金额">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.amount}}</p> <el-input v-model="scope.row.requestAmount" placeholder="请输入" clearable
:style='{"width":"100%"}' readonly>
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creatorUserId" label="申请金额"> <el-table-column prop="allAmount" width="150" label="订单金额">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.creatorUserId}}</p> <el-input v-model="scope.row.allAmount" placeholder="请输入" clearable
:style='{"width":"100%"}' readonly>
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creatorUserName" label="订单金额"> <el-table-column prop="payPrice" width="150" label="已付金额" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.creatorUserName}}</p> <el-input v-model="scope.row.payPrice" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="lastModifyUserId" label="已付金额"> <el-table-column prop="documentNo" width="150" label="订单编号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.lastModifyUserId}}</p> <el-input v-model="scope.row.documentNo" placeholder="请输入" clearable
:style='{"width":"100%"}' readonly>
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="lastModifyUserName" label="订单编号"> <el-table-column prop="contractNo" width="150" label="合同编码" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.lastModifyUserName}}</p> <el-input v-model="scope.row.contractNo" placeholder="请输入" clearable
:style='{"width":"100%"}' readonly>
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="lastModifyTime" label="合同编码"> <el-table-column prop="num" width="150" label="结算重量" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.lastModifyTime}}</p> <el-input v-model="scope.row.num" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="deleteUserId" label="重量"> <el-table-column prop="advanceAmount" width="150" label="垫资金额" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.deleteUserId}}</p> <el-input v-model="scope.row.advanceAmount" placeholder="请输入" clearable
:style='{"width":"100%"}' readonly>
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="deleteTime" label="垫资金额"> <el-table-column prop="rate" width="150" label="税额" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.deleteTime}}</p> <el-input v-model="scope.row.rate" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="orgnizeId" label="税额"> <el-table-column prop="notAmount" width="150" label="不含税金额" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.orgnizeId}}</p> <el-input v-model="scope.row.notAmount" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="departmentId" label="不含税金额"> <el-table-column prop="creatorTime" label="业务日期" align="center" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.departmentId}}</p> <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creatorTime" label="业务日期"> <el-table-column label="操作" width="50" align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{jnpf.dateFormat(scope.row.creatorTime)}}</p> <el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delpayment_item0List(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="table-actions" @click="addpayment_item0List()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-tab-pane > </el-tab-pane>
</el-tabs> </el-tabs>
</el-col> </el-col>
</template> </template>
</el-form> </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
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default { export default {
components: {PrintBrowse}, components: {},
props: [], props: [],
data() { data() {
return { return {
excludeFields: [],
visible: false, visible: false,
loading: false, loading: false,
printBrowseVisible: false, isDetail: false,
printId: '',
dataForm: { dataForm: {
id :'', documentno: '',
documentno : '', suppliername: '',
suppliername : '', paymenttype: "0",
paymenttype : "0", paymentaccount: '',
paymentaccount : '', paymentbank: '',
paymentbank : '', paymentamount: '',
paymentamount : '', collectionaccount: '',
collectionaccount : '', collectionbank: '',
collectionbank : '', requestedamount: '',
requestedamount : '', duedate: '',
duedate : '', currency: "0",
currency : "0", settlementtype: "0",
settlementtype : "0", paymentno: '',
paymentno : '', remark: '',
remark : '', status: "0",
status : "0", payment_item0List: [],
payment_item0List:[], },
}, activeivpzpd: '0',
activeivpzpd:'0', rules: {
paymenttypeOptions:[{"fullName":"贷款","id":"0"},{"fullName":"运费","id":"1"},{"fullName":"仓储","id":"2"}], suppliername: [],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}], paymentaccount: [],
settlementtypeOptions:[{"fullName":"现金","id":"0"},{"fullName":"赊购","id":"1"},{"fullName":"网银","id":"2"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}], paymentamount: [{
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"},{"fullName":"已付款","id":"3"}], required: true,
message: '请输入付款金额',
trigger: 'blur'
},
{
pattern: /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/,
message: '请输入正确的金额',
trigger: 'blur'
},
],
},
paymenttypeOptions: [{
"fullName": "贷款",
"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: {}, computed: {},
watch: {}, watch: {
created() { dataForm: {
deep: true,
handler: function() {
this.popupSelect()
}
}
}, },
created() {},
mounted() {}, mounted() {},
methods: { methods: {
dataInfo(dataAll){ getSummaries(param) {
let _dataAll =dataAll const { columns, data } = param;
for(let i=0;i<_dataAll.payment_item0List.length;i++){ const sums = [];
var _list = _dataAll.payment_item0List[i]; columns.forEach((column, index) => {
_list.creatorTime = _list.creatorTime ? jnpf.dateFormat(_list.creatorTime) : '' if (index === 0) {
sums[index] = '合计';
return;
} }
this.dataForm = _dataAll 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;
},
popupSelect() {
let amount = 0
for (let i = 0; i < this.dataForm.payment_item0List.length; i++) {
amount = amount + parseFloat(this.dataForm.payment_item0List[i].amount);
}
parseFloat(this.dataForm.paymentamount = amount)
}, },
init(id) { 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.dataForm.id = id || 0;
this.visible = true; this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => { this.$nextTick(() => {
if(this.dataForm.id){ this.$refs['elForm'].resetFields();
if (this.dataForm.id) {
this.loading = true this.loading = true
request({ request({
url: '/api/payment/Payment/detail/'+this.dataForm.id, url: '/api/payment/Payment/' + this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
this.loading = false 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,8 +343,9 @@
}) })
}).catch(() => {}); }).catch(() => {});
}, },
fukuanHandle(id, flowState){ fukuanHandle(id, flowState, docStatus){
if(flowState == 2){ if(flowState == 2){
if(docStatus == 0){
this.formVisible = true this.formVisible = true
this.$nextTick(() => { this.$nextTick(() => {
request({ request({
@ -353,6 +355,15 @@
this.$refs.JNPFForm.init(res.data) 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="单据编号" <el-form-item label="单据编号" prop="documentNo">
prop="documentNo" > <el-input v-model="dataForm.documentNo" placeholder="请输入" clearable
<p>{{dataForm.documentNo}}</p> :style='{"width":"100%"}' :disabled="true">
</el-form-item>
</el-col> </el-input>
<el-col :span="8" >
<el-form-item label="采购订单"
prop="purchaseOrderId" >
<p>{{dataForm.purchaseOrderId}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="币别 "
prop="currency" >
<p>{{ dataForm.currency | dynamicText(currencyOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="退货金额"
prop="refundAmount" >
<p>{{dataForm.refundAmount}}</p>
</el-form-item>
</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-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="供应商名称" <el-form-item label="采购订单" prop="purchaseOrderId">
prop="jnpf_jg_purchaseorder_jnpf_supplierName" > <popupSelect v-model="dataForm.purchaseOrderId" placeholder="请选择" clearable
<p>{{dataForm.jnpf_jg_purchaseorder_jnpf_supplierName}}</p> field="purchaseOrderId" interfaceId="383149471917185157"
:columnOptions="purchaseOrderIdcolumnOptions" :excludeFields="excludeFields" propsValue="id"
relationField="document_no" popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="popupSelectChange">
</popupSelect>
</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="actualAmount" > <el-select v-model="dataForm.currency" placeholder="请选择" clearable
<p>{{dataForm.actualAmount}}</p> :style='{"width":"100%"}'>
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</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="refundAmount">
prop="status" > <el-input v-model="dataForm.refundAmount" clearable :style='{"width":"100%"}' :disabled="true">
<p>{{ dataForm.status | dynamicText(statusOptions) }} </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="refundNum">
prop="creatorTime" > <el-input v-model="dataForm.refundNum" clearable :style='{"width":"100%"}' :disabled="true">
<p>{{dataForm.creatorTime}}</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="remark">
prop="creatorUserName" > <el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
<p>{{dataForm.creatorUserName}}</p>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-tabs v-model="activeyrmekt" tab-position="top" class="mb-20"> <el-tabs v-model="activeyrmekt" tab-position="top" class="mb-20">
<el-tab-pane label="磅单明细"> <el-tab-pane label="磅单明细">
<el-col :span="24" > <el-col :span="24">
<el-form-item label-width="0"> <el-form-item label-width="0">
<div class="JNPF-common-title"> <div class="JNPF-common-title">
<h2></h2> <h2></h2>
</div> </div>
<el-table :data="dataForm.purchaseback_item0List" size='mini' > <el-table :data="dataForm.purchaseback_item0List" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" /> <el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="licenseNum" label="车牌号"> <el-table-column prop="vehicleId" label="车辆" align="center" width="130">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.licenseNum}}</p> <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="materialName" label="物料名称"> <el-table-column prop="materialId" label="物料" align="center" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.materialName}}</p> <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="settlement" label="结算重量 "> <el-table-column prop="settlement" label="结算重量 ">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.settlement}}</p> <el-input v-model="scope.row.settlement" placeholder="请输入" clearable
:style='{"width":"100%"}' :disabled="true">
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="unit" label="计量单位 "> <el-table-column prop="unit" label="计量单位 ">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{ scope.row.unit | dynamicText(unitOptions) }}</p> <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="price" label="采购单价"> <el-table-column prop="price" label="采购单价">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.price}}</p> <el-input v-model="scope.row.price" placeholder="请输入" clearable
:style='{"width":"100%"}' :disabled="true">
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="rate" label="税率 "> <el-table-column prop="rate" label="税率 ">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{ scope.row.rate | dynamicText(rateOptions) }}</p> <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="amount" label="应退金额"> <el-table-column prop="amount" label="应退金额">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.amount}}</p> <el-input v-model="scope.row.amount" placeholder="请输入" clearable
:style='{"width":"100%"}' :disabled="true">
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="notAmount" label="税额"> <el-table-column prop="notAmount" label="税额">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.notAmount}}</p> <el-input v-model="scope.row.notAmount" placeholder="请输入" clearable
:style='{"width":"100%"}' :disabled="true">
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="pountUser" label="业务员"> <el-table-column prop="pountUser" label="业务员">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.pountUser}}</p> <el-input v-model="scope.row.pountUser" placeholder="请输入" clearable
:style='{"width":"100%"}' :disabled="true">
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="pountType" label="磅单类型 "> <el-table-column prop="pountType" label="磅单类型 ">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{ scope.row.pountType | dynamicText(pountTypeOptions) }}</p> <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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="table-actions" @click="addpurchaseback_item0List()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-tab-pane > </el-tab-pane>
</el-tabs> </el-tabs>
</el-col> </el-col>
</template> </template>
</el-form> <Form v-if="formVisible" ref="form" />
</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
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default { export default {
components: {PrintBrowse}, components: { },
props: [], props: [],
data() { data() {
return { return {
bissId: '380716763022647941',
excludeFields: [],
formVisible: false,
visible: false, visible: false,
loading: false, loading: false,
printBrowseVisible: false, isDetail: false,
printId: '',
dataForm: { dataForm: {
id :'', documentNo: '',
documentNo : '', purchaseOrderId: "",
purchaseOrderId : "", currency: "0",
currency : "0", refundAmount: '',
refundAmount : '', refundNum: '',
refundNum : '', remark: '',
remark : '', actualAmount: '',
actualAmount : '', status: "0",
status : "0", creatorTime: "",
creatorTime : "", creatorUserName: "",
creatorUserName : "", purchaseback_item0List: [],
purchaseback_item0List:[], jg_purchaseorder: {
jg_purchaseorder: contractName: '',
{ supplierName: '',
contractName:'',
supplierName:'',
}, },
jnpf_jg_purchaseorder_jnpf_contractName:'', jnpf_jg_purchaseorder_jnpf_contractName: '',
jnpf_jg_purchaseorder_jnpf_supplierName:'', jnpf_jg_purchaseorder_jnpf_supplierName: '',
}, },
activeyrmekt:'0', activeyrmekt: '0',
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}], rules: {},
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}], 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"
}],
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}], purchaseback_item0licenseNumcolumnOptions: [{
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"}], "label": "车牌号",
pountTypeOptions:[{"fullName":"贸易","id":"0"},{"fullName":"其他","id":"1"}], "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: {}, computed: {},
watch: {}, watch: {},
created() { created() {},
},
mounted() {}, mounted() {},
methods: { methods: {
dataInfo(dataAll){ popupSelectChange2(a, b){
let _dataAll =dataAll var excludeFields = [];
_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 < this.dataForm.purchaseback_item0List.length; i++) {
for(let i=0;i<_dataAll.purchaseback_item0List.length;i++){ excludeFields.push(this.dataForm.purchaseback_item0List[i].licenseNo);
var _list = _dataAll.purchaseback_item0List[i]; 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.dataForm = _dataAll }
this.excludeFields = excludeFields;
}, },
popupSelectChange(e,d){
init(id) { 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.dataForm.id = id || 0;
this.visible = true; this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => { this.$nextTick(() => {
if(this.dataForm.id){ this.$refs['elForm'].resetFields();
if (this.dataForm.id) {
this.loading = true this.loading = true
request({ request({
url: '/api/purchaseback/Purchaseback/detail/'+this.dataForm.id, url: '/api/purchaseback/Purchaseback/' + this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
this.loading = false 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="">
<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="单据编号" <el-form-item label="单据编号" prop="documentno">
prop="documentno" > <el-input v-model="dataForm.documentno" placeholder="系统自动生成" readonly>
<p>{{dataForm.documentno}}</p>
</el-form-item> </el-input>
</el-col>
<el-col :span="8" >
<el-form-item label="业务类型"
prop="type" >
<p>{{ dataForm.type | dynamicText(typeOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="来源单号"
prop="souceno" >
<p>{{dataForm.souceno}}</p>
</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="业务类型" required prop="type">
prop="receiptamount" > <el-select v-model="dataForm.type" placeholder="请选择业务类型" clearable :style='{"width":"100%"}'>
<p>{{dataForm.receiptamount}}</p> <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8" > <el-col :span="8">
<el-form-item label="币别" <!-- <el-form-item label="来源单号" required prop="souceno">
prop="currency" > <popupSelect v-model="dataForm.souceno" placeholder="请选择" clearable field="souceno"
<p>{{ dataForm.currency | dynamicText(currencyOptions) }} </p> interfaceId="392931756640102277" :columnOptions="soucenocolumnOptions" propsValue="document_no"
relationField="document_no" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
@change="popupSelect">
</popupSelect>
</el-form-item> -->
<el-form-item label="来源单号" prop="souceno">
<popupSelect v-model="dataForm.souceno" placeholder="请选择" clearable field="souceno"
interfaceId="392931756640102277" :columnOptions="soucenocolumnOptions" propsValue="id"
relationField="document_no" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20">
</popupSelect>
</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="receiptamount">
prop="receiptnum" > <el-input v-model="dataForm.receiptamount" placeholder="请输入入库金额" readonly>
<p>{{dataForm.receiptnum}}</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="currency">
prop="suppliername" > <el-select v-model="dataForm.currency" placeholder="请选择币别" readonly>
<p>{{dataForm.suppliername}}</p> <el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="16" > <el-col :span="8">
<el-form-item label="备注" <el-form-item label="入库重量" prop="receiptnum">
prop="remark" > <el-input v-model="dataForm.receiptnum" placeholder="请输入入库重量" readonly>
<p>{{dataForm.remark}}</p>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="8">
<el-form-item label="入库日期" <!-- <el-form-item label="供应商名称" prop="suppliername">
prop="warehousingdate" > <el-input v-model="dataForm.suppliername" placeholder="请输入供应商名称" readonly>
<p>{{jnpf.dateFormat(dataForm.warehousingdate)}}</p>
</el-input>
</el-form-item> -->
<el-form-item label="供应商id" prop="supplierId">
<popupSelect v-model="dataForm.supplierId" placeholder="请选择" clearable field="supplierId"
interfaceId="397751667988199621" :columnOptions="supplierIdcolumnOptions" propsValue="id"
relationField="supplier_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="16">
<el-form-item label="单据状态" <el-form-item label="备注" prop="remark">
prop="status" > <el-input v-model="dataForm.remark" placeholder="请输入供应商名称" clearable :style='{"width":"100%"}'>
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="12" >-->
<!-- <el-form-item label="入库日期"-->
<!-- prop="warehousingdate" >-->
<!-- <el-date-picker v-model="dataForm.warehousingdate"-->
<!-- placeholder="请选择入库日期" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12" >-->
<!-- <el-form-item label="单据状态"-->
<!-- prop="status" >-->
<!-- <el-select v-model="dataForm.status"-->
<!-- placeholder="请选择单据状态" clearable :style='{"width":"100%"}'>-->
<!-- <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="24"> <el-col :span="24">
<el-tabs v-model="activevpzhms" tab-position="top" class="mb-20"> <el-tabs v-model="activevpzhms" tab-position="top" class="mb-20">
<el-tab-pane label="磅单明细"> <el-tab-pane label="磅单明细">
<el-col :span="24" > <el-col :span="24">
<el-form-item label-width="0"> <el-form-item label-width="0">
<div class="JNPF-common-title"> <div class="JNPF-common-title">
<h2></h2> <h2></h2>
</div> </div>
<el-table :data="dataForm.receiptin_item0List" size='mini' > <el-table :data="dataForm.receiptin_item0List" size='mini' show-summary
:summary-method="getSummaries">
<el-table-column type="index" width="50" label="序号" align="center" /> <el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="licenseno" label="车牌号"> <!-- <el-table-column prop="licenseno" width="140" label="车牌号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.licenseno}}</p> <popupSelect v-model="scope.row.licenseno" placeholder="请选择" clearable
:field="'licenseno'+scope.$index" interfaceId="392933121244325765"
:columnOptions="receiptin_item0licensenocolumnOptions" propsValue="license_num"
relationField="license_num" popupType="dialog" popupWidth="1000px" popupTitle="选择车牌"
:bissId="dataForm.souceno" :excludeFields="excludeFields" @change="popupSelect2">
</popupSelect>
</template>
</el-table-column> -->
<el-table-column prop="vehicleId" width="150" label="车辆">
<template slot-scope="scope">
<popupSelect v-model="scope.row.vehicleId" placeholder="请选择" clearable
:field="'vehicleId'+scope.$index" interfaceId="392933121244325765"
:columnOptions="jg_receiptin_item0vehicleIdcolumnOptions" propsValue="vehicle_id"
relationField="ticketno" :bissId="dataForm.souceno" popupType="dialog" popupWidth="800px" @change="popupSelect2"
hasPage :pageSize="20" :disabled="true">
</popupSelect>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="materialname" label="物料名称"> <el-table-column prop="materialId" width="200" label="物料">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.materialname}}</p> <popupSelect v-model="scope.row.materialId" placeholder="请选择" clearable
:field="'materialId'+scope.$index" interfaceId="398448695651178885"
:columnOptions="jg_receiptin_item0materialIdcolumnOptions" propsValue="id"
relationField="item_name" popupType="dialog" popupWidth="800px" hasPage :pageSize="20" :disabled="true">
</popupSelect>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="reservoirareaId" label="库区名称"> <!-- <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"> <template slot-scope="scope">
<p>{{scope.row.reservoirareaId}}</p> <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="warehouseId" label="仓库名称"> <el-table-column prop="warehouseId" width="150" label="仓库">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.warehouseId}}</p> <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="num" label="入库重量">
<!-- <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"> <template slot-scope="scope">
<p>{{scope.row.num}}</p> <el-input v-model="scope.row.num" placeholder="请输入" clearable @input="inputChange()"
:disabled="true">
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="unit" label="计量单位"> <el-table-column prop="unit" width="140" label="计量单位" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{ scope.row.unit | dynamicText(unitOptions) }}</p> <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="price" label="单价"> <el-table-column prop="price" width="140" label="单价" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.price}}</p> <el-input v-model="scope.row.price" placeholder="请输入" clearable :disabled="true">
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="rate" label="税率"> <el-table-column prop="rate" width="140" label="税率" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{ scope.row.rate | dynamicText(rateOptions) }}</p> <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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="amount" label="金额"> <el-table-column prop="amount" width="140" label="金额" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.amount}}</p> <el-input v-model="scope.row.amount" placeholder="请输入" clearable @input="inputChange()"
:disabled="true">
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="rateamount" label="税额"> <el-table-column prop="rateamount" width="140" label="税额" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.rateamount}}</p> <el-input v-model="scope.row.rateamount" placeholder="请输入" clearable :disabled="true">
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="batchno" label="批次号"> <!-- <el-table-column prop="batchno" width="140" label="批次号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{scope.row.batchno}}</p> <el-input v-model="scope.row.batchno" placeholder="请输入" clearable :disabled="true">
</el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="poundType" label="磅单类型"> <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"> <template slot-scope="scope">
<p>{{ scope.row.poundType | dynamicText(poundTypeOptions) }}</p> <el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delreceiptin_item0List(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="table-actions" @click="addreceiptin_item0List()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-tab-pane > </el-tab-pane>
</el-tabs> </el-tabs>
</el-col> </el-col>
</template> </template>
</el-form> </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
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default { export default {
components: {PrintBrowse}, components: {},
props: [], props: [],
data() { data() {
return { return {
excludeFields: [],
visible: false, visible: false,
loading: false, loading: false,
printBrowseVisible: false, isDetail: false,
printId: '',
dataForm: { dataForm: {
id :'', documentno: '',
documentno : '', type: "",
type : "", souceno: "",
souceno : "", receiptamount: 0,
receiptamount : '', currency: "0",
currency : "0", receiptnum: 0,
receiptnum : '', suppliername: '',
suppliername : '', remark: '',
remark : '', warehousingdate: '',
warehousingdate : '', status: "0",
status : "0", creatorTime: "",
creatorTime : "", creatorUserName: "",
creatorUserName : "", receiptin_item0List: [],
receiptin_item0List:[], },
}, activevpzhms: '0',
activevpzhms:'0', rules: {},
typeOptions:[{"fullName":"采购入库","id":"0"},{"fullName":"购销入库","id":"1"}], typeOptions: [{
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}], "fullName": "采购入库",
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}], "id": "0"
}, {
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}], "fullName": "购销入库",
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"}], "id": "1"
poundTypeOptions:[{"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: [{
"label": "车牌号",
"value": "ticketno"
}, {
"label": "物料名称",
"value": "material"
}, {
"label": "库区名称",
"value": "areaName"
}, {
"label": "仓库名称",
"value": "houseName"
}, {
"label": "入库数量",
"value": "settlement"
}, {
"label": "计量单位",
"value": "unitName"
}, {
"label": "单价",
"value": "price"
}, {
"label": "税率",
"value": "rate"
}, {
"label": "金额",
"value": "amount"
}, {
"label": "批次号",
"value": "poundlist_id"
}, {
"label": "磅单类型",
"value": "pount_type"
}, ],
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: {}, computed: {},
watch: {}, watch: {},
created() { created() {},
},
mounted() {}, mounted() {},
methods: { methods: {
dataInfo(dataAll){ getSummaries(param) {
let _dataAll =dataAll const {
for(let i=0;i<_dataAll.receiptin_item0List.length;i++){ columns,
var _list = _dataAll.receiptin_item0List[i]; data
} = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
} }
this.dataForm = _dataAll 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] = '';
}
});
init(id) { 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.dataForm.id = id || 0;
this.visible = true; this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => { this.$nextTick(() => {
if(this.dataForm.id){ this.$refs['elForm'].resetFields();
if (this.dataForm.id) {
this.loading = true this.loading = true
request({ request({
url: '/api/receiptin/Receiptin/detail/'+this.dataForm.id, url: '/api/receiptin/Receiptin/' + this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
this.loading = false 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>

@ -0,0 +1,68 @@
<template>
<el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible"
class="JNPF-dialog JNPF-dialog_center" lock-scroll width="600px">
<el-form label-position="top" label-width="80px">
<el-form-item label="数据选择">
<el-radio-group v-model="type">
<el-radio :label="0">当前页面数据</el-radio>
<el-radio :label="1">全部页面数据</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="导出字段">
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll"
@change="handleCheckAllChange">全选</el-checkbox>
<el-checkbox-group v-model="columns" @change="handleCheckedChange">
<el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop">
{{item.label}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible=false"> </el-button>
<el-button type="primary" @click="downLoad"> </el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data() {
return {
visible: false,
btnLoading: false,
type: 0,
columns: [],
checkAll: true,
isIndeterminate: false,
columnList: []
}
},
methods: {
init(columnList) {
this.visible = true
this.checkAll = true
this.isIndeterminate = false
this.columnList = columnList
this.columns = columnList.map(o => o.prop)
},
handleCheckAllChange(val) {
this.columns = val ? this.columnList.map(o => o.prop) : [];
this.isIndeterminate = false;
},
handleCheckedChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount === this.columnList.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length;
},
downLoad() {
this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') })
}
}
}
</script>
<style lang="scss" scoped>
>>> .el-dialog__body {
padding: 20px !important;
}
</style>

@ -0,0 +1,241 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<!-- <el-col :span="6">
<el-form-item label="合同编码">
<el-input v-model="query.contractCode" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="合同名称">
<el-input v-model="query.contractName" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item>
</el-col> -->
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()" />
</el-tooltip>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange" border>
<el-table-column prop="contractCode" label="业务类型" width="200" align="center" sortable />
<el-table-column prop="contractName" label="采购单位" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="采购吨位" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="采购金额(元)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="付款金额" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="应付余额(元)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="销售单位" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="销售吨位" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="销售金额(元)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="回款金额(元)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="应收余额(元)" width="200" align="center" sortable />
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
</div>
</template>
<script>
import request from '@/utils/request'
import ExportBox from './ExportBox'
export default {
components: {
ExportBox
},
data() {
return {
query: {
contractCode: undefined,
contractName: undefined
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id'
},
list: [],
listLoading: true,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: ''
},
exportBoxVisible: false,
columnList: [{
prop: 'contractCode',
label: '合同编码'
},
{
prop: 'contractName',
label: '合同名称'
},
{
prop: 'contractNo',
label: '对方合同号'
},
{
prop: 'contractType',
label: '合同类型 '
},
{
prop: 'classification',
label: '合同分类 '
},
{
prop: 'declarationDate',
label: '申报日期'
},
{
prop: 'name',
label: '供应商/客户名'
},
{
prop: 'num',
label: '数量'
},
{
prop: 'amount',
label: '金额'
},
{
prop: 'deptName',
label: '部门名称'
},
{
prop: 'remark',
label: '备注'
},
{
prop: 'creatorusername',
label: '录入人'
},
{
prop: 'status',
label: '合同状态'
},
{
prop: 'approval',
label: '集团审批'
}
],
}
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.initData()
},
methods: {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
initData() {
this.listLoading = true
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/example/ContractFile/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = []
for (let i = 0; i < res.data.list.length; i++) {
res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0, 10) : '';
let _data = res.data.list[i]
_list.push(_data)
}
this.list = _list
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/example/ContractFile/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: 'contractCode'
}
this.initData()
},
refresh(isrRefresh) {
if (isrRefresh) this.reset()
},
reset() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
}
</script>

@ -0,0 +1,253 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<!-- <el-col :span="6">
<el-form-item label="合同编码">
<el-input v-model="query.contractCode" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="合同名称">
<el-input v-model="query.contractName" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item>
</el-col> -->
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()" />
</el-tooltip>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange" border>
<el-table-column prop="contractCode" label="合同签订日期" width="200" align="center" sortable />
<el-table-column prop="contractName" label="合同状态" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="采购合同" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="销售合同" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="销售合同回款期" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="采购合同编号" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="销售合同编号" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="货物名称" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="合同量(吨)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="合同采购单价(含税)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="合同销售单价(含税)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="采购合同金额(元)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="销售合同金额(元)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="吨毛利(元)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="保证金(元)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="付款金额(采购)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="回款金额(销售)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="结算量" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="结算单价(采购)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="结算单价(销售)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="结算采购金额(含税)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="结算销售金额(含税)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="实际毛利" width="200" align="center" sortable />
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
</div>
</template>
<script>
import request from '@/utils/request'
import ExportBox from './ExportBox'
export default {
components: {
ExportBox
},
data() {
return {
query: {
contractCode: undefined,
contractName: undefined
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id'
},
list: [],
listLoading: true,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: ''
},
exportBoxVisible: false,
columnList: [{
prop: 'contractCode',
label: '合同编码'
},
{
prop: 'contractName',
label: '合同名称'
},
{
prop: 'contractNo',
label: '对方合同号'
},
{
prop: 'contractType',
label: '合同类型 '
},
{
prop: 'classification',
label: '合同分类 '
},
{
prop: 'declarationDate',
label: '申报日期'
},
{
prop: 'name',
label: '供应商/客户名'
},
{
prop: 'num',
label: '数量'
},
{
prop: 'amount',
label: '金额'
},
{
prop: 'deptName',
label: '部门名称'
},
{
prop: 'remark',
label: '备注'
},
{
prop: 'creatorusername',
label: '录入人'
},
{
prop: 'status',
label: '合同状态'
},
{
prop: 'approval',
label: '集团审批'
}
],
}
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.initData()
},
methods: {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
initData() {
this.listLoading = true
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/example/ContractFile/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = []
for (let i = 0; i < res.data.list.length; i++) {
res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0, 10) : '';
let _data = res.data.list[i]
_list.push(_data)
}
this.list = _list
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/example/ContractFile/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: 'contractCode'
}
this.initData()
},
refresh(isrRefresh) {
if (isrRefresh) this.reset()
},
reset() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
}
</script>

@ -0,0 +1,237 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<!-- <el-col :span="6">
<el-form-item label="合同编码">
<el-input v-model="query.contractCode" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="合同名称">
<el-input v-model="query.contractName" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item>
</el-col> -->
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()" />
</el-tooltip>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange" border>
<el-table-column prop="contractCode" label="日期" width="200" align="center" sortable />
<el-table-column prop="contractName" label="当日收款(懿丰)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="当日付款(诚通)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="当日资金占用余额(元)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="日利率‰" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="日资金占用费用(元)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="12月份账面毛利(含税)" width="200" align="center" sortable />
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
</div>
</template>
<script>
import request from '@/utils/request'
import ExportBox from './ExportBox'
export default {
components: {
ExportBox
},
data() {
return {
query: {
contractCode: undefined,
contractName: undefined
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id'
},
list: [],
listLoading: true,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: ''
},
exportBoxVisible: false,
columnList: [{
prop: 'contractCode',
label: '合同编码'
},
{
prop: 'contractName',
label: '合同名称'
},
{
prop: 'contractNo',
label: '对方合同号'
},
{
prop: 'contractType',
label: '合同类型 '
},
{
prop: 'classification',
label: '合同分类 '
},
{
prop: 'declarationDate',
label: '申报日期'
},
{
prop: 'name',
label: '供应商/客户名'
},
{
prop: 'num',
label: '数量'
},
{
prop: 'amount',
label: '金额'
},
{
prop: 'deptName',
label: '部门名称'
},
{
prop: 'remark',
label: '备注'
},
{
prop: 'creatorusername',
label: '录入人'
},
{
prop: 'status',
label: '合同状态'
},
{
prop: 'approval',
label: '集团审批'
}
],
}
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.initData()
},
methods: {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
initData() {
this.listLoading = true
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/example/ContractFile/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = []
for (let i = 0; i < res.data.list.length; i++) {
res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0, 10) : '';
let _data = res.data.list[i]
_list.push(_data)
}
this.list = _list
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/example/ContractFile/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: 'contractCode'
}
this.initData()
},
refresh(isrRefresh) {
if (isrRefresh) this.reset()
},
reset() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
}
</script>

@ -0,0 +1,236 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<!-- <el-col :span="6">
<el-form-item label="合同编码">
<el-input v-model="query.contractCode" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="合同名称">
<el-input v-model="query.contractName" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item>
</el-col> -->
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()" />
</el-tooltip>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange" border>
<el-table-column prop="contractCode" label="采购单位" width="200" align="center" sortable />
<el-table-column prop="contractName" label="货物规格型号" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="吨位" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="金额(元)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="货物规格型号" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="金额(元)" width="200" align="center" sortable />
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
</div>
</template>
<script>
import request from '@/utils/request'
import ExportBox from './ExportBox'
export default {
components: {
ExportBox
},
data() {
return {
query: {
contractCode: undefined,
contractName: undefined
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id'
},
list: [],
listLoading: true,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: ''
},
exportBoxVisible: false,
columnList: [{
prop: 'contractCode',
label: '合同编码'
},
{
prop: 'contractName',
label: '合同名称'
},
{
prop: 'contractNo',
label: '对方合同号'
},
{
prop: 'contractType',
label: '合同类型 '
},
{
prop: 'classification',
label: '合同分类 '
},
{
prop: 'declarationDate',
label: '申报日期'
},
{
prop: 'name',
label: '供应商/客户名'
},
{
prop: 'num',
label: '数量'
},
{
prop: 'amount',
label: '金额'
},
{
prop: 'deptName',
label: '部门名称'
},
{
prop: 'remark',
label: '备注'
},
{
prop: 'creatorusername',
label: '录入人'
},
{
prop: 'status',
label: '合同状态'
},
{
prop: 'approval',
label: '集团审批'
}
],
}
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.initData()
},
methods: {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
initData() {
this.listLoading = true
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/example/ContractFile/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = []
for (let i = 0; i < res.data.list.length; i++) {
res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0, 10) : '';
let _data = res.data.list[i]
_list.push(_data)
}
this.list = _list
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/example/ContractFile/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: 'contractCode'
}
this.initData()
},
refresh(isrRefresh) {
if (isrRefresh) this.reset()
},
reset() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
}
</script>

@ -0,0 +1,236 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<!-- <el-col :span="6">
<el-form-item label="合同编码">
<el-input v-model="query.contractCode" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="合同名称">
<el-input v-model="query.contractName" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item>
</el-col> -->
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()" />
</el-tooltip>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange" border>
<el-table-column prop="contractCode" label="单位名称" width="200" align="center" sortable />
<el-table-column prop="contractName" label="应收款余额" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="应收款余额(未逾期)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="应收款余额(逾期)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="逾期时间" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="逾期应收利息" width="200" align="center" sortable />
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
</div>
</template>
<script>
import request from '@/utils/request'
import ExportBox from './ExportBox'
export default {
components: {
ExportBox
},
data() {
return {
query: {
contractCode: undefined,
contractName: undefined
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id'
},
list: [],
listLoading: true,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: ''
},
exportBoxVisible: false,
columnList: [{
prop: 'contractCode',
label: '合同编码'
},
{
prop: 'contractName',
label: '合同名称'
},
{
prop: 'contractNo',
label: '对方合同号'
},
{
prop: 'contractType',
label: '合同类型 '
},
{
prop: 'classification',
label: '合同分类 '
},
{
prop: 'declarationDate',
label: '申报日期'
},
{
prop: 'name',
label: '供应商/客户名'
},
{
prop: 'num',
label: '数量'
},
{
prop: 'amount',
label: '金额'
},
{
prop: 'deptName',
label: '部门名称'
},
{
prop: 'remark',
label: '备注'
},
{
prop: 'creatorusername',
label: '录入人'
},
{
prop: 'status',
label: '合同状态'
},
{
prop: 'approval',
label: '集团审批'
}
],
}
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.initData()
},
methods: {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
initData() {
this.listLoading = true
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/example/ContractFile/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = []
for (let i = 0; i < res.data.list.length; i++) {
res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0, 10) : '';
let _data = res.data.list[i]
_list.push(_data)
}
this.list = _list
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/example/ContractFile/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: 'contractCode'
}
this.initData()
},
refresh(isrRefresh) {
if (isrRefresh) this.reset()
},
reset() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
}
</script>

@ -0,0 +1,241 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<!-- <el-col :span="6">
<el-form-item label="合同编码">
<el-input v-model="query.contractCode" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="合同名称">
<el-input v-model="query.contractName" placeholder="请输入" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item>
</el-col> -->
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()" />
</el-tooltip>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange" border>
<el-table-column prop="contractCode" label="销售客户名称" width="200" align="center" sortable />
<el-table-column prop="contractName" label="存货名称" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="合同号" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="出库数量(吨)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="不含税采购单价" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="不含税销售单价" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="不含税销售金额" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="销售成本" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="账面毛利(不含税=K-L)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="贴息(去除)" width="200" align="center" sortable />
<el-table-column prop="contractNo" label="部门毛利(不含税=M+N)" width="200" align="center" sortable />
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
</div>
</template>
<script>
import request from '@/utils/request'
import ExportBox from './ExportBox'
export default {
components: {
ExportBox
},
data() {
return {
query: {
contractCode: undefined,
contractName: undefined
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id'
},
list: [],
listLoading: true,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: ''
},
exportBoxVisible: false,
columnList: [{
prop: 'contractCode',
label: '合同编码'
},
{
prop: 'contractName',
label: '合同名称'
},
{
prop: 'contractNo',
label: '对方合同号'
},
{
prop: 'contractType',
label: '合同类型 '
},
{
prop: 'classification',
label: '合同分类 '
},
{
prop: 'declarationDate',
label: '申报日期'
},
{
prop: 'name',
label: '供应商/客户名'
},
{
prop: 'num',
label: '数量'
},
{
prop: 'amount',
label: '金额'
},
{
prop: 'deptName',
label: '部门名称'
},
{
prop: 'remark',
label: '备注'
},
{
prop: 'creatorusername',
label: '录入人'
},
{
prop: 'status',
label: '合同状态'
},
{
prop: 'approval',
label: '集团审批'
}
],
}
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.initData()
},
methods: {
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
initData() {
this.listLoading = true
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/example/ContractFile/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = []
for (let i = 0; i < res.data.list.length; i++) {
res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0, 10) : '';
let _data = res.data.list[i]
_list.push(_data)
}
this.list = _list
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/example/ContractFile/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: 'contractCode'
}
this.initData()
},
refresh(isrRefresh) {
if (isrRefresh) this.reset()
},
reset() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
}
</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="">
<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="24" > <el-col :span="24">
<el-form-item label="磅单上传" <el-form-item label="磅单上传" prop="poundPictures">
prop="poundPictures" > <el-upload class="avatar-uploader" :action="action" :show-file-list="false"
<JNPF-UploadFz v-model="dataForm.poundPictures" :on-success="handleAvatarSuccess">
disabled <img v-if="imageUrl" :src="imageUrl" class="avatar">
detailed :fileSize="500" sizeUnit="MB" :limit="9" buttonText="点击上传" > <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</JNPF-UploadFz> </el-upload>
</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="materialId">
prop="materialId" > <popupSelect v-model="dataForm.materialId" placeholder="请选择物料编码" clearable field="materialId"
<p>{{dataForm.materialId}}</p> interfaceId="381037852907038533" :columnOptions="materialIdcolumnOptions" propsValue="id"
relationField="item_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20">
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="客户名称" prop="customerId">
<popupSelect v-model="dataForm.customerId" placeholder="请选择客户" clearable field="customerId"
interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" propsValue="id"
relationField="supplier_nm" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20" @change="customerSelect">
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售合同" prop="salesId">
<popupSelect v-model="dataForm.salesId" placeholder="请选择合同" clearable field="salesId"
interfaceId="396203872441416837" :columnOptions="salesIdcolumnOptions" propsValue="id"
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" :bissId="dataForm.customerId"
hasPage :pageSize="20">
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="供应商" prop="supplierId">
<popupSelect v-model="dataForm.supplierId" placeholder="请选择客户" clearable field="supplierId"
interfaceId="382494924156735557" :columnOptions="supplierIdcolumnOptions" propsValue="id"
relationField="supplier_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20" >
</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="purchaseId">
prop="customerId" > <popupSelect v-model="dataForm.purchaseId" placeholder="请选择合同" clearable field="purchaseId"
<p>{{dataForm.customerId}}</p> interfaceId="397408984857931205" :columnOptions="salesIdcolumnOptions" propsValue="id"
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
hasPage :pageSize="20" @change="customerSelect2">
</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="purchasePrice">
prop="salesId" > <el-input-number v-model="dataForm.purchasePrice" :style='{"width":"100%"}'></el-input-number>
<p>{{dataForm.salesId}}</p>
</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="vehicleId">
prop="vehicleId" > <popupSelect v-model="dataForm.vehicleId" placeholder="请选择车辆" clearable field="vehicleId"
<p>{{dataForm.vehicleId}}</p> interfaceId="381432451370615173" :columnOptions="vehicleIdcolumnOptions" propsValue="id"
relationField="ticketno" popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="changePicture"
hasPage :pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<el-form-item label="车辆图片" <el-form-item label="车辆图片" prop="vehiclePictures">
prop="vehiclePictures" > <JNPF-UploadImg v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9">
<JNPF-UploadImg v-model="dataForm.vehiclePictures"
disabled
detailed :fileSize="500" sizeUnit="MB" :limit="9" >
</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="磅单时间" <el-form-item label="磅单时间" prop="poundDate">
prop="poundDate" > <el-date-picker v-model="dataForm.poundDate" placeholder="请选择" clearable :style='{"width":"100%"}'
<p>{{jnpf.dateFormat(dataForm.poundDate)}}</p> type="date" format="yyyy-MM-dd" value-format="timestamp">
</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="磅单号" <el-form-item label="磅单号" prop="poundlistNo">
prop="poundlistNo" > <el-input v-model="dataForm.poundlistNo" placeholder="请输入" clearable :style='{"width":"100%"}'>
<p>{{dataForm.poundlistNo}}</p>
</el-input>
</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="tareWeight">
prop="tareWeight" > <el-input-number v-model="dataForm.tareWeight" :style='{"width":"100%"}'></el-input-number>
<p>{{dataForm.tareWeight}}</p>
</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="grossWeight">
prop="grossWeight" > <el-input-number v-model="dataForm.grossWeight" :style='{"width":"100%"}'></el-input-number>
<p>{{dataForm.grossWeight}}</p>
</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="buckleWeight">
prop="buckleWeight" > <el-input-number v-model="dataForm.buckleWeight" :style='{"width":"100%"}'></el-input-number>
<p>{{dataForm.buckleWeight}}</p>
</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="netWeight">
prop="netWeight" > <el-input-number v-model="dataForm.netWeight" :style='{"width":"100%"}'></el-input-number>
<p>{{dataForm.netWeight}}</p>
</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="unit" > <el-select v-model="unit" placeholder="请选择" clearable :style='{"width":"100%"}' @change="unitChange">
<p>{{ dataForm.unit | dynamicText(unitOptions) }} </p> <el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id"
:disabled="item.disabled"></el-option>
</el-select>
</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="transportType">
prop="transportType" > <el-select v-model="transportType" placeholder="请选择" clearable :style='{"width":"100%"}' @change="transportTypeChange">
<p>{{ dataForm.transportType | dynamicText(transportTypeOptions) }} </p> <el-option v-for="(item, index) in transportTypeOptions" :key="index" :label="item.fullName"
:value="item.id" :disabled="item.disabled"></el-option>
</el-select>
</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="advance">
prop="advance" > <el-select v-model="advance" placeholder="请选择" clearable :style='{"width":"100%"}' @change="advanceChange">
<p>{{ dataForm.advance | dynamicText(advanceOptions) }} </p> <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-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="6">
<el-form-item label="运费" <el-form-item label="运费" prop="transportPrice">
prop="transportPrice" > <el-input-number v-model="dataForm.transportPrice" :style='{"width":"100%"}'></el-input-number>
<p>{{dataForm.transportPrice}}</p>
</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="originPlace">
prop="salesPrice" > <el-input v-model="dataForm.originPlace" placeholder="请输入起始地" clearable :style='{"width":"100%"}'>
<p>{{dataForm.salesPrice}}</p> </el-input>
</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="salesPrice">
prop="businessId" > <el-input-number v-model="dataForm.salesPrice" :style='{"width":"100%"}'></el-input-number>
<p>{{dataForm.businessId}}</p>
</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="businessId">
prop="naturalId" > <popupSelect v-model="dataForm.businessId" placeholder="请选择业务员" clearable field="businessId"
<p>{{dataForm.naturalId}}</p> 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-form-item>
</el-col> </el-col>
<el-col :span="12" > <el-col :span="6">
<el-form-item label="备注" <el-form-item label="自然人" prop="naturalId">
prop="remark" > <popupSelect v-model="dataForm.naturalId" placeholder="请选择自然人" clearable field="naturalId"
<p>{{dataForm.remark}}</p> interfaceId="395933800510599301" :columnOptions="naturalIdcolumnOptions" propsValue="id"
relationField="name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage :pageSize="20">
</popupSelect>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="12">
<el-form-item label="磅单日期" <el-form-item label="备注" prop="remark">
prop="creatorTime" > <el-input v-model="dataForm.remark" placeholder="请输入备注信息" clearable :style='{"width":"100%"}'>
<p>{{dataForm.creatorTime}}</p>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </template>
</el-form> </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
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default { export default {
components: {PrintBrowse}, components: {},
props: [], props: [],
data() { data() {
return { return {
unit: "0",
transportType: "0",
advance: "0",
action: this.define.APIURl + '/api/tradeupload/Tradeupload/UploaderPondList/annexpic',
imageUrl: '',
code: '100',
fileList: [],
visible: false, visible: false,
loading: false, loading: false,
printBrowseVisible: false, isDetail: false,
printId: '',
dataForm: { dataForm: {
id :'', poundPictures: [],
poundPictures : [], materialId: "",
materialId : "", customerId: "",
customerId : "", supplierId: "",
salesId : "", salesId: "",
vehicleId : "", vehicleId: "",
vehiclePictures : [], vehiclePictures: [],
poundDate : '', poundDate: '',
poundlistNo : '', poundlistNo: '',
tareWeight : 0, tareWeight: 0,
grossWeight : 0, grossWeight: 0,
buckleWeight : 0, buckleWeight: 0,
netWeight : 0, netWeight: 0,
unit : "0", unit: "0",
transportType : "0", transportType: "0",
advance : "0", advance: "0",
transportPrice : 0, transportPrice: 0,
salesPrice : '', salesPrice: 0,
businessId : "", purchasePrice: 0,
naturalId : "", businessId: "",
remark : '', naturalId: "",
creatorTime : "", remark: '',
}, creatorTime: "",
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}], isExamine: "",
transportTypeOptions:[{"fullName":"汽运","id":"0"},{"fullName":"船运","id":"1"},{"fullName":"火车","id":"2"}], },
advanceOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}], rules: {
materialId: [{
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'
}, ],
},
materialIdcolumnOptions: [{
"label": "物料编码",
"value": "item_code"
}, {
"label": "物料名称",
"value": "item_name"
}, {
"label": "单位",
"value": "primary_unit_of_measure"
}, {
"label": "默认入库区",
"value": "in_area"
}, {
"label": "默认出库区",
"value": "out_area"
}, ],
customerIdcolumnOptions: [{
"label": "客户编码",
"value": "supplier_cd"
}, {
"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: {}, computed: {},
watch: {}, watch: {},
created() { created() {},
},
mounted() {}, mounted() {},
methods: { methods: {
dataInfo(dataAll){ unitChange(e){
let _dataAll =dataAll this.dataForm.unit = e;
_dataAll.poundPictures = _dataAll.poundPictures ? JSON.parse( _dataAll.poundPictures):[]
_dataAll.vehiclePictures = _dataAll.vehiclePictures ? JSON.parse( _dataAll.vehiclePictures):[]
this.dataForm = _dataAll
}, },
transportTypeChange(e){
init(id) { 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.dataForm.id = id || 0;
this.visible = true; this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => { this.$nextTick(() => {
if(this.dataForm.id){ this.$refs['elForm'].resetFields();
if (this.dataForm.id) {
this.loading = true this.loading = true
request({ request({
url: '/api/tradeupload/Tradeupload/detail/'+this.dataForm.id, url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
method: 'get' method: 'get'
}).then(res => { }).then(res => {
this.dataInfo(res.data) this.dataInfo(res.data)
this.loading = false 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