diff --git a/src/views/invoicing/warehouseMaterialInfo/BlWarehouseMaterialInfoList.vue b/src/views/invoicing/warehouseMaterialInfo/BlWarehouseMaterialInfoList.vue index 1324416..b3ac047 100644 --- a/src/views/invoicing/warehouseMaterialInfo/BlWarehouseMaterialInfoList.vue +++ b/src/views/invoicing/warehouseMaterialInfo/BlWarehouseMaterialInfoList.vue @@ -101,6 +101,8 @@ import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMult import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import { JInput } from '/@/components/Form'; import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + const formRef = ref(); const queryParam = reactive({}); @@ -109,6 +111,7 @@ const registerModal = ref(); const registerAddModal = ref(); const registerCrkModal = ref(); const userStore = useUserStore(); +const { createConfirm } = useMessage(); //注册table数据 const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ tableProps: { @@ -245,9 +248,26 @@ function getTableAction(record) { ]; } function handleQyty(record, izEnabled) { - defHttp.put({ url: '/invoicing/blWarehouseMaterialInfo/edit', params: { id: record.id, izEnabled: izEnabled } }).then(res => { - handleSuccess(); - }); + + var title = "是否启用"; + var content = "是否启用此物料"; + if(izEnabled == '1'){ + title = "是否停用"; + content = "是否停用此物料"; + } + createConfirm({ + iconType: 'warning', + title: title, + content: content, + okText: '确认', + cancelText: '取消', + onOk: () => { + defHttp.put({ url: '/invoicing/blWarehouseMaterialInfo/edit', params: { id: record.id, izEnabled: izEnabled } }).then(res => { + handleSuccess(); + }); + } + }); + } diff --git a/src/views/invoicing/warehouseMaterialInfo/CkList.vue b/src/views/invoicing/warehouseMaterialInfo/CkList.vue index 6c96c10..cad27e5 100644 --- a/src/views/invoicing/warehouseMaterialInfo/CkList.vue +++ b/src/views/invoicing/warehouseMaterialInfo/CkList.vue @@ -54,6 +54,9 @@ import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import { JInput } from '/@/components/Form'; import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); const formRef = ref(); const queryParam = reactive({areaFlag:'3'}); @@ -152,8 +155,24 @@ import { defHttp } from '/@/utils/http/axios'; ]; } function handleQyty(record,izEnabled) { - defHttp.put({ url: '/nuBaseInfo/nuBaseInfo/edit', params: { id: record.id,status:izEnabled} }).then(res => { - handleSuccess(); + + var title = "是否启用"; + var content = "是否启用此仓库"; + if(izEnabled == '5'){ + title = "是否停用"; + content = "是否停用此仓库"; + } + createConfirm({ + iconType: 'warning', + title: title, + content: content, + okText: '确认', + cancelText: '取消', + onOk: () => { + defHttp.put({ url: '/nuBaseInfo/nuBaseInfo/edit', params: { id: record.id,status:izEnabled} }).then(res => { + handleSuccess(); + }); + } }); }