From 28e3047e4dc5a4fc9b950627df00645ff5124c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <14166000+zhangtonghai@user.noreply.gitee.com> Date: Mon, 28 Oct 2024 17:11:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=B1=E7=AE=A1=E8=B0=83=E6=95=B4=20?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=20=E7=A6=85=E9=81=93=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/File/index.vue | 32 +++++++----- .../TemplatImport/TenantAuditStepModal.vue | 49 +++++++++++++++++-- .../TemplatImport/columns.tsx | 2 +- src/views/baseinfo/infoclient/EditColumns.tsx | 11 ++--- .../infoclient/TenantAuditStepModal.vue | 10 ++-- src/views/baseinfo/infoclient/columns.tsx | 17 ++----- 6 files changed, 80 insertions(+), 41 deletions(-) diff --git a/src/components/File/index.vue b/src/components/File/index.vue index 7a106f19..47df66ec 100644 --- a/src/components/File/index.vue +++ b/src/components/File/index.vue @@ -23,6 +23,7 @@ label="文件类型" name="typeCode" :rules="[{ required: true, message: '请选择文件类型!' }]" + v-show="!dynamicDisabled" > ({ + typeCode: '', + typeName: '', + fileList: [], + }) // 初始化数据 const init = () => { let code = props.fileType ? `${props.fileType}_file_type` : 'file_type' - console.log(code) getDictOption(code).then((res) => { - console.log(res) fileTypeList.value = res + visible.value = true + formData.typeCode = props.dynamicDisabled + fileTypeList.value.forEach((e: any) => { + if (e.value == props.dynamicDisabled) { + formData.typeName = e.label + } + }) }) - visible.value = true } // 要上传的附件集合 const upFileList = ref([]) - const formData = reactive({ - typeCode: '', - typeName: '', - fileList: [], - }) + const fields = ref([]) function handleRemove(file: any) { const index = upFileList.value.indexOf(file) - console.log(index) const newFileList = upFileList.value.slice() newFileList.splice(index, 1) upFileList.value = newFileList @@ -175,7 +186,6 @@ } // 选择类型 const changeHandle = (v, obj) => { - console.log(v) const row = fileTypeList.value.filter((item) => { return item.value == v }) @@ -219,13 +229,13 @@ upFileList.value = [] if (props.showFileList) { dsFileList.value.init() + emits('handleSuccess', { id: res.data }) } else { emits('handleSuccess') } createMessage.success('上传成功!') }) .catch((res) => { - console.log(res) loading.value = false createMessage.error('上传失败!') }) diff --git a/src/views/ContainerManagement/TemplatImport/TenantAuditStepModal.vue b/src/views/ContainerManagement/TemplatImport/TenantAuditStepModal.vue index e528b672..4e39436f 100644 --- a/src/views/ContainerManagement/TemplatImport/TenantAuditStepModal.vue +++ b/src/views/ContainerManagement/TemplatImport/TenantAuditStepModal.vue @@ -55,9 +55,11 @@ { list.value.push({ ...item, selected: false }) + console.log(item.cntrno) + if (item.isOnlineId != 1) { + MessageArr.push(item.cntrno) + } }) + if (MessageArr.length) { + let txt = `有${MessageArr.length}个箱号存在问题 需人工处理:` + for (let i = 0; i < 5; i++) { + if (MessageArr[i]) { + txt = i == 0 ? `${txt} ${MessageArr[i]}` : `${txt},\n${MessageArr[i]}` + } + } + notification.warning({ + message: MessageArr.length > 5 ? `${txt}...` : txt, + duration: 6000, + }) + } else if (list.value.length) { + createMessage.success('全部识别成功,自动生成变动。') + } } } @@ -214,6 +234,22 @@ dsFile.value.openFileModel() } } + function handleSuccess(data) { + const id = data.id.split('.')[0] + let ApiData: any = { + id: unref(rowId), + formName: 'CM_State_Change_TemplatImport', + tableName: '', + fileId: id, + } + ApiDealExcel(ApiData).then((res) => { + if (res.succeeded) { + activeKey.value = '1' + refresh(true) + notification.success({ message: res.message, duration: 3 }) + } + }) + } async function DealExcel() { if (!rowId.value) { await handleSave(false) @@ -228,7 +264,7 @@ ApiDealExcel(ApiData).then((res) => { if (res.succeeded) { activeKey.value = '1' - refresh() + refresh(true) notification.success({ message: res.message, duration: 3 }) } }) @@ -374,6 +410,11 @@ width: 120, data: 'ctnFlowState', }, + { + title: '状态日期', + width: 120, + data: 'changeTime', + }, { title: '当前箱业务状态', width: 120, diff --git a/src/views/ContainerManagement/TemplatImport/columns.tsx b/src/views/ContainerManagement/TemplatImport/columns.tsx index c77f03cf..7810f2e0 100644 --- a/src/views/ContainerManagement/TemplatImport/columns.tsx +++ b/src/views/ContainerManagement/TemplatImport/columns.tsx @@ -66,7 +66,7 @@ export const formSchema: FormSchema[] = [ label: '模板名称', field: 'templetName', component: 'ApiSelect', - required: false, + required: true, dynamicDisabled: false, colProps: { span: 6 }, componentProps: ({ formModel }) => { diff --git a/src/views/baseinfo/infoclient/EditColumns.tsx b/src/views/baseinfo/infoclient/EditColumns.tsx index 9cf12ddc..50527bb5 100644 --- a/src/views/baseinfo/infoclient/EditColumns.tsx +++ b/src/views/baseinfo/infoclient/EditColumns.tsx @@ -195,16 +195,13 @@ export const EditformSchema: FormSchema[] = [ label: '注册资金', component: 'DEdit', colProps: { span: 4 }, - defaultValue: 0, + defaultValue: '0', componentProps: (e) => { return { onEdit: () => { const { formActionType } = e formActionType ? formActionType.linkageForm(e) : null }, - min: '0', - step: '0.01', - stringMode: true, } }, }, @@ -216,10 +213,10 @@ export const EditformSchema: FormSchema[] = [ colProps: { span: 4 }, componentProps: (e) => { return { - showTime: true, + showTime: false, allowClear: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', onEdit: () => { const { formActionType } = e formActionType ? formActionType.linkageForm(e) : null diff --git a/src/views/baseinfo/infoclient/TenantAuditStepModal.vue b/src/views/baseinfo/infoclient/TenantAuditStepModal.vue index 4d7c05e0..413db78b 100644 --- a/src/views/baseinfo/infoclient/TenantAuditStepModal.vue +++ b/src/views/baseinfo/infoclient/TenantAuditStepModal.vue @@ -111,12 +111,13 @@ +
@@ -360,6 +361,7 @@ const CustomerOrSupplier = ref('') // 获取表单设置数据 const getFormSet = async () => { + console.log(permissionsInfo(), 11111111111111111) let res: any = await GetFormSetListByModule({ permissionId: permissionsInfo().permissionId }) if (res.succeeded) { const { data } = res @@ -408,8 +410,6 @@ ChangeArrclientTag(false) }) function ChangeArrclientTag(type) { - console.log(type, 11111111111111) - // 委托单位 国外发货人 通知人 经营单位 国内发货人 国内同行 国外同行 国内直客,国外直客、指定货发货人 个人 约主 const ArrclientTagList = [ 'isController', @@ -616,8 +616,6 @@ } const linkageForm = (e) => { - console.log(e) - let Data = DIYformSchema.value.length ? DIYformSchema.value : formSchema Data.forEach((item) => { if (item.field == e.schema.field) { diff --git a/src/views/baseinfo/infoclient/columns.tsx b/src/views/baseinfo/infoclient/columns.tsx index 21be2de6..256d0a07 100644 --- a/src/views/baseinfo/infoclient/columns.tsx +++ b/src/views/baseinfo/infoclient/columns.tsx @@ -643,16 +643,9 @@ export const formSchema: FormSchema[] = [ { field: 'registeredCapital', label: '注册资金', - component: 'InputNumber', + component: 'Input', colProps: { span: 4 }, - defaultValue: 0, - componentProps: () => { - return { - min: '0', - step: '0.01', - stringMode: true, - } - }, + defaultValue: '0', }, { field: 'registrationTime', @@ -661,10 +654,10 @@ export const formSchema: FormSchema[] = [ colProps: { span: 4 }, componentProps: () => { return { - showTime: true, + showTime: false, allowClear: true, - format: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'YYYY-MM-DD HH:mm:ss', + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', } }, },