diff --git a/src/views/invoicing/ConfigMaterial/ConfigMaterialInfoList.vue b/src/views/invoicing/ConfigMaterial/ConfigMaterialInfoList.vue index 04d88fb..5f82bfc 100644 --- a/src/views/invoicing/ConfigMaterial/ConfigMaterialInfoList.vue +++ b/src/views/invoicing/ConfigMaterial/ConfigMaterialInfoList.vue @@ -343,17 +343,39 @@ const getCardStyle = (index,allSize) => { { label: '详情', onClick: handleDetail.bind(null, record), - }, { - label: '删除', - popConfirm: { - title: '是否确认删除', - confirm: handleDelete.bind(null, record), - placement: 'topLeft', - }, - auth: 'configMaterialInfo:config_material_info:delete' - } + }, + // { + // label: '删除', + // popConfirm: { + // title: '是否确认删除', + // confirm: handleDelete.bind(null, record), + // placement: 'topLeft', + // }, + // auth: 'configMaterialInfo:config_material_info:delete' + // } + { + label: '启用', + onClick: handleWlQyty.bind(null, record), + ifShow: record.izEnabled == 1 + }, + { + label: '停用', + onClick: handleWlQyty.bind(null, record), + ifShow: record.izEnabled == 0 + }, + ]; } + +//物料的启用停用 + function handleWlQyty(record){ + console.log("🚀 ~ handleWlQyty ~ record:", record) + const izEnabled = record.izEnabled == '1' ? '0' : "1" + var params = {id:record.id,izEnabled} + defHttp.post({ url: '/invoicing/configMaterialInfo/edit', params }).then((res) => { + searchQuery() + }); + } //点击树节点查询右侧列表数据 function handleSearch(data){ diff --git a/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfo.data.ts b/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfo.data.ts index 0bfdd6d..e053faa 100644 --- a/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfo.data.ts +++ b/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfo.data.ts @@ -41,16 +41,22 @@ export const columns: BasicColumn[] = [ dataIndex: 'openingBank' }, { - title: '开户行账号', - align:"center", - dataIndex: 'openingBankNo' - }, - { - title: '微信账号', - align:"center", - dataIndex: 'wechartId' + title: '是否启用', + align: "center", + dataIndex: 'izEnabled_dictText', + width:'100px' }, // { + // title: '开户行账号', + // align:"center", + // dataIndex: 'openingBankNo' + // }, + // { + // title: '微信账号', + // align:"center", + // dataIndex: 'wechartId' + // }, + // { // title: '资质照片', // align:"center", // dataIndex: 'imgPath', diff --git a/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfoList.vue b/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfoList.vue index 2ee1530..4a7e4b8 100644 --- a/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfoList.vue +++ b/src/views/invoicing/configSuppliersInfo/ConfigSuppliersInfoList.vue @@ -70,6 +70,7 @@ import { useDrawer } from '/@/components/Drawer'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import JInput from '/@/components/Form/src/jeecg/components/JInput.vue'; + import { defHttp } from '/@/utils/http/axios'; const queryParam = reactive({}); const checkedKeys = ref>([]); const userStore = useUserStore(); @@ -207,17 +208,37 @@ const labelCol = reactive({ { label: '详情', onClick: handleDetail.bind(null, record), - }, { - label: '删除', - popConfirm: { - title: '是否确认删除', - confirm: handleDelete.bind(null, record), - placement: 'topLeft', - }, - auth: 'configSuppliersInfo:config_suppliers_info:delete' - } + }, + // { + // label: '删除', + // popConfirm: { + // title: '是否确认删除', + // confirm: handleDelete.bind(null, record), + // placement: 'topLeft', + // }, + // auth: 'configSuppliersInfo:config_suppliers_info:delete' + // } + { + label: '启用', + onClick: handleWlQyty.bind(null, record), + ifShow: record.izEnabled == 1 + }, + { + label: '停用', + onClick: handleWlQyty.bind(null, record), + ifShow: record.izEnabled == 0 + }, ] } +//物料的启用停用 + function handleWlQyty(record){ + console.log("🚀 ~ handleWlQyty ~ record:", record) + const izEnabled = record.izEnabled == '1' ? '0' : "1" + var params = {id:record.id,izEnabled} + defHttp.post({ url: '/invoicing/configSuppliersInfo/edit', params }).then((res) => { + searchQuery() + }); + } /** * 下拉操作栏 */