数据定价更新
Showing
3 changed files
with
81 additions
and
28 deletions
| ... | @@ -78,7 +78,6 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -78,7 +78,6 @@ const routes: RouteRecordRaw[] = [ |
| 78 | sidebar: false, | 78 | sidebar: false, |
| 79 | breadcrumb: false, | 79 | breadcrumb: false, |
| 80 | cache: true, | 80 | cache: true, |
| 81 | reuse: true, | ||
| 82 | editPage: true, | 81 | editPage: true, |
| 83 | activeMenu: '/data-pricing/pricing-manage/price-config' | 82 | activeMenu: '/data-pricing/pricing-manage/price-config' |
| 84 | }, | 83 | }, |
| ... | @@ -109,7 +108,6 @@ const routes: RouteRecordRaw[] = [ | ... | @@ -109,7 +108,6 @@ const routes: RouteRecordRaw[] = [ |
| 109 | sidebar: false, | 108 | sidebar: false, |
| 110 | breadcrumb: false, | 109 | breadcrumb: false, |
| 111 | cache: true, | 110 | cache: true, |
| 112 | reuse: true, | ||
| 113 | editPage: true, | 111 | editPage: true, |
| 114 | activeMenu: '/data-pricing/pricing-manage/price-calculate' | 112 | activeMenu: '/data-pricing/pricing-manage/price-calculate' |
| 115 | }, | 113 | }, | ... | ... |
| ... | @@ -77,7 +77,7 @@ const costForm = ref({ | ... | @@ -77,7 +77,7 @@ const costForm = ref({ |
| 77 | placeholder: "请选择", | 77 | placeholder: "请选择", |
| 78 | clearable: true, | 78 | clearable: true, |
| 79 | required: true, | 79 | required: true, |
| 80 | visible: false, | 80 | visible: true, |
| 81 | popperClass: 'date-year-popper', | 81 | popperClass: 'date-year-popper', |
| 82 | disabledDate: (date) => { | 82 | disabledDate: (date) => { |
| 83 | const curr = new Date(); | 83 | const curr = new Date(); |
| ... | @@ -92,7 +92,7 @@ const costForm = ref({ | ... | @@ -92,7 +92,7 @@ const costForm = ref({ |
| 92 | placeholder: "请选择", | 92 | placeholder: "请选择", |
| 93 | clearable: true, | 93 | clearable: true, |
| 94 | required: true, | 94 | required: true, |
| 95 | visible: false, | 95 | visible: true, |
| 96 | style: { width: 'calc(33.33% - 70px)', 'margin-right': '8px' }, | 96 | style: { width: 'calc(33.33% - 70px)', 'margin-right': '8px' }, |
| 97 | popperClass: 'date-month-popper', | 97 | popperClass: 'date-month-popper', |
| 98 | disabledDate: (date) => { | 98 | disabledDate: (date) => { |
| ... | @@ -321,6 +321,7 @@ const getCostData = () => { | ... | @@ -321,6 +321,7 @@ const getCostData = () => { |
| 321 | }) | 321 | }) |
| 322 | levelList.level1.map(l => allMapList.value.push(l)); | 322 | levelList.level1.map(l => allMapList.value.push(l)); |
| 323 | setAllMapList(levelList, allMapList.value, 2); | 323 | setAllMapList(levelList, allMapList.value, 2); |
| 324 | |||
| 324 | }).catch((res) => { | 325 | }).catch((res) => { |
| 325 | loading.value = false; | 326 | loading.value = false; |
| 326 | }); | 327 | }); |
| ... | @@ -339,10 +340,10 @@ const setAllMapList = (mapObj, arr, level) => { | ... | @@ -339,10 +340,10 @@ const setAllMapList = (mapObj, arr, level) => { |
| 339 | const setStep = async () => { | 340 | const setStep = async () => { |
| 340 | const info = costFormInfo.value; | 341 | const info = costFormInfo.value; |
| 341 | await setFormItems(info, 'cost'); | 342 | await setFormItems(info, 'cost'); |
| 342 | costForm.value.items[0].disabled = step.value > 0; | 343 | // costForm.value.items[0].disabled = step.value > 0; |
| 343 | costForm.value.items[1].visible = step.value == 1; | 344 | // costForm.value.items[1].visible = step.value == 1; |
| 344 | costForm.value.items[2].visible = step.value == 1; | 345 | // costForm.value.items[2].visible = step.value == 1; |
| 345 | costForm.value.items[3].visible = step.value == 1; | 346 | // costForm.value.items[3].visible = step.value == 1; |
| 346 | if (step.value == 1) { | 347 | if (step.value == 1) { |
| 347 | setSumRow(); | 348 | setSumRow(); |
| 348 | } | 349 | } |
| ... | @@ -793,6 +794,61 @@ const btnClick = async (btn, bType = null) => { | ... | @@ -793,6 +794,61 @@ const btnClick = async (btn, bType = null) => { |
| 793 | } | 794 | } |
| 794 | }; | 795 | }; |
| 795 | 796 | ||
| 797 | const initTableFileds = () => { | ||
| 798 | let fields = [ | ||
| 799 | { | ||
| 800 | label: "累计投入", field: "total", width: 120, align: 'right', getName: (scope) => { | ||
| 801 | return changeNum(scope.row.total, 2, true); | ||
| 802 | } | ||
| 803 | }, | ||
| 804 | ] | ||
| 805 | const hasLevel1 = checkedList.value.find(c => c.level == 1); | ||
| 806 | if (hasLevel1) { | ||
| 807 | fields.splice(-1, 0, { label: "指标", field: "level1", width: 120 }); | ||
| 808 | } | ||
| 809 | const hasLevel2 = checkedList.value.find(c => c.level == 2); | ||
| 810 | if (hasLevel2) { | ||
| 811 | fields.splice(-1, 0, { label: "一级分类", field: "level2", width: 120 }); | ||
| 812 | } | ||
| 813 | const hasLevel3 = checkedList.value.find(c => c.level == 3); | ||
| 814 | if (hasLevel3) { | ||
| 815 | fields.splice(-1, 0, { label: "二级分类", field: "level3", width: 120 }); | ||
| 816 | } | ||
| 817 | const hasLevel4 = checkedList.value.find(c => c.level == 4); | ||
| 818 | if (hasLevel4) { | ||
| 819 | fields.splice(-1, 0, { label: "三级分类", field: "level4", width: 120 }); | ||
| 820 | } | ||
| 821 | tableField.value.splice(0); | ||
| 822 | tableField.value.push(...fields); | ||
| 823 | initField.value = JSON.parse(JSON.stringify(tableField.value)); | ||
| 824 | const datas = JSON.parse(JSON.stringify(checkedData.value)); | ||
| 825 | datas.sort((a, b) => a.code.localeCompare(b.code)); | ||
| 826 | const dGuid = datas.map(d => d.guid); | ||
| 827 | let tDatas = tableData.value.filter(t => dGuid.indexOf(t.guid) > -1); | ||
| 828 | datas.forEach((td, t) => { | ||
| 829 | if (tGuids.indexOf(td.guid) == -1) { | ||
| 830 | tDatas.splice(t, 0, td) | ||
| 831 | } else { | ||
| 832 | tDatas.map(d => { | ||
| 833 | if (d.guid == td.guid) { | ||
| 834 | d.name = td.name; | ||
| 835 | d.level1 = td.level1; | ||
| 836 | d.level2 = td.level2; | ||
| 837 | d.level3 = td.level3; | ||
| 838 | d.level4 = td.level4; | ||
| 839 | } | ||
| 840 | }) | ||
| 841 | } | ||
| 842 | }) | ||
| 843 | tableData.value.splice(0); | ||
| 844 | tableData.value = tDatas; | ||
| 845 | // if (tGuids.length > 0 && costFormInfo.value.baseDate && costFormInfo.value.investYear) { | ||
| 846 | // setTableFields(costFormInfo.value); | ||
| 847 | // besure.value = true; | ||
| 848 | // } | ||
| 849 | getMergeRow(); | ||
| 850 | }; | ||
| 851 | |||
| 796 | const setShowLevel4 = () => { | 852 | const setShowLevel4 = () => { |
| 797 | nextTick(() => { | 853 | nextTick(() => { |
| 798 | const box4 = document.querySelectorAll('.grid-panel-box.box3 .grid-items'); | 854 | const box4 = document.querySelectorAll('.grid-panel-box.box3 .grid-items'); |
| ... | @@ -1368,33 +1424,27 @@ watch(showLevel4, (newVal, oldVal) => { | ... | @@ -1368,33 +1424,27 @@ watch(showLevel4, (newVal, oldVal) => { |
| 1368 | <template> | 1424 | <template> |
| 1369 | <div class="container_wrap"> | 1425 | <div class="container_wrap"> |
| 1370 | <div class="content_main"> | 1426 | <div class="content_main"> |
| 1371 | <div class="top_tool_wrap"> | 1427 | <!-- <div class="top_tool_wrap"> |
| 1372 | <StepBar :steps-info="stepsInfo" /> | 1428 | <StepBar :steps-info="stepsInfo" /> |
| 1373 | </div> | 1429 | </div> --> |
| 1374 | <div class="operator_panel_wrap" :style="{ 'min-height': step == 0 ? 'calc(100% - 112px)' : 'unset' }" | 1430 | <div class="operator_panel_wrap" :style="{ 'min-height': 'unset' }" v-loading="loading"> |
| 1375 | v-loading="loading"> | ||
| 1376 | <ContentWrap title="入表类型" description="" :expandSwicth="false" v-show="step == 1"> | ||
| 1377 | <Form ref="entryFormRef" :itemList="entryForm.items" formId="dam-base-form" :rules="entryForm.rules" | ||
| 1378 | col="col3" @selectChange="selectChange" /> | ||
| 1379 | </ContentWrap> | ||
| 1380 | <div class="v-tip" v-show="step == 0"> | 1431 | <div class="v-tip" v-show="step == 0"> |
| 1381 | <div class="tip-icon"></div> | 1432 | <div class="tip-icon"></div> |
| 1382 | <div class="tip-des"> | 1433 | <div class="tip-des"> |
| 1383 | 本工具提供的入表评估结果仅为初步测算参考,基于用户输入参数生成,不代表最终入表金额。实际入表需遵循《企业数据资源相关会计处理暂行规定》及会计准则要求,经专业审计机构确认后方可生效。 | 1434 | 本工具提供的入表评估结果仅为初步测算参考,基于用户输入参数生成,不代表最终入表金额。实际入表需遵循《企业数据资源相关会计处理暂行规定》及会计准则要求,经专业审计机构确认后方可生效。 |
| 1384 | </div> | 1435 | </div> |
| 1385 | </div> | 1436 | </div> |
| 1386 | <ContentWrap :title="step == 0 ? '设置成本项' : step == 1 ? '填写成本明细' : '文件预览'" | 1437 | <ContentWrap :title="step == 0 ? '设置成本项' : '文件预览'" description="" :expandSwicth="false" |
| 1387 | description="" | 1438 | :style="step == 1 ? { 'margin-top': '16px' } : {}"> |
| 1388 | :expandSwicth="false" :style="step == 1 ? { 'margin-top': '16px' } : {}"> | ||
| 1389 | <div class="table_tool_wrap"> | 1439 | <div class="table_tool_wrap"> |
| 1390 | <Form ref="costFormRef" :itemList="costForm.items" formId="dam-base-form" :rules="costForm.rules" col="col3" | 1440 | <Form ref="costFormRef" :itemList="costForm.items" formId="dam-base-form" :rules="costForm.rules" col="col3" |
| 1391 | @btnClick="btnClick" @selectChange="selectChange" /> | 1441 | @btnClick="btnClick" @selectChange="selectChange" /> |
| 1392 | <div class="tool_btn" v-if="step == 2"> | 1442 | <div class="tool_btn" v-if="step == 1"> |
| 1393 | <el-button type="primary" @click="exportClick">下载文件</el-button> | 1443 | <el-button type="primary" @click="exportClick">下载文件</el-button> |
| 1394 | <!-- <el-button type="primary" plain @click="senMessage">入表咨询</el-button> --> | 1444 | <!-- <el-button type="primary" plain @click="senMessage">入表咨询</el-button> --> |
| 1395 | </div> | 1445 | </div> |
| 1396 | </div> | 1446 | </div> |
| 1397 | <div class="grid-box-wrap" v-show="step == 0"> | 1447 | <div class="grid-box-wrap" v-show="step == 3"> |
| 1398 | <!-- 头部标题 --> | 1448 | <!-- 头部标题 --> |
| 1399 | <div class="grid-panel-wrap header" :class="{ col4: showLevel4 }"> | 1449 | <div class="grid-panel-wrap header" :class="{ col4: showLevel4 }"> |
| 1400 | <template v-for="(list, l) in gridList" :key="'panel'+l"> | 1450 | <template v-for="(list, l) in gridList" :key="'panel'+l"> |
| ... | @@ -1497,14 +1547,14 @@ watch(showLevel4, (newVal, oldVal) => { | ... | @@ -1497,14 +1547,14 @@ watch(showLevel4, (newVal, oldVal) => { |
| 1497 | </div> | 1547 | </div> |
| 1498 | </div> | 1548 | </div> |
| 1499 | </div> | 1549 | </div> |
| 1500 | <div class="table_panel_wrap" v-show="step > 0"> | 1550 | <div class="table_panel_wrap"> |
| 1501 | <div class="amount_tool" v-if="step == 1"> | 1551 | <div class="amount_tool"> |
| 1502 | <span class="amount_text">累计投入:</span> | 1552 | <span class="amount_text">累计投入:</span> |
| 1503 | <span class="amount_num">{{ changeNum(amount, 2, true) }}</span> | 1553 | <span class="amount_num">{{ changeNum(amount, 2, true) }}</span> |
| 1504 | <span>元</span> | 1554 | <span>元</span> |
| 1505 | </div> | 1555 | </div> |
| 1506 | <div class="table_panel"> | 1556 | <div class="table_panel"> |
| 1507 | <el-table id="cost-table" v-show="step == 1" ref="costTableRef" :data="tableData" | 1557 | <el-table id="cost-table" v-show="step == 0" ref="costTableRef" :data="tableData" |
| 1508 | :span-method="tableSpanMethod" :summary-method="tableSummaryMethod" show-summary border | 1558 | :span-method="tableSpanMethod" :summary-method="tableSummaryMethod" show-summary border |
| 1509 | :cell-class-name="isMergedCell"> | 1559 | :cell-class-name="isMergedCell"> |
| 1510 | <el-table-column v-for="(item, i) in tableField" :label="item.label" :width="item.width" | 1560 | <el-table-column v-for="(item, i) in tableField" :label="item.label" :width="item.width" |
| ... | @@ -1525,7 +1575,7 @@ watch(showLevel4, (newVal, oldVal) => { | ... | @@ -1525,7 +1575,7 @@ watch(showLevel4, (newVal, oldVal) => { |
| 1525 | </template> | 1575 | </template> |
| 1526 | </el-table-column> | 1576 | </el-table-column> |
| 1527 | </el-table> | 1577 | </el-table> |
| 1528 | <el-table id="entry-table" ref="entryTableRef" :data="transposedData" stripe border v-show="step == 2"> | 1578 | <el-table id="entry-table" ref="entryTableRef" :data="transposedData" stripe border v-show="step == 1"> |
| 1529 | <el-table-column prop="title" label="项目" :width="140"> | 1579 | <el-table-column prop="title" label="项目" :width="140"> |
| 1530 | <template v-slot="{ row }"> | 1580 | <template v-slot="{ row }"> |
| 1531 | <span>{{ setLabel(row.title) }}</span> | 1581 | <span>{{ setLabel(row.title) }}</span> |
| ... | @@ -1545,14 +1595,19 @@ watch(showLevel4, (newVal, oldVal) => { | ... | @@ -1545,14 +1595,19 @@ watch(showLevel4, (newVal, oldVal) => { |
| 1545 | </div> | 1595 | </div> |
| 1546 | </div> | 1596 | </div> |
| 1547 | </ContentWrap> | 1597 | </ContentWrap> |
| 1598 | <ContentWrap title="入表类型" description="" :expandSwicth="false" v-show="step == 0"> | ||
| 1599 | <Form ref="entryFormRef" :itemList="entryForm.items" formId="dam-base-form" :rules="entryForm.rules" | ||
| 1600 | col="col3" @selectChange="selectChange" /> | ||
| 1601 | </ContentWrap> | ||
| 1548 | </div> | 1602 | </div> |
| 1549 | </div> | 1603 | </div> |
| 1550 | <div class="tool_btns"> | 1604 | <div class="tool_btns"> |
| 1551 | <div class="btns"> | 1605 | <div class="btns"> |
| 1552 | <el-button @click="btnClick({ value: 'refresh' })">重置</el-button> | 1606 | <el-button @click="btnClick({ value: 'refresh' })">重置</el-button> |
| 1553 | <el-button @click="btnClick({ value: 'prev' })" v-if="step == 1">上一步</el-button> | 1607 | <el-button @click="btnClick({ value: 'next' })" v-if="step == 0">入表</el-button> |
| 1608 | <!-- <el-button @click="btnClick({ value: 'prev' })" v-if="step == 1">上一步</el-button> | ||
| 1554 | <el-button type="primary" @click="btnClick({ value: 'prev' })" v-if="step == 2">上一步</el-button> | 1609 | <el-button type="primary" @click="btnClick({ value: 'prev' })" v-if="step == 2">上一步</el-button> |
| 1555 | <el-button type="primary" @click="btnClick({ value: 'next' })" v-if="step < 2">下一步</el-button> | 1610 | <el-button type="primary" @click="btnClick({ value: 'next' })" v-if="step < 2">下一步</el-button> --> |
| 1556 | </div> | 1611 | </div> |
| 1557 | </div> | 1612 | </div> |
| 1558 | </div> | 1613 | </div> |
| ... | @@ -1848,7 +1903,7 @@ watch(showLevel4, (newVal, oldVal) => { | ... | @@ -1848,7 +1903,7 @@ watch(showLevel4, (newVal, oldVal) => { |
| 1848 | background: #FFFBF2; | 1903 | background: #FFFBF2; |
| 1849 | border: 1px solid rgba(255, 241, 212, 1); | 1904 | border: 1px solid rgba(255, 241, 212, 1); |
| 1850 | border-radius: 4px; | 1905 | border-radius: 4px; |
| 1851 | margin: 5px 0px 8px; | 1906 | margin: 16px 0px 8px; |
| 1852 | padding: 2px 0px; | 1907 | padding: 2px 0px; |
| 1853 | 1908 | ||
| 1854 | .tip-icon { | 1909 | .tip-icon { | ... | ... |
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment