现场调试修改 入库 出库 放货重新分配货位
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="input-group">
|
||||
<text class="input-label">{{ $t('inbound.backIn.rackCode') }}</text>
|
||||
<text class="input-label">料架条码:</text>
|
||||
<uni-easyinput
|
||||
v-model="rackCode"
|
||||
:placeholder="$t('inbound.backIn.rackCodePlaceholder')"
|
||||
placeholder="请输入或扫码输入料架条码"
|
||||
:clearable="true"
|
||||
@input="handleInput"
|
||||
@clear="handleClear"
|
||||
@@ -17,22 +17,22 @@
|
||||
</view>
|
||||
|
||||
<view class="loading-container" v-if="loading">
|
||||
<uni-load-more status="loading" :content-text="{contentdown: $t('inbound.backIn.loading'),contentrefresh: $t('inbound.backIn.loading'),contentnomore: $t('common.noData')}"></uni-load-more>
|
||||
<uni-load-more status="loading" :content-text="{contentdown: '加载中...',contentrefresh: '加载中...',contentnomore: '暂无数据'}"></uni-load-more>
|
||||
</view>
|
||||
|
||||
<view class="card-container" v-if="materialList.length > 0">
|
||||
<uni-card v-for="(item, index) in materialList" :key="index" class="material-card">
|
||||
<view class="card-content">
|
||||
<view class="info-row">
|
||||
<text class="label">{{ $t('inbound.backIn.materialCode') }}</text>
|
||||
<text class="label">物料编码:</text>
|
||||
<text class="value">{{ item.productId }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="label">{{ $t('inbound.backIn.materialName') }}</text>
|
||||
<text class="label">物料名称:</text>
|
||||
<text class="value">{{ item.productName }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="label">{{ $t('inbound.backIn.quantity') }}</text>
|
||||
<text class="label">数量:</text>
|
||||
<uni-easyinput
|
||||
v-model="item.editQuantity"
|
||||
type="number"
|
||||
@@ -46,28 +46,28 @@
|
||||
</view>
|
||||
|
||||
<view class="empty-state" v-if="!loading && materialList.length === 0 && rackCode">
|
||||
<text>{{ $t('inbound.backIn.noMaterialInfo') }}</text>
|
||||
<text>未找到相关物料信息</text>
|
||||
</view>
|
||||
|
||||
<view class="button-container" v-if="materialList.length > 0">
|
||||
<button class="submit-button" @click="handleSubmit">{{ $t('inbound.backIn.submit') }}</button>
|
||||
<button class="submit-button" @click="handleSubmit">提交</button>
|
||||
</view>
|
||||
|
||||
<!-- 仓库选择弹窗 -->
|
||||
<uni-popup ref="warehousePopup" type="center">
|
||||
<view class="popup-content">
|
||||
<view class="popup-title">{{ $t('inbound.backIn.selectWarehouse') }}</view>
|
||||
<view class="popup-title">请选择仓库</view>
|
||||
<view class="popup-body">
|
||||
<uni-data-select
|
||||
v-model="selectedWarehouseId"
|
||||
:localdata="warehouseList"
|
||||
:clear="false"
|
||||
:placeholder="$t('inbound.backIn.warehousePlaceholder')"
|
||||
placeholder="请选择仓库"
|
||||
/>
|
||||
</view>
|
||||
<view class="popup-footer">
|
||||
<button class="cancel-button" @click="closeWarehousePopup">{{ $t('inbound.backIn.cancel') }}</button>
|
||||
<button class="confirm-button" @click="confirmSubmit">{{ $t('inbound.backIn.confirm') }}</button>
|
||||
<button class="cancel-button" @click="closeWarehousePopup">取消</button>
|
||||
<button class="confirm-button" @click="confirmSubmit">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
@@ -119,7 +119,7 @@
|
||||
} catch (error) {
|
||||
console.error('获取仓库列表失败:', error)
|
||||
uni.showToast({
|
||||
title: this.$t('inbound.backIn.getWarehouseListFailed'),
|
||||
title: '获取仓库列表失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
@@ -164,21 +164,21 @@
|
||||
} else {
|
||||
this.materialList = []
|
||||
uni.showToast({
|
||||
title: this.$t('inbound.backIn.noMaterialInfo'),
|
||||
title: '未找到相关物料信息',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.materialList = []
|
||||
uni.showToast({
|
||||
title: response.msg || this.$t('inbound.backIn.getRackInfoFailed'),
|
||||
title: response.msg || '获取料架信息失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
this.materialList = []
|
||||
uni.showToast({
|
||||
title: this.$t('inbound.backIn.getRackInfoFailed'),
|
||||
title: '获取料架信息失败',
|
||||
icon: 'none'
|
||||
})
|
||||
} finally {
|
||||
@@ -208,14 +208,14 @@
|
||||
|
||||
if (this.materialList.length === 0) {
|
||||
uni.showToast({
|
||||
title: this.$t('inbound.backIn.noSubmitMaterial'),
|
||||
title: '没有可提交的物料信息',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if(!this.rackCode){
|
||||
uni.showToast({
|
||||
title: this.$t('inbound.backIn.enterRackCode'),
|
||||
title: '请输入料架条码',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
@@ -231,7 +231,7 @@
|
||||
|
||||
if (!isValid) {
|
||||
uni.showToast({
|
||||
title: this.$t('inbound.backIn.enterValidQuantity'),
|
||||
title: '请输入有效的数量',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
@@ -264,7 +264,7 @@
|
||||
async confirmSubmit() {
|
||||
if (!this.selectedWarehouseId) {
|
||||
uni.showToast({
|
||||
title: this.$t('inbound.backIn.selectWarehouse'),
|
||||
title: '请选择仓库',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
@@ -290,7 +290,7 @@
|
||||
|
||||
if (response.code === 200) {
|
||||
uni.showToast({
|
||||
title: this.$t('inbound.backIn.submitSuccess'),
|
||||
title: '提交成功',
|
||||
icon: 'success'
|
||||
})
|
||||
|
||||
@@ -300,13 +300,13 @@
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: response.msg || this.$t('inbound.backIn.submitFailed'),
|
||||
title: response.msg || '提交失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
uni.showToast({
|
||||
title: this.$t('inbound.backIn.submitFailed'),
|
||||
title: '提交失败',
|
||||
icon: 'none'
|
||||
})
|
||||
console.error(error)
|
||||
|
||||
Reference in New Issue
Block a user