yusheng пре 2 година
родитељ
комит
522e731b22

+ 10 - 0
src/api/purchasingManage/purchaseNeedManage.js

@@ -55,4 +55,14 @@ export async function deleteInformation(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+/**
+ * 新增信息
+ */
+export async function submit(data) {
+  const res = await request.post(`/bpm/purchaseRequirementApprove/submit`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
 

+ 1 - 1
src/views/contractManage/contractBook/components/addDialog.vue

@@ -393,7 +393,7 @@
         :contractStartDate="this.form.contractStartDate"
       ></inventoryTable>
       <headerTitle
-        :title="form.type == '2' ? '付款清单' : '收款清单'"
+        :title="form.type == '2' ? '付款方式' : '收款方式'"
         style="margin-top: 30px"
       ></headerTitle>
       <paymentList ref="paymentListTable" />

+ 1 - 1
src/views/contractManage/contractBook/components/detailDialog.vue

@@ -250,7 +250,7 @@
       </ele-pro-table>
 
       <headerTitle
-        :title="form.type == '2' ? '付款清单' : '收款清单'"
+        :title="form.type == '2' ? '付款方式' : '收款方式'"
         style="margin-top: 30px"
       ></headerTitle>
       <ele-pro-table

+ 31 - 14
src/views/purchasingManage/purchaseNeedManage/components/addDialog.vue

@@ -12,17 +12,12 @@
     <el-form ref="form" :model="form" :rules="rules" label-width="120px">
       <headerTitle title="基本信息"></headerTitle>
       <el-row>
-        <el-col :span="12">
-          <el-form-item
-            label="需求来源类型"
-            prop="sourceType"
-            style="margin-bottom: 22px"
-          >
+        <el-col :span="12" style="height: 58px">
+          <el-form-item label="需求来源类型" prop="sourceType">
             <DictSelection
               dictName="需求来源类型"
               clearable
               v-model="form.sourceType"
-              valueName="dictValue"
             >
             </DictSelection>
           </el-form-item>
@@ -67,7 +62,6 @@
               placeholder="请选择"
               clearable
               style="width: 100%"
-              
             >
               <el-option
                 v-for="item in acceptUnpackList"
@@ -80,7 +74,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="12">
-          <el-form-item label="用途" prop="useTo" >
+          <el-form-item label="用途" prop="useTo">
             <el-input
               type="textarea"
               resize="none"
@@ -115,12 +109,13 @@
             />
           </el-form-item>
         </el-col>
-       
       </el-row>
     </el-form>
 
     <div slot="footer" class="footer">
       <el-button type="primary" @click="save">保存</el-button>
+      <el-button type="primary" @click="save('sub')">提交</el-button>
+
       <el-button @click="cancel">返回</el-button>
     </div>
 
@@ -144,7 +139,7 @@
   import {
     addPurchaseNeedManage,
     getDetail,
-    UpdateInformation
+    UpdateInformation,submit
   } from '@/api/purchasingManage/purchaseNeedManage';
 
   import headList from '@/views/saleManage/businessOpportunity/components/headList.vue';
@@ -175,7 +170,7 @@
         sourceId: '',
         sourceType: '',
         files: [],
-        acceptUnpack:1
+        acceptUnpack: 1
       };
 
       return {
@@ -214,7 +209,8 @@
         // 组织机构树形结构数据
         groupTreeData: [],
         // 组织机构平铺数据
-        groupData: []
+        groupData: [],
+        businessId: ''
       };
     },
     created() {
@@ -258,6 +254,8 @@
       },
       //获取详情
       async getDetailData(id) {
+        this.businessId = id;
+
         this.loading = true;
         const data = await getDetail(id);
         this.loading = false;
@@ -309,7 +307,7 @@
           })
         ]);
       },
-      async save() {
+      async save(type) {
         try {
           await this.getValidate();
           // 表单验证通过,执行保存操作
@@ -323,6 +321,8 @@
             return;
           }
           this.form.files = this.form.files || [];
+
+          this.form.sourceName = this.getDictValue('需求来源类型', this.form.sourceType);
           let commitData = Object.assign({}, this.form, {
             detailList: this.$refs.inventoryTable.getTableValue()
           });
@@ -331,6 +331,10 @@
               .then((res) => {
                 this.loading = false;
                 this.$message.success('修改成功');
+                if (type === 'sub') {
+                  this.saleOrderSubmit(res);
+                  return;
+                }
                 this.cancel();
                 this.$emit('done');
               })
@@ -342,6 +346,10 @@
               .then((res) => {
                 this.loading = false;
                 this.$message.success('新增成功');
+                if (type === 'sub') {
+                  this.saleOrderSubmit(res);
+                  return;
+                }
                 this.cancel();
                 this.$emit('done');
               })
@@ -354,6 +362,15 @@
           // 表单验证未通过,不执行保存操作
         }
       },
+      saleOrderSubmit(res) {
+        submit({
+          businessId: res.id
+          // productionSupervisorId
+        }).then((res) => {
+          this.cancel();
+          this.$emit('done');
+        });
+      },
       cancel() {
         this.$nextTick(() => {
           this.activeName = 'base';

+ 111 - 93
src/views/purchasingManage/purchaseNeedManage/components/detailDialog.vue

@@ -10,9 +10,24 @@
     @close="cancel"
     :modal="isModal"
   >
-    <el-form ref="form" :model="form" label-width="120px">
-      <headerTitle title="基本信息">
-        <!-- <el-button
+    <div class="switch">
+      <div class="switch_left">
+        <ul>
+          <li
+            v-for="item in tabOptions"
+            :key="item.key"
+            :class="{ active: activeComp == item.key }"
+            @click="activeComp = item.key"
+          >
+            {{ item.name }}
+          </li>
+        </ul>
+      </div>
+    </div>
+    <div v-if="activeComp == 'main'">
+      <el-form ref="form" :model="form" label-width="120px">
+        <headerTitle title="基本信息">
+          <!-- <el-button
                   size="small"
                   type="primary"
                   icon="el-icon-s-grid"
@@ -21,100 +36,94 @@
                 >
                  导出
                 </el-button> -->
-      </headerTitle>
-      <el-row>
-        <el-col :span="12">
-          <el-form-item
-            label="需求来源类型:"
-            prop="contactTel"
-          >
-            {{ form.sourceType }}
-          </el-form-item>
-        </el-col>
+        </headerTitle>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="需求来源类型:" prop="contactTel">
+              {{ form.sourceName }}
+            </el-form-item>
+          </el-col>
 
-        <el-col :span="12">
-          <el-form-item
-            label="需求部门:"
-            prop="requireDeptName"
-          >
-            {{ detailData.requireDeptName }}
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item
-            label="需求人:"
-            prop="requireUserName"
-            
-          >
-            {{ form.requireUserName }}
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item prop="remark" label="是否接受拆单" >
-            {{form.acceptUnpack===1?'接受':form.cceptUnpack===1?'不接受':''}}
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item
-            label="用途:"
-            prop="useTo"
-           
-          >
-            {{ form.useTo }}
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item
-            label="完成日期:"
-            prop="finishDate"
-          >
-            {{ form.finishDate }}
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item prop="remark" label="备注:">
-            {{ form.remark }}
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item prop="askFile" label="附件:">
+          <el-col :span="12">
+            <el-form-item label="需求部门:" prop="requireDeptName">
+              {{ detailData.requireDeptName }}
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="需求人:" prop="requireUserName">
+              {{ form.requireUserName }}
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item prop="remark" label="是否接受拆单">
+              {{
+                form.acceptUnpack === 1
+                  ? '接受'
+                  : form.cceptUnpack === 1
+                  ? '不接受'
+                  : ''
+              }}
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="用途:" prop="useTo">
+              {{ form.useTo }}
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="完成日期:" prop="finishDate">
+              {{ form.finishDate }}
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item prop="remark" label="备注:">
+              {{ form.remark }}
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item prop="askFile" label="附件:">
+              <el-link
+                v-if="form.files && form.files !== ''"
+                type="primary"
+                :underline="false"
+                @click="downloadFile(form.files)"
+              >
+                {{ form.files.name }}</el-link
+              >
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <headerTitle title="需求清单"></headerTitle>
+      <ele-pro-table
+        ref="table"
+        :needPage="false"
+        :columns="columns"
+        :toolkit="[]"
+        :datasource="detailData.detailList"
+        row-key="id"
+      >
+        <template v-slot:files="{ row }">
+          <div v-if="row.files && row.files?.length">
             <el-link
-              v-if="form.files && form.files !== ''"
+              v-for="link in row.files"
+              :key="link.id"
               type="primary"
               :underline="false"
-              @click="downloadFile(form.files)"
+              @click="downloadFile(link)"
             >
-              {{ form.files.name }}</el-link
+              {{ link.name }}</el-link
             >
-          </el-form-item>
-        </el-col>
-       
-      </el-row>
-    </el-form>
+          </div>
+        </template>
+      </ele-pro-table>
+    </div>
 
-    <headerTitle title="需求清单"></headerTitle>
-    <ele-pro-table
-      ref="table"
-      :needPage="false"
-      :columns="columns"
-      :toolkit="[]"
-      :datasource="detailData.detailList"
-      row-key="id"
-    >
-      <template v-slot:files="{ row }">
-        <div v-if="row.files && row.files?.length">
-          <el-link
-            v-for="link in row.files"
-            :key="link.id"
-            type="primary"
-            :underline="false"
-            @click="downloadFile(link)"
-          >
-            {{ link.name }}</el-link
-          >
-        </div>
-      </template>
-    </ele-pro-table>
+    <bpmDetail
+      v-if="activeComp === 'bpm' && form.processInstanceId"
+      :id="form.processInstanceId"
+    ></bpmDetail>
 
     <div slot="footer" class="footer">
       <el-button @click="cancel">返回</el-button>
@@ -127,16 +136,25 @@
   import { getFile } from '@/api/system/file';
   import dictMixins from '@/mixins/dictMixins';
   import { copyObj } from '@/utils/util';
+  import bpmDetail from '@/views/bpm/processInstance/detail.vue';
 
   export default {
     mixins: [dictMixins],
-    props:{
+    props: {
       isModal: {
         default: true
       }
     },
+    components: {
+      bpmDetail
+    },
     data() {
       return {
+        activeComp: 'main',
+        tabOptions: [
+          { key: 'main', name: '需求详情' },
+          { key: 'bpm', name: '流程详情' }
+        ],
         visible: false,
         title: '详情',
         row: {},
@@ -228,7 +246,7 @@
     methods: {
       async open(row) {
         this.visible = true;
-        this.getDetailData(row.requirementId||row.id);
+        this.getDetailData(row.requirementId || row.id);
       },
       cancel() {
         this.$nextTick(() => {
@@ -248,7 +266,7 @@
         const data = await getDetail(id);
         this.loading = false;
         if (data) {
-        this.form = data;
+          this.form = data;
 
           this.detailData = data;
           if (data.files && data.files.length > 0) {

+ 34 - 2
src/views/purchasingManage/purchaseNeedManage/index.vue

@@ -57,13 +57,24 @@
               :underline="false"
               icon="el-icon-edit"
               @click="openEdit('edit', row)"
+              v-if="[0, 3].includes(row.status)"
             >
               修改
             </el-link>
+            <el-link
+              type="primary"
+              :underline="false"
+              icon="el-icon-plus"
+              @click="sub(row)"
+              v-if="[0, 3].includes(row.status)"
+            >
+              提交
+            </el-link>
             <el-popconfirm
               class="ele-action"
               title="确定要删除此信息吗?"
               @confirm="remove([row.id])"
+              v-if="[0, 3].includes(row.status)"
             >
               <template v-slot:reference>
                 <el-link type="danger" :underline="false" icon="el-icon-delete">
@@ -105,7 +116,8 @@
   import dictMixins from '@/mixins/dictMixins';
   import {
     getTableList,
-    deleteInformation
+    deleteInformation,
+    submit
   } from '@/api/purchasingManage/purchaseNeedManage';
   export default {
     mixins: [dictMixins],
@@ -262,9 +274,29 @@
       openDetail(row) {
         this.$refs.contactDetailDialogRef.open(row);
       },
+      sub(res) {
+        submit({
+          businessId: res.id
+        })
+          .then((res) => {
+            this.$message.success('提交成功');
+            this.reload();
+          })
+          .catch((e) => {
+            this.$message.error(e.message);
+          });
+      },
       //获取状态
       getStatus(status) {
-        return status==0?'未提交':status==1?'审核中':status==2?'审核通过':status==3?'审核不通过':''
+        return status == 0
+          ? '未提交'
+          : status == 1
+          ? '审核中'
+          : status == 2
+          ? '审核通过'
+          : status == 3
+          ? '审核不通过'
+          : '';
       }
     }
   };

+ 3 - 5
src/views/purchasingManage/purchasePlanManage/components/addDialog.vue

@@ -49,7 +49,6 @@
               dictName="需求来源类型"
               clearable
               v-model="form.sourceType"
-              valueName="dictValue"
               :disabled="!!form.requirementCode"
             >
             </DictSelection>
@@ -377,10 +376,7 @@
         this.$nextTick(() => {});
         this.getrequireUser(id);
       },
-      //选择需求来源类型
-      chaengSource(data) {
-        this.form.sourceType = data?.dictValue;
-      },
+    
       getrequireUser(groupId) {
         if (groupId) {
           this.$refs.directorRef.getList({ groupId });
@@ -496,6 +492,8 @@
           if (!this.isUpdate) {
             delete this.form.id;
           }
+          this.form.sourceName = this.getDictValue('需求来源类型', this.form.sourceType);
+
           this.form.files = this.form.files || [];
           let commitData = Object.assign({}, this.form, {
             detailList: this.$refs.inventoryTable.getTableValue()

+ 1 - 1
src/views/purchasingManage/purchasePlanManage/components/detailDialog.vue

@@ -53,7 +53,7 @@
             label="需求来源类型:"
             prop="contactTel"
           >
-            {{ form.sourceType }}
+            {{ form.sourceName }}
           </el-form-item>
         </el-col>
 

+ 7 - 4
src/views/saleManage/businessOpportunity/components/addOpportunityDialog.vue

@@ -18,7 +18,7 @@
       style="margin-top: 30px"
     >
       <el-row>
-        <el-col :span="8" style="height: 58px;">
+        <el-col :span="8" style="height: 58px">
           <el-form-item label="选择客户" prop="contactName">
             <el-input
               placeholder="请选择"
@@ -28,7 +28,7 @@
             ></el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="8" style="height: 58px;">
+        <el-col :span="8" style="height: 58px">
           <el-form-item label="	商机名称" prop="name">
             <el-input
               placeholder="请输入"
@@ -47,7 +47,7 @@
             ></el-input>
           </el-form-item>
         </el-col>
-        <el-col :span="8" style="height: 58px;">
+        <el-col :span="8" style="height: 58px">
           <el-form-item label="商机来源" prop="sourceCode">
             <DictSelection
               dictName="商机来源"
@@ -345,6 +345,9 @@
         this.row = row;
         this.visible = true;
         if (type == 'add') {
+          if (row.id) {
+            this.changeParent(row);
+          }
           this.isUpdate = false;
         } else {
           this.isUpdate = true;
@@ -496,7 +499,7 @@
       },
       businessOpportunitySubmit(res) {
         submit({
-          businessId: this.businessId || res,
+          businessId: this.businessId || res
         }).then((res) => {
           this.cancel();
           this.$emit('done');

+ 7 - 24
src/views/saleManage/businessOpportunity/components/opportunityDetailDialog.vue

@@ -24,11 +24,8 @@
       </div>
     </div>
     <div v-if="activeComp==='main'">
-      <el-card
-      shadow="never"
-      header="基本信息"
-      body-style="padding: 22px 20px 0 0;"
-    >
+      <headerTitle title="基本信息" style="margin-top: 15px;"></headerTitle>
+
       <el-form
         label-width="120px"
         ref="form"
@@ -99,12 +96,7 @@
           </el-col>
         </el-row>
       </el-form>
-    </el-card>
-    <el-card
-      shadow="never"
-      header="产品清单"
-      body-style="padding: 22px 20px 0 20px;"
-    >
+      <headerTitle title="产品清单" style="margin-top: 15px;"></headerTitle>
       <ele-pro-table
         ref="table"
         :needPage="false"
@@ -145,12 +137,8 @@
           </div>
         </template>
       </ele-pro-table>
-    </el-card>
-    <el-card
-      shadow="never"
-      header="竞品对手"
-      body-style="padding: 22px 20px 0 20px;"
-    >
+      <headerTitle title="竞品对手" style="margin-top: 15px;"></headerTitle>
+
       <ele-pro-table
         ref="table"
         :needPage="false"
@@ -159,12 +147,8 @@
         row-key="id"
       >
       </ele-pro-table>
-    </el-card>
-    <el-card
-      shadow="never"
-      header="关键人信息"
-      body-style="padding: 22px 20px 0 20px;"
-    >
+      <headerTitle title="关键人信息" style="margin-top: 15px;"></headerTitle>
+
       <ele-pro-table
         ref="table"
         :needPage="false"
@@ -173,7 +157,6 @@
         row-key="id"
       >
       </ele-pro-table>
-    </el-card>
     </div>
    <bpmDetail v-if="activeComp==='bpm'&&form.processInstanceId" :id="form.processInstanceId"></bpmDetail>
     <div slot="footer" class="footer">

+ 22 - 3
src/views/saleManage/businessOpportunity/index.vue

@@ -55,7 +55,15 @@
             >
               跟进
             </el-link>
-
+            <!-- <el-link
+              type="primary"
+              :underline="false"
+              icon="el-icon-plus"
+              v-if="[2].includes(row.approvalStatus)"
+              @click="addQuotation('add', row)"
+            >
+              生成报价
+            </el-link> -->
             <el-link
               type="primary"
               :underline="false"
@@ -119,6 +127,8 @@
       :categoryTreeList="treeList"
       @done="reload"
     ></add-opportunity-dialog>
+    <addQuotation ref="quotationRef" @done="reload"></addQuotation>
+
     <opportunity-detail-dialog
       ref="contactDetailDialogRef"
     ></opportunity-detail-dialog>
@@ -135,6 +145,8 @@
 <script>
   import opportunitySearch from './components/opportunitySearch.vue';
   import addOpportunityDialog from './components/addOpportunityDialog.vue';
+  import addQuotation from '@/views/saleManage/quotation/components/addDialog.vue';
+
   import opportunityDetailDialog from './components/opportunityDetailDialog.vue';
   import followList from './components/followList.vue';
   import popModal from '@/components/pop-modal';
@@ -154,7 +166,8 @@
       followList,
       popModal,
       addOpportunityDialog,
-      opportunityDetailDialog
+      opportunityDetailDialog,
+      addQuotation
     },
     data() {
       return {
@@ -332,6 +345,11 @@
         this.$refs.addContactDialogRef.$refs.form &&
           this.$refs.addContactDialogRef.$refs.form.clearValidate();
       },
+      addQuotation(type,row) {
+        this.$refs.quotationRef.open(type, row, row.id);
+        this.$refs.quotationRef.$refs.form &&
+          this.$refs.quotationRef.$refs.form.clearValidate();
+      },
       //跟进
       handleFollow(row) {
         this.current = row;
@@ -382,7 +400,8 @@
       sub(res) {
         submit({
           businessId: res.id
-        }).then((res) => {
+        })
+          .then((res) => {
             this.$message.success('提交成功');
             this.reload();
           })

+ 5 - 19
src/views/saleManage/contact/components/addContactDialog.vue

@@ -21,7 +21,7 @@
           style="margin-top: 30px"
         >
           <el-row>
-            <el-col :span="8">
+            <el-col :span="8" style="height: 58px;">
               <el-form-item
                 label="客户分类"
                 prop="categoryId"
@@ -36,7 +36,7 @@
                 />
               </el-form-item>
             </el-col>
-            <el-col :span="8">
+            <el-col :span="8" style="height: 58px;">
               <el-form-item label="客户名称" prop="name">
                 <el-input placeholder="请输入" v-model="form.name" maxlength="50"></el-input>
               </el-form-item>
@@ -70,7 +70,7 @@
                 <el-input placeholder="请输入" v-model="form.phone" maxlength="20"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="8">
+            <el-col :span="8" style="height: 58px;">
               <el-form-item label="地址" prop="addressId">
                 <el-cascader
                   clearable
@@ -81,7 +81,7 @@
                 ></el-cascader>
               </el-form-item>
             </el-col>
-            <el-col :span="8">
+            <el-col :span="8" style="height: 58px;">
               <el-form-item label="详细地址" prop="address">
                 <el-input
                   placeholder="请输入"
@@ -633,21 +633,7 @@ export default {
             { required: true, message: '请输入税率', trigger: 'change' }
           ],
 
-          sender: [
-          { required: true, message: '请输入收件人', trigger: 'change' }
-          ],
-
-          senderPhone: [
-          { required: true, message: '请输入收件人电话', trigger: 'change' }
-          ],
-
-          addressId: [
-          { required: true, message: '请选择收件人地址', trigger: 'change' }
-          ],
-
-          address: [
-          { required: true, message: '请输入收件人详细地址', trigger: 'blur' }
-          ]
+        
 
         },
         options: {

+ 25 - 4
src/views/saleManage/contact/index.vue

@@ -82,6 +82,14 @@
 
               <!-- 操作列 -->
               <template v-slot:action="{ row }">
+                <el-link
+                  type="primary"
+                  :underline="false"
+                  icon="el-icon-plus"
+                  @click="addOppo('add', row)"
+                >
+                  生成商机
+                </el-link>
                 <el-link
                   type="primary"
                   :underline="false"
@@ -153,10 +161,17 @@
       content="是否确定删除?"
       @done="commitBtn"
     />
+    <add-opportunity-dialog
+      ref="opportunityRef"
+      :categoryTreeList="treeList"
+      @done="reload"
+    ></add-opportunity-dialog>
   </div>
 </template>
 
 <script>
+  import addOpportunityDialog from '@/views/saleManage/businessOpportunity/components/addOpportunityDialog.vue';
+
   import ContactSearch from './components/contactSearch.vue';
   import AddContactDialog from './components/addContactDialog.vue';
   import ContactDetailDialog from './components/contactDetailDialog.vue';
@@ -168,7 +183,7 @@
     contactDelete,
     contactPage,
     contactTypeTree,
-    updateStatus,
+    updateStatus
   } from '@/api/saleManage/contact';
   import dictMixins from '@/mixins/dictMixins';
 
@@ -181,7 +196,8 @@
       AddContactDialog,
       ContactDetailDialog,
       contactListAdmin,
-      contactList
+      contactList,
+      addOpportunityDialog
     },
     data() {
       return {
@@ -306,7 +322,7 @@
           {
             columnKey: 'action',
             label: '操作',
-            width: 200,
+            width: 260,
             align: 'center',
             resizable: false,
             slot: 'action',
@@ -339,7 +355,7 @@
           pageNum: page,
           size: limit,
           type: 1,
-          salesmanId:this.$store.state.user.info.userId,
+          salesmanId: this.$store.state.user.info.userId,
           ...where
         });
       },
@@ -377,6 +393,11 @@
         this.$refs.addContactDialogRef.$refs.form &&
           this.$refs.addContactDialogRef.$refs.form.clearValidate();
       },
+      addOppo(type, row) {
+        this.$refs.opportunityRef.open(type, row, row.id);
+        this.$refs.opportunityRef.$refs.form &&
+          this.$refs.opportunityRef.$refs.form.clearValidate();
+      },
       //批量删除
       allDelBtn() {
         if (this.selection.length === 0) return;

+ 3 - 3
src/views/saleManage/quotation/components/addDialog.vue

@@ -448,15 +448,12 @@
         }
       },
       opportunityChange(id){
-        console.log(id,'id')
         getOpportunityDetail(id).then(res=>{
           if(res.productList.length>0){
             this.$refs.inventoryTable &&
               this.$refs.inventoryTable.putTableValue(res.productList);
           }
-
         })
-
       },
 
       //更新联系人数据
@@ -546,6 +543,9 @@
             this.form.quoteFax = this.enterprisePage[0].fax;
             this.form.quoteAddress = this.enterprisePage[0].address;
           }
+          if(row.id){
+            this.opportunityChange(row.id)
+          }
         } else {
           this.isUpdate = true;
           this.getDetailData(row.id);