6.27问题修改

jg-waiwang-pro
vayne 4 months ago
parent 0c83f43921
commit dec5d6c06d

@ -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());
@ -748,6 +752,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());

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

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

@ -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,7 @@ public class VoucherPagination extends Pagination {
/** 结算量 */
@JsonProperty("netWeight")
private String netWeight;
/** 采购订单/销售订单 */
@JsonProperty("businessOrderNo")
private String businessOrderNo;
}

@ -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,12 @@
</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>
</template>
<el-col :span="6">
<el-form-item>
@ -98,6 +104,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 +150,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 +303,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 +327,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 +337,7 @@ export default {
},
data() {
return {
businessOrderVisible: false,
keyword: '',
expandsTree: true,
refreshTree: true,
@ -351,7 +364,8 @@ export default {
supplierName: undefined,
netWeight: undefined,
businessType: "1",
documentType: "1"
documentType: "1",
businessOrderNo: undefined,
},
treeProps: {
children: 'children',
@ -446,6 +460,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 +488,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,11 @@
<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>
</template>
<el-col :span="6">
@ -113,6 +118,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">
@ -138,6 +145,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">
@ -325,7 +334,8 @@ export default {
customerName: undefined,
netWeight: undefined,
businessType: "2",
documentType: "2"
documentType: "2",
businessOrderNo: 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>商品名称

Loading…
Cancel
Save