添加补打

yangwl
guoshuang 4 months ago
parent 7fe067ed37
commit b6d96f5544

@ -181,10 +181,7 @@ export function getProdLineList() {
params: {} params: {}
}); });
} }
export function getIdCardList(workorderCode){ export function getIdCardList(data){
const data={
workorderCode
}
return request({ return request({
url:'/plan/pro/workorder/getIdCardList', url:'/plan/pro/workorder/getIdCardList',
method:'post', method:'post',

@ -1,6 +1,15 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-dialog title="" :visible.sync="printDialogVisible" width="990px"> <el-dialog title="" :visible.sync="printDialogVisible" width="990px">
<div>
<el-form inline>
<el-form-item label="补打版次" prop="factory">
<el-input v-model="idCardsNum" placeholder="请输入补打版次" style="width:100px"/>
</el-form-item>
<el-button type="primary" icon="el-icon-check" circle @click="showPrint()"/>
</el-form>
</div>
<div id="printFrom" class="my-print-box"> <div id="printFrom" class="my-print-box">
<div v-for="(item, index) in printData.idCardList" :key="index"> <div v-for="(item, index) in printData.idCardList" :key="index">
<el-form class="print-card"> <el-form class="print-card">
@ -51,7 +60,7 @@ export default {
}, },
data() { data() {
return { return {
idCardsNum: 1, idCardsNum: null,
optType: undefined, optType: undefined,
// //
loading: true, loading: true,
@ -116,7 +125,13 @@ export default {
}, },
// - // -
async showPrint() { async showPrint() {
let response = await getIdCardList(this.workorderCode); console.log('执行了打印预览');
let params = {
};
if(this.idCardsNum!=null){
params.palletNo=this.idCardsNum;
}
let response = await getIdCardList({workorderCode:this.workorderCode,...params});
this.printData.idCardList = response; this.printData.idCardList = response;
this.$nextTick(() => { this.$nextTick(() => {
this.printData.idCardList.forEach((item, index) => { this.printData.idCardList.forEach((item, index) => {

Loading…
Cancel
Save