chris 1 年間 前
コミット
c14f91e8fa

+ 8 - 4
src/views/modules/cus/communicate-detail.vue

@@ -5,10 +5,10 @@
     :close-on-click-modal="false"
     :visible.sync="visible"> -->
   <div>
-    <div class="my-title">查看</div>
+    <div class="my-title" v-if="!isComponent">查看</div>
     <div style="margin-left: 20px; margin-right: 20px">
       <!-- 工作流 -->
-      <div v-show="dataForm.workFlowBusinessExt">
+      <div v-show="!isComponent && dataForm.workFlowBusinessExt">
         <el-steps :active="dataForm.workFlowBusinessExt&&dataForm.workFlowBusinessExt.workFlowProcessStepList?dataForm.workFlowBusinessExt.workFlowProcessStepList.length + 2:0" align-center style="margin-bottom: 20px">
           <template v-for="(item, i) in stepList">
             <el-step :icon="item.icon" :title="item.title" :description="item.description"></el-step>
@@ -25,7 +25,7 @@
           </el-collapse-item>
         </el-collapse>
       </div>
-      <div v-if="isFlow">
+      <div v-if="!isComponent && isFlow">
         <approve-component ref="approve" @approveFinished="approveFinished"/>
       </div>
       <e-desc title="基本信息" column="3">
@@ -246,6 +246,7 @@ export default {
   data () {
     return {
       visible: false,
+      isComponent: false,
       id: 0,
       dataForm: {},
       cusRCommProductVOS: [],
@@ -261,7 +262,10 @@ export default {
     onChose () {
       this.$emit('onChose')
     },
-    async init (id, businessType) {
+    async init (id, businessType, isComponent) {
+      if (isComponent) {
+        this.isComponent = true
+      }
       this.visible = true
       this.isFlow = !!(businessType && businessType !== '')
       this.id = id || 0

+ 20 - 1
src/views/modules/cus/contract-detail.vue

@@ -66,6 +66,10 @@
       <e-desc title="合同评审表">
         <upload-component :display="true" :display-title="false" :accept="'*'" :file-obj-list="fileList"/>
       </e-desc>
+      <div style="margin-top: 20px" v-if="isCommVisible">
+        <h3>合同沟通信息:</h3>
+        <communicate-detail ref="commDetail"/>
+      </div>
     </div>
     <span slot="footer" class="dialog-footer">
       <el-button @click="onChose">返回</el-button>
@@ -81,14 +85,20 @@
   import uploadComponent from '../common/upload-component'
   import { dealStepData, dealStepLogs } from '@/api/util'
   import ApproveComponent from '../common/approve-component'
+  import CommunicateDetail from '@/views/modules/cus/communicate-detail'
   export default {
     name: 'contract-detail',
     components: {
-      EDesc, EDescItem, uploadComponent, ApproveComponent
+      CommunicateDetail,
+      EDesc,
+      EDescItem,
+      uploadComponent,
+      ApproveComponent
     },
     data () {
       return {
         visible: false,
+        isCommVisible: false,
         isFlow: false,
         id: 0,
         dataForm: {},
@@ -101,6 +111,7 @@
     },
     methods: {
       onChose () {
+        this.isCommVisible = false
         this.$emit('onChose')
       },
       async init (id, businessType) {
@@ -144,6 +155,14 @@
                 })
               })
             }
+            // 获取沟通详情
+            if (data.data.cusCommunicationExt) {
+              let id = data.data.cusCommunicationExt.coId
+              this.isCommVisible = true
+              this.$nextTick(() => {
+                this.$refs.commDetail.init(id, null, true)
+              })
+            }
             // 初始化审批Form
             this.showApproveForm(businessType, this.id)
           }