委托单位

szh-new
lijingjia 4 months ago
parent 56b1c09923
commit 299ac10250

@ -173,7 +173,7 @@
import DsPrint from '/@/components/Print/index.vue'
const [registerModal, { openModal }] = useModal()
const { createMessage } = useMessage()
const emits = defineEmits(['revoke', 'save', 'delete', 'cancel', 'refresh', 'history', 'selectInsert', 'submit'])
const emits = defineEmits(['revoke', 'save', 'delete', 'cancel', 'refresh', 'history', 'selectInsert', 'submit', 'add'])
const props = defineProps({
//
data: {
@ -213,6 +213,7 @@
}
props.data.push(deepCopyRow)
emits('add')
}
//
const copyRow = () => {

@ -21,6 +21,7 @@
@selectInsert="selectInsert"
@revoke="revoke"
@submit="submit"
@add="add"
></ActionBar>
</div>
<div>
@ -826,6 +827,13 @@
loading.value = false
})
}
//
const add = () => {
const hot = hotTb.value.hotInstance
nextTick(() => {
hot.selectCell(list.value.length - 1, 4)
})
}
onMounted(() => {
const hot = hotTb.value.hotInstance
hot.addHook('afterOnCellMouseDown', function (event, coords, TD) {})
@ -836,7 +844,7 @@
if (hot.getSelected()[0][0] == list.value.length - 1 && !hot.getActiveEditor()?._opened) {
list.value.push(JSON.parse(JSON.stringify(row)))
nextTick(() => {
hot.selectCell(list.value.length - 1, 3)
hot.selectCell(list.value.length - 1, 4)
})
return false
}

@ -2010,7 +2010,7 @@ export function GetBusinessOrderContactInfo(params) {
// 联系人下拉
export function GetOrderContactListByClientId(params) {
return request({
url: '/mainApi/OrderContact/GetOrderContactListByClientId',
url: '/opApi/BusinessOrderContact/GetOrderContactListByClientId',
method: 'get',
params
})

@ -33,6 +33,10 @@
EDI报文导出
<span class="iconfont icon-30jiantouxiangxiafill"></span>
</a-button>
<a-button type="link" @click="msg">
<span class="iconfont icon-xiaopiaodayin"></span>
打印
</a-button>
</div>
<div>
<a-button type="link" @click="create">
@ -215,12 +219,14 @@
resetFields2()
resetFields3()
resetFields4()
resetFields5()
formData.agentId = ''
formData.agentContent = ''
formData.cntrSealNo = ''
formData.description = ''
formData.marks = ''
setFieldsValue5({
...props.details
})
}
setFormValue()
}
@ -674,12 +680,14 @@
resetFields2()
resetFields3()
resetFields4()
resetFields5()
formData.agentId = ''
formData.agentContent = ''
formData.cntrSealNo = ''
formData.description = ''
formData.marks = ''
setFieldsValue5({
...props.details
})
createMessage.success('表单已置为新建状态!')
}
//

@ -47,7 +47,7 @@
<span
v-for="(serive, sindex) in bookingServiceItem"
class="items"
:class="{'item-active': serive.projectCode == projectCode}"
:class="{'item-active': serive.isYield}"
:key="sindex"
@click="saveService(serive)"
>
@ -748,14 +748,10 @@
getStatusServiceList(1, null)
}
}
const projectCode = ref()
//
function saveService(data) {
projectCode.value = data.projectCode
var date = new Date()
console.log(date.valueOf())
if (!props.id) {
createMessage.error('请先保存主单')
createMessage.warning('请先保存主单')
return false
}
const obj = {

@ -7,30 +7,40 @@
import { request } from '/@/utils/request'
import { DataResult, PageRequest } from '/@/api/model/baseModel'
enum Api {
list = '/mainApi/ClientParam/GetClientParamList',
edit = '/mainApi/ClientParam//EditClientParam',
info = '/mainApi/ClientParam/GetClientParamInfo',
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'
}
// 列表 (Auth)
export function GetClientParamList(data: PageRequest) {
export function GetSysPrintTemplateList() {
return request<DataResult>({
url: Api.list,
method: 'post',
data
method: 'get'
})
}
// 编辑 (Auth)
export function EditClientParam(data: PageRequest) {
// 模块列表
export function GetPrintModuleList(params) {
return request<DataResult>({
url: Api.modalList,
method: 'get',
params
})
}
// 模块编辑 (Auth)
export function EditSysPrintModule(data: PageRequest) {
return request<DataResult>({
url: Api.edit,
method: 'post',
data
})
}
// 详情 (Auth)
export function GetClientParamInfo(query) {
// 模块详情 (Auth)
export function GetSysPrintModuleInfo(query) {
return request<DataResult>({
url: Api.info,
method: 'get',
@ -38,6 +48,24 @@ export function GetClientParamInfo(query) {
})
}
// 模版编辑
export function EditSysPrintTemplate(data: PageRequest) {
return request<DataResult>({
url: Api.temEidt,
method: 'post',
data
})
}
// 模版详情
export function GetSysPrintTemplateInfo(data: PageRequest) {
return request<DataResult>({
url: Api.temInfo,
method: 'post',
data
})
}
// 删除 (Auth)
export function BatchDelClientParam(data: PageRequest) {
return request<DataResult>({

@ -5,29 +5,29 @@
*/
import { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table'
// 引入字典数据
import { getDictOption } from '/@/utils/dictUtil'
// 下拉数据
import { getOptions } from '/@/hooks/dict'
import { useOptionsStore } from '/@/store/modules/options'
import { GetTenantParamDataSelectList } from './api'
import { GetPrintModuleList } from './api'
const optionsStore = useOptionsStore()
const itemNameOption = ref([])
// 模块字典
const modulesDict = await getDictOption('modules')
export const columns: BasicColumn[] = [
{
title: '客户名称',
dataIndex: 'customerName',
width: 150
title: '模版名称',
dataIndex: 'templateName',
width: 200
},
{
title: '打印类型',
dataIndex: 'printType',
width: 120
},
{
title: '客户参数类型',
dataIndex: 'paramType',
width: 150
title: '入口参数',
dataIndex: 'inParamColumn',
width: 200
},
{
title: '客户参数名称',
title: '创建时间',
dataIndex: 'paramName',
width: 200
},
@ -40,8 +40,8 @@ export const columns: BasicColumn[] = [
export const searchFormSchema: FormSchema[] = [
{
field: 'paramName',
label: '客户参数名称',
field: 'templateName',
label: '模版名称',
colProps: { span: 6 },
component: 'Input'
},
@ -55,136 +55,146 @@ export const formSchema: FormSchema[] = [
show: false
},
{
field: 'paramCode',
label: '客户参数类别',
field: 'moduleName',
label: '模块名称',
required: true,
component: 'ApiSelect',
colProps: { span: 12 },
componentProps: ({ formModel }) => {
return {
option: optionsStore.getOptionsByCode('GetTenantParamSelectList'),
labelField: 'paramName',
valueField: 'paramCode',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
GetTenantParamDataSelectList({ code: e }).then(res => {
itemNameOption.value = res.data
})
if (obj) {
formModel.paramName = obj.label
formModel.paramId = obj.id
formModel.paramType = obj.type
} else {
formModel.paramName = ''
formModel.paramId = ''
formModel.paramType = ''
}
}
}
}
component: 'Input',
colProps: { span: 12 }
},
{
field: 'itemCode',
label: '客户参数名称',
field: 'moduleCode',
label: '模块编码',
required: true,
component: 'ApiSelect',
colProps: { span: 12 },
componentProps: ({ formModel }) => {
return {
option: itemNameOption.value,
labelField: 'itemName',
valueField: 'itemCode',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
formModel.itemName = obj.label
} else {
formModel.itemName = ''
}
}
}
}
},
{
label: '',
field: 'itemName',
component: 'Input',
defaultValue: '',
show: false
colProps: { span: 12 }
},
{
label: '',
field: 'customerName',
field: 'sortNo',
label: '排序',
component: 'Input',
defaultValue: '',
show: false
colProps: { span: 12 }
},
{
label: '',
field: 'paramId',
component: 'Input',
defaultValue: '',
show: false
field: 'disable',
label: '是否可用',
defaultValue: 0,
component: 'RadioButtonGroup',
colProps: { span: 12 },
componentProps: {
options: [
{ label: '禁用', value: 1 },
{ label: '启用', value: 0 }
]
}
},
{
field: 'note',
label: '备注',
component: 'InputTextArea',
colProps: { span: 24 }
}
]
export const temFormSchema: FormSchema[] = [
{
label: '',
field: 'paramName',
field: 'id',
component: 'Input',
defaultValue: '',
show: false
},
{
label: '',
field: 'paramType',
field: 'moduleName',
label: '模版名称',
required: true,
component: 'Input',
defaultValue: '',
show: false
colProps: { span: 12 }
},
{
field: 'customerId',
label: '客户名称',
field: 'printType',
label: '打印类型',
required: true,
component: 'Select',
colProps: { span: 12 },
componentProps: () => {
return {
options: [
{ label: 'PDF', value: 'PDF' },
{ label: 'EXCEL', value: 'EXCEL' },
{ label: 'WORD', value: 'WORD' },
],
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
{
label: '所属模块',
field: 'templateCode',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 12 },
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
const arr = getOptions('custom')
resolve(arr)
})
},
labelField: 'shortName',
valueField: 'codeName',
api: GetPrintModuleList,
allowClear: true,
showSearch: true,
labelField: 'moduleName',
valueField: 'moduleCode',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
formModel.customerName = obj.label
formModel.templateName = obj.label
formModel.moduleId = obj.id
} else {
formModel.customerName = ''
formModel.templateName = ''
formModel.moduleId = ''
}
}
},
}
}
},
},
{
field: 'orderNo',
label: '排序',
required: true,
field: 'templateName',
label: '',
component: 'Input',
colProps: { span: 12 }
show: false
},
{
field: 'note',
label: '备注',
field: 'moduleId',
label: '',
component: 'Input',
show: false
},
{
field: 'isUseDataSource',
label: '是否使用数据源',
defaultValue: 0,
component: 'RadioButtonGroup',
colProps: { span: 12 },
componentProps: {
options: [
{ label: '是', value: 1 },
{ label: '否', value: 0 }
]
}
},
{
field: 'printJsonContent',
label: '打印设计内容',
component: 'InputTextArea',
colProps: { span: 24 }
colProps: { span: 24 },
componentProps: {
autoSize: { minRows: 3, maxRows: 20 }
}
}
]
]

@ -50,7 +50,7 @@
//
import { formSchema } from '../columns'
//
import { EditClientParam, GetClientParamInfo } from '../api'
import { EditSysPrintModule, GetSysPrintModuleInfo } from '../api'
//
import { useMessage } from '/@/hooks/web/useMessage'
// Emits
@ -75,7 +75,7 @@
setModalProps({ confirmLoading: true });
updateFormField(updateSchema)
rowId.value = data.record.id
const res: API.DataResult = await GetClientParamInfo({ id: unref(rowId) })
const res: API.DataResult = await GetSysPrintModuleInfo({ id: unref(rowId) })
if (res.succeeded) {
setFieldsValue({
...res.data,
@ -94,7 +94,7 @@
const values = await validate()
loading.value = true
setModalProps({ confirmLoading: true, loading: true })
const res: API.DataResult = await EditClientParam(values)
const res: API.DataResult = await EditSysPrintModule(values)
loading.value = false
if (res.succeeded) {
createMessage.success(res.message)

@ -0,0 +1,110 @@
<template>
<BasicModal
v-bind="$attrs"
:use-wrapper="true"
:title="getTitle"
:form-schema="formSchema"
width="50%"
@register="registerModal"
@ok="handleSave"
>
<!-- 包装表单 -->
<BasicForm @register="registerForm" />
<!--右下角按钮-->
<template #footer>
<a-button
pre-icon="ant-design:close-outlined"
type="warning"
:loading="loading"
ghost
style="margin-right: 0.8rem"
@click="closeModal"
>
取消
</a-button>
<a-button
type="success"
:loading="loading"
pre-icon="ant-design:check-outlined"
style="margin-right: 0.8rem"
@click="handleSave(false)"
>
仅保存
</a-button>
<a-button
pre-icon="ant-design:check-circle-outlined"
type="primary"
:loading="loading"
@click="handleSave(true)"
>
保存并关闭
</a-button>
</template>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, computed, unref } from 'vue'
//
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
//
import { temFormSchema } from '../columns'
//
import { EditSysPrintTemplate, GetSysPrintTemplateInfo } from '../api'
//
import { useMessage } from '/@/hooks/web/useMessage'
// Emits
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
// loading
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] =
useForm({
labelWidth: 100,
schemas: temFormSchema,
showActionButtonGroup: false,
})
const [registerModal, { setModalProps, closeModal, updateFormField }] = useModalInner(async (data) => {
resetFields()
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
setModalProps({ confirmLoading: true });
updateFormField(updateSchema)
rowId.value = data.record.id
const res: API.DataResult = await GetSysPrintTemplateInfo({ id: unref(rowId) })
if (res.succeeded) {
setFieldsValue({
...res.data,
})
}
} else {
setFieldsValue({ permissionIdentity: unref(2) })
}
setModalProps({ loading: false })
})
const getTitle = computed(() => (!unref(isUpdate) ? '新增' : '编辑'))
async function handleSave(exit) {
try {
const values = await validate()
loading.value = true
setModalProps({ confirmLoading: true, loading: true })
const res: API.DataResult = await EditSysPrintTemplate(values)
loading.value = false
if (res.succeeded) {
createMessage.success(res.message)
emit('success')
} else {
createMessage.error(res.message)
}
exit && closeModal()
} finally {
setModalProps({ confirmLoading: false, loading: false })
}
}
</script>

@ -1,62 +1,98 @@
<template>
<div>
<BasicTable
class="ds-table"
@register="registerTable"
>
<template #toolbar>
<a-button type="link" @click="handleCreate">
<span class="iconfont icon-tianjia"></span>
新建
<div class="ds-print-tem">
<div class="flex">
<div class="opt">
<a-button
type="link"
@click="handleCreate"
>
<span class="iconfont icon-new_document"></span>
添加模块
</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: handleEdit.bind(null, record),
},
{
icon: 'ant-design:delete-outlined',
tooltip: '删除',
color: 'error',
popConfirm: {
title: '是否要删除此条数据?',
okText: '是',
cancelText: '否',
confirm: handleDelete.bind(null, record)
<a-spin :spinning="mloading">
<div class="list-box">
<div v-for="item in modelList" :key="item.id" class="item" @click="toggleTable(item)">
<span class="count">{{ item.templateCount }}</span><span>{{ item.moduleName }}</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="">
</div>
</a-spin>
</div>
<BasicTable
class="ds-table"
@register="registerTable"
>
<template #toolbar>
<a-button type="link" @click="createTem">
<span class="iconfont icon-tianjia"></span>
新建
</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction
:actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: handleEdit.bind(null, record),
},
{
icon: 'ant-design:delete-outlined',
tooltip: '删除',
color: 'error',
popConfirm: {
title: '是否要删除此条数据?',
okText: '是',
cancelText: '否',
confirm: handleDelete.bind(null, record)
}
}
}
]"
/>
]"
/>
</template>
</template>
</template>
</BasicTable>
</BasicTable>
</div>
<!-- 新增模块弹窗 -->
<Modal @register="registerModal" @success="handleSuccess" />
<!-- 模版弹窗 -->
<temModal @register="registerTemModal" @success="temSuccess" />
</div>
</template>
<script lang="ts" setup>
import { onMounted } from 'vue'
import { onMounted, ref } from 'vue'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { formatParams } from '/@/hooks/web/common'
import { GetClientParamList, BatchDelClientParam } from './api'
import { GetSysPrintTemplateList, GetPrintModuleList, BatchDelClientParam } from './api'
import { useModal } from '/@/components/Modal'
//
import Modal from './components/Modal.vue'
//
import temModal from './components/temModal.vue'
import { columns, searchFormSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
const [registerModal, { openModal }] = useModal()
//
const [registerModal, { openModal: openModal1 }] = useModal()
//
const [registerTemModal, { openModal: openModal2 }] = useModal()
//
const modelList = ref([])
const mloading = ref(false)
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
api: async (p) => {
const res: API.DataResult = await GetClientParamList(p)
const res: API.DataResult = await GetSysPrintTemplateList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: (p) => {
if (modalId) {
p['id'] = modalId
}
initModel()
return formatParams(p)
},
columns,
@ -79,20 +115,42 @@
fixed: 'right',
},
})
//
const initModel = () => {
mloading.value = true
GetPrintModuleList().then(res => {
modelList.value = res.data
mloading.value = false
}).catch(() => {
mloading.value = false
})
}
//
function handleCreate() {
openModal(true, {
isParent: false,
openModal1(true, {
isUpdate: false,
})
}
function handleEdit(record: Recordable) {
openModal(true, {
//
const createTem = () => {
openModal2(true, {
isUpdate: false,
})
}
//
function handleEdit(record) {
openModal1(true, {
record,
isUpdate: true,
})
}
// id
let modalId = ''
//
const toggleTable = (item) => {
modalId = item.id
reload()
}
//
async function handleDelete(record: Recordable) {
const res: API.DataResult = await BatchDelClientParam({
@ -110,6 +168,52 @@
//
})
function handleSuccess() {
initModel()
}
const temSuccess = () => {
reload()
}
</script>
<style lang="less">
.ds-print-tem {
.opt {
padding: 10px;
}
.list-box {
border: 1px solid #E8EBED;
border-radius: 2px;
margin: 0 10px;
width: 210px;
padding: 16px 20px;
img {
margin: 20px 0 40px;
}
.item {
cursor: pointer;
}
}
.count {
width: 32px;
height: 20px;
border-radius: 2px;
background: #F5F9FC;
display: inline-block;
color: #257AFA;
text-align: center;
line-height: 19px;
margin-right: 8px;
margin-bottom: 8px;
}
.icon-bianji1 {
margin-top: 3px;
color: #257AFA;
display: none;
}
.item:hover {
.icon-bianji1 {
display: block;
}
}
}
</style>
Loading…
Cancel
Save