Skip to content

POST /dm-store/stockMain/queryListName

Content-Type: application/json

触发按钮:queryListNameAjax

入参

出参

传递对象:ResultData

json
[
  {
    "prop": "storeCode",
    "label": "仓库编码",
    "variation": true
  },
  {
    "prop": "storeName",
    "label": "仓库名称",
    "variation": true
  },
  {
    "prop": "partCode",
    "label": "物料编码",
    "variation": true
  },
  {
    "prop": "partName",
    "label": "物料名称",
    "variation": true
  },
  {
    "prop": "spec",
    "label": "物料规格",
    "variation": true
  },
  {
    "prop": "bigCategory",
    "label": "大类",
    "variation": true
  },
  {
    "prop": "smallCategory",
    "label": "小类",
    "variation": true
  },
  {
    "prop": "sonCategory",
    "label": "子类",
    "variation": true
  },
  {
    "prop": "inStockNumberGood",
    "label": "在库好品总数",
    "variation": true
  },
  {
    "prop": "inStockNumberBad",
    "label": "在库坏品总数",
    "variation": true
  },
  {
    "prop": "stockNumber",
    "label": "总库存",
    "variation": true
  },
  {
    "prop": "uom",
    "label": "单位",
    "variation": true
  },
  {
    "prop": "preciousType",
    "label": "ABC分类",
    "variation": true
  },
  {
    "prop": "controlType",
    "label": "控制类型",
    "variation": true
  },
  {
    "prop": "MTY-IDG在线库存",
    "label": "MTY-IDG在线库存",
    "variation": true
  },
  {
    "label": "在线总库存",
    "variation": true,
    "prop": "在线总库存"
  },
  {
    "prop": "MTY-IDG库存",
    "label": "MTY-IDG库存",
    "variation": true
  }
]

前端校验规则

权限校验
└── 导出按钮权限
    └── v-auth: 'inventory:stockMain:add:export'
表单校验
├── smallNumber
│   └── 最小值:0
└── largeNumber
    └── 最小值:0
提交拦截校验
└── currentChange 调用链
    ├── largeNumber < smallNumber 时直接拦截
    └── 拦截方式:this.$message error 后 return

后端逻辑

业务流程:按用户仓库权限限定台账范围 -> 查询库存台账结果集 -> 结合良坏品与产品线生成动态库存列 -> 汇总返回完整列头

├── 查询仓库权限:StorePermissionMapper.searchList :1060
├── 查询库存台账结果集:StockMainMapper.searchList :1067
├── 初始化固定列头 :1068-1158
├── 识别良坏品库存
│   ├── 查询未删除库存台账:list :1162
│   └── 查询坏品库位:StoreBinMapper.searchBadList :1166
├── 查询产品线:ProductLineServiceImpl.findAllProductLineList :332-336
├── 按产线计算在线库存列与在库库存列
└── 汇总动态列头并按在线/在库顺序返回 :1229-1279

后端校验规则

涉及数据库表

库名.表名mapper.statement描述
store_permission_mapperstorePermissionMapper.searchListstorePermissionMapper
stock_main_mapperstockMainMapper.searchListstockMainMapper
store_bin_mapperstoreBinMapper.searchBadListstoreBinMapper
store.product_lineproductLineService.findAllProductLineListproductLineService