凭证校验

jg-waiwang-pro
CJYXTX\27961 7 months ago
parent 2257dcb7ea
commit 89717729aa

@ -33,6 +33,7 @@
<result column="salesOrderMultiples" property="salesOrderMultiples"/>
<result column="productTypeIds" property="productTypeIds"/>
<result column="inventoryTypes" property="inventoryTypes"/>
<result column="productId" property="productId"/>
</resultMap>
@ -93,6 +94,7 @@
<select id="getProductByVoucher" resultMap="getProductWarehouseMap">
SELECT
*,
id AS productId,
CASE
inventory_type
WHEN 1 THEN

@ -101,7 +101,9 @@
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN jg_vehicle d ON a.vehicle_id = d.id AND d.f_delete_mark IS NULL
${ew.customSqlSegment}
LEFT JOIN flow_task e ON a.id = e.f_process_id
${ew.customSqlSegment} AND e.f_status = 2
</select>
<select id="querySaleReceiptVoucher" resultMap="voucherList">

@ -5,7 +5,6 @@ import jnpf.entity.BomEntity;
import jnpf.entity.ProductWarehouseEntity;
import jnpf.entity.WorkOrderEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.model.businessorder.ProductByContractModel;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@ -43,6 +43,9 @@ public interface VoucherService extends IService<VoucherEntity> {
//查询凭证列表弹窗
List<VoucherEntity> queryVoucherPopupInfo(VoucherPagination voucherPagination);
//质检单查询凭证列表弹窗
List<VoucherEntity> queryInspectionVoucherPopupInfo(VoucherPagination voucherPagination);
//查询销售收货凭证
List<VoucherEntity> querySaleReceiptVoucherInfo();

@ -577,6 +577,19 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
return voucherPagination.setData(voucherEntityIPage.getRecords(),voucherEntityIPage.getTotal());
}
@Override
public List<VoucherEntity> queryInspectionVoucherPopupInfo(VoucherPagination voucherPagination) {
QueryWrapper<VoucherEntity> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("a.business_type",voucherPagination.getBusinessType());
queryWrapper.eq("a.document_type",voucherPagination.getDocumentType());
queryWrapper.notIn(ObjectUtils.isNotEmpty(voucherPagination.getExcludeIdList()),"a.id",voucherPagination.getExcludeIdList());
queryWrapper.in(ObjectUtils.isNotEmpty(voucherPagination.getProductIdList()),"c.product_id",voucherPagination.getProductIdList());
queryWrapper.isNull("a.f_delete_mark");
Page<VoucherEntity> page=new Page<>(voucherPagination.getCurrentPage(), voucherPagination.getPageSize());
IPage<VoucherEntity> voucherEntityIPage = voucherMapper.queryVoucherPopup(page,queryWrapper);
return voucherPagination.setData(voucherEntityIPage.getRecords(),voucherEntityIPage.getTotal());
}
@Override
public List<VoucherEntity> querySaleReceiptVoucherInfo() {
return voucherMapper.querySaleReceiptVoucher();

@ -619,6 +619,50 @@ public class VoucherController {
return ActionResult.success(vo);
}
/**
*
*
* @param
* @return
*/
@Operation(summary = "质检单获取凭证凭证列表和关联的商品")
@PostMapping("/getInspectionVoucherList")
public ActionResult inspectionVoucherPopup(@RequestBody VoucherPagination voucherPagination)throws IOException{
//查询凭证列表弹窗
List<VoucherEntity> list= voucherService.queryInspectionVoucherPopupInfo(voucherPagination);
for (VoucherEntity entity : list) {
if (StringUtil.isNotEmpty(entity.getProductId())){
List<ProductWarehouseEntity> productWarehouseEntity = productWarehouseService.getProductByVoucherInfo(entity.getProductId());
WarehousingInspectionConclusionEntity warehousingInspectionConclusionEntity=new WarehousingInspectionConclusionEntity();
List<WarehousingInspectionConclusionEntity> warehousingInspectionConclusionEntityList =new ArrayList<>();
for (ProductWarehouseEntity productEntity : productWarehouseEntity) {
productEntity.setUnit(entity.getUnit());
productEntity.setGrossWeight(entity.getGrossWeight());
productEntity.setTareWeight(entity.getTareWeight());
productEntity.setBuckleWeight(entity.getBuckleWeight());
productEntity.setNetWeight(entity.getNetWeight());
//检测结论赋值
warehousingInspectionConclusionEntity.setGrossWeight(entity.getGrossWeight());
warehousingInspectionConclusionEntity.setTareWeight(entity.getTareWeight());
warehousingInspectionConclusionEntity.setBuckleWeight(entity.getBuckleWeight());
}
warehousingInspectionConclusionEntityList.add(warehousingInspectionConclusionEntity);
entity.setProductWarehouseEntityList(productWarehouseEntity);
entity.setWarehousingInspectionConclusionModelList(warehousingInspectionConclusionEntityList);
}
}
//返回对象
PageListVO vo = new PageListVO();
vo.setList(list);
PaginationVO page = JsonUtil.getJsonToBean(voucherPagination, PaginationVO.class);
vo.setPagination(page);
return ActionResult.success(vo);
}
/**
*
*

@ -2,6 +2,7 @@ package jnpf.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import jnpf.model.warehousinginspection.WarehousingInspectionConclusionModel;
import lombok.Data;
import java.util.Date;
import java.math.BigDecimal;
@ -185,4 +186,7 @@ public class VoucherEntity {
@TableField(exist = false)
private String vehicleNumber;
@TableField(exist = false)
private List<WarehousingInspectionConclusionEntity> warehousingInspectionConclusionModelList;
}

@ -96,7 +96,7 @@ export default {
this.listLoading = false
}) */
request({
url: `/api/scm/Voucher/getList`,
url: `/api/scm/Voucher/getInspectionVoucherList`,
method: 'post',
data: query
}).then(res => {

@ -355,8 +355,9 @@
v-if="judgeRequired('warehousinginspectionconclusionList-grossWeight')">*</span>毛重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.grossWeight" @change="grossWeightChange"
:precision="6" :min="0" prop="grossWeight" placeholder="请输入" :disabled="judgeWrite('warehousinginspectionconclusionList') ||
<JnpfInput v-model="scope.row.grossWeight"
@change="grossWeightChange(scope.$index)" :precision="6" :min="0"
prop="grossWeight" placeholder="请输入" :disabled="judgeWrite('warehousinginspectionconclusionList') ||
judgeWrite('warehousinginspectionconclusionList-grossWeight')" clearable
:style='{ "width": "100%" }'>
</JnpfInput>
@ -369,8 +370,9 @@
v-if="judgeRequired('warehousinginspectionconclusionList-tareWeight')">*</span>皮重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.tareWeight" @change="grossWeightChange"
:precision="6" :min="0" placeholder="请输入"
<JnpfInput v-model="scope.row.tareWeight"
@change="grossWeightChange(scope.$index)" :precision="6" :min="0"
placeholder="请输入"
:disabled="judgeWrite('warehousinginspectionconclusionList') || judgeWrite('warehousinginspectionconclusionList-tareWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
@ -384,8 +386,9 @@
v-if="judgeRequired('warehousinginspectionconclusionList-buckleWeight')">*</span>扣重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.buckleWeight" @change="grossWeightChange"
:precision="6" :min="0" placeholder="请输入"
<JnpfInput v-model="scope.row.buckleWeight"
@change="grossWeightChange(scope.$index)" :precision="6" :min="0"
placeholder="请输入"
:disabled="judgeWrite('warehousinginspectionconclusionList') || judgeWrite('warehousinginspectionconclusionList-buckleWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
@ -400,9 +403,8 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight"
@change="changeData('warehousinginspectionconclusion-netWeight', scope.$index)"
:precision="6" :min="0" placeholder="请输入"
:disabled="judgeWrite('warehousinginspectionconclusionList') || judgeWrite('warehousinginspectionconclusionList-netWeight')"
clearable :style='{ "width": "100%" }'>
:precision="6" :min="0" placeholder="请输入" disabled clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
@ -439,7 +441,7 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="创建用户"
<!-- <el-table-column label="创建用户"
v-if="judgeShow('warehousinginspectionconclusion-creatorUserId')"
prop="creatorUserId">
<template slot="header">
@ -454,7 +456,25 @@
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column> -->
<el-table-column label="创建用户"
v-if="judgeShow('warehousinginspectionconclusion-creatorUserId')"
prop="creatorUserId">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousinginspectionconclusionList-creatorUserId')">*</span>创建用户
</template>
<template slot-scope="scope">
<JnpfUserSelect v-model="scope.row.creatorUserId"
@change="changeData('warehousinginspectionconclusion-creatorUserId',scope.$index)"
placeholder="请选择" selectType="all"
:ableIds="ableAll.warehousinginspectionconclusioncreatorUserIdableIds"
disabled clearable :style='{"width":"100%"}'>
</JnpfUserSelect>
</template>
</el-table-column>
<el-table-column label="操作" width="50"
v-if="!judgeWrite('warehousinginspectionconclusionList')">
<template slot-scope="scope">
@ -691,10 +711,15 @@ export default {
},
mounted() { },
methods: {
grossWeightChange(e, f) {
// debugger
// scope.row.netWeight = this.jnpf.floatSub(this.jnpf.floatSub(parseFloat(this.dataForm.grossWeight),
// parseFloat(this.dataForm.tareWeight)), parseFloat(this.dataForm.buckleWeight))
grossWeightChange(index) {
this.dataForm.warehousingInspectionConclusionList[index].netWeight =
this.jnpf.floatSub((this.jnpf.floatSub(this.dataForm.warehousingInspectionConclusionList[index].grossWeight, this.dataForm.warehousingInspectionConclusionList[index].tareWeight)), this.dataForm.warehousingInspectionConclusionList[index].buckleWeight) //
// this.dataForm.warehousingInspectionConclusionList[index].grossWeight //
// this.dataForm.warehousingInspectionConclusionList[index].tareWeight //
// this.dataForm.warehousingInspectionConclusionList[index].buckleWeight //
if (this.dataForm.warehousingInspectionConclusionList[index].netWeight <= 0) {
this.dataForm.warehousingInspectionConclusionList[index].netWeight = 0
}
},
inspectionVoucher(model, row) {
@ -842,6 +867,15 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.warehousingInspectionConclusionList.length; i++) {
const e = this.dataForm.warehousingInspectionConclusionList[i];
if (!e.netWeight) {
this.$message({
message: '净重(自动计算)不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},
@ -887,6 +921,9 @@ export default {
}
this.dataForm.warehousingInspectionVoucherList.push(item)
this.dataForm.warehousingInspectionProductList = list.productWarehouseEntityList
this.dataForm.warehousingInspectionConclusionList = list.warehousingInspectionConclusionModelList
},
@ -923,6 +960,8 @@ export default {
//
initDefaultData() {
this.dataForm.belongUserId = this.userInfo.userId
this.dataForm.warehousingInspectionConclusionList.creatorUserId = this.userInfo.userId
this.dataForm.inspectionTime = new Date().getTime()
},
addwarehousinginspectionvoucherList() {
@ -1007,6 +1046,7 @@ export default {
getwarehousinginspectionconclusionList(value) {
let item = { ...this.tableRows.warehousingInspectionConclusionList, ...value }
this.dataForm.warehousingInspectionConclusionList.push(item)
this.dataForm.warehousingInspectionConclusionList[this.dataForm.warehousingInspectionConclusionList.length - 1].creatorUserId = this.userInfo.userId
this.childIndex = this.dataForm.warehousingInspectionConclusionList.length - 1
this.isEdit = true
this.isEdit = false

Loading…
Cancel
Save