From 64f5fd29f85e6cd1b84b2fd905cd64409e582525 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: Wed, 14 Aug 2024 11:23:30 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A7=9F=E7=AE=B1=E7=A7=9F=E5=85=A5=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=E4=BB=A5=E5=8F=8A=E9=83=A8=E5=88=86=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=E5=AE=8C=E5=96=84=20=E7=AE=B1=E7=8A=B6=E6=80=81=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2=E5=AD=97=E6=AE=B5=E5=8F=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CurrentState/columns.tsx | 4 +-
.../CustFeeDui/TenantAuditStepModal.vue | 881 ------------------
.../ContainerManagement/CustFeeDui/api.ts | 127 ---
.../CustFeeDui/columns.tsx | 488 ----------
.../ContainerManagement/CustFeeDui/index.vue | 153 ---
.../RentIn/TenantAuditStepModal.vue | 78 +-
src/views/ContainerManagement/RentIn/api.ts | 9 -
.../ContainerManagement/RentIn/index.vue | 38 +-
8 files changed, 88 insertions(+), 1690 deletions(-)
delete mode 100644 src/views/ContainerManagement/CustFeeDui/TenantAuditStepModal.vue
delete mode 100644 src/views/ContainerManagement/CustFeeDui/api.ts
delete mode 100644 src/views/ContainerManagement/CustFeeDui/columns.tsx
delete mode 100644 src/views/ContainerManagement/CustFeeDui/index.vue
diff --git a/src/views/ContainerManagement/CurrentState/columns.tsx b/src/views/ContainerManagement/CurrentState/columns.tsx
index a1df805c..5d59d459 100644
--- a/src/views/ContainerManagement/CurrentState/columns.tsx
+++ b/src/views/ContainerManagement/CurrentState/columns.tsx
@@ -166,7 +166,7 @@ export const columns: BasicColumn[] = [
},
{
title: '状态时间',
- dataIndex: 'changeTime',
+ dataIndex: 'statetime',
sorter: true,
width: 200,
},
@@ -714,7 +714,7 @@ export const formSchema: FormSchema[] = [
},
},
{
- field: 'changeTime',
+ field: 'statetime',
label: '状态时间',
component: 'DatePicker',
colProps: { span: 6 },
diff --git a/src/views/ContainerManagement/CustFeeDui/TenantAuditStepModal.vue b/src/views/ContainerManagement/CustFeeDui/TenantAuditStepModal.vue
deleted file mode 100644
index 83bd68f5..00000000
--- a/src/views/ContainerManagement/CustFeeDui/TenantAuditStepModal.vue
+++ /dev/null
@@ -1,881 +0,0 @@
-
-
-
-
-
-
-
-
-
- 新增
-
-
-
-
- 删除
-
-
-
-
- 保存
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 确认执行
-
-
- 取消执行
-
- 取消
- 仅保存
- 保存并关闭
-
- 生成费用
-
-
-
-
-
-
diff --git a/src/views/ContainerManagement/CustFeeDui/api.ts b/src/views/ContainerManagement/CustFeeDui/api.ts
deleted file mode 100644
index 961999cf..00000000
--- a/src/views/ContainerManagement/CustFeeDui/api.ts
+++ /dev/null
@@ -1,127 +0,0 @@
-// @ts-ignore
-import { request } from '/@/utils/request'
-import { DataResult, PageRequest } from '/@/api/model/baseModel'
-enum Api {
- list = '/containerManagementApi/CM_RentIn/GetCM_RentInList',
- edit = '/containerManagementApi/CM_RentIn/EditCM_RentIn',
- info = '/containerManagementApi/CM_RentIn/GetCM_RentIn',
- del = '/containerManagementApi/CM_RentIn/DeleteCM_RentIn',
-
- listDetail = '/containerManagementApi/CM_RentIn_Detail/GetCM_RentIn_DetailList',
- editDetail = '/containerManagementApi/CM_RentIn_Detail/EditCM_RentIn_Detail',
- delDetail = '/containerManagementApi/CM_RentIn_Detail/DeleteCM_RentIn_Detail',
-
- Confirm = '/containerManagementApi/CM_RentIn/CM_RentIn_Confirm',
- Cancel = '/containerManagementApi/CM_RentIn/CM_RentIn_Cancel',
- MakeFee = '/containerManagementApi/CM_RentIn/CM_RentIn_MakeFee',
-
- DetailView = '/containerManagementApi/CM_RentIn/CM_RentIn_Detail_View',
- AddCtn = '/containerManagementApi/CM_RentIn/CM_RentIn_AddCtn',
-
-}
-// 租箱租入明细视图 (Auth)
-export function ApiDetailView(data: PageRequest) {
- return request({
- url: Api.DetailView,
- method: 'post',
- data,
- })
-}
-// 租箱租入退租_添加 (Auth)
-export function ApiAddCtn(data: PageRequest) {
- return request({
- url: Api.AddCtn,
- method: 'post',
- data,
- })
-}
-// 租箱租入_生成费用 (Auth)
-export function ApiMakeFee(data: PageRequest) {
- return request({
- url: Api.MakeFee,
- method: 'post',
- headers:{
- 'Content-Type':'application/json-patch+json'
- },
- data,
- })
-}
-// 租箱租入_确认 (Auth)
-export function ApiConfirm(data: PageRequest) {
- return request({
- url: Api.Confirm,
- method: 'post',
- headers:{
- 'Content-Type':'application/json-patch+json'
- },
- data,
- })
-}
-// 租箱租入_取消 (Auth)
-export function ApiCancel(data: PageRequest) {
- return request({
- url: Api.Cancel,
- method: 'post',
- headers:{
- 'Content-Type':'application/json-patch+json'
- },
- data,
- })
-}
-// 列表 (Auth)
-export function ApiList(data: PageRequest) {
- return request({
- url: Api.list,
- method: 'post',
- data,
- })
-}
-// 编辑 (Auth)
-export function ApiEdit(data: PageRequest) {
- return request({
- url: Api.edit,
- method: 'post',
- data,
- })
-}
-// 详情 (Auth)
-export function ApiInfo(query) {
- return request({
- url: Api.info,
- method: 'get',
- params: query,
- })
-}
-// 删除 (Auth)
-export function ApiDel(data: PageRequest) {
- return request({
- url: Api.del,
- method: 'post',
- data,
- })
-}
-
-// 列表详情 (Auth)
-export function ApiListDetail(data: PageRequest) {
- return request({
- url: Api.listDetail,
- method: 'post',
- data,
- })
-}
-// // 编辑详情 (Auth)
-// export function ApiEditDetail(data: PageRequest) {
-// return request({
-// url: Api.editDetail,
-// method: 'post',
-// data,
-// })
-// }
-// 删除详情 (Auth)
-export function ApiDelDetail(data: PageRequest) {
- return request({
- url: Api.delDetail,
- method: 'post',
- data,
- })
-}
\ No newline at end of file
diff --git a/src/views/ContainerManagement/CustFeeDui/columns.tsx b/src/views/ContainerManagement/CustFeeDui/columns.tsx
deleted file mode 100644
index fffb35e5..00000000
--- a/src/views/ContainerManagement/CustFeeDui/columns.tsx
+++ /dev/null
@@ -1,488 +0,0 @@
-import { ref } from 'vue'
-import { BasicColumn, FormSchema } from '/@/components/Table'
-import { Tag } from 'ant-design-vue'
-import { GetCtnSelectList, GetClientListByCode } from '/@/api/common'
-import { GetDeptList } from '/@/views/operation/seaexport/api/BookingLedger'
-import { useOptionsStore } from '/@/store/modules/options'
-const optionsStore = useOptionsStore()
-// 字典
-import { getDictOption } from '/@/utils/dictUtil'
-// 新旧箱数据
-const usedStateList = [
- {
- label: '',
- value: '',
- },
- {
- label: 'used',
- value: 'used',
- },
- {
- label: 'new',
- value: 'new',
- },
-]
-// 业务类型字典
-const businessTypeDict = ref([])
-getDictOption('CM_BusinessType').then((res) => {
- businessTypeDict.value = res
-})
-// 租箱类型字典
-const rentTypeIdDict = ref([])
-getDictOption('CM_RentType').then((res) => {
- rentTypeIdDict.value = res
-})
-
-export const columns: BasicColumn[] = [
- {
- title: '租箱业务号',
- dataIndex: 'billno',
- sorter: true,
- width: 150,
- },
- {
- title: '业务类型',
- dataIndex: 'businessType',
- sorter: true,
- width: 150,
- customRender: ({ text }) => {
- let RData = '-'
- businessTypeDict.value.forEach((item: any) => {
- if (text == item.value) {
- RData = item.label
- }
- })
- return RData
- },
- },
- {
- title: '租箱业务',
- dataIndex: 'rentDirect',
- sorter: true,
- width: 150,
- },
- {
- title: '租箱类型',
- dataIndex: 'rentTypeId',
- sorter: true,
- width: 150,
- customRender: ({ text }) => {
- let RData = '-'
- rentTypeIdDict.value.forEach((item: any) => {
- if (text == item.value) {
- RData = item.label
- }
- })
- return RData
- },
- },
- {
- title: '业务状态',
- dataIndex: 'billState',
- sorter: true,
- width: 200,
- },
- {
- title: '原箱主',
- dataIndex: 'oldContainerOwner',
- sorter: true,
- width: 200,
- },
- {
- title: '业务日期',
- dataIndex: 'bsdate',
- sorter: true,
- width: 200,
- },
- {
- title: '会计期间',
- dataIndex: 'accdate',
- sorter: true,
- width: 200,
- },
- {
- title: '业务锁定',
- dataIndex: 'isBusinessLocking',
- sorter: true,
- width: 200,
- customRender: ({ text }) => {
- if (text) {
- return 是
- } else {
- return 否
- }
- return text
- },
- },
- {
- title: '费用锁定',
- dataIndex: 'isFeeLocking',
- sorter: true,
- width: 200,
- customRender: ({ text }) => {
- if (text) {
- return 是
- } else {
- return 否
- }
- return text
- },
- },
- {
- title: '备注',
- dataIndex: 'remark',
- sorter: true,
- width: 200,
- },
-]
-
-export const searchFormSchema: FormSchema[] = [
- {
- field: 'billno',
- label: '租箱业务号',
- component: 'Input',
- colProps: { span: 4 },
- },
- {
- field: 'oldContainerOwner',
- label: '原箱主',
- component: 'ApiSelect',
- required: false,
- dynamicDisabled: false,
- colProps: { span: 4 },
- componentProps: ({ formModel }) => {
- return {
- allowClear: true,
- showSearch: true,
- api: GetClientListByCode,
- params: { code: 'leasing' },
- labelField: 'pinYinCode',
- showName: 'shortName',
- valueField: 'shortName',
- resultField: 'data',
- immediate: false,
- filterOption: (input: string, option: any) => {
- return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
- },
- }
- },
- },
-
- {
- field: 'rentDirectId',
- label: '租箱业务',
- component: 'ApiSelect',
- colProps: { span: 4 },
- componentProps: ({}) => {
- return {
- api: () => {
- return new Promise((resolve) => {
- getDictOption('CM_RentDirect').then((res) => {
- let data: any = []
- res.forEach((item) => {
- item.value = parseInt(item.value)
- if (!item.label.indexOf('租入')) {
- data.push(item)
- }
- })
- resolve(data)
- })
- })
- },
- labelField: 'label',
- valueField: 'value',
- resultField: 'data',
- filterOption: (input: string, option: any) => {
- return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
- },
- }
- },
- },
- {
- field: 'etd',
- label: 'ETD',
- component: 'DatePicker',
- colProps: { span: 4 },
- defaultValue: '',
- componentProps: {
- showTime: true,
- style: 'width:100%',
- },
- },
- {
- field: 'eta',
- label: 'ETA',
- component: 'DatePicker',
- colProps: { span: 4 },
- defaultValue: '',
- componentProps: {
- showTime: true,
- style: 'width:100%',
- },
- },
-]
-export const formSchema: FormSchema[] = [
- {
- label: '',
- field: 'id',
- component: 'Input',
- defaultValue: '',
- show: false,
- },
- {
- field: 'businessType',
- label: '业务类型',
- component: 'ApiSelect',
- colProps: { span: 6 },
- defaultValue: 101,
- dynamicDisabled: ({}) => {
- return true
- },
- componentProps: ({}) => {
- return {
- api: () => {
- return new Promise((resolve) => {
- getDictOption('CM_BusinessType').then((res) => {
- res.forEach((item) => {
- item.value = parseInt(item.value)
- })
- resolve(res)
- })
- })
- },
- labelField: 'label',
- valueField: 'value',
- resultField: 'data',
- filterOption: (input: string, option: any) => {
- return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
- },
- }
- },
- },
-
- {
- field: 'rentDirectId',
- label: '租箱业务',
- component: 'ApiSelect',
- colProps: { span: 6 },
- defaultValue: 0,
- componentProps: ({ formModel, formActionType }) => {
- return {
- api: () => {
- return new Promise((resolve) => {
- getDictOption('CM_RentDirect').then((res) => {
- let data: any = []
- res.forEach((item) => {
- console.log(item)
- item.value = parseInt(item.value)
- if (!item.label.indexOf('租入')) {
- data.push(item)
- }
- })
- resolve(data)
- })
- })
- },
- labelField: 'label',
- valueField: 'value',
- resultField: 'data',
- filterOption: (input: string, option: any) => {
- return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
- },
- onChange: (e, obj) => {
- formActionType ? formActionType.submit() : null
- if (e && obj) {
- formModel.rentDirect = obj.label
- } else {
- formModel.rentDirect = ''
- }
- },
- }
- },
- },
- {
- field: 'rentTypeId',
- label: '租箱类型',
- component: 'ApiSelect',
- colProps: { span: 6 },
- defaultValue: 1,
- componentProps: ({}) => {
- return {
- api: () => {
- return new Promise((resolve) => {
- getDictOption('CM_RentType').then((res) => {
- res.forEach((item) => {
- item.value = parseInt(item.value)
- })
- resolve(res)
- })
- })
- },
- labelField: 'label',
- valueField: 'value',
- resultField: 'data',
- filterOption: (input: string, option: any) => {
- return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
- },
- }
- },
- },
- {
- field: 'billState',
- label: '业务状态',
- component: 'Input',
- colProps: { span: 6 },
- dynamicDisabled: ({}) => {
- return true
- },
- },
- {
- field: 'oldContainerOwnerId',
- label: '原箱主',
- component: 'Input',
- colProps: { span: 6 },
- show: false,
- },
- {
- field: 'oldContainerOwner',
- label: '原箱主',
- component: 'ApiSelect',
- required: false,
- dynamicDisabled: false,
- colProps: { span: 6 },
- componentProps: ({ formModel }) => {
- return {
- allowClear: true,
- showSearch: true,
- api: GetClientListByCode,
- params: { code: 'leasing' },
- labelField: 'pinYinCode',
- showName: 'shortName',
- valueField: 'shortName',
- resultField: 'data',
- immediate: false,
- filterOption: (input: string, option: any) => {
- return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
- },
- onChange: (e, obj) => {
- if (e && obj) {
- formModel.oldContainerOwnerId = obj.id
- }
- if (!e && !obj) {
- formModel.oldContainerOwnerId = ''
- }
- },
- }
- },
- },
- {
- field: 'bsdate',
- label: '业务日期',
- component: 'DatePicker',
- colProps: { span: 6 },
- defaultValue: '',
- componentProps: {
- allowClear: true,
- valueFormat: 'YYYY-MM-DD 00:00:00',
- style: 'width:100%',
- },
- },
- {
- field: 'accdate',
- label: '会计期间',
- component: 'MonthPicker',
- colProps: { span: 6 },
- defaultValue: '',
- componentProps: {
- showTime: true,
- allowClear: true,
- valueFormat: 'YYYY-MM',
- format: 'YYYY-MM',
- },
- },
- {
- field: 'isBusinessLocking',
- label: '业务锁定',
- component: 'Switch',
- defaultValue: false,
- colProps: { span: 6 },
- componentProps: {
- checkedChildren: '是',
- unCheckedChildren: '否',
- },
- },
- {
- field: 'isFeeLocking',
- label: '费用锁定',
- component: 'Switch',
- defaultValue: false,
- colProps: { span: 6 },
- componentProps: {
- checkedChildren: '是',
- unCheckedChildren: '否',
- },
- },
- {
- field: 'remark',
- label: '备注',
- component: 'Input',
- colProps: { span: 24 },
- },
-]
-
-export const formSearchBoxSchema: FormSchema[] = [
- {
- field: 'oldContainerOwner',
- label: '原箱主',
- component: 'ApiSelect',
- required: false,
- dynamicDisabled: false,
- colProps: { span: 6 },
- componentProps: ({ formModel }) => {
- return {
- allowClear: true,
- showSearch: true,
- api: GetClientListByCode,
- params: { code: 'leasing' },
- labelField: 'pinYinCode',
- showName: 'shortName',
- valueField: 'shortName',
- resultField: 'data',
- immediate: false,
- filterOption: (input: string, option: any) => {
- return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
- },
- }
- },
- },
- {
- field: 'ctnall',
- label: '箱型',
- component: 'ApiSelect',
- required: false,
- dynamicDisabled: false,
- colProps: { span: 6 },
- componentProps: () => {
- return {
- allowClear: true,
- showSearch: true,
- api: GetCtnSelectList,
- params: { code: 'leasing' },
- labelField: 'ctnName',
- showName: 'ctnName',
- valueField: 'ctnName',
- resultField: 'data',
- immediate: false,
- filterOption: (input: string, option: any) => {
- return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
- },
- }
- },
- },
- {
- field: 'cntrno',
- label: '箱号',
- component: 'Input',
- colProps: { span: 10 },
- },
-]
diff --git a/src/views/ContainerManagement/CustFeeDui/index.vue b/src/views/ContainerManagement/CustFeeDui/index.vue
deleted file mode 100644
index b41a886b..00000000
--- a/src/views/ContainerManagement/CustFeeDui/index.vue
+++ /dev/null
@@ -1,153 +0,0 @@
-
-
-
-
-
-
- 新建
-
-
-
-
- 删除
-
-
-
-
- 确认执行
-
-
-
- 取消确认
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ContainerManagement/RentIn/TenantAuditStepModal.vue b/src/views/ContainerManagement/RentIn/TenantAuditStepModal.vue
index 2af1643d..e837216c 100644
--- a/src/views/ContainerManagement/RentIn/TenantAuditStepModal.vue
+++ b/src/views/ContainerManagement/RentIn/TenantAuditStepModal.vue
@@ -283,27 +283,64 @@
res.data.forEach((item) => {
console.log(item)
Arr.forEach((e) => {
- console.log(item, item[e], item[e].split(' '))
- item[e] = item[e].split(' ')[0]
+ if (item[e]) {
+ item[e] = item[e].split(' ')[0]
+ }
})
list.value.push(item)
})
})
}
function MakeFee() {
- ApiMakeFee(rowId.value).then((res) => {
+ ApiMakeFee({ id: rowId.value }).then((res) => {
notification.success({ message: res.message, duration: 3 })
})
}
function Confirm() {
- ApiConfirm(rowId.value).then((res) => {
- notification.success({ message: res.message, duration: 3 })
+ let type: boolean = true
+ let ApiData: any = {
+ id: rowId.value,
+ ids: [],
+ }
+ list.value.forEach((e: any, i) => {
+ if (e.selected) {
+ if (e.id) {
+ ApiData.ids.push(e.id)
+ } else {
+ type = false
+ }
+ }
})
+ if (type) {
+ ApiConfirm(ApiData).then((res) => {
+ notification.success({ message: res.message, duration: 3 })
+ })
+ } else {
+ notification.success({ message: '请先保存明细表', duration: 3 })
+ }
}
function Cancel() {
- ApiCancel(rowId.value).then((res) => {
- notification.success({ message: res.message, duration: 3 })
+ let type: boolean = true
+ let ApiData: any = {
+ id: rowId.value,
+ ids: [],
+ }
+ list.value.forEach((e: any, i) => {
+ if (e.selected) {
+ if (e.id) {
+ ApiData.ids.push(e.id)
+ } else {
+ type = false
+ }
+ }
})
+ if (type) {
+ ApiCancel(ApiData).then((res) => {
+ notification.success({ message: res.message, duration: 3 })
+ })
+ } else {
+ notification.success({ message: '请先保存明细表', duration: 3 })
+ }
}
async function handleSave(exit) {
try {
@@ -789,8 +826,9 @@
)
const Viewsettings = {
height: '163',
- autoWrapRow: true,
- autoWrapCol: true,
+ readOnly: true,
+ // autoWrapRow: true,
+ // autoWrapCol: true,
// 每行的高度
rowHeights: 26,
fixedColumnsLeft: 1,
@@ -799,20 +837,20 @@
columns: [1, 2, 3, 4, 5, 6, 7, 8],
indicators: true,
},
- // 控制回车移动
- enterMoves: 'row',
- columnSorting: false,
- // 如果通过复制或者填写校验出现错误,清空输入框
- afterValidate: function (isValid, value, row, prop, source) {
- if (!isValid) {
- hotTb.value.hotInstance.setDataAtRowProp(row, prop, '')
- }
- },
+ // // 控制回车移动
+ // enterMoves: 'row',
+ // columnSorting: false,
+ // // 如果通过复制或者填写校验出现错误,清空输入框
+ // afterValidate: function (isValid, value, row, prop, source) {
+ // if (!isValid) {
+ // hotTb.value.hotInstance.setDataAtRowProp(row, prop, '')
+ // }
+ // },
columns: columns,
// 此行直接复制,必须(非商用)
licenseKey: 'non-commercial-and-evaluation',
- // 定义所有单元格发生变化的回调处理
- async afterChange(changes, source) {},
+ // // 定义所有单元格发生变化的回调处理
+ // async afterChange(changes, source) {},
}
function handleReset() {
resetSearchBoxFields()
diff --git a/src/views/ContainerManagement/RentIn/api.ts b/src/views/ContainerManagement/RentIn/api.ts
index 961999cf..e03f0a45 100644
--- a/src/views/ContainerManagement/RentIn/api.ts
+++ b/src/views/ContainerManagement/RentIn/api.ts
@@ -40,9 +40,6 @@ export function ApiMakeFee(data: PageRequest) {
return request({
url: Api.MakeFee,
method: 'post',
- headers:{
- 'Content-Type':'application/json-patch+json'
- },
data,
})
}
@@ -51,9 +48,6 @@ export function ApiConfirm(data: PageRequest) {
return request({
url: Api.Confirm,
method: 'post',
- headers:{
- 'Content-Type':'application/json-patch+json'
- },
data,
})
}
@@ -62,9 +56,6 @@ export function ApiCancel(data: PageRequest) {
return request({
url: Api.Cancel,
method: 'post',
- headers:{
- 'Content-Type':'application/json-patch+json'
- },
data,
})
}
diff --git a/src/views/ContainerManagement/RentIn/index.vue b/src/views/ContainerManagement/RentIn/index.vue
index b41a886b..7b1674d0 100644
--- a/src/views/ContainerManagement/RentIn/index.vue
+++ b/src/views/ContainerManagement/RentIn/index.vue
@@ -100,25 +100,43 @@
}
function Confirm() {
const select = getSelectRows()
- if (select.length !== 1) {
- notification.warning({ message: '请选择一条数据', duration: 3 })
+ let ApiData: any = {
+ id: '',
+ ids: [],
+ }
+ if (select.length === 0) {
+ notification.warning({ message: '请至少选择一条数据', duration: 3 })
+ return false
} else {
- ApiConfirm(select[0].id).then((res) => {
- notification.success({ message: res.message, duration: 3 })
- reload()
+ ApiData.ids = select.map((item) => {
+ return item.id
})
}
+ ApiConfirm(ApiData).then((res) => {
+ console.log(res)
+ notification.success({ message: res.message, duration: 3 })
+ reload()
+ })
}
function Cancel() {
const select = getSelectRows()
- if (select.length !== 1) {
- notification.warning({ message: '请选择一条数据', duration: 3 })
+ let ApiData: any = {
+ id: '',
+ ids: [],
+ }
+ if (select.length === 0) {
+ notification.warning({ message: '请至少选择一条数据', duration: 3 })
+ return false
} else {
- ApiCancel(select[0].id).then((res) => {
- notification.success({ message: res.message, duration: 3 })
- reload()
+ ApiData.ids = select.map((item) => {
+ return item.id
})
}
+ ApiCancel(ApiData).then((res) => {
+ console.log(res)
+ notification.success({ message: res.message, duration: 3 })
+ reload()
+ })
}
function handleDel() {