Commit 673a770f authored by krysent's avatar krysent

出入库

parent f9f7027d
......@@ -38,9 +38,14 @@ export default [
name: "入库管理",
component: "./insertstore/Instore",
},
{
path: "/wms/otherInstore",
name: "其他入库管理",
component: "./insertstore/Otherinstore",
},
{
path: "/wms/otherOutstore",
name: "其他出库",
name: "其他出库管理",
component: "./outsetstore/Otheroutstore",
},
{
......
......@@ -78,17 +78,8 @@ function getLodop(oOBJECT, oEMBED) {
return LODOP;
} catch (err) {
alert("getLodop出错:" + err);
// alert(
// `getLodop出错,<a href="http://192.168.40.2/staticfile/group1/M00/00/00/CLodop_Setup_for_Win32NT.exe">点击此处下载打印插件</a>`
// );
}
}
/*
* 佛曰:
* 写字楼里写字间,写字间里程序员;
* 程序人员写程序,又拿程序换酒钱
* 酒醒只在网上坐,酒醉还来网下眠
* 酒醉酒醒日复日,网上网下年复年
* 但愿老死电脑间,不愿鞠躬老板前
* 奔驰宝马贵者趣,公交自行程序员
* 别人笑我忒疯癫,我笑自己命太贱;
* 不见满街漂亮妹,哪个归得程序员?
*/
......@@ -9,11 +9,12 @@ const Footer = () => {
<DefaultFooter
copyright={`${currentYear} 江苏南高智能装备创新中心出品`}
links={[
// {
// key: "Ant Design Pro",
// title: "JiangSuNanGao",
// blankTarget: true,
// },
{
key: "download",
title: "插件下载",
blankTarget: true,
href: 'http://192.168.40.2/staticfile/group1/M00/00/00/CLodop_Setup_for_Win32NT.exe',
},
// {
// key: "github",
// title: <GithubOutlined />,
......
......@@ -16,7 +16,7 @@ export function getColumns(setDrawer, formRef) {
if (value) {
doFetch({
url: "/ngic-workmanship/pmMaterie/queryById",
params: { id: value },
params: { materieId: value },
}).then((res) => {
console.log(res);
const data = res?.data?.data;
......
......@@ -118,26 +118,6 @@ function Outstore(props) {
title: "物料名称",
dataIndex: "materieName",
key: "materieName",
valueType: "select",
options: [
{
label: "生产领料出库",
value: "1",
},
{
label: "销售出库",
value: "2",
},
{
label: "报废出库",
value: "3",
},
{
label: "其他出库",
value: "4",
},
],
},
{
title: "规格型号",
......@@ -179,7 +159,26 @@ function Outstore(props) {
{
title: "任务类型",
dataIndex: "taskTypeName",
key: "taskTypeName",
key: "taskType",
valueType: "select",
options: [
{
label: "生产叫料单",
value: "1",
},
{
label: "来料入库单",
value: "2",
},
{
label: "生产退料单",
value: "3",
},
{
label: "移库",
value: "4",
},
],
},
{
title: "单据状态",
......@@ -241,6 +240,7 @@ function Outstore(props) {
title: "任务单号",
dataIndex: "taskNo",
key: "taskNo",
search: false,
// render: (dom, record) => {
// return (
// <a
......@@ -280,30 +280,13 @@ function Outstore(props) {
title: "物料名称",
dataIndex: "materieName",
key: "materieName",
valueType: "select",
options: [
{
label: "生产领料出库",
value: "1",
},
{
label: "销售出库",
value: "2",
},
{
label: "报废出库",
value: "3",
},
{
label: "其他出库",
value: "4",
},
],
search: false,
},
{
title: "规格型号",
dataIndex: "specificationModel",
key: "specificationModel",
search: false,
fieldProps: {
allowClear: true,
showSearch: true,
......@@ -322,27 +305,30 @@ function Outstore(props) {
title: "批次号",
dataIndex: "materieControlNo",
key: "materieControlNo",
search: false,
},
{
title: "来源库位",
dataIndex: "sourceStorePositionName",
key: "sourceStorePositionName",
search: false,
},
{
title: "目标库位",
dataIndex: "targetStorePositionName",
key: "targetStorePositionName",
search: false,
},
{
title: "任务类型",
dataIndex: "taskTypeName",
key: "taskTypeName",
search: false,
},
{
title: "单据状态",
dataIndex: "statusName",
key: "statusName",
search: false,
valueType: "select",
options: [
{
......@@ -367,6 +353,7 @@ function Outstore(props) {
title: "下发时间",
dataIndex: "distributeTime",
key: "distributeTime",
search: false,
},
];
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -53,28 +53,13 @@ let columns = [
key: "materieName",
search: false,
render: (dom, row) => {
return (row.materieCode ?? " ") + " - " + (row.materieName ?? "");
return (row.materieCode ?? "") + " - " + (row.materieName ?? "");
},
},
{
title: "供应商编号 - 名称",
dataIndex: "supplierNo",
key: "supplierNo",
search: false,
render: (dom, row) => {
return (row.supplierNo ?? "") + " - " + (row.supplierName ?? "");
},
},
{
title: "批次号/SN号",
dataIndex: "materieControlNo",
key: "materieControlNo",
search: false,
},
{
title: "入库数量",
dataIndex: "instroeNum",
key: "instroeNum",
title: "出库数量",
dataIndex: "outstroeNum",
key: "outstroeNum",
search: false,
},
{
......@@ -82,10 +67,12 @@ let columns = [
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, () => ({
......@@ -95,7 +82,9 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
useEffect(() => {
if (val == "detail") {
doFetch({ url: totalPath, params: totalParams }).then((res) => {
setdata(res?.data?.data);
if (res.code == "0000") {
setdata(res?.data?.data);
}
});
} else {
}
......@@ -141,9 +130,10 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
style={{
width: "100%",
fontSize: 40,
marginTop: "-6px",
}}
>
库工单
库工单
</h1>
<img
style={{
......@@ -154,12 +144,12 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
alt=""
/>
</div>
<div
style={{
display: "flex",
flexWrap: "wrap",
paddingLeft: "2%",
marginTop: 24,
}}
>
{totalCard &&
......@@ -175,7 +165,7 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
marginBottom: 10,
padding: "4px",
fontSize: 20,
overflow: "inherit",
overflow: "hidden",
}}
>
<b>{it.title}: </b>
......@@ -184,7 +174,6 @@ function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
);
})}
</div>
<div
style={{
padding: "4px 2%",
......
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: "supplierNo",
key: "supplierNo",
search: false,
render: (dom, row) => {
return (row.supplierNo ?? "") + " - " + (row.supplierName ?? "");
},
},
{
title: "批次号/SN号",
dataIndex: "materieControlNo",
key: "materieControlNo",
search: false,
},
{
title: "入库数量",
dataIndex: "instroeNum",
key: "instroeNum",
search: false,
},
{
title: "库存单位",
dataIndex: "productionUnitName",
key: "productionUnitName",
search: false,
},
];
function PrintDom({ totalPath, val, totalParams, totalCard }, ref) {
let printRef = useRef();
const [data, setdata] = useState({});
useImperativeHandle(ref, () => ({
dom: printRef,
}));
useEffect(() => {
if (val == "detail") {
doFetch({ url: totalPath, params: totalParams }).then((res) => {
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,
}}
>
入库工单
</h1>
<img
style={{
width: 300,
height: "auto",
}}
src={data?.qrCodeUrl}
alt=""
/>
</div>
<div
style={{
display: "flex",
flexWrap: "wrap",
paddingLeft: "2%",
}}
>
{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: "inherit",
}}
>
<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);
......@@ -66,13 +66,6 @@ const defaultFields = {
params: {},
},
},
businessNo: {
value: null,
type: "input",
title: "相关单号",
name: ["businessNo"],
required: false,
},
remark: {
value: null,
type: "textarea",
......@@ -95,13 +88,13 @@ const defaultFields = {
//根据url接口 改变某个value
database: (params) =>
doFetch({
url: "/ngic-workmanship/wmsMaterieStockStore/queryStoreOne",
url: "/ngic-workmanship/pmMaterie/queryById",
params,
}),
params: { materieId: "linked" },
effectresult: {
productionUnit: "productionUnit", //key 为列表更新值 value为response 返回值
productionUnitName: "productionUnitName",
specificationModel: "specificationModel", //key 为列表更新值 value为response 返回值
ironLoss: "ironLoss",
usableNum: "usableNum",
outstroeNum: "outstroeNum",
},
......@@ -117,13 +110,6 @@ const defaultFields = {
dataIndex: "materieId",
key: "materieId",
valueType: "select",
request: async () => {
let res = await doFetch({
url: "/ngic-workmanship/pmMaterie/selectboxByStoreId",
params: {storeId:formRef.current},
});
return res?.data?.dataList;
},
fieldProps: {
allowClear: true,
showSearch: true,
......@@ -133,11 +119,36 @@ const defaultFields = {
rules: [{ required: true, message: "此项为必填项" }],
};
},
editable: true,
},
{
title: <span>规格型号</span>,
dataIndex: "specificationModel",
key: "specificationModel",
readonly: "specificationModel",
},
{
title: "铁损",
dataIndex: "ironLoss",
key: "ironLoss",
readonly: "ironLoss",
},
{
title: "片厚",
dataIndex: "sheetThickness",
key: "sheetThickness",
// readonly: "sheetThickness",
},
{
title: "牌号",
dataIndex: "shopSign",
key: "shopSign",
readonly: "shopSign",
},
{
title: (
<span>
出库数量 <b style={{ color: "red" }}>*</b>
出库数量<b style={{ color: "red" }}>*</b>
</span>
),
dataIndex: "outstroeNum",
......@@ -148,9 +159,6 @@ const defaultFields = {
};
},
valueType: "digit",
fieldProps: {
precision: 3,
},
},
{
title: "可用库存",
......@@ -164,6 +172,7 @@ const defaultFields = {
key: "productionUnitName",
readonly: "productionUnitName",
},
{
title: "操作",
valueType: "option",
......@@ -645,6 +654,7 @@ function Outstore(props) {
dataIndex: "outstoreTypeName",
key: "outstoreType",
valueType: "select",
search: false,
options: [
{
label: "生产领料出库",
......@@ -667,6 +677,7 @@ function Outstore(props) {
{
title: "出库仓库",
dataIndex: "storeName",
search: false,
key: "storeId",
fieldProps: {
allowClear: true,
......@@ -682,11 +693,6 @@ function Outstore(props) {
},
valueType: "select",
},
{
title: "相关单号",
dataIndex: "businessNo",
key: "businessNo",
},
{
title: "备注",
dataIndex: "remark",
......@@ -820,6 +826,7 @@ function Outstore(props) {
{
title: "出库类型",
dataIndex: "outstoreTypeName",
search: false,
key: "outstoreType",
valueType: "select",
options: [
......@@ -843,6 +850,7 @@ function Outstore(props) {
},
{
title: "出库仓库",
search: false,
dataIndex: "storeName",
key: "storeId",
fieldProps: {
......@@ -859,11 +867,7 @@ function Outstore(props) {
},
valueType: "select",
},
{
title: "相关单号",
dataIndex: "businessNo",
key: "businessNo",
},
{
title: "备注",
dataIndex: "remark",
......@@ -887,6 +891,7 @@ function Outstore(props) {
{
title: "完成时间",
dataIndex: "finishTime",
search: false,
key: "finishTime",
valueType: "dateRange",
formItemProps: {
......@@ -896,18 +901,8 @@ function Outstore(props) {
{
title: "状态",
dataIndex: "statusName",
search: false,
key: "status",
valueType: "select",
options: [
{
label: "已下架",
value: "2",
},
{
label: "已关单",
value: "4",
},
],
},
];
}
......@@ -974,9 +969,10 @@ function Outstore(props) {
if (drawprops.val == "add") {
let newfileds = JSON.parse(JSON.stringify(value));
newfileds.materialList = newfileds?.materialList?.map((it) => {
delete it.usableNum;
delete it.id;
return it;
return {
materieId: it?.materieId,
outstroeNum: it?.outstroeNum,
};
});
let res = await doFetch({
url: "/ngic-workmanship/wmsMaterieOutstore/saveOutStore",
......@@ -1005,15 +1001,19 @@ function Outstore(props) {
//根据url接口 改变某个value
database: (params) =>
doFetch({
url: "/ngic-workmanship/wmsMaterieStockStore/queryStoreOne",
url: "/ngic-workmanship/pmMaterie/queryById",
params,
}),
params: { materieId: "linked", storeId: changedValues[i] },
params: { materieId: "linked" },
effectresult: {
productionUnit: "productionUnit", //key 为列表更新值 value为response 返回值
productionUnitName: "productionUnitName",
specificationModel: "specificationModel", //key 为列表更新值 value为response 返回值
ironLoss: "ironLoss",
usableNum: "usableNum",
outstroeNum: "outstroeNum",
sheetThickness: "sheetThickness",
shopSign: "shopSign",
usableNum: "usableNum",
productionUnitName: "productionUnitName",
},
},
};
......@@ -1039,10 +1039,34 @@ function Outstore(props) {
},
editable: true,
},
{
title: <span>规格型号</span>,
dataIndex: "specificationModel",
key: "specificationModel",
readonly: "specificationModel",
},
{
title: "铁损",
dataIndex: "ironLoss",
key: "ironLoss",
readonly: "ironLoss",
},
{
title: "片厚",
dataIndex: "sheetThickness",
key: "sheetThickness",
readonly: "sheetThickness",
},
{
title: "牌号",
dataIndex: "shopSign",
key: "shopSign",
readonly: "shopSign",
},
{
title: (
<span>
出库数量 <b style={{ color: "red" }}>*</b>
出库数量<b style={{ color: "red" }}>*</b>
</span>
),
dataIndex: "outstroeNum",
......@@ -1053,10 +1077,6 @@ function Outstore(props) {
};
},
valueType: "digit",
fieldProps: {
precision: 3,
},
editable: true,
},
{
title: "可用库存",
......@@ -1070,6 +1090,7 @@ function Outstore(props) {
key: "productionUnitName",
readonly: "productionUnitName",
},
{
title: "操作",
valueType: "option",
......@@ -1085,6 +1106,7 @@ function Outstore(props) {
let newfields = {
...fields,
};
console.log("123123123131", newfields);
return {
...s,
fields: newfields,
......
......@@ -6,7 +6,7 @@ import {
CloseOutlined,
} from "@ant-design/icons";
import { Alert, message, Tabs, Row, Col, Button, Input } from "antd";
import React, { useState, useRef } from "react";
import React, { useState, useRef, useEffect, useLayoutEffect } from "react";
import {
ProFormCaptcha,
ProFormCheckbox,
......@@ -38,7 +38,6 @@ import {
import { doFetch } from "@/utils/doFetch";
import { ProDescriptions } from "@ant-design/pro-components";
const { Search } = Input;
const { TabPane } = Tabs;
......@@ -92,6 +91,20 @@ const Login = () => {
const { query } = history.location;
const { redirect } = query;
history.push(redirect || "/");
try {
var LODOP = window.getLodop();
if (LODOP.VERSION) {
if (LODOP.CVERSION)
alert(
"当前有WEB打印服务C-Lodop可用!\n C-Lodop版本:" +
LODOP.CVERSION +
"(内含Lodop" +
LODOP.VERSION +
")"
);
else alert("本机已成功安装了Lodop控件!\n 版本号:" + LODOP.VERSION);
}
} catch (err) {}
return;
}
} catch (error) {
......@@ -614,7 +627,6 @@ const Login = () => {
</Link> */}
</div>
</LoginForm>
</div>
<Footer></Footer>
</div>
......
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