Commit 4fbb7ab7 by linjinhong

修改编辑

parent ef6bb62a
......@@ -9,7 +9,7 @@ interface Ikey {
[key: string]: unknown
}
interface ILogisticsParams {
logType: 'logistics_way' | 'logistics_address'
logType: string
relaId: number | string
}
//获取日志
......
......@@ -539,7 +539,7 @@ async function showLog(row) {
logDialogVisible.value = true
try {
const { data } = await getLogisticsLog({
logType: 'logistics_way',
logType: 'logistics_customs_rule',
relaId: row.id,
})
logList.value = data
......
......@@ -94,6 +94,17 @@
</div>
</template>
</LogDialog>
<LogDialog
title="操作日志"
v-model="logDialogVisible"
@close="logDialogVisible = false"
>
<div v-for="item in logList" :key="item.id" style="margin-bottom: 8px">
<span style="margin-right: 10px">{{ item.createTime }}</span>
<span>{{ item.description }}</span>
</div>
</LogDialog>
</template>
<script setup lang="tsx">
......@@ -108,6 +119,7 @@ import {
deleteLogisticsQuotation,
importLogisticsQuotation,
downloadLogisticsQuotationTemplate,
getLogisticsLog,
} from '@/api/logistics'
import type { LogisticsMethod } from '@/types/api/logistics'
import SearchForm from '@/components/SearchForm.tsx'
......@@ -118,7 +130,7 @@ import type { VxeTablePropTypes } from 'vxe-table'
import usePageList from '@/utils/hooks/usePageList'
import { useValue } from './hooks/useValue'
import { showConfirm } from '@/utils/ui'
import { Edit } from '@element-plus/icons-vue'
import { Edit, List } from '@element-plus/icons-vue'
import { debounce } from 'lodash-es'
const [searchForm] = useValue({ logisticsIdList: [] })
......@@ -373,6 +385,15 @@ const tableConfig = ref([
>
<Edit />
</el-icon>
<el-icon
size="24"
title="日志"
color="#008aff"
style="cursor: pointer; vertical-align: middle"
onclick={() => showLog(row)}
>
<List />
</el-icon>
</div>
),
},
......@@ -568,11 +589,7 @@ async function downloadExcel() {
const res = await downloadLogisticsQuotationTemplate()
console.log(483, data)
const blob = new Blob([res])
// 2. 解析文件名(从响应头或自定义)
const filename = '物流报价模版.xlsx'
// 3. 创建临时链接并触发下载
const link = document.createElement('a')
link.href = window.URL.createObjectURL(blob)
link.download = filename
......@@ -612,15 +629,20 @@ async function updateExcel(file) {
}
}
watch(
() => editForm.value,
(val) => {
console.log('editForm', val)
const bool = editForm.value?.['id'] ? true : false
console.log('bool', bool)
},
{ deep: true, immediate: true },
)
const logList = ref([])
const logDialogVisible = ref(false)
async function showLog(row) {
logDialogVisible.value = true
try {
const { data } = await getLogisticsLog({
logType: 'logistics_quotation',
relaId: row.id,
})
logList.value = data
} catch (error) {
console.log(error)
}
}
</script>
<style lang="scss" scoped>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment