Commit cafd5a3a authored by jingnan's avatar jingnan 👀

供外出库架次接口修改

parent 829ac4ec
......@@ -19,7 +19,7 @@
<script>
import config from './config'
import _get from 'lodash.get'
import { get } from '@/utils/http'
export default {
componentName: '供外出库架次',
name: 'GetOffrtSortiesSelect', // name写在组件的最前方,自定义组件为必填
......@@ -64,7 +64,11 @@ export default {
const _val = _get(this.form, this.itemObj.linkageAttr)
if (_val !== this.linkageValue) {
this.linkageValue = _val
this.getData(_val)
if (this.$route.query && this.$route.query.title === '供外出库' || this.form.subTypeName === 'OutStorageOut') {
this.getSortiesHasOrpid(_val)
} else {
this.getSorties(_val)
}
}
}
}
......@@ -92,7 +96,7 @@ export default {
// 初始化数据
},
methods: {
getData(val) {
getSorties(val) {
if (!val || !val.includes('+')) return // 编辑界面时报错修改
const params = {
searchItems: {
......@@ -109,6 +113,17 @@ export default {
})
})
},
getSortiesHasOrpid(val) {
if (!val || !val.includes('+')) return
get(`/AircraftSorties/getSorties?aircraftTypeId=${val.split('+')[0]}`).then(res => {
this.options = res.items.map(row => {
return {
value: row.id + '+' + row.defName,
label: row.defName
}
})
})
},
changeVal() {
this.$emit('input', this.selVal)
}
......
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