Commit f0ef84bb authored by 左玲玲's avatar 左玲玲 😬

表格联动

parent b689d175
...@@ -43,8 +43,6 @@ const EditTable = ({ ...@@ -43,8 +43,6 @@ const EditTable = ({
let { urlchangeval } = linkconfig ?? {}; let { urlchangeval } = linkconfig ?? {};
let newvalue = [...recordList]; let newvalue = [...recordList];
if (urlchangeval && record) {//根据url 改变 数据值 if (urlchangeval && record) {//根据url 改变 数据值
let { params, database, effectresult } = urlchangeval ?? {}, let { params, database, effectresult } = urlchangeval ?? {},
curvaluerow = value && value.length > 0 ? value.filter(it => it[rowKey] == record[rowKey])[0] : {} curvaluerow = value && value.length > 0 ? value.filter(it => it[rowKey] == record[rowKey])[0] : {}
...@@ -54,7 +52,9 @@ const EditTable = ({ ...@@ -54,7 +52,9 @@ const EditTable = ({
if (it[rowKey] == record[rowKey]) { if (it[rowKey] == record[rowKey]) {
let freshvals = {} let freshvals = {}
Object.keys(effectresult).map(its => { Object.keys(effectresult).map(its => {
freshvals[its] = value[i][its] // freshvals[its] = value[i][its];
freshvals[its] = it[its];
}) })
it = { it = {
...record, ...record,
...@@ -97,18 +97,7 @@ const EditTable = ({ ...@@ -97,18 +97,7 @@ const EditTable = ({
}; };
} }
onChange(newvalue); onChange(newvalue);
}, },
}} }}
maxLength={maxLength ?? 1000} maxLength={maxLength ?? 1000}
......
...@@ -338,7 +338,8 @@ table { ...@@ -338,7 +338,8 @@ table {
flex:1 flex:1
} }
} }
.ant-input-number-affix-wrapper{ .ant-input-number-affix-wrapper,
.ant-input-number{
width: 100% !important; width: 100% !important;
} }
......
...@@ -61,7 +61,8 @@ const EditUpload = ({ record, fid, storeId }) => { ...@@ -61,7 +61,8 @@ const EditUpload = ({ record, fid, storeId }) => {
search: false, search: false,
editable: (text, record, index) => { editable: (text, record, index) => {
return !record.materieOutstoreDetailId return !record.materieOutstoreDetailId
} },
valueType:"digit"
}, },
{ {
title: "备注", title: "备注",
...@@ -213,12 +214,12 @@ const one = { ...@@ -213,12 +214,12 @@ const one = {
"title": <span>入库数量 <b style={{ color: "red" }}>*</b></span>, "title": <span>入库数量 <b style={{ color: "red" }}>*</b></span>,
"dataIndex": "instroeNum", "dataIndex": "instroeNum",
"key": "instroeNum", "key": "instroeNum",
valueType:"digit",
"formItemProps": () => { "formItemProps": () => {
return { return {
rules: [{ required: true, message: '此项为必填项' }], rules: [{ required: true, message: '此项为必填项' }],
}; };
}, }
valueType:"digit"
}, },
{ {
"title": "单位", "title": "单位",
...@@ -761,7 +762,7 @@ const one = { ...@@ -761,7 +762,7 @@ const one = {
title: "上架数量", title: "上架数量",
dataIndex: "instroeNum", dataIndex: "instroeNum",
key: "instroeNum", key: "instroeNum",
search: false, search: false
} }
]} ]}
dataSource={record.uploadList} dataSource={record.uploadList}
...@@ -847,7 +848,7 @@ const one = { ...@@ -847,7 +848,7 @@ const one = {
title: "上架数量", title: "上架数量",
dataIndex: "instroeNum", dataIndex: "instroeNum",
key: "instroeNum", key: "instroeNum",
search: false, search: false
} }
, ,
{ {
...@@ -955,7 +956,7 @@ const one = { ...@@ -955,7 +956,7 @@ const one = {
title: "入库数量", title: "入库数量",
dataIndex: "instroeNum", dataIndex: "instroeNum",
key: "instroeNum", key: "instroeNum",
search: false, search: false
}, },
{ {
title: "单位", title: "单位",
......
import React, { useEffect, useRef, useReducer } from "react"; import React, { useEffect, useRef, useReducer } from "react";
import { Modal, Button, Drawer, Dropdown, Menu } from "antd"; import { Modal, Button, Drawer, Dropdown, Menu } from "antd";
import AutoTable from "@/components/AutoTable"; import AutoTable from "@/components/AutoTable";
import Tables from "@/components/Tableform";
import getPrem from "@/utils/getPrem"; //权限判断fn import getPrem from "@/utils/getPrem"; //权限判断fn
import InitForm from "@/components/InitForm"; import InitForm from "@/components/InitForm";
import { useRequest } from "umi"; import { useRequest } from "umi";
...@@ -154,21 +155,21 @@ const Charactor = (props) => { ...@@ -154,21 +155,21 @@ const Charactor = (props) => {
dataIndex: "departmentName", dataIndex: "departmentName",
key: "departmentName", key: "departmentName",
}, },
{ // {
title: "负责车间", // title: "负责车间",
dataIndex: "shopNames", // dataIndex: "shopNames",
key: "shopNames", // key: "shopNames",
}, // },
{ // {
title: "负责产线", // title: "负责产线",
dataIndex: "productionLines", // dataIndex: "productionLines",
key: "productionLines", // key: "productionLines",
}, // },
{ // {
title: "负责工段", // title: "负责工段",
dataIndex: "sectionNames", // dataIndex: "sectionNames",
key: "sectionNames", // key: "sectionNames",
}, // },
]; ];
function extraAction(text, record, _, action) { function extraAction(text, record, _, action) {
...@@ -290,11 +291,11 @@ const Charactor = (props) => { ...@@ -290,11 +291,11 @@ const Charactor = (props) => {
treeType={iftype.val} treeType={iftype.val}
/> />
) : iftype.val == "staff" ? ( ) : iftype.val == "staff" ? (
<AutoTable <Tables
columns={columnsc} columns={columnsc}
extraparams={{ roleId: curitem.id }} extraparams={{ roleId: curitem.id }}
path="/ngic-auth/sysUser/query/pageByRoleId" path="/ngic-auth/sysUser/query/pageByRoleId"
></AutoTable> ></Tables>
) : ( ) : (
<></> <></>
)} )}
......
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