8f3c06d1 by lxs

Merge branch 'develop' into release-test

2 parents d30c0b77 810718ac
...@@ -12,6 +12,7 @@ declare module '@vue/runtime-core' { ...@@ -12,6 +12,7 @@ declare module '@vue/runtime-core' {
12 ApprovalProcess: typeof import('./src/components/ApprovalProcess/src/ApprovalProcess.vue')['default'] 12 ApprovalProcess: typeof import('./src/components/ApprovalProcess/src/ApprovalProcess.vue')['default']
13 Auth: typeof import('./src/components/Auth/index.vue')['default'] 13 Auth: typeof import('./src/components/Auth/index.vue')['default']
14 AuthAll: typeof import('./src/components/AuthAll/index.vue')['default'] 14 AuthAll: typeof import('./src/components/AuthAll/index.vue')['default']
15 CarouselPanel: typeof import('./src/components/CarouselPanel/src/CarouselPanel.vue')['default']
15 ContentWrap: typeof import('./src/components/ContentWrap/src/ContentWrap.vue')['default'] 16 ContentWrap: typeof import('./src/components/ContentWrap/src/ContentWrap.vue')['default']
16 Copyright: typeof import('./src/components/Copyright/index.vue')['default'] 17 Copyright: typeof import('./src/components/Copyright/index.vue')['default']
17 Day: typeof import('./src/components/Schedule/component/day.vue')['default'] 18 Day: typeof import('./src/components/Schedule/component/day.vue')['default']
......
1 import CarouselPanel from './src/CarouselPanel.vue'
2
3 export { CarouselPanel }
1 <script setup lang="ts">
2 import { ElCarousel, ElCarouselItem } from "element-plus";
3 import { CaretBottom, CaretRight } from "@element-plus/icons-vue";
4
5 const props = defineProps({
6 carouselInfo: {
7 type: Object,
8 default: () => { },
9 },
10 });
11
12 const emits = defineEmits(["carouselChange"]);
13
14 const carouselChange = (current: number, prev: number) => {
15 emits("carouselChange", current);
16 };
17
18 </script>
19
20 <template>
21 <el-carousel :height="carouselInfo.height ?? '150px'" :indicator-position="carouselInfo.indicatorPosition ?? 'none'"
22 :arrow="carouselInfo.arrow ?? 'hover'" :trigger="carouselInfo.trigger ?? 'hover'" :loop="carouselInfo.loop ?? true"
23 :autoplay="carouselInfo.autoplay ?? true" :initial-index="carouselInfo.initialIndex ?? 0" @change="carouselChange">
24 <el-carousel-item class="carousel-item" :class="[carouselInfo.itemClass]" v-for="(item, i) in carouselInfo.list" :key="'carousel' + i">
25 <slot :carousel="item"></slot>
26 </el-carousel-item>
27 </el-carousel>
28 </template>
29
30 <style lang="scss" scoped></style>
...@@ -1041,7 +1041,8 @@ const panelChange = (scope, row) => { ...@@ -1041,7 +1041,8 @@ const panelChange = (scope, row) => {
1041 :placeholder="group.placeholder" :clearable="group.clearable" 1041 :placeholder="group.placeholder" :clearable="group.clearable"
1042 :disabled="group.disabled || readonly" :filterable="group.filterable" 1042 :disabled="group.disabled || readonly" :filterable="group.filterable"
1043 :multiple="group.multiple ?? false" :collapse-tags="group.collapse ?? false" 1043 :multiple="group.multiple ?? false" :collapse-tags="group.collapse ?? false"
1044 :collapse-tags-tooltip="group.tagsTooltip ?? false" 1044 :collapse-tags-tooltip="group.tagsTooltip ?? false" :allow-create="group.allowCreate ?? false"
1045 :default-first-option="group.allowCreate ?? false"
1045 @change="(val) => selectChange(val, group)"> 1046 @change="(val) => selectChange(val, group)">
1046 <el-option v-for="opts in group.options" 1047 <el-option v-for="opts in group.options"
1047 :label="group.props?.label ? opts[group.props.label] : opts.label" 1048 :label="group.props?.label ? opts[group.props.label] : opts.label"
......
...@@ -12,6 +12,7 @@ declare module '@vue/runtime-core' { ...@@ -12,6 +12,7 @@ declare module '@vue/runtime-core' {
12 ApprovalProcess: typeof import('./../components/ApprovalProcess/src/ApprovalProcess.vue')['default'] 12 ApprovalProcess: typeof import('./../components/ApprovalProcess/src/ApprovalProcess.vue')['default']
13 Auth: typeof import('./../components/Auth/index.vue')['default'] 13 Auth: typeof import('./../components/Auth/index.vue')['default']
14 AuthAll: typeof import('./../components/AuthAll/index.vue')['default'] 14 AuthAll: typeof import('./../components/AuthAll/index.vue')['default']
15 CarouselPanel: typeof import('./../components/CarouselPanel/src/CarouselPanel.vue')['default']
15 ContentWrap: typeof import('./../components/ContentWrap/src/ContentWrap.vue')['default'] 16 ContentWrap: typeof import('./../components/ContentWrap/src/ContentWrap.vue')['default']
16 Copyright: typeof import('./../components/Copyright/index.vue')['default'] 17 Copyright: typeof import('./../components/Copyright/index.vue')['default']
17 Day: typeof import('./../components/Schedule/component/day.vue')['default'] 18 Day: typeof import('./../components/Schedule/component/day.vue')['default']
......
...@@ -1249,15 +1249,15 @@ const formattedDate = (dateVal) => { ...@@ -1249,15 +1249,15 @@ const formattedDate = (dateVal) => {
1249 (assetDetailInfo.updateFrequency?.includes(7) ? ((assetDetailInfo.updateFrequencyName > 1 ? ',' : '') 1249 (assetDetailInfo.updateFrequency?.includes(7) ? ((assetDetailInfo.updateFrequencyName > 1 ? ',' : '')
1250 + assetDetailInfo.updateFrequencyOther) : '')) ?? '--' }}</span> 1250 + assetDetailInfo.updateFrequencyOther) : '')) ?? '--' }}</span>
1251 </div> 1251 </div>
1252 <div class="list_item">
1253 <span class="item_label">是否完成质量评估:</span>
1254 <span class="item_value">{{ assetDetailInfo.isQualityAssessment == 'Y' ? '是' : '否' }}</span>
1255 </div>
1256 <div class="list_item" v-if="(detailType == 'asset' && assetDetailInfo.isQualityAssessment == 'Y')"> 1252 <div class="list_item" v-if="(detailType == 'asset' && assetDetailInfo.isQualityAssessment == 'Y')">
1257 <span class="item_label">质量评估机构:</span> 1253 <span class="item_label">质量评估机构:</span>
1258 <span class="item_value">{{ assetDetailInfo.registerAttachment.qualityEvaluationInstitution || '--' 1254 <span class="item_value">{{ assetDetailInfo.registerAttachment.qualityEvaluationInstitution || '--'
1259 }}</span> 1255 }}</span>
1260 </div> 1256 </div>
1257 <div class="list_item" v-else-if="assetDetailInfo.isQualityAssessment != 'Y'">
1258 <span class="item_label">是否完成质量评估:</span>
1259 <span class="item_value">{{ assetDetailInfo.isQualityAssessment == 'Y' ? '是' : '否' }}</span>
1260 </div>
1261 <div class="list_item"> 1261 <div class="list_item">
1262 <span class="item_label">病例总数():</span> 1262 <span class="item_label">病例总数():</span>
1263 <span class="item_value">{{ assetDetailInfo.caseNumber ? changeNum(assetDetailInfo.caseNumber, 0) : '--' 1263 <span class="item_value">{{ assetDetailInfo.caseNumber ? changeNum(assetDetailInfo.caseNumber, 0) : '--'
...@@ -1289,15 +1289,15 @@ const formattedDate = (dateVal) => { ...@@ -1289,15 +1289,15 @@ const formattedDate = (dateVal) => {
1289 <span class="item_value">{{ assetDetailInfo.isRegistered == 'N' ? '无' : 1289 <span class="item_value">{{ assetDetailInfo.isRegistered == 'N' ? '无' :
1290 (assetDetailInfo.registeredExchangeName?.join(',') ?? '--') }}</span> 1290 (assetDetailInfo.registeredExchangeName?.join(',') ?? '--') }}</span>
1291 </div> 1291 </div>
1292 <div class="list_item">
1293 <span class="item_label">是否完成价值评估:</span>
1294 <span class="item_value">{{ assetDetailInfo.isCostAssessment == 'Y' ? '是' : '否' }}</span>
1295 </div>
1296 <div class="list_item" v-if="(detailType == 'asset' && assetDetailInfo.isCostAssessment == 'Y')"> 1292 <div class="list_item" v-if="(detailType == 'asset' && assetDetailInfo.isCostAssessment == 'Y')">
1297 <span class="item_label">价值评估机构:</span> 1293 <span class="item_label">价值评估机构:</span>
1298 <span class="item_value">{{ assetDetailInfo.registerAttachment.costAssessmentInstitution || '--' 1294 <span class="item_value">{{ assetDetailInfo.registerAttachment.costAssessmentInstitution || '--'
1299 }}</span> 1295 }}</span>
1300 </div> 1296 </div>
1297 <div class="list_item" v-else-if="assetDetailInfo.isCostAssessment != 'Y'">
1298 <span class="item_label">是否完成价值评估:</span>
1299 <span class="item_value">{{ assetDetailInfo.isCostAssessment == 'Y' ? '是' : '否' }}</span>
1300 </div>
1301 <div class="list_item"> 1301 <div class="list_item">
1302 <span class="item_label">资产类型:</span> 1302 <span class="item_label">资产类型:</span>
1303 <span class="item_value">{{ assetDetailInfo.damTypeName || '--' }}</span> 1303 <span class="item_value">{{ assetDetailInfo.damTypeName || '--' }}</span>
...@@ -1437,7 +1437,44 @@ const formattedDate = (dateVal) => { ...@@ -1437,7 +1437,44 @@ const formattedDate = (dateVal) => {
1437 </div> 1437 </div>
1438 </span> 1438 </span>
1439 </div> 1439 </div>
1440 1440 <div class="list_item is_block isFile" :style="{ width: '40%', 'margin-right': '28px' }"
1441 v-if="detailType == 'asset' && assetDetailInfo.registerAttachment?.commitmentLetter?.length">
1442 <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">承诺函附件</span>
1443 <span v-for="(item) in (assetDetailInfo.registerAttachment?.commitmentLetter || [])" class="item_value"
1444 :style="{ 'padding-left': '0px' }">
1445 <div class="file-operate">
1446 <template
1447 v-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'xls' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'xlsx' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'csv'">
1448 <img class="file-img" src="../../assets/images/excel.png" />
1449 </template>
1450 <template
1451 v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'doc' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'docx'">
1452 <img class="file-img" src="../../assets/images/word.png" />
1453 </template>
1454 <template v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'zip'">
1455 <img class="file-img" src="../../assets/images/zip.png" />
1456 </template>
1457 <template v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'rar'">
1458 <img class="file-img" src="../../assets/images/RAR.png" />
1459 </template>
1460 <template v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'pdf'">
1461 <img class="file-img" src="../../assets/images/PDF.png" />
1462 </template>
1463 <template v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'png'">
1464 <img class="file-img" src="../../assets/images/png.png" />
1465 </template>
1466 <template
1467 v-else-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpg' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpeg'">
1468 <img class="file-img" src="../../assets/images/jpg.png" />
1469 </template>
1470 <div class="file-name">{{ item.name }}</div>
1471 <div :style="{ right: '36px' }"
1472 v-if="item.name.substring(item.name.lastIndexOf('.') + 1) == 'pdf' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'png' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpg' || item.name.substring(item.name.lastIndexOf('.') + 1) == 'jpeg'"
1473 class="file-preview" @click="onUploadFilePreview(item)">查看</div>
1474 <div :style="{ right: '0px' }" class="file-preview" @click="onUploadFileDownload(item)">下载</div>
1475 </div>
1476 </span>
1477 </div>
1441 <div class="list_item is_block isFile" :style="{ width: '40%' }" 1478 <div class="list_item is_block isFile" :style="{ width: '40%' }"
1442 v-if="(detailType == 'asset' && assetDetailInfo.isQualityAssessment == 'Y') && assetDetailInfo.registerAttachment?.evaluationFile?.length"> 1479 v-if="(detailType == 'asset' && assetDetailInfo.isQualityAssessment == 'Y') && assetDetailInfo.registerAttachment?.evaluationFile?.length">
1443 <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">质量评估报告</span> 1480 <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">质量评估报告</span>
...@@ -1594,7 +1631,7 @@ const formattedDate = (dateVal) => { ...@@ -1594,7 +1631,7 @@ const formattedDate = (dateVal) => {
1594 </span> 1631 </span>
1595 </div> 1632 </div>
1596 <div class="list_item is_block isFile" :style="{ width: '40%', 'margin-right': '28px' }" 1633 <div class="list_item is_block isFile" :style="{ width: '40%', 'margin-right': '28px' }"
1597 v-if="assetDetailInfo.registerAttachment?.commitmentLetter?.length"> 1634 v-if="detailType !='asset' && assetDetailInfo.registerAttachment?.commitmentLetter?.length">
1598 <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">承诺函附件</span> 1635 <span class="item_label" :style="{ width: 'auto', 'text-align': 'left' }">承诺函附件</span>
1599 <span v-for="(item) in (assetDetailInfo.registerAttachment?.commitmentLetter || [])" class="item_value" 1636 <span v-for="(item) in (assetDetailInfo.registerAttachment?.commitmentLetter || [])" class="item_value"
1600 :style="{ 'padding-left': '0px' }"> 1637 :style="{ 'padding-left': '0px' }">
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
6 import { ref } from 'vue'; 6 import { ref } from 'vue';
7 import TableTools from "@/components/Tools/table_tools.vue"; 7 import TableTools from "@/components/Tools/table_tools.vue";
8 import { ElMessage, ElMessageBox } from 'element-plus'; 8 import { ElMessage, ElMessageBox } from 'element-plus';
9 import { CarouselPanel } from '@/components/CarouselPanel';
9 import { useRouter, useRoute } from "vue-router"; 10 import { useRouter, useRoute } from "vue-router";
10 import { MoreFilled } from "@element-plus/icons-vue"; 11 import { MoreFilled } from "@element-plus/icons-vue";
11 import { changeNum, tagMethod, tagType, } from "@/utils/common"; 12 import { changeNum, tagMethod, tagType, } from "@/utils/common";
...@@ -26,6 +27,14 @@ const path = route.path; ...@@ -26,6 +27,14 @@ const path = route.path;
26 27
27 const loading = ref(false); 28 const loading = ref(false);
28 const defaultItemLogo = new URL('@/assets/images/home-finance-product.png', import.meta.url).href 29 const defaultItemLogo = new URL('@/assets/images/home-finance-product.png', import.meta.url).href
30 const carouselInfo: any = ref({
31 list: [],
32 height: '176px',
33 loop: false,
34 autoplay: false,
35 arrow: 'hover',
36 itemClass: 'list-content'
37 })
29 const exchangeList: any = ref([]); 38 const exchangeList: any = ref([]);
30 const exchangGuid = ref(''); 39 const exchangGuid = ref('');
31 const searchItemList = ref([ 40 const searchItemList = ref([
...@@ -131,18 +140,8 @@ const tableFields = ref([{ label: "序号", type: "index", width: 56, align: "ce ...@@ -131,18 +140,8 @@ const tableFields = ref([{ label: "序号", type: "index", width: 56, align: "ce
131 { label: "修改人", field: "updateUserName", width: 140 }, 140 { label: "修改人", field: "updateUserName", width: 140 },
132 { label: "修改时间", field: "updateTime", width: 180 }]); 141 { label: "修改时间", field: "updateTime", width: 180 }]);
133 142
134 /** 是否时企业端。不是企业端,则是服务端。 */
135 const isCompanyPlatform = ref(userData.tenantType == 1);
136
137 const listDataLoading = ref(false);
138
139 const activeListType = ref('list');
140
141 const listData: any = ref([]); 143 const listData: any = ref([]);
142 144
143 /** 记录点击省略号弹出菜单的visible */
144 const cardBtnVisible: any = ref(false);
145
146 const tableInfo = ref({ 145 const tableInfo = ref({
147 id: 'asset-data-table', 146 id: 'asset-data-table',
148 rowKey: 'guid', 147 rowKey: 'guid',
...@@ -343,7 +342,12 @@ const getTableData = () => { ...@@ -343,7 +342,12 @@ const getTableData = () => {
343 const getExchangeData = () => { 342 const getExchangeData = () => {
344 getExchangeList().then((res: any) => { 343 getExchangeList().then((res: any) => {
345 if (res.code == proxy.$passCode) { 344 if (res.code == proxy.$passCode) {
346 exchangeList.value = res.data || []; 345 const data = res.data || [];
346 while (data.length) {
347 exchangeList.value.push(data.splice(0, 4));
348 }
349 carouselInfo.value.list = exchangeList.value;
350 carouselInfo.value.arrow = exchangeList.value.length > 1 ? 'hover' : 'never';
347 } else { 351 } else {
348 ElMessage.error(res.msg); 352 ElMessage.error(res.msg);
349 } 353 }
...@@ -530,9 +534,10 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -530,9 +534,10 @@ const rejectDialogBtnClick = (btn, info) => {
530 <TableTools :searchItems="searchItemList" :searchId="'register-data-search'" @search="toSearch" /> 534 <TableTools :searchItems="searchItemList" :searchId="'register-data-search'" @search="toSearch" />
531 </div> 535 </div>
532 <div class="content_main_wrap"> 536 <div class="content_main_wrap">
533 <div class="list-content"> 537 <CarouselPanel :carousel-info="carouselInfo">
534 <template v-for="(item, i) in exchangeList" :key="item.exchangeGuid"> 538 <template v-slot:default="{ carousel }">
535 <div class="card-content" :class="{ active: exchangGuid == item.exchangeGuid }"> 539 <div class="card-content" v-for="(item, i) in carousel" :key="'item-' + i"
540 :class="{ active: exchangGuid == item.exchangeGuid, mr8: i < carousel.length - 1 && (i + 1) % 4 !== 0 }">
536 <div class="header"> 541 <div class="header">
537 <img class="left-img" 542 <img class="left-img"
538 :src="(item.picUrl && typeof item.picUrl == 'string') ? item.picUrl : defaultItemLogo" alt="" /> 543 :src="(item.picUrl && typeof item.picUrl == 'string') ? item.picUrl : defaultItemLogo" alt="" />
...@@ -556,9 +561,8 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -556,9 +561,8 @@ const rejectDialogBtnClick = (btn, info) => {
556 <div class="left-btn is_block" @click="btnClick({ value: 'create', ...item })">资产登记</div> 561 <div class="left-btn is_block" @click="btnClick({ value: 'create', ...item })">资产登记</div>
557 </div> 562 </div>
558 </div> 563 </div>
559 <div v-if="i < exchangeList.length - 1" class="space_partition"></div>
560 </template> 564 </template>
561 </div> 565 </CarouselPanel>
562 <div class="table_panel_wrap"> 566 <div class="table_panel_wrap">
563 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" /> 567 <Table :tableInfo="tableInfo" @tableBtnClick="tableBtnClick" />
564 <PageNav :class="[pageInfo.type]" :pageInfo="pageInfo" @pageChange="pageChange" /> 568 <PageNav :class="[pageInfo.type]" :pageInfo="pageInfo" @pageChange="pageChange" />
...@@ -572,7 +576,6 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -572,7 +576,6 @@ const rejectDialogBtnClick = (btn, info) => {
572 <style scoped lang="scss"> 576 <style scoped lang="scss">
573 .container_wrap { 577 .container_wrap {
574 padding: 0 16px; 578 padding: 0 16px;
575 overflow: hidden auto;
576 579
577 .table_tool_wrap { 580 .table_tool_wrap {
578 height: 44px; 581 height: 44px;
...@@ -586,8 +589,7 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -586,8 +589,7 @@ const rejectDialogBtnClick = (btn, info) => {
586 } 589 }
587 590
588 .table_panel_wrap { 591 .table_panel_wrap {
589 flex: 1; 592 height: calc(100% - 176px);
590 height: auto;
591 } 593 }
592 } 594 }
593 595
...@@ -724,21 +726,32 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -724,21 +726,32 @@ const rejectDialogBtnClick = (btn, info) => {
724 } 726 }
725 } 727 }
726 728
729 .list-content-wrap {
730 position: relative;
731 }
732
727 .list-content { 733 .list-content {
728 display: flex; 734 width: 100%;
729 flex-wrap: wrap; 735 height: 176px;
736 overflow: hidden;
730 737
731 .card-content { 738 .card-content {
732 width: calc(25% - 6px); 739 width: calc(25% - 6px);
733 padding: 16px; 740 padding: 16px;
734 box-shadow: 0 0 0 1px #d9d9d9;
735 margin-bottom: 8px; 741 margin-bottom: 8px;
742 min-width: 325px;
736 max-width: 400px; 743 max-width: 400px;
744 border: 1px solid var(--el-border-color-regular);
745 float: left;
737 746
738 &.active { 747 &.active {
739 box-shadow: 0 0 0 1px var(--el-color-primary); 748 box-shadow: 0 0 0 1px var(--el-color-primary);
740 } 749 }
741 750
751 &.mr8 {
752 margin-right: 8px;
753 }
754
742 .header { 755 .header {
743 display: flex; 756 display: flex;
744 margin-bottom: 16px; 757 margin-bottom: 16px;
...@@ -817,9 +830,5 @@ const rejectDialogBtnClick = (btn, info) => { ...@@ -817,9 +830,5 @@ const rejectDialogBtnClick = (btn, info) => {
817 } 830 }
818 } 831 }
819 } 832 }
820
821 .space_partition {
822 width: 8px;
823 }
824 } 833 }
825 </style> 834 </style>
......
...@@ -271,31 +271,26 @@ const setBaseFormItemsValue = (info) => { ...@@ -271,31 +271,26 @@ const setBaseFormItemsValue = (info) => {
271 } else { 271 } else {
272 item.children[1].visible = false; 272 item.children[1].visible = false;
273 } 273 }
274 } else if (item.field === 'costAssessmentInstitutionGuid') { 274 } else if (item.field == 'quality') {
275 item.default = attach.costAssessmentInstitutionGuid ? attach.costAssessmentInstitutionGuid : (attach.costAssessmentInstitution || info.costAssessmentInstitutionGuid); 275 item.children[0].default = info['isQualityAssessment'];
276 } else if (item.field === 'qualityEvaluationInstitutionGuid') { 276 item.children[1].default = attach.qualityEvaluationInstitutionGuid ? attach.qualityEvaluationInstitutionGuid : (attach.qualityEvaluationInstitution || info.qualityEvaluationInstitutionGuid);
277 item.default = attach.qualityEvaluationInstitutionGuid ? attach.qualityEvaluationInstitutionGuid : (attach.qualityEvaluationInstitution || info.qualityEvaluationInstitutionGuid); 277 if (info['isQualityAssessment'] == 'Y') {
278 } 278 item.children[1].visible = true;
279 else if (item.field == 'isQualityAssessment') {
280 item.default = info[item.field];
281 let quality = baseFormItems.value.find(item => item.field == 'qualityEvaluationInstitutionGuid');
282 if (info['isQualityAssessment'] === 'Y') {
283 quality && (quality.visible = true);
284 uploadFormItems.value[1].visible = true;
285 } else {
286 quality && (quality.visible = false);
287 uploadFormItems.value[1].visible = false;
288 }
289 } else if (item.field == 'isCostAssessment') {
290 item.default = info[item.field];
291 let quality = baseFormItems.value.find(item => item.field == 'costAssessmentInstitutionGuid');
292 if (info['isCostAssessment'] === 'Y') {
293 quality && (quality.visible = true);
294 uploadFormItems.value[2].visible = true; 279 uploadFormItems.value[2].visible = true;
295 } else { 280 } else {
296 quality && (quality.visible = false); 281 item.children[1].visible = false;
297 uploadFormItems.value[2].visible = false; 282 uploadFormItems.value[2].visible = false;
298 } 283 }
284 } else if (item.field == 'cost') {
285 item.children[0].default = info['isCostAssessment'];
286 item.children[1].default = attach.costAssessmentInstitutionGuid ? attach.costAssessmentInstitutionGuid : (attach.costAssessmentInstitution || info.costAssessmentInstitutionGuid);
287 if (info['isCostAssessment'] == 'Y') {
288 item.children[1].visible = true;
289 uploadFormItems.value[3].visible = true;
290 } else {
291 item.children[1].visible = false;
292 uploadFormItems.value[3].visible = false;
293 }
299 } else { 294 } else {
300 item.default = info[item.field]; 295 item.default = info[item.field];
301 } 296 }
...@@ -648,79 +643,97 @@ const baseFormItems: any = ref([ ...@@ -648,79 +643,97 @@ const baseFormItems: any = ref([
648 }, 643 },
649 { 644 {
650 label: "是否完成质量评估", 645 label: "是否完成质量评估",
651 type: "radio-group", 646 type: "input-group",
652 placeholder: "", 647 field: "quality",
648 default: "",
649 children: [
650 {
651 type: "select",
652 placeholder: "请选择",
653 field: "isQualityAssessment", 653 field: "isQualityAssessment",
654 default: 'N', 654 default: "N",
655 col: "w100px",
655 options: [ 656 options: [
656 { 657 {
657 label: "是", 658 label: "否",
658 value: 'Y', 659 value: "N",
659 }, 660 },
660 { 661 {
661 label: "否", 662 label: "是",
662 value: 'N', 663 value: "Y",
663 }, 664 },
664 ], 665 ],
665 required: true, 666 required: true,
666 }, 667 },
667 { 668 {
668 label: '质量评估机构', 669 label: "",
669 type: 'select', 670 type: "select",
670 placeholder: '请选择', 671 placeholder: "质量评估机构",
671 field: 'qualityEvaluationInstitutionGuid', 672 col: "w60 no-margin-r",
672 default: '', 673 field: "qualityEvaluationInstitutionGuid",
673 options: [], 674 default: [],
675 // index: 0,
674 props: { 676 props: {
675 label: 'tenantName', 677 label: 'tenantName',
676 value: 'guid' 678 value: 'guid'
677 }, 679 },
678 required: true, 680 options: [],
679 filterable: true, 681 filterable: true,
680 allowCreate: true, 682 allowCreate: true,
681 clearable: true, 683 clearable: true,
682 style: {
683 width: 'calc(33.33% - 6px)!important'
684 },
685 visible: false, 684 visible: false,
685 required: true,
686 },
687 ],
688 clearable: true,
689 required: true,
686 }, 690 },
687 { 691 {
688 label: "是否完成价值评估", 692 label: "是否完成价值评估",
689 type: "radio-group", 693 type: "input-group",
690 placeholder: "", 694 field: "cost",
695 default: "",
696 children: [
697 {
698 type: "select",
699 placeholder: "请选择",
691 field: "isCostAssessment", 700 field: "isCostAssessment",
692 default: 'N', 701 default: "N",
702 col: "w100px",
693 options: [ 703 options: [
694 { 704 {
695 label: "是", 705 label: "否",
696 value: 'Y', 706 value: "N",
697 }, 707 },
698 { 708 {
699 label: "否", 709 label: "是",
700 value: 'N', 710 value: "Y",
701 }, 711 },
702 ], 712 ],
703 required: true, 713 required: true,
704 }, 714 },
705 { 715 {
706 label: '价值评估机构', 716 label: "",
707 type: 'select', 717 type: "select",
708 placeholder: '请选择', 718 placeholder: "价值评估机构",
709 field: 'costAssessmentInstitutionGuid', 719 col: "w60 no-margin-r",
710 default: '', 720 field: "costAssessmentInstitutionGuid",
711 options: [], 721 default: [],
722 // index: 0,
712 props: { 723 props: {
713 label: 'tenantName', 724 label: 'tenantName',
714 value: 'guid' 725 value: 'guid'
715 }, 726 },
716 required: true, 727 options: [],
717 filterable: true, 728 filterable: true,
718 allowCreate: true, 729 allowCreate: true,
719 clearable: true, 730 clearable: true,
720 style: {
721 width: 'calc(33.33% - 6px)!important'
722 },
723 visible: false, 731 visible: false,
732 required: true,
733 },
734 ],
735 clearable: true,
736 required: true,
724 }, 737 },
725 { 738 {
726 label: "数据分类", 739 label: "数据分类",
...@@ -1160,14 +1173,14 @@ const baseSelectChange = (val, item, row) => { ...@@ -1160,14 +1173,14 @@ const baseSelectChange = (val, item, row) => {
1160 getTenantAttach(val).then((res: any) => { 1173 getTenantAttach(val).then((res: any) => {
1161 if (res?.code == proxy.$passCode) { 1174 if (res?.code == proxy.$passCode) {
1162 Object.assign(attachDataInfo.value, res.data || {}); 1175 Object.assign(attachDataInfo.value, res.data || {});
1163 uploadFormItems.value[0].templateUrl = attachDataInfo.value.register_letter; 1176 uploadFormItems.value[0].templateUrl = attachDataInfo.value['register_letter'] || '';
1164 uploadFormItems.value[1].templateUrl = attachDataInfo.value['commitment-letter']; 1177 uploadFormItems.value[1].templateUrl = attachDataInfo.value['commitment-letter'] || '';
1165 setUploadFormItemsValue(row); 1178 setUploadFormItemsValue(row);
1166 } else { 1179 } else {
1167 ElMessage.error(res.msg); 1180 ElMessage.error(res.msg);
1168 } 1181 }
1169 }) 1182 })
1170 } else if (item.field == 'isRegistered') { 1183 } else if (item.field == 'isRegistered' || item.field == 'isQualityAssessment' || item.field == 'isCostAssessment') {
1171 setBaseFormItemsValue(row); 1184 setBaseFormItemsValue(row);
1172 } else if (item.field == 'daName') { 1185 } else if (item.field == 'daName') {
1173 let da = registerCatalogList.value.find(r => r.guid == val); 1186 let da = registerCatalogList.value.find(r => r.guid == val);
...@@ -1602,7 +1615,29 @@ const propertyRadioGroupChange = (val, row, item) => { ...@@ -1602,7 +1615,29 @@ const propertyRadioGroupChange = (val, row, item) => {
1602 const uploadFormRef = ref(); 1615 const uploadFormRef = ref();
1603 const qualityEvaluationInstitution = ref(''); 1616 const qualityEvaluationInstitution = ref('');
1604 const costAssessmentInstitution = ref(''); 1617 const costAssessmentInstitution = ref('');
1605 /** 资产内容 */ 1618 /**
1619 * 资产内容
1620 * options: [{
1621 value: 'register_letter',
1622 label: '数据登记承诺及收集函'
1623 }, {
1624 value: 'quality_evaluation_file',
1625 label: '数据质量评价收集'
1626 }, {
1627 value: 'cost_assessment_file',
1628 label: '数据价值评估收集'
1629 }, {
1630 value: 'commitment_letter',
1631 label: '承诺函附件'
1632 }, {
1633 value: 'authorization_file',
1634 label: '授权文件'
1635 },
1636 {
1637 value: 'detail_file',
1638 label: '商品详细介绍(签章版)'
1639 }]
1640 **/
1606 const uploadFormItems: any = ref([ 1641 const uploadFormItems: any = ref([
1607 { 1642 {
1608 label: '数据登记承诺及收集函', 1643 label: '数据登记承诺及收集函',
...@@ -1614,15 +1649,15 @@ const uploadFormItems: any = ref([ ...@@ -1614,15 +1649,15 @@ const uploadFormItems: any = ref([
1614 field: 'registerLetter', 1649 field: 'registerLetter',
1615 visible: true, 1650 visible: true,
1616 }, 1651 },
1617 // { 1652 {
1618 // label: '承诺函附件', 1653 label: '承诺函附件',
1619 // tip: '支持扩展名:doc .docx .pdf .jpg .png', 1654 tip: '支持扩展名:doc .docx .pdf .jpg .png',
1620 // type: 'upload-file', 1655 type: 'upload-file',
1621 // accept: '.doc, .docx, .pdf, .jpg, .png', 1656 accept: '.doc, .docx, .pdf, .jpg, .png',
1622 // required: false, 1657 required: false,
1623 // default: [], 1658 default: [],
1624 // field: 'commitmentLetter', 1659 field: 'commitmentLetter',
1625 // }, 1660 },
1626 { 1661 {
1627 label: '上传质量评估报告', 1662 label: '上传质量评估报告',
1628 tip: '支持扩展名:.png, .pdf,单个文件不得大于5M', 1663 tip: '支持扩展名:.png, .pdf,单个文件不得大于5M',
...@@ -1643,15 +1678,6 @@ const uploadFormItems: any = ref([ ...@@ -1643,15 +1678,6 @@ const uploadFormItems: any = ref([
1643 field: 'assessmentFile', 1678 field: 'assessmentFile',
1644 visible: false, 1679 visible: false,
1645 }, 1680 },
1646 {
1647 label: '承诺函附件',
1648 tip: '支持扩展名:doc .docx .pdf .jpg .png',
1649 type: 'upload-file',
1650 accept: '.doc, .docx, .pdf, .jpg, .png',
1651 required: false,
1652 default: [],
1653 field: 'commitmentLetter',
1654 },
1655 ]); 1681 ]);
1656 1682
1657 const uploadFormRules = ref({ 1683 const uploadFormRules = ref({
...@@ -2009,11 +2035,11 @@ onBeforeMount(() => { ...@@ -2009,11 +2035,11 @@ onBeforeMount(() => {
2009 }); 2035 });
2010 } 2036 }
2011 if (data.exchangeGuid) { 2037 if (data.exchangeGuid) {
2012 getTenantAttach(userData.tenantGuid).then((res: any) => { 2038 getTenantAttach(data.exchangeGuid).then((res: any) => {
2013 if (res?.code == proxy.$passCode) { 2039 if (res?.code == proxy.$passCode) {
2014 Object.assign(attachDataInfo.value, res.data || {}); 2040 Object.assign(attachDataInfo.value, res.data || {});
2015 uploadFormItems.value[0].templateUrl = attachDataInfo.value.register_letter; 2041 uploadFormItems.value[0].templateUrl = attachDataInfo.value['register_letter'];
2016 uploadFormItems.value[3].templateUrl = attachDataInfo.value['commitment-letter']; 2042 uploadFormItems.value[1].templateUrl = attachDataInfo.value['commitment-letter'];
2017 setUploadFormItemsValue(draftDetailInfo.value); 2043 setUploadFormItemsValue(draftDetailInfo.value);
2018 } else { 2044 } else {
2019 ElMessage.error(res.msg); 2045 ElMessage.error(res.msg);
...@@ -2067,16 +2093,15 @@ onBeforeMount(() => { ...@@ -2067,16 +2093,15 @@ onBeforeMount(() => {
2067 return parentAreaData.value; 2093 return parentAreaData.value;
2068 } 2094 }
2069 }) 2095 })
2070 // getTenantAttach(userData.tenantGuid).then((res: any) => { 2096 getTenantAttach(exGuid).then((res: any) => {
2071 // if (res?.code == proxy.$passCode) { 2097 if (res?.code == proxy.$passCode) {
2072 // console.log(res.data); 2098 Object.assign(attachDataInfo.value, res.data || {});
2073 // Object.assign(attachDataInfo.value, res.data || {}); 2099 uploadFormItems.value[0].templateUrl = attachDataInfo.value['register_letter'];
2074 // uploadFormItems.value[2].templateUrl = attachDataInfo.value.quality_evaluation_file; 2100 uploadFormItems.value[1].templateUrl = attachDataInfo.value['commitment-letter'];
2075 // uploadFormItems.value[3].templateUrl = attachDataInfo.value.cost_assessment_file; 2101 } else {
2076 // } else { 2102 ElMessage.error(res.msg);
2077 // ElMessage.error(res.msg); 2103 }
2078 // } 2104 })
2079 // })
2080 // 获取资产类型 2105 // 获取资产类型
2081 getParamsList({ dictType: '资产类型' }).then((res: any) => { 2106 getParamsList({ dictType: '资产类型' }).then((res: any) => {
2082 if (res.code == proxy.$passCode) { 2107 if (res.code == proxy.$passCode) {
...@@ -2125,8 +2150,8 @@ onBeforeMount(() => { ...@@ -2125,8 +2150,8 @@ onBeforeMount(() => {
2125 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12505" }).then((res: any) => { 2150 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12505" }).then((res: any) => {
2126 if (res.code == proxy.$passCode) { 2151 if (res.code == proxy.$passCode) {
2127 qualityEvaluationData.value = res.data.records || []; 2152 qualityEvaluationData.value = res.data.records || [];
2128 let item = baseFormItems.value.find(item => item.field == 'qualityEvaluationInstitutionGuid'); 2153 let item = baseFormItems.value.find(item => item.field == 'quality');
2129 item && (item.options = qualityEvaluationData.value); 2154 item && (item.children[1].options = qualityEvaluationData.value);
2130 } else { 2155 } else {
2131 proxy.$ElMessage.error(res.msg); 2156 proxy.$ElMessage.error(res.msg);
2132 } 2157 }
...@@ -2135,8 +2160,8 @@ onBeforeMount(() => { ...@@ -2135,8 +2160,8 @@ onBeforeMount(() => {
2135 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12504" }).then((res: any) => { 2160 getSingleList({ pageIndex: -1, pageSize: -1, tenantType: "12504" }).then((res: any) => {
2136 if (res.code == proxy.$passCode) { 2161 if (res.code == proxy.$passCode) {
2137 costAssessmentData.value = res.data.records || []; 2162 costAssessmentData.value = res.data.records || [];
2138 let item = baseFormItems.value.find(item => item.field == 'costAssessmentInstitutionGuid'); 2163 let item = baseFormItems.value.find(item => item.field == 'cost');
2139 item && (item.options = costAssessmentData.value); 2164 item && (item.children[1].options = costAssessmentData.value);
2140 } else { 2165 } else {
2141 proxy.$ElMessage.error(res.msg); 2166 proxy.$ElMessage.error(res.msg);
2142 } 2167 }
......
1 1 <script lang="ts" setup name="entryManagement">
2 2 import { ref, onBeforeMount } from 'vue';
3 <script lang="ts" setup name="entryManagement" >
4 import { ref,onBeforeMount } from 'vue';
5 import { useRoute } from "vue-router" 3 import { useRoute } from "vue-router"
6 import { ElMessage, ElMessageBox } from "element-plus" 4 import { ElMessage, ElMessageBox } from "element-plus"
7 import dayjs from 'dayjs'; 5 import dayjs from 'dayjs';
...@@ -15,6 +13,7 @@ import { ...@@ -15,6 +13,7 @@ import {
15 intableUpdate, 13 intableUpdate,
16 getDocumentList 14 getDocumentList
17 } from "@/api/modules/dataTransaction"; 15 } from "@/api/modules/dataTransaction";
16 import { getDamCatalogTable } from '@/api/modules/dataAsset';
18 const route = useRoute() 17 const route = useRoute()
19 const userStore = useUserStore(); 18 const userStore = useUserStore();
20 const searchItemList = ref([ 19 const searchItemList = ref([
...@@ -29,7 +28,7 @@ const searchItemList = ref([ ...@@ -29,7 +28,7 @@ const searchItemList = ref([
29 ]); 28 ]);
30 const page = ref({ 29 const page = ref({
31 limit: 50, 30 limit: 50,
32 rows:0, 31 rows: 0,
33 curr: 1, 32 curr: 1,
34 sizes: [ 33 sizes: [
35 { label: "10", value: 10 }, 34 { label: "10", value: 10 },
...@@ -45,123 +44,130 @@ const { proxy } = getCurrentInstance() as any; ...@@ -45,123 +44,130 @@ const { proxy } = getCurrentInstance() as any;
45 const tableRef = ref() 44 const tableRef = ref()
46 const tableInfo = ref({ 45 const tableInfo = ref({
47 id: 'entry-asset-table', 46 id: 'entry-asset-table',
48 loading:false, 47 loading: false,
49 isEdit:false, 48 isEdit: false,
50 currentId:"0", 49 currentId: "0",
51 flag:"create", 50 flag: "create",
52 data:[] as any, 51 data: [] as any,
53 }) 52 })
54 53
55 const tableSelectInfo = ref({ 54 const tableSelectInfo = ref({
56 selectValue:"", 55 selectValue: "",
57 daName:"", 56 daName: "",
58 companyGuid:"" 57 companyGuid: ""
59 }) 58 })
60 const columnInfo = ref({ 59 const columnInfo = ref({
61 guid:"", 60 guid: "",
62 companyName:"", 61 companyName: "",
63 daName:"", 62 daName: "",
64 registerTime:"", 63 registerTime: "",
65 daCode:"", 64 daCode: "",
66 effectiveDate:"", 65 effectiveDate: "",
67 intableTime:"", 66 intableTime: "",
68 intableMoney:0, 67 intableMoney: 0,
69 issuingEntityName:"", 68 issuingEntityName: "",
70 issuingEntityGuid:"", 69 issuingEntityGuid: "",
71 companyGuid:"", 70 companyGuid: "",
72 registerGuid:"" 71 registerGuid: ""
73 }) 72 })
74 const companyOption = ref<any>([]) 73 const companyOption = ref<any>([
74 {
75 tenantGuid: JSON.parse(userStore.userData).tenantGuid,
76 tenantName: JSON.parse(userStore.userData).tenantName
77 }
78 ])
75 const assetsOption = ref<any>([]) 79 const assetsOption = ref<any>([])
76 80
77 const colums = [ 81 const colums = [
78 { 82 {
79 type:"index", 83 type: "index",
80 label:"序号", 84 label: "序号",
81 align:"center", 85 align: "center",
82 width:"56" 86 width: "56"
83 }, 87 },
84 { 88 {
85 prop:"companyName", 89 prop: "companyName",
86 label:"公司名称", 90 label: "公司名称",
87 width:"220", 91 width: "220",
88 componentType:"select", 92 componentType: "select",
89 // editDisabled:()=> tableInfo.value.flag==="edit" ? true :false, 93 // editDisabled:()=> tableInfo.value.flag==="edit" ? true :false,
90 selectKey:"tenantName", 94 selectKey: "tenantName",
91 selectOption:() => companyOption.value 95 selectOption: () => companyOption.value
92 }, 96 },
93 { 97 {
94 prop:"daName", 98 prop: "intableTime",
95 label:"资产名称", 99 label: "入表时间",
96 width:"180", 100 width: "130",
97 componentType:"select", 101 componentType: "dateTime",
98 componentDisabled:false, 102 componentDisabled: false
99 //editDisabled:()=> tableInfo.value.flag==="edit" ? true :false,
100 selectOption:() => assetsOption.value ,
101 selectKey:"daName",
102 }, 103 },
103 { 104 {
104 prop:"daCode", 105 prop: "intableMoney",
105 label:"资产编号", 106 label: "入表金额(万元)",
106 width:"180" 107 width: "200",
108 componentType: "number",
109 toFixed: true,
110 placeholder: "0.00",
111 align: "right",
112 config: {
113 controls: false,
114 precision: 0
107 }, 115 },
108 { 116 componentDisabled: false,
109 prop:"registerTime", 117 input: (value, key, info) => {
110 label:"登记时间", 118 tableRef.value.columnInfo[key] = tableRef.value.columnInfo[key].toString().replace(/[^\d.]/g, "")
111 width:"130", 119 tableRef.value.columnInfo[key] = tableRef.value.columnInfo[key].toString().replace(/\.{2,}/g, ".")
112 componentType:"dateTime", 120 tableRef.value.columnInfo[key] = tableRef.value.columnInfo[key].toString().replace(".", "$#$").replace(/\./g, "").replace("$#$", ".")
121 tableRef.value.columnInfo[key] = tableRef.value.columnInfo[key].toString().replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")
122 tableRef.value.columnInfo[key] = tableRef.value.columnInfo[key].toString().replace(/^\D*(\d{0,12}(?:\.\d{0,6})?).*$/g, "$1")
123 },
124 change: (value, key, info) => {
125 let strArr = value.split(".")
126 if (strArr.length > 1) {
127 let right = strArr[1]
128 if (right === '' || right.length < 2) {
129 tableRef.value.columnInfo[key] = parseFloat(tableRef.value.columnInfo[key] || 0).toFixed(2)
130 }
131 } else {
132 tableRef.value.columnInfo[key] = parseFloat(tableRef.value.columnInfo[key] || 0).toFixed(2)
133 }
134
135 }
113 }, 136 },
114 { 137 {
115 prop:"effectiveDate", 138 prop: "daName",
116 label:"有效期", 139 label: "资产名称",
117 width:"130", 140 width: "180",
118 componentType:"dateTime", 141 componentType: "select",
142 componentDisabled: false,
143 //editDisabled:()=> tableInfo.value.flag==="edit" ? true :false,
144 selectOption: () => assetsOption.value,
145 selectKey: "damName",
119 }, 146 },
120 { 147 {
121 prop:"issuingEntityName", 148 prop: "daCode",
122 label:"发证主体", 149 label: "资产编号",
123 width:"250" 150 width: "180"
124 }, 151 },
152
125 { 153 {
126 prop:"intableTime", 154 prop: "registerTime",
127 label:"入表时间", 155 label: "登记时间",
128 width:"130", 156 width: "130",
129 componentType:"dateTime", 157 componentType: "dateTime",
130 componentDisabled:false
131 }, 158 },
132 { 159 {
133 prop:"intableMoney", 160 prop: "effectiveDate",
134 label:"入表金额(万元)", 161 label: "有效期",
135 width:"200", 162 width: "130",
136 componentType:"number", 163 componentType: "dateTime",
137 toFixed:true,
138 placeholder:"0.00",
139 align:"right",
140 config:{
141 controls:false,
142 precision:0
143 }, 164 },
144 componentDisabled:false, 165 {
145 input:(value,key,info)=>{ 166 prop: "issuingEntityName",
146 tableRef.value.columnInfo[key] = tableRef.value.columnInfo[key].toString().replace(/[^\d.]/g,"") 167 label: "发证主体",
147 tableRef.value.columnInfo[key] = tableRef.value.columnInfo[key].toString().replace(/\.{2,}/g,".") 168 width: "250"
148 tableRef.value.columnInfo[key] = tableRef.value.columnInfo[key].toString().replace(".","$#$").replace(/\./g,"").replace("$#$",".")
149 tableRef.value.columnInfo[key] = tableRef.value.columnInfo[key].toString().replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/,"$1$2.$3")
150 tableRef.value.columnInfo[key] = tableRef.value.columnInfo[key].toString().replace(/^\D*(\d{0,12}(?:\.\d{0,6})?).*$/g,"$1")
151 }, 169 },
152 change:(value,key,info) => {
153 let strArr = value.split(".")
154 if(strArr.length>1) {
155 let right = strArr[1]
156 if(right==='' || right.length<2) {
157 tableRef.value.columnInfo[key] = parseFloat(tableRef.value.columnInfo[key]||0).toFixed(2)
158 }
159 } else {
160 tableRef.value.columnInfo[key] = parseFloat(tableRef.value.columnInfo[key]||0).toFixed(2)
161 }
162 170
163 }
164 },
165 ] 171 ]
166 const toSearch = (val: any, clear: boolean = false) => { 172 const toSearch = (val: any, clear: boolean = false) => {
167 page.value.curr = 1; 173 page.value.curr = 1;
...@@ -176,23 +182,25 @@ const toSearch = (val: any, clear: boolean = false) => { ...@@ -176,23 +182,25 @@ const toSearch = (val: any, clear: boolean = false) => {
176 // 查公司 182 // 查公司
177 const documentList = async () => { 183 const documentList = async () => {
178 const res = await getDocumentList({ 184 const res = await getDocumentList({
179 daName:tableSelectInfo.value.selectValue, 185 daName: tableSelectInfo.value.selectValue,
180 isCompany: true, 186 isCompany: true,
181 type:1}) 187 type: 1
182 companyOption.value =res.data || [] 188 })
189 companyOption.value = res.data || []
183 190
184 return Promise.resolve() 191 return Promise.resolve()
185 } 192 }
186 // 查资产 193 // 查资产
187 const getAssetsList = async () => { 194 const getAssetsList = async () => {
188 const res = await getDocumentList({ 195 const res = await getDamCatalogTable({
189 daName:tableSelectInfo.value.selectValue, 196 pageSize: -1,
190 companyGuid:tableSelectInfo.value.companyGuid, 197 pageIndex: 1,
191 type:1}) 198 })
192 assetsOption.value =res.data || [] 199 assetsOption.value = res.data.records || []
200 console.log(assetsOption.value, '---')
193 return Promise.resolve() 201 return Promise.resolve()
194 } 202 }
195 // 203 // getDamCatalogTable
196 const getTableData = () => { 204 const getTableData = () => {
197 tableInfo.value.loading = true; 205 tableInfo.value.loading = true;
198 getEntryList({ 206 getEntryList({
...@@ -211,36 +219,37 @@ const getTableData = () => { ...@@ -211,36 +219,37 @@ const getTableData = () => {
211 } 219 }
212 220
213 const createOneData = () => { 221 const createOneData = () => {
214 if(companyOption.value.length>0) { 222 if (companyOption.value.length > 0) {
215 findTab(true) 223 findTab(true)
216 assetsOption.value = [] 224 assetsOption.value = []
217 const currentDate = dayjs().format('YYYY-MM-DD'); 225 const currentDate = dayjs().format('YYYY-MM-DD');
218 tableInfo.value.flag = "create" 226 tableInfo.value.flag = "create"
219 //const arr:any = [] 227 //const arr:any = []
220 tableInfo.value.data.unshift({ 228 tableInfo.value.data.unshift({
221 guid:BASE_ID, 229 guid: BASE_ID,
222 companyName:"", 230 companyName: "",
223 daName:"", 231 daName: "",
224 registerTime:"", 232 registerTime: "",
225 daCode:"", 233 daCode: "",
226 effectiveDate:"", 234 effectiveDate: "",
227 intableTime:currentDate, 235 intableTime: currentDate,
228 intableMoney:0, 236 intableMoney: 0,
229 issuingEntityName:"", 237 issuingEntityName: "",
230 companyGuid:"", 238 companyGuid: "",
231 registerGuid:"" 239 registerGuid: ""
232 }) 240 })
233 //tableInfo.value.data = arr 241 //tableInfo.value.data = arr
234 tableInfo.value.currentId = BASE_ID 242 tableInfo.value.currentId = BASE_ID
235 tableInfo.value.isEdit = true 243 tableInfo.value.isEdit = true
236 tableRef.value.columnInfo.intableTime = currentDate 244 tableRef.value.columnInfo.intableTime = currentDate
245 // tableRef.value.columnInfo.companyName = JSON.parse(userStore.userData).tenantName
237 } else { 246 } else {
238 ElMessage.warning("没有可添加的数据!") 247 ElMessage.warning("没有可添加的数据!")
239 } 248 }
240 249
241 } 250 }
242 251
243 const columnDel =(row) => { 252 const columnDel = (row) => {
244 253
245 ElMessageBox.confirm( 254 ElMessageBox.confirm(
246 '是否确定删除所选数据?', 255 '是否确定删除所选数据?',
...@@ -252,8 +261,8 @@ const columnDel =(row) => { ...@@ -252,8 +261,8 @@ const columnDel =(row) => {
252 } 261 }
253 ) 262 )
254 .then(() => { 263 .then(() => {
255 deleteEntryAll(row.guid).then((res:any)=>{ 264 deleteEntryAll(row.guid).then((res: any) => {
256 if(res?.code===proxy.$passCode){ 265 if (res?.code === proxy.$passCode) {
257 ElMessage.success("删除成功") 266 ElMessage.success("删除成功")
258 getTableData() 267 getTableData()
259 documentList() 268 documentList()
...@@ -265,38 +274,38 @@ const columnDel =(row) => { ...@@ -265,38 +274,38 @@ const columnDel =(row) => {
265 } 274 }
266 275
267 }) 276 })
268 }).catch(()=>{ 277 }).catch(() => {
269 tableRef.value.columnInfo = {} 278 tableRef.value.columnInfo = {}
270 }) 279 })
271 } 280 }
272 281
273 const columnSave = async (row) => { 282 const columnSave = async (row) => {
274 if(!row.companyName) { 283 if (!row.companyName) {
275 ElMessage.warning("公司名称不能为空") 284 ElMessage.warning("公司名称不能为空")
276 return 285 return
277 } else if(!row.daName) { 286 } else if (!row.daName) {
278 ElMessage.warning("资产名称不能为空") 287 ElMessage.warning("资产名称不能为空")
279 return 288 return
280 } else if(!row.intableTime) { 289 } else if (!row.intableTime) {
281 ElMessage.warning("入表时间不能为空") 290 ElMessage.warning("入表时间不能为空")
282 return 291 return
283 } else if(!row.intableMoney || row.intableMoney<=0) { 292 } else if (!row.intableMoney || row.intableMoney <= 0) {
284 ElMessage.warning("入表金额必须大于0") 293 ElMessage.warning("入表金额必须大于0")
285 return 294 return
286 } 295 }
287 let res:any 296 let res: any
288 switch(tableInfo.value.flag) { 297 switch (tableInfo.value.flag) {
289 case "create":res = await createEntry(row);break 298 case "create": res = await createEntry(row); break
290 case "edit":res = await intableUpdate(row);break 299 case "edit": res = await intableUpdate(row); break
291 } 300 }
292 if(res?.code===proxy.$passCode) { 301 if (res?.code === proxy.$passCode) {
293 ElMessage.success(`${tableInfo.value.flag==='create' ? '新增' : '修改'}成功`); 302 ElMessage.success(`${tableInfo.value.flag === 'create' ? '新增' : '修改'}成功`);
294 getTableData() 303 getTableData()
295 columnInfoReset() 304 columnInfoReset()
296 documentList() 305 documentList()
297 findTab(false) 306 findTab(false)
298 tableRef.value.columnInfo = {} 307 tableRef.value.columnInfo = {}
299 }else { 308 } else {
300 ElMessage.error(res.msg); 309 ElMessage.error(res.msg);
301 //columnCancel() 310 //columnCancel()
302 } 311 }
...@@ -306,18 +315,18 @@ const columnInfoReset = () => { ...@@ -306,18 +315,18 @@ const columnInfoReset = () => {
306 tableInfo.value.currentId = "0" 315 tableInfo.value.currentId = "0"
307 tableInfo.value.isEdit = false 316 tableInfo.value.isEdit = false
308 columnInfo.value = { 317 columnInfo.value = {
309 guid:"", 318 guid: "",
310 companyName:"", 319 companyName: "",
311 daName:"", 320 daName: "",
312 registerTime:"", 321 registerTime: "",
313 daCode:"", 322 daCode: "",
314 effectiveDate:"", 323 effectiveDate: "",
315 intableTime:"", 324 intableTime: "",
316 intableMoney:0, 325 intableMoney: 0,
317 issuingEntityName:"", 326 issuingEntityName: "",
318 issuingEntityGuid:"", 327 issuingEntityGuid: "",
319 companyGuid:"", 328 companyGuid: "",
320 registerGuid:"" 329 registerGuid: ""
321 } 330 }
322 } 331 }
323 const columnEdit = (row) => { 332 const columnEdit = (row) => {
...@@ -325,18 +334,18 @@ const columnEdit = (row) => { ...@@ -325,18 +334,18 @@ const columnEdit = (row) => {
325 findTab(true) 334 findTab(true)
326 tableSelectInfo.value.companyGuid = row.companyGuid 335 tableSelectInfo.value.companyGuid = row.companyGuid
327 assetsOption.value = [] 336 assetsOption.value = []
328 addAssetsOption(null,row,true) 337 addAssetsOption(null, row, true)
329 addCompanyOption(row) 338 addCompanyOption(row)
330 //getAssetsList() 339 //getAssetsList()
331 const info = {...row} 340 const info = { ...row }
332 tableInfo.value.currentId = info.guid 341 tableInfo.value.currentId = info.guid
333 tableInfo.value.isEdit = true 342 tableInfo.value.isEdit = true
334 tableRef.value.columnInfo.intableMoney = tableRef.value.columnInfo.intableMoney.toFixed(2) 343 tableRef.value.columnInfo.intableMoney = tableRef.value.columnInfo.intableMoney.toFixed(2)
335 columnInfo.value = {...info} 344 columnInfo.value = { ...info }
336 } 345 }
337 const columnCancel = () => { 346 const columnCancel = () => {
338 tableInfo.value.isEdit = false 347 tableInfo.value.isEdit = false
339 if(tableInfo.value.flag==="edit") { 348 if (tableInfo.value.flag === "edit") {
340 tableInfo.value.currentId = "0" 349 tableInfo.value.currentId = "0"
341 } else { 350 } else {
342 tableInfo.value.data.shift() 351 tableInfo.value.data.shift()
...@@ -351,10 +360,10 @@ const pageChange = (info) => { ...@@ -351,10 +360,10 @@ const pageChange = (info) => {
351 getTableData() 360 getTableData()
352 } 361 }
353 // 选择后赋值 362 // 选择后赋值
354 const handelSelect = (row,key,row1) => { 363 const handelSelect = (row, key, row1) => {
355 if(key==="companyName") { 364 if (key === "companyName") {
356 tableSelectInfo.value.companyGuid = row.tenantGuid 365 tableSelectInfo.value.companyGuid = row.tenantGuid
357 addAssetsOption(row,row1) 366 addAssetsOption(row, row1)
358 columnInfo.value.companyName = row.tenantName 367 columnInfo.value.companyName = row.tenantName
359 tableRef.value.columnInfo.companyName = row.tenantName 368 tableRef.value.columnInfo.companyName = row.tenantName
360 tableRef.value.columnInfo.companyGuid = row.tenantGuid 369 tableRef.value.columnInfo.companyGuid = row.tenantGuid
...@@ -366,23 +375,24 @@ const handelSelect = (row,key,row1) => { ...@@ -366,23 +375,24 @@ const handelSelect = (row,key,row1) => {
366 tableRef.value.columnInfo.registerTime = "" 375 tableRef.value.columnInfo.registerTime = ""
367 tableRef.value.columnInfo.effectiveDate = "" 376 tableRef.value.columnInfo.effectiveDate = ""
368 } else { 377 } else {
369 if(tableInfo.value.flag==="create") { 378 if (tableInfo.value.flag === "create") {
379 console.log(row, '-----')
370 const currentDate = dayjs().format('YYYY-MM-DD'); 380 const currentDate = dayjs().format('YYYY-MM-DD');
371 columnInfo.value = { 381 columnInfo.value = {
372 guid:row.guid, 382 guid: row.guid,
373 companyName:row.tenantName, 383 companyName: row.rightMainName,
374 daName:row.daName, 384 daName: row.damName,
375 registerTime:row.registerTime, 385 registerTime: row.registerTime,
376 daCode:row.daCode, 386 daCode: row.daCode,
377 effectiveDate:row.effectiveDate, 387 effectiveDate: row.effectiveDate,
378 intableTime:currentDate, 388 intableTime: currentDate,
379 intableMoney:0, 389 intableMoney: 0,
380 issuingEntityName:row.issuingEntityName, 390 issuingEntityName: row.issuingEntityName,
381 issuingEntityGuid:row.issuingEntityGuid, 391 issuingEntityGuid: row.issuingEntityGuid,
382 companyGuid:row.tenantGuid, 392 companyGuid: row.tenantGuid,
383 registerGuid:row.registerGuid 393 registerGuid: row.registerGuid
384 } 394 }
385 const {guid,...obj} = columnInfo.value 395 const { guid, ...obj } = columnInfo.value
386 tableRef.value.columnInfo = obj 396 tableRef.value.columnInfo = obj
387 } else { 397 } else {
388 columnInfo.value.daName = row.daName 398 columnInfo.value.daName = row.daName
...@@ -391,43 +401,43 @@ const handelSelect = (row,key,row1) => { ...@@ -391,43 +401,43 @@ const handelSelect = (row,key,row1) => {
391 columnInfo.value.effectiveDate = row.effectiveDate 401 columnInfo.value.effectiveDate = row.effectiveDate
392 columnInfo.value.issuingEntityName = row.issuingEntityName 402 columnInfo.value.issuingEntityName = row.issuingEntityName
393 columnInfo.value.registerGuid = row.registerGuid; 403 columnInfo.value.registerGuid = row.registerGuid;
394 tableRef.value.columnInfo = {...columnInfo.value} 404 tableRef.value.columnInfo = { ...columnInfo.value }
395 } 405 }
396 406
397 // 新增不用传guid 所以删掉,但是往输入框添加数据 通过guid判断 407 // 新增不用传guid 所以删掉,但是往输入框添加数据 通过guid判断
398 408
399 //console.log(columnInfo.value) 409 //console.log(columnInfo.value)
400 } 410 }
401 411
402 } 412 }
403 const findTab = (flag) => { 413 const findTab = (flag) => {
404 const tab:any = userStore.tabbar.find((tab:any)=>tab.fullPath===route.path) 414 const tab: any = userStore.tabbar.find((tab: any) => tab.fullPath === route.path)
405 tab.meta.editPage = flag 415 tab.meta.editPage = flag
406 } 416 }
407 const addAssetsOption = (values,row,flag=false) => { 417 const addAssetsOption = (values, row, flag = false) => {
408 getAssetsList().then(()=>{ 418 getAssetsList().then(() => {
409 const obj = { 419 const obj = {
410 costAccessmentGuid:null, 420 costAccessmentGuid: null,
411 daCode:row.daCode, 421 daCode: row.daCode,
412 daName: row.daName, 422 daName: row.daName,
413 documentFile: null, 423 documentFile: null,
414 documentType: 1, 424 documentType: 1,
415 effectiveDate: row.effectiveDate, 425 effectiveDate: row.effectiveDate,
416 guid:row.guid, 426 guid: row.guid,
417 issuingEntityGuid:row.issuingEntityGuid , 427 issuingEntityGuid: row.issuingEntityGuid,
418 issuingEntityName:row.issuingEntityName, 428 issuingEntityName: row.issuingEntityName,
419 qualityEvaluationGuid: null, 429 qualityEvaluationGuid: null,
420 registerGuid:row.registerGuid, 430 registerGuid: row.registerGuid,
421 registerTime:row.registerTime, 431 registerTime: row.registerTime,
422 state: row.state, 432 state: row.state,
423 tenantGuid: row.companyGuid, 433 tenantGuid: row.companyGuid,
424 tenantName:row.companyName, 434 tenantName: row.companyName,
425 } 435 }
426 const arr = assetsOption.value 436 const arr = assetsOption.value
427 if(values&&values.tenantGuid===row.companyGuid) { 437 if (values && values.tenantGuid === row.companyGuid) {
428 arr.unshift(obj) 438 arr.unshift(obj)
429 assetsOption.value = arr 439 assetsOption.value = arr
430 }else if(flag) { 440 } else if (flag) {
431 arr.unshift(obj) 441 arr.unshift(obj)
432 assetsOption.value = arr 442 assetsOption.value = arr
433 } 443 }
...@@ -436,26 +446,27 @@ const addAssetsOption = (values,row,flag=false) => { ...@@ -436,26 +446,27 @@ const addAssetsOption = (values,row,flag=false) => {
436 } 446 }
437 const addCompanyOption = (row) => { 447 const addCompanyOption = (row) => {
438 let flag = true 448 let flag = true
439 documentList().then(()=>{ 449 documentList().then(() => {
440 const obj = { 450 const obj = {
441 tenantName:row.companyName, 451 tenantName: row.companyName,
442 tenantGuid:row.companyGuid 452 tenantGuid: row.companyGuid
443 } 453 }
444 const arr = companyOption.value 454 const arr = companyOption.value
445 arr.forEach((item)=>{ 455 arr.forEach((item) => {
446 if(item.tenantGuid===row.companyGuid){ 456 if (item.tenantGuid === row.companyGuid) {
447 flag = false 457 flag = false
448 } 458 }
449 }) 459 })
450 if(flag) { 460 if (flag) {
451 arr.unshift(obj) 461 arr.unshift(obj)
452 companyOption.value = arr 462 companyOption.value = arr
453 } 463 }
454 }) 464 })
455 } 465 }
456 onBeforeMount(()=> { 466 onBeforeMount(() => {
457 //getTableData() 467 //getTableData()
458 documentList() 468 // getAssetsList()
469 // documentList()
459 }) 470 })
460 </script> 471 </script>
461 472
...@@ -468,19 +479,9 @@ onBeforeMount(()=> { ...@@ -468,19 +479,9 @@ onBeforeMount(()=> {
468 </div> 479 </div>
469 </div> 480 </div>
470 <div class="table_panel_wrap"> 481 <div class="table_panel_wrap">
471 <Table 482 <Table ref="tableRef" :tableInfo="tableInfo" :page="page" :colums="colums" v-model="columnInfo"
472 ref="tableRef" 483 @pageChange="pageChange" @columnSave="columnSave" @columnDel="columnDel" @columnEdit="columnEdit"
473 :tableInfo="tableInfo" 484 @columnCancel="columnCancel" @handelSelect="handelSelect"></Table>
474 :page="page"
475 :colums="colums"
476 v-model="columnInfo"
477 @pageChange="pageChange"
478 @columnSave="columnSave"
479 @columnDel="columnDel"
480 @columnEdit="columnEdit"
481 @columnCancel="columnCancel"
482 @handelSelect="handelSelect"
483 ></Table>
484 </div> 485 </div>
485 </div> 486 </div>
486 </template> 487 </template>
...@@ -490,5 +491,4 @@ onBeforeMount(()=> { ...@@ -490,5 +491,4 @@ onBeforeMount(()=> {
490 .container_wrap { 491 .container_wrap {
491 padding: 0 16px; 492 padding: 0 16px;
492 } 493 }
493
494 </style> 494 </style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!