Merge branch 'zth' into dev

frame-financialTax-yjl-1204
张同海 1 month ago
commit 00196f2986

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

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

Loading…
Cancel
Save