Commit 91478e68 authored by wuhao's avatar wuhao 🎯

asder

parent 912bdf58
...@@ -172,7 +172,6 @@ export default [ ...@@ -172,7 +172,6 @@ export default [
name: "推送记录", name: "推送记录",
component: "./platform/Sendlist", component: "./platform/Sendlist",
}, },
{ {
path: "/platform/norule", path: "/platform/norule",
name: "编号规则", name: "编号规则",
......
...@@ -137,7 +137,7 @@ export default (props) => { ...@@ -137,7 +137,7 @@ export default (props) => {
<div style={{ display: "flex", width: "100%" }}> <div style={{ display: "flex", width: "100%" }}>
{(props.childposition == "left" || !props.childposition) && {(props.childposition == "left" || !props.childposition) &&
props.children} props.children}
<div style={{ flex: 1, width: "100%" }}> <div style={{ flex: 1, overflow:"hidden" }}>
{props.childposition == "top" && props.children} {props.childposition == "top" && props.children}
<Mtable {...props} /> <Mtable {...props} />
</div> </div>
......
import React, { import React, { useEffect, useRef, useState, useMemo } from "react";
PureComponent, import { ProTable } from "@ant-design/pro-components";
useEffect,
useRef,
useState,
useMemo,
} from "react";
import ProTable from "@ant-design/pro-table";
import request from "umi-request";
import Resizecell from "./Resizecell"; import Resizecell from "./Resizecell";
import { Tooltip } from "antd"; import { Tooltip } from "antd";
import { doFetch } from "@/utils/doFetch"; import { doFetch } from "@/utils/doFetch";
import { useAsyncEffect } from "ahooks"; import { useAsyncEffect } from "ahooks";
import bodyParse from "@/utils/bodyParse";
const Mtable = (props) => { const Mtable = (props) => {
const { const {
...@@ -26,13 +20,14 @@ const Mtable = (props) => { ...@@ -26,13 +20,14 @@ const Mtable = (props) => {
x, //横向滚动 x, //横向滚动
activeTabKey, //激活的tabKey 拖拽表格唯一标识使用 其他情况用不到 activeTabKey, //激活的tabKey 拖拽表格唯一标识使用 其他情况用不到
refreshDep, //依赖刷新 (已废弃) refreshDep, //依赖刷新 (已废弃)
getDefaultSelected, //存在默认选中向上返回选中值
} = props; } = props;
const actionRefs = actionRef ?? useRef(), const actionRefs = actionRef ?? useRef(),
formRefs = formRef ?? useRef(), formRefs = formRef ?? useRef(),
ifspagination = pagination == "false" || pagination === false, ifspagination = pagination == "false" || pagination === false,
[size, setsize] = useState("small"), [size, setsize] = useState("small"),
[valueColumns, setvalueColumns] = useState([]); [valueColumns, setvalueColumns] = useState({});
const [columnes, setcolumnes] = useState(columns ?? []); const [columnes, setcolumnes] = useState(columns ?? []);
//调用接口 //调用接口
...@@ -59,11 +54,9 @@ const Mtable = (props) => { ...@@ -59,11 +54,9 @@ const Mtable = (props) => {
data = result?.data?.dataList; data = result?.data?.dataList;
total = result?.data?.dataList?.length; total = result?.data?.dataList?.length;
} }
console.log(result, { //存在默认选中向上返回选中值
data, getDefaultSelected && getDefaultSelected(result?.data);
success,
total,
});
return { return {
data, data,
success, success,
...@@ -187,6 +180,9 @@ const Mtable = (props) => { ...@@ -187,6 +180,9 @@ const Mtable = (props) => {
}); });
setvalueColumns(allcol); setvalueColumns(allcol);
} }
actionRefs?.current?.reload();
actionRefs?.current?.reset();
}; };
//调用重新渲染表格 //调用重新渲染表格
...@@ -214,33 +210,29 @@ const Mtable = (props) => { ...@@ -214,33 +210,29 @@ const Mtable = (props) => {
(index) => (index) =>
(e, { size }) => { (e, { size }) => {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
setcolumnes((s) => { let submitdata = {...valueColumns} ?? {},
const nextColumns = [...s]; curkey = Object.keys(submitdata)[index];
nextColumns[index] = { submitdata[curkey].width = parseInt(size.width);
...nextColumns[index], setvalueColumns(submitdata);
width: size.width, doFetch({
}; url: "/ngic-base-business/paFieldScene/save",
doFetch({ params: {
url: "/ngic-base-business/paFieldScene/save", sceneMark: extraparams
params: { ? path + bodyParse(extraparams)
sceneMark: extraparams : activeTabKey
? path + bodyParse(extraparams) ? path + activeTabKey
: activeTabKey : path,
? path + activeTabKey controList: Object.keys(submitdata).map((it, i) => {
: path, return {
controList: Object.keys(nextColumns).map((it, i) => { fieldKey: it,
return { fieldWidth:
fieldKey: it, i == index ? parseInt(size.width) : submitdata[it].width,
fieldWidth: fieldOrder: submitdata[it].order,
i == index ? parseInt(size.width) : nextColumns[it].width, fieldFixed: submitdata[it].fixed,
fieldOrder: nextColumns[it].order, fieldShow: submitdata[it].show,
fieldFixed: nextColumns[it].fixed, };
fieldShow: nextColumns[it].show, }),
}; },
}),
},
});
return nextColumns;
}); });
}; };
...@@ -273,7 +265,7 @@ const Mtable = (props) => { ...@@ -273,7 +265,7 @@ const Mtable = (props) => {
columnsState={{ columnsState={{
value: valueColumns, value: valueColumns,
onChange: (val, state) => { onChange: (val, state) => {
setcolumnes((s) => { setvalueColumns((s) => {
let submitdata = { let submitdata = {
...s, ...s,
...val, ...val,
......
...@@ -87,7 +87,7 @@ ol { ...@@ -87,7 +87,7 @@ ol {
padding: 0 20px !important; padding: 0 20px !important;
} }
} }
.ant-drawer-content{ .ant-drawer-content {
overflow-x: hidden !important; overflow-x: hidden !important;
} }
...@@ -316,30 +316,30 @@ pre { ...@@ -316,30 +316,30 @@ pre {
table { table {
min-width: calc(100% - 6px) !important; min-width: calc(100% - 6px) !important;
} }
.ant-drawer-open{ .ant-drawer-open {
transform: none !important; transform: none !important;
} }
.ant-pro-table-list-toolbar{ .ant-pro-table-list-toolbar {
overflow: hidden !important; overflow: hidden !important;
} }
.ant-select-selector{ .ant-select-selector {
overflow: hidden !important; overflow: hidden !important;
} }
.ant-breadcrumb{ .ant-breadcrumb {
span{ span {
>span{ > span {
max-width: 600px !important; max-width: 600px !important;
} }
} }
} }
.ant-tree .ant-tree-treenode{ .ant-tree .ant-tree-treenode {
width: 100%; width: 100%;
>span:last-child{ > span:last-child {
flex:1 flex: 1;
} }
} }
.ant-input-number-affix-wrapper, .ant-input-number-affix-wrapper,
.ant-input-number{ .ant-input-number {
width: 100% !important; width: 100% !important;
} }
...@@ -350,7 +350,6 @@ table { ...@@ -350,7 +350,6 @@ table {
} }
@media print { @media print {
html, html,
body { body {
height: initial !important; height: initial !important;
...@@ -361,8 +360,18 @@ table { ...@@ -361,8 +360,18 @@ table {
@media print { @media print {
.page-break { .page-break {
margin-top: 2rem;
display: block; display: block;
margin-top: 2rem;
page-break-after: always; page-break-after: always;
} }
} }
.ant-pro-card-body {
padding: 12px !important;
}
.ant-pagination.ant-pagination-mini .ant-pagination-options-size-changer {
max-width: 100px !important;
}
.ant-pagination-options {
display: flex !important;
min-width: 210px !important;
}
import React, { useState, useRef, useReducer } from "react"; import React, { useState, useRef, useReducer } from "react";
import { Button, Tooltip, Row, Divider, Drawer, Form, message } from "antd"; import { Button, Tooltip, Row, Divider, Drawer, Form, message } from "antd";
import AutoTable from "@/components/Tableform"; import AutoTable from "@/components/AutoTable";
import getPrem from "@/utils/getPrem"; //权限判断fn import getPrem from "@/utils/getPrem"; //权限判断fn
import { useRequest } from "umi"; import { useRequest } from "umi";
import defaultFields from "./fields"; import defaultFields from "./fields";
...@@ -545,6 +545,7 @@ const Materiel = (props) => { ...@@ -545,6 +545,7 @@ const Materiel = (props) => {
onRef={(node) => (ChildRef = node)} onRef={(node) => (ChildRef = node)}
childposition="left" childposition="left"
extraparams={{ materieTypeId: materieTypeId }} extraparams={{ materieTypeId: materieTypeId }}
x={600}
> >
<div <div
style={{ style={{
......
...@@ -256,6 +256,45 @@ const one = { ...@@ -256,6 +256,45 @@ const one = {
}, },
], ],
rowKey: "id", rowKey: "id",
},
"materialLists": {
value: [],
title: "物料信息",
type: "checktable",
col: { span: 24 },
name: ["materialLists"],
required: false,
path:"/ngic-workmanship/wmsMaterieInstore/queryList",
columns: [
{
"title": <span>物料编码-名称 <b style={{ color: "red" }}>*</b></span>,
"dataIndex": "materieId",
"key": "materieId",
"valueType": "select",
"width": 300,
"selectedRender":"InputNumber"
},
{
"title": "批次号/SN号",
"dataIndex": "materieControlNo",
"key": "materieControlNo"
},
{
"title": <span>入库数量 <b style={{ color: "red" }}>*</b></span>,
"dataIndex": "instroeNum",
"key": "instroeNum",
},
{
"title": "库存单位",
"dataIndex": "productionUnitName",
"key": "productionUnitName",
"readonly": 'productionUnitName',
"width": 88
},
],
rowKey: "id",
rowName:"materieInstoreNo",
pagination:true
} }
}, },
two = { two = {
......
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