szh-new
张同海 4 months ago
parent e46123cc05
commit 17c2d6840c

@ -40,10 +40,7 @@
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label="附件"
name="upFileList"
>
<a-form-item label="附件" name="upFileList">
<a-upload
:file-list="upFileList"
:before-upload="beforeUpload"
@ -69,11 +66,7 @@
</template>
</a-modal>
<slot></slot>
<DsFileList
:id="id"
ref="dsFileList"
:height="height"
></DsFileList>
<DsFileList :id="id" ref="dsFileList" :height="height"></DsFileList>
</div>
</template>
@ -89,28 +82,33 @@
//
maxCount: {
type: Number,
default: 10
default: 10,
},
// id
id: {
type: String,
default: null
default: null,
},
//
show: {
type: Boolean,
default: true
default: true,
},
//
height: {
type: [Number, String],
default: 'auto'
default: 'auto',
},
// M
maxSize: {
type: Number,
default: 50
}
default: 50,
},
//
fileType: {
type: String,
default: '',
},
})
//
const visible = ref(false)
@ -119,7 +117,8 @@
const fileTypeList = ref([])
//
const init = () => {
getDictOption('file_type').then(res => {
let code = props.fileType ? `${props.fileType}_file_type` : 'file_type'
getDictOption(code).then((res) => {
console.log(res)
fileTypeList.value = res
})
@ -130,7 +129,7 @@
const formData = reactive({
typeCode: '',
typeName: '',
fileList: []
fileList: [],
})
const fields = ref([])
function handleRemove(file: any) {
@ -157,7 +156,7 @@
//
const changeHandle = (v, obj) => {
console.log(v)
const row = fileTypeList.value.filter(item => {
const row = fileTypeList.value.filter((item) => {
return item.value == v
})
if (row && row.length) {
@ -181,20 +180,22 @@
if (res.typeCode) {
const postData = new FormData()
const list = unref(upFileList)
list.forEach(item => {
list.forEach((item) => {
postData.append('formCollection[]', item)
})
postData.append('linkId', props.id)
postData.append('typeCode', formData.typeCode)
postData.append('typeName', formData.typeName)
loading.value = true
AddMultiFiles(postData).then(res => {
AddMultiFiles(postData)
.then((res) => {
loading.value = false
visible.value = false
upFileList.value = []
dsFileList.value.init()
createMessage.success('上传成功!')
}).catch(() => {
})
.catch(() => {
loading.value = false
createMessage.error('上传失败!')
})
@ -202,11 +203,11 @@
}
const onFinish = (values: any) => {
console.log('Success:', values);
console.log('Success:', values)
}
const onFinishFailed = (errorInfo: any) => {
console.log('Failed:', errorInfo);
console.log('Failed:', errorInfo)
}
const handleCancel = () => {
@ -214,8 +215,7 @@
}
defineExpose({
init
init,
})
</script>
<style>
</style>
<style></style>

@ -339,33 +339,33 @@
/* eslint-disable */
isArray(props.record[cbs])
? props.record[cbs]?.push(handle)
: (props.record[cbs] = [handle]);
: (props.record[cbs] = [handle])
}
}
if (props.record) {
initCbs('submitCbs', handleSubmit);
initCbs('validCbs', handleSubmitRule);
initCbs('cancelCbs', handleCancel);
initCbs('submitCbs', handleSubmit)
initCbs('validCbs', handleSubmitRule)
initCbs('cancelCbs', handleCancel)
if (props.column.dataIndex) {
if (!props.record.editValueRefs) props.record.editValueRefs = {};
props.record.editValueRefs[props.column.dataIndex as any] = currentValueRef;
if (!props.record.editValueRefs) props.record.editValueRefs = {}
props.record.editValueRefs[props.column.dataIndex as any] = currentValueRef
}
/* eslint-disable */
props.record.onCancelEdit = () => {
isArray(props.record?.cancelCbs) && props.record?.cancelCbs.forEach((fn) => fn());
};
isArray(props.record?.cancelCbs) && props.record?.cancelCbs.forEach((fn) => fn())
}
/* eslint-disable */
props.record.onSubmitEdit = async () => {
if (isArray(props.record?.submitCbs)) {
if (!props.record?.onValid?.()) return;
const submitFns = props.record?.submitCbs || [];
submitFns.forEach((fn) => fn(false, false));
table.emit?.('edit-row-end');
return true;
if (!props.record?.onValid?.()) return
const submitFns = props.record?.submitCbs || []
submitFns.forEach((fn) => fn(false, false))
table.emit?.('edit-row-end')
return true
}
}
};
}
return {
@ -391,7 +391,7 @@
handleEnter,
handleSubmitClick,
spinning,
};
}
},
render() {
return (
@ -442,9 +442,9 @@
</Spin>
)}
</div>
);
)
},
});
})
</script>
<style lang="less">
@prefix-cls: ~'@{namespace}-editable-cell';

@ -0,0 +1,14 @@
{
"ClassName": "System.NullReferenceException",
"Message": "Object reference not set to an instance of an object.",
"Data": null,
"InnerException": null,
"HelpURL": null,
"StackTraceString": " at DS.WMS.ContainerManagement.Info.Dtos.CM_State_ChangeReq_Multi.getList() in D:\\ds8-solution-pro\\ds-wms-service\\DS.WMS.Core\\ContainerManagement\\Dtos\\CM_State_ChangeReq.cs:line 184\r\n at DS.WMS.ContainerManagement.Info.Method.CM_State_ChangeService.CM_State_Change_Multi(CM_State_ChangeReq req) in D:\\ds8-solution-pro\\ds-wms-service\\DS.WMS.Core\\ContainerManagement\\Method\\CM_State_ChangeService.cs:line 117",
"RemoteStackTraceString": null,
"RemoteStackIndex": 0,
"ExceptionMethod": null,
"HResult": -2147467261,
"Source": "DS.WMS.Core",
"WatsonBuckets": null
}

@ -43,7 +43,7 @@ export const columns: BasicColumn[] = [
},
{
title: '变动来源',
dataIndex: 'changeSource',
dataIndex: 'changeSourceId',
sorter: true,
width: 200,
},
@ -183,28 +183,13 @@ export const formSchema: FormSchema[] = [
field: 'cntrno',
label: '集装箱号',
component: 'InputTextArea',
// required: true,
required: true,
colProps: { span: 24 },
componentProps: {
placeholder: '请输入,多个箱号请以“,”逗号间隔',
rows: 3,
},
},
{
field: 'ctnall',
label: '箱型',
component: 'ApiSelect',
colProps: { span: 6 },
// required: true,
componentProps: () => {
return {
api: GetCtnSelectList,
labelField: 'ctnName',
valueField: 'ediCode',
resultField: 'data',
}
},
},
{
field: 'isOnlineId',
label: '是否上线',
@ -226,9 +211,7 @@ export const formSchema: FormSchema[] = [
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {
formModel.defaultDebitName = obj?.label || ''
},
onChange: (v, obj) => {},
}
},
},
@ -253,9 +236,7 @@ export const formSchema: FormSchema[] = [
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {
formModel.defaultDebitName = obj?.label || ''
},
onChange: (v, obj) => {},
}
},
},
@ -300,9 +281,7 @@ export const formSchema: FormSchema[] = [
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {
formModel.defaultDebitName = obj?.label || ''
},
onChange: (v, obj) => {},
}
},
},
@ -335,7 +314,6 @@ export const formSchema: FormSchema[] = [
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {
formModel.defaultDebitName = obj?.label || ''
formModel.ctnBizState = obj.label
},
}
@ -375,9 +353,7 @@ export const formSchema: FormSchema[] = [
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {
formModel.defaultDebitName = obj?.label || ''
},
onChange: (v, obj) => {},
}
},
},
@ -387,6 +363,7 @@ export const formSchema: FormSchema[] = [
component: 'Input',
colProps: { span: 6 },
},
{
field: 'isHeavy',
label: '空重箱',
@ -435,8 +412,8 @@ export const formSchema: FormSchema[] = [
componentProps: ({}) => {
return {
option: optionsStore.getOptionsByCode('GetYardClientList'),
labelField: 'portName',
valueField: 'portName',
labelField: 'shortName',
valueField: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
@ -450,6 +427,27 @@ export const formSchema: FormSchema[] = [
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnall',
label: '箱型',
component: 'ApiSelect',
colProps: { span: 6 },
required: true,
componentProps: () => {
return {
api: GetCtnSelectList,
labelField: 'ctnName',
valueField: 'ediCode',
resultField: 'data',
// id: 'ClassCtnall',
// getPopupContainer: () => document.getElementById('ClassCtnall'),
// style: {
// position: 'relative',
// color: 'red',
// },
}
},
},
{
field: 'mblno',
label: '当前业务编号',

@ -58,8 +58,7 @@
</div>
<div class="BTable">
<BasicTable @register="registerTable" @row-dbClick="EditRow" :maxHeight="140">
<template #tableTitle>
<span class="title">银行信息</span>
<template #toolbar>
<a-button
type="link"
@click="addboxLine({ id: rowId })"
@ -202,6 +201,7 @@
//
const [registerTable, { reload, setTableData, getPaginationRef, getDataSource, getSelectRows }] =
useTable({
title: '银行信息',
api: async (p) => {
const res: API.DataResult = await getClientBankList(p)
return new Promise((resolve) => {
@ -465,7 +465,7 @@
const getTitle = computed(() => (!rowId.value ? '新增往来单位' : '编辑往来单位'))
//
async function handleSave(exit) {
try {
// try {
const values = await validate().catch(() => {
notification.warning({ message: '请补全基本信息中必填内容!', duration: 3 })
})
@ -528,10 +528,10 @@
// exit && closeModal()
}
} finally {
// loading.value = false;
// setModalProps({ confirmLoading: false, loading: false })
}
// } finally {
// // loading.value = false;
// // setModalProps({ confirmLoading: false, loading: false })
// }
}
async function refresh() {
const res: API.DataResult = await getCodeGoodsTypeInfo({ id: unref(rowId) })
@ -694,6 +694,10 @@
> div {
&:nth-child(1) {
padding: 14px 8px 8px 8px;
display: flex;
.Fapiao {
flex: 1;
}
}
}
.handsontableInput {

@ -119,7 +119,7 @@ if (res12.succeeded) {
}
export const columns: BasicColumn[] = [
{
title: '客户代码',
title: '助记码',
dataIndex: 'codeName',
sorter: true,
width: 150,
@ -162,16 +162,18 @@ export const columns: BasicColumn[] = [
},
{
title: '所属分部',
dataIndex: 'saleOrgId',
dataIndex: 'saleOrgIdList',
sorter: true,
width: 150,
customRender: ({ text }) => {
let RText = ''
DeptList.forEach((e) => {
if (e.value == text) {
RText = e.label
text.forEach((item) => {
if (e.value == item) {
RText = RText == '' ? e.label : `${RText},${e.label}`
}
})
})
return RText
},
},
@ -464,6 +466,12 @@ export const columns: BasicColumn[] = [
// },
]
export const searchFormSchema: FormSchema[] = [
{
field: 'description',
label: '客户全称',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'shortName',
label: '客户简称',
@ -472,7 +480,7 @@ export const searchFormSchema: FormSchema[] = [
},
{
field: 'codeName',
label: '客户代码',
label: '助记码',
component: 'Input',
colProps: { span: 4 },
},
@ -482,12 +490,7 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input',
colProps: { span: 4 },
},
{
field: 'description',
label: '客户全称',
component: 'Input',
colProps: { span: 4 },
},
{
field: 'registrationNo',
label: '企业备案号',
@ -521,9 +524,25 @@ export const formSchema: FormSchema[] = [
defaultValue: '',
show: false,
},
{
field: 'description',
label: '客户全称',
// required: true,
component: 'Input',
defaultValue: '',
colProps: { span: 4 },
},
{
field: 'enFullName',
label: '客户英文全称',
// required: true,
component: 'Input',
defaultValue: '',
colProps: { span: 8 },
},
{
field: 'codeName',
label: '客户代码',
label: '助记码',
required: true,
component: 'Input',
defaultValue: '',
@ -549,14 +568,6 @@ export const formSchema: FormSchema[] = [
colProps: { span: 4 },
},
{
field: 'description',
label: '客户全称',
// required: true,
component: 'Input',
defaultValue: '',
colProps: { span: 4 },
},
{
field: 'organizationCode',
label: '社会信用代码',
@ -573,14 +584,6 @@ export const formSchema: FormSchema[] = [
defaultValue: '',
colProps: { span: 4 },
},
{
field: 'enFullName',
label: '客户英文全称',
// required: true,
component: 'Input',
defaultValue: '',
colProps: { span: 8 },
},
{
field: 'pcorpName',
label: '所属集团名称',
@ -624,22 +627,6 @@ export const formSchema: FormSchema[] = [
}
},
},
{
field: 'saleOrgId',
label: '所属分部',
// required: true,
component: 'Select',
defaultValue: '',
colProps: { span: 4 },
componentProps: {
options: DeptList,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
},
},
{
field: 'registrationNo',
label: '企业备案号',
@ -892,7 +879,6 @@ export const formSchema: FormSchema[] = [
return !values.isOverdueDeduction
},
},
{
field: 'status',
label: '是否可用',
@ -945,6 +931,19 @@ export const formSchema: FormSchema[] = [
unCheckedChildren: '否',
},
},
{
field: 'saleOrgIdList',
label: '所属分部',
// required: true,
component: 'Select',
colProps: { span: 4 },
componentProps: {
options: DeptList,
allowClear: true,
mode: 'multiple',
class: 'NoLimitHeight',
},
},
{
label: '客户属性',
field: 'ArrclientTag',
@ -1410,7 +1409,7 @@ export const form3columns: BasicColumn[] = [
width: 200,
},
{
title: '账期起算日',
title: '账期标准',
dataIndex: 'accountStartDate',
width: 200,
},

@ -1,8 +1,7 @@
<template>
<div>
<BasicTable class="ds-table-detail" @register="registerTable">
<template #tableTitle>
<span class="title">固定费用列表</span>
<template #toolbar>
<a-button type="link" @click="handleCreate">
<span class="iconfont icon-new_document"></span>
新建
@ -59,7 +58,7 @@
})
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
title: '',
title: '固定费用列表',
// api: getSysDictTypeList,
api: async (p) => {
const res: API.DataResult = await getFeeCustTemplateDetailList(p)

@ -1,8 +1,7 @@
<template>
<div>
<BasicTable class="ds-table-detail" @register="registerTable">
<template #tableTitle>
<span class="title">客户参数列表</span>
<template #toolbar>
<a-button type="link" @click="handleCreate">
<span class="iconfont icon-new_document"></span>
新建
@ -58,6 +57,7 @@
},
})
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
title: '客户参数列表',
api: async (p) => {
const res: API.DataResult = await GetClientParamList(p)
return new Promise((resolve) => {

@ -1,7 +1,7 @@
<template>
<div>
<BasicTable class="ds-table" @register="registerTable" @row-dbClick="handleAudit">
<template #tableTitle>
<template #toolbar>
<a-button
v-repeat
type="link"

@ -2,19 +2,29 @@ import { BasicColumn, FormSchema } from '/@/components/Table'
import { getOptions } from '/@/hooks/dict'
import { Tag } from 'ant-design-vue'
export const columns: BasicColumn[] = [
// {
// title: '代码',
// dataIndex: 'codeName',
// width: 150,
// },
// {
// title: '简称',
// dataIndex: 'shortName',
// width: 200,
// },
{
title: '代码',
dataIndex: 'codeName',
width: 150,
title: '姓名',
dataIndex: 'name',
width: 200,
},
{
title: '简称',
dataIndex: 'shortName',
title: '英文名',
dataIndex: 'enName',
width: 200,
},
{
title: '职务',
dataIndex: 'job',
title: '岗位',
dataIndex: 'Jobs',
width: 200,
},
{
@ -194,28 +204,51 @@ export const formSchema: FormSchema[] = [
show: false,
},
{
field: 'codeName',
label: '代码',
field: 'name',
label: '姓名',
component: 'Input',
required: true,
colProps: { span: 12 },
componentProps: {
maxlength: 6,
},
},
{
field: 'shortName',
label: '简称',
field: 'enName',
label: '英文名',
component: 'Input',
required: true,
colProps: { span: 12 },
},
// {
// field: 'codeName',
// label: '代码',
// component: 'Input',
// required: true,
// colProps: { span: 12 },
// componentProps: {
// maxlength: 6,
// },
// },
// {
// field: 'shortName',
// label: '简称',
// component: 'Input',
// required: true,
// colProps: { span: 12 },
// },
{
field: 'job',
label: '职务',
component: 'Input',
field: 'Jobs',
label: '岗位',
// component: 'Input',
// colProps: { span: 12 },
// defaultValue: '',
// required: true,
component: 'Select',
colProps: { span: 12 },
defaultValue: '',
componentProps: {
options: [],
allowClear: true,
mode: 'multiple',
class: 'NoLimitHeight',
},
},
{
field: 'address',
@ -259,46 +292,46 @@ export const formSchema: FormSchema[] = [
colProps: { span: 12 },
defaultValue: '',
},
{
label: '船公司名称',
field: 'carrier',
component: 'Input',
show: false,
},
{
label: '船公司',
field: 'carrierId',
labelSlot: 'carrierId',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 12 },
componentProps: ({ formModel }) => {
return {
allowClear: true,
showSearch: true,
api: () => {
return new Promise((resolve) => {
const arr = getOptions('carrier')
resolve(arr)
})
},
labelField: 'name',
showName: 'shortName',
valueField: 'id',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (obj) {
formModel.carrier = obj.label
} else {
formModel.carrier = ''
}
},
}
},
},
// {
// label: '船公司名称',
// field: 'carrier',
// component: 'Input',
// show: false,
// },
// {
// label: '船公司',
// field: 'carrierId',
// labelSlot: 'carrierId',
// component: 'ApiSelect',
// required: false,
// dynamicDisabled: false,
// colProps: { span: 12 },
// componentProps: ({ formModel }) => {
// return {
// allowClear: true,
// showSearch: true,
// api: () => {
// return new Promise((resolve) => {
// const arr = getOptions('carrier')
// resolve(arr)
// })
// },
// labelField: 'name',
// showName: 'shortName',
// valueField: 'id',
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// onChange: (e, obj) => {
// if (obj) {
// formModel.carrier = obj.label
// } else {
// formModel.carrier = ''
// }
// },
// }
// },
// },
{
field: 'isOperator',
label: '是否为操作',

@ -1,8 +1,7 @@
<template>
<div>
<BasicTable class="ds-table-detail" @register="registerTable">
<template #tableTitle>
<span class="title">客户联系人列表</span>
<template #toolbar>
<a-button type="link" @click="handleCreate">
<span class="iconfont icon-new_document"></span>
添加客户联系人
@ -50,7 +49,7 @@
})
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
title: '',
title: '客户联系人列表',
api: async (p) => {
const res: API.DataResult = await ApiList(p)
return new Promise((resolve) => {

@ -132,7 +132,7 @@ export const formSchema: FormSchema[] = [
},
{
field: 'name',
label: '称',
label: '公司全称',
component: 'Input',
colProps: { span: 12 },
},

@ -1,8 +1,7 @@
<template>
<div>
<BasicTable class="ds-table-detail" @register="registerTable">
<template #tableTitle>
<span class="title">客户收发货人列表</span>
<template #toolbar>
<a-button type="link" @click="handleCreate">
<span class="iconfont icon-new_document"></span>
添加客户收发货人
@ -50,7 +49,7 @@
})
const [registerModal, { openModal }] = useModal()
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
title: '',
title: '客户收发货人列表',
api: async (p) => {
const res: API.DataResult = await ApiList(p)
return new Promise((resolve) => {

@ -39,7 +39,7 @@ function RaccountTypeLabel(values) {
return RData
}
// 账期起算日 字典
// 账期标准 字典
const accountStartDateList = await getDictOption('infoclient_business_accountStartDate')
export const columns: BasicColumn[] = [
{
@ -109,7 +109,7 @@ export const columns: BasicColumn[] = [
},
},
{
title: '账期起算日',
title: '账期标准',
dataIndex: 'accountStartDate',
width: 200,
customRender: ({ text }) => {
@ -282,7 +282,7 @@ export const formSchema: FormSchema[] = [
},
{
field: 'accountStartDate',
label: '账期起算日',
label: '账期标准',
component: 'Select',
colProps: { span: 12 },
defaultValue: '',

@ -2,7 +2,13 @@
<div>
<BasicTable class="ds-table-detail" @register="registerTable" :maxHeight="350">
<template #tableTitle>
<span class="title">账期信息</span>
<span>账期信息</span>
<a-button type="link" @click="FnAppendix" :disabled="Fndisabled()">
<span class="iconfont icon-fujian1"></span>
合同附件
</a-button>
</template>
<template #toolbar>
<a-button type="link" @click="handleCreate" :disabled="Fndisabled()">
<span class="iconfont icon-new_document"></span>
添加
@ -18,10 +24,6 @@
删除
</a-button>
</a-popconfirm>
<a-button type="link" @click="FnAppendix" :disabled="Fndisabled()">
<span class="iconfont icon-fujian1"></span>
合同附件
</a-button>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
@ -40,7 +42,7 @@
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
<a-modal v-model:visible="visible" title="合同附件" @ok="handleOk">
<div style="width: 400px">
<DsFile ref="dsFile" :id="props.clientId" />
<DsFile ref="dsFile" fileType="infoclient" :id="props.clientId" />
</div>
</a-modal>
</div>
@ -62,7 +64,6 @@
const visible = ref(false)
const [registerTable, { reload, setTableData, getForm, getPaginationRef, getSelectRows }] =
useTable({
title: '',
api: async (p) => {
const res: API.DataResult = await ApiList(p)
return new Promise((resolve) => {

@ -9,17 +9,17 @@ export const columns: BasicColumn[] = [
{
title: '中文名称',
dataIndex: 'cnName',
width: 150
width: 150,
},
{
title: '英文名称',
dataIndex: 'serviceName',
width: 150
width: 150,
},
{
title: 'EDI代码',
dataIndex: 'ediCode',
width: 120
width: 120,
},
{
title: '是否可用',
@ -32,13 +32,13 @@ export const columns: BasicColumn[] = [
return <Tag color="error"></Tag>
}
return text
}
},
},
{
title: '备注',
dataIndex: 'note',
width: 200
}
width: 200,
},
]
export const searchFormSchema: FormSchema[] = [
@ -46,14 +46,14 @@ export const searchFormSchema: FormSchema[] = [
field: 'cnName',
label: '中文名称',
colProps: { span: 6 },
component: 'Input'
component: 'Input',
},
{
field: 'ediCode',
label: 'EDI代码',
colProps: { span: 6 },
component: 'Input'
}
component: 'Input',
},
]
export const formSchema: FormSchema[] = [
{
@ -61,37 +61,42 @@ export const formSchema: FormSchema[] = [
field: 'id',
component: 'Input',
defaultValue: '',
show: false
show: false,
},
{
field: 'cnName',
label: '中文名称',
colProps: { span: 6 },
component: 'Input'
component: 'Input',
},
{
field: 'serviceName',
label: '英文名称',
colProps: { span: 6 },
component: 'Input'
required: true,
component: 'Input',
},
{
field: 'ediCode',
label: 'EDI代码',
colProps: { span: 6 },
component: 'Input'
required: true,
component: 'Input',
componentProps: {
maxlength: 5,
},
},
{
field: 'status',
label: '是否可用',
component: 'Switch',
slot: 'status',
colProps: { span: 6 }
colProps: { span: 6 },
},
{
field: 'note',
label: '备注',
component: 'InputTextArea',
colProps: { span: 24 }
}
colProps: { span: 24 },
},
]

@ -11,12 +11,10 @@
<!-- 币别表单 -->
<BasicForm @register="registerForm">
<template #status="{ model }">
<a-switch
v-model:checked="model.status"
:checkedValue="1"
:unCheckedValue="0"
/>
<span class="s-txt" :class="{ 's-active': model.status == 0 }">{{ model.status == 1 ? '可用' : '禁用'}}</span>
<a-switch v-model:checked="model.status" :checkedValue="1" :unCheckedValue="0" />
<span class="s-txt" :class="{ 's-active': model.status == 0 }">{{
model.status == 1 ? '可用' : '禁用'
}}</span>
</template>
</BasicForm>
<!--右下角按钮-->
@ -69,19 +67,19 @@
const loading = ref(false)
const rowId = ref('')
const { createMessage } = useMessage()
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] =
useForm({
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] = useForm({
labelWidth: 100,
schemas: formSchema,
showActionButtonGroup: false,
})
const [registerModal, { setModalProps, closeModal, updateFormField }] = useModalInner(async (data) => {
const [registerModal, { setModalProps, closeModal, updateFormField }] = useModalInner(
async (data) => {
resetFields()
setModalProps({ confirmLoading: false, loading: true })
isUpdate.value = !!data?.isUpdate
if (unref(isUpdate)) {
setModalProps({ confirmLoading: true });
setModalProps({ confirmLoading: true })
updateFormField(updateSchema)
rowId.value = data.record.id
const res: API.DataResult = await GetCodeServiceInfo({ id: unref(rowId) })
@ -94,7 +92,8 @@
setFieldsValue({ permissionIdentity: unref(2) })
}
setModalProps({ loading: false })
})
},
)
const getTitle = computed(() => (!unref(isUpdate) ? '新增' : '编辑'))
@ -108,11 +107,10 @@
if (res.succeeded) {
createMessage.success(res.message)
emit('success')
} else {
createMessage.error(res.message)
}
exit && closeModal()
} finally {
loading.value = false
setModalProps({ confirmLoading: false, loading: false })
}
}
@ -122,11 +120,11 @@
.s-txt {
font-size: 12px;
margin-left: 10px;
color: #7A8798;
color: #7a8798;
position: relative;
top: 1px;
}
.s-active {
color: #257AFA;
color: #257afa;
}
</style>
Loading…
Cancel
Save