lijingjia 2 months ago
commit 9463aa6a00

@ -166,6 +166,7 @@
async function handleSave(exit) { async function handleSave(exit) {
try { try {
const values = await validate() const values = await validate()
values.bodylist = list.value
setModalProps({ confirmLoading: true, loading: true }) setModalProps({ confirmLoading: true, loading: true })
const res: any = await ApiEdit(values) const res: any = await ApiEdit(values)
if (res.succeeded) { if (res.succeeded) {
@ -308,7 +309,7 @@
deep: true, deep: true,
}, },
) )
const isOnlineDict = ref([])
const columns = [ const columns = [
{ {
data: 'selected', data: 'selected',
@ -327,46 +328,56 @@
title: '箱号', title: '箱号',
width: 120, width: 120,
data: 'cntrno', data: 'cntrno',
readOnly: false,
}, },
{ {
title: '变动来源', title: '箱型',
width: 200,
data: 'changeSource',
},
{
title: '业务类型',
width: 120, width: 120,
data: 'ctnBizState', data: 'ctnall',
}, },
{ {
title: '箱来源', title: '箱来源',
width: 120, width: 120,
data: 'ctnSource', data: 'ctnSource',
}, },
// {
// title: '线',
// width: 120,
// data: 'isOnline',
// readOnly: false,
// },
{ {
title: '状态变动', title: '是否上线',
width: 120,
data: 'ctnFlowState',
},
{
title: '新旧箱',
width: 120, 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: '箱型', title: '识别备注',
width: 120, width: 200,
data: 'ctnall', data: 'dealRemark',
}, },
{ {
title: '箱状态', title: '当前业务状态',
width: 120, width: 120,
data: 'ctnState', data: 'ctnBizState',
}, },
{ {
title: '空重箱', title: '关联合同号',
width: 120, width: 120,
data: 'isHeavy', data: 'ctnReleaseNo',
}, },
{ {
title: '当前港口', title: '当前港口',
@ -374,25 +385,63 @@
data: 'port', data: 'port',
}, },
{ {
title: '是否上线', title: '场站/码头',
width: 120, width: 120,
data: 'isOnline', data: 'depot',
}, },
{ {
title: '当前箱业务状态', title: '船名航次',
width: 120, width: 120,
data: 'ctnBizState', data: 'vesselVoyno',
}, },
{ {
title: 'DEPOT/TEIMINAL', title: '业务编号',
width: 120, width: 120,
data: 'depot', data: 'mblno',
}, },
{ {
title: 'DATE', title: '备注',
width: 120, 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 = { const settings = {
height: '260', height: '260',
@ -433,6 +482,18 @@
list.value[changes[0][0]]['fieldName'] = dict?.name list.value[changes[0][0]]['fieldName'] = dict?.name
list.value[changes[0][0]]['fieldTitle'] = dict?.value 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 }) setModalProps({ loading: false })
}) })
const getTitle = computed(() => (!unref(isUpdate) ? '新增账期信息' : '编辑账期信息')) const getTitle = computed(() => (!unref(isUpdate) ? '新增银行/发票信息' : '编辑银行/发票信息'))
async function handleSave(exit) { async function handleSave(exit) {
try { try {

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

@ -138,8 +138,46 @@
<!-- 基本信息 --> <!-- 基本信息 -->
<a-tabs v-model:activeKey="activeKey" class="RUnit"> <a-tabs v-model:activeKey="activeKey" class="RUnit">
<a-tab-pane key="1" tab="基本信息"> <a-tab-pane key="1" tab="基本信息">
<BasicForm @register="registerForm1" @linkageForm="linkageForm" class="ds-form-detail" <BasicForm @register="registerForm1" @linkageForm="linkageForm" class="ds-form-detail">
/></a-tab-pane> <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="财务账期信息"> <a-tab-pane key="2" tab="财务账期信息">
<div> <div>
<p class="title">财务信息</p> <p class="title">财务信息</p>
@ -243,6 +281,9 @@
cbDelete, cbDelete,
ApiSubmitAudit, ApiSubmitAudit,
ApiWithdraw, ApiWithdraw,
IsAvailable,
Create,
StakeholderSubmitAudit,
} from './api' } from './api'
import { ApiAudit } from '/@/views/baseinfo/infoclientAudit/api' import { ApiAudit } from '/@/views/baseinfo/infoclientAudit/api'
import { GetFormSetListByModule } from '/@/api/common' import { GetFormSetListByModule } from '/@/api/common'
@ -261,6 +302,7 @@
const ApproveBtns = defineAsyncComponent(() => import('/@/components/ApproveBtns/index.vue')) const ApproveBtns = defineAsyncComponent(() => import('/@/components/ApproveBtns/index.vue'))
// import CustTemplateDetail from './custTemplateDetail/index.vue' // import CustTemplateDetail from './custTemplateDetail/index.vue'
import FeeCustTemplate from './FeeCustTemplate/index.vue' import FeeCustTemplate from './FeeCustTemplate/index.vue'
import { Modal } from 'ant-design-vue'
import { useModal } from '/@/components/Modal' import { useModal } from '/@/components/Modal'
import CustomerParams from './customerParams/index.vue' import CustomerParams from './customerParams/index.vue'
import ReleaseType from './ReleaseType/index.vue' import ReleaseType from './ReleaseType/index.vue'
@ -392,6 +434,7 @@
setFieldsValue, setFieldsValue,
clearValidate, clearValidate,
validate, validate,
validateFields,
updateSchema, updateSchema,
appendSchemaByField, appendSchemaByField,
}, },
@ -552,6 +595,11 @@
async function getData(type) { async function getData(type) {
const res = await getCodeGoodsTypeInfo({ id: unref(rowId) }) const res = await getCodeGoodsTypeInfo({ id: unref(rowId) })
if (res.succeeded) { if (res.succeeded) {
if (res.data.id) {
IsAvailableDisabled.value = true
} else {
IsAvailableDisabled.value = false
}
clientId.value = res.data.id clientId.value = res.data.id
saleId.value = res.data.saleId saleId.value = res.data.saleId
sourceId.value = res.data.sourceId sourceId.value = res.data.sourceId
@ -624,15 +672,14 @@
const addNum = Math.round(Math.random() * 1000) const addNum = Math.round(Math.random() * 1000)
go(`${route.path}?addNum=${addNum}`) go(`${route.path}?addNum=${addNum}`)
} }
// const IsAvailableDisabled = ref(false)
async function handleSave() { //
async function FnIsAvailable() {
// try { // try {
const values = await validate().catch(() => { const values = await validateFields(['description', 'shortName']).catch(() => {
notification.warning({ message: '请补全基本信息中必填内容', duration: 3 }) notification.warning({ message: '请补全客户全称/客户简称', duration: 3 })
}) })
if (values) { if (values) {
// setModalProps({ confirmLoading: true, loading: true })
// TODO custom api
values.clientTag = {} values.clientTag = {}
let ClientTag = await getDictOption('infoclient-ArrclientTag') let ClientTag = await getDictOption('infoclient-ArrclientTag')
ClientTag.forEach((item) => { ClientTag.forEach((item) => {
@ -662,34 +709,90 @@
values.isCustomer = false values.isCustomer = false
values.isSupplier = true values.isSupplier = true
} }
// loading.value = true; IsAvailable({
const res = await editCodeGoodsType({
...values, ...values,
...getFieldsValue1(), ...getFieldsValue1(),
}) })
if (res.succeeded) { .then((res) => {
if (!rowId.value) { IsAvailableDisabled.value = true
rowId.value = res.data notification.success({ message: '校验成功', duration: 3 })
clientId.value = res.data })
// isUpdate.value = true .catch((err) => {
// await setFieldsValue({ Modal.confirm({
// // ...getFieldsValue(), title: '客户已存在',
// id: res.data, 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 })
} }
} else {
// exit && closeModal() notification.warning({ message: '请完成客户校验', duration: 3 })
} }
// } finally {
// // loading.value = false;
// // setModalProps({ confirmLoading: false, loading: false })
// }
} }
const RefActionBar = ref() const RefActionBar = ref()
// / // /

@ -7,29 +7,22 @@ enum Api {
GetCodeGoodsTypeInfo = '/mainApi/ClientInfo/GetClientInfo', GetCodeGoodsTypeInfo = '/mainApi/ClientInfo/GetClientInfo',
Delete = '/mainApi/ClientInfo/Delete', Delete = '/mainApi/ClientInfo/Delete',
DeleteInvoiceHeader = '/mainApi/ClientInfo/DeleteInvoiceHeader', DeleteInvoiceHeader = '/mainApi/ClientInfo/DeleteInvoiceHeader',
GetClientFrtSelectList = '/mainApi/Common/GetClientFrtSelectList', GetClientFrtSelectList = '/mainApi/Common/GetClientFrtSelectList',
GetClientSourceSelectList = '/mainApi/Common/GetClientSourceSelectList', GetClientSourceSelectList = '/mainApi/Common/GetClientSourceSelectList',
GetClientCountrySelectList = '/mainApi/Common/GetClientCountrySelectList', GetClientCountrySelectList = '/mainApi/Common/GetClientCountrySelectList',
GetClientStlModeSelectList = '/mainApi/Common/GetClientStlModeSelectList', GetClientStlModeSelectList = '/mainApi/Common/GetClientStlModeSelectList',
GetClientBankList = '/mainApi/ClientBank/GetClientBankList', GetClientBankList = '/mainApi/ClientBank/GetClientBankList',
EditClientBank = '/mainApi/ClientBank/EditClientBank', EditClientBank = '/mainApi/ClientBank/EditClientBank',
GetClientBankInfo = '/mainApi/ClientBank/GetClientBankInfo', GetClientBankInfo = '/mainApi/ClientBank/GetClientBankInfo',
CBDelete = '/mainApi/ClientBank/Delete', CBDelete = '/mainApi/ClientBank/Delete',
GetNotifications = '/mainApi/ClientInfo/GetNotifications', GetNotifications = '/mainApi/ClientInfo/GetNotifications',
SubmitAudit = '/mainApi/ClientInfo/SubmitAudit', SubmitAudit = '/mainApi/ClientInfo/SubmitAudit',
Withdraw = '/mainApi/ClientInfo/Withdraw', Withdraw = '/mainApi/ClientInfo/Withdraw',
GetUsage = '/mainApi/ClientInfo/GetUsage', GetUsage = '/mainApi/ClientInfo/GetUsage',
IsAvailable = '/mainApi/ClientInfo/IsAvailable',
StakeholderCreate = '/mainApi/ClientStakeholder/Create',
StakeholderSubmitAudit = '/mainApi/ClientStakeholder/SubmitAudit',
} }
// 确定往来单位是否已使用 (Auth) // 确定往来单位是否已使用 (Auth)
@ -130,7 +123,6 @@ export function getClientStlModeSelectList(query) {
}) })
} }
// 客户银行信息 列表 (Auth) // 客户银行信息 列表 (Auth)
export function getClientBankList(parameter) { export function getClientBankList(parameter) {
return request<DataResult>({ return request<DataResult>({
@ -170,4 +162,29 @@ export function getNotifications() {
url: Api.GetNotifications, url: Api.GetNotifications,
method: 'get', 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', field: 'description',
label: '客户全称', label: '客户全称',
required: true,
component: 'Input', component: 'Input',
slot: 'description',
required: true,
colProps: { span: 4 }, colProps: { span: 4 },
}, },
{ {
field: 'shortName', field: 'shortName',
label: '客户简称', label: '客户简称',
required: true,
component: 'Input', component: 'Input',
slot: 'shortName',
required: true,
colProps: { span: 4 }, colProps: { span: 4 },
}, },
{ {

@ -6,6 +6,8 @@ enum Api {
edit = '/mainApi/ClientAccountDate/EditClientAccountDate', edit = '/mainApi/ClientAccountDate/EditClientAccountDate',
info = '/mainApi/ClientAccountDate/GetClientAccountDateInfo', info = '/mainApi/ClientAccountDate/GetClientAccountDateInfo',
del = '/mainApi/ClientAccountDate/Delete', del = '/mainApi/ClientAccountDate/Delete',
GetTenantBanks = '/mainApi/ClientAccountDate/GetTenantBanks',
} }
// 列表 (Auth) // 列表 (Auth)
export function ApiList(data: PageRequest) { export function ApiList(data: PageRequest) {
@ -38,4 +40,12 @@ export function Delete(data) {
method: 'post', method: 'post',
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 { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue' import { Tag } from 'ant-design-vue'
import { getClientSourceSelectList } from '../api' import { getClientSourceSelectList } from '../api'
import { GetTenantBanks } from './api'
import { getSaleUserList } from '/@/api/common' import { getSaleUserList } from '/@/api/common'
import { getDictOption } from '/@/utils/dictUtil' import { getDictOption } from '/@/utils/dictUtil'
let ClientSourceList = [] let ClientSourceList = []
@ -413,6 +414,49 @@ export const formSchema: FormSchema[] = [
max: 31, 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', field: 'allowAmount',
label: '信用额度', label: '信用额度',

Loading…
Cancel
Save