Commit 96171fa8 authored by wuhao's avatar wuhao 🎯

asder

parent d45398bb
......@@ -187,7 +187,7 @@ const Mtable = (props) => {
//调用重新渲染表格
useAsyncEffect(async () => {
await initDrage();
}, [columns,extraparams, path, activeTabKey, refreshDep]);
}, [columns, extraparams, path, activeTabKey, refreshDep]);
//缩放表格
const handleResize =
......@@ -209,7 +209,7 @@ const Mtable = (props) => {
(index) =>
(e, { size }) => {
e.stopImmediatePropagation();
let submitdata = {...valueColumns} ?? {},
let submitdata = { ...valueColumns } ?? {},
curkey = Object.keys(submitdata)[index];
submitdata[curkey].width = parseInt(size.width);
setvalueColumns(submitdata);
......
......@@ -69,16 +69,16 @@ const Details = (props) => {
//获取每一项
const getItem = (itemData) => {
const {
type,
key,
title,
columns,
path,
urlName,
col,
rowKey,
expandable,
} = itemData,
type,
key,
title,
columns,
path,
urlName,
col,
rowKey,
expandable,
} = itemData,
value = dataSource[key];
if (!type || type == "input") {
return value == 0 || value ? (
......@@ -86,8 +86,8 @@ const Details = (props) => {
<pre className={col ? "" : styles.one}>{value}</pre>
</Tooltip>
) : (
<div>-</div>
);
<div>-</div>
);
} else if (type == "file") {
return (
<div style={{ display: "flex", flexFlow: "row wrap", width: "100%" }}>
......@@ -113,24 +113,37 @@ const Details = (props) => {
);
})
) : (
"-"
)}
"-"
)}
</div>
);
} else if (type == "img") {
return (
<div style={{ display: "flex", flexFlow: "row wrap" }}>
{
value ?
Array.isArray(value) && value.length > 0 ?
value?.map(el => {
return <Image style={{ margin: '0 10px 0 0' }} src={el?.url} width={30} height={30} key={el?.uid}></Image>
})
:
<Image style={{ margin: '0 10px 0 0' }} src={value} width={itemData.width ?? 30} height={itemData.height ?? 30}></Image>
:
"-"
}
{value ? (
Array.isArray(value) && value.length > 0 ? (
value?.map((el) => {
return (
<Image
style={{ margin: "0 10px 0 0" }}
src={el?.url}
width={30}
height={30}
key={el?.uid}
></Image>
);
})
) : (
<Image
style={{ margin: "0 10px 0 0" }}
src={value}
width={itemData.width ?? 30}
height={itemData.height ?? 30}
></Image>
)
) : (
"-"
)}
</div>
);
} else if (type == "table") {
......@@ -187,8 +200,6 @@ const Details = (props) => {
style={{
flexShrink: 0,
display: `${it.title ? "block" : "none"}`,
textAlign: "right",
width: 126,
}}
>
{it.title}
......
......@@ -375,3 +375,8 @@ table {
display: flex !important;
min-width: 210px !important;
}
#large {
*{
font-size: 22px !important;
}
}
\ No newline at end of file
......@@ -725,7 +725,7 @@ const one = {
noshow: "100%",
},
{
title: "工单二维码",
title: "工单条形码",
noshow: true,
key: "qrCodeUrl",
type: "img",
......
......@@ -41,8 +41,9 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
style={{
textAlign: "center",
width: "100%",
paddingTop: 12,
paddingTop: 18,
paddingBottom: 16,
fontSize: 32,
}}
>
入库工单
......@@ -51,8 +52,8 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
style={{
position: "absolute",
right: 36,
top:36,
width: 120,
top: 36,
width: 300,
height: "auto",
}}
src={data?.qrCodeUrl}
......@@ -72,7 +73,7 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
marginRight: "1%",
marginBottom: 10,
padding: "4px",
fontSize: 16,
fontSize: 20,
overflow: "hidden",
}}
>
......@@ -82,10 +83,11 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
);
})}
</div>
<p style={{ margin: 0, padding: "4px 2%", fontSize: 18 }}>
<b>{totalCard && totalCard[1].cardTitle}</b>
</p>
<div style={{ margin: 0, padding: "4px 2%", fontSize: 18 }}>
<div style={{ padding: "4px 0", position: "relative" }} id="large">
<div style={{ position: "absolute", top: 0, left: 0 ,zIndex:999,left:"2%",top:16}}>
<b>{totalCard && totalCard[1].cardTitle}</b>
</div>
<AutoTable
dataSource={data?.materialList}
x="96%"
......@@ -100,7 +102,7 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
search: false,
render: (dom, row) => {
return (
(row.materieCode ?? "") + " - " + (row.materieName ?? "")
(row.materieCode ?? " ") + " - " + (row.materieName ?? "")
);
},
},
......@@ -134,6 +136,7 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
search: false,
},
]}
bordered={true}
></AutoTable>
</div>
</div>
......
......@@ -689,7 +689,7 @@ const one = {
noshow: "100%",
},
{
title: "工单二维码",
title: "工单条形码",
key: "qrCodeUrl",
type: "img",
noshow: true,
......
......@@ -41,8 +41,9 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
style={{
textAlign: "center",
width: "100%",
paddingTop: 12,
paddingTop: 18,
paddingBottom: 16,
fontSize: 32,
}}
>
出库工单
......@@ -51,15 +52,22 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
style={{
position: "absolute",
right: 36,
top:36,
width: 120,
top: 28,
width: 300,
height: "auto",
}}
src={data?.qrCodeUrl}
alt=""
/>
<div style={{ display: "flex", flexWrap: "wrap", paddingLeft: "2%" }}>
<div
style={{
display: "flex",
flexWrap: "wrap",
paddingLeft: "2%",
marginTop: 24,
}}
>
{totalCard &&
totalCard[0].itemData
.filter((it) => !(it.noshow === true))
......@@ -72,7 +80,7 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
marginRight: "1%",
marginBottom: 10,
padding: "4px",
fontSize: 16,
fontSize: 20,
overflow: "hidden",
}}
>
......@@ -82,10 +90,19 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
);
})}
</div>
<p style={{ margin: 0, padding: "4px 2%", fontSize: 18 }}>
<b>{totalCard && totalCard[1].cardTitle}</b>
</p>
<div style={{ margin: 0, padding: "4px 2%", fontSize: 18 }}>
<div style={{ padding: "4px 0", position: "relative" }} id="large">
<div
style={{
position: "absolute",
top: 0,
left: 0,
zIndex: 999,
left: "2%",
top: 16,
}}
>
<b>{totalCard && totalCard[1].cardTitle}</b>
</div>
<AutoTable
dataSource={data?.materialList}
x="96%"
......@@ -115,8 +132,10 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
dataIndex: "productionUnitName",
key: "productionUnitName",
search: false,
width: 60,
},
]}
bordered={true}
></AutoTable>
</div>
</div>
......
......@@ -16,7 +16,7 @@ import {
Typography,
} from "antd";
import { connect, useRequest } from "umi";
import AutoTable from "@/components/AutoTable";
import AutoTable from "@/components/Tableform/mtable";
import getPrem from "@/utils/getPrem"; //权限判断fn
import InitForm from "@/components/InitForm";
import { doFetch } from "@/utils/doFetch";
......@@ -375,6 +375,7 @@ const Formpage = (props) => {
}
},
});
let extrarender = [
<Button
size={"middle"}
......
This diff is collapsed.
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