feat:【antd】【erp 系统】库存相关的 3 位保留的补全
This commit is contained in:
@@ -229,16 +229,17 @@ onMounted(async () => {
|
|||||||
:precision="2"
|
:precision="2"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ row.count || '-' }}</span>
|
<span v-else>{{ erpCountInputFormatter(row.count) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #productPrice="{ row }">
|
<template #productPrice="{ row }">
|
||||||
<InputNumber
|
<InputNumber
|
||||||
disabled
|
v-if="!disabled"
|
||||||
v-model:value="row.productPrice"
|
v-model:value="row.productPrice"
|
||||||
:min="0"
|
:min="0"
|
||||||
:precision="2"
|
:precision="2"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
|
<span v-else>{{ erpPriceInputFormatter(row.productPrice) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #remark="{ row }">
|
<template #remark="{ row }">
|
||||||
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ onMounted(async () => {
|
|||||||
:precision="3"
|
:precision="3"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ row.count || '-' }}</span>
|
<span v-else>{{ erpCountInputFormatter(row.count) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #productPrice="{ row }">
|
<template #productPrice="{ row }">
|
||||||
<InputNumber
|
<InputNumber
|
||||||
@@ -251,7 +251,7 @@ onMounted(async () => {
|
|||||||
:precision="2"
|
:precision="2"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ row.productPrice || '-' }}</span>
|
<span v-else>{{ erpPriceInputFormatter(row.productPrice) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #remark="{ row }">
|
<template #remark="{ row }">
|
||||||
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
||||||
|
|||||||
@@ -218,6 +218,7 @@ export function useFormItemColumns(
|
|||||||
field: 'stockCount',
|
field: 'stockCount',
|
||||||
title: '库存',
|
title: '库存',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
|
formatter: 'formatAmount3',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'productBarCode',
|
field: 'productBarCode',
|
||||||
|
|||||||
@@ -140,7 +140,9 @@ function handleDelete(row: ErpPurchaseReturnApi.PurchaseReturnItem) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 处理仓库变更 */
|
/** 处理仓库变更 */
|
||||||
const handleWarehouseChange = async (row: ErpPurchaseReturnApi.PurchaseReturnItem) => {
|
const handleWarehouseChange = async (
|
||||||
|
row: ErpPurchaseReturnApi.PurchaseReturnItem,
|
||||||
|
) => {
|
||||||
const stockCount = await getWarehouseStockCount({
|
const stockCount = await getWarehouseStockCount({
|
||||||
productId: row.productId!,
|
productId: row.productId!,
|
||||||
warehouseId: row.warehouseId!,
|
warehouseId: row.warehouseId!,
|
||||||
@@ -229,16 +231,17 @@ onMounted(async () => {
|
|||||||
:precision="2"
|
:precision="2"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ row.count || '-' }}</span>
|
<span v-else>{{ erpCountInputFormatter(row.count) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #productPrice="{ row }">
|
<template #productPrice="{ row }">
|
||||||
<InputNumber
|
<InputNumber
|
||||||
disabled
|
v-if="!disabled"
|
||||||
v-model:value="row.productPrice"
|
v-model:value="row.productPrice"
|
||||||
:min="0"
|
:min="0"
|
||||||
:precision="2"
|
:precision="2"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
|
<span v-else>{{ erpPriceInputFormatter(row.productPrice) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #remark="{ row }">
|
<template #remark="{ row }">
|
||||||
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
||||||
|
|||||||
@@ -192,6 +192,7 @@ export function useFormItemColumns(): VxeTableGridOptions['columns'] {
|
|||||||
field: 'stockCount',
|
field: 'stockCount',
|
||||||
title: '库存',
|
title: '库存',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
|
formatter: 'formatAmount3',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'productBarCode',
|
field: 'productBarCode',
|
||||||
|
|||||||
@@ -241,7 +241,7 @@ onMounted(async () => {
|
|||||||
:precision="3"
|
:precision="3"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ row.count || '-' }}</span>
|
<span v-else>{{ erpCountInputFormatter(row.count) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #productPrice="{ row }">
|
<template #productPrice="{ row }">
|
||||||
<InputNumber
|
<InputNumber
|
||||||
@@ -251,7 +251,7 @@ onMounted(async () => {
|
|||||||
:precision="2"
|
:precision="2"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ row.productPrice || '-' }}</span>
|
<span v-else>{{ erpPriceInputFormatter(row.productPrice) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #remark="{ row }">
|
<template #remark="{ row }">
|
||||||
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
||||||
|
|||||||
@@ -235,6 +235,7 @@ export function useFormItemColumns(
|
|||||||
field: 'stockCount',
|
field: 'stockCount',
|
||||||
title: '库存',
|
title: '库存',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
|
formatter: 'formatAmount3',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'productBarCode',
|
field: 'productBarCode',
|
||||||
|
|||||||
@@ -229,16 +229,17 @@ onMounted(async () => {
|
|||||||
:precision="2"
|
:precision="2"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ row.count || '-' }}</span>
|
<span v-else>{{ erpCountInputFormatter(row.count) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #productPrice="{ row }">
|
<template #productPrice="{ row }">
|
||||||
<InputNumber
|
<InputNumber
|
||||||
disabled
|
v-if="!disabled"
|
||||||
v-model:value="row.productPrice"
|
v-model:value="row.productPrice"
|
||||||
:min="0"
|
:min="0"
|
||||||
:precision="2"
|
:precision="2"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
|
<span v-else>{{ erpPriceInputFormatter(row.productPrice) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #remark="{ row }">
|
<template #remark="{ row }">
|
||||||
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
||||||
|
|||||||
@@ -234,6 +234,7 @@ export function useFormItemColumns(
|
|||||||
field: 'stockCount',
|
field: 'stockCount',
|
||||||
title: '库存',
|
title: '库存',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
|
formatter: 'formatAmount3',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'productBarCode',
|
field: 'productBarCode',
|
||||||
|
|||||||
@@ -229,16 +229,17 @@ onMounted(async () => {
|
|||||||
:precision="2"
|
:precision="2"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ row.count || '-' }}</span>
|
<span v-else>{{ erpCountInputFormatter(row.count) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #productPrice="{ row }">
|
<template #productPrice="{ row }">
|
||||||
<InputNumber
|
<InputNumber
|
||||||
disabled
|
v-if="!disabled"
|
||||||
v-model:value="row.productPrice"
|
v-model:value="row.productPrice"
|
||||||
:min="0"
|
:min="0"
|
||||||
:precision="2"
|
:precision="2"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
|
<span v-else>{{ erpPriceInputFormatter(row.productPrice) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #remark="{ row }">
|
<template #remark="{ row }">
|
||||||
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ export function useFormItemColumns(): VxeTableGridOptions['columns'] {
|
|||||||
field: 'stockCount',
|
field: 'stockCount',
|
||||||
title: '账面库存',
|
title: '账面库存',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
|
formatter: 'formatAmount3',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'productBarCode',
|
field: 'productBarCode',
|
||||||
@@ -127,6 +128,7 @@ export function useFormItemColumns(): VxeTableGridOptions['columns'] {
|
|||||||
minWidth: 120,
|
minWidth: 120,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
slots: { default: 'actualCount' },
|
slots: { default: 'actualCount' },
|
||||||
|
formatter: 'formatAmount3',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'count',
|
field: 'count',
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ onMounted(async () => {
|
|||||||
:precision="3"
|
:precision="3"
|
||||||
@change="handleActualCountChange($event, row)"
|
@change="handleActualCountChange($event, row)"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ row.actualCount || '-' }}</span>
|
<span v-else>{{ erpCountInputFormatter(row.actualCount) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #productPrice="{ row }">
|
<template #productPrice="{ row }">
|
||||||
<InputNumber
|
<InputNumber
|
||||||
@@ -257,7 +257,7 @@ onMounted(async () => {
|
|||||||
:precision="2"
|
:precision="2"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ row.productPrice || '-' }}</span>
|
<span v-else>{{ erpPriceInputFormatter(row.productPrice) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #remark="{ row }">
|
<template #remark="{ row }">
|
||||||
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ export function useFormItemColumns(): VxeTableGridOptions['columns'] {
|
|||||||
field: 'stockCount',
|
field: 'stockCount',
|
||||||
title: '库存',
|
title: '库存',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
|
formatter: 'formatAmount3',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'productBarCode',
|
field: 'productBarCode',
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ onMounted(async () => {
|
|||||||
:precision="3"
|
:precision="3"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ row.count || '-' }}</span>
|
<span v-else>{{ erpCountInputFormatter(row.count) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #productPrice="{ row }">
|
<template #productPrice="{ row }">
|
||||||
<InputNumber
|
<InputNumber
|
||||||
@@ -246,7 +246,7 @@ onMounted(async () => {
|
|||||||
:precision="2"
|
:precision="2"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ row.productPrice || '-' }}</span>
|
<span v-else>{{ erpPriceInputFormatter(row.productPrice) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #remark="{ row }">
|
<template #remark="{ row }">
|
||||||
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ export function useFormItemColumns(): VxeTableGridOptions['columns'] {
|
|||||||
field: 'stockCount',
|
field: 'stockCount',
|
||||||
title: '库存',
|
title: '库存',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
|
formatter: 'formatAmount3',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'productBarCode',
|
field: 'productBarCode',
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ onMounted(async () => {
|
|||||||
:precision="3"
|
:precision="3"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ row.count || '-' }}</span>
|
<span v-else>{{ erpCountInputFormatter(row.count) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #productPrice="{ row }">
|
<template #productPrice="{ row }">
|
||||||
<InputNumber
|
<InputNumber
|
||||||
@@ -267,7 +267,7 @@ onMounted(async () => {
|
|||||||
:precision="2"
|
:precision="2"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ row.productPrice || '-' }}</span>
|
<span v-else>{{ erpPriceInputFormatter(row.productPrice) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #remark="{ row }">
|
<template #remark="{ row }">
|
||||||
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ export function useFormItemColumns(): VxeTableGridOptions['columns'] {
|
|||||||
field: 'stockCount',
|
field: 'stockCount',
|
||||||
title: '库存',
|
title: '库存',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
|
formatter: 'formatAmount3',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'productBarCode',
|
field: 'productBarCode',
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ onMounted(async () => {
|
|||||||
:precision="3"
|
:precision="3"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ row.count || '-' }}</span>
|
<span v-else>{{ erpCountInputFormatter(row.count) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #productPrice="{ row }">
|
<template #productPrice="{ row }">
|
||||||
<InputNumber
|
<InputNumber
|
||||||
@@ -244,7 +244,7 @@ onMounted(async () => {
|
|||||||
:precision="2"
|
:precision="2"
|
||||||
@change="handleRowChange(row)"
|
@change="handleRowChange(row)"
|
||||||
/>
|
/>
|
||||||
<span v-else>{{ row.productPrice || '-' }}</span>
|
<span v-else>{{ erpPriceInputFormatter(row.productPrice) || '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #remark="{ row }">
|
<template #remark="{ row }">
|
||||||
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
<Input v-if="!disabled" v-model:value="row.remark" class="w-full" />
|
||||||
|
|||||||
Reference in New Issue
Block a user