@@ -597,6 +598,7 @@ export default {
receiptVisible: false,
machineTitle: '',
machineVisible: false,
+ GroupDataVisible: false,
spareVisible: false,
spareTitle: '',
spareForm: {
@@ -621,6 +623,18 @@ export default {
联系人: '',
联系方式: ''
},
+ GroupDataForm: {
+ 部件编号: '',
+ 代号: '',
+ 名称: '',
+ 规格: '',
+ 备注: '',
+ 数量: ''
+ },
+ GroupDataRule: {
+ 名称: [{ required: true, message: '请输入名称', trigger: 'blur' }],
+ 数量: [{ required: true, message: '请输入数量', trigger: 'blur' }]
+ },
receiptRules: {
装箱单号: [{ required: true, message: '请输入装箱单号', trigger: 'blur' }],
名称: [{ required: true, message: '请输入名称', trigger: 'blur' }],
@@ -678,6 +692,8 @@ export default {
this.receiptData = []
this.spareData = []
this.fileData = []
+ this.receiptNum = 0
+ this.receiptName = ''
if (val) {
this.getMachineSelect(val)
}
@@ -686,13 +702,12 @@ export default {
receiptNum(val) {
if (val !== 0) {
this.getMachineData()
- this.getFileData()
- this.getSpareData()
}
},
- machine(val) {
+ machineTableData(val) {
if (val.length > 0) {
- this.machineValue = val[0].value
+ this.getFileData()
+ this.getSpareData()
}
}
},
@@ -712,12 +727,12 @@ export default {
const response = await getReciptData(this.projectValue)
const data = response.data
if (data.length > 0) {
- this.receiptNum = data[0].装箱单编号
- this.receiptName = data[0].装箱单号
+ // this.receiptNum = data[0].装箱单编号
+ // this.receiptName = data[0].装箱单号
this.receiptData = data
} else {
- this.receiptNum = 0
- this.receiptName = ''
+ // this.receiptNum = 0
+ // this.receiptName = ''
}
},
addReceipt() {
@@ -733,6 +748,8 @@ export default {
submitAddReceipt() {
this.addTable(insertReciptData, [this.receiptForm.装箱单号, this.receiptForm.发货节点, this.receiptForm.名称, this.receiptForm.收货单位, this.receiptForm.联系方式, this.receiptForm.联系人, this.projectValue], 'receiptForm', function() {
this.receiptVisible = false
+ this.receiptNum = 0
+ this.receiptName = ''
this.getReceipt()
})
},
@@ -745,6 +762,8 @@ export default {
submitEditReceipt() {
this.editTable(updateReciptData, [this.receiptForm.装箱单号, this.receiptForm.发货节点, this.receiptForm.名称, this.receiptForm.收货单位, this.receiptForm.联系方式, this.receiptForm.联系人, this.receiptNum], 'receiptForm', function() {
this.receiptVisible = false
+ this.receiptNum = 0
+ this.receiptName = ''
this.getReceipt()
})
},
@@ -761,11 +780,24 @@ export default {
this.fileVisible = false
this.spareVisible = false
},
+ searchTable(row) {
+ console.log(row)
+ this.receiptNum = row.装箱单编号
+ this.receiptName = row.装箱单号
+ },
async getMachineData() {
this.machineTableData = []
const response = await getMachineData(this.receiptNum)
const data = response.data
- console.log(data, 1111)
+ console.log(data, 111)
+ if (data.length === 0) {
+ this.machineValue = ''
+ this.spareData = []
+ this.fileData = []
+ } else {
+ this.machineValue = data[0].机床号
+ }
+ console.log(this.machineValue, 222)
this.groupData = []
for (let i = 0; i < data.length; i++) {
const resp = await getGroupData(data[i].机床号)
@@ -782,7 +814,6 @@ export default {
数量: data[i].数量,
备注: data[i].备注
})
- console.log(this.groupData, 11112)
}
},
addMachine() {
@@ -824,6 +855,24 @@ export default {
this.getMachineData()
})
},
+ // editGroupData(row) {
+ // console.log(row)
+ // this.editForm(row, 'GroupDataForm', function() {
+ // this.GroupDataVisible = true
+ // })
+ // },
+ // async submitEditGroupData() {
+ // console.log(this.GroupDataForm.部件编号, this.GroupDataForm.代号, this.GroupDataForm.名称, this.GroupDataForm.规格, this.GroupDataForm.数量, this.GroupDataForm.备注)
+ // editGroupData(this.GroupDataForm.部件编号, this.GroupDataForm.代号, this.GroupDataForm.名称, this.GroupDataForm.规格, this.GroupDataForm.数量, this.GroupDataForm.备注).then(response => {
+ // if (response.data[0].result === '1') {
+ // this.$message.success('编辑成功')
+ // this.GroupDataVisible = false
+ // this.getMachineData()
+ // } else {
+ // this.$message.error('编辑失败')
+ // }
+ // })
+ // },
async getFileData() {
const response = await getFileData(this.receiptNum)
this.fileData = response.data
@@ -858,6 +907,7 @@ export default {
})
},
async getSpareData() {
+ console.log(this.machineValue, 333)
const response = await getSpareData(this.projectValue, this.machineValue)
console.log(response)
for (let i = 0; i < response.data.length; i++) {
@@ -910,7 +960,7 @@ export default {
},
exportTable() {
const htmlNode = $('#cjn').html()
- const body = $('body').attr('style', 'padding: 20px;margin: 0 auto;display: block;width: 800px;background: #fff;')
+ const body = $('body').attr('style', 'padding: 20px;margin: 0 auto;display: block;width: 950px;background: #fff;')
body.children().hide()
const printNode = $(htmlNode)
body.append(printNode)
diff --git a/src/views/TechnologyCenter/ImportChangeParts/specificationData1.vue b/src/views/TechnologyCenter/ImportChangeParts/specificationData1.vue
index ee7d47f6..6712cb25 100644
--- a/src/views/TechnologyCenter/ImportChangeParts/specificationData1.vue
+++ b/src/views/TechnologyCenter/ImportChangeParts/specificationData1.vue
@@ -18,7 +18,7 @@
:label="item.label"
:value="item.value"/>
- 传递
+ 传递
diff --git a/src/views/TechnologyCenter/ImportParts/specificationData.vue b/src/views/TechnologyCenter/ImportParts/specificationData.vue
index 42fd6277..d5204623 100644
--- a/src/views/TechnologyCenter/ImportParts/specificationData.vue
+++ b/src/views/TechnologyCenter/ImportParts/specificationData.vue
@@ -18,7 +18,7 @@
:label="item.label"
:value="item.value"/>
- 传递
+ 传递
一键删除
@@ -92,20 +92,20 @@
{{ scope.row.分类码 }}
-
-
- 编辑
- 删除
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
if (response.data[0].result === '1') {
this.tableData = []
+ this.tableData10 = []
this.$message.success('删除成功')
} else {
this.$message.error('删除失败')
@@ -575,6 +577,7 @@ export default {
this.$message.success(`传递成功`)
this.tableDataAll = []
this.tableData = []
+ this.tableData10 = []
} else {
this.$message.error(`${this.err}个零件传递失败`)
}