现场调试修改 入库 出库 放货重新分配货位

This commit is contained in:
liuhanqing
2025-12-26 13:23:28 +08:00
parent ced125c8e9
commit 6b56e5f2ad
53 changed files with 3397 additions and 1832 deletions

View File

@@ -3,7 +3,7 @@
<view class="search-box">
<uni-easyinput
v-model="stockinId"
:placeholder="$t('inbound.inorder.searchPlaceholder')"
placeholder="请输入或扫码输入单据号"
:clearable="true"
@clear="handleClear"
@confirm="handleSearch"
@@ -21,28 +21,28 @@
<view class="card-content">
<view class="order-header" @click="handleOrderClick(order)">
<view class="info-row">
<text class="label">{{ $t('inbound.inorder.orderNumber') }}</text>
<text class="value">{{ order.stockinId }}</text>
</view>
<view class="info-row">
<text class="label">{{ $t('inbound.inorder.createTime') }}</text>
<text class="value">{{ order.createDate }}</text>
</view>
<view class="info-row">
<text class="label">{{ $t('inbound.inorder.supplier') }}</text>
<text class="value">{{ order.supplierName }}</text>
</view>
<text class="label">单据编号:</text>
<text class="value">{{ order.stockinId }}</text>
</view>
<view class="info-row">
<text class="label">创建时间:</text>
<text class="value">{{ order.createDate }}</text>
</view>
<view class="info-row">
<text class="label">供应商</text>
<text class="value">{{ order.supplierName }}</text>
</view>
</view>
<!-- 展开时显示物料信息 -->
<view v-if="order.expanded && order.goodsList" class="goods-list" @click.stop>
<view class="goods-title">{{ $t('inbound.inorder.goodsInfo') }}</view>
<view class="goods-title">物品信息</view>
<view class="goods-table">
<view class="table-header">
<text class="header-cell" style="display: none;">{{ $t('inbound.inorder.productCode') }}</text>
<text class="header-cell">{{ $t('inbound.inorder.productName') }}</text>
<text class="header-cell">{{ $t('inbound.inorder.planQuantity') }}</text>
<text class="header-cell">{{ $t('inbound.inorder.inboundQuantity') }}</text>
</view>
<text class="header-cell" style="display: none;">物品编码</text>
<text class="header-cell">物品名称</text>
<text class="header-cell">计划数量</text>
<text class="header-cell">入库数量</text>
</view>
<view v-for="(goods, goodsIndex) in order.goodsList" :key="goodsIndex" class="table-row">
<text class="table-cell" style="display: none;">{{ goods.productId }}</text>
<text class="table-cell material-name">{{ goods.extraField.materialDesc }}</text>
@@ -60,8 +60,8 @@
</view>
<view class="table-cell">
<button class="operate-btn" @click.stop="handleInStock(goods)" :class="{'operate-btn-disabled': !isValidQuantity(goods)}">
{{ $t('inbound.inorder.inbound') }}
</button>
入库
</button>
</view>
</view>
</view>
@@ -70,7 +70,7 @@
</uni-card>
</view>
</view>
<view v-else class="no-data">{{ $t('inbound.inorder.noOrderInfo') }}</view>
<view v-else class="no-data">暂无入库单信息</view>
</view>
</view>
</template>
@@ -118,7 +118,7 @@ export default {
} catch (error) {
console.error('获取入库单列表失败:', error)
uni.showToast({
title: this.$t('inbound.inorder.getOrderListFailed'),
title: '获取入库单列表失败',
icon: 'none'
})
}
@@ -139,7 +139,7 @@ export default {
} catch (error) {
console.error('获取物品信息失败:', error)
uni.showToast({
title: this.$t('inbound.inorder.getItemInfoFailed'),
title: '获取物品信息失败',
icon: 'none'
})
}
@@ -187,7 +187,7 @@ export default {
if (Number(goods.inQuantity) > maxQuantity) {
goods.inQuantity = maxQuantity;
uni.showToast({
title: this.$t('inbound.inorder.exceedInboundQuantity'),
title: '超出可入库数量',
icon: 'none'
});
}
@@ -197,7 +197,7 @@ export default {
async handleInStock(goods) {
if (!this.isValidQuantity(goods)) {
uni.showToast({
title: this.$t('inbound.inorder.enterValidQuantity'),
title: '请输入有效的入库数量',
icon: 'none'
})
return
@@ -210,7 +210,7 @@ export default {
})
uni.showToast({
title: this.$t('inbound.inorder.inboundSuccess'),
title: '入库成功',
icon: 'success'
})
@@ -219,7 +219,7 @@ export default {
} catch (error) {
console.error('入库操作失败:', error)
uni.showToast({
title: this.$t('inbound.inorder.inboundFailed'),
title: '入库失败',
icon: 'none'
})
}