Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
This commit is contained in:
@@ -36,14 +36,15 @@ export function searchTeam(machineNumber) {
|
||||
})
|
||||
}
|
||||
// 初始化物料
|
||||
export function searchPart(data1) {
|
||||
export function searchPart(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
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,31 +1,89 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span style="margin: 5px">离线合同编号</span>
|
||||
<el-input v-model="offlineContract" clearable size="small" style="width:200px" />
|
||||
<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="materialName" placeholder="物料名称" clearable size="small"/>
|
||||
<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-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" 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="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" min-width="120">
|
||||
<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">
|
||||
<el-table-column label="操作" align="center" width="250">
|
||||
<template slot-scope="scope" align="center">
|
||||
<el-button size="mini" type="success" icon="el-icon-search" @click="searchoutRecord(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>
|
||||
</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>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="listLoading1" :data="tableDataOut" size="mini" border style="width: 100%;" height="250">
|
||||
<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.物料型号 }}
|
||||
{{ 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">
|
||||
@@ -33,16 +91,31 @@
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="120">
|
||||
<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-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>
|
||||
</el-card>
|
||||
<!--零件出库对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="零件出库" center width="380px">
|
||||
<el-form ref="form" :model="Project" :rules="rules" label-position="left">
|
||||
<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
|
||||
@@ -74,7 +147,7 @@
|
||||
<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-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"
|
||||
@@ -91,56 +164,6 @@
|
||||
<el-button type="primary" @click="addDirectPartm()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading1"
|
||||
: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">
|
||||
<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.出库时间 }}
|
||||
</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>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -180,7 +203,12 @@ export default {
|
||||
listLoading: '',
|
||||
listLoading1: '',
|
||||
partnumber: '',
|
||||
offlineContract: null // 离线合同编号
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
materialName: '', // 物料名称
|
||||
materialSpec: '', // 物料规格
|
||||
materialModel: '' // 物料型号
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -190,7 +218,7 @@ export default {
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.searchPurchasePartinfo()
|
||||
this.searchTable1()
|
||||
this.fetchData()
|
||||
this.searchPeopleData()
|
||||
this.getpeopleid()
|
||||
@@ -207,6 +235,10 @@ export default {
|
||||
if (this.ProjectValue === '') {
|
||||
this.ProjectValue_check = 0
|
||||
}
|
||||
this.Machine = []
|
||||
this.MachineValue = ''
|
||||
this.GroupNum = []
|
||||
this.GroupNumValue = ''
|
||||
searchmachine(this.ProjectValue_check, this.form.ProjectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
@@ -217,24 +249,41 @@ export default {
|
||||
})
|
||||
},
|
||||
searchGroupList() { // 查询组号
|
||||
this.GroupNum = []
|
||||
this.GroupNumValue = ''
|
||||
searchTeam(this.MachineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNum.push({
|
||||
label: response.data[i].组件名称,
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 离线件查询
|
||||
searchPurchasePartinfo() {
|
||||
searchTable1() {
|
||||
this.listLoading = true
|
||||
this.tableDataBasic = []
|
||||
searchPart(this.offlineContract).then(response => {
|
||||
this.tableDataBasic = response.data
|
||||
let check1, check2, check3
|
||||
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
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
// 离线记录查询
|
||||
searchoutRecord(row) {
|
||||
this.contractNumber = row.离线合同明细流水号
|
||||
@@ -246,7 +295,7 @@ export default {
|
||||
},
|
||||
// 打开表单
|
||||
parOut(row) {
|
||||
this.form = []
|
||||
this.form = {}
|
||||
this.MachineValue = ''
|
||||
this.GroupNumValue = ''
|
||||
this.dialogFormVisible = true
|
||||
@@ -254,7 +303,6 @@ export default {
|
||||
this.locateNumber = row.货位流水号
|
||||
this.materialNumber = row.物料流水号
|
||||
this.partnumber = row.货位存量
|
||||
this.searchoutRecord()
|
||||
},
|
||||
// 重置表单
|
||||
callOff() {
|
||||
@@ -282,7 +330,7 @@ export default {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('零件出库成功')
|
||||
this.dialogFormVisible = false
|
||||
this.searchPurchasePartinfo()
|
||||
this.searchTable1()
|
||||
outRecord(this.contractNumber).then(response => {
|
||||
this.tableDataOut = response.data
|
||||
this.listLoading1 = false
|
||||
@@ -305,4 +353,10 @@ export default {
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="合计" align="center" min-width="100" prop="合计">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
|
||||
{{ (parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0)).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
|
||||
@@ -853,9 +853,9 @@ export default {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
return Number((prev + curr).toFixed(2))
|
||||
} else {
|
||||
return prev
|
||||
return Number((prev).toFixed(2))
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ' 元'
|
||||
@@ -1008,11 +1008,12 @@ export default {
|
||||
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[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[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('contractName').innerHTML = row.离线合同名称
|
||||
document.getElementById('supplier').innerHTML = row.供应商名称
|
||||
|
||||
Reference in New Issue
Block a user