|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
|
|
+ <!-- <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
|
|
<el-tab-pane
|
|
|
v-for="item in tabOption"
|
|
|
:label="item.label"
|
|
|
@@ -16,7 +16,17 @@
|
|
|
ref="componentRef"
|
|
|
v-bind="activeNameProps"
|
|
|
/>
|
|
|
- </keep-alive>
|
|
|
+ </keep-alive> -->
|
|
|
+ <div v-for="item in tabOption" :label="item.label" :name="item.name">
|
|
|
+ <component
|
|
|
+ v-if="form.id"
|
|
|
+ :is="item.name"
|
|
|
+ :key="item.name"
|
|
|
+ :ref="'componentRef' + item.name"
|
|
|
+ type="sourceBizNo"
|
|
|
+ v-bind="activeNameProps(item.name)"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -65,37 +75,7 @@
|
|
|
]
|
|
|
};
|
|
|
},
|
|
|
- computed: {
|
|
|
- activeNameProps() {
|
|
|
- switch (this.activeName) {
|
|
|
- case 'tab1':
|
|
|
- return {
|
|
|
- taskDefinitionKey: this.taskDefinitionKey,
|
|
|
- activeComp: this.activeComp,
|
|
|
- businessId: this.businessId,
|
|
|
- infoData: this.form,
|
|
|
- permissionType: this.permissionType
|
|
|
- };
|
|
|
- case 'tab2':
|
|
|
- return {
|
|
|
- form: this.form,
|
|
|
- bizType: 7,
|
|
|
- sourceBizNo: this.form.code,
|
|
|
- saleProductList: this.form.productList
|
|
|
- };
|
|
|
- case 'tab3':
|
|
|
- return {
|
|
|
- taskDefinitionKey: this.taskDefinitionKey,
|
|
|
- businessId: this.form.code
|
|
|
- };
|
|
|
- case 'tab4':
|
|
|
- return {
|
|
|
- businessId: this.form.code,
|
|
|
- isUpload: this.isUpload
|
|
|
- };
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+ computed: {},
|
|
|
async created() {
|
|
|
await this.getSendSaleOrderDetail(this.businessId);
|
|
|
switch (this.taskDefinitionKey) {
|
|
|
@@ -132,6 +112,35 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ activeNameProps(activeName) {
|
|
|
+ switch (activeName) {
|
|
|
+ case 'tab1':
|
|
|
+ return {
|
|
|
+ taskDefinitionKey: this.taskDefinitionKey,
|
|
|
+ activeComp: this.activeComp,
|
|
|
+ businessId: this.businessId,
|
|
|
+ infoData: this.form,
|
|
|
+ permissionType: this.permissionType
|
|
|
+ };
|
|
|
+ case 'tab2':
|
|
|
+ return {
|
|
|
+ form: this.form,
|
|
|
+ bizType: 7,
|
|
|
+ sourceBizNo: this.form.code,
|
|
|
+ saleProductList: this.form.productList
|
|
|
+ };
|
|
|
+ case 'tab3':
|
|
|
+ return {
|
|
|
+ taskDefinitionKey: this.taskDefinitionKey,
|
|
|
+ businessId: this.form.code
|
|
|
+ };
|
|
|
+ case 'tab4':
|
|
|
+ return {
|
|
|
+ businessId: this.form.code,
|
|
|
+ isUpload: this.isUpload
|
|
|
+ };
|
|
|
+ }
|
|
|
+ },
|
|
|
isValidComponent(componentName) {
|
|
|
const validComponents = ['tab1', 'tab2', 'tab3', 'tab4'];
|
|
|
return validComponents.includes(componentName);
|
|
|
@@ -150,18 +159,19 @@
|
|
|
}
|
|
|
},
|
|
|
async getTableValue() {
|
|
|
- console.log(this.$refs.componentRef);
|
|
|
+ console.log(this.$refs.componentReftab2);
|
|
|
+ console.log(this.$refs['componentReftab2'][0].getReturnStorage);
|
|
|
return {
|
|
|
- form: this.$refs.componentRef.form,
|
|
|
- returnStorageData: this.$refs.componentRef.getReturnStorage
|
|
|
- ? await this.$refs.componentRef.getReturnStorage()
|
|
|
+ form: this.$refs['componentReftab1'][0].form,
|
|
|
+ returnStorageData: this.$refs.componentReftab2 && this.$refs['componentReftab2'][0].getReturnStorage
|
|
|
+ ? await this.$refs['componentReftab2'][0].getReturnStorage()
|
|
|
: '',
|
|
|
isAllChecked:
|
|
|
- this.$refs.componentRef.getStatus &&
|
|
|
- this.$refs.componentRef.getStatus(),
|
|
|
+ this.$refs.componentReftab3 && this.$refs['componentReftab3'][0].getStatus &&
|
|
|
+ this.$refs['componentReftab3'][0].getStatus(),
|
|
|
qualityInspector:
|
|
|
- (this.$refs.componentRef.getQualityFile &&
|
|
|
- this.$refs.componentRef.getQualityFile()) ||
|
|
|
+ (this.$refs.componentReftab4 && this.$refs['componentReftab4'][0].getQualityFile &&
|
|
|
+ this.$refs['componentReftab4'][0].getQualityFile()) ||
|
|
|
{}
|
|
|
};
|
|
|
},
|