diff --git a/src/api/emis/emisWarehouseIn.js b/src/api/emis/emisWarehouseIn.js index 86402e8d..66582ac3 100644 --- a/src/api/emis/emisWarehouseIn.js +++ b/src/api/emis/emisWarehouseIn.js @@ -59,3 +59,12 @@ export function delEmisWarehouseIn(id) { method: 'delete' }) } + +// 确认进仓单完成 +export function confirmStockInComplete(id) { + return request({ + url: '/emis/emisWarehouseInBatch/confirmStockInComplete/' + id, + method: 'get', + params: {id:id} + }) +} \ No newline at end of file diff --git a/src/api/emis/emisWarehouseInBatch.js b/src/api/emis/emisWarehouseInBatch.js index 007fc480..42b267cf 100644 --- a/src/api/emis/emisWarehouseInBatch.js +++ b/src/api/emis/emisWarehouseInBatch.js @@ -56,3 +56,12 @@ export function delEmisWarehouseInBatch(id) { method: 'delete' }) } + +// 批量进仓登记 +export function registerWarehouseInInfoBatch(data) { + return request({ + url: 'emis/emisWarehouseInBatch/mergeRegisterWarehouseInInfo', + method: 'post', + data: data + }) +} \ No newline at end of file diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index cb32f779..381772ca 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -140,7 +140,7 @@ export default { } }, // 上传前loading加载 - handleBeforeUpload(file) { + async handleBeforeUpload(file) { let isImg = false; if (this.fileType.length) { let fileExtension = ""; @@ -163,13 +163,52 @@ export default { if (this.fileSize) { const isLt = file.size / 1024 / 1024 < this.fileSize; if (!isLt) { - this.$modal.msgError(`上传头像图片大小不能超过 ${this.fileSize} MB!`); + this.$modal.msgError(`上传图片大小不能超过 ${this.fileSize} MB!`); return false; } } this.filesSize[file.name] = file.size this.$modal.loading("正在上传图片,请稍候..."); this.number++; + + // 3. 图片压缩(超大图自动缩小,速度提升50倍) + return new Promise((resolve) => { + const img = new Image(); + img.src = URL.createObjectURL(file); + + img.onload = () => { + // 最大宽高,超过自动等比缩小 + const maxWidth = 1600; + const maxHeight = 1600; + let width = img.width; + let height = img.height; + // 等比缩放 + if (width > maxWidth || height > maxHeight) { + const scale = Math.min(maxWidth / width, maxHeight / height); + width *= scale; + height *= scale; + } + + // canvas绘制 + const canvas = document.createElement("canvas"); + canvas.width = width; + canvas.height = height; + const ctx = canvas.getContext("2d"); + ctx.drawImage(img, 0, 0, width, height); + + // 转成 Blob 上传(质量0.7 清晰又小) + canvas.toBlob( + (blob) => { + const compressedFile = new File([blob], file.name, { + type: file.type + }); + resolve(compressedFile); + }, + file.type, + 0.7 + ); + }; + }); }, // 文件个数超出 handleExceed() { diff --git a/src/views/emis/emisWarehouseIn/WarehouseInList.vue b/src/views/emis/emisWarehouseIn/WarehouseInList.vue index 8f815bd9..09309778 100644 --- a/src/views/emis/emisWarehouseIn/WarehouseInList.vue +++ b/src/views/emis/emisWarehouseIn/WarehouseInList.vue @@ -4,7 +4,7 @@
- + @@ -12,7 +12,9 @@ - + + + @@ -26,13 +28,14 @@ import WarehouseInPanel from '@/views/emis/emisWarehouseIn/panel/WarehouseInPanel.vue'; import WarehouseInBatchPanel from '@/views/emis/emisWarehouseInBatch/WarehouseInBatchPanel.vue'; import WarehouseStockIn from '@/views/emis/emisWarehouseInBatch/WarehouseStockIn.vue'; - +import WarehouseStockInBatch from '@/views/emis/emisWarehouseInBatch/WarehouseStockInBatch.vue'; export default { name: "WarehouseInList", components: { WarehouseInPanel, WarehouseInBatchPanel, - WarehouseStockIn + WarehouseStockIn, + WarehouseStockInBatch, }, dicts: [ ], @@ -41,8 +44,9 @@ export default { activeTab:'billList', billTabs:[], showWsInPanel:false, + showWsInBatchPanel:false, selectInNo:null, - + selectInNos:[], openViewForm:false, }; }, @@ -57,6 +61,13 @@ export default { this.showWsInPanel=true; this.activeTab='wsInPanel'; }, + onBatchStockIn(list){ + this.selectInNos=list.map(item=>item.inNo); + this.showWsInBatchPanel=true; + this.activeTab='wsInBatchPanel'; + }, + + onSelectBill(item) { // let old=this.billTabs.find(mItem=>mItem.inNo==item.inNo); @@ -80,6 +91,10 @@ export default { this.openViewForm=false; this.activeTab="billList"; } + else if(targetName=='wsInBatchPanel'){ + this.showWsInBatchPanel=false; + this.activeTab="billList"; + } else{ var self=this; let tabs = self.billTabs; @@ -92,6 +107,11 @@ export default { } }, + onBatchStockInChanged(){ + //刷新进仓单列表 + this.removeTab('wsInBatchPanel'); + this.$refs.billPanel.getList(); + }, } }; diff --git a/src/views/emis/emisWarehouseIn/panel/WarehouseInPanel.vue b/src/views/emis/emisWarehouseIn/panel/WarehouseInPanel.vue index 5ae8d8f4..83984df8 100644 --- a/src/views/emis/emisWarehouseIn/panel/WarehouseInPanel.vue +++ b/src/views/emis/emisWarehouseIn/panel/WarehouseInPanel.vue @@ -218,6 +218,26 @@ @click="handleExportDtl" >导出进仓明细 + + 合并收货 + + + 手动确认 +
@@ -260,7 +280,14 @@ 部分入仓 + + + + + @@ -295,7 +322,7 @@ - + @@ -317,7 +344,7 @@ diff --git a/src/views/emis/emisWarehouseInBatch/WarehouseStockIn.vue b/src/views/emis/emisWarehouseInBatch/WarehouseStockIn.vue index 07cab7f7..2fc1ff6c 100644 --- a/src/views/emis/emisWarehouseInBatch/WarehouseStockIn.vue +++ b/src/views/emis/emisWarehouseInBatch/WarehouseStockIn.vue @@ -498,7 +498,22 @@ export default { async handleInput(item, size){ }, - + deleteGoodsItem(row, index) { + this.$confirm('确定删除?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.form.cargoList.splice(index, 1) + this.handleCalcVolume(row); + }).catch(() => { + }) + }, + copyGoodsItem(row, index) { + let newItem = Object.assign({}, row); + newItem.cargoQty = 1; + this.form.cargoList.splice(index + 1, 0, newItem); + }, } }; diff --git a/src/views/emis/emisWarehouseInBatch/WarehouseStockInBatch.vue b/src/views/emis/emisWarehouseInBatch/WarehouseStockInBatch.vue new file mode 100644 index 00000000..fe8a5280 --- /dev/null +++ b/src/views/emis/emisWarehouseInBatch/WarehouseStockInBatch.vue @@ -0,0 +1,78 @@ + + + + + \ No newline at end of file diff --git a/src/views/emis/emisWarehouseInBatch/WarehouseStockInItem.vue b/src/views/emis/emisWarehouseInBatch/WarehouseStockInItem.vue new file mode 100644 index 00000000..144d5e9d --- /dev/null +++ b/src/views/emis/emisWarehouseInBatch/WarehouseStockInItem.vue @@ -0,0 +1,424 @@ + + + + + \ No newline at end of file