Commit be8eed64 authored by krysent's avatar krysent

new

parent a4479aff
...@@ -17,6 +17,7 @@ import { ...@@ -17,6 +17,7 @@ import {
Cascader, Cascader,
ConfigProvider, ConfigProvider,
Rate, Rate,
Divider,
} from "antd"; } from "antd";
import moment from "moment"; import moment from "moment";
import React, { useEffect, useMemo, useState } from "react"; import React, { useEffect, useMemo, useState } from "react";
...@@ -141,7 +142,6 @@ let InitForm = ({ ...@@ -141,7 +142,6 @@ let InitForm = ({
[ind, cind] = useState(0); [ind, cind] = useState(0);
form = formRef ? formRef : form; form = formRef ? formRef : form;
useEffect(() => { useEffect(() => {
let Doms = [], let Doms = [],
klink = {}, klink = {},
...@@ -378,7 +378,7 @@ let InitForm = ({ ...@@ -378,7 +378,7 @@ let InitForm = ({
); );
let getOptions = async (options, item) => { let getOptions = async (options, item) => {
let curkey = item.name[0]; let curkey = item?.name[0];
if (Array.isArray(options)) { if (Array.isArray(options)) {
if (JSON.stringify(optiondom[curkey]) !== JSON.stringify(options)) { if (JSON.stringify(optiondom[curkey]) !== JSON.stringify(options)) {
cdom((optiondom) => { cdom((optiondom) => {
...@@ -627,8 +627,9 @@ let InitForm = ({ ...@@ -627,8 +627,9 @@ let InitForm = ({
}, },
item.name[0].indexOf("phone") != -1 item.name[0].indexOf("phone") != -1
? { ? {
pattern: /^(((\d{3,4}-)?[0-9]{7,8})|(1(3|4|5|6|7|8|9)\d{9}))$/, pattern:
message: item.title+"格式不正确", /^(((\d{3,4}-)?[0-9]{7,8})|(1(3|4|5|6|7|8|9)\d{9}))$/,
message: item.title + "格式不正确",
} }
: item.name[0].indexOf("mail") != -1 : item.name[0].indexOf("mail") != -1
? { ? {
...@@ -1244,6 +1245,12 @@ let InitForm = ({ ...@@ -1244,6 +1245,12 @@ let InitForm = ({
</Form.Item> </Form.Item>
</Col> </Col>
) : null; ) : null;
} else if (item.type == "split") {
return !extraprops.hides ? (
<Col key={i} {...getCol(item.col)}>
<Divider orientation="left" style={{fontWeight:600,fontSize:14}}>{item.title}</Divider>
</Col>
) : null;
} }
})} })}
{bottomNode && <Col span={24}>{bottomNode}</Col>} {bottomNode && <Col span={24}>{bottomNode}</Col>}
......
...@@ -85,8 +85,8 @@ function Table({ route }) { ...@@ -85,8 +85,8 @@ function Table({ route }) {
}, },
{ {
"title": "角色", "title": "角色",
"dataIndex": "roleNames", "dataIndex": "roleName",
"key": "roleNames" "key": "roleName"
}, },
{ {
"title": "直属领导", "title": "直属领导",
......
...@@ -8,10 +8,16 @@ import { ...@@ -8,10 +8,16 @@ import {
import { doFetch } from "@/utils/doFetch"; import { doFetch } from "@/utils/doFetch";
export default { export default {
jbsx: {
title: "基本属性",
type: "split",
col: { span: 24 },
name: ["jbsx"],
},
materieCode: { materieCode: {
value: null, value: null,
type: "input", type: "input",
title: "物料编", title: "物料编",
name: ["materieCode"], name: ["materieCode"],
required: true, required: true,
}, },
...@@ -25,12 +31,16 @@ export default { ...@@ -25,12 +31,16 @@ export default {
materieTypeId: { materieTypeId: {
value: null, value: null,
type: "treeselect", type: "treeselect",
title: "物料类", title: "物料类",
name: ["materieTypeId"], name: ["materieTypeId"],
required: true, required: true,
options: { options: {
database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterieType/queryTreeList", params }), database: (params) =>
params: {} doFetch({
url: "/ngic-workmanship/pmMaterieType/queryTreeList",
params,
}),
params: {},
}, },
}, },
materieControl: { materieControl: {
...@@ -40,24 +50,75 @@ export default { ...@@ -40,24 +50,75 @@ export default {
name: ["materieControl"], name: ["materieControl"],
required: true, required: true,
options: { options: {
database: (params) => doFetch({ url: "/ngic-base-business/sysDic/queryMaterieControlSelect", params }), database: (params) =>
params: {} doFetch({
url: "/ngic-base-business/sysDic/queryMaterieControlSelect",
params,
}),
params: {},
},
},
specificationModel: {
value: null,
type: "input",
title: "规格型号",
name: ["specificationModel"],
required: true,
},
issueType: {
type: "select",
title: "发料类型",
name: ["issueType"],
required: true,
options: {
database: (params) =>
doFetch({
url: "/ngic-base-business/sysDic/queryMaterieTypeSelect",
params,
}),
params: {},
},
},
scsx: {
title: "生产属性",
type: "split",
col: { span: 24 },
name: ["scsx"],
},
ironLoss: {
value: null,
type: "inputnumber",
title: "铁损",
name: ["ironLoss"],
required: false,
}, },
sheetThickness: {
value: null,
type: "inputnumber",
title: "片厚",
name: ["sheetThickness"],
required: false,
}, },
inventoryMin: { unilateralThickness: {
value: null, value: null,
type: "inputnumber", type: "inputnumber",
title: "库存下限", title: "宽度",
name: ["inventoryMin"], name: ["unilateralThickness"],
required: false, required: false,
}, },
inventoryMax: { shopSign: {
value: null, value: null,
type: "inputnumber", type: "inputnumber",
title: "库存上限", title: "牌号",
name: ["inventoryMax"], name: ["shopSign"],
required: false, required: false,
}, },
cksx: {
title: "仓库属性",
type: "split",
name: ["cksx"],
col: { span: 24 },
},
productionUnit: { productionUnit: {
value: null, value: null,
type: "select", type: "select",
...@@ -65,94 +126,36 @@ export default { ...@@ -65,94 +126,36 @@ export default {
name: ["productionUnit"], name: ["productionUnit"],
required: true, required: true,
options: { options: {
database: (params) => doFetch({ url: "/ngic-base-business/sysDic/queryMaterieUnitSelect", params }), database: (params) =>
params: {} doFetch({
}, url: "/ngic-base-business/sysDic/queryMaterieUnitSelect",
params,
}),
params: {},
}, },
qualityGuaranteePeriod: {
value: null,
type: "inputnumber",
title: "保质期",
name: ["qualityGuaranteePeriod"],
required: false,
}, },
qualityGuaranteePeriodUnit: { storeId: {
value: null, value: null,
type: "select", type: "select",
title: "保质期单位", title: "默认仓库",
name: ["qualityGuaranteePeriodUnit"], name: ["storeId"],
required: false, required: false,
options: [ options: {
{ database: (params) =>
label: "天", doFetch({ url: "/ngic-auth/sysStore/selectionBoxAll", params }),
value: 1, params: {},
}, },
{
label: "月",
value: 2,
}, },
{ storeAreaId: {
label: "年", value: null,
value: 3, type: "select",
} title: "默认库区",
], name: ["storeAreaId"],
options: {
database: (params) =>
doFetch({ url: "/ngic-auth/sysStoreArea/selection", params }),
params: {},
}, },
issueType: {
value: 1,
type: "radio",
title: "发料类型",
name: ["issueType"],
required: true,
options: [
{
label: "散发",
value: 1,
},
{
label: "整发",
value: 2,
}
],
},
materieProductUnitList: {
value: [],
title: "转换单位",
type: "table",
col: { span: 24 },
name: ["materieProductUnitList"],
required: false, required: false,
columns: [
{
title: "辅助单位",
dataIndex: "productionUnit",
key: "productionUnit",
search: false,
valueType: "select",
request: async () => {
let res = await doFetch({url:"/ngic-base-business/sysDic/queryMaterieUnitSelect",params:{}})
return res?.data?.dataList
},
},
{
title: "转换比 库存单位=辅助单位*转换比”",
dataIndex: "conversionRate",
key: "conversionRate",
search: false,
valueType: "digit",
width:200
},
{
title: "操作",
valueType: "option",
width: 70,
render: (text, record, _, action) => [
<a key="delete" onClick={() => { }}>
删除
</a>,
],
},
],
rowKey: "id",
}, },
}; };
...@@ -167,7 +167,7 @@ const Materiel = (props) => { ...@@ -167,7 +167,7 @@ const Materiel = (props) => {
} = state, } = state,
columns = [ columns = [
{ {
title: "物料编", title: "物料编",
dataIndex: "materieCode", dataIndex: "materieCode",
key: "materieCode", key: "materieCode",
}, },
...@@ -228,7 +228,7 @@ const Materiel = (props) => { ...@@ -228,7 +228,7 @@ const Materiel = (props) => {
search: false, search: false,
}, },
{ {
title: "物料管控", title: "管控方式",
dataIndex: "materieControlName", dataIndex: "materieControlName",
key: "materieControlName", key: "materieControlName",
options: { options: {
...@@ -244,43 +244,32 @@ const Materiel = (props) => { ...@@ -244,43 +244,32 @@ const Materiel = (props) => {
}, },
}, },
{ {
title: "保质期", title: "铁损",
dataIndex: "qualityGuaranteePeriod", dataIndex: "ironLoss",
key: "qualityGuaranteePeriod", key: "ironLoss",
search: false, valueType: "digit",
render: (text, row) => {
return (
(row.qualityGuaranteePeriod ?? "") +
" - " +
(row.qualityGuaranteePeriodUnitName ?? "")
);
}, },
{
title: "片厚",
dataIndex: "sheetThickness",
valueType: "digit",
key: "sheetThickness",
}, },
{ {
title: "库存上限", title: "宽度",
dataIndex: "inventoryMax", dataIndex: "unilateralThickness",
key: "inventoryMax", key: "unilateralThickness",
search: false,
}, },
{ {
title: "库存下限", title: "牌号",
dataIndex: "inventoryMin", dataIndex: "shopSign",
key: "inventoryMin", key: "shopSign",
search: false,
}, },
{ {
title: "库存单位", title: "默认库区",
dataIndex: "productionUnitName", dataIndex: "storeAreaName",
key: "productionUnit", key: "storeAreaName",
options: {
database: () =>
doFetch({
url: "/ngic-base-business/sysDic/queryMaterieUnitSelect",
}),
params: {},
},
valueType: "select",
}, },
{ {
...@@ -305,7 +294,7 @@ const Materiel = (props) => { ...@@ -305,7 +294,7 @@ const Materiel = (props) => {
return [ return [
getPrem("sysDepartment_save", action, "修改", () => { getPrem("sysDepartment_save", action, "修改", () => {
doFetch({ doFetch({
url: "/ngic-workmanship/pmMaterie/queryUpdateById", url: "/ngic-workmanship/pmMaterie/queryById",
params: { id: record.id }, params: { id: record.id },
}).then((res) => { }).then((res) => {
if (res.code == "0000") { if (res.code == "0000") {
...@@ -386,27 +375,6 @@ const Materiel = (props) => { ...@@ -386,27 +375,6 @@ const Materiel = (props) => {
.validateFields() .validateFields()
.then((secondFields) => { .then((secondFields) => {
let secondFieldsKeys = Object.keys(secondFields); let secondFieldsKeys = Object.keys(secondFields);
let materieCharList = defaultSpecificFileds.map((it) => {
if (secondFieldsKeys.indexOf(it.fieldsKey) != -1) {
it.fieldRealValue = secondFields[it.fieldsKey];
}
const el = {
fieldType: it.fieldType,
fieldTypeName: it.fieldTypeName,
fieldCondName: it.fieldCondName,
fieldCondKey: it.fieldCondKey,
optCondName: it.optCondName,
optCondKey: it.optCondKey,
fieldId: it.fieldId,
fieldName: it.fieldName,
fieldChar: it.fieldChar,
fieldCharName: it.fieldCharName,
fieldCharValue: it.fieldCharValue,
fieldRealValue: it.fieldRealValue,
valueList: it.valueList,
};
return el;
});
let materieProductUnitList = let materieProductUnitList =
firstValues?.materieProductUnitList?.map((it) => { firstValues?.materieProductUnitList?.map((it) => {
return { return {
...@@ -417,7 +385,6 @@ const Materiel = (props) => { ...@@ -417,7 +385,6 @@ const Materiel = (props) => {
params = { params = {
...firstValues, ...firstValues,
materieCharList,
...difrid, ...difrid,
materieProductUnitList, materieProductUnitList,
}; };
...@@ -473,9 +440,9 @@ const Materiel = (props) => { ...@@ -473,9 +440,9 @@ const Materiel = (props) => {
) { ) {
defaultFields[i].required = false; defaultFields[i].required = false;
} }
if (i == "issueType") { // if (i == "issueType") {
defaultFields[i].value = 1; // defaultFields[i].value = 1;
} // }
if (i == "materieTypeId") { if (i == "materieTypeId") {
defaultFields[i].value = defaultFields[i].value =
materieTypeId == "00000000" ? null : materieTypeId; materieTypeId == "00000000" ? null : materieTypeId;
...@@ -587,17 +554,6 @@ const Materiel = (props) => { ...@@ -587,17 +554,6 @@ const Materiel = (props) => {
return null; return null;
}} }}
></InitForm> ></InitForm>
<div style={{ fontSize: 16, fontWeight: "bold", marginBottom: 15 }}>
特定属性
</div>
<InitForm
formRef={formRefs}
fields={specificFileds}
onChange={(changedValues, allValues) => {}}
actions={() => {
return null;
}}
></InitForm>
</> </>
} }
<Button <Button
......
...@@ -192,8 +192,8 @@ const Shiftgroup = (props) => { ...@@ -192,8 +192,8 @@ const Shiftgroup = (props) => {
}, },
{ {
title: "角色", title: "角色",
dataIndex: "roleNames", dataIndex: "roleName",
key: "roleNames", key: "roleName",
search: false, search: false,
}, },
], ],
...@@ -236,8 +236,8 @@ const Shiftgroup = (props) => { ...@@ -236,8 +236,8 @@ const Shiftgroup = (props) => {
}, },
{ {
title: "角色", title: "角色",
dataIndex: "roleNames", dataIndex: "roleName",
key: "roleNames", key: "roleName",
search: false, search: false,
}, },
{ {
......
...@@ -34,7 +34,7 @@ function reducer(state, action) { ...@@ -34,7 +34,7 @@ function reducer(state, action) {
...state, ...state,
vs: true, vs: true,
iftype: { iftype: {
title: "新增仓库", title: "新增库区",
val: type, val: type,
}, },
fields: { ...action.fields }, fields: { ...action.fields },
...@@ -45,7 +45,7 @@ function reducer(state, action) { ...@@ -45,7 +45,7 @@ function reducer(state, action) {
...state, ...state,
vs: true, vs: true,
iftype: { iftype: {
title: "编辑仓库", title: "编辑库区",
val: type, val: type,
}, },
fields: { ...action.fields }, fields: { ...action.fields },
......
import { doFetch } from "@/utils/doFetch";
import { factorySelect } from "@/services/system";
export default { export default {
"customerNo": { storePositionCode: {
"value": null, value: null,
"type": "input", type: "input",
"title": "仓位编码", title: "库位编码",
"name": [ name: ["storePositionCode"],
"customerNo" required: true,
],
"required": false
},
"customerName": {
"value": null,
"type": "input",
"title": "仓位名称",
"name": [
"customerName"
],
"required": true
},
"officialWebsite": {
"value": null,
"type": "input",
"title": "所属仓库",
"name": [
"officialWebsite"
],
"required": false
},
"telephone": {
"value": null,
"type": "input",
"title": "所属库区",
"name": [
"telephone"
],
"required": false
},
"email": {
"value": null,
"type": "input",
"title": "排",
"name": [
"email"
],
"required": false
},
"address": {
"value": null,
"type": "input",
"title": "列",
"name": [
"address"
],
"required": false
},
"score": {
"value": null,
"type": "rate",
"title": "层",
"name": [
"score"
],
"required": false,
allowHalf: true,
}, },
"status": { storePositionName: {
"value": 1, value: null,
"type": "select", type: "input",
"title": "启停状态", title: "库位名称",
"name": [ name: ["storePositionName"],
"status" required: true,
],
"required": true,
options: [
{
label: "启用",
value: 1
}, },
{ factoryId: {
label: "停用", value: null,
value: 0 type: "select",
title: "所属工厂",
name: ["factoryId"],
required: true,
options: {
database: factorySelect,
params: {},
}, },
] linked: true,
}, },
"remark": { storeId: {
"value": null, value: null,
"type": "textarea", type: "select",
"title": "备注", title: "所属仓库",
"name": [ name: ["storeId"],
"remark" required: true,
], linked: true,
"required": false, belinked: {
col: { span: 24 } options: {
database: () =>
doFetch({ url: "/ngic-auth/sysStore/selectionBox", params: {} }),
params: {
factoryId: "linked",
}, },
},
"customerUserList": { },
"value": null, },
"editable": true, storeAreaId: {
"type": "table", value: null,
"title": "联系人", type: "select",
"name": [ title: "所属库区",
"customerUserList" name: ["storeAreaId"],
],
"required": false,
"columns": [
{
"title": "联系人姓名",
"dataIndex": "userName",
"key": "userName",
"search": false,
"valueType": "input",
formItemProps: {
rules: [
{
required: true, required: true,
message: '此项为必填项', belinked: {
options: {
database: () =>
doFetch({ url: "/ngic-auth/sysStoreArea/selection", params: {} }),
params: {
storeId: "linked",
}, },
],
}
}, },
},
linked: true,
},
status: {
value: 1,
type: "select",
name: ["status"],
title: "库位状态",
required: true,
options: [
{ {
"title": "联系电话", label: "启用",
"dataIndex": "telephone", value: 1,
"key": "telephone", },
"search": false,
"valueType": "input",
formItemProps: {
rules: [
{ {
required: false, label: "停用",
pattern: /^(((\d{3,4}-)?[0-9]{7,8})|(1(3|4|5|6|7|8|9)\d{9}))$/, value: 2,
message: '手机号格式不正确'
}, },
], ],
}
}, },
{ wzpz: {
"title": "邮箱", type: "split",
"dataIndex": "email", title: "位置配置",
"key": "email", name: ["wzpz"],
"search": false, col: { span: 24 },
"valueType": "input", },
formItemProps: { row: {
rules: [ value: null,
{ type: "input",
title: "排",
name: ["row"],
required: false, required: false,
pattern: /^[a-z0-9A-Z]+[- | a-z0-9A-Z . _]+@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\.)+[a-z]{2,}$/,
message: '邮箱格式不正确'
}, },
], line: {
} value: null,
type: "input",
title: "列",
name: ["line"],
required: false,
}, },
{ level: {
"title": "职位", value: null,
"dataIndex": "title", type: "input",
"key": "title", title: "层",
"search": false, name: ["level"],
"valueType": "input" required: false,
allowHalf: true,
}, },
{ roadway: {
title: '操作', value: null,
valueType: 'option', type: "input",
render: () => { title: "巷道",
return null; name: ["roadway"],
required: false,
allowHalf: true,
}, },
remark: {
value: null,
type: "textarea",
title: "备注",
name: ["remark"],
required: false,
col: { span: 24 },
}, },
], };
"editable": true,
"rowKey": "id",
"rowName": "",
"dataSource": [],
col: { span: 24 }
}
}
\ No newline at end of file
This diff is collapsed.
...@@ -136,6 +136,7 @@ const Store = (props) => { ...@@ -136,6 +136,7 @@ const Store = (props) => {
for (let i in defaultFields) { for (let i in defaultFields) {
defaultFields[i].value = record[i]; defaultFields[i].value = record[i];
} }
console.log(defaultFields);
dispatch({ type: "edit", fields: defaultFields, curitem: record }); dispatch({ type: "edit", fields: defaultFields, curitem: record });
}), }),
getPrem("sysDepartment_deleteById", action, "删除", null, { getPrem("sysDepartment_deleteById", action, "删除", null, {
......
...@@ -241,7 +241,7 @@ const userDetails = [ ...@@ -241,7 +241,7 @@ const userDetails = [
}, },
{ {
title: "角色", title: "角色",
key: "roleNames", key: "roleName",
}, },
{ {
title: "直属领导", title: "直属领导",
...@@ -835,8 +835,8 @@ const shiftgroupDetail = [ ...@@ -835,8 +835,8 @@ const shiftgroupDetail = [
}, },
{ {
title: "角色", title: "角色",
dataIndex: "roleNames", dataIndex: "roleName",
key: "roleNames", key: "roleName",
search: false, search: false,
}, },
{ {
......
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