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
*/
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.PRODUCT_PLAN_CODE, mesBaseBarcodeInfo.getPlanCode());
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.MailUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.mes.domain.MesRaiseCapitalBom;
import com.hw.mes.service.IMesPurchaseApplyProcessDetailService;
import com.hw.mes.service.IMesRaiseCapitalBomService;
import com.hw.system.api.RemoteSysCommonService;
@ -106,8 +107,10 @@ public class MesPurchaseApplyProcessServiceImpl implements IMesPurchaseApplyProc
@Transactional
@Override
public int deleteMesPurchaseApplyProcessByPurchaseApplyIds(Long[] purchaseApplyIds) {
mesPurchaseApplyProcessMapper.deleteMesPurchaseApplyProcessDetailByTaskCodes(purchaseApplyIds);
return mesPurchaseApplyProcessMapper.deleteMesPurchaseApplyProcessByPurchaseApplyIds(purchaseApplyIds);
for (Long purchaseApplyId : purchaseApplyIds) {
this.deleteMesPurchaseApplyProcessByPurchaseApplyId(purchaseApplyId);
}
return 1;
}
/**
@ -119,8 +122,17 @@ public class MesPurchaseApplyProcessServiceImpl implements IMesPurchaseApplyProc
@Transactional
@Override
public int deleteMesPurchaseApplyProcessByPurchaseApplyId(Long purchaseApplyId) {
mesPurchaseApplyProcessMapper.deleteMesPurchaseApplyProcessDetailByTaskCode(purchaseApplyId);
return mesPurchaseApplyProcessMapper.deleteMesPurchaseApplyProcessByPurchaseApplyId(purchaseApplyId);
MesPurchaseApplyProcess applyProcess = mesPurchaseApplyProcessMapper.selectMesPurchaseApplyProcessByPurchaseApplyId(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>
</delete>
<delete id="deleteMesPurchaseApplyProcessDetailByTaskCode" parameterType="Long">
<delete id="deleteMesPurchaseApplyProcessDetailByTaskCode" parameterType="String">
delete
from mes_purchase_apply_process_detail
where task_code = #{taskCode}

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

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

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

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

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

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

@ -1,7 +1,7 @@
<template>
<div class="login">
<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-input
v-model="loginForm.username"

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

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

Loading…
Cancel
Save