Commit c8004a7b1135c96c5005f453d4e3de10d48c23c8
1 parent
b4962701
采购中的转增记录 使用记录处理完成
Showing
9 changed files
with
377 additions
and
65 deletions
src/api/resource/printAllocationStorehouseApi.js
0 → 100644
| 1 | +import request from '@/utils/request' | |
| 2 | + | |
| 3 | +// 获取调拨申请单信息 | |
| 4 | +export function listAllocationStorehouseApplys(params) { | |
| 5 | + return new Promise((resolve, reject) => { | |
| 6 | + request({ | |
| 7 | + url: '/resourceStore.listAllocationStorehouseApplys', | |
| 8 | + method: 'get', | |
| 9 | + params | |
| 10 | + }).then(response => { | |
| 11 | + const res = response.data | |
| 12 | + resolve(res) | |
| 13 | + }).catch(error => { | |
| 14 | + reject(error) | |
| 15 | + }) | |
| 16 | + }) | |
| 17 | +} | |
| 18 | + | |
| 19 | +// 获取调拨仓库物品列表 | |
| 20 | +export function listAllocationStorehouses(params) { | |
| 21 | + return new Promise((resolve, reject) => { | |
| 22 | + request({ | |
| 23 | + url: '/resourceStore.listAllocationStorehouses', | |
| 24 | + method: 'get', | |
| 25 | + params | |
| 26 | + }).then(response => { | |
| 27 | + const res = response.data | |
| 28 | + resolve(res) | |
| 29 | + }).catch(error => { | |
| 30 | + reject(error) | |
| 31 | + }) | |
| 32 | + }) | |
| 33 | +} | |
| 0 | 34 | \ No newline at end of file | ... | ... |
src/i18n/resourceI18n.js
| ... | ... | @@ -21,6 +21,7 @@ import { messages as resourceStoreUseRecordManageMessages } from '../views/resou |
| 21 | 21 | import { messages as printEquipmentAccountLabelMessages } from '../views/resource/printEquipmentAccountLabelLang' |
| 22 | 22 | import { messages as resourceDetailMessages } from '../views/resource/resourceDetailLang' |
| 23 | 23 | import { messages as allocationStorehouseDetailMessages } from '../views/resource/allocationStorehouseDetailLang' |
| 24 | +import { messages as printAllocationStorehouseMessages } from '../views/resource/printAllocationStorehouseLang' | |
| 24 | 25 | |
| 25 | 26 | |
| 26 | 27 | export const messages = { |
| ... | ... | @@ -47,6 +48,7 @@ export const messages = { |
| 47 | 48 | ...printEquipmentAccountLabelMessages.en, |
| 48 | 49 | ...resourceDetailMessages.en, |
| 49 | 50 | ...allocationStorehouseDetailMessages.en, |
| 51 | + ...printAllocationStorehouseMessages.en, | |
| 50 | 52 | }, |
| 51 | 53 | zh: { |
| 52 | 54 | ...resourceAuditFlowMessages.zh, |
| ... | ... | @@ -71,5 +73,6 @@ export const messages = { |
| 71 | 73 | ...printEquipmentAccountLabelMessages.zh, |
| 72 | 74 | ...resourceDetailMessages.zh, |
| 73 | 75 | ...allocationStorehouseDetailMessages.zh, |
| 76 | + ...printAllocationStorehouseMessages.zh, | |
| 74 | 77 | } |
| 75 | 78 | } |
| 76 | 79 | \ No newline at end of file | ... | ... |
src/router/index.js
| ... | ... | @@ -714,6 +714,11 @@ const routes = [ |
| 714 | 714 | name: '/pages/property/printCommonReportTable', |
| 715 | 715 | component: () => import('@/views/report/printCommonReportTableList.vue') |
| 716 | 716 | }, |
| 717 | + { | |
| 718 | + path:'/pages/property/printAllocationStorehouse', | |
| 719 | + name:'/pages/property/printAllocationStorehouse', | |
| 720 | + component: () => import('@/views/resource/printAllocationStorehouseList.vue') | |
| 721 | + }, | |
| 717 | 722 | ] |
| 718 | 723 | |
| 719 | 724 | const router = new VueRouter({ | ... | ... |
src/views/resource/allocationStorehouseDetailedList.vue
| 1 | 1 | <template> |
| 2 | - <div class="animated fadeInRight ecommerce"> | |
| 2 | + <div class="animated fadeInRight ecommerce padding"> | |
| 3 | 3 | <el-row :gutter="20"> |
| 4 | - <el-col :span="4" > | |
| 5 | - <div class="border-radius"> | |
| 6 | - <div class="margin-xs-r treeview attendance-staff"> | |
| 7 | - <ul class="list-group text-center border-radius"> | |
| 4 | + <el-col :span="4"> | |
| 5 | + | |
| 6 | + <div class="list-group-border-radius"> | |
| 7 | + <div class=" treeview"> | |
| 8 | + <ul class="list-group text-center "> | |
| 8 | 9 | <li v-for="(item, index) in allocationStorehousesInfo.applyTypes" :key="index" |
| 9 | - class="list-group-item node-orgTree" | |
| 10 | + @click="swatchApplyType(item)" | |
| 10 | 11 | :class="{ 'vc-node-selected': allocationStorehousesInfo.conditions.applyType == item.statusCd }" |
| 11 | - @click="swatchApplyType(item)"> | |
| 12 | + class="list-group-item node-orgTree"> | |
| 12 | 13 | {{ item.name }} |
| 13 | 14 | </li> |
| 14 | 15 | </ul> |
| 15 | 16 | </div> |
| 17 | + | |
| 16 | 18 | </div> |
| 17 | 19 | </el-col> |
| 18 | 20 | <el-col :span="20"> |
| 19 | 21 | <el-card class="box-card"> |
| 20 | 22 | <div slot="header" class="flex justify-between"> |
| 21 | 23 | <span>{{ $t('allocationStorehouseDetailed.queryCondition') }}</span> |
| 22 | - <div class="ibox-tools" > | |
| 24 | + <div class="ibox-tools"> | |
| 23 | 25 | <el-button type="text" style="margin-right:10px;" @click="_moreCondition()"> |
| 24 | 26 | {{ allocationStorehousesInfo.moreCondition == true ? $t('allocationStorehouseDetailed.hide') : |
| 25 | 27 | $t('allocationStorehouseDetailed.more') }} |
| ... | ... | @@ -78,15 +80,15 @@ |
| 78 | 80 | <el-col :span="4"> |
| 79 | 81 | <el-select v-model="allocationStorehousesInfo.conditions.shIda" |
| 80 | 82 | :placeholder="$t('allocationStorehouseDetailed.sourceStorePlaceholder')" style="width:100%"> |
| 81 | - <el-option v-for="(item, index) in allocationStorehousesInfo.storehouses" :key="index" :label="item.shName" | |
| 82 | - :value="item.shId" /> | |
| 83 | + <el-option v-for="(item, index) in allocationStorehousesInfo.storehouses" :key="index" | |
| 84 | + :label="item.shName" :value="item.shId" /> | |
| 83 | 85 | </el-select> |
| 84 | 86 | </el-col> |
| 85 | 87 | <el-col :span="4"> |
| 86 | 88 | <el-select v-model="allocationStorehousesInfo.conditions.shIdz" |
| 87 | 89 | :placeholder="$t('allocationStorehouseDetailed.targetStorePlaceholder')" style="width:100%"> |
| 88 | - <el-option v-for="(item, index) in allocationStorehousesInfo.storehouses" :key="index" :label="item.shName" | |
| 89 | - :value="item.shId" /> | |
| 90 | + <el-option v-for="(item, index) in allocationStorehousesInfo.storehouses" :key="index" | |
| 91 | + :label="item.shName" :value="item.shId" /> | |
| 90 | 92 | </el-select> |
| 91 | 93 | </el-col> |
| 92 | 94 | <el-col :span="4"> |
| ... | ... | @@ -113,7 +115,7 @@ |
| 113 | 115 | <el-card class="box-card" style="margin-top:20px;"> |
| 114 | 116 | <div slot="header" class="flex justify-between"> |
| 115 | 117 | <span>{{ $t('allocationStorehouseDetailed.allocationDetail') }}</span> |
| 116 | - <div class="ibox-tools" > | |
| 118 | + <div class="ibox-tools"> | |
| 117 | 119 | <el-button type="primary" size="small" @click="_exportExcel()"> |
| 118 | 120 | <i class="el-icon-download"></i> |
| 119 | 121 | {{ $t('allocationStorehouseDetailed.export') }} |
| ... | ... | @@ -143,7 +145,8 @@ |
| 143 | 145 | </el-table-column> |
| 144 | 146 | <el-table-column :label="$t('allocationStorehouseDetailed.table.stock')" align="center"> |
| 145 | 147 | <template slot-scope="scope"> |
| 146 | - {{ scope.row.stock }}{{ scope.row.applyType == 20000 ? scope.row.miniUnitCodeName : scope.row.unitCodeName }} | |
| 148 | + {{ scope.row.stock }}{{ scope.row.applyType == 20000 ? scope.row.miniUnitCodeName : | |
| 149 | + scope.row.unitCodeName }} | |
| 147 | 150 | </template> |
| 148 | 151 | </el-table-column> |
| 149 | 152 | <el-table-column :label="$t('allocationStorehouseDetailed.table.shaName')" align="center"> |
| ... | ... | @@ -176,7 +179,7 @@ |
| 176 | 179 | import { listAllocationStorehouses, listStorehouses, listResourceStoreTypes, listResourceStoreSpecifications, exportData } from '@/api/resource/allocationStorehouseDetailedApi' |
| 177 | 180 | import { getDict } from '@/api/community/communityApi' |
| 178 | 181 | import { getCommunityId } from '@/api/community/communityApi' |
| 179 | -import {getUserId} from '@/api/user/userApi' | |
| 182 | +import { getUserId } from '@/api/user/userApi' | |
| 180 | 183 | |
| 181 | 184 | export default { |
| 182 | 185 | name: 'AllocationStorehouseDetailedList', |
| ... | ... | @@ -374,6 +377,7 @@ export default { |
| 374 | 377 | await exportData(params) |
| 375 | 378 | this.$message.success(this.$t('allocationStorehouseDetailed.exportSuccess')) |
| 376 | 379 | // 这里可以添加跳转到下载页面的逻辑 |
| 380 | + this.$router.push('/pages/property/downloadTempFile?tab=下载中心') | |
| 377 | 381 | } catch (error) { |
| 378 | 382 | this.$message.error(this.$t('allocationStorehouseDetailed.exportError')) |
| 379 | 383 | } |
| ... | ... | @@ -407,27 +411,4 @@ export default { |
| 407 | 411 | margin-right: 5px; |
| 408 | 412 | } |
| 409 | 413 | |
| 410 | -.list-group { | |
| 411 | - padding-left: 0; | |
| 412 | - margin-bottom: 0; | |
| 413 | -} | |
| 414 | - | |
| 415 | -.list-group-item { | |
| 416 | - position: relative; | |
| 417 | - display: block; | |
| 418 | - padding: 10px 15px; | |
| 419 | - margin-bottom: -1px; | |
| 420 | - background-color: #fff; | |
| 421 | - border: 1px solid #ddd; | |
| 422 | - cursor: pointer; | |
| 423 | -} | |
| 424 | - | |
| 425 | -.list-group-item:hover { | |
| 426 | - background-color: #f5f5f5; | |
| 427 | -} | |
| 428 | - | |
| 429 | -.vc-node-selected { | |
| 430 | - background-color: #409EFF; | |
| 431 | - color: #fff; | |
| 432 | -} | |
| 433 | 414 | </style> |
| 434 | 415 | \ No newline at end of file | ... | ... |
src/views/resource/allocationUserStorehouseManageList.vue
| ... | ... | @@ -447,6 +447,7 @@ export default { |
| 447 | 447 | } |
| 448 | 448 | await exportData(params) |
| 449 | 449 | this.$message.success(this.$t('allocationUserStorehouseManage.exportSuccess')) |
| 450 | + this.$router.push('/pages/property/downloadTempFile?tab=下载中心') | |
| 450 | 451 | } catch (error) { |
| 451 | 452 | console.error('Failed to export:', error) |
| 452 | 453 | this.$message.error(this.$t('allocationUserStorehouseManage.exportFailed')) | ... | ... |
src/views/resource/assetInventoryManageList.vue
| ... | ... | @@ -2,18 +2,18 @@ |
| 2 | 2 | <div class="asset-inventory-manage-container"> |
| 3 | 3 | <el-row :gutter="20"> |
| 4 | 4 | <el-col :span="4" class=""> |
| 5 | - <el-card class="border-radius"> | |
| 6 | - <div class=" treeview attendance-staff"> | |
| 7 | - <ul class="list-group text-center border-radius"> | |
| 8 | - <li v-for="(item, index) in assetInventoryManageInfo.storehouses" :key="index" | |
| 9 | - class="list-group-item node-orgTree" | |
| 5 | + | |
| 6 | + <div class="list-group-border-radius"> | |
| 7 | + <div class=" treeview"> | |
| 8 | + <ul class="list-group text-center "> | |
| 9 | + <li v-for="(item, index) in assetInventoryManageInfo.storehouses" :key="index" @click="swatchStorehouse(item)" | |
| 10 | 10 | :class="{ 'vc-node-selected': assetInventoryManageInfo.conditions.shId == item.shId }" |
| 11 | - @click="swatchStorehouse(item)"> | |
| 11 | + class="list-group-item node-orgTree"> | |
| 12 | 12 | {{ item.shName }} |
| 13 | 13 | </li> |
| 14 | 14 | </ul> |
| 15 | 15 | </div> |
| 16 | - </el-card> | |
| 16 | + </div> | |
| 17 | 17 | </el-col> |
| 18 | 18 | <el-col :span="20"> |
| 19 | 19 | <el-row> |
| ... | ... | @@ -294,26 +294,6 @@ export default { |
| 294 | 294 | padding-right: 0; |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | - .list-group { | |
| 298 | - list-style: none; | |
| 299 | - padding: 0; | |
| 300 | 297 | |
| 301 | - .list-group-item { | |
| 302 | - padding: 10px 15px; | |
| 303 | - margin-bottom: -1px; | |
| 304 | - background-color: #fff; | |
| 305 | - border: 1px solid #ddd; | |
| 306 | - cursor: pointer; | |
| 307 | - | |
| 308 | - &:hover { | |
| 309 | - background-color: #f5f5f5; | |
| 310 | - } | |
| 311 | - | |
| 312 | - &.vc-node-selected { | |
| 313 | - background-color: #409EFF; | |
| 314 | - color: #fff; | |
| 315 | - } | |
| 316 | - } | |
| 317 | - } | |
| 318 | 298 | } |
| 319 | 299 | </style> |
| 320 | 300 | \ No newline at end of file | ... | ... |
src/views/resource/printAllocationStorehouseLang.js
0 → 100644
| 1 | +export const messages = { | |
| 2 | + en: { | |
| 3 | + printAllocationStorehouse:{ | |
| 4 | + title: 'Allocation Storehouse Print', | |
| 5 | + applyId: 'Apply ID', | |
| 6 | + startUserName: 'Applicant', | |
| 7 | + createTime: 'Apply Time', | |
| 8 | + number: 'No.', | |
| 9 | + resName: 'Allocation Item', | |
| 10 | + resType: 'Item Type', | |
| 11 | + specName: 'Item Specification', | |
| 12 | + resCode: 'Item Code', | |
| 13 | + isFixedName: 'Fixed Item', | |
| 14 | + source: 'Source', | |
| 15 | + targetStorehouse: 'Target Storehouse', | |
| 16 | + originalStock: 'Original Stock', | |
| 17 | + allocationQuantity: 'Allocation Quantity', | |
| 18 | + remark: 'Remark', | |
| 19 | + storeManagerSign: 'Store Manager Sign', | |
| 20 | + allocationStaffSign: 'Allocation Staff Sign', | |
| 21 | + time: 'Time', | |
| 22 | + fetchError: 'Failed to get allocation information', | |
| 23 | + } | |
| 24 | + }, | |
| 25 | + zh: { | |
| 26 | + printAllocationStorehouse:{ | |
| 27 | + title: '调拨仓库打印', | |
| 28 | + applyId: '申请单号', | |
| 29 | + startUserName: '申请人', | |
| 30 | + createTime: '申请时间', | |
| 31 | + number: '编号', | |
| 32 | + resName: '调拨物品', | |
| 33 | + resType: '物品类型', | |
| 34 | + specName: '物品规格', | |
| 35 | + resCode: '物品编码', | |
| 36 | + isFixedName: '固定物品', | |
| 37 | + source: '来源', | |
| 38 | + targetStorehouse: '目标仓库', | |
| 39 | + originalStock: '原库存', | |
| 40 | + allocationQuantity: '调拨数量', | |
| 41 | + remark: '备注', | |
| 42 | + storeManagerSign: '仓库管理员签字', | |
| 43 | + allocationStaffSign: '调拨人员签字', | |
| 44 | + time: '时间', | |
| 45 | + fetchError: '获取调拨信息失败' | |
| 46 | + } | |
| 47 | + } | |
| 48 | +} | |
| 0 | 49 | \ No newline at end of file | ... | ... |
src/views/resource/printAllocationStorehouseList.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="print-allocation-storehouse-container"> | |
| 3 | + <div> | |
| 4 | + <div> | |
| 5 | + <div class="flex justify-between"> | |
| 6 | + <div class="col-sm-4"> | |
| 7 | + <span> | |
| 8 | + <span>{{ $t('printAllocationStorehouse.applyId') }}</span>:{{ printAllocationStorehouseInfo.conditions.applyId }} | |
| 9 | + </span> | |
| 10 | + </div> | |
| 11 | + <div class="col-sm-4"> | |
| 12 | + <span> | |
| 13 | + <span>{{ $t('printAllocationStorehouse.startUserName') }}</span>:{{ printAllocationStorehouseInfo.conditions.startUserName }} | |
| 14 | + </span> | |
| 15 | + </div> | |
| 16 | + <div class="col-sm-4"> | |
| 17 | + <span> | |
| 18 | + <span>{{ $t('printAllocationStorehouse.createTime') }}</span>:{{ printAllocationStorehouseInfo.conditions.createTime }} | |
| 19 | + </span> | |
| 20 | + </div> | |
| 21 | + </div> | |
| 22 | + | |
| 23 | + <table class="table table-bordered margin-top"> | |
| 24 | + <thead> | |
| 25 | + <tr> | |
| 26 | + <th scope="col" class="text-center"> | |
| 27 | + <span>{{ $t('printAllocationStorehouse.number') }}</span> | |
| 28 | + </th> | |
| 29 | + <th scope="col" class="text-center"> | |
| 30 | + <span>{{ $t('printAllocationStorehouse.resName') }}</span> | |
| 31 | + </th> | |
| 32 | + <th scope="col" class="text-center"> | |
| 33 | + <span>{{ $t('printAllocationStorehouse.resType') }}</span> | |
| 34 | + </th> | |
| 35 | + <th scope="col" class="text-center"> | |
| 36 | + <span>{{ $t('printAllocationStorehouse.specName') }}</span> | |
| 37 | + </th> | |
| 38 | + <th scope="col" class="text-center"> | |
| 39 | + <span>{{ $t('printAllocationStorehouse.resCode') }}</span> | |
| 40 | + </th> | |
| 41 | + <th scope="col" class="text-center"> | |
| 42 | + <span>{{ $t('printAllocationStorehouse.isFixedName') }}</span> | |
| 43 | + </th> | |
| 44 | + <th scope="col" class="text-center"> | |
| 45 | + {{ printAllocationStorehouseInfo.conditions.applyType == '10000' || | |
| 46 | + printAllocationStorehouseInfo.conditions.applyType == '30000' ? | |
| 47 | + $t('printAllocationStorehouse.sourceWarehouse') : | |
| 48 | + $t('printAllocationStorehouse.returnPerson') }} | |
| 49 | + </th> | |
| 50 | + <th scope="col" class="text-center"> | |
| 51 | + <span>{{ $t('printAllocationStorehouse.targetStorehouse') }}</span> | |
| 52 | + </th> | |
| 53 | + <th scope="col" class="text-center"> | |
| 54 | + <span>{{ $t('printAllocationStorehouse.originalStock') }}</span> | |
| 55 | + </th> | |
| 56 | + <th scope="col" class="text-center"> | |
| 57 | + <span>{{ $t('printAllocationStorehouse.allocationQuantity') }}</span> | |
| 58 | + </th> | |
| 59 | + </tr> | |
| 60 | + </thead> | |
| 61 | + <tbody> | |
| 62 | + <tr v-for="(item, index) in printAllocationStorehouseInfo.resourceStores" :key="index"> | |
| 63 | + <th scope="row" class="text-center">{{ index + 1 }}</th> | |
| 64 | + <td class="text-center">{{ item.resName }}</td> | |
| 65 | + <td class="text-center">{{ item.parentRstName }} > {{ item.rstName }}</td> | |
| 66 | + <td class="text-center">{{ item.specName ? item.specName : '-' }}</td> | |
| 67 | + <td class="text-center">{{ item.resCode }}</td> | |
| 68 | + <td class="text-center">{{ item.isFixedName }}</td> | |
| 69 | + <td class="text-center"> | |
| 70 | + {{ printAllocationStorehouseInfo.conditions.applyType == '10000' || | |
| 71 | + printAllocationStorehouseInfo.conditions.applyType == '30000' ? | |
| 72 | + item.shaName : printAllocationStorehouseInfo.conditions.startUserName }} | |
| 73 | + </td> | |
| 74 | + <td class="text-center">{{ item.shzName }}</td> | |
| 75 | + <td class="text-center">{{ item.originalStock }}{{ item.unitCodeName }}</td> | |
| 76 | + <td class="text-center"> | |
| 77 | + {{ item.stock }}{{ item.applyType == 20000 ? item.miniUnitCodeName : item.unitCodeName }} | |
| 78 | + </td> | |
| 79 | + </tr> | |
| 80 | + <tr> | |
| 81 | + <th scope="row" class="text-center"> | |
| 82 | + <span>{{ $t('printAllocationStorehouse.remark') }}</span> | |
| 83 | + </th> | |
| 84 | + <td colspan="9" style="text-align:center">{{ printAllocationStorehouseInfo.conditions.remark }}</td> | |
| 85 | + </tr> | |
| 86 | + <tr height="60px"> | |
| 87 | + <td colspan="2" class="text-center" style="vertical-align:middle;"> | |
| 88 | + <span>{{ $t('printAllocationStorehouse.storeManagerSign') }}</span> | |
| 89 | + </td> | |
| 90 | + <td colspan="2"></td> | |
| 91 | + <td class="text-center" style="vertical-align:middle;"> | |
| 92 | + <span>{{ $t('printAllocationStorehouse.time') }}</span> | |
| 93 | + </td> | |
| 94 | + <td colspan="5"></td> | |
| 95 | + </tr> | |
| 96 | + <tr height="60px"> | |
| 97 | + <td colspan="2" class="text-center" style="vertical-align:middle;"> | |
| 98 | + <span>{{ $t('printAllocationStorehouse.allocationStaffSign') }}</span> | |
| 99 | + </td> | |
| 100 | + <td colspan="2"></td> | |
| 101 | + <td class="text-center" style="vertical-align:middle;"> | |
| 102 | + <span>{{ $t('printAllocationStorehouse.time') }}</span> | |
| 103 | + </td> | |
| 104 | + <td colspan="5"></td> | |
| 105 | + </tr> | |
| 106 | + </tbody> | |
| 107 | + </table> | |
| 108 | + </div> | |
| 109 | + | |
| 110 | + <div id="print-btn"> | |
| 111 | + <el-button type="primary" class="float-right" @click="handlePrint"> | |
| 112 | + <i class="el-icon-printer"></i> {{ $t('common.print') }} | |
| 113 | + </el-button> | |
| 114 | + <el-button type="warning" class="float-right" style="margin-right:20px;" @click="handleCancel"> | |
| 115 | + {{ $t('common.cancel') }} | |
| 116 | + </el-button> | |
| 117 | + </div> | |
| 118 | + </div> | |
| 119 | + </div> | |
| 120 | +</template> | |
| 121 | + | |
| 122 | +<script> | |
| 123 | +import { listAllocationStorehouseApplys, listAllocationStorehouses } from '@/api/resource/printAllocationStorehouseApi' | |
| 124 | + | |
| 125 | +export default { | |
| 126 | + name: 'PrintAllocationStorehouseList', | |
| 127 | + data() { | |
| 128 | + return { | |
| 129 | + printAllocationStorehouseInfo: { | |
| 130 | + resourceStores: [], | |
| 131 | + conditions: {} | |
| 132 | + }, | |
| 133 | + printFlag: '0' | |
| 134 | + } | |
| 135 | + }, | |
| 136 | + created() { | |
| 137 | + this.initData() | |
| 138 | + }, | |
| 139 | + methods: { | |
| 140 | + async initData() { | |
| 141 | + try { | |
| 142 | + const applyId = this.$route.query.applyId | |
| 143 | + const params = { | |
| 144 | + page: 1, | |
| 145 | + row: 1, | |
| 146 | + applyId: applyId | |
| 147 | + } | |
| 148 | + | |
| 149 | + const [applyRes, storeRes] = await Promise.all([ | |
| 150 | + listAllocationStorehouseApplys(params), | |
| 151 | + listAllocationStorehouses(params) | |
| 152 | + ]) | |
| 153 | + | |
| 154 | + this.printAllocationStorehouseInfo.conditions = applyRes.data[0] | |
| 155 | + this.printAllocationStorehouseInfo.resourceStores = storeRes.data | |
| 156 | + } catch (error) { | |
| 157 | + this.$message.error(this.$t('printAllocationStorehouse.fetchError')) | |
| 158 | + } | |
| 159 | + }, | |
| 160 | + handlePrint() { | |
| 161 | + this.printFlag = '1' | |
| 162 | + document.getElementById("print-btn").style.display = "none" | |
| 163 | + window.print() | |
| 164 | + window.close() | |
| 165 | + }, | |
| 166 | + handleCancel() { | |
| 167 | + window.close() | |
| 168 | + } | |
| 169 | + } | |
| 170 | +} | |
| 171 | +</script> | |
| 172 | + | |
| 173 | +<style scoped> | |
| 174 | +.print-allocation-storehouse-container { | |
| 175 | + padding: 20px; | |
| 176 | +} | |
| 177 | + | |
| 178 | +.margin-top { | |
| 179 | + margin-top: 20px; | |
| 180 | +} | |
| 181 | + | |
| 182 | +.text-center { | |
| 183 | + text-align: center; | |
| 184 | +} | |
| 185 | + | |
| 186 | +.float-right { | |
| 187 | + float: right; | |
| 188 | +} | |
| 189 | + | |
| 190 | +/* Bootstrap 表格样式 */ | |
| 191 | +.table { | |
| 192 | + width: 100%; | |
| 193 | + margin-bottom: 1rem; | |
| 194 | + color: #212529; | |
| 195 | + border-collapse: collapse; | |
| 196 | +} | |
| 197 | + | |
| 198 | +.table-bordered { | |
| 199 | + border: 1px solid #dee2e6; | |
| 200 | +} | |
| 201 | + | |
| 202 | +.table-bordered th, | |
| 203 | +.table-bordered td { | |
| 204 | + border: 1px solid #dee2e6; | |
| 205 | +} | |
| 206 | + | |
| 207 | +.table th, | |
| 208 | +.table td { | |
| 209 | + padding: 0.75rem; | |
| 210 | + vertical-align: top; | |
| 211 | + border-top: 1px solid #dee2e6; | |
| 212 | +} | |
| 213 | + | |
| 214 | +.table thead th { | |
| 215 | + vertical-align: bottom; | |
| 216 | + border-bottom: 2px solid #dee2e6; | |
| 217 | + background-color: #f8f9fa; | |
| 218 | + font-weight: 500; | |
| 219 | +} | |
| 220 | + | |
| 221 | +/* Bootstrap 栅格系统 */ | |
| 222 | +.row { | |
| 223 | + display: flex; | |
| 224 | + flex-wrap: wrap; | |
| 225 | + margin-right: -15px; | |
| 226 | + margin-left: -15px; | |
| 227 | +} | |
| 228 | + | |
| 229 | +.col-sm-4 { | |
| 230 | + flex: 0 0 33.333333%; | |
| 231 | + max-width: 33.333333%; | |
| 232 | + padding-right: 15px; | |
| 233 | + padding-left: 15px; | |
| 234 | +} | |
| 235 | + | |
| 236 | +/* 打印样式 */ | |
| 237 | +@media print { | |
| 238 | + .print-allocation-storehouse-container { | |
| 239 | + padding: 0; | |
| 240 | + } | |
| 241 | + | |
| 242 | + #print-btn { | |
| 243 | + display: none !important; | |
| 244 | + } | |
| 245 | + | |
| 246 | + .table { | |
| 247 | + border: 1px solid #000; | |
| 248 | + } | |
| 249 | + | |
| 250 | + .table th, | |
| 251 | + .table td { | |
| 252 | + border: 1px solid #000; | |
| 253 | + padding: 8px; | |
| 254 | + } | |
| 255 | + | |
| 256 | + .table thead th { | |
| 257 | + background-color: #f0f0f0 !important; | |
| 258 | + } | |
| 259 | +} | |
| 260 | +</style> | |
| 0 | 261 | \ No newline at end of file | ... | ... |
src/views/resource/resourceStoreUseRecordManageList.vue
| ... | ... | @@ -332,6 +332,7 @@ export default { |
| 332 | 332 | } |
| 333 | 333 | await exportData(params) |
| 334 | 334 | this.$message.success(this.$t('common.exportSuccess')) |
| 335 | + this.$router.push('/pages/property/downloadTempFile?tab=下载中心') | |
| 335 | 336 | } catch (error) { |
| 336 | 337 | console.error(error) |
| 337 | 338 | this.$message.error(this.$t('common.exportFailed')) | ... | ... |