|
|
|
@ -45,8 +45,8 @@
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="printTemplateInfoList" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="模板列表ID" align="center" prop="templateInfoId" v-if="columns[0].visible"/>
|
|
|
|
|
<el-table-column label="模板列表ID" align="center" prop="templateListId" v-if="columns[2].visible"/>
|
|
|
|
|
<el-table-column label="模板列表" align="center" prop="templateInfoId" v-if="columns[0].visible"/>
|
|
|
|
|
<el-table-column label="模板列表" align="center" prop="templateListId" v-if="columns[2].visible"/>
|
|
|
|
|
<el-table-column label="纸张类型" align="center" prop="paperType" v-if="columns[3].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :options="mes_paper_type" :value="scope.row.paperType"/>
|
|
|
|
@ -79,8 +79,15 @@
|
|
|
|
|
<!-- 添加或修改打印模板信息对话框 -->
|
|
|
|
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
|
|
|
|
<el-form ref="printTemplateInfoFormRef" :model="form" :rules="rules" label-width="120px">
|
|
|
|
|
<el-form-item label="模板列表ID" prop="templateListId">
|
|
|
|
|
<el-input v-model="form.templateListId" placeholder="请输入模板列表ID" />
|
|
|
|
|
<el-form-item label="模板列表" prop="templateListId">
|
|
|
|
|
<el-select v-model="form.templateListId" placeholder="请选择模板列表">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in printTemplateList"
|
|
|
|
|
:key="item.templateListId"
|
|
|
|
|
:label="item.templateName"
|
|
|
|
|
:value="item.templateListId"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="纸张类型" prop="paperType">
|
|
|
|
|
<el-select v-model="form.paperType" placeholder="请选择纸张类型">
|
|
|
|
@ -131,6 +138,7 @@
|
|
|
|
|
<script setup name="PrintTemplateInfo" lang="ts">
|
|
|
|
|
import { listPrintTemplateInfo, getPrintTemplateInfo, delPrintTemplateInfo, addPrintTemplateInfo, updatePrintTemplateInfo } from '@/api/system/printTemplateInfo';
|
|
|
|
|
import { PrintTemplateInfoVO, PrintTemplateInfoQuery, PrintTemplateInfoForm } from '@/api/system/printTemplateInfo/types';
|
|
|
|
|
import { getSysPrintTemplateListList } from '@/api/system/printTemplateList';
|
|
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
const { mes_paper_type, active_flag } = toRefs<any>(proxy?.useDict('mes_paper_type', 'active_flag'));
|
|
|
|
@ -152,11 +160,18 @@ const dialog = reactive<DialogOption>({
|
|
|
|
|
title: ''
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const printTemplateList = ref([]);
|
|
|
|
|
/** 查询打印模板下拉框结构 */
|
|
|
|
|
const getPrintTemplateList = async () => {
|
|
|
|
|
let res = await getSysPrintTemplateListList(null);
|
|
|
|
|
printTemplateList.value = res.data;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 列显隐信息
|
|
|
|
|
const columns = ref<FieldOption[]>([
|
|
|
|
|
{ key: 0, label: `模板列表ID`, visible: false },
|
|
|
|
|
{ key: 0, label: `模板列表`, visible: false },
|
|
|
|
|
{ key: 1, label: `租户编号`, visible: false },
|
|
|
|
|
{ key: 2, label: `模板列表ID`, visible: true },
|
|
|
|
|
{ key: 2, label: `模板列表`, visible: true },
|
|
|
|
|
{ key: 3, label: `纸张类型`, visible: true },
|
|
|
|
|
{ key: 4, label: `纸张宽度`, visible: true },
|
|
|
|
|
{ key: 5, label: `纸张高度`, visible: true },
|
|
|
|
@ -296,6 +311,7 @@ const handleExport = () => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getPrintTemplateList();
|
|
|
|
|
getList();
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|