lijingjia 5 months ago
commit 08e1aace10

@ -0,0 +1,7 @@
import { intersection } from 'lodash-es'
import { usePermissionStore } from '/@/store/modules/permission'
export function checkPermissions(key) {
const permissionStore = usePermissionStore()
const allCodeList = permissionStore.getPermCodeList as string[]
return !((intersection([key], allCodeList) as string[]).length > 0)
}

@ -4,11 +4,13 @@ export const columns: BasicColumn[] = [
{ {
title: '商品类型代码', title: '商品类型代码',
dataIndex: 'goodsTypeCode', dataIndex: 'goodsTypeCode',
sorter: true,
width: 150, width: 150,
}, },
{ {
title: '商品类型名称', title: '商品类型名称',
dataIndex: 'goodsTypeName', dataIndex: 'goodsTypeName',
sorter: true,
width: 200, width: 200,
}, },
// { // {
@ -19,12 +21,14 @@ export const columns: BasicColumn[] = [
{ {
title: '描述', title: '描述',
dataIndex: 'description', dataIndex: 'description',
sorter: true,
width: 200, width: 200,
}, },
{ {
title: '是否启用', title: '是否启用',
dataIndex: 'status', dataIndex: 'status',
width: 80, sorter: true,
width: 100,
customRender: ({ text }) => { customRender: ({ text }) => {
if (text === 0) { if (text === 0) {
return <Tag color="success"></Tag> return <Tag color="success"></Tag>
@ -37,11 +41,13 @@ export const columns: BasicColumn[] = [
{ {
title: '备注', title: '备注',
dataIndex: 'note', dataIndex: 'note',
sorter: true,
width: 150, width: 150,
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'createTime', dataIndex: 'createTime',
sorter: true,
width: 200, width: 200,
}, },
] ]

@ -2,8 +2,20 @@
<div> <div>
<BasicTable @register="registerTable"> <BasicTable @register="registerTable">
<template #toolbar> <template #toolbar>
<a-button type="primary" @click="handleCreate"> </a-button> <a-button
<a-button type="primary" @click="importFlow"> </a-button> type="primary"
@click="handleCreate"
:disabled="checkPermissions('op:seaexport:add')"
>
添加商品类型
</a-button>
<a-button
type="primary"
@click="importFlow"
:disabled="checkPermissions('op:seaexport:import')"
>
导入商品类型
</a-button>
</template> </template>
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'"> <template v-if="column.key === 'action'">
@ -13,6 +25,7 @@
icon: 'clarity:note-edit-line', icon: 'clarity:note-edit-line',
tooltip: '编辑', tooltip: '编辑',
onClick: handleAudit.bind(null, record), onClick: handleAudit.bind(null, record),
auth: 'op:goodstype:edit',
}, },
// { // {
// icon: 'ant-design:delete-outlined', // icon: 'ant-design:delete-outlined',
@ -45,6 +58,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { defineComponent, onMounted, ref } from 'vue' import { defineComponent, onMounted, ref } from 'vue'
import { checkPermissions } from '/@/hooks/Permissions/index'
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table' import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table'
import ImportFlow from './importFlow.vue' import ImportFlow from './importFlow.vue'
import { getCodeGoodsTypeList, importCodeGoodsType } from './api' import { getCodeGoodsTypeList, importCodeGoodsType } from './api'
@ -53,7 +67,7 @@
import { columns, searchFormSchema } from './columns' import { columns, searchFormSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage() const { notification } = useMessage()
let filterInfo: Partial<Recordable<string[]>> = [] // let filterInfo: Partial<Recordable<string[]>> = []
let sortInfo: SorterResult = {} let sortInfo: SorterResult = {}
const visible = ref<boolean>(false) const visible = ref<boolean>(false)
const refImportFlow = ref() const refImportFlow = ref()
@ -78,17 +92,17 @@
}, },
} }
/* 排序字段 */ /* 排序字段 */
// if (!!sortInfo.columnKey) { if (!!sortInfo.columnKey) {
// postParam.pageCondition.sortConditions.push({ postParam.pageCondition.sortConditions.push({
// sortField: sortInfo.field, sortField: sortInfo.field,
// listSortDirection: sortInfo.order === 'ascend' ? 0 : 1, listSortDirection: sortInfo.order === 'ascend' ? 0 : 1,
// }) })
// } else { } else {
// postParam.pageCondition.sortConditions.push({ postParam.pageCondition.sortConditions.push({
// sortField: 'auditTime', sortField: 'goodsTypeCode',
// listSortDirection: 0, listSortDirection: 0,
// }) })
// } }
let condition: API.ConditionItem[] = [] let condition: API.ConditionItem[] = []
if (!!data.GoodsTypeName) { if (!!data.GoodsTypeName) {
condition.push({ condition.push({
@ -119,13 +133,12 @@
schemas: searchFormSchema, schemas: searchFormSchema,
}, },
sortFn: (sorter) => { sortFn: (sorter) => {
// console.log(':' + sorter);
sortInfo = sorter sortInfo = sorter
}, },
filterFn: (filters) => { // filterFn: (filters) => {
// console.log(':' + filters); // // console.log(':' + filters);
filterInfo = filters // filterInfo = filters
}, // },
pagination: true, pagination: true,
bordered: true, bordered: true,
useSearchForm: true, useSearchForm: true,

@ -14,17 +14,25 @@
<div class="TableBox"> <div class="TableBox">
<div class="BoxUnit"> <div class="BoxUnit">
<div class="model-botton-box"> <div class="model-botton-box">
<a-button class="btn" type="primary" @click="AddLlist"></a-button> <a-upload
<a-button class="btn btn-delete" @click="DelLlist"></a-button> :file-list="fileList"
:before-upload="beforeUpload"
name="file"
:custom-request="uploadFile"
>
<a-button class="btn" type="primary">导入对账excel</a-button>
</a-upload>
<!-- <a-button class="btn" type="primary" @click="Addlist"></a-button> -->
<!-- <a-button class="btn btn-delete" @click="Dellist"></a-button> -->
</div> </div>
<div style="position: relative"> <div style="position: relative">
<input <input
class="ds-tb-check" class="ds-tb-check"
type="checkbox" type="checkbox"
v-model="allCheckL" v-model="allCheck"
:indeterminate="someCheckL" :indeterminate="someCheck"
/> />
<hot-table :data="Llist" :settings="Lsettings"> </hot-table> <hot-table ref="hotTb" :data="list" :settings="Lsettings"> </hot-table>
</div> </div>
</div> </div>
</div> </div>
@ -58,7 +66,8 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, computed, unref, watchEffect, watch } from 'vue' import { ref, computed, unref, watchEffect, watch } from 'vue'
import { ApiEdit, ApiInfo } from './api' import { ApiEdit, ApiInfo, ApiBasicsList, ApiImport } from './api'
import { GetClientListByCode } from '/@/api/common'
import { BasicForm, useForm } from '/@/components/Form/index' import { BasicForm, useForm } from '/@/components/Form/index'
import { formSchema } from './columns' import { formSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
@ -68,6 +77,8 @@
import { registerAllModules } from 'handsontable/registry' import { registerAllModules } from 'handsontable/registry'
import 'handsontable/dist/handsontable.full.min.css' import 'handsontable/dist/handsontable.full.min.css'
registerAllModules() registerAllModules()
import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore()
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
const getTitle = computed(() => (!unref(isUpdate) ? '新增对账模板' : '编辑对账模板')) const getTitle = computed(() => (!unref(isUpdate) ? '新增对账模板' : '编辑对账模板'))
const emit = defineEmits(['success']) const emit = defineEmits(['success'])
@ -76,8 +87,8 @@
const rowId = ref('') const rowId = ref('')
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields() resetFields()
allCheckL.value = false allCheck.value = false
someCheckL.value = false someCheck.value = false
setModalProps({ confirmLoading: false, loading: true }) setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) { if (unref(isUpdate)) {
@ -88,7 +99,24 @@
setFieldsValue({ setFieldsValue({
...res.data, ...res.data,
}) })
Llist.value.push(...res.data) let ApiData = {
queryCondition: JSON.stringify({
FieldName: 'checkId',
FieldValue: rowId.value,
ConditionalType: 1,
}),
pageCondition: {
pageIndex: 1,
pageSize: 9999,
sortConditions: [],
},
}
const e: API.DataResult = await ApiBasicsList(ApiData)
if (e.succeeded) {
list.value.push(...e.data)
} else {
setModalProps({ confirmLoading: false })
}
} }
setModalProps({ confirmLoading: false }) setModalProps({ confirmLoading: false })
} else { } else {
@ -102,15 +130,15 @@
setFieldsValue({ setFieldsValue({
...res.data, ...res.data,
}) })
Llist.value.splice(0) list.value.splice(0)
Llist.value.push(...res.data) list.value.push(...res.data)
} }
} }
// //
async function handleSave(exit) { async function handleSave(exit) {
try { try {
const values = await validate() const values = await validate()
values.feeList = Llist.value values.feeList = list.value
setModalProps({ confirmLoading: true, loading: true }) setModalProps({ confirmLoading: true, loading: true })
const res: API.DataResult = await ApiEdit(values) const res: API.DataResult = await ApiEdit(values)
console.log(res) console.log(res)
@ -138,7 +166,7 @@
} }
} }
function FnClose() { function FnClose() {
Llist.value.splice(0) list.value.splice(0)
closeModal() closeModal()
} }
async function refresh() { async function refresh() {
@ -157,25 +185,25 @@
}) })
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// //
const allCheckL = ref(false) const allCheck = ref(false)
// //
const someCheckL = ref(false) const someCheck = ref(false)
const Llist = ref<any>([]) const list = ref<any>([])
watchEffect(() => { watchEffect(() => {
// //
if (allCheckL.value) { if (allCheck.value) {
Llist.value.forEach((item) => { list.value.forEach((item) => {
item.selected = true item.selected = true
}) })
} else { } else {
// //
Llist.value.forEach((item) => { list.value.forEach((item) => {
item.selected = false item.selected = false
}) })
} }
}) })
watch( watch(
Llist.value, list.value,
(val) => { (val) => {
let a = 0 let a = 0
let b = 0 let b = 0
@ -187,23 +215,37 @@
} }
}) })
if (a == 0) { if (a == 0) {
allCheckL.value = false allCheck.value = false
} }
if (b == 0) { if (b == 0) {
allCheckL.value = true allCheck.value = true
} }
if (a != 0 && b != 0) { if (a != 0 && b != 0) {
someCheckL.value = true someCheck.value = true
} else { } else {
someCheckL.value = false someCheck.value = false
} }
}, },
{ {
deep: true, deep: true,
}, },
) )
const hotTb = ref()
const LColumns = [ //
const companyDict = ref([])
//
const vesselDict = ref([])
const isEqualData = ref([
{
name: '是',
value: true,
},
{
name: '否',
value: false,
},
])
const Columns = [
{ {
data: 'selected', data: 'selected',
type: 'checkbox', type: 'checkbox',
@ -218,84 +260,158 @@
data: 'id', data: 'id',
}, },
{ {
title: '模板Id', title: '对账Id',
width: 120,
data: 'checkId',
},
{
title: '结算单位Id',
width: 120, width: 120,
data: 'templateId', data: 'customerId',
},
{
title: '船名Id',
width: 120,
data: 'vesselId',
},
{
title: '操作员Id',
width: 120,
data: 'operatorId',
},
{
title: '揽货人Id',
width: 120,
data: 'saleId',
}, },
{ {
title: '主提单号', title: '主提单号',
width: 120, width: 120,
data: 'feeName', data: 'mblno',
}, },
{ {
title: '本地RMB金额', title: '本地RMB金额',
width: 120, width: 120,
data: 'currency', type: 'numeric',
data: 'rmbLocalAmount',
}, },
{ {
title: '本地USD金额', title: '本地USD金额',
width: 120, width: 120,
data: 'currency', type: 'numeric',
data: 'usdLocalAmount',
}, },
{ {
title: '对账RMB金额', title: '对账RMB金额',
width: 120, width: 120,
data: 'currency', type: 'numeric',
data: 'rmbCheckAmount',
}, },
{ {
title: '对账USD金额', title: '对账USD金额',
width: 120, width: 120,
data: 'currency', type: 'numeric',
data: 'usdCheckAmount',
}, },
{ {
title: 'RMB差异', title: 'RMB差异金额',
width: 120, width: 120,
data: 'currency', type: 'numeric',
data: 'rmbDifferenceAmount',
}, },
{ {
title: '委托单位', title: 'USD差异金额',
width: 120, width: 120,
data: 'currency', type: 'numeric',
data: 'usdDifferenceAmount',
}, },
{ {
title: '结算USD', title: '结算单位',
width: 120, width: 130,
data: 'currency', data: 'customerName',
type: 'dropdown',
source: async (query, process) => {
const rowIndex = hotTb.value.hotInstance.getActiveEditor().row
const code = list.value[rowIndex]?.customerType || null
GetClientListByCode({ code }).then((res) => {
const { data } = res
data.forEach((item) => {
item['label'] = item.shortName
item['value'] = item.codeName
})
companyDict.value = data
const dict = data.map((item) => {
return item.codeName + '-' + item.shortName
})
process(dict)
})
},
}, },
{ {
title: '船名', title: '开船日期',
width: 120, width: 120,
data: 'currency', data: 'etd',
type: 'date',
dateFormat: 'YYYY-MM-DD',
}, },
{ {
title: '航次', title: '船名',
width: 120, width: 120,
data: 'currency', data: 'vessel',
type: 'dropdown',
source: async (query, process) => {
let data = optionsStore.getOptionsByCode('GetVesselSelectList')
vesselDict.value = data
const dict = data.map((item) => {
return item.vesselName
})
process(dict)
},
}, },
{ {
title: '开船日期', title: '海关航次',
width: 120, width: 120,
data: 'currency', data: 'voyno',
}, },
{ {
title: '操作员', title: '操作员',
width: 120, width: 120,
data: 'currency', data: 'operatorName',
type: 'dropdown',
source: async (query, process) => {
let data = optionsStore.getOptionsByCode('GetCustomerServiceList')
vesselDict.value = data
const dict = data.map((item) => {
return item.userName
})
process(dict)
},
}, },
{ {
title: '揽货人', title: '揽货人',
width: 120, width: 120,
data: 'currency', data: 'saleName',
}, type: 'dropdown',
{ source: async (query, process) => {
title: '说明', let data = optionsStore.getOptionsByCode('GetSaleList')
width: 120, vesselDict.value = data
data: 'currency', const dict = data.map((item) => {
return item.userName
})
process(dict)
},
}, },
{ {
title: '一致', title: '是否一致',
width: 120, width: 80,
data: 'currency', data: 'isEqual',
type: 'dropdown',
source: async (query, process) => {
const dict = isEqualData.value.map((res) => {
return res.name
})
process(dict)
},
}, },
] ]
const Lsettings = { const Lsettings = {
@ -308,7 +424,7 @@
fixedColumnsLeft: 1, fixedColumnsLeft: 1,
// //
hiddenColumns: { hiddenColumns: {
columns: [1, 2], columns: [1, 2, 3, 4, 5, 6],
indicators: true, indicators: true,
}, },
columnSorting: true, columnSorting: true,
@ -323,29 +439,88 @@
// hotTb.value.hotInstance.setDataAtRowProp(row, prop, '') // hotTb.value.hotInstance.setDataAtRowProp(row, prop, '')
// } // }
// }, // },
columns: LColumns, columns: Columns,
// () // ()
licenseKey: 'non-commercial-and-evaluation', licenseKey: 'non-commercial-and-evaluation',
enterMoves: 'row', enterMoves: 'row',
// //
afterChange(changes, source) {}, afterChange(changes, source) {
if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') {
let dict = {}
changes.forEach((res) => {
//
if (res[1] === 'customerName') {
const item: any = companyDict.value.filter((item: any) => {
return changes[0][3].includes(item.codeName + '-' + item.shortName)
})
if (item) dict = item[0]
list.value[res[0]]['customerId'] = dict['id']
}
//
if (res[1] === 'vessel') {
const item: any = vesselDict.value.filter((item: any) => {
return changes[0][3].includes(item.vesselName)
})
if (item) dict = item[0]
list.value[res[0]]['vesselId'] = dict['id']
}
//
if (res[1] === 'operatorName') {
const item: any = vesselDict.value.filter((item: any) => {
return changes[0][3].includes(item.userName)
})
if (item) dict = item[0]
list.value[res[0]]['operatorId'] = dict['id']
}
//
if (res[1] === 'saleName') {
const item: any = vesselDict.value.filter((item: any) => {
return changes[0][3].includes(item.userName)
})
if (item) dict = item[0]
list.value[res[0]]['saleId'] = dict['id']
}
})
}
},
}
// EXCEL
const fileList = ref([])
function beforeUpload(file) {
console.log(file)
}
function uploadFile(file) {
const formData = new FormData()
let Did: any = rowId.value
formData.append('id', Did)
formData.append('file', file.file)
ApiImport({
data: formData,
// parameter: { LinkId: Did, TypeCode: 'other', TypeName: '' },
}).then((res) => {
if (res.succeeded) {
list.value.push(...res.data)
} else {
notification.error({ message: res.message, duration: 3 })
}
})
} }
function AddLlist() { function Addlist() {
Llist.value.push({}) list.value.push({})
} }
async function DelLlist() { async function Dellist() {
const data = await validate() const data = await validate()
if (data.id) { if (data.id) {
let ApiData: any = { id: data.id, ids: [] } let ApiData: any = { id: data.id, ids: [] }
Llist.value.forEach((e, i) => { list.value.forEach((e, i) => {
if (e.selected && e.id) { if (e.selected && e.id) {
ApiData.ids.push(e.id) ApiData.ids.push(e.id)
} }
}) })
} else { } else {
Llist.value.forEach((e, i) => { list.value.forEach((e, i) => {
if (e.selected) { if (e.selected) {
Llist.value.splice(i, 1) list.value.splice(i, 1)
} }
}) })
} }

@ -2,13 +2,12 @@
import { request } from '/@/utils/request' import { request } from '/@/utils/request'
import { DataResult, PageRequest } from '/@/api/model/baseModel' import { DataResult, PageRequest } from '/@/api/model/baseModel'
enum Api { enum Api {
list = '/mainApi/CodeCtn/GetCodeCtnList', list = '/checkApi/CheckBillAuto/GetCheckBillAutoList',
edit = '/mainApi/CodeCtn/EditCodeCtn', edit = '/checkApi/CheckBillAuto/EditCheckBillAutoInfo',
info = '/mainApi/CodeCtn/GetCodeCtnInfo', info = '/checkApi/CheckBillAuto/GetCheckBillAutoInfo',
BasicsList = '/mainApi/CodeCtn/GetBasicsCodeCtnList', BasicsList = '/checkApi/CheckBillAuto/GetCheckBillAutoDetailList',
ExistList = '/mainApi/CodeCtn/GetExistCodeCtnList', Import = '/checkApi/CheckBillAuto/ImportExcel',
Import = '/mainApi/CodeCtn/ImportCodeCtn',
} }
// 列表 (Auth) // 列表 (Auth)
export function ApiList(data: PageRequest) { export function ApiList(data: PageRequest) {
@ -35,7 +34,7 @@ export function ApiInfo(query) {
}) })
} }
// 获取商品类型列表-基础库 (Auth) // 自动对账明细列表 (Auth)
export function ApiBasicsList(data: PageRequest) { export function ApiBasicsList(data: PageRequest) {
return request<DataResult>({ return request<DataResult>({
url: Api.BasicsList, url: Api.BasicsList,
@ -43,18 +42,11 @@ export function ApiBasicsList(data: PageRequest) {
data, data,
}) })
} }
// 获取当前租户已有的商品类型 (Auth) // 导入对账excel (Auth)
export function ApiExistList() { export function ApiImport(data) {
return request<DataResult>({
url: Api.ExistList,
method: 'get',
})
}
// 导入商品类型列表-基础库 (Auth)
export function ApiImport(data: PageRequest) {
return request<DataResult>({ return request<DataResult>({
url: Api.Import, url: Api.Import,
method: 'post', method: 'post',
data, data:data.data,
}) })
} }

@ -1,109 +1,322 @@
import { BasicColumn, FormSchema } from '/@/components/Table' import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue' import { getOptions } from '/@/hooks/dict'
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '对账编号', title: '自动对账编号',
dataIndex: 'ctnSize0', dataIndex: 'autoBillNo',
width: 150, width: 150,
}, },
{ {
title: '对账客户', title: '对账单名称',
dataIndex: 'ctnSize1', dataIndex: 'billName',
width: 150, width: 150,
}, },
{ {
title: '对账名称', title: '对账日期',
dataIndex: 'ctnSize2', dataIndex: 'checkDate',
width: 150,
},
// {
// title: '业务类型',
// dataIndex: 'businessType',
// width: 150,
// },
// {
// title: '对账方式',
// dataIndex: 'checkType',
// width: 150,
// },
{
title: '起始时间',
dataIndex: 'startTime',
width: 150, width: 150,
}, },
{ {
title: '对账人', title: '结束时间',
dataIndex: 'ctnSize3', dataIndex: 'endTime',
width: 150, width: 150,
}, },
// {
// title: '收付类型',
// dataIndex: 'billType',
// width: 150,
// },
{ {
title: '对账日期', title: '对账客户',
dataIndex: 'ctnSize4', dataIndex: 'customerName',
width: 150, width: 150,
}, },
{ {
title: '对账编号', title: '费用范围',
dataIndex: 'ctnSize5', dataIndex: 'feeScope',
width: 150, width: 150,
}, },
{ {
title: '结算人', title: '结算人',
dataIndex: 'ctnSize5', dataIndex: 'settlerName',
width: 150, width: 150,
}, },
{ {
title: '结算日期', title: '结算日期',
dataIndex: 'ctnSize5', dataIndex: 'settlementTime',
width: 150,
},
{
title: '账单编号',
dataIndex: 'billNo',
width: 150,
},
{
title: '对账人',
dataIndex: 'checkUserName',
width: 150,
},
{
title: '备注',
dataIndex: 'note',
width: 150, width: 150,
}, },
] ]
export const searchFormSchema: FormSchema[] = [ export const searchFormSchema: FormSchema[] = [
{ {
field: 'ctnSize0', field: 'autoBillNo',
label: '对账记录号', label: '自动对账编号',
component: 'Input', component: 'Input',
colProps: { span: 4 }, colProps: { span: 4 },
}, },
] ]
let businessTypeData = [
{ label: '全部', value: '0' },
{ label: '海运出口', value: '1' },
]
let checkTypeData = [
{ label: 'Excel导入', value: '1' },
{ label: '区间统计', value: '2' },
]
let billTypeData = [
{ label: '全部', value: '0' },
{ label: '应收', value: '1' },
{ label: '应付', value: '2' },
]
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
{ {
field: 'ctnSize0', label: '',
label: '对账编号', field: 'id',
component: 'Input', component: 'Input',
colProps: { span: 5 }, defaultValue: '',
show: false,
}, },
{ {
field: 'ctnSize0', field: 'autoBillNo',
label: '对账名称', label: '自动对账编号',
component: 'Input', component: 'Input',
dynamicDisabled: true,
colProps: { span: 5 }, colProps: { span: 5 },
}, },
{ {
field: 'ctnSize0', field: 'billName',
label: '队长客户', label: '对账单名称',
component: 'Input', component: 'Input',
colProps: { span: 5 }, colProps: { span: 5 },
}, },
{ {
field: 'ctnSize0', field: 'checkDate',
label: '对账日期', label: '对账日期',
component: 'Input', component: 'DatePicker',
required: false,
dynamicDisabled: false,
colProps: { span: 5 }, colProps: { span: 5 },
componentProps: {
showTime: true,
allowClear: true,
},
}, },
{ {
field: 'ctnSize0', field: 'businessType',
label: '对账人', label: '业务类型',
component: 'Select',
required: false,
dynamicDisabled: false,
colProps: { span: 5 },
componentProps: {
options: businessTypeData,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
},
},
{
field: 'checkType',
label: '对账方式',
component: 'Select',
required: false,
dynamicDisabled: false,
colProps: { span: 5 },
componentProps: {
options: checkTypeData,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
},
},
{
field: 'startTime',
label: '起始时间',
component: 'DatePicker',
required: false,
dynamicDisabled: false,
colProps: { span: 5 },
componentProps: {
showTime: true,
allowClear: true,
},
},
{
field: 'endTime',
label: '结束时间',
component: 'DatePicker',
required: false,
dynamicDisabled: false,
colProps: { span: 5 },
componentProps: {
showTime: true,
allowClear: true,
},
},
{
field: 'billType',
label: '收付类型',
component: 'Select',
required: false,
dynamicDisabled: false,
colProps: { span: 5 },
componentProps: {
options: billTypeData,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
},
},
{
label: '对账客户Nmae',
field: 'customerName',
component: 'Input', component: 'Input',
colProps: { span: 4 }, show: false,
}, },
{ {
field: 'ctnSize0', label: '对账客户',
field: 'customerId',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
const arr = getOptions('controller')
resolve(arr)
})
},
labelField: 'name',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
formModel.customerName = obj.label
} else {
formModel.customerName = ''
}
},
}
},
},
{
field: 'feeScope',
label: '费用范围', label: '费用范围',
component: 'InputNumber',
colProps: { span: 5 },
},
{
label: '结算人名称',
field: 'settlerName',
component: 'Input', component: 'Input',
show: false,
},
{
label: '结算人',
field: 'settlerId',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 5 },
componentProps: ({ formModel }) => {
return {
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
const arr = getOptions('controller')
resolve(arr)
})
},
labelField: 'name',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
formModel.settlerName = obj.label
} else {
formModel.settlerName = ''
}
},
}
},
},
{
field: 'settlementTime',
label: '结算日期',
component: 'DatePicker',
required: false,
dynamicDisabled: false,
colProps: { span: 5 }, colProps: { span: 5 },
componentProps: {
showTime: true,
allowClear: true,
},
}, },
{ {
field: 'ctnSize0', field: 'billNo',
label: '结算账单编号', label: '账单编号',
component: 'Input', component: 'Input',
colProps: { span: 5 }, colProps: { span: 5 },
}, },
{ {
field: 'ctnSize0', field: 'checkUserName',
label: '结算日期', label: '对账人',
component: 'Input', component: 'Input',
colProps: { span: 5 }, colProps: { span: 5 },
}, },
{ {
field: 'ctnSize0', field: 'note',
label: '结算人', label: '备注',
component: 'Input', component: 'Input',
colProps: { span: 5 }, colProps: { span: 5 },
}, },

@ -39,7 +39,12 @@
import { columns, searchFormSchema } from './columns' import { columns, searchFormSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage() const { notification } = useMessage()
import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore()
const [registerModal, { openModal }] = useModal() const [registerModal, { openModal }] = useModal()
optionsStore.getOptionsByCode('GetVesselSelectList')
optionsStore.getOptionsByCode('GetCustomerServiceList')
optionsStore.getOptionsByCode('GetSaleList')
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({ const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
api: async (p) => { api: async (p) => {
const res: API.DataResult = await ApiList(p) const res: API.DataResult = await ApiList(p)
@ -59,10 +64,10 @@
}, },
} }
let condition: API.ConditionItem[] = [] let condition: API.ConditionItem[] = []
if (!!data.ctnSize0) { if (!!data.autoBillNo) {
condition.push({ condition.push({
FieldName: 'ctnSize0', FieldName: 'autoBillNo',
FieldValue: data.ctnSize0, FieldValue: data.autoBillNo,
ConditionalType: 1, ConditionalType: 1,
}) })
} }

Loading…
Cancel
Save