Commit 416303e4 authored by hubaoshan's avatar hubaoshan

1

parent a2f38d94
...@@ -316,7 +316,8 @@ export default { ...@@ -316,7 +316,8 @@ export default {
rules: { rules: {
}, },
typeList: [], typeList: [],
typelistTemp: [] typelistTemp: [],
temp: []
} }
}, },
computed: { computed: {
...@@ -438,19 +439,15 @@ export default { ...@@ -438,19 +439,15 @@ export default {
submitForm: function() { submitForm: function() {
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
if (valid) { if (valid) {
if (this.form.businessId !== undefined) { const data = {
updateIncomeWmsBox(this.form).then(response => { labelId: this.form.businessId
this.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addIncomeWmsBox(this.form).then(response => {
this.msgSuccess('新增成功')
this.open = false
this.getList()
})
} }
console.log(this.form)
updateIncomeWmsBox(data).then(response => {
this.msgSuccess('修改成功')
this.open = false
this.getList()
})
} }
}) })
}, },
...@@ -477,11 +474,19 @@ export default { ...@@ -477,11 +474,19 @@ export default {
listIncomeWmsLabel().then(response => { listIncomeWmsLabel().then(response => {
this.typelistTemp = response.rows this.typelistTemp = response.rows
this.typeList = [] this.typeList = []
console.log(row.pn)
this.typelistTemp.forEach(item => { this.typelistTemp.forEach(item => {
const type = item.mac + ' ' + item.location if (item.pn === row.pn) {
this.typeList.push(type) this.form = item
const type = item.mac + ' ' + item.location
const abc = {
businessId: item.businessId,
location: item.location
}
this.typeList.push(type)
this.temp.push(abc)
}
}) })
console.log('typeList' + this.typeList)
this.open = true this.open = true
this.title = '修改库存管理' this.title = '修改库存管理'
}) })
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment