Commit 10d41618a894bd849dd8f7dd91c930dac635f507
1 parent
baee4721
v1.9 测试采购功能,部分页面功能优化
Showing
11 changed files
with
403 additions
and
129 deletions
src/components/resource/chooseResourceStore4.vue
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | <el-dialog :title="$t('chooseResourceStore4.title')" :visible.sync="visible" width="80%" @close="handleClose"> |
| 3 | 3 | <div class="filter-container"> |
| 4 | 4 | <el-row :gutter="20"> |
| 5 | - <el-col :span="8"> | |
| 5 | + <el-col :span="4"> | |
| 6 | 6 | <el-select v-model="chooseResourceStoreInfo4.shId" disabled style="width:100%"> |
| 7 | 7 | <el-option value="" :label="$t('chooseResourceStore4.selectWarehouse')" /> |
| 8 | 8 | <el-option v-for="(item, index) in chooseResourceStoreInfo4.storehouses" :key="index" :label="item.shName" |
| ... | ... | @@ -10,7 +10,7 @@ |
| 10 | 10 | </el-select> |
| 11 | 11 | </el-col> |
| 12 | 12 | |
| 13 | - <el-col :span="8"> | |
| 13 | + <el-col :span="4"> | |
| 14 | 14 | <el-select v-model="chooseResourceStoreInfo4.parentRstId" @change="_listResourceStoreSonTypes" |
| 15 | 15 | style="width:100%"> |
| 16 | 16 | <el-option value="" :label="$t('chooseResourceStore4.selectItemType')" /> |
| ... | ... | @@ -19,21 +19,19 @@ |
| 19 | 19 | </el-select> |
| 20 | 20 | </el-col> |
| 21 | 21 | |
| 22 | - <el-col :span="8"> | |
| 22 | + <el-col :span="4"> | |
| 23 | 23 | <el-select v-model="chooseResourceStoreInfo4.rstId" style="width:100%;margin-right:10px"> |
| 24 | 24 | <el-option value="" :label="$t('chooseResourceStore4.selectSubType')" /> |
| 25 | 25 | <el-option v-for="(item, index) in chooseResourceStoreInfo4.resourceStoreSonTypes" :key="index" |
| 26 | 26 | :label="item.name" :value="item.rstId" /> |
| 27 | 27 | </el-select> |
| 28 | 28 | </el-col> |
| 29 | - </el-row> | |
| 30 | - | |
| 31 | - <el-row :gutter="20" style="margin-top:10px"> | |
| 32 | - <el-col :span="8"> | |
| 29 | +4 | |
| 30 | + <el-col :span="4"> | |
| 33 | 31 | <el-input v-model.trim="chooseResourceStoreInfo4._currentResourceStoreName" |
| 34 | 32 | :placeholder="$t('chooseResourceStore4.inputItemName')" /> |
| 35 | 33 | </el-col> |
| 36 | - <el-col :span="16" style="text-align:right"> | |
| 34 | + <el-col :span="4" style="text-align:right"> | |
| 37 | 35 | <el-button type="primary" @click="queryResourceStores"> |
| 38 | 36 | <i class="el-icon-search"></i> |
| 39 | 37 | {{ $t('common.search') }} | ... | ... |
src/components/system/viewImage.vue
| ... | ... | @@ -2,20 +2,21 @@ |
| 2 | 2 | <div class="view-image-container"> |
| 3 | 3 | <el-dialog |
| 4 | 4 | :visible.sync="visible" |
| 5 | - :fullscreen="true" | |
| 5 | + :width="dialogWidth" | |
| 6 | 6 | :show-close="true" |
| 7 | 7 | custom-class="image-viewer-dialog" |
| 8 | + @close="close" | |
| 9 | + center | |
| 8 | 10 | > |
| 9 | 11 | <div class="image-wrapper"> |
| 10 | 12 | <img |
| 11 | 13 | :src="imageInfo.url" |
| 12 | 14 | :style="{ |
| 13 | - width: imageInfo.width + 'px', | |
| 14 | - height: imageInfo.height + 'px' | |
| 15 | + maxWidth: '100%', | |
| 16 | + maxHeight: imageInfo.maxHeight + 'px' | |
| 15 | 17 | }" |
| 16 | 18 | @error="handleImageError" |
| 17 | 19 | /> |
| 18 | - <i class="el-icon-close close-icon" @click="close"></i> | |
| 19 | 20 | </div> |
| 20 | 21 | </el-dialog> |
| 21 | 22 | </div> |
| ... | ... | @@ -27,10 +28,10 @@ export default { |
| 27 | 28 | data() { |
| 28 | 29 | return { |
| 29 | 30 | visible: false, |
| 31 | + dialogWidth: '50%', | |
| 30 | 32 | imageInfo: { |
| 31 | 33 | url: '', |
| 32 | - width: 800, | |
| 33 | - height: 800 | |
| 34 | + maxHeight: 600 | |
| 34 | 35 | } |
| 35 | 36 | } |
| 36 | 37 | }, |
| ... | ... | @@ -39,21 +40,24 @@ export default { |
| 39 | 40 | this.imageInfo.url = params.url |
| 40 | 41 | this.visible = true |
| 41 | 42 | |
| 42 | - // 动态计算图片尺寸 | |
| 43 | - const img = new Image() | |
| 44 | - img.src = params.url | |
| 45 | - img.onload = () => { | |
| 46 | - const imgScale = img.width / img.height | |
| 47 | - this.imageInfo.width = 800 | |
| 48 | - this.imageInfo.height = 800 / imgScale | |
| 43 | + // 根据屏幕尺寸动态调整对话框大小 | |
| 44 | + const screenWidth = window.innerWidth | |
| 45 | + if (screenWidth < 768) { | |
| 46 | + this.dialogWidth = '90%' | |
| 47 | + this.imageInfo.maxHeight = 400 | |
| 48 | + } else if (screenWidth < 1200) { | |
| 49 | + this.dialogWidth = '70%' | |
| 50 | + this.imageInfo.maxHeight = 500 | |
| 51 | + } else { | |
| 52 | + this.dialogWidth = '50%' | |
| 53 | + this.imageInfo.maxHeight = 600 | |
| 49 | 54 | } |
| 50 | 55 | }, |
| 51 | 56 | close() { |
| 52 | 57 | this.visible = false |
| 53 | 58 | this.imageInfo = { |
| 54 | 59 | url: '', |
| 55 | - width: 800, | |
| 56 | - height: 800 | |
| 60 | + maxHeight: 600 | |
| 57 | 61 | } |
| 58 | 62 | }, |
| 59 | 63 | handleImageError(e) { |
| ... | ... | @@ -65,34 +69,28 @@ export default { |
| 65 | 69 | |
| 66 | 70 | <style lang="scss" scoped> |
| 67 | 71 | .view-image-container { |
| 68 | - .image-viewer-dialog { | |
| 69 | - background-color: rgba(0, 0, 0, 0.8); | |
| 72 | + ::v-deep .image-viewer-dialog { | |
| 73 | + .el-dialog__header { | |
| 74 | + padding: 10px; | |
| 75 | + } | |
| 76 | + | |
| 77 | + .el-dialog__body { | |
| 78 | + padding: 20px; | |
| 79 | + text-align: center; | |
| 80 | + } | |
| 70 | 81 | |
| 71 | 82 | .image-wrapper { |
| 72 | - position: relative; | |
| 73 | 83 | display: flex; |
| 74 | 84 | justify-content: center; |
| 75 | 85 | align-items: center; |
| 76 | - height: 100%; | |
| 86 | + min-height: 200px; | |
| 77 | 87 | |
| 78 | 88 | img { |
| 79 | - max-width: 90%; | |
| 80 | - max-height: 90%; | |
| 89 | + display: block; | |
| 90 | + width: auto; | |
| 91 | + height: auto; | |
| 81 | 92 | object-fit: contain; |
| 82 | - } | |
| 83 | - | |
| 84 | - .close-icon { | |
| 85 | - position: absolute; | |
| 86 | - top: 20px; | |
| 87 | - right: 20px; | |
| 88 | - font-size: 24px; | |
| 89 | - color: #fff; | |
| 90 | - cursor: pointer; | |
| 91 | - z-index: 2001; | |
| 92 | - | |
| 93 | - &:hover { | |
| 94 | - color: #f56c6c; | |
| 95 | - } | |
| 93 | + border-radius: 4px; | |
| 96 | 94 | } |
| 97 | 95 | } |
| 98 | 96 | } | ... | ... |
src/router/index.js
| ... | ... | @@ -753,6 +753,11 @@ const routes = [ |
| 753 | 753 | name: '/views/resource/printPurchaseApply', |
| 754 | 754 | component: () => import('@/views/resource/printPurchaseApply.vue') |
| 755 | 755 | }, |
| 756 | + { | |
| 757 | + path: '/pages/property/printPurchaseOutApply', | |
| 758 | + name: '/views/resource/printPurchaseOutApply', | |
| 759 | + component: () => import('@/views/resource/printPurchaseOutApply.vue') | |
| 760 | +}, | |
| 756 | 761 | ] |
| 757 | 762 | |
| 758 | 763 | const router = new VueRouter({ | ... | ... |
src/router/resourceRouter.js
| ... | ... | @@ -210,5 +210,10 @@ export default [ |
| 210 | 210 | name: '/views/resource/printPurchaseApply', |
| 211 | 211 | component: () => import('@/views/resource/printPurchaseApply.vue') |
| 212 | 212 | }, |
| 213 | + { | |
| 214 | + path: '/views/resource/printPurchaseOutApply', | |
| 215 | + name: '/views/resource/printPurchaseOutApply', | |
| 216 | + component: () => import('@/views/resource/printPurchaseOutApply.vue') | |
| 217 | + }, | |
| 213 | 218 | |
| 214 | 219 | ] |
| 215 | 220 | \ No newline at end of file | ... | ... |
src/views/report/reportNoFeeRoomList.vue
| 1 | 1 | <template> |
| 2 | 2 | <div class="report-no-fee-room-container animated fadeInRight"> |
| 3 | - <el-row :gutter="20"> | |
| 4 | - <el-col :span="24"> | |
| 3 | + | |
| 5 | 4 | <el-card class="search-card"> |
| 6 | 5 | <div slot="header" class="flex justify-between"> |
| 7 | 6 | <span>{{ $t('reportNoFeeRoom.search.title') }}</span> |
| ... | ... | @@ -44,10 +43,9 @@ |
| 44 | 43 | </el-col> |
| 45 | 44 | </el-row> |
| 46 | 45 | </el-card> |
| 47 | - </el-col> | |
| 48 | - </el-row> | |
| 49 | 46 | |
| 50 | - <el-row :gutter="20" style="margin-top:20px;"> | |
| 47 | + | |
| 48 | + <el-row :gutter="20" > | |
| 51 | 49 | <el-col :span="24"> |
| 52 | 50 | <el-card> |
| 53 | 51 | <div slot="header" class="flex justify-between "> | ... | ... |
src/views/resource/allocationStorehouseDetailedList.vue
| ... | ... | @@ -72,7 +72,7 @@ |
| 72 | 72 | </el-col> |
| 73 | 73 | </el-row> |
| 74 | 74 | |
| 75 | - <el-row v-show="allocationStorehousesInfo.moreCondition == true" :gutter="20"> | |
| 75 | + <el-row v-show="allocationStorehousesInfo.moreCondition == true" :gutter="20" class="margin-top margin-bottom"> | |
| 76 | 76 | <el-col :span="4"> |
| 77 | 77 | <el-input v-model.trim="allocationStorehousesInfo.conditions.applyId" |
| 78 | 78 | :placeholder="$t('allocationStorehouseDetailed.applyIdPlaceholder')" clearable /> | ... | ... |
src/views/resource/assetInventoryInList.vue
| ... | ... | @@ -99,13 +99,13 @@ |
| 99 | 99 | <el-table-column :label="$t('assetInventory.afterQuantity')" align="center"> |
| 100 | 100 | <template slot-scope="scope"> |
| 101 | 101 | <el-input-number v-model="scope.row.quantity" |
| 102 | - :placeholder="$t('assetInventory.afterQuantityPlaceholder')" style="width:70%" :min="1" /> | |
| 102 | + :placeholder="$t('assetInventory.afterQuantityPlaceholder')" style="width:70%" :min="1" :controls="false" /> | |
| 103 | 103 | <span style="margin-left:5px">{{ scope.row.unitCodeName }}</span> |
| 104 | 104 | </template> |
| 105 | 105 | </el-table-column> |
| 106 | 106 | <el-table-column :label="$t('assetInventory.remark')" align="center"> |
| 107 | 107 | <template slot-scope="scope"> |
| 108 | - <el-input v-model="scope.row.remark" :placeholder="$t('assetInventory.itemRemarkPlaceholder')" /> | |
| 108 | + <el-input v-model="scope.row.remark" :placeholder="$t('assetInventory.remark')" /> | |
| 109 | 109 | </template> |
| 110 | 110 | </el-table-column> |
| 111 | 111 | <el-table-column :label="$t('assetInventory.operation')" align="center" width="120"> | ... | ... |
src/views/resource/assetInventoryInStockList.vue
| 1 | 1 | <template> |
| 2 | 2 | <div class="asset-inventory-in-stock-container"> |
| 3 | - <el-row> | |
| 4 | - <el-col :span="24"> | |
| 5 | - <el-card> | |
| 6 | - <div slot="header" class="flex justify-between"> | |
| 7 | - <span>{{ $t('assetInventoryInStock.title') }}</span> | |
| 8 | - <div class="card-header-actions"> | |
| 9 | - <el-button type="primary" size="small" @click="_printAssetInventoryInStock"> | |
| 10 | - <i class="el-icon-printer"></i> {{ $t('assetInventoryInStock.print') }} | |
| 11 | - </el-button> | |
| 12 | - <el-button type="primary" size="small" @click="_goBack"> | |
| 13 | - <i class="el-icon-close"></i> {{ $t('assetInventoryInStock.back') }} | |
| 14 | - </el-button> | |
| 15 | - </div> | |
| 16 | - </div> | |
| 17 | 3 | |
| 18 | - <el-row> | |
| 19 | - <el-col :span="24"> | |
| 20 | - <el-form label-width="120px"> | |
| 21 | - <el-row> | |
| 22 | - <el-col :span="12"> | |
| 23 | - <el-form-item :label="$t('assetInventoryInStock.inventoryName')"> | |
| 24 | - <el-input v-model="assetInventoryInStockInfo.name" readonly></el-input> | |
| 25 | - </el-form-item> | |
| 26 | - </el-col> | |
| 27 | - <el-col :span="12"> | |
| 28 | - <el-form-item :label="$t('assetInventoryInStock.inventoryPerson')"> | |
| 29 | - <el-input v-model="assetInventoryInStockInfo.staffName" readonly></el-input> | |
| 30 | - </el-form-item> | |
| 31 | - </el-col> | |
| 32 | - </el-row> | |
| 33 | - | |
| 34 | - <el-row> | |
| 35 | - <el-col :span="12"> | |
| 36 | - <el-form-item :label="$t('assetInventoryInStock.warehouse')"> | |
| 37 | - <el-input v-model="assetInventoryInStockInfo.shName" readonly></el-input> | |
| 38 | - </el-form-item> | |
| 39 | - </el-col> | |
| 40 | - <el-col :span="12"> | |
| 41 | - <el-form-item :label="$t('assetInventoryInStock.inventoryDate')"> | |
| 42 | - <el-input v-model="assetInventoryInStockInfo.invTime" readonly></el-input> | |
| 43 | - </el-form-item> | |
| 44 | - </el-col> | |
| 45 | - </el-row> | |
| 46 | - | |
| 47 | - <el-row> | |
| 48 | - <el-col :span="24"> | |
| 49 | - <el-form-item :label="$t('assetInventoryInStock.remark')"> | |
| 50 | - <el-input type="textarea" v-model="assetInventoryInStockInfo.remark" readonly></el-input> | |
| 51 | - </el-form-item> | |
| 52 | - </el-col> | |
| 53 | - </el-row> | |
| 54 | - | |
| 55 | - <el-row> | |
| 56 | - <el-col :span="24"> | |
| 57 | - <el-form-item :label="$t('assetInventoryInStock.status')"> | |
| 58 | - <el-input v-model="assetInventoryInStockInfo.stateName" readonly></el-input> | |
| 59 | - </el-form-item> | |
| 60 | - </el-col> | |
| 61 | - </el-row> | |
| 62 | - </el-form> | |
| 63 | - </el-col> | |
| 64 | - </el-row> | |
| 65 | - </el-card> | |
| 66 | - </el-col> | |
| 67 | - </el-row> | |
| 4 | + <el-card> | |
| 5 | + <div slot="header" class="flex justify-between"> | |
| 6 | + <span>{{ $t('assetInventoryInStock.title') }}</span> | |
| 7 | + <div class="card-header-actions"> | |
| 8 | + <el-button type="primary" size="small" @click="_printAssetInventoryInStock"> | |
| 9 | + <i class="el-icon-printer"></i> {{ $t('assetInventoryInStock.print') }} | |
| 10 | + </el-button> | |
| 11 | + <el-button type="primary" size="small" @click="_goBack"> | |
| 12 | + <i class="el-icon-close"></i> {{ $t('assetInventoryInStock.back') }} | |
| 13 | + </el-button> | |
| 14 | + </div> | |
| 15 | + </div> | |
| 16 | + | |
| 17 | + <el-row> | |
| 18 | + <el-col :span="24"> | |
| 19 | + <el-form label-width="120px"> | |
| 20 | + <el-row :gutter="20" class="margin-bottom"> | |
| 21 | + <el-col :span="12"> | |
| 22 | + <el-form-item :label="$t('assetInventoryInStock.inventoryName')"> | |
| 23 | + <el-input v-model="assetInventoryInStockInfo.name" readonly></el-input> | |
| 24 | + </el-form-item> | |
| 25 | + </el-col> | |
| 26 | + <el-col :span="12"> | |
| 27 | + <el-form-item :label="$t('assetInventoryInStock.inventoryPerson')"> | |
| 28 | + <el-input v-model="assetInventoryInStockInfo.staffName" readonly></el-input> | |
| 29 | + </el-form-item> | |
| 30 | + </el-col> | |
| 31 | + </el-row> | |
| 32 | + | |
| 33 | + <el-row class="margin-bottom"> | |
| 34 | + <el-col :span="12"> | |
| 35 | + <el-form-item :label="$t('assetInventoryInStock.warehouse')"> | |
| 36 | + <el-input v-model="assetInventoryInStockInfo.shName" readonly></el-input> | |
| 37 | + </el-form-item> | |
| 38 | + </el-col> | |
| 39 | + <el-col :span="12"> | |
| 40 | + <el-form-item :label="$t('assetInventoryInStock.inventoryDate')"> | |
| 41 | + <el-input v-model="assetInventoryInStockInfo.invTime" readonly></el-input> | |
| 42 | + </el-form-item> | |
| 43 | + </el-col> | |
| 44 | + </el-row> | |
| 45 | + | |
| 46 | + <el-row class="margin-bottom"> | |
| 47 | + <el-col :span="24"> | |
| 48 | + <el-form-item :label="$t('assetInventoryInStock.remark')"> | |
| 49 | + <el-input type="textarea" v-model="assetInventoryInStockInfo.remark" readonly></el-input> | |
| 50 | + </el-form-item> | |
| 51 | + </el-col> | |
| 52 | + </el-row> | |
| 53 | + | |
| 54 | + <el-row> | |
| 55 | + <el-col :span="24"> | |
| 56 | + <el-form-item :label="$t('assetInventoryInStock.status')"> | |
| 57 | + <el-input v-model="assetInventoryInStockInfo.stateName" readonly></el-input> | |
| 58 | + </el-form-item> | |
| 59 | + </el-col> | |
| 60 | + </el-row> | |
| 61 | + </el-form> | |
| 62 | + </el-col> | |
| 63 | + </el-row> | |
| 64 | + </el-card> | |
| 68 | 65 | |
| 69 | 66 | <el-row class="mt-20"> |
| 70 | 67 | <el-col :span="24"> |
| ... | ... | @@ -74,21 +71,26 @@ |
| 74 | 71 | </div> |
| 75 | 72 | |
| 76 | 73 | <el-table :data="assetInventoryInStockInfo.storehouses" border style="width: 100%"> |
| 77 | - <el-table-column prop="shName" :label="$t('assetInventoryInStock.warehouseName')" align="center"></el-table-column> | |
| 74 | + <el-table-column prop="shName" :label="$t('assetInventoryInStock.warehouseName')" | |
| 75 | + align="center"></el-table-column> | |
| 78 | 76 | <el-table-column :label="$t('assetInventoryInStock.itemType')" align="center"> |
| 79 | 77 | <template slot-scope="scope"> |
| 80 | 78 | {{ scope.row.parentRstName || '-' }} > {{ scope.row.rstName || '-' }} |
| 81 | 79 | </template> |
| 82 | 80 | </el-table-column> |
| 83 | - <el-table-column prop="resName" :label="$t('assetInventoryInStock.itemName')" align="center"></el-table-column> | |
| 81 | + <el-table-column prop="resName" :label="$t('assetInventoryInStock.itemName')" | |
| 82 | + align="center"></el-table-column> | |
| 84 | 83 | <el-table-column prop="specName" :label="$t('assetInventoryInStock.specification')" align="center"> |
| 85 | 84 | <template slot-scope="scope"> |
| 86 | 85 | {{ scope.row.specName || '-' }} |
| 87 | 86 | </template> |
| 88 | 87 | </el-table-column> |
| 89 | - <el-table-column prop="resCode" :label="$t('assetInventoryInStock.itemCode')" align="center"></el-table-column> | |
| 90 | - <el-table-column prop="isFixedName" :label="$t('assetInventoryInStock.isFixedItem')" align="center"></el-table-column> | |
| 91 | - <el-table-column prop="timesPrice" :label="$t('assetInventoryInStock.batchPrice')" align="center"></el-table-column> | |
| 88 | + <el-table-column prop="resCode" :label="$t('assetInventoryInStock.itemCode')" | |
| 89 | + align="center"></el-table-column> | |
| 90 | + <el-table-column prop="isFixedName" :label="$t('assetInventoryInStock.isFixedItem')" | |
| 91 | + align="center"></el-table-column> | |
| 92 | + <el-table-column prop="timesPrice" :label="$t('assetInventoryInStock.batchPrice')" | |
| 93 | + align="center"></el-table-column> | |
| 92 | 94 | <el-table-column :label="$t('assetInventoryInStock.originalStock')" align="center"> |
| 93 | 95 | <template slot-scope="scope"> |
| 94 | 96 | {{ scope.row.originalStock }}{{ scope.row.unitCodeName }} |
| ... | ... | @@ -105,15 +107,16 @@ |
| 105 | 107 | </el-col> |
| 106 | 108 | </el-row> |
| 107 | 109 | |
| 108 | - <el-row v-if="assetInventoryInStockInfo.state === '3000' || assetInventoryInStockInfo.state === '4000'" class="mt-20"> | |
| 110 | + <el-row v-if="assetInventoryInStockInfo.state === '3000' || assetInventoryInStockInfo.state === '4000'" | |
| 111 | + class="mt-20"> | |
| 109 | 112 | <el-col :span="24"> |
| 110 | 113 | <el-card> |
| 111 | - <div slot="header" class="clearfix"> | |
| 114 | + <div slot="header" class="flex justify-between"> | |
| 112 | 115 | <span>{{ $t('assetInventoryInStock.auditInfo') }}</span> |
| 113 | 116 | </div> |
| 114 | 117 | |
| 115 | 118 | <el-form label-width="120px"> |
| 116 | - <el-row> | |
| 119 | + <el-row class="margin-bottom"> | |
| 117 | 120 | <el-col :span="12"> |
| 118 | 121 | <el-form-item :label="$t('assetInventoryInStock.auditor')"> |
| 119 | 122 | <el-input v-model="assetInventoryInStockInfo.auditName" readonly></el-input> |
| ... | ... | @@ -126,7 +129,7 @@ |
| 126 | 129 | </el-col> |
| 127 | 130 | </el-row> |
| 128 | 131 | |
| 129 | - <el-row> | |
| 132 | + <el-row class="margin-bottom"> | |
| 130 | 133 | <el-col :span="12"> |
| 131 | 134 | <el-form-item :label="$t('assetInventoryInStock.auditTime')"> |
| 132 | 135 | <el-input v-model="assetInventoryInStockInfo.auditTime" readonly></el-input> |
| ... | ... | @@ -217,10 +220,10 @@ export default { |
| 217 | 220 | _computeData(item) { |
| 218 | 221 | item.invProfit = parseInt(item.invQuantity) - parseInt(item.quantity) |
| 219 | 222 | if (item.invProfit < 0) item.invProfit = 0 |
| 220 | - | |
| 223 | + | |
| 221 | 224 | item.invLoss = parseInt(item.quantity) - parseInt(item.invQuantity) |
| 222 | 225 | if (item.invLoss < 0) item.invLoss = 0 |
| 223 | - | |
| 226 | + | |
| 224 | 227 | item.invProfitMoney = item.invProfit * parseFloat(item.price) |
| 225 | 228 | item.invLossMoney = item.invLoss * parseFloat(item.price) |
| 226 | 229 | }, | ... | ... |
src/views/resource/printPurchaseOutApply.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="print-purchase-out-apply"> | |
| 3 | + <div class="content-wrapper"> | |
| 4 | + <!-- 申请单信息 --> | |
| 5 | + <div class="row info-row"> | |
| 6 | + <div class="col-sm-3"> | |
| 7 | + <span>{{ $t('purchaseApplyDetail.applyNo') }}{{ printPurchaseOutApplyInfo.applyOrderId }}</span> | |
| 8 | + </div> | |
| 9 | + <div class="col-sm-3"> | |
| 10 | + <span>{{ $t('purchaseApplyDetail.applicant') }}{{ printPurchaseOutApplyInfo.userName }}</span> | |
| 11 | + </div> | |
| 12 | + <div class="col-sm-3"> | |
| 13 | + <span>{{ $t('purchaseApplyDetail.contactPhone') }}{{ printPurchaseOutApplyInfo.endUserTel }}</span> | |
| 14 | + </div> | |
| 15 | + <div class="col-sm-3"> | |
| 16 | + <span>{{ $t('purchaseApplyDetail.applyTime') }}{{ printPurchaseOutApplyInfo.createTime }}</span> | |
| 17 | + </div> | |
| 18 | + </div> | |
| 19 | + | |
| 20 | + <!-- 领用明细表格 --> | |
| 21 | + <table class="table table-bordered margin-top"> | |
| 22 | + <thead> | |
| 23 | + <tr> | |
| 24 | + <th scope="col" class="text-center">{{ $t('purchaseApplyDetail.serialNumber') }}</th> | |
| 25 | + <th scope="col" class="text-center">{{ $t('purchaseApplyDetail.itemType') }}</th> | |
| 26 | + <th scope="col" class="text-center">{{ $t('purchaseApplyDetail.itemName') }}</th> | |
| 27 | + <th scope="col" class="text-center">{{ $t('purchaseApplyDetail.itemCode') }}</th> | |
| 28 | + <th scope="col" class="text-center">{{ $t('purchaseApplyDetail.warehouse') }}</th> | |
| 29 | + <th scope="col" class="text-center">{{ $t('purchaseApplyDetail.itemSpec') }}</th> | |
| 30 | + <th scope="col" class="text-center">{{ $t('purchaseApplyDetail.supplier') }}</th> | |
| 31 | + <th scope="col" class="text-center">{{ $t('purchaseApplyDetail.fixedItem') }}</th> | |
| 32 | + <th scope="col" class="text-center">{{ $t('purchaseApplyDetail.referencePrice') }}</th> | |
| 33 | + <th scope="col" class="text-center">{{ $t('purchaseApplyDetail.originalStock') }}</th> | |
| 34 | + <th scope="col" class="text-center">{{ $t('purchaseApplyDetail.currentStock') }}</th> | |
| 35 | + <th scope="col" class="text-center">{{ $t('purchaseApplyDetail.applyQuantity') }}</th> | |
| 36 | + <th scope="col" class="text-center">{{ $t('purchaseApplyDetail.receiveQuantity') }}</th> | |
| 37 | + </tr> | |
| 38 | + </thead> | |
| 39 | + <tbody> | |
| 40 | + <template v-for="(item, index) in printPurchaseOutApplyInfo.purchaseApplyDetailVo"> | |
| 41 | + <tr :key="'detail-' + index"> | |
| 42 | + <th scope="row" class="text-center">{{ index + 1 }}</th> | |
| 43 | + <td class="text-center">{{ item.parentRstName }} > {{ item.rstName }}</td> | |
| 44 | + <td class="text-center">{{ item.resName }}</td> | |
| 45 | + <td class="text-center">{{ item.resCode }}</td> | |
| 46 | + <td class="text-center">{{ item.shName }}</td> | |
| 47 | + <td class="text-center">{{ item.specName ? item.specName : '-' }}</td> | |
| 48 | + <td class="text-center">{{ item.supplierName ? item.supplierName : '-' }}</td> | |
| 49 | + <td class="text-center">{{ item.isFixedName }}</td> | |
| 50 | + <td class="text-center">{{ item.consultPrice ? '¥' + item.consultPrice : '-' }}</td> | |
| 51 | + <td class="text-center">{{ item.originalStock }}{{ item.unitCodeName }}</td> | |
| 52 | + <td class="text-center">{{ item.stock ? item.stock : '0' }}{{ item.unitCodeName }}</td> | |
| 53 | + <td class="text-center">{{ item.quantity }}{{ item.unitCodeName }}</td> | |
| 54 | + <td class="text-center"> | |
| 55 | + {{ item.purchaseQuantity ? item.purchaseQuantity + item.unitCodeName : '-' }} | |
| 56 | + </td> | |
| 57 | + </tr> | |
| 58 | + <tr :key="'remark-' + index"> | |
| 59 | + <th scope="row" class="text-center">{{ $t('purchaseApplyDetail.applyRemark') }}</th> | |
| 60 | + <td colspan="4" class="text-center">{{ item.remark }}</td> | |
| 61 | + <th class="text-center">{{ $t('purchaseApplyDetail.receiveRemark') }}</th> | |
| 62 | + <td colspan="7" class="text-center">{{ item.purchaseRemark ? item.purchaseRemark : '-' }}</td> | |
| 63 | + </tr> | |
| 64 | + </template> | |
| 65 | + <tr height="60px"> | |
| 66 | + <td colspan="2" class="text-center" style="vertical-align:middle;"> | |
| 67 | + {{ $t('purchaseApplyDetail.reviewerSignature') }} | |
| 68 | + </td> | |
| 69 | + <td colspan="4"></td> | |
| 70 | + <td class="text-center" style="vertical-align:middle;"> | |
| 71 | + {{ $t('purchaseApplyDetail.time') }} | |
| 72 | + </td> | |
| 73 | + <td colspan="6"></td> | |
| 74 | + </tr> | |
| 75 | + <tr height="60px"> | |
| 76 | + <td colspan="2" class="text-center" style="vertical-align:middle;"> | |
| 77 | + {{ $t('purchaseApplyDetail.applicantSignature') }} | |
| 78 | + </td> | |
| 79 | + <td colspan="4"></td> | |
| 80 | + <td class="text-center" style="vertical-align:middle;"> | |
| 81 | + {{ $t('purchaseApplyDetail.time') }} | |
| 82 | + </td> | |
| 83 | + <td colspan="6"></td> | |
| 84 | + </tr> | |
| 85 | + </tbody> | |
| 86 | + </table> | |
| 87 | + | |
| 88 | + <!-- 操作按钮 --> | |
| 89 | + <div id="print-btn" class="button-wrapper"> | |
| 90 | + <el-button type="warning" @click="closePage" style="margin-right:20px;"> | |
| 91 | + {{ $t('purchaseApplyDetail.cancel') }} | |
| 92 | + </el-button> | |
| 93 | + <el-button type="primary" @click="printPurchaseOutApplyDiv"> | |
| 94 | + <i class="el-icon-printer"></i> {{ $t('purchaseApplyDetail.print') }} | |
| 95 | + </el-button> | |
| 96 | + </div> | |
| 97 | + </div> | |
| 98 | + </div> | |
| 99 | +</template> | |
| 100 | + | |
| 101 | +<script> | |
| 102 | +import { listPurchaseApplys } from '@/api/resource/purchaseApplyManageApi' | |
| 103 | +import { messages } from './purchaseApplyDetailLang' | |
| 104 | + | |
| 105 | +export default { | |
| 106 | + name: 'PrintPurchaseOutApply', | |
| 107 | + i18n: { | |
| 108 | + messages | |
| 109 | + }, | |
| 110 | + data() { | |
| 111 | + return { | |
| 112 | + printPurchaseOutApplyInfo: { | |
| 113 | + applyOrderId: '', | |
| 114 | + userName: '', | |
| 115 | + endUserTel: '', | |
| 116 | + createTime: '', | |
| 117 | + purchaseApplyDetailVo: [] | |
| 118 | + }, | |
| 119 | + printFlag: '0' | |
| 120 | + } | |
| 121 | + }, | |
| 122 | + created() { | |
| 123 | + this.initPrintPurchaseOutApplyDateInfo() | |
| 124 | + }, | |
| 125 | + methods: { | |
| 126 | + // 初始化采购领用申请数据 | |
| 127 | + initPrintPurchaseOutApplyDateInfo() { | |
| 128 | + const applyOrderId = this.$route.query.applyOrderId | |
| 129 | + const resOrderType = this.$route.query.resOrderType | |
| 130 | + | |
| 131 | + if (!applyOrderId) { | |
| 132 | + this.$message.error('缺少申请单号参数') | |
| 133 | + return | |
| 134 | + } | |
| 135 | + | |
| 136 | + const params = { | |
| 137 | + page: 1, | |
| 138 | + row: 1, | |
| 139 | + applyOrderId: applyOrderId, | |
| 140 | + resOrderType: resOrderType | |
| 141 | + } | |
| 142 | + | |
| 143 | + listPurchaseApplys(params).then(res => { | |
| 144 | + if (res.purchaseApplys && res.purchaseApplys.length > 0) { | |
| 145 | + this.printPurchaseOutApplyInfo = res.purchaseApplys[0] | |
| 146 | + } else { | |
| 147 | + this.$message.error('未找到领用申请信息') | |
| 148 | + } | |
| 149 | + }).catch(error => { | |
| 150 | + console.error('获取领用申请信息失败:', error) | |
| 151 | + this.$message.error('获取领用申请信息失败') | |
| 152 | + }) | |
| 153 | + }, | |
| 154 | + | |
| 155 | + // 打印 | |
| 156 | + printPurchaseOutApplyDiv() { | |
| 157 | + this.printFlag = '1' | |
| 158 | + const printBtn = document.getElementById('print-btn') | |
| 159 | + if (printBtn) { | |
| 160 | + printBtn.style.display = 'none' | |
| 161 | + } | |
| 162 | + | |
| 163 | + window.print() | |
| 164 | + | |
| 165 | + // 打印后关闭窗口 | |
| 166 | + setTimeout(() => { | |
| 167 | + window.opener = null | |
| 168 | + window.close() | |
| 169 | + }, 100) | |
| 170 | + }, | |
| 171 | + | |
| 172 | + // 关闭页面 | |
| 173 | + closePage() { | |
| 174 | + window.opener = null | |
| 175 | + window.close() | |
| 176 | + } | |
| 177 | + } | |
| 178 | +} | |
| 179 | +</script> | |
| 180 | + | |
| 181 | +<style scoped> | |
| 182 | +.print-purchase-out-apply { | |
| 183 | + padding: 20px; | |
| 184 | + background: #fff; | |
| 185 | +} | |
| 186 | + | |
| 187 | +.content-wrapper { | |
| 188 | + margin: 0 auto; | |
| 189 | +} | |
| 190 | + | |
| 191 | +.info-row { | |
| 192 | + margin-bottom: 20px; | |
| 193 | + display: flex; | |
| 194 | + justify-content: space-between; | |
| 195 | +} | |
| 196 | + | |
| 197 | +.col-sm-3 { | |
| 198 | + flex: 1; | |
| 199 | + padding: 0 10px; | |
| 200 | +} | |
| 201 | + | |
| 202 | +.col-sm-3 span { | |
| 203 | + font-size: 14px; | |
| 204 | + color: #333; | |
| 205 | +} | |
| 206 | + | |
| 207 | +.margin-top { | |
| 208 | + margin-top: 20px; | |
| 209 | +} | |
| 210 | + | |
| 211 | +/* 原生表格样式 */ | |
| 212 | +.table { | |
| 213 | + width: 100%; | |
| 214 | + border-collapse: collapse; | |
| 215 | + margin-bottom: 20px; | |
| 216 | +} | |
| 217 | + | |
| 218 | +.table-bordered { | |
| 219 | + border: 1px solid #ddd; | |
| 220 | +} | |
| 221 | + | |
| 222 | +.table-bordered th, | |
| 223 | +.table-bordered td { | |
| 224 | + border: 1px solid #ddd; | |
| 225 | + padding: 8px; | |
| 226 | + font-size: 12px; | |
| 227 | +} | |
| 228 | + | |
| 229 | +.table thead th { | |
| 230 | + background-color: #f5f7fa; | |
| 231 | + font-weight: bold; | |
| 232 | + color: #333; | |
| 233 | +} | |
| 234 | + | |
| 235 | +.text-center { | |
| 236 | + text-align: center; | |
| 237 | +} | |
| 238 | + | |
| 239 | +.button-wrapper { | |
| 240 | + text-align: right; | |
| 241 | + margin-top: 30px; | |
| 242 | + padding: 20px 0; | |
| 243 | +} | |
| 244 | + | |
| 245 | +/* 打印样式 */ | |
| 246 | +@media print { | |
| 247 | + .print-purchase-out-apply { | |
| 248 | + padding: 0; | |
| 249 | + } | |
| 250 | + | |
| 251 | + #print-btn { | |
| 252 | + display: none !important; | |
| 253 | + } | |
| 254 | + | |
| 255 | + .table-bordered th, | |
| 256 | + .table-bordered td { | |
| 257 | + page-break-inside: avoid; | |
| 258 | + font-size: 10px; | |
| 259 | + } | |
| 260 | +} | |
| 261 | +</style> | |
| 262 | + | ... | ... |
src/views/resource/purchaseApplyDetailLang.js
| ... | ... | @@ -50,7 +50,9 @@ export const messages = { |
| 50 | 50 | time: 'Time', |
| 51 | 51 | manufacturerSignature: 'Manufacturer Signature', |
| 52 | 52 | purchaserSignature: 'Purchaser Signature', |
| 53 | - remark: 'Remark' | |
| 53 | + remark: 'Remark', | |
| 54 | + reviewerSignature: 'Reviewer Signature', | |
| 55 | + applicantSignature: 'Applicant Signature' | |
| 54 | 56 | }, |
| 55 | 57 | auditDiv: { |
| 56 | 58 | workOrderProcessing: 'Work Order Processing', |
| ... | ... | @@ -123,7 +125,9 @@ export const messages = { |
| 123 | 125 | time: '时间', |
| 124 | 126 | manufacturerSignature: '厂家签字', |
| 125 | 127 | purchaserSignature: '采购人员签字', |
| 126 | - remark: '备注' | |
| 128 | + remark: '备注', | |
| 129 | + reviewerSignature: '审核人签字', | |
| 130 | + applicantSignature: '申请人签字' | |
| 127 | 131 | }, |
| 128 | 132 | auditDiv: { |
| 129 | 133 | workOrderProcessing: '工单办理', | ... | ... |
src/views/resource/purchaseApplyDetailManageList.vue
| ... | ... | @@ -59,7 +59,7 @@ |
| 59 | 59 | </el-button> |
| 60 | 60 | </el-col> |
| 61 | 61 | </el-row> |
| 62 | - <el-row v-show="moreCondition" :gutter="20"> | |
| 62 | + <el-row v-show="moreCondition" :gutter="20" class="margin-bottom margin-top"> | |
| 63 | 63 | <el-col :span="4"> |
| 64 | 64 | <el-select v-model="conditions.warehousingWay" |
| 65 | 65 | :placeholder="$t('purchaseApplyDetailManage.search.warehousingWay')" style="width:100%" clearable> |
| ... | ... | @@ -262,6 +262,7 @@ export default { |
| 262 | 262 | await this.getDictData() |
| 263 | 263 | await this._listResourceStoreTypes() |
| 264 | 264 | await this._listResourceStoreSpecifications() |
| 265 | + await this._listResourceSupplier() | |
| 265 | 266 | }, |
| 266 | 267 | async getDictData() { |
| 267 | 268 | try { | ... | ... |