入库记录
This commit is contained in:
63
src/api/Inventory/PurchaseInRecord.js
Normal file
63
src/api/Inventory/PurchaseInRecord.js
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 初始化项目
|
||||
export function initProject() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_项目名称_查询数据_按时间排序'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 机床查询
|
||||
export function searchMachine(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_机床名称_查询数据',
|
||||
param: '项目流水号_check=1&项目流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 分组查询
|
||||
export function searchGroup(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: 'PDM_组件名称_查询数据',
|
||||
param: '机床流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询采购件入库记录
|
||||
export function searchRecord1(check1, project, check2, machine, check3, group, check4, name, check5, spec, check6, model, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: `库存管理_入库记录_采购件_查询数据`,
|
||||
param: `项目流水号_check=${check1}&项目流水号=${project}&机床流水号_check=${check2}&机床流水号=${machine}&组件流水号_check=${check3}&组件流水号=${group}&名称_check=${check4}&名称=${name}&规格_check=${check5}&规格=${spec}&图号或型号_check=${check6}&图号或型号=${model}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询离线件入库记录
|
||||
export function searchRecord2(check4, name, check5, spec, check6, model, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: `库存管理_入库记录_离线件_查询数据`,
|
||||
param: `名称_check=${check4}&名称=${name}&规格_check=${check5}&规格=${spec}&图号或型号_check=${check6}&图号或型号=${model}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -36,36 +36,15 @@ export function searchGroup(num) {
|
||||
})
|
||||
}
|
||||
// 查询记录
|
||||
export function searchRecord(project, machine, group, name, spec, model) {
|
||||
let execName = `select PDM_机床名称.项目流水号,PDM_组件名称.机床流水号,出库记录.* from(select 组件流水号,名称,物料规格 as 规格,物料型号 as 图号或型号,出库数量,备注 as 领料人,滞货出库时间 as 出库时间 from 车间装配管理_领料单_领料单明细 where 滞货出库时间 is not null
|
||||
union
|
||||
select 组件流水号,物料名称 as 名称,物料规格 as 规格,物料型号 as 图号或型号,出库数量,备注 as 领料人,出库时间 from 库存管理_基础表_离线采购件出库
|
||||
inner join 库存管理_物料主文件_基本 on 库存管理_物料主文件_基本.物料流水号 = 库存管理_基础表_离线采购件出库.物料流水号
|
||||
union
|
||||
select 组件流水号,物料名称 as 名称,物料规格 as 规格,物料型号 as 图号或型号,出库数量,库存管理_基础表_外购件出库.备注 as 领料人,出库时间 from 库存管理_基础表_外购件出库
|
||||
inner join 采购管理_采购合同明细_采购部 on 采购管理_采购合同明细_采购部.采购合同明细流水号 = 库存管理_基础表_外购件出库.采购合同明细流水号
|
||||
left join MRP_计划订单_组件零件清单 on MRP_计划订单_组件零件清单.组件零件流水号 = 采购管理_采购合同明细_采购部.组件零件流水号
|
||||
inner join MRP_计划订单_机床组件清单 on MRP_计划订单_机床组件清单.机床组件流水号 = MRP_计划订单_组件零件清单.机床组件流水号
|
||||
inner join 库存管理_物料主文件_基本 on 库存管理_物料主文件_基本.物料流水号 = MRP_计划订单_组件零件清单.物料流水号
|
||||
union
|
||||
select 组件流水号,'' as 规格,零件图号 as 图号或型号,零件名称 as 名称,出库数量,库存管理_基础表_外购件出库.备注 as 领料人,出库时间 from 库存管理_基础表_外购件出库
|
||||
inner join 采购管理_采购合同明细_采购部 on 采购管理_采购合同明细_采购部.采购合同明细流水号 = 库存管理_基础表_外购件出库.采购合同明细流水号
|
||||
left join MRP_计划订单_组件零件清单_基本件_采购 on MRP_计划订单_组件零件清单_基本件_采购.组件零件基本件流水号 = 采购管理_采购合同明细_采购部.组件零件基本件流水号
|
||||
inner join PDM_零件明细表_基本件 on PDM_零件明细表_基本件.基本件流水号 = MRP_计划订单_组件零件清单_基本件_采购.基本件流水号
|
||||
) as 出库记录 inner join PDM_组件名称 on PDM_组件名称.组件流水号 = 出库记录.组件流水号 inner join PDM_机床名称 on PDM_机床名称.机床流水号 = PDM_组件名称.机床流水号
|
||||
where PDM_组件名称.组件流水号 is not null`
|
||||
if (project) { execName += ` and PDM_机床名称.项目流水号 = ${project} ` }
|
||||
if (machine) { execName += ` and PDM_组件名称.机床流水号 = ${machine} ` }
|
||||
if (group) { execName += ` and PDM_组件名称.组件流水号 = ${group} ` }
|
||||
if (name) { execName += ` and 出库记录.名称 like '%${name}%' ` }
|
||||
if (spec) { execName += ` and 出库记录.规格 like '%${spec}%' ` }
|
||||
if (model) { execName += ` and 出库记录.图号或型号 like '%${model}%' ` }
|
||||
export function searchRecord(check1, project, check2, machine, check3, group, check4, name, check5, spec, check6, model, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: execName
|
||||
type: '1',
|
||||
name: `库存管理_出库记录_查询数据`,
|
||||
param: `项目流水号_check=${check1}&项目流水号=${project}&机床流水号_check=${check2}&机床流水号=${machine}&组件流水号_check=${check3}&组件流水号=${group}&名称_check=${check4}&名称=${name}&规格_check=${check5}&规格=${spec}&图号或型号_check=${check6}&图号或型号=${model}`,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
1
src/icons/svg/PurchaseInRecord.svg
Normal file
1
src/icons/svg/PurchaseInRecord.svg
Normal file
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1543302320460" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4601" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 1024A512 512 0 1 1 512 0a512 512 0 0 1 0 1024zM512 170.666667a56.888889 56.888889 0 0 0-56.888889 56.888889v341.333333a56.888889 56.888889 0 0 0 113.777778 0V227.555556a56.888889 56.888889 0 0 0-56.888889-56.888889z m0 625.777777a56.888889 56.888889 0 1 0 0-113.777777 56.888889 56.888889 0 0 0 0 113.777777z" p-id="4602"></path></svg>
|
||||
|
After Width: | Height: | Size: 726 B |
245
src/views/Inventory/PurchaseInRecord/index.vue
Normal file
245
src/views/Inventory/PurchaseInRecord/index.vue
Normal file
@@ -0,0 +1,245 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" style="width:150px" placeholder="请选择" size="small" clearable filterable @change="projectChange">
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床图号:</span>
|
||||
<el-select v-model="machineValue" style="width:150px" placeholder="请选择" size="small" clearable filterable @change="machineChange">
|
||||
<el-option
|
||||
v-for="item in machine"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>组号:</span>
|
||||
<el-select v-model="groupValue" style="width:140px" placeholder="请选择" size="small" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in group"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>名称:</span>
|
||||
<el-input v-model="name" clearable size="small" style="width:150px" />
|
||||
<span>规格:</span>
|
||||
<el-input v-model="spec" clearable size="small" style="width:150px" />
|
||||
<span>图号或型号:</span>
|
||||
<el-input v-model="model" clearable size="small" style="width:150px" />
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="searchRecord()">查询</el-button>
|
||||
</div>
|
||||
<h4 style="margin-top: 0">采购合同件</h4>
|
||||
<el-table :data="tableData1" border size="mini" style="width: 100%;" height="400">
|
||||
<el-table-column label="名称" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.图号或型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库数量" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库人" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库时间" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<h4>离线合同件</h4>
|
||||
<el-table :data="tableData2" border size="mini" style="width: 100%;" height="400">
|
||||
<el-table-column label="名称" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.图号或型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库数量" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库人" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库时间" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize2"
|
||||
:total="total2"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchMachine, searchGroup, searchRecord1, searchRecord2 } from '@/api/Inventory/PurchaseInRecord'
|
||||
export default {
|
||||
name: 'PurchaseInRecord',
|
||||
data() {
|
||||
return {
|
||||
projectValue: '', // 项目名称
|
||||
project: [],
|
||||
machineValue: '',
|
||||
machine: [],
|
||||
groupValue: '',
|
||||
group: [],
|
||||
name: '',
|
||||
spec: '',
|
||||
model: '',
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
pageSize1: 10,
|
||||
pageCurrent1: 1,
|
||||
total1: 0,
|
||||
pageSize2: 10,
|
||||
pageCurrent2: 1,
|
||||
total2: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
this.searchRecord()
|
||||
},
|
||||
methods: {
|
||||
projectChange() {
|
||||
this.machine = []
|
||||
this.machineValue = ''
|
||||
this.group = []
|
||||
this.groupValue = ''
|
||||
searchMachine(this.projectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machine.push({
|
||||
value: response.data[i].机床流水号,
|
||||
label: response.data[i].机床图号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.group = []
|
||||
this.groupValue = ''
|
||||
searchGroup(this.machineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.group.push({
|
||||
value: response.data[i].组件流水号,
|
||||
label: response.data[i].组号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchRecord() {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = 10
|
||||
this.searchRecord1()
|
||||
this.pageCurrent2 = 1
|
||||
this.pageSize2 = 10
|
||||
this.searchRecord2()
|
||||
},
|
||||
searchRecord1() {
|
||||
let check1, check2, check3, check4, check5, check6
|
||||
this.projectValue ? check1 = 1 : check1 = 0
|
||||
this.machineValue ? check2 = 1 : check2 = 0
|
||||
this.groupValue ? check3 = 1 : check3 = 0
|
||||
this.name ? check4 = 1 : check4 = 0
|
||||
this.spec ? check5 = 1 : check5 = 0
|
||||
this.model ? check6 = 1 : check6 = 0
|
||||
searchRecord1(check1, this.projectValue, check2, this.machineValue, check3, this.groupValue, check4, this.name, check5, this.spec, check6, this.model, this.pageCurrent1, this.pageSize1).then(res => {
|
||||
this.tableData1 = res.data.rows
|
||||
this.total1 = res.data.total
|
||||
})
|
||||
},
|
||||
searchRecord2() {
|
||||
let check4, check5, check6
|
||||
this.name ? check4 = 1 : check4 = 0
|
||||
this.spec ? check5 = 1 : check5 = 0
|
||||
this.model ? check6 = 1 : check6 = 0
|
||||
searchRecord2(check4, this.name, check5, this.spec, check6, this.model, this.pageCurrent2, this.pageSize2).then(res => {
|
||||
this.tableData2 = res.data.rows
|
||||
this.total2 = res.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchRecord1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchRecord1()
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageSize2 = val
|
||||
this.pageCurrent2 = 1
|
||||
this.searchRecord2()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchRecord2()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -32,7 +32,7 @@
|
||||
<el-input v-model="spec" clearable size="small" style="width:150px" />
|
||||
<span>图号或型号:</span>
|
||||
<el-input v-model="model" clearable size="small" style="width:150px" />
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="searchRecord()">查询</el-button>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=10;searchRecord()">查询</el-button>
|
||||
</div>
|
||||
<el-table :data="tableData" border size="mini" style="width: 100%;" height="600">
|
||||
<el-table-column label="名称" align="center" min-width="200">
|
||||
@@ -66,6 +66,17 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -85,11 +96,15 @@ export default {
|
||||
name: '',
|
||||
spec: '',
|
||||
model: '',
|
||||
tableData: []
|
||||
tableData: [],
|
||||
pageSize1: 10,
|
||||
pageCurrent1: 1,
|
||||
total1: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
this.searchRecord()
|
||||
},
|
||||
methods: {
|
||||
projectChange() {
|
||||
@@ -119,13 +134,26 @@ export default {
|
||||
})
|
||||
},
|
||||
searchRecord() {
|
||||
if (!this.projectValue) {
|
||||
this.$message.warning('请选择项目')
|
||||
return
|
||||
}
|
||||
searchRecord(this.projectValue, this.machineValue, this.groupValue, this.name, this.spec, this.model).then(res => {
|
||||
this.tableData = res.data
|
||||
let check1, check2, check3, check4, check5, check6
|
||||
this.projectValue ? check1 = 1 : check1 = 0
|
||||
this.machineValue ? check2 = 1 : check2 = 0
|
||||
this.groupValue ? check3 = 1 : check3 = 0
|
||||
this.name ? check4 = 1 : check4 = 0
|
||||
this.spec ? check5 = 1 : check5 = 0
|
||||
this.model ? check6 = 1 : check6 = 0
|
||||
searchRecord(check1, this.projectValue, check2, this.machineValue, check3, this.groupValue, check4, this.name, check5, this.spec, check6, this.model, this.pageCurrent1, this.pageSize1).then(res => {
|
||||
this.tableData = res.data.rows
|
||||
this.total1 = res.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchRecord()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchRecord()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user