Commit 2b7e6c2d authored by wuhao's avatar wuhao 🎯

killder

parent df45bb50
...@@ -99,8 +99,8 @@ const Details = (props) => { ...@@ -99,8 +99,8 @@ const Details = (props) => {
<pre className={col ? "" : styles.one}>{value}</pre> <pre className={col ? "" : styles.one}>{value}</pre>
</Tooltip> </Tooltip>
) : ( ) : (
<div>-</div> <div>-</div>
); );
} else if (type == "file") { } else if (type == "file") {
return ( return (
<div style={{ display: "flex", flexFlow: "row wrap", width: "100%" }}> <div style={{ display: "flex", flexFlow: "row wrap", width: "100%" }}>
...@@ -126,8 +126,8 @@ const Details = (props) => { ...@@ -126,8 +126,8 @@ const Details = (props) => {
); );
}) })
) : ( ) : (
"-" "-"
)} )}
</div> </div>
); );
} else if (type == "img") { } else if (type == "img") {
......
...@@ -37,7 +37,7 @@ function DrawInitForm(props) { ...@@ -37,7 +37,7 @@ function DrawInitForm(props) {
placement="right" placement="right"
closable={true} closable={true}
getContainer={false} getContainer={false}
style={{ position: "absolute", transform: "translateX(0)" }} style={{ position: "absolute", transform: "translateX(0)",maxWidth:"100%" }}
width={props.val == "detail" ? 1000 : props.width} width={props.val == "detail" ? 1000 : props.width}
destroyOnClose={true} destroyOnClose={true}
{...props} {...props}
......
import React, { useEffect, useRef } from "react"; import React, { useEffect, useRef } from "react";
import { EditableProTable } from "@ant-design/pro-table"; import { EditableProTable } from "@ant-design/pro-table";
import ProField from "@ant-design/pro-field"; import { useUpdate } from 'ahooks';
import ProCard from "@ant-design/pro-card";
import { Button } from "antd";
const EditTable = ({ const EditTable = ({
columns, columns,
...@@ -14,7 +13,16 @@ const EditTable = ({ ...@@ -14,7 +13,16 @@ const EditTable = ({
linkconfig, linkconfig,
style style
}) => { }) => {
const editorFormRef = useRef() const update = useUpdate();
const editorFormRef = useRef();
useEffect(()=>{
if(value===undefined){
update()
}
},[value])
console.log(columns[0]);
return ( return (
<EditableProTable <EditableProTable
style={{ ...(style ?? {}) }} style={{ ...(style ?? {}) }}
...@@ -40,7 +48,6 @@ const EditTable = ({ ...@@ -40,7 +48,6 @@ const EditTable = ({
return [defaultDoms.delete]; return [defaultDoms.delete];
}, },
onValuesChange: async (record, recordList) => { onValuesChange: async (record, recordList) => {
let { urlchangeval } = linkconfig ?? {}; let { urlchangeval } = linkconfig ?? {};
let newvalue = [...recordList]; let newvalue = [...recordList];
if (urlchangeval && record) {//根据url 改变 数据值 if (urlchangeval && record) {//根据url 改变 数据值
......
This diff is collapsed.
...@@ -9,30 +9,30 @@ import Details from "@/components/Details"; ...@@ -9,30 +9,30 @@ import Details from "@/components/Details";
import { materielDetail } from "@/utils/detailTotalCard"; import { materielDetail } from "@/utils/detailTotalCard";
import InitForm from "@/components/InitForm"; import InitForm from "@/components/InitForm";
import moment from "moment"; import moment from "moment";
import TreeRender from '@/components/TreeRender' import TreeRender from "@/components/TreeRender";
import { useEffect } from "react"; import { useEffect } from "react";
const initState = { const initState = {
vs: false, vs: false,
fields: {}, fields: {},
iftype: {}, iftype: {},
curitem: {}, curitem: {},
detail: { detail: {
dataSource: {}, dataSource: {},
totalCard: [], totalCard: [],
},
visible: false,
specificFileds: {},
commonFields: {},
defaultCommonFields: [],
}, },
visible: false, otherBasic = {
specificFileds: {}, materieCode: "物料编号",
commonFields: {}, materieName: "物料名称",
defaultCommonFields: [], materieTypeName: "物料类型",
}, productionUnitName: "生产单位(主)",
otherBasic = { processLineName: "工艺路线",
materieCode: "物料编号", };
materieName: "物料名称",
materieTypeName: "物料类型",
productionUnitName: "生产单位(主)",
processLineName: "工艺路线",
};
function reducer(state, action) { function reducer(state, action) {
let { type } = action, let { type } = action,
newState = {}; newState = {};
...@@ -143,15 +143,15 @@ const Materiel = (props) => { ...@@ -143,15 +143,15 @@ const Materiel = (props) => {
ChildRef?.onRefresh(); ChildRef?.onRefresh();
} }
const { run, loading } = useRequest(doFetch, { const { run, loading } = useRequest(doFetch, {
manual: true, manual: true,
formatResult: (res) => res, formatResult: (res) => res,
onSuccess: (result, params) => { onSuccess: (result, params) => {
if (result.code == "0000") { if (result.code == "0000") {
reload(); reload();
dispatch({ type: "close" }); dispatch({ type: "close" });
} }
}, },
}), }),
[state, dispatch] = useReducer(reducer, initState), [state, dispatch] = useReducer(reducer, initState),
{ {
vs, vs,
...@@ -203,7 +203,12 @@ const Materiel = (props) => { ...@@ -203,7 +203,12 @@ const Materiel = (props) => {
itemData: newSpecialData, itemData: newSpecialData,
}, },
]; ];
dataSource.newqualityGuaranteePeriod = dataSource.qualityGuaranteePeriod==0||dataSource.qualityGuaranteePeriod ? dataSource.qualityGuaranteePeriod + dataSource.qualityGuaranteePeriodUnitName : null; dataSource.newqualityGuaranteePeriod =
dataSource.qualityGuaranteePeriod == 0 ||
dataSource.qualityGuaranteePeriod
? dataSource.qualityGuaranteePeriod +
dataSource.qualityGuaranteePeriodUnitName
: null;
let totalCard = materielDetail.concat(itemCol); let totalCard = materielDetail.concat(itemCol);
dispatch({ type: "see", dataSource, totalCard }); dispatch({ type: "see", dataSource, totalCard });
} }
...@@ -220,15 +225,18 @@ const Materiel = (props) => { ...@@ -220,15 +225,18 @@ const Materiel = (props) => {
title: "物料类型", title: "物料类型",
dataIndex: "materieTypeName", dataIndex: "materieTypeName",
key: "materieTypeName", key: "materieTypeName",
search: false search: false,
}, },
{ {
title: "物料管控", title: "物料管控",
dataIndex: "materieControlName", dataIndex: "materieControlName",
key: "materieControlName", key: "materieControlName",
options: { options: {
database: () => doFetch({ url: "/ngic-base-business/sysDic/queryMaterieControlSelect" }), database: () =>
params: {} doFetch({
url: "/ngic-base-business/sysDic/queryMaterieControlSelect",
}),
params: {},
}, },
valueType: "select", valueType: "select",
formItemProps: { formItemProps: {
...@@ -241,17 +249,21 @@ const Materiel = (props) => { ...@@ -241,17 +249,21 @@ const Materiel = (props) => {
key: "qualityGuaranteePeriod", key: "qualityGuaranteePeriod",
search: false, search: false,
render: (text, row) => { render: (text, row) => {
return (row.qualityGuaranteePeriod??"") + " - " + (row.qualityGuaranteePeriodUnitName??"") return (
} (row.qualityGuaranteePeriod ?? "") +
" - " +
(row.qualityGuaranteePeriodUnitName ?? "")
);
},
}, },
{ {
title: "最大库存", title: "库存上限",
dataIndex: "inventoryMax", dataIndex: "inventoryMax",
key: "inventoryMax", key: "inventoryMax",
search: false, search: false,
}, },
{ {
title: "最小库存", title: "库存下限",
dataIndex: "inventoryMin", dataIndex: "inventoryMin",
key: "inventoryMin", key: "inventoryMin",
search: false, search: false,
...@@ -262,13 +274,15 @@ const Materiel = (props) => { ...@@ -262,13 +274,15 @@ const Materiel = (props) => {
dataIndex: "productionUnitName", dataIndex: "productionUnitName",
key: "productionUnit", key: "productionUnit",
options: { options: {
database: () => doFetch({ url: "/ngic-base-business/sysDic/queryMaterieUnitSelect" }), database: () =>
params: {} doFetch({
url: "/ngic-base-business/sysDic/queryMaterieUnitSelect",
}),
params: {},
}, },
valueType: "select", valueType: "select",
}, },
{ {
title: "操作", title: "操作",
dataIndex: "option_dataindex", dataIndex: "option_dataindex",
...@@ -279,12 +293,13 @@ const Materiel = (props) => { ...@@ -279,12 +293,13 @@ const Materiel = (props) => {
}, },
]; ];
useEffect(() => { useEffect(() => {
doFetch({ url: "/ngic-workmanship/pmMaterieChar/queryCommonList", params: {} }).then(res => { doFetch({
setdefaultSpecificFileds(res?.data?.dataList) url: "/ngic-workmanship/pmMaterieChar/queryCommonList",
}) params: {},
}, []) }).then((res) => {
setdefaultSpecificFileds(res?.data?.dataList);
});
}, []);
function extraAction(text, record, _, action) { function extraAction(text, record, _, action) {
return [ return [
...@@ -330,9 +345,9 @@ const Materiel = (props) => { ...@@ -330,9 +345,9 @@ const Materiel = (props) => {
}; };
all().then((res) => { all().then((res) => {
let commonDataFields = formatFieds( let commonDataFields = formatFieds(
res?.commonData, res?.commonData,
"common" "common"
)?.obj, )?.obj,
newCommonData = formatFieds(res?.commonData, "common")?.data; newCommonData = formatFieds(res?.commonData, "common")?.data;
dispatch({ dispatch({
type: "edit", type: "edit",
...@@ -342,7 +357,7 @@ const Materiel = (props) => { ...@@ -342,7 +357,7 @@ const Materiel = (props) => {
specificFileds: { ...commonDataFields }, specificFileds: { ...commonDataFields },
defaultCommonFields: newCommonData, defaultCommonFields: newCommonData,
}); });
setdefaultSpecificFileds([...newCommonData]) setdefaultSpecificFileds([...newCommonData]);
}); });
} }
}); });
...@@ -392,12 +407,13 @@ const Materiel = (props) => { ...@@ -392,12 +407,13 @@ const Materiel = (props) => {
}; };
return el; return el;
}); });
let materieProductUnitList = firstValues.materieProductUnitList.map(it => { let materieProductUnitList =
return { firstValues.materieProductUnitList.map((it) => {
productionUnit: it.productionUnit, return {
conversionRate: it.conversionRate productionUnit: it.productionUnit,
} conversionRate: it.conversionRate,
}) };
});
params = { params = {
...firstValues, ...firstValues,
...@@ -408,9 +424,9 @@ const Materiel = (props) => { ...@@ -408,9 +424,9 @@ const Materiel = (props) => {
url = "/ngic-workmanship/pmMaterie/save"; url = "/ngic-workmanship/pmMaterie/save";
run({ url, params }); run({ url, params });
}) })
.catch((error) => { }); .catch((error) => {});
}) })
.catch((error) => { }); .catch((error) => {});
} else { } else {
url = "/ngic-workmanship/pmMaterie/saveMaterieBom"; url = "/ngic-workmanship/pmMaterie/saveMaterieBom";
let firstValues = formRef?.getFieldsValue(); let firstValues = formRef?.getFieldsValue();
...@@ -461,7 +477,8 @@ const Materiel = (props) => { ...@@ -461,7 +477,8 @@ const Materiel = (props) => {
defaultFields[i].value = 1; defaultFields[i].value = 1;
} }
if (i == "materieTypeId") { if (i == "materieTypeId") {
defaultFields[i].value = materieTypeId; defaultFields[i].value =
materieTypeId == "00000000" ? null : materieTypeId;
} }
} }
dispatch({ dispatch({
...@@ -501,8 +518,8 @@ const Materiel = (props) => { ...@@ -501,8 +518,8 @@ const Materiel = (props) => {
item?.fieldRealValue == 0 || item?.fieldRealValue item?.fieldRealValue == 0 || item?.fieldRealValue
? item?.fieldRealValue ? item?.fieldRealValue
: item.fieldChar == 4 : item.fieldChar == 4
? [] ? []
: "", : "",
title: item.fieldName, title: item.fieldName,
name: [fieldsKey], name: [fieldsKey],
required: false, required: false,
...@@ -529,18 +546,25 @@ const Materiel = (props) => { ...@@ -529,18 +546,25 @@ const Materiel = (props) => {
childposition="left" childposition="left"
extraparams={{ materieTypeId: materieTypeId }} extraparams={{ materieTypeId: materieTypeId }}
> >
<div style={{ width: 260, flexShrink: 0, marginTop: -4, borderRight: "1px solid #f0f0f0", paddingRight: 12, marginRight: 12 }}> <div
style={{
width: 260,
flexShrink: 0,
marginTop: -4,
borderRight: "1px solid #f0f0f0",
paddingRight: 12,
marginRight: 12,
}}
>
<TreeRender <TreeRender
url="/ngic-workmanship/pmMaterieType/queryTreeList" url="/ngic-workmanship/pmMaterieType/queryTreeList"
deleteurl="/ngic-workmanship/pmMaterieType/deleteById" deleteurl="/ngic-workmanship/pmMaterieType/deleteById"
saveurl="/ngic-workmanship/pmMaterieType/save" saveurl="/ngic-workmanship/pmMaterieType/save"
onselected={(vals) => { onselected={(vals) => {
setmaterieTypeId(vals[0] ?? '') setmaterieTypeId(vals[0] ?? "");
}} }}
/> />
</div> </div>
</AutoTable> </AutoTable>
<Drawer <Drawer
title={iftype.title} title={iftype.title}
...@@ -552,13 +576,12 @@ const Materiel = (props) => { ...@@ -552,13 +576,12 @@ const Materiel = (props) => {
style={{ position: "absolute" }} style={{ position: "absolute" }}
width={"100%"} width={"100%"}
> >
{( {
<> <>
<InitForm <InitForm
formRef={formRef} formRef={formRef}
fields={fields} fields={fields}
onChange={(changedValues, allValues) => { onChange={(changedValues, allValues) => {}}
}}
actions={() => { actions={() => {
return null; return null;
}} }}
...@@ -569,13 +592,13 @@ const Materiel = (props) => { ...@@ -569,13 +592,13 @@ const Materiel = (props) => {
<InitForm <InitForm
formRef={formRefs} formRef={formRefs}
fields={specificFileds} fields={specificFileds}
onChange={(changedValues, allValues) => { }} onChange={(changedValues, allValues) => {}}
actions={() => { actions={() => {
return null; return null;
}} }}
></InitForm> ></InitForm>
</> </>
)} }
<Button <Button
style={{ width: "100%" }} style={{ width: "100%" }}
type="primary" type="primary"
......
...@@ -47,14 +47,14 @@ export default { ...@@ -47,14 +47,14 @@ export default {
inventoryMin: { inventoryMin: {
value: null, value: null,
type: "inputnumber", type: "inputnumber",
title: "库存最小值", title: "库存下限",
name: ["inventoryMin"], name: ["inventoryMin"],
required: false, required: false,
}, },
inventoryMax: { inventoryMax: {
value: null, value: null,
type: "inputnumber", type: "inputnumber",
title: "库存最大值", title: "库存上限",
name: ["inventoryMax"], name: ["inventoryMax"],
required: false, required: false,
}, },
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
type: "select", type: "select",
title: "库存单位", title: "库存单位",
name: ["productionUnit"], name: ["productionUnit"],
required: false, required: true,
options: { options: {
database: (params) => doFetch({ url: "/ngic-base-business/sysDic/queryMaterieUnitSelect", params }), database: (params) => doFetch({ url: "/ngic-base-business/sysDic/queryMaterieUnitSelect", params }),
params: {} params: {}
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
}, },
qualityGuaranteePeriodUnit: { qualityGuaranteePeriodUnit: {
value: null, value: null,
type: "radio", type: "select",
title: "保质期单位", title: "保质期单位",
name: ["qualityGuaranteePeriodUnit"], name: ["qualityGuaranteePeriodUnit"],
required: false, required: false,
...@@ -120,7 +120,7 @@ export default { ...@@ -120,7 +120,7 @@ export default {
type: "table", type: "table",
col: { span: 24 }, col: { span: 24 },
name: ["materieProductUnitList"], name: ["materieProductUnitList"],
required: true, required: false,
columns: [ columns: [
{ {
title: "辅助单位", title: "辅助单位",
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
}, },
}, },
{ {
title: "转换比", title: "转换比 库存单位=辅助单位*转换比”",
dataIndex: "conversionRate", dataIndex: "conversionRate",
key: "conversionRate", key: "conversionRate",
search: false, search: false,
......
...@@ -33,7 +33,7 @@ const EditUpload = ({ record, fid, storeId }) => { ...@@ -33,7 +33,7 @@ const EditUpload = ({ record, fid, storeId }) => {
...s, ...s,
submit: { submit: {
id: fid, id: fid,
materialList: (s.submit && s?.submit?.materialList) ? s?.submit?.materialList?.filter(it=>newlist.map(item=>item.id).indexOf(it.id)==-1)?.concat(newlist)?.filter(it=>it.uploadList?.length>0) : [] materialList: (s.submit && s?.submit?.materialList) ? s?.submit?.materialList?.filter(it => newlist.map(item => item.id).indexOf(it.id) == -1)?.concat(newlist)?.filter(it => it.uploadList?.length > 0) : []
} }
}) })
}) })
...@@ -44,29 +44,39 @@ const EditUpload = ({ record, fid, storeId }) => { ...@@ -44,29 +44,39 @@ const EditUpload = ({ record, fid, storeId }) => {
style={{ marginLeft: 48 }} style={{ marginLeft: 48 }}
columns={[ columns={[
{ {
title: "库位名称", title: <span>库位名称 <b style={{ color: "red" }}>*</b></span>,
dataIndex: "storePositionName", dataIndex: "storePositionName",
key: "storePositionId", key: "storePositionId",
search: false, search: false,
valueType: "select", valueType: "select",
request: async (params) => { request: async (params) => {
let res = await doFetch({ url: "/ngic-auth/sysStorePosition/queryByStoreId/selection", params:{storeId:params.storeId}}); let res = await doFetch({ url: "/ngic-auth/sysStorePosition/queryByStoreId/selection", params: { storeId: params.storeId } });
return res?.data?.dataList return res?.data?.dataList
}, },
editable: (text, record, index) => { editable: (text, record, index) => {
return !record.materieOutstoreDetailId return !record.materieOutstoreDetailId
}, },
params:{storeId: storeId} params: { storeId: storeId },
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
}, },
{ {
title: "上架数量", title: <span>上架数量 <b style={{ color: "red" }}>*</b></span>,
dataIndex: "instroeNum", dataIndex: "instroeNum",
key: "instroeNum", key: "instroeNum",
search: false, search: false,
editable: (text, record, index) => { editable: (text, record, index) => {
return !record.materieOutstoreDetailId return !record.materieOutstoreDetailId
}, },
valueType: "digit" valueType: "digit",
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
}, },
{ {
title: "备注", title: "备注",
...@@ -127,7 +137,7 @@ const one = { ...@@ -127,7 +137,7 @@ const one = {
"storeId": { "storeId": {
"value": null, "value": null,
"type": "select", "type": "select",
"title": "仓库", "title": "入库仓库",
"name": [ "name": [
"storeId" "storeId"
], ],
...@@ -177,7 +187,7 @@ const one = { ...@@ -177,7 +187,7 @@ const one = {
type: "table", type: "table",
col: { span: 24 }, col: { span: 24 },
name: ["materialList"], name: ["materialList"],
required: true, required: false,
linkconfig: { linkconfig: {
urlchangeval: {//根据url接口 改变某个value urlchangeval: {//根据url接口 改变某个value
database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterie/queryUnitByMaterieId", params }), database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterie/queryUnitByMaterieId", params }),
...@@ -228,11 +238,11 @@ const one = { ...@@ -228,11 +238,11 @@ const one = {
} }
}, },
{ {
"title": "单位", "title": "库存单位",
"dataIndex": "productionUnitName", "dataIndex": "productionUnitName",
"key": "productionUnitName", "key": "productionUnitName",
"readonly": 'productionUnitName', "readonly": 'productionUnitName',
"width": 60 "width": 88
}, },
{ {
title: "操作", title: "操作",
...@@ -262,7 +272,7 @@ const one = { ...@@ -262,7 +272,7 @@ const one = {
"storeId": { "storeId": {
"value": null, "value": null,
"type": "select", "type": "select",
"title": "仓库", "title": "入库仓库",
"name": [ "name": [
"storeId" "storeId"
], ],
...@@ -315,7 +325,7 @@ const one = { ...@@ -315,7 +325,7 @@ const one = {
type: "table", type: "table",
col: { span: 24 }, col: { span: 24 },
name: ["materialList"], name: ["materialList"],
required: true, required: false,
linkconfig: { linkconfig: {
urlchangeval: {//根据url接口 改变某个value urlchangeval: {//根据url接口 改变某个value
database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterie/queryUnitByMaterieId", params }), database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterie/queryUnitByMaterieId", params }),
...@@ -366,11 +376,11 @@ const one = { ...@@ -366,11 +376,11 @@ const one = {
valueType: "digit" valueType: "digit"
}, },
{ {
"title": "单位", "title": "库存单位",
"dataIndex": "productionUnitName", "dataIndex": "productionUnitName",
"key": "productionUnitName", "key": "productionUnitName",
"readonly": 'productionUnitName', "readonly": 'productionUnitName',
"width": 60 "width": 88
}, },
{ {
title: "操作", title: "操作",
...@@ -400,7 +410,7 @@ const one = { ...@@ -400,7 +410,7 @@ const one = {
"storeId": { "storeId": {
"value": null, "value": null,
"type": "select", "type": "select",
"title": "仓库", "title": "入库仓库",
"name": [ "name": [
"storeId" "storeId"
], ],
...@@ -437,7 +447,7 @@ const one = { ...@@ -437,7 +447,7 @@ const one = {
type: "table", type: "table",
col: { span: 24 }, col: { span: 24 },
name: ["materialList"], name: ["materialList"],
required: true, required: false,
linkconfig: { linkconfig: {
urlchangeval: {//根据url接口 改变某个value urlchangeval: {//根据url接口 改变某个value
database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterie/queryUnitByMaterieId", params }), database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterie/queryUnitByMaterieId", params }),
...@@ -509,11 +519,11 @@ const one = { ...@@ -509,11 +519,11 @@ const one = {
valueType: "digit" valueType: "digit"
}, },
{ {
"title": "单位", "title": "库存单位",
"dataIndex": "productionUnitName", "dataIndex": "productionUnitName",
"key": "productionUnitName", "key": "productionUnitName",
"readonly": 'productionUnitName', "readonly": 'productionUnitName',
"width": 60 "width": 88
}, },
{ {
title: "操作", title: "操作",
...@@ -543,7 +553,7 @@ const one = { ...@@ -543,7 +553,7 @@ const one = {
"storeId": { "storeId": {
"value": null, "value": null,
"type": "select", "type": "select",
"title": "仓库", "title": "入库仓库",
"name": [ "name": [
"storeId" "storeId"
], ],
...@@ -580,7 +590,7 @@ const one = { ...@@ -580,7 +590,7 @@ const one = {
type: "table", type: "table",
col: { span: 24 }, col: { span: 24 },
name: ["materialList"], name: ["materialList"],
required: true, required: false,
linkconfig: { linkconfig: {
urlchangeval: {//根据url接口 改变某个value urlchangeval: {//根据url接口 改变某个value
database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterie/queryUnitByMaterieId", params }), database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterie/queryUnitByMaterieId", params }),
...@@ -652,11 +662,11 @@ const one = { ...@@ -652,11 +662,11 @@ const one = {
valueType: "digit" valueType: "digit"
}, },
{ {
"title": "单位", "title": "库存单位",
"dataIndex": "productionUnitName", "dataIndex": "productionUnitName",
"key": "productionUnitName", "key": "productionUnitName",
"readonly": 'productionUnitName', "readonly": 'productionUnitName',
"width": 60 "width": 88
}, },
{ {
title: "操作", title: "操作",
...@@ -767,7 +777,7 @@ const one = { ...@@ -767,7 +777,7 @@ const one = {
search: false, search: false,
}, },
{ {
title: "单位", title: "库存单位",
dataIndex: "productionUnitName", dataIndex: "productionUnitName",
key: "productionUnitName", key: "productionUnitName",
search: false, search: false,
...@@ -783,12 +793,22 @@ const one = { ...@@ -783,12 +793,22 @@ const one = {
dataIndex: "storePositionName", dataIndex: "storePositionName",
key: "storePositionName", key: "storePositionName",
search: false, search: false,
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
}, },
{ {
title: "上架数量", title: "上架数量",
dataIndex: "instroeNum", dataIndex: "instroeNum",
key: "instroeNum", key: "instroeNum",
search: false search: false,
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
} }
]} ]}
dataSource={record.uploadList} dataSource={record.uploadList}
...@@ -853,7 +873,7 @@ const one = { ...@@ -853,7 +873,7 @@ const one = {
search: false, search: false,
}, },
{ {
title: "单位", title: "库存单位",
dataIndex: "productionUnitName", dataIndex: "productionUnitName",
key: "productionUnitName", key: "productionUnitName",
search: false, search: false,
...@@ -869,12 +889,22 @@ const one = { ...@@ -869,12 +889,22 @@ const one = {
dataIndex: "storePositionName", dataIndex: "storePositionName",
key: "storePositionName", key: "storePositionName",
search: false, search: false,
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
}, },
{ {
title: "上架数量", title: "上架数量",
dataIndex: "instroeNum", dataIndex: "instroeNum",
key: "instroeNum", key: "instroeNum",
search: false search: false,
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
} }
, ,
{ {
...@@ -995,7 +1025,7 @@ const one = { ...@@ -995,7 +1025,7 @@ const one = {
search: false, search: false,
}, },
{ {
title: "单位", title: "库存单位",
dataIndex: "productionUnitName", dataIndex: "productionUnitName",
key: "productionUnitName", key: "productionUnitName",
search: false, search: false,
......
...@@ -51,7 +51,12 @@ const keytoval = { ...@@ -51,7 +51,12 @@ const keytoval = {
</a> </a>
), ),
}, },
] ],itemz = {
one:"采购入库",
two:"生产入库",
three:"退料入库",
four:"其他入库"
}
function Instore(props) { function Instore(props) {
const { initialState, setInitialState } = useModel("@@initialState"); const { initialState, setInitialState } = useModel("@@initialState");
...@@ -365,7 +370,7 @@ function Instore(props) { ...@@ -365,7 +370,7 @@ function Instore(props) {
setdrawprops(s => ({ setdrawprops(s => ({
...s, ...s,
visible: true, visible: true,
title: "新增", title: "新增"+itemz[e.key],
fields: defaultFields[e.key], fields: defaultFields[e.key],
instoreType: keytoval[e.key], instoreType: keytoval[e.key],
val: "add", //类型 val: "add", //类型
......
...@@ -71,7 +71,12 @@ const EditUpload = ({ record, fid, storeId }) => { ...@@ -71,7 +71,12 @@ const EditUpload = ({ record, fid, storeId }) => {
editable: (text, record, index) => { editable: (text, record, index) => {
return !record.materieOutstoreDetailId return !record.materieOutstoreDetailId
}, },
params:{storeId: storeId} params:{storeId: storeId},
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
}, },
{ {
title: "批次号/SN号", title: "批次号/SN号",
...@@ -162,12 +167,12 @@ const one = { ...@@ -162,12 +167,12 @@ const one = {
"materieOutstoreNo" "materieOutstoreNo"
], ],
"required": false, "required": false,
placeholder: "不填写系统自动生成" "placeholder": "不填写系统自动生成"
}, },
"storeId": { "storeId": {
"value": null, "value": null,
"type": "select", "type": "select",
"title": "仓库", "title": "出库仓库",
"name": [ "name": [
"storeId" "storeId"
], ],
...@@ -176,7 +181,7 @@ const one = { ...@@ -176,7 +181,7 @@ const one = {
database: () => doFetch({ url: "/ngic-auth/sysStore/selectionBox", params: { factoryIdList: [] } }), database: () => doFetch({ url: "/ngic-auth/sysStore/selectionBox", params: { factoryIdList: [] } }),
params: {} params: {}
}, },
linked:true "linked":true
}, },
"businessNo": { "businessNo": {
"value": null, "value": null,
...@@ -205,7 +210,7 @@ const one = { ...@@ -205,7 +210,7 @@ const one = {
type: "table", type: "table",
col: { span: 24 }, col: { span: 24 },
name: ["materialList"], name: ["materialList"],
required: true, required: false,
linkconfig: { linkconfig: {
urlchangeval: {//根据url接口 改变某个value urlchangeval: {//根据url接口 改变某个value
database: (params) => doFetch({ url: "/ngic-workmanship/wmsMaterieStockStore/queryStoreOne", params }), database: (params) => doFetch({ url: "/ngic-workmanship/wmsMaterieStockStore/queryStoreOne", params }),
...@@ -258,7 +263,7 @@ const one = { ...@@ -258,7 +263,7 @@ const one = {
"readonly": 'usableNum' "readonly": 'usableNum'
}, },
{ {
"title": "单位", "title": "库存单位",
"dataIndex": "productionUnitName", "dataIndex": "productionUnitName",
"key": "productionUnitName", "key": "productionUnitName",
"readonly": 'productionUnitName' "readonly": 'productionUnitName'
...@@ -291,7 +296,7 @@ const one = { ...@@ -291,7 +296,7 @@ const one = {
"storeId": { "storeId": {
"value": null, "value": null,
"type": "select", "type": "select",
"title": "仓库", "title": "出库仓库",
"name": [ "name": [
"storeId" "storeId"
], ],
...@@ -328,7 +333,7 @@ const one = { ...@@ -328,7 +333,7 @@ const one = {
type: "table", type: "table",
col: { span: 24 }, col: { span: 24 },
name: ["materialList"], name: ["materialList"],
required: true, required: false,
linkconfig: { linkconfig: {
urlchangeval: {//根据url接口 改变某个value urlchangeval: {//根据url接口 改变某个value
database: (params) => doFetch({ url: "/ngic-workmanship/wmsMaterieStockStore/queryStoreOne", params }), database: (params) => doFetch({ url: "/ngic-workmanship/wmsMaterieStockStore/queryStoreOne", params }),
...@@ -379,7 +384,7 @@ const one = { ...@@ -379,7 +384,7 @@ const one = {
"readonly": 'usableNum' "readonly": 'usableNum'
}, },
{ {
"title": "单位", "title": "库存单位",
"dataIndex": "productionUnitName", "dataIndex": "productionUnitName",
"key": "productionUnitName", "key": "productionUnitName",
"readonly": 'productionUnitName' "readonly": 'productionUnitName'
...@@ -412,7 +417,7 @@ const one = { ...@@ -412,7 +417,7 @@ const one = {
"storeId": { "storeId": {
"value": null, "value": null,
"type": "select", "type": "select",
"title": "仓库", "title": "出库仓库",
"name": [ "name": [
"storeId" "storeId"
], ],
...@@ -449,7 +454,7 @@ const one = { ...@@ -449,7 +454,7 @@ const one = {
type: "table", type: "table",
col: { span: 24 }, col: { span: 24 },
name: ["materialList"], name: ["materialList"],
required: true, required: false,
linkconfig: { linkconfig: {
urlchangeval: {//根据url接口 改变某个value urlchangeval: {//根据url接口 改变某个value
database: (params) => doFetch({ url: "/ngic-workmanship/wmsMaterieStockStore/queryStoreOne", params }), database: (params) => doFetch({ url: "/ngic-workmanship/wmsMaterieStockStore/queryStoreOne", params }),
...@@ -500,7 +505,7 @@ const one = { ...@@ -500,7 +505,7 @@ const one = {
"readonly": 'usableNum' "readonly": 'usableNum'
}, },
{ {
"title": "单位", "title": "库存单位",
"dataIndex": "productionUnitName", "dataIndex": "productionUnitName",
"key": "productionUnitName", "key": "productionUnitName",
"readonly": 'productionUnitName' "readonly": 'productionUnitName'
...@@ -533,7 +538,7 @@ const one = { ...@@ -533,7 +538,7 @@ const one = {
"storeId": { "storeId": {
"value": null, "value": null,
"type": "select", "type": "select",
"title": "仓库", "title": "出库仓库",
"name": [ "name": [
"storeId" "storeId"
], ],
...@@ -570,7 +575,7 @@ const one = { ...@@ -570,7 +575,7 @@ const one = {
type: "table", type: "table",
col: { span: 24 }, col: { span: 24 },
name: ["materialList"], name: ["materialList"],
required: true, required: false,
linkconfig: { linkconfig: {
urlchangeval: {//根据url接口 改变某个value urlchangeval: {//根据url接口 改变某个value
database: (params) => doFetch({ url: "/ngic-workmanship/wmsMaterieStockStore/queryStoreOne", params }), database: (params) => doFetch({ url: "/ngic-workmanship/wmsMaterieStockStore/queryStoreOne", params }),
...@@ -621,7 +626,7 @@ const one = { ...@@ -621,7 +626,7 @@ const one = {
"readonly": 'usableNum' "readonly": 'usableNum'
}, },
{ {
"title": "单位", "title": "库存单位",
"dataIndex": "productionUnitName", "dataIndex": "productionUnitName",
"key": "productionUnitName", "key": "productionUnitName",
"readonly": 'productionUnitName' "readonly": 'productionUnitName'
...@@ -715,7 +720,7 @@ const one = { ...@@ -715,7 +720,7 @@ const one = {
search: false, search: false,
}, },
{ {
title: "单位", title: "库存单位",
dataIndex: "productionUnitName", dataIndex: "productionUnitName",
key: "productionUnitName", key: "productionUnitName",
search: false, search: false,
...@@ -736,6 +741,11 @@ const one = { ...@@ -736,6 +741,11 @@ const one = {
dataIndex: "storePositionName", dataIndex: "storePositionName",
key: "storePositionName", key: "storePositionName",
search: false, search: false,
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
}, },
{ {
title: "批次号/SN号", title: "批次号/SN号",
...@@ -805,7 +815,7 @@ const one = { ...@@ -805,7 +815,7 @@ const one = {
search: false, search: false,
}, },
{ {
title: "单位", title: "库存单位",
dataIndex: "productionUnitName", dataIndex: "productionUnitName",
key: "productionUnitName", key: "productionUnitName",
search: false, search: false,
...@@ -821,6 +831,11 @@ const one = { ...@@ -821,6 +831,11 @@ const one = {
dataIndex: "storePositionName", dataIndex: "storePositionName",
key: "storePositionName", key: "storePositionName",
search: false, search: false,
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
}, },
{ {
title: "批次号/SN号", title: "批次号/SN号",
...@@ -942,7 +957,7 @@ const one = { ...@@ -942,7 +957,7 @@ const one = {
search: false, search: false,
}, },
{ {
title: "单位", title: "库存单位",
dataIndex: "productionUnitName", dataIndex: "productionUnitName",
key: "productionUnitName", key: "productionUnitName",
search: false, search: false,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -243,12 +243,7 @@ const StoreApp = (props) => { ...@@ -243,12 +243,7 @@ const StoreApp = (props) => {
actionRef={actionRef} actionRef={actionRef}
onRef={(node) => (ChildRef = node)} onRef={(node) => (ChildRef = node)}
extraparams={{ storeId: props?.curitem?.id ?? "0" }} extraparams={{ storeId: props?.curitem?.id ?? "0" }}
rowSelection={{
onChange: (selectedRowKeys, selectedRows) => {
setselectedRowKeys(selectedRows)
},
}}
></AutoTable> ></AutoTable>
<DrawInitForm <DrawInitForm
visible={false} visible={false}
......
...@@ -191,7 +191,13 @@ export async function factory(params) { ...@@ -191,7 +191,13 @@ export async function factory(params) {
} }
// //
// 4 : // 4 :
//集团下拉框
export async function zuzhi(params) {
return request(`/wms/ngic-auth/sysDepartment/query/tree`, {
method: 'POST',
data: params,
});
}
//集团下拉框 //集团下拉框
export async function depart(params) { export async function depart(params) {
return request(`/wms/ngic-auth/sysDepartment/query/selectbox/depart`, { return request(`/wms/ngic-auth/sysDepartment/query/selectbox/depart`, {
......
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