标准件采购问题修改

This commit is contained in:
z 2025-07-02 09:47:57 +08:00
parent 9672f1323b
commit aed6cebbf7
8 changed files with 37 additions and 26 deletions

View File

@ -154,17 +154,18 @@ public class PurchaseOrderMakeDetailDO extends BaseDO {
/** /**
* 物料id * 物料id
*/ */
@TableField(exist = false)
private Long materialId; private Long materialId;
/** /**
* 工序名称 * 工序名称
*/ */
@TableField(exist = false) @TableField(exist = false)
private Long procedureName; private String procedureName;
/** /**
* 泡沫 * 泡沫
*/ */
private String isFoam; private String isFoam;
@TableField(exist = false)
private String projectName;
} }

View File

@ -77,6 +77,7 @@ public interface MaterialPlanBoomMapper extends BaseMapperX<MaterialPlanBoomDO>
// .select("mat.id as matId","mat.name as matName","mat.code as matCode","mat.spec as matSpec","mat.unit as matUnit","mat.material_type as matType") // .select("mat.id as matId","mat.name as matName","mat.code as matCode","mat.spec as matSpec","mat.unit as matUnit","mat.material_type as matType")
// .select("b.material_name as matName","m.code as matCode","b.spec as matSpec","b.unit as matUnit","b.blueprint_no as blueprintNo") // .select("b.material_name as matName","m.code as matCode","b.spec as matSpec","b.unit as matUnit","b.blueprint_no as blueprintNo")
.select("b.spec as matSpec","b.unit as matUnit","b.blueprint_no as blueprintNo") .select("b.spec as matSpec","b.unit as matUnit","b.blueprint_no as blueprintNo")
.select("m.code as matCode")
.select("bc.`name` as compositionName","b.`composition_id` as compositionId") .select("bc.`name` as compositionName","b.`composition_id` as compositionId")
.select("ma.brief as customerBriefName,ma.project_name as projectName,ma.name as projectSubName,ma.project_id as projectId") .select("ma.brief as customerBriefName,ma.project_name as projectName,ma.name as projectSubName,ma.project_id as projectId")
@ -86,7 +87,8 @@ public interface MaterialPlanBoomMapper extends BaseMapperX<MaterialPlanBoomDO>
.leftJoin(CompositionDO.class, "bc", CompositionDO::getId, ProcessBomDetailDO::getCompositionId) .leftJoin(CompositionDO.class, "bc", CompositionDO::getId, ProcessBomDetailDO::getCompositionId)
.leftJoin(ProjectOrderDO.class,"po",ProjectOrderDO::getId,MaterialPlanDO::getProjectId) .leftJoin(ProjectOrderDO.class,"po",ProjectOrderDO::getId,MaterialPlanDO::getProjectId)
.leftJoin(AdminUserDO.class,"u",AdminUserDO::getId, MaterialPlanBoomDO::getDuEmpId) .leftJoin(AdminUserDO.class,"u",AdminUserDO::getId, MaterialPlanBoomDO::getDuEmpId)
// .leftJoin(MaterialDO.class,"m",MaterialDO::getId,MaterialPlanBoomDO::getMaterialId) .leftJoin(PurchaseOrderMakeDetailDO.class,"p",PurchaseOrderMakeDetailDO::getId, MaterialPlanBoomDO::getProjectPurchaseOrderMakeDetailId)
.leftJoin(MaterialDO.class,"m",MaterialDO::getId,PurchaseOrderMakeDetailDO::getMaterialId)
.eq(MaterialPlanDO::getMatType,0) .eq(MaterialPlanDO::getMatType,0)
.in(MaterialPlanBoomDO::getIsPurYard,Arrays.asList(0,5)) .in(MaterialPlanBoomDO::getIsPurYard,Arrays.asList(0,5))
.disableSubLogicDel() .disableSubLogicDel()

View File

@ -148,6 +148,8 @@ public interface PurchaseOrderMakeDetailMapper extends BaseMapperX<PurchaseOrder
MPJLambdaWrapper<PurchaseOrderMakeDetailDO> query = new MPJLambdaWrapper<>(); MPJLambdaWrapper<PurchaseOrderMakeDetailDO> query = new MPJLambdaWrapper<>();
query.selectAll(PurchaseOrderMakeDetailDO.class) query.selectAll(PurchaseOrderMakeDetailDO.class)
.select("p.name as procedureName,s.name as supplierName") .select("p.name as procedureName,s.name as supplierName")
.select("m.project_name as projectName")
.leftJoin(PurchaseOrderMakeDO.class,"m",PurchaseOrderMakeDO::getId,PurchaseOrderMakeDetailDO::getPurchaseOrderId)
.leftJoin(ProcedureDO.class,"p", ProcedureDO::getId, PurchaseOrderMakeDetailDO::getProcedureId) .leftJoin(ProcedureDO.class,"p", ProcedureDO::getId, PurchaseOrderMakeDetailDO::getProcedureId)
.leftJoin(SupplierDO.class,"s", SupplierDO::getId, PurchaseOrderMakeDetailDO::getSupplierId) .leftJoin(SupplierDO.class,"s", SupplierDO::getId, PurchaseOrderMakeDetailDO::getSupplierId)
.disableSubLogicDel(); .disableSubLogicDel();

View File

@ -94,10 +94,10 @@ public class MaterialPlanBoomServiceImpl implements MaterialPlanBoomService {
public void updateMaterialPlanBoom(MaterialPlanBoomSaveReqVO updateReqVO) { public void updateMaterialPlanBoom(MaterialPlanBoomSaveReqVO updateReqVO) {
Long loginUserId = SecurityFrameworkUtils.getLoginUserId(); Long loginUserId = SecurityFrameworkUtils.getLoginUserId();
// 校验存在 // 校验存在
validateMaterialPlanBoomExists(updateReqVO.getId());
// 更新 // 更新
if (CollUtil.isEmpty(updateReqVO.getMaterialPlanBoomDOList())){ if (CollUtil.isEmpty(updateReqVO.getMaterialPlanBoomDOList())){
MaterialPlanBoomDO updateObj = BeanUtils.toBean(updateReqVO, MaterialPlanBoomDO.class); MaterialPlanBoomDO updateObj = BeanUtils.toBean(updateReqVO, MaterialPlanBoomDO.class);
validateMaterialPlanBoomExists(updateObj.getId());
materialPlanBoomMapper.updateById(updateObj); materialPlanBoomMapper.updateById(updateObj);
if (updateObj.getSupplierId() == null || updateObj.getArriveTime() == null if (updateObj.getSupplierId() == null || updateObj.getArriveTime() == null
) { ) {
@ -122,6 +122,7 @@ public class MaterialPlanBoomServiceImpl implements MaterialPlanBoomService {
} }
makeDetailDO.setBoomDetailId(dp.getBoomDetailId()); makeDetailDO.setBoomDetailId(dp.getBoomDetailId());
makeDetailDO.setBoomName(dp.getMatName()); makeDetailDO.setBoomName(dp.getMatName());
makeDetailDO.setMaterialId(dp.getMaterialId());
makeDetailDO.setBoomSpec(dp.getMatSpec()); makeDetailDO.setBoomSpec(dp.getMatSpec());
makeDetailDO.setBoomUnit(dp.getMatUnit()); makeDetailDO.setBoomUnit(dp.getMatUnit());
makeDetailDO.setComposition(dp.getCompositionName()); makeDetailDO.setComposition(dp.getCompositionName());

View File

@ -232,7 +232,12 @@ public class PartPurchaseOrderServiceImpl implements PartPurchaseOrderService{
.set("mplan_status", 3) .set("mplan_status", 3)
.set("project_purchase_order_make_id", null) .set("project_purchase_order_make_id", null)
.set("purchase_no", null) .set("purchase_no", null)
.set("project_purchase_order_make_detail_id", null); .set("project_purchase_order_make_detail_id", null)
.set("purchase_amount", BigDecimal.ZERO)
.set("estimated_price", BigDecimal.ZERO)
.set("arrive_time",null)
.set("supplier_id", null)
.set("mat_rest",null);
materialPlanBoomMapper.update(updateWrapper); materialPlanBoomMapper.update(updateWrapper);
}); });
return true; return true;

View File

@ -110,7 +110,7 @@
size="large" size="large"
clearable clearable
filterable filterable
@change="e => changeSupp(e,scope.row)"
style="width: 165 px" style="width: 165 px"
> >
<el-option <el-option
@ -126,20 +126,20 @@
<el-table-column align="center" prop="purchaseAmount" min-width="180" > <el-table-column align="center" prop="purchaseAmount" min-width="180" >
<template #header><span class="hl-table_header">*</span>采购数量</template> <template #header><span class="hl-table_header">*</span>采购数量</template>
<template #default="scope"> <template #default="scope">
<el-input-number :disabled="scope.row.stat" @blur="updateRow(1,scope.row)" v-model="scope.row.purchaseAmount" :precision="2" :step="0.01" /> <el-input-number :disabled="scope.row.stat" v-model="scope.row.purchaseAmount" :precision="2" :step="0.01" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="estimatedPrice" min-width="180" > <el-table-column align="center" prop="estimatedPrice" min-width="180" >
<template #header><span class="hl-table_header">*</span>预估总价</template> <template #header><span class="hl-table_header">*</span>预估总价</template>
<template #default="scope"> <template #default="scope">
<el-input-number @blur="updateRow(3,scope.row)" v-model="scope.row.estimatedPrice" :precision="2" :step="0.01" /> <el-input-number v-model="scope.row.estimatedPrice" :precision="2" :step="0.01" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column min-width="200px" align="center" > <el-table-column min-width="200px" align="center" >
<template #header><span class="hl-table_header">*</span>预计到货日期</template> <template #header><span class="hl-table_header">*</span>预计到货日期</template>
<template #default="{ row, $index }"> <template #default="{ row, $index }">
<el-form-item :prop="`${$index}.arriveTime`" class="mb-0px!" > <el-form-item :prop="`${$index}.arriveTime`" class="mb-0px!" >
<el-date-picker @change="e => changeDate(e,row)" class="!w-265px" v-model="row.arriveTime" type="date" value-format="x" placeholder="预计到货日期" /> <el-date-picker class="!w-265px" v-model="row.arriveTime" type="date" value-format="x" placeholder="预计到货日期" />
</el-form-item> </el-form-item>
</template> </template>
</el-table-column> </el-table-column>
@ -338,6 +338,7 @@ const opearteForm = async(type) =>{
buyType:0 buyType:0
} }
try{ try{
console.log(111006)
await materialPlanBoomApi.updateMaterialPlanBoom(form); await materialPlanBoomApi.updateMaterialPlanBoom(form);
message.success("送审成功") message.success("送审成功")
await getList() await getList()
@ -390,7 +391,6 @@ const updateRow = async(type,row) =>{
if(row.purchaseAmount != null){ if(row.purchaseAmount != null){
await materialPlanBoomApi.updateMaterialPlanBoom(row) await materialPlanBoomApi.updateMaterialPlanBoom(row)
} }
}else if(type == 2){ }else if(type == 2){
if(row.matRest != null){ if(row.matRest != null){
await materialPlanBoomApi.updateMaterialPlanBoom(row) await materialPlanBoomApi.updateMaterialPlanBoom(row)
@ -436,15 +436,15 @@ const submitForm = async () => {
} }
for (let i = 0; i < filteredList.length; i++) { for (let i = 0; i < filteredList.length; i++) {
if (filteredList[i].projectMaterialPlanNo!=null){ if (filteredList[i].projectMaterialPlanNo!=null&&filteredList[i].projectMaterialPlanNo!=''){
message.error("零件"+filteredList[i].materialName+"已生成物料需求计划,请确认") message.error("零件"+filteredList[i].materialName+"已生成物料需求计划,请确认")
return return
} }
if (filteredList[i].boomArriveDate==null){ if (filteredList[i].boomArriveDate==null&&filteredList[i].boomArriveDate!=''){
message.error("零件"+filteredList[i].materialName+"要求完成日期为空,请确认") message.error("零件"+filteredList[i].materialName+"要求完成日期为空,请确认")
return return
} }
if (filteredList[i].duEmpId==null){ if (filteredList[i].duEmpId==null&&filteredList[i].duEmpId!=''){
message.error("零件"+filteredList[i].materialName+"责任人为空,请确认") message.error("零件"+filteredList[i].materialName+"责任人为空,请确认")
return return
} }

View File

@ -111,7 +111,7 @@ v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" cl
<span style="margin-right: 30%">操作</span> <span style="margin-right: 30%">操作</span>
</template> </template>
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="warehousing(scope.row.id)" v-if="scope.row.purchaseAmount>scope.row.boomAmount"> <el-button link type="primary" @click="warehousing(scope.row.id)" v-if="scope.row.purchaseAmount>scope.row.boomAmount&&scope.row.purchaseRemAmount>0">
采购入库 采购入库
</el-button> </el-button>
</template> </template>

View File

@ -7,8 +7,8 @@ import {
getReviewDetailAPI, getReviewDetailAPI,
reject, reject,
approval approval
} from '@/services/approveOrder' } from '@/services/approveOrder'
import {Base64} from '@/uni_modules/base64/base64.js'; import {Base64} from '@/uni_modules/base64/base64.js';
@ -57,14 +57,14 @@ const getData = async () => {
} }
onLoad(async () => { onLoad(async () => {
await getData() await getData()
}) })
const handleCancle = () => { const handleCancle = () => {
uni.navigateBack() uni.navigateBack()
isShowPop.value = false isShowPop.value = false
} }
// //
const handleAgree = async () => { const handleAgree = async () => {
await approval(props.id) await approval(props.id)
@ -140,7 +140,7 @@ const openReport = (url: any) => {
}) })
} }
// //
const showFile = ref(false) const showFile = ref(false)
@ -155,7 +155,7 @@ const handleDownload = (pdfUrl: any) => {
url: './components/showFileWx?fileUrl=' + encodeURIComponent(Base64.encode(pdfUrl)) url: './components/showFileWx?fileUrl=' + encodeURIComponent(Base64.encode(pdfUrl))
}); });
//#endif //#endif
// showFile.value = true; // showFile.value = true;
// if (pdfUrl) { // if (pdfUrl) {
// switch (uni.getSystemInfoSync().platform) { // switch (uni.getSystemInfoSync().platform) {
@ -197,7 +197,7 @@ const handleDownload = (pdfUrl: any) => {
<view class="product-item">客户简码{{ detailInfo. brief}}</view> <view class="product-item">客户简码{{ detailInfo. brief}}</view>
<view class="product-item">送审人{{ detailInfo.submitUserName }}</view> <view class="product-item">送审人{{ detailInfo.submitUserName }}</view>
<view class="product-item">送审时间{{ formatDate( detailInfo.submitTime, 'YYYY-MM-DD')}}</view> <view class="product-item">送审时间{{ formatDate( detailInfo.submitTime, 'YYYY-MM-DD')}}</view>
</view> </view>
<!-- <view class="md foot"> <!-- <view class="md foot">
<view class="foot-item price" v-if="detailInfo.hasPrice">价格人民币{{ detailInfo.price }}</view> <view class="foot-item price" v-if="detailInfo.hasPrice">价格人民币{{ detailInfo.price }}</view>
@ -220,12 +220,12 @@ const handleDownload = (pdfUrl: any) => {
<uni-th width="150">预估总价</uni-th> <uni-th width="150">预估总价</uni-th>
<uni-th width="150">技术要求</uni-th> <uni-th width="150">技术要求</uni-th>
<uni-th width="150">理论重量()</uni-th> <uni-th width="150">理论重量()</uni-th>
</uni-tr> </uni-tr>
<uni-tr v-for="(item, index) in detailInfo.purchaseOrderMakeDetailDOList" :key="index"> <uni-tr v-for="(item, index) in detailInfo.purchaseOrderMakeDetailDOList" :key="index">
<uni-td>{{ index + 1 }}</uni-td> <uni-td>{{ index + 1 }}</uni-td>
<uni-td>{{ item.name }}</uni-td> <uni-td>{{ item.projectName }}</uni-td>
<uni-td>{{ item.boomName }}</uni-td> <uni-td>{{ item.boomName }}</uni-td>
<uni-td>{{ item.procedureName }}</uni-td> <uni-td>{{ item.procedureName }}</uni-td>
<uni-td>{{ item.purchaseAmount }}</uni-td> <uni-td>{{ item.purchaseAmount }}</uni-td>
@ -235,7 +235,7 @@ const handleDownload = (pdfUrl: any) => {
<uni-td>{{ item.estimatedPrice }}</uni-td> <uni-td>{{ item.estimatedPrice }}</uni-td>
<uni-td>{{ item.description }}</uni-td> <uni-td>{{ item.description }}</uni-td>
<uni-td>{{ item.theWeight }}</uni-td> <uni-td>{{ item.theWeight }}</uni-td>
</uni-tr> </uni-tr>
</uni-table> </uni-table>
</view> </view>
@ -281,7 +281,7 @@ const handleDownload = (pdfUrl: any) => {
<view class="action-item agree" @click="handleAgree">批准</view> <view class="action-item agree" @click="handleAgree">批准</view>
<view class="action-item back" @click="handleReject">打回</view> <view class="action-item back" @click="handleReject">打回</view>
</template> </template>
</view> </view>
</template> </template>
<view class="loading-text" v-else>加载中..</view> <view class="loading-text" v-else>加载中..</view>