|
|
@@ -64,6 +64,7 @@
|
|
|
:isDrawer="true"
|
|
|
ref="personnelAddTable"
|
|
|
@save="save"
|
|
|
+ @getContactId="getContactId"
|
|
|
></personnelAddTable>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
@@ -146,16 +147,14 @@
|
|
|
activeName: '详细信息',
|
|
|
row: { contactId: '' },
|
|
|
content: '',
|
|
|
- cacheKeyUrl:"eos-businessOpportunity-inventoryTableDetails"
|
|
|
-
|
|
|
+ cacheKeyUrl: 'eos-businessOpportunity-inventoryTableDetails'
|
|
|
};
|
|
|
},
|
|
|
created() {},
|
|
|
|
|
|
methods: {
|
|
|
async open(row) {
|
|
|
- this.activeName= '详细信息',
|
|
|
- this.row = await getDetail(row.id);
|
|
|
+ (this.activeName = '详细信息'), (this.row = await getDetail(row.id));
|
|
|
this.drawer = true;
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.opportunityInfoRef.init(this.row);
|
|
|
@@ -176,15 +175,6 @@
|
|
|
},
|
|
|
getValidate() {
|
|
|
return Promise.all([
|
|
|
- new Promise((resolve, reject) => {
|
|
|
- this.$refs.inventoryTable.validateForm((valid) => {
|
|
|
- if (!valid) {
|
|
|
- reject(false);
|
|
|
- } else {
|
|
|
- resolve(true);
|
|
|
- }
|
|
|
- });
|
|
|
- }),
|
|
|
new Promise((resolve, reject) => {
|
|
|
this.$refs.businessAddTable.validateForm((valid) => {
|
|
|
if (!valid) {
|
|
|
@@ -214,15 +204,11 @@
|
|
|
await this.getValidate();
|
|
|
this.loading = true;
|
|
|
|
|
|
- if (this.$refs.inventoryTable.getTableValue().length == 0) {
|
|
|
- this.$message.warning('物品清单不能为空');
|
|
|
- return;
|
|
|
- }
|
|
|
const commitData = {
|
|
|
opportunity: this.row,
|
|
|
competAnalysisList: this.$refs.businessAddTable.getTableValue(),
|
|
|
partyList: this.$refs.personnelAddTable.getTableValue(),
|
|
|
- productList: this.$refs.inventoryTable.getTableValue()
|
|
|
+ productList: this.row.productList
|
|
|
};
|
|
|
|
|
|
UpdateInformation(commitData)
|
|
|
@@ -238,7 +224,9 @@
|
|
|
// 表单验证未通过,不执行保存操作
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+ getContactId(fn) {
|
|
|
+ fn(this.row.contactId);
|
|
|
+ },
|
|
|
handleClose(done) {
|
|
|
this.$confirm('确认关闭?')
|
|
|
.then((_) => {
|