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

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

@@ -5,30 +5,30 @@
<uni-card v-for="(item, index) in orderList" :key="index" class="order-card">
<view class="order-info" @click="handleOrderClick(item)">
<view class="info-row">
<text class="label">{{ $t('inbound.qualityCheck.orderNumber') }}</text>
<text class="label">单据编号:</text>
<text class="value">{{ item.stockinId }}</text>
</view>
<view class="info-row">
<text class="label">{{ $t('inbound.qualityCheck.supplier') }}</text>
<text class="label">供应商:</text>
<text class="value">{{ item.supplierName }}</text>
</view>
<view class="info-row">
<text class="label">{{ $t('inbound.qualityCheck.warehouse') }}</text>
<text class="label">仓库</text>
<text class="value">{{ item.warehouseName }}</text>
</view>
<view class="info-row">
<text class="label">{{ $t('inbound.qualityCheck.createTime') }}</text>
<text class="label">创建时间:</text>
<text class="value">{{ item.createDate }}</text>
</view>
<view class="expand-icon" :class="{'expanded': item.isExpanded}">
<text>{{ item.isExpanded ? $t('inbound.qualityCheck.collapse') : $t('inbound.qualityCheck.expand') }}</text>
<text>{{ item.isExpanded ? '收起' : '展开' }}</text>
</view>
</view>
<!-- 物料详情 -->
<view class="material-detail" v-if="item.isExpanded && item.materials && item.materials.length > 0">
<view class="material-header">
<button class="check-all-button" @click="handleCheckAll(index)">{{ $t('inbound.qualityCheck.checkAll') }}</button>
<button class="check-all-button" @click="handleCheckAll(index)">全部质检</button>
</view>
<view class="material-list">
<view v-for="(material, mIndex) in item.materials" :key="mIndex" class="material-item">
@@ -36,7 +36,7 @@
<!-- <text class="material-code">{{ material.productId }}</text> -->
<text class="material-name">{{ material.extraField.materialDesc }}</text>
<view class="material-quantity">
<text>{{ $t('inbound.qualityCheck.quantity') }}</text>
<text>数量:</text>
<uni-easyinput
v-model="material.quantity"
type="number"
@@ -46,9 +46,9 @@
/>
</view>
<text class="material-status" :class="{'status-checked': material.stockStatus == '1'}">
{{ material.stockStatus == '1' ? $t('inbound.qualityCheck.checked') : $t('inbound.qualityCheck.unchecked') }}
</text>
<button class="check-button" @click="handleQualityCheck(index, mIndex)">{{ $t('inbound.qualityCheck.check') }}</button>
{{ material.stockStatus == '1' ? '已质检' : '待质检' }}
</text>
<button class="check-button" @click="handleQualityCheck(index, mIndex)">质检</button>
</view>
</view>
</view>
@@ -56,7 +56,7 @@
</uni-card>
</view>
<view v-else class="no-data">
<text>{{ $t('inbound.qualityCheck.noOrders') }}</text>
<text>暂无待质检单据</text>
</view>
</view>
</template>
@@ -86,14 +86,14 @@ export default {
}))
} else {
uni.showToast({
title: response.msg || this.$t('inbound.qualityCheck.getOrdersFailed'),
title: response.msg || '获取单据列表失败',
icon: 'none'
})
}
} catch (error) {
console.error('获取单据列表失败:', error)
uni.showToast({
title: this.$t('inbound.qualityCheck.getOrdersFailed'),
title: '获取单据列表失败',
icon: 'none'
})
}
@@ -117,14 +117,14 @@ export default {
this.$set(this.orderList[index], 'materials', response.rows)
} else {
uni.showToast({
title: response.msg || this.$t('inbound.qualityCheck.getMaterialsFailed'),
title: response.msg || '获取物料信息失败',
icon: 'none'
})
}
} catch (error) {
console.error('获取物料信息失败:', error)
uni.showToast({
title: this.$t('inbound.qualityCheck.getMaterialsFailed'),
title: '获取物料信息失败',
icon: 'none'
})
}
@@ -135,7 +135,7 @@ export default {
const order = this.orderList[index]
if (!order.materials || order.materials.length === 0) {
uni.showToast({
title: this.$t('inbound.qualityCheck.noMaterials'),
title: '暂无可质检的物料',
icon: 'none'
})
return
@@ -150,7 +150,7 @@ export default {
if (materials.length === 0) {
uni.showToast({
title: this.$t('inbound.qualityCheck.allChecked'),
title: '所有物料已完成质检',
icon: 'none'
})
return
@@ -164,7 +164,7 @@ export default {
if (response.code === 200) {
uni.showToast({
title: this.$t('inbound.qualityCheck.batchCheckSuccess'),
title: '批量质检完成',
icon: 'success'
})
@@ -179,14 +179,14 @@ export default {
this.fetchOrderList()
} else {
uni.showToast({
title: response.msg || this.$t('inbound.qualityCheck.batchCheckFailed'),
title: response.msg || '批量质检失败',
icon: 'none'
})
}
} catch (error) {
console.error('批量质检失败:', error)
uni.showToast({
title: this.$t('inbound.qualityCheck.batchCheckFailed'),
title: '批量质检失败',
icon: 'none'
})
}
@@ -203,7 +203,7 @@ export default {
})
if (response.code === 200) {
uni.showToast({
title: `${material.extraField.materialDesc} ${this.$t('inbound.qualityCheck.checkSuccess')}`,
title: `${material.extraField.materialDesc} 质检完成`,
icon: 'success'
})
// 重新获取当前单据的物料列表
@@ -216,7 +216,7 @@ export default {
}
} else {
uni.showToast({
title: response.msg || this.$t('inbound.qualityCheck.checkFailed'),
title: response.msg || '质检操作失败',
icon: 'none'
})
}
@@ -230,7 +230,7 @@ export default {
// 验证输入值
if (isNaN(newQuantity) || newQuantity < 0) {
uni.showToast({
title: this.$t('inbound.qualityCheck.invalidQuantity'),
title: '请输入有效的数量',
icon: 'none'
})
material.quantity = material.quantity