箱管下线审批调整 客户对账调整

dev
张同海 2 weeks ago
parent 715aaa20ae
commit 138061798e

@ -1,7 +1,7 @@
<template>
<div class="OfflineAudit">
<div class="p20">
<BasicTable class="ds-table" @register="registerTableTop">
<BasicTable class="ds-table" @register="registerTableTop" @rowChange="asd">
<template #tableTitle>
<TableButton :show="{ add: false, del: false }">
<a-popconfirm
@ -77,10 +77,7 @@
//
import { formatParams } from '/@/hooks/web/common'
const TopSelectLast = ref('')
const [
registerTableTop,
{ reload, getDataSource, clearSelectedRowKeys, setSelectedRowKeys, getVxeSelectRows },
] = useTable({
const [registerTableTop, { reload, getDataSource, clearSelectedRowKeys }] = useTable({
title: '',
api: async (p) => {
clearSelectedRowKeys()
@ -107,11 +104,6 @@
rowKey: 'id',
rowSelection: {
type: 'radio',
// type: 'checkbox',
onChange: (e, a) => {
TopSelectLast.value = JSON.stringify(a[a.length - 1])
reloadBotton()
},
},
formConfig: {
labelWidth: 120,
@ -130,6 +122,11 @@
id: '0',
autoHeight: window.innerHeight - 680.5,
})
function asd(e) {
console.log(e.data, 1111111)
TopSelectLast.value = JSON.stringify(e.data)
reloadBotton()
}
const [registerTableBotton, { reload: reloadBotton, getVxeSelectRows: getSelectRowsBotton }] =
useTable({
title: '',
@ -200,10 +197,10 @@
}
}
async function FnExamine(type, state, ApiData) {
if (state == 'confirm' && type) {
clearSelectedRowKeys()
setSelectedRowKeys([JSON.parse(TopSelectLast.value)?.id])
}
// if (state == 'confirm' && type) {
// clearSelectedRowKeys()
// setSelectedRowKeys([JSON.parse(TopSelectLast.value)?.id])
// }
let res: any = state == 'confirm' ? await ApiConfirm(ApiData) : await ApiCancel(ApiData)
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })

@ -140,3 +140,11 @@ export function GetAllClientList(parameter) {
params: parameter,
})
}
// 客户对账模板下拉列表 (Auth)
export function GetCheckBillTemplateList(parameter) {
return request({
url: '/checkApi/CheckBill/GetCheckBillTemplateList',
method: 'get',
params: parameter,
})
}

@ -5,18 +5,34 @@ export const billTypeData = [
{ value: 2, label: '应付' },
]
export const searchFormSchema: FormSchema[] = [
{ field: 'billNo', label: '对账编号', component: 'Input', colProps: { span: 4 } },
{ field: 'customerName', label: '对账客户', component: 'Input', colProps: { span: 4 } },
{ field: 'billName', label: '对账单名称', component: 'Input', colProps: { span: 4 } },
{
field: 'billType',
label: '收付类型',
component: 'Select',
field: 'mblno:orderNo:customerNo:hblno:billNo:serviceContractNo',
label: '编号',
component: 'Input',
placeHolder: '可输入主提单号、订舱编号、委托编号等编号',
colProps: { span: 4 },
componentProps: {
options: billTypeData,
},
{
field: 'etd',
label: '开船日期',
component: 'DatePicker',
colProps: { span: 4 },
},
{ field: 'vessel', label: '船名', component: 'Input', colProps: { span: 4 } },
{ field: 'voyno', label: '航次', component: 'Input', colProps: { span: 4 } },
// { field: 'billNo', label: '对账编号', component: 'Input', colProps: { span: 4 } },
// { field: 'customerName', label: '对账客户', component: 'Input', colProps: { span: 4 } },
// { field: 'billName', label: '对账单名称', component: 'Input', colProps: { span: 4 } },
// {
// field: 'billType',
// label: '收付类型',
// component: 'Select',
// colProps: { span: 4 },
// componentProps: {
// options: billTypeData,
// },
// },
// {
// field: 'rmbdr',
@ -122,7 +138,7 @@ export const searchFormSchema: FormSchema[] = [
// }
// },
// },
{ field: 'isNoTax', label: '是否不含税', component: 'Switch', colProps: { span: 4 } },
// { field: 'isNoTax', label: '是否不含税', component: 'Switch', colProps: { span: 4 } },
]
//列表
@ -151,21 +167,21 @@ export const columns: BasicColumn[] = [
align: 'left',
width: 100,
},
{
title: '是否不含税',
dataIndex: 'isNoTax',
align: 'left',
width: 100,
// customRender: ({ text }) => {
// let RData = '-'
// if (text == 'true') {
// RData = '是'
// } else {
// RData = '否'
// }
// return RData
// {
// title: '是否不含税',
// dataIndex: 'isNoTax',
// align: 'left',
// width: 100,
// // customRender: ({ text }) => {
// // let RData = '-'
// // if (text == 'true') {
// // RData = '是'
// // } else {
// // RData = '否'
// // }
// // return RData
// // },
// },
},
{ title: '应收RMB', dataIndex: 'rmbdr', align: 'right', width: 100 },
{ title: '未收RMB', dataIndex: 'balrmbdr', align: 'right', width: 100 },
{ title: '应收USD', dataIndex: 'usddr', align: 'right', width: 100 },

@ -1,5 +1,14 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import { GetClientListByCode } from '/@/api/common'
import { GetCheckBillTemplateList } from '../api'
export let CheckBillTemplateList: any = []
const res: API.DataResult = await GetCheckBillTemplateList()
if (res.succeeded) {
CheckBillTemplateList = []
res.data.forEach((e) => {
CheckBillTemplateList.push({ label: e.name, value: e.id })
})
}
export const billTypeData = [
{ value: 0, label: '全部' },
{ value: 1, label: '应收' },
@ -83,6 +92,21 @@ export const schemas: FormSchema[] = [
}
},
},
{
label: '对账模板',
field: 'checkBillTemplateId',
component: 'Select',
colProps: { span: 4 },
componentProps: () => {
return {
options: CheckBillTemplateList,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
{ field: 'note', component: 'Input', label: '备注', colProps: { span: 8 } },
// {
// label: '对账客户',
// field: 'customerName',
@ -116,19 +140,19 @@ export const schemas: FormSchema[] = [
// // },
// },
{
field: 'isNoTax',
component: 'Switch',
label: '是否不含税',
defaultValue: false,
colProps: { span: 2 },
componentProps: {
checkedChildren: '是',
checkedValue: true,
unCheckedChildren: '否',
unCheckedValue: false,
},
},
// {
// field: 'isNoTax',
// component: 'Switch',
// label: '是否不含税',
// defaultValue: false,
// colProps: { span: 2 },
// componentProps: {
// checkedChildren: '是',
// checkedValue: true,
// unCheckedChildren: '否',
// unCheckedValue: false,
// },
// },
// isLocking
// { field: 'billName', component: 'Input', label: '对账单名称', colProps: { span: 4 } },
// { field: 'field2', component: 'Input', label: '账单说明', colProps: { span: 4 } },
@ -138,7 +162,6 @@ export const schemas: FormSchema[] = [
// { field: 'field6', component: 'Input', label: '打印模板', colProps: { span: 4 } },
// { field: 'field7', component: 'Input', label: '账单类别', colProps: { span: 4 } },
// { field: 'field8', component: 'Input', label: '费用范围', colProps: { span: 4 } },
// { field: 'field9', component: 'Input', label: '备注', colProps: { span: 12 } },
]
// 表单
export const Editschemas: FormSchema[] = [
@ -236,6 +259,38 @@ export const Editschemas: FormSchema[] = [
}
},
},
{
label: '对账模板',
field: 'checkBillTemplateId',
component: 'DEdit',
colProps: { span: 4 },
componentProps: (a) => {
return {
options: CheckBillTemplateList,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onEdit: () => {
const { formActionType } = a
formActionType ? formActionType.linkageForm(a) : null
},
}
},
},
{
field: 'note',
component: 'DEdit',
label: '备注',
colProps: { span: 8 },
componentProps: (a) => {
return {
onEdit: () => {
const { formActionType } = a
formActionType ? formActionType.linkageForm(a) : null
},
}
},
},
// {
// label: '对账客户',
// field: 'customerName',
@ -265,25 +320,25 @@ export const Editschemas: FormSchema[] = [
// }
// },
// },
{
field: 'isNoTax',
component: 'DEdit',
label: '是否不含税',
defaultValue: false,
colProps: { span: 2 },
componentProps: (e) => {
return {
checkedChildren: '是',
checkedValue: true,
unCheckedChildren: '否',
unCheckedValue: false,
onEdit: () => {
const { formActionType } = e
formActionType ? formActionType.linkageForm(e) : null
},
}
},
},
// {
// field: 'isNoTax',
// component: 'DEdit',
// label: '是否不含税',
// defaultValue: false,
// colProps: { span: 2 },
// componentProps: (e) => {
// return {
// checkedChildren: '是',
// checkedValue: true,
// unCheckedChildren: '否',
// unCheckedValue: false,
// onEdit: () => {
// const { formActionType } = e
// formActionType ? formActionType.linkageForm(e) : null
// },
// }
// },
// },
]
//左侧列表
@ -308,7 +363,7 @@ export const columnsL: BasicColumn[] = [
{ title: '订舱编号', dataIndex: 'orderNo', align: 'left' },
{ title: '主提单号', dataIndex: 'mblno', align: 'left' },
{ title: '分提单号', dataIndex: 'hblno', align: 'left' },
{ title: '服务合同号', dataIndex: 'serviceContractNo', align: 'left' },
{ title: '号', dataIndex: 'serviceContractNo', align: 'left' },
{ title: 'RMB应收', dataIndex: 'rmbdr', align: 'left' },
{ title: 'RMB应付', dataIndex: 'rmbcr', align: 'left' },
{ title: 'RMB未收', dataIndex: 'balrmbdr', align: 'left' },

@ -49,10 +49,10 @@
{{ item.label }}
</span>
</template>
<template v-if="column.dataIndex == 'isNoTax'">
<!-- <template v-if="column.dataIndex == 'isNoTax'">
<a-tag color="error" v-if="record.isNoTax == 'true'"></a-tag>
<a-tag color="success" v-else></a-tag>
</template>
</template> -->
</template>
<template v-slot:tableAction="{ record }">
<a-tooltip placement="top" :mouseEnterDelay="0.5">
@ -104,13 +104,11 @@
const { notification, createMessage } = useMessage()
import { useGo } from '/@/hooks/web/usePage'
const go = useGo()
//
import { formatParams } from '/@/hooks/web/common'
import { useAppStore } from '/@/store/modules/app'
const appStore = useAppStore()
const tbHeight = window.innerHeight - 350
//
const [registerTable, { reload, getVxeSelectRows, getRawDataSource }] = useTable({
const [registerTable, { reload, getVxeSelectRows, getRawDataSource, getPaginationRef }] =
useTable({
title: '',
api: async (p) => {
const res: API.DataResult = await GetCheckBillList(p)
@ -127,7 +125,54 @@
},
//
beforeFetch: (p) => {
return formatParams(p)
let Arr = [
'mblno',
'orderNo',
'customerNo',
'hblno',
'serviceContractNo',
'etd',
'vessel',
'voyno',
// --------------------
'billNo',
]
var currentPageInfo: any = getPaginationRef()
let otherQueryCondition: any = []
let queryCondition: any = []
let postParam: API.PageRequest = {
queryCondition: '[]',
otherQueryCondition: '[]',
pageCondition: {
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
console.log(p)
for (let key in p) {
Arr.forEach((item) => {
if ((key.includes(':') && key.includes(item) && p[key]) || (key == item && p[key])) {
// billNo
if (item == 'billNo') {
queryCondition.push({
FieldName: item,
FieldValue: p[key],
ConditionalType: 1,
})
} else {
otherQueryCondition.push({
FieldName: item,
FieldValue: p[key],
ConditionalType: 1,
})
}
}
})
}
postParam.otherQueryCondition = JSON.stringify(otherQueryCondition)
postParam.queryCondition = JSON.stringify(queryCondition)
return postParam
},
columns,
formConfig: {

Loading…
Cancel
Save