成品库存:虚拟物料可查看物料详细信息;转库存增加判断物料是否一致
master
xs 4 weeks ago
parent e89366bf34
commit a249a7f207

@ -144,4 +144,17 @@ public class MesBaseMaterialInfoController extends BaseController
return success(mesBaseMaterialInfoService.selectMesBaseMaterialInfoByMaterialId(materialId)); return success(mesBaseMaterialInfoService.selectMesBaseMaterialInfoByMaterialId(materialId));
} }
/**
*
*/
@RequiresPermissions("wms:stocktotal:list")
@GetMapping("/selectMaterialInfosByVirtualMaterialId")
public TableDataInfo selectMaterialInfosByVirtualMaterialId(MesBaseMaterialInfo mesBaseMaterialInfo)
{
List<MesBaseMaterialInfo> list = mesBaseMaterialInfoService.selectMesBaseMaterialInfoList(mesBaseMaterialInfo);
return getDataTable(list);
}
} }

@ -94,6 +94,7 @@
resultMap="MesBaseMaterialInfoResult"> resultMap="MesBaseMaterialInfoResult">
<include refid="selectMesBaseMaterialInfoVo"/> <include refid="selectMesBaseMaterialInfoVo"/>
<where> <where>
<if test="materialId != null ">and exists (select 1 from mes_sale_order_relate msor where msor.virtual_material_id=#{materialId} and msor.material_id=bmi.material_id)</if>
<if test="erpId != null ">and bmi.erp_id = #{erpId}</if> <if test="erpId != null ">and bmi.erp_id = #{erpId}</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="oldMaterialCode != null and oldMaterialCode != ''">and bmi.old_material_code = #{oldMaterialCode} <if test="oldMaterialCode != null and oldMaterialCode != ''">and bmi.old_material_code = #{oldMaterialCode}

@ -161,7 +161,7 @@ public class WmsStockTotalController extends BaseController
* *
*/ */
@RequiresPermissions("wms:stocktotal:transferProduct") @RequiresPermissions("wms:stocktotal:transferProduct")
@Log(title = "原材料库存", businessType = BusinessType.TRANSFER) @Log(title = "成品库存", businessType = BusinessType.TRANSFER)
@PostMapping("/transferProductStockTotal") @PostMapping("/transferProductStockTotal")
public AjaxResult transferProductStockTotal(@RequestBody WmsStockTotalTransferVo wmsStockTotalTransferVo) public AjaxResult transferProductStockTotal(@RequestBody WmsStockTotalTransferVo wmsStockTotalTransferVo)
{ {

@ -89,3 +89,13 @@ export function transferProductStockTotal(data) {
data: data data: data
}) })
} }
// 根据合并的虚拟物料ID获取实际物料信息列表
export function selectMaterialInfosByVirtualMaterialId(params) {
return request({
url: '/mes/materialinfo/selectMaterialInfosByVirtualMaterialId',
method: 'get',
params: params
})
}

@ -10,7 +10,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="销售订单号" prop="saleorderCode"> <el-form-item label="销售订单号" prop="saleorderCode">
<el-input <el-inputs
v-model="queryParams.saleorderCode" v-model="queryParams.saleorderCode"
placeholder="请输入销售订单号" placeholder="请输入销售订单号"
clearable clearable

@ -158,6 +158,10 @@ export default {
title: "", title: "",
// //
open: false, open: false,
SALE_ORDER_CLASSFICATION:{
ERP:'1'
},
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -183,7 +187,8 @@ export default {
activeFlag: '1', activeFlag: '1',
deletedFlag: null, deletedFlag: null,
approveDate: null, approveDate: null,
erpModifyDate: null erpModifyDate: null,
saleOrderClassfication:'1'
}, },
}; };
}, },

@ -153,6 +153,17 @@
v-hasPermi="['wms:stocktotal:transferProduct']" v-hasPermi="['wms:stocktotal:transferProduct']"
>转库存 >转库存
</el-button> </el-button>
<el-button
size="mini"
type="text"
icon="el-icon-shopping-cart-1"
v-if="scope.row.materialClassfication=== MATERIAL_CLASSFICATION.VIRTUAL"
@click="handleViewMaterialInfos(scope.row)"
v-hasPermi="['wms:stocktotal:list']"
>物料明细
</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -286,6 +297,20 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="物料明细" :visible.sync="materialListOpen" width="560px" append-to-body>
<el-table :data="materialList">
<el-table-column label="序号" type="index" align="center"/>
<el-table-column label="物料编码" align="center" prop="materialCode" />
<el-table-column label="物料名称" align="center" prop="materialName" />
<el-table-column label="物料规格" align="center" prop="materialSpec" />
</el-table>
</el-dialog>
</div> </div>
</template> </template>
@ -297,9 +322,10 @@ import {
listProductstock, listProductstock,
transferRaw, transferRaw,
transferRawStockTotal, transferRawStockTotal,
transferProductStockTotal transferProductStockTotal,
selectMaterialInfosByVirtualMaterialId
} from "@/api/wms/stocktotal"; } from "@/api/wms/stocktotal";
import {addWmslocation, getWarehouses, updateWmslocation} from "@//api/wms/wmslocation"; import {getWarehouses,} from "@//api/wms/wmslocation";
import selectSaleOrder from '@//views/mes/saleOrder/selectSaleOrder.vue'; import selectSaleOrder from '@//views/mes/saleOrder/selectSaleOrder.vue';
export default { export default {
@ -416,6 +442,9 @@ export default {
}, },
selectSaleOrderVisible: false, selectSaleOrderVisible: false,
materialListOpen : false,
materialList:[]
}; };
}, },
watch: { watch: {
@ -608,6 +637,7 @@ export default {
// //
handleRawStockSelectionChange(selection) { handleRawStockSelectionChange(selection) {
return;
let index = 0; let index = 0;
selection.forEach(row => { selection.forEach(row => {
index = this.rawstockList.indexOf(row); index = this.rawstockList.indexOf(row);
@ -633,6 +663,10 @@ export default {
/** 提交选择销售订单按钮 */ /** 提交选择销售订单按钮 */
submitSelectSaleOrderForm() { submitSelectSaleOrderForm() {
let selectedRow = this.$refs.selectSaleOrderRef.selectedRow; let selectedRow = this.$refs.selectSaleOrderRef.selectedRow;
if(selectedRow.materialId!==this.form.materialId){
this.$modal.msgWarning("请选择相同物料的销售订单");
return;
}
this.$set(this.form, "saleorderCode", selectedRow.saleorderCode); this.$set(this.form, "saleorderCode", selectedRow.saleorderCode);
this.$set(this.form, "saleOrderId", selectedRow.saleOrderId); this.$set(this.form, "saleOrderId", selectedRow.saleOrderId);
this.selectSaleOrderVisible = false; this.selectSaleOrderVisible = false;
@ -693,11 +727,19 @@ export default {
this.transferType = "1"; this.transferType = "1";
this.form.index = (this.stocktotalList.findIndex(item => item.stockTotalId === row.stockTotalId)) + 1; this.form.index = (this.stocktotalList.findIndex(item => item.stockTotalId === row.stockTotalId)) + 1;
this.form.stockTotalId = row.stockTotalId; this.form.stockTotalId = row.stockTotalId;
this.form.materialId = row.materialId;
this.rawStockInfosStr = "序号:" + this.form.index + " 物料编码:" + row.materialCode + " 物料名称:" + row.materialName + " 物料规格:" + row.materialSpec + " 可转数量:" + (row.totalAmount - (row.occupyAmount ? row.occupyAmount : 0)) + " 销售订单:" + (row.saleorderCode ? row.saleorderCode : "无"); this.rawStockInfosStr = "序号:" + this.form.index + " 物料编码:" + row.materialCode + " 物料名称:" + row.materialName + " 物料规格:" + row.materialSpec + " 可转数量:" + (row.totalAmount - (row.occupyAmount ? row.occupyAmount : 0)) + " 销售订单:" + (row.saleorderCode ? row.saleorderCode : "无");
this.open = true; this.open = true;
}, },
handleViewMaterialInfos(row){
this.materialListOpen = true;
selectMaterialInfosByVirtualMaterialId({materialId:row.materialId}).then(response => {
this.materialList = response.rows;
});
}
} }
}; };
</script> </script>

Loading…
Cancel
Save