szh-new
张同海 2 months ago
parent ae1a0c314a
commit 64b48c1c3d

@ -581,7 +581,7 @@
},
},
{
title: '放箱单号',
title: '合同号',
width: 120,
data: 'ctnReleaseNo',
},

@ -602,7 +602,7 @@
},
},
{
title: '放箱单号',
title: '合同号',
width: 120,
data: 'ctnReleaseNo',
},

@ -202,7 +202,7 @@ export const formSearchBoxSchema: FormSchema[] = [
},
{
field: 'ctnreleaseno',
label: '放箱单号',
label: '合同号',
component: 'Input',
colProps: { span: 6 },
},

@ -73,7 +73,7 @@ export const columns: BasicColumn[] = [
width: 200,
},
{
title: '关联放箱单号',
title: '关联合同号',
dataIndex: 'ctnReleaseNo',
sorter: true,
width: 200,
@ -312,7 +312,7 @@ export const searchFormSchema: FormSchema[] = [
},
{
field: 'ctnReleaseNo',
label: '关联放箱单号',
label: '关联合同号',
component: 'Input',
colProps: { span: 4 },
},
@ -498,7 +498,7 @@ export const formSchema: FormSchema[] = [
},
{
field: 'ctnReleaseNo',
label: '关联放箱单号',
label: '关联合同号',
component: 'Input',
colProps: { span: 6 },
// required: true,

@ -781,7 +781,7 @@
data: 'rentType',
},
{
title: '放箱单号',
title: '合同号',
width: 120,
data: 'ctnReleaseNo',
},

@ -623,7 +623,7 @@
// data: 'billState',
// },
{
title: '关联放箱单号',
title: '关联合同号',
width: 120,
data: 'ctnReleaseNo',
},
@ -734,7 +734,7 @@
data: 'vesselVoyno',
},
{
title: '放箱单号',
title: '合同号',
width: 120,
data: 'ctnreleaseno',
},
@ -930,7 +930,7 @@
// data: 'billState',
// },
{
title: '关联放箱单号',
title: '关联合同号',
width: 120,
data: 'ctnReleaseNo',
},

@ -547,7 +547,7 @@ export const formSearchBoxSchema: FormSchema[] = [
},
{
field: 'ctnreleaseno',
label: '放箱单号',
label: '合同号',
component: 'Input',
colProps: { span: 6 },
},

@ -641,7 +641,7 @@
},
},
{
title: '放箱单号',
title: '合同号',
width: 120,
data: 'ctnReleaseNo',
},

@ -544,7 +544,7 @@ export const formSearchBoxSchema: FormSchema[] = [
},
{
field: 'ctnreleaseno',
label: '放箱单号',
label: '合同号',
component: 'Input',
colProps: { span: 6 },
},

@ -589,7 +589,7 @@
},
},
{
title: '放箱单号',
title: '合同号',
width: 120,
data: 'ctnReleaseNo',
},

@ -643,7 +643,7 @@
// data: 'billState',
// },
{
title: '放箱单号',
title: '合同号',
width: 120,
data: 'ctnReleaseNo',
},
@ -975,7 +975,7 @@
// data: 'billState',
// },
{
title: '放箱单号',
title: '合同号',
width: 120,
data: 'ctnReleaseNo',
},
@ -1374,7 +1374,7 @@
data: 'stateTime',
},
{
title: '放箱单号',
title: '合同号',
width: 120,
data: 'ctnReleaseNo',
},
@ -1552,7 +1552,7 @@
data: 'vesselVoyno',
},
{
title: '放箱单号',
title: '合同号',
width: 120,
data: 'ctnReleaseNo',
},

@ -574,7 +574,7 @@ export const formSearchBoxSchema: FormSchema[] = [
},
{
field: 'ctnreleaseno',
label: '放箱单号',
label: '合同号',
component: 'Input',
colProps: { span: 6 },
},

@ -682,7 +682,7 @@
// },
// },
{
title: '放箱单号',
title: '合同号',
width: 120,
data: 'ctnReleaseNo',
},

@ -290,7 +290,7 @@ export const formSearchBoxSchema: FormSchema[] = [
},
{
field: 'ctnreleaseno',
label: '放箱单号',
label: '合同号',
component: 'Input',
colProps: { span: 6 },
},

@ -365,7 +365,7 @@ export const formSchema: FormSchema[] = [
},
{
field: 'ctnReleaseNo',
label: '关联放箱单号',
label: '关联合同号',
component: 'Input',
colProps: { span: 6 },
// required: true,

@ -52,7 +52,7 @@ export const columns: BasicColumn[] = [
width: 200,
},
{
title: '关联放箱单号',
title: '关联合同号',
dataIndex: 'ctnReleaseNo',
sorter: true,
width: 200,

@ -312,7 +312,7 @@ export const formSchema: FormSchema[] = [
},
{
field: 'ctnReleaseNo',
label: '关联放箱单号',
label: '关联合同号',
component: 'Input',
colProps: { span: 6 },
// required: true,

@ -73,7 +73,7 @@
})
const DiyFieldIdS = ref<any>([])
function linkageForm(data) {
console.log(data)
console.log(data, 11111111)
// Schema
if (DiyFieldIdS.value.length) {
@ -251,12 +251,8 @@
sortConditions: [],
},
})
console.log(DiyFieldIdS.value)
arrRes.data.forEach((item) => {
values.attachments.forEach((e) => {
console.log(item.id, e)
if (item.id == e) {
attachments.push({
taskMailId: values.id,

@ -6,6 +6,7 @@ enum Api {
edit = '/opApi/TaskMail/Edit',
info = '/opApi/TaskMail/Edit',
del = '/opApi/TaskMail/Delete',
delfile = '/opApi/TaskMail/DeleteAttachments',
PrintTemplateList = '/mainApi/Print/GetOpenPrintTemplateList',
}
@ -41,6 +42,14 @@ export function ApiDel(data: PageRequest) {
data,
})
}
// 删除附件 (Auth)
export function ApiDelFile(data: PageRequest) {
return request<DataResult>({
url: Api.delfile,
method: 'post',
data,
})
}
// 印模块列表 (Auth)
export function GetPrintTemplateList(data: PageRequest) {
return request<DataResult>({
@ -48,4 +57,4 @@ export function GetPrintTemplateList(data: PageRequest) {
method: 'post',
data,
})
}
}

@ -1,8 +1,9 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
// 字典
import { getDictOption } from '/@/utils/dictUtil'
import { GetPrintTemplateList } from './api.ts'
import { GetPrintTemplateList, ApiDelFile } from './api.ts'
let documentTypeList = []
let attachmentsData = []
export const columns: BasicColumn[] = [
{
title: '名称',
@ -29,6 +30,10 @@ export const columns: BasicColumn[] = [
return RText
},
},
{
title: '备注',
dataIndex: 'note',
},
]
export const searchFormSchema: FormSchema[] = [
@ -141,12 +146,44 @@ export const formSchema: FormSchema[] = [
unCheckedChildren: '否',
},
},
// {
// label: '附件',
// field: 'attachmentsO',
// component: 'ApiSelect',
// show: false,
// componentProps: ({ formActionType }) => {
// return {
// api: () => {
// return new Promise((resolve) => {
// GetPrintTemplateList({
// queryCondition: `[]`,
// pageCondition: {
// pageIndex: 1,
// pageSize: 999,
// sortConditions: [],
// },
// }).then((res) => {
// attachmentsData = res.data
// resolve(res)
// })
// })
// },
// labelField: 'templateName',
// valueField: 'id',
// resultField: 'data',
// allowClear: true,
// immediate: true,
// mode: 'multiple',
// class: 'NoLimitHeight',
// }
// },
// },
{
label: '附件',
field: 'attachments',
component: 'ApiSelect',
colProps: { span: 12 },
componentProps: ({ formActionType }) => {
componentProps: ({ formActionType, formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
@ -158,6 +195,7 @@ export const formSchema: FormSchema[] = [
sortConditions: [],
},
}).then((res) => {
attachmentsData = res.data
resolve(res)
})
})
@ -170,11 +208,55 @@ export const formSchema: FormSchema[] = [
mode: 'multiple',
class: 'NoLimitHeight',
onChange: (e, obj) => {
if (formModel && formModel.id) {
console.log(formModel.id)
let DelData: any = []
if (formModel.attachments.length) {
formModel.attachments.forEach((item) => {
let type = false
obj.forEach((item2) => {})
if (!type) {
DelData.push(item)
}
})
}
let ApiData: any = []
attachmentsData.forEach((item: any) => {
console.log(item)
DelData.forEach((item2) => {
if (item.id == item2) {
ApiData.push({
taskMailId: formModel.id,
templateId: item.id,
fileName: formModel[item.id] ? formModel[item.id] : item.templateName,
fileType: formModel[`${item.id}-fileType`],
})
}
})
})
if (ApiData.length) {
ApiDelFile(ApiData).then((res) => {
console.log(res, 11111)
})
}
console.log(formModel)
}
formActionType ? formActionType.linkageForm(obj) : null
},
}
},
},
{
field: 'note',
label: '备注',
component: 'InputTextArea',
colProps: { span: 24 },
componentProps: {
rows: 2,
},
},
{
field: 'title',
label: '主题模板',

@ -31,7 +31,7 @@ export const columns: BasicColumn[] = [
width: 120,
},
{
title: '结算对象',
title: '费用对象',
dataIndex: 'customerName',
width: 200,
},
@ -223,7 +223,7 @@ export const formSchema: FormSchema[] = [
// },
{
field: 'customerId',
label: '结算对象',
label: '费用对象',
defaultValue: '',
component: 'Input',
show: false,
@ -231,12 +231,44 @@ export const formSchema: FormSchema[] = [
},
{
field: 'customerName',
label: '结算对象',
label: '费用对象',
component: 'Input',
defaultValue: '',
dynamicDisabled: true,
colProps: { span: 6 },
},
{
field: 'customerType',
label: '费用对象类别',
defaultValue: '',
component: 'ApiSelect',
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
getDictOption('djy_cust_prop').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
dynamicRules: ({ values }) => {
return [
{
required: values.customerId ? false : true,
message: '未选择费用对象时,此项必填!',
},
]
},
},
// {
// label: '',
// field: 'customerId',

@ -1,7 +1,7 @@
<template>
<div class="fee-field">
<div class="flex">
<span class="title">费用字段</span>
<span class="title">费用明细</span>
<div>
<a-button type="link" @click="OpenSetCondition">
<span class="iconfont icon-jichupeizhi"></span>
@ -61,7 +61,7 @@
//
import { feeUnitDict } from '/@/hooks/dict/index'
//
// import { getDictOption } from '/@/utils/dictUtil'
import { getDictOption } from '/@/utils/dictUtil'
import AdvancedSearch from '/@/components/Form/src/components/AdvancedSearch.vue'
import { useMessage } from '/@/hooks/web/useMessage'
import { HotTable, HotColumn } from '@handsontable/vue3'
@ -263,6 +263,20 @@
process(dict)
},
},
{
title: '客户类别',
width: 130,
data: 'customerTypeText',
type: 'dropdown',
source: async (query, process) => {
const results = await getDictOption('djy_cust_prop')
console.log(results)
const dict = results.map((item) => {
return item.value + '-' + item.name
})
process(dict)
},
},
{
title: '单位标准',
width: 130,
@ -656,17 +670,17 @@
// if (changes[0][1] === 'feeEnName') {
// }
// //
// if (changes[0][1] === 'customerTypeText') {
// getDictOption('djy_cust_prop').then((res) => {
// const item = res.filter((item) => {
// return changes[0][3].includes(item.name)
// })
// if (item) dict = item[0]
// list.value[changes[0][0]]['customerType'] = dict?.value
// list.value[changes[0][0]]['customerTypeText'] = changes[0][3].split('-')[1]
// })
// }
//
if (changes[0][1] === 'customerTypeText') {
getDictOption('djy_cust_prop').then((res) => {
const item = res.filter((item) => {
return changes[0][3].includes(item.name)
})
if (item) dict = item[0]
list.value[changes[0][0]]['customerType'] = dict?.value
list.value[changes[0][0]]['customerTypeText'] = changes[0][3].split('-')[1]
})
}
// //
// const index = changes[0][0]

@ -138,17 +138,15 @@ export const columns: BasicColumn[] = [
export const searchFormSchema: FormSchema[] = [
{
field: 'CnName',
label: '港口中文名称',
field: 'CnName:portName:ediCode',
label: '港口名称',
component: 'Input',
colProps: { span: 4 },
componentProps: {
placeholder: '港口中文名字/港口英文名字/EDI代码',
},
},
{
field: 'portName',
label: '港口英文名称',
component: 'Input',
colProps: { span: 4 }
},
{
field: 'countryId',
label: '国家',
@ -167,10 +165,20 @@ export const searchFormSchema: FormSchema[] = [
},
},
{
field: 'ediCode',
label: 'EDI代码',
component: 'Input',
field: 'laneId',
label: '航线',
component: 'Select',
colProps: { span: 4 },
componentProps: () => {
return {
options: LanesSelectList,
allowClear: false,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
]
export const formSchema: FormSchema[] = [
@ -267,21 +275,21 @@ export const formSchema: FormSchema[] = [
formModel.lane = obj.label
formModel.laneCode = obj.code
}
}
},
}
}
},
},
{
field: 'lane',
label: '',
component: 'Input',
show: false
show: false,
},
{
field: 'laneCode',
label: '',
component: 'Input',
show: false
show: false,
},
{
field: 'ediCode',

@ -5,11 +5,9 @@
*/
import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue'
import {
getClientCountrySelectList
} from '../infoclient/api'
import { getClientCountrySelectList } from '../infoclient/api'
let ClientCountryList = []
getClientCountrySelectList().then(res => {
getClientCountrySelectList().then((res) => {
res.data.forEach((e) => {
ClientCountryList.push({ label: e.countryName, value: e.id })
})
@ -39,28 +37,37 @@ export const columns: BasicColumn[] = [
title: '备注',
dataIndex: 'note',
width: 200,
}
},
]
export const searchFormSchema: FormSchema[] = [
{
field: 'cnName',
label: '中文名称',
colProps: { span: 4},
component: 'Input'
},
{
field: 'enName',
label: '英文名称',
colProps: { span: 4},
component: 'Input'
},
{
field: 'ediCode',
label: 'EDI代码',
field: 'cnName:enName:ediCode',
label: '船公司名称',
component: 'Input',
colProps: { span: 4 },
component: 'Input'
}
componentProps: {
placeholder: '中文名称/英文名称/EDI代码',
},
},
// {
// field: 'cnName',
// label: '中文名称',
// colProps: { span: 4},
// component: 'Input'
// },
// {
// field: 'enName',
// label: '英文名称',
// colProps: { span: 4},
// component: 'Input'
// },
// {
// field: 'ediCode',
// label: 'EDI代码',
// colProps: { span: 4 },
// component: 'Input'
// }
]
export const formSchema: FormSchema[] = [
{
@ -75,35 +82,35 @@ export const formSchema: FormSchema[] = [
label: '中文名称',
required: true,
colProps: { span: 12 },
component: 'Input'
component: 'Input',
},
{
field: 'cnShortName',
label: '中文简称',
colProps: { span: 12 },
required: true,
component: 'Input'
component: 'Input',
},
{
field: 'enName',
label: '英文名称',
colProps: { span: 12 },
required: true,
component: 'Input'
component: 'Input',
},
{
field: 'code',
label: '英文简称',
colProps: { span: 12 },
required: true,
component: 'Input'
component: 'Input',
},
{
field: 'otherCode',
label: '船公司代码别名',
colProps: { span: 12 },
required: true,
component: 'Input'
component: 'Input',
},
{
field: 'countryId',
@ -125,15 +132,15 @@ export const formSchema: FormSchema[] = [
if (v && obj) {
formModel.countryName = obj.label
}
}
},
}
}
},
},
{
field: 'countryName',
label: '国家名称',
show: false,
component: 'Input'
component: 'Input',
},
{
field: 'ediCode',
@ -159,9 +166,9 @@ export const formSchema: FormSchema[] = [
colProps: { span: 24 },
componentProps: {
autoSize: {
minRows: 3
}
}
minRows: 3,
},
},
},
{
field: 'note',
@ -170,8 +177,8 @@ export const formSchema: FormSchema[] = [
colProps: { span: 24 },
componentProps: {
autoSize: {
minRows: 3
}
}
}
minRows: 3,
},
},
},
]

@ -65,6 +65,7 @@
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
const isCopy = ref(false)
const isSave = ref(false)
const detailId = ref()
// loading
const loading = ref(false)
@ -82,6 +83,7 @@
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
isCopy.value = !!data?.isCopy
isSave.value = !!data?.isSave
if (unref(isUpdate)) {
setModalProps({ confirmLoading: true })
rowId.value = data.record.id
@ -95,7 +97,29 @@
detailId.value = res.data.id
}
} else {
if (isCopy.value) {
if (unref(isSave)) {
console.log(data.record, 1111111111111)
setModalProps({ confirmLoading: true })
// const res: API.DataResult = await ApiInfo({ id: unref(data.record.id) })
// if (res.succeeded) {
setFieldsValue({
name: data.record.templateName,
businessType: Number(data.record.opType),
feeType: data.record.feeType,
description: data.record.description,
note: data.record.note,
// ...data.record,
// id: '',
})
// // res.data.details.forEach((item) => {
// // delete item.id
// // })
feeField.value.SetData(data.record.details)
feeField.value.condition = ''
// // detailId.value = res.data.id
// // }
} else if (isCopy.value) {
setModalProps({ confirmLoading: true })
const res: API.DataResult = await ApiInfo({ id: unref(data.record.id) })
if (res.succeeded) {

@ -4,7 +4,12 @@ import { Tag } from 'ant-design-vue'
// 引入字典数据
import { getDictOption } from '/@/utils/dictUtil'
import { getOrgList, GetClientPortSelectList, GetCarrierSelectList } from '/@/api/common'
import {
getOrgList,
GetClientPortSelectList,
GetCarrierSelectList,
GetClientListByCode,
} from '/@/api/common'
import {
GetClientLanesSelectList,
GetAgentCnClientList,
@ -31,7 +36,7 @@ export const columns: BasicColumn[] = [
width: 120,
},
{
title: '结算对象',
title: '费用对象',
dataIndex: 'customerName',
width: 200,
},
@ -176,12 +181,27 @@ export const formSchema: FormSchema[] = [
{
field: 'businessType',
label: '业务类型',
component: 'Select',
required: true,
component: 'ApiSelect',
colProps: { span: 6 },
componentProps: () => {
required: true,
componentProps: ({ formModel }) => {
return {
options: businessType,
api: () => {
return new Promise((resolve) => {
getDictOption('business_type').then((res) => {
res.forEach((item) => {
item.value = Number(item.value)
})
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
@ -222,20 +242,72 @@ export const formSchema: FormSchema[] = [
// },
// },
{
field: 'customerId',
label: '结算对象',
field: 'customerName',
label: '费用对象',
defaultValue: '',
component: 'Input',
show: false,
colProps: { span: 6 },
},
{
field: 'customerName',
label: '结算对象',
component: 'Input',
field: 'customerId',
label: '费用对象',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: GetClientListByCode,
labelField: 'pinYinCode',
valueField: 'id',
showName: 'shortName',
resultField: 'data',
immediate: false,
onChange: (e, obj) => {
if (e && obj) {
formModel.customerName = obj.label
formModel.customerId = obj.value
}
if (!e && !obj) {
formModel.customerName = ''
formModel.customerId = ''
}
},
}
},
},
{
field: 'customerType',
label: '费用对象类别',
defaultValue: '',
dynamicDisabled: true,
component: 'ApiSelect',
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
getDictOption('djy_cust_prop').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
dynamicRules: ({ values }) => {
return [
{
required: values.customerId ? false : true,
message: '未选择费用对象时,此项必填!',
},
]
},
},
// {
// label: '',

@ -1,7 +1,7 @@
<template>
<div class="fee-field">
<div class="flex">
<span class="title">费用字段</span>
<span class="title">费用明细</span>
<div>
<a-button type="link" @click="OpenSetCondition">
<span class="iconfont icon-jichupeizhi"></span>
@ -61,7 +61,7 @@
//
import { feeUnitDict } from '/@/hooks/dict/index'
//
// import { getDictOption } from '/@/utils/dictUtil'
import { getDictOption } from '/@/utils/dictUtil'
import AdvancedSearch from '/@/components/Form/src/components/AdvancedSearch.vue'
import { useMessage } from '/@/hooks/web/useMessage'
import { HotTable, HotColumn } from '@handsontable/vue3'
@ -263,6 +263,20 @@
process(dict)
},
},
{
title: '客户类别',
width: 130,
data: 'customerTypeText',
type: 'dropdown',
source: async (query, process) => {
const results = await getDictOption('djy_cust_prop')
console.log(results)
const dict = results.map((item) => {
return item.value + '-' + item.name
})
process(dict)
},
},
{
title: '单位标准',
width: 130,
@ -656,17 +670,17 @@
// if (changes[0][1] === 'feeEnName') {
// }
// //
// if (changes[0][1] === 'customerTypeText') {
// getDictOption('djy_cust_prop').then((res) => {
// const item = res.filter((item) => {
// return changes[0][3].includes(item.name)
// })
// if (item) dict = item[0]
// list.value[changes[0][0]]['customerType'] = dict?.value
// list.value[changes[0][0]]['customerTypeText'] = changes[0][3].split('-')[1]
// })
// }
//
if (changes[0][1] === 'customerTypeText') {
getDictOption('djy_cust_prop').then((res) => {
const item = res.filter((item) => {
return changes[0][3].includes(item.name)
})
if (item) dict = item[0]
list.value[changes[0][0]]['customerType'] = dict?.value
list.value[changes[0][0]]['customerTypeText'] = changes[0][3].split('-')[1]
})
}
// //
// const index = changes[0][0]

@ -69,28 +69,30 @@
labelWidth: 100,
schemas: formSchema,
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 GetFeeTemplateInfo({ id: unref(rowId) })
if (res.succeeded) {
setFieldsValue({
...res.data,
})
detailId.value = res.data.id
})
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 GetFeeTemplateInfo({ id: unref(rowId) })
if (res.succeeded) {
setFieldsValue({
...res.data,
})
detailId.value = res.data.id
}
} else {
detailId.value = ''
setFieldsValue({ permissionIdentity: unref(2) })
}
} else {
detailId.value = ''
setFieldsValue({ permissionIdentity: unref(2) })
}
setModalProps({ loading: false })
})
setModalProps({ loading: false })
},
)
const getTitle = computed(() => (!unref(isUpdate) ? '新增' : '编辑'))
//
const feeField = ref()

@ -1,8 +1,26 @@
<template>
<div>
<BasicTable @register="registerTable">
<template #toolbar>
<!-- <template #toolbar>
<a-button type="primary" @click="handleCreate"> </a-button>
</template> -->
<template #tableTitle>
<span class="title">费用模版</span>
<a-button type="link" @click="handleCreate">
<span class="iconfont icon-new_document"></span>
添加
</a-button>
<a-popconfirm
title="确定保存为自动费用模板?"
ok-text="是"
cancel-text="否"
@confirm="handleSave"
>
<a-button type="link">
<span class="iconfont icon-tijiao1"></span>
保存为自动费用模板
</a-button>
</a-popconfirm>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
@ -19,19 +37,24 @@
</template>
</BasicTable>
<Modal @register="registerModal" @success="handleSuccess" />
<TenantAuditStepModal @register="AutoRegisterModal" @success="handleSuccess" />
</div>
</template>
<script lang="ts" setup>
import { onMounted } from 'vue'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { GetFeeTemplateList } from './api'
import { GetFeeTemplateList, GetFeeTemplateDetailList } from './api'
// import { ApiEdit } from '/@/views/fee/FeeCustTemplate/api'
import TenantAuditStepModal from '/@/views/fee/FeeCustTemplate/TenantAuditStepModal.vue'
import { useModal } from '/@/components/Modal'
import Modal from './components/Modal.vue'
import { columns, searchFormSchema } from './columns'
//
import { getDictOption } from '/@/utils/dictUtil'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows }] = useTable({
title: '费用模版',
// api: getSysDictTypeList,
api: async (p) => {
@ -107,7 +130,32 @@
isUpdate: false,
})
}
const [AutoRegisterModal, { openModal: AutOpenModal }] = useModal()
async function handleSave() {
const select = getSelectRows()
if (select.length !== 1) {
notification.warning({ message: '请选择一条数据', duration: 3 })
return false
} else {
const ApiData = {
pageCondition: {
pageIndex: 1,
pageSize: 1000,
sortConditions: [],
},
queryCondition: JSON.stringify([
{ FieldName: 'TemplateId', FieldValue: select[0].id, ConditionalType: 1 },
]),
}
const res = await GetFeeTemplateDetailList(ApiData)
select[0].details = res.data
AutOpenModal(true, {
record: select[0],
isUpdate: false,
isSave: true,
})
}
}
function handleEdit(record: Recordable) {
openModal(true, {
record,

@ -105,6 +105,14 @@ export function CheckBillUnLocking(parameter) {
data: parameter,
})
}
// 对账列表批量删除 (Auth)
export function BatchDelCheckBill(parameter) {
return request({
url: '/checkApi/CheckBill/BatchDelCheckBill',
method: 'post',
data: parameter,
})
}
// ---------------------------------------------------------
// 获取费用代码下拉列表 (Auth)

@ -130,7 +130,12 @@
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { GetCheckBillList, CheckBillLocking, CheckBillUnLocking } from './api.js'
import {
GetCheckBillList,
CheckBillLocking,
CheckBillUnLocking,
BatchDelCheckBill,
} from './api.js'
import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { columns, searchFormSchema, billTypeData } from './columns'
import { GetOpenPrintModuleList } from '/@/views/operation/seaexport/api/BookingLedger.js'
@ -146,86 +151,87 @@
import { useAppStore } from '/@/store/modules/app'
const appStore = useAppStore()
//
const [registerTable, { getForm, getPaginationRef, getSelectRows, getRawDataSource }] = useTable({
title: '',
api: async (p) => {
const res: API.DataResult = await GetCheckBillList(p)
calcData.value = [res.data?.dataTotal]
return new Promise((resolve) => {
if (res.data?.list) {
const ids = res.data.list.map((item) => {
return item.id
})
appStore.setIds(ids, 'khdz')
}
resolve({ data: [...res.data.list], total: res.count })
})
},
//
beforeFetch: (p) => {
return formatParams(p)
},
// beforeFetch: () => {
// var currentPageInfo: any = getPaginationRef()
// var data = getForm().getFieldsValue()
// const postParam: API.PageRequest = {
// queryCondition: '',
// pageCondition: {
// pageIndex: currentPageInfo.current,
// pageSize: currentPageInfo.pageSize,
// sortConditions: [],
// },
// }
// postParam.pageCondition.sortConditions.push({
// sortField: 'createTime',
// listSortDirection: 1,
// })
// let condition: API.ConditionItem[] = []
// if (!!data.billNo) {
// condition.push({
// FieldName: 'billNo',
// FieldValue: data.billNo,
// ConditionalType: 1,
// })
// }
// if (!!data.customerName) {
// condition.push({
// FieldName: 'customerName',
// FieldValue: data.customerName,
// ConditionalType: 1,
// })
// }
// postParam.queryCondition = JSON.stringify(condition)
// return postParam
// },
columns,
formConfig: {
labelWidth: 120,
//
schemas: searchFormSchema,
// ()
useAdvancedSearch: true,
},
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: true,
showTableSetting: true,
bordered: true,
showIndexColumn: true,
indexColumnProps: {
width: 60,
},
canResize: true,
resizeHeightOffset: 90,
immediate: true,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
})
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows, getRawDataSource }] =
useTable({
title: '',
api: async (p) => {
const res: API.DataResult = await GetCheckBillList(p)
calcData.value = [res.data?.dataTotal]
return new Promise((resolve) => {
if (res.data?.list) {
const ids = res.data.list.map((item) => {
return item.id
})
appStore.setIds(ids, 'khdz')
}
resolve({ data: [...res.data.list], total: res.count })
})
},
//
beforeFetch: (p) => {
return formatParams(p)
},
// beforeFetch: () => {
// var currentPageInfo: any = getPaginationRef()
// var data = getForm().getFieldsValue()
// const postParam: API.PageRequest = {
// queryCondition: '',
// pageCondition: {
// pageIndex: currentPageInfo.current,
// pageSize: currentPageInfo.pageSize,
// sortConditions: [],
// },
// }
// postParam.pageCondition.sortConditions.push({
// sortField: 'createTime',
// listSortDirection: 1,
// })
// let condition: API.ConditionItem[] = []
// if (!!data.billNo) {
// condition.push({
// FieldName: 'billNo',
// FieldValue: data.billNo,
// ConditionalType: 1,
// })
// }
// if (!!data.customerName) {
// condition.push({
// FieldName: 'customerName',
// FieldValue: data.customerName,
// ConditionalType: 1,
// })
// }
// postParam.queryCondition = JSON.stringify(condition)
// return postParam
// },
columns,
formConfig: {
labelWidth: 120,
//
schemas: searchFormSchema,
// ()
useAdvancedSearch: true,
},
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: true,
showTableSetting: true,
bordered: true,
showIndexColumn: true,
indexColumnProps: {
width: 60,
},
canResize: true,
resizeHeightOffset: 90,
immediate: true,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
})
//
function FnCopy(data) {
const el = document.createElement('input')
@ -246,7 +252,25 @@
}
//
function FnDel() {
notification.warning({ message: '待开发', duration: 3 })
const select = getSelectRows()
let ApiData: any = {
ids: [],
}
if (select.length === 0) {
notification.warning({ message: '请至少选择一条数据', duration: 3 })
return false
} else {
ApiData.ids = select.map((item) => {
return item.id
})
}
BatchDelCheckBill(ApiData).then((res) => {
notification.success({ message: res.message, duration: 3 })
reload()
})
// notification.warning({ message: '', duration: 3 })
}
//
function Lock() {

Loading…
Cancel
Save