From c935c610f0a070794c1f74eec1cdddd6f30bd9a8 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: Thu, 18 Jul 2024 09:44:41 +0800 Subject: [PATCH] 07/18 --- src/design/iconfont.less | 6 ++++ src/design/index.less | 1 + src/views/baseinfo/ctn/api.ts | 10 +++++- src/views/baseinfo/ctn/index.vue | 35 ++++++++++++++++++-- src/views/baseinfo/frt/api.ts | 10 +++++- src/views/baseinfo/frt/index.vue | 35 ++++++++++++++++++-- src/views/baseinfo/issuetype/api.ts | 11 ++++++- src/views/baseinfo/issuetype/index.vue | 35 ++++++++++++++++++-- src/views/baseinfo/package/api.ts | 10 +++++- src/views/baseinfo/package/index.vue | 44 ++++++++++++------------- src/views/operation/seaexport/index.vue | 13 +++----- 11 files changed, 170 insertions(+), 40 deletions(-) create mode 100644 src/design/iconfont.less diff --git a/src/design/iconfont.less b/src/design/iconfont.less new file mode 100644 index 00000000..7eb6960b --- /dev/null +++ b/src/design/iconfont.less @@ -0,0 +1,6 @@ +.icon-locksuo { + color: #17a6a3; +} +.icon-lock-openkaisuo { + color: #7a8798; +} diff --git a/src/design/index.less b/src/design/index.less index 77275869..645dcbc4 100644 --- a/src/design/index.less +++ b/src/design/index.less @@ -3,6 +3,7 @@ @import 'public.less'; @import 'ant/index.less'; @import './theme.less'; +@import './iconfont.less'; input:-webkit-autofill { box-shadow: 0 0 0 1000px white inset !important; diff --git a/src/views/baseinfo/ctn/api.ts b/src/views/baseinfo/ctn/api.ts index 7288780d..6393298f 100644 --- a/src/views/baseinfo/ctn/api.ts +++ b/src/views/baseinfo/ctn/api.ts @@ -5,6 +5,7 @@ enum Api { list = '/mainApi/CodeCtn/GetCodeCtnList', edit = '/mainApi/CodeCtn/EditCodeCtn', info = '/mainApi/CodeCtn/GetCodeCtnInfo', + del = '/mainApi/CodeCtn/BatchDelCodeCtn', BasicsList = '/mainApi/CodeCtn/GetBasicsCodeCtnList', ExistList = '/mainApi/CodeCtn/GetExistCodeCtnList', @@ -34,7 +35,14 @@ export function ApiInfo(query) { params: query, }) } - +// 批量删除 (Auth) +export function ApiDel(data: PageRequest) { + return request({ + url: Api.del, + method: 'post', + data, + }) +} // 获取商品类型列表-基础库 (Auth) export function ApiBasicsList(data: PageRequest) { return request({ diff --git a/src/views/baseinfo/ctn/index.vue b/src/views/baseinfo/ctn/index.vue index 641be412..288d90df 100644 --- a/src/views/baseinfo/ctn/index.vue +++ b/src/views/baseinfo/ctn/index.vue @@ -6,6 +6,17 @@ 添加集装箱信息 + + + + 删除集装箱信息 + + 导入集装箱信息 @@ -43,7 +54,7 @@ import { checkPermissions } from '/@/hooks/Permissions/index' import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table' import ImportFlow from './importFlow.vue' - import { ApiList, ApiImport } from './api' + import { ApiList, ApiImport, ApiDel } from './api' import { useModal } from '/@/components/Modal' import TenantAuditStepModal from './TenantAuditStepModal.vue' import { columns, searchFormSchema } from './columns' @@ -52,7 +63,7 @@ const visible = ref(false) const refImportFlow = ref() const [registerModal, { openModal }] = useModal() - const [registerTable, { reload, getForm, getPaginationRef }] = useTable({ + const [registerTable, { reload, getForm, getSelectRows }] = useTable({ title: '集装箱信息列表', api: async (p) => { const res: API.DataResult = await ApiList(p) @@ -116,6 +127,26 @@ fixed: 'right', }, }) + function handleDel() { + const select = getSelectRows() + let ApiData: any = { + ids: [], + } + if (select.length === 0) { + notification.warning({ message: '请至少选择一条数据', duration: 3 }) + return false + } else { + ApiData.ids = select.map((item) => { + return item.id + }) + } + + ApiDel(ApiData).then((res) => { + console.log(res) + notification.success({ message: res.message, duration: 3 }) + reload() + }) + } function handleCreate() { openModal(true, { isParent: false, diff --git a/src/views/baseinfo/frt/api.ts b/src/views/baseinfo/frt/api.ts index d509f0cb..9523e1ff 100644 --- a/src/views/baseinfo/frt/api.ts +++ b/src/views/baseinfo/frt/api.ts @@ -5,6 +5,7 @@ enum Api { list = '/mainApi/CodeFrt/GetCodeFrtList', edit = '/mainApi/CodeFrt/EditCodeFrt', info = '/mainApi/CodeFrt/GetCodeFrtInfo', + del = '/mainApi/CodeFrt/BatchDelCodeFrt', BasicsList = '/mainApi/CodeFrt/GetBasicsCodeFrtList', ExistList = '/mainApi/CodeFrt/GetExistCodeFrtList', @@ -34,7 +35,14 @@ export function ApiInfo(query) { params: query, }) } - +// 批量删除 (Auth) +export function ApiDel(data: PageRequest) { + return request({ + url: Api.del, + method: 'post', + data, + }) +} // 获取商品类型列表-基础库 (Auth) export function ApiBasicsList(data: PageRequest) { return request({ diff --git a/src/views/baseinfo/frt/index.vue b/src/views/baseinfo/frt/index.vue index 2630fade..5dd07d95 100644 --- a/src/views/baseinfo/frt/index.vue +++ b/src/views/baseinfo/frt/index.vue @@ -6,6 +6,17 @@ 添加付费方式 + + + + 删除付费方式 + + 导入付费方式 @@ -43,7 +54,7 @@ import { checkPermissions } from '/@/hooks/Permissions/index' import { BasicTable, useTable, TableAction } from '/@/components/Table' import ImportFlow from './importFlow.vue' - import { ApiList, ApiImport } from './api' + import { ApiList, ApiImport, ApiDel } from './api' import { useModal } from '/@/components/Modal' import TenantAuditStepModal from './TenantAuditStepModal.vue' import { columns, searchFormSchema } from './columns' @@ -52,7 +63,7 @@ const visible = ref(false) const refImportFlow = ref() const [registerModal, { openModal }] = useModal() - const [registerTable, { reload, getForm }] = useTable({ + const [registerTable, { reload, getForm, getSelectRows }] = useTable({ title: '', api: async (p) => { const res: API.DataResult = await ApiList(p) @@ -116,6 +127,26 @@ fixed: 'right', }, }) + function handleDel() { + const select = getSelectRows() + let ApiData: any = { + ids: [], + } + if (select.length === 0) { + notification.warning({ message: '请至少选择一条数据', duration: 3 }) + return false + } else { + ApiData.ids = select.map((item) => { + return item.id + }) + } + + ApiDel(ApiData).then((res) => { + console.log(res) + notification.success({ message: res.message, duration: 3 }) + reload() + }) + } function handleCreate() { openModal(true, { isParent: false, diff --git a/src/views/baseinfo/issuetype/api.ts b/src/views/baseinfo/issuetype/api.ts index 50a107ae..bb51d485 100644 --- a/src/views/baseinfo/issuetype/api.ts +++ b/src/views/baseinfo/issuetype/api.ts @@ -5,6 +5,8 @@ enum Api { list = '/mainApi/CodeIssueType/GetCodeIssueTypeList', edit = '/mainApi/CodeIssueType/EditCodeIssueType', info = '/mainApi/CodeIssueType/GetCodeIssueTypeInfo', + del = '/mainApi/CodeIssueType/BatchDelCodeIssueType', + BasicsList = '/mainApi/CodeIssueType/GetBasicsCodeIssueTypeList', ExistList = '/mainApi/CodeIssueType/GetExistCodeIssueTypeList', Import = '/mainApi/CodeIssueType/ImportCodeIssueType', @@ -33,7 +35,14 @@ export function ApiInfo(query) { params: query, }) } - +// 批量删除 (Auth) +export function ApiDel(data: PageRequest) { + return request({ + url: Api.del, + method: 'post', + data, + }) +} // 获取商品类型列表-基础库 (Auth) export function ApiBasicsList(data: PageRequest) { return request({ diff --git a/src/views/baseinfo/issuetype/index.vue b/src/views/baseinfo/issuetype/index.vue index 0e4548f4..e12524c7 100644 --- a/src/views/baseinfo/issuetype/index.vue +++ b/src/views/baseinfo/issuetype/index.vue @@ -10,6 +10,17 @@ 添加签单方式 + + + + 删除签单方式 + + (false) const refImportFlow = ref() const [registerModal, { openModal }] = useModal() - const [registerTable, { reload, getForm, getPaginationRef }] = useTable({ + const [registerTable, { reload, getForm, getSelectRows }] = useTable({ title: '签单方式列表', api: async (p) => { const res: API.DataResult = await ApiList(p) @@ -124,6 +135,26 @@ fixed: 'right', }, }) + function handleDel() { + const select = getSelectRows() + let ApiData: any = { + ids: [], + } + if (select.length === 0) { + notification.warning({ message: '请至少选择一条数据', duration: 3 }) + return false + } else { + ApiData.ids = select.map((item) => { + return item.id + }) + } + + ApiDel(ApiData).then((res) => { + console.log(res) + notification.success({ message: res.message, duration: 3 }) + reload() + }) + } function handleCreate() { openModal(true, { isParent: false, diff --git a/src/views/baseinfo/package/api.ts b/src/views/baseinfo/package/api.ts index bb711f52..2ae93e59 100644 --- a/src/views/baseinfo/package/api.ts +++ b/src/views/baseinfo/package/api.ts @@ -5,7 +5,7 @@ enum Api { list = '/mainApi/CodePackage/GetCodePackageList', edit = '/mainApi/CodePackage/EditCodePackage', info = '/mainApi/CodePackage/GetCodePackageInfo', - // del = '/mainApi/CodeGoods/BatchDelCodeGoods', + del = '/mainApi/CodePackage/BatchDelCodePackage', BasicsList = '/mainApi/CodePackage/GetBasicsCodePackageList', ExistList = '/mainApi/CodePackage/GetExistCodePackageList', @@ -35,6 +35,14 @@ export function ApiInfo(query) { params: query, }) } +// 批量删除 (Auth) +export function ApiDel(data: PageRequest) { + return request({ + url: Api.del, + method: 'post', + data, + }) +} // 获取商品类型列表-基础库 (Auth) export function ApiBasicsList(data: PageRequest) { diff --git a/src/views/baseinfo/package/index.vue b/src/views/baseinfo/package/index.vue index 56c8c9b6..fb74e7c7 100644 --- a/src/views/baseinfo/package/index.vue +++ b/src/views/baseinfo/package/index.vue @@ -6,7 +6,7 @@ 添加包装类型 - + 导入包装类型 @@ -54,7 +54,7 @@ import { checkPermissions } from '/@/hooks/Permissions/index' import { BasicTable, useTable, TableAction } from '/@/components/Table' import ImportFlow from './importFlow.vue' - import { ApiList, ApiImport } from './api' + import { ApiList, ApiImport, ApiDel } from './api' import { useModal } from '/@/components/Modal' import TenantAuditStepModal from './TenantAuditStepModal.vue' import { columns, searchFormSchema } from './columns' @@ -127,26 +127,26 @@ fixed: 'right', }, }) - // function handleDel() { - // const select = getSelectRows() - // let ApiData: any = { - // ids: [], - // } - // if (select.length === 0) { - // notification.warning({ message: '请至少选择一条数据', duration: 3 }) - // return false - // } else { - // ApiData.ids = select.map((item) => { - // return item.id - // }) - // } + function handleDel() { + const select = getSelectRows() + let ApiData: any = { + ids: [], + } + if (select.length === 0) { + notification.warning({ message: '请至少选择一条数据', duration: 3 }) + return false + } else { + ApiData.ids = select.map((item) => { + return item.id + }) + } - // ApiDel(ApiData).then((res) => { - // console.log(res) - // notification.success({ message: res.message, duration: 3 }) - // reload() - // }) - // } + ApiDel(ApiData).then((res) => { + console.log(res) + notification.success({ message: res.message, duration: 3 }) + reload() + }) + } function handleCreate() { openModal(true, { isParent: false, diff --git a/src/views/operation/seaexport/index.vue b/src/views/operation/seaexport/index.vue index 80c12363..c648e2c8 100644 --- a/src/views/operation/seaexport/index.vue +++ b/src/views/operation/seaexport/index.vue @@ -55,16 +55,16 @@