|
|
|
@ -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>
|
|
|
|
|