2 changed files with 527 additions and 0 deletions
@ -0,0 +1,7 @@ |
|||
import { createAPI } from "@/utils/httpRequest.js"; |
|||
|
|||
// ========== IFS库存查询 ========== - rqrq
|
|||
|
|||
// 查询IFS库存在库信息 - rqrq
|
|||
export const getInventoryPartInStock = data => createAPI('/api/ifsInventory/getInventoryPartInStock', 'post', data) |
|||
|
|||
@ -0,0 +1,520 @@ |
|||
<template> |
|||
<div class="mod-config yzz"> |
|||
<!-- 查询表单 - rqrq --> |
|||
<el-form :inline="true" label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
|||
<el-form-item label="站点"> |
|||
<el-input v-model="queryData.site" style="width: 120px" placeholder="请输入站点" clearable></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="物料编码"> |
|||
<el-input v-model="queryData.partNo" style="width: 120px" placeholder="请输入物料编码" clearable></el-input> |
|||
</el-form-item> |
|||
<el-form-item label=" "> |
|||
<el-button type="primary" @click="getDataList()">查询</el-button> |
|||
<el-button @click="resetQuery()">重置</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<!-- 数据表格 - rqrq --> |
|||
<el-table |
|||
:data="dataList" |
|||
:height="height" |
|||
border |
|||
highlight-current-row |
|||
v-loading="dataListLoading" |
|||
style="width: 100%;"> |
|||
|
|||
<!-- 动态列配置 - rqrq --> |
|||
<el-table-column |
|||
v-for="(item,index) in columnList" :key="index" |
|||
:sortable="item.columnSortable" |
|||
:prop="item.columnProp" |
|||
:header-align="item.headerAlign" |
|||
:show-overflow-tooltip="item.showOverflowTooltip" |
|||
:align="item.align" |
|||
:fixed="item.fixed==''?false:item.fixed" |
|||
:min-width="item.columnWidth" |
|||
:label="item.columnLabel"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row[item.columnProp] }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { getInventoryPartInStock } from '@/api/base/ifsInventoryQuery.js' |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
// 查询条件 - rqrq |
|||
queryData: { |
|||
site: '55', // 默认站点55 - rqrq |
|||
partNo: '' |
|||
}, |
|||
// 表格高度 - rqrq |
|||
height: 450, |
|||
// 数据列表 - rqrq |
|||
dataList: [], |
|||
// 加载状态 - rqrq |
|||
dataListLoading: false, |
|||
// 表格列配置 - rqrq(columnProp使用大写开头,匹配后端@JsonProperty注解) |
|||
columnList: [ |
|||
{ |
|||
columnProp: "PartNo", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "PartNo", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "left" |
|||
}, |
|||
{ |
|||
columnProp: "LotBatchNo", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "LotBatchNo", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "QtyOnhand", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "QtyOnhand", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "QtyReserved", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "QtyReserved", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "ReceiptDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "ReceiptDate", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "ExpirationDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "ExpirationDate", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "Warehouse", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "Warehouse", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "LocationNo", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "LocationNo", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "ActivitySeq", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "ActivitySeq", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "AvailabilityControlId", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "AvailabilityControlId", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "AvgUnitTransitCost", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "AvgUnitTransitCost", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "BayNo", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "BayNo", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "BinNo", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "BinNo", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "CatchQtyInTransit", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "CatchQtyInTransit", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "CatchQtyOnhand", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "CatchQtyOnhand", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "ConditionCode", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "ConditionCode", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "ConfigurationId", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "ConfigurationId", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "Contract", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "Contract", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "CountVariance", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "CountVariance", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "EngChgLevel", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "EngChgLevel", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "FreezeFlagDb", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "FreezeFlagDb", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "HandlingUnitId", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "HandlingUnitId", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "LastActivityDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "LastActivityDate", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "LastCountDate", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "LastCountDate", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "LocationType", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "LocationType", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "LocationTypeDb", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "LocationTypeDb", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "Objid", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "Objid", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "Objkey", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "Objkey", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "Objversion", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "Objversion", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "OwningCustomerNo", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "OwningCustomerNo", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "OwningVendorNo", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "OwningVendorNo", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "PartOwnership", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "PartOwnership", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "PartOwnershipDb", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "PartOwnershipDb", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "ProjectId", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "ProjectId", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "QtyInTransit", |
|||
headerAlign: "center", |
|||
align: "right", |
|||
columnLabel: "QtyInTransit", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "RowNo", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "RowNo", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "SerialNo", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "SerialNo", |
|||
columnWidth: 150, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "Source", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "Source", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "TierNo", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "TierNo", |
|||
columnWidth: 100, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
}, |
|||
{ |
|||
columnProp: "WaivDevRejNo", |
|||
headerAlign: "center", |
|||
align: "center", |
|||
columnLabel: "WaivDevRejNo", |
|||
columnWidth: 120, |
|||
columnSortable: false, |
|||
showOverflowTooltip: true, |
|||
fixed: "" |
|||
} |
|||
] |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$nextTick(() => { |
|||
// 计算表格高度 - rqrq |
|||
this.height = window.innerHeight - 220; |
|||
}) |
|||
}, |
|||
methods: { |
|||
// 获取数据列表 - rqrq |
|||
getDataList() { |
|||
// 校验必填项 - rqrq |
|||
if (!this.queryData.site || this.queryData.site.trim() === '') { |
|||
this.$message.error('请输入站点') |
|||
return |
|||
} |
|||
if (!this.queryData.partNo || this.queryData.partNo.trim() === '') { |
|||
this.$message.error('请输入物料编码') |
|||
return |
|||
} |
|||
|
|||
this.dataListLoading = true |
|||
|
|||
getInventoryPartInStock(this.queryData).then(({data}) => { |
|||
if (data && data.code === 0) { |
|||
this.dataList = data.rows || [] |
|||
this.$message.success(`查询成功,共${this.dataList.length}条记录`) |
|||
} else { |
|||
this.dataList = [] |
|||
this.$alert(data.msg || '查询失败', '错误') |
|||
} |
|||
}).catch(() => { |
|||
this.dataList = [] |
|||
this.$message.error('查询失败') |
|||
}).finally(() => { |
|||
this.dataListLoading = false |
|||
}) |
|||
}, |
|||
|
|||
// 重置查询条件 - rqrq |
|||
resetQuery() { |
|||
this.queryData.site = '55' |
|||
this.queryData.partNo = '' |
|||
this.dataList = [] |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
/* 页面样式 - rqrq */ |
|||
.mod-config { |
|||
padding: 10px; |
|||
} |
|||
</style> |
|||
|
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue