| | |
| | | slots: { default: 'productId' }, |
| | | }, |
| | | { |
| | | field: 'stockCount', |
| | | title: '库存', |
| | | minWidth: 80, |
| | | }, |
| | | { |
| | | field: 'productBarCode', |
| | | title: '条码', |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | field: 'productUnitName', |
| | | title: '单位', |
| | | minWidth: 80, |
| | |
| | | }, |
| | | }, |
| | | { |
| | | field: 'inStatus', |
| | | title: '入库状态', |
| | | minWidth: 100, |
| | | slots: { default: 'inStatus' }, |
| | | }, |
| | | { |
| | | title: '操作', |
| | | width: 340, |
| | | fixed: 'right', |
| | |
| | | |
| | | import { TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | | import { getItemPage } from '#/api/mdm/item'; |
| | | import { getStockCount } from '#/api/erp/stock/stock'; |
| | | |
| | | import { useFormItemColumns } from '../data'; |
| | | |
| | |
| | | const newRow = { |
| | | id: undefined, |
| | | productId: undefined, |
| | | productUnitName: undefined, // 产品单位 |
| | | productBarCode: undefined, // 产品条码 |
| | | productUnitName: undefined, |
| | | productPrice: undefined, |
| | | stockCount: undefined, |
| | | count: 1, |
| | | totalProductPrice: undefined, |
| | | taxPercent: 0, |
| | |
| | | } |
| | | row.productId = productId; |
| | | row.productUnitId = product.unitMeasureId; |
| | | row.productBarCode = product.barCode; |
| | | row.productUnitName = product.unitMeasureName; |
| | | row.productName = product.name; |
| | | row.stockCount = (await getStockCount(productId)) || 0; |
| | | row.productPrice = product.purchasePrice || 0; |
| | | row.count = row.count || 1; |
| | | handleRowChange(row); |
| | |
| | | slots: { default: 'productId' }, |
| | | }, |
| | | { |
| | | field: 'productBarCode', |
| | | title: '条码', |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | field: 'productUnitName', |
| | | title: '单位', |
| | | minWidth: 80, |
| | |
| | | minWidth: 120, |
| | | fixed: 'right', |
| | | slots: { default: 'count' }, |
| | | }, |
| | | { |
| | | field: 'inCount', |
| | | title: '入库数量', |
| | | minWidth: 100, |
| | | fixed: 'right', |
| | | formatter: 'formatAmount6', |
| | | }, |
| | | { |
| | | field: 'productPrice', |
| | |
| | | minWidth: 120, |
| | | }, |
| | | { |
| | | field: 'qcCheckFlag', |
| | | title: '是否质检', |
| | | minWidth: 80, |
| | | slots: { default: 'qcCheckFlag' }, |
| | | }, |
| | | { |
| | | field: 'productNames', |
| | | title: '申请产品', |
| | | minWidth: 150, |
| | |
| | | slots: { default: 'status' }, |
| | | }, |
| | | { |
| | | field: 'inStatus', |
| | | title: '入库状态', |
| | | minWidth: 100, |
| | | slots: { default: 'inStatus' }, |
| | | }, |
| | | { |
| | | field: 'requestReason', |
| | | title: '申请理由', |
| | | minWidth: 150, |
| | |
| | | <Tag v-else-if="row.status === 30" color="error">审核不通过</Tag> |
| | | <Tag v-else-if="row.status === 40" color="warning">已取消</Tag> |
| | | </template> |
| | | <template #qcCheckFlag="{ row }"> |
| | | <Tag v-if="row.qcCheckFlag" color="success">是</Tag> |
| | | <Tag v-else color="default">否</Tag> |
| | | <template #inStatus="{ row }"> |
| | | <Tag v-if="row.inStatus === 0" color="default">未入库</Tag> |
| | | <Tag v-else-if="row.inStatus === 1" color="warning">部分入库</Tag> |
| | | <Tag v-else-if="row.inStatus === 2" color="success">全部入库</Tag> |
| | | </template> |
| | | <template #actions="{ row }"> |
| | | <TableAction |
| | |
| | | count: item.count, |
| | | taxPercent: item.taxPercent, |
| | | demandTime: item.demandTime, |
| | | qcCheckFlag: item.qcCheckFlag, |
| | | remark: item.remark, |
| | | })); |
| | | try { |