| | |
| | | import { BasicColumn } from '/@/components/Table'; |
| | | import { FormSchema } from '/@/components/Table'; |
| | | import { BasicColumn, FormSchema } from '/@/components/Table'; |
| | | import { h } from 'vue'; |
| | | import { Switch } from 'ant-design-vue'; |
| | | import { SaveWh } from '/@/api/tigerapi/wms/warehouse'; |
| | |
| | | if (!Reflect.has(record, 'pendingStatus1')) { |
| | | record.pendingStatus1 = false; |
| | | } |
| | | const id='d70918d6fe474b96b6dabba5c8679c30'; |
| | | const roles = useUserStore().getUserInfo.roles |
| | | const is_active=roles.some(item=>item.MENU_CODE===id) |
| | | const id = 'd70918d6fe474b96b6dabba5c8679c30'; |
| | | const roles = useUserStore().getUserInfo.roles; |
| | | const is_active = roles.some((item) => item.MENU_CODE === id); |
| | | return h(Switch, { |
| | | checked: record.IS_ACTIVE === 'Y', |
| | | checkedChildren: '已启用', |
| | | unCheckedChildren: '已禁用', |
| | | |
| | | disabled:!is_active, |
| | | |
| | | disabled: !is_active, |
| | | loading: record.pendingStatus1, |
| | | onChange(checked: boolean) { |
| | | const oldStatus = record.IS_ACTIVE; |
| | |
| | | console.log(10, newStatus); |
| | | const { createMessage } = useMessage(); |
| | | record.IS_ACTIVE = newStatus; |
| | | SaveWh(record,true) |
| | | SaveWh(record, true) |
| | | .then(() => { |
| | | createMessage.success(`是否启用已成功修改`); |
| | | }) |