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: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'small'
|
default: 'small'
|
||||||
|
},
|
||||||
|
// 展示空库位筛选条件
|
||||||
|
showEmpty: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -129,6 +134,17 @@ export default {
|
|||||||
return nodeData;
|
return nodeData;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (this.showEmpty && level === 0) {
|
||||||
|
list.unshift({
|
||||||
|
value: '-1',
|
||||||
|
label: '空库位',
|
||||||
|
leaf: true,
|
||||||
|
disabled: false,
|
||||||
|
raw: {},
|
||||||
|
level: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
resolve(list);
|
resolve(list);
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.error('加载仓库树失败:', err);
|
console.error('加载仓库树失败:', err);
|
||||||
|
|||||||
@@ -316,8 +316,11 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 判断钢卷的质量状态,必须是A+, A,A-, B+其中之一
|
// 判断钢卷的质量状态,必须是A+, A,A-, B+其中之一
|
||||||
if (!['A+', 'A', 'A-', 'B+'].includes(this.form.qualityStatus)) {
|
if (!['A+', 'A', 'A-', 'B+', 'B', 'B-'].includes(this.form.qualityStatus)
|
||||||
this.$message.warning('钢卷质量状态需在B+及以上');
|
&& !(this.form.qualityStatus == null
|
||||||
|
|| this.form.qualityStatus == ''
|
||||||
|
|| this.form.qualityStatus == undefined)) {
|
||||||
|
this.$message.warning('钢卷质量状态需在B-及以上');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
addProductWithBom({
|
addProductWithBom({
|
||||||
...this.form,
|
...this.form,
|
||||||
productCode: this.form.material + this.form.zincLayer + new Date().getTime(),
|
productCode: this.form.material + (this.form.zincLayer || '') + new Date().getTime(),
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
|||||||
@@ -369,7 +369,6 @@ export default {
|
|||||||
if (this.form.rawMaterialId != null) {
|
if (this.form.rawMaterialId != null) {
|
||||||
updateRawMaterial({
|
updateRawMaterial({
|
||||||
...this.form,
|
...this.form,
|
||||||
productCode: this.form.material + this.form.zincLayer + new Date().getTime(),
|
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@@ -379,7 +378,10 @@ export default {
|
|||||||
this.buttonLoading = false;
|
this.buttonLoading = false;
|
||||||
});
|
});
|
||||||
} else {
|
} 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.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|||||||
@@ -168,7 +168,8 @@ export default {
|
|||||||
// 导出
|
// 导出
|
||||||
exportData() {
|
exportData() {
|
||||||
this.download('wms/materialCoil/export', {
|
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`)
|
}, `materialCoil_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user