fix bug
This commit is contained in:
@@ -36,14 +36,15 @@ export function searchTeam(machineNumber) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 初始化物料
|
// 初始化物料
|
||||||
export function searchPart(data1) {
|
export function searchPart(...params) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '库存管理_离线外购件_出库查询',
|
name: '库存管理_离线外购件_出库查询',
|
||||||
param: '离线合同编号=' + data1
|
param: `物料名称_check=${params[0]}&物料名称=${params[1]}&物料规格_check=${params[2]}&物料规格=${params[3]}&物料型号_check=${params[4]}&物料型号=${params[5]}`,
|
||||||
|
Pagination: params[6] + '&' + params[7]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,28 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-card>
|
||||||
<span style="margin: 5px">离线合同编号</span>
|
<span>物料名称:</span>
|
||||||
<el-input v-model="offlineContract" clearable size="small" style="width:200px" />
|
<el-input v-model="materialName" placeholder="物料名称" clearable size="small"/>
|
||||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchPurchasePartinfo()">查询</el-button>
|
<span>物料规格:</span>
|
||||||
|
<el-input v-model="materialSpec" placeholder="物料规格" clearable size="small"/>
|
||||||
|
<span>物料型号:</span>
|
||||||
|
<el-input v-model="materialModel" placeholder="物料型号" clearable size="small"/>
|
||||||
|
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table v-loading="listLoading" :data="tableDataBasic" size="mini" border style="width: 100%;" height="200" @row-click="searchoutRecord">
|
<el-table v-loading="listLoading" :data="tableDataBasic" size="mini" border style="width: 100%;" height="440">
|
||||||
<el-table-column label="序号" align="center" type="index" width="50"/>
|
<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">
|
<el-table-column label="物料名称" align="center" min-width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.物料名称 }}
|
{{ scope.row.物料名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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">
|
<el-table-column label="物料型号" align="center" min-width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.物料型号 }}
|
{{ scope.row.物料型号 }}
|
||||||
@@ -33,77 +28,43 @@
|
|||||||
{{ scope.row.物料规格 }}
|
{{ scope.row.物料规格 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" min-width="120">
|
<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" width="100">
|
||||||
<template slot-scope="scope" align="center">
|
<template slot-scope="scope" align="center">
|
||||||
<el-button size="mini" type="primary" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="parOut(scope.row)">出库</el-button>
|
<el-button :disabled="Number(scope.row.货位存量)===0" size="mini" type="primary" icon="el-icon-sort-up" @click="parOut(scope.row)">出库</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
<div class="block" style="margin-top: 10px;">
|
||||||
<!--零件出库对话框-->
|
<el-pagination
|
||||||
<el-dialog :visible.sync="dialogFormVisible" title="零件出库" center width="380px">
|
:current-page="pageCurrent1"
|
||||||
<el-form ref="form" :model="Project" :rules="rules" label-position="left">
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
<el-form-item label="项目" prop="TotalContractAmount" label-width="100px">
|
:page-size="pageSize1"
|
||||||
<el-select v-model="form.ProjectValue" filterable clearable size="small" placeholder="项目" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
:total="total1"
|
||||||
<el-option
|
style="display:inline-block;width:50%"
|
||||||
v-for="item in Project"
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
:key="item.value"
|
@size-change="handleSizeChange1"
|
||||||
:label="item.label"
|
@current-change="handleCurrentChange1"/>
|
||||||
:value="item.value"/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="机床" prop="TotalContractAmount" label-width="100px">
|
|
||||||
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
|
||||||
<el-option
|
|
||||||
v-for="item in Machine"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="分组" prop="TotalContractAmount" label-width="100px">
|
|
||||||
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="分组" style="width: 200px;margin-right:10px">
|
|
||||||
<el-option
|
|
||||||
v-for="item in GroupNum"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
|
|
||||||
<el-input v-model="form.DirectNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="领用者" prop="TotalContractAmount" label-width="100px">
|
|
||||||
<el-select v-model="PeopleValue" filterable clearable size="small" placeholder="领用者" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
|
||||||
<el-option
|
|
||||||
v-for="item in People"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="TotalContractAmount" label-width="100px">
|
|
||||||
<el-input v-model="form.DirectNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="callOff('form')">取消</el-button>
|
|
||||||
<el-button type="primary" @click="addDirectPartm()">确定</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-card>
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<el-table
|
<el-table v-loading="listLoading1" :data="tableDataOut" size="mini" border style="width: 100%;" height="350">
|
||||||
v-loading="listLoading1"
|
<el-table-column label="序号" align="center" type="index" width="50"/>
|
||||||
:data="tableDataOut"
|
|
||||||
size="mini"
|
|
||||||
border
|
|
||||||
style="width: 100%;"
|
|
||||||
height="350">
|
|
||||||
<el-table-column
|
|
||||||
label="序号"
|
|
||||||
align="center"
|
|
||||||
type="index"
|
|
||||||
width="50"/>
|
|
||||||
<el-table-column label="项目名称" align="center" min-width="80">
|
<el-table-column label="项目名称" align="center" min-width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.项目名称 }}
|
{{ scope.row.项目名称 }}
|
||||||
@@ -141,6 +102,57 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<!--零件出库对话框-->
|
||||||
|
<el-dialog :visible.sync="dialogFormVisible" title="零件出库" center width="380px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||||
|
<el-form-item label="项目" prop="TotalContractAmount" label-width="100px">
|
||||||
|
<el-select v-model="form.ProjectValue" filterable clearable size="small" placeholder="项目" style="width: 200px;margin-right:10px" @change="searchMachine()">
|
||||||
|
<el-option
|
||||||
|
v-for="item in Project"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="机床" prop="TotalContractAmount" label-width="100px">
|
||||||
|
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床" style="width: 200px;margin-right:10px" @change="searchGroupList()">
|
||||||
|
<el-option
|
||||||
|
v-for="item in Machine"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分组" prop="TotalContractAmount" label-width="100px">
|
||||||
|
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="分组" style="width: 200px;margin-right:10px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in GroupNum"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||||
|
<el-input v-model="form.DirectNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="领用者" prop="TotalContractAmount" label-width="100px">
|
||||||
|
<el-select v-model="PeopleValue" filterable clearable size="small" placeholder="领用者" style="width: 200px;margin-right:10px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in People"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="TotalContractAmount" label-width="100px">
|
||||||
|
<el-input v-model="form.DirectNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="callOff('form')">取消</el-button>
|
||||||
|
<el-button type="primary" @click="addDirectPartm()">确定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -152,10 +164,10 @@ export default {
|
|||||||
return {
|
return {
|
||||||
Project: [],
|
Project: [],
|
||||||
ProjectValue_check: 1,
|
ProjectValue_check: 1,
|
||||||
MachineValue: ' ',
|
MachineValue: '',
|
||||||
Machine: [],
|
Machine: [],
|
||||||
MachineValue_check: 1,
|
MachineValue_check: 1,
|
||||||
GroupNumValue: ' ',
|
GroupNumValue: '',
|
||||||
GroupNumValue_check: 1,
|
GroupNumValue_check: 1,
|
||||||
GroupNum: [],
|
GroupNum: [],
|
||||||
tableDataBasic: [],
|
tableDataBasic: [],
|
||||||
@@ -180,7 +192,12 @@ export default {
|
|||||||
listLoading: '',
|
listLoading: '',
|
||||||
listLoading1: '',
|
listLoading1: '',
|
||||||
partnumber: '',
|
partnumber: '',
|
||||||
offlineContract: null // 离线合同编号
|
pageCurrent1: 1,
|
||||||
|
pageSize1: 10,
|
||||||
|
total1: 0,
|
||||||
|
materialName: '', // 物料名称
|
||||||
|
materialSpec: '', // 物料规格
|
||||||
|
materialModel: '' // 物料型号
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -190,7 +207,7 @@ export default {
|
|||||||
])
|
])
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.searchPurchasePartinfo()
|
this.searchTable1()
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
this.searchPeopleData()
|
this.searchPeopleData()
|
||||||
this.getpeopleid()
|
this.getpeopleid()
|
||||||
@@ -207,6 +224,10 @@ export default {
|
|||||||
if (this.ProjectValue === '') {
|
if (this.ProjectValue === '') {
|
||||||
this.ProjectValue_check = 0
|
this.ProjectValue_check = 0
|
||||||
}
|
}
|
||||||
|
this.Machine = []
|
||||||
|
this.MachineValue = ''
|
||||||
|
this.GroupNum = []
|
||||||
|
this.GroupNumValue = ''
|
||||||
searchmachine(this.ProjectValue_check, this.form.ProjectValue).then(response => {
|
searchmachine(this.ProjectValue_check, this.form.ProjectValue).then(response => {
|
||||||
for (let i = 0; i < response.data.length; i++) {
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
this.Machine.push({
|
this.Machine.push({
|
||||||
@@ -217,36 +238,44 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
searchGroupList() { // 查询组号
|
searchGroupList() { // 查询组号
|
||||||
|
this.GroupNum = []
|
||||||
|
this.GroupNumValue = ''
|
||||||
searchTeam(this.MachineValue).then(response => {
|
searchTeam(this.MachineValue).then(response => {
|
||||||
for (let i = 0; i < response.data.length; i++) {
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
this.GroupNum.push({
|
this.GroupNum.push({
|
||||||
label: response.data[i].组件名称,
|
label: response.data[i].组号,
|
||||||
value: response.data[i].组件流水号
|
value: response.data[i].组件流水号
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 离线件查询
|
// 离线件查询
|
||||||
searchPurchasePartinfo() {
|
searchTable1() {
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
this.tableDataBasic = []
|
this.tableDataBasic = []
|
||||||
searchPart(this.offlineContract).then(response => {
|
let check1, check2, check3
|
||||||
this.tableDataBasic = response.data
|
this.materialName ? check1 = 1 : check1 = 0
|
||||||
|
this.materialSpec ? check2 = 1 : check2 = 0
|
||||||
|
this.materialModel ? check3 = 1 : check3 = 0
|
||||||
|
searchPart(check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.pageCurrent1, this.pageSize1).then(response => {
|
||||||
|
console.log(response.data)
|
||||||
|
this.tableDataBasic = response.data.rows
|
||||||
|
this.total1 = response.data.total
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 离线记录查询
|
handleSizeChange1(val) {
|
||||||
searchoutRecord(row) {
|
this.pageSize1 = val
|
||||||
this.contractNumber = row.离线合同明细流水号
|
this.pageCurrent1 = 1
|
||||||
this.listLoading1 = true
|
this.searchTable1()
|
||||||
outRecord(this.contractNumber).then(response => {
|
},
|
||||||
this.tableDataOut = response.data
|
handleCurrentChange1(val) {
|
||||||
this.listLoading1 = false
|
this.pageCurrent1 = val
|
||||||
})
|
this.searchTable1()
|
||||||
},
|
},
|
||||||
// 打开表单
|
// 打开表单
|
||||||
parOut(row) {
|
parOut(row) {
|
||||||
this.form = []
|
this.form = {}
|
||||||
this.MachineValue = ''
|
this.MachineValue = ''
|
||||||
this.GroupNumValue = ''
|
this.GroupNumValue = ''
|
||||||
this.dialogFormVisible = true
|
this.dialogFormVisible = true
|
||||||
@@ -254,7 +283,6 @@ export default {
|
|||||||
this.locateNumber = row.货位流水号
|
this.locateNumber = row.货位流水号
|
||||||
this.materialNumber = row.物料流水号
|
this.materialNumber = row.物料流水号
|
||||||
this.partnumber = row.货位存量
|
this.partnumber = row.货位存量
|
||||||
this.searchoutRecord()
|
|
||||||
},
|
},
|
||||||
// 重置表单
|
// 重置表单
|
||||||
callOff() {
|
callOff() {
|
||||||
@@ -282,7 +310,7 @@ export default {
|
|||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('零件出库成功')
|
this.$message.success('零件出库成功')
|
||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
this.searchPurchasePartinfo()
|
this.searchTable1()
|
||||||
outRecord(this.contractNumber).then(response => {
|
outRecord(this.contractNumber).then(response => {
|
||||||
this.tableDataOut = response.data
|
this.tableDataOut = response.data
|
||||||
this.listLoading1 = false
|
this.listLoading1 = false
|
||||||
@@ -305,4 +333,10 @@ export default {
|
|||||||
span{
|
span{
|
||||||
margin: 10px 0 10px 10px;
|
margin: 10px 0 10px 10px;
|
||||||
}
|
}
|
||||||
|
.el-select{
|
||||||
|
width:200px
|
||||||
|
}
|
||||||
|
.el-input{
|
||||||
|
width:200px
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -235,7 +235,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="合计" align="center" min-width="100" prop="合计">
|
<el-table-column label="合计" align="center" min-width="100" prop="合计">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
|
{{ (parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0)).toFixed(2) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
|
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
|
||||||
@@ -853,9 +853,9 @@ export default {
|
|||||||
sums[index] = values.reduce((prev, curr) => {
|
sums[index] = values.reduce((prev, curr) => {
|
||||||
const value = Number(curr)
|
const value = Number(curr)
|
||||||
if (!isNaN(value)) {
|
if (!isNaN(value)) {
|
||||||
return prev + curr
|
return Number((prev + curr).toFixed(2))
|
||||||
} else {
|
} else {
|
||||||
return prev
|
return Number((prev).toFixed(2))
|
||||||
}
|
}
|
||||||
}, 0)
|
}, 0)
|
||||||
sums[index] += ' 元'
|
sums[index] += ' 元'
|
||||||
@@ -1008,11 +1008,12 @@ export default {
|
|||||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData3[j].物料型号
|
document.getElementsByClassName('tableData')[j].children[3].innerHTML = this.tableData3[j].物料型号
|
||||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData3[j].数量
|
document.getElementsByClassName('tableData')[j].children[4].innerHTML = this.tableData3[j].数量
|
||||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData3[j].单价
|
document.getElementsByClassName('tableData')[j].children[5].innerHTML = this.tableData3[j].单价
|
||||||
document.getElementsByClassName('tableData')[j].children[6].innerHTML = this.tableData3[j].数量 * this.tableData3[j].单价
|
document.getElementsByClassName('tableData')[j].children[6].innerHTML = (this.tableData3[j].数量 * this.tableData3[j].单价).toFixed(2)
|
||||||
document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.tableData3[j].交货期要求
|
document.getElementsByClassName('tableData')[j].children[7].innerHTML = this.tableData3[j].交货期要求
|
||||||
document.getElementsByClassName('tableData')[j].children[8].innerHTML = this.tableData3[j].备注
|
document.getElementsByClassName('tableData')[j].children[8].innerHTML = this.tableData3[j].备注
|
||||||
total += this.tableData3[j].数量 * this.tableData3[j].单价
|
total += Number(this.tableData3[j].数量 * this.tableData3[j].单价)
|
||||||
}
|
}
|
||||||
|
total = total.toFixed(2)
|
||||||
document.getElementById('contractNum').innerHTML = row.离线合同编号
|
document.getElementById('contractNum').innerHTML = row.离线合同编号
|
||||||
document.getElementById('contractName').innerHTML = row.离线合同名称
|
document.getElementById('contractName').innerHTML = row.离线合同名称
|
||||||
document.getElementById('supplier').innerHTML = row.供应商名称
|
document.getElementById('supplier').innerHTML = row.供应商名称
|
||||||
|
|||||||
Reference in New Issue
Block a user