增加条码防伪历史记录模块
parent
ef31d0b0d4
commit
66ec6fd142
|
@ -0,0 +1,20 @@
|
|||
import { baseRequest } from '@/utils/request'
|
||||
|
||||
const request = (url, ...arg) => baseRequest(`/traceability/barcode/` + url, ...arg)
|
||||
|
||||
/**
|
||||
* 条码防伪历史记录Api接口管理器
|
||||
*
|
||||
* @author Luck
|
||||
* @date 2024/12/24 21:18
|
||||
**/
|
||||
export default {
|
||||
// 获取条码防伪历史记录分页
|
||||
barcodeAntiFakeHistoryPage(data) {
|
||||
return request('page', data, 'get')
|
||||
},
|
||||
// 获取条码防伪历史记录详情
|
||||
barcodeAntiFakeHistoryDetail(data) {
|
||||
return request('detail', data, 'get')
|
||||
}
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
export const tableColumns = [
|
||||
{
|
||||
title: '条码',
|
||||
dataIndex: 'barcode',
|
||||
align: 'center',
|
||||
resizable: true,
|
||||
width: 200,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '内码',
|
||||
dataIndex: 'internalBarcode',
|
||||
align: 'center',
|
||||
resizable: true,
|
||||
width: 200,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '查询时间',
|
||||
dataIndex: 'createTime',
|
||||
align: 'center',
|
||||
sorter: true,
|
||||
sortDirections: ['descend', 'ascend'],
|
||||
resizable: true,
|
||||
width: 200,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '商品',
|
||||
dataIndex: 'productName',
|
||||
align: 'center',
|
||||
resizable: true,
|
||||
width: 200,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '商品编码',
|
||||
dataIndex: 'productNumber',
|
||||
align: 'center',
|
||||
resizable: true,
|
||||
width: 200,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '品牌名称',
|
||||
dataIndex: 'brandName',
|
||||
align: 'center',
|
||||
resizable: true,
|
||||
width: 200,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: 'IP',
|
||||
dataIndex: 'ip',
|
||||
align: 'center',
|
||||
resizable: true,
|
||||
width: 150,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '验证通过',
|
||||
dataIndex: 'isValid',
|
||||
align: 'center',
|
||||
resizable: true,
|
||||
width: 90,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '所在地区',
|
||||
dataIndex: 'province',
|
||||
align: 'center',
|
||||
resizable: true,
|
||||
width: 200,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '经度',
|
||||
dataIndex: 'longitude',
|
||||
align: 'center',
|
||||
resizable: true,
|
||||
width: 90,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '纬度',
|
||||
dataIndex: 'latitude',
|
||||
align: 'center',
|
||||
resizable: true,
|
||||
width: 90,
|
||||
ellipsis: true
|
||||
},
|
||||
|
||||
{
|
||||
title: '黑名单',
|
||||
dataIndex: 'isJoinBlack',
|
||||
align: 'center',
|
||||
resizable: true,
|
||||
width: 90,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '查询次数',
|
||||
dataIndex: 'queryTimes',
|
||||
sorter: true,
|
||||
sortDirections: ['descend', 'ascend'],
|
||||
align: 'center',
|
||||
resizable: true,
|
||||
width: 90,
|
||||
ellipsis: true
|
||||
}
|
||||
]
|
|
@ -0,0 +1,7 @@
|
|||
import tool from '@/utils/tool'
|
||||
|
||||
export const searchFields = [
|
||||
{ name: 'barcode', label: '条码', component: 'a-input', props: { placeholder: '请输入条码' } },
|
||||
{ name: 'barcodeInterior', label: '内码', component: 'a-input', props: { placeholder: '请输入内码' } }
|
||||
|
||||
]
|
|
@ -0,0 +1,81 @@
|
|||
<template>
|
||||
<AdvancedSearchForm
|
||||
:formState="searchFormState"
|
||||
:formFields="searchFields"
|
||||
@search="tableRef.refresh()"
|
||||
@reset="tableRef.refresh()"
|
||||
/>
|
||||
|
||||
<a-card :bordered="false" class="mt-4" style="height: 100%">
|
||||
<a-row :gutter="24">
|
||||
|
||||
<a-col :span="24">
|
||||
<s-table
|
||||
ref="tableRef"
|
||||
:columns="columns"
|
||||
:data="loadData"
|
||||
:alert="options.alert.show"
|
||||
bordered
|
||||
:row-key="(record) => record.id"
|
||||
:tool-config="options.toolConfig"
|
||||
:row-selection="options.rowSelection"
|
||||
:scroll="{
|
||||
x: 100
|
||||
}"
|
||||
>
|
||||
<template #operator>
|
||||
<a-space>
|
||||
<a-button @click="exportBatchVerify" v-if="hasPerm('barcodeAntiFakeHistory:export')">
|
||||
<template #icon><export-outlined /></template>
|
||||
导出
|
||||
</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.dataIndex === 'barcode'">
|
||||
<span style="color: #0d84ff">{{ record.barcode }}</span>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</s-table>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script setup name="basicDataClient">
|
||||
import antiFakeHistoryApi from '@/api/traceability/barcode/barcodeAntiFakeHistoryApi'
|
||||
|
||||
import { useTableManagement } from '@/hook/useTableManagement'
|
||||
import { searchFields } from '@/views/productionBusiness/traceability/antiFakeHistory/formFields/searchFields'
|
||||
import { tableColumns } from '@/views/productionBusiness/traceability/antiFakeHistory/columns/tableColumn'
|
||||
|
||||
const {
|
||||
searchFormState,
|
||||
tableRef,
|
||||
selectedRowKeys,
|
||||
columns,
|
||||
loadData,
|
||||
deleteRecord,
|
||||
deleteBatchRecords,
|
||||
options,
|
||||
navigateTo
|
||||
} = useTableManagement(
|
||||
{
|
||||
page: antiFakeHistoryApi.barcodeAntiFakeHistoryPage
|
||||
},
|
||||
tableColumns,
|
||||
['barcodeAntiFakeHistory:export']
|
||||
)
|
||||
// 批量导出
|
||||
const exportBatchVerify = () =>{
|
||||
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
})
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue