Commit 2271b5e2 authored by TZW's avatar TZW

1214bug

parent 344a9802
...@@ -23,7 +23,7 @@ function DetailPro(props) { ...@@ -23,7 +23,7 @@ function DetailPro(props) {
if (props?.extendField) { if (props?.extendField) {
let obj = {}; let obj = {};
res?.data?.data[props.extendField]?.forEach((it) => { res?.data?.data[props.extendField]?.forEach((it) => {
obj[it?.fieldId] = it?.fieldRealValueList; obj[it?.fieldId] = it?.fieldRealValue;
}); });
//console.log('extendField:', obj); //console.log('extendField:', obj);
setcuritem({ setcuritem({
......
...@@ -118,16 +118,11 @@ function InitForm({ ...@@ -118,16 +118,11 @@ function InitForm({
request={async (params) => { request={async (params) => {
if (detailpath) { if (detailpath) {
let res = await doFetch({ url: detailpath, params }); let res = await doFetch({ url: detailpath, params });
// console.log({
// ...(res?.data?.data ?? {}),
// ...defaultFormValue,
// });
if (extendField) { if (extendField) {
let obj = {}; let obj = {};
res?.data?.data[extendField]?.forEach((it) => { res?.data?.data[extendField]?.forEach((it) => {
obj[it?.fieldId] = it?.fieldRealValueList; obj[it?.fieldId] = it?.fieldRealValue;
}); });
//console.log('extendField:', obj);
return { return {
...(res?.data?.data ?? {}), ...(res?.data?.data ?? {}),
...obj, ...obj,
...@@ -139,9 +134,9 @@ function InitForm({ ...@@ -139,9 +134,9 @@ function InitForm({
...defaultFormValue, ...defaultFormValue,
}; };
} else { } else {
// console.log({ console.log({
// ...defaultFormValue, ...defaultFormValue,
// }); });
return { return {
...defaultFormValue, ...defaultFormValue,
}; };
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
border-radius: 0px !important; border-radius: 0px !important;
outline: none !important; outline: none !important;
box-shadow: none !important; box-shadow: none !important;
&:focus { &:focus {
box-shadow: none !important; box-shadow: none !important;
} }
...@@ -100,7 +101,7 @@ ...@@ -100,7 +101,7 @@
margin-bottom: 12px; margin-bottom: 12px;
break-inside: avoid; break-inside: avoid;
> h2 { >h2 {
margin-bottom: 0px; margin-bottom: 0px;
padding: 4px 6px; padding: 4px 6px;
color: #000; color: #000;
...@@ -121,7 +122,7 @@ ...@@ -121,7 +122,7 @@
.section { .section {
padding: 12px 0px; padding: 12px 0px;
> h2 { >h2 {
margin-bottom: 0px; margin-bottom: 0px;
padding: 4px 6px; padding: 4px 6px;
color: #000; color: #000;
...@@ -147,12 +148,12 @@ ...@@ -147,12 +148,12 @@
transition: all 0.02s; transition: all 0.02s;
} }
> .tocollect { >.tocollect {
display: none; display: none;
color: @primary-color; color: @primary-color;
} }
> .collected { >.collected {
color: @primary-color; color: @primary-color;
} }
...@@ -164,7 +165,7 @@ ...@@ -164,7 +165,7 @@
} }
} }
&:hover > .tocollect { &:hover>.tocollect {
display: block; display: block;
} }
} }
...@@ -204,6 +205,7 @@ ...@@ -204,6 +205,7 @@
background-color: #f0f0f0; background-color: #f0f0f0;
transform: translate(0); transform: translate(0);
transform-origin: left center; transform-origin: left center;
* { * {
opacity: 1; opacity: 1;
} }
...@@ -221,6 +223,7 @@ ...@@ -221,6 +223,7 @@
background-color: #f0f0f0; background-color: #f0f0f0;
transform: translate(-100vw); transform: translate(-100vw);
transform-origin: left center; transform-origin: left center;
* { * {
opacity: 0.4; opacity: 0.4;
} }
...@@ -238,6 +241,7 @@ ...@@ -238,6 +241,7 @@
line-height: 48px !important; line-height: 48px !important;
background: #002140; background: #002140;
transition: all 0.1s !important; transition: all 0.1s !important;
img { img {
display: inline-block; display: inline-block;
height: 32px; height: 32px;
...@@ -261,11 +265,13 @@ ...@@ -261,11 +265,13 @@
min-width: 48px !important; min-width: 48px !important;
max-width: 48px !important; max-width: 48px !important;
} }
.sider { .sider {
position: relative; position: relative;
z-index: 10; z-index: 10;
min-height: 100vh; min-height: 100vh;
box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35); box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
&.fixSiderBar { &.fixSiderBar {
position: fixed; position: fixed;
top: 0; top: 0;
...@@ -274,7 +280,7 @@ ...@@ -274,7 +280,7 @@
:global { :global {
.ant-menu-root { .ant-menu-root {
height: ~'calc(100vh - @{nav-header-height})'; height:~'calc(100vh - @{nav-header-height})';
overflow-y: auto; overflow-y: auto;
} }
...@@ -306,25 +312,22 @@ ...@@ -306,25 +312,22 @@
} }
.ant-menu-inline-collapsed { .ant-menu-inline-collapsed {
& > .ant-menu-item .sider-menu-item-img + span,
& &>.ant-menu-item .sider-menu-item-img+span,
> .ant-menu-item-group &>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item .sider-menu-item-img+span,
> .ant-menu-item-group-list &>.ant-menu-submenu>.ant-menu-submenu-title .sider-menu-item-img+span {
> .ant-menu-item
.sider-menu-item-img
+ span,
& > .ant-menu-submenu > .ant-menu-submenu-title .sider-menu-item-img + span {
display: inline-block; display: inline-block;
max-width: 0; max-width: 0;
opacity: 0; opacity: 0;
} }
} }
.ant-menu-item .sider-menu-item-img + span, .ant-menu-item .sider-menu-item-img+span,
.ant-menu-submenu-title .sider-menu-item-img + span { .ant-menu-submenu-title .sider-menu-item-img+span {
opacity: 1; opacity: 1;
transition: opacity 0.3s @ease-in-out, width 0.3s @ease-in-out; transition: opacity 0.3s @ease-in-out, width 0.3s @ease-in-out;
} }
.ant-menu-title-content { .ant-menu-title-content {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -335,13 +338,22 @@ ...@@ -335,13 +338,22 @@
padding: 0; padding: 0;
} }
} }
.ant-layout-has-sider,
.ant-card-bordered {
min-height: 100%;
height: unset !important
}
} }
.firstag { .firstag {
height: 35px !important; height: 35px !important;
margin-top: 0px !important; margin-top: 0px !important;
background-color: #000000; background-color: #000000;
box-shadow: 0 2px 14px #000000 !important; box-shadow: 0 2px 14px #000000 !important;
user-select: none; user-select: none;
&:hover { &:hover {
color: #ffffff !important; color: #ffffff !important;
background-color: #000000 !important; background-color: #000000 !important;
......
...@@ -387,7 +387,7 @@ ol { ...@@ -387,7 +387,7 @@ ol {
.container, .container,
.diycard { .diycard {
height: 100% !important; height: unset
} }
.runtime-keep-alive-layout { .runtime-keep-alive-layout {
......
...@@ -18,7 +18,14 @@ function getcolumns(setdrawer) { ...@@ -18,7 +18,14 @@ function getcolumns(setdrawer) {
key: 'equipmentName', key: 'equipmentName',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
}, },
{ title: '位置号', width: 120, align: 'center', dataIndex: 'positionNo', key: 'positionNo' }, {
title: '位置号',
width: 120,
align: 'center',
dataIndex: 'positionNo',
search: false,
key: 'positionNo',
},
{ {
width: 120, width: 120,
title: '设备类型', title: '设备类型',
...@@ -53,11 +60,11 @@ function getcolumns(setdrawer) { ...@@ -53,11 +60,11 @@ function getcolumns(setdrawer) {
title: '部门名称', title: '部门名称',
width: 120, width: 120,
align: 'center', align: 'center',
valueType: 'select', valueType: 'treeSelect',
dataIndex: 'departmentName', dataIndex: 'departmentName',
key: 'departmentId', key: 'departmentId',
options: { options: {
path: '/auth/sysDepartment/query/depart/selectbox', path: '/auth/sysDepartment/query/children/tree',
linkParams: { linkParams: {
organizationId: 'parentId', organizationId: 'parentId',
}, },
...@@ -107,7 +114,7 @@ function getcolumns(setdrawer) { ...@@ -107,7 +114,7 @@ function getcolumns(setdrawer) {
width: 120, width: 120,
dataIndex: 'productLineName', dataIndex: 'productLineName',
valueType: 'select', valueType: 'select',
key: 'productLineName', key: 'productLineId',
align: 'center', align: 'center',
options: { options: {
path: '/auth/sysProductionLine/getAllProductLineSelectionByShop', path: '/auth/sysProductionLine/getAllProductLineSelectionByShop',
...@@ -123,6 +130,7 @@ function getcolumns(setdrawer) { ...@@ -123,6 +130,7 @@ function getcolumns(setdrawer) {
dataIndex: 'supplierName', dataIndex: 'supplierName',
align: 'center', align: 'center',
hideInTable: true, hideInTable: true,
search: false,
key: 'supplierId', key: 'supplierId',
options: { options: {
path: '/asset/equipmentSupplier/query/selection', path: '/asset/equipmentSupplier/query/selection',
...@@ -131,6 +139,7 @@ function getcolumns(setdrawer) { ...@@ -131,6 +139,7 @@ function getcolumns(setdrawer) {
}, },
{ {
title: '设备原值(万元)', title: '设备原值(万元)',
search: false,
hideInTable: true, hideInTable: true,
align: 'center', align: 'center',
dataIndex: 'equipmentWorth', dataIndex: 'equipmentWorth',
...@@ -139,6 +148,7 @@ function getcolumns(setdrawer) { ...@@ -139,6 +148,7 @@ function getcolumns(setdrawer) {
{ {
title: '安装投产日期', title: '安装投产日期',
hideInTable: true, hideInTable: true,
search: false,
align: 'center', align: 'center',
dataIndex: 'productDate', dataIndex: 'productDate',
key: 'productDate', key: 'productDate',
...@@ -149,6 +159,7 @@ function getcolumns(setdrawer) { ...@@ -149,6 +159,7 @@ function getcolumns(setdrawer) {
width: 120, width: 120,
dataIndex: 'pictureUrl', dataIndex: 'pictureUrl',
search: false, search: false,
search: false,
key: 'picList', key: 'picList',
align: 'center', align: 'center',
valueType: 'uploadImage', valueType: 'uploadImage',
...@@ -175,6 +186,7 @@ function getcolumns(setdrawer) { ...@@ -175,6 +186,7 @@ function getcolumns(setdrawer) {
title: '二维码', title: '二维码',
width: 120, width: 120,
align: 'center', align: 'center',
search: false,
align: 'center', align: 'center',
dataIndex: 'qrCodeUrl', dataIndex: 'qrCodeUrl',
key: 'qrCodeUrl', key: 'qrCodeUrl',
...@@ -192,6 +204,7 @@ function getcolumns(setdrawer) { ...@@ -192,6 +204,7 @@ function getcolumns(setdrawer) {
{ {
title: '状态名称', title: '状态名称',
align: 'center', align: 'center',
search: false,
hideInTable: true, hideInTable: true,
dataIndex: 'statusName', dataIndex: 'statusName',
key: 'statusName', key: 'statusName',
...@@ -204,6 +217,21 @@ function getcolumns(setdrawer) { ...@@ -204,6 +217,21 @@ function getcolumns(setdrawer) {
align: 'center', align: 'center',
hideInForm: true, hideInForm: true,
fixed: 'right', fixed: 'right',
valueType: 'select',
options: [
{
label: '在用',
value: 1,
},
{
label: '借用中',
value: 2,
},
{
label: '报废',
value: 3,
},
],
key: 'status', key: 'status',
render: (text, row) => { render: (text, row) => {
switch (row.status) { switch (row.status) {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56 * @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-12 14:29:17 * @Last Modified time: 2022-12-14 11:40:45
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -75,7 +75,7 @@ function Model(props) { ...@@ -75,7 +75,7 @@ function Model(props) {
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
}, },
{ {
title: '上传文件(上限为5个)', title: '上传文件',
key: 'urlIds ', key: 'urlIds ',
valueType: 'uploadDragger', valueType: 'uploadDragger',
// colProps: { span: 24 }, // colProps: { span: 24 },
...@@ -123,14 +123,14 @@ function Model(props) { ...@@ -123,14 +123,14 @@ function Model(props) {
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
}, },
{ {
title: '上传文件', title: '',
key: 'urlIds ', key: 'urlIds ',
valueType: 'uploadDragger', valueType: 'uploadDragger',
// colProps: { span: 24 }, // colProps: { span: 24 },
formItemProps: { formItemProps: {
rules: [ rules: [
{ {
required: true, required: false,
message: '此项为必填项', message: '此项为必填项',
}, },
], ],
...@@ -158,7 +158,7 @@ function Model(props) { ...@@ -158,7 +158,7 @@ function Model(props) {
}, },
{ {
title: '调入公司', title: '调入公司',
dataIndex: 'organizationName', dataIndex: 'toOrganizationName',
key: 'toOrganizationId', key: 'toOrganizationId',
valueType: 'select', valueType: 'select',
options: { path: '/auth/sysDepartment/query/organization/selectbox', params: {} }, options: { path: '/auth/sysDepartment/query/organization/selectbox', params: {} },
...@@ -166,11 +166,11 @@ function Model(props) { ...@@ -166,11 +166,11 @@ function Model(props) {
}, },
{ {
title: '调入部门', title: '调入部门',
valueType: 'select', valueType: 'treeSelect',
dataIndex: 'departmentName', dataIndex: 'toDepartmentName',
key: 'toDepartmentId', key: 'toDepartmentId',
options: { options: {
path: '/auth/sysDepartment/query/depart/selectbox', path: '/auth/sysDepartment/query/children/tree',
linkParams: { linkParams: {
toOrganizationId: 'parentId', toOrganizationId: 'parentId',
}, },
...@@ -178,7 +178,7 @@ function Model(props) { ...@@ -178,7 +178,7 @@ function Model(props) {
}, },
{ {
title: '调入工厂', title: '调入工厂',
dataIndex: 'factoryName', dataIndex: 'toFactoryName',
key: 'toFactoryId', key: 'toFactoryId',
valueType: 'select', valueType: 'select',
options: { path: '/auth/sysFactory/getAllFactorySelection', params: {} }, options: { path: '/auth/sysFactory/getAllFactorySelection', params: {} },
...@@ -186,7 +186,7 @@ function Model(props) { ...@@ -186,7 +186,7 @@ function Model(props) {
}, },
{ {
title: '调入车间', title: '调入车间',
dataIndex: 'shopName', dataIndex: 'toShopName',
valueType: 'select', valueType: 'select',
options: { options: {
path: '/auth/sysShop/getShopSelectionByFactory', path: '/auth/sysShop/getShopSelectionByFactory',
...@@ -199,7 +199,7 @@ function Model(props) { ...@@ -199,7 +199,7 @@ function Model(props) {
}, },
{ {
title: '调入工段', title: '调入工段',
dataIndex: 'sectionName', dataIndex: 'toSectionName',
key: 'toSectionId', key: 'toSectionId',
valueType: 'select', valueType: 'select',
options: { options: {
...@@ -211,7 +211,7 @@ function Model(props) { ...@@ -211,7 +211,7 @@ function Model(props) {
}, },
{ {
title: '调入产线', title: '调入产线',
dataIndex: 'productionLines', dataIndex: 'toProductLineName',
valueType: 'select', valueType: 'select',
key: 'toProductLineId', key: 'toProductLineId',
options: { options: {
...@@ -263,11 +263,11 @@ function Model(props) { ...@@ -263,11 +263,11 @@ function Model(props) {
}, },
{ {
title: '借用部门', title: '借用部门',
valueType: 'select', valueType: 'treeSelect',
dataIndex: 'departmentName', dataIndex: 'departmentName',
key: 'toDepartmentId', key: 'toDepartmentId',
options: { options: {
path: '/auth/sysDepartment/query/depart/selectbox', path: '/auth/sysDepartment/query/children/tree',
linkParams: { linkParams: {
toOrganizationId: 'parentId', toOrganizationId: 'parentId',
}, },
...@@ -367,11 +367,11 @@ function Model(props) { ...@@ -367,11 +367,11 @@ function Model(props) {
}, },
{ {
title: '接收部门', title: '接收部门',
valueType: 'select', valueType: 'treeSelect',
dataIndex: 'returnDepartmentId', dataIndex: 'returnDepartmentId',
key: 'returnDepartmentId', key: 'returnDepartmentId',
options: { options: {
path: '/auth/sysDepartment/query/depart/selectbox', path: '/auth/sysDepartment/query/children/tree',
linkParams: { linkParams: {
returnOrganizationId: 'parentId', returnOrganizationId: 'parentId',
}, },
...@@ -465,6 +465,20 @@ function Model(props) { ...@@ -465,6 +465,20 @@ function Model(props) {
fsb: '/asset/equipment/detail/parent/page', fsb: '/asset/equipment/detail/parent/page',
}; };
function formatDate(date) {
var myyear = date.getFullYear();
var mymonth = date.getMonth() + 1;
var myweekday = date.getDate();
if (mymonth < 10) {
mymonth = '0' + mymonth;
}
if (myweekday < 10) {
myweekday = '0' + myweekday;
}
return myyear + '-' + mymonth + '-' + myweekday; //想要什么格式都可以随便自己拼
}
const edit = (text, row, _, action) => { const edit = (text, row, _, action) => {
return ( return (
<PremButton <PremButton
...@@ -566,25 +580,6 @@ function Model(props) { ...@@ -566,25 +580,6 @@ function Model(props) {
}, },
val: 'only', val: 'only',
title: '编辑子设备', title: '编辑子设备',
// onFinish: async (vals) => {
// //console.log(1);
// let params = {
// ...vals,
// id: row.id,
// };
// let res = await doFetch({
// url: urlParams.save,
// params,
// });
// if (res.code === '0000') {
// message.success('新增成功!');
// setDrawer((s) => ({
// ...s,
// visible: false,
// }));
// actionRef.current.reload();
// }
// },
})); }));
}} }}
> >
...@@ -603,28 +598,11 @@ function Model(props) { ...@@ -603,28 +598,11 @@ function Model(props) {
type: 'resume', type: 'resume',
item: { item: {
id: row.id, id: row.id,
reformDate: formatDate(new Date()),
scrapDate: formatDate(new Date()),
}, },
val: 'only', val: 'only',
title: '履历登记', title: '履历登记',
// onFinish: async (vals) => {
// //console.log(1);
// let params = {
// ...vals,
// id: row.id,
// };
// let res = await doFetch({
// url: urlParams.save,
// params,
// });
// if (res.code === '0000') {
// message.success('新增成功!');
// setDrawer((s) => ({
// ...s,
// visible: false,
// }));
// actionRef.current.reload();
// }
// },
})); }));
}} }}
> >
...@@ -802,7 +780,7 @@ function Model(props) { ...@@ -802,7 +780,7 @@ function Model(props) {
//console.log(res?.data?.data); //console.log(res?.data?.data);
let obj = {}; let obj = {};
res?.data?.data['equipmentCharList']?.forEach((it) => { res?.data?.data['equipmentCharList']?.forEach((it) => {
obj[it?.fieldId] = it?.fieldRealValueList; obj[it?.fieldId] = it?.fieldRealValue;
}); });
console.log('drawerpro:', { console.log('drawerpro:', {
...(res?.data?.data ?? {}), ...(res?.data?.data ?? {}),
...@@ -866,11 +844,11 @@ function Model(props) { ...@@ -866,11 +844,11 @@ function Model(props) {
title: '部门名称', title: '部门名称',
width: 120, width: 120,
align: 'center', align: 'center',
valueType: 'select', valueType: 'treeSelect',
dataIndex: 'departmentName', dataIndex: 'departmentName',
key: 'departmentId', key: 'departmentId',
options: { options: {
path: '/auth/sysDepartment/query/depart/selectbox', path: '/auth/sysDepartment/query/children/tree',
linkParams: { linkParams: {
organizationId: 'parentId', organizationId: 'parentId',
}, },
...@@ -968,11 +946,11 @@ function Model(props) { ...@@ -968,11 +946,11 @@ function Model(props) {
title: '部门名称', title: '部门名称',
width: 120, width: 120,
align: 'center', align: 'center',
valueType: 'select', valueType: 'treeSelect',
dataIndex: 'departmentName', dataIndex: 'departmentName',
key: 'departmentId', key: 'departmentId',
options: { options: {
path: '/auth/sysDepartment/query/depart/selectbox', path: '/auth/sysDepartment/query/children/tree',
linkParams: { linkParams: {
organizationId: 'parentId', organizationId: 'parentId',
}, },
...@@ -1229,11 +1207,11 @@ function Model(props) { ...@@ -1229,11 +1207,11 @@ function Model(props) {
title: '部门名称', title: '部门名称',
width: 120, width: 120,
align: 'center', align: 'center',
valueType: 'select', valueType: 'treeSelect',
dataIndex: 'departmentName', dataIndex: 'departmentName',
key: 'departmentId', key: 'departmentId',
options: { options: {
path: '/auth/sysDepartment/query/depart/selectbox', path: '/auth/sysDepartment/query/children/tree',
linkParams: { linkParams: {
organizationId: 'parentId', organizationId: 'parentId',
}, },
...@@ -1497,7 +1475,7 @@ function Model(props) { ...@@ -1497,7 +1475,7 @@ function Model(props) {
formItemProps: { formItemProps: {
rules: [ rules: [
{ {
required: true, required: false,
message: '此项为必填项', message: '此项为必填项',
}, },
], ],
...@@ -1520,14 +1498,13 @@ function Model(props) { ...@@ -1520,14 +1498,13 @@ function Model(props) {
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
}, },
{ {
title: '上传文件', title: '上传文件(上限为5个)',
key: 'urlIds ', key: 'urlIds ',
valueType: 'uploadDragger', valueType: 'uploadDragger',
// colProps: { span: 24 },
formItemProps: { formItemProps: {
rules: [ rules: [
{ {
required: true, required: false,
message: '此项为必填项', message: '此项为必填项',
}, },
], ],
...@@ -1548,11 +1525,11 @@ function Model(props) { ...@@ -1548,11 +1525,11 @@ function Model(props) {
}, },
{ {
title: '调入部门', title: '调入部门',
valueType: 'select', valueType: 'treeSelect',
dataIndex: 'departmentName', dataIndex: 'departmentName',
key: 'toDepartmentId', key: 'toDepartmentId',
options: { options: {
path: '/auth/sysDepartment/query/depart/selectbox', path: '/auth/sysDepartment/query/children/tree',
linkParams: { linkParams: {
toOrganizationId: 'parentId', toOrganizationId: 'parentId',
}, },
...@@ -1635,11 +1612,11 @@ function Model(props) { ...@@ -1635,11 +1612,11 @@ function Model(props) {
}, },
{ {
title: '借用部门', title: '借用部门',
valueType: 'select', valueType: 'treeSelect',
dataIndex: 'departmentName', dataIndex: 'departmentName',
key: 'toDepartmentId', key: 'toDepartmentId',
options: { options: {
path: '/auth/sysDepartment/query/depart/selectbox', path: '/auth/sysDepartment/query/children/tree',
linkParams: { linkParams: {
toOrganizationId: 'parentId', toOrganizationId: 'parentId',
}, },
...@@ -1729,11 +1706,11 @@ function Model(props) { ...@@ -1729,11 +1706,11 @@ function Model(props) {
}, },
{ {
title: '接收部门', title: '接收部门',
valueType: 'select', valueType: 'treeSelect',
dataIndex: 'returnDepartmentId', dataIndex: 'returnDepartmentId',
key: 'returnDepartmentId', key: 'returnDepartmentId',
options: { options: {
path: '/auth/sysDepartment/query/depart/selectbox', path: '/auth/sysDepartment/query/children/tree',
linkParams: { linkParams: {
returnOrganizationId: 'parentId', returnOrganizationId: 'parentId',
}, },
...@@ -1890,6 +1867,7 @@ function Model(props) { ...@@ -1890,6 +1867,7 @@ function Model(props) {
children: activeTab == 1 && ( children: activeTab == 1 && (
<InitForm <InitForm
fields={fields[activeTab]} fields={fields[activeTab]}
defaultFormValue={drawer?.item}
onFinish={async (vals) => { onFinish={async (vals) => {
//console.log(vals); //console.log(vals);
let res = await doFetch({ let res = await doFetch({
...@@ -1915,8 +1893,8 @@ function Model(props) { ...@@ -1915,8 +1893,8 @@ function Model(props) {
children: activeTab == 2 && ( children: activeTab == 2 && (
<InitForm <InitForm
fields={fields[activeTab]} fields={fields[activeTab]}
defaultFormValue={drawer?.item}
onFinish={async (vals) => { onFinish={async (vals) => {
//console.log(vals);
let res = await doFetch({ let res = await doFetch({
url: urlParams_resume.save, url: urlParams_resume.save,
params: { ...vals, type: '2', equipmentId: drawer?.item?.id }, params: { ...vals, type: '2', equipmentId: drawer?.item?.id },
...@@ -2079,7 +2057,7 @@ function Model(props) { ...@@ -2079,7 +2057,7 @@ function Model(props) {
if (!isNaN(Number(i))) { if (!isNaN(Number(i))) {
equipmentCharReqList.push({ equipmentCharReqList.push({
fieldId: i, fieldId: i,
fieldRealValueList: vals[i], fieldRealValue: vals[i],
}); });
delete vals[i]; delete vals[i];
} }
...@@ -2124,7 +2102,7 @@ function Model(props) { ...@@ -2124,7 +2102,7 @@ function Model(props) {
if (!isNaN(Number(i))) { if (!isNaN(Number(i))) {
equipmentCharReqList.push({ equipmentCharReqList.push({
fieldId: i, fieldId: i,
fieldRealValueList: vals[i], fieldRealValue: vals[i],
}); });
delete vals[i]; delete vals[i];
} }
...@@ -2231,9 +2209,6 @@ function Model(props) { ...@@ -2231,9 +2209,6 @@ function Model(props) {
setDrawer((s) => ({ setDrawer((s) => ({
...s, ...s,
visible: false, visible: false,
item: null,
detailpath: null,
params: null,
})); }));
}} }}
{...drawer} {...drawer}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44 * @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-13 17:09:31 * @Last Modified time: 2022-12-14 09:15:07
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -217,7 +217,7 @@ function Supplier(props) { ...@@ -217,7 +217,7 @@ function Supplier(props) {
//console.log(res?.data?.data); //console.log(res?.data?.data);
let obj = {}; let obj = {};
res?.data?.data['equipmentSupplierCharReqList']?.forEach((it) => { res?.data?.data['equipmentSupplierCharReqList']?.forEach((it) => {
obj[it?.fieldId] = it?.fieldRealValueList; obj[it?.fieldId] = it?.fieldRealValue;
}); });
// console.log('drawerpro:', { // console.log('drawerpro:', {
// ...(res?.data?.data ?? {}), // ...(res?.data?.data ?? {}),
...@@ -339,7 +339,7 @@ function Supplier(props) { ...@@ -339,7 +339,7 @@ function Supplier(props) {
if (!isNaN(Number(i))) { if (!isNaN(Number(i))) {
equipmentSupplierCharReqList.push({ equipmentSupplierCharReqList.push({
fieldId: i, fieldId: i,
fieldRealValueList: vals[i], fieldRealValue: vals[i],
}); });
delete vals[i]; delete vals[i];
} }
...@@ -385,7 +385,7 @@ function Supplier(props) { ...@@ -385,7 +385,7 @@ function Supplier(props) {
if (!isNaN(Number(i))) { if (!isNaN(Number(i))) {
equipmentSupplierCharReqList.push({ equipmentSupplierCharReqList.push({
fieldId: i, fieldId: i,
fieldRealValueList: vals[i], fieldRealValue: vals[i],
}); });
delete vals[i]; delete vals[i];
} }
......
...@@ -8,7 +8,7 @@ function getcolumns(setdrawer) { ...@@ -8,7 +8,7 @@ function getcolumns(setdrawer) {
formItemProps: { formItemProps: {
rules: [ rules: [
{ {
required: false, required: true,
message: '此项为必填项', message: '此项为必填项',
}, },
], ],
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44 * @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-24 15:39:28 * @Last Modified time: 2022-12-14 09:56:26
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -195,10 +195,10 @@ function Role(props) { ...@@ -195,10 +195,10 @@ function Role(props) {
{ {
title: '部门名称', title: '部门名称',
dataIndex: 'departmentName', dataIndex: 'departmentName',
valueType: 'select', valueType: 'treeSelect',
key: 'departmentId', key: 'departmentId',
options: { options: {
path: '/auth/sysDepartment/query/depart/selectbox', path: '/auth/sysDepartment/query/children/tree',
linkParams: { linkParams: {
organizationId: 'parentId', organizationId: 'parentId',
}, },
......
...@@ -20,134 +20,6 @@ function getcolumns(setdrawer) { ...@@ -20,134 +20,6 @@ function getcolumns(setdrawer) {
render: (text, row) => { render: (text, row) => {
return ( return (
<a <a
// onClick={async () => {
// let newfieldscolumns = [];
// const fieldscolumns = [
// {
// title: '用户名',
// dataIndex: 'username',
// key: 'username',
// },
// {
// title: '姓名',
// dataIndex: 'fullName',
// key: 'fullName',
// },
// { title: '手机号', dataIndex: 'telephone', key: 'telephone' },
// {
// title: '邮箱',
// dataIndex: 'mailNo',
// key: 'mailNo',
// },
// {
// title: '公司名称',
// dataIndex: 'organizationName',
// key: 'organizationId',
// },
// {
// title: '部门名称',
// dataIndex: 'departmentName',
// key: 'departmentId',
// },
// {
// title: '负责工厂',
// dataIndex: 'factoryNames',
// key: 'factoryNames',
// },
// {
// title: '负责车间',
// dataIndex: 'shopNames',
// key: 'shopNames',
// },
// {
// title: '负责工段',
// dataIndex: 'sectionName',
// key: 'sectionIdList',
// },
// {
// title: '负责产线',
// dataIndex: 'productionLines',
// key: 'productionLineIdList',
// },
// {
// title: '角色配置',
// dataIndex: 'roleNames',
// key: 'roleIdList',
// },
// {
// title: '直属领导',
// dataIndex: 'parentName',
// key: 'parentId',
// },
// {
// title: '状态',
// dataIndex: 'statusName',
// key: 'status',
// },
// ];
// const selectValueType = (type, options) => {
// switch (type) {
// case 1:
// return {
// valueType: 'input',
// };
// case 2:
// return {
// valueType: 'select',
// options,
// };
// case 3:
// return {
// valueType: 'radio',
// options,
// };
// case 4:
// return {
// valueType: 'select',
// options,
// };
// default:
// break;
// }
// };
// let res = await doFetch({
// url: '/base/paFormField/queryList',
// params: {
// formId: '1',
// },
// });
// if (res?.data?.dataList) {
// let column = [
// {
// title: '扩展字段',
// valueType: 'split',
// },
// ];
// res?.data?.dataList?.forEach((el) => {
// column.push({
// ...selectValueType(el.fieldChar, el.valueList),
// title: el.fieldName,
// dataIndex: el.id,
// key: el.id,
// });
// });
// newfieldscolumns = fieldscolumns.concat(column);
// //console.log('fieldscolumns', newfieldscolumns);
// }
// setdrawer((s) => ({
// ...s,
// visible: true,
// item: row,
// title: '详情',
// fields: newfieldscolumns,
// extendField: 'userCharList',
// detailpath: '/auth/sysUser/detail',
// params: { id: row.id },
// val: 'detail',
// title: row.fullName + '的详细信息',
// }));
// }}
onClick={() => { onClick={() => {
fieldsDetail( fieldsDetail(
[ [
...@@ -189,7 +61,7 @@ function getcolumns(setdrawer) { ...@@ -189,7 +61,7 @@ function getcolumns(setdrawer) {
}, },
{ {
title: '负责工段', title: '负责工段',
dataIndex: 'sectionName', dataIndex: 'sectionNames',
key: 'sectionIdList', key: 'sectionIdList',
}, },
{ {
...@@ -247,11 +119,11 @@ function getcolumns(setdrawer) { ...@@ -247,11 +119,11 @@ function getcolumns(setdrawer) {
title: '部门名称', title: '部门名称',
width: 120, width: 120,
align: 'center', align: 'center',
valueType: 'select', valueType: 'treeSelect',
dataIndex: 'departmentName', dataIndex: 'departmentName',
key: 'departmentId', key: 'departmentId',
options: { options: {
path: '/auth/sysDepartment/query/depart/selectbox', path: '/auth/sysDepartment/query/children/tree',
linkParams: { linkParams: {
organizationId: 'parentId', organizationId: 'parentId',
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44 * @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-13 17:09:41 * @Last Modified time: 2022-12-14 09:15:23
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -163,7 +163,7 @@ function User(props) { ...@@ -163,7 +163,7 @@ function User(props) {
if (!isNaN(Number(i))) { if (!isNaN(Number(i))) {
userCharReqList.push({ userCharReqList.push({
fieldId: i, fieldId: i,
fieldRealValueList: vals[i], fieldRealValue: vals[i],
}); });
delete vals[i]; delete vals[i];
} }
...@@ -211,7 +211,7 @@ function User(props) { ...@@ -211,7 +211,7 @@ function User(props) {
if (!isNaN(Number(i))) { if (!isNaN(Number(i))) {
userCharReqList.push({ userCharReqList.push({
fieldId: i, fieldId: i,
fieldRealValueList: vals[i], fieldRealValue: vals[i],
}); });
delete vals[i]; delete vals[i];
} }
......
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