Merge remote-tracking branch 'origin/master'

master
xs 3 days ago
commit ebf1357e89

@ -80,9 +80,9 @@ public interface MesPurchaseApplyProcessMapper {
/** /**
* *
* *
* @param purchaseApplyId ID * @param taskCode
* @return * @return
*/ */
public int deleteMesPurchaseApplyProcessDetailByTaskCode(Long purchaseApplyId); public int deleteMesPurchaseApplyProcessDetailByTaskCode(String taskCode);
} }

@ -785,6 +785,8 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
printInfoObject.put(PrintConstants.RAW_MATERIAL_LABEL_KEY_BARCODE, mesBaseBarcodeInfo.getBarcodeInfo()); printInfoObject.put(PrintConstants.RAW_MATERIAL_LABEL_KEY_BARCODE, mesBaseBarcodeInfo.getBarcodeInfo());
printInfoObject.put(PrintConstants.PRODUCT_PLAN_CODE, mesBaseBarcodeInfo.getPlanCode()); printInfoObject.put(PrintConstants.PRODUCT_PLAN_CODE, mesBaseBarcodeInfo.getPlanCode());
printInfoObject.put(PrintConstants.RAW_MATERIAL_LABEL_KEY_QTY, "1"); printInfoObject.put(PrintConstants.RAW_MATERIAL_LABEL_KEY_QTY, "1");
printInfoObject.put(PrintConstants.RAW_MATERIAL_LABEL_KEY_PO_NO, mesBaseBarcodeInfo.getPoNo());
printInfoObject.put(PrintConstants.RAW_MATERIAL_LABEL_KEY_SALE_ORDER_CODE, mesBaseBarcodeInfo.getSaleorderCode());
} }

@ -9,6 +9,7 @@ import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils; import com.hw.common.core.utils.DateUtils;
import com.hw.common.core.utils.MailUtils; import com.hw.common.core.utils.MailUtils;
import com.hw.common.security.utils.SecurityUtils; import com.hw.common.security.utils.SecurityUtils;
import com.hw.mes.domain.MesRaiseCapitalBom;
import com.hw.mes.service.IMesPurchaseApplyProcessDetailService; import com.hw.mes.service.IMesPurchaseApplyProcessDetailService;
import com.hw.mes.service.IMesRaiseCapitalBomService; import com.hw.mes.service.IMesRaiseCapitalBomService;
import com.hw.system.api.RemoteSysCommonService; import com.hw.system.api.RemoteSysCommonService;
@ -106,8 +107,10 @@ public class MesPurchaseApplyProcessServiceImpl implements IMesPurchaseApplyProc
@Transactional @Transactional
@Override @Override
public int deleteMesPurchaseApplyProcessByPurchaseApplyIds(Long[] purchaseApplyIds) { public int deleteMesPurchaseApplyProcessByPurchaseApplyIds(Long[] purchaseApplyIds) {
mesPurchaseApplyProcessMapper.deleteMesPurchaseApplyProcessDetailByTaskCodes(purchaseApplyIds); for (Long purchaseApplyId : purchaseApplyIds) {
return mesPurchaseApplyProcessMapper.deleteMesPurchaseApplyProcessByPurchaseApplyIds(purchaseApplyIds); this.deleteMesPurchaseApplyProcessByPurchaseApplyId(purchaseApplyId);
}
return 1;
} }
/** /**
@ -119,8 +122,17 @@ public class MesPurchaseApplyProcessServiceImpl implements IMesPurchaseApplyProc
@Transactional @Transactional
@Override @Override
public int deleteMesPurchaseApplyProcessByPurchaseApplyId(Long purchaseApplyId) { public int deleteMesPurchaseApplyProcessByPurchaseApplyId(Long purchaseApplyId) {
mesPurchaseApplyProcessMapper.deleteMesPurchaseApplyProcessDetailByTaskCode(purchaseApplyId); MesPurchaseApplyProcess applyProcess = mesPurchaseApplyProcessMapper.selectMesPurchaseApplyProcessByPurchaseApplyId(purchaseApplyId);
return mesPurchaseApplyProcessMapper.deleteMesPurchaseApplyProcessByPurchaseApplyId(purchaseApplyId); String taskCode = applyProcess.getTaskCode();
MesRaiseCapitalBom capitalBom = new MesRaiseCapitalBom();
capitalBom.setTaskCode(taskCode);
List<MesRaiseCapitalBom> mesRaiseCapitalBoms = mesRaiseCapitalBomService.selectMesRaiseCapitalBomList(capitalBom);
if (!mesRaiseCapitalBoms.isEmpty()) {
throw new ServiceException("请先删除对应的提资单BOM信息");
}
mesPurchaseApplyProcessMapper.deleteMesPurchaseApplyProcessDetailByTaskCode(taskCode);
mesPurchaseApplyProcessMapper.deleteMesPurchaseApplyProcessByPurchaseApplyId(purchaseApplyId);
return 1;
} }
/** /**

@ -167,7 +167,7 @@
</foreach> </foreach>
</delete> </delete>
<delete id="deleteMesPurchaseApplyProcessDetailByTaskCode" parameterType="Long"> <delete id="deleteMesPurchaseApplyProcessDetailByTaskCode" parameterType="String">
delete delete
from mes_purchase_apply_process_detail from mes_purchase_apply_process_detail
where task_code = #{taskCode} where task_code = #{taskCode}

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="headTitle">京源环保MOM生产管理系统</div> <div class="headTitle">京源环保生产管理系统</div>
<div class="chartBox chartBox1"> <div class="chartBox chartBox1">
<div class="title">生产明细</div> <div class="title">生产明细</div>
@ -41,10 +41,10 @@
:disabled="form.planDetailStatus === '已完成' || !form.planDetailCode" :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode"
@click="completeCollectMaterials()">完成领料 @click="completeCollectMaterials()">完成领料
</el-button> </el-button>
<!-- <el-button size="mini" type="warning" v-if="(!$route.query || $route.query.id==='2')"--> <!-- <el-button size="mini" type="warning" v-if="(!$route.query || $route.query.id==='2')"-->
<!-- :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode"--> <!-- :disabled="form.planDetailStatus === '已完成' || !form.planDetailCode"-->
<!-- @click="handleMaterialConfirmForm()">扫描--> <!-- @click="handleMaterialConfirmForm()">扫描-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button size="mini" type="danger" @click="handleApplyRawReturn()" <el-button size="mini" type="danger" @click="handleApplyRawReturn()"
v-if="(!$route.query || $route.query.id==='2')" v-if="(!$route.query || $route.query.id==='2')"
:disabled="!form.planDetailCode">退料 :disabled="!form.planDetailCode">退料
@ -872,14 +872,14 @@ export default {
// }); // });
// }, 60 * 1000) // }, 60 * 1000)
getLoginStationInfo().then(e => { getLoginStationInfo().then(e => {
// if(!e.data){ if(!e.data){
// this.$modal.msgError(""); this.$modal.msgError("登录工位有误");
// return; return;
// } }
// this.loginStationInfo = e.data; this.loginStationInfo = e.data;
//TODO //TODO
this.loginStationInfo = {stationId: "1", stationCode: "ZP_02"} // this.loginStationInfo = {stationId: "1", stationCode: "ZP_02"}
this.getProductPlans(); this.getProductPlans();
this.getChartData(); this.getChartData();
}); });
@ -1620,7 +1620,7 @@ export default {
this.PrintData.barcodeType = this.BARCODE_TYPE.SPLIT_BARCODE;// this.PrintData.barcodeType = this.BARCODE_TYPE.SPLIT_BARCODE;//
this.printModel = true this.printModel = true
}); });
ge
}); });
}, },

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="headTitle">京源环保MOM生产管理系统</div> <div class="headTitle">京源环保生产管理系统</div>
<div class="chartBox chartBox1"> <div class="chartBox chartBox1">
<div class="title">生产派工</div> <div class="title">生产派工</div>

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="headTitle">京源环保MOM生产管理系统</div> <div class="headTitle">京源环保生产管理系统</div>
<div class="chartBox chartBox1"> <div class="chartBox chartBox1">
<div class="title">生产派工</div> <div class="title">生产派工</div>

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="headTitle">京源环保MOM生产管理系统</div> <div class="headTitle">京源环保生产管理系统</div>
<div class="chartBox chartBox1"> <div class="chartBox chartBox1">
<div class="title">生产明细</div> <div class="title">生产明细</div>

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="headTitle">京源环保MOM生产管理系统</div> <div class="headTitle">京源环保生产管理系统</div>
<div class="chartBox chartBox1"> <div class="chartBox chartBox1">
<div class="title">生产明细</div> <div class="title">生产明细</div>

@ -1,8 +1,8 @@
<template> <template>
<div class="login" :style="`background-image: url(${!isStationId?loginBg1:loginBg2});`"> <div class="login" :style="`background-image: url(${!isStationId?loginBg1:loginBg2});`">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title" v-if="!isStationId">MOM</h3> <h3 class="title" v-if="!isStationId">MES</h3>
<h3 class="title" v-else>MOM</h3> <h3 class="title" v-else>MES</h3>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input
v-model="loginForm.username" v-model="loginForm.username"

@ -1,7 +1,7 @@
<template> <template>
<div class="login"> <div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">京源环保MOM管理系统</h3> <h3 class="title">京源环保管理系统</h3>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input
v-model="loginForm.username" v-model="loginForm.username"

@ -188,7 +188,8 @@
plain plain
icon="el-icon-check" icon="el-icon-check"
size="mini" size="mini"
@click="handleBatchSave" :disabled="multiple"
@click="handleBatchAdd"
v-hasPermi="['mes:materialinfo:batchEdit']" v-hasPermi="['mes:materialinfo:batchEdit']"
>批量保存 >批量保存
</el-button> </el-button>
@ -240,7 +241,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="批次数量" align="center" prop="batchAmount"/> <el-table-column label="批次数量" align="center" prop="batchAmount"/>
<el-table-column label="安全库存数量" align="center" prop="safeStockAmount" width="120" v-if="checkPermi(['mes:materialinfo:batchEdit'])"> <!-- <el-table-column label="安全库存数量" align="center" prop="safeStockAmount" width="120" v-if="checkPermi(['mes:materialinfo:batchEdit'])">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number <el-input-number
v-model="scope.row.safeStockAmount" v-model="scope.row.safeStockAmount"
@ -251,8 +252,8 @@
@change="handleSafeStockChange(scope.row)" @change="handleSafeStockChange(scope.row)"
/> />
</template> </template>
</el-table-column> </el-table-column>-->
<el-table-column label="安全库存数量" align="center" prop="safeStockAmount" width="120" v-if="!checkPermi(['mes:materialinfo:batchEdit'])"/> <el-table-column label="安全库存数量" align="center" prop="safeStockAmount" width="120" />
<el-table-column label="库存数量" align="center" prop="availableAmount" > <el-table-column label="库存数量" align="center" prop="availableAmount" >
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="setCellClassName(scope.row)"> <span :style="setCellClassName(scope.row)">
@ -300,7 +301,6 @@
<!-- 添加或修改物料信息对话框 --> <!-- 添加或修改物料信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="700px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="物料编码" prop="materialCode"> <el-form-item label="物料编码" prop="materialCode">
<el-input v-model="form.materialCode" placeholder="请输入物料编码" :disabled="true"/> <el-input v-model="form.materialCode" placeholder="请输入物料编码" :disabled="true"/>
</el-form-item> </el-form-item>
@ -455,7 +455,21 @@
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="handleBatchSave"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 添加或修改物料信息对话框 -->
<el-dialog :title="title" :visible.sync="batchOpen" width="700px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="安全库存数量" prop="safeStockAmount">
<el-input-number v-model="form.safeStockAmount" placeholder="请输入安全库存数量" :min="1" :max="10000000000"
style="width:180px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleBatchSave"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -506,6 +520,8 @@ export default {
title: "", title: "",
// //
open: false, open: false,
//
batchOpen: false,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -580,6 +596,7 @@ export default {
// //
cancel() { cancel() {
this.open = false; this.open = false;
this.batchOpen = false;
this.reset(); this.reset();
}, },
// //
@ -745,41 +762,51 @@ export default {
return ''; return '';
}, },
handleSafeStockChange(row) { // handleSafeStockChange(row) {
// // //
const existingIndex = this.modifiedSafeStockData.findIndex(item => item.materialId === row.materialId); // const existingIndex = this.modifiedSafeStockData.findIndex(item => item.materialId === row.materialId);
if (existingIndex > -1) { // if (existingIndex > -1) {
this.modifiedSafeStockData[existingIndex] = { // this.modifiedSafeStockData[existingIndex] = {
materialId: row.materialId, // materialId: row.materialId,
safeStockAmount: row.safeStockAmount // safeStockAmount: row.safeStockAmount
}; // };
} else { // } else {
this.modifiedSafeStockData.push({ // this.modifiedSafeStockData.push({
materialId: row.materialId, // materialId: row.materialId,
safeStockAmount: row.safeStockAmount // safeStockAmount: row.safeStockAmount
}); // });
} // }
}, // },
handleBatchAdd() {
this.reset();
this.batchOpen = true;
this.title = "批量修改安全库存数量";
},
/** 批量保存安全库存 */ /** 批量保存安全库存 */
handleBatchSave() { handleBatchSave() {
const materialIds = this.ids;
materialIds.forEach((materialId) => {
const materialVO = {materialId: materialId, safeStockAmount: this.form.safeStockAmount};
this.modifiedSafeStockData.push(materialVO);
})
if (this.modifiedSafeStockData.length === 0) { if (this.modifiedSafeStockData.length === 0) {
this.$modal.msgWarning("没有需要保存的修改"); this.$modal.msgWarning("没有需要保存的修改");
return; return;
} }
this.$modal.confirm('确认要保存修改的安全库存数量吗?').then(() => { this.$modal.confirm('确认要保存修改的安全库存数量吗?').then(() => {
this.loading = true; this.loading = true;
batchUpdateSafeStock(this.modifiedSafeStockData).then(response => { batchUpdateSafeStock(this.modifiedSafeStockData).then(response => {
this.$modal.msgSuccess("批量保存成功"); this.$modal.msgSuccess("批量保存成功");
this.modifiedSafeStockData = []; // this.modifiedSafeStockData = []; //
this.batchOpen = false;
this.getList(); // this.getList(); //
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
}); });
}).catch(() => {}); }).catch(() => {});
}, },
checkPermi,
} }
}; };

@ -48,17 +48,18 @@
<!-- >修改</el-button>--> <!-- >修改</el-button>-->
<!-- </el-col>--> <!-- </el-col>-->
<!-- <el-col :span="1.5">--> <el-col :span="1.5">
<!-- <el-button--> <el-button
<!-- type="danger"--> type="danger"
<!-- plain--> plain
<!-- icon="el-icon-delete"--> icon="el-icon-delete"
<!-- size="mini"--> size="mini"
<!-- :disabled="multiple"--> :disabled="multiple"
<!-- @click="handleDelete"--> @click="handleDelete"
<!-- v-hasPermi="['mes:purchaseApplyProcess:remove']"--> v-hasPermi="['mes:purchaseApplyProcess:remove']"
<!-- >删除</el-button>--> >删除
<!-- </el-col>--> </el-button>
</el-col>
<!-- <el-col :span="1.5">--> <!-- <el-col :span="1.5">-->
<!-- <el-button--> <!-- <el-button-->
<!-- type="warning"--> <!-- type="warning"-->

Loading…
Cancel
Save