Commit bcc0d688 authored by xioln's avatar xioln

物料对照表修改

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