瀏覽代碼

feat(contractReview): 添加合同评审详情组件,优化销售订单提交弹窗问题

liujt 8 月之前
父節點
當前提交
8e42bc4f5f

+ 197 - 0
src/views/contractManage/contractReview/components/detail.vue

@@ -0,0 +1,197 @@
+<template>
+  <ele-modal
+    :visible="detailFlag"
+    :width="modelWidth"
+    :centered="true"
+    :close-on-click-modal="false"
+    append-to-body
+    :before-close="cancel"
+    :maxable="true"
+  >
+    <template slot="title">
+      <div>
+        <span style="margin-right: 5px">{{ form.name }}</span>
+        <span style="color: #a6a7ab">发起人:</span>
+        <span style="margin-right: 10px; color: #a6a7ab">{{
+          form.startUserName
+        }}</span>
+        <el-tag
+          size="medium"
+          :type="
+            getTimelineItemType(getDictValue('流程实例的结果', form.result))
+          "
+        >
+          {{ getDictValue('流程实例的结果', form.result) }}
+        </el-tag>
+      </div>
+    </template>
+    <div style="display: flex; height: 100%; justify-content: space-between">
+      <div class="form-box">
+        <fm-generate-form
+          v-if="Object.keys(form?.formJson || {}).length !== 0"
+          :data="jsonData"
+          :value="form.valueJson"
+          :edit="false"
+          ref="generateForm"
+        >
+          <!-- 客户名称 -->
+            <template v-slot:eom_contact="scope">
+              <div class="eom_contact">
+                <el-input
+                    v-model="scope.model.eom_contact.name"
+                    style="width: 100%"
+                  ></el-input>
+              </div>
+            </template>
+
+        </fm-generate-form>
+      </div>
+      <!-- <div
+        style="
+          align-self: center;
+          display: flex;
+          color: #1890ff;
+          cursor: pointer;
+          width: 15px;
+        "
+        @click="() => (isRight = !isRight)"
+      >
+        <span
+          style="
+            align-self: center;
+
+            transform: scale(1.5);
+          "
+          :class="isRight ? 'el-icon-caret-left' : 'el-icon-caret-right'"
+        >
+        </span>
+        <span style="writing-mode: vertical-rl">选择流程</span>
+      </div> -->
+      <!-- <div style="flex: 1" v-if="isRight">
+        <Detail
+          :view="true"
+          :id="form.id"
+          ref="formDetailDialogRef"
+        ></Detail>
+      </div> -->
+    </div>
+    
+    <!-- <outgoingDetails
+      v-if="outgoingData.id"
+      :business-id="outgoingData.id"
+      :isInterior="true"
+    ></outgoingDetails> -->
+    <div slot="footer" class="footer">
+      <el-button @click="cancel">返回</el-button>
+    </div>
+  </ele-modal>
+</template>
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import { getToken } from '@/utils/token-util';
+  // import outgoingDetails from '@/views/bpm/outgoingManagement/details.vue';
+  // import storageApi from '@/api/warehouseManagement';
+  // import Detail from '@/views/bpm/processInstance/detailNew.vue';
+
+  export default {
+    name: 'formDetailDialog',
+    // components: {outgoingDetails, businessComponent, useSealComponent, useQualificationComponent, productSpecificationComponent, eventComponent, reissueComponent, Detail},
+    props: {
+      detailFlag: {
+        type: Boolean,
+        default: false
+      },
+      view: {
+        type: Boolean,
+        default: false
+      },
+    },
+    mixins: [dictMixins],
+    data() {
+      return {
+        form: {},
+        jsonData: {},
+        outgoingData:{},
+        isRight: false,
+      };
+    },
+    computed: {
+      // modelWidth() {
+      //   return (this.outgoingData?.id || this.jsonData.config?.platform && this.jsonData.config.platform === 'pc') ? '80%' : '400px';
+      // }
+      modelWidth() {
+        let width = this.jsonData.config?.platform && this.jsonData.config.platform === 'pc' ? 1100 : 450;
+        if(this.isRight) {
+          return width + 750 + 'px'
+        } else {
+          return width + 'px'
+        }
+      }
+    },
+    methods: {
+       open(row) {
+        this.form = _.cloneDeep(row);
+        // if(this.form.id){
+        //   storageApi.getInfoBySourceBizNo(this.form.id).then(res=>{
+        //   this.outgoingData=res
+        // })
+        // }
+        this.jsonData = JSON.parse(this.form.formJson.makingJson);
+        this.jsonData.config.dataSource &&
+          this.jsonData.config.dataSource.forEach((item) => {
+            item.headers = {
+              Authorization: getToken()
+            };
+            // item.url = item.url && item.url.replace('/api', this.APIUrl);
+          });
+      },
+      getTimelineItemType(result) {
+        if (result === '通过') {
+          return 'success';
+        }
+        if (result === '不通过') {
+          return 'danger';
+        }
+        if (result === '取消') {
+          return 'info';
+        }
+        if (result === '处理中') {
+          return 'warning';
+        }
+
+        return '';
+      },
+      cancel() {
+        this.$emit('update:detailFlag', false);
+      }
+    }
+  };
+</script>
+<style scoped lang="scss">
+  .eleModalBox {
+    height: 100%;
+    min-width: 300px;
+    overflow: auto;
+  }
+
+  .form-box {
+    // max-height: 500px;
+    min-width: 400px;
+    overflow: auto;
+    background: #4298fd0d;
+  }
+
+  ::v-deep .el-dialog__header {
+    display: flex;
+    justify-content: space-between;
+  }
+  .blank_adopzrdd {
+    display: flex;
+    align-items: center;
+    > span {
+      display: inline-block;
+      width: 80px;
+    }
+    margin-bottom: 10px;
+  }
+</style>

+ 21 - 16
src/views/contractManage/contractReview/index.vue

@@ -189,6 +189,12 @@
       ref="addDialogRef"
       @reload="reload"
     ></add-dialog>
+    <detail
+      v-if="detailFlag"
+      :view="true"
+      ref="formDetailDialogRef"
+      :detail-flag.sync="detailFlag"
+    ></detail>
   </div>
 </template>
 <script>
@@ -198,7 +204,7 @@
   } from '@/api/bpm/task';
   import { getDate } from '@/utils/dateUtils';
   import dictMixins from '@/mixins/dictMixins';
-  // import detail from '@/views/bpm/processInstance/detail.vue';
+  import detail from './components/detail.vue';
   // import formDetail from './detail.vue';
   import { getByCode } from '@/api/system/dictionary-data';
   import { getFile } from '@/api/system/file';
@@ -217,16 +223,15 @@
   export default {
     name: 'index',
     components: {
-      addDialog
-      // detail,
-      // formDetail
+      addDialog,
+      detail
     },
     mixins: [dictMixins, tabMixins],
     data() {
       return {
         cacheKeyUrl: 'wt-eaf1548b-collaborative',
         addFlag: false,
-        formDetailDialogFlag: false,
+        detailFlag: false,
         templateList: {},
         dictList: {},
         defaultTemplateList: [],
@@ -311,16 +316,16 @@
             showOverflowTooltip: true,
             minWidth: 120
           },
-          {
-            columnKey: 'action',
-            label: '操作',
-            width: 100,
-            align: 'center',
-            resizable: false,
-            slot: 'action',
-            showOverflowTooltip: true,
-            fixed: 'right'
-          }
+          // {
+          //   columnKey: 'action',
+          //   label: '操作',
+          //   width: 100,
+          //   align: 'center',
+          //   resizable: false,
+          //   slot: 'action',
+          //   showOverflowTooltip: true,
+          //   fixed: 'right'
+          // }
         ];
       },
       getUserName() {
@@ -455,7 +460,7 @@
       },
       /**  */
       handleDetail(row) {
-        this.formDetailDialogFlag = true;
+        this.detailFlag = true;
         this.$nextTick(() => {
           this.$refs.formDetailDialogRef.open(row);
         });

+ 1 - 1
src/views/saleManage/saleOrder/components/addDialog.vue

@@ -537,7 +537,7 @@
       @reload="reload"
       :callBack="callBack"
     ></process-submit-dialog>
-    <bomDialog ref="bomDialogRef" @handleSubmit="bomDialogSuccess"></bomDialog>
+    <bomDialog ref="bomDialogRef" @handleSubmit="bomDialogSuccess" @reload="reload"></bomDialog>
     <saleOrderListDialog
       ref="saleOrderListDialogRef"
       :isMy="true"

+ 21 - 3
src/views/saleManage/saleOrder/components/bomDialog.vue

@@ -7,7 +7,7 @@
     :close-on-click-modal="false"
     :append-to-body="true"
     width="70%"
-    @close="cancel"
+    @close="isCloseRefresh ? cancel : cancel1"
     :maxable="true"
     :resizable="true"
     title="确认属性类型"
@@ -170,7 +170,7 @@
 
     <div slot="footer" class="footer">
       <el-button type="primary" @click="save" v-click-once>确认</el-button>
-      <el-button @click="cancel">返回</el-button>
+      <el-button @click="isCloseRefresh ? cancel() : cancel1()">返回</el-button>
     </div>
     <timeDialog
       @chooseTime="chooseTime"
@@ -206,6 +206,17 @@
   };
   export default {
     components: { timeDialog },
+    props: {
+      // 关闭弹窗时是否刷新列表
+      isCloseRefresh: {
+        type: Boolean,
+        default: true
+      },
+      type: {
+        type: String,
+        default: ''
+      }
+    },
     data() {
       return {
         tableList: [],
@@ -509,9 +520,16 @@
           return this.$message.warning('请选择属性类型');
         }
         this.$emit('handleSubmit', this.tableList);
-        this.cancel();
+        this.cancel1();
       },
       cancel() {
+        console.log('isCloseRefresh~~~', this.isCloseRefresh)
+        this.$emit('reload');
+        this.visible = false;
+        this.tableList = [];
+      },
+      cancel1() {
+        console.log('isCloseRefresh~~~~~~~1', this.isCloseRefresh)
         this.visible = false;
         this.tableList = [];
       }

+ 1 - 1
src/views/saleManage/saleOrder/index.vue

@@ -343,7 +343,7 @@
       fileName="销售订单导入模板"
       apiUrl="/eom/saleorder/importFile"
     />
-    <bomDialog ref="bomDialogRef" @handleSubmit="bomDialogSuccess"></bomDialog>
+    <bomDialog ref="bomDialogRef" :isCloseRefresh="false" @handleSubmit="bomDialogSuccess" @reload="reload"></bomDialog>
     <opportunityDetail ref="opportunityDetailRef"></opportunityDetail>
     <quotationDetail ref="quotationDetailRef"></quotationDetail>
     <addEntrustedReceive