更新
This commit is contained in:
@@ -112,7 +112,6 @@
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading1"
|
||||
:data="tableDataPurchase"
|
||||
border
|
||||
style="width: 100%;"
|
||||
@@ -154,12 +153,17 @@
|
||||
</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="80">
|
||||
<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>
|
||||
@@ -177,7 +181,6 @@
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading2"
|
||||
:data="tableData1"
|
||||
border
|
||||
style="width: 100%;"
|
||||
@@ -543,15 +546,16 @@ export default {
|
||||
}
|
||||
})
|
||||
searchPurchaseTable(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
|
||||
console.log(response)
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].到货时间 !== '' || response.data.rows[i].到货时间 !== null) {
|
||||
response.data.rows[i].到货时间 = response.data.rows[i].到货时间.split(' ', 2)[0]
|
||||
}
|
||||
}
|
||||
this.tableDataPurchase = response.data.rows
|
||||
this.listLoading1 = false
|
||||
this.total4 = parseInt(response.data.total)
|
||||
})
|
||||
searchTable1(this.check, this.entryNameValue, this.check1, this.machine, this.check2, this.groupNum, this.check3, this.year, this.check4, this.month, this.check5, this.time, this.pageCurrent, this.pageSize).then(response => {
|
||||
console.log(response)
|
||||
this.tableData1 = response.data.rows
|
||||
this.listLoading2 = false
|
||||
this.total5 = parseInt(response.data.total)
|
||||
})
|
||||
} else {
|
||||
@@ -946,22 +950,6 @@ export default {
|
||||
sums[index] = '入库数量'
|
||||
} else if (index === 7) {
|
||||
sums[index] = this.totalNum + ' 件'
|
||||
// const values = data.map(item => item['入库时间'])
|
||||
// console.log(values)
|
||||
// if (!values.every(value => value !== '')) {
|
||||
// sums[index] = values.reduce((prev, curr) => {
|
||||
// const value = curr
|
||||
// console.log(value)
|
||||
// if (value !== '') {
|
||||
// return this.totalNum1 + 1
|
||||
// } else {
|
||||
// return this.totalNum1
|
||||
// }
|
||||
// }, '')
|
||||
// sums[index] += '件'
|
||||
// } else {
|
||||
// sums[index] = 'N/A'
|
||||
// }
|
||||
}
|
||||
})
|
||||
return sums
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
@current-change="handleCurrentChange"/>
|
||||
<!--<el-checkbox v-model="checked_baitu" style="margin-top:0px">是否白图</el-checkbox>-->
|
||||
<!--<el-checkbox v-model="checked_gaonandu">是否高难度</el-checkbox>-->
|
||||
<el-button type="primary" size="small" style="float:right;margin-top:10px" @click="production">投产</el-button>
|
||||
<el-button :loading="listLoading3" type="primary" size="small" style="float:right;margin-top:10px" @click="production">投产</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -350,6 +350,7 @@ export default {
|
||||
jieguo: 0,
|
||||
value: '',
|
||||
title: null,
|
||||
listLoading3: false,
|
||||
temp: 0,
|
||||
ComponentflowNumber: '', // 组件零件基本件流水号
|
||||
TypeflowNumber: '',
|
||||
@@ -787,6 +788,7 @@ export default {
|
||||
},
|
||||
// 投产
|
||||
production() {
|
||||
this.listLoading3 = true
|
||||
this.result = 0
|
||||
if (this.time_machiningFinish === '' || this.time_machiningFinish === null) {
|
||||
this.$message.error('请输入加工结束时间')
|
||||
@@ -836,7 +838,9 @@ export default {
|
||||
this.checked_baitu = false
|
||||
this.checked_gaonandu = false
|
||||
this.tableData1 = []
|
||||
this.listLoading3 = false
|
||||
} else if (response.data[0].result === '0') {
|
||||
this.listLoading3 = false
|
||||
this.$message.error('投产失败')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1087,7 +1087,6 @@ export default {
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
console.log(val)
|
||||
if (this.PartType === '基本件') {
|
||||
this.MaterialNum = []
|
||||
this.BasicPartsNumber = []
|
||||
@@ -1144,7 +1143,6 @@ export default {
|
||||
},
|
||||
purchaseRequisition() {
|
||||
if (this.RequisitionList !== '') {
|
||||
console.log(this.time)
|
||||
if (this.time !== '' && this.time !== null) {
|
||||
if (this.BasicPartsNumber.length !== 0 || this.StandardPartsAndOutsourcing.length !== 0) {
|
||||
this.result = 0
|
||||
@@ -1152,9 +1150,7 @@ export default {
|
||||
for (let i = 0; i < this.BasicPartsNumber.length; i++) {
|
||||
purchaseRequisition(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.BasicPartsNumber[i], this.MaterialName[i], this.PartToolNumber[i], this.Material[i], this.NumberOfParts[i], 3, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
console.log(this.result)
|
||||
if (this.result === this.BasicPartsNumber.length) {
|
||||
console.log(1111)
|
||||
this.$message.success('请购成功')
|
||||
searchPart(this.groupFloatValue).then(response => {
|
||||
this.tableData1 = response.data
|
||||
|
||||
Reference in New Issue
Block a user