yinq 11 months ago
commit ca34765600

@ -78,4 +78,8 @@ public class MesConstants {
/**校验类型(0不校验,1人工校验,2自动校验)*/
public static final String MES_MATERIAL_BOM_CHECK_TYPE_MANUAL = "1";//人工校验
/**条码信息绑定状态*/
public static final String MES_BARCODE_BIND_STATUS_BINDING= "1";//绑定
}

@ -119,4 +119,9 @@ public enum BusinessType
*/
INSTOCK,
/**
*
*/
BIND,
}

@ -3,6 +3,7 @@ package com.hw.mes.service.impl;
import com.hw.common.core.constant.MesConstants;
import com.hw.common.core.exception.ServiceException;
import com.hw.common.core.utils.DateUtils;
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.domain.MesMaterialCheckResult;
@ -60,6 +61,9 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer
*/
@Override
public List<MesProductPlanDetail> selectMesProductPlanDetailList(MesProductPlanDetail mesProductPlanDetail) {
if(mesProductPlanDetail.getPlanId()==null){
return new ArrayList<MesProductPlanDetail>();
}
return mesProductPlanDetailMapper.selectMesProductPlanDetailList(mesProductPlanDetail);
}
@ -241,8 +245,8 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer
Date currentDate = new Date();
String userName = SecurityUtils.getUsername();
BigDecimal planAmount = null;
if (mesProductPlanDetail.getAttachId() != null) {//如果是按图纸生产的
String attachId = dbProductPlan.getAttachId();
String attachId = dbProductPlan.getAttachId();
if (StringUtils.isNotEmpty(attachId)) {//如果是按图纸生产的
String[] attachIdArr = attachId.split(",");
planAmount = new BigDecimal(attachIdArr.length);
} else {

@ -15,15 +15,48 @@ spring:
discovery:
# 服务注册地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyhb-test
group: xins
config:
# 配置中心地址
server-addr: 175.27.215.92:8848
namespace: jyhb
group: DEFAULT_GROUP
namespace: jyhb-test
group: xins
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
## Tomcat
#server:
# port: 7305
#
## Spring
#spring:
# application:
# # 应用名称
# name: hw-mes
# profiles:
# # 环境配置
# active: prod
# cloud:
# nacos:
# discovery:
# # 服务注册地址
# server-addr: 127.0.0.1:8848
# namespace: jyhb
# group: DEFAULT_GROUP
# config:
# # 配置中心地址
# server-addr: 127.0.0.1:8848
# namespace: jyhb
# group: DEFAULT_GROUP
# # 配置文件格式
# file-extension: yml
# # 共享配置
# shared-configs:
# - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}

@ -211,6 +211,7 @@
<if test="projectNo != null">project_no = #{projectNo},</if>
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="bindBarcode != null">bind_barcode = #{bindBarcode},</if>
<if test="bindStatus != null">bind_status = #{bindStatus},</if>
<if test="bindBy != null">bind_by = #{bindBy},</if>
<if test="bindTime != null">bind_time = #{bindTime},</if>

@ -49,6 +49,7 @@ public class WmsApiController extends BaseController {
// @RequiresPermissions("wms:rawoutstock:list")
@GetMapping("/getWarehouses")
public AjaxResult getWarehouses(WmsBaseWarehouse queryBaseWarehouse) {
queryBaseWarehouse.setWarehouseInstockType(WmsConstants.WMS_WAREHOUSE_INSTOCK_TYPE_RAW);
List<WmsBaseWarehouse> list = wmsBaseWarehouseService.selectWmsBaseWarehouseList(queryBaseWarehouse);
return success(list);
}
@ -130,4 +131,14 @@ public class WmsApiController extends BaseController {
return toAjax(wmsProductInstockService.fourthFloorProduceInstock(wmsProduceInstockVo));
}
/**
*
*/
@Log(title = "原材料返库记录", businessType = BusinessType.APPLY)
@PostMapping(("/applyRawBack"))
public AjaxResult applyRawBack(@Validated @RequestBody List<WmsRawReturn> wmsRawReturns) {
return toAjax(wmsRawReturnService.applyRawReturn(wmsRawReturns));
}
}

@ -524,12 +524,12 @@ public class WmsMobileController extends BaseController {
/**
*
* (inventoryCheckId=3&checkStatus=1(12))
*/
// @RequiresPermissions("wms:rawoutstock:query")
@GetMapping(value = "/getInventoryCheckDetails")
public AjaxResult getInventoryCheckDetails(WmsInventoryCheckDetail wmsInventoryCheckDetail) {
List<WmsInventoryCheckDetail> checkDetails = wmsInventoryCheckService.getIncompletedInventoryCheckDetails(wmsInventoryCheckDetail);
List<WmsInventoryCheckDetail> checkDetails = wmsInventoryCheckService.getInventoryCheckDetails(wmsInventoryCheckDetail);
return success(checkDetails);
}

@ -82,12 +82,12 @@ public interface IWmsInventoryCheckService
// public Map<String,List<WmsInventoryCheckDetail>> getIncompletedInventoryCheckDetails(WmsInventoryCheckDetail wmsInventoryCheckDetail);
/**
* list
* list
*
* @param wmsInventoryCheckDetail
* @return
*/
public List<WmsInventoryCheckDetail> getIncompletedInventoryCheckDetails(WmsInventoryCheckDetail wmsInventoryCheckDetail);
public List<WmsInventoryCheckDetail> getInventoryCheckDetails(WmsInventoryCheckDetail wmsInventoryCheckDetail);
/**
*

@ -89,7 +89,7 @@ public class WmsInventoryCheckServiceImpl implements IWmsInventoryCheckService {
String userName = SecurityUtils.getUsername();
Date currentDate = new Date();
if (inventoryCheckId == null || inventoryCheckId.equals(0L)) {
if (inventoryCheckId == null || inventoryCheckId.equals(0L) || inventoryCheckId.equals(-1L)) {
WmsInventoryCheck queryInventoryCheck = new WmsInventoryCheck();
queryInventoryCheck.setWarehouseId(warehouseId);
queryInventoryCheck.setCheckStatus(WmsConstants.WMS_INVENTORY_CHECK_STATUS_INVENTORYING);
@ -307,7 +307,7 @@ public class WmsInventoryCheckServiceImpl implements IWmsInventoryCheckService {
* @return
*/
@Override
public List<WmsInventoryCheckDetail> getIncompletedInventoryCheckDetails(WmsInventoryCheckDetail wmsInventoryCheckDetail) {
public List<WmsInventoryCheckDetail> getInventoryCheckDetails(WmsInventoryCheckDetail wmsInventoryCheckDetail) {
List<WmsInventoryCheckDetail> wmsInventoryCheckDetailList = wmsInventoryCheckDetailMapper.selectWmsInventoryCheckDetailJoinList(wmsInventoryCheckDetail);
return wmsInventoryCheckDetailList;
}

@ -146,7 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectWmsInventoryCheckDetailJoinVo">
select wicd.inventory_check_detail_id, wicd.inventory_check_id, wicd.material_id, wicd.material_batch,
wicd.stock_type, wicd.stock_id, wicd.stock_amount, wicd.real_amount, wicd.check_status, wicd.inventory_time,
wicd.stock_type, wicd.stock_id, wicd.stock_amount, wicd.real_amount, wicd.check_status, wicd.inventory_time, wicd.location_code,
mbmi.material_code,mbmi.material_name
from wms_inventory_check_detail wicd left join mes_base_material_info mbmi on wicd.material_id = mbmi.material_id
</sql>

@ -163,7 +163,7 @@
<select id="selectWmsInventoryCheckJoinList" parameterType="WmsInventoryCheck" resultMap="WmsInventoryCheckResult">
select wic.inventory_check_id, wic.inventory_check_code, wic.warehouse_id, wic.check_status, wic.begin_time, wic.end_time,
select wic.inventory_check_id, wic.inventory_check_code, wic.warehouse_id, wic.check_status, wic.begin_time, wic.end_time,wic.location_amount, wic.inventorying_amount, wic.inventoried_amount,
wbw.warehouse_name
from wms_inventory_check wic left join wms_base_warehouse wbw on wic.warehouse_id = wbw.warehouse_id
<where>

@ -80,6 +80,34 @@ export function startProductPlanDetail(query) {
})
}
// 一楼成品入库
export function firstFloorProduceInstock(data) {
return request({
url: '/wms/api/firstFloorProduceInstock',
method: 'post',
data: data
})
}
// 四楼成品入库
export function fourthFloorProduceInstock(data) {
return request({
url: '/wms/api/fourthFloorProduceInstock',
method: 'post',
data: data
})
}
//扫描物料条码确认使用
export function scanMaterial2Confirm(data) {
return request({
url: '/mes/api/scanMaterial2Confirm',
method: 'post',
data: data
})
}
/**
* 4楼折弯5
* */
@ -153,3 +181,23 @@ export function directRawOutstock(data) {
data: data
})
}
// 柜体绑定
export function bindBarcode(data) {
return request({
url: '/mes/api/bindBarcode',
method: 'post',
data: data
})
}
// 返库
export function applyRawBack(data) {
return request({
url: '/wms/api/applyRawBack',
method: 'post',
data: data
})
}

@ -13,6 +13,10 @@ const whiteList = ['/login', '/login2', '/register']
router.beforeEach((to, from, next) => {
NProgress.start()
if (getToken()) {
let floorData = JSON.parse(sessionStorage.getItem('FLOORDATA') || '{}')
if(floorData?.route && to.fullPath !== floorData?.route){
next({ path: floorData?.route })
}
to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
/* has token*/
if (to.path === '/login') {

@ -11,6 +11,7 @@ const getters = {
introduction: state => state.user.introduction,
roles: state => state.user.roles,
permissions: state => state.user.permissions,
floorData: state => state.user.floorData,
permission_routes: state => state.permission.routes,
topbarRouters:state => state.permission.topbarRouters,
defaultRoutes:state => state.permission.defaultRoutes,

@ -8,7 +8,7 @@ const user = {
name: '',
avatar: '',
roles: [],
permissions: []
permissions: [],
},
mutations: {
@ -32,7 +32,7 @@ const user = {
},
SET_PERMISSIONS: (state, permissions) => {
state.permissions = permissions
}
},
},
actions: {
@ -100,6 +100,7 @@ const user = {
commit('SET_TOKEN', '')
commit('SET_ROLES', [])
commit('SET_PERMISSIONS', [])
sessionStorage.removeItem('FLOORDATA')
removeToken()
resolve()
}).catch(error => {
@ -115,7 +116,8 @@ const user = {
removeToken()
resolve()
})
}
},
}
}

@ -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="form">
@ -26,6 +26,8 @@
</el-form>
<div style="text-align: center">
<el-button type="primary" @click="getMaterials"></el-button>
<el-button v-if="($route.query && $route.query.id) === '2'" type="info" @click="handleBindBarcode"></el-button>
<el-button v-if="($route.query && $route.query.id) === '2'" type="warning" @click="handleRawBack"></el-button>
<el-button :disabled="form.planDetailStatus === '已完成'" type="primary" @click="finish"></el-button>
<el-popover
v-if="($route.query && $route.query.id) === '2'"
@ -45,6 +47,7 @@
<el-button slot="reference" type="success">下发
</el-button>
</el-popover>
</div>
</div>
@ -188,7 +191,7 @@
<el-button type="primary">首页</el-button>
<!-- <el-button type="success" @click="getMaterialsModel = true">条码打印</el-button>-->
<el-button type="info">SOP预览</el-button>
<el-button type="danger">退出</el-button>
<el-button type="danger" @click="logout">退</el-button>
</el-row>
</div>
@ -230,7 +233,7 @@
</el-form>
<el-table
:cell-style="{textAlign:'center'}"
:data="form.wmsRawOutstockDetailList"
:data="form1.wmsRawOutstockDetailList"
:header-cell-style="{textAlign:'center'}"
max-height="19.13vw"
style="width: 100%"
@ -297,6 +300,43 @@
</div>
</el-dialog>
<el-dialog
:visible.sync="bindBarcodeVisible"
title="柜体绑定"
width="40%">
<el-form ref="bindBarcodeForm" :model="bindBarcodeForm" :rules="bindBarcodeRules" label-width="80px">
<el-form-item label="成品条码" prop="productBarcode">
<el-input v-model="bindBarcodeForm.productBarcode"></el-input>
</el-form-item>
<el-form-item label="物料条码" prop="materialBarcode">
<el-input v-model="bindBarcodeForm.materialBarcode"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitBindBarcode"> </el-button>
<el-button @click="cancelBindBarcode"> </el-button>
</div>
</el-dialog>
<el-dialog
:visible.sync="rawBackVisible"
title="柜体返库"
width="40%">
<el-form ref="rawBackForm" :model="rawBackForm" :rules="rawBackRules" label-width="80px">
<el-form-item label="物料条码" prop="materialBarcode">
<el-input v-model="rawBackForm.materialBarcode"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitRawBack"> </el-button>
<el-button @click="cancelRawBack"> </el-button>
</div>
</el-dialog>
<!-- <el-dialog :visible.sync="assignModel" title="工位选择" width="80%">-->
<!-- <el-table :data="stationData" highlight-current-row-->
@ -343,7 +383,9 @@ import {
startNextProductPlanDetail,
applyRawOutstock,
getStockTotal,
getWarehouses
getWarehouses,
bindBarcode,
applyRawBack
} from "@/api/board";
const setState = (e) => {
@ -406,6 +448,30 @@ export default {
warehouseList: [],
searchMaterialValue: '',
vw: (document.documentElement.clientWidth || document.body.clientWidth) / 100,
bindBarcodeVisible: false,
bindBarcodeForm: {
productBarcode: null,
materialBarcode: null
},
bindBarcodeRules: {
productBarcode: [
{ required: true, message: "成品条码不能为空", trigger: "blur" }
],
materialBarcode: [
{ required: true, message: "物料条码不能为空", trigger: "blur" }
],
},
rawBackVisible: false,
rawBackForm: {
materialBarcode: null,
},
rawBackRules: {
materialBarcode: [
{ required: true, message: "物料条码不能为空", trigger: "blur" }
]
}
}
},
async mounted() {
@ -578,6 +644,18 @@ export default {
})
},
methods: {
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/login?isStationId=true';
})
}).catch(() => {});
},
next1() {
this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
@ -602,6 +680,7 @@ export default {
}
this.form = data.data || {}
this.form.materialId = val.materialId
this.form.materialCode = val.materialCode
this.form.materialName = val.materialName
this.form.planDetailStatus = setState(data.data.planDetailStatus)
this.getInfo(val)
@ -611,6 +690,7 @@ export default {
const {data} = await getNewestProductPlanDetail({planId: val.planId})
this.form = data || {}
this.form.materialId = val.materialId
this.form.materialCode = val.materialCode
this.form.materialName = val.materialName
this.form.planDetailStatus = setState(data.planDetailStatus)
this.getInfo(val)
@ -984,9 +1064,9 @@ export default {
this.dialogVisible = true
this.form1 = {
warehouseId: '',
planId: this.form.row.planId,
planCode: this.form.row.planCode,
planDetailCode: this.form.row.planDetailCode,
planId: this.form?.planId,
planCode: this.form?.planCode,
planDetailCode: this.form?.planDetailCode,
applyReason: '',
taskType: '1',
wmsRawOutstockDetailList: []
@ -1023,7 +1103,7 @@ export default {
warehouseChange(warehouseId) {
this.form.wmsRawOutstockDetailList = [];
this.form.warehouseId = warehouseId;
this.getStockTotal();
this.searchMaterial('');
},
receiveMaterial() {
@ -1044,7 +1124,76 @@ export default {
},
assignClick() {
this.assignModel = true
},
//
resetBindBarcode() {
this.bindBarcodeForm = {
productBarcode: null,
materialBarcode: null,
planCode: this.form.planCode,
planDetailCode: this.form.planDetailCode
};
this.resetForm("bindBarcodeForm");
},
/** 柜体绑定按钮操作 */
handleBindBarcode() {
this.resetBindBarcode();
this.bindBarcodeVisible = true;
},
submitBindBarcode(){
this.$refs["bindBarcodeForm"].validate(valid => {
if (valid) {
bindBarcode(this.bindBarcodeForm).then(response => {
this.$modal.msgSuccess("绑定成功");
this.cancelBindBarcode();
});
}
});
},
cancelBindBarcode(){
this.bindBarcodeVisible = false;
this.resetBindBarcode();
},
//
resetRawBack() {
this.rawBackForm = {
materialBarcode: null,
};
this.resetForm("rawBackForm");
},
/** 成品入库按钮操作 */
handleRawBack(scope) {
this.resetRawBack();
this.rawBackVisible = true;
},
submitRawBack(){
this.$refs["rawBackForm"].validate(valid => {
if (valid) {
applyRawBack(this.rawBackForm).then(response => {
this.$modal.msgSuccess("申请成功");
this.cancelRawBack();
});
}
});
},
cancelRawBack(){
this.rawBackVisible = false;
this.resetRawBack();
}
}
}
</script>

@ -25,7 +25,7 @@
>
</el-table-column>
<el-table-column
label="物料名称"
label="成品名称"
prop="materialName"
width="100"
>
@ -225,11 +225,10 @@
prop="createTime"
width="80"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.planDetailStatus==='1'" size="small"></el-tag>
<el-tag v-if="scope.row.planDetailStatus==='2'" size="small" type="info"></el-tag>
<el-tag v-if="scope.row.planDetailStatus==='3'" size="small" type="success"></el-tag>
</template>
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_plan_detail_status" :value="scope.row.planDetailStatus"/>
</template>
</el-table-column>
<el-table-column
label="操作"
@ -237,7 +236,7 @@
>
<template slot-scope="scope">
<el-button
v-if="scope.row.planDetailStatus !== '3'"
v-if="scope.row.planDetailStatus !== '3' && scope.row.planDetailStatus !== '9'"
size="small"
type="text"
@click="planExecute(scope.row)"
@ -245,6 +244,7 @@
{{ scope.row.planDetailStatus === '1' ? '开始' : '完成' }}
</el-button>
<el-button
v-if="scope.row.planDetailStatus !== '3' && scope.row.planDetailStatus !== '9'"
size="small"
type="text"
@click="getMaterials(scope) "
@ -252,8 +252,10 @@
领料
</el-button>
<el-button
v-if="scope.row.planDetailStatus !== '3' && scope.row.planDetailStatus !== '9'"
size="small"
type="text"
@click="handleMaterialConfirmForm(scope)"
>
扫描
</el-button>
@ -370,8 +372,9 @@
<el-row>
<el-button type="primary">首页</el-button>
<el-button type="success">SOP预览</el-button>
<el-button type="success" @click="handleProductInstock"></el-button>
<el-button type="info">最小化</el-button>
<el-button type="danger">退出</el-button>
<el-button type="danger" @click="logout">退</el-button>
</el-row>
</div>
@ -464,6 +467,47 @@
<el-button @click="printModel = false">关闭</el-button>
</div>
</el-dialog>
<el-dialog
:visible.sync="productInstockVisible"
title="成品入库"
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-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitProductInstock"> </el-button>
<el-button @click="cancelProductInstock"> </el-button>
</div>
</el-dialog>
<el-dialog
:visible.sync="materialConfirmVisible"
title="确认物料使用"
width="40%">
<el-form ref="materialConfirmForm" :model="materialConfirmForm" :rules="materialConfirmRules" label-width="80px">
<el-form-item label="计划ID" prop="planId" v-if="false">
<el-input v-model="materialConfirmForm.planId"></el-input>
</el-form-item>
<el-form-item label="明细ID" prop="planDetailId" v-if="false">
<el-input v-model="materialConfirmForm.planDetailId"></el-input>
</el-form-item>
<el-form-item label="物料条码" prop="materialBarcode">
<el-input v-model="materialConfirmForm.materialBarcode"></el-input>
</el-form-item>
<el-form-item label="数量" prop="checkAmount">
<el-input v-model="materialConfirmForm.checkAmount"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitMaterialConfirm"> </el-button>
<el-button @click="cancelMaterialConfirm"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -477,12 +521,15 @@ import {
applyRawOutstock,
getProductPlans,
insertProductPlanDetails,
getProductPlanDetails, startProductPlanDetail, completeProductPlanDetail
getProductPlanDetails, startProductPlanDetail, completeProductPlanDetail,
firstFloorProduceInstock,
scanMaterial2Confirm
} from '@/api/board'
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
export default {
name: 'Board1',
dicts: ['mes_plan_detail_status'],
components: {
Chart,
PrintPage
@ -508,6 +555,33 @@ export default {
dialogVisible: false,
tableData: [],
tableData1: [],
productInstockVisible: false,
productInstockForm: {
materialBarcode: null
},
productInstockRules: {
materialBarcode: [
{ required: true, message: "成品条码不能为空", trigger: "blur" }
],
},
materialConfirmVisible: false,
materialConfirmForm: {
materialBarcode: null,
planId: null,
planDetailId:null,
checkAmount:null
},
materialConfirmRules: {
materialBarcode: [
{ required: true, message: "物料条码不能为空", trigger: "blur" }
],
checkAmount: [
{ required: true, message: "数量不能为空", trigger: "blur" }
],
}
}
},
mounted() {
@ -684,6 +758,18 @@ export default {
})
},
methods: {
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/login?isStationId=true';
})
}).catch(() => {});
},
next1() {
this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
@ -893,7 +979,81 @@ export default {
print(val) {
this.PrintData = val
this.printModel = true
},
//
resetProductInstock() {
this.productInstockForm = {
materialBarcode: null
};
this.resetForm("productInstockForm");
},
/** 成品入库按钮操作 */
handleProductInstock() {
this.resetProductInstock();
this.productInstockVisible = true;
},
submitProductInstock(){
this.$refs["productInstockForm"].validate(valid => {
if (valid) {
firstFloorProduceInstock(this.productInstockForm).then(response => {
this.$modal.msgSuccess("入库成功");
this.cancelProductInstock();
});
}
});
},
cancelProductInstock(){
this.productInstockVisible = false;
this.resetProductInstock();
},
//
resetMaterialConfirm() {
this.materialConfirmForm = {
materialBarcode: null,
planId: null,
planDetailId:null,
checkAmount:null
};
this.resetForm("materialConfirmForm");
},
/** 成品入库按钮操作 */
handleMaterialConfirmForm(scope) {
this.materialConfirmForm = {
materialBarcode: null,
planId: scope.row.planId,
planDetailId:scope.row.planDetailId,
checkAmount:null
};
this.materialConfirmVisible = true;
},
submitMaterialConfirm(){
this.$refs["materialConfirmForm"].validate(valid => {
if (valid) {
scanMaterial2Confirm(this.materialConfirmForm).then(response => {
this.$modal.msgSuccess("确认成功");
this.cancelMaterialConfirm();
});
}
});
},
cancelMaterialConfirm(){
this.materialConfirmVisible = false;
this.resetMaterialConfirm();
}
}
}
</script>

@ -145,9 +145,7 @@
width="80"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.planDetailStatus==='1'" size="small"></el-tag>
<el-tag v-if="scope.row.planDetailStatus==='2'" size="small" type="info"></el-tag>
<el-tag v-if="scope.row.planDetailStatus==='3'" size="small" type="success"></el-tag>
<dict-tag :options="dict.type.mes_plan_detail_status" :value="scope.row.planDetailStatus"/>
</template>
</el-table-column>
<el-table-column
@ -156,7 +154,7 @@
>
<template slot-scope="scope">
<el-button
v-if="scope.row.planDetailStatus !== '3'"
v-if="scope.row.planDetailStatus !== '3' && scope.row.planDetailStatus !== '9'"
size="small"
type="text"
@click="planExecute(scope.row)"
@ -164,6 +162,7 @@
{{ scope.row.planDetailStatus === '1' ? '开始' : '完成' }}
</el-button>
<el-button
v-if="scope.row.planDetailStatus !== '3' && scope.row.planDetailStatus !== '9'"
size="small"
type="text"
@click="getMaterials(scope) "
@ -171,6 +170,7 @@
领料
</el-button>
<el-button
@click="handleMaterialConfirmForm(scope)"
size="small"
type="text"
>
@ -207,9 +207,9 @@
<div class="bottom">
<el-row>
<el-button type="primary">首页</el-button>
<el-button type="success">键盘</el-button>
<el-button type="success" @click="handleProductInstock"></el-button>
<el-button type="info">最小化</el-button>
<el-button type="danger">退出</el-button>
<el-button type="danger" @click="logout">退</el-button>
</el-row>
</div>
@ -304,6 +304,48 @@
</div>
</el-dialog>
<el-dialog
:visible.sync="productInstockVisible"
title="成品入库"
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-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitProductInstock"> </el-button>
<el-button @click="cancelProductInstock"> </el-button>
</div>
</el-dialog>
<el-dialog
:visible.sync="materialConfirmVisible"
title="确认物料使用"
width="40%">
<el-form ref="materialConfirmForm" :model="materialConfirmForm" :rules="materialConfirmRules" label-width="80px">
<el-form-item label="计划ID" prop="planId" v-if="false">
<el-input v-model="materialConfirmForm.planId"></el-input>
</el-form-item>
<el-form-item label="明细ID" prop="planDetailId" v-if="false">
<el-input v-model="materialConfirmForm.planDetailId"></el-input>
</el-form-item>
<el-form-item label="物料条码" prop="materialBarcode">
<el-input v-model="materialConfirmForm.materialBarcode"></el-input>
</el-form-item>
<el-form-item label="数量" prop="checkAmount">
<el-input v-model="materialConfirmForm.checkAmount"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitMaterialConfirm"> </el-button>
<el-button @click="cancelMaterialConfirm"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -317,12 +359,15 @@ import {
getProductPlanDetails,
getProductPlans, getStockTotal,
insertProductPlanDetails,
startProductPlanDetail
startProductPlanDetail,
fourthFloorProduceInstock,
scanMaterial2Confirm
} from "@/api/board";
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
export default {
name: 'Board1',
dicts: ['mes_plan_detail_status'],
components: {
Chart,
PrintPage
@ -344,6 +389,32 @@ export default {
dialogVisible: false,
tableData: [],
tableData1: [],
productInstockVisible: false,
productInstockForm: {
materialBarcode: null
},
productInstockRules: {
materialBarcode: [
{ required: true, message: "成品条码不能为空", trigger: "blur" }
],
},
materialConfirmVisible: false,
materialConfirmForm: {
materialBarcode: null,
planId: null,
planDetailId:null,
checkAmount:null
},
materialConfirmRules: {
materialBarcode: [
{ required: true, message: "物料条码不能为空", trigger: "blur" }
],
checkAmount: [
{ required: true, message: "数量不能为空", trigger: "blur" }
],
}
}
},
mounted() {
@ -520,6 +591,18 @@ export default {
})
},
methods: {
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/login?isStationId=true';
})
}).catch(() => {});
},
next1() {
this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
@ -701,7 +784,82 @@ export default {
console.log(val)
this.PrintData = val
this.printModel = true
},
//
resetProductInstock() {
this.productInstockForm = {
materialBarcode: null
};
this.resetForm("productInstockForm");
},
/** 成品入库按钮操作 */
handleProductInstock() {
this.resetProductInstock();
this.productInstockVisible = true;
},
submitProductInstock(){
this.$refs["productInstockForm"].validate(valid => {
if (valid) {
fourthFloorProduceInstock(this.productInstockForm).then(response => {
this.$modal.msgSuccess("入库成功");
this.cancelProductInstock();
});
}
});
},
cancelProductInstock(){
this.productInstockVisible = false;
this.resetProductInstock();
},
//
resetMaterialConfirm() {
this.materialConfirmForm = {
materialBarcode: null,
planId: null,
planDetailId:null,
checkAmount:null
};
this.resetForm("materialConfirmForm");
},
/** 成品入库按钮操作 */
handleMaterialConfirmForm(scope) {
this.materialConfirmForm = {
materialBarcode: null,
planId: scope.row.planId,
planDetailId:scope.row.planDetailId,
checkAmount:null
};
this.materialConfirmVisible = true;
},
submitMaterialConfirm(){
this.$refs["materialConfirmForm"].validate(valid => {
if (valid) {
scanMaterial2Confirm(this.materialConfirmForm).then(response => {
this.$modal.msgSuccess("确认成功");
this.cancelMaterialConfirm();
});
}
});
},
cancelMaterialConfirm(){
this.materialConfirmVisible = false;
this.resetMaterialConfirm();
}
}
}
</script>

@ -13,10 +13,10 @@
<el-form-item label="工单编号">
<el-input v-model="form.planCode"></el-input>
</el-form-item>
<el-form-item label="物料编号">
<el-input v-model="form.materialId"></el-input>
<el-form-item label="成品编号">
<el-input v-model="form.materialCode"></el-input>
</el-form-item>
<el-form-item label="物料名称">
<el-form-item label="成品名称">
<el-input v-model="form.materialName"></el-input>
</el-form-item>
<el-form-item label="图纸名称">
@ -114,7 +114,7 @@
>
</el-table-column>
<el-table-column
label="物料名称"
label="成品名称"
prop="materialName"
width="100"
>
@ -188,7 +188,7 @@
<el-button type="primary">首页</el-button>
<el-button type="success" @click="handleRawInstock"></el-button>
<el-button type="info">SOP预览</el-button>
<el-button type="danger">退出</el-button>
<el-button type="danger" @click="logout">退</el-button>
</el-row>
</div>
@ -282,6 +282,7 @@ export default {
getNewestProductPlanDetailJoinAttach({planId: e.rows[0].planId}).then(val => {
this.form = val.data || {}
this.form.materialId = e.rows[0]?.materialId
this.form.materialCode = e.rows[0]?.materialCode
this.form.materialName = e.rows[0]?.materialName
this.form.planDetailStatus = setState(val.data.planDetailStatus)
})
@ -450,6 +451,18 @@ export default {
})
},
methods: {
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/login?isStationId=true';
})
}).catch(() => {});
},
next1() {
this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
@ -469,6 +482,7 @@ export default {
getNewestProductPlanDetailJoinAttach({planId: e.planId}).then(val => {
this.form = val.data
this.form.materialId = e.materialId
this.form.materialCode = e.materialCode
this.form.materialName = e.materialName
this.form.planDetailStatus = setState(val.data.planDetailStatus)
})
@ -809,16 +823,17 @@ export default {
async startNextProduction(val, e) {
const dataIndex = this.tableData.indexOf(val)
const lineIndex = this.tableData[dataIndex].drawing.indexOf(e)
this.$set(this.tableData?.[dataIndex]?.[lineIndex], 'dispatchFlag',false)
// this.$set(this.tableData?.[dataIndex]?.[lineIndex], 'dispatchFlag',false)
await startNextProductPlanDetailAttach({planId: val.planId, attachId: e.attachId})
.catch(() => {
this.$set(this.tableData?.[dataIndex]?.[lineIndex], 'dispatchFlag',true)
// this.$set(this.tableData?.[dataIndex]?.[lineIndex], 'dispatchFlag',true)
})
getNewestProductPlanDetailJoinAttach({planId: val.planId}).then(val => {
this.form = val.data
this.form.materialId = e.materialId
this.form.materialName = e.materialName
this.form.planDetailStatus = setState(val.data.planDetailStatus)
getNewestProductPlanDetailJoinAttach({planId: val.planId}).then(val1 => {
this.form = val1.data
this.form.materialId = val.materialId
this.form.materialCode = val.materialCode
this.form.materialName = val.materialName
this.form.planDetailStatus = setState(val1.data.planDetailStatus)
})
const data = await getPlanDrawings({planId: val.planId, attachId: val.attachId})
this.$set(this.tableData, this.tableData.indexOf(val), {

@ -158,7 +158,7 @@
<el-row>
<el-button type="primary">首页</el-button>
<el-button type="info">SOP预览</el-button>
<el-button type="danger">退出</el-button>
<el-button type="danger" @click="logout">退</el-button>
</el-row>
</div>
@ -171,7 +171,6 @@ import * as echarts from 'echarts'
import {
completeProductPlanDetail,
getNewestProductPlanDetail,
getProductPlanDetails,
getProductPlans,
startNextProductPlanDetail
} from '@/api/board'
@ -372,6 +371,18 @@ export default {
})
},
methods: {
async logout() {
this.$confirm('确定注销并退出系统吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/login?isStationId=true';
})
}).catch(() => {});
},
next1() {
this.nowNum1 += 1
getProductPlans({pageNum: this.nowNum1, pageSize: 5}).then(e => {
@ -387,6 +398,7 @@ export default {
})
},
async startPlan(val) {
alert(JSON.stringify(val))
const data = await startNextProductPlanDetail({planId: val.planId})
if (data.code === 200) {
this.$message({
@ -396,6 +408,7 @@ export default {
}
this.form = data.data || {}
this.form.materialId = val.materialId
this.form.materilCode = val.materialCode
this.form.materialName = val.materialName
this.form.planDetailStatus = setState(data.data.planDetailStatus)
this.getInfo(val)
@ -405,6 +418,7 @@ export default {
const {data} = await getNewestProductPlanDetail({planId: val.planId})
this.form = data || {}
this.form.materialId = val.materialId
this.form.materialCode = val.materialCode
this.form.materialName = val.materialName
this.form.planDetailStatus = setState(data.planDetailStatus)
this.getInfo(val)

@ -201,6 +201,9 @@ export default {
this.$store.dispatch("Login", this.loginForm).then(() => {
let data = this.options.find(v=>v.stationId === this.loginForm.stationId) || {}
let routeData = this.floorData.find(v=>v.floor === data.floor && v.processId === data.processId) || {}
if(routeData.route){
sessionStorage.setItem("FLOORDATA", JSON.stringify(routeData))
}
// this.$router.push({path: this.redirect || "/"}).catch(() => {
// });
this.$router.push({path: routeData.route || this.redirect || "/"}).catch(() => {

Loading…
Cancel
Save