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

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,49 +3,49 @@
<uni-forms class="form-card">
<view class="form-content">
<!-- 第一个独立下拉框 -->
<uni-forms-item :label="$t('outbound.move.startPointType')">
<uni-forms-item label="起始点类型">
<uni-data-select
v-model="formData.startPointType"
:localdata="pointTypeList"
:clear="false"
:placeholder="$t('outbound.move.startPointTypePlaceholder')"
placeholder="请选择起始点类型"
@change="handleStartPointTypeChange"
/>
</uni-forms-item>
<!-- 第二个独立下拉框 -->
<uni-forms-item :label="$t('outbound.move.targetPointType')">
<uni-forms-item label="目标点类型">
<uni-data-select
v-model="formData.targetPointType"
:localdata="pointTypeList"
:clear="false"
:placeholder="$t('outbound.move.targetPointTypePlaceholder')"
placeholder="请选择目标点类型"
@change="handleTargetPointTypeChange"
/>
</uni-forms-item>
<!-- 第一个联动下拉框(主) -->
<uni-forms-item :label="$t('outbound.move.sourceLocation')">
<uni-forms-item label="起始位置">
<uni-data-select
v-model="formData.sourceLocationId"
:localdata="sourceLocationList"
:clear="false"
:placeholder="$t('outbound.move.sourceLocationPlaceholder')"
placeholder="请选择起始位置"
/>
</uni-forms-item>
<!-- 第二个联动下拉框(从) -->
<uni-forms-item :label="$t('outbound.move.targetLocation')">
<uni-forms-item label="目标位置">
<uni-data-select
v-model="formData.targetLocationId"
:localdata="targetLocationList"
:clear="false"
:placeholder="$t('outbound.move.targetLocationPlaceholder')"
placeholder="请选择目标位置"
/>
</uni-forms-item>
</view>
<button class="submit-button" @click="handleSubmit">{{ $t('outbound.move.submit') }}</button>
<button class="submit-button" @click="handleSubmit">提交</button>
</uni-forms>
</view>
</template>
@@ -82,7 +82,7 @@ export default {
this.pointTypeList = res.map(item => ({
value: item.dictValue,
text: this.$t(item.dictLabel)
text: item.dictLabel
}))
@@ -90,7 +90,7 @@ export default {
} catch (error) {
console.error('获取点位列表失败', error)
uni.showToast({
title: this.$t('outbound.move.getPointTypeListFailed'),
title: '获取点位类型列表失败',
icon: 'none'
})
}
@@ -118,7 +118,7 @@ async handleStartPointTypeChange(value) {
} catch (error) {
console.error('获取端口列表失败', error)
uni.showToast({
title: this.$t('outbound.move.getPortListFailed'),
title: '获取端口列表失败',
icon: 'none'
})
}
@@ -148,7 +148,7 @@ async handleStartPointTypeChange(value) {
} catch (error) {
console.error('获取目标端口列表失败', error)
uni.showToast({
title: this.$t('outbound.move.getPortListFailed'),
title: '获取端口列表失败',
icon: 'none'
})
}
@@ -161,7 +161,7 @@ async handleStartPointTypeChange(value) {
// 表单验证
if (!this.formData.startPointType) {
uni.showToast({
title: this.$t('outbound.move.startPointTypeRequired'),
title: '请选择起始点类型',
icon: 'none'
})
return
@@ -169,7 +169,7 @@ async handleStartPointTypeChange(value) {
if (!this.formData.targetPointType) {
uni.showToast({
title: this.$t('outbound.move.targetPointTypeRequired'),
title: '请选择目标点类型',
icon: 'none'
})
return
@@ -177,7 +177,7 @@ async handleStartPointTypeChange(value) {
if (!this.formData.sourceLocationId) {
uni.showToast({
title: this.$t('outbound.move.sourceLocationRequired'),
title: '请选择起始位置',
icon: 'none'
})
return
@@ -185,7 +185,7 @@ async handleStartPointTypeChange(value) {
if (!this.formData.targetLocationId) {
uni.showToast({
title: this.$t('outbound.move.targetLocationRequired'),
title: '请选择目标位置',
icon: 'none'
})
return
@@ -197,7 +197,7 @@ async handleStartPointTypeChange(value) {
endPoint:this.formData.targetLocationId})
if (res.code === 200) {
uni.showToast({
title: this.$t('outbound.move.submitSuccess'),
title: '提交成功',
icon: 'success'
})
// 重置表单
@@ -211,14 +211,14 @@ async handleStartPointTypeChange(value) {
this.targetLocationList = []
} else {
uni.showToast({
title: res.msg || this.$t('outbound.move.submitFailed'),
title: res.msg || '提交失败',
icon: 'none'
})
}
} catch (error) {
console.error('提交移库请求失败', error)
uni.showToast({
title: res.msg ||this.$t('outbound.move.submitError'),
title: res.msg ||'提交请求失败',
icon: 'none'
})
}