Merge remote-tracking branch 'origin/master'

prod
schry 2 years ago
commit 529d9b02a4

@ -20,3 +20,23 @@ export function orderPDFFromTemplateFile(query) {
responseType: 'arraybuffer', //一定要设置响应类型否则页面会是空白pdf responseType: 'arraybuffer', //一定要设置响应类型否则页面会是空白pdf
}); });
} }
//---------报表打印订单
export function inspectionOrderPDFFromStatemenTemplateFile(query) {
return axios({
url: "/udiwms/pdf/template/inspection/order/code/file",
method: "post",
data: query,
});
}
export function orderPDFFromStatemenTemplateFile(query) {
return axios({
url: "/udiwms/pdf/template/text/inspection/order/code/file",
method: "post",
data: query,
headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
responseType: 'arraybuffer', //一定要设置响应类型否则页面会是空白pdf
});
}

@ -147,7 +147,7 @@
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="120" fixed="right"> <el-table-column label="操作" width="200" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
@ -156,7 +156,13 @@
>打印 >打印
</el-button </el-button
> >
<el-button
type="text"
size="small"
@click.native="printOrderDetailPDF(scope.row)"
>报表打印
</el-button
>
<el-button <el-button
type="text" type="text"
size="small" size="small"
@ -444,12 +450,20 @@ import {selectSysParamByKey} from "@/api/param/systemParamConfig";
import {getResultDetailList} from "@/api/inout/orderDetailResult"; import {getResultDetailList} from "@/api/inout/orderDetailResult";
import {getCodeDetailList} from "@/api/inout/orderDetailCode"; import {getCodeDetailList} from "@/api/inout/orderDetailCode";
import {getCodeList} from "@/api/inout/code"; import {getCodeList} from "@/api/inout/code";
import {inspectionOrderPDFFromTemplateFile, orderPDFFromTemplateFile} from "@/api/itextpdf/orderPrint" import {
inspectionOrderPDFFromStatemenTemplateFile,
inspectionOrderPDFFromTemplateFile, orderPDFFromStatemenTemplateFile,
orderPDFFromTemplateFile
} from "@/api/itextpdf/orderPrint"
import DialogcChangeNewOrder from "@/views/inout/DialogcChangeNewOrder"; import DialogcChangeNewOrder from "@/views/inout/DialogcChangeNewOrder";
import ElImageViewer from "element-ui/packages/image/src/image-viewer"; import ElImageViewer from "element-ui/packages/image/src/image-viewer";
import DialogCheck from "@/views/inout/DialogCheck"; import DialogCheck from "@/views/inout/DialogCheck";
import {getBizDetailList} from "@/api/inout/orderDetailBiz"; import {getBizDetailList} from "@/api/inout/orderDetailBiz";
import {previewImage} from "@/api/purchase/supCompany"; import {previewImage} from "@/api/purchase/supCompany";
import {
inspectionStockQRCodeTextPDFFromTemplateStatementFile,
stockQRCodeTextPDFFromTemplateStatementFile
} from "@/api/itextpdf/itextpdf";
@ -928,6 +942,40 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
printOrderDetailPDF(row) {
let tQuery = {
labelId: 5,
orderIdFk: row.billNo
};
this.loading = true;
inspectionOrderPDFFromStatemenTemplateFile(tQuery).then((response) => {
if (response.code === 20000) {
orderPDFFromStatemenTemplateFile(tQuery).then((response) => {
//pdfurl
const binaryData = [];
binaryData.push(response);
//blob
let url = window.URL.createObjectURL(
new Blob(binaryData, {type: "application/pdf"})
);
this.loading = false;
window.open(url);//pdf
this.getOrderQRCodeTextList();
}).catch(() => {
this.loading = false;
});
} else {
this.loading = false;
this.$message.error(response.message);
}
}).catch(() => {
this.loading = false;
});
},
onResultReset() { onResultReset() {
this.resultQuery = { this.resultQuery = {
orderId: null, orderId: null,

@ -51,6 +51,7 @@
style="width: 90%" style="width: 90%"
:clearable="false" :clearable="false"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
:disabled-date="disabledArrivalDate"
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -220,6 +221,7 @@ export default {
id: null, id: null,
billNo: null, billNo: null,
createTime: "", createTime: "",
arrivalTime: '',
remark: "", remark: "",
deptCode: null, deptCode: null,
invCode: null, invCode: null,
@ -294,7 +296,9 @@ export default {
if (this.formData.arrivalTime == "" || this.formData.arrivalTime == null) { if (this.formData.arrivalTime == "" || this.formData.arrivalTime == null) {
return this.$message.error("到货时间不能为空!"); return this.$message.error("到货时间不能为空!");
} }
if (this.formData.arrivalTime<this.formData.createTime) {
return this.$message.error("到货时间不能比单据日期早!!!");
}
for (let i = 0; i < this.codeArray.length; i++) { for (let i = 0; i < this.codeArray.length; i++) {
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") { if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
return this.$message.error('单据数量不能为0'); return this.$message.error('单据数量不能为0');
@ -318,6 +322,9 @@ export default {
} }
}); });
}, },
disabledArrivalDate(time) {
return time.getTime() < new Date(this.formData.createTime).getTime()
},
submitFunction(status) { submitFunction(status) {
let tMessage = status === '1' ? '保存' : '提交'; let tMessage = status === '1' ? '保存' : '提交';
this.loading = true; this.loading = true;

Loading…
Cancel
Save