MES:
-生产任务和生产派工修复bug
车间MES:
一楼工序和4楼装配工序开始和完成完善
一楼成品入库完善
master
xs 3 months ago
parent c1104a21ff
commit 26788889e5

@ -29,6 +29,8 @@ public class MesConfig
*/
private int socketServerReadTimeOut;
private Long laserProcessId;
public String getSocketServerHost() {
return socketServerHost;
}
@ -52,4 +54,12 @@ public class MesConfig
public void setSocketServerReadTimeOut(int socketServerReadTimeOut) {
this.socketServerReadTimeOut = socketServerReadTimeOut;
}
public Long getLaserProcessId() {
return laserProcessId;
}
public void setLaserProcessId(Long laserProcessId) {
this.laserProcessId = laserProcessId;
}
}

@ -41,12 +41,12 @@ public class MesProductPlanDetail extends BaseEntity
private String userName;
/** 开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date realBeginTime;
/** 完成时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date realEndTime;

@ -336,10 +336,9 @@ public class MesProductOrderServiceImpl implements IMesProductOrderService {
}
/**
*
*
* @param mesProductOrder
*/
@Override
@ -358,7 +357,7 @@ public class MesProductOrderServiceImpl implements IMesProductOrderService {
//工单状态0-待发布1-已发布2-已完成3-已开始4-暂停8-已撤回9-已删除
//找到派工数量大于0并且状态是已发布或者已开始的或者暂停的
List<MesProductOrder> filterProductOrders = mesProductOrders.stream().filter(p ->
(p.getDispatchAmount().compareTo(BigDecimal.ONE) >= 0) &&
(p.getDispatchAmount() != null && p.getDispatchAmount().compareTo(BigDecimal.ONE) >= 0) &&
(p.getOrderStatus().equals(MesConstants.PUBLISHED) || p.getOrderStatus().equals(MesConstants.BEGIN) || p.getOrderStatus().equals(MesConstants.PAUSE))
).collect(Collectors.toList());

@ -7,6 +7,7 @@ import com.hw.common.core.utils.StringUtils;
import com.hw.common.core.utils.uuid.Seq;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.mes.api.domain.MesBaseBarcodeInfo;
import com.hw.mes.config.MesConfig;
import com.hw.mes.domain.*;
import com.hw.mes.domain.vo.MesProductPlanDetailVo;
import com.hw.mes.mapper.*;
@ -49,6 +50,9 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer
@Autowired
private MesProductOrderMapper mesProductOrderMapper;
@Autowired
private MesConfig mesConfig;
/**
*
*
@ -301,11 +305,18 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer
Date currentDate = new Date();
String userName = SecurityUtils.getUsername();
BigDecimal planAmount = null;
// BigDecimal dispatchAmount = null;
//获取计划数量
//如果是按图纸生产(激光切割工序),则判断完成数量不能大于图纸的数量,
//如果不是按图纸生产,则判断完成数量不能大于计划的数量
String attachId = dbProductPlan.getAttachId();
if (StringUtils.isNotEmpty(attachId)) {//如果是按图纸生产的
String[] attachIdArr = attachId.split(",");
planAmount = new BigDecimal(attachIdArr.length);
if (dbProductPlan.getProcessId().equals(mesConfig.getLaserProcessId())) {
if (StringUtils.isNotEmpty(attachId)) {//如果是按图纸生产的
String[] attachIdArr = attachId.split(",");
planAmount = new BigDecimal(attachIdArr.length);
} else {
planAmount = BigDecimal.ONE;
}
} else {
planAmount = dbProductPlan.getPlanAmount();
}

@ -382,6 +382,7 @@ export default {
},
BARCODE_TYPE_PARAM: {
PRODUCT:'3',//
PRODUCT_BARCODE: '4',//
SPLIT_BIND_BARCODE: '5', //
},
@ -474,7 +475,12 @@ export default {
} else {
this.addInternalBtnVisible = false;
this.addProductBarcodeBtnVisible = false;
this.addBindBarcodeBtnVisible = true;
if(this.barcodeTypeParam === this.BARCODE_TYPE_PARAM.PRODUCT){
this.addBindBarcodeBtnVisible = false;
}else{
this.addBindBarcodeBtnVisible = true;
}
if (this.total === 1 && this.barcodeTypeParam === this.BARCODE_TYPE_PARAM.SPLIT_BIND_BARCODE) {
this.handleAddBindBarcode(this.form.bindBarcode);
}

@ -3,7 +3,7 @@
<div class="headTitle">京源环保生产管理系统</div>
<div class="chartBox chartBox1">
<div class="title">派工信息</div>
<div class="title">生产派工</div>
<div class="chart">
<div class="whiteTable">
<el-table
@ -14,6 +14,7 @@
style="width: 100%"
ref="planTable"
highlight-current-row
@current-change="getDetail"
>
<el-table-column
label="序号"
@ -21,6 +22,11 @@
width="50"
>
</el-table-column>
<el-table-column
label="任务编号"
prop="dispatchCode"
>
</el-table-column>
<el-table-column
label="派工单号"
prop="planCode"
@ -78,13 +84,13 @@
SOP预览
</el-button>
<el-button
<!--el-button
size="small"
type="text"
@click="getDetail(scope)"
@click="getDetail(scope.row)"
>
明细
</el-button>
</el-button-->
</template>
</el-table-column>
</el-table>
@ -151,7 +157,6 @@
<div class="chart">
<div class="whiteTable">
<el-table
highlight-current-row
@current-change="getMaterialInstall"
:cell-style="{textAlign:'center'}"
:data="tableData1"
@ -159,7 +164,7 @@
:max-height="19.13 * vw"
style="width: 100%"
ref="table"
highlight-current-row
>
<el-table-column
label="序号"
@ -214,7 +219,7 @@
{{ scope.row.planDetailStatus === '1' ? '开始' : '完成' }}
</el-button>
<el-button
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED" size="small"
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED" size="small"
type="text"
@click="getMaterials(scope.row) "
>
@ -240,7 +245,8 @@
size="small"
type="text"
@click="print(scope.row)"
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.FINISHED || scope.row.planDetailStatus === PLAN_DETAIL_STATUS.ABNORMAL_FINISHED"
v-if="(scope.row.planDetailStatus === PLAN_DETAIL_STATUS.FINISHED || scope.row.planDetailStatus === PLAN_DETAIL_STATUS.ABNORMAL_FINISHED)
&& finalProcessFlag ==='1'"
>
条码
</el-button>
@ -315,7 +321,8 @@
<!-- 申请领料信息对话框 -->
<el-dialog title="申请领料" :visible.sync="dialogVisible" append-to-body>
<apply-raw-outstock ref="applyRawOutstockRef" :defineData="productPlanData" v-if="dialogVisible"></apply-raw-outstock>
<apply-raw-outstock ref="applyRawOutstockRef" :defineData="productPlanData"
v-if="dialogVisible"></apply-raw-outstock>
</el-dialog>
<el-dialog :visible.sync="printModel" class="dialog" title="条码打印" width="80%">
@ -382,7 +389,8 @@
<el-input v-model="returnModelForm.materialName" autocomplete="off" disabled></el-input>
</el-form-item-->
<el-form-item label="物料条码">
<el-input placeholder="请扫描或输入物料条码" v-model="returnModelForm.materialBarcode" suffix-icon="el-icon-full-screen">
<el-input placeholder="请扫描或输入物料条码" v-model="returnModelForm.materialBarcode"
suffix-icon="el-icon-full-screen">
</el-input>
</el-form-item>
<el-form-item label="仓库">
@ -392,7 +400,8 @@
</el-select>
</el-form-item>
<el-form-item label="数量" prop="planAmount">
<el-input-number v-model="returnModelForm.planAmount" controls-position="right" :min="1" style="width: 260px"></el-input-number>
<el-input-number v-model="returnModelForm.planAmount" controls-position="right" :min="1"
style="width: 260px"></el-input-number>
</el-form-item>
<el-form-item label="退库类型" prop="taskType">
<el-select v-model="returnModelForm.taskType" placeholder="请选择退库类型" style="width: 260px">
@ -476,7 +485,7 @@
<script>
import Chart from '@/components/board/Chart'
import PrintPage from '@/views/mes/barcode/endProductIndex'
import PrintPage from '@/views/board/barcode/workshopBarcode'
import {monitorSerialData} from "@/utils/serial"
import WorkshopNotice from "@/components/workshopNotice/index.vue";
import {noticeData} from "@/utils/notice"
@ -495,11 +504,12 @@ import {
} from '@/api/board'
import {getToken} from "@/utils/auth";
import applyRawOutstock from "@/views/board/common/applyRawOutstock.vue";
import {getNowDateTime} from "@/utils/ruoyi";
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
export default {
name: 'Board1',
dicts: ['mes_plan_detail_status', 'wms_raw_return_task_type',"mes_safe_flag"],
dicts: ['mes_plan_detail_status', 'wms_raw_return_task_type', "mes_safe_flag"],
components: {
'apply-raw-outstock': applyRawOutstock,
Chart,
@ -527,9 +537,10 @@ export default {
totalNum3: 0,
nowNum4: 1,
totalNum4: 0,
materialBomId:null,
materialBomId: null,
planId: null,
nowMaterial: null,
finalProcessFlag:null,
vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100,
searchMaterialValue: '',
warehouseList: [],
@ -578,14 +589,16 @@ export default {
Authorization: "Bearer " + getToken(),
},
PLAN_DETAIL_STATUS:{
TO_START : '1',
STARTED : '2',
FINISHED : '3',
ABNORMAL_FINISHED : '9'
PLAN_DETAIL_STATUS: {
TO_START: '1',
STARTED: '2',
FINISHED: '3',
ABNORMAL_FINISHED: '9'
},
productPlanData:{}
productPlanData: {},
reloadFlag: "0",
}
},
mounted() {
@ -598,18 +611,23 @@ export default {
// duration: 0
// });
// }, 60 * 1000)
getProductPlans({pageNum: 1, pageSize: 5}).then(e => {
getProductPlans({pageNum: 1, pageSize: 5}).then(async e => {
this.tableData = e.rows
this.totalNum1 = Math.ceil(e.total / 5)
this.nowMaterial = e.rows?.[0]?.materialName
this.materialBomId = e.rows?.[0]?.materialBomId
this.saleOrderId = e.rows?.[0]?.saleOrderId
this.$refs.planTable.setCurrentRow(e.rows?.[0]);
getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.rows?.[0]?.planId}).then(res => {
this.tableData1 = res.rows
this.totalNum3 = Math.ceil(res.total / 5)
this.$refs.table.setCurrentRow(res.rows[0]);
})
let queryRow = {
pageNum: 1,
pageSize: 5,
planId: e.rows?.[0]?.planId,
materialName: e.rows?.[0]?.materialName,
materialBomId: e.rows?.[0]?.materialBomId,
saleOrderId: e.rows?.[0]?.saleOrderId,
saleType: e.rows?.[0]?.saleType
}
await this.getDetail(queryRow);
})
},
methods: {
@ -715,12 +733,10 @@ export default {
startProductPlanDetail({
planDetailId: e.planDetailId
})
.finally(() => {
this.getDetail({row: {planId: e.planId}})
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
this.tableData = e.rows
this.totalNum1 = Math.ceil(e.total / 5)
})
.then(() => {
this.$modal.msgSuccess("开始成功");
e.realBeginTime = getNowDateTime();
e.planDetailStatus = this.PLAN_DETAIL_STATUS.STARTED;
})
})
.catch(() => {
@ -731,7 +747,7 @@ export default {
})
}
if (e.planDetailStatus === '2') {
this.$confirm('是否完成计划', '确认', {
this.$confirm('是否完成生产明细', '确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success'
@ -739,12 +755,12 @@ export default {
completeProductPlanDetail({
planDetailId: e.planDetailId
})
.finally(() => {
this.getDetail({row: {planId: e.planId}})
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
this.tableData = e.rows
this.totalNum1 = Math.ceil(e.total / 5)
})
.then(() => {
this.$modal.msgSuccess("完成成功");
e.realEndTime = getNowDateTime();
e.planDetailStatus = this.PLAN_DETAIL_STATUS.FINISHED;
let currentProductPlan = this.tableData.filter(item => item.planId === e.planId)
currentProductPlan[0].completeAmount += 1;
})
})
.catch(() => {
@ -756,39 +772,30 @@ export default {
}
},
// /
async getDetail(e) {
this.planId = e.row.planId
this.materialBomId = e.row.materialBomId
this.nowMaterial = e.row.materialName
this.saleOrderId = e.row.saleOrderId
this.nowNum3 = 1
await getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.row.planId}).then(res => {
async getDetail(row) {
if (this.reloadFlag !== "1" && this.planId === row.planId) {
return;
}
this.reloadFlag = "0";
this.planId = row.planId
this.materialBomId = row.materialBomId
this.nowMaterial = row.materialName
this.saleOrderId = row.saleOrderId
this.saleType = row.saleType
this.finalProcessFlag = row.finalProcessFlag
await getProductPlanDetails({pageNum: 1, pageSize: 5, planId: row.planId}).then(res => {
if (res.rows.length === 0) {
this.$confirm('是否生成计划明细', '确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success'
}).then(() => {
insertProductPlanDetails({
"planId": e.row.planId,
}).then(val => {
getProductPlanDetails({pageNum: this.nowNum3, pageSize: 5, planId: e.row.planId}).then(res => {
this.tableData1 = res.rows
this.totalNum3 = Math.ceil(res.total / 5)
this.$refs.table.setCurrentRow(res.rows[0]);
})
this.$message({
type: 'info',
message: `生成完成`
});
insertProductPlanDetails({
"planId": row.planId,
}).then(val => {
getProductPlanDetails({pageNum: 1, pageSize: 5, planId: row.planId}).then(res => {
this.tableData1 = res.rows
this.totalNum3 = Math.ceil(res.total / 5)
this.$refs.table.setCurrentRow(res.rows[0]);
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
})
} else {
this.tableData1 = res.rows
this.$refs.table.setCurrentRow(res.rows[0]);
@ -797,7 +804,9 @@ export default {
})
},
async getMaterialInstall(e){
async getMaterialInstall(e) {
this.info = e
this.nowNum2 = 1
this.nowNum4 = 1
@ -842,6 +851,7 @@ export default {
print(val) {
this.PrintData = val
this.PrintData.barcodeType = '3';//
this.printModel = true
},
@ -896,7 +906,7 @@ export default {
materialBarcode: null,
planId: null,
planDetailId: null,
planDetailCode:null,
planDetailCode: null,
checkAmount: 1
};
this.resetForm("materialConfirmForm");
@ -908,7 +918,7 @@ export default {
materialBarcode: null,
planId: scope.row.planId,
planDetailId: scope.row.planDetailId,
planDetailCode:scope.row.planDetailCode,
planDetailCode: scope.row.planDetailCode,
checkAmount: 1
};
this.materialConfirmVisible = true;
@ -1072,7 +1082,6 @@ export default {
},
firstConnectSerial() {
if (!this.checkSerialConnected()) {
this.$confirm('请连接条码枪', '提示', {
@ -1093,7 +1102,7 @@ export default {
this.productInstockForm.materialBarcode = this.serialData;
} else if (this.returnModelVisible) {
this.returnModelForm.materialBarcode = this.serialData;
} else if(this.materialConfirmVisible){
} else if (this.materialConfirmVisible) {
this.materialConfirmForm.materialBarcode = this.serialData;
}
// console.log(this.serialData)
@ -1142,6 +1151,7 @@ export default {
/deep/ .el-table .cell {
color: #fff
}
/deep/ .current-row .cell {
color: #000
}

@ -12,6 +12,9 @@
:header-cell-style="{textAlign:'center'}"
:max-height="19.13 * vw"
style="width: 100%"
ref="planTable"
highlight-current-row
@current-change="getDetail"
>
<el-table-column
label="序号"
@ -62,18 +65,18 @@
width="120"
>
<template slot-scope="scope">
<el-button
<!--el-button
size="small"
type="text"
@click="getDetail(scope)"
@click="getDetail(scope.row)"
>
明细
</el-button>
</el-button-->
<el-button
size="small"
type="text"
@click="getDetail(scope)"
@click="getDetail(scope.row)"
>
SOP预览
</el-button>
@ -104,12 +107,13 @@
<div class="chart">
<div class="whiteTable">
<el-table
ref="table"
:cell-style="{textAlign:'center'}"
:data="tableData1"
:header-cell-style="{textAlign:'center'}"
:max-height="19.13 * vw"
style="width: 100%"
highlight-current-row
>
<el-table-column
label="序号"
@ -229,7 +233,8 @@
<!-- 申请领料信息对话框 -->
<el-dialog title="申请领料" :visible.sync="dialogVisible" append-to-body>
<apply-raw-outstock ref="applyRawOutstockRef" :defineData="productPlanData" v-if="dialogVisible"></apply-raw-outstock>
<apply-raw-outstock ref="applyRawOutstockRef" :defineData="productPlanData"
v-if="dialogVisible"></apply-raw-outstock>
</el-dialog>
@ -344,6 +349,7 @@ import {
} from "@/api/board";
import {monitorSerialData} from "@/utils/serial";
import applyRawOutstock from '@//views/board/common/applyRawOutstock.vue';
import {getNowDateTime} from "@/utils/ruoyi";
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
export default {
@ -366,7 +372,7 @@ export default {
returnModelVisible: false,
returnModelForm: {},
WarehousesList: [],
productPlanData:{},
productPlanData: {},
PrintData: {},
printModel: false,
nowNum1: 1,
@ -375,6 +381,7 @@ export default {
totalNum2: 0,
planId: null,
materialBomId: null,
finalProcessFlag: null,
vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100,
searchMaterialValue: '',
warehouseList: [],
@ -439,12 +446,12 @@ export default {
SINGLE_FLAG: {
NOT_SINGLE: "0",//
INTERNAL: '2'//
}
},
reloadFlag: "0",
}
},
created() {
},
mounted() {
@ -457,16 +464,25 @@ export default {
// duration: 0
// });
// }, 60 * 1000)
getProductPlans({pageNum: 1, pageSize: 5}).then(e => {
getProductPlans({pageNum: 1, pageSize: 5}).then(async e => {
this.tableData = e.rows
this.totalNum1 = Math.ceil(e.total / 5)
this.materialBomId = e.rows?.[0]?.materialBomId
this.saleOrderId = e.rows?.[0]?.saleOrderId
getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.rows?.[0]?.planId}).then(res => {
this.tableData1 = res.rows
this.totalNum2 = Math.ceil(res.total / 5)
})
this.$refs.planTable.setCurrentRow(e.rows?.[0]);
let queryRow = {
pageNum: 1,
pageSize: 5,
planId: e.rows?.[0]?.planId,
materialName: e.rows?.[0]?.materialName,
materialBomId: e.rows?.[0]?.materialBomId,
saleOrderId: e.rows?.[0]?.saleOrderId,
saleType: e.rows?.[0]?.saleType
}
await this.getDetail(queryRow);
})
this.$refs.chart2.setData({
tooltip: {
trigger: 'axis',
@ -745,7 +761,7 @@ export default {
// /
planExecute(e) {
if (e.planDetailStatus === '1') {
this.$confirm('是否开始计划', '确认', {
this.$confirm('是否开始生产明细', '确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success'
@ -753,12 +769,18 @@ export default {
startProductPlanDetail({
planDetailId: e.planDetailId
})
.finally(() => {
this.getDetail({row: {planId: e.planId}})
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
this.tableData = e.rows
this.totalNum1 = Math.ceil(e.total / 5)
})
.then(() => {
this.$modal.msgSuccess("开始成功");
e.realBeginTime = getNowDateTime();
e.planDetailStatus = this.PLAN_DETAIL_STATUS.STARTED;
// this.getDetail(queryRow);
// getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
// this.tableData = e.rows
// this.totalNum1 = Math.ceil(e.total / 5)
// let currentRow = e.rows.filter(item => item.planId == e.planId)
// this.$refs.planTable.setCurrentRow(currentRow);
// })
})
})
.catch(() => {
@ -769,7 +791,7 @@ export default {
})
}
if (e.planDetailStatus === '2') {
this.$confirm('是否完成计划', '确认', {
this.$confirm('是否完成生产明细', '确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success'
@ -777,12 +799,12 @@ export default {
completeProductPlanDetail({
planDetailId: e.planDetailId
})
.finally(() => {
this.getDetail({row: {planId: e.planId}})
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
this.tableData = e.rows
this.totalNum1 = Math.ceil(e.total / 5)
})
.then(() => {
this.$modal.msgSuccess("完成成功");
e.realEndTime = getNowDateTime();
e.planDetailStatus = this.PLAN_DETAIL_STATUS.FINISHED;
let currentProductPlan = this.tableData.filter(item => item.planId === e.planId)
currentProductPlan[0].completeAmount += 1;
})
})
.catch(() => {
@ -793,46 +815,39 @@ export default {
})
}
},
// /
getDetail(e) {
this.planId = e.row.planId
this.materialBomId = e.row.materialBomId
this.saleOrderId = e.row.saleOrderId
this.saleType = e.row.saleType
this.nowNum2 = 1
getProductPlanDetails({pageNum: 1, pageSize: 5, planId: e.row.planId}).then(res => {
async getDetail(row) {
if (this.reloadFlag !== "1" && this.planId === row.planId) {
return;
}
this.reloadFlag = "0";
this.planId = row.planId
this.materialBomId = row.materialBomId
this.nowMaterial = row.materialName
this.saleOrderId = row.saleOrderId
this.saleType = row.saleType
this.finalProcessFlag = row.finalProcessFlag
await getProductPlanDetails({pageNum: 1, pageSize: 5, planId: row.planId}).then(res => {
if (res.rows.length === 0) {
this.$confirm('是否生成计划明细', '确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success'
}).then(() => {
insertProductPlanDetails({
"planId": e.row.planId,
}).then(val => {
getProductPlanDetails({pageNum: this.nowNum2, pageSize: 5, planId: e.row.planId}).then(res => {
this.tableData1 = res.rows
this.totalNum2 = Math.ceil(res.total / 5)
})
this.$message({
type: 'info',
message: `生成完成`
});
insertProductPlanDetails({
"planId": row.planId,
}).then(val => {
getProductPlanDetails({pageNum: 1, pageSize: 5, planId: row.planId}).then(res => {
this.tableData1 = res.rows
this.totalNum3 = Math.ceil(res.total / 5)
this.$refs.table.setCurrentRow(res.rows[0]);
})
})
.catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
})
} else {
this.tableData1 = res.rows
this.totalNum2 = Math.ceil(res.total / 5)
this.$refs.table.setCurrentRow(res.rows[0]);
this.totalNum3 = Math.ceil(res.total / 5)
}
})
},
//
getMaterials(val) {
@ -848,7 +863,7 @@ export default {
applyReason: '',
taskType: "1",
warehouseFloor: 4,
mesAreaType:3,
mesAreaType: 3,
wmsRawOutstockDetailList: []
}
this.dialogVisible = true
@ -1130,6 +1145,10 @@ export default {
color: #fff
}
/deep/ .current-row .cell {
color: #000
}
/deep/ .el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
background-color: #fff0;
}

@ -95,7 +95,7 @@
confirm-button-text='是'
icon="el-icon-info"
icon-color="red"
title="确定开始计划吗?"
title="确定开始吗?"
@confirm="startNextProduction(props.row,i)"
>
@ -926,7 +926,7 @@ export default {
},
//
accomplishPlan() {
this.$confirm('是否完成计划', '确认', {
this.$confirm('确定完成么', '确认', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'success'
@ -939,6 +939,7 @@ export default {
type: 'success',
message: '已完成'
});
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
this.tableData = e.rows
this.totalNum1 = Math.ceil(e.total / 5)

@ -125,7 +125,7 @@
icon="el-icon-info"
icon-color="red"
style="margin-left: 8px"
title="确定开始计划吗?"
title="确定开始吗?"
@confirm="startPlan(scope.row)"
>
<el-button
@ -490,7 +490,7 @@ export default {
this.form.materialId = val.materialId
this.form.materialCode = val.materialCode
this.form.materialName = val.materialName
this.form.planDetailStatus = setState(data.planDetailStatus)
this.form.planDetailStatus = setState(data?.planDetailStatus)
this.getInfo(val)
},
getInfo(e) {

@ -208,6 +208,7 @@
<el-button
size="mini"
type="text"
icon="el-icon-timer"
@click="handleProductionScheduling(scope.row)"
v-hasPermi="['mes:productOrder:edit']"
>排产
@ -258,14 +259,15 @@
<el-button
size="mini"
type="text"
icon="el-icon-right"
icon="el-icon-user-solid"
@click="handleDispatch(scope.row)"
v-if="scope.row.orderStatus !== MES_ORDER_STATUS.UNPUBLISH"
>生产派工
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-right"
icon="el-icon-box"
@click="handleMaterialUsage(scope.row)"
>库存使用
</el-button>

@ -763,9 +763,25 @@ export default {
let toUpdatedProductPlans = [];
let undispathDesc;
let currentDispatchAmount = 0;
let planDispatchAmount = 0;
for (let i = 0; i < dataList.length; i++) {
let e = dataList[i];
if (e.firstFlag && e.firstFlag === "1") {//
let dispatchAmount = e.dispatchAmount;
const numericAmount = parseInt(dispatchAmount, 10);
if (!this.isPositiveInteger(numericAmount) || numericAmount <= 0) {
this.$modal.msgError("派工数量须为大于等于0的正整数");
return;
}
planDispatchAmount = numericAmount;
if (e.newFlag && e.newFlag === "1") {
currentDispatchAmount += numericAmount;
}
}
let dispatchFlag = false;
undispathDesc = "派工单号为[" + e.dispatchCode + "],工序为[" + e.processName + "],请选择用户派工";
if (e.processType !== this.PROCESS_TYPE.AUTO) {
@ -792,6 +808,8 @@ export default {
toUpdatedProductPlan.planStatus = processUser.planStatus;
toUpdatedProductPlan.attachId = e.attachId;
toUpdatedProductPlan.sopId = e.sopId;
toUpdatedProductPlan.planAmount = planDispatchAmount;
toUpdatedProductPlan.dispatchAmount = planDispatchAmount;
toUpdatedProductPlan.children = null;
let productionTimeHour = processUser.productionTime;
@ -814,18 +832,7 @@ export default {
return;
}
if (e.firstFlag && e.firstFlag === "1") {//
let dispatchAmount = e.dispatchAmount;
const numericAmount = parseInt(dispatchAmount, 10);
if (!this.isPositiveInteger(numericAmount) || numericAmount <= 0) {
this.$modal.msgError("派工数量须为大于等于0的正整数");
return;
}
if (e.newFlag && e.newFlag === "1") {
currentDispatchAmount += numericAmount;
}
}
}
//

Loading…
Cancel
Save