Commit af55289a authored by krysent's avatar krysent

new

parent 85ecd57b
...@@ -124,12 +124,17 @@ const Station = (props) => { ...@@ -124,12 +124,17 @@ const Station = (props) => {
cancelText: "取消", cancelText: "取消",
onOk() { onOk() {
formRef?.current?.validateFields().then((formData) => { formRef?.current?.validateFields().then((formData) => {
start("/ngic-workmanship/wmsMaterieLabel/save", formData); start("/ngic-workmanship/wmsMaterieLabel/save", formData).then(
setDrawer((v) => ({ (res) => {
...v, console.log(res);
visible: false, setDrawer((v) => ({
})); ...v,
message.success("保存成功!", 2); visible: false,
}));
message.success("保存成功!", 2);
reload();
}
);
}); });
}, },
onCancel() { onCancel() {
...@@ -154,8 +159,8 @@ const Station = (props) => { ...@@ -154,8 +159,8 @@ const Station = (props) => {
} }
}); });
} else { } else {
message.destroy() message.destroy();
message.warning("请添加列表数据!",2); message.warning("请添加列表数据!", 2);
} }
}); });
} else { } else {
......
...@@ -281,6 +281,7 @@ const Materiel = (props) => { ...@@ -281,6 +281,7 @@ const Materiel = (props) => {
url: "/ngic-workmanship/pmMaterieChar/queryCommonList", url: "/ngic-workmanship/pmMaterieChar/queryCommonList",
params: {}, params: {},
}).then((res) => { }).then((res) => {
console.log("第一次获取的", res?.data?.dataList);
setdefaultSpecificFileds(res?.data?.dataList); setdefaultSpecificFileds(res?.data?.dataList);
}); });
}, []); }, []);
...@@ -366,10 +367,13 @@ const Materiel = (props) => { ...@@ -366,10 +367,13 @@ const Materiel = (props) => {
formRef formRef
.validateFields() .validateFields()
.then((firstValues) => { .then((firstValues) => {
console.log(firstValues);
formRefs formRefs
.validateFields() .validateFields()
.then((secondFields) => { .then((secondFields) => {
console.log(secondFields);
let secondFieldsKeys = Object.keys(secondFields); let secondFieldsKeys = Object.keys(secondFields);
console.log("defaultSpecificFileds", defaultSpecificFileds);
let materieCharList = defaultSpecificFileds.map((it) => { let materieCharList = defaultSpecificFileds.map((it) => {
if (secondFieldsKeys.indexOf(it.fieldsKey) != -1) { if (secondFieldsKeys.indexOf(it.fieldsKey) != -1) {
it.fieldRealValue = secondFields[it.fieldsKey]; it.fieldRealValue = secondFields[it.fieldsKey];
...@@ -451,6 +455,7 @@ const Materiel = (props) => { ...@@ -451,6 +455,7 @@ const Materiel = (props) => {
let data = res?.data?.dataList, let data = res?.data?.dataList,
otherFields = formatFieds(data, "common")?.obj, otherFields = formatFieds(data, "common")?.obj,
newData = formatFieds(data, "common")?.data; newData = formatFieds(data, "common")?.data;
console.log("点击新增获取的,", data);
for (let i in defaultFields) { for (let i in defaultFields) {
defaultFields[i].value = null; defaultFields[i].value = null;
defaultFields[i].disabled = false; defaultFields[i].disabled = false;
...@@ -559,7 +564,7 @@ const Materiel = (props) => { ...@@ -559,7 +564,7 @@ const Materiel = (props) => {
/> />
</div> </div>
</AutoTable> </AutoTable>
<Drawer <Drawer
title={iftype.title} title={iftype.title}
visible={vs} visible={vs}
......
...@@ -76,8 +76,8 @@ function Instore(props) { ...@@ -76,8 +76,8 @@ function Instore(props) {
}, },
{ {
title: "库位名称", title: "库位名称",
dataIndex: "stockNum", dataIndex: "storePositionName",
key: "stockNum", key: "storePositionName",
search: false, search: false,
}, },
{ {
......
...@@ -99,9 +99,10 @@ const EditUpload = ({ record, fid, storeId }) => { ...@@ -99,9 +99,10 @@ const EditUpload = ({ record, fid, storeId }) => {
search: false, search: false,
valueType: "select", valueType: "select",
request: async (params) => { request: async (params) => {
let newParams = JSON.parse(JSON.stringify(params));
let res = await doFetch({ let res = await doFetch({
url: "/ngic-auth/sysStorePosition/queryUseAbleSelection", url: "/ngic-auth/sysStorePosition/queryUseAbleSelection",
params: { storeId: params.storeId }, params: { storeId: newParams.storeId },
}); });
return res?.data?.dataList; return res?.data?.dataList;
}, },
...@@ -182,600 +183,620 @@ const EditUpload = ({ record, fid, storeId }) => { ...@@ -182,600 +183,620 @@ const EditUpload = ({ record, fid, storeId }) => {
); );
}; };
const defaultFields = { function Instore(props) {
four: { const { initialState, setInitialState } = useModel("@@initialState");
materieInstoreNo: { const [activeTabKey, onTabChange] = useState("1");
value: null, const [selectKeys, setSelectKeys] = useState([]);
type: "input",
title: "入库单号", let [drawprops, setdrawprops] = useState({
name: ["materieInstoreNo"], title: "",
required: false, visible: false,
placeholder: "不填写系统自动生成", onClose: () => {
}, setdrawprops((s) => ({
storeId: { ...s,
value: null, visible: false,
type: "select", fields: {},
title: "入库仓库", }));
name: ["storeId"],
required: true,
options: {
database: () =>
doFetch({
url: "/ngic-auth/sysStore/selectionBoxAll",
params: {},
}),
params: {},
},
},
remark: {
value: null,
type: "textarea",
title: "备注",
name: ["remark"],
required: false,
col: {
span: 24,
}, },
}, fields: {},
materialList: { width: 1200,
value: [], }),
title: "物料信息", actionRef = useRef(),
type: "table", ChildRef = null,
col: { span: 24 }, printRef = useRef(),
name: ["materialList"], mutiPrintRef = useRef();
required: true,
linkconfig: { //操作完成后刷新
urlchangeval: { function reload() {
//根据url接口 改变某个value actionRef.current.reload();
database: (params) => ChildRef?.onRefresh();
doFetch({ message.success("操作成功");
url: "/ngic-workmanship/wmsMaterieLabel/queryByLabelId", setdrawprops((s) => ({
params, ...s,
}), visible: false,
params: { labelId: "linked" }, fields: {},
effectresult: { }));
productionUnitName: "productionUnitName", }
materieCode: "materieCode",
supplierId: "supplierId", const handlePrint = useReactToPrint({
supplierName: "supplierName", content: () => printRef.current.dom.current,
width: "width", });
ironLoss: "ironLoss",
sheetThickness: "sheetThickness", const mutiPrint = useReactToPrint({
shopSign: "shopSign", content: () => mutiPrintRef.current.dom.current,
weight: "weight", });
specificationModel: "specificationModel", const defaultFields = useMemo(() => {
}, return {
four: {
materieInstoreNo: {
value: null,
type: "input",
title: "入库单号",
name: ["materieInstoreNo"],
required: false,
placeholder: "不填写系统自动生成",
}, },
}, storeId: {
columns: [ value: null,
{ type: "select",
title: ( title: "入库仓库",
<span> name: ["storeId"],
批次号 <b style={{ color: "red" }}>*</b> required: true,
</span> options: {
), database: () =>
dataIndex: "labelId", doFetch({
key: "labelId", url: "/ngic-auth/sysStore/selectionBoxAll",
valueType: "select", params: {},
width: 220, }),
request: async () => { params: {},
let res = await doFetch({
url: "/ngic-workmanship/wmsMaterieLabel/selectionByStatus",
params: { status: "1" },
});
return res?.data?.dataList;
},
fieldProps: {
allowClear: true,
showSearch: true,
},
formItemProps: () => {
return {
rules: [{ required: true, message: "此项为必填项" }],
};
}, },
}, },
{ remark: {
title: ( value: null,
<span> type: "textarea",
物料编码-名称 <b style={{ color: "red" }}>*</b> title: "备注",
</span> name: ["remark"],
), required: false,
dataIndex: "materieCode", col: {
key: "materieCode", span: 24,
valueType: "select", },
readonly: true,
},
{
title: "规格型号",
dataIndex: "specificationModel",
key: "specificationModel",
readonly: true,
}, },
materialList: {
value: [],
title: "物料信息",
type: "table",
col: { span: 24 },
name: ["materialList"],
required: true,
linkconfig: {
urlchangeval: {
//根据url接口 改变某个value
database: (params) =>
doFetch({
url: "/ngic-workmanship/wmsMaterieLabel/queryByLabelId",
params,
}),
params: { labelId: "linked" },
effectresult: {
productionUnitName: "productionUnitName",
materieCode: "materieCode",
supplierId: "supplierId",
supplierName: "supplierName",
width: "width",
ironLoss: "ironLoss",
sheetThickness: "sheetThickness",
shopSign: "shopSign",
weight: "weight",
specificationModel: "specificationModel",
},
},
},
columns: [
{
title: (
<span>
批次号 <b style={{ color: "red" }}>*</b>
</span>
),
dataIndex: "labelId",
key: "labelId",
valueType: "select",
width: 220,
request: async () => {
let res = await doFetch({
url: "/ngic-workmanship/wmsMaterieLabel/selectionByStatus",
params: { status: "1" },
});
return res?.data?.dataList;
},
fieldProps: {
allowClear: true,
showSearch: true,
},
formItemProps: () => {
return {
rules: [{ required: true, message: "此项为必填项" }],
};
},
},
{
title: (
<span>
物料编码-名称 <b style={{ color: "red" }}>*</b>
</span>
),
dataIndex: "materieCode",
key: "materieCode",
valueType: "select",
readonly: true,
},
{
title: "规格型号",
dataIndex: "specificationModel",
key: "specificationModel",
readonly: true,
},
{ {
title: "供应商", title: "供应商",
dataIndex: "supplierName", dataIndex: "supplierName",
key: "supplierName", key: "supplierName",
readonly: "supplierName", readonly: "supplierName",
}, },
{ {
title: "宽度", title: "宽度",
dataIndex: "width", dataIndex: "width",
key: "width", key: "width",
readonly: "width", readonly: "width",
}, },
{ {
title: "铁损", title: "铁损",
dataIndex: "ironLoss", dataIndex: "ironLoss",
key: "ironLoss", key: "ironLoss",
readonly: "ironLoss", readonly: "ironLoss",
}, },
{ {
title: "片厚", title: "片厚",
dataIndex: "sheetThickness", dataIndex: "sheetThickness",
key: "sheetThickness", key: "sheetThickness",
readonly: "sheetThickness", readonly: "sheetThickness",
}, },
{ {
title: "牌号", title: "牌号",
dataIndex: "shopSign", dataIndex: "shopSign",
key: "shopSign", key: "shopSign",
readonly: "shopSign", readonly: "shopSign",
}, },
{ {
title: "入库数量", title: "入库数量",
dataIndex: "weight", dataIndex: "weight",
key: "weight", key: "weight",
readonly: "weight", readonly: "weight",
}, },
{ {
title: "库存单位", title: "库存单位",
dataIndex: "productionUnitName", dataIndex: "productionUnitName",
key: "productionUnitName", key: "productionUnitName",
readonly: "productionUnitName", readonly: "productionUnitName",
}, },
{ {
title: "操作", title: "操作",
valueType: "option", valueType: "option",
width: 70, width: 70,
render: (text, record, _, action) => [ render: (text, record, _, action) => [
<a key="delete" onClick={() => {}}> <a key="delete" onClick={() => {}}>
删除 删除
</a>, </a>,
],
},
], ],
rowKey: "id",
}, },
],
rowKey: "id",
},
},
detail: (setselected, dom) => ({
totalCard: [
//物料详情
{
cardTitle: "基本信息",
itemData: [
{
title: "入库单号",
key: "materieInstoreNo",
},
{
title: "入库类型",
key: "instoreTypeName",
},
{
title: "入库仓库",
key: "storeName",
},
{
title: "相关单号",
key: "businessNo",
},
{
title: "创建人",
key: "createUserName",
},
{
title: "创建时间",
key: "createTime",
},
{
title: "状态",
key: "statusName",
},
{
title: "完成时间",
key: "finishTime",
},
{
title: "备注",
key: "remark",
noshow: "100%",
},
{
title: "工单条形码",
noshow: true,
key: "qrCodeUrl",
type: "img",
width: 100,
},
],
}, },
{ detail: (setselected, dom) => ({
cardTitle: "物料信息列表", totalCard: [
extraContent: "", //物料详情
itemData: [
{ {
key: "materialList", cardTitle: "基本信息",
type: "table", itemData: [
col: { span: 24 },
columns: [
{ {
title: "物料编码 - 名称", title: "入库单号",
dataIndex: "materieName", key: "materieInstoreNo",
key: "materieName",
search: false,
render: (dom, row) => {
return (
(row.materieCode ?? "") + " - " + (row.materieName ?? "")
);
},
}, },
{ {
title: "供应商编号 - 名称", title: "入库类型",
dataIndex: "supplierNo", key: "instoreTypeName",
key: "supplierNo",
search: false,
render: (dom, row) => {
return (
(row.supplierNo ?? "") + " - " + (row.supplierName ?? "")
);
},
}, },
{ {
title: "批次号/SN号", title: "入库仓库",
dataIndex: "materieControlNo", key: "storeName",
key: "materieControlNo",
search: false,
}, },
{ {
title: "入库数量", title: "相关单号",
dataIndex: "instroeNum", key: "businessNo",
key: "instroeNum",
search: false,
}, },
{ {
title: "未上架数量", title: "创建人",
dataIndex: "remainderNums", key: "createUserName",
key: "remainderNums",
search: false,
}, },
{ {
title: "库存单位", title: "创建时间",
dataIndex: "productionUnitName", key: "createTime",
key: "productionUnitName",
search: false,
},
],
expandable: {
defaultExpandAllRows: true,
expandedRowRender: (record) => (
<Table
style={{ marginLeft: 48 }}
columns={[
{
title: "库位名称",
dataIndex: "storePositionName",
key: "storePositionName",
search: false,
formItemProps: () => {
return {
rules: [{ required: true, message: "此项为必填项" }],
};
},
},
{
title: "上架数量",
dataIndex: "instroeNum",
key: "instroeNum",
search: false,
formItemProps: () => {
return {
rules: [{ required: true, message: "此项为必填项" }],
};
},
},
]}
dataSource={record.uploadList}
pagination={false}
/>
),
},
pagination: "false",
rowKey: "id",
rowSelection: {
onChange: (selectedRowKeys, selectedRows) => {
setselected(selectedRows);
}, },
},
},
],
},
{
cardTitle: "强制关单信息",
itemData: [
{
title: "关单人",
key: "closeUserName",
},
{
title: "关单时间",
key: "closeTime",
},
],
},
{
cardTitle: "上架明细",
noPrint: true,
itemData: [
{
key: "materialUploadList",
type: "table",
col: { span: 24 },
columns: [
{ {
title: "物料编码 - 名称", title: "状态",
dataIndex: "materieName", key: "statusName",
key: "materieName",
search: false,
render: (dom, row) => {
return (
(row.materieCode ?? "") + " - " + (row.materieName ?? "")
);
},
}, },
{ {
title: "供应商编号 - 名称", title: "完成时间",
dataIndex: "supplierNo", key: "finishTime",
key: "supplierNo",
search: false,
render: (dom, row) => {
return (
(row.supplierNo ?? "") + " - " + (row.supplierName ?? "")
);
},
}, },
{ {
title: "批次号/SN号", title: "备注",
dataIndex: "materieControlNo", key: "remark",
key: "materieControlNo", noshow: "100%",
search: false,
}, },
{ {
title: "入库数量", title: "工单条形码",
dataIndex: "instroeNum", noshow: true,
key: "instroeNum", key: "qrCodeUrl",
search: false, type: "img",
}, width: 100,
{
title: "库存单位",
dataIndex: "productionUnitName",
key: "productionUnitName",
search: false,
}, },
], ],
expandable: {
defaultExpandAllRows: true,
expandedRowRender: (record) => (
<Table
style={{ marginLeft: 48 }}
columns={[
{
title: "库位名称",
dataIndex: "storePositionName",
key: "storePositionName",
search: false,
formItemProps: () => {
return {
rules: [{ required: true, message: "此项为必填项" }],
};
},
},
{
title: "上架数量",
dataIndex: "instroeNum",
key: "instroeNum",
search: false,
formItemProps: () => {
return {
rules: [{ required: true, message: "此项为必填项" }],
};
},
},
{
title: "备注",
dataIndex: "remark",
key: "remark",
search: false,
},
{
title: "操作人",
dataIndex: "uploadUserName",
key: "uploadUserName",
search: false,
},
{
title: "操作时间",
dataIndex: "uploadTime",
key: "uploadTime",
search: false,
},
]}
dataSource={record.uploadList}
pagination={false}
/>
),
},
pagination: "false",
},
],
},
],
}),
doinsert: (fid, storeId) => ({
totalCard: [
//物料详情
{
cardTitle: "基本信息",
itemData: [
{
title: "入库单号",
key: "materieInstoreNo",
},
{
title: "入库类型",
key: "instoreTypeName",
},
{
title: "入库仓库",
key: "storeName",
}, },
{ {
title: "相关单号", cardTitle: "物料信息列表",
key: "businessNo", extraContent: "",
}, itemData: [
{ {
title: "备注", key: "materialList",
key: "remark", type: "table",
}, col: { span: 24 },
{ columns: [
title: "创建人", {
key: "createUserName", 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: "remainderNums",
key: "remainderNums",
search: false,
},
{
title: "库存单位",
dataIndex: "productionUnitName",
key: "productionUnitName",
search: false,
},
],
expandable: {
defaultExpandAllRows: true,
expandedRowRender: (record) => (
<Table
style={{ marginLeft: 48 }}
columns={[
{
title: "库位名称",
dataIndex: "storePositionName",
key: "storePositionName",
search: false,
formItemProps: () => {
return {
rules: [
{ required: true, message: "此项为必填项" },
],
};
},
},
{
title: "上架数量",
dataIndex: "instroeNum",
key: "instroeNum",
search: false,
formItemProps: () => {
return {
rules: [
{ required: true, message: "此项为必填项" },
],
};
},
},
]}
dataSource={record.uploadList}
pagination={false}
/>
),
},
pagination: "false",
rowKey: "id",
rowSelection: {
onChange: (selectedRowKeys, selectedRows) => {
setselected(selectedRows);
},
},
},
],
}, },
{ {
title: "创建时间", cardTitle: "强制关单信息",
key: "createTime", itemData: [
{
title: "关单人",
key: "closeUserName",
},
{
title: "关单时间",
key: "closeTime",
},
],
}, },
{ {
title: "状态", cardTitle: "上架明细",
key: "statusName", noPrint: true,
itemData: [
{
key: "materialUploadList",
type: "table",
col: { span: 24 },
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,
},
],
expandable: {
defaultExpandAllRows: true,
expandedRowRender: (record) => (
<Table
style={{ marginLeft: 48 }}
columns={[
{
title: "库位名称",
dataIndex: "storePositionName",
key: "storePositionName",
search: false,
formItemProps: () => {
return {
rules: [
{ required: true, message: "此项为必填项" },
],
};
},
},
{
title: "上架数量",
dataIndex: "instroeNum",
key: "instroeNum",
search: false,
formItemProps: () => {
return {
rules: [
{ required: true, message: "此项为必填项" },
],
};
},
},
{
title: "备注",
dataIndex: "remark",
key: "remark",
search: false,
},
{
title: "操作人",
dataIndex: "uploadUserName",
key: "uploadUserName",
search: false,
},
{
title: "操作时间",
dataIndex: "uploadTime",
key: "uploadTime",
search: false,
},
]}
dataSource={record.uploadList}
pagination={false}
/>
),
},
pagination: "false",
},
],
}, },
], ],
}, }),
{ doinsert: (fid, storeId) => ({
cardTitle: "物料信息", totalCard: [
extra: true, //物料详情
extrapath: "/ngic-workmanship/wmsMaterieInstore/uploadOtherInstore",
extrakey: "submit", //redux key
itemData: [
{ {
key: "materialList", cardTitle: "基本信息",
type: "table", itemData: [
col: { span: 24 },
columns: [
{ {
title: "物料编码 - 名称", title: "入库单号",
dataIndex: "materieName", key: "materieInstoreNo",
key: "materieName",
search: false,
render: (dom, row) => {
return (
(row.materieCode ?? "") + " - " + (row.materieName ?? "")
);
},
}, },
{ {
title: "供应商编号 - 名称", title: "入库类型",
dataIndex: "supplierNo", key: "instoreTypeName",
key: "supplierNo", },
search: false, {
render: (dom, row) => { title: "入库仓库",
return ( key: "storeName",
(row.supplierNo ?? "") + " - " + (row.supplierName ?? "") },
); {
}, title: "相关单号",
key: "businessNo",
}, },
{ {
title: "批次号", title: "备注",
dataIndex: "materieControlNo", key: "remark",
key: "materieControlNo",
search: false,
}, },
{ {
title: "入库数量", title: "创建人",
dataIndex: "instroeNum", key: "createUserName",
key: "instroeNum",
search: false,
}, },
{ {
title: "未上架数量", title: "创建时间",
dataIndex: "remainderNums", key: "createTime",
key: "remainderNums",
search: false,
}, },
{ {
title: "库存单位", title: "状态",
dataIndex: "productionUnitName", key: "statusName",
key: "productionUnitName", },
search: false, ],
},
{
cardTitle: "物料信息",
extra: true,
extrapath: "/ngic-workmanship/wmsMaterieInstore/uploadOtherInstore",
extrakey: "submit", //redux key
itemData: [
{
key: "materialList",
type: "table",
col: { span: 24 },
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: "批次号",
dataIndex: "materieControlNo",
key: "materieControlNo",
search: false,
},
{
title: "入库数量",
dataIndex: "instroeNum",
key: "instroeNum",
search: false,
},
{
title: "未上架数量",
dataIndex: "remainderNums",
key: "remainderNums",
search: false,
},
{
title: "库存单位",
dataIndex: "productionUnitName",
key: "productionUnitName",
search: false,
},
],
expandable: {
expandedRowRender: (record) => (
<EditUpload record={record} fid={fid} storeId={storeId} />
),
},
rowKey: "id",
}, },
], ],
expandable: {
expandedRowRender: (record) => (
<EditUpload record={record} fid={fid} storeId={storeId} />
),
},
rowKey: "id",
}, },
], ],
}, }),
], };
}), }, [drawprops.visible]);
};
function Instore(props) {
const { initialState, setInitialState } = useModel("@@initialState");
const [activeTabKey, onTabChange] = useState("1");
const [selectKeys, setSelectKeys] = useState([]);
let [drawprops, setdrawprops] = useState({
title: "",
visible: false,
onClose: () => {
setdrawprops((s) => ({
...s,
visible: false,
fields: {},
}));
},
fields: {},
width: 1200,
}),
actionRef = useRef(),
ChildRef = null,
printRef = useRef(),
mutiPrintRef = useRef();
//操作完成后刷新
function reload() {
actionRef.current.reload();
ChildRef?.onRefresh();
message.success("操作成功");
setdrawprops((s) => ({
...s,
visible: false,
fields: {},
}));
}
const handlePrint = useReactToPrint({
content: () => printRef.current.dom.current,
});
const mutiPrint = useReactToPrint({
content: () => mutiPrintRef.current.dom.current,
});
const PrintButton = ( const PrintButton = (
<Button <Button
disabled={!selectKeys.length} disabled={!selectKeys.length}
...@@ -1119,7 +1140,7 @@ function Instore(props) { ...@@ -1119,7 +1140,7 @@ function Instore(props) {
setdrawprops((s) => ({ setdrawprops((s) => ({
...s, ...s,
visible: true, visible: true,
title: "新增" + itemz["four"], title: itemz["four"],
fields: defaultFields["four"], fields: defaultFields["four"],
instoreType: keytoval["four"], instoreType: keytoval["four"],
val: "add", //类型 val: "add", //类型
......
...@@ -537,11 +537,11 @@ function Outstore(props) { ...@@ -537,11 +537,11 @@ function Outstore(props) {
required: true, required: true,
disabled: true, disabled: true,
}, },
storeId: { storeCode: {
value: null, value: null,
title: "出库仓库", title: "出库仓库",
type: "input", type: "input",
name: ["storeId"], name: ["storeCode"],
required: true, required: true,
disabled: true, disabled: true,
}, },
...@@ -1033,7 +1033,7 @@ function Outstore(props) { ...@@ -1033,7 +1033,7 @@ function Outstore(props) {
setdrawprops((s) => ({ setdrawprops((s) => ({
...s, ...s,
visible: true, visible: true,
title: "新增" + itemz["four"], title: itemz["four"],
fields: defaultFields["four"], fields: defaultFields["four"],
outstoreType: keytoval["four"], outstoreType: keytoval["four"],
val: "add", //类型 val: "add", //类型
......
...@@ -711,6 +711,19 @@ const materielDetail = [ ...@@ -711,6 +711,19 @@ const materielDetail = [
title: "管控方式", title: "管控方式",
key: "materieControlName", key: "materieControlName",
}, },
{
title: "规格型号",
key: "specificationModel",
},
{
title: "发料类型",
key: "issueTypeName",
},
],
},
{
cardTitle: "生产属性",
itemData: [
{ {
title: "铁损", title: "铁损",
key: "ironLoss", key: "ironLoss",
...@@ -719,6 +732,23 @@ const materielDetail = [ ...@@ -719,6 +732,23 @@ const materielDetail = [
title: "片厚", title: "片厚",
key: "sheetThickness", key: "sheetThickness",
}, },
{
title: "牌号",
key: "shopSign",
},
],
},
{
cardTitle: "仓库属性",
itemData: [
{
title: "库存单位",
key: "productionUnitName",
},
{
title: "默认仓库",
key: "storeName",
},
{ {
title: "默认库区", title: "默认库区",
key: "storeAreaName", key: "storeAreaName",
......
...@@ -27,6 +27,16 @@ export async function start(url, params) { ...@@ -27,6 +27,16 @@ export async function start(url, params) {
// LODOP.PREVIEW(); // LODOP.PREVIEW();
LODOP.PRINT(); LODOP.PRINT();
} }
return new Promise(
(resolve, reject) => {
if (res) {
resolve(data);
} else {
reject();
}
},
(err) => {}
);
} }
} catch (err) { } catch (err) {
alert("系统检测当前环境未安装相关插件,请先安装C-Lodop插件!"); alert("系统检测当前环境未安装相关插件,请先安装C-Lodop插件!");
......
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