feat:日志打印
This commit is contained in:
parent
7956d72987
commit
d07ff31f76
|
@ -6,23 +6,23 @@
|
|||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container>
|
||||
<el-header style="height:100px;padding:0">
|
||||
<el-card style="width: 100%" header="基本信息" shadow="never">
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="工艺路线">{{
|
||||
fmlogItem.routepack_name
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="任务编号">{{
|
||||
fmlogItem.mtask_number
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="部门/车间">{{
|
||||
fmlogItem.belong_dept_name
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
</el-header>
|
||||
|
||||
<el-container>
|
||||
<el-header style="height:100px;padding:0">
|
||||
<el-card style="width: 100%" header="基本信息" shadow="never">
|
||||
<el-button type="primary" @click="handlePrint" style="position: absolute;right: 20px;">打印</el-button>
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="工艺路线">{{
|
||||
fmlogItem.routepack_name
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="任务编号">{{
|
||||
fmlogItem.mtask_number
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="部门/车间">{{
|
||||
fmlogItem.belong_dept_name
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
</el-header>
|
||||
<!-- mlog -->
|
||||
<el-main style="padding-top: 40px;position: relative;">
|
||||
<el-button
|
||||
|
@ -145,11 +145,15 @@
|
|||
>
|
||||
</check-dialog>
|
||||
</el-container>
|
||||
<el-dialog v-model="printVisible" width="1200px">
|
||||
<print :baseData="fmlogItem" :tableData="tableData" type="mlogs12" @closePrint="printVisible=false"/>
|
||||
</el-dialog>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
import saveDialog from "./f_mlogs_form.vue";
|
||||
import checkDialog from "./mlogb_check.vue";
|
||||
import print from "./../setting/print/A4.vue";
|
||||
export default {
|
||||
props: {
|
||||
fmlogId: {
|
||||
|
@ -160,6 +164,7 @@ export default {
|
|||
components: {
|
||||
saveDialog,
|
||||
checkDialog,
|
||||
print
|
||||
},
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
|
@ -192,10 +197,12 @@ export default {
|
|||
强度落球:'',
|
||||
},
|
||||
fileList:[],
|
||||
tableData:[],
|
||||
test_file:'',
|
||||
deptId: "",
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
printVisible:false,
|
||||
options: [],
|
||||
saveInDialog: false,
|
||||
ticketDialog:false,
|
||||
|
@ -305,6 +312,17 @@ export default {
|
|||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
handlePrint(){
|
||||
let that = this;
|
||||
that.$API.wpm.mlog.list.req(that.params).then((res) => {
|
||||
that.tableData = res;
|
||||
// console.log('that.tableData',that.tableData);
|
||||
// console.log('that.fmlogItem',that.fmlogItem);
|
||||
that.$nextTick(() => {
|
||||
that.printVisible = true;
|
||||
})
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
>
|
||||
<div>
|
||||
<el-card style="width: 100%" header="基本信息" shadow="never">
|
||||
<el-button type="primary" @click="handlePrint" style="position: absolute;right: 20px;">打印</el-button>
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="工艺路线">{{
|
||||
mlogItem.routepack_name
|
||||
|
@ -385,6 +386,9 @@
|
|||
>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="printVisible" width="1200px">
|
||||
<print :baseData="mlogItem" :tableData="tableData" :tableData2="tableData2" type="mlogs23" @closePrint="printVisible=false"/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
@ -392,6 +396,7 @@
|
|||
import editDialog from "./mlog_form.vue";
|
||||
import saveDialog from "./mlogb_form.vue";
|
||||
import checkDialog from "./mlogb_check.vue";
|
||||
import print from "./../setting/print/A4.vue";
|
||||
export default {
|
||||
props: {
|
||||
mlogId: {
|
||||
|
@ -403,6 +408,7 @@ export default {
|
|||
editDialog,
|
||||
saveDialog,
|
||||
checkDialog,
|
||||
print
|
||||
},
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
|
@ -454,8 +460,11 @@ export default {
|
|||
visible: false,
|
||||
isSaveing: false,
|
||||
options: [],
|
||||
tableData:[],
|
||||
tableData2:[],
|
||||
saveInDialog: false,
|
||||
ticketDialog:false,
|
||||
printVisible:false,
|
||||
setFiltersVisible: false,
|
||||
rules: {
|
||||
count_use: [
|
||||
|
@ -469,11 +478,18 @@ export default {
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
this.getMlogItem();
|
||||
this.paramsIn.mlog = this.mlogId;
|
||||
this.paramsOut.mlog = this.mlogId;
|
||||
this.apiObj = this.$API.wpm.mlogb.list;
|
||||
this.getInit();
|
||||
that.$API.wpm.mlogb.list.req(that.paramsIn).then((res) => {
|
||||
that.tableData = res;
|
||||
})
|
||||
that.$API.wpm.mlogb.list.req(that.paramsOut).then((res) => {
|
||||
that.tableData2 = res;
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
|
@ -638,6 +654,10 @@ export default {
|
|||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
handlePrint(){
|
||||
let that = this;
|
||||
that.printVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue