mes:
1、生产工单、销售订单和采购订单完善
2、车间生产完善
3、连接条码枪通用方法js
wms:
1获取仓库列表完善
master
xs 4 months ago
parent 133ffe986e
commit 43e1bf0ccd

@ -239,4 +239,5 @@ public class WmsConstants {
//车间生产区域类型
public static final String MES_AREA_TYPE_FOUTHFLOOR_ASSEMBLE = "3";//四楼装配区域
public static final String MES_AREA_TYPE_FOUTHFLOOR_PARTS = "4";//四楼零配件仓库
}

@ -64,6 +64,8 @@ public class MesProductOrderServiceImpl implements IMesProductOrderService {
//销售订单添加工单:校验是否超出销售数量
if (mesProductOrder.getSaleOrderFlag().equals("1") && StringUtils.isNotNull(mesProductOrder.getSaleOrderId())) {
checkSalesQuantity(mesProductOrder);
}else{
mesProductOrder.setSaleAmount(mesProductOrder.getPlanAmount());
}
return mesProductOrderMapper.insertMesProductOrder(mesProductOrder);
}

@ -2,6 +2,7 @@ package com.hw.mes.service.impl;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import com.hw.common.core.constant.MesConstants;
@ -279,7 +280,12 @@ public class MesProductPlanServiceImpl implements IMesProductPlanService {
public List<MesProductPlan> selectMesProductPlanJoinList(MesProductPlan mesProductPlan) {
Long stationId = SecurityUtils.getStationId();
mesProductPlan.setStationId(stationId);
return mesProductPlanMapper.selectMesProductPlanJoinList(mesProductPlan);
List<MesProductPlan> mesProductPlans = mesProductPlanMapper.selectMesProductPlanJoinList(mesProductPlan);
return mesProductPlans;
// return mesProductPlans.stream().
// filter(e -> e.getPlanStatus().equals(MesConstants.MES_PRODUCT_PLAN_STATUS_DISPATCHED) ||
// e.getPlanStatus().equals(MesConstants.MES_PRODUCT_PLAN_STATUS_STARTED)).collect(Collectors.toList());
}

@ -341,6 +341,7 @@
<if test="stationId != null ">and mpp.station_id = #{stationId}</if>
<if test="planStatus != null and planStatus != ''">and mpp.plan_status = #{planStatus}</if>
</where>
order by mpo.plan_delivery_date
</select>

@ -52,6 +52,9 @@ public class WmsBaseWarehouseServiceImpl implements IWmsBaseWarehouseService
if(wmsBaseWarehouse.getMesAreaType().equals(WmsConstants.MES_AREA_TYPE_FOUTHFLOOR_ASSEMBLE)){
wmsBaseWarehouse.setWarehouseId(wmsConfig.getFourthFloorPartsWarehouseId());
}
if(wmsBaseWarehouse.getMesAreaType().equals(WmsConstants.MES_AREA_TYPE_FOUTHFLOOR_PARTS)){
wmsBaseWarehouse.setWarehouseId(wmsConfig.getFourthFloorPartsWarehouseId());
}
}
return wmsBaseWarehouseMapper.selectWmsBaseWarehouseList(wmsBaseWarehouse);
}

@ -4,6 +4,7 @@ import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import com.hw.common.core.constant.MesConstants;
import com.hw.common.core.constant.SecurityConstants;
import com.hw.common.core.constant.WmsConstants;
import com.hw.common.core.domain.R;
@ -350,17 +351,21 @@ public class WmsProductInstockServiceImpl implements IWmsProductInstockService {
String materialBarcode = wmsProduceInstockVo.getMaterialBarcode();
R<MesBaseBarcodeInfo> baseBarcodeInfoR = remoteMesService.getBarcode(materialBarcode, SecurityConstants.INNER);
if (baseBarcodeInfoR == null) {
throw new ServiceException("物料码有误");
throw new ServiceException("物料码有误");
}
MesBaseBarcodeInfo baseBarcodeInfo = baseBarcodeInfoR.getData();
if (baseBarcodeInfo == null) {
throw new ServiceException("物料码有误");
throw new ServiceException("物料码有误");
}
if (baseBarcodeInfo.getBarcodeType().equals(WmsConstants.RWA_STOCK_STOCK_TYPE_RAW)) {
throw new ServiceException("此物料条码为原材料,非成品条码");
}
if (baseBarcodeInfo.getPrintFlag().equals(MesConstants.MES_BARCODE_PRINT_FLAG_NO)) {
throw new ServiceException("此条码还未打印");
}
//如果执行状态不是已完成是agv入库则需要判断是否有入库记录避免重复提交如果执行状态是已完成人工入库则判断是否有此成品条码库存即可
if (!executeStatus.equals(WmsConstants.WMS_EXECUTE_STATUS_FINISH)) {
WmsProductInstock queryProductInstock = new WmsProductInstock();

@ -499,11 +499,11 @@ public class WmsRawReturnServiceImpl implements IWmsRawReturnService {
String materialBarcode = rawReturn.getMaterialBarcode();
R<MesBaseBarcodeInfo> baseBarcodeInfoR = remoteMesService.getBarcode(materialBarcode, SecurityConstants.INNER);
if (baseBarcodeInfoR == null) {
throw new ServiceException("物料码有误");
throw new ServiceException("物料码有误");
}
MesBaseBarcodeInfo baseBarcodeInfo = baseBarcodeInfoR.getData();
if (baseBarcodeInfo == null) {
throw new ServiceException("物料码有误");
throw new ServiceException("物料码有误");
}
String batchFlag = baseBarcodeInfo.getBatchFlag();
if (!batchFlag.equals(MesConstants.IS_BATCH)) {
@ -513,7 +513,7 @@ public class WmsRawReturnServiceImpl implements IWmsRawReturnService {
}
if (!baseBarcodeInfo.getBarcodeType().equals(MesConstants.MES_BARCODE_TYPE_RAW)) {
throw new ServiceException("物料码有误,此物料编码非原材料编码");
throw new ServiceException("物料码有误,此物料编码非原材料编码");
}
WmsRawStock existedRawStock = wmsRawStockMapper.selectRawStockByBarcode(materialBarcode);

@ -256,7 +256,7 @@ export default {
this.$store.dispatch('app/toggleSideBar')
},
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
this.$confirm('确定退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'

@ -46,6 +46,9 @@ export const monitorSerialData = {
}
} catch (error) {
console.error('连接或读取串口时发生错误:', error);
} finally{
this.reader.releaseLock();
await this.serialPort.close();
}
},

@ -340,7 +340,7 @@
<el-dialog :visible.sync="printModel" class="dialog" title="条码打印" width="80%">
<div >
<PrintPage :defineData="PrintData"/>
<PrintPage :defineData="PrintData" v-if="printModel"/>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="printModel = false">关闭</el-button>
@ -880,7 +880,7 @@ export default {
methods: {
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
this.$confirm('确定退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'

@ -69,13 +69,7 @@
>
SOP预览
</el-button>
<el-button
size="small"
type="text"
@click="print(scope.row)"
>
条码打印
</el-button>
<el-button
size="small"
type="text"
@ -212,15 +206,14 @@
{{ scope.row.planDetailStatus === '1' ? '开始' : '完成' }}
</el-button>
<el-button
v-if="scope.row.planDetailStatus !== '3' && scope.row.planDetailStatus !== '9'"
size="small"
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED" size="small"
type="text"
@click="getMaterials(scope) "
>
领料
</el-button>
<el-button
v-if="scope.row.planDetailStatus !== '3' && scope.row.planDetailStatus !== '9'"
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED"
size="small"
type="text"
@click="handleMaterialConfirmForm(scope)"
@ -231,8 +224,17 @@
size="small"
type="text"
@click="returnMaterial(scope)"
v-if="scope.row.planDetailStatus !== PLAN_DETAIL_STATUS.TO_START"
>
退料
退库
</el-button>
<el-button
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"
>
条码
</el-button>
</template>
</el-table-column>
@ -394,7 +396,7 @@
<el-dialog :visible.sync="printModel" class="dialog" title="条码打印" width="80%">
<div style="height: auto;">
<PrintPage :defineData="PrintData"/>
<PrintPage :defineData="PrintData" v-if="printModel"/>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="printModel = false">关闭</el-button>
@ -407,7 +409,7 @@
width="40%">
<el-form ref="productInstockForm" :model="productInstockForm" :rules="productInstockRules" label-width="80px">
<el-form-item label="成品条码" prop="materialBarcode">
<el-input v-model="productInstockForm.materialBarcode"></el-input>
<el-input v-model="productInstockForm.materialBarcode" suffix-icon="el-icon-camera"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -428,11 +430,14 @@
<el-form-item v-if="false" label="明细ID" prop="planDetailId">
<el-input v-model="materialConfirmForm.planDetailId"></el-input>
</el-form-item>
<el-form-item label="明细编号" prop="planDetailCode">
<el-input v-model="materialConfirmForm.planDetailCode" disabled></el-input>
</el-form-item>
<el-form-item label="物料条码" prop="materialBarcode">
<el-input v-model="materialConfirmForm.materialBarcode"></el-input>
<el-input v-model="materialConfirmForm.materialBarcode" suffix-icon="el-icon-camera"></el-input>
</el-form-item>
<el-form-item label="数量" prop="checkAmount">
<el-input v-model="materialConfirmForm.checkAmount"></el-input>
<el-input v-model="materialConfirmForm.checkAmount" disabled></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -441,40 +446,38 @@
</div>
</el-dialog>
<el-dialog :visible.sync="returnModelVisible" title="退料" width="25%">
<el-form ref="returnModelForm" :model="returnModelForm" :rules="returnModelFormRules" label-width="80px">
<el-dialog :visible.sync="returnModelVisible" title="申请退库" width="400">
<el-form ref="returnModelForm" :model="returnModelForm" label-width="80px" :rules="returnModelFormRules">
<el-form-item label="计划编号">
<el-input v-model="returnModelForm.planCode" autocomplete="off" disabled></el-input>
</el-form-item>
<el-form-item label="明细编号">
<el-input v-model="returnModelForm.planDetailCode" autocomplete="off" disabled></el-input>
</el-form-item>
<el-form-item label="成品">
<!--el-form-item label="成品">
<el-input v-model="returnModelForm.materialName" autocomplete="off" disabled></el-input>
</el-form-item>
</el-form-item-->
<el-form-item label="物料条码">
<el-input v-model="returnModelForm.materialBarcode" class="input-with-select" placeholder="请输入内容"
@blur="setReturnModelForm">
<el-button slot="append" icon="el-icon-search"></el-button>
<el-input placeholder="请扫描或输入物料条码" v-model="returnModelForm.materialBarcode" suffix-icon="el-icon-camera">
</el-input>
</el-form-item>
<el-form-item label="仓库">
<el-select v-model="returnModelForm.warehouseId" :disabled="!returnModelForm.materialBarcode"
placeholder="请选择仓库">
<el-option v-for="i in WarehousesList" :key="i.value" :label="i.label" :value="i.value"></el-option>
<el-select v-model="returnModelForm.warehouseId" placeholder="请选择仓库"
style="width: 260px">
<el-option :label="i.label" :key="i.value" :value="i.value" v-for="i in WarehousesList"></el-option>
</el-select>
</el-form-item>
<el-form-item label="数量">
<el-input-number v-model="returnModelForm.planAmount" :min="1" controls-position="right"></el-input-number>
<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-form-item>
<el-form-item label="退库类型" prop="taskType">
<el-select v-model="returnModelForm.taskType" placeholder="请选择退库类型">
<el-option v-for="i in dict.type.wms_raw_return_task_type" :key="i.value" :label="i.label"
:value="i.value"></el-option>
<el-select v-model="returnModelForm.taskType" placeholder="请选择退库类型" style="width: 260px">
<el-option :label="i.label" :key="i.value" :value="i.value"
v-for="i in dict.type.wms_raw_return_task_type"></el-option>
</el-select>
</el-form-item>
<el-form-item label="申请原因">
<el-input v-model="returnModelForm.applyReason" autocomplete="off" type="textarea"></el-input>
<el-input type="textarea" v-model="returnModelForm.applyReason" autocomplete="off"></el-input>
</el-form-item>
<el-form-item>
<el-button @click="returnModelVisible = false"> </el-button>
@ -547,6 +550,7 @@
<script>
import Chart from '@/components/board/Chart'
import PrintPage from '@/views/mes/barcode/endProductIndex'
import {monitorSerialData} from "@/utils/serial"
import * as echarts from 'echarts'
import {
getStockTotal,
@ -572,6 +576,7 @@ export default {
Chart,
PrintPage
},
mixins: [monitorSerialData],
data() {
return {
info: {},
@ -620,7 +625,8 @@ export default {
materialBarcode: null,
planId: null,
planDetailId: null,
checkAmount: null
planDetailCode: null,
checkAmount: 1
},
materialConfirmRules: {
materialBarcode: [
@ -634,14 +640,25 @@ export default {
taskType: [
{required: true, message: '请选择退库类型', trigger: 'change'}
],
planAmount: [
{required: true, message: '请输入数量', trigger: 'change'}
],
},
headers: {
Authorization: "Bearer " + getToken(),
},
PLAN_DETAIL_STATUS:{
TO_START : '1',
STARTED : '2',
FINISHED : '3',
ABNORMAL_FINISHED : '9'
},
}
},
mounted() {
this.firstConnectSerial();
// setInterval(() => {
// this.$notify.info({
// title: '',
@ -666,7 +683,7 @@ export default {
methods: {
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
this.$confirm('确定退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@ -951,6 +968,19 @@ export default {
handleProductInstock() {
this.resetProductInstock();
this.productInstockVisible = true;
if (!this.checkSerialConnected()) {
this.$confirm('请连接条码枪', '提示', {
confirmButtonText: '连接',
showClose: true,
showCancelButton: true,
type: 'warning'
}).then(() => {
console.log("dddd")
this.connectSerial(this.setSerialData);
}).catch(() => {
});
}
},
@ -977,20 +1007,36 @@ export default {
materialBarcode: null,
planId: null,
planDetailId: null,
checkAmount: null
planDetailCode:null,
checkAmount: 1
};
this.resetForm("materialConfirmForm");
},
/** 成品入库按钮操作 */
/** 扫描确认按钮操作 */
handleMaterialConfirmForm(scope) {
this.materialConfirmForm = {
materialBarcode: null,
planId: scope.row.planId,
planDetailId: scope.row.planDetailId,
checkAmount: null
planDetailCode:scope.row.planDetailCode,
checkAmount: 1
};
this.materialConfirmVisible = true;
if (!this.checkSerialConnected()) {
this.$confirm('请连接条码枪', '提示', {
confirmButtonText: '连接',
showClose: true,
showCancelButton: true,
type: 'warning'
}).then(() => {
console.log("dddd")
this.connectSerial(this.setSerialData);
}).catch(() => {
});
}
},
@ -1012,6 +1058,28 @@ export default {
returnMaterial(e) {
this.returnModelVisible = true
this.returnModelForm = {materialName: this.nowMaterial, ...e.row}
this.setReturnModelForm();
if (!this.checkSerialConnected()) {
this.$confirm('请连接条码枪', '提示', {
confirmButtonText: '连接',
showClose: true,
// beforeClose:async(action,instance,done)=>{
// if(action==='confirm'){
// }else{
// this.connectSerialPort();
// }
//
// },
showCancelButton: true,
type: 'warning'
}).then(() => {
console.log("dddd")
this.connectSerial(this.setSerialData);
}).catch(() => {
});
}
},
setReturnModelForm() {
getWarehouses({
@ -1024,16 +1092,15 @@ export default {
value: v.warehouseId,
}
})
this.returnModelForm.warehouseId = e.data[0]?.warehouseId
})
},
returnModelConfirm() {
this.$refs.returnModelForm.validate((valid) => {
if (valid) {
let data = {}
let keys = ['warehouseId', 'planCode', 'planDetailCode', 'productId', 'materialBarcode', 'planAmount', 'taskType', 'applyReason']
keys.forEach(v => {
data[v] = this.returnModelForm[v]
})
let data = [this.returnModelForm]
applyRawReturn(data).then(v => {
if (v.code === 200) {
this.$message({
@ -1115,6 +1182,34 @@ export default {
return ['png', 'jpg', 'jpeg'].includes(name.toLowerCase())
},
firstConnectSerial() {
if (!this.checkSerialConnected()) {
this.$confirm('请连接条码枪', '提示', {
confirmButtonText: '连接',
showClose: true,
showCancelButton: true,
type: 'warning'
}).then(() => {
this.connectSerial(this.setSerialData);
}).catch(() => {
});
}
},
setSerialData() {
if (this.productInstockVisible) {
this.productInstockForm.materialBarcode = this.serialData;
} else if (this.returnModelVisible) {
this.returnModelForm.materialBarcode = this.serialData;
} else if(this.materialConfirmVisible){
this.materialConfirmForm.materialBarcode = this.serialData;
}
// console.log(this.serialData)
}
}
}
</script>

@ -20,7 +20,7 @@
>
</el-table-column>
<el-table-column
label="编号"
label="工编号"
prop="planCode"
>
</el-table-column>
@ -110,7 +110,7 @@
>
</el-table-column>
<el-table-column
label="编号"
label="工编号"
prop="planCode"
width="80"
>
@ -155,7 +155,7 @@
{{ scope.row.planDetailStatus === '1' ? '开始' : '完成' }}
</el-button>
<el-button
v-if="scope.row.planDetailStatus !== '3' && scope.row.planDetailStatus !== '9'"
v-if="scope.row.planDetailStatus === PLAN_DETAIL_STATUS.STARTED"
size="small"
type="text"
@click="getMaterials(scope) "
@ -224,7 +224,7 @@
title="领料"
width="40%">
<el-form ref="form" :model="form" label-width="80px">
<el-form-item label="编号">
<el-form-item label="工编号">
<el-input v-model="form.planCode" disabled></el-input>
</el-form-item>
<el-form-item label="明细编号">
@ -311,7 +311,7 @@
<el-dialog :visible.sync="printModel" title="条码打印" width="80%" class="dialog">
<div>
<PrintPage :defineData="PrintData"/>
<PrintPage :defineData="PrintData" v-if="printModel"/>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="printModel = false">关闭</el-button>
@ -325,7 +325,7 @@
width="40%">
<el-form ref="productInstockForm" :model="productInstockForm" :rules="productInstockRules" label-width="80px">
<el-form-item label="成品条码" prop="materialBarcode">
<el-input v-model="productInstockForm.materialBarcode"></el-input>
<el-input v-model="productInstockForm.materialBarcode" suffix-icon="el-icon-camera"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -759,7 +759,7 @@ export default {
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
this.$confirm('确定退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@ -904,7 +904,7 @@ export default {
wmsRawOutstockDetailList: []
}
//
getWarehouses({"warehouseFloor": 4}).then(e => {
getWarehouses({"warehouseFloor": 4,"mesAreaType" : 4}).then(e => {
this.warehouseList = e.data
this.form.warehouseId = e.data[0]?.warehouseId
this.searchMaterial("");

@ -3,14 +3,14 @@
<div class="headTitle">京源环保生产管理系统</div>
<div class="chartBox chartBox1">
<div class="title">工单信息</div>
<div class="title">计划明细</div>
<div class="chart">
<div class="form">
<el-form :model="form" label-position="right" label-width="80px" size="mini">
<el-form-item label="明细编号">
<el-input v-model="form.planDetailCode"></el-input>
</el-form-item>
<el-form-item label="编号">
<el-form-item label="工编号">
<el-input v-model="form.planCode"></el-input>
</el-form-item>
<el-form-item label="成品编号">
@ -35,7 +35,7 @@
<div style="text-align: center">
<el-button type="success" @click="handleRawOutstock" v-if="this.form.planDetailStatus!=null && this.form.planDetailStatus==='已开始'"></el-button>
<el-button type="warning" @click="handleRawOutstock" v-if="this.form.planDetailStatus!=null && this.form.planDetailStatus==='已开始'"></el-button>
<el-button type="primary" @click="accomplishPlan"></el-button>
<el-button type="primary" @click="accomplishPlan" v-if="this.form.planDetailStatus!=null && this.form.planDetailStatus==='已开始'"></el-button>
</div>
</div>
@ -110,7 +110,7 @@
>
</el-table-column>
<el-table-column
label="编号"
label="工编号"
prop="planCode"
>
</el-table-column>
@ -474,7 +474,7 @@ export default {
methods: {
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
this.$confirm('确定退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@ -1061,18 +1061,14 @@ export default {
setSerialData() {
// if (!this.checkSerialConnected()) {//
// }
if (this.open) {//
if (this.open) {//
if (this.loacationCodeFocused) {
this.wmsForm.locationCode = this.serialData
this.dynamicFocus("materialBarcodeRef");
} else if (this.materialBarcodeFocused) {
this.wmsForm.materialBarcode = this.serialData;
}
}
// console.log(this.serialData)
}

@ -3,11 +3,11 @@
<div class="headTitle">京源环保生产管理系统</div>
<div class="chartBox chartBox1">
<div class="title">工单信息</div>
<div class="title">计划明细</div>
<div class="chart">
<div class="form1">
<el-form :model="form" label-position="right" label-width="80px">
<el-form-item label="编号">
<el-form-item label="工编号">
<el-input v-model="form.planCode"></el-input>
</el-form-item>
<el-form-item label="明细编号">
@ -24,7 +24,7 @@
</el-form-item>
</el-form>
<div style="text-align: center">
<el-button :disabled="form.planDetailStatus === '已完成'" type="primary" @click="finish()"></el-button>
<el-button v-if="form.planDetailStatus === '已开始'" type="primary" @click="finish()"></el-button>
</div>
</div>
@ -70,7 +70,7 @@
>
</el-table-column>
<el-table-column
label="编号"
label="工编号"
prop="planCode"
>
</el-table-column>
@ -264,14 +264,14 @@ export default {
}
},
mounted() {
setInterval(() => {
this.$notify.info({
title: '通知',
message: '通知公告',
position: 'bottom-right',
duration: 0
});
}, 60 * 1000)
// setInterval(() => {
// this.$notify.info({
// title: '',
// message: '',
// position: 'bottom-right',
// duration: 0
// });
// }, 60 * 1000)
this.$refs.chart2.setData({
tooltip: {
trigger: 'axis',
@ -443,7 +443,7 @@ export default {
methods: {
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
this.$confirm('确定退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@ -478,7 +478,7 @@ export default {
}
this.form = data.data || {}
this.form.materialId = val.materialId
this.form.materilCode = val.materialCode
this.form.materialCode = val.materialCode
this.form.materialName = val.materialName
this.form.planDetailStatus = setState(data.data.planDetailStatus)
this.getInfo(val)

@ -207,7 +207,7 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-if="scope.row.orderStatus === '0'"
v-if="scope.row.orderStatus === MES_ORDER_STATUS.UNPUBLISH"
v-hasPermi="['mes:productOrder:edit']"
>修改工单
</el-button>
@ -215,16 +215,18 @@
size="mini"
type="text"
icon="el-icon-video-pause"
v-if="scope.row.status===MES_ORDER_STATUS.STARTED"
v-if="scope.row.orderStatus===MES_ORDER_STATUS.STARTED"
@click="handlePause(scope.row)"
v-hasPermi="['mes:productOrder:pause']"
>暂停
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-caret-right"
v-if="scope.row.status===MES_ORDER_STATUS.PAUSE"
v-if="scope.row.orderStatus===MES_ORDER_STATUS.PAUSE"
@click="handleContinue(scope.row)"
v-hasPermi="['mes:productOrder:continue']"
>继续
</el-button>
<el-button
@ -248,7 +250,7 @@
type="text"
icon="el-icon-right"
@click="handleDispatch(scope.row)"
v-if="scope.row.orderStatus === '1' || scope.row.orderStatus === '3'"
v-if="(scope.row.orderStatus === MES_ORDER_STATUS.PUBLISHED || scope.row.orderStatus === MES_ORDER_STATUS.STARTED)"
>生产派工
</el-button>
</template>
@ -403,9 +405,6 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="销售数量" prop="saleAmount">
<el-input-number v-model="form.saleAmount" placeholder="请输入销售数量"/>
</el-form-item>
<el-form-item label="计划数量" prop="planAmount">
<el-input-number v-model="form.planAmount" placeholder="请输入计划数量"/>
</el-form-item>
@ -641,8 +640,13 @@ export default {
},
MES_ORDER_STATUS: {
STARTED: "3",//
PAUSE: "4", //
UNPUBLISH : '0',//
PUBLISHED : '1',//
FINISHED : '2',//
STARTED: '3',//
PAUSE: '4', //
RECALLED: '5',//
DELETED : '9',//
}
};
},
@ -923,7 +927,7 @@ export default {
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.saleAmount < this.form.planAmount) {
if (this.form.saleOrderFlag === '1' && this.form.saleAmount < this.form.planAmount) {
return this.$modal.msgError("计划数量不能大于销售数量!");
}
if (this.form.productOrderId != null) {

@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="96px">
<el-form-item label="采购订单编号" prop="poNo">
<el-input
v-model="queryParams.poNo"
@ -64,7 +64,7 @@
<el-table-column label="采购订单编号" align="center" prop="poNo" />
<el-table-column label="物料编码" align="center" prop="materialCode" />
<el-table-column label="物料名称" align="center" prop="materialName" />
<el-table-column label="订单计划数量" align="center" prop="orderAmount" />
<el-table-column label="订单数量" align="center" prop="orderAmount" />
<el-table-column label="审核日期" align="center" prop="approveDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.approveDate, '{y}-{m}-{d}') }}</span>

@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="96px">
<el-form-item label="销售订单编号" prop="saleorderCode">
<el-input
v-model="queryParams.saleorderCode"
@ -9,32 +9,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="单据状态" prop="documentStatus">
<el-select v-model="queryParams.documentStatus" placeholder="请选择单据状态" clearable>
<el-option
v-for="dict in dict.type.document_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="所属工厂" prop="factoryId">
<el-input
v-model="queryParams.factoryId"
placeholder="请输入所属工厂"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="所属产线" prop="prodlineId">
<el-input
v-model="queryParams.prodlineId"
placeholder="请输入所属产线"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料编码" prop="materialCode">
<el-input
v-model="queryParams.materialCode"
@ -52,16 +27,6 @@
/>
</el-form-item>
<el-form-item label="是否已下达计划" prop="isRelease">
<el-select v-model="queryParams.isRelease" placeholder="请选择是否已下达计划" clearable>
<el-option
v-for="dict in dict.type.is_release"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="完成日期" prop="completeDate">-->
<!-- <el-date-picker clearable-->
<!-- v-model="queryParams.completeDate"-->
@ -109,7 +74,7 @@
<!-- v-hasPermi="['mes:saleOrder:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<!--el-col :span="1.5">
<el-button
type="warning"
plain
@ -119,7 +84,7 @@
v-hasPermi="['mes:saleOrder:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar-->
</el-row>
<el-table v-loading="loading" :data="saleOrderList" @selection-change="handleSelectionChange">
@ -140,7 +105,7 @@
<el-table-column label="物料编码" align="center" prop="materialCode" v-if="columns[9].visible"/>
<el-table-column label="物料名称" align="center" prop="materialName" v-if="columns[10].visible"/>
<el-table-column label="物料组" align="center" prop="matkl" v-if="columns[11].visible"/>
<el-table-column label="订单计划数量" align="center" prop="orderAmount" v-if="columns[12].visible"/>
<el-table-column label="订单数量" align="center" prop="orderAmount" v-if="columns[12].visible"/>
<el-table-column label="完成数量" align="center" prop="completeAmount" v-if="columns[13].visible"/>
<el-table-column label="已发布数量" align="center" prop="releaseQty" v-if="columns[14].visible"/>
<el-table-column label="是否已下达计划" align="center" prop="isRelease" v-if="columns[15].visible" >
@ -184,7 +149,7 @@
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" v-if="columns[23].visible"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<!--el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
@ -201,7 +166,7 @@
v-hasPermi="['mes:saleOrder:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table-column-->
</el-table>
<pagination
@ -398,34 +363,34 @@ export default {
],
},
columns: [
{ key: 0, label: `主键标识`, visible: true },
{ key: 1, label: `ERP主键`, visible: true },
{ key: 2, label: `ERP订单明细ID`, visible: true },
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `ERP主键`, visible: false },
{ key: 2, label: `ERP订单明细ID`, visible: false },
{ key: 3, label: `销售订单编号`, visible: true },
{ key: 4, label: `销售订单行号`, visible: true },
{ key: 5, label: `单据状态`, visible: true },
{ key: 6, label: `所属工厂`, visible: true },
{ key: 7, label: `所属产线`, visible: true },
{ key: 8, label: `物料ID`, visible: true },
{ key: 4, label: `销售订单行号`, visible: false },
{ key: 5, label: `单据状态`, visible: false },
{ key: 6, label: `所属工厂`, visible: false },
{ key: 7, label: `所属产线`, visible: false },
{ key: 8, label: `物料ID`, visible: false },
{ key: 9, label: `物料编码`, visible: true },
{ key: 10, label: `物料名称`, visible: true },
{ key: 11, label: `物料组`, visible: true },
{ key: 12, label: `订单计划数量`, visible: true },
{ key: 13, label: `完成数量`, visible: true },
{ key: 14, label: `已发布数量`, visible: true },
{ key: 15, label: `是否已下达计划`, visible: true },
{ key: 11, label: `物料组`, visible: false },
{ key: 12, label: `订单数量`, visible: true },
{ key: 13, label: `完成数量`, visible: false },
{ key: 14, label: `已发布数量`, visible: false },
{ key: 15, label: `是否已下达计划`, visible: false },
{ key: 16, label: `审核日期`, visible: true },
{ key: 17, label: `ERP最后修改日期`, visible: true },
{ key: 18, label: `计划交货日期`, visible: true },
{ key: 19, label: `计划开始日期`, visible: true },
{ key: 20, label: `计划结束日期`, visible: true },
{ key: 21, label: `完成日期`, visible: true },
{ key: 22, label: `是否标识1-是0-否`, visible: true },
{ key: 23, label: `备注`, visible: true },
{ key: 24, label: `创建人`, visible: true },
{ key: 25, label: `创建时间`, visible: true },
{ key: 26, label: `更新人`, visible: true },
{ key: 27, label: `更新时间`, visible: true },
{ key: 19, label: `计划开始日期`, visible: false },
{ key: 20, label: `计划结束日期`, visible: false },
{ key: 21, label: `完成日期`, visible: false },
{ key: 22, label: `是否标识1-是0-否`, visible: false },
{ key: 23, label: `备注`, visible: false },
{ key: 24, label: `创建人`, visible: false },
{ key: 25, label: `创建时间`, visible: false },
{ key: 26, label: `更新人`, visible: false },
{ key: 27, label: `更新时间`, visible: false },
],
};
},

Loading…
Cancel
Save