|
|
@@ -13,17 +13,49 @@ import {
|
|
|
import {useSupertube, useTableDeleteEvent, useTableModalEvent} from '@hooks';
|
|
|
|
|
|
const tableColumns: ColumnsType<SemiDrawListData> = [
|
|
|
- {title: '要货单编号', dataIndex: 'askGoodsId', key: 'askGoodsId', width: MIDDLE_TABLE_WIDTH},
|
|
|
+ {
|
|
|
+ title: '要货单编号',
|
|
|
+ dataIndex: 'askGoodsId',
|
|
|
+ key: 'askGoodsId',
|
|
|
+ width: MIDDLE_TABLE_WIDTH,
|
|
|
+ },
|
|
|
{
|
|
|
title: '生产订单号',
|
|
|
dataIndex: 'productionCode',
|
|
|
key: 'productionCode',
|
|
|
width: MIDDLE_TABLE_WIDTH,
|
|
|
},
|
|
|
- {title: '物料编号', dataIndex: 'materialCode', key: 'materialCode', width: LARGE_TABLE_WIDTH},
|
|
|
- {title: '物料名称', dataIndex: 'materialName', key: 'materialName', width: HUGE_TABLE_WIDTH},
|
|
|
- {title: '数量', dataIndex: 'num', key: 'num', width: SMALL_TABLE_WIDTH, align: 'right'},
|
|
|
- {title: '要料部门', dataIndex: 'department', key: 'department', width: NORMAL_TABLE_WIDTH},
|
|
|
+ {
|
|
|
+ title: '物料编号',
|
|
|
+ dataIndex: 'materialCode',
|
|
|
+ key: 'materialCode',
|
|
|
+ width: LARGE_TABLE_WIDTH,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '物料名称',
|
|
|
+ dataIndex: 'materialName',
|
|
|
+ key: 'materialName',
|
|
|
+ width: HUGE_TABLE_WIDTH,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '需求数量',
|
|
|
+ dataIndex: 'num',
|
|
|
+ key: 'num',
|
|
|
+ width: SMALL_TABLE_WIDTH,
|
|
|
+ align: 'right',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '出库数量',
|
|
|
+ dataIndex: 'outNum',
|
|
|
+ width: SMALL_TABLE_WIDTH,
|
|
|
+ align: 'right',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '要料部门',
|
|
|
+ dataIndex: 'department',
|
|
|
+ key: 'department',
|
|
|
+ width: NORMAL_TABLE_WIDTH,
|
|
|
+ },
|
|
|
{title: '所属公司', dataIndex: 'companyName', width: HUGE_TABLE_WIDTH},
|
|
|
{title: '分录号', dataIndex: 'entryNumber', width: NORMAL_TABLE_WIDTH},
|
|
|
{title: '移动类型', dataIndex: 'moveType', width: NORMAL_TABLE_WIDTH},
|
|
|
@@ -42,9 +74,13 @@ const tableColumns: ColumnsType<SemiDrawListData> = [
|
|
|
];
|
|
|
|
|
|
export function useHandle(refetch: () => void) {
|
|
|
- const [deleteId, onDelete] = useTableDeleteEvent(delProductionRequisition, refetch, {
|
|
|
- label: '半成品领料单',
|
|
|
- });
|
|
|
+ const [deleteId, onDelete] = useTableDeleteEvent(
|
|
|
+ delProductionRequisition,
|
|
|
+ refetch,
|
|
|
+ {
|
|
|
+ label: '半成品领料单',
|
|
|
+ },
|
|
|
+ );
|
|
|
const [{visible, editId: putOutId}, {onClose, onEdit}] = useTableModalEvent();
|
|
|
|
|
|
const isSuper = useSupertube();
|
|
|
@@ -68,7 +104,12 @@ export function useHandle(refetch: () => void) {
|
|
|
{type === '0' ? '出库' : '已出库'}
|
|
|
</Button>
|
|
|
{isSuper && (
|
|
|
- <Button type='text' danger loading={deleteId === id} onClick={onDelete(id)}>
|
|
|
+ <Button
|
|
|
+ type='text'
|
|
|
+ danger
|
|
|
+ loading={deleteId === id}
|
|
|
+ onClick={onDelete(id)}
|
|
|
+ >
|
|
|
删除
|
|
|
</Button>
|
|
|
)}
|