zth
张同海 3 weeks ago
parent b02d66ed2f
commit e0a0569d50

@ -122,7 +122,7 @@
import { BasicModal, useModalInner } from '/@/components/Modal'
import { BasicForm, useForm } from '/@/components/Form/index'
import { formSchema, InfoColumns } from './columns'
import { ApiEdit, ApiInfo, ApiDelDetail, ApiImport } from './api'
import { ApiEdit, ApiInfo, ApiDelDetail, ApiImport, ApiGetDSX } from './api'
import { ApiDealExcel } from '/@/views/ContainerManagement/RentIn/api'
import { ExportExcelByColumn } from '/@/api/common'
//
@ -152,6 +152,7 @@
isUpdate.value = !!data?.isUpdate
activeKey.value = '1'
list.value.splice(0)
ChangeRow.value.splice(0)
if (unref(isUpdate)) {
rowId.value = data.record.id
const res: any = await ApiInfo({ id: unref(rowId) })
@ -175,7 +176,13 @@
async function handleSave(exit) {
try {
const values = await validate()
values.bodylist = list.value
let bodylist: any = []
ChangeRow.value.forEach((e) => {
if (!bodylist.includes(list.value[e])) {
bodylist.push(list.value[e])
}
})
values.bodylist = bodylist
setModalProps({ confirmLoading: true, loading: true })
const res: any = await ApiEdit(values)
if (res.succeeded) {
@ -194,7 +201,6 @@
} else {
createMessage.error(res.message)
}
exit && closeModal()
} finally {
// loading.value = false;
@ -204,6 +210,7 @@
async function refresh(type = false) {
let MessageArr: any = []
list.value.splice(0)
ChangeRow.value.splice(0)
const res: any = await ApiInfo({ id: unref(rowId) })
if (res.succeeded) {
setFieldsValue({
@ -522,6 +529,7 @@
// data: 'changeTime',
// },
]
let ChangeRow = ref<any>([])
const settings = {
height: '260',
readOnly: true,
@ -549,6 +557,7 @@
licenseKey: 'non-commercial-and-evaluation',
//
async afterChange(changes, source) {
ChangeRow.value.push(changes[0][0])
if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') {
let dict: any = {}
@ -599,7 +608,23 @@
})
}
}
function derivedExcel() {
async function derivedExcel() {
// let ids: any = []
// list.value.forEach((e: any, i) => {
// if (e.selected) {
// if (e.id) {
// console.log(BigInt(e.id))
// ids.push(e.id)
// }
// }
// })
// if (ids.length) {
// const res = await ApiGetDSX({ ids: ids })
// if (res.succeeded) {
// console.log(res)
// }
// } else {
let ApiData: any = {
columnSets: [],
jsonDataStr: [],
@ -634,5 +659,6 @@
document.body.appendChild(link)
link.click()
})
// }
}
</script>

@ -8,6 +8,7 @@ enum Api {
del = '/containerManagementApi/CM_State_Change_TemplatImport/DeleteCM_State_Change_TemplatImport',
delDetail = '/containerManagementApi/CM_State_Change_TemplatImport/DeleteCM_State_Change_Temp',
import = '/containerManagementApi/CM_State_Change_TemplatImport/CM_State_Change_TemplatImport_Confirm',
GetDSX = '/containerManagementApi/CM_State_Change_TemplatImport/GetDSX_TemplatDetailList',
}
// 列表 (Auth)
export function ApiList(data: PageRequest) {
@ -57,4 +58,12 @@ export function ApiImport(data: PageRequest) {
method: 'post',
data,
})
}
}
// 获取选定业务的待上线明细 (Auth)
export function ApiGetDSX(data: PageRequest) {
return request<DataResult>({
url: Api.GetDSX,
method: 'post',
data,
})
}

Loading…
Cancel
Save