Merge branch 'front' into devlop
| | |
| | | |
| | | // export excel from all data |
| | | export: async (resource, params) => { |
| | | console.log("export", resource, params); |
| | | const _params = Common.integrateParams(params); |
| | | try { |
| | | const res = await request.post(`${resource}/export`, _params, { |
| | |
| | | const chineseMessages = { |
| | | ra: { |
| | | action: { |
| | | add_filter: '过滤条件', |
| | | add: '添加', |
| | | back: '返回', |
| | | bulk_actions: '1 item selected |||| %{smart_count} items selected', |
| | | cancel: '取消', |
| | | clear_array_input: '情空列表', |
| | | clear_input_value: '清空', |
| | | clone: '克隆', |
| | | confirm: '确定', |
| | | create: '添加', |
| | | create_item: '添加 %{item}', |
| | | delete: '删除', |
| | | edit: '编辑', |
| | | export: '导出', |
| | | list: '列表', |
| | | refresh: '刷新', |
| | | remove_filter: 'Remove this filter', |
| | | remove_all_filters: '移除所有', |
| | | remove: '移除', |
| | | save: '保存', |
| | | search: '搜索', |
| | | select_all: '全部选中', |
| | | select_row: '选中一行', |
| | | show: '显示', |
| | | sort: '排序', |
| | | undo: '撤销', |
| | | unselect: '取消选择', |
| | | expand: '展开', |
| | | close: '关闭', |
| | | open_menu: 'Open menu', |
| | | close_menu: 'Close menu', |
| | | update: '修改', |
| | | move_up: 'Move up', |
| | | move_down: 'Move down', |
| | | open: 'Open', |
| | | toggle_theme: 'Toggle light/dark mode', |
| | | select_columns: '筛选列', |
| | | update_application: 'Reload Application', |
| | | add_filter: "过滤条件", |
| | | add: "添加", |
| | | back: "返回", |
| | | bulk_actions: "1 item selected |||| %{smart_count} items selected", |
| | | cancel: "取消", |
| | | clear_array_input: "情空列表", |
| | | clear_input_value: "清空", |
| | | clone: "克隆", |
| | | confirm: "确定", |
| | | create: "添加", |
| | | create_item: "添加 %{item}", |
| | | delete: "删除", |
| | | edit: "编辑", |
| | | export: "导出", |
| | | import: "导入", |
| | | list: "列表", |
| | | refresh: "刷新", |
| | | remove_filter: "Remove this filter", |
| | | remove_all_filters: "移除所有", |
| | | remove: "移除", |
| | | save: "保存", |
| | | search: "搜索", |
| | | select_all: "全部选中", |
| | | select_row: "选中一行", |
| | | show: "显示", |
| | | sort: "排序", |
| | | undo: "撤销", |
| | | unselect: "取消选择", |
| | | expand: "展开", |
| | | close: "关闭", |
| | | open_menu: "Open menu", |
| | | close_menu: "Close menu", |
| | | update: "修改", |
| | | move_up: "Move up", |
| | | move_down: "Move down", |
| | | open: "Open", |
| | | toggle_theme: "Toggle light/dark mode", |
| | | select_columns: "筛选列", |
| | | update_application: "Reload Application", |
| | | }, |
| | | boolean: { |
| | | true: '是', |
| | | false: '否', |
| | | null: ' ', |
| | | true: "是", |
| | | false: "否", |
| | | null: " ", |
| | | }, |
| | | page: { |
| | | create: 'Create %{name}', |
| | | dashboard: 'Dashboard', |
| | | edit: '%{name} %{recordRepresentation}', |
| | | error: 'Something went wrong', |
| | | list: '%{name}', |
| | | loading: 'Loading', |
| | | not_found: 'Not Found', |
| | | show: '%{name} %{recordRepresentation}', |
| | | empty: 'No %{name} yet.', |
| | | invite: 'Do you want to add one?', |
| | | create: "Create %{name}", |
| | | dashboard: "Dashboard", |
| | | edit: "%{name} %{recordRepresentation}", |
| | | error: "Something went wrong", |
| | | list: "%{name}", |
| | | loading: "Loading", |
| | | not_found: "Not Found", |
| | | show: "%{name} %{recordRepresentation}", |
| | | empty: "No %{name} yet.", |
| | | invite: "Do you want to add one?", |
| | | }, |
| | | input: { |
| | | file: { |
| | | upload_several: |
| | | '拖放一些要上传的文件,或单击以选择一个', |
| | | upload_single: '拖放要上传的文件,或单击以选择它', |
| | | upload_several: "拖放一些要上传的文件,或单击以选择一个", |
| | | upload_single: "拖放要上传的文件,或单击以选择它", |
| | | }, |
| | | image: { |
| | | upload_several: |
| | | 'Drop some pictures to upload, or click to select one.', |
| | | upload_single: |
| | | 'Drop a picture to upload, or click to select it.', |
| | | upload_several: "Drop some pictures to upload, or click to select one.", |
| | | upload_single: "Drop a picture to upload, or click to select it.", |
| | | }, |
| | | references: { |
| | | all_missing: 'Unable to find references data.', |
| | | all_missing: "Unable to find references data.", |
| | | many_missing: |
| | | 'At least one of the associated references no longer appears to be available.', |
| | | "At least one of the associated references no longer appears to be available.", |
| | | single_missing: |
| | | 'Associated reference no longer appears to be available.', |
| | | "Associated reference no longer appears to be available.", |
| | | }, |
| | | password: { |
| | | toggle_visible: 'Hide password', |
| | | toggle_hidden: 'Show password', |
| | | toggle_visible: "Hide password", |
| | | toggle_hidden: "Show password", |
| | | }, |
| | | }, |
| | | message: { |
| | | about: 'About', |
| | | are_you_sure: 'Are you sure?', |
| | | about: "About", |
| | | are_you_sure: "Are you sure?", |
| | | auth_error: |
| | | 'An error occurred while validating the authentication token.', |
| | | "An error occurred while validating the authentication token.", |
| | | bulk_delete_content: |
| | | 'Are you sure you want to delete this %{name}? |||| Are you sure you want to delete these %{smart_count} items?', |
| | | bulk_delete_title: |
| | | '删除 %{name} |||| 删除 %{smart_count} %{name}', |
| | | "Are you sure you want to delete this %{name}? |||| Are you sure you want to delete these %{smart_count} items?", |
| | | bulk_delete_title: "删除 %{name} |||| 删除 %{smart_count} %{name}", |
| | | bulk_update_content: |
| | | 'Are you sure you want to update this %{name}? |||| Are you sure you want to update these %{smart_count} items?', |
| | | bulk_update_title: |
| | | '修改 %{name} |||| 修改 %{smart_count} %{name}', |
| | | clear_array_input: 'Are you sure you want to clear the whole list?', |
| | | delete_content: '您确实要删除此项吗?', |
| | | delete_title: '删除 %{name} #%{id}', |
| | | details: 'Details', |
| | | "Are you sure you want to update this %{name}? |||| Are you sure you want to update these %{smart_count} items?", |
| | | bulk_update_title: "修改 %{name} |||| 修改 %{smart_count} %{name}", |
| | | clear_array_input: "Are you sure you want to clear the whole list?", |
| | | delete_content: "您确实要删除此项吗?", |
| | | delete_title: "删除 %{name} #%{id}", |
| | | details: "Details", |
| | | error: "A client error occurred and your request couldn't be completed.", |
| | | |
| | | invalid_form: '表单无效 请检查是否有错误!', |
| | | loading: 'Please wait', |
| | | no: 'No', |
| | | not_found: |
| | | 'Either you typed a wrong URL, or you followed a bad link.', |
| | | yes: 'Yes', |
| | | invalid_form: "表单无效 请检查是否有错误!", |
| | | loading: "Please wait", |
| | | no: "No", |
| | | not_found: "Either you typed a wrong URL, or you followed a bad link.", |
| | | yes: "Yes", |
| | | unsaved_changes: |
| | | "Some of your changes weren't saved. Are you sure you want to ignore them?", |
| | | }, |
| | | navigation: { |
| | | no_results: '没有找到数据', |
| | | no_results: "没有找到数据", |
| | | no_more_results: |
| | | 'The page number %{page} is out of boundaries. Try the previous page.', |
| | | page_out_of_boundaries: 'Page number %{page} out of boundaries', |
| | | page_out_from_end: 'Cannot go after last page', |
| | | page_out_from_begin: 'Cannot go before page 1', |
| | | page_range_info: '%{offsetBegin}-%{offsetEnd} of %{total}', |
| | | "The page number %{page} is out of boundaries. Try the previous page.", |
| | | page_out_of_boundaries: "Page number %{page} out of boundaries", |
| | | page_out_from_end: "Cannot go after last page", |
| | | page_out_from_begin: "Cannot go before page 1", |
| | | page_range_info: "%{offsetBegin}-%{offsetEnd} of %{total}", |
| | | partial_page_range_info: |
| | | '%{offsetBegin}-%{offsetEnd} of more than %{offsetEnd}', |
| | | current_page: 'Page %{page}', |
| | | page: 'Go to page %{page}', |
| | | first: 'Go to first page', |
| | | last: 'Go to last page', |
| | | next: 'Go to next page', |
| | | previous: 'Go to previous page', |
| | | page_rows_per_page: '每页数量:', |
| | | skip_nav: 'Skip to content', |
| | | "%{offsetBegin}-%{offsetEnd} of more than %{offsetEnd}", |
| | | current_page: "Page %{page}", |
| | | page: "Go to page %{page}", |
| | | first: "Go to first page", |
| | | last: "Go to last page", |
| | | next: "Go to next page", |
| | | previous: "Go to previous page", |
| | | page_rows_per_page: "每页数量:", |
| | | skip_nav: "Skip to content", |
| | | }, |
| | | sort: { |
| | | sort_by: 'Sort by %{field} %{order}', |
| | | ASC: 'ascending', |
| | | DESC: 'descending', |
| | | sort_by: "Sort by %{field} %{order}", |
| | | ASC: "ascending", |
| | | DESC: "descending", |
| | | }, |
| | | auth: { |
| | | auth_check_error: 'Please login to continue', |
| | | user_menu: 'Profile', |
| | | username: 'Username', |
| | | password: 'Password', |
| | | sign_in: 'Sign in', |
| | | sign_in_error: 'Authentication failed, please retry', |
| | | logout: 'Logout', |
| | | auth_check_error: "Please login to continue", |
| | | user_menu: "Profile", |
| | | username: "Username", |
| | | password: "Password", |
| | | sign_in: "Sign in", |
| | | sign_in_error: "Authentication failed, please retry", |
| | | logout: "Logout", |
| | | }, |
| | | notification: { |
| | | updated: '修改成功 |||| %{smart_count} 项 修改成功', |
| | | created: '添加成功', |
| | | deleted: '删除成功 |||| %{smart_count} 项 删除成功', |
| | | bad_item: 'Incorrect element', |
| | | item_doesnt_exist: 'Element does not exist', |
| | | http_error: 'Server communication error', |
| | | data_provider_error: |
| | | 'dataProvider error. Check the console for details.', |
| | | i18n_error: |
| | | 'Cannot load the translations for the specified language', |
| | | canceled: 'Action cancelled', |
| | | logged_out: 'Your session has ended, please reconnect.', |
| | | updated: "修改成功 |||| %{smart_count} 项 修改成功", |
| | | created: "添加成功", |
| | | deleted: "删除成功 |||| %{smart_count} 项 删除成功", |
| | | bad_item: "Incorrect element", |
| | | item_doesnt_exist: "Element does not exist", |
| | | http_error: "Server communication error", |
| | | data_provider_error: "dataProvider error. Check the console for details.", |
| | | i18n_error: "Cannot load the translations for the specified language", |
| | | canceled: "Action cancelled", |
| | | logged_out: "Your session has ended, please reconnect.", |
| | | not_authorized: "You're not authorized to access this resource.", |
| | | application_update_available: 'A new version is available.', |
| | | application_update_available: "A new version is available.", |
| | | }, |
| | | validation: { |
| | | required: '必填项', |
| | | minLength: 'Must be %{min} characters at least', |
| | | maxLength: 'Must be %{max} characters or less', |
| | | minValue: 'Must be at least %{min}', |
| | | maxValue: 'Must be %{max} or less', |
| | | number: 'Must be a number', |
| | | email: 'Must be a valid email', |
| | | oneOf: 'Must be one of: %{options}', |
| | | regex: 'Must match a specific format (regexp): %{pattern}', |
| | | unique: 'Must be unique', |
| | | required: "必填项", |
| | | minLength: "Must be %{min} characters at least", |
| | | maxLength: "Must be %{max} characters or less", |
| | | minValue: "Must be at least %{min}", |
| | | maxValue: "Must be %{max} or less", |
| | | number: "Must be a number", |
| | | email: "Must be a valid email", |
| | | oneOf: "Must be one of: %{options}", |
| | | regex: "Must match a specific format (regexp): %{pattern}", |
| | | unique: "Must be unique", |
| | | }, |
| | | saved_queries: { |
| | | label: '保存过滤', |
| | | query_name: 'Query name', |
| | | new_label: '保存过滤条件...', |
| | | new_dialog_title: 'Save current query as', |
| | | remove_label: '移除过滤条件', |
| | | label: "保存过滤", |
| | | query_name: "Query name", |
| | | new_label: "保存过滤条件...", |
| | | new_dialog_title: "Save current query as", |
| | | remove_label: "移除过滤条件", |
| | | remove_label_with_name: 'Remove query "%{name}"', |
| | | remove_dialog_title: '移除过滤条件?', |
| | | remove_message: |
| | | '您确定要移除已保存过滤条件吗?', |
| | | help: 'Filter the list and save this query for later', |
| | | remove_dialog_title: "移除过滤条件?", |
| | | remove_message: "您确定要移除已保存过滤条件吗?", |
| | | help: "Filter the list and save this query for later", |
| | | }, |
| | | configurable: { |
| | | customize: 'Customize', |
| | | configureMode: 'Configure this page', |
| | | customize: "Customize", |
| | | configureMode: "Configure this page", |
| | | inspector: { |
| | | title: 'Inspector', |
| | | content: 'Hover the application UI elements to configure them', |
| | | reset: 'Reset Settings', |
| | | hideAll: 'Hide All', |
| | | showAll: 'Show All', |
| | | title: "Inspector", |
| | | content: "Hover the application UI elements to configure them", |
| | | reset: "Reset Settings", |
| | | hideAll: "Hide All", |
| | | showAll: "Show All", |
| | | }, |
| | | Datagrid: { |
| | | title: 'Datagrid', |
| | | unlabeled: 'Unlabeled column #%{column}', |
| | | title: "Datagrid", |
| | | unlabeled: "Unlabeled column #%{column}", |
| | | }, |
| | | SimpleForm: { |
| | | title: 'Form', |
| | | unlabeled: 'Unlabeled input #%{input}', |
| | | title: "Form", |
| | | unlabeled: "Unlabeled input #%{input}", |
| | | }, |
| | | SimpleList: { |
| | | title: 'List', |
| | | primaryText: 'Primary text', |
| | | secondaryText: 'Secondary text', |
| | | tertiaryText: 'Tertiary text', |
| | | title: "List", |
| | | primaryText: "Primary text", |
| | | secondaryText: "Secondary text", |
| | | tertiaryText: "Tertiary text", |
| | | }, |
| | | }, |
| | | }, |
| | | } |
| | | }; |
| | | |
| | | export default chineseMessages; |
| | |
| | | whMat: 'Warehouse Mat', |
| | | fields: 'Extend Fields', |
| | | fieldsItem: 'Extend Fields Items', |
| | | warehouseAreasItem: 'WarehouseAreasItem', |
| | | }, |
| | | table: { |
| | | field: { |
| | |
| | | flagLabelMange: "flagLabelMange", |
| | | flagMix: "flagMix", |
| | | }, |
| | | warehouseAreasItem: { |
| | | areaId: "areaId", |
| | | areaName: "areaName", |
| | | matnrId: "matnrId", |
| | | matnrName: "matnrName", |
| | | matnrCode: "matnrCode", |
| | | fieldsIndex: "fieldsIndex", |
| | | barcode: "barcode", |
| | | anfme: "anfme", |
| | | batch: "batch", |
| | | unit: "unit", |
| | | stockUnit: "stockUnit", |
| | | brand: "brand", |
| | | shipperId: "shipperId", |
| | | splrId: "splrId", |
| | | weight: "weight", |
| | | prodTime: "prodTime", |
| | | splrBtch: "splrBtch", |
| | | }, |
| | | loc: { |
| | | warehouseId: "Warehouse", |
| | | areaId: "Area", |
| | |
| | | projectName: "ProjectName", |
| | | }, |
| | | qlyInspect: { |
| | | code: "Code", |
| | | name: "Name", |
| | | code: "code", |
| | | name: "name", |
| | | barcode: "barcode", |
| | | asnItemId: "asnItemId", |
| | | poItemId: "poItemId", |
| | | safeQty: "safeQty", |
| | | disQty: "disQty", |
| | | }, |
| | | dictType: { |
| | | code: "Code", |
| | |
| | | shipper: 'shipper is required', |
| | | groupId: 'groupId is required', |
| | | } |
| | | } |
| | | }, |
| | | toolbar: { |
| | | inspection: "Inspection", |
| | | creatcode: "creatcode", |
| | | print: "print", |
| | | }, |
| | | }; |
| | | |
| | | export default customEnglishMessages; |
| | |
| | | whMat: '库区物料关系', |
| | | fields: '扩展字段', |
| | | fieldsItem: '扩展字段明细', |
| | | warehouseAreasItem: '库区库存信息', |
| | | }, |
| | | table: { |
| | | field: { |
| | |
| | | flagLabelMange: "标签管理", |
| | | flagMix: "混放", |
| | | }, |
| | | warehouseAreasItem: { |
| | | areaId: "仓库区域", |
| | | areaName: "区域名称 ", |
| | | matnrId: "物料标识", |
| | | matnrName: "物料名称", |
| | | matnrCode: "物料编码", |
| | | fieldsIndex: "扩展字段唯一标识", |
| | | barcode: "条形码", |
| | | anfme: "数量", |
| | | batch: "批次号", |
| | | unit: "计量单位", |
| | | stockUnit: "库存单位", |
| | | brand: "品牌", |
| | | shipperId: "货主标识", |
| | | splrId: "供应商标识", |
| | | weight: "收货重量", |
| | | prodTime: "生产日期", |
| | | splrBtch: "供应商批次", |
| | | }, |
| | | loc: { |
| | | warehouseId: "仓库", |
| | | areaId: "库区", |
| | |
| | | qlyInspect: { |
| | | code: "编码", |
| | | name: "名称", |
| | | barcode: "标签码", |
| | | asnItemId: "通知单明细标识", |
| | | poItemId: "PO单明细标识", |
| | | safeQty: "合格数量", |
| | | disQty: "不合格数量", |
| | | }, |
| | | dictType: { |
| | | code: "字典编码", |
| | | name: "字典名称", |
| | | description: "内容描述", |
| | | description: "内容", |
| | | }, |
| | | dictData: { |
| | | dictTypeId: "字典标识", |
| | |
| | | wkType: "业务类型", |
| | | anfme: "数量", |
| | | qty: "已完成数量", |
| | | logisNo: "logisNo", |
| | | logisNo: "物流单号", |
| | | arrTime: "预计到达时间", |
| | | rleStatus: "释放状态", |
| | | ntyStatus: "质检上报状态", |
| | |
| | | shipper: '货主不能为空', |
| | | groupId: '分组不能为空', |
| | | } |
| | | } |
| | | }, |
| | | toolbar: { |
| | | inspection: "报检", |
| | | creatcode: "生成条码", |
| | | print: "打印", |
| | | }, |
| | | }; |
| | | |
| | | export default customChineseMessages; |
| | |
| | | import purchase from './purchase'; |
| | | import fields from './fields'; |
| | | import fieldsItem from './fieldsItem'; |
| | | |
| | | import warehouseAreasItem from './warehouseAreasItem'; |
| | | |
| | | const ResourceContent = (node) => { |
| | | switch (node.component) { |
| | |
| | | return warehouse; |
| | | case 'warehouseAreas': |
| | | return warehouseAreas; |
| | | case 'warehouseAreasItem': |
| | | return warehouseAreasItem; |
| | | case 'loc': |
| | | return loc; |
| | | case 'container': |
| | |
| | | </DialogTitle> |
| | | <DialogContent sx={{ mt: 2 }}> |
| | | <Grid container rowSpacing={2} columnSpacing={2}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | {/* <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.asnOrder.code" |
| | | source="code" |
| | | parse={v => v} |
| | | autoFocus |
| | | /> |
| | | </Grid> |
| | | </Grid> */} |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.asnOrder.poCode" |
| | |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | {/* <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.asnOrder.anfme" |
| | | source="anfme" |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | </Grid> */} |
| | | {/* <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.asnOrder.qty" |
| | | source="qty" |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | </Grid> */} |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.asnOrder.logisNo" |
| | |
| | | <Typography variant="h6" gutterBottom> |
| | | {translate('common.edit.title.main')} |
| | | </Typography> |
| | | <Stack direction='row' gap={2}> |
| | | {/* <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.asnOrder.code" |
| | | source="code" |
| | | parse={v => v} |
| | | autoFocus |
| | | /> |
| | | </Stack> |
| | | </Stack> */} |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.asnOrder.poCode" |
| | |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | {/* <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.asnOrder.anfme" |
| | | source="anfme" |
| | |
| | | source="qty" |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | </Stack> */} |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.asnOrder.logisNo" |
| | |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | Button |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | |
| | | import MyField from "../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | import ConstructionIcon from "@mui/icons-material/Construction"; |
| | | import FileDownloadIcon from '@mui/icons-material/FileDownload'; |
| | | |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <TextInput source="code" label="table.field.asnOrder.code" />, |
| | | <TextInput source="poCode" label="table.field.asnOrder.poCode" />, |
| | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | | const navigate = useNavigate(); |
| | | const assign = (record) => { |
| | | navigate(`/asnOrderItem?asnId=${record.id}`); |
| | | }; |
| | | |
| | | const importList = () => { }; |
| | | const inspection = () => { }; |
| | | |
| | | const print = () => { }; |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.asnOrder"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | |
| | | <Button onClick={inspection} label={"toolbar.inspection"}> |
| | | <ConstructionIcon /> |
| | | </Button> |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | <SelectColumnsButton preferenceKey='asnOrder' /> |
| | | |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | | )} |
| | |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="code" label="table.field.asnOrder.code" /> |
| | | <MyField |
| | | source="code" |
| | | label="table.field.asnOrder.code" |
| | | onClick={(event, record, val) => { |
| | | event.stopPropagation(); |
| | | assign(record); |
| | | }} |
| | | /> |
| | | <TextField source="poCode" label="table.field.asnOrder.poCode" /> |
| | | <NumberField source="poId" label="table.field.asnOrder.poId" /> |
| | | <TextField source="type" label="table.field.asnOrder.type" /> |
| | |
| | | <TextField source="logisNo" label="table.field.asnOrder.logisNo" /> |
| | | <DateField source="arrTime" label="table.field.asnOrder.arrTime" showTime /> |
| | | <TextField source="rleStatus$" label="table.field.asnOrder.rleStatus" sortable={false} /> |
| | | <TextField source="name" label="table.field.asnOrder.name" /> |
| | | |
| | | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | |
| | | <BooleanField source="statusBool" label="common.field.status" sortable={false} /> |
| | | <TextField source="memo" label="common.field.memo" sortable={false} /> |
| | | <WrapperField cellClassName="opt" label="common.field.opt"> |
| | | <Button label="toolbar.print" onClick={print}> |
| | | <FileDownloadIcon /> |
| | | </Button> |
| | | <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} /> |
| | | <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> |
| | | </WrapperField> |
| | |
| | | </Box> |
| | | ) |
| | | } |
| | | |
| | | export default AsnOrderList; |
| | |
| | | import MemoInput from "../components/MemoInput"; |
| | | |
| | | const AsnOrderItemCreate = (props) => { |
| | | const { open, setOpen } = props; |
| | | const { open, setOpen, row } = props; |
| | | |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | |
| | | <NumberInput |
| | | label="table.field.asnOrderItem.asnId" |
| | | source="asnId" |
| | | autoFocus |
| | | defaultValue={row.asnId} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | |
| | | import React, { useState, useRef, useEffect, useMemo, useCallback } from "react"; |
| | | import { useNavigate } from 'react-router-dom'; |
| | | import { useNavigate, useLocation } from 'react-router-dom'; |
| | | import { |
| | | List, |
| | | DatagridConfigurable, |
| | |
| | | ReferenceArrayInput, |
| | | AutocompleteInput, |
| | | DeleteButton, |
| | | Button |
| | | } from 'react-admin'; |
| | | import { Box, Typography, Card, Stack } from '@mui/material'; |
| | | import { styled } from '@mui/material/styles'; |
| | |
| | | import MyField from "../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | import CustomerTopToolBar from "../components/EditTopToolBar"; |
| | | import QrCodeIcon from "@mui/icons-material/QrCode"; |
| | | import ImportButton from "../components/ImportButton"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <NumberInput source="asnId" label="table.field.asnOrderItem.asnId" />, |
| | | <TextInput source="asnCode" label="table.field.asnOrderItem.asnCode" />, |
| | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | | const location = useLocation(); |
| | | const queryParams = new URLSearchParams(location.search); |
| | | const asnId = queryParams.get("asnId"); |
| | | |
| | | const creatCode = () => { }; |
| | | |
| | | return ( |
| | | <> |
| | | {asnId && <CustomerTopToolBar backPrevious={true} />} |
| | | <Box display="flex"> |
| | | <List |
| | | sx={{ |
| | |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.asnOrderItem"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | |
| | | sort={{ field: "create_time", order: "desc" }} |
| | | actions={( |
| | | <TopToolbar> |
| | | <Button onClick={creatCode} label={"toolbar.creatcode"}> |
| | | <QrCodeIcon /> |
| | | </Button> |
| | | <FilterButton /> |
| | | <MyCreateButton onClick={() => { setCreateDialog(true) }} /> |
| | | <SelectColumnsButton preferenceKey='asnOrderItem' /> |
| | | <ImportButton value={'asnOrder'} parmas={{ asnId: asnId }} /> |
| | | <MyExportButton /> |
| | | </TopToolbar> |
| | | )} |
| | |
| | | <AsnOrderItemCreate |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | row={{ asnId }} |
| | | /> |
| | | <PageDrawer |
| | | title='AsnOrderItem Detail' |
| | |
| | | > |
| | | </PageDrawer> |
| | | </Box> |
| | | </> |
| | | ) |
| | | } |
| | | AsnOrderItemList.Context = React.createContext() |
| | | |
| | | export default AsnOrderItemList; |
| | |
| | | import { useEffect, useState } from 'react'; |
| | | import { useEffect, useState, createContext, useContext } from 'react'; |
| | | import { Box, CircularProgress, Stack, Typography } from '@mui/material'; |
| | | import Alert from '@mui/material/Alert'; |
| | | import Dialog from '@mui/material/Dialog'; |
| | |
| | | Form, |
| | | Toolbar, |
| | | useRefresh, |
| | | useTranslate |
| | | useTranslate, |
| | | useNotify |
| | | } from 'react-admin'; |
| | | import { Link } from 'react-router-dom'; |
| | | import DialogCloseButton from './DialogCloseButton'; |
| | | import { usePapaParse } from './usePapaParse'; |
| | | import MatnrList from '../basicInfo/matnr/MatnrList'; |
| | | import request from '@/utils/request' |
| | | |
| | | const ImportModal = ({ open, onClose, importTemp, useCodeImport, onceBatch = 10 }) => { |
| | | const ImportModal = ({ open, onClose, importTemp, useCodeImport, onceBatch = 10, value, parmas = {} }) => { |
| | | const refresh = useRefresh(); |
| | | const translate = useTranslate(); |
| | | |
| | |
| | | }); |
| | | |
| | | const [file, setFile] = useState(null); |
| | | const notify = useNotify(); |
| | | |
| | | useEffect(() => { |
| | | if (importer.state === 'complete') { |
| | |
| | | if (!file) { |
| | | return; |
| | | } |
| | | console.log(file); |
| | | //TODO 添加上文件上传接口 |
| | | const form = new FormData(); |
| | | for (const key in parmas) { |
| | | if (parmas.hasOwnProperty(key)) { |
| | | form.append(key, parmas[key]); |
| | | } |
| | | } |
| | | form.append('file', file); |
| | | const { data: { code, data, msg } } = await request.post(`/${value}/import`, form) |
| | | |
| | | if (code === 200) { |
| | | handleClose() |
| | | } else { |
| | | notify(msg); |
| | | |
| | | } |
| | | |
| | | }; |
| | | |
| | | |
| | | |
| | | const handleClose = () => { |
| | | reset(); |
| | | onClose(); |
| | |
| | | import React, { useState, useRef, useEffect, useMemo } from "react"; |
| | | import { |
| | | Button, |
| | | useTranslate, |
| | | } from 'react-admin'; |
| | | import { Fab, useMediaQuery } from '@mui/material'; |
| | | import ContentAdd from '@mui/icons-material/Add'; |
| | | import { styled } from '@mui/material/styles'; |
| | | import { Link } from 'react-router-dom'; |
| | | import { Button, useTranslate } from "react-admin"; |
| | | import { Fab, useMediaQuery } from "@mui/material"; |
| | | import ContentAdd from "@mui/icons-material/Add"; |
| | | import { styled } from "@mui/material/styles"; |
| | | import { Link } from "react-router-dom"; |
| | | |
| | | const MyCreateButton = (props) => { |
| | | const translate = useTranslate(); |
| | | |
| | | const isSmall = useMediaQuery((theme) => |
| | | theme.breakpoints.down('md') |
| | | ); |
| | | const isSmall = useMediaQuery((theme) => theme.breakpoints.down("md")); |
| | | |
| | | return isSmall ? ( |
| | | <StyledFab |
| | |
| | | {defaultIcon} |
| | | </StyledButton> |
| | | ); |
| | | } |
| | | }; |
| | | |
| | | const label = 'ra.action.create'; |
| | | const PREFIX = 'RaCreateButton'; |
| | | const label = "ra.action.create"; |
| | | const PREFIX = "RaCreateButton"; |
| | | const defaultIcon = <ContentAdd />; |
| | | |
| | | export const CreateButtonClasses = { |
| | |
| | | [`&.${CreateButtonClasses.floating}`]: { |
| | | color: theme.palette.getContrastText(theme.palette.primary.main), |
| | | margin: 0, |
| | | top: 'auto', |
| | | top: "auto", |
| | | right: 20, |
| | | bottom: 60, |
| | | left: 'auto', |
| | | position: 'fixed', |
| | | left: "auto", |
| | | position: "fixed", |
| | | zIndex: 1000, |
| | | }, |
| | | })); |
| | |
| | | import * as React from 'react'; |
| | | import { useCallback } from 'react'; |
| | | import DownloadIcon from '@mui/icons-material/GetApp'; |
| | | import * as React from "react"; |
| | | import { useCallback } from "react"; |
| | | import DownloadIcon from "@mui/icons-material/GetApp"; |
| | | import { |
| | | Button, useDataProvider, useNotify, useListContext |
| | | } from 'react-admin'; |
| | | Button, |
| | | useDataProvider, |
| | | useNotify, |
| | | useListContext, |
| | | } from "react-admin"; |
| | | |
| | | const MyExportButton = (props) => { |
| | | const { |
| | | maxResults = 1000, |
| | | onClick, |
| | | label = 'ra.action.export', |
| | | label = "ra.action.export", |
| | | icon = defaultIcon, |
| | | exporter: customExporter, |
| | | meta, |
| | | ...rest |
| | | } = props; |
| | | |
| | | const { |
| | | filter, |
| | | filterValues, |
| | | resource, |
| | | sort, |
| | | total, |
| | | } = useListContext(); |
| | | const { filter, filterValues, resource, sort, total } = useListContext(); |
| | | |
| | | const dataProvider = useDataProvider(); |
| | | const notify = useNotify(); |
| | | |
| | | const handleClick = useCallback( |
| | | event => { |
| | | dataProvider.export(resource, { |
| | | (event) => { |
| | | dataProvider |
| | | .export(resource, { |
| | | sort, |
| | | filter: filter |
| | | ? { ...filterValues, ...filter } |
| | | : filterValues, |
| | | filter: filter ? { ...filterValues, ...filter } : filterValues, |
| | | pagination: { page: 1, perPage: maxResults }, |
| | | meta, |
| | | }).then((res) => { |
| | | const url = window.URL.createObjectURL(new Blob([res.data], { type: res.headers['content-type'] })); |
| | | const link = document.createElement('a'); |
| | | }) |
| | | .then((res) => { |
| | | const url = window.URL.createObjectURL( |
| | | new Blob([res.data], { type: res.headers["content-type"] }), |
| | | ); |
| | | const link = document.createElement("a"); |
| | | link.href = url; |
| | | link.setAttribute('download', `${resource}.xlsx`); |
| | | link.setAttribute("download", `${resource}.xlsx`); |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | link.remove(); |
| | | }).catch(error => { |
| | | }) |
| | | .catch((error) => { |
| | | console.error(error); |
| | | notify('ra.notification.http_error', { type: 'error' }); |
| | | notify("ra.notification.http_error", { type: "error" }); |
| | | }); |
| | | if (typeof onClick === 'function') { |
| | | if (typeof onClick === "function") { |
| | | onClick(event); |
| | | } |
| | | }, |
| | |
| | | resource, |
| | | sort, |
| | | meta, |
| | | ] |
| | | ], |
| | | ); |
| | | |
| | | return ( |
| | |
| | | |
| | | const defaultIcon = <DownloadIcon />; |
| | | |
| | | const sanitizeRestProps = ({ |
| | | resource, |
| | | ...rest |
| | | }) => rest; |
| | | const sanitizeRestProps = ({ resource, ...rest }) => rest; |
| | | |
| | | export default MyExportButton; |
| | |
| | | </DialogTitle> |
| | | <DialogContent sx={{ mt: 2 }}> |
| | | <Grid container rowSpacing={2} columnSpacing={2}> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | {/* <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.purchase.code" |
| | | source="code" |
| | | parse={v => v} |
| | | autoFocus |
| | | /> |
| | | </Grid> |
| | | </Grid> */} |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.purchase.type" |
| | |
| | | <Typography variant="h6" gutterBottom> |
| | | {translate('common.edit.title.main')} |
| | | </Typography> |
| | | <Stack direction='row' gap={2}> |
| | | {/* <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.purchase.code" |
| | | source="code" |
| | | parse={v => v} |
| | | autoFocus |
| | | /> |
| | | </Stack> |
| | | </Stack> */} |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.purchase.type" |
| | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | <TextInput source="code" label="table.field.purchase.code" />, |
| | | <TextInput source="type" label="table.field.purchase.type" />, |
| | | <TextInput source="source" label="table.field.purchase.source" />, |
| | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | | const navigate = useNavigate(); |
| | | const assign = (record) => { |
| | | navigate(`/purchaseItem?poId=${record.id}`); |
| | | }; |
| | | |
| | | return ( |
| | | <Box display="flex"> |
| | | <List |
| | |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.purchase"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | |
| | | omit={['id', 'createTime', 'createBy', 'memo']} |
| | | > |
| | | <NumberField source="id" /> |
| | | <TextField source="code" label="table.field.purchase.code" /> |
| | | <MyField |
| | | source="code" |
| | | label="table.field.purchase.code" |
| | | onClick={(event, record, val) => { |
| | | event.stopPropagation(); |
| | | assign(record); |
| | | }} |
| | | /> |
| | | <TextField source="type" label="table.field.purchase.type" /> |
| | | <TextField source="source" label="table.field.purchase.source" /> |
| | | <DateField source="preArr" label="table.field.purchase.preArr" showTime /> |
| | |
| | | import MemoInput from "../components/MemoInput"; |
| | | |
| | | const PurchaseItemCreate = (props) => { |
| | | const { open, setOpen } = props; |
| | | const { open, setOpen, row } = props; |
| | | |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | |
| | | <NumberInput |
| | | label="table.field.purchaseItem.purchaseId" |
| | | source="purchaseId" |
| | | autoFocus |
| | | defaultValue={row.poId} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | |
| | | import React, { useState, useRef, useEffect, useMemo, useCallback } from "react"; |
| | | import { useNavigate } from 'react-router-dom'; |
| | | import { useNavigate, useLocation } from 'react-router-dom'; |
| | | import { |
| | | List, |
| | | DatagridConfigurable, |
| | |
| | | import MyField from "../components/MyField"; |
| | | import { PAGE_DRAWER_WIDTH, OPERATE_MODE, DEFAULT_PAGE_SIZE } from '@/config/setting'; |
| | | import * as Common from '@/utils/common'; |
| | | import CustomerTopToolBar from "../components/EditTopToolBar"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | |
| | | const filters = [ |
| | | <SearchInput source="condition" alwaysOn />, |
| | | <DateInput label='common.time.after' source="timeStart" alwaysOn />, |
| | | <DateInput label='common.time.before' source="timeEnd" alwaysOn />, |
| | | |
| | | <NumberInput source="purchaseId" label="table.field.purchaseItem.purchaseId" />, |
| | | <TextInput source="platItemId" label="table.field.purchaseItem.platItemId" />, |
| | |
| | | const [createDialog, setCreateDialog] = useState(false); |
| | | const [drawerVal, setDrawerVal] = useState(false); |
| | | |
| | | const location = useLocation(); |
| | | const queryParams = new URLSearchParams(location.search); |
| | | const poId = queryParams.get("poId"); |
| | | |
| | | return ( |
| | | <> |
| | | {poId && <CustomerTopToolBar backPrevious={true} />} |
| | | <Box display="flex"> |
| | | <List |
| | | sx={{ |
| | |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.purchaseItem"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | |
| | | <PurchaseItemCreate |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | row={{ poId }} |
| | | /> |
| | | <PageDrawer |
| | | title='PurchaseItem Detail' |
| | |
| | | setDrawerVal={setDrawerVal} |
| | | > |
| | | </PageDrawer> |
| | | </Box> |
| | | </Box></> |
| | | ) |
| | | } |
| | | |
| | |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.qlyInspect.barcode" |
| | | source="barcode" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.qlyInspect.asnItemId" |
| | | source="asnItemId" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.qlyInspect.poItemId" |
| | | source="poItemId" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.qlyInspect.safeQty" |
| | | source="safeQty" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <NumberInput |
| | | label="table.field.qlyInspect.disQty" |
| | | source="disQty" |
| | | /> |
| | | </Grid> |
| | | |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <StatusSelectInput /> |
| | |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.qlyInspect.barcode" |
| | | source="barcode" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.qlyInspect.asnItemId" |
| | | source="asnItemId" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.qlyInspect.poItemId" |
| | | source="poItemId" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.qlyInspect.safeQty" |
| | | source="safeQty" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | <NumberInput |
| | | label="table.field.qlyInspect.disQty" |
| | | source="disQty" |
| | | /> |
| | | </Stack> |
| | | |
| | | </Grid> |
| | | <Grid item xs={12} md={4}> |
| | |
| | | |
| | | <TextInput source="code" label="table.field.qlyInspect.code" />, |
| | | <TextInput source="name" label="table.field.qlyInspect.name" />, |
| | | <TextInput source="barcode" label="table.field.qlyInspect.barcode" />, |
| | | <NumberInput source="asnItemId" label="table.field.qlyInspect.asnItemId" />, |
| | | <NumberInput source="poItemId" label="table.field.qlyInspect.poItemId" />, |
| | | <NumberInput source="safeQty" label="table.field.qlyInspect.safeQty" />, |
| | | <NumberInput source="disQty" label="table.field.qlyInspect.disQty" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | |
| | | <NumberField source="id" /> |
| | | <TextField source="code" label="table.field.qlyInspect.code" /> |
| | | <TextField source="name" label="table.field.qlyInspect.name" /> |
| | | <TextField source="barcode" label="table.field.qlyInspect.barcode" /> |
| | | <NumberField source="asnItemId" label="table.field.qlyInspect.asnItemId" /> |
| | | <NumberField source="poItemId" label="table.field.qlyInspect.poItemId" /> |
| | | <NumberField source="safeQty" label="table.field.qlyInspect.safeQty" /> |
| | | <NumberField source="disQty" label="table.field.qlyInspect.disQty" /> |
| | | |
| | | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | |
| | | property={record.name} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.qlyInspect.barcode" |
| | | property={record.barcode} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.qlyInspect.asnItemId" |
| | | property={record.asnItemId} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.qlyInspect.poItemId" |
| | | property={record.poItemId} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.qlyInspect.safeQty" |
| | | property={record.safeQty} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6}> |
| | | <PanelTypography |
| | | title="table.field.qlyInspect.disQty" |
| | | property={record.disQty} |
| | | /> |
| | | </Grid> |
| | | |
| | | </Grid> |
| | | </CardContent> |
| | |
| | | import MemoInput from "../../../components/MemoInput"; |
| | | |
| | | const DictDataCreate = (props) => { |
| | | const { open, setOpen } = props; |
| | | const { open, setOpen, row } = props; |
| | | |
| | | const translate = useTranslate(); |
| | | const notify = useNotify(); |
| | |
| | | parse={v => v} |
| | | autoFocus |
| | | validate={required()} |
| | | defaultValue={row.dictTypeId} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | |
| | | source="dictTypeCode" |
| | | parse={v => v} |
| | | validate={required()} |
| | | defaultValue={row.dictTypeCode} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | |
| | | label="table.field.dictData.label" |
| | | source="label" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | |
| | | source="sort" |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | {/* <Grid item xs={6} display="flex" gap={1}> |
| | | <TextInput |
| | | label="table.field.dictData.color" |
| | | source="color" |
| | | parse={v => v} |
| | | /> |
| | | </Grid> |
| | | </Grid> */} |
| | | |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | | <StatusSelectInput /> |
| | |
| | | label="table.field.dictData.label" |
| | | source="label" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | |
| | | source="sort" |
| | | /> |
| | | </Stack> |
| | | <Stack direction='row' gap={2}> |
| | | {/* <Stack direction='row' gap={2}> |
| | | <TextInput |
| | | label="table.field.dictData.color" |
| | | source="color" |
| | | parse={v => v} |
| | | /> |
| | | </Stack> |
| | | </Stack> */} |
| | | |
| | | </Grid> |
| | | <Grid item xs={12} md={4}> |
| | |
| | | <TextInput source="value" label="table.field.dictData.value" />, |
| | | <TextInput source="label" label="table.field.dictData.label" />, |
| | | <NumberInput source="sort" label="table.field.dictData.sort" />, |
| | | <TextInput source="color" label="table.field.dictData.color" />, |
| | | // <TextInput source="color" label="table.field.dictData.color" />, |
| | | |
| | | <TextInput label="common.field.memo" source="memo" />, |
| | | <SelectInput |
| | |
| | | const location = useLocation(); |
| | | const queryParams = new URLSearchParams(location.search); |
| | | const dictTypeId = queryParams.get('dictTypeId'); |
| | | console.log(dictTypeId); |
| | | if (dictTypeId != null && dictTypeId != undefined) { |
| | | console.log(dictTypeId); |
| | | console.log(fit); |
| | | } |
| | | const dictTypeCode = queryParams.get('code'); |
| | | |
| | | return ( |
| | | <> |
| | |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.dictData"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | |
| | | <TextField source="value" label="table.field.dictData.value" /> |
| | | <TextField source="label" label="table.field.dictData.label" /> |
| | | <NumberField source="sort" label="table.field.dictData.sort" /> |
| | | <TextField source="color" label="table.field.dictData.color" /> |
| | | {/* <TextField source="color" label="table.field.dictData.color" /> */} |
| | | |
| | | <ReferenceField source="updateBy" label="common.field.updateBy" reference="user" link={false} sortable={false}> |
| | | <TextField source="nickname" /> |
| | |
| | | <DictDataCreate |
| | | open={createDialog} |
| | | setOpen={setCreateDialog} |
| | | row={{ dictTypeId, dictTypeCode }} |
| | | /> |
| | | <PageDrawer |
| | | title='DictData Detail' |
| | |
| | | label="table.field.dictType.name" |
| | | source="name" |
| | | parse={v => v} |
| | | validate={required()} |
| | | /> |
| | | </Grid> |
| | | <Grid item xs={6} display="flex" gap={1}> |
| | |
| | | |
| | | const navigate = useNavigate(); |
| | | const assign = (record) => { |
| | | navigate(`/dictData?dictTypeId=${record.id}`); |
| | | navigate(`/dictData?dictTypeId=${record.id}&code=${record.code}`); |
| | | } |
| | | |
| | | return ( |
| | |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.dictType"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | |
| | | import rowSx from './rowSx'; |
| | | import { format } from 'date-fns'; |
| | | import OperationDetail from './OperationDetail' |
| | | import { width } from "@mui/system"; |
| | | |
| | | const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({ |
| | | '& .css-1vooibu-MuiSvgIcon-root': { |
| | |
| | | theme.transitions.create(['all'], { |
| | | duration: theme.transitions.duration.enteringScreen, |
| | | }), |
| | | marginRight: !!drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | marginRight: drawerVal ? `${PAGE_DRAWER_WIDTH}px` : 0, |
| | | }} |
| | | title={"menu.operation"} |
| | | empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} |
| | |
| | | }); |
| | | }; |
| | | |
| | | console.log(SerialRuleItem); |
| | | |
| | | return ( |
| | | <> |
| | | <Dialog |