This commit is contained in:
zhangdingyu
2019-09-23 15:11:56 +08:00
parent 61276a94e0
commit d3555f3db7
4 changed files with 47 additions and 55 deletions

View File

@@ -18,7 +18,9 @@
:label="item.label"
:value="item.value"/>
</el-select>
<el-button :loading="listLoading" :disabled="disabled" type="primary" plain icon="el-icon-d-caret" size="small" style="margin-left: 10px" @click="transferData">传递</el-button>
<el-tooltip content="asdsdr" placement="top" effect="light">
<el-button :loading="listLoading" :disabled="disabled" type="primary" plain icon="el-icon-d-caret" size="small" style="margin-left: 10px" @click="transferData">传递</el-button>
</el-tooltip>
<el-button type="danger" icon="el-icon-delete" plain size="small" @click="allDelete">一键删除</el-button>
<el-row style="margin-top: 5px;margin-bottom: 3px">
<span>机床名称</span>
@@ -403,7 +405,6 @@ export default {
const projectCheck = this.projectName ? 1 : 0
const machineCheck = this.machineValue ? 1 : 0
const groupCheck = this.groupValue ? 1 : 0
console.log(this.groupName, 123)
if (this.groupName.indexOf('MX') > -1) { // 当分组为基本件时,查询基本件规范和不规范数据,否则查询外购件或标准件规范和不规范数据
// 分别查出规范和不规范数据,将规范数据放前面在一个总数组中
this.type = 1
@@ -418,7 +419,6 @@ export default {
} else {
this.type = 2
this.unSpecification = await unSpecificationQueryWB(projectCheck, this.projectName, machineCheck, this.machineValue, groupCheck, this.groupValue)
console.log(this.unSpecification)
this.unSpecification.data.forEach(item => {
this.tableDataAll.push(item)
})
@@ -462,9 +462,7 @@ export default {
})
},
getMachineNames() {
console.log(this.machineValue, 2222)
getMachineNames(this.machineValue).then(response => {
console.log(response.data, 3333)
this.machineName = response.data[0].机床名称
this.machineNum = response.data[0].机床数量
})
@@ -518,10 +516,8 @@ export default {
}
},
searchMaterial1(row) {
console.log(row)
searchMaterial1(row.图号或者型号, row.名称, row.规格).then(response => {
this.tableData10 = response.data
console.log(response.data)
})
},
getMaterialWB() {
@@ -553,11 +549,9 @@ export default {
this.err = 0
if (this.groupValue) {
this.listLoading = true
console.log(this.groupName, 123)
if (this.groupName.indexOf('MX') > -1) {
for (let i = 0; i < this.tableDataAll.length; i++) {
const data = this.tableDataAll[i]
console.log(data)
if (this.groupValue.indexOf('00') > -1) {
const index = data.图号或者型号.lastIndexOf('-')
data.图号或者型号 = data.图号或者型号.substring(index + 1)
@@ -570,7 +564,6 @@ export default {
}
}
} else {
console.log(222222222)
const total = parseInt(data.备件数量) + parseFloat(data.装机数量) * parseInt(data.部件数量)
const resp = await transferMX(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, data.规格, 1, data.是否传递, data.序号, data.id, data.备件数量)
await sleep(10)
@@ -598,7 +591,6 @@ export default {
}
}
if (this.err === 0) { // 传递成功后,清除该分组。当所有组都传递完成后,该项目下的机床和分组消失
console.log(this.groupsNames.indexOf(this.groupValue), 22222)
// const index = this.groupsNames.indexOf(this.groupValue)
// this.groupsNames.splice(index, 1)
if (this.groupsNames.length === 0) {