DN单的附件会传多个,修改成支持多个附件保存
This commit is contained in:
parent
ecc7793486
commit
3ebeaeb666
@ -40,6 +40,22 @@ export function attachmentPrint(obj) {
|
||||
})
|
||||
}
|
||||
|
||||
export function showAttachmentFile(obj) {
|
||||
return request({
|
||||
url: mom_wms('/picking/showAttachmentFile'),
|
||||
method: 'post',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function printByFilePath(obj) {
|
||||
return request({
|
||||
url: mom_wms('/picking/printByFilePath'),
|
||||
method: 'post',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function pickingPost(documentNo) {
|
||||
return request({
|
||||
url: `/wms/picking/post`,
|
||||
|
||||
@ -7,6 +7,19 @@
|
||||
@inputDialogSelected="inputCallBack($event,productionRequisitionDialog)" ref="documentDialog">
|
||||
</input-select-dialog>
|
||||
|
||||
<el-dialog title="附件列表" :visible.sync="dnOrderFileDialogVisible">
|
||||
<el-table :data="dnOrderFileList">
|
||||
<el-table-column property="fileName" label="附件名称" width="260"></el-table-column>
|
||||
<el-table-column property="filePath" label="附件路径" :show-overflow-tooltip="true" width="320"></el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" @click="printAttachAction(scope.row.filePath)">打印
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="设定打印参数"
|
||||
:visible.sync="printParamDialogVisible"
|
||||
width="50%"
|
||||
@ -122,8 +135,8 @@
|
||||
<div style="margin-top: 10px;">
|
||||
<el-button type="warning" @click="pickingPrint('')">拣配单打印</el-button>
|
||||
<el-button type="warning" @click="saleOutPrint">送货单打印</el-button>
|
||||
<el-button type="warning" @click="printAttachAction('1')">要货附件打印</el-button>
|
||||
<el-button type="warning" @click="printAttachAction('2')">出库附件打印</el-button>
|
||||
<el-button type="warning" @click="printAttachShow('1')">要货附件打印</el-button>
|
||||
<el-button type="warning" @click="printAttachShow('2')">出库附件打印</el-button>
|
||||
<el-button type="danger" @click="chooseCancel">冲销</el-button>
|
||||
</div>
|
||||
</basic-container>
|
||||
@ -138,7 +151,7 @@ import {
|
||||
selectSaleOutDetail,
|
||||
saleOutPostCancel,
|
||||
pickingPostCancel,
|
||||
pickingPrintA4, deliveryPrint, attachmentPrint
|
||||
pickingPrintA4, deliveryPrint, attachmentPrint, showAttachmentFile
|
||||
} from '@/api/wms/sale-out-platform';
|
||||
import { fetchListWithClose } from "@/api/wms/picking";
|
||||
import {
|
||||
@ -173,6 +186,8 @@ import { fetchListWithClose } from "@/api/wms/picking";
|
||||
},
|
||||
site: getStore({name: 'tenantId'}),
|
||||
formObj: {},
|
||||
dnOrderFileList: [],
|
||||
dnOrderFileDialogVisible: false,
|
||||
initData: {
|
||||
suggestSize: 10
|
||||
},
|
||||
@ -559,34 +574,29 @@ import { fetchListWithClose } from "@/api/wms/picking";
|
||||
this.doRetrieve();
|
||||
},
|
||||
|
||||
pickingPrintA4() {
|
||||
printAttachAction(filePath){
|
||||
let me = this;
|
||||
if (me.saleOutListSelection.length > 0) {
|
||||
for (let i = 0; i < me.saleOutListSelection.length; i++) {
|
||||
let row = me.saleOutListSelection[i];
|
||||
if (row.pickStatus !== 'SUBMIT' && row.pickStatus !== 'POST') {
|
||||
return me.$message.error("第" + (i + 1) + "行拣货未提交且未过账不允许打印标签");
|
||||
}
|
||||
let param = {
|
||||
printAttachmentType: filePath,
|
||||
};
|
||||
showLoading();
|
||||
printByFilePath(param).then(res => {
|
||||
hideLoading();
|
||||
me.dnOrderFileDialogVisible = false;
|
||||
// 显示打印文件流
|
||||
if (!isBlank(res.data.data)) {
|
||||
window.open(res.data.data);
|
||||
} else {
|
||||
this.$message.error("查找打印文件失败")
|
||||
}
|
||||
let param = {
|
||||
documentNo: me.formObj.documentNo,
|
||||
printer: me.printerA4,
|
||||
seqList: me.saleOutListSelection.map(o => o.seq),
|
||||
};
|
||||
showLoading();
|
||||
pickingPrintA4(param).then(res => {
|
||||
hideLoading();
|
||||
me.$message.success("打印成功");
|
||||
}).catch(() => {
|
||||
hideLoading();
|
||||
});
|
||||
} else {
|
||||
me.$message.error("请选择要打印的行项目");
|
||||
}
|
||||
}).catch(() => {
|
||||
hideLoading();
|
||||
});
|
||||
},
|
||||
|
||||
printAttachAction(fieldType){
|
||||
printAttachShow(fieldType){
|
||||
let me = this;
|
||||
me.dnOrderFileList = [];
|
||||
if(isBlank(me.formObj.externalDocumentNo)){
|
||||
me.$message.error("DN单号不能为空");
|
||||
return;
|
||||
@ -596,14 +606,10 @@ import { fetchListWithClose } from "@/api/wms/picking";
|
||||
printAttachmentType: fieldType,
|
||||
};
|
||||
showLoading();
|
||||
attachmentPrint(param).then(res => {
|
||||
showAttachmentFile(param).then(res => {
|
||||
hideLoading();
|
||||
// 显示打印文件流
|
||||
if (!isBlank(res.data.data)) {
|
||||
window.open(res.data.data);
|
||||
} else {
|
||||
this.$message.error("查找打印文件失败")
|
||||
}
|
||||
me.dnOrderFileDialogVisible = true;
|
||||
me.dnOrderFileList = res.data.data;
|
||||
}).catch(() => {
|
||||
hideLoading();
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user