打印模板 及其他问题调整

szh-new
张同海 2 months ago
parent 81702e466f
commit 9aa09de7d8

@ -78,7 +78,9 @@
setModalProps({ loading: false })
})
const getTitle = computed(() => (!unref(isUpdate) ? '新增EDI设置' : '编辑EDI设置'))
const getTitle = computed(() =>
!unref(isUpdate) ? '新增订舱货物状态管理' : '编辑订舱货物状态管理',
)
async function handleSave(exit) {
try {

@ -265,19 +265,27 @@
data: 'unit',
type: 'dropdown',
source: async (query, process) => {
if (unitDict.value && unitDict.value.length) {
const dict = unitDict.value.map((item) => {
return item.value + '-' + item.name
})
process(dict)
} else {
const results = await feeUnitDict()
unitDict.value = results
const dict = results.map((item) => {
return item.value + '-' + item.name
// if (unitDict.value && unitDict.value.length) {
// const dict = unitDict.value.map((item) => {
// return item.value + '-' + item.name
// })
// process(dict)
// } else {
// const results = await feeUnitDict()
// unitDict.value = results
// const dict = results.map((item) => {
// return item.value + '-' + item.name
// })
// process(dict)
// }
const results = [
{ label: '20GP', name: '20GP', value: '22G0' },
{ label: '40GP', name: '40GP', value: '42G0' },
]
const dict = results.map((res) => {
return res.label
})
process(dict)
}
},
},
{

@ -417,7 +417,7 @@ export const searchFormSchema: FormSchema[] = [
label: '客户属性',
field: 'clientTag',
component: 'ApiSelect',
colProps: { span: 8 },
colProps: { span: 4 },
componentProps: () => {
return {
api: () => {
@ -515,6 +515,19 @@ export const searchFormSchema: FormSchema[] = [
}
},
},
{
field: 'auditStatus',
label: '审批状态',
component: 'Select',
colProps: { span: 4 },
componentProps: {
options: [
{ label: '待审批', value: 0 },
{ label: '审核通过', value: 1 },
{ label: '驳回', value: 2 },
],
},
},
]
export const formSchema: FormSchema[] = [

@ -7,33 +7,45 @@
import { request } from '/@/utils/request'
import { DataResult, PageRequest } from '/@/api/model/baseModel'
enum Api {
list = '/mainApi/Print/GetOpenPrintTemplateList',
modalList = '/mainApi/Print/GetOpenPrintModuleList',
edit = '/mainApi/PrintTemplate//EditSysPrintModule',
// list = '/mainApi/Print/GetOpenPrintTemplateList',
// modalList = '/mainApi/Print/GetOpenPrintModuleList',
// edit = '/mainApi/PrintTemplate//EditSysPrintModule',
// temEidt = '/mainApi/PrintTemplate/EditSysPrintTemplate',
// temInfo = '/mainApi/PrintTemplate/GetSysPrintTemplateInfo',
// info = '/mainApi/PrintTemplate/GetSysPrintModuleInfo',
// delete = '/mainApi/ClientParam/BatchDelClientParam',
// GetTenantParamDataSelectList = '/mainApi/ClientParam/GetTenantParamDataSelectList',
// GetOpenSqlPrintInfo = '/printApi/OpenPrint/GetOpenSqlPrintInfo',
// DownLoadSqlPrintFile = '/printApi/OpenPrint/DownLoadSqlPrintFile'
// ---------------------------
list = '/mainApi/PrintTemplate/GetPrintModuleList',
modalList = '/mainApi/PrintTemplate/GetSysPrintTemplateList',
edit = '/mainApi/PrintTemplate/EditSysPrintModule',
temEidt = '/mainApi/PrintTemplate/EditSysPrintTemplate',
temInfo = '/mainApi/PrintTemplate/GetSysPrintTemplateInfo',
info = '/mainApi/PrintTemplate/GetSysPrintModuleInfo',
delete = '/mainApi/ClientParam/BatchDelClientParam',
delete = '/mainApi/PrintTemplate/BatchDelPrintTemplate',
GetTenantParamDataSelectList = '/mainApi/ClientParam/GetTenantParamDataSelectList',
GetOpenSqlPrintInfo = '/printApi/OpenPrint/GetOpenSqlPrintInfo',
DownLoadSqlPrintFile = '/printApi/OpenPrint/DownLoadSqlPrintFile'
}
// 模版列表 (Auth)
export function GetSysPrintTemplateList(data) {
// 模块列表
export function GetPrintModuleList(data) {
return request<DataResult>({
url: Api.list,
method: 'post',
data
})
}
// 模块列表
export function GetPrintModuleList(params) {
// 模版列表 (Auth)
export function GetSysPrintTemplateList(data) {
return request<DataResult>({
url: Api.modalList,
method: 'get',
params
method: 'post',
data
})
}
// 模块编辑 (Auth)
export function EditSysPrintModule(data: PageRequest) {
return request<DataResult>({

@ -6,33 +6,34 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import { GetPrintModuleList } from './api'
import { GetCarrierSelectList } from '/@/api/common'
import { max } from 'lodash'
export const columns: BasicColumn[] = [
{
title: '模版名称',
dataIndex: 'templateName',
width: 200
width: 200,
},
{
title: '打印类型',
dataIndex: 'printType',
width: 120
width: 120,
},
{
title: '船公司',
dataIndex: 'carrierName',
width: 150
width: 150,
},
{
title: '入口参数',
dataIndex: 'inParamColumn',
width: 200
width: 200,
},
{
title: '备注',
dataIndex: 'note',
width: 200
}
width: 200,
},
]
export const searchFormSchema: FormSchema[] = [
@ -40,7 +41,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'templateName',
label: '模版名称',
colProps: { span: 6 },
component: 'Input'
component: 'Input',
},
]
export const formSchema: FormSchema[] = [
@ -49,27 +50,30 @@ export const formSchema: FormSchema[] = [
field: 'id',
component: 'Input',
defaultValue: '',
show: false
show: false,
},
{
field: 'moduleName',
label: '模块名称',
required: true,
component: 'Input',
colProps: { span: 12 }
colProps: { span: 12 },
},
{
field: 'moduleCode',
label: '模块编码',
required: true,
component: 'Input',
colProps: { span: 12 }
colProps: { span: 12 },
componentProps: {
maxlength: 4,
},
},
{
field: 'sortNo',
label: '排序',
component: 'Input',
colProps: { span: 12 }
colProps: { span: 12 },
},
{
field: 'disable',
@ -81,9 +85,9 @@ export const formSchema: FormSchema[] = [
componentProps: {
options: [
{ label: '禁用', value: 1 },
{ label: '启用', value: 0 }
]
}
{ label: '启用', value: 0 },
],
},
},
{
field: 'note',
@ -91,33 +95,32 @@ export const formSchema: FormSchema[] = [
component: 'InputTextArea',
colProps: { span: 24 },
componentProps: {
autoSize: { minRows: 5, maxRows: 5 }
}
}
autoSize: { minRows: 5, maxRows: 5 },
},
},
]
export const temFormSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
defaultValue: '',
show: false
show: false,
},
{
field: 'templateName',
label: '模版名称',
required: true,
component: 'Input',
colProps: { span: 12 }
colProps: { span: 12 },
},
{
field: 'templateCode',
label: '模版编码',
required: true,
component: 'Input',
colProps: { span: 12 }
colProps: { span: 12 },
},
{
label: '',
@ -150,9 +153,9 @@ export const temFormSchema: FormSchema[] = [
formModel.carrierId = null
formModel.carrierName = null
}
},
}
}
}
},
},
{
field: 'printType',
@ -180,7 +183,7 @@ export const temFormSchema: FormSchema[] = [
field: 'moduleCode',
label: '',
component: 'Input',
show: false
show: false,
},
{
label: '所属模块',
@ -203,7 +206,7 @@ export const temFormSchema: FormSchema[] = [
},
onChange: (v, obj) => {
if (obj) formModel.moduleCode = obj.moduleCode
}
},
}
},
},
@ -211,13 +214,13 @@ export const temFormSchema: FormSchema[] = [
field: 'templateName',
label: '',
component: 'Input',
show: false
show: false,
},
{
field: 'moduleId',
label: '',
component: 'Input',
show: false
show: false,
},
{
field: 'isUseDataSource',
@ -229,9 +232,9 @@ export const temFormSchema: FormSchema[] = [
componentProps: {
options: [
{ label: '是', value: 1 },
{ label: '否', value: 0 }
]
}
{ label: '否', value: 0 },
],
},
},
{
field: 'sqlModel',
@ -241,7 +244,7 @@ export const temFormSchema: FormSchema[] = [
colProps: { span: 6 },
show: ({ values }) => {
return values.isUseDataSource && values.id
}
},
},
{
field: 'downModel',
@ -251,7 +254,7 @@ export const temFormSchema: FormSchema[] = [
colProps: { span: 6 },
show: ({ values }) => {
return values.isUseDataSource && values.id
}
},
},
{
field: 'sourceSql',
@ -260,11 +263,11 @@ export const temFormSchema: FormSchema[] = [
colProps: { span: 24 },
componentProps: {
autoSize: { minRows: 3, maxRows: 20 },
disTrans: true
disTrans: true,
},
show: ({ values }) => {
return values.isUseDataSource
}
},
},
{
field: 'inParamColumn',
@ -273,7 +276,7 @@ export const temFormSchema: FormSchema[] = [
colProps: { span: 12 },
show: ({ values }) => {
return values.isUseDataSource
}
},
},
{
field: 'groupBy',
@ -282,7 +285,7 @@ export const temFormSchema: FormSchema[] = [
colProps: { span: 12 },
show: ({ values }) => {
return values.isUseDataSource
}
},
},
{
field: 'columnView',
@ -290,11 +293,11 @@ export const temFormSchema: FormSchema[] = [
component: 'InputTextArea',
colProps: { span: 24 },
componentProps: {
autoSize: { minRows: 3, maxRows: 20 }
autoSize: { minRows: 3, maxRows: 20 },
},
show: ({ values }) => {
return values.isUseDataSource
}
},
},
{
field: 'printJsonContent',
@ -303,7 +306,7 @@ export const temFormSchema: FormSchema[] = [
colProps: { span: 24 },
componentProps: {
autoSize: { minRows: 5, maxRows: 20 },
disTrans: true
}
}
disTrans: true,
},
},
]

@ -1,34 +1,33 @@
<template>
<div class="ds-print-tem">
<BasicTable
class="ds-table-detail"
@register="registerTable"
>
<BasicTable class="ds-table-detail" @register="registerTable">
<template #left>
<div class="opt">
<a-button
type="link"
@click="handleCreate"
>
<a-button type="link" @click="handleCreate">
<span class="iconfont icon-new_document"></span>
添加模块
</a-button>
<a-spin :spinning="mloading">
<div class="list-box">
<div v-for="item in modelList" :key="item.id" class="item">
<span :class="{active: item.id == moduleId}" @click="toggleTable(item)"><span class="count">{{ item.templateCount }}</span><span>{{ item.moduleName }}</span></span>
<span style="float: right" class="iconfont icon-bianji1" @click="handleEdit(item)"></span>
<span :class="{ active: item.id == moduleId }" @click="toggleTable(item)"
><span class="count">{{ item.moduleCode }}</span
><span>{{ item.moduleName }}</span></span
>
<span
style="float: right"
class="iconfont icon-bianji1"
@click="handleEdit(item)"
></span>
</div>
<img v-if="modelList.length == 0" src="../../../assets/images/nodata1.png" alt="">
<img v-if="modelList.length == 0" src="../../../assets/images/nodata1.png" alt="" />
</div>
</a-spin>
</div>
</template>
<template #tableTitle>
<h4 style="margin: 0 10px 0 -5px;">
打印模版列表
</h4>
<h4 style="margin: 0 10px 0 -5px"> 打印模版列表 </h4>
<a-button type="link" @click="createTem">
<span class="iconfont icon-tianjia"></span>
新建
@ -51,9 +50,9 @@
title: '是否要删除此条数据?',
okText: '是',
cancelText: '否',
confirm: handleDelete.bind(null, record)
}
}
confirm: handleDelete.bind(null, record),
},
},
]"
/>
</template>
@ -83,19 +82,31 @@
//
const [registerTemModal, { openModal: openModal2 }] = useModal()
const mloading = ref(false)
//
const modelList = ref<any>([])
//
const initModel = () => {
modelList.value.splice(0)
mloading.value = true
GetPrintModuleList().then(res => {
modelList.value = res.data
let ApiData = {
queryCondition: '[]',
pageCondition: { pageIndex: 1, pageSize: 999, sortConditions: [] },
}
GetPrintModuleList(ApiData)
.then((res) => {
res.data.forEach((item) => {
modelList.value.push(item)
})
moduleId.value = res.data[0].id
reload()
mloading.value = false
}).catch(() => {
})
.catch(() => {
mloading.value = false
})
}
initModel()
//
const modelList = ref([])
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
api: async (p) => {
const res: API.DataResult = await GetSysPrintTemplateList(p)
@ -122,6 +133,7 @@
showIndexColumn: true,
canResize: true,
resizeHeightOffset: 15,
immediate: false,
actionColumn: {
width: 80,
title: '操作',
@ -165,7 +177,7 @@
//
async function handleDelete(record: Recordable) {
const res: API.DataResult = await BatchDelClientParam({
id: '',
id: moduleId.value,
ids: [record.id],
})
if (res.succeeded) {
@ -196,7 +208,7 @@
justify-content: space-between;
}
.list-box {
border: 1px solid #E8EBED;
border: 1px solid #e8ebed;
border-radius: 2px;
margin: 6px 10px 0;
width: 210px;
@ -212,9 +224,9 @@
width: 32px;
height: 20px;
border-radius: 2px;
background: #F5F9FC;
background: #f5f9fc;
display: inline-block;
color: #257AFA;
color: #257afa;
text-align: center;
line-height: 19px;
margin-right: 8px;
@ -222,7 +234,7 @@
}
.icon-bianji1 {
margin-top: 3px;
color: #257AFA;
color: #257afa;
display: none;
}
.item:hover {
@ -231,9 +243,11 @@
}
}
.active {
span {color: #257AFA;}
span {
color: #257afa;
}
.count {
background: #257AFA;
background: #257afa;
color: #ffffff;
}
}

Loading…
Cancel
Save