车间生产:
五楼拆分工序和装配工序:如果是合并物料可以查看明细

仓储:
成品出库审核时,审核不通过需要将占用数量更新的bug修复
仓库配置物料显示规格和搜索
库位配置固定条码增加规格的搜索
master
xs 4 days ago
parent ef7fd0dfb5
commit bf650d77cd

@ -34,6 +34,9 @@ public class WmsWarehouseMaterial extends BaseEntity
private String materialName; private String materialName;
private String materialSpec;
public Long getWarehouseMaterialId() { public Long getWarehouseMaterialId() {
return warehouseMaterialId; return warehouseMaterialId;
} }
@ -104,6 +107,14 @@ public class WmsWarehouseMaterial extends BaseEntity
this.materialName = materialName; this.materialName = materialName;
} }
public String getMaterialSpec() {
return materialSpec;
}
public void setMaterialSpec(String materialSpec) {
this.materialSpec = materialSpec;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -11,9 +11,11 @@ import com.hw.common.security.utils.SecurityUtils;
import com.hw.mes.api.domain.MesBaseBarcodeInfo; import com.hw.mes.api.domain.MesBaseBarcodeInfo;
import com.hw.mes.api.domain.MesBaseMaterialInfo; import com.hw.mes.api.domain.MesBaseMaterialInfo;
import com.hw.mes.api.domain.MesBaseStationInfo; import com.hw.mes.api.domain.MesBaseStationInfo;
import com.hw.mes.api.domain.MesSaleOrderRelate;
import com.hw.mes.domain.MesMaterialBom; import com.hw.mes.domain.MesMaterialBom;
import com.hw.mes.domain.MesProductPlan; import com.hw.mes.domain.MesProductPlan;
import com.hw.mes.domain.MesProductPlanDetail; import com.hw.mes.domain.MesProductPlanDetail;
import com.hw.mes.domain.MesSaleOrder;
import com.hw.mes.domain.vo.*; import com.hw.mes.domain.vo.*;
import com.hw.mes.service.*; import com.hw.mes.service.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -51,6 +53,9 @@ public class MesApiController extends BaseController {
@Autowired @Autowired
private IMesBaseMaterialInfoService mesBaseMaterialInfoService; private IMesBaseMaterialInfoService mesBaseMaterialInfoService;
@Autowired
private IMesSaleOrderService mesSaleOrderService;
/** /**
* *
@ -387,4 +392,12 @@ public class MesApiController extends BaseController {
public AjaxResult productPlanDetailContinue(@Validated @RequestBody MesProductPlanDetailPauseVo mesProductPlanDetailPauseVo) { public AjaxResult productPlanDetailContinue(@Validated @RequestBody MesProductPlanDetailPauseVo mesProductPlanDetailPauseVo) {
return success(productPlanDetailService.productPlanDetailContinue(mesProductPlanDetailPauseVo)); return success(productPlanDetailService.productPlanDetailContinue(mesProductPlanDetailPauseVo));
} }
@GetMapping("/selectSaleOrderRelates")
public TableDataInfo selectSaleOrderRelates(MesSaleOrderRelate mesSaleOrderRelate) {
startPage();
List<MesSaleOrderRelate> list = mesSaleOrderService.selectMesSaleOrderRelateJoinProductList(mesSaleOrderRelate);
return getDataTable(list);
}
} }

@ -200,6 +200,9 @@ public class MesProductPlan extends BaseEntity
private Long productId;//针对内部生产5楼的成品ID private Long productId;//针对内部生产5楼的成品ID
private String materialClassfication;
public Long getSaleOrderId() { public Long getSaleOrderId() {
return saleOrderId; return saleOrderId;
} }
@ -597,6 +600,14 @@ public class MesProductPlan extends BaseEntity
this.productId = productId; this.productId = productId;
} }
public String getMaterialClassfication() {
return materialClassfication;
}
public void setMaterialClassfication(String materialClassfication) {
this.materialClassfication = materialClassfication;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

@ -91,4 +91,11 @@ public interface IMesSaleOrderService
* @return * @return
*/ */
public List<MesSaleOrderRelate> selectMesSaleOrderRelateJoinList(Long saleOrderId); public List<MesSaleOrderRelate> selectMesSaleOrderRelateJoinList(Long saleOrderId);
/**
* join product
* @param mesSaleOrderRelate
* @return
*/
public List<MesSaleOrderRelate> selectMesSaleOrderRelateJoinProductList(MesSaleOrderRelate mesSaleOrderRelate);
} }

@ -1268,6 +1268,8 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
*/ */
@Override @Override
public List<MesBaseBarcodeInfo> selectBarCodeAllocationWarehouse(MesBaseBarcodeInfo mesBaseBarcodeInfo) { public List<MesBaseBarcodeInfo> selectBarCodeAllocationWarehouse(MesBaseBarcodeInfo mesBaseBarcodeInfo) {
mesBaseBarcodeInfo.setMaterialSpec(StringUtils.isNotEmpty(mesBaseBarcodeInfo.getMaterialSpec())
? mesBaseBarcodeInfo.getMaterialSpec().replaceAll("\\s+", "") : "");
return mesBaseBarcodeInfoMapper.selectBarCodeAllocationWarehouse(mesBaseBarcodeInfo); return mesBaseBarcodeInfoMapper.selectBarCodeAllocationWarehouse(mesBaseBarcodeInfo);
} }
@ -1279,6 +1281,8 @@ public class MesBaseBarcodeInfoServiceImpl implements IMesBaseBarcodeInfoService
*/ */
@Override @Override
public List<MesBaseBarcodeInfo> selectWarehouseBarCodeList(MesBaseBarcodeInfo mesBaseBarcodeInfo) { public List<MesBaseBarcodeInfo> selectWarehouseBarCodeList(MesBaseBarcodeInfo mesBaseBarcodeInfo) {
mesBaseBarcodeInfo.setMaterialSpec(StringUtils.isNotEmpty(mesBaseBarcodeInfo.getMaterialSpec())
? mesBaseBarcodeInfo.getMaterialSpec().replaceAll("\\s+", "") : "");
return mesBaseBarcodeInfoMapper.selectWarehouseBarCodeList(mesBaseBarcodeInfo); return mesBaseBarcodeInfoMapper.selectWarehouseBarCodeList(mesBaseBarcodeInfo);
} }

@ -157,6 +157,8 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi
*/ */
@Override @Override
public List<MesBaseMaterialInfo> selectMaterialInfos4AllocationWarehouse(MesBaseMaterialInfo mesBaseMaterialInfo) { public List<MesBaseMaterialInfo> selectMaterialInfos4AllocationWarehouse(MesBaseMaterialInfo mesBaseMaterialInfo) {
mesBaseMaterialInfo.setMaterialSpec(StringUtils.isNotEmpty(mesBaseMaterialInfo.getMaterialSpec())
? mesBaseMaterialInfo.getMaterialSpec().replaceAll("\\s+", "") : "");
return mesBaseMaterialInfoMapper.selectMaterialInfos4AllocationWarehouse(mesBaseMaterialInfo); return mesBaseMaterialInfoMapper.selectMaterialInfos4AllocationWarehouse(mesBaseMaterialInfo);
} }

@ -232,5 +232,14 @@ public class MesSaleOrderServiceImpl implements IMesSaleOrderService {
return mesSaleOrderRelateMapper.selectMesSaleOrderRelateJoinList(querySaleOrderRelate); return mesSaleOrderRelateMapper.selectMesSaleOrderRelateJoinList(querySaleOrderRelate);
} }
/**
* join product
* @param mesSaleOrderRelate
* @return
*/
@Override
public List<MesSaleOrderRelate> selectMesSaleOrderRelateJoinProductList(MesSaleOrderRelate mesSaleOrderRelate){
return mesSaleOrderRelateMapper.selectMesSaleOrderRelateJoinProductList(mesSaleOrderRelate);
}
} }

@ -446,6 +446,8 @@
and wlb.location_code = #{locationCode}) and wlb.location_code = #{locationCode})
<if test="materialCode != null and materialCode != ''">and bmi.material_code like concat('%', #{materialCode},'%')</if> <if test="materialCode != null and materialCode != ''">and bmi.material_code like concat('%', #{materialCode},'%')</if>
<if test="materialName != null and materialName != ''">and bmi.material_name like concat('%', #{materialName},'%')</if> <if test="materialName != null and materialName != ''">and bmi.material_name like concat('%', #{materialName},'%')</if>
<if test="materialSpec != null and materialSpec != ''">and replace(bmi.material_spec,' ','') like concat('%', #{materialSpec},
'%')</if>
<if test="barcodeInfo != null and barcodeInfo != ''">and bbi.barcode_info like concat('%', #{barcodeInfo},'%')</if> <if test="barcodeInfo != null and barcodeInfo != ''">and bbi.barcode_info like concat('%', #{barcodeInfo},'%')</if>
</where> </where>
</select> </select>
@ -464,6 +466,8 @@
<if test="locationCode != null and locationCode != ''"> and wlb.location_code = #{locationCode}</if> <if test="locationCode != null and locationCode != ''"> and wlb.location_code = #{locationCode}</if>
<if test="materialCode != null and materialCode != ''">and bmi.material_code like concat('%', #{materialCode},'%')</if> <if test="materialCode != null and materialCode != ''">and bmi.material_code like concat('%', #{materialCode},'%')</if>
<if test="materialName != null and materialName != ''">and bmi.material_name like concat('%', #{materialName},'%')</if> <if test="materialName != null and materialName != ''">and bmi.material_name like concat('%', #{materialName},'%')</if>
<if test="materialSpec != null and materialSpec != ''">and replace(bmi.material_spec,' ','') like concat('%', #{materialSpec},
'%')</if>
<if test="barcodeInfo != null and barcodeInfo != ''">and wlb.barcode_info like concat('%', #{barcodeInfo},'%')</if> <if test="barcodeInfo != null and barcodeInfo != ''">and wlb.barcode_info like concat('%', #{barcodeInfo},'%')</if>
</where> </where>
</select> </select>

@ -311,6 +311,8 @@
<if test="materialName != null and materialName != ''">and material_name like concat('%', #{materialName}, <if test="materialName != null and materialName != ''">and material_name like concat('%', #{materialName},
'%') '%')
</if> </if>
<if test="materialSpec != null and materialSpec != ''">and replace(mbmi.material_spec,' ','') like concat('%', #{materialSpec},
'%')</if>
<if test="materialCategories != null and materialCategories != ''">and material_categories = <if test="materialCategories != null and materialCategories != ''">and material_categories =
#{materialCategories} #{materialCategories}
</if> </if>
@ -322,7 +324,6 @@
<if test="materialUnitId != null ">and material_unit_id = #{materialUnitId}</if> <if test="materialUnitId != null ">and material_unit_id = #{materialUnitId}</if>
<if test="materialUnit != null and materialUnit != ''">and material_unit = #{materialUnit}</if> <if test="materialUnit != null and materialUnit != ''">and material_unit = #{materialUnit}</if>
<if test="materialMatkl != null and materialMatkl != ''">and material_matkl = #{materialMatkl}</if> <if test="materialMatkl != null and materialMatkl != ''">and material_matkl = #{materialMatkl}</if>
<if test="materialSpec != null and materialSpec != ''">and material_spec = #{materialSpec}</if>
<if test="netWeight != null ">and net_weight = #{netWeight}</if> <if test="netWeight != null ">and net_weight = #{netWeight}</if>
<if test="grossWeight != null ">and gross_weight = #{grossWeight}</if> <if test="grossWeight != null ">and gross_weight = #{grossWeight}</if>
<if test="factoryId != null ">and factory_id = #{factoryId}</if> <if test="factoryId != null ">and factory_id = #{factoryId}</if>

@ -43,6 +43,7 @@
<result property="materialCode" column="material_code"/> <result property="materialCode" column="material_code"/>
<result property="materialName" column="material_name"/> <result property="materialName" column="material_name"/>
<result property="materialSpec" column="material_spec"/> <result property="materialSpec" column="material_spec"/>
<result property="materialClassfication" column="material_classfication"/>
<result property="processName" column="process_name"/> <result property="processName" column="process_name"/>
<result property="processType" column="process_type"/> <result property="processType" column="process_type"/>
<result property="stationName" column="station_name"/> <result property="stationName" column="station_name"/>
@ -350,7 +351,7 @@
mpp.station_id, mpp.dispatch_amount, mpp.plan_amount, mpp.complete_amount, mpp.plan_begin_time, mpp.plan_end_time, mpp.station_id, mpp.dispatch_amount, mpp.plan_amount, mpp.complete_amount, mpp.plan_begin_time, mpp.plan_end_time,
mpp.real_begin_time, mpp.real_end_time, mpp.real_begin_time, mpp.real_end_time,
mpp.attach_id, mpp.plan_status, mpo.plan_delivery_date,mpo.sale_type,mpo.cabinet_channel,mpo.material_id as product_id, mpp.attach_id, mpp.plan_status, mpo.plan_delivery_date,mpo.sale_type,mpo.cabinet_channel,mpo.material_id as product_id,
mbmi.material_code,mbmi.material_name,mbmi.material_spec mbmi.material_code,mbmi.material_name,mbmi.material_spec,mbmi.material_classfication
from mes_product_plan mpp left join mes_product_order mpo on mpp.product_order_id = mpo.product_order_id from mes_product_plan mpp left join mes_product_order mpo on mpp.product_order_id = mpo.product_order_id
left join mes_base_material_info mbmi on mpp.material_id=mbmi.material_id left join mes_base_material_info mbmi on mpp.material_id=mbmi.material_id
<where> <where>

@ -145,6 +145,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="relateSaleOrderId != null "> and relate_sale_order_id = #{relateSaleOrderId}</if> <if test="relateSaleOrderId != null "> and relate_sale_order_id = #{relateSaleOrderId}</if>
<if test="purchaseOrderId != null "> and purchase_order_id = #{purchaseOrderId}</if> <if test="purchaseOrderId != null "> and purchase_order_id = #{purchaseOrderId}</if>
<if test="relateSaleOrderAmount != null "> and relate_sale_order_amount = #{relateSaleOrderAmount}</if> <if test="relateSaleOrderAmount != null "> and relate_sale_order_amount = #{relateSaleOrderAmount}</if>
<if test="virtualMaterialId != null "> and virtual_material_id = #{virtualMaterialId}</if>
</where> </where>
</select> </select>

@ -3,6 +3,7 @@ package com.hw.wms.domain.vo;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/** /**
* @Description: VO * @Description: VO
@ -14,10 +15,14 @@ import javax.validation.constraints.NotBlank;
@Data @Data
public class WmsProductOutstockAuditVo { public class WmsProductOutstockAuditVo {
//审核状态 //任务编号
@NotBlank(message = "任务编号必须输入")
private String taskCode; private String taskCode;
//成品出库记录ID
@NotNull(message = "成品出库记录ID必须输入")
private Long productOutstockId;
//审核状态 //审核状态
@NotBlank(message = "审核状态必须输入") @NotBlank(message = "审核状态必须输入")
private String auditStatus; private String auditStatus;

@ -516,32 +516,52 @@ public class WmsProductOutstockServiceImpl implements IWmsProductOutstockService
public int auditProductOutstock(WmsProductOutstockAuditVo wmsProductOutstockAuditVo) { public int auditProductOutstock(WmsProductOutstockAuditVo wmsProductOutstockAuditVo) {
String auditStatus = wmsProductOutstockAuditVo.getAuditStatus(); String auditStatus = wmsProductOutstockAuditVo.getAuditStatus();
String auditReason = wmsProductOutstockAuditVo.getAuditReason(); String auditReason = wmsProductOutstockAuditVo.getAuditReason();
String taskCode = wmsProductOutstockAuditVo.getTaskCode(); Long productOutstockId = wmsProductOutstockAuditVo.getProductOutstockId();
Date currentDate = new Date(); Date currentDate = new Date();
String userName = SecurityUtils.getUsername(); String userName = SecurityUtils.getUsername();
WmsProductOutstock queryProductOutstock = new WmsProductOutstock(); // WmsProductOutstock queryProductOutstock = new WmsProductOutstock();
queryProductOutstock.setTaskCode(taskCode); // queryProductOutstock.setTaskCode(taskCode);
queryProductOutstock.setAuditStatus(WmsConstants.WMS_AUDIT_STATUS_TOAUDIT); // queryProductOutstock.setAuditStatus(WmsConstants.WMS_AUDIT_STATUS_TOAUDIT);
List<WmsProductOutstock> wmsProductOutstocks = wmsProductOutstockMapper.selectWmsProductOutstockList(queryProductOutstock); // List<WmsProductOutstock> wmsProductOutstocks = wmsProductOutstockMapper.selectWmsProductOutstockList(queryProductOutstock);
if (wmsProductOutstocks == null || wmsProductOutstocks.isEmpty()) { // if (wmsProductOutstocks == null || wmsProductOutstocks.isEmpty()) {
throw new ServiceException("无待审核成品出库记录"); // throw new ServiceException("无待审核成品出库记录");
} // }
WmsProductOutstock wmsProductOutstock = wmsProductOutstockMapper.selectWmsProductOutstockByProductOutstockId(productOutstockId);
//审核不通过,需要有审核意见 //审核不通过,需要有审核意见
if (auditStatus.equalsIgnoreCase(WmsConstants.WMS_AUDIT_STATUS_FAIL)) { if (auditStatus.equalsIgnoreCase(WmsConstants.WMS_AUDIT_STATUS_FAIL)) {
if (StringUtils.isEmpty(auditReason)) { if (StringUtils.isEmpty(auditReason)) {
throw new ServiceException("请输入审核意见"); throw new ServiceException("请输入审核意见");
} }
WmsStockTotal queryStockTotal = new WmsStockTotal();
queryStockTotal.setWarehouseId(wmsProductOutstock.getWarehouseId());
queryStockTotal.setMaterialId(wmsProductOutstock.getProductId());
queryStockTotal.setSaleOrderId(wmsProductOutstock.getSaleOrderId());
List<WmsStockTotal> wmsStockTotals = wmsStockTotalMapper.selectOnlyWmsStockTotalList(queryStockTotal);
if (wmsStockTotals == null || wmsStockTotals.isEmpty()) {
throw new ServiceException("没有库存");
}
WmsStockTotal wmsStockTotal = wmsStockTotals.get(0);
wmsStockTotal.setOccupyAmount(wmsStockTotal.getOccupyAmount().subtract(wmsProductOutstock.getApplyQty()));
wmsStockTotal.setUpdateBy(userName);
wmsStockTotal.setUpdateDate(currentDate);
wmsStockTotalMapper.updateWmsStockTotal(wmsStockTotal);
wmsProductOutstock.setExecuteStatus(WmsConstants.WMS_EXECUTE_STATUS_FINISH);
} }
WmsProductOutstock wmsProductOutstock = new WmsProductOutstock();
wmsProductOutstock.setAuditStatus(auditStatus); wmsProductOutstock.setAuditStatus(auditStatus);
wmsProductOutstock.setAuditReason(auditReason); wmsProductOutstock.setAuditReason(auditReason);
wmsProductOutstock.setAuditBy(userName); wmsProductOutstock.setAuditBy(userName);
wmsProductOutstock.setAuditDate(currentDate); wmsProductOutstock.setAuditDate(currentDate);
wmsProductOutstock.setTaskCode(taskCode);
return wmsProductOutstockMapper.auditWmsProductOutstockByTaskCode(wmsProductOutstock); return wmsProductOutstockMapper.updateWmsProductOutstock(wmsProductOutstock);
} }
private static BigDecimal getAvailableAmount(WmsProductStock productStock) { private static BigDecimal getAvailableAmount(WmsProductStock productStock) {

@ -113,6 +113,8 @@ public class WmsWarehouseMaterialServiceImpl implements IWmsWarehouseMaterialSer
*/ */
@Override @Override
public List<WmsWarehouseMaterial> selectWmsWarehouseMaterialJoinList(WmsWarehouseMaterial wmsWarehouseMaterial) { public List<WmsWarehouseMaterial> selectWmsWarehouseMaterialJoinList(WmsWarehouseMaterial wmsWarehouseMaterial) {
wmsWarehouseMaterial.setMaterialSpec(StringUtils.isNotEmpty(wmsWarehouseMaterial.getMaterialSpec())
? wmsWarehouseMaterial.getMaterialSpec().replaceAll("\\s+", "") : "");
return wmsWarehouseMaterialMapper.selectWmsWarehouseMaterialJoinList(wmsWarehouseMaterial); return wmsWarehouseMaterialMapper.selectWmsWarehouseMaterialJoinList(wmsWarehouseMaterial);
} }

@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="materialCode" column="material_code" /> <result property="materialCode" column="material_code" />
<result property="materialName" column="material_name" /> <result property="materialName" column="material_name" />
<result property="materialSpec" column="material_spec" />
</resultMap> </resultMap>
<sql id="selectWmsWarehouseMaterialVo"> <sql id="selectWmsWarehouseMaterialVo">
@ -84,10 +85,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWmsWarehouseMaterialJoinList" parameterType="WmsWarehouseMaterial" resultMap="WmsWarehouseMaterialResult"> <select id="selectWmsWarehouseMaterialJoinList" parameterType="WmsWarehouseMaterial" resultMap="WmsWarehouseMaterialResult">
select wwm.warehouse_material_id,wwm.warehouse_id, wwm.warehouse_floor,wwm.location_code, wwm.storage_type, wwm.storage_id, wwm.create_time, wwm.create_by, select wwm.warehouse_material_id,wwm.warehouse_id, wwm.warehouse_floor,wwm.location_code, wwm.storage_type, wwm.storage_id, wwm.create_time, wwm.create_by,
mbm.material_code,mbm.material_name mbm.material_code,mbm.material_name,mbm.material_spec
from wms_warehouse_material wwm left join mes_base_material_info mbm on wwm.storage_id=mbm.material_id and wwm.storage_type='1' from wms_warehouse_material wwm left join mes_base_material_info mbm on wwm.storage_id=mbm.material_id and wwm.storage_type='1'
<where> <where>
<if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if> <if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if>
<if test="materialCode != null and materialCode != ''">and mbm.material_code like concat('%', #{materialCode},'%')</if>
<if test="materialName != null and materialName != ''">and mbm.material_name like concat('%', #{materialName},
'%')
</if>
<if test="materialSpec != null and materialSpec != ''">and replace(mbm.material_spec,' ','') like concat('%', #{materialSpec},
'%')</if>
</where> </where>
</select> </select>

@ -52,3 +52,14 @@ export function listOrderBinds(query) {
params: query params: query
}) })
} }
// 查询销售订单关联信息列表
export function selectSaleOrderRelates(query) {
return request({
url: '/mes/api/selectSaleOrderRelates',
method: 'get',
params: query
})
}

@ -740,6 +740,7 @@ export default {
printBindBarcodes(barcodeIds, printNumber).then(response => { printBindBarcodes(barcodeIds, printNumber).then(response => {
this.$modal.msgSuccess("打印条码成功"); this.$modal.msgSuccess("打印条码成功");
this.getList(); this.getList();
this.closePopover();
}).catch(() => { }).catch(() => {
}); });
}, },

@ -0,0 +1,92 @@
<template>
<div>
<el-table v-loading="loading" :data="relateSaleOrderList">
<el-table-column label="销售订单号" align="center" prop="relateSaleOrderCode"/>
<el-table-column label="物料编码" align="center" prop="productCode"/>
<el-table-column label="物料名称" align="center" prop="productName"/>
<el-table-column label="物料规格" align="center" prop="productSpec"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="relateQueryParams.pageNum"
:limit.sync="relateQueryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { selectSaleOrderRelates } from "@/api/mes/saleOrder";
export default {
name: "SaleOrderRelates",
props: {
defineData: {
type: Object,
default: {}
}
},
inject: ['closeDialog'],
data() {
return {
//
loading: true,
//
total: 0,
relateSaleOrderList:[],
//
relateQueryParams: {
pageNum: 1,
pageSize: 10,
},
};
},
created() {
this.getData();
},
methods: {
getData() {
if (this.defineData.virtualMaterialId) {
this.getList();
}
},
/** 查询销售订单信息列表 */
getList() {
this.loading = true;
this.relateQueryParams.selectFlag = null;
this.relateQueryParams.relateFlag = "1";
this.relateQueryParams.virtualMaterialId = this.defineData.virtualMaterialId;
selectSaleOrderRelates(this.relateQueryParams).then(response => {
this.relateSaleOrderList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
}
};
</script>
<style lang="less" scoped>
.el-table {
background-color: #fff0;
overflow-y: auto;
}
.roundBorder {
position: absolute;
transform: translate(-50%, -50%);
}
</style>

@ -221,6 +221,13 @@
width="120" width="120"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="handleSaleOrderRelates(scope.row)"
v-if="scope.row.materialClassfication==='2'"
>详情</el-button>
<el-button <el-button
size="small" size="small"
style="margin-right: 12px" style="margin-right: 12px"
@ -464,6 +471,16 @@
<div id="viewFile"> <div id="viewFile">
<ViewFile :showFileDialog.sync="showFileDialog" :fileListData="fileListData" :thisTitle="thisTitle"></ViewFile> <ViewFile :showFileDialog.sync="showFileDialog" :fileListData="fileListData" :thisTitle="thisTitle"></ViewFile>
</div> </div>
<!-- 关联销售订单信息对话框 -->
<el-dialog title="关联信息" :visible.sync="relateDialogVisible" append-to-body>
<sale-order-relates ref="saleOrderRelatesRef" :defineData="saleOrderRelatesData"
v-if="relateDialogVisible"></sale-order-relates>
</el-dialog>
<!-- <el-dialog :visible.sync="assignModel" title="工位选择" width="80%">--> <!-- <el-dialog :visible.sync="assignModel" title="工位选择" width="80%">-->
<!-- <el-table :data="stationData" highlight-current-row--> <!-- <el-table :data="stationData" highlight-current-row-->
@ -525,6 +542,8 @@ import {noticeData} from "@/utils/notice"
import ViewFile from "@/components/viewFile/index.vue"; import ViewFile from "@/components/viewFile/index.vue";
import {getDispatchSOPAttachList} from "@/api/mes/productplan"; import {getDispatchSOPAttachList} from "@/api/mes/productplan";
import {monitorSerialData} from "@/utils/serial"; import {monitorSerialData} from "@/utils/serial";
import saleOrderRelates from "@/views/board/common/saleOrderRelates.vue";
const setState = (e) => { const setState = (e) => {
if (e === '1') { if (e === '1') {
@ -546,6 +565,7 @@ export default {
components: { components: {
'apply-raw-outstock': applyRawOutstock, 'apply-raw-outstock': applyRawOutstock,
'apply-raw-return': applyRawReturn, 'apply-raw-return': applyRawReturn,
'sale-order-relates': saleOrderRelates,
Chart, Chart,
PrintPage, PrintPage,
WorkshopNotice, WorkshopNotice,
@ -581,6 +601,9 @@ export default {
taskType: '', taskType: '',
dialogVisible: false, dialogVisible: false,
productPlanData: {}, productPlanData: {},
relateDialogVisible:false,
saleOrderRelatesData: {},
form: {}, form: {},
form1: {}, form1: {},
submitLoading: false, submitLoading: false,
@ -1848,6 +1871,15 @@ export default {
}, },
handleSaleOrderRelates(row){
this.saleOrderRelatesData = {
virtualMaterialId: row.materialId,
}
this.relateDialogVisible = true
},
} }
} }
</script> </script>

@ -41,13 +41,22 @@
@keyup.enter.native="handleAllocateMaterialQuery" @keyup.enter.native="handleAllocateMaterialQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="物料规格" prop="materialSpec">
<el-input
v-model="allocateBarCodeQueryParams.materialSpec"
placeholder="请输入物料规格"
style="width:140px;"
clearable
@keyup.enter.native="handleAllocateMaterialQuery"
/>
</el-form-item>
<el-form-item label="物料条码" prop="barcodeInfo"> <el-form-item label="物料条码" prop="barcodeInfo">
<el-input <el-input
v-model="allocateBarCodeQueryParams.barcodeInfo" v-model="allocateBarCodeQueryParams.barcodeInfo"
placeholder="请输入物料条码" placeholder="请输入物料条码"
style="width:140px;" style="width:140px;"
clearable clearable
@keyup.enter.native="handleMaterialQuery" @keyup.enter.native="handleAllocateMaterialQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -114,6 +123,15 @@
@keyup.enter.native="handleMaterialQuery" @keyup.enter.native="handleMaterialQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="物料规格" prop="materialSpec">
<el-input
v-model="barCodeQueryParams.materialSpec"
placeholder="请输入物料规格"
style="width:140px;"
clearable
@keyup.enter.native="handleMaterialQuery"
/>
</el-form-item>
<el-form-item label="物料条码" prop="barcodeInfo"> <el-form-item label="物料条码" prop="barcodeInfo">
<el-input <el-input
v-model="barCodeQueryParams.barcodeInfo" v-model="barCodeQueryParams.barcodeInfo"

@ -42,6 +42,16 @@
@keyup.enter.native="handleAllocateMaterialQuery" @keyup.enter.native="handleAllocateMaterialQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="物料规格" prop="materialSpec">
<el-input
v-model="allocateMaterialQueryParams.materialSpec"
placeholder="请输入物料规格"
style="width:140px;"
clearable
@keyup.enter.native="handleAllocateMaterialQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleAllocateMaterialQuery"> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleAllocateMaterialQuery">
</el-button> </el-button>
@ -62,6 +72,7 @@
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="物料编码" align="center" prop="materialCode"/> <el-table-column label="物料编码" align="center" prop="materialCode"/>
<el-table-column label="物料名称" align="center" prop="materialName"/> <el-table-column label="物料名称" align="center" prop="materialName"/>
<el-table-column label="物料规格" align="center" prop="materialSpec"/>
</el-table> </el-table>
<pagination <pagination
@ -97,6 +108,15 @@
@keyup.enter.native="handleMaterialQuery" @keyup.enter.native="handleMaterialQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="物料规格" prop="materialSpec">
<el-input
v-model="materialQueryParams.materialSpec"
placeholder="请输入物料规格"
style="width:140px;"
clearable
@keyup.enter.native="handleMaterialQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleMaterialQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleMaterialQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetMaterialQuery"></el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetMaterialQuery"></el-button>
@ -119,6 +139,7 @@
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center"/>
<el-table-column label="物料编码" align="center" prop="materialCode"/> <el-table-column label="物料编码" align="center" prop="materialCode"/>
<el-table-column label="物料名称" align="center" prop="materialName"/> <el-table-column label="物料名称" align="center" prop="materialName"/>
<el-table-column label="物料规格" align="center" prop="materialSpec"/>
</el-table> </el-table>
<pagination <pagination
@ -182,6 +203,7 @@ export default {
pageSize: 10, pageSize: 10,
materialCode: null, materialCode: null,
materialName: null, materialName: null,
materialSpec: null,
materialCategories: null, materialCategories: null,
materialSubclass: null, materialSubclass: null,
materialTypeId: null, materialTypeId: null,
@ -197,6 +219,7 @@ export default {
pageSize: 10, pageSize: 10,
materialCode: null, materialCode: null,
materialName: null, materialName: null,
materialSpec: null,
materialCategories: null, materialCategories: null,
materialSubclass: null, materialSubclass: null,
materialTypeId: null, materialTypeId: null,

Loading…
Cancel
Save