This commit is contained in:
parent
4d3b6b3b19
commit
7c73791787
@ -17,8 +17,8 @@ export default defineConfig({
|
||||
},
|
||||
proxy: {
|
||||
'/api/': {
|
||||
target: 'http://10.39.13.78:8002/',
|
||||
// target: 'https://test-company.linyikj.com.cn/',
|
||||
// target: 'http://10.39.13.78:8002/',
|
||||
target: 'http://test-company.linyikj.com.cn/',
|
||||
// target: 'https://company.linyikj.com.cn/',
|
||||
changeOrigin: true,
|
||||
pathRewrite: { '^': '' },
|
||||
|
||||
@ -319,13 +319,13 @@ export const Selects = {
|
||||
valueType: 'select',
|
||||
hideInTable: hideInTable,
|
||||
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
||||
request: async (params) => {
|
||||
let res = await Apis.Asset.AssetProjects.Select({
|
||||
request: async (params) =>
|
||||
(
|
||||
await Apis.Asset.AssetProjects.Select({
|
||||
keywords: params?.keyWords,
|
||||
...params,
|
||||
});
|
||||
return res?.data;
|
||||
},
|
||||
})
|
||||
).data,
|
||||
...rest,
|
||||
fieldProps: {
|
||||
showSearch: true,
|
||||
@ -961,4 +961,40 @@ export const Selects = {
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
//获取班次
|
||||
AttendanceShiftsSelect(props?: PropsType): ReturnType {
|
||||
const {
|
||||
title = '选择班次',
|
||||
key = 'attendance_shifts_id',
|
||||
required = false,
|
||||
hideInTable = true,
|
||||
...rest
|
||||
} = props ?? {};
|
||||
|
||||
return {
|
||||
title: title,
|
||||
key: key,
|
||||
valueType: 'select',
|
||||
dataIndex: key,
|
||||
hideInTable: hideInTable,
|
||||
formItemProps: { ...(required ? rulesHelper.number : {}) },
|
||||
request: async (params) => {
|
||||
let res = await Apis.Attendance.AttendanceShifts.Select({
|
||||
...params,
|
||||
name: params?.keyWords || undefined,
|
||||
});
|
||||
return res?.data;
|
||||
},
|
||||
...rest,
|
||||
fieldProps: {
|
||||
showSearch: true,
|
||||
fieldNames: {
|
||||
label: 'name',
|
||||
value: 'id',
|
||||
},
|
||||
...rest?.fieldProps,
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@ -44,7 +44,7 @@ export default function Index({ title = '补充协议' }) {
|
||||
/>,
|
||||
];
|
||||
|
||||
let permissionsSpace = [
|
||||
let permissionsSpace: any = [
|
||||
<UseSeal
|
||||
key="UseSeal"
|
||||
item={{ ...item, disabled: true }}
|
||||
|
||||
@ -20,11 +20,7 @@ import Update from './modals/Update';
|
||||
|
||||
export default function Index({ title = '品质核查' }) {
|
||||
const getCurrentPermissions = useCurrentPermissions();
|
||||
let toolBarRender = (action: any) => {
|
||||
return getCurrentPermissions({
|
||||
create: <Create key="Create" reload={action?.reload} title={title} />,
|
||||
});
|
||||
};
|
||||
|
||||
let tableRender = (item: any, action: any) => {
|
||||
return getCurrentPermissions({
|
||||
show: <Show item={item} />,
|
||||
@ -58,7 +54,9 @@ export default function Index({ title = '品质核查' }) {
|
||||
Apis.QualityCheck.QualityChecks.List,
|
||||
)
|
||||
}
|
||||
toolBarRender={(action) => [toolBarRender(action)]}
|
||||
toolBarRender={(action) => [
|
||||
<Create key="Create" reload={() => action?.reload()} title={title} />,
|
||||
]}
|
||||
columns={[
|
||||
MyColumns.ID({ search: false }),
|
||||
Selects?.AssetProjects({
|
||||
|
||||
@ -26,7 +26,7 @@ export default function Create(props: MyBetaModalFormProps) {
|
||||
form={form}
|
||||
onOpenChange={(open: any) => {
|
||||
if (open) {
|
||||
form.resetFields(); // 清空表单数据
|
||||
// form.resetFields(); // 清空表单数据
|
||||
}
|
||||
}}
|
||||
onFinish={async (values) =>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user