Commit a51c8bc3 authored by xioln's avatar xioln

新增项目维护生成按钮

parent 7f6452a9
/**
* @Description: 新增项目维护生成按钮
* @author xioln
* @date 2023-09-12
* @FilePath: applications/dee-mes/src/privateComponents/components/GenerateCreateOrproductionButton/index.vue
*/
<template>
<div class="className">
<dee-as-com
ref="oRProduction"
:lay-config="{
typeName: 'ORProduction',
layKey: 'create_orproduction'
}"
:basic-data="basicData"
@on-createGenerate="createGenerate"
/>
</div>
</template>
<script>
import { post } from '@/utils/http'
export default {
componentName: '新增项目维护生成按钮',
name: 'GenerateCreateOrproductionButton',
components: {},
props: {
basicData: {
type: Object,
default: () => null
},
form: {
type: Object,
default: () => null
}
},
data() {
return {
}
},
computed: {},
created() {
// 初始化数据
},
methods: {
createGenerate(v) {
const form = this.$refs.oRProduction.$children[0].form
const params = {
operator: 'ADD',
'isValid': 'Y',
'subTypeName': 'ORProduction',
'oRProductionUpdateRecords': [],
'assemblyStartTime': form.assemblyTime[0],
'assemblyEndTime': form.assemblyTime[1],
'jobNo': form.jobNo,
'soritesTypeId': form.soritesType.type,
'aircraftTypeId': form.aircraftTypeId,
'aircraftSortiesId': form.aircraftSortiesId
// 'state': form.state
}
post(`/ORProduction/create`, params).then(res => {
const id = res.items.id
post(`/MilestonePlan/generate?orProductionId=${id}`).then(res => {
this.$util.showMessageSuccess(res.message)
this.$emit('cancel')
}).catch((err) => {
console.log(err)
})
this.$emit('cancel')
}).catch((err) => {
console.log(err)
})
}
}
}
</script>
<style lang='scss'>
</style>
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