This commit is contained in:
lixin
2018-12-19 19:54:22 +08:00
parent e45ebcd180
commit 05ea85383f
4 changed files with 322 additions and 139 deletions

View File

@@ -28,7 +28,19 @@ export function searchInbound(data1, data2, data3) {
method: 'post',
data: {
type: '1',
name: '库存管理_入库记录_查询',
name: '库存管理_入库记录_采购部查询',
param: '采购合同流水号=' + data1 + '&到货时间=' + data2 + '&仓库流水号=' + data3
}
})
}
// 入库记录查询
export function searchShopInbound(data1, data2, data3) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_入库记录_车间采购查询',
param: '采购合同流水号=' + data1 + '&到货时间=' + data2 + '&仓库流水号=' + data3
}
})

View File

@@ -109,6 +109,18 @@ export function deleteReplacementCard(Number) {
}
})
}
// 补投删除
export function deleteCardDetail(Number) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '库存管理_补投单_补投单明细删除',
param: '补投单明细流水号=' + Number
}
})
}
// 补投增加
export function addCardDetail(Number, project, machine, team, name, mass, locate, parttype, reason) {
return request({
@@ -121,3 +133,16 @@ export function addCardDetail(Number, project, machine, team, name, mass, locate
}
})
}
// 补投单明细查询
export function searchCardDetail(cardNumber) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_仓库补投_补投单明细_查询',
param: '补投单流水号=' + cardNumber
}
})
}

View File

@@ -1,81 +1,83 @@
<template>
<div class="app-container">
<el-card>
<span>采购合同编号:</span>
<el-select v-model="ContractValue" filterable clearable size="small" placeholder="采购合同" style="width: 200px">
<el-option
v-for="item in Contract"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span class="demonstration">入库日期</span>
<el-date-picker
v-model="InboundDate"
type="date"
size="small"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期"/>
<span>仓库:</span>
<el-select v-model="InventoryValue" filterable clearable size="small" placeholder="仓库" style="width: 200px">
<el-option
v-for="item in Inventory"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchPartinfo()">查询</el-button><br>
</el-card>
<el-card>
<el-table
v-loading="listLoading"
:data="tableData"
border
style="width: 100%;"
height="400">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column label="存货编码" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="存货名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="规格型号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.实际到货数量 }}
</template>
</el-table-column>
<el-table-column label="本币单价" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.单价 }}
</template>
</el-table-column>
<el-table-column label="本币单价" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.单价 * scope.row.实际到货数量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选入</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="采购部采购" name="first">
<el-card>
<span>采购合同编号:</span>
<el-select v-model="ContractValue" filterable clearable size="small" placeholder="采购合同" style="width: 200px">
<el-option
v-for="item in Contract"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span class="demonstration">入库日期</span>
<el-date-picker
v-model="InboundDate"
type="date"
size="small"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期"/>
<span>仓库:</span>
<el-select v-model="InventoryValue" filterable clearable size="small" placeholder="仓库" style="width: 200px">
<el-option
v-for="item in Inventory"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchPartinfo()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-download" style="margin: 0 0 0 10px" @click="searchPartinfo()">导出</el-button>
</el-card>
<el-card>
<el-table
v-loading="listLoading"
:data="tableData"
size="mini"
border
style="width: 100%;"
height="400">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column label="存货名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="规格型号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.实际到货数量 }}
</template>
</el-table-column>
<el-table-column label="本币单价" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.单价 }}
</template>
</el-table-column>
<el-table-column label="本币单价" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.单价 * scope.row.实际到货数量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选入</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</el-tab-pane>
<el-tab-pane label="车间采购" name="second">配置管理</el-tab-pane>
</el-tabs>
</div>
</template>
@@ -91,7 +93,8 @@ export default {
InventoryValue: '',
InboundDate: '',
listLoading: '',
tableData: []
tableData: [],
activeName: 'first'
}
},
computed: {

View File

@@ -42,7 +42,7 @@
</el-card>
<el-card v-show="altershow">
<el-table
v-loading="loading1"
v-loading="loading"
:data="tableData1"
border
style="width: 100%;max-height: 300px;"
@@ -103,10 +103,10 @@
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
:page-size="pageSize"
:total="total"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@@ -115,13 +115,13 @@
</el-card>
<el-card v-show="errorshow">
<el-table
v-loading="loading1"
v-loading="loading2"
:data="tableData2"
border
style="width: 100%;max-height: 300px;"
height="300px"
size="mini"
@selection-change="handleSelectionChange">
@selection-change="handleSelectionChange2">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column label="项目名称" min-width="100" align="center">
<template slot-scope="scope">
@@ -143,7 +143,7 @@
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="异常数量" min-width="50" align="center">
<el-table-column label="异常数量" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.异常数量 }}
</template>
@@ -183,7 +183,7 @@
</el-card>
<el-card>
<span>补投单号:</span>
<el-input v-model="repleacecard" placeholder="补投单号" size="small" clearable style="width: 150px"/>
<el-input v-model="repleacecard" placeholder="补投单号" size="small" clearable style="width: 200px"/>
<span>仓库:</span>
<el-select v-model="HouseNumber" placeholder="请选择仓库" size="small" @change="searchDemo();payMethodChange()">
<el-option
@@ -209,16 +209,10 @@
size="small"
icon="el-icon-download"
style="margin-left: 10px"
@click="addMateriel">选入物料</el-button>
@click="submitCardDetail">选入物料</el-button>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData3" border style="max-height: 300px;" height="300px" size="mini" highlight-current-row @row-click="searchTable3">
<el-table-column label="补投单状态" align="center" width="80" fixed="left">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否传递)===0" type="warning" size="small">未传递</el-tag>
<el-tag v-if="parseInt(scope.row.是否传递)===1" type="primary" size="small">已传递</el-tag>
</template>
</el-table-column>
<el-table v-loading="loading3" :data="tableData3" border style="max-height: 300px;" height="300px" size="mini" highlight-current-row @row-click="searchTable4">
<el-table-column label="补投单编号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.补投单编号 }}
@@ -242,7 +236,7 @@
<el-table-column label="操作" align="center" width="280" fixed="right">
<template slot-scope="scope">
<el-button :disabled="parseInt(scope.row.离线合同状态) === 1" type="danger" size="mini" icon="el-icon-delete" @click="deleteOfflineContract(scope.row)">作废</el-button>
<el-button type="warning" size="mini" icon="el-icon-download" @click="doneRequestCard()">传递</el-button>
<el-button type="warning" size="mini" icon="el-icon-download" @click="doneRequestCard()">导出</el-button>
</template>
</el-table-column>
</el-table>
@@ -257,35 +251,50 @@
@size-change="handleSizeChange3"
@current-change="handleCurrentChange3"/>
</div>
<el-table v-loading="" :data="tableData4" border style="max-height: 300px;" height="300px" size="mini">
<el-table-column label="离线请购单编号" align="center" min-width="150">
<el-table v-loading="loading4" :data="tableData4" border style="max-height: 300px;" height="300px" size="mini">
<el-table-column label="补投单编号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.请购单编号 }}
{{ scope.row.补投单编号 }}
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" min-width="150">
<el-table-column label="项目名称" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="100">
<el-table-column label="机床图号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="200">
<el-table-column label="号" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.物料型 }}
{{ scope.row. }}
</template>
</el-table-column>
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100">
<template slot-scope="scope">
<el-input v-model="scope.row.数量" :disabled="disable" size="mini" style="width:70px"/>
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="仓库名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="类型名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.类型名称 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100">
<template slot-scope="scope">
<el-button :disabled="disable" type="danger" size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)">移除</el-button>
<el-button :disabled="disable" type="danger" size="mini" icon="el-icon-delete" @click="deleteDetail(scope.row)">移除</el-button>
</template>
</el-table-column>
</el-table>
@@ -294,7 +303,7 @@
</template>
<script>
import { initProject, searchmachine, searchTeam, searchAlterRecord, searchErrorRecord, searchReplacementCard, addReplacementCard, initWarehouse } from '@/api/Inventory/PartsReplacement'
import { initProject, searchmachine, searchTeam, searchAlterRecord, searchErrorRecord, searchReplacementCard, addReplacementCard, initWarehouse, addCardDetail, searchCardDetail, deleteReplacementCard, deleteCardDetail } from '@/api/Inventory/PartsReplacement'
import { mapGetters } from 'vuex'
export default {
data() {
@@ -309,18 +318,18 @@ export default {
tableData2: [],
tableData3: [],
tableData4: [],
listLoading: false,
listLoading2: false,
listLoading3: false,
listLoading4: false,
PageCurrent: 1,
PageSize: 10,
loading: false,
loading2: false,
loading3: false,
loading4: false,
pageCurrent: 1,
pageSize: 10,
total: 0,
PageCurrent2: 1,
PageSize2: 10,
pageCurrent2: 1,
pageSize2: 10,
total2: 0,
PageCurrent3: 1,
PageSize3: 10,
pageCurrent3: 1,
pageSize3: 10,
total3: 0,
ProjectValue_check: '',
MachineValue_check: '',
@@ -332,7 +341,16 @@ export default {
House: [],
radio: '',
altershow: true,
errorshow: false
errorshow: false,
projectGroup: [],
machineGroup: [],
partGroup: [],
nameGroup: [],
numberGroup: [],
locateGroup: [],
partType: [],
reasonGroup: [],
cardNumber: ''
}
},
computed: {
@@ -361,6 +379,46 @@ export default {
}
})
},
handleSelectionChange(val) {
this.projectGroup = []
this.machineGroup = []
this.partGroup = []
this.nameGroup = []
this.numberGroup = []
this.locateGroup = []
this.partType = []
this.reasonGroup = []
for (let i = 0; i < val.length; i++) {
this.projectGroup.push(val[i].项目流水号)
this.machineGroup.push(val[i].机床流水号)
this.partGroup.push(val[i].组件流水号)
this.nameGroup.push(val[i].名称)
this.numberGroup.push(val[i].数量)
this.locateGroup.push(val[i].货位流水号)
this.partType.push(val[i].零件类型)
this.reasonGroup.push(val[i].原因)
}
},
handleSelectionChange2(val) {
this.projectGroup = []
this.machineGroup = []
this.partGroup = []
this.nameGroup = []
this.numberGroup = []
this.locateGroup = []
this.partType = []
this.reasonGroup = []
for (let i = 0; i < val.length; i++) {
this.projectGroup.push(val[i].项目流水号)
this.machineGroup.push(val[i].机床流水号)
this.partGroup.push(val[i].组件流水号)
this.nameGroup.push(val[i].名称)
this.numberGroup.push(val[i].异常数量)
this.locateGroup.push(val[i].货位流水号)
this.partType.push(val[i].零件类型)
this.reasonGroup.push(val[i].异常原因)
}
},
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
},
@@ -395,7 +453,7 @@ export default {
},
// 查询修改记录
getAlterRecord() {
this.listLoading = true
this.loading = true
this.tableData1 = []
if (this.ProjectValue === '') {
this.ProjectValue_check = 0
@@ -412,16 +470,18 @@ export default {
} else {
this.GroupNumValue_check = 1
}
searchAlterRecord(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
searchAlterRecord(this.pageCurrent, this.pageSize, this.rojectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tableData1 = response.data.rows
console.log(response.data)
console.log(this.tableData1)
this.total = response.data.total
this.listLoading = false
this.loading = false
})
this.getErrorRecord()
},
// 查询异常记录
getErrorRecord() {
this.listLoading2 = true
this.loading2 = true
this.tableData2 = []
if (this.ProjectValue === '') {
this.ProjectValue_check = 0
@@ -438,54 +498,67 @@ export default {
} else {
this.GroupNumValue_check = 1
}
searchErrorRecord(this.PageCurrent2, this.PageSize2, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
searchErrorRecord(this.pageCurrent2, this.pageSize2, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
this.listLoading2 = false
this.loading2 = false
})
},
handleSizeChange(val) {
this.PageCurrent = 1
this.PageSize = val
this.searchPartinfo()
this.getAlterRecord()
},
handleCurrentChange(val) {
this.PageCurrent = val
this.searchPartinfo()
this.getAlterRecord()
},
handleSizeChange2(val) {
this.PageCurrent2 = 1
this.PageSize2 = val
this.searchPartinfo()
this.getErrorRecord()
},
handleCurrentChange2(val) {
this.PageCurrent2 = val
this.searchPartinfo()
this.getErrorRecord()
},
handleSizeChange3(val) {
this.PageCurrent3 = 1
this.PageSize3 = val
this.getReplacement()
},
handleCurrentChange3(val) {
this.PageCurrent3 = val
this.getReplacement()
},
// 查询补投单
getReplacement() {
this.listLoading3 = true
this.loading3 = true
this.tableData3 = []
if (this.repleacecard === '') {
this.repleacecard_check = 0
} else {
this.repleacecard_check = 1
}
searchReplacementCard(this.PageCurrent3, this.PageSize3, this.repleacecard_check, this.repleacecard).then(response => {
searchReplacementCard(this.pageCurrent3, this.pageSize3, this.repleacecard_check, this.repleacecard).then(response => {
this.tableData3 = response.data.rows
this.total3 = response.data.total
this.listLoading3 = false
this.loading3 = false
})
},
addCard() {
addReplacementCard(this.people, this.HouseNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.getReplacement()
} else {
this.$message.error('删除失败')
}
})
if (this.HouseNumber === '') {
this.$message.error('请选择仓库')
} else {
addReplacementCard(this.people, this.HouseNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.getReplacement()
} else {
this.$message.error('删除失败')
}
})
}
},
BasicShow() {
if (this.radio === 1) {
@@ -495,6 +568,76 @@ export default {
this.altershow = false
this.errorshow = true
}
},
searchTable4(row) {
this.cardNumber = row.补投单流水号
this.getdetail()
},
submitCardDetail() {
if (this.cardNumber === '') {
this.$message.error('请选择领料单')
} else {
addCardDetail(this.cardNumber, this.projectGroup, this.machineGroup, this.partGroup, this.nameGroup, this.numberGroup, this.locateGroup, this.partType, this.reasonGroup, this.CardDetail).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.searchTable4()
} else {
this.$message.error('增加失败')
}
})
}
},
// 查询补投单明细
getdetail() {
this.loading4 = true
searchCardDetail(this.cardNumber).then(response => {
this.tableData4 = response.data
this.loading4 = false
})
},
// 删除补投单
deleteOfflineContract(row) { // 删除请购单
this.$confirm('确定删除该补投单?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteReplacementCard(row.补投单流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.getReplacement()
} else {
this.$message.error('数据占用')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 删除补投单明细
deleteDetail(row) {
this.$confirm('确定删除该补投单明细?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteCardDetail(row.补投单明细流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.getdetail()
} else {
this.$message.error('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}
}
}