Commit 1c49e391 authored by krysent's avatar krysent

new

parent 9d98a45c
...@@ -63,6 +63,11 @@ export default [ ...@@ -63,6 +63,11 @@ export default [
name: "出入库记录", name: "出入库记录",
component: "./historystore/Histore", component: "./historystore/Histore",
}, },
{
path: "/wms/task",
name: "任务单管理",
component: "./Task",
},
{ {
component: "./404", component: "./404",
}, },
......
This diff is collapsed.
This diff is collapsed.
.sitelayout {
min-height: calc(100vh - 98px) !important;
.sitelayoutbackground {
background: #fff;
}
}
.title{
margin: 0px;
}
\ No newline at end of file
import { doFetch } from "@/utils/doFetch";
import React, {
useState,
useImperativeHandle,
forwardRef,
useRef,
} from "react";
import { useEffect } from "react";
import { ScrollBoard } from "@jiaminghi/data-view-react";
import { useWindowSize } from "@/utils/windowsize";
const pageStyle = `
@media all {
.page-break {
display: none;
}
}
@media print {
html, body {
height: initial !important;
overflow: initial !important;
position:relative;
-webkit-print-color-adjust: exact;
word-break: break-all;
}
}
@media print {
.page-break {
margin-top:0;
display: block;
page-break-before: auto;
}
}
@media print {
.page-noprint {
display: none !important;
}
}
@page {
size: auto;
margin: 0px;
}
`;
let columns = [
{
title: "物料编码 - 名称",
dataIndex: "materieName",
key: "materieName",
search: false,
render: (dom, row) => {
return (row.materieCode ?? "") + " - " + (row.materieName ?? "");
},
},
{
title: "出库数量",
dataIndex: "outstroeNum",
key: "outstroeNum",
search: false,
},
{
title: "库存单位",
dataIndex: "productionUnitName",
key: "productionUnitName",
search: false,
width: 60,
},
];
function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
console.log(totalCard);
let printRef = useRef();
const [data, setdata] = useState({});
useImperativeHandle(ref, () => ({
dom: printRef,
}));
useEffect(() => {
if (val == "detail") {
doFetch({ url: totalPath, params: totalParams }).then((res) => {
if (res.code == "0000") {
setdata(res?.data?.data);
}
});
} else {
}
}, [val]);
let datas = data?.materialList
? data?.materialList.map((it) => {
return columns.map((item) => {
if (item.render) {
return item.render(it, it);
} else {
return it[item.dataIndex];
}
});
})
: [];
return (
<>
<style type="text/css" media="print">
{pageStyle}
</style>
{val == "detail" && (
<div
ref={printRef}
style={{
width: "100%",
minHeight: "100%",
overflow: "inherit",
position: "relative",
}}
>
<div
style={{
display: "flex",
justifyContent: "space-between",
alignItems: "center",
padding: "0 2%",
paddingBottom: 12,
}}
>
<h1
style={{
width: "100%",
fontSize: 40,
marginTop: "-6px",
}}
>
出库工单
</h1>
<img
style={{
width: 300,
height: "auto",
}}
src={data?.qrCodeUrl}
alt=""
/>
</div>
<div
style={{
display: "flex",
flexWrap: "wrap",
paddingLeft: "2%",
marginTop: 24,
}}
>
{totalCard &&
totalCard[0].itemData
.filter((it) => !(it.noshow === true))
.map((it) => {
return (
<div
style={{
width: it.noshow ?? "32%",
backgroundColor: "#f9f9f9",
marginRight: "1%",
marginBottom: 10,
padding: "4px",
fontSize: 20,
overflow: "hidden",
}}
>
<b>{it.title}: </b>
<span>{data[it.key] || "-"}</span>
</div>
);
})}
</div>
<div
style={{
padding: "4px 2%",
position: "relative",
width: "100%",
overflow: "hidden",
}}
id="large"
>
<div
style={{
marginBottom: 18,
}}
>
<b>{totalCard && totalCard[1].cardTitle}</b>
</div>
<ScrollBoard
config={{
header: columns.map((it) => it.title),
data: datas,
rowNum: datas.length,
hoverPause: false,
}}
/>
</div>
</div>
)}
</>
);
}
export default forwardRef(PrintDom);
...@@ -354,7 +354,42 @@ function Outstore(props) { ...@@ -354,7 +354,42 @@ function Outstore(props) {
const tableprops = { const tableprops = {
...props, ...props,
// pageextra:
// activeTabKey == "1" ? (
// <Dropdown
// placement="bottomRight"
// overlay={
// <Menu
// onClick={(e) => {
// setdrawprops((s) => ({
// ...s,
// visible: true,
// title: "新增" + itemz[e.key],
// fields: defaultFields[e.key],
// outstoreType: keytoval[e.key],
// val: "add", //类型
// extra: null,
// }));
// }}
// items={items}
// />
// }
// >
// <Button type="primary">新增</Button>
// </Dropdown>
// ) : (
// "none"
// ),
tabList: [
{
tab: "未完成",
key: "1",
},
{
tab: "已完成",
key: "2",
},
],
activeTabKey, activeTabKey,
onTabChange, onTabChange,
columns, columns,
......
...@@ -260,170 +260,168 @@ const userDetails = [ ...@@ -260,170 +260,168 @@ const userDetails = [
}, },
]; ];
const deviceprovideDetails = [
const deviceprovideDetails = [ //设备供应商详情 //设备供应商详情
{ {
cardTitle: '基本信息', cardTitle: "基本信息",
itemData: [ itemData: [
{ {
"title": "供应商编号", title: "供应商编号",
"key": "supplierNo", key: "supplierNo",
}, },
{ {
"title": "供应商名称", title: "供应商名称",
"key": "supplierName" key: "supplierName",
}, },
{ {
"title": "公司官网", title: "公司官网",
"key": "officialWebsite" key: "officialWebsite",
}, },
{ {
"title": "联系电话", title: "联系电话",
"key": "telephone" key: "telephone",
}, },
{ {
"title": "邮箱", title: "邮箱",
"key": "email" key: "email",
}, },
{ {
"title": "地址", title: "地址",
"key": "address" key: "address",
}, },
{ {
"title": "评分", title: "评分",
"key": "score", key: "score",
type: "rate", type: "rate",
allowHalf: true, allowHalf: true,
disabled: true disabled: true,
}, },
{ {
"title": "备注", title: "备注",
"key": "remark", key: "remark",
col: { span: 24 } col: { span: 24 },
} },
] ],
}, },
{ {
cardTitle: '联系人', cardTitle: "联系人",
itemData: [ itemData: [
{ {
"key": "supplierUserList", key: "supplierUserList",
type: "table", type: "table",
col: { span: 24 }, col: { span: 24 },
columns: [ columns: [
{ {
"title": "联系人姓名", title: "联系人姓名",
"dataIndex": "userName", dataIndex: "userName",
"key": "userName", key: "userName",
"search": false search: false,
}, },
{ {
"title": "联系电话", title: "联系电话",
"dataIndex": "telephone", dataIndex: "telephone",
"key": "telephone", key: "telephone",
"search": false search: false,
}, },
{ {
"title": "邮箱", title: "邮箱",
"dataIndex": "email", dataIndex: "email",
"key": "email", key: "email",
"search": false search: false,
}, },
{ {
"title": "职位", title: "职位",
"dataIndex": "title", dataIndex: "title",
"key": "title", key: "title",
"search": false search: false,
}, },
] ],
} },
] ],
}, },
]; ];
const usercusDetails = [
//设备客户详情
const usercusDetails = [ //设备客户详情
{ {
cardTitle: '基本信息', cardTitle: "基本信息",
itemData: [ itemData: [
{ {
"title": "客户编号", title: "客户编号",
"key": "customerNo", key: "customerNo",
}, },
{ {
"title": "客户名称", title: "客户名称",
"key": "customerName" key: "customerName",
}, },
{ {
"title": "公司官网", title: "公司官网",
"key": "officialWebsite" key: "officialWebsite",
}, },
{ {
"title": "联系电话", title: "联系电话",
"key": "telephone" key: "telephone",
}, },
{ {
"title": "邮箱", title: "邮箱",
"key": "email" key: "email",
}, },
{ {
"title": "地址", title: "地址",
"key": "address" key: "address",
}, },
{ {
"title": "评分", title: "评分",
"key": "score", key: "score",
type: "rate", type: "rate",
allowHalf: true, allowHalf: true,
disabled: true disabled: true,
}, },
{ {
"title": "备注", title: "备注",
"key": "remark", key: "remark",
col: { span: 24 } col: { span: 24 },
} },
] ],
}, },
{ {
cardTitle: '联系人', cardTitle: "联系人",
itemData: [ itemData: [
{ {
"key": "customerUserList", key: "customerUserList",
type: "table", type: "table",
col: { span: 24 }, col: { span: 24 },
columns: [ columns: [
{ {
"title": "联系人姓名", title: "联系人姓名",
"dataIndex": "userName", dataIndex: "userName",
"key": "userName", key: "userName",
"search": false search: false,
}, },
{ {
"title": "联系电话", title: "联系电话",
"dataIndex": "telephone", dataIndex: "telephone",
"key": "telephone", key: "telephone",
"search": false search: false,
}, },
{ {
"title": "邮箱", title: "邮箱",
"dataIndex": "email", dataIndex: "email",
"key": "email", key: "email",
"search": false search: false,
}, },
{ {
"title": "职位", title: "职位",
"dataIndex": "title", dataIndex: "title",
"key": "title", key: "title",
"search": false search: false,
}, },
] ],
} },
] ],
}, },
]; ];
const userCheckDetails = [ const userCheckDetails = [
//个人详情-----待审核 //个人详情-----待审核
{ {
...@@ -706,28 +704,24 @@ const materielDetail = [ ...@@ -706,28 +704,24 @@ const materielDetail = [
key: "materieName", key: "materieName",
}, },
{ {
title: "物料管控", title: "物料类型",
key: "materieControlName", key: "materieTypeName",
},
{
title: "库存下限",
key: "inventoryMin",
}, },
{ {
title: "库存上限", title: "管控方式",
key: "inventoryMax", key: "materieControlName",
}, },
{ {
title: "库存单位", title: "铁损",
key: "productionUnitName", key: "ironLoss",
}, },
{ {
title: "保质期", title: "片厚",
key: "newqualityGuaranteePeriod", key: "sheetThickness",
}, },
{ {
title: "发料类型", title: "默认库区",
key: "issueTypeName", key: "storeAreaName",
}, },
], ],
}, },
...@@ -1230,5 +1224,5 @@ export { ...@@ -1230,5 +1224,5 @@ export {
dispatchorderDetail, dispatchorderDetail,
labeltemplateDetail, labeltemplateDetail,
deviceprovideDetails, deviceprovideDetails,
usercusDetails usercusDetails,
}; };
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