feat(钢卷管理): 添加真实库区选择功能并优化表单字段
- 在分卷、合卷和钢卷录入页面添加真实库区选择组件 - 将nextWarehouseId字段重命名为warehouseId以统一命名 - 添加加载状态提示提升用户体验 - 优化表单布局和字段验证规则
This commit is contained in:
@@ -169,8 +169,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="目标库区" required>
|
||||
<el-select
|
||||
v-model="item.nextWarehouseId"
|
||||
placeholder="请选择目标库区"
|
||||
v-model="item.warehouseId"
|
||||
placeholder="请选择目标库位"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
:disabled="readonly"
|
||||
@@ -183,6 +183,15 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="展示库区" required>
|
||||
<ActualWarehouseSelect
|
||||
v-model="item.actualWarehouseId"
|
||||
placeholder="请选择真实库区"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
:disabled="readonly"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -212,11 +221,13 @@ import { listWarehouse } from '@/api/wms/warehouse';
|
||||
import { listRawMaterial } from '@/api/wms/rawMaterial';
|
||||
import { listProduct } from '@/api/wms/product';
|
||||
import CoilSelector from '@/components/CoilSelector';
|
||||
import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect";
|
||||
|
||||
export default {
|
||||
name: 'SplitCoil',
|
||||
components: {
|
||||
CoilSelector
|
||||
CoilSelector,
|
||||
ActualWarehouseSelect
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -245,7 +256,8 @@ export default {
|
||||
itemId: null,
|
||||
grossWeight: null,
|
||||
netWeight: null,
|
||||
nextWarehouseId: null
|
||||
warehouseId: null,
|
||||
actualWarehouseId: null
|
||||
}
|
||||
],
|
||||
loading: false,
|
||||
@@ -441,7 +453,8 @@ export default {
|
||||
itemId: null,
|
||||
grossWeight: null,
|
||||
netWeight: null,
|
||||
nextWarehouseId: null
|
||||
warehouseId: null,
|
||||
actualWarehouseId: null
|
||||
});
|
||||
},
|
||||
|
||||
@@ -495,12 +508,18 @@ export default {
|
||||
this.$message.error(`第${i + 1}个子卷的净重不能为空`);
|
||||
return;
|
||||
}
|
||||
if (!item.nextWarehouseId) {
|
||||
if (!item.warehouseId) {
|
||||
this.$message.error(`第${i + 1}个子卷的目标库区不能为空`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const loadingInstance = this.$loading({
|
||||
lock: true,
|
||||
text: '正在分卷,请稍后...',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
|
||||
try {
|
||||
this.loading = true;
|
||||
|
||||
@@ -518,7 +537,8 @@ export default {
|
||||
itemId: item.itemId || this.motherCoil.itemId,
|
||||
grossWeight: item.grossWeight,
|
||||
netWeight: item.netWeight,
|
||||
nextWarehouseId: item.nextWarehouseId,
|
||||
warehouseId: item.warehouseId,
|
||||
actualWarehouseId: item.actualWarehouseId,
|
||||
hasMergeSplit: 1
|
||||
}))
|
||||
};
|
||||
@@ -535,11 +555,13 @@ export default {
|
||||
} else {
|
||||
this.$message.error(response.msg || '分卷保存失败');
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
this.$message.error('分卷保存失败');
|
||||
console.error(error);
|
||||
} finally {
|
||||
this.loading = false;
|
||||
loadingInstance.close();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user