|
|
@ -41,23 +41,11 @@ export default { |
|
|
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable }, |
|
|
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable }, |
|
|
mixins: [templateMixin], |
|
|
mixins: [templateMixin], |
|
|
props: { |
|
|
props: { |
|
|
value: { |
|
|
|
|
|
type: {}, |
|
|
|
|
|
default: () => { }, |
|
|
|
|
|
}, |
|
|
|
|
|
fillType: { |
|
|
fillType: { |
|
|
type: String, |
|
|
type: String, |
|
|
default: 'preFill', |
|
|
default: 'preFill', |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
watch: { |
|
|
|
|
|
value: { |
|
|
|
|
|
immediate: true, |
|
|
|
|
|
handler(v) { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
computed: { |
|
|
computed: { |
|
|
storageFormConfig() { |
|
|
storageFormConfig() { |
|
|
return [ |
|
|
return [ |
|
|
@ -269,16 +257,13 @@ export default { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
async getFormData() { |
|
|
async getFormData() { |
|
|
const baseData = await this.$refs.baseInfoRef.getFormData(); |
|
|
|
|
|
const conditionData = await this.$refs.storageConditionRef.getFormData(); |
|
|
|
|
|
const stepFormData = await this.$refs.stepFormPackageRef.getFormData(); |
|
|
|
|
|
const stepData = await this.$refs.stepRef.getFormData(); |
|
|
|
|
|
if (!stepData.length) { |
|
|
|
|
|
this.$message.error(this.$t('template.common.addStepError')); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
const remarkData = await this.$refs.remarkRef.getFormData(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const baseData = await this.$refs.baseInfoRef.getFormData(); |
|
|
|
|
|
// const conditionData = await this.$refs.storageConditionRef.getFormData(); |
|
|
|
|
|
// const stepFormData = await this.$refs.stepFormPackageRef.getFormData(); |
|
|
|
|
|
// const stepData = await this.$refs.stepRef.getFormData(); |
|
|
|
|
|
// const remarkData = await this.$refs.remarkRef.getFormData(); |
|
|
|
|
|
return await this.validFormFields(["baseInfoRef", "storageConditionRef","stepFormPackageRef","stepRef","remarkRef"]); |
|
|
|
|
|
|
|
|
return { |
|
|
return { |
|
|
...baseData, |
|
|
...baseData, |
|
|
...conditionData, |
|
|
...conditionData, |
|
|
@ -289,10 +274,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
async onSave() { |
|
|
async onSave() { |
|
|
// const formData = await this.getFormData(); |
|
|
// const formData = await this.getFormData(); |
|
|
const result = await Promise.all([this.$refs.baseInfoRef.getFormData(), this.$refs.storageConditionRef.getFormData()]).catch(()=>{ |
|
|
|
|
|
console.log("error") |
|
|
|
|
|
}); |
|
|
|
|
|
console.log(result,"res") |
|
|
|
|
|
|
|
|
|
|
|
// console.log(formData, "formData") |
|
|
// console.log(formData, "formData") |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|