Commit 881e8f0d authored by TZW's avatar TZW

bug

parent 0aa09e4a
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-02-01 15:40:07
* @Last Modified time: 2023-02-02 10:16:20
*/
import * as React from 'react';
......@@ -28,10 +28,15 @@ import TreeRender from '@/components/TreeRender';
import { ProDescriptions } from '@ant-design/pro-components';
import InitForm from '@/components/InitForm';
import ExtendField from '@/components/ExtendField';
import dayjs from 'dayjs';
const { Sider, Content } = Layout;
function Model(props) {
const disabledDateOfDay = (current) => {
// Can not select days before today and today
return current && current > dayjs().endOf('day');
};
const actionRef = useRef(),
formRef = useRef(),
[drawer, setDrawer] = useState({
......@@ -59,6 +64,7 @@ function Model(props) {
dataIndex: 'reformDate',
key: 'reformDate',
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
......@@ -1542,6 +1548,9 @@ function Model(props) {
dataIndex: 'reformDate',
key: 'reformDate',
valueType: 'date',
fieldProps: {
disabledDate: disabledDateOfDay,
},
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
......@@ -1593,6 +1602,9 @@ function Model(props) {
title: '报废日期',
dataIndex: 'scrapDate',
key: 'scrapDate',
fieldProps: {
disabledDate: disabledDateOfDay,
},
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
......@@ -1698,6 +1710,9 @@ function Model(props) {
dataIndex: 'transferDate',
key: 'transferDate',
valueType: 'date',
fieldProps: {
disabledDate: disabledDateOfDay,
},
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
......@@ -1784,6 +1799,9 @@ function Model(props) {
title: '借用日期',
dataIndex: 'borrowDate',
key: 'borrowDate',
fieldProps: {
disabledDate: disabledDateOfDay,
},
valueType: 'date',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
......@@ -1879,6 +1897,9 @@ function Model(props) {
dataIndex: 'realReturnDate',
key: 'realReturnDate',
valueType: 'date',
fieldProps: {
disabledDate: disabledDateOfDay,
},
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
......
......@@ -20,6 +20,9 @@ function getcolumns(equipmentModelId) {
],
},
valueType: 'select',
fieldProps: {
showSearch: true,
},
mode: 'radio',
options: [
{
......@@ -37,6 +40,9 @@ function getcolumns(equipmentModelId) {
dataIndex: 'equipmentModelName',
key: 'equipmentModelId',
valueType: 'select',
fieldProps: {
showSearch: true,
},
formItemProps: {
rules: [
{
......
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2023-01-19 09:53:59
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-02-01 16:14:59
* @Last Modified time: 2023-02-02 11:00:36
*/
import * as React from 'react';
......@@ -90,6 +90,13 @@ function WorkOrder(props) {
dataIndex: 'qualitativeJudgeResult',
key: 'qualitativeJudgeResult',
hideInForm: true,
render: (_, row) => {
if (row?.judgeType == 1) {
return row?.judgeResultName;
} else {
return row?.qualitativeJudgeResult;
}
},
},
{
title: '下限值',
......@@ -342,6 +349,7 @@ function WorkOrder(props) {
const order = (text, row, _, action) => {
return (
<PremButton
access="umMaintainTask_orderReceiving"
pop={{
title: '是否接单?',
okText: '确认',
......@@ -364,6 +372,7 @@ function WorkOrder(props) {
const close = (text, row, _, action) => {
return (
<PremButton
access="umMaintainTask:customsDeclaration"
pop={{
title: '是否关单?',
okText: '确认',
......@@ -387,6 +396,7 @@ function WorkOrder(props) {
const finish = (text, row, _, action) => {
return (
<PremButton
access="umMaintainTask:finishMaintainTask"
btn={{
size: 'small',
onClick: () => {
......@@ -419,6 +429,7 @@ function WorkOrder(props) {
const remove = (text, row, _, action) => {
return (
<PremButton
access="umMaintainTask:deleteById"
pop={{
title: '是否删除?',
okText: '确认',
......@@ -440,6 +451,7 @@ function WorkOrder(props) {
const verify = (text, row, _, action) => {
return (
<PremButton
access="umMaintainTask:verification"
btn={{
size: 'small',
onClick: () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment