lijingjia 1 month ago
commit 9463aa6a00

@ -166,6 +166,7 @@
async function handleSave(exit) {
try {
const values = await validate()
values.bodylist = list.value
setModalProps({ confirmLoading: true, loading: true })
const res: any = await ApiEdit(values)
if (res.succeeded) {
@ -308,7 +309,7 @@
deep: true,
},
)
const isOnlineDict = ref([])
const columns = [
{
data: 'selected',
@ -327,46 +328,56 @@
title: '箱号',
width: 120,
data: 'cntrno',
readOnly: false,
},
{
title: '变动来源',
width: 200,
data: 'changeSource',
},
{
title: '业务类型',
title: '箱型',
width: 120,
data: 'ctnBizState',
data: 'ctnall',
},
{
title: '箱来源',
width: 120,
data: 'ctnSource',
},
// {
// title: '线',
// width: 120,
// data: 'isOnline',
// readOnly: false,
// },
{
title: '状态变动',
width: 120,
data: 'ctnFlowState',
},
{
title: '新旧箱',
title: '是否上线',
width: 120,
data: 'usedState',
data: 'isOnline',
type: 'dropdown',
readOnly: false,
// (process)
source: async (query, process) => {
const res = isOnlineDict.value.length
? isOnlineDict.value
: await getDictOption('CM_IsOnlineEnum')
if (!isOnlineDict.value.length) isOnlineDict.value = res
const dict = res.map((res) => {
return res.label
})
process(dict)
},
},
{
title: '箱型',
width: 120,
data: 'ctnall',
title: '识别备注',
width: 200,
data: 'dealRemark',
},
{
title: '箱状态',
title: '当前业务状态',
width: 120,
data: 'ctnState',
data: 'ctnBizState',
},
{
title: '空重箱',
title: '关联合同号',
width: 120,
data: 'isHeavy',
data: 'ctnReleaseNo',
},
{
title: '当前港口',
@ -374,25 +385,63 @@
data: 'port',
},
{
title: '是否上线',
title: '场站/码头',
width: 120,
data: 'isOnline',
data: 'depot',
},
{
title: '当前箱业务状态',
title: '船名航次',
width: 120,
data: 'ctnBizState',
data: 'vesselVoyno',
},
{
title: 'DEPOT/TEIMINAL',
title: '业务编号',
width: 120,
data: 'depot',
data: 'mblno',
},
{
title: 'DATE',
title: '备注',
width: 120,
data: 'changeTime',
data: 'remark',
},
// {
// title: '',
// width: 200,
// data: 'changeSource',
// },
// {
// title: '',
// width: 120,
// data: 'ctnBizState',
// },
// {
// title: '',
// width: 120,
// data: 'ctnFlowState',
// },
// {
// title: '',
// width: 120,
// data: 'usedState',
// },
// {
// title: '',
// width: 120,
// data: 'ctnState',
// },
// {
// title: '',
// width: 120,
// data: 'isHeavy',
// },
// {
// title: 'DATE',
// width: 120,
// data: 'changeTime',
// },
]
const settings = {
height: '260',
@ -433,6 +482,18 @@
list.value[changes[0][0]]['fieldName'] = dict?.name
list.value[changes[0][0]]['fieldTitle'] = dict?.value
}
if (changes[0][1] === 'isOnline') {
const res = isOnlineDict.value.length
? isOnlineDict.value
: await getDictOption('CM_IsOnlineEnum')
if (!isOnlineDict.value.length) isOnlineDict.value = res
const item = res.filter((item) => {
return item.label === changes[0][3]
})
if (item) dict = item[0]
list.value[changes[0][0]]['isOnline'] = dict?.label
list.value[changes[0][0]]['isOnlineId'] = dict?.value
}
}
},
}

@ -121,7 +121,7 @@
setModalProps({ loading: false })
})
const getTitle = computed(() => (!unref(isUpdate) ? '新增账期信息' : '编辑账期信息'))
const getTitle = computed(() => (!unref(isUpdate) ? '新增银行/发票信息' : '编辑银行/发票信息'))
async function handleSave(exit) {
try {

@ -53,6 +53,7 @@ export const EditformSchema: FormSchema[] = [
field: 'description',
label: '客户全称',
component: 'DEdit',
slot: '',
defaultValue: '',
colProps: { span: 4 },
componentProps: (e) => {
@ -69,6 +70,7 @@ export const EditformSchema: FormSchema[] = [
label: '客户简称',
required: false,
component: 'DEdit',
slot: '',
defaultValue: '',
colProps: { span: 4 },
componentProps: (e) => {

@ -138,8 +138,46 @@
<!-- 基本信息 -->
<a-tabs v-model:activeKey="activeKey" class="RUnit">
<a-tab-pane key="1" tab="基本信息">
<BasicForm @register="registerForm1" @linkageForm="linkageForm" class="ds-form-detail"
/></a-tab-pane>
<BasicForm @register="registerForm1" @linkageForm="linkageForm" class="ds-form-detail">
<template #shortName="{ model }">
<div style="display: flex">
<a-input
@change="
(e) => {
IsAvailableDisabled = false
setFieldsValue({ shortName: e.target.value })
}
"
:value="model.shortName"
v-model:checked="model.shortName"
placeholder="请输入"
style="flex: 1; margin-right: 5px"
/>
<a-button
type="primary"
size="small"
:ghost="!IsAvailableDisabled"
@click="FnIsAvailable"
:disabled="IsAvailableDisabled"
>校验</a-button
>
</div>
</template>
<template #description="{ model }">
<a-input
@change="
(e) => {
IsAvailableDisabled = false
setFieldsValue({ description: e.target.value })
}
"
:value="model.description"
v-model:checked="model.description"
placeholder="请输入"
/>
</template>
</BasicForm>
</a-tab-pane>
<a-tab-pane key="2" tab="财务账期信息">
<div>
<p class="title">财务信息</p>
@ -243,6 +281,9 @@
cbDelete,
ApiSubmitAudit,
ApiWithdraw,
IsAvailable,
Create,
StakeholderSubmitAudit,
} from './api'
import { ApiAudit } from '/@/views/baseinfo/infoclientAudit/api'
import { GetFormSetListByModule } from '/@/api/common'
@ -261,6 +302,7 @@
const ApproveBtns = defineAsyncComponent(() => import('/@/components/ApproveBtns/index.vue'))
// import CustTemplateDetail from './custTemplateDetail/index.vue'
import FeeCustTemplate from './FeeCustTemplate/index.vue'
import { Modal } from 'ant-design-vue'
import { useModal } from '/@/components/Modal'
import CustomerParams from './customerParams/index.vue'
import ReleaseType from './ReleaseType/index.vue'
@ -392,6 +434,7 @@
setFieldsValue,
clearValidate,
validate,
validateFields,
updateSchema,
appendSchemaByField,
},
@ -552,6 +595,11 @@
async function getData(type) {
const res = await getCodeGoodsTypeInfo({ id: unref(rowId) })
if (res.succeeded) {
if (res.data.id) {
IsAvailableDisabled.value = true
} else {
IsAvailableDisabled.value = false
}
clientId.value = res.data.id
saleId.value = res.data.saleId
sourceId.value = res.data.sourceId
@ -624,15 +672,14 @@
const addNum = Math.round(Math.random() * 1000)
go(`${route.path}?addNum=${addNum}`)
}
//
async function handleSave() {
const IsAvailableDisabled = ref(false)
//
async function FnIsAvailable() {
// try {
const values = await validate().catch(() => {
notification.warning({ message: '请补全基本信息中必填内容', duration: 3 })
const values = await validateFields(['description', 'shortName']).catch(() => {
notification.warning({ message: '请补全客户全称/客户简称', duration: 3 })
})
if (values) {
// setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
values.clientTag = {}
let ClientTag = await getDictOption('infoclient-ArrclientTag')
ClientTag.forEach((item) => {
@ -662,34 +709,90 @@
values.isCustomer = false
values.isSupplier = true
}
// loading.value = true;
const res = await editCodeGoodsType({
IsAvailable({
...values,
...getFieldsValue1(),
})
if (res.succeeded) {
if (!rowId.value) {
rowId.value = res.data
clientId.value = res.data
// isUpdate.value = true
// await setFieldsValue({
// // ...getFieldsValue(),
// id: res.data,
// })
.then((res) => {
IsAvailableDisabled.value = true
notification.success({ message: '校验成功', duration: 3 })
})
.catch((err) => {
Modal.confirm({
title: '客户已存在',
content: '是否共享客户',
class: 'ds-modal-small',
okText: '申请共享',
cancelText: '取消',
onOk() {
Create().then((res) => {
console.log(res, 1111111111111111111)
StakeholderSubmitAudit().then((res2) => {
console.log(res2, 222222222222)
})
})
// notification.success({ message: '', duration: 3 })
},
onCancel() {},
})
})
}
}
//
async function handleSave() {
if (IsAvailableDisabled.value) {
const values = await validate().catch(() => {
notification.warning({ message: '请补全基本信息中必填内容!', duration: 3 })
})
if (values) {
values.clientTag = {}
let ClientTag = await getDictOption('infoclient-ArrclientTag')
ClientTag.forEach((item) => {
let type = false
if (values.ArrclientTag) {
values.ArrclientTag.forEach((item2) => {
if (item2 == item.value) {
type = true
}
})
}
values.clientTag[item.value] = type
})
values.clientTag = { ...values.clientTag, ...clientTag_o.value }
values.clientTag.others = values.others
values.grade = grade.value
if (CustomerOrSupplier.value == 'isCustomerAndisSupplier') {
values.isCustomer = true
values.isSupplier = true
} else if (CustomerOrSupplier.value == 'isCustomer') {
values.isCustomer = true
values.isSupplier = false
} else if (CustomerOrSupplier.value == 'isSupplier') {
values.isCustomer = false
values.isSupplier = true
}
const res = await editCodeGoodsType({
...values,
...getFieldsValue1(),
})
if (res.succeeded) {
if (!rowId.value) {
rowId.value = res.data
clientId.value = res.data
}
getData(true)
notification.success({ message: res.message, duration: 3 })
emit('success')
} else {
notification.error({ message: res.message, duration: 3 })
}
getData(true)
notification.success({ message: res.message, duration: 3 })
emit('success')
} else {
notification.error({ message: res.message, duration: 3 })
}
// exit && closeModal()
} else {
notification.warning({ message: '请完成客户校验', duration: 3 })
}
// } finally {
// // loading.value = false;
// // setModalProps({ confirmLoading: false, loading: false })
// }
}
const RefActionBar = ref()
// /

@ -7,29 +7,22 @@ enum Api {
GetCodeGoodsTypeInfo = '/mainApi/ClientInfo/GetClientInfo',
Delete = '/mainApi/ClientInfo/Delete',
DeleteInvoiceHeader = '/mainApi/ClientInfo/DeleteInvoiceHeader',
GetClientFrtSelectList = '/mainApi/Common/GetClientFrtSelectList',
GetClientSourceSelectList = '/mainApi/Common/GetClientSourceSelectList',
GetClientCountrySelectList = '/mainApi/Common/GetClientCountrySelectList',
GetClientStlModeSelectList = '/mainApi/Common/GetClientStlModeSelectList',
GetClientBankList = '/mainApi/ClientBank/GetClientBankList',
EditClientBank = '/mainApi/ClientBank/EditClientBank',
GetClientBankInfo = '/mainApi/ClientBank/GetClientBankInfo',
CBDelete = '/mainApi/ClientBank/Delete',
GetNotifications = '/mainApi/ClientInfo/GetNotifications',
SubmitAudit = '/mainApi/ClientInfo/SubmitAudit',
Withdraw = '/mainApi/ClientInfo/Withdraw',
GetUsage = '/mainApi/ClientInfo/GetUsage',
IsAvailable = '/mainApi/ClientInfo/IsAvailable',
StakeholderCreate = '/mainApi/ClientStakeholder/Create',
StakeholderSubmitAudit = '/mainApi/ClientStakeholder/SubmitAudit',
}
// 确定往来单位是否已使用 (Auth)
@ -130,7 +123,6 @@ export function getClientStlModeSelectList(query) {
})
}
// 客户银行信息 列表 (Auth)
export function getClientBankList(parameter) {
return request<DataResult>({
@ -171,3 +163,28 @@ export function getNotifications() {
method: 'get',
})
}
// 检查客户信息是否重复 (Auth)
export function IsAvailable(data) {
return request<DataResult>({
url: Api.IsAvailable,
method: 'post',
data,
})
}
// 新增客户干系人 (Auth)
export function Create() {
return request<DataResult>({
url: Api.StakeholderCreate,
method: 'post',
params: { clientId: 0 },
})
}
// 提交审核 (Auth)
export function StakeholderSubmitAudit() {
return request<DataResult>({
url: Api.StakeholderSubmitAudit,
method: 'post',
params: { clientId: 0 },
})
}

@ -555,15 +555,17 @@ export const formSchema: FormSchema[] = [
{
field: 'description',
label: '客户全称',
required: true,
component: 'Input',
slot: 'description',
required: true,
colProps: { span: 4 },
},
{
field: 'shortName',
label: '客户简称',
required: true,
component: 'Input',
slot: 'shortName',
required: true,
colProps: { span: 4 },
},
{

@ -6,6 +6,8 @@ enum Api {
edit = '/mainApi/ClientAccountDate/EditClientAccountDate',
info = '/mainApi/ClientAccountDate/GetClientAccountDateInfo',
del = '/mainApi/ClientAccountDate/Delete',
GetTenantBanks = '/mainApi/ClientAccountDate/GetTenantBanks',
}
// 列表 (Auth)
export function ApiList(data: PageRequest) {
@ -39,3 +41,11 @@ export function Delete(data) {
data,
})
}
// 获取组织机构银行账户列表 (Auth)
export function GetTenantBanks(data: PageRequest) {
return request<DataResult>({
url: Api.GetTenantBanks,
method: 'post',
params: data,
})
}

@ -1,6 +1,7 @@
import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue'
import { getClientSourceSelectList } from '../api'
import { GetTenantBanks } from './api'
import { getSaleUserList } from '/@/api/common'
import { getDictOption } from '/@/utils/dictUtil'
let ClientSourceList = []
@ -413,6 +414,49 @@ export const formSchema: FormSchema[] = [
max: 31,
},
},
{
field: 'rmbAccountId',
label: '人民币账户',
component: 'ApiSelect',
colProps: { span: 8 },
defaultValue: '',
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
GetTenantBanks({ currency: 'CNY' }).then((res) => {
resolve(res)
})
})
},
labelField: 'bankName',
valueField: 'id',
resultField: 'data',
}
},
},
{
field: 'usdAccountId',
label: '美金账户',
component: 'ApiSelect',
colProps: { span: 8 },
defaultValue: '',
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
GetTenantBanks({ currency: 'USD' }).then((res) => {
resolve(res)
})
})
},
labelField: 'accountName',
valueField: 'id',
showName: 'accountName',
resultField: 'data',
}
},
},
{
field: 'allowAmount',
label: '信用额度',

Loading…
Cancel
Save