给商品选择页面增加提示,防止未选择商品就提交数据

This commit is contained in:
jishenghua
2026-01-02 22:51:23 +08:00
parent c907e77a73
commit faa8582f81

View File

@@ -400,9 +400,13 @@
handleSubmit() { handleSubmit() {
let that = this; let that = this;
this.getSelectMaterialRows(); this.getSelectMaterialRows();
that.$emit('ok', that.selectMaterialRows, that.selectMaterialIds); if(that.selectMaterialRows.length>0) {
that.searchReset(0) that.$emit('ok', that.selectMaterialRows, that.selectMaterialIds);
that.close(); that.searchReset(0)
that.close();
} else {
that.$message.warning('请选择商品!')
}
}, },
//获取选择信息 //获取选择信息
getSelectMaterialRows(rowId) { getSelectMaterialRows(rowId) {