增加入库单、发货通知单、条码历史模块

main
郭强 2024-10-02 18:12:01 +08:00
parent 8a88401c01
commit 7520fa8dd9
13 changed files with 1247 additions and 0 deletions

View File

@ -0,0 +1,32 @@
import { baseRequest } from '@/utils/request'
const request = (url, ...arg) => baseRequest(`/inventory/inbound/` + url, ...arg)
/**
* 入库单Api接口管理器
*
* @author Luck
* @date 2024/09/13 22:39
**/
export default {
// 获取入库单分页
inventoryInboundPage(data) {
return request('page', data, 'get')
},
// 获取入库单 明细列表
inventoryInboundDetailList(data) {
return request('/detail/list', data, 'get')
},
// 获取入库单 条码列表
inventoryInboundBarcodeTree(data) {
return request('/barcode/tree/list', data, 'get')
},
// 获取入库单 条码(子级)列表
inventoryInboundBarcodeTreeChildren(data) {
return request('/barcode/tree/childrenList', data, 'get')
},
// 获取入库单详情
inventoryInboundDetail(data) {
return request('detail', data, 'get')
}
}

View File

@ -0,0 +1,32 @@
import { baseRequest } from '@/utils/request'
const request = (url, ...arg) => baseRequest(`/inventory/invoice/` + url, ...arg)
/**
* 发货通知单Api接口管理器
*
* @author Luck
* @date 2024/09/23 20:53
**/
export default {
// 获取发货通知单分页
inventoryInvoicePage(data) {
return request('page', data, 'get')
},
// 提交发货通知单表单 edit为true时为编辑默认为新增
inventoryInvoiceSubmitForm(data, edit = false) {
return request(edit ? 'edit' : 'add', data)
},
// 删除发货通知单
inventoryInvoiceDelete(data) {
return request('delete', data)
},
// 获取发货通知单详情
inventoryInvoiceDetail(data) {
return request('detail', data, 'get')
},
// 审核发货单 通过
inventoryInvoiceAuditPass(data, edit = false) {
return request('audit/pass', data)
},
}

View File

@ -0,0 +1,20 @@
import { baseRequest } from '@/utils/request'
const request = (url, ...arg) => baseRequest(`/produce/barcode/history/` + url, ...arg)
/**
* 产品条码历史记录Api接口管理器
*
* @author Luck
* @date 2024/09/09 19:41
**/
export default {
// 获取产品条码历史记录分页
produceBarcodeHistoryPage(data) {
return request('page', data, 'get')
},
// 获取产品条码历史记录详情
produceBarcodeHistoryDetail(data) {
return request('detail', data, 'get')
}
}

View File

@ -0,0 +1,87 @@
export const tableColumns = [
{
title: '单号',
dataIndex: 'billNumber',
align: 'center',
resizable: true,
width: 200,
ellipsis: true
},
{
title: '业务日期',
dataIndex: 'businessDate',
align: 'center',
sorter: true,
sortDirections: ['descend', 'ascend'],
resizable: true,
width: 200,
ellipsis: true
},
{
title: '类型',
dataIndex: 'type',
align: 'center',
resizable: true,
width: 100,
ellipsis: true
},
{
title: '供货单位',
dataIndex: 'customerName',
align: 'center',
resizable: true,
width: 200,
ellipsis: true
},
{
title: '供货单位编码',
dataIndex: 'customerNumber',
align: 'center',
resizable: true,
width: 200,
ellipsis: true
},
{
title: '仓库',
dataIndex: 'storeName',
align: 'center',
resizable: true,
width: 200,
ellipsis: true
},
{
title: '仓库编码',
dataIndex: 'storeNumber',
align: 'center',
resizable: true,
width: 250,
ellipsis: true
},
{
title: '备注',
dataIndex: 'remarks',
align: 'center',
resizable: true,
width: 200,
ellipsis: true
},
{
title: '创建人',
dataIndex: 'createUserName',
align: 'center',
resizable: true,
width: 200,
ellipsis: true
},
{
title: '创建时间',
dataIndex: 'createTime',
sorter: true,
sortDirections: ['descend', 'ascend'],
align: 'center',
resizable: true,
width: 200,
ellipsis: true
}
]

View File

@ -0,0 +1,33 @@
import tool from '@/utils/tool'
export const searchFields = [
{ name: 'billNumber', label: '单号', component: 'a-input', props: { placeholder: '请输入单号' } },
{
label: '类型:',
name: 'type',
type: 'a-select',
attrs: {
placeholder: '请选择类型',
allowClear: true,
options: tool.dictList('INBOUND_TYPE')
}
},
{
label: '仓库:',
name: 'storeId',
type: 'a-tree-select',
span: 6,
attrs: {
placeholder: '请选择仓库',
treeData: [],
fieldNames: {
children: 'children',
label: 'name',
value: 'id'
}
},
defaultValue: ''
},
{ name: 'customerName', label: '供货单位名称', component: 'a-input', props: { placeholder: '请输入供货单位名称' } },
{ name: 'customerNumber', label: '供货单位编码', component: 'a-input', props: { placeholder: '请输入供货单位编码' } }
]

View File

@ -0,0 +1,98 @@
<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-space>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'billNumber'">
<span style="color: #0d84ff">{{ record.billNumber }}</span>
</template>
<template v-if="column.dataIndex === 'type'">
<a-tag :color="tagColorList[record.type - 1]">{{
$TOOL.dictTypeData('INBOUND_TYPE', record.type || '')
}}</a-tag>
</template>
<template v-if="column.dataIndex === 'action'">
<a-space>
<a
@click="
navigateTo('/inventory/inbound/detail', {
type: 'SEARCH',
id: record.id
})
"
>
<EyeOutlined />
查看
</a>
</a-space>
</template>
</template>
</s-table>
</a-col>
</a-row>
</a-card>
</template>
<script setup name="inventoryInbound">
import inventoryInboundApi from '@/api/inventory/inventoryInboundApi'
import { useTableManagement } from '@/hook/useTableManagement'
import { searchFields } from '@/views/productionBusiness/inventory/inbound/formFields/searchFields'
import { tableColumns } from '@/views/productionBusiness/inventory/inbound/columns/tableColumn'
const tagColorList = ['warning', 'success', 'error', 'purple']
const {
searchFormState,
tableRef,
selectedRowKeys,
columns,
loadData,
deleteRecord,
deleteBatchRecords,
options,
navigateTo
} = useTableManagement(
{
page: inventoryInboundApi.inventoryInboundPage
},
tableColumns,
['inventoryInbound:export']
)
//
const exportBatchVerify = () =>{
}
onMounted(() => {
})
</script>

View File

@ -0,0 +1,250 @@
<template>
<a-page-header style="padding: 10px; font-size: 20px" @back="handleBack">
<template #extra>
<a-button v-if="route.query.type !== 'SEARCH'" key="1" type="primary" @click="onSubmitForm"></a-button>
</template>
</a-page-header>
<a-card :bordered="false" title="基本信息">
<DynamicForm
:allDisabled="route.query.type === 'SEARCH'"
:formItems="basicInfoFormItems"
:rules="basicInfoFormRules"
:model="formData"
ref="formRef1"
>
<template #customerNameSlot="{ model, item }">
<a-input
:disabled="route.query.type === 'SEARCH'"
readonly
v-bind="{ ...item.attrs }"
v-model:value="model[item.name]"
></a-input>
</template>
</DynamicForm>
</a-card>
<a-card
:bordered="false"
class="mt-4"
style="height: 100%"
v-if="extendData.length > 0 || route.query.type !== 'ADD'"
title="扩展字段"
>
<DynamicForm
:allDisabled="route.query.type === 'SEARCH'"
:formItems="extendData"
:model="extendFormData"
:rules="formRules"
v-if="extendData.length > 0"
/>
</a-card>
<a-card
:bordered="false"
class="mt-4"
style="height: 100%"
title="商品明细信息"
>
<a-space>
<a-button v-if="route.query.type !== 'SEARCH'" key="1" type="primary" @click="addRow"></a-button>
<xn-batch-delete
v-if="hasPerm('customerBatchDelete')"
:selectedRowKeys="selectedListRowKeys"
@batchDelete="deleteBatchRecords"
/>
</a-space>
<a-table
class="mt-4"
ref="tableRef"
:dataSource="productDetailData"
:columns="productDetailFormItems"
:row-selection="rowSelection"
row-key="id"
>
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'index'">
{{ index + 1 }}
</template>
<template v-if="column.dataIndex === 'productName'">
<a-input
:disabled="route.query.type === 'SEARCH'"
readonly
v-model:value="record['productName']"
placeholder="请选择商品信息"
@click="openMateriel"
></a-input>
</template>
<template v-if="column.dataIndex === 'unitName'">
<a-select
style="width: 100%"
:options="record.unitArr"
v-model:value="record['unitName']"
@change="
(value, options) => {
cityChange(value, options, record)
}
"
:filter-option="filterOption"
></a-select>
</template>
<template v-if="column.dataIndex === 'planAmount'">
<a-input-number class="xn-wd"
:disabled="route.query.type === 'SEARCH'"
v-model:value="record['planAmount']"
:min="0"
></a-input-number>
</template>
<template v-if="column.dataIndex === 'action'">
<a-space>
<a-button type="link" danger size="small" >
<DeleteOutlined />删除
</a-button>
</a-space>
</template>
</template>
</a-table>
</a-card>
<materiel-selector-plus ref="materielSelectorPlusRef" @ok="materielBackOk"></materiel-selector-plus>
</template>
<script setup name="taskDetail">
import { required } from '@/utils/formRules'
import inventoryInvoiceApi from '@/api/inventory/inventoryInvoiceApi'
import sysStoreApi from '@/api/base/store/sysStoreApi'
import materialApi from '@/api/base/material/materialApi'
import useFormHandler from '@/hook/useFormHandler'
import { basicInfoFormRules, basicInfoFormItems, productDetailFormItems } from '@/views/productionBusiness/inventory/invoice/formFields/detailFields'
import { useRoute } from 'vue-router'
import MaterielSelectorPlus from '@/components/Selector/materielSelectorPlus.vue'
const route = useRoute()
const formRef1 = ref(null)
let extendData = ref([])
const { formData, formRefs, inform, extendFormData, onSubmit, handleBack, fetchData, getExtendField } =
useFormHandler([...basicInfoFormItems], {
submitForm: inventoryInvoiceApi.inventoryInvoiceSubmitForm,
getDetail: inventoryInvoiceApi.inventoryInvoiceDetail
})
onMounted(async () => {
formRefs.value = [formRef1.value]
fetchData(route.query.type).then((res) => {
if (res) {
formData.customerId = res.customerId // id
formData.customerNumber = res.customerNumber //
formData.storeId = res.storeId // id
formData.storeName = res.storeName //
formData.storeNumber = res.storeNumber //
}
})
//
const sysStoreTreeList = await sysStoreApi.sysStoreTree();
basicInfoFormItems.forEach((item) => {
if (item.name === 'storeId') {
item.attrs.treeData = (sysStoreTreeList || []);
}
})
extendData.value = await getExtendField('MATERIAL')
})
const onSubmitForm = () => {
onSubmit({
isDeep: true,
...formData
})
}
/* 物料选择器 */
const materielSelectorPlusRef = ref(null)
let materialPackageData = {}
//
const openMateriel = () => {
materielSelectorPlusRef.value.showOpen()
}
//
const materielBackOk = (event) => {
const materielId = event.materielSelectedRows[0].id;
if(materielId){
// -
let packageData = handleMaterialPackageData(materielId);
}
//
formData.productName = event.materielSelectedRows[0].name //
formData.productNumber = event.materielSelectedRows[0].number //
formData.productId = event.materielSelectedRows[0].id // id
//
formData.produceUnitName = event.materielSelectedRows[0].produceUnitName //
formData.produceUnitId = event.materielSelectedRows[0].produceUnitId // id
formData.baseUnitName = event.materielSelectedRows[0].baseUnitName //
formData.baseUnitId = event.materielSelectedRows[0].baseUnitId // id
formData.unitGroupId = event.materielSelectedRows[0].unitGroupId
formData.unitGroupName = event.materielSelectedRows[0].unitGroupName
formData.packageProportion = event.materielSelectedRows[0].packageProportion
}
const handleMaterialPackageData = async(materielId)=>{
let packageData = [];
if(materielId){
packageData = materialPackageData[materielId];
if(!packageData || packageData.length === 0){
packageData = await materialApi.materialPackageData({
materialId: materielId
})
if(packageData && packageData.length > 0){
materialPackageData[materielId] = packageData;
}
}
}
return packageData;
}
/* =================================== 商品明细 ============================*/
const productDetailData = ref([])
let selectedListRowKeys = ref([])
let tableRef = ref(null)
const addRow = () => {
const newRow = {
id: Date.now().toString(),
...productDetailFormItems.reduce((acc, col) => {
if (col.dataIndex) acc[col.dataIndex] = ''
return acc
}, {})
}
productDetailData.value = [...productDetailData.value, newRow]
}
const deleteBatchRecords = (value) => {
productDetailData.value = productDetailData.value.filter((item) => {
return !value.some((itemValue) => itemValue.id === item.id)
})
}
const rowSelection = {
onChange: (selectedRowKeys, selectedRows) => {
selectedListRowKeys.value = selectedRowKeys
}
}
</script>

View File

@ -0,0 +1,187 @@
import tool from '@/utils/tool'
import { required } from '@/utils/formRules'
const basicInfoFormRules = {
type: [required('请选择类型')],
businessDate: [required('请选择业务日期')],
storeId: [required('请选择仓库')],
customerName: [required('请选择客户')]
}
const basicInfoFormItems = [
{
label: '单据号:',
name: 'billNumber',
type: 'a-input',
attrs: {
placeholder: '请输入单号',
allowClear: true
}
},
{
label: '业务日期:',
name: 'businessDate',
type: 'a-date-picker',
attrs: {
placeholder: '请选择业务日期',
allowClear: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
{
label: '类型:',
name: 'type',
type: 'a-select',
attrs: {
placeholder: '请选择类型',
allowClear: true,
options: tool.dictList('OUTBOUND_TYPE')
}
},
{
label: '客户:',
name: 'customerName',
type: 'a-input',
isUseSlot: true,
slotName: 'customerNameSlot',
attrs: {
placeholder: '请选择客户'
}
},
{
label: '仓库:',
name: 'storeId',
type: 'a-tree-select',
span: 6,
attrs: {
placeholder: '请选择仓库',
treeData: [],
fieldNames: {
children: 'children',
label: 'name',
value: 'id'
}
},
defaultValue: ''
},
{
label: '车牌号:',
name: 'carNumber',
type: 'a-input',
attrs: {
placeholder: '请输入车牌号',
allowClear: true
}
},
{
label: '停车位:',
name: 'parkingSpace',
type: 'a-input',
attrs: {
placeholder: '请输入停车位',
allowClear: true
}
},
{
label: '业务员:',
name: 'salesman',
type: 'a-input',
attrs: {
placeholder: '请输入业务员',
allowClear: true
}
},
{
label: '收货方:',
name: 'receiveParty',
type: 'a-input',
attrs: {
placeholder: '请输入收货方',
allowClear: true
}
},
{
label: '交货日期:',
name: 'deliveryDate',
type: 'a-date-picker',
attrs: {
placeholder: '请选择交货日期',
allowClear: true,
valueFormat: 'YYYY-MM-DD HH:mm:ss'
}
},
{
label: '交货地址:',
name: 'deliveryAddress',
type: 'a-input',
attrs: {
placeholder: '请输入交货地址',
allowClear: true
}
},
{
label: '备注:',
name: 'remarks',
type: 'a-input',
span: 12,
attrs: {
placeholder: '请输入备注',
allowClear: true
}
}
]
const productDetailFormItems = [
{
title: '序号',
dataIndex: 'index',
editable: true,
width: 80
},
{
title: '商品名称',
dataIndex: 'productName',
editable: true,
width: 300,
dataType: 'select' // 或 'number', 'select'
},
{
title: '商品编码',
dataIndex: 'productNumber',
editable: true,
width: 300
},
{
title: '规格型号',
dataIndex: 'specification',
editable: true,
width: 300
},
{
title: '基本单位',
dataIndex: 'baseUnitName',
editable: true,
width: 300
},
{
title: '批次号',
dataIndex: 'batchNumber',
width: 300,
editable: true
},
{
title: '单位',
dataIndex: 'unitName',
width: 300,
editable: true
},
{
title: '计划数量',
dataIndex: 'planAmount',
width: 300,
editable: true,
dataType: 'number' // 或 'number', 'select'
}
]
export { basicInfoFormRules, basicInfoFormItems, productDetailFormItems }

View File

@ -0,0 +1,298 @@
<template>
<a-card :bordered="false">
<a-form ref="searchFormRef" name="advanced_search" :model="searchFormState" class="ant-advanced-search-form">
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="名称" name="name">
<a-input v-model:value="searchFormState.name" placeholder="请输入名称" />
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="可用状态" name="enabledState">
<a-select
v-model:value="searchFormState.enabledState"
placeholder="请选择可用状态"
:options="$TOOL.dictList('COMMON_STATUS')"
/>
</a-form-item>
</a-col>
<a-col :span="6">
<a-button type="primary" @click="tableRef.refresh()"></a-button>
<a-button style="margin: 0 8px" @click="reset"></a-button>
</a-col>
</a-row>
</a-form>
</a-card>
<a-card :bordered="false" class="mt-4" style="height: 100%">
<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
type="primary"
@click="
navigateTo('/inventory/invoice/add', {
type: 'ADD'
})
"
v-if="hasPerm('inventoryInvoice:add')"
>
<template #icon><plus-outlined /></template>
新增
</a-button>
<xn-batch-delete
v-if="hasPerm('inventoryInvoice:delete')"
:selectedRowKeys="selectedRowKeys"
@batchDelete="deleteBatchRecords"
/>
<a-button type="primary" @click="handleExamine">
<template #icon><plus-outlined /></template>
审核
</a-button>
</a-space>
</template>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'billNumber'">
<span style="color: #0d84ff">{{ record.billNumber }}</span>
</template>
<template v-if="column.dataIndex === 'state'">
<a-tag :color="tagColorList[record.state - 1]">{{
$TOOL.dictTypeData('PRODUCE_TASK_STATE', record.state || '')
}}</a-tag>
</template>
<template v-if="column.dataIndex === 'type'">
<a-tag :color="tagColorList[record.type - 1]">{{
$TOOL.dictTypeData('OUTBOUND_TYPE', record.type || '')
}}</a-tag>
</template>
<template v-if="column.dataIndex === 'action'">
<a-space>
<a
@click="
navigateTo('/inventory/invoice/edit', {
type: 'SEARCH',
id: record.id
})
"
v-if="hasPerm('inventoryInvoice:edit')"
>
<EyeOutlined />
查看
</a>
<a-divider
type="vertical"
v-if="hasPerm(['inventoryInvoice:edit', 'inventoryInvoice:delete'], 'and') && record.state === '1'"
/>
<a-dropdown v-if="record.state === '1'">
<a class="ant-dropdown-link" @click.prevent>
更多
<DownOutlined />
</a>
<template #overlay>
<a-menu>
<a-menu-item>
<a-button
type="link"
size="small"
@click="
navigateTo('/inventory/invoice/edit', {
type: 'EDIT',
id: record.id
})
"
v-if="hasPerm('inventoryInvoice:edit')"
>
<FormOutlined />
编辑
</a-button>
</a-menu-item>
<a-menu-item>
<a-button
type="link"
danger
size="small"
v-if="hasPerm('inventoryInvoice:delete')"
@click="deleteRecord(record)"
>
<DeleteOutlined />
删除
</a-button>
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</a-space>
</template>
</template>
</s-table>
</a-card>
</template>
<script setup name="task">
import inventoryInvoiceApi from '@/api/inventory/inventoryInvoiceApi'
import { useTableManagement } from '@/hook/useTableManagement'
import { message } from 'ant-design-vue'
const tagColorList = ['warning', 'success', 'error', 'purple']
const tableColumns = [
{
title: '单号',
dataIndex: 'billNumber',
align: 'center',
resizable: true,
width: 300,
ellipsis: true,
sorter: true,
sortDirections: ['descend', 'ascend']
},
{
title: '业务日期',
dataIndex: 'businessDate',
align: 'center',
resizable: true,
width: 300,
ellipsis: true,
sorter: true,
sortDirections: ['descend', 'ascend']
},
{
title: '状态',
dataIndex: 'state',
align: 'center',
resizable: true,
width: 300,
ellipsis: true
},
{
title: '类型',
dataIndex: 'type',
align: 'center',
resizable: true,
width: 300,
ellipsis: true
},
{
title: '客户',
dataIndex: 'customerName',
align: 'center',
resizable: true,
width: 300,
ellipsis: true
},
{
title: '客户编码',
dataIndex: 'customerNumber',
align: 'center',
resizable: true,
width: 300,
ellipsis: true
},
{
title: '计划发货仓库',
dataIndex: 'storeName',
align: 'center',
resizable: true,
width: 300,
ellipsis: true
},
{
title: '业务员',
dataIndex: 'salesman',
align: 'center',
resizable: true,
width: 300,
ellipsis: true
},
{
title: '车牌号',
dataIndex: 'carNumber',
align: 'center',
resizable: true,
width: 300,
ellipsis: true
},
{
title: '收货方',
dataIndex: 'receiveParty',
align: 'center',
resizable: true,
width: 300,
ellipsis: true
},
{
title: '创建时间',
dataIndex: 'createTime',
sorter: true,
sortDirections: ['descend', 'ascend'],
align: 'center',
resizable: true,
width: 300,
ellipsis: true
},
{
title: '创建人',
dataIndex: 'createUserName',
align: 'center',
resizable: true,
width: 300,
ellipsis: true
}
]
const {
searchFormState,
tableRef,
selectedRowKeys,
columns,
loadData,
reset,
deleteRecord,
deleteBatchRecords,
options,
searchFormRef,
navigateTo
} = useTableManagement(
{
page: inventoryInvoiceApi.inventoryInvoicePage,
delete: inventoryInvoiceApi.inventoryInvoiceDelete
},
tableColumns,
['inventoryInvoice:edit', 'inventoryInvoice:delete']
)
//
const handleExamine = () => {
if (selectedRowKeys.value.length === 0) return message.error('请选择审核数据!')
inventoryInvoiceApi
.inventoryInvoiceAuditPass(
selectedRowKeys.value.map((item) => {
return {
id: item
}
})
)
.then((res) => {
message.success('审核成功!')
tableRef.value.refresh()
tableRef.value.clearRefreshSelected()
})
}
</script>

View File

@ -76,6 +76,11 @@
$TOOL.dictTypeData('PRODUCE_TASK_STATE', record.state || '')
}}</a-tag>
</template>
<template v-if="column.dataIndex === 'produceType'">
<a-tag :color="tagColorList[record.state - 1]">{{
$TOOL.dictTypeData('PRODUCE_TYPE', record.produceType || '')
}}</a-tag>
</template>
<template v-if="column.dataIndex === 'action'">
<a-space>
<a

View File

@ -0,0 +1,117 @@
export const tableColumns = [
{
title: '条码',
dataIndex: 'barcode',
align: 'center',
resizable: true,
width: 200,
ellipsis: true
},
{
title: '上级条码',
dataIndex: 'parentBarcode',
align: 'center',
resizable: true,
width: 200,
ellipsis: true
},
{
title: '关联条码',
dataIndex: 'relateBarcode',
align: 'center',
resizable: true,
width: 200,
ellipsis: true
},
{
title: '关联单号',
dataIndex: 'docsNumber',
align: 'center',
resizable: true,
width: 200,
ellipsis: true
},
{
title: '类型',
dataIndex: 'typeName',
align: 'center',
resizable: true,
width: 100,
ellipsis: true
},
{
title: '物料编码',
dataIndex: 'productNumber',
align: 'center',
resizable: true,
width: 200,
ellipsis: true
},
{
title: '物料名称',
dataIndex: 'productName',
align: 'center',
resizable: true,
width: 250,
ellipsis: true
},
{
title: '规格型号',
dataIndex: 'specification',
align: 'center',
resizable: true,
width: 200,
ellipsis: true
},
{
title: '内码',
dataIndex: 'barcodeInterior',
align: 'center',
resizable: true,
width: 200,
ellipsis: true
},
{
title: '批号',
dataIndex: 'batchNumber',
align: 'center',
resizable: true,
width: 200,
ellipsis: true
},
{
title: '基本数量',
dataIndex: 'basicAmount',
align: 'center',
resizable: true,
width: 90,
ellipsis: true
},
{
title: '处理内容',
dataIndex: 'content',
align: 'center',
resizable: true,
width: 300,
ellipsis: true
},
{
title: '创建人',
dataIndex: 'createUserName',
align: 'center',
resizable: true,
width: 200,
ellipsis: true
},
{
title: '创建时间',
dataIndex: 'createTime',
sorter: true,
sortDirections: ['descend', 'ascend'],
align: 'center',
resizable: true,
width: 200,
ellipsis: true
}
]

View File

@ -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: '请输入内码' } }
]

View File

@ -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('produceBarcodeHistory: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 historyApi from '@/api/production/produceTask/produceBarcodeHistoryApi'
import { useTableManagement } from '@/hook/useTableManagement'
import { searchFields } from '@/views/productionBusiness/traceability/barcodeHistory/formFields/searchFields'
import { tableColumns } from '@/views/productionBusiness/traceability/barcodeHistory/columns/tableColumn'
const {
searchFormState,
tableRef,
selectedRowKeys,
columns,
loadData,
deleteRecord,
deleteBatchRecords,
options,
navigateTo
} = useTableManagement(
{
page: historyApi.produceBarcodeHistoryPage
},
tableColumns,
['produceBarcodeHistory:export']
)
//
const exportBatchVerify = () =>{
}
onMounted(() => {
})
</script>