Compare commits

...

1 Commits

Author SHA1 Message Date
chenhao 25cc3d18fa feat(inventory): 新增产品类型字段并优化采购逻辑
- 在库存出库明细实体类中新增 productType 字段
- 更新对应的 MyBatis Mapper 文件以支持 productType 查询
- 在库存外部服务实现中设置 productType 属性值
- 修改内部库存服务逻辑,针对特定供应商调整订单类型判断条件
- 增加对“新华三”开头供应商名称的特殊处理逻辑
- 路由配置新增采购审批及审批历史相关页面路径
- 审批订单和采购审批页面增加跳转至审批历史按钮
- 新增审批历史页面基础结构与返回功能
- 出库单生成前导入逻辑增加对 vendorName 和 productType 的控制台打印用于调试
2025-12-09 10:43:24 +08:00
11 changed files with 79 additions and 3 deletions

View File

@ -74,6 +74,28 @@ export const constantRoutes = [
} }
] ]
}, },
{
path: '/purchase',
component: Layout,
children: [
{
path: 'approved',
component: () => import('@/views/approve/purchaase/approved/index'),
hidden: true
},
]
},
{
path: '/approve',
component: Layout,
children: [
{
path: 'orderLog',
component: () => import('@/views/approve/approved_order/index'),
hidden: true
},
]
},
{ {
path: '/user', path: '/user',
component: Layout, component: Layout,

View File

@ -56,6 +56,14 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="()=>{this.$router.back()}"
>返回</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>

View File

@ -58,7 +58,18 @@
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="toApproved()"
>审批历史</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="orderList"> <el-table v-loading="loading" :data="orderList">
<el-table-column label="合同编号" align="center" prop="orderCode" /> <el-table-column label="合同编号" align="center" prop="orderCode" />
<el-table-column label="项目名称" align="center" prop="projectName" /> <el-table-column label="项目名称" align="center" prop="projectName" />
@ -155,6 +166,11 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
toApproved(){
this.$router.push({
path: '/approve/orderLog',
});
},
/** 查询订单列表 */ /** 查询订单列表 */
getList() { getList() {
this.loading = true; this.loading = true;

View File

@ -29,7 +29,18 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="toApproved()"
>审批历史</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="purchaseorderList"> <el-table v-loading="loading" :data="purchaseorderList">
<!-- 表格列定义 --> <!-- 表格列定义 -->
<el-table-column label="序号" type="index" width="50" align="center" /> <el-table-column label="序号" type="index" width="50" align="center" />
@ -122,6 +133,7 @@ export default {
loading: true, loading: true,
showSearch: true, showSearch: true,
total: 0, total: 0,
confirmDialogTitle:'',
purchaseorderList: [], purchaseorderList: [],
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -168,6 +180,9 @@ export default {
}); });
}, },
methods: { methods: {
toApproved(){
this.$router.push( '/purchase/approved' )
},
// //
getList() { getList() {
this.loading = true; this.loading = true;

View File

@ -29,7 +29,18 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="()=>{this.$router.back()}"
>返回</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="purchaseorderList"> <el-table v-loading="loading" :data="purchaseorderList">
<!-- 表格列定义 --> <!-- 表格列定义 -->
<el-table-column label="序号" type="index" width="50" align="center" /> <el-table-column label="序号" type="index" width="50" align="center" />

View File

@ -177,7 +177,7 @@ export default {
}); });
}, },
handleSelectPurchaseBeforeImport() { handleSelectPurchaseBeforeImport() {
if ((this.productData.orderType || '1') === '1') { if (((this.productData.orderType || '1') === '1' ) || !(this.outerData.vendorName.startsWith('新华三') && this.productData.productType==='2')) {
this.purchaseOrderSelectVisible = true; this.purchaseOrderSelectVisible = true;
}else{ }else{
this.handleImport() this.handleImport()

View File

@ -42,5 +42,6 @@ public class InventoryOuterDetail extends BaseEntity
private String productCode; private String productCode;
private String model; private String model;
private String productName; private String productName;
private String productType;
} }

View File

@ -271,6 +271,7 @@ public class InventoryOuterServiceImpl implements IInventoryOuterService
vo.setId(item.getId()); vo.setId(item.getId());
vo.setProductCode(item.getProductCode()); vo.setProductCode(item.getProductCode());
vo.setModel(item.getModel()); vo.setModel(item.getModel());
vo.setProductType(item.getProductType());
vo.setQuantity(item.getQuantity()); vo.setQuantity(item.getQuantity());
vo.setWarehouseId(item.getWarehouseId()); vo.setWarehouseId(item.getWarehouseId());
vo.setWarehouseName(item.getWarehouseName()); vo.setWarehouseName(item.getWarehouseName());

View File

@ -272,7 +272,7 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
throw new ServiceException("产品编码对应产品未找到"); throw new ServiceException("产品编码对应产品未找到");
} }
Map<String, OmsWarehouseInfo> warehouseInfoMap=Collections.emptyMap(); Map<String, OmsWarehouseInfo> warehouseInfoMap=Collections.emptyMap();
if ("2".equalsIgnoreCase(orderType)){ if ("2".equalsIgnoreCase(orderType)|| ("2".equalsIgnoreCase(productInfos.get(0).getType()) || productInfos.get(0).getVendorName().startsWith("新华三")) ){
List<String> warehouseNameList = inventoryInfoExcelDtoList.stream().map(InventoryInfoExcelDto::getWarehouseName).distinct().collect(Collectors.toList()); List<String> warehouseNameList = inventoryInfoExcelDtoList.stream().map(InventoryInfoExcelDto::getWarehouseName).distinct().collect(Collectors.toList());
if (warehouseNameList.size() > 1){ if (warehouseNameList.size() > 1){
throw new ServiceException("导入清单只能有一个仓库"); throw new ServiceException("导入清单只能有一个仓库");

View File

@ -28,5 +28,6 @@ public class OuterDeliveryProductVo {
private String warehouseName; private String warehouseName;
private String orderType; private String orderType;
private Long warehouseId; private Long warehouseId;
private String productType;
} }

View File

@ -21,7 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t2.warehouse_name, t2.warehouse_name,
t4.product_code, t4.product_code,
t4.model, t4.model,
t4.available_count t4.available_count,
t4.type as product_type
from oms_inventory_outer_detail t1 from oms_inventory_outer_detail t1
left join oms_warehouse_info t2 on t1.warehouse_id=t2.id left join oms_warehouse_info t2 on t1.warehouse_id=t2.id
left join oms_inventory_outer t3 on t1.outer_code=t3.outer_code left join oms_inventory_outer t3 on t1.outer_code=t3.outer_code