lijingjia 5 months ago
commit f2f819ea11

@ -0,0 +1,184 @@
<template>
<BasicModal
v-bind="$attrs"
:use-wrapper="true"
:title="getTitle"
width="80%"
@register="registerModal"
@ok="handleSave"
>
<BasicForm @register="registerForm" />
<BasicTable @register="registerTable" class="Table">
<template #toolbar>
<a-button type="primary" @click="handleCreate"> </a-button>
</template>
</BasicTable>
<!--右下角按钮-->
<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 { BasicTable, useTable } from '/@/components/Table'
import { formSchema, formcolumns, formsearchFormSchema } from './columns'
import { ApiEdit, ApiInfo, ApiList } from './api'
import { useMessage } from '/@/hooks/web/useMessage'
// Emits
const emit = defineEmits(['success', 'register'])
const isUpdate = ref(true)
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
resetFields()
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
// setModalProps({ confirmLoading: true });
rowId.value = data.record.id
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
setFieldsValue({
...res.data,
})
// console.log('Form', getFieldsValue());
// setFieldsValue({ trainId: unref(res.data.trainId) });
}
// setModalProps({ confirmLoading: false });
} else {
setFieldsValue({ permissionIdentity: unref(2) })
}
setModalProps({ loading: false })
})
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm({
labelWidth: 100,
schemas: formSchema,
showActionButtonGroup: false,
})
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
api: async (p) => {
const res: API.DataResult = await ApiList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: () => {
var currentPageInfo: any = getPaginationRef()
var data = getForm().getFieldsValue()
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
if (!!data.ctnSize0) {
condition.push({
FieldName: 'ctnSize0',
FieldValue: data.ctnSize0,
ConditionalType: 1,
})
}
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
columns: formcolumns,
formConfig: {
labelWidth: 120,
schemas: formsearchFormSchema,
},
pagination: true,
bordered: true,
useSearchForm: true,
showTableSetting: true,
tableSetting: { fullScreen: true },
canResize: true,
resizeHeightOffset: 35,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
})
const getTitle = computed(() => (!unref(isUpdate) ? '新增' : '编辑'))
async function handleSave(exit) {
try {
const values = await validate()
setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
console.log(values)
// loading.value = true;
const res: API.DataResult = await ApiEdit(values)
console.log(res)
if (res.succeeded) {
createMessage.success(res.message)
emit('success')
//
if (!exit) {
if (unref(isUpdate)) {
await refresh()
} else {
rowId.value = res.data
isUpdate.value = true
await refresh()
}
}
} else {
createMessage.error(res.message)
}
exit && closeModal()
} finally {
// loading.value = false;
setModalProps({ confirmLoading: false, loading: false })
}
}
async function refresh() {
const res: API.DataResult = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
await setFieldsValue({
...res.data,
})
}
}
</script>
<style lang="scss" scoped>
:deep(.ds-tbale-form-operation) {
position: relative !important;
> div {
margin-top: 0;
}
}
</style>

@ -0,0 +1,60 @@
// @ts-ignore
import { request } from '/@/utils/request'
import { DataResult, PageRequest } from '/@/api/model/baseModel'
enum Api {
list = '/mainApi/CodeCtn/GetCodeCtnList',
edit = '/mainApi/CodeCtn/EditCodeCtn',
info = '/mainApi/CodeCtn/GetCodeCtnInfo',
BasicsList = '/mainApi/CodeCtn/GetBasicsCodeCtnList',
ExistList = '/mainApi/CodeCtn/GetExistCodeCtnList',
Import = '/mainApi/CodeCtn/ImportCodeCtn',
}
// 列表 (Auth)
export function ApiList(data: PageRequest) {
return request<DataResult>({
url: Api.list,
method: 'post',
data,
})
}
// 编辑 (Auth)
export function ApiEdit(data: PageRequest) {
return request<DataResult>({
url: Api.edit,
method: 'post',
data,
})
}
// 详情 (Auth)
export function ApiInfo(query) {
return request<DataResult>({
url: Api.info,
method: 'get',
params: query,
})
}
// 获取商品类型列表-基础库 (Auth)
export function ApiBasicsList(data: PageRequest) {
return request<DataResult>({
url: Api.BasicsList,
method: 'post',
data,
})
}
// 获取当前租户已有的商品类型 (Auth)
export function ApiExistList() {
return request<DataResult>({
url: Api.ExistList,
method: 'get',
})
}
// 导入商品类型列表-基础库 (Auth)
export function ApiImport(data: PageRequest) {
return request<DataResult>({
url: Api.Import,
method: 'post',
data,
})
}

@ -0,0 +1,247 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue'
export const columns: BasicColumn[] = [
{
title: '对账记录号',
dataIndex: 'ctnSize0',
width: 150,
},
{
title: '对账名称',
dataIndex: 'ctnSize1',
width: 150,
},
{
title: '对账人',
dataIndex: 'ctnSize2',
width: 150,
},
{
title: '对账备注',
dataIndex: 'ctnSize3',
width: 150,
},
{
title: '对账日期',
dataIndex: 'ctnSize4',
width: 150,
},
{
title: '对账客户',
dataIndex: 'ctnSize5',
width: 150,
},
]
export const searchFormSchema: FormSchema[] = [
{
field: 'ctnSize0',
label: '对账记录号',
component: 'Input',
colProps: { span: 4 },
},
]
export const formSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'AAA',
label: '对账记录号',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'AAA',
label: '对账名称',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'AAA',
label: '记录',
component: 'Input',
colProps: { span: 10 },
},
{
field: 'AAA',
label: '对账日期',
component: 'Input',
colProps: { span: 4 },
},
]
export const formcolumns: BasicColumn[] = [
{
title: '对账编号',
dataIndex: 'ctnSize0',
width: 150,
},
{
title: '客户简称',
dataIndex: 'ctnSize1',
width: 150,
},
{
title: '客户全称',
dataIndex: 'ctnSize2',
width: 150,
},
{
title: '揽货人',
dataIndex: 'ctnSize3',
width: 150,
},
{
title: '应收开票',
dataIndex: 'ctnSize4',
width: 150,
},
{
title: '应收RMB',
dataIndex: 'ctnSize5',
width: 150,
},
{
title: '应收USD',
dataIndex: 'ctnSize5',
width: 150,
},
{
title: '应付RMB',
dataIndex: 'ctnSize5',
width: 150,
},
{
title: '应付USD',
dataIndex: 'ctnSize5',
width: 150,
},
{
title: '对账联系人',
dataIndex: 'ctnSize5',
width: 150,
},
{
title: '对账联系邮箱',
dataIndex: 'ctnSize5',
width: 150,
},
{
title: '对账联系电话',
dataIndex: 'ctnSize5',
width: 150,
},
{
title: '对账备注',
dataIndex: 'ctnSize5',
width: 150,
},
{
title: '对账日期',
dataIndex: 'ctnSize5',
width: 150,
},
{
title: '结费类型',
dataIndex: 'ctnSize5',
width: 150,
},
]
export const formsearchFormSchema: FormSchema[] = [
{
field: 'ctnSize0',
label: '开船日期',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'ctnSize0',
label: '对账客户',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'ctnSize0',
label: '收付方向',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'ctnSize0',
label: '结算类型',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'ctnSize0',
label: '装运方式',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'ctnSize0',
label: '所属分布',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'ctnSize0',
label: '仅超期',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'ctnSize0',
label: '计算滞期',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'ctnSize0',
label: '会计期间',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'ctnSize0',
label: '费用状态',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'ctnSize0',
label: '是否开票',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'ctnSize0',
label: '币别',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'ctnSize0',
label: '费用名称',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'ctnSize0',
label: '所属公司',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'ctnSize0',
label: '折算汇率',
component: 'Input',
colProps: { span: 4 },
},
]

@ -0,0 +1,79 @@
<template>
<div>
<BasicTable @register="registerTable">
<template #toolbar>
<a-button type="primary" @click="handleCreate"> </a-button>
</template>
</BasicTable>
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
import { ApiList, ApiImport } from './api'
import { useModal } from '/@/components/Modal'
import TenantAuditStepModal from './TenantAuditStepModal.vue'
import { columns, searchFormSchema } from './columns'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
const visible = ref<boolean>(false)
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
api: async (p) => {
const res: API.DataResult = await ApiList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: () => {
var currentPageInfo: any = getPaginationRef()
var data = getForm().getFieldsValue()
const postParam: API.PageRequest = {
queryCondition: '',
pageCondition: {
pageIndex: currentPageInfo.current,
pageSize: currentPageInfo.pageSize,
sortConditions: [],
},
}
let condition: API.ConditionItem[] = []
if (!!data.ctnSize0) {
condition.push({
FieldName: 'ctnSize0',
FieldValue: data.ctnSize0,
ConditionalType: 1,
})
}
postParam.queryCondition = JSON.stringify(condition)
return postParam
},
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
pagination: true,
bordered: true,
useSearchForm: true,
showTableSetting: true,
tableSetting: { fullScreen: true },
canResize: true,
resizeHeightOffset: 35,
actionColumn: {
width: 80,
title: '操作',
dataIndex: 'action',
fixed: 'right',
},
})
function handleCreate() {
openModal(true, {
isParent: false,
isUpdate: false,
})
}
function handleSuccess() {
reload()
}
</script>

@ -633,6 +633,14 @@ export function GetFactorySelectList(parameter) {
params: parameter,
})
}
// 海运出口规则引擎校验 (Auth)
export function ExcuteRuleEngine(parameter) {
return request({
url: '/opApi/SeaExport/ExcuteRuleEngine',
method: 'get',
params: parameter,
})
}
/**
* 获取分页查询客户
* @params ShortName
@ -990,16 +998,6 @@ export function SampleBillPdf(parameter) {
})
}
/**
* 校验
*/
export function ExcuteRulesOceanBooking(parameter) {
return request({
url: '/RulesEngineClient/ExcuteRulesOceanBooking?bookingId=' + parameter,
method: 'get',
})
}
/**
* 船代
* @params Name

@ -84,8 +84,8 @@
ref="RefrightContent"
:id="id"
:details="bookingDetails"
:excuteRules="excuteRules"
:excuteRulesType="excuteRulesType"
:PexcuteRules="excuteRules"
:PexcuteRulesType="excuteRulesType"
@fileNewUpadte="fileNewUpadte"
@changeAtd="changeAtd"
@changeDetail="changeDetailFun"
@ -500,6 +500,7 @@
init()
//
function init() {
console.log('init')
if (route.query.id && !id.value) {
id.value = route.query.id
}
@ -1699,6 +1700,7 @@
const { rows, type } = data
excuteRules.value = rows
excuteRulesType.value = type
console.log(excuteRules.value, excuteRulesType.value)
}
// function changePageFun(type) {
// const key = route.fullPath

@ -10,12 +10,12 @@
title="重新校验"
style="color: rgb(30, 144, 255); margin-left: 10px; cursor: pointer"
/> -->
<Icon
<!-- <Icon
class="rule-icon"
icon="ant-design:setting-filled"
:size="16"
@click="handleOpenRule({}, 1)"
/>
/> -->
<Icon
icon="ant-design:reload-outlined"
:size="16"
@ -24,8 +24,8 @@
/>
</div>
<div class="content">
<div class="tip" v-if="excuteRules.length > 0">
<div class="rules-label" v-for="(rule, rindex) in excuteRules" :key="rindex">
<div class="tip" v-if="props.PexcuteRules.length > 0">
<div class="rules-label" v-for="(rule, rindex) in props.PexcuteRules" :key="rindex">
<i class="iconfont icon-chenggong Success" v-if="rule.errorType === 'Success'"></i>
<i
class="iconfont icon-xiazaishibai Warning"
@ -41,12 +41,12 @@
/> -->
</div>
</div>
<div class="tip" v-else-if="excuteRulesType === 'success'">
<div class="tip" v-else-if="props.PexcuteRulesType === 'success'">
<div class="rules-label">
<i class="iconfont icon-chenggong Success"></i><span>校验完成无异常信息</span>
</div>
</div>
<div class="tip" v-else-if="excuteRulesType === 'fail'">
<div class="tip" v-else-if="props.PexcuteRulesType === 'fail'">
<div class="rules-label">
<i class="iconfont icon-shibai Warning"></i> <span>校验失败</span>
<a-button size="small" type="link" class="btn" @click="checkFun"> </a-button>
@ -79,8 +79,8 @@
</a-card>
<a-card :bodyStyle="tstyle" :bordered="false">
<div class="title">
<i class="iconfont icon-shijian1"></i
><span
<i class="iconfont icon-shijian1"></i>
<span
>船舶动态
<button class="btn-refsh" @click="handleRefsh">
<span class="iconfont icon-shanchu1" :style="{ fontSize: '17px' }"></span>刷新
@ -613,7 +613,7 @@
import {
AddRemark,
AddFile,
ExcuteRulesOceanBooking,
ExcuteRuleEngine,
BookingOrderDownload,
BookingOrderDeleteRemark,
SaveServiceItem,
@ -648,8 +648,8 @@
const props = defineProps({
id: { type: String, default: '' },
details: { type: Object, default: {} },
excuteRules: { type: Array, default: [] },
excuteRulesType: { type: String, default: '' },
PexcuteRules: { type: Array, default: [] },
PexcuteRulesType: { type: String, default: '' },
})
const emit = defineEmits([
'rules',
@ -660,6 +660,7 @@
'changeAtd',
])
let { ctx: that, proxy }: any = getCurrentInstance()
// const id = ref(route.query.id)
// ----------------------------------------
const RemarkList: any = ref([])
const remarkSpinning = ref(false)
@ -1035,28 +1036,22 @@
}
function checkFun() {
notification.open({ message: '校验中...', duration: 3 })
ExcuteRulesOceanBooking(props.id)
.then((res) => {
console.log(res)
ExcuteRuleEngine({ id: props.id }).then((res) => {
// res.data.rows
if (res.succeeded) {
notification.destroy()
if (res.data.rows && res.data.rows.length > 0) {
if (res.data.extra.detailList && res.data.extra.detailList.length > 0) {
notification.error({ message: res.data.msg, duration: 3 })
} else {
notification.error({ message: '校验完成', duration: 3 })
}
emit('rules', {
rows: res.data.rows,
rows: res.data.extra.detailList,
type: res.data.succ ? 'success' : 'fail',
})
} else {
notification.error({ message: res.message, duration: 3 })
}
})
.catch(() => {
notification.destroy()
notification.success({ message: '校验失败', duration: 3 })
})
}
function stopTimer() {

Loading…
Cancel
Save