Commit bcc0d688 authored by xioln's avatar xioln

物料对照表修改

parent 5318c6f2
...@@ -24,6 +24,7 @@ export default { ...@@ -24,6 +24,7 @@ export default {
components: {}, components: {},
data() { data() {
return { return {
operator: 'ADD',
sourceForm: {}, sourceForm: {},
sourceFormData: [ sourceFormData: [
{ {
...@@ -155,7 +156,8 @@ export default { ...@@ -155,7 +156,8 @@ export default {
} }
], ],
optionsA: [], optionsA: [],
optionsB: [] optionsB: [],
id: ''
} }
}, },
computed: {}, computed: {},
...@@ -166,8 +168,10 @@ export default { ...@@ -166,8 +168,10 @@ export default {
}, },
methods: { methods: {
editData(form) { editData(form) {
this.operator = 'MODIFY'
this.sourceForm = form.source this.sourceForm = form.source
this.targetForm = form.target this.targetForm = form.target
this.id = form.id
}, },
// 设置物料A类型下拉 // 设置物料A类型下拉
resetMaterialA(query) { resetMaterialA(query) {
...@@ -290,13 +294,14 @@ export default { ...@@ -290,13 +294,14 @@ export default {
}, },
submitEvent() { submitEvent() {
const form = { const form = {
operator: 'ADD', operator: this.operator,
source: this.sourceForm, source: this.sourceForm,
target: this.targetForm target: this.targetForm
} }
if (this.basicData) { if (this.operator === 'MODIFY') {
form.id = this.basicData.id form.id = this.id
form.operator = 'MODIFY' form.source.operator = 'MODIFY'
form.target.operator = 'MODIFY'
} }
this.$api.recursion('MaterialReferenceLink', form).then(res => { this.$api.recursion('MaterialReferenceLink', form).then(res => {
this.cancelEvent() this.cancelEvent()
......
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