feat(wms): 添加收货单打印功能并支持xlsx文件上传

- 新增收货单打印组件,包含保存为图片和直接打印功能
- 在收货详情页添加打印按钮及相关逻辑
- 扩展文件上传组件支持xlsx文件类型
This commit is contained in:
砂糖
2025-12-04 09:44:32 +08:00
parent ffa312542b
commit aa4ee6b7a3
3 changed files with 644 additions and 3 deletions

View File

@@ -34,7 +34,8 @@
<el-button type="success" plain icon="el-icon-refresh" size="mini" @click="handleQuery">刷新</el-button>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
:disabled="!selectedPlan" title="导入收货计划">导入</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
<el-button type="primary" plain icon="el-icon-upload" size="mini" @click="handlePrint" :disabled="!selectedPlan">打印</el-button>
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button> -->
</el-form-item>
</el-form>
@@ -129,6 +130,10 @@
<el-button @click="receiptModalVisible = false">取消</el-button>
</template>
</el-dialog>
<el-dialog title="打印收货计划" v-loading="loading" :visible.sync="printDialogVisible" width="80%">
<Printer :waybill="selectedPlan" :waybillDetails="deliveryWaybillList" />
</el-dialog>
</div>
</template>
@@ -140,6 +145,8 @@ import MemoInput from "@/components/MemoInput";
import ImportGuide from "@/views/wms/receive/components/ImportGuide.vue";
import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect";
import CoilNo from "@/components/KLPService/Renderer/CoilNo.vue";
import Printer from "../components/Printer.vue";
export default {
name: "DeliveryWaybill",
@@ -147,7 +154,8 @@ export default {
MemoInput,
ImportGuide,
ActualWarehouseSelect,
CoilNo
CoilNo,
Printer
},
data() {
return {
@@ -226,6 +234,8 @@ export default {
remark: null,
},
coilInfo: {},
printDialogVisible: false,
};
},
created() {
@@ -279,6 +289,10 @@ export default {
};
this.resetForm("form");
},
// 打印按钮操作
handlePrint() {
this.printDialogVisible = true;
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;