This commit is contained in:
liushuai
2020-01-17 18:18:15 +08:00
parent 4fb54f4d3e
commit ab32ccfb84
11 changed files with 242 additions and 149 deletions

View File

@@ -341,6 +341,7 @@ export default {
return
} else {
if (this.worksheet[j].M2.v.substring(0, 1) !== '9') {
console.log(this.worksheet[j].P1, 123344)
this.worksheet[j].G1 ? establishment = this.worksheet[j].G1.v : establishment = ''
this.worksheet[j].I1 ? proofread = this.worksheet[j].I1.v : proofread = ''
this.worksheet[j].L1 ? review = this.worksheet[j].L1.v : review = ''

View File

@@ -144,11 +144,6 @@
highlight-current-row
border
stripe>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="物料名称" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
@@ -169,6 +164,15 @@
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="handle(scope.row)">替换
</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
@@ -279,7 +283,7 @@
<script>
import { sleep } from '../../../utils/tool'
import { unSpecificationQuery, unSpecificationQueryWB, specificationQueryWB, specificationQuery, deleteBasicParts, deleteBWParts, getMaterial, getMaterialWB, searchMaterialWB, updateRow, updateRowWB, transferMX, transferWG, allDelete, searchMaterial1, getMachineNames } from '../../../api/TechnologyCenter/ImportParts'
import { unSpecificationQuery, unSpecificationQueryWB, specificationQueryWB, specificationQuery, deleteBasicParts, deleteBWParts, getMaterial, getMaterialWB, searchMaterialWB, updateRow, updateRowWB, transferMX, transferWG, allDelete, searchMaterial1, getMachineNames, updateNum } from '../../../api/TechnologyCenter/ImportParts'
export default {
name: 'SpecificationData',
props: {
@@ -316,6 +320,7 @@ export default {
pageSize: 10,
total: 0,
title: '',
NumId: '',
materials: [],
dialogFormVisible: false,
type: 0, // 零件类型 暂定1为基本件2为外购件和标准件
@@ -346,7 +351,8 @@ export default {
pageCurrentMaterial: 1,
pageSizeMaterial: 10,
totalMaterial: 0,
loadingMaterial: false
loadingMaterial: false,
multipleSelection: []
}
},
computed: {
@@ -403,6 +409,28 @@ export default {
return 'rgb196'
}
},
handle(row) {
this.$confirm('是否替换?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
updateNum(row.物料流水号, this.NumId).then(response => {
if (response.data[0].result === '1') {
this.$message.success('替换成功')
this.tableData10 = []
this.fetchData()
} else {
this.$message.error('替换失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消替换'
})
})
},
async fetchData() {
this.pageCurrent = 1
this.tableData10 = []
@@ -519,6 +547,7 @@ export default {
}
},
searchMaterial1(row) {
this.NumId = row.id
searchMaterial1(row.图号或者型号, row.名称, row.规格).then(response => {
this.tableData10 = response.data
})