|
|
@ -122,7 +122,7 @@
|
|
|
|
import { BasicModal, useModalInner } from '/@/components/Modal'
|
|
|
|
import { BasicModal, useModalInner } from '/@/components/Modal'
|
|
|
|
import { BasicForm, useForm } from '/@/components/Form/index'
|
|
|
|
import { BasicForm, useForm } from '/@/components/Form/index'
|
|
|
|
import { formSchema, InfoColumns } from './columns'
|
|
|
|
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 { ApiDealExcel } from '/@/views/ContainerManagement/RentIn/api'
|
|
|
|
import { ExportExcelByColumn } from '/@/api/common'
|
|
|
|
import { ExportExcelByColumn } from '/@/api/common'
|
|
|
|
// 字典
|
|
|
|
// 字典
|
|
|
@ -152,6 +152,7 @@
|
|
|
|
isUpdate.value = !!data?.isUpdate
|
|
|
|
isUpdate.value = !!data?.isUpdate
|
|
|
|
activeKey.value = '1'
|
|
|
|
activeKey.value = '1'
|
|
|
|
list.value.splice(0)
|
|
|
|
list.value.splice(0)
|
|
|
|
|
|
|
|
ChangeRow.value.splice(0)
|
|
|
|
if (unref(isUpdate)) {
|
|
|
|
if (unref(isUpdate)) {
|
|
|
|
rowId.value = data.record.id
|
|
|
|
rowId.value = data.record.id
|
|
|
|
const res: any = await ApiInfo({ id: unref(rowId) })
|
|
|
|
const res: any = await ApiInfo({ id: unref(rowId) })
|
|
|
@ -175,7 +176,13 @@
|
|
|
|
async function handleSave(exit) {
|
|
|
|
async function handleSave(exit) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const values = await validate()
|
|
|
|
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 })
|
|
|
|
setModalProps({ confirmLoading: true, loading: true })
|
|
|
|
const res: any = await ApiEdit(values)
|
|
|
|
const res: any = await ApiEdit(values)
|
|
|
|
if (res.succeeded) {
|
|
|
|
if (res.succeeded) {
|
|
|
@ -194,7 +201,6 @@
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
createMessage.error(res.message)
|
|
|
|
createMessage.error(res.message)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
exit && closeModal()
|
|
|
|
exit && closeModal()
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
// loading.value = false;
|
|
|
|
// loading.value = false;
|
|
|
@ -204,6 +210,7 @@
|
|
|
|
async function refresh(type = false) {
|
|
|
|
async function refresh(type = false) {
|
|
|
|
let MessageArr: any = []
|
|
|
|
let MessageArr: any = []
|
|
|
|
list.value.splice(0)
|
|
|
|
list.value.splice(0)
|
|
|
|
|
|
|
|
ChangeRow.value.splice(0)
|
|
|
|
const res: any = await ApiInfo({ id: unref(rowId) })
|
|
|
|
const res: any = await ApiInfo({ id: unref(rowId) })
|
|
|
|
if (res.succeeded) {
|
|
|
|
if (res.succeeded) {
|
|
|
|
setFieldsValue({
|
|
|
|
setFieldsValue({
|
|
|
@ -522,6 +529,7 @@
|
|
|
|
// data: 'changeTime',
|
|
|
|
// data: 'changeTime',
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
let ChangeRow = ref<any>([])
|
|
|
|
const settings = {
|
|
|
|
const settings = {
|
|
|
|
height: '260',
|
|
|
|
height: '260',
|
|
|
|
readOnly: true,
|
|
|
|
readOnly: true,
|
|
|
@ -549,6 +557,7 @@
|
|
|
|
licenseKey: 'non-commercial-and-evaluation',
|
|
|
|
licenseKey: 'non-commercial-and-evaluation',
|
|
|
|
// 定义所有单元格发生变化的回调处理
|
|
|
|
// 定义所有单元格发生变化的回调处理
|
|
|
|
async afterChange(changes, source) {
|
|
|
|
async afterChange(changes, source) {
|
|
|
|
|
|
|
|
ChangeRow.value.push(changes[0][0])
|
|
|
|
if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') {
|
|
|
|
if (source === 'edit' || source === 'Autofill.fill' || source === 'CopyPaste.paste') {
|
|
|
|
let dict: any = {}
|
|
|
|
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 = {
|
|
|
|
let ApiData: any = {
|
|
|
|
columnSets: [],
|
|
|
|
columnSets: [],
|
|
|
|
jsonDataStr: [],
|
|
|
|
jsonDataStr: [],
|
|
|
@ -634,5 +659,6 @@
|
|
|
|
document.body.appendChild(link)
|
|
|
|
document.body.appendChild(link)
|
|
|
|
link.click()
|
|
|
|
link.click()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|