Commit 56838b91 authored by TZW's avatar TZW

bug

parent 2271b5e2
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-11-29 14:03:07 * @Date: 2022-11-29 14:03:07
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-12 15:08:23 * @Last Modified time: 2022-12-14 14:08:31
*/ */
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
...@@ -22,7 +22,7 @@ const App = ({ ...@@ -22,7 +22,7 @@ const App = ({
}) => { }) => {
const [value, setValue] = useState(''); const [value, setValue] = useState('');
const [fieldscolumns, setfieldscolumns] = useState(columns); const [fieldscolumns, setfieldscolumns] = useState(columns);
console.log('22222', drawer, urlParams); console.log(123123);
const selectValueType = (type, options) => { const selectValueType = (type, options) => {
switch (type) { switch (type) {
case 1: case 1:
......
...@@ -123,6 +123,11 @@ function InitForm({ ...@@ -123,6 +123,11 @@ function InitForm({
res?.data?.data[extendField]?.forEach((it) => { res?.data?.data[extendField]?.forEach((it) => {
obj[it?.fieldId] = it?.fieldRealValue; obj[it?.fieldId] = it?.fieldRealValue;
}); });
console.log('dddddd', {
...(res?.data?.data ?? {}),
...obj,
...defaultFormValue,
});
return { return {
...(res?.data?.data ?? {}), ...(res?.data?.data ?? {}),
...obj, ...obj,
......
...@@ -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-14 11:40:45 * @Last Modified time: 2022-12-14 14:13:17
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -492,39 +492,6 @@ function Model(props) { ...@@ -492,39 +492,6 @@ function Model(props) {
val: 'only', val: 'only',
type: 'edit', type: 'edit',
item: row, item: row,
// detailpath: urlParams.detail,
// params: { id: row.id },
// onFinish: async (vals) => {
// //console.log(1);
// let equipmentCharList = [];
// //console.log('id:', row.id);
// for (let i in vals) {
// if (!isNaN(Number(i))) {
// equipmentCharList.push({
// fieldId: i,
// fieldRealValue: vals[i],
// });
// delete vals[i];
// }
// }
// let params = {
// ...vals,
// id: row.id,
// equipmentCharList,
// };
// let res = await doFetch({
// url: urlParams.save,
// params,
// });
// if (res.code === '0000') {
// message.success('编辑成功!');
// setDrawer((s) => ({
// ...s,
// visible: false,
// }));
// actionRef.current.reload();
// }
// },
})); }));
}, },
}} }}
......
...@@ -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-14 09:15:07 * @Last Modified time: 2022-12-14 14:33:30
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -206,6 +206,7 @@ function Supplier(props) { ...@@ -206,6 +206,7 @@ function Supplier(props) {
key: el.id, key: el.id,
}); });
}); });
console.log('1214', column);
setnewfieldscolumns(column); setnewfieldscolumns(column);
} }
}, },
...@@ -216,13 +217,13 @@ function Supplier(props) { ...@@ -216,13 +217,13 @@ 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['equipmentSupplierCharList']?.forEach((it) => {
obj[it?.fieldId] = it?.fieldRealValue; obj[it?.fieldId] = it?.fieldRealValue;
}); });
// console.log('drawerpro:', { console.log('drawerpro:', {
// ...(res?.data?.data ?? {}), ...(res?.data?.data ?? {}),
// ...obj, ...obj,
// }); });
setrequest( setrequest(
{ {
...(res?.data?.data ?? {}), ...(res?.data?.data ?? {}),
...@@ -243,6 +244,7 @@ function Supplier(props) { ...@@ -243,6 +244,7 @@ function Supplier(props) {
title: '联系人', title: '联系人',
dataIndex: 'userName', dataIndex: 'userName',
key: 'userName', key: 'userName',
search: false,
formItemProps: { formItemProps: {
rules: [ rules: [
{ {
...@@ -254,16 +256,19 @@ function Supplier(props) { ...@@ -254,16 +256,19 @@ function Supplier(props) {
}, },
{ {
title: '手机号码', title: '手机号码',
search: false,
dataIndex: 'telephone', dataIndex: 'telephone',
key: 'telephone', key: 'telephone',
}, },
{ {
title: '邮箱', title: '邮箱',
search: false,
dataIndex: 'email', dataIndex: 'email',
key: 'email', key: 'email',
}, },
{ {
title: '职务', title: '职务',
search: false,
dataIndex: 'title', dataIndex: 'title',
key: 'title', key: 'title',
fieldProps: { fieldProps: {
......
...@@ -32,7 +32,6 @@ function getcolumns(setdrawer) { ...@@ -32,7 +32,6 @@ function getcolumns(setdrawer) {
dataIndex: 'dataTypeName', dataIndex: 'dataTypeName',
key: 'dataType', key: 'dataType',
valueType: 'input', valueType: 'input',
search: false,
hideInForm: false, hideInForm: false,
fieldProps: { fieldProps: {
disabled: true, disabled: true,
......
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