修复以下bug:
在5楼拆分区,生成配对码后,不显示,还继续让生成配对码
申请领物料,数量为0保存后提示保存成功
申请领物料,增加loading防止多次点击,申请成功后不用关闭直接刷新页面,按当前页刷新,可以继续申请其他页的。
申请领料,物料规格没显示
只能有一条待开始的返库记录
每个plandetail只能执行返库一次
返库时判断扫描的条码的plan与当前plan是否一样
五楼申请领料,没保存endstationcode
master
xs 3 months ago
parent 733a748704
commit 5f3c53cc70

@ -551,7 +551,7 @@ public class MesProductPlanDetailServiceImpl implements IMesProductPlanDetailSer
throw new ServiceException("配对条码有误,未找到原材料条码信息"); throw new ServiceException("配对条码有误,未找到原材料条码信息");
} }
if (StringUtils.isNotEmpty(bindBarcodeInfo.getSafeFlag()) && if (StringUtils.isNotEmpty(bindBarcodeInfo.getSingleFlag()) &&
bindBarcodeInfo.getSingleFlag().equals(MesConstants.MES_BARCODE_SINGLE_FLAG_INTERNAL)) {//对内生产 bindBarcodeInfo.getSingleFlag().equals(MesConstants.MES_BARCODE_SINGLE_FLAG_INTERNAL)) {//对内生产
if (StringUtils.isEmpty(bindBarcodeInfo.getProductBarcode())) { if (StringUtils.isEmpty(bindBarcodeInfo.getProductBarcode())) {
throw new ServiceException("未按成品条码生成原材料条码"); throw new ServiceException("未按成品条码生成原材料条码");

@ -52,6 +52,7 @@
<result property="displayFlag" column="display_flag"/> <result property="displayFlag" column="display_flag"/>
<result property="processProductionTime" column="process_production_time"/> <result property="processProductionTime" column="process_production_time"/>
<result property="nickName" column="nick_name"/>
</resultMap> </resultMap>
<resultMap id="MesProductPlanMesProductPlanDetailResult" type="MesProductPlan" extends="MesProductPlanResult"> <resultMap id="MesProductPlanMesProductPlanDetailResult" type="MesProductPlan" extends="MesProductPlanResult">
@ -298,7 +299,7 @@
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="sopId != null and sopId != ''">sop_id = #{sopId},</if> <if test="sopId != null">sop_id = #{sopId},</if>
</trim> </trim>
where plan_id = #{planId} where plan_id = #{planId}
</update> </update>
@ -507,4 +508,38 @@
</select> </select>
<select id="selectOnlyConflictMesProductPlans" parameterType="MesProductPlan" resultMap="MesProductPlanResult">
select a.plan_id,
a.product_order_id,
a.plan_code,
a.dispatch_code,
a.material_id,
a.material_bom_id,
a.process_id,
a.process_order,
a.last_process_id,
a.final_process_flag,
a.station_id,
a.user_id,
a.production_time,
a.dispatch_amount,
a.plan_amount,
a.complete_amount,
a.plan_begin_time,
a.plan_end_time,
su.nick_name
from mes_product_plan a
left join sys_user su on a.user_id=su.user_id
<where>
AND date_format(a.plan_begin_time,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{planEndTime},'%Y-%m-%d %H:%i:%s')
AND date_format(a.plan_end_time,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{planBeginTime},'%Y-%m-%d %H:%i:%s')
AND a.user_id = #{userId}
AND a.plan_status in ('1','2')
</where>
</select>
</mapper> </mapper>

@ -69,6 +69,12 @@ public class WmsRawInstock extends BaseEntity
@Excel(name = "执行状态(0待执行,1执行中,2执行完成)") @Excel(name = "执行状态(0待执行,1执行中,2执行完成)")
private String executeStatus; private String executeStatus;
/**请求返回标识(1是)wcs在将execute_status改为1时此return_flag改为null*/
private String returnFlag;
private String planDetailCode;
/** 同步ERP状态(0:失败,1成功) */ /** 同步ERP状态(0:失败,1成功) */
@Excel(name = "同步ERP状态(0:失败,1成功)") @Excel(name = "同步ERP状态(0:失败,1成功)")
private String erpStatus; private String erpStatus;
@ -264,6 +270,23 @@ public class WmsRawInstock extends BaseEntity
{ {
return executeStatus; return executeStatus;
} }
public String getReturnFlag() {
return returnFlag;
}
public void setReturnFlag(String returnFlag) {
this.returnFlag = returnFlag;
}
public String getPlanDetailCode() {
return planDetailCode;
}
public void setPlanDetailCode(String planDetailCode) {
this.planDetailCode = planDetailCode;
}
public void setErpStatus(String erpStatus) public void setErpStatus(String erpStatus)
{ {
this.erpStatus = erpStatus; this.erpStatus = erpStatus;

@ -20,4 +20,8 @@ public class WmsRawBackVo {
@NotNull(message="返库ID不能为空") @NotNull(message="返库ID不能为空")
private Long warehouseId; private Long warehouseId;
//生产计划编号
@NotBlank(message="生产计划明细编号必须输入")
private String planDetailCode;
} }

@ -17,9 +17,11 @@ import com.hw.mes.api.RemoteMesService;
import com.hw.mes.api.domain.MesBaseBarcodeInfo; import com.hw.mes.api.domain.MesBaseBarcodeInfo;
import com.hw.wms.config.WmsConfig; import com.hw.wms.config.WmsConfig;
import com.hw.wms.domain.WmsBaseLocation; import com.hw.wms.domain.WmsBaseLocation;
import com.hw.wms.domain.WmsRawOutstock;
import com.hw.wms.domain.WmsRawStock; import com.hw.wms.domain.WmsRawStock;
import com.hw.wms.domain.vo.*; import com.hw.wms.domain.vo.*;
import com.hw.wms.mapper.WmsBaseLocationMapper; import com.hw.wms.mapper.WmsBaseLocationMapper;
import com.hw.wms.mapper.WmsRawOutstockMapper;
import com.hw.wms.mapper.WmsRawStockMapper; import com.hw.wms.mapper.WmsRawStockMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity; import org.springframework.http.HttpEntity;
@ -53,6 +55,9 @@ public class WmsRawInstockServiceImpl implements IWmsRawInstockService {
@Autowired @Autowired
private WmsRawStockMapper wmsRawStockMapper; private WmsRawStockMapper wmsRawStockMapper;
@Autowired
private WmsRawOutstockMapper wmsRawOutstockMapper;
@Autowired @Autowired
private WmsConfig wmsConfig; private WmsConfig wmsConfig;
@ -281,7 +286,7 @@ public class WmsRawInstockServiceImpl implements IWmsRawInstockService {
throw new ServiceException("物料条码有误"); throw new ServiceException("物料条码有误");
} }
//判断此柜体是否已跟拆分门板绑定,如果未绑定不允许返库 //判断此柜体是否已跟配对码绑定,如果未绑定不允许返库
R<MesBaseBarcodeInfo> bindBarcodeInfoR = remoteMesService.getBarcodeByBindBarcode(materialBarcode, SecurityConstants.INNER); R<MesBaseBarcodeInfo> bindBarcodeInfoR = remoteMesService.getBarcodeByBindBarcode(materialBarcode, SecurityConstants.INNER);
if (bindBarcodeInfoR == null) { if (bindBarcodeInfoR == null) {
throw new ServiceException("没找到绑定信息,不能返库"); throw new ServiceException("没找到绑定信息,不能返库");
@ -291,18 +296,42 @@ public class WmsRawInstockServiceImpl implements IWmsRawInstockService {
throw new ServiceException("没找到绑定信息,不能返库"); throw new ServiceException("没找到绑定信息,不能返库");
} }
WmsRawInstock queryReturnRawInstock = new WmsRawInstock();
queryReturnRawInstock.setReturnFlag("1");
List<WmsRawInstock> returnRawInstocks = wmsRawInstockMapper.selectWmsRawInstockList(queryReturnRawInstock);
if (returnRawInstocks != null && !returnRawInstocks.isEmpty()) {
throw new ServiceException("有正在返库的记录,不能再次申请");
}
WmsRawInstock queryPlanRawInstock = new WmsRawInstock();
queryPlanRawInstock.setPlanDetailCode(wmsRawBackVo.getPlanDetailCode());
List<WmsRawInstock> planRawInstocks = wmsRawInstockMapper.selectWmsRawInstockList(queryPlanRawInstock);
if (planRawInstocks != null && !planRawInstocks.isEmpty()) {
throw new ServiceException("此生产明细已经申请过返库,无需重复申请");
}
//4楼上5楼的不需要申请领柜体所以也不需要返库
WmsRawOutstock queryRawOutsotck = new WmsRawOutstock();
queryRawOutsotck.setPlanDetailCode(wmsRawBackVo.getPlanDetailCode());
queryRawOutsotck.setSplitFlag(WmsConstants.WMS_RAW_OUTSTOCK_SPLIT_FLAG_YES);
List<WmsRawOutstock> wmsRawOutstocks = wmsRawOutstockMapper.selectWmsRawOutstockList(queryRawOutsotck);
if (wmsRawOutstocks == null || wmsRawOutstocks.isEmpty()) {
throw new ServiceException("没有领取柜体,无需返库");
}
if (!baseBarcodeInfo.getPlanDetailCode().equals(wmsRawBackVo.getPlanDetailCode())) {
throw new ServiceException(String.format("此物料条码明细编号为%s:,与此明细编号不符", baseBarcodeInfo.getPlanDetailCode()));
}
//判断是否有返库记录,不能重复提交 //判断是否有返库记录,不能重复提交
WmsRawInstock queryRawInstock = new WmsRawInstock(); WmsRawInstock queryRawInstock = new WmsRawInstock();
queryRawInstock.setMaterialBarcode(materialBarcode);//materialBarcode是索引先不需要加别的条件获取出来再过滤 queryRawInstock.setMaterialBarcode(materialBarcode);
queryRawInstock.setInstockType(WmsConstants.RAW_INSTOCK_INSTOCK_TYPE_RETURN);
List<WmsRawInstock> wmsRawInstocks = wmsRawInstockMapper.selectWmsRawInstockList(queryRawInstock); List<WmsRawInstock> wmsRawInstocks = wmsRawInstockMapper.selectWmsRawInstockList(queryRawInstock);
if (wmsRawInstocks != null && !wmsRawInstocks.isEmpty()) { if (wmsRawInstocks != null && !wmsRawInstocks.isEmpty()) {
List<WmsRawInstock> returnRawInstocks = wmsRawInstocks.stream().filter
(wmsRawInstock -> wmsRawInstock.getInstockType().equals(WmsConstants.RAW_INSTOCK_INSTOCK_TYPE_RETURN))
.collect(Collectors.toList());
if (returnRawInstocks != null && !returnRawInstocks.isEmpty()) {
throw new ServiceException("已经有此物料返库记录,无需重复返库"); throw new ServiceException("已经有此物料返库记录,无需重复返库");
} }
}
WmsRawInstock wmsRawInstock = new WmsRawInstock(); WmsRawInstock wmsRawInstock = new WmsRawInstock();
wmsRawInstock.setTaskCode(Seq.getId(Seq.rawInstockSeqType, Seq.rawInstockSeqCode)); wmsRawInstock.setTaskCode(Seq.getId(Seq.rawInstockSeqType, Seq.rawInstockSeqCode));
@ -316,6 +345,8 @@ public class WmsRawInstockServiceImpl implements IWmsRawInstockService {
wmsRawInstock.setPalletInfoCode(baseBarcodeInfo.getPalletInfoCode()); wmsRawInstock.setPalletInfoCode(baseBarcodeInfo.getPalletInfoCode());
wmsRawInstock.setInstockAmount(BigDecimal.ONE); wmsRawInstock.setInstockAmount(BigDecimal.ONE);
wmsRawInstock.setExecuteStatus(WmsConstants.WMS_EXECUTE_STATUS_TOEXECUTE); wmsRawInstock.setExecuteStatus(WmsConstants.WMS_EXECUTE_STATUS_TOEXECUTE);
wmsRawInstock.setReturnFlag("1");//返回标识只能有一个returnflag为1的。
wmsRawInstock.setPlanDetailCode(wmsRawBackVo.getPlanDetailCode());
wmsRawInstock.setApplyBy(SecurityUtils.getUsername()); wmsRawInstock.setApplyBy(SecurityUtils.getUsername());
wmsRawInstock.setApplyDate(new Date()); wmsRawInstock.setApplyDate(new Date());

@ -18,6 +18,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="palletInfoCode" column="pallet_info_code" /> <result property="palletInfoCode" column="pallet_info_code" />
<result property="instockAmount" column="instock_amount" /> <result property="instockAmount" column="instock_amount" />
<result property="executeStatus" column="execute_status" /> <result property="executeStatus" column="execute_status" />
<result property="returnFlag" column="return_flag" />
<result property="planDetailCode" column="plan_detail_code" />
<result property="erpStatus" column="erp_status" /> <result property="erpStatus" column="erp_status" />
<result property="erpAmount" column="erp_amount" /> <result property="erpAmount" column="erp_amount" />
<result property="applyBy" column="apply_by" /> <result property="applyBy" column="apply_by" />
@ -52,6 +54,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="operationType != null and operationType != ''"> and operation_type = #{operationType}</if> <if test="operationType != null and operationType != ''"> and operation_type = #{operationType}</if>
<if test="instockType != null and instockType != ''"> and instock_type = #{instockType}</if> <if test="instockType != null and instockType != ''"> and instock_type = #{instockType}</if>
<if test="executeStatus != null and executeStatus != ''"> and execute_status = #{executeStatus}</if> <if test="executeStatus != null and executeStatus != ''"> and execute_status = #{executeStatus}</if>
<if test="returnFlag != null and returnFlag != ''"> and return_flag = #{returnFlag}</if>
<if test="planDetailCode != null and planDetailCode != ''"> and plan_detail_code = #{planDetailCode}</if>
<if test="applyBy != null and applyBy != ''"> and apply_by = #{applyBy}</if> <if test="applyBy != null and applyBy != ''"> and apply_by = #{applyBy}</if>
<if test="applyDate != null "> and apply_date = #{applyDate}</if> <if test="applyDate != null "> and apply_date = #{applyDate}</if>
<if test="updateDate != null "> and update_date = #{updateDate}</if> <if test="updateDate != null "> and update_date = #{updateDate}</if>
@ -80,6 +84,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="palletInfoCode != null">pallet_info_code,</if> <if test="palletInfoCode != null">pallet_info_code,</if>
<if test="instockAmount != null">instock_amount,</if> <if test="instockAmount != null">instock_amount,</if>
<if test="executeStatus != null and executeStatus != ''">execute_status,</if> <if test="executeStatus != null and executeStatus != ''">execute_status,</if>
<if test="returnFlag != null and returnFlag != ''">return_flag,</if>
<if test="planDetailCode != null and planDetailCode != ''">plan_detail_code,</if>
<if test="erpStatus != null">erp_status,</if> <if test="erpStatus != null">erp_status,</if>
<if test="erpAmount != null">erp_amount,</if> <if test="erpAmount != null">erp_amount,</if>
<if test="applyBy != null">apply_by,</if> <if test="applyBy != null">apply_by,</if>
@ -104,6 +110,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="palletInfoCode != null">#{palletInfoCode},</if> <if test="palletInfoCode != null">#{palletInfoCode},</if>
<if test="instockAmount != null">#{instockAmount},</if> <if test="instockAmount != null">#{instockAmount},</if>
<if test="executeStatus != null and executeStatus != ''">#{executeStatus},</if> <if test="executeStatus != null and executeStatus != ''">#{executeStatus},</if>
<if test="returnFlag != null and returnFlag != ''">#{returnFlag},</if>
<if test="planDetailCode != null and planDetailCode != ''">#{planDetailCode},</if>
<if test="erpStatus != null">#{erpStatus},</if> <if test="erpStatus != null">#{erpStatus},</if>
<if test="erpAmount != null">#{erpAmount},</if> <if test="erpAmount != null">#{erpAmount},</if>
<if test="applyBy != null">#{applyBy},</if> <if test="applyBy != null">#{applyBy},</if>

@ -266,3 +266,18 @@ export function fileDownload(file) {
} }
}) })
} }
// 表单重置
export function getNowDateTime() {
let now = new Date();
let year = now.getFullYear();
let month = ('0' + (now.getMonth() + 1)).slice(-2); // 月份是从0开始的所以加1
let day = ('0' + now.getDate()).slice(-2);
let hours = ('0' + now.getHours()).slice(-2);
let minutes = ('0' + now.getMinutes()).slice(-2);
let seconds = ('0' + now.getSeconds()).slice(-2);
return year+"-"+month+"-"+day +" "+ hours+":"+minutes+":"+seconds;
}

@ -168,7 +168,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" :loading="submitLoading" @click="submitForm"> </el-button>
<el-button @click="cancelProductBarcode"> </el-button> <el-button @click="cancelProductBarcode"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -246,6 +246,8 @@ export default {
return { return {
// //
loading: true, loading: true,
//
submitLoading:false,
// //
ids: [], ids: [],
barcodeInfos: [], barcodeInfos: [],
@ -428,6 +430,7 @@ export default {
// this.queryParams.barcodeTypeStr = this.BARCODE_TYPE.PRODUCT + "," + this.BARCODE_TYPE.BIND_BARCODE; // this.queryParams.barcodeTypeStr = this.BARCODE_TYPE.PRODUCT + "," + this.BARCODE_TYPE.BIND_BARCODE;
} else if (barcodeType === this.BARCODE_TYPE_PARAM.SPLIT_BIND_BARCODE) {// } else if (barcodeType === this.BARCODE_TYPE_PARAM.SPLIT_BIND_BARCODE) {//
this.queryParams.barcodeType = this.BARCODE_TYPE.RAW ; this.queryParams.barcodeType = this.BARCODE_TYPE.RAW ;
this.queryParams.bindOrFlag = "1";
// this.queryParams.barcodeTypeStr = this.BARCODE_TYPE.RAW + "," + this.BARCODE_TYPE.BIND_BARCODE; // this.queryParams.barcodeTypeStr = this.BARCODE_TYPE.RAW + "," + this.BARCODE_TYPE.BIND_BARCODE;
// this.queryParams.bindOrFlag = "1"; // this.queryParams.bindOrFlag = "1";
} }
@ -633,10 +636,13 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
this.submitLoading = true;
addProductBarcode(this.form).then(response => { addProductBarcode(this.form).then(response => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.addProductBarcodeOpen = false; this.addProductBarcodeOpen = false;
this.getList(); this.getList();
}).finally(e =>{
this.submitLoading = false;
}); });
} }
}); });

@ -1,5 +1,5 @@
<template> <template>
<div > <div>
<el-form ref="form" :model="form" label-width="100px"> <el-form ref="form" :model="form" label-width="100px">
<el-form-item label="派工单号"> <el-form-item label="派工单号">
<el-input v-model="form.planCode" disabled style="width:360px"></el-input> <el-input v-model="form.planCode" disabled style="width:360px"></el-input>
@ -19,10 +19,11 @@
</el-form> </el-form>
<el-table <el-table
:cell-style="{textAlign:'center'}" :cell-style="{textAlign:'center'}"
:data="form.wmsRawOutstockDetailList" :data="wmsRawOutstockDetailList"
:header-cell-style="{textAlign:'center'}" :header-cell-style="{textAlign:'center'}"
max-height="19.13vw" max-height="19.13vw"
style="width: 100%;" style="width: 100%;"
v-loading="loading"
> >
<el-table-column <el-table-column
label="物料编号" label="物料编号"
@ -101,7 +102,9 @@
/> />
<div style="text-align: center;margin-top: 30px"> <div style="text-align: center;margin-top: 30px">
<el-button type="primary" @click="submitForm"></el-button> <el-button type="primary" :loading="submitLoading" @click="submitForm"></el-button>
<el-button type="info" @click="closeParentDialog"></el-button>
</div> </div>
</div> </div>
@ -119,10 +122,13 @@ export default {
} }
}, },
dicts: ['mes_safe_flag'], dicts: ['mes_safe_flag'],
inject: ['closeDialog'],
data() { data() {
return { return {
// //
loading: true, loading: true,
//
submitLoading : false,
// //
ids: [], ids: [],
// //
@ -140,6 +146,7 @@ export default {
// //
open: false, open: false,
maxPlanAmount: 1, maxPlanAmount: 1,
returnFlag: '',
taskType: '', taskType: '',
// //
queryParams: { queryParams: {
@ -170,6 +177,10 @@ export default {
}, },
// //
form: {}, form: {},
RETURN_FLAG: {//
YES: '1',//
},
wmsRawOutstockDetailList:[],
}; };
}, },
created() { created() {
@ -195,9 +206,14 @@ export default {
warehouseFloor: this.defineData?.warehouseFloor, warehouseFloor: this.defineData?.warehouseFloor,
wmsRawOutstockDetailList: [] wmsRawOutstockDetailList: []
} }
alert(JSON.stringify(this.form))
} }
if (this.defineData.maxPlanAmount) { if (this.defineData.maxPlanAmount) {
this.maxPlanAmount = this.defineData?.maxPlanAmount this.maxPlanAmount = this.defineData.maxPlanAmount
}
if (this.defineData.returnFlag) {
this.returnFlag = this.defineData.returnFlag;
} }
}, },
@ -223,6 +239,7 @@ export default {
// //
searchMaterial() { searchMaterial() {
this.loading = true;
if (this.form.warehouseId === null || this.form.warehouseId === undefined if (this.form.warehouseId === null || this.form.warehouseId === undefined
|| this.form.warehouseId === "") { || this.form.warehouseId === "") {
return; return;
@ -233,12 +250,13 @@ export default {
this.queryParams.planDetailCode = this.form.planDetailCode; this.queryParams.planDetailCode = this.form.planDetailCode;
getStockTotal(this.queryParams).then(e => { getStockTotal(this.queryParams).then(e => {
this.total = e.total; this.total = e.total;
this.form.wmsRawOutstockDetailList = e.rows.map(r => { this.wmsRawOutstockDetailList = e.rows.map(r => {
return { return {
stockTotalId: r.stockTotalId, stockTotalId: r.stockTotalId,
materialId: r.materialId, materialId: r.materialId,
materialCode: r.materialCode, materialCode: r.materialCode,
materialName: r.materialName, materialName: r.materialName,
materialSpec: r.materialSpec,
safeFlag: r.safeFlag, safeFlag: r.safeFlag,
availableAmount: r.totalAmount - r.occupyAmount - r.frozenAmount, availableAmount: r.totalAmount - r.occupyAmount - r.frozenAmount,
unavailableAmount: r.occupyAmount + r.frozenAmount, unavailableAmount: r.occupyAmount + r.frozenAmount,
@ -246,20 +264,11 @@ export default {
planAmount: this.planAmount planAmount: this.planAmount
} }
}) })
this.loading = false;
}) })
}, },
/** 查询物料信息列表 */
getList() {
this.loading = true;
this.queryParams.selectType = this.selectType;
listMaterialinfo(this.queryParams).then(response => {
this.materialinfoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// //
cancel() { cancel() {
this.open = false; this.open = false;
@ -302,12 +311,29 @@ export default {
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
let realOutstockDetailList = this.wmsRawOutstockDetailList.filter(detail => detail.planAmount > 0);
if (realOutstockDetailList.length <= 0) {
this.$modal.msgWarning("请输入领取数量");
return;
}
this.submitloading = true;
this.form.wmsRawOutstockDetailList = realOutstockDetailList;
applyRawOutstock(this.form).then(e => { applyRawOutstock(this.form).then(e => {
this.dialogVisible = false if (this.returnFlag === this.RETURN_FLAG.YES) {
this.closeParentDialog()
} else {
this.searchMaterial();
}
this.$modal.msgSuccess("申请成功"); this.$modal.msgSuccess("申请成功");
}).finally(e => {
this.submitloading = false;
}) })
}, },
closeParentDialog() {
this.closeDialog()
}
} }
}; };
</script> </script>

@ -563,6 +563,11 @@ export default {
PrintPage PrintPage
}, },
dicts: ['wms_raw_return_task_type', 'mes_safe_flag'], dicts: ['wms_raw_return_task_type', 'mes_safe_flag'],
provide(){
return{
closeDialog : this.closeDialog
}
},
data() { data() {
return { return {
fileList: [], fileList: [],
@ -722,10 +727,10 @@ export default {
// this.$modal.msgError(""); // this.$modal.msgError("");
// return; // return;
// } // }
this.loginStationInfo = e.data; // this.loginStationInfo = e.data;
//TODO //TODO
this.loginStationInfo = {stationId:"1",endStationCode:"ss"} this.loginStationInfo = {stationId:"1",stationCode:"ZP_02"}
this.getProductPlans(); this.getProductPlans();
this.getChartData(); this.getChartData();
}); });
@ -1407,15 +1412,16 @@ export default {
applyReason: '', applyReason: '',
taskType: this.taskType, taskType: this.taskType,
stationId: this.loginStationInfo.stationId, stationId: this.loginStationInfo.stationId,
endStationCode: this.loginStationInfo.stationCode, stationCode: this.loginStationInfo.stationCode,
warehouseFloor: 5, warehouseFloor: 5,
wmsRawOutstockDetailList: [] wmsRawOutstockDetailList: []
} }
}, },
closeDialog(){
this.dialogVisible = false;
},
print() { print() {
@ -1489,11 +1495,11 @@ export default {
}, },
/** 柜体返库按钮操作 */ /** 柜体返库按钮操作 */
handleRawBack(scope) { handleRawBack() {
this.resetRawBack(); this.resetRawBack();
// //
if (this.warehouseList == null || this.warehouseList.length == 0) { if (this.warehouseList == null || this.warehouseList.length === 0) {
getWarehouses({"warehouseFloor": 5, "returnFlag": 1}).then(e => { getWarehouses({warehouseFloor: 5, returnFlag: 1}).then(e => {
this.warehouseList = e.data this.warehouseList = e.data
this.rawBackForm.warehouseId = this.warehouseList[0]?.warehouseId this.rawBackForm.warehouseId = this.warehouseList[0]?.warehouseId
}) })
@ -1508,6 +1514,7 @@ export default {
submitRawBack() { submitRawBack() {
this.$refs["rawBackForm"].validate(valid => { this.$refs["rawBackForm"].validate(valid => {
if (valid) { if (valid) {
this.rawBackForm.planDetailCode = this.form.planDetailCode;
applyRawBack(this.rawBackForm).then(response => { applyRawBack(this.rawBackForm).then(response => {
this.$modal.msgSuccess("申请成功"); this.$modal.msgSuccess("申请成功");
this.cancelRawBack(); this.cancelRawBack();

@ -45,6 +45,17 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="打印标识" prop="printFlag">
<el-select v-model="queryParams.printFlag" placeholder="请选择打印标识" clearable>
<el-option
v-for="dict in dict.type.mes_print_flag"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
@ -621,6 +632,7 @@ export default {
pageSize: 10, pageSize: 10,
printTime: null, printTime: null,
printPerson: null, printPerson: null,
printFlag: null,
batchFlag: null, batchFlag: null,
barcodeType: "1", barcodeType: "1",
barcodeInfo: null, barcodeInfo: null,

@ -61,7 +61,8 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="danger" icon="el-icon-delete" @click="handleDeleteMesProductPlan(scope)" <el-button type="danger" icon="el-icon-delete" @click="handleDeleteMesProductPlan(scope)"
v-if="scope.row.firstFlag != null && scope.row.firstFlag === '1'"></el-button> v-if="scope.row.firstFlag != null && scope.row.firstFlag === '1'
&& form.orderStatus!==ORDER_STATUS.FINISHED && form.orderStatus!==ORDER_STATUS.RECALLED && form.orderStatus!==ORDER_STATUS.DELETED"></el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -138,14 +139,14 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number style="width:150px;" :min="0" v-model="scope.row.productionTime" <el-input-number style="width:150px;" :min="0" v-model="scope.row.productionTime"
:disabled="(scope.row.processType === PROCESS_TYPE.MANUAL && scope.row.children != null && scope.row.children !== undefined) :disabled="(scope.row.processType === PROCESS_TYPE.MANUAL && scope.row.children != null && scope.row.children !== undefined)
|| scope.row.planStatus=== PLAN_STATUS.FINISHED"/> || scope.row.planStatus=== PLAN_STATUS.FINISHED || form.orderStatus===ORDER_STATUS.FINISHED || form.orderStatus===ORDER_STATUS.RECALLED || form.orderStatus===ORDER_STATUS.DELETED"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="计划开始时间" prop="planBeginTime" width="230"> <el-table-column align="center" label="计划开始时间" prop="planBeginTime" width="230">
<template slot-scope="scope"> <template slot-scope="scope">
<el-date-picker v-model="scope.row.planBeginTime" style="width:200px;" <el-date-picker v-model="scope.row.planBeginTime" style="width:200px;"
:disabled="(scope.row.processType === PROCESS_TYPE.MANUAL && scope.row.children != null && scope.row.children !== undefined) :disabled="(scope.row.processType === PROCESS_TYPE.MANUAL && scope.row.children != null && scope.row.children !== undefined)
|| scope.row.planStatus=== PLAN_STATUS.FINISHED" || scope.row.planStatus=== PLAN_STATUS.FINISHED || form.orderStatus===ORDER_STATUS.FINISHED || form.orderStatus===ORDER_STATUS.RECALLED || form.orderStatus===ORDER_STATUS.DELETED"
clearable clearable
placeholder="请选择计划开始时间" placeholder="请选择计划开始时间"
type="datetime" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
@ -156,7 +157,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-date-picker v-model="scope.row.planEndTime" style="width:200px;" <el-date-picker v-model="scope.row.planEndTime" style="width:200px;"
:disabled="(scope.row.processType === PROCESS_TYPE.MANUAL && scope.row.children != null && scope.row.children !== undefined) :disabled="(scope.row.processType === PROCESS_TYPE.MANUAL && scope.row.children != null && scope.row.children !== undefined)
|| scope.row.planStatus=== PLAN_STATUS.FINISHED" || scope.row.planStatus=== PLAN_STATUS.FINISHED || form.orderStatus===ORDER_STATUS.FINISHED || form.orderStatus===ORDER_STATUS.RECALLED || form.orderStatus===ORDER_STATUS.DELETED"
clearable clearable
placeholder="请选择计划完成时间" placeholder="请选择计划完成时间"
type="datetime" value-format="yyyy-MM-dd HH:mm:ss"/> type="datetime" value-format="yyyy-MM-dd HH:mm:ss"/>
@ -166,7 +167,7 @@
<el-table-column align="center" label="状态" prop="planStatus" width="150"> <el-table-column align="center" label="状态" prop="planStatus" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.planStatus" :disabled="true" placeholder="请选择状态" <el-select v-model="scope.row.planStatus" :disabled="true" placeholder="请选择状态"
v-if="scope.row.children == null || scope.row.children === undefined"> v-if="scope.row.children == null || scope.row.children === undefined || scope.row.processType === PROCESS_TYPE.AUTO">
<el-option <el-option
v-for="dict in dict.type.product_status" v-for="dict in dict.type.product_status"
:key="dict.value" :key="dict.value"
@ -202,7 +203,9 @@
size="mini" size="mini"
type="primary" type="primary"
@click="handleApplyRawOutstock(scope.row)" @click="handleApplyRawOutstock(scope.row)"
v-if="scope.row.processType === PROCESS_TYPE.AUTO && scope.row.planId!=null && scope.row.planId!==''" v-if="scope.row.processType === PROCESS_TYPE.AUTO && scope.row.planId!=null && scope.row.planId!==''
&& scope.row.planStatus !== PLAN_STATUS.FINISHED
&& form.orderStatus!==ORDER_STATUS.FINISHED && form.orderStatus!==ORDER_STATUS.RECALLED && form.orderStatus!==ORDER_STATUS.DELETED"
>投料 >投料
</el-button> </el-button>
@ -438,7 +441,7 @@ export default {
// (K) // (K)
fileSize: { fileSize: {
type: Number, type: Number,
default: 500000, default: 500,
}, },
// , ['png', 'jpg', 'jpeg'] // , ['png', 'jpg', 'jpeg']
fileType: { fileType: {

@ -281,6 +281,10 @@ export default {
}) })
}, },
closeDialog(){
}
} }
}; };
</script> </script>

Loading…
Cancel
Save