| | |
| | | <el-alert :title="error" type="error" show-icon closable @close="error = ''" /> |
| | | </div> |
| | | |
| | | <!-- æªç»çå表 --> |
| | | <div class="unpallet-section compact"> |
| | | <el-card shadow="hover" class="compact-card unpallet-card"> |
| | | <div slot="header" class="compact-header"> |
| | | <span><i class="el-icon-tickets"></i> æªç»çæ¡ç </span> |
| | | <span class="list-actions"> |
| | | <el-tag type="primary" size="small">æªç»ç {{ totalStockCount }}</el-tag> |
| | | </span> |
| | | </div> |
| | | |
| | | |
| | | <div class="table-container"> |
| | | <el-table :data="unpalletMaterials" stripe style="width: 100%" height="100%" size="small" v-loading="unpalletBarcodesLoading"> |
| | | <el-table-column type="index" label="åºå·" width="60" align="center"></el-table-column> |
| | | <el-table-column prop="barcode" label="æ¡ç " min-width="140" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="materielCode" label="ç©æç¼ç " min-width="150" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="batchNo" label="æ¹æ¬¡" min-width="150" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="orderQuantity" label="æ°é" min-width="130" align="right"></el-table-column> |
| | | <el-table-column prop="unit" label="åä½" width="80" align="center"></el-table-column> |
| | | <el-table-column prop="supplyCode" label="ä¾åºå" min-width="130" show-overflow-tooltip></el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-card> |
| | | |
| | | </div> |
| | | |
| | | <!-- ç©æå表 - åºå®é«åº¦å¸¦æ»å¨æ¡ --> |
| | | <div class="material-list compact"> |
| | | <el-card shadow="hover" class="compact-card"> |
| | |
| | | <span><i class="el-icon-tickets"></i> ç»çæ°æ®</span> |
| | | <span class="list-actions"> |
| | | <el-tag type="primary" size="small">å
± {{ materials.length }} æ¡</el-tag> |
| | | <el-tag type="primary" size="small">æªç»ç {{ totalStockCount }}</el-tag> |
| | | <el-tag type="primary" size="small">æªå
¥åºæ°é {{ totalStockSum }}{{ uniqueUnit }}</el-tag> |
| | | <el-tag v-if="trayBarcode" type="success" size="small">æç: {{ trayBarcode }}</el-tag> |
| | | <el-tag v-if="form.warehouseType" type="info" size="small">ä»åº: {{ currentWarehouseName }}</el-tag> |
| | |
| | | error: '', |
| | | debugMode: false, |
| | | currentFocus: 'warehouse', |
| | | |
| | | unpalletBarcodes:[], |
| | | unpalletBarcodesLoading: false, |
| | | unpalletMaterials: [], // æªç»çè¯¦ç»æ°æ®å表 |
| | | |
| | | // æ«ç æªç¸å
³åé |
| | | scanCode: '', |
| | |
| | | this.initwarehouseTypes(); // åå§åä»åº |
| | | this.initLocationTypes(); // åå§åä»åºåºå |
| | | this.fetchStockStatistics(); // å è½½ç»è®¡æ°æ® |
| | | this.fetchUnpalletMaterialDetails(); |
| | | }, 300); |
| | | }); |
| | | } |
| | |
| | | this.backData = []; |
| | | this.$refs.palletForm?.reset(); |
| | | this.fetchStockStatistics(); // åæ®å·åäºï¼å·æ°ç»è®¡ |
| | | this.fetchUnpalletMaterialDetails(); |
| | | } |
| | | } |
| | | }, |
| | |
| | | callback(new Error('è¯·éæ©ä»åºåºå')); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }, |
| | | |
| | | // æ ¹æ®æ¡ç å表è·åè¯¦ç»æ°æ® |
| | | async fetchUnpalletMaterialDetails() { |
| | | try { |
| | | // å°è¯è°ç¨æ¥å£è·åè¯¦ç»æ°æ® |
| | | // 注æï¼å¦æè¿ä¸ªæ¥å£ä¸åå¨ï¼å¯ä»¥æ³¨éæææ ¹æ®å®é
APIè°æ´ |
| | | const response = await http.post('/api/InboundOrder/UnPalletGroupBarcode?orderNo='+this.docNo, { |
| | | |
| | | }); |
| | | |
| | | console.log('æªç»çæ°æ®:', response.data); |
| | | |
| | | |
| | | if (response.status && Array.isArray(response.data)) { |
| | | this.unpalletMaterials = response.data; |
| | | this.unpalletBarcodes = response.data.map(item => item.barcode || ''); |
| | | this.totalStockCount = response.data.length; |
| | | } else { |
| | | // 妿æ¥å£è¿åæ ¼å¼ä¸åï¼å°è¯å
¶ä»æ¹å¼ |
| | | // 妿æ¥å£ä¸åå¨ï¼è¿éä¼è¿å
¥catchï¼è®¾ç½®ä¸ºç©ºæ°ç» |
| | | this.unpalletMaterials = []; |
| | | } |
| | | } catch (err) { |
| | | console.warn('è·åæªç»çè¯¦ç»æ°æ®æ¥å£å¯è½ä¸åå¨ï¼ä½¿ç¨æ¡ç å表æ¾ç¤ºï¼', err); |
| | | // 妿æ¥å£ä¸åå¨ï¼å°æ¡ç å表转æ¢ä¸ºç®åçæ¾ç¤ºæ ¼å¼ |
| | | // æè
ä¿æä¸ºç©ºï¼è®©ç¨æ·ç¥ééè¦éæ©ä»åºååºåæ¥æ¥çè¯¦ç»æ°æ® |
| | | this.unpalletMaterials = this.unpalletBarcodes.map(barcode => ({ |
| | | barcode: barcode, |
| | | materielCode: '-', |
| | | batchNo: '-', |
| | | stockQuantity: '-', |
| | | unit: '-', |
| | | supplyCode: '-', |
| | | warehouseType: '-' |
| | | })); |
| | | } |
| | | }, |
| | | /** |
| | |
| | | console.log('ä»åºåºåéªè¯éè¿:', value); |
| | | // åºåéæ©åï¼èªå¨èç¦å°æçè¾å
¥æ¡ |
| | | this.focusLocationSelect(); |
| | | // å·æ°æªç»çæ°æ®ï¼æ ¹æ®éæ©çä»åºååºåè¿æ»¤ï¼ |
| | | } |
| | | }); |
| | | }, 100); |
| | |
| | | this.trayBarcode = ''; |
| | | this.barcode = ''; |
| | | this.materials = []; |
| | | this.unpalletBarcodes = []; |
| | | this.unpalletMaterials = []; |
| | | this.loading = false; |
| | | this.error = ''; |
| | | this.scanCode = ''; |
| | |
| | | scanTime: this.formatTime(new Date()) |
| | | }); |
| | | }); |
| | | |
| | | const removeIndex = this.unpalletMaterials.findIndex(item => item.barcode === currentBarcode); |
| | | if (removeIndex > -1) { |
| | | this.unpalletMaterials.splice(removeIndex, 1); // å 餿ªç»çå¯¹åºæ°æ® |
| | | this.unpalletBarcodes = this.unpalletMaterials.map(item => item.barcode || ''); // æ´æ°æ¡ç æ°ç» |
| | | this.totalStockCount = Math.max(0, this.totalStockCount - 1); |
| | | } |
| | | |
| | | this.$message({ |
| | | message: `æåæ·»å æ¡ç : ${currentBarcode}`, |
| | |
| | | border: 1px solid #DCDFE6; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .unpallet-section.compact { |
| | | margin-bottom: 8px; |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | .unpallet-card { |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | .unpallet-barcode-list { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | gap: 6px; |
| | | padding: 8px 0; |
| | | max-height: 180px; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .unpallet-barcode-list>>>.el-tag { |
| | | cursor: pointer; |
| | | max-width: calc(33.333% - 4px); |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | @media (max-width: 768px) { |
| | | .unpallet-barcode-list>>>.el-tag { |
| | | max-width: calc(50% - 4px); |
| | | } |
| | | } |
| | | } |
| | | </style> |