fix(wms): 修复多个模块中的逻辑问题和数据格式
修复delivery.vue导出时缺少状态参数的问题 修正product/index.vue和rawMaterial/index.vue中productCode生成逻辑 放宽ship.vue中钢卷质量状态的校验范围 为ActualWarehouseSelect组件添加空库位筛选功能
This commit is contained in:
@@ -53,6 +53,11 @@ export default {
|
||||
size: {
|
||||
type: String,
|
||||
default: 'small'
|
||||
},
|
||||
// 展示空库位筛选条件
|
||||
showEmpty: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -129,6 +134,17 @@ export default {
|
||||
return nodeData;
|
||||
});
|
||||
|
||||
if (this.showEmpty && level === 0) {
|
||||
list.unshift({
|
||||
value: '-1',
|
||||
label: '空库位',
|
||||
leaf: true,
|
||||
disabled: false,
|
||||
raw: {},
|
||||
level: 1
|
||||
});
|
||||
}
|
||||
|
||||
resolve(list);
|
||||
}).catch(err => {
|
||||
console.error('加载仓库树失败:', err);
|
||||
|
||||
@@ -316,8 +316,11 @@ export default {
|
||||
return;
|
||||
}
|
||||
// 判断钢卷的质量状态,必须是A+, A,A-, B+其中之一
|
||||
if (!['A+', 'A', 'A-', 'B+'].includes(this.form.qualityStatus)) {
|
||||
this.$message.warning('钢卷质量状态需在B+及以上');
|
||||
if (!['A+', 'A', 'A-', 'B+', 'B', 'B-'].includes(this.form.qualityStatus)
|
||||
&& !(this.form.qualityStatus == null
|
||||
|| this.form.qualityStatus == ''
|
||||
|| this.form.qualityStatus == undefined)) {
|
||||
this.$message.warning('钢卷质量状态需在B-及以上');
|
||||
return;
|
||||
}
|
||||
this.$refs["form"].validate(valid => {
|
||||
|
||||
@@ -332,7 +332,7 @@ export default {
|
||||
} else {
|
||||
addProductWithBom({
|
||||
...this.form,
|
||||
productCode: this.form.material + this.form.zincLayer + new Date().getTime(),
|
||||
productCode: this.form.material + (this.form.zincLayer || '') + new Date().getTime(),
|
||||
}).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
|
||||
@@ -369,7 +369,6 @@ export default {
|
||||
if (this.form.rawMaterialId != null) {
|
||||
updateRawMaterial({
|
||||
...this.form,
|
||||
productCode: this.form.material + this.form.zincLayer + new Date().getTime(),
|
||||
}).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
@@ -379,7 +378,10 @@ export default {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addRawMaterialWithBom(this.form).then(response => {
|
||||
addRawMaterialWithBom({
|
||||
...this.form,
|
||||
rawMaterialCode: this.form.material + (this.form.zincLayer || '') + new Date().getTime(),
|
||||
}).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
|
||||
@@ -168,7 +168,8 @@ export default {
|
||||
// 导出
|
||||
exportData() {
|
||||
this.download('wms/materialCoil/export', {
|
||||
coilIds: this.list.map(item => item.coilId).join(',')
|
||||
coilIds: this.list.map(item => item.coilId).join(','),
|
||||
status: 1
|
||||
}, `materialCoil_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user