| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261 |
- <template>
- <ele-modal
- custom-class="ele-dialog-form long-dialog-form"
- :centered="true"
- :visible.sync="visible"
- v-if="visible"
- title="详情"
- :append-to-body="true"
- :close-on-click-modal="false"
- :maxable="true"
- :resizable="true"
- width="70%"
- >
- <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-show="activeComp === 'main'">
- <!-- <div class="row">主题: {{ form.businessName }}</div>
- <div class="row">提交人: {{ form.processInstance?.startUserNickname }}</div>
- <div class="row">提交时间: {{ form.createTime }}</div> -->
- <fm-generate-form
- v-if="Object.keys(form?.formJson || {}).length !== 0"
- :data="jsonData"
- :value="form.valueJson"
- :edit="false"
- ref="generateForm"
- >
- <template v-slot:blank_adopzrdd="scope">
- <div v-for="(item, index) in scope.model.blank_adopzrdd" :key="index">
- <div class="blank_adopzrdd">
- <span>{{ index + 1 }}报销事项:</span>
- <el-input
- v-model="scope.model.blank_adopzrdd[index].remark"
- type="textarea"
- style="width: calc(100% - 80px)"
- ></el-input>
- </div>
- <div class="blank_adopzrdd">
- <span>金额:</span>
- <el-input
- v-model="scope.model.blank_adopzrdd[index].price"
- type="number"
- style="width: calc(100% - 80px)"
- ></el-input>
- </div>
- </div>
- </template>
- <template v-slot:eom_contact="scope">
- <div class="eom_contact">
- <el-input
- v-model="scope.model.eom_contact.name"
- style="width: 100%"
- :disabled="view"
- ></el-input>
- </div>
- </template>
- <!-- 关联工单 -->
- <template v-slot:manage_workorder="scope">
- <div class="manage_workorder">
- <el-input
- v-model="scope.model.manage_workorder.code"
- style="width: 100%"
- :disabled="view"
- ></el-input>
- </div>
- </template>
- <!-- 差旅 -->
- <template v-slot:blank_business_component="scope">
- <businessComponent
- ref="blank_business_component"
- id="blank_business_component"
- :generateForm="$refs.generateForm"
- :info="scope.model"
- :view="view"
- ></businessComponent>
- </template>
- <!-- 印章使用 -->
- <template v-slot:blank_use_seal="scope">
- <useSealComponent
- ref="blank_use_seal"
- id="blank_use_seal"
- :generateForm="$refs.generateForm"
- :info="scope.model"
- :view="view"
- ></useSealComponent>
- </template>
- <!-- 资质使用 -->
- <template v-slot:blank_use_qualification="scope">
- <useQualificationComponent
- ref="blank_use_qualification"
- id="blank_use_qualification"
- :generateForm="$refs.generateForm"
- :info="scope.model"
- :view="view"
- ></useQualificationComponent>
- </template>
- <!-- 产品规格 -->
- <template v-slot:blank_product_specification="scope">
- <productSpecificationComponent
- ref="blank_product_specification"
- id="blank_product_specification"
- :generateForm="$refs.generateForm"
- :info="scope.model"
- :view="view"
- ></productSpecificationComponent>
- </template>
- <!-- 事件 -->
- <template v-slot:blank_event_component="scope">
- <eventComponent
- ref="blank_event_component"
- id="blank_event_component"
- :generateForm="$refs.generateForm"
- :info="scope.model"
- :view="view"
- ></eventComponent>
- </template>
- <!-- 补发 -->
- <template v-slot:blank_reissue_component="scope">
- <reissueComponent
- ref="blank_reissue_component"
- id="blank_reissue_component"
- :generateForm="$refs.generateForm"
- :info="scope.model"
- :view="view"
- ></reissueComponent>
- </template>
- </fm-generate-form>
- <async-biz-form-component
- v-else
- :businessId="form?.businessId"
- ref="bziRef"
- :isView="true"
- ></async-biz-form-component>
- </div>
- <bpmDetail
- v-if="activeComp === 'bpm' && form.processInstance.id"
- :id="form.processInstance.id"
- ></bpmDetail>
- <div slot="footer" class="footer">
- <el-button @click="visible = false">返回</el-button>
- </div>
- </ele-modal>
- </template>
- <script>
- import bpmDetail from '@/views/bpm/processInstance/detailNew.vue';
- import Vue from 'vue';
- import { getToken } from '@/utils/token-util';
- import businessComponent from '@/BIZComponents/processSubmitDialog/components/businessComponent.vue';
- import useSealComponent from '@/BIZComponents/processSubmitDialog/components/useSealComponent.vue';
- import useQualificationComponent from '@/BIZComponents/processSubmitDialog/components/useQualificationComponent.vue';
- import productSpecificationComponent from '@/BIZComponents/processSubmitDialog/components/productSpecificationComponent.vue';
- import eventComponent from '@/BIZComponents/processSubmitDialog/components/eventComponent.vue';
- import reissueComponent from '@/BIZComponents/processSubmitDialog/components/reissueComponent.vue';
- export default {
- components: {
- bpmDetail,
- businessComponent,
- useSealComponent,
- useQualificationComponent,
- productSpecificationComponent,
- eventComponent,
- reissueComponent
- },
- data() {
- return {
- activeComp: 'main',
- form: {
- processInstance: {}
- },
- tabOptions: [
- { key: 'main', name: '业务详情' },
- { key: 'bpm', name: '流程详情' }
- ],
- visible: false,
- jsonData: {}
- };
- },
- methods: {
- async open(row) {
- this.form = _.cloneDeep(row);
- if (this.form?.formJson?.makingJson) {
- this.jsonData = JSON.parse(this.form.formJson.makingJson);
- this.jsonData.config.dataSource &&
- this.jsonData.config.dataSource.forEach((item) => {
- item.headers = {
- Authorization: getToken()
- };
- });
- }
- this.activeComp = 'main';
- this.visible = true;
- console.log('this.form.pcViewRouter', this.form.pcViewRouter);
- Vue.component('async-biz-form-component', (resolve) => {
- require([`@/views${this.form.pcViewRouter}`], resolve);
- });
- },
- cancel() {
- this.$nextTick(() => {
- this.form = {};
- this.visible = false;
- });
- }
- }
- };
- </script>
- <style scoped lang="scss">
- .ele-dialog-form {
- .el-form-item {
- margin-bottom: 10px;
- }
- }
- .headbox {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .amount {
- font-size: 14px;
- font-weight: bold;
- }
- }
- .blank_adopzrdd {
- display: flex;
- align-items: center;
- > span {
- display: inline-block;
- width: 80px;
- }
- margin-bottom: 10px;
- }
- .row {
- margin-bottom: 10px;
- margin-top: 10px;
- margin-left: 10px;
- }
- </style>
|