车间:
1、一楼扫描物料确认使用、一楼成品入库
2、四楼扫描物料确认使用和四楼成品入库
3、五楼申请领料、柜体绑定
master
xins 7 months ago
parent 545077ea29
commit aaadc09d00

@ -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 {

@ -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
})
}

@ -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">
@ -25,8 +25,10 @@
</el-form-item>
</el-form>
<div style="text-align: center">
<el-button type="primary" @click="getMaterials" :disabled="!form.planCode">领料</el-button>
<el-button :disabled="form.planDetailStatus === '已完成' || !form.planDetailStatus" type="primary" @click="finish"></el-button>
<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'"
v-model="assignModel"
@ -45,6 +47,7 @@
<el-button slot="reference" type="success">下发
</el-button>
</el-popover>
</div>
</div>
@ -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() {
@ -614,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)
@ -623,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)
@ -1018,7 +1086,7 @@ export default {
warehouseId: this.form1.warehouseId,
materialName: val
}).then(e => {
this.$set(this.form1,'wmsRawOutstockDetailList',e.data.map(r => {
this.form1.wmsRawOutstockDetailList = e.data.map(r => {
return {
materialId: r.materialId,
materialCode: r.materialCode,
@ -1027,8 +1095,7 @@ export default {
unavailableAmount: r.occupyAmount + r.frozenAmount,
planAmount: r.planAmount
}
}))
console.log(this.form1)
})
})
},
@ -1057,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,6 +372,7 @@
<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" @click="logout">退</el-button>
</el-row>
@ -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() {
@ -905,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,7 +207,7 @@
<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" @click="logout">退</el-button>
</el-row>
@ -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() {
@ -713,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"
>
@ -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)
})
@ -481,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)
})
@ -821,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), {

@ -171,7 +171,6 @@ import * as echarts from 'echarts'
import {
completeProductPlanDetail,
getNewestProductPlanDetail,
getProductPlanDetails,
getProductPlans,
startNextProductPlanDetail
} from '@/api/board'
@ -399,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({
@ -408,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)
@ -417,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)

Loading…
Cancel
Save