This commit is contained in:
liushuai
2020-03-27 17:21:28 +08:00
parent d968be25f2
commit 9078070157
10 changed files with 288 additions and 115 deletions

View File

@@ -392,6 +392,11 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="PartCallbackInformation"/>
<el-button
size="small"
type="success"
plain
@click="submit()">采购部采购</el-button>
<!-- :row-class-name="tableRowClassName"-->
<el-table
:data="tableData9"
@@ -399,7 +404,9 @@
style="width: 97%;max-height: 300px"
height="400"
highlight-current-row
border>
border
@selection-change="handleSelectionChange10">
<el-table-column align="center" type="selection" width="42px"/>
<el-table-column align="center" label="零件图号">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
@@ -415,9 +422,9 @@
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件数量" width="80">
<el-table-column align="center" label="零件数量" width="120">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
<el-input-number v-model="scope.row.零件数量" :min="0" size="mini" style="width: 95px"/>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称">
@@ -440,20 +447,20 @@
{{ scope.row.退回时间 }}
</template>
</el-table-column>
<!-- <el-table-column property="date" label="操作" width="200" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="success"-->
<!-- plain-->
<!-- @click="submit(scope.row)">确认</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="danger"-->
<!-- plain-->
<!-- @click="Delete(scope.row)">删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!--<el-table-column property="date" label="操作" width="200" align="center">-->
<!--<template slot-scope="scope">-->
<!--&lt;!&ndash;<el-button&ndash;&gt;-->
<!--&lt;!&ndash;size="mini"&ndash;&gt;-->
<!--&lt;!&ndash;type="success"&ndash;&gt;-->
<!--&lt;!&ndash;plain&ndash;&gt;-->
<!--&lt;!&ndash;@click="submit(scope.row)">确认</el-button>&ndash;&gt;-->
<!--&lt;!&ndash;<el-button&ndash;&gt;-->
<!--&lt;!&ndash;size="mini"&ndash;&gt;-->
<!--&lt;!&ndash;type="danger"&ndash;&gt;-->
<!--&lt;!&ndash;plain&ndash;&gt;-->
<!--&lt;!&ndash;@click="Delete(scope.row)">删除</el-button>&ndash;&gt;-->
<!--</template>-->
<!--</el-table-column>-->
</el-table>
</el-dialog>
<el-dialog
@@ -475,6 +482,11 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="PartCallbackInformation1"/>
<el-button
size="small"
type="success"
plain
@click="submit1()">采购部采购</el-button>
<!-- :row-class-name="tableRowClassName"-->
<el-table
:data="tableData10"
@@ -482,7 +494,9 @@
style="width: 97%;max-height: 300px"
height="400"
highlight-current-row
border>
border
@selection-change="handleSelectionChange11">
<el-table-column align="center" type="selection" width="42px"/>
<el-table-column align="center" label="物料名称">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
@@ -498,9 +512,9 @@
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件数量" width="80">
<el-table-column align="center" label="零件数量" width="120">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
<el-input-number v-model="scope.row.零件数量" :min="0" size="mini" style="width: 95px"/>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称">
@@ -523,27 +537,27 @@
{{ scope.row.退回时间 }}
</template>
</el-table-column>
<!-- <el-table-column property="date" label="操作" width="200" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="success"-->
<!-- plain-->
<!-- @click="submit1(scope.row)">确认</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="danger"-->
<!-- plain-->
<!-- @click="Delete1(scope.row)">删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!--<el-table-column property="date" label="操作" width="200" align="center">-->
<!--<template slot-scope="scope">-->
<!--<el-button-->
<!--size="mini"-->
<!--type="success"-->
<!--plain-->
<!--@click="submit1(scope.row)">确认</el-button>-->
<!--<el-button-->
<!--size="mini"-->
<!--type="danger"-->
<!--plain-->
<!--@click="Delete1(scope.row)">删除</el-button>-->
<!--</template>-->
<!--</el-table-column>-->
</el-table>
</el-dialog>
</div>
</template>
<script>
import { DeliveryTimeSelect, initProject, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed1, purchaseRequisition, purchaseRequisition1, purchaseRequisition2, MoveOut, MoveOut1, PurchasingDepartment, Production, PartCallbackInformation, PartCallbackInformation1, submit, submit1, Delete, Delete1, editStock, editNum, OutPart } from '@/api/ManufacturingCenter/PartAssignment'
import { DeliveryTimeSelect, initProject, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed1, purchaseRequisition, purchaseRequisition1, purchaseRequisition2, MoveOut, MoveOut1, PurchasingDepartment, Production, PartCallbackInformation, PartCallbackInformation1, Delete, Delete1, editStock, editNum, OutPart, PurchasingDepartmentBack, purchaseRequisition2Back } from '@/api/ManufacturingCenter/PartAssignment'
import { mapGetters } from 'vuex'
import Cookie from 'js-cookie'
export default {
@@ -569,6 +583,9 @@ export default {
stockNum: '',
MaterialNumber: '',
PurchaseOrder: '',
project: [],
machine: [],
group: [],
PartType: '基本件',
tableData: [],
tableData1: [],
@@ -613,6 +630,8 @@ export default {
MaterialModel: [],
NumberOfParts: [],
multipleSelection: [],
multipleSelection10: [],
multipleSelection11: [],
ReMarks: [],
projectName: '',
MachineToolNumber: '',
@@ -742,47 +761,98 @@ export default {
this.tableData10 = response.data
})
},
submit(row) {
submit(row.基本件流水号).then(response => {
this.value = 0
if (response.data[0].result === '1') {
this.$message.success('确认成功')
PartCallbackInformation().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === 0) {
this.value += 1
}
}
this.tableData9 = response.data
})
} else {
this.$message.error('确认失败')
submit() {
if (this.multipleSelection10.length > 0) {
this.MaterialNum = []
this.BasicPartsNumber = []
this.MaterialName = []
this.PartToolNumber = []
this.Material = []
this.NumberOfParts = []
this.project = []
this.machine = []
this.group = []
for (let i = 0; i < this.multipleSelection10.length; i++) {
this.MaterialNum[i] = this.multipleSelection10[i].物料流水号
this.BasicPartsNumber[i] = this.multipleSelection10[i].基本件流水号
this.MaterialName[i] = this.multipleSelection10[i].零件名称
this.PartToolNumber[i] = this.multipleSelection10[i].零件图号
this.Material[i] = this.multipleSelection10[i].材料
this.NumberOfParts[i] = this.multipleSelection10[i].零件数量
this.ReMarks[i] = this.multipleSelection10[i].零件备注
this.project[i] = this.multipleSelection10[i].项目流水号
this.machine[i] = this.multipleSelection10[i].机床流水号
this.group[i] = this.multipleSelection10[i].组件流水号
}
})
purchaseRequisition2Back(this.project, this.machine, this.group, this.BasicPartsNumber, this.NumberOfParts, this.time).then(response => {
if (response.data[0].result !== '0') {
console.log(response.data[0].result)
this.$message.success('请购成功')
PartCallbackInformation().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === 0) {
this.value += 1
}
}
this.tableData9 = response.data
})
} else {
this.$message.error('请购失败')
}
})
} else {
this.$message.warning('请勾选')
}
},
submit1(row) {
submit1(row.标准件和外购件流水号).then(response => {
this.value1 = 0
if (response.data[0].result === '1') {
this.$message.success('确认成功')
PartCallbackInformation1().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === 0) {
this.value1 += 1
}
}
this.tableData10 = response.data
})
} else {
this.$message.error('确认失败')
submit1() {
if (this.multipleSelection11.length > 0) {
this.MaterialNum = []
this.MaterialCode = []
this.StandardPartsAndOutsourcing = []
this.MaterialName = []
this.MaterialSpecification = []
this.MaterialModel = []
this.NumberOfParts = []
this.project = []
this.machine = []
this.group = []
for (let i = 0; i < this.multipleSelection11.length; i++) {
this.StandardPartsAndOutsourcing[i] = this.multipleSelection11[i].标准件和外购件流水号
this.MaterialNum[i] = this.multipleSelection11[i].物料流水号
this.MaterialCode[i] = this.multipleSelection11[i].物料代码
this.MaterialName[i] = this.multipleSelection11[i].物料名称
this.MaterialSpecification[i] = this.multipleSelection11[i].物料规格
this.MaterialModel[i] = this.multipleSelection11[i].物料型号
this.NumberOfParts[i] = this.multipleSelection11[i].零件数量
this.ReMarks[i] = this.multipleSelection11[i].备注
this.project[i] = this.multipleSelection11[i].项目流水号
this.machine[i] = this.multipleSelection11[i].机床流水号
this.group[i] = this.multipleSelection11[i].组件流水号
}
})
PurchasingDepartmentBack(this.group, this.StandardPartsAndOutsourcing, this.MaterialNum, this.NumberOfParts, this.project, this.machine).then(response => {
if (response.data[0].result !== '0') {
this.$message.success('请购成功')
PartCallbackInformation1().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === 0) {
this.value1 += 1
}
}
this.tableData10 = response.data
})
} else {
this.$message.error('请购失败')
}
})
} else {
this.$message.warning('请勾选')
}
},
Delete(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
@@ -1167,6 +1237,12 @@ export default {
handleSelectionChange(val) {
this.multipleSelection = val
},
handleSelectionChange10(val) {
this.multipleSelection10 = val
},
handleSelectionChange11(val) {
this.multipleSelection11 = val
},
purchaseRequisition() {
if (this.RequisitionList !== '') {
if (this.time !== '' && this.time !== null) {