添加校验

This commit is contained in:
yangjun 2025-12-05 13:06:47 +08:00
parent 02f092c272
commit b9c0c00ef2
2 changed files with 22 additions and 4 deletions

View File

@ -653,7 +653,7 @@ function handleAddxj(data) {
// //
function handleFenleiEdit(data) { function handleFenleiEdit(data) {
console.log("🚀 ~ handleEdit ~ data:", data) console.log("🚀 ~ handleEdit ~ data:", data)
const params = { id: data.key, categoryId: data.categoryId, typeId: data.typeId, } const params = { id: data.key, categoryId: data.categoryId, typeId: data.typeId,appCheckIconPath: data.appCheckIconPath,appIconPath: data.appIconPath }
if (data.levle == 1) { if (data.levle == 1) {
params.categoryName = data.title params.categoryName = data.title
registerDrawer.value.disableSubmit = false; registerDrawer.value.disableSubmit = false;

View File

@ -118,7 +118,7 @@ const registerAddModal = ref();
const registerDelModal = ref(); const registerDelModal = ref();
const registerCrkModal = ref(); const registerCrkModal = ref();
const userStore = useUserStore(); const userStore = useUserStore();
const { createConfirm } = useMessage(); const { createConfirm, createMessage} = useMessage();
//table //table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: { tableProps: {
@ -262,8 +262,26 @@ function getTableAction(record) {
}, },
]; ];
} }
function handleQyty(record, izEnabled) { async function handleQyty(record, izEnabled) {
var kcsl = record.kcsl;
var sfjx = "0";
if(parseInt(kcsl) > 0 && izEnabled == 'N'){
createMessage.error("此物料有库存,请先清空库存后再停用");
return;
}else if(parseInt(kcsl) == 0){
//
await defHttp.get({ url: '/invoicing/blWarehouseMaterialInfo/queryWlsfzy', params: { wlId: record.wlId,nuId:record.nuId } }).then(res => {
console.log("🚀 ~ handleQyty ~ res:", res)
if(!res.success){
createMessage.error(res.message);
sfjx = "1";
}
});
}
if(sfjx == '1'){
return;
}
var title = "是否启用"; var title = "是否启用";
var content = "是否启用此物料"; var content = "是否启用此物料";
if(izEnabled == 'N'){ if(izEnabled == 'N'){