diff --git a/src/views/erp/stock/checkExecution/components/StockCheckExecutionForm.vue b/src/views/erp/stock/checkExecution/components/StockCheckExecutionForm.vue index ad0538bb..e5a54432 100644 --- a/src/views/erp/stock/checkExecution/components/StockCheckExecutionForm.vue +++ b/src/views/erp/stock/checkExecution/components/StockCheckExecutionForm.vue @@ -328,11 +328,7 @@ - - - +
diff --git a/src/views/erp/stock/checkRecord/index.vue b/src/views/erp/stock/checkRecord/index.vue index 46217d56..2e520c29 100644 --- a/src/views/erp/stock/checkRecord/index.vue +++ b/src/views/erp/stock/checkRecord/index.vue @@ -368,7 +368,7 @@ const getSourceTypeLabel = (value: number | string | undefined) => { } const getUnitName = (row: StockCheckRecordVO) => { - return row.purchaseUnitName || row.unitName || row.productUnitName || '' + return row.productUnitName || '' } const formatNumber = (value: number | string | undefined) => { diff --git a/src/views/erp/stock/in/components/StockInItemForm.vue b/src/views/erp/stock/in/components/StockInItemForm.vue index f15992d2..efe5ad9a 100644 --- a/src/views/erp/stock/in/components/StockInItemForm.vue +++ b/src/views/erp/stock/in/components/StockInItemForm.vue @@ -149,18 +149,40 @@ - + - + @@ -609,17 +631,8 @@ const selectorColumnLabel = computed(() => { ? `${t('ErpStock.Item.taskOrder')}/${t('ErpStock.Item.selectProduct')}` : t('ErpStock.Item.selectProduct') }) -const getFirstUnitName = (keys: string[]) => { - const row = (formData.value || []).find((item) => keys.some((key) => item?.[key])) - const key = keys.find((itemKey) => row?.[itemKey]) - return key ? row?.[key] : undefined -} -const formatInboundQuantityLabel = (unitName?: string) => { - const base = t('ErpStock.Item.inCount') - return unitName ? `${base}(${unitName})` : base -} -const inPackageCountLabel = computed(() => formatInboundQuantityLabel(getFirstUnitName(['productUnitName', 'unitName']))) -const inItemCountLabel = computed(() => formatInboundQuantityLabel(getFirstUnitName(['purchaseUnitName']))) +const getPurchaseQuantityUnitName = (row: any) => row.purchaseUnitName +const getInventoryQuantityUnitName = (row: any) => row.unitName || row.productUnitName const productDialogVisible = ref(false) const productDialogLoading = ref(false) const productDialogList = ref([]) @@ -793,6 +806,7 @@ const handleAdd = () => { productId: undefined, productName: undefined, productUnitName: undefined, // 产品单位 + unitName: undefined, productBarCode: undefined, // 产品条码 productPrice: undefined, purchaseUnitId: undefined, @@ -889,6 +903,7 @@ const onChangeProduct = (productId, row) => { const fillRowByProduct = (row: any, product: any) => { row.productUnitName = product.unitName + row.unitName = product.unitName row.productBarCode = product.barCode row.productCode = product.barCode row.productPrice = product.minPrice @@ -939,6 +954,7 @@ const getDefaultSupplier = (product: any) => { const clearProduct = (row: any) => { row.productUnitName = undefined + row.unitName = undefined row.productBarCode = undefined row.productCode = undefined row.productPrice = undefined @@ -1489,6 +1505,7 @@ const fillProductNames = (rows: any[]) => { row.productCode = row.productCode || product.barCode row.productName = row.productName || product.name row.productUnitName = row.productUnitName || product.unitName + row.unitName = row.unitName || product.unitName row.productPrice = row.productPrice ?? product.minPrice row.purchaseUnitId = row.purchaseUnitId ?? (product as any).purchaseUnitId row.purchaseUnitName = row.purchaseUnitName ?? (product as any).purchaseUnitName @@ -1556,6 +1573,12 @@ onMounted(async () => { padding: 12px 0 0; } +.quantity-input :deep(.el-input__suffix) { + min-width: 30px; + justify-content: center; + color: var(--el-text-color-secondary); +} + .task-product-select { display: grid; gap: 6px; diff --git a/src/views/erp/stock/move/components/StockMoveItemForm.vue b/src/views/erp/stock/move/components/StockMoveItemForm.vue index 094e3620..19f319e0 100644 --- a/src/views/erp/stock/move/components/StockMoveItemForm.vue +++ b/src/views/erp/stock/move/components/StockMoveItemForm.vue @@ -287,7 +287,7 @@ const categoryTypeLabel = computed(() => { const productColumnLabel = computed(() => categoryTypeLabel.value) const productPlaceholder = computed(() => `请选择${productColumnLabel.value}`) const productSelectTitle = computed(() => `选择${productColumnLabel.value}`) -const getRowUnitName = (row) => row.purchaseUnitName || row.unitName || row.productUnitName || '-' +const getRowUnitName = (row) => row.unitName || '-' watch( () => props.items, diff --git a/src/views/erp/stock/overview/index.vue b/src/views/erp/stock/overview/index.vue index 3b7edb5b..e396886f 100644 --- a/src/views/erp/stock/overview/index.vue +++ b/src/views/erp/stock/overview/index.vue @@ -1,33 +1,28 @@ - - - + + + - - diff --git a/src/views/erp/stock/record/index.vue b/src/views/erp/stock/record/index.vue index 741673c7..f91c1884 100644 --- a/src/views/erp/stock/record/index.vue +++ b/src/views/erp/stock/record/index.vue @@ -62,12 +62,8 @@ - + @@ -188,7 +184,7 @@ const formatNumber = (value: number | string | undefined) => { const formatCountWithUnit = (row: StockRecordVO, withDirectionSign = false) => { const value = withDirectionSign ? row.count : row.totalCount - const unitName = row.purchaseUnitName || row.unitName + const unitName = row.unitName const unit = unitName ? ` ${unitName}` : '' if (value === undefined || value === null) return `-${unit}` if (!withDirectionSign) return `${formatNumber(value)}${unit}`