Commit e22207dd authored by TZW's avatar TZW

Merge branch 'master' of http://47.100.234.193:9527/wuhao/ems3.3

parents 81dff650 60f06539
......@@ -13,7 +13,7 @@ export default {
dev: {
[defaultSetting.proxypath]: {
// 要代理的地址
target: 'http://192.168.40.64:28001', //jf哥
target: 'http://192.168.40.64:28000', //jf哥
// target: 'http://192.168.40.64:28000', //gc哥
// target: 'http://192.168.40.203:8000', //dj哥
changeOrigin: true,
......
......@@ -14,9 +14,11 @@ body,
.ant-layout {
min-height: 100vh;
}
.ant-popover-inner-content {
padding: 0 !important;
.ant-pro-core-field-dropdown-overlay {
margin: -12px -16px;
}
.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
left: unset;
}
......@@ -60,13 +62,14 @@ ol {
width: 100%;
overflow-x: auto;
&-thead > tr,
&-tbody > tr {
> th,
> td {
&-thead>tr,
&-tbody>tr {
>th,
>td {
white-space: pre;
> span {
>span {
display: block;
}
}
......@@ -315,7 +318,7 @@ ol {
}
.lightblue {
> td:first-child {
>td:first-child {
position: relative;
&::before {
......@@ -337,14 +340,14 @@ ol {
width: 100%;
padding-left: 0 !important;
> span:first-child {
>span:first-child {
flex: 1;
> span:first-child {
>span:first-child {
display: none !important;
}
> .ant-spin-nested-loading {
>.ant-spin-nested-loading {
width: 100%;
}
}
......@@ -403,7 +406,7 @@ ol {
}
.runtime-keep-alive-layout {
> div {
>div {
height: 100% !important;
}
}
......@@ -451,7 +454,7 @@ ol {
min-height: 100% !important;
overflow: hidden !important;
> div {
>div {
height: 100%;
min-height: calc(100vh - 96px);
}
......@@ -463,12 +466,12 @@ ol {
// 横向滚动条
.scrollHoriz {
> div {
>div {
display: flex !important;
flex-wrap: nowrap !important;
align-items: center !important;
> div {
>div {
flex-shrink: 0 !important;
}
}
......
import { doFetch } from '@/utils/doFetch';
import dayjs from "dayjs";
function getcolumns(setdrawer) {
return {
"pathconfig": {
"enableadd": false,
"enableedit": false,
"enabledelete": false,
"enabledetail": false,
"add": "",
"edit": "",
"list": "/repair/umRepairOrder/queryRepairOrderList",
"delete": "",
"detail": ""
},
"columns": [
columns: [
{
"title": "维修单号",
"dataIndex": "repairOrderNo",
"key": "repairOrderNo"
title: '点检单号',
dataIndex: 'taskNo',
key: 'taskNo',
hideInForm: false,
render: (text, row, _, action) => {
return (
<a
onClick={async () => {
let res = await doFetch({ url: "/check/umEquipmentCheckTask/queryDetails", params: { id: row.id } });
if (res.code == "0000") {
setdrawer((s) => ({
...s,
open: true,
val: 'detail',
title: '详细信息',
item: {
...res?.data?.basics
}
}));
}
}}
>
{row?.taskNo}
</a>
);
},
{
"title": "设备编号",
"dataIndex": "equipmentNo",
"key": "equipmentNo"
},
{
"title": "设备名称",
"dataIndex": "equipmentName",
"key": "equipmentName"
title: '设备编号',
dataIndex: 'equipmentNo',
key: 'equipmentNo',
},
{
"title": "故障描述",
"dataIndex": "faultDescription",
"key": "faultDescription"
title: '设备名称',
dataIndex: 'equipmentName',
key: 'equipmentName',
},
{
"title": "报修人员",
"dataIndex": "repairUserName",
"key": "repairUserName"
},
title: '点检类型',
dataIndex: 'checkTypeName',
key: 'checkType',
valueType: 'select',
hideInForm: true,
options: [
{
"title": "报修时间",
"dataIndex": "repairTime",
"key": "repairTimeList",
"valueType": "dateTimeRange"
label: '制造点检',
value: '1',
},
{
"title": "报修单号",
"dataIndex": "repairNo",
"key": "repairNo"
label: '设备点检',
value: '2',
},
],
fieldProps: {
placeholder: '请选择',
showSearch: true,
},
},
{
"title": "工单状态",
"dataIndex": "statusName",
"key": "statusName"
title: '点检截止日期',
dataIndex: 'checkCloseDate',
key: 'checkCloseDateList',
valueType: 'dateRange',
render: (text, row, _, action) => {
return <span style={{ color: `${dayjs(row.checkCloseDate).valueOf() < dayjs().valueOf() ? "#f50" : "rgba(0, 0, 0, 0.85)"}` }}>{row.checkCloseDate}</span>
}
]
};
},
],
pathconfig: {
enableadd: false,
enableedit: false,
enabledelete: false,
enabledetail: true,
add: '',
edit: '',
list: '/check/umEquipmentCheckTask/queryCheckOrders',
delete: '',
detail: '',
},
};
}
export default getcolumns;
import * as React from 'react';
import { useState, useMemo, useRef } from 'react';
import DrawerPro from '@/components/DrawerPro';
import AutoTable from '@/components/AutoTable';
import PremButton from '@/components/PremButton';
import getcolumns from './columns';
import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch';
function Order(props) {
import { useState, useMemo, useRef } from 'react';
import DrawerPro from '@/components/DrawerPro';
import AutoTable from '@/components/AutoTable';
import AutoTables from '@/components/AutoTable/mtable';
import PremButton from '@/components/PremButton';
import getcolumns from './columns';
import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch';
function Order(props) {
const actionRef = useRef(),
formRef = useRef();
const [drawer, setdrawer] = useState({
......@@ -17,7 +17,7 @@ import * as React from 'react';
let pathconf = getcolumns(setdrawer)?.pathconfig ?? {};
return pathconf;
}, []);
const { run, loading } = useRequest(doFetch, {
const { run, loading, runAsync } = useRequest(doFetch, {
manual: true,
onSuccess: (res, params) => {
if (res?.code == '0000') {
......@@ -94,21 +94,162 @@ import * as React from 'react';
</PremButton>
);
};
const order = (text, row, _, action) => {
return (
<PremButton
pop={{
title: '是否接单?',
okText: '确认',
cancelText: '取消',
onConfirm: async () => {
await runAsync({ url: '/check/umEquipmentCheckTask/meet', params: { id: row?.id } });
},
}}
btn={{
size: 'small',
}}
>
接单
</PremButton>
);
};
const close = (text, row, _, action) => {
return (
<PremButton
pop={{
title: '是否关单?',
okText: '确认',
cancelText: '取消',
onConfirm: async () => {
await runAsync({ url: '/check/umEquipmentCheckTask/shut', params: { id: row?.id } });
},
}}
btn={{
size: 'small',
type: 'danger',
}}
>
关单
</PremButton>
);
};
const columns = useMemo(() => {
let defcolumn = getcolumns(setdrawer)?.columns;
return defcolumn.concat({
title: '操作',
valueType: 'option',
width: 150,
width: 120,
render: (text, row, _, action) => [
pathconfig?.enabledetail && detail(text, row, _, action),
pathconfig?.enableedit && edit(text, row, _, action),
pathconfig?.enabledelete && remove(text, row, _, action),
order(text, row, _, action),
close(text, row, _, action)
],
});
}, []);
const detailsColumns = useMemo(() => {
const columnsc = [
{
title: '点检项目',
dataIndex: 'checkItem',
key: 'checkItem',
hideInForm: true,
},
{
title: '部位',
dataIndex: 'checkPosition',
key: 'checkPosition',
hideInForm: true,
},
{
title: '点检方法',
dataIndex: 'checkWay',
key: 'checkWay',
hideInForm: true,
},
];
if (drawer?.val == "detail") {
return [
{
title: '计划信息',
valueType: 'split',
},
{
title: '点检单号',
dataIndex: 'taskNo',
key: 'taskNo',
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
},
{
title: '工单状态',
dataIndex: 'statusName',
key: 'statusName',
},
{
title: '点检计划单号',
dataIndex: 'planNo',
key: 'planNo',
},
{
title: '基本信息',
valueType: 'split',
},
{
title: '设备编号',
dataIndex: 'equipmentNo',
key: 'equipmentNo',
},
{
title: '设备名称',
dataIndex: 'equipmentName',
key: 'equipmentName',
},
{
title: '设备型号',
dataIndex: 'equipmentModelName',
key: 'equipmentModelName',
},
{
title: '点检类型',
dataIndex: 'checkTypeName',
key: 'checkTypeName',
},
{
title: '点检截止日期',
dataIndex: 'checkCloseDate',
key: 'checkCloseDate',
span: 2
},
{
title: '点检项目',
dataIndex: 'item',
key: 'item',
valueType: 'formList',
colProps: {
span: 24,
},
columns,
span: 3,
render: (text, row) => {
return (
<AutoTables
columns={columnsc?.map((it) => ({
...it,
hideInSearch: true,
}))}
dataSource={row?.item}
/>
);
},
}
]
}
}, [drawer?.val, drawer?.item?.id]);
return (
<div style={{ position: 'relative' }}>
<AutoTable
......@@ -117,7 +258,7 @@ import * as React from 'react';
actionRef={actionRef}
path={pathconfig?.list || '/ngic-auth/sysUser/query/page'}
pageextra={pathconfig?.enableadd ? 'add' : null}
resizeable={true}
resizeable={false}
addconfig={{
// access: 'sysDepartment_save',
btn: {
......@@ -136,7 +277,7 @@ import * as React from 'react';
/>
<DrawerPro
fields={columns}
fields={drawer.val == "detail" ? detailsColumns : columns}
params={{ id: drawer?.item?.id }}
formRef={formRef}
placement="right"
......@@ -160,7 +301,6 @@ import * as React from 'react';
/>
</div>
);
}
export default Order;
}
export default Order;
\ No newline at end of file
......@@ -84,9 +84,7 @@ function getcolumns(setdrawer) {
setdrawer((s) => ({
...s,
open: true,
title: '详情',
val: 'detail',
type: 'detail',
title: '详细信息',
item: row,
}));
......@@ -136,9 +134,7 @@ function getcolumns(setdrawer) {
},
options: {
path: '/auth/sysShop/getAllShopSelection',
linkParams: {
factoryId: '',
},
params: {},
},
},
{
......@@ -332,9 +328,7 @@ function getcolumns(setdrawer) {
},
options: {
path: '/auth/sysShop/getAllShopSelection',
linkParams: {
factoryId: '',
},
params: {},
},
},
{
......@@ -399,7 +393,7 @@ function getcolumns(setdrawer) {
add: '',
edit: '',
list: '/check/umEquipmentCheckPlan/queryYesComplete',
delete: '',
delete: '/check/umEquipmentCheckPlan/deleteByI',
detail: '/check/umEquipmentCheckPlan/queryDetails',
},
},
......
......@@ -2,7 +2,9 @@ import * as React from 'react';
import { useState, useMemo, useRef } from 'react';
import { message, Popconfirm, Switch } from "antd";
import DrawerPro from '@/components/DrawerPro';
import DetailPro from '@/components/DetailPro';
import AutoTable from '@/components/AutoTable';
import AutoTables from '@/components/AutoTable/mtable';
import PremButton from '@/components/PremButton';
import getcolumns from './columns';
import { useRequest } from 'ahooks';
......@@ -278,8 +280,157 @@ function Plan(props) {
},
];
}, [drawer?.item])
}, [drawer?.item]);
const detailsColumns = useMemo(() => {
const columnsc = [
{
title: '点检项目',
dataIndex: 'checkItem',
key: 'checkItem',
hideInForm: true,
},
{
title: '部位',
dataIndex: 'checkPosition',
key: 'checkPosition',
hideInForm: true,
},
{
title: '点检方法',
dataIndex: 'checkWay',
key: 'checkWay',
hideInForm: true,
},
];
if (drawer?.val == "detail") {
return [
{
title: '计划信息',
valueType: 'split',
},
{
title: '点检计划单号',
dataIndex: 'checkNo',
key: 'checkNo',
},
{
title: '创建时间',
dataIndex: 'createTime',
key: 'createTime',
},
{
title: '状态',
dataIndex: 'statusName',
key: 'statusName',
},
{
title: '启用/停用',
dataIndex: 'checkEnableName',
key: 'checkEnableName',
},
{
title: '下次点检日期',
dataIndex: 'planCheckDate',
key: 'planCheckDate',
span: activeTabKey == 1 ? 2 : 1
},
{
title: '关单日期',
dataIndex: 'endDate',
key: 'endDate',
hideInDescriptions: activeTabKey == 1 ? true : false,
},
{
title: '基本信息',
valueType: 'split',
},
{
title: '设备编号',
dataIndex: 'equipmentNo',
key: 'equipmentNo',
},
{
title: '设备名称',
dataIndex: 'equipmentName',
key: 'equipmentName',
},
{
title: '设备型号',
dataIndex: 'equipmentModelName',
key: 'equipmentModelName',
},
{
title: '工厂名称',
dataIndex: 'factoryName',
key: 'factoryName',
},
{
title: '车间名称',
dataIndex: 'shopName',
key: 'shopName',
},
{
title: '点检类型',
dataIndex: 'checkTypeName',
key: 'checkTypeName',
},
{
title: '计划类型',
dataIndex: 'checkLoopName',
key: 'checkLoopName',
},
{
title: '周期(天)',
dataIndex: 'checkCycle',
key: 'checkCycle',
span: activeTabKey == 1 ? 2 : 2
},
{
title: '点检项目',
valueType: 'split',
},
{
dataIndex: 'itemList',
key: 'itemList',
valueType: 'formList',
colProps: {
span: 24,
},
columns,
span: 24,
render: (text, row) => {
return (
<AutoTables
columns={columnsc?.map((it) => ({
...it,
hideInSearch: true,
}))}
dataSource={row?.itemList}
/>
);
},
},
{
title: '关单信息',
valueType: 'split',
hideInDescriptions: drawer?.item?.status != 3 ? true : false,
},
{
title: '关单人员',
dataIndex: 'shutUserName',
key: 'shutUserName',
hideInDescriptions: drawer?.item?.status != 3 ? true : false,
},
{
title: '强制关单时间',
dataIndex: 'shutTime',
key: 'shutTime',
hideInDescriptions: drawer?.item?.status != 3 ? true : false,
},
]
}
}, [drawer?.val, activeTabKey, drawer?.item?.id]);
const pathconfig = useMemo(() => {
let defpath = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {};
return defpath;
......@@ -323,9 +474,8 @@ function Plan(props) {
/>
<DrawerPro
fields={drawer?.val == "detailaddon" ? editDateColumns : columns}
fields={drawer?.val == "detailaddon" ? editDateColumns : drawer?.val == "detail" ? detailsColumns : columns}
detailpath={pathconfig?.detail || null}
detailData={drawer?.item}
defaultFormValue={drawer?.item}
params={{ id: drawer?.item?.id }}
formRef={formRef}
......@@ -366,6 +516,7 @@ function Plan(props) {
/>
</DrawerPro>
</div>
);
}
......
......@@ -29,7 +29,11 @@ function getcolumns(id) {
"label": "设备点检",
"value": 2
}
]
],
fieldProps: {
placeholder: '请选择',
showSearch: true,
},
},
{
"title": "设备型号",
......@@ -51,7 +55,11 @@ function getcolumns(id) {
"checkType": "",
},
"extraParams": { id }
}
},
fieldProps: {
placeholder: '请选择',
showSearch: true,
},
},
{
"title": "备注",
......
This diff is collapsed.
import * as React from 'react';
import { useState, useMemo, useRef } from 'react';
import DrawerPro from '@/components/DrawerPro';
import AutoTable from '@/components/AutoTable';
import PremButton from '@/components/PremButton';
import getcolumns from './columns';
import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch';
import { useState, useMemo, useRef } from 'react';
import DrawerPro from '@/components/DrawerPro';
import AutoTable from '@/components/AutoTable';
import PremButton from '@/components/PremButton';
import getcolumns from './columns';
import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch';
function Task(props) {
function Task(props) {
const actionRef = useRef(),
formRef = useRef();
const [drawer, setdrawer] = useState({
open: false,
});
const pathconfig = useMemo(() => {
let pathconf = getcolumns(setdrawer)?.pathconfig ?? {};
return pathconf;
}, []);
}),
[activeTabKey, setactiveTabKey] = useState("1");
const { run, loading } = useRequest(doFetch, {
manual: true,
onSuccess: (res, params) => {
......@@ -96,26 +94,32 @@ import * as React from 'react';
};
const columns = useMemo(() => {
let defcolumn = getcolumns(setdrawer)?.columns;
let defcolumn = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.columns;
let defpath = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {};
return defcolumn.concat({
title: '操作',
valueType: 'option',
width: 150,
render: (text, row, _, action) => [
pathconfig?.enabledetail && detail(text, row, _, action),
pathconfig?.enableedit && edit(text, row, _, action),
pathconfig?.enabledelete && remove(text, row, _, action),
defpath?.enabledetail && detail(text, row, _, action),
defpath?.enableedit && edit(text, row, _, action),
defpath?.enabledelete && remove(text, row, _, action),
],
});
}, []);
}, [activeTabKey]);
const pathconfig = useMemo(() => {
let defpath = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {};
return defpath;
}, [activeTabKey]);
return (
<div style={{ position: 'relative' }}>
<AutoTable
pagetitle="点检工单"
columns={columns}
actionRef={actionRef}
path={pathconfig?.list || '/ngic-auth/sysUser/query/page'}
actionRef={actionRef}
pageextra={pathconfig?.enableadd ? 'add' : null}
resizeable={true}
addconfig={{
......@@ -133,16 +137,21 @@ import * as React from 'react';
},
},
}}
tabList={getcolumns()}
activeTabKey={activeTabKey}
onTabChange={(key) => {
setactiveTabKey(key);
}}
/>
<DrawerPro
fields={columns}
params={{ id: drawer?.item?.id }}
formRef={formRef}
placement="right"
detailpath={pathconfig?.detail || null}
detailData={drawer?.item}
defaultFormValue={drawer?.item}
params={{ id: drawer?.item?.id }}
formRef={formRef}
placement="right"
onClose={() => {
setdrawer((s) => ({
...s,
......@@ -160,7 +169,6 @@ import * as React from 'react';
/>
</div>
);
}
export default Task;
}
export default Task;
......@@ -492,7 +492,6 @@ function Failure(props) {
<InitForm
fields={columns}
onFinish={async (vals) => {
console.log(vals);
let params = {
repairComplete: {
faultType: vals.faultSettingId,
......@@ -546,7 +545,6 @@ function Failure(props) {
},
]}
onFinish={async (vals) => {
console.log(vals);
let params = {
repairInfo: { ...vals },
id: drawer?.item.id,
......
......@@ -61,7 +61,6 @@ function Factory(props) {
url: '/auth/sysShop/checkShopRelation',
params: { id: drawer?.id },
});
console.log(data);
setdrawer((s) => ({
...s,
visible: true,
......
......@@ -116,9 +116,6 @@ function Instore(props) {
let res = await doFetch({ url: '/sparepart/sparePart/queryAllSelect', params: {} });
return res?.data?.dataList;
});
console.log(data);
return (
<div style={{ position: 'relative' }}>
<AutoTable
......
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