Commit 85444f35 authored by xioln's avatar xioln

供外出库

parent 855b3b0c
...@@ -30,6 +30,10 @@ export default { ...@@ -30,6 +30,10 @@ export default {
type: Object, type: Object,
default: () => {} default: () => {}
}, },
middleForm: {
type: Object,
default: () => {}
},
value: { value: {
type: [Number, String, Object], type: [Number, String, Object],
default: () => '' default: () => ''
...@@ -43,16 +47,17 @@ export default { ...@@ -43,16 +47,17 @@ export default {
}, },
computed: {}, computed: {},
watch: { watch: {
form: { 'form.sorties': {
immediate: true, immediate: true,
deep: true, deep: true,
handler(val) { handler(val) {
if (val.aircraftType && val.sorties) { console.log('val', val)
if (val) {
const params = { const params = {
searchItems: { searchItems: {
items: [ items: [
{ 'fieldName': 'aircraftTypeId', operator: 'EQ', value: val.aircraftType }, { 'fieldName': 'aircraftTypeId', operator: 'EQ', value: this.form.aircraftType.split('+')[0] },
{ 'fieldName': 'aircraftSortiesId', operator: 'EQ', value: val.sorties } { 'fieldName': 'aircraftSortiesId', operator: 'EQ', value: val.split('+')[0] }
], ],
operator: 'AND' operator: 'AND'
} }
...@@ -70,7 +75,6 @@ export default { ...@@ -70,7 +75,6 @@ export default {
} }
}, },
created() { created() {
// 初始化数据
}, },
methods: { methods: {
changeVal() { changeVal() {
......
...@@ -132,8 +132,12 @@ export default { ...@@ -132,8 +132,12 @@ export default {
this.dialogVisible = false this.dialogVisible = false
}, },
occupy() { occupy() {
const form = { ...this.form }
form.aircraftType = form.aircraftType.split('+')[1]
form.sorties = form.sorties.split('+')[1]
const param = { const param = {
...this.form, ...form,
inStorageRequestItems: this.tableData, inStorageRequestItems: this.tableData,
subTypeName: 'OutStorageOut', subTypeName: 'OutStorageOut',
operator: 'ADD' operator: 'ADD'
......
...@@ -30,6 +30,10 @@ export default { ...@@ -30,6 +30,10 @@ export default {
type: Object, type: Object,
default: () => {} default: () => {}
}, },
middleForm: {
type: Object,
default: () => {}
},
value: { value: {
type: [Number, String, Object], type: [Number, String, Object],
default: () => '' default: () => ''
...@@ -43,21 +47,21 @@ export default { ...@@ -43,21 +47,21 @@ export default {
}, },
computed: {}, computed: {},
watch: { watch: {
form: { 'form.aircraftType': {
immediate: true, immediate: true,
deep: true, deep: true,
handler(val) { handler(val) {
if (val.aircraftType) { if (val) {
const params = { const params = {
searchItems: { searchItems: {
items: [{ 'fieldName': 'aircraftTypeId', operator: 'EQ', value: val.aircraftType }], items: [{ 'fieldName': 'aircraftTypeId', operator: 'EQ', value: val.split('+')[0] }],
operator: 'AND' operator: 'AND'
} }
} }
this.$api.searchApi('AircraftSorties', params).then(res => { this.$api.searchApi('AircraftSorties', params).then(res => {
this.options = res.items.content.map(row => { this.options = res.items.content.map(row => {
return { return {
value: row.id, value: row.id + '+' + row.defName,
label: row.defName label: row.defName
} }
}) })
......
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