This commit is contained in:
lixin
2018-12-29 19:30:12 +08:00
parent 2f1601c9f5
commit b33479864e
10 changed files with 150 additions and 30 deletions

View File

@@ -79,13 +79,13 @@
{{ scope.row.零件类型名称 }}
</template>
</el-table-column>
<el-table-column label="设置" min-width="100" align="center">
<el-table-column label="操作" min-width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
icon="el-icon-edit"
@click="AlterNumber(scope.row)">设置</el-button>
@click="AlterBasicNumber(scope.row)">设置</el-button>
</template>
</el-table-column>
</el-table>
@@ -565,12 +565,12 @@
</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">
<template slot-scope="scope">
{{ scope.row.类型名称 }}
{{ scope.row.外购件类型 }}
</template>
</el-table-column>
<el-table-column label="安全库存" align="center" min-width="80">
@@ -580,8 +580,8 @@
</el-table-column>
<el-table-column label="操作" align="center" width="200px">
<template slot-scope="scope" align="center">
<el-button size="mini" type="warning" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="AlterNumber(scope.row)" >设置</el-button>
<el-button size="mini" type="primary" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="changesafeAmount(scope.row)">修改</el-button>
<el-button size="mini" type="primary" icon="el-icon-edit" style="margin: 0 0 0 0px" @click="AlterNumber(scope.row)" >设置</el-button>
<el-button size="mini" type="danger" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="changesafeAmount(scope.row)">修改</el-button>
</template>
</el-table-column>
</el-table>
@@ -1259,7 +1259,12 @@ export default {
locate: '',
contractdetail: '',
craftnumber: '',
receive: ''
receive: '',
name: '', // 名称
mode: '', // 规格
picture: '', // 图号
type: '', // 型号
material: '' // 材料
}
},
computed: {
@@ -1314,7 +1319,6 @@ export default {
this.GroupNum = []
this.MachineValue = ''
this.GroupNumValue = ''
console.log(this.ProjectValue)
if (this.ProjectValue !== '') {
searchmachine(1, this.ProjectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
@@ -1559,7 +1563,7 @@ export default {
this.$refs[formName].resetFields()
},
tableRowClassName1({ row }) {
if (row.安全库存量 > row.库存数量) {
if (Number(row.安全库存量) > Number(row.货位存量)) {
return 'background: #ff6666'
} else {
return ''
@@ -1713,6 +1717,25 @@ export default {
})
},
AlterNumber(row) {
this.project = row.项目流水号
this.machinenumber = row.机床流水号
this.partnumber = row.组件流水号
this.oldnumber = row.货位存量
this.locate = row.货位流水号
this.contractdetail = row.采购合同明细流水号
this.craftnumber = row.工艺计划流水号
this.receive = row.收件信息id
this.materiallocate = row.物料与货位对照流水号
this.materialType = row.零件类型代码
this.dialogFormVisible = true
this.name = row.物料名称
this.mode = row.物料规格
this.picture = row.零件图号
this.type = row.物料型号
this.material = row.材料
},
AlterBasicNumber(row) {
console.log(row, 556677)
this.project = row.项目流水号
this.machinenumber = row.机床流水号
this.partnumber = row.组件流水号
@@ -1720,13 +1743,18 @@ export default {
this.locate = row.货位流水号
this.contractdetail = row.采购合同明细流水号
this.craftnumber = row.工艺计划流水号
this.receive = row.收件信息ID
this.receive = row.收件信息id
this.materiallocate = row.物料与货位对照流水号
this.materialType = row.零件类型代码
this.materialType = row.零件类型
this.dialogFormVisible = true
this.name = row.零件名称
this.mode = row.物料规格
this.picture = row.零件图号
this.type = row.物料型号
this.material = row.材料
},
submitChannge() {
CheckAlter(this.receive, this.project, this.machinenumber, this.partnumber, this.oldnumber, this.form2.AlterReason, this.form2.Number, this.id, this.locate, this.contractdetail, this.craftnumber, this.materialType, this.materiallocate).then(response => {
CheckAlter(this.receive, this.project, this.machinenumber, this.partnumber, this.oldnumber, this.form2.AlterReason, this.form2.Number, this.id, this.locate, this.contractdetail, this.craftnumber, this.materialType, this.materiallocate, this.name, this.mode, this.picture, this.type, this.material).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改成功')
this.dialogFormVisible = false