添加校验
This commit is contained in:
parent
02f092c272
commit
b9c0c00ef2
|
|
@ -653,7 +653,7 @@ function handleAddxj(data) {
|
|||
//编辑
|
||||
function handleFenleiEdit(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) {
|
||||
params.categoryName = data.title
|
||||
registerDrawer.value.disableSubmit = false;
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ const registerAddModal = ref();
|
|||
const registerDelModal = ref();
|
||||
const registerCrkModal = ref();
|
||||
const userStore = useUserStore();
|
||||
const { createConfirm } = useMessage();
|
||||
const { createConfirm, createMessage} = useMessage();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
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 content = "是否启用此物料";
|
||||
if(izEnabled == 'N'){
|
||||
|
|
|
|||
Loading…
Reference in New Issue