Commit bc4abd3a authored by jingnan's avatar jingnan 👀

材料领用记录增加增删改操作

parent ac77f9a0
...@@ -38,6 +38,10 @@ export default { ...@@ -38,6 +38,10 @@ export default {
disabled: { disabled: {
type: Boolean, type: Boolean,
default: false default: false
},
item: {
type: Object,
default: () => {}
} }
}, },
data() { data() {
...@@ -52,7 +56,9 @@ export default { ...@@ -52,7 +56,9 @@ export default {
immediate: true, immediate: true,
deep: true, deep: true,
handler(val) { handler(val) {
this.$set(this.form, 'positionNumber', '') if (this.item.key !== 'position') {
this.$set(this.form, 'positionNumber', '')
}
val && this.getOptions() val && this.getOptions()
} }
} }
...@@ -73,7 +79,7 @@ export default { ...@@ -73,7 +79,7 @@ export default {
}, },
'openProps': [ 'openProps': [
{ {
'name': 'extPositionSorties', 'name': 'extPosition',
'openProps': [ 'openProps': [
{ {
'name': 'target' 'name': 'target'
...@@ -85,11 +91,11 @@ export default { ...@@ -85,11 +91,11 @@ export default {
this.options = [] this.options = []
this.loading = true this.loading = true
this.$api.searchApi('AircraftSorties', params).then(res => { this.$api.searchApi('AircraftSorties', params).then(res => {
if (res && res.items && res.items.content && res.items.content[0].extPositionSorties) { if (res && res.items && res.items.content && res.items.content[0].extPosition) {
this.options = res.items.content[0].extPositionSorties.map(v => (v.target && { this.options = res.items.content[0].extPosition.map(v => ({
key: v.target.id, key: v.id,
label: v.target.name, label: v.name,
value: v.target.serialNumber value: v.serialNumber
})) }))
} }
}).finally(() => { }).finally(() => {
......
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