Merge remote-tracking branch 'origin/master'

jg-waiwang-pro
胡川虎 4 months ago
commit 93ff9c8a1c

@ -241,7 +241,8 @@
c.remark,
d.vehicle_number,
f.name as productName,
c.clear_weight
c.clear_weight,
c.order_line_id as orderLineId
FROM
jg_voucher a
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
@ -462,7 +463,8 @@
a.sale_amount AS saleAmount,
j.CODE AS businessOrderNo,
h.NAME AS customerName1,
h1.NAME AS supplierName1
h1.NAME AS supplierName1,
d.order_line_id as orderLineId
FROM
jg_voucher a
LEFT JOIN jg_subject_basic b ON a.associate_third_suppliers = b.id

@ -257,7 +257,11 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
}
}
if(isPc){
if(ObjectUtil.isNotEmpty(voucherPagination.getBusinessOrderNo())){
voucherNum++;
String value = String.valueOf(voucherPagination.getBusinessOrderNo());
voucherQueryWrapper.like("j.code",value);
}
if(ObjectUtil.isNotEmpty(voucherPagination.getCustomerName())){
voucherNum++;
String value = String.valueOf(voucherPagination.getCustomerName());
@ -275,6 +279,12 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
voucherQueryWrapper.like("d.net_weight",value);
}
if(ObjectUtil.isNotEmpty(voucherPagination.getCreatorUserName())){
voucherNum++;
String value = String.valueOf(voucherPagination.getCreatorUserName());
voucherQueryWrapper.like("i.f_real_name",value);
}
if(ObjectUtil.isNotEmpty(voucherPagination.getVoucherCode())){
voucherNum++;
@ -748,6 +758,7 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
entity.setPurchaseContractNo(entitys.getPurchaseContractNo());
entity.setPurchaseAmount(entitys.getPurchaseAmount());
entity.setIsUsed("1");
entity.setOrderNo(entitys.getOrderNo()); //订单序号
this.saveOrUpdate(entity);
//商品子表
entitys.setId(RandomUtil.uuId());

@ -518,9 +518,6 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
}
if (workOrderForm.getWorkOrderProductList()!=null){
List<WorkOrderProductEntity> tableField116 = JsonUtil.getJsonToList(workOrderForm.getWorkOrderProductList(),WorkOrderProductEntity.class);
List<WorkOrderProductEntity> tableField1161 = JsonUtil.getJsonToList(workOrderForm.getWorkOrderProductList1(),WorkOrderProductEntity.class);
tableField116.addAll(tableField1161);
for(WorkOrderProductEntity entitys : tableField116){
entitys.setId(RandomUtil.uuId());
@ -539,6 +536,10 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
}
if (workOrderForm.getWorkOrderPrimaryList()!=null){
List<WorkOrderPrimaryEntity> tableField126 = JsonUtil.getJsonToList(workOrderForm.getWorkOrderPrimaryList(),WorkOrderPrimaryEntity.class);
List<WorkOrderPrimaryEntity> tableField1261 = JsonUtil.getJsonToList(workOrderForm.getWorkOrderPrimaryList1(),WorkOrderPrimaryEntity.class);
if (tableField1261!=null && tableField1261.size()>0){
tableField126.addAll(tableField1261);
}
for(WorkOrderPrimaryEntity entitys : tableField126){
entitys.setId(RandomUtil.uuId());
entitys.setWorkId(entity.getId());
@ -619,7 +620,7 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
@Override
public List<ProductWarehouseEntity> getWorkBomProduct1(String id, QueryWrapper<WorkOrderEntity> workOrderQueryWrapper) {
return workOrderMapper.queryworkOrderBomProduct(id,workOrderQueryWrapper);
return workOrderMapper.queryworkOrderBomProduct1(id,workOrderQueryWrapper);
}
@Override

@ -1301,4 +1301,21 @@ public class BusinessOrderController {
Map map = businessOrderService.printPDF(businessOrderEntity,response);
return ActionResult.success(map);
}
/**
*
* @param businessOrderPagination
* @return
*/
@Operation(summary = "匹配凭证和订单")
@PostMapping("/matching")
public ActionResult matching(@RequestBody BusinessOrderPagination businessOrderPagination) {
QueryWrapper<BusinessOrderEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BusinessOrderEntity::getPlanPurchaseNum,businessOrderPagination.getNetWeight());
queryWrapper.lambda().inSql(BusinessOrderEntity::getId,"SELECT business_order_id FROM jg_voucher WHERE f_delete_mark is null and voucher_status = '4'");
queryWrapper.lambda().isNull(BusinessOrderEntity::getDeleteMark);
queryWrapper.lambda().inSql(BusinessOrderEntity::getId, "SELECT f_process_id FROM flow_task WHERE f_status = '2'");//通过审核的订单
List<BusinessOrderEntity> businessOrderEntityList = businessOrderService.list(queryWrapper);
return ActionResult.success(businessOrderEntityList);
}
}

@ -929,6 +929,7 @@ public class VoucherController {
productEntity.setBuckleWeight(entity.getBuckleWeight());
productEntity.setNetWeight(entity.getNetWeight());
productEntity.setClearWeight(entity.getClearWeight());
productEntity.setOrderNo(entity.getOrderLineId());
}
entity.setProductWarehouseEntityList(productWarehouseEntity);
}

@ -562,6 +562,111 @@ public class WorkOrderController {
inventoryLogService.saveOrUpdate(inventoryLogEntity);
}
if (workOrderForm.getWorkOrderPrimaryList1()!=null && workOrderForm.getWorkOrderPrimaryList1().size()>0){
//副产品生成入库单
WarehousingStorageForm warehousingStorageForm1=new WarehousingStorageForm();
warehousingStorageForm1.setWarehousingStorageType("9");
warehousingStorageForm1.setWarehousingStorageStatus("3");
warehousingStorageForm1.setWarehousingId(workOrderForm.getId());
warehousingStorageForm1.setWarehouseId(workOrderForm.getWarehouseId());
List<WarehousingStorageProductModel> PrimaryList1 =new ArrayList<>();
for (WorkOrderPrimaryModel workOrderPrimaryModel:workOrderForm.getWorkOrderPrimaryList1()){
WarehousingStorageProductModel warehousingStorageProductModel=new WarehousingStorageProductModel();
warehousingStorageProductModel.setProductId(workOrderPrimaryModel.getProductId());
warehousingStorageProductModel.setStorageAreaId(workOrderPrimaryModel.getCargoId());
warehousingStorageProductModel.setStorageUnit(workOrderPrimaryModel.getInventoryUnitId()); //加工单位
warehousingStorageProductModel.setStorageNumber(workOrderPrimaryModel.getRealityNum()); //加工数量
warehousingStorageProductModel.setSpec(workOrderPrimaryModel.getSpec());
warehousingStorageProductModel.setInventoryUnitId(workOrderPrimaryModel.getInventoryUnitId());
//入库新增一个批次号
// warehousingStorageProductModel.setBatchNumber(generaterSwapUtil.getBillNumber("picihao", false));
warehousingStorageProductModel.setBatchNumber(workOrderPrimaryModel.getBatchNumber()); //成品批次
PrimaryList1.add(warehousingStorageProductModel);
warehousingStorageForm1.setWarehousingStorageProductList(PrimaryList1);
}
warehousingStorageController.createWork(id,warehousingStorageForm1);
//副产品入库单生成流水
//审核通过
for (WarehousingStorageProductModel warehousingStorageProductModel1 : warehousingStorageForm1.getWarehousingStorageProductList()) {
ProductWarehouseEntity productWarehouseEntity = null;
if(StringUtil.isNotEmpty(warehousingStorageProductModel1.getProductId())){
productWarehouseEntity = productWarehouseService.getById(warehousingStorageProductModel1.getProductId());
}
//更新库存
//根据商品id和批次号查询库存信息
QueryWrapper<InventoryEntity> inventoryQueryWrapper = new QueryWrapper<>();
inventoryQueryWrapper.lambda().eq(InventoryEntity::getProductId, warehousingStorageProductModel1.getProductId());
inventoryQueryWrapper.lambda().eq(InventoryEntity::getBatchNumber, warehousingStorageProductModel1.getBatchNumber());
List<InventoryEntity> inventoryList = inventoryService.list(inventoryQueryWrapper);
InventoryEntity inventoryEntity = new InventoryEntity();
if(inventoryList != null && inventoryList.size() > 0){
inventoryEntity = inventoryList.get(0);
inventoryEntity.setInventoryNumber(inventoryEntity.getInventoryNumber().add(new BigDecimal(warehousingStorageProductModel1.getStorageNumber())));//库存数量
}else{
inventoryEntity.setProductId(warehousingStorageProductModel1.getProductId());
inventoryEntity.setCode(productWarehouseEntity.getCode());
inventoryEntity.setName(productWarehouseEntity.getName());
inventoryEntity.setPhoto(productWarehouseEntity.getPhoto());
inventoryEntity.setBrandId(productWarehouseEntity.getBrandId());
inventoryEntity.setProductTypeId(productWarehouseEntity.getProductTypeId());
inventoryEntity.setSpec(productWarehouseEntity.getSpec());
inventoryEntity.setInventoryUnitId(productWarehouseEntity.getInventoryUnitId());
inventoryEntity.setWarehouseId(entity.getWarehouseId());
inventoryEntity.setStorageAreaId(warehousingStorageProductModel1.getStorageAreaId());
// inventoryEntity.setBatchNumber(warehousingStorageProductModel.getBatchNumber());
inventoryEntity.setBatchNumber(workOrderForm.getWorkOrderPrimaryList1().get(0).getBatchNumber()); //批次
inventoryEntity.setCompanyId( entity.getCompanyId());
inventoryEntity.setOrganizeJsonId(entity.getOrganizeJsonId());
inventoryEntity.setDepartmentId( entity.getDepartmentId());
inventoryEntity.setCreatorUserId( entity.getCreatorUserId());
inventoryEntity.setInventoryNumber(new BigDecimal(warehousingStorageProductModel1.getStorageNumber()));//库存数量
}
inventoryService.saveOrUpdate(inventoryEntity);
QueryWrapper<WarehousingStorageEntity> storageEntityQueryWrapper = new QueryWrapper<>();
storageEntityQueryWrapper.lambda().eq(WarehousingStorageEntity::getWarehousingId, id);
List<WarehousingStorageEntity> warehousingStorageEntityList = warehousingStorageService.list(storageEntityQueryWrapper);
//更新库存流水
InventoryLogEntity inventoryLogEntity = new InventoryLogEntity();
inventoryLogEntity.setProductId(warehousingStorageProductModel1.getProductId());
if (warehousingStorageEntityList!=null&& warehousingStorageEntityList.size()>0){
inventoryLogEntity.setBusinessNo(warehousingStorageEntityList.get(0).getDocumentNo());
}
// inventoryLogEntity.setBusinessNo(entity.getBusinessCode());
inventoryLogEntity.setBusinessType("14");//加工入库
inventoryLogEntity.setCompanyId( entity.getCompanyId());
inventoryLogEntity.setOrganizeJsonId(entity.getOrganizeJsonId());
inventoryLogEntity.setDepartmentId( entity.getDepartmentId());
inventoryLogEntity.setCreatorUserId( entity.getCreatorUserId());
//inventoryLogEntity.setRelevanceBusinessNo();//关联单据号
inventoryLogEntity.setCode(productWarehouseEntity.getCode());
inventoryLogEntity.setName(productWarehouseEntity.getName());
inventoryLogEntity.setPhoto(productWarehouseEntity.getPhoto());
inventoryLogEntity.setBrandId(productWarehouseEntity.getBrandId());
inventoryLogEntity.setProductTypeId(productWarehouseEntity.getProductTypeId());
inventoryLogEntity.setSpec(productWarehouseEntity.getSpec());
inventoryLogEntity.setInventoryUnitId(productWarehouseEntity.getInventoryUnitId());
inventoryLogEntity.setWarehouseId(entity.getWarehouseId());
inventoryLogEntity.setStorageAreaId(warehousingStorageProductModel1.getStorageAreaId());
inventoryLogEntity.setBatchNumber(warehousingStorageProductModel1.getBatchNumber());
inventoryLogEntity.setChangeNumber(new BigDecimal(warehousingStorageProductModel1.getStorageNumber()));
inventoryLogEntity.setInventoryNumber(inventoryEntity.getInventoryNumber());//库存数量
inventoryLogEntity.setCompanyId( entity.getCompanyId());
inventoryLogEntity.setOrganizeJsonId(entity.getOrganizeJsonId());
inventoryLogEntity.setDepartmentId( entity.getDepartmentId());
inventoryLogEntity.setCreatorUserId( entity.getCreatorUserId());
inventoryLogService.saveOrUpdate(inventoryLogEntity);
}
}
//原材料生成领用单和出库单和返库单和报损单
//领用单
WarehousingReceiveForm warehousingReceiveForm=new WarehousingReceiveForm();
@ -1132,24 +1237,25 @@ public class WorkOrderController {
//副表数据
//子表数据
List<WorkOrderProductEntity> workOrderProductList = workOrderService.getWorkOrderProductList(entity.getId());
List<WorkOrderProductEntity> workOrderProductList1= new ArrayList<>();
List<WorkOrderProductEntity> workOrderProductLists= new ArrayList<>();
for (WorkOrderProductEntity workOrderProductEntity:workOrderProductList){
if (workOrderProductEntity.getIsInput().equals("2")){
workOrderProductList1.add(workOrderProductEntity);
workOrderMap.put("workOrderProductList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(workOrderProductList)));
List<WorkOrderPrimaryEntity> workOrderPrimaryList1 =new ArrayList<>();
List<WorkOrderPrimaryEntity> workOrderPrimaryLists =new ArrayList<>();
List<WorkOrderPrimaryEntity> workOrderPrimaryList = workOrderService.getWorkOrderPrimaryList(entity.getId());
for (WorkOrderPrimaryEntity workOrderPrimaryEntity:workOrderPrimaryList){
if (workOrderPrimaryEntity.getIsInput().equals("2")){
workOrderPrimaryList1.add(workOrderPrimaryEntity);
}else {
workOrderProductLists.add(workOrderProductEntity);
workOrderPrimaryLists.add(workOrderPrimaryEntity);
}
}
workOrderMap.put("workOrderProductList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(workOrderProductLists)));
workOrderMap.put("workOrderProductList1",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(workOrderProductList1)));
workOrderMap.put("workOrderPrimaryList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(workOrderPrimaryLists)));
workOrderMap.put("workOrderPrimaryList1",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(workOrderPrimaryList1)));
List<WorkOrderPrimaryEntity> workOrderPrimaryList = workOrderService.getWorkOrderPrimaryList(entity.getId());
workOrderMap.put("workOrderPrimaryList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(workOrderPrimaryList)));
// workOrderMap = generaterSwapUtil.swapDataForm(workOrderMap,WorkOrderConstant.getFormData(),WorkOrderConstant.TABLEFIELDKEY,WorkOrderConstant.TABLERENAMES);
// workOrderMap = generaterSwapUtil.swapDataForm(workOrderMap,WorkOrderConstant.getFormData(),WorkOrderConstant.TABLEFIELDKEY,WorkOrderConstant.TABLERENAMES);
return ActionResult.success(workOrderMap);
}

@ -159,4 +159,7 @@ public class VoucherProductEntity {
/** 采购额 **/
@TableField(exist = false)
private BigDecimal purchaseAmount;
/** 订单序号 **/
@TableField(exist = false)
private String orderNo;
}

@ -77,4 +77,8 @@ public class WorkOrderPrimaryEntity {
@TableField(value = "BATCH_NUMBER" , updateStrategy = FieldStrategy.IGNORED)
private String batchNumber;
/** 投入/副产品 **/
@TableField(value = "IS_INPUT" , updateStrategy = FieldStrategy.IGNORED)
private String isInput;
}

@ -77,7 +77,4 @@ public class WorkOrderProductEntity {
@TableField(exist = false)
private BigDecimal nums;
/** 投入/副产品 **/
@TableField(value = "IS_INPUT" , updateStrategy = FieldStrategy.IGNORED)
private String isInput;
}

@ -3,6 +3,8 @@ package jnpf.model.businessorder;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import jnpf.base.Pagination;
import java.math.BigDecimal;
import java.util.List;
/**
@ -77,4 +79,7 @@ public class BusinessOrderPagination extends Pagination {
/** 制单人 */
@JsonProperty("realName")
private String realName;
/** 结算量 */
@JsonProperty("netWeight")
private BigDecimal netWeight;
}

@ -88,4 +88,9 @@ public class VoucherPagination extends Pagination {
/** 结算量 */
@JsonProperty("netWeight")
private String netWeight;
/** 采购订单/销售订单 */
@JsonProperty("businessOrderNo")
private String businessOrderNo;
@JsonProperty("creatorUserName")
private String creatorUserName;
}

@ -22,8 +22,8 @@ public class WorkOrderForm {
@JsonProperty("workOrderProductList")
private List<WorkOrderProductModel> workOrderProductList;
/** 子表数据 **/
@JsonProperty("workOrderProductList1")
private List<WorkOrderProductModel> workOrderProductList1;
@JsonProperty("workOrderPrimaryList1")
private List<WorkOrderPrimaryModel> workOrderPrimaryList1;
/** 子表数据 **/
@JsonProperty("workOrderPrimaryList")

@ -58,4 +58,8 @@ public class WorkOrderPrimaryModel {
@JSONField(name = "batchNumber")
private String batchNumber;
/** 投入/副产品 **/
@JSONField(name = "isInput")
private String isInput;
}

@ -65,8 +65,6 @@ public class WorkOrderProductModel {
@JSONField(name = "batchNumber")
private String batchNumber;
/** 投入/副产品 **/
@JSONField(name = "isInput")
private String isInput;
}

@ -1,16 +1,18 @@
<template>
<el-dialog title="选择对账单" :close-on-click-modal="false" :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center"
lock-scroll append-to-body width="800px">
<el-dialog title="选择对账单" :close-on-click-modal="false" :visible.sync="visible"
class="JNPF-dialog JNPF-dialog_center" lock-scroll append-to-body width="800px">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="10">
<el-form-item label="关键词">
<el-input v-model="keyword" placeholder="请输入关键词查询" clearable @keyup.enter.native="search()" />
<el-input v-model="keyword" placeholder="请输入关键词查询" clearable
@keyup.enter.native="search()" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()">{{ $t('common.search') }}
<el-button type="primary" icon="el-icon-search"
@click="search()">{{ $t('common.search') }}
</el-button>
<el-button icon="el-icon-refresh-right" @click="refresh()">{{ $t('common.reset') }}
</el-button>
@ -19,16 +21,26 @@
</el-form>
<div class="JNPF-common-search-box-right">
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="search()" />
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="search()" />
</el-tooltip>
</div>
</el-row>
<JNPF-table v-loading="listLoading" :data="list" hasC @selection-change="handleSelectionChange" :border="false">
<JNPF-table v-loading="listLoading" :data="list" hasC @selection-change="handleSelectionChange"
:border="false">
<el-table-column prop="code" label="单据编号" align="center" width="200" fixed="left">
</el-table-column>
<el-table-column prop="accountSubjectName" label="对账主体名称" align="center" width="200" fixed="left">
<el-table-column prop="accountSubjectName" label="对账主体名称" align="center" width="200">
</el-table-column>
<el-table-column label="单据类型" prop="type" align="center" width="150" fixed="left">
<el-table-column prop="tableField207" label="结算c重量" align="center" width="200">
<template slot-scope="scope">
<!-- {{ `scope.row.tableField207[0].settlementTotal`}} -->
{{handlerSetTotal(scope.row.tableField207)}}
</template>
</el-table-column>
<el-table-column label="单据类型" prop="type" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.type}}
</template>
@ -44,7 +56,8 @@
<el-table-column prop="accountAmount" label="对账合计(含税)" align="center" width="150">
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="init" />
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="init" />
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{ $t('common.cancelButton') }}</el-button>
<el-button type="primary" @click="select()">{{ $t('common.confirmButton') }}</el-button>
@ -88,19 +101,19 @@ export default {
if (excludeIdList && excludeIdList instanceof Array) {
this.excludeIdList = excludeIdList;
}
if (accountSubjectName && typeof(accountSubjectName) == 'string') {
if (accountSubjectName && typeof (accountSubjectName) == 'string') {
this.accountSubjectName = accountSubjectName;
}
if (contractCode && typeof(contractCode) == 'string') {
if (contractCode && typeof (contractCode) == 'string') {
this.contractCode = contractCode;
}
if (accountState && typeof(accountState) == 'string') {
if (accountState && typeof (accountState) == 'string') {
this.accountState = accountState;
}
if (type && typeof(type) == 'string') {
if (type && typeof (type) == 'string') {
this.type = type;
}
if (businessType && typeof(businessType) == 'string') {
if (businessType && typeof (businessType) == 'string') {
this.businessType = businessType;
}
let query = {
@ -126,6 +139,7 @@ export default {
data: query
}).then(res => {
this.list = res.data.list
console.log('list', this.list)
this.listLoading = false
this.total = res.data.pagination.total
})
@ -152,12 +166,17 @@ export default {
},
handleSelectionChange(val) {
this.checked = val
},
handlerSetTotal(val) {
let temp = 0
val.forEach(item => temp += item.settlementSubtotal);
return temp
}
}
}
</script>
<style lang="scss" scoped>
>>>.el-dialog__body {
>>> .el-dialog__body {
height: 70vh;
padding: 0 0 10px !important;
display: flex;

@ -614,21 +614,21 @@ export default {
bomitemvalueExistNum() {
debugger
let isOk = true;
var num = '1';
// var num = '1';
var nums = '0';
for (let i = 0; i < this.dataForm.bomItemValueList.length; i++) {
const e = this.dataForm.bomItemValueList[i];
nums = this.jnpf.floatAdd(nums, this.dataForm.bomItemValueList[i].proportionNum)
//proportionNum
if (num < nums) {
this.$message({
message: '比例数量相加不能大于整数1',
type: 'error',
duration: 1000
});
isOk = false
break
}
// if (num < nums) {
// this.$message({
// message: '1',
// type: 'error',
// duration: 1000
// });
// isOk = false
// break
// }
if (nums < 0) {
this.$message({
message: '比例数量不能是负数',

@ -0,0 +1,132 @@
<template>
<el-dialog title="选择数据" :close-on-click-modal="false" :visible.sync="visible"
class="JNPF-dialog JNPF-dialog_center" lock-scroll append-to-body width="800px">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="10">
<el-form-item label="关键词">
<el-input v-model="keyword" placeholder="请输入关键词查询" clearable
@keyup.enter.native="search()" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="primary" icon="el-icon-search"
@click="search()">{{ $t('common.search') }}
</el-button>
<el-button icon="el-icon-refresh-right" @click="refresh()">{{ $t('common.reset') }}
</el-button>
</el-form-item>
</el-col>
</el-form>
<div class="JNPF-common-search-box-right">
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="search()" />
</el-tooltip>
</div>
</el-row>
<JNPF-table v-loading="listLoading" :data="list" @current-change="clickRow"
highlight-current-row ref="tablelistref" :border="false">
<el-table-column prop="code" label="采购订单" align="left">
</el-table-column>
<!-- <el-table-column prop="contractName" label="合同名称" align="left">
</el-table-column> -->
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="init" />
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{ $t('common.cancelButton') }}</el-button>
<el-button type="primary" @click="select()">{{ $t('common.confirmButton') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import request from '@/utils/request'
import {
GoodsList
} from '@/api/extend/order'
export default {
data() {
return {
visible: false,
listLoading: true,
keyword: '',
list: [],
total: 0,
listQuery: {
superQueryJson: '',
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
},
num: 0,
}
},
methods: {
init(num) {
if (num && num instanceof Number) {
this.num = num;
}
this.visible = true
this.listLoading = true
let query = {
...this.listQuery,
keyword: this.keyword,
num: this.num
}
request({
url: `/api/scm/BusinessOrder/matching`,
method: 'post',
data: query
}).then(res => {
this.list = res.data.list
this.listLoading = false
this.total = res.data.pagination.total
})
},
refresh() {
this.keyword = ''
this.listQuery.currentPage = 1
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = ""
this.init()
},
search() {
this.listQuery.currentPage = 1
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = ""
this.init()
},
select() {
// if (!this.checked.length) return
this.visible = false
this.$emit('refreshDataList', this.checked)
},
clickRow(val) {
this.checked = val
}
}
}
</script>
<style lang="scss" scoped>
>>> .el-dialog__body {
height: 70vh;
padding: 0 0 10px !important;
display: flex;
flex-direction: column;
overflow: hidden;
.JNPF-common-search-box {
margin-bottom: 0;
.JNPF-common-search-box-right {
padding: 10px 10px 0 0;
}
}
}
</style>

@ -820,6 +820,20 @@
<el-table :data="dataForm.businessOrderProductRelationalList" size='mini' show-summary
:summary-method="getSummaries">
<el-table-column type="index" width="50" label="序号" align="center" fixed="left" />
<el-table-column label="订单行号"
v-if="judgeShow('businessorderproductrelational-spec')" prop="ordLn" width="150"
align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('businessorderproductrelationalList-spec')">*</span>订单行号
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.ordLn"
@change="changeData('businessorderproductrelational-spec', scope.$index)"
placeholder="系统自动生成" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="商品名称" v-if="this.dataForm.orderType == '3'" prop="productId"
width="250" align="center" fixed="left">
<template slot="header">
@ -1711,9 +1725,9 @@ export default {
this.BomgoodsBoxVisible = true
let subjectId = this.dataForm.firstSubjectBasicId
let excludeIdList = [];
for (let i = 0; i < this.dataForm.businessOrderProductRelationalList.length; i++) {
excludeIdList.push(this.dataForm.businessOrderProductRelationalList[i].productId);
}
// for (let i = 0; i < this.dataForm.businessOrderProductRelationalList.length; i++) {
// excludeIdList.push(this.dataForm.businessOrderProductRelationalList[i].productId);
// }
this.$nextTick(() => {
this.$refs.BomGoodsBox.init(excludeIdList, subjectId)
})

@ -255,7 +255,7 @@
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible = false" />
<bill v-if="billVisible" ref="bill" @refresh="initData" ></bill>
<bill v-if="billVisible" ref="bill" @refresh="initData"></bill>
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail"
@close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@ -289,7 +289,7 @@ import bill from "./Bill";
export default {
components: {
FlowBox,
SaleFlowBox,bill,
SaleFlowBox, bill,
ExportBox, ToFormDetail, SuperQuery
},
data() {

@ -412,7 +412,7 @@
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">商品信息</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<!-- <el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
@ -427,17 +427,6 @@
">*</span>凭证编号
</template>
<template slot-scope="scope">
<!-- <JnpfPopupSelect v-model="scope.row.voucherId"
@change="getPurchaseReceiptVoucher" :rowIndex="scope.$index"
:formData="dataForm" :templateJson="
interfaceRes.deliveryvoucherrelationvoucherId
" placeholder="请选择" :disabled="true" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField="voucherCode"
:field="'voucherId' + scope.$index" interfaceId="531790337677461573"
:pageSize="20" :columnOptions="
deliveryvoucherrelationvoucherIdcolumnOptions
" clearable :style="{ width: '100%' }">
</JnpfPopupSelect> -->
<JnpfInput v-model="scope.row.voucherCode" @change="
changeData(
'deliveryvoucherrelation-voucherId',
@ -559,16 +548,6 @@
@change="changeData('deliveryvoucherrelation-vehicleName', scope.$index)"
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
<!-- <JnpfPopupSelect v-model="scope.row.vehicleId" @change="
changeData('vouchervehicle-vehicleId', scope.$index)
" :rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.vouchervehiclevehicleId" placeholder="请选择"
:disabled="true" propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField="vehicle_number"
:field="'vehicleId' + scope.$index" interfaceId="529920852288864453"
:pageSize="20" :columnOptions="vouchervehiclevehicleIdcolumnOptions" clearable
:style="{ width: '100%' }">
</JnpfPopupSelect> -->
</template>
</el-table-column>
<el-table-column label="商品名称" v-if="judgeShow('deliveryvoucherrelation-productId')"
@ -579,20 +558,6 @@
">*</span>商品名称
</template>
<template slot-scope="scope">
<!-- <JnpfPopupSelect v-model="scope.row.productId" @change="
changeData(
'deliveryvoucherrelation-productId',
scope.$index
)
" :rowIndex="scope.$index" :formData="dataForm" :templateJson="
interfaceRes.deliveryvoucherrelationproductId
" placeholder="请选择" :disabled="true
" propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField="name" :field="'productId' + scope.$index"
interfaceId="529919666429100229" :pageSize="20" :columnOptions="
deliveryvoucherrelationproductIdcolumnOptions
" clearable :style="{ width: '100%' }">
</JnpfPopupSelect> -->
<JnpfInput v-model="scope.row.productName"
@change="changeData('deliveryvoucherrelation-productId', scope.$index)"
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
@ -733,16 +698,12 @@
</template>
</el-table-column>
</el-table>
<!-- <div class="table-actions" @click="adddeliveryvoucherrelationList()"
v-if="!judgeWrite('deliveryvoucherrelationList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div> -->
<div class="table-actions" @click="choiceVoucher()"
v-if="!judgeWrite('deliveryvoucherrelationList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</jnpf-form-tip-item>
</el-col>
</el-col> -->
<el-col :span="24" v-if="judgeShow('deliveryvoucherrelation-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
@ -885,7 +846,7 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="毛重" v-if="judgeShow('deliveryproductrelation-grossWeight')"
<!-- <el-table-column label="毛重" v-if="judgeShow('deliveryproductrelation-grossWeight')"
prop="grossWeight" width="120">
<template slot="header">
<span class="required-sign" v-if="
@ -976,7 +937,7 @@
" clearable :style="{ width: '100%' }">
</JnpfInput>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="货区名称" v-if="judgeShow('deliveryproductrelation-cargoId')"
prop="cargoId" width="200">
<template slot="header">
@ -1178,12 +1139,13 @@
</JnpfInput>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="50" v-if="!judgeWrite('deliveryproductrelationList')">
<el-table-column label="操作" width="50"
v-if="!judgeWrite('deliveryproductrelationList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="deldeliveryproductrelationList(scope.$index)">删除</el-button>
</template>
</el-table-column> -->
</el-table-column>
</el-table>
<!-- <div class="table-actions" @click="adddeliveryproductrelationList()"
v-if="!judgeWrite('deliveryproductrelationList')">
@ -1838,11 +1800,14 @@ export default {
val2.businessOrderProductRelationalList.forEach((item, index) => {
this.productIdList.push(item.productId);
item.orderNo = item.ordLn;
// item.productName = item.name
// item.purchaseUnitId = item.salesMainUnitId
// item.purchaseNum = item.businessNum
// item.businessType = "1"
item.productName = item.name
item.saleNum = item.businessNum
item.deliveryUnit = item.salesMainUnitId
item.returnUnit = item.businessPrice
item.businessType = "1"
});
debugger
this.dataForm.deliveryProductRelationList = val2.businessOrderProductRelationalList;
this.productByOrderList = val2.businessOrderProductRelationalList;
},
initPurchaseData() {

@ -57,6 +57,17 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="采购订单">
<el-input v-model="query.businessOrderNo" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="提交人">
<el-input v-model="query.creatorUserName" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
</template>
<el-col :span="6">
<el-form-item>
@ -98,6 +109,9 @@
<el-button type="text" icon="icon-ym icon-ym-btn-clearn" @click="handleBatchRemoveDel()"
v-has="'btn_batchRemove'">批量删除
</el-button>
<!-- <el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="matching()">匹配
</el-button> -->
</div>
<div class="JNPF-common-head-right">
<el-tooltip content="高级查询" placement="top" v-if="true">
@ -141,6 +155,8 @@
</el-table-column> -->
<el-table-column prop="businessOrderNo" label="关联采购订单" align="center" width="160">
</el-table-column>
<el-table-column prop="orderLineId" label="订单行号" align="center" width="80">
</el-table-column>
<el-table-column prop="netWeight" label="结算量" align="center" width="100">
</el-table-column>
<el-table-column prop="supplierName1" label="供应商" align="center" width="200">
@ -292,6 +308,7 @@
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@superQuery="superQuery" />
<VoucherBatch v-if="voucherBatchVisible" ref="VoucherBatch" @refresh="initData" />
<BusinessOrder v-if="businessOrderVisible" ref="BusinessOrder" @refresh="initData" />
</div>
</template>
@ -315,6 +332,7 @@ import { thousandsFormat } from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
import VoucherBatch from '@/views/scm/voucherbatch/formBatch.vue'
import BusinessOrder from '@/views/scm/publicPopup/BusinessOrderBox'
export default {
components: {
@ -324,7 +342,7 @@ export default {
},
data() {
return {
businessOrderVisible: false,
keyword: '',
expandsTree: true,
refreshTree: true,
@ -351,7 +369,9 @@ export default {
supplierName: undefined,
netWeight: undefined,
businessType: "1",
documentType: "1"
documentType: "1",
businessOrderNo: undefined,
creatorUserName: undefined,
},
treeProps: {
children: 'children',
@ -446,6 +466,25 @@ export default {
// })
},
methods: {
//
matching() {
if (!this.multipleSelectionItem.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
let num = 0
this.multipleSelectionItem.forEach(e => {
num = this.jnpf.floatAdd(num, e.netWeight)
})
this.businessOrderVisible = true;
this.$nextTick(() => {
this.$refs.BusinessOrder.init(num);
});
},
createPurchaseOrder() {
if (!this.multipleSelectionItem.length) {
this.$message({
@ -455,7 +494,6 @@ export default {
})
return
}
const selectData = this.multipleSelectionItem
let stateFlag = true;
const customId = selectData[0].customerId;

@ -317,7 +317,7 @@
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">商品信息</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<!-- <el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
@ -331,16 +331,6 @@
v-if="judgeRequired('deliveryvoucherrelationList-voucherId')">*</span>凭证编号
</template>
<template slot-scope="scope">
<!-- <JnpfPopupSelect v-model="scope.row.voucherId"
@change="changeData('deliveryvoucherrelation-voucherId', scope.$index)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.deliveryvoucherrelationvoucherId"
placeholder="请选择" :disabled="true" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='voucher_code'
:field="'voucherId' + scope.$index" interfaceId="539440355490143877"
:pageSize="20" :columnOptions="deliveryvoucherrelationvoucherIdcolumnOptions"
clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect> -->
<JnpfInput v-model="scope.row.voucherCode" @change="
changeData(
'deliveryvoucherrelation-voucherId',
@ -351,7 +341,19 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="订单序号" v-if="judgeShow('deliveryvoucherrelation-spec')"
prop="orderNo" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryvoucherrelationList-spec')">*</span>订单序号
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.orderNo"
@change="changeData('deliveryvoucherrelation-spec', scope.$index)"
placeholder="请输入" clearable :style='{ "width": "100%" }' :disabled="true">
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="规格" v-if="judgeShow('deliveryvoucherrelation-spec')"
prop="spec" width="150">
<template slot="header">
@ -440,16 +442,6 @@
@change="changeData('deliveryvoucherrelation-vehicleName', scope.$index)"
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
<!-- <JnpfPopupSelect v-model="scope.row.vehicleId"
@change="changeData('vouchervehicle-vehicleId', scope.$index)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.vouchervehiclevehicleId" placeholder="请选择"
:disabled="true" propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='vehicle_number'
:field="'vehicleId' + scope.$index" interfaceId="529920852288864453"
:pageSize="20" :columnOptions="vouchervehiclevehicleIdcolumnOptions" clearable
:style='{ "width": "100%" }'>
</JnpfPopupSelect> -->
</template>
</el-table-column>
<el-table-column label="商品名称" v-if="judgeShow('deliveryvoucherrelation-productId')"
@ -459,16 +451,6 @@
v-if="judgeRequired('deliveryvoucherrelationList-productId')">*</span>商品名称
</template>
<template slot-scope="scope">
<!-- <JnpfPopupSelect v-model="scope.row.productId"
@change="changeData('deliveryvoucherrelation-productId', scope.$index)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.deliveryvoucherrelationproductId"
placeholder="请选择" :disabled="true" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='name'
:field="'productId' + scope.$index" interfaceId="529919666429100229"
:pageSize="20" :columnOptions="deliveryvoucherrelationproductIdcolumnOptions"
clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect> -->
<JnpfInput v-model="scope.row.productName"
@change="changeData('deliveryvoucherrelation-productId', scope.$index)"
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
@ -582,7 +564,7 @@
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</jnpf-form-tip-item>
</el-col>
</el-col> -->
<el-col :span="24" v-if="judgeShow('deliveryvoucherrelation-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
@ -685,7 +667,7 @@
</JnpfSelect>
</template>
</el-table-column>
<el-table-column label="毛重" v-if="judgeShow('deliveryproductrelation-grossWeight')"
<!-- <el-table-column label="毛重" v-if="judgeShow('deliveryproductrelation-grossWeight')"
prop="grossWeight" width="150">
<template slot="header">
<span class="required-sign"
@ -749,7 +731,7 @@
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="货区名称" v-if="judgeShow('deliveryproductrelation-cargoId')"
prop="cargoId" width="200">
<template slot="header">
@ -1377,11 +1359,17 @@ export default {
netWeight: e.netWeight,
businessType: '4',
clearWeight: e.clearWeight,
orderNo: e.orderNo,
}
this.dataForm.deliveryVoucherRelationList.push(item)
let productEntity = {}
e.productWarehouseEntityList.forEach(item => {
const obj = this.productByOrderList.find(e => e.productId == item.id) || {}
let obj = {};
if (unit.orderNo) {
obj = this.productByOrderList.find(e => e.productId == item.id && e.ordLn == item.orderNo) || {};
} else {
obj = this.productByOrderList.find(e => e.productId == item.id) || {};
}
item.salesMainUnitId = obj.salesMainUnitId;
item.saleNum = obj.businessNum;
item.returnUnit = obj.businessPrice;
@ -1399,7 +1387,7 @@ export default {
if (this.dataForm.deliveryProductRelationList.length == 0) {
this.dataForm.deliveryProductRelationList.push(productEntity)
} else {
const product = this.dataForm.deliveryProductRelationList.find(net => net.id == productEntity.id && net.deliveryUnit == productEntity.deliveryUnit)
const product = this.dataForm.deliveryProductRelationList.find(net => net.id == productEntity.id && net.deliveryUnit == productEntity.deliveryUnit && net.orderNo == productEntity.orderNo)
if (product) {
product.netWeight = this.jnpf.floatAdd(product.netWeight, productEntity.netWeight)
product.grossWeight = this.jnpf.floatAdd(product.grossWeight, productEntity.grossWeight)
@ -1434,7 +1422,13 @@ export default {
this.dataForm.reservedFields1 = val2.businessLineId
val2.businessOrderProductRelationalList.forEach((item, index) => {
this.productIdList.push(item.productId)
item.productName = item.name
item.saleNum = item.businessNum
item.deliveryUnit = item.salesMainUnitId
item.returnUnit = item.businessPrice
item.businessType = "4"
})
this.dataForm.deliveryProductRelationList = val2.businessOrderProductRelationalList
this.productByOrderList = val2.businessOrderProductRelationalList
},
@ -1681,9 +1675,10 @@ export default {
var productTareWeight = delObj.tareWeight
var productBuckleWeight = delObj.buckleWeight
var productClearWeight = delObj.clearWeight
const target = this.dataForm.deliveryProductRelationList.find(e => e.id == productId && e.deliveryUnit == unit)
var orderNo = delObj.orderNo
const target = this.dataForm.deliveryProductRelationList.find(e => e.id == productId && e.deliveryUnit == unit && e.orderNo == orderNo)
if (target.netWeight == productNetWeight) {
const idx = this.dataForm.deliveryProductRelationList.findIndex(e => e.id == productId && e.deliveryUnit == unit)
const idx = this.dataForm.deliveryProductRelationList.findIndex(e => e.id == productId && e.deliveryUnit == unit && e.orderNo == orderNo)
this.dataForm.deliveryProductRelationList.splice(idx, 1)
} else {
target.netWeight = this.jnpf.floatSub(target.netWeight, productNetWeight)

@ -57,6 +57,17 @@
<el-input v-model="query.netWeight" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="销售订单">
<el-input v-model="query.businessOrderNo" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="提交人">
<el-input v-model="query.creatorUserName" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
</template>
<el-col :span="6">
@ -115,6 +126,8 @@
show-summary :summary-method="getTableSummaries" border>
<el-table-column prop="voucherCode" label="凭证编号" align="center" fixed="left" width="160">
</el-table-column>
<el-table-column prop="orderNo" label="订单序号" align="center" fixed="left" width="80">
</el-table-column>
<el-table-column label="单据类型" prop="documentType1" align="center" fixed="left"
width="100">
<template slot-scope="scope">
@ -140,6 +153,8 @@
</el-table-column> -->
<el-table-column prop="businessOrderNo" label="关联销售订单" align="center" width="160">
</el-table-column>
<el-table-column prop="orderLineId" label="订单行号" align="center" width="80">
</el-table-column>
<el-table-column prop="netWeight" label="结算量" align="center" width="100">
</el-table-column>
<el-table-column prop="clearWeight" label="净重" align="center" width="100">
@ -327,7 +342,9 @@ export default {
customerName: undefined,
netWeight: undefined,
businessType: "2",
documentType: "2"
documentType: "2",
businessOrderNo: undefined,
creatorUserName: undefined,
},
treeProps: {
children: 'children',

@ -1874,6 +1874,7 @@ export default {
item.tax = item.outputTaxRate
item.salesMainUnitId = item.unit
item.voucherIdList = voucherIdList.voucherIds
item.voucherProductId = item.voucherProductId
item.spec = item.spec1
if (item.saleAmount !== 0) {
item.businessPrice = this.jnpf.floatDiv(item.saleAmount, item.netWeight).toFixed(6)

@ -99,6 +99,17 @@
</div>
<el-table :data="dataForm.voucherProductBatchList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="订单序号" prop="orderNo" width="200">
<template slot="header" v-if="false">
<span class="required-sign">*</span>订单序号
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.orderNo"
@change="changeData('voucherproduct-spec',scope.$index)" placeholder="请输入"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="商品名称" prop="productId" width="300">
<template slot="header" v-if="true">
<span class="required-sign">*</span>商品名称

@ -96,14 +96,7 @@
</JnpfDatePicker>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('businessCode')">
<jnpf-form-tip-item label="外部单据编号" v-if="judgeShow('businessCode')" prop="businessCode">
<JnpfInput v-model="dataForm.businessCode" @change="changeData('businessCode', -1)"
placeholder="请输入" :disabled="judgeWrite('businessCode')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('teamId')">
<jnpf-form-tip-item label="生产班组" v-if="judgeShow('teamId')" prop="teamId">
<JnpfPopupSelect v-model="dataForm.teamId" @change="changeData('teamId', -1)"
@ -146,15 +139,6 @@
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('remark')">
<jnpf-form-tip-item label="备注" v-if="judgeShow('remark')" prop="remark">
<JnpfInput v-model="dataForm.remark" @change="changeData('remark', -1)"
placeholder="请输入" :disabled="judgeWrite('remark')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="成品商品" v-if="judgeShow('productId')" prop="productId">
<JnpfPopupSelect v-model="dataForm.productId" @change="changeData1" :rowIndex="null"
@ -167,6 +151,15 @@
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('remark')">
<jnpf-form-tip-item label="备注" v-if="judgeShow('remark')" prop="remark">
<JnpfInput v-model="dataForm.remark" @change="changeData('remark', -1)"
placeholder="请输入" :disabled="judgeWrite('remark')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<!-- <el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="加工成品" contentPosition="left">
@ -403,17 +396,17 @@
</jnpf-form-tip-item>
</el-col>
<template v-if="this.dataForm.workOrderProductList1!=0">
<template v-if="this.dataForm.workOrderPrimaryList1!=0">
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<!-- 如果-- workOrderProductList1 为null 这个副产品就不显示如果有则显示 -->
<!-- 如果-- workOrderPrimaryList1 为null 这个副产品就不显示如果有则显示 -->
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">副产品</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<el-table :data="dataForm.workOrderProductList1" size='mini' border>
<el-table :data="dataForm.workOrderPrimaryList1" size='mini' border>
<el-table-column type="index" width="50" label="序号" align="center" fixed="left" />
<el-table-column label="商品名称" v-if="judgeShow('workorderproduct-productId')"
align="center" fixed="left" prop="productId" width="150px">
@ -477,66 +470,51 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="加工单位" v-if="judgeShow('workorderproduct-unitId')"
align="center" prop="unitId" width="180px">
<el-table-column label="理论产出量(计算前)" v-if="judgeShow('workorderprimary-theoryNum')"
align="center" prop="theoryNum" width="300px">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('workorderproductList-unitId')">*</span>加工单位
v-if="judgeRequired(' workorderprimaryList-theoryNum')">*</span>理论产出量(计算前)
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.unitId"
@change="changeData('workorderproduct-unitId', scope.$index)"
placeholder="请输入" disabled clearable :style='{ "width": "100%" }'>
<JnpfInput v-model="scope.row.theoryNum" disabled
@change="changeData('workorderprimary-theoryNum', scope.$index)"
placeholder="请输入" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="BOM" v-if="judgeShow('workorderproduct-bomId')"
prop="bomId" align="center" width="300px">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('workorderproductList-bomId')">*</span>BOM
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.bomId" @change="changeDataBom"
:formData="dataForm" :templateJson="interfaceRes.workorderproductbomId"
placeholder="请选择" disabled hasPage propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='bomName'
:field="'bomId' + scope.$index" interfaceId="523054588681531973"
:pageSize="20" :columnOptions="workorderproductbomIdcolumnOptions" clearable
:style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="加工数量" align="center" prop="proportionNum" width="180px">
<el-table-column label="理论产出量(计算后)" v-if="judgeShow('workorderprimary-itemsnum')"
align="center" prop="itemsnum" width="210px">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('workorderproductList-proportionNum')">*</span>加工数量
v-if="judgeRequired('workorderprimaryList-itemsnum')">*</span>理论产出量(计算后)
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.proportionNum"
@change="changeData('workorderproduct-proportionNum', scope.$index)"
placeholder="请输入"
:disabled="(judgeWrite('workorderproductList') || judgeWrite('workorderproductList-proportionNum')) || dataForm.type==2"
clearable :style='{ "width": "100%" }'>
<JnpfInput v-model="scope.row.itemsnum"
v-if="dataForm.workOrderProductList[0].planNum !=''" disabled
@change="changeData('workorderprimary-theoryNum', scope.$index)"
placeholder="请输入计划加工数量" clearable :style='{ "width": "100%" }'>
</JnpfInput>
<JnpfInput v-model="scope.row.theoryNum" v-else disabled
@change="changeData('workorderprimary-theoryNum', scope.$index)"
placeholder="请输入计划加工数量" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="参考成本价" v-if="judgeShow('workorderproduct-cost')"
prop="cost" align="center" width="180px">
<el-table-column label="实际产出量" v-if="judgeShow('workorderprimary-realityNum')"
align="center" prop="realityNum" width="200px">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('workorderproductList-cost')">*</span>参考成本价
v-if="judgeRequired('workorderprimaryList-realityNum')">*</span>实际产出量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.cost"
@change="changeData('workorderproduct-cost', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('workorderproductList') || judgeWrite('workorderproductList-cost')"
clearable :style='{ "width": "100%" }'>
<JnpfInput v-model="scope.row.realityNum"
@change="changeData('workorderprimary-realityNum', scope.$index)"
:disabled="judgeWrite('workorderprimaryList') || judgeWrite('workorderprimaryList-realityNum')"
placeholder="请输入1" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
@ -569,7 +547,7 @@
width="180px" prop="batchNumber">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('workorderproductList-batchNumber')">*</span>成品批次号
v-if="judgeRequired('workorderproductList-batchNumber')">*</span>批次号
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.batchNumber"
@ -643,18 +621,6 @@
</template>
</el-table-column>
<!-- <el-table-column label="商品" prop="name" width="300px" align="center">
<template slot="header">
<span class="required-sign">*</span>商品
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.name" placeholder="请输入" disabled clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column> -->
<el-table-column label="存货类型" prop="productTypeId" align="center">
<template slot="header">
@ -725,16 +691,6 @@
v-if="judgeRequired('workorderprimaryList-itemsnum')">*</span>理论发料量(计算后)
</template>
<template slot-scope="scope">
<!-- <JnpfInput v-model="scope.row.itemsnum"
disabled
@change="changeData('workorderprimary-theoryNum', scope.$index)"
placeholder="请输入11" clearable :style='{ "width": "100%" }'>
</JnpfInput> -->
<!-- <JnpfInput v-model="scope.row.itemsnum" disabled
@change="changeData('workorderprimary-theoryNum', scope.$index)"
placeholder="请输入22" clearable :style='{ "width": "100%" }'>
</JnpfInput> -->
<JnpfInput v-model="scope.row.itemsnum"
v-if="dataForm.workOrderProductList[0].planNum !=''" disabled
@ -962,7 +918,7 @@ export default {
enabledmark: undefined,
isInput: '1'
},
workOrderProductList1: {
workOrderPrimaryList1: {
productId: '',
productIdOptions: [],
unitId: '',
@ -1012,7 +968,7 @@ export default {
remark: undefined,
status: "1",
workOrderProductList: [],
workOrderProductList1: [],
workOrderPrimaryList1: [],
workOrderPrimaryList: [],
version: 0,
},
@ -1188,14 +1144,20 @@ export default {
this.dataForm.workOrderPrimaryList.push(item)
}
this.dataForm.workOrderProductList1 = []
this.dataForm.workOrderPrimaryList1 = []
for (let i = 0; i < index.productWarehouseEntityList1.length; i++) {
const e = index.productWarehouseEntityList[i];
const e = index.productWarehouseEntityList1[i];
let item = {
productId: e.productId,
productTypeId: e.productTypeId,
spec: e.spec,
inventoryUnitId: e.inventoryUnitId,
realityNum: 0,
returnNum: 0,
reportlossNum: 0,
productTypeId: e.productTypeId,
spec: e.spec,
inventoryUnitId: e.inventoryUnitId,
unitId: e.inventoryUnitId,
barCode: e.barCode,
theoryNum: e.theoryNum,
@ -1205,7 +1167,7 @@ export default {
isInput: '2',
bomId: e.bomId,
}
this.dataForm.workOrderProductList1.push(item)
this.dataForm.workOrderPrimaryList1.push(item)
}
@ -1246,6 +1208,15 @@ export default {
})
})
}
if (this.dataForm.workOrderProductList[index].planNum == '') {
this.oldtheoryNum.filter((item) => {
this.dataForm.workOrderPrimaryList1.filter((sub) => {
if (item.productId == sub.productId) {
sub.theoryNum = item.theoryNum
}
})
})
}
},
planNum(val, index) {
debugger
@ -1266,9 +1237,24 @@ export default {
})
}
if (this.dataForm.workOrderPrimaryList1.length == 0) {
this.$alert('请先选择BOM', {
confirmButtonText: '确定',
});
this.dataForm.workOrderProductList[index].planNum = undefined
} else if (val == 0) {
this.dataForm.workOrderPrimaryList1.filter((item) => {
item.itemsnum = this.jnpf.floatMul(item.theoryNum, 1)
})
} else {
this.dataForm.workOrderPrimaryList1.filter((item) => {
item.itemsnum = this.jnpf.floatMul(item.theoryNum, val)
// console.log(item.itemsnum);
})
}
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {

Loading…
Cancel
Save