Commit 633db227 authored by krysent's avatar krysent

new

parent 20933042
import { Button, Result } from "antd";
import React from "react";
import { history } from "umi";
const NoFoundPage = () => (
<Result
status="404"
title="404"
subTitle="Sorry, the page you visited does not exist."
extra={
<Button type="primary" onClick={() => history.push("/")}>
Back Home
</Button>
}
/>
);
export default NoFoundPage;
import React from "react";
import { HeartTwoTone, SmileTwoTone } from "@ant-design/icons";
import { Card, Typography, Alert } from "antd";
import { PageHeaderWrapper } from "@ant-design/pro-layout";
import { useIntl } from "umi";
const Admin = () => {
const intl = useIntl();
return (
<PageHeaderWrapper
content={intl.formatMessage({
id: "pages.admin.subPage.title",
defaultMessage: "This page can only be viewed by admin",
})}
>
<Card>
<Alert
message={intl.formatMessage({
id: "pages.welcome.alertMessage",
defaultMessage:
"Faster and stronger heavy-duty components have been released.",
})}
type="success"
showIcon
banner
style={{
margin: -12,
marginBottom: 48,
}}
/>
<Typography.Title
level={2}
style={{
textAlign: "center",
}}
>
<SmileTwoTone /> Ant Design Pro{" "}
<HeartTwoTone twoToneColor="#eb2f96" /> You
</Typography.Title>
</Card>
<p
style={{
textAlign: "center",
marginTop: 24,
}}
>
Want to add more pages? Please refer to{" "}
<a
href="https://pro.ant.design/docs/block-cn"
target="_blank"
rel="noopener noreferrer"
>
use block
</a>
</p>
</PageHeaderWrapper>
);
};
export default Admin;
import React from "react";
import { Modal } from "antd";
import {
ProFormSelect,
ProFormText,
ProFormTextArea,
StepsForm,
ProFormRadio,
ProFormDateTimePicker,
} from "@ant-design/pro-form";
import { useIntl, FormattedMessage } from "umi";
const UpdateForm = (props) => {
const intl = useIntl();
return (
<StepsForm
stepsProps={{
size: "small",
}}
stepsFormRender={(dom, submitter) => {
return (
<Modal
width={640}
bodyStyle={{
padding: "32px 40px 48px",
}}
destroyOnClose
title={intl.formatMessage({
id: "pages.searchTable.updateForm.ruleConfig",
defaultMessage: "规则配置",
})}
visible={props.updateModalVisible}
footer={submitter}
onCancel={() => {
props.onCancel();
}}
>
{dom}
</Modal>
);
}}
onFinish={props.onSubmit}
>
<StepsForm.StepForm
initialValues={{
name: props.values.name,
desc: props.values.desc,
}}
title={intl.formatMessage({
id: "pages.searchTable.updateForm.basicConfig",
defaultMessage: "基本信息",
})}
>
<ProFormText
name="name"
label={intl.formatMessage({
id: "pages.searchTable.updateForm.ruleName.nameLabel",
defaultMessage: "规则名称",
})}
width="md"
rules={[
{
required: true,
message: (
<FormattedMessage
id="pages.searchTable.updateForm.ruleName.nameRules"
defaultMessage="请输入规则名称!"
/>
),
},
]}
/>
<ProFormTextArea
name="desc"
width="md"
label={intl.formatMessage({
id: "pages.searchTable.updateForm.ruleDesc.descLabel",
defaultMessage: "规则描述",
})}
placeholder={intl.formatMessage({
id: "pages.searchTable.updateForm.ruleDesc.descPlaceholder",
defaultMessage: "请输入至少五个字符",
})}
rules={[
{
required: true,
message: (
<FormattedMessage
id="pages.searchTable.updateForm.ruleDesc.descRules"
defaultMessage="请输入至少五个字符的规则描述!"
/>
),
min: 5,
},
]}
/>
</StepsForm.StepForm>
<StepsForm.StepForm
initialValues={{
target: "0",
template: "0",
}}
title={intl.formatMessage({
id: "pages.searchTable.updateForm.ruleProps.title",
defaultMessage: "配置规则属性",
})}
>
<ProFormSelect
name="target"
width="md"
label={intl.formatMessage({
id: "pages.searchTable.updateForm.object",
defaultMessage: "监控对象",
})}
valueEnum={{
0: "表一",
1: "表二",
}}
/>
<ProFormSelect
name="template"
width="md"
label={intl.formatMessage({
id: "pages.searchTable.updateForm.ruleProps.templateLabel",
defaultMessage: "规则模板",
})}
valueEnum={{
0: "规则模板一",
1: "规则模板二",
}}
/>
<ProFormRadio.Group
name="type"
label={intl.formatMessage({
id: "pages.searchTable.updateForm.ruleProps.typeLabel",
defaultMessage: "规则类型",
})}
options={[
{
value: "0",
label: "强",
},
{
value: "1",
label: "弱",
},
]}
/>
</StepsForm.StepForm>
<StepsForm.StepForm
initialValues={{
type: "1",
frequency: "month",
}}
title={intl.formatMessage({
id: "pages.searchTable.updateForm.schedulingPeriod.title",
defaultMessage: "设定调度周期",
})}
>
<ProFormDateTimePicker
name="time"
width="md"
label={intl.formatMessage({
id: "pages.searchTable.updateForm.schedulingPeriod.timeLabel",
defaultMessage: "开始时间",
})}
rules={[
{
required: true,
message: (
<FormattedMessage
id="pages.searchTable.updateForm.schedulingPeriod.timeRules"
defaultMessage="请选择开始时间!"
/>
),
},
]}
/>
<ProFormSelect
name="frequency"
label={intl.formatMessage({
id: "pages.searchTable.updateForm.object",
defaultMessage: "监控对象",
})}
width="md"
valueEnum={{
month: "月",
week: "周",
}}
/>
</StepsForm.StepForm>
</StepsForm>
);
};
export default UpdateForm;
import React, { useState } from "react";
import AutoTable from "@/components/AutoTable";
import DrawInitForm from "@/components/DrawInitForm";
import { Button } from "antd";
function Table({ route }) {
const [vs, setvs] = useState();
return (
<div style={{ height: "200vh" }}>
<AutoTable
pagetitle={route.name}
pageextra={
<Button
onClick={() => {
setvs(true);
}}
>
add
</Button>
}
columns={[
{
title: "b",
dataIndex: "a",
key: "a",
with: 50,
},
{
title: "d",
dataIndex: "c",
key: "c",
},
]}
dataSource={[
{
a: "123",
c: "456",
},
{
a: "123",
c: "456",
},
{
a: "123",
c: "456",
},
]}
></AutoTable>
<DrawInitForm
title="Basic Drawer"
onClose={() => {
setvs(false);
}}
visible={vs}
fields={{
a: {
value: null,
type: "input",
title: "b",
name: ["a"],
required: true,
},
}}
></DrawInitForm>
</div>
);
}
export default Table;
import React, { useState } from "react";
import AutoTable from "@/components/AutoTable";
import DrawInitForm from "@/components/DrawInitForm";
import { Button } from "antd";
function Table({ route }) {
const [vs, setvs] = useState();
return (
<div style={{ height: "200vh" }}>
{/* <AutoTable
pagetitle={route.name}
pageextra={() => <Button onClick={() => {
setvs(true)
}}>add</Button>
}
columns={[
{
"title": "姓名",
"dataIndex": "userName",
"key": "userName"
},
{
"title": "用户名",
"dataIndex": "accountName",
"key": "accountName"
},
{
"title": "性别1:男;2:女",
"dataIndex": "gender",
"key": "gender",
"valueType": "select",
"request": [
{
"label": "男",
"value": "1"
},
{
"label": "女",
"value": "2"
}
],
"fftype": 0
},
{
"title": "电话",
"dataIndex": "telephone",
"key": "telephone"
},
{
"title": "邮箱",
"dataIndex": "mailNo",
"key": "mailNo",
"search": false
},
{
"title": "组织名称",
"dataIndex": "departmentName",
"key": "departmentName"
},
{
"title": "工厂名称",
"dataIndex": "factoryName",
"key": "factoryName"
},
{
"title": "车间名称",
"dataIndex": "shopNames",
"key": "shopNames"
},
{
"title": "工段",
"dataIndex": "sectionNames",
"key": "sectionNames"
},
{
"title": "产线",
"dataIndex": "productionLines",
"key": "productionLines"
},
{
"title": "分组",
"dataIndex": "groupNames",
"key": "groupNames"
},
{
"title": "角色",
"dataIndex": "roleNames",
"key": "roleNames"
},
{
"title": "直属领导",
"dataIndex": "parentName",
"key": "parentName"
},
{
"title": "学历",
"dataIndex": "academicCareer",
"key": "academicCareer",
"search": false
},
{
"title": "毕业院校",
"dataIndex": "university",
"key": "university",
"search": false
},
{
"title": "专业",
"dataIndex": "major",
"key": "major",
"search": false
},
{
"title": "备注",
"dataIndex": "remarks",
"key": "remarks",
"search": false
}
]}
path="/ngic-auth/sysUser/query/page"
>
</AutoTable>
<DrawInitForm
title="Basic Drawer"
onClose={() => {
setvs(false)
}}
visible={vs}
fields={{
"a": {
"value": null,
"type": "input",
"title": "b",
"name": [
"a"
],
"required": true
}
}}
>
</DrawInitForm> */}
</div>
);
}
export default Table;
@import (reference) "~antd/es/style/themes/index";
.pre {
margin: 12px 0;
padding: 12px 20px;
background: @input-bg;
box-shadow: @card-shadow;
}
import {
factorySelect,
shopSelectByFactory,
productionLineSelectByShop,
} from "@/services/system";
import { workingProcedureByShop } from "@/services/craft";
export default {
collectionSiteCode: {
value: null,
type: "input",
title: "站点编号",
name: ["collectionSiteCode"],
required: true,
},
collectionSiteName: {
value: null,
type: "input",
title: "站点名称",
name: ["collectionSiteName"],
required: true,
},
factoryId: {
value: null,
type: "select",
title: "所属工厂",
name: ["factoryId"],
required: true,
options: {
database: factorySelect,
params: {},
},
linked: true,
},
shopId: {
value: null,
type: "select",
title: "所属车间",
name: ["shopId"],
required: true,
belinked: {
options: {
database: shopSelectByFactory,
params: { factoryId: "linked" },
},
},
linked: true,
},
productionLineId: {
value: null,
type: "select",
title: "所属产线",
name: ["productionLineId"],
required: true,
belinked: {
options: {
database: productionLineSelectByShop,
params: { shopId: "linked", factoryId: "linked" },
},
},
},
workingProcedureId: {
value: null,
type: "select",
title: "工序",
name: ["workingProcedureId"],
required: true,
belinked: {
options: {
database: workingProcedureByShop,
params: { shopId: "linked", factoryId: "linked" },
},
},
},
remark: {
value: null,
type: "textarea",
title: "描述",
name: ["remark"],
required: false,
col: { span: 24 },
},
};
This diff is collapsed.
import { factorySelect, shopSelectByFactory } from "@/services/system";
import regValue from "@/utils/regValue";
export default {
processLineCode: {
value: null,
type: "input",
title: "工艺路线编号",
name: ["processLineCode"],
required: true,
},
processLineName: {
value: null,
type: "input",
title: "工艺路线名称",
name: ["processLineName"],
required: true,
},
factoryId: {
value: null,
type: "select",
title: "所属工厂",
name: ["factoryId"],
required: true,
options: {
database: factorySelect,
params: {},
},
linked: true,
},
shopId: {
value: null,
type: "select",
title: "所属车间",
name: ["shopId"],
required: true,
belinked: {
options: {
database: shopSelectByFactory,
params: { factoryId: "linked" },
},
},
linked: true,
},
processLineType: {
value: null,
type: "select",
title: "工艺路线类型",
name: ["processLineType"],
required: false,
options: [
{
label: "常规",
value: 1,
},
{
label: "返工",
value: 2,
},
],
},
capacity: {
value: null,
type: "inputnumber",
title: "能力",
name: ["capacity"],
required: false,
...regValue(null, 6, 3),
},
remark: {
value: null,
type: "textarea",
title: "描述",
name: ["remark"],
required: false,
col: { span: 24 },
},
};
This diff is collapsed.
@import "~antd/es/style/variable.less";
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
padding: 6px 0;
}
.stepTitle {
width: 100%;
overflow: hidden;
font-size: 14px;
white-space: nowrap;
text-overflow: ellipsis;
}
.one {
width: 100%;
overflow: hidden;
font-size: 14px;
white-space: nowrap;
text-overflow: ellipsis;
}
import regValue from "@/utils/regValue";
import {
unitSelect,
serialNumberRuleSelect,
processLineSelect,
bmTableSelect,
} from "@/services/craft";
import { doFetch } from "@/utils/doFetch";
export default {
materieCode: {
value: null,
type: "input",
title: "物料编号",
name: ["materieCode"],
required: true,
},
materieName: {
value: null,
type: "input",
title: "物料名称",
name: ["materieName"],
required: true,
},
materieTypeId: {
value: null,
type: "treeselect",
title: "物料类别",
name: ["materieTypeId"],
required: true,
options: {
database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterieType/queryTreeList", params }),
params: {}
},
},
materieControl: {
value: null,
type: "select",
title: "管控方式",
name: ["materieControl"],
required: true,
options: {
database: (params) => doFetch({ url: "/ngic-base-business/sysDic/queryMaterieControlSelect", params }),
params: {}
},
},
inventoryMin: {
value: null,
type: "inputnumber",
title: "库存下限",
name: ["inventoryMin"],
required: false,
},
inventoryMax: {
value: null,
type: "inputnumber",
title: "库存上限",
name: ["inventoryMax"],
required: false,
},
productionUnit: {
value: null,
type: "select",
title: "库存单位",
name: ["productionUnit"],
required: true,
options: {
database: (params) => doFetch({ url: "/ngic-base-business/sysDic/queryMaterieUnitSelect", params }),
params: {}
},
},
qualityGuaranteePeriod: {
value: null,
type: "inputnumber",
title: "保质期",
name: ["qualityGuaranteePeriod"],
required: false,
},
qualityGuaranteePeriodUnit: {
value: null,
type: "select",
title: "保质期单位",
name: ["qualityGuaranteePeriodUnit"],
required: false,
options: [
{
label: "天",
value: 1,
},
{
label: "月",
value: 2,
},
{
label: "年",
value: 3,
}
],
},
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,
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",
},
};
This diff is collapsed.
import {
factorySelect,
shopSelectByFactory,
sectionSelectByShop,
} from "@/services/system";
export default {
workingProcedureCode: {
value: null,
type: "input",
title: "工序编号",
name: ["workingProcedureCode"],
required: true,
},
workingProcedureName: {
value: null,
type: "input",
title: "工序名称",
name: ["workingProcedureName"],
required: true,
},
factoryId: {
value: null,
type: "select",
title: "所属工厂",
name: ["factoryId"],
required: true,
options: {
database: factorySelect,
params: {},
},
linked: true,
},
shopId: {
value: null,
type: "select",
title: "所属车间",
name: ["shopId"],
required: true,
belinked: {
options: {
database: shopSelectByFactory,
params: { factoryId: "linked" },
},
},
linked: true,
},
sectionId: {
value: null,
type: "select",
title: "所属工段",
name: ["sectionId"],
required: true,
belinked: {
options: {
database: sectionSelectByShop,
params: { shopId: "linked", factoryId: "linked" },
},
},
},
workingProcedureType: {
value: null,
type: "select",
title: "工序类型",
name: ["workingProcedureType"],
required: true,
options: [
{
label: "生产",
value: 1,
},
{
label: "检验",
value: 2,
},
{
label: "包装",
value: 3,
},
],
},
collectionMode: {
value: null,
type: "select",
title: "采集方式",
name: ["collectionMode"],
required: true,
options: [
{
label: "上下线",
value: 1,
},
{
label: "一次",
value: 2,
},
{
label: "投料",
value: 3,
},
],
},
remark: {
value: null,
type: "textarea",
title: "描述",
name: ["remark"],
required: false,
col: { span: 24 },
},
};
import React, { useEffect, useRef, useReducer } from "react";
import { Button, Tooltip, Row, Divider } from "antd";
import AutoTable from "@/components/AutoTable";
import getPrem from "@/utils/getPrem"; //权限判断fn
import { useRequest } from "umi";
import defaultFields from "./fields";
import { doFetch } from "@/utils/doFetch";
import DrawInitForm from "@/components/DrawInitForm";
import Details from "@/components/Details";
import { workingProcedureDetail } from "@/utils/detailTotalCard";
import Coltext from "@/components/Coltext";
const initState = {
vs: false,
fields: {},
iftype: {},
curitem: {},
detail: {
dataSource: {},
totalCard: [],
},
visible: false,
},
otherBasic = {
processLineName: "工艺路线",
collectionSiteName: "采集站点",
};
function reducer(state, action) {
let { type } = action,
newState = {};
switch (type) {
case "add":
newState = {
...state,
vs: true,
iftype: {
title: "新增工序",
val: type,
},
fields: { ...action.fields },
};
break;
case "edit":
newState = {
...state,
vs: true,
iftype: {
title: "编辑工序",
val: type,
},
fields: { ...action.fields },
curitem: action.curitem,
};
break;
case "see":
newState = {
...state,
detail: {
dataSource: action.dataSource,
totalCard: [...workingProcedureDetail],
},
visible: true,
};
break;
case "close":
newState = {
vs: false,
fields: {},
iftype: {},
curitem: {},
detail: {
dataSource: {},
totalCard: [],
},
visible: false,
};
break;
}
return newState;
}
const Process = (props) => {
let actionRef = useRef(),
ChildRef = null;
function reload() {
actionRef?.current?.reload();
ChildRef?.onRefresh();
}
const { run, loading } = useRequest(doFetch, {
manual: true,
formatResult: (res) => res,
onSuccess: (result, params) => {
if (result.code == "0000") {
reload();
dispatch({ type: "close" });
}
},
}),
[state, dispatch] = useReducer(reducer, initState),
{ vs, fields, iftype, curitem, detail, visible } = state,
columns = [
{
title: "工序编号",
dataIndex: "workingProcedureCode",
key: "workingProcedureCode",
},
{
title: "工序名称",
dataIndex: "workingProcedureName",
key: "workingProcedureName",
render: (_, row) => {
return (
<Tooltip title={row.workingProcedureName}>
<a
className="table-cell"
onClick={() => {
doFetch({
url: "/ngic-workmanship/workingProcedure/queryDetailById",
params: { id: row.id },
}).then((res) => {
if (res.code == "0000") {
let dataSource = res?.data?.data ?? {};
dispatch({ type: "see", dataSource });
}
});
}}
>
{row.workingProcedureName}
</a>
</Tooltip>
);
},
},
{
title: "所属工厂",
dataIndex: "factoryName",
key: "factoryName",
},
{
title: "所属车间",
dataIndex: "shopName",
key: "shopName",
},
{
title: "所属工段",
dataIndex: "sectionName",
key: "sectionName",
},
{
title: "工序类型",
dataIndex: "workingProcedureTypeName",
key: "workingProcedureTypeName",
options: [
{
label: "生产",
value: 1,
},
{
label: "检验",
value: 2,
},
{
label: "包装",
value: 3,
},
],
valueType: "select",
formItemProps: {
name: "workingProcedureType",
},
},
{
title: "采集方式",
dataIndex: "collectionModeName",
key: "collectionModeName",
options: [
{
label: "上下线",
value: 1,
},
{
label: "一次",
value: 2,
},
{
label: "投料",
value: 3,
},
],
valueType: "select",
formItemProps: {
name: "collectionMode",
},
},
{
title: "描述",
dataIndex: "remark",
key: "remark",
search: false,
},
{
title: "操作",
dataIndex: "option_dataindex",
key: "option_dataindex",
valueType: "option",
width: 135,
render: (text, row, _, action) => extraAction(text, row, _, action),
},
];
function extraAction(text, record, _, action) {
return [
getPrem("sysDepartment_save", action, "修改", () => {
doFetch({
url: "/ngic-workmanship/workingProcedure/queryDetailById",
params: { id: record.id },
}).then((res) => {
if (res.code == "0000") {
let data = res?.data?.data ?? {};
for (let i in defaultFields) {
defaultFields[i].value = record[i];
if (i == "factoryId" || i == "shopId") {
if (data?.processLineName || data?.collectionSiteName) {
defaultFields[i].disabled = true;
} else {
defaultFields[i].disabled = false;
}
}
}
dispatch({ type: "edit", fields: defaultFields, curitem: data });
}
});
}),
getPrem("sysDepartment_deleteById", action, "删除", null, {
title: "确认删除该工序?",
onConfirm: () => {
run({
url: "/ngic-workmanship/workingProcedure/deleteById",
params: { id: record.id },
});
},
}),
];
}
let saveData = (values, fn) => {
let newfields = JSON.parse(JSON.stringify(values));
//新增&修改
let difrid = iftype.val == "edit" ? { id: curitem.id } : {};
run({
url: "/ngic-workmanship/workingProcedure/save",
params: { ...newfields, ...difrid },
});
};
let extrarender = [
<Button
disabled={!getPrem("sysDepartment_save", "ifs")}
type="primary"
onClick={() => {
for (let i in defaultFields) {
defaultFields[i].value = null;
defaultFields[i].disabled = false;
}
dispatch({ type: "add", fields: defaultFields });
}}
>
新增
</Button>,
];
return (
<div>
<AutoTable
pagetitle={props.route.name} //页面标题
pageextra={extrarender} //页面操作 新增or批量删除
columns={columns}
path="/ngic-workmanship/workingProcedure/queryList"
actionRef={actionRef}
onRef={(node) => (ChildRef = node)}
></AutoTable>
<DrawInitForm
title={iftype.title}
visible={vs}
onClose={() => dispatch({ type: "close" })}
footer={false}
destroyOnClose={true}
fields={fields}
submitData={(values) => {
saveData(values);
}}
onChange={(changedValues, allValues) => {
//联动操作
}}
submitting={loading || !vs}
width={"50%"}
>
{iftype.val == "edit" && (
<>
<Row gutter={[16, 10]}>
{Object.keys(otherBasic).map((it) => {
return (
<Coltext
label={otherBasic[it]}
value={curitem[it]}
key={it}
/>
);
})}
</Row>
<Divider />
</>
)}
</DrawInitForm>
<Details
title="工序详情"
visible={visible}
onClose={() => dispatch({ type: "close" })}
footer={false}
destroyOnClose={true}
width={"100%"}
{...detail}
></Details>
</div>
);
};
export default Process;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="theme-color" content="#1890ff" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="keywords"
content="antd,umi,umijs,ant design,Scaffolding, layout, Ant Design, project, Pro, admin, console, homepage, out-of-the-box, middle and back office, solution, component library" />
<meta name="description" content="
An out-of-box UI solution for enterprise applications as a React boilerplate." />
<meta name="description" content="
Out-of-the-box mid-stage front-end/design solution." />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title>Ant Design Pro</title>
<link rel="icon" href="<%= context.config.publicPath +'favicon.ico'%>" type="image/x-icon" />
</head>
<body>
<noscript>
<div class="noscript-container">
Hi there! Please
<div class="noscript-enableJS">
<a href="https://www.enablejavascript.io/en" target="_blank" rel="noopener noreferrer">
<b>enable Javascript</b>
</a>
</div>
in your browser to use Ant Design, Out-of-the-box mid-stage front/design solution!
</div>
</noscript>
<div id="root">
<style>
html,
body,
#root {
height: 100%;
margin: 0;
padding: 0;
}
#root {
background-repeat: no-repeat;
background-size: 100% auto;
}
.noscript-container {
display: flex;
align-content: center;
justify-content: center;
margin-top: 90px;
font-size: 20px;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode',
Geneva, Verdana, sans-serif;
}
.noscript-enableJS {
padding-right: 3px;
padding-left: 3px;
}
.page-loading-warp {
display: flex;
align-items: center;
justify-content: center;
padding: 98px;
}
.ant-spin {
position: absolute;
display: none;
-webkit-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
color: rgba(0, 0, 0, 0.65);
color: #1890ff;
font-size: 14px;
font-variant: tabular-nums;
line-height: 1.5;
text-align: center;
list-style: none;
opacity: 0;
-webkit-transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
transition: -webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86),
-webkit-transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);
-webkit-font-feature-settings: 'tnum';
font-feature-settings: 'tnum';
}
.ant-spin-spinning {
position: static;
display: inline-block;
opacity: 1;
}
.ant-spin-dot {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
font-size: 20px;
}
.ant-spin-dot-item {
position: absolute;
display: block;
width: 9px;
height: 9px;
background-color: #1890ff;
border-radius: 100%;
-webkit-transform: scale(0.75);
-ms-transform: scale(0.75);
transform: scale(0.75);
-webkit-transform-origin: 50% 50%;
-ms-transform-origin: 50% 50%;
transform-origin: 50% 50%;
opacity: 0.3;
-webkit-animation: antspinmove 1s infinite linear alternate;
animation: antSpinMove 1s infinite linear alternate;
}
.ant-spin-dot-item:nth-child(1) {
top: 0;
left: 0;
}
.ant-spin-dot-item:nth-child(2) {
top: 0;
right: 0;
-webkit-animation-delay: 0.4s;
animation-delay: 0.4s;
}
.ant-spin-dot-item:nth-child(3) {
right: 0;
bottom: 0;
-webkit-animation-delay: 0.8s;
animation-delay: 0.8s;
}
.ant-spin-dot-item:nth-child(4) {
bottom: 0;
left: 0;
-webkit-animation-delay: 1.2s;
animation-delay: 1.2s;
}
.ant-spin-dot-spin {
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-animation: antrotate 1.2s infinite linear;
animation: antRotate 1.2s infinite linear;
}
.ant-spin-lg .ant-spin-dot {
width: 32px;
height: 32px;
font-size: 32px;
}
.ant-spin-lg .ant-spin-dot i {
width: 14px;
height: 14px;
}
@media all and (-ms-high-contrast: none),
(-ms-high-contrast: active) {
.ant-spin-blur {
background: #fff;
opacity: 0.5;
}
}
@-webkit-keyframes antSpinMove {
to {
opacity: 1;
}
}
@keyframes antSpinMove {
to {
opacity: 1;
}
}
@-webkit-keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg);
}
}
@keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg);
}
}
</style>
<div style="
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
min-height: 420px;
">
<img src="<%= context.config.publicPath +'logo.png'%>" alt="logo" width="256" />
<div class="page-loading-warp">
<div class="ant-spin ant-spin-lg ant-spin-spinning">
<span class="ant-spin-dot ant-spin-dot-spin"><i class="ant-spin-dot-item"></i><i
class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i><i class="ant-spin-dot-item"></i></span>
</div>
</div>
<div style="display: flex; align-items: center; justify-content: center">
江苏南高
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
import {
MenuUnfoldOutlined,
MenuFoldOutlined,
HomeOutlined
} from '@ant-design/icons';
import { Breadcrumb, Layout, Menu, Input, Modal, Tree } from 'antd';
import React, { useState } from 'react';
import styles from './index.less'
import TreeRender from '@/components/TreeRender';
import AutoTable from "@/components/AutoTable";
const { Header, Content, Footer, Sider } = Layout,
{ Search } = Input
const Storesearch = (props) => {
const [collapsed, setCollapsed] = useState(false);
const [search, setsearch] = useState();
const [select, setselect] = useState({});
const columns = [
{
"title": "物料编码",
"dataIndex": "materieCode",
"key": "materieCode"
},
{
"title": "物料名称",
"dataIndex": "materieName",
"key": "materieName"
},
{
"title": "物料类型",
"dataIndex": "materieTypeName",
"key": "materieTypeName"
},
{
"title": "库存数量",
"dataIndex": "stockNum",
"key": "stockNum",
"search": false
},
{
"title": "可用库存",
"dataIndex": "usableNum",
"key": "usableNum",
"search": false
},
{
"title": "库存单位",
"dataIndex": "productionUnitName",
"key": "productionUnitName",
"search": false
}, {
"title": "库存信息",
"valueType": "option",
"width": 88,
"search": false,
"render": (dom, record) => {
return <a
onClick={() => {
Modal.info({
title: "库存信息",
width: 1200,
okText: "知道了",
content: (
<div>
<AutoTable
withCard={false}
columns={[
{
"title": "仓库编号",
"dataIndex": "storeCode",
"key": "storeCode",
},
{
"title": "仓库名称",
"dataIndex": "storeName",
"key": "storeName"
},
{
"title": "库位名称",
"dataIndex": "storePositionName",
"key": "storePositionName"
},
{
"title": "批次号/SN号",
"dataIndex": "materieControlNo",
"key": "materieControlNo"
},
{
"title": "供应商编号",
"dataIndex": "supplierNo",
"key": "supplierNo"
},
{
"title": "供应商名称",
"dataIndex": "supplierName",
"key": "supplierName"
},
{
"title": "库存数量",
"dataIndex": "stroeNum",
"key": "stroeNum",
search:false
},
]}
path="/ngic-workmanship/wmsMaterieStore/queryPositionList"
extraparams={{
level: select.level ?? 0,
key: select.selectedKeys ?? "",
materieId: record.materieId
}}
>
</AutoTable>
</div>
)
})
}}
>
查看
</a>
}
}
]
const tableprops = {
...props,
pageextra: "none",
columns,
path: "/ngic-workmanship/wmsMaterieStock/queryStockList",
extraparams: {
level: select.level ?? 0,
key: select.selectedKeys ?? ""
}
}
return (
<Layout
style={{
height: '100%',
}}
>
<Sider theme='light' collapsed={collapsed} width={260}>
<div style={{ padding: 12, justifyContent: "space-between", paddingBottom: collapsed ? 12 : 0, alignItems: "center", display: "flex", flexDirection: !collapsed ? "row" : "column" }} >
<p className={styles.title} style={{ marginBottom: !collapsed ? 0 : 12 }}>
<HomeOutlined />
{!collapsed ? <span style={{ marginLeft: 6 }}>仓库库位</span> : ""}
</p>
{collapsed ? (
<MenuUnfoldOutlined
style={{ cursor: "pointer", fontSize: 20 }}
onClick={() => {
setCollapsed(!collapsed)
}}
/>
) : (
<MenuFoldOutlined
style={{ cursor: "pointer", fontSize: 20 }}
onClick={() => {
setCollapsed(!collapsed)
}}
/>
)}
</div>
{
!collapsed ?
<div style={{ padding: collapsed ? 0 : 12 }}>
<TreeRender
url="/ngic-auth/sysStore/queryTreeList"
params={{}}
noaction={true}
maxWidth={140}
onselected={(selectedKeys, e, alldata) => {
setselect(selectedKeys[0] ? {
title: e.node.title,
selectedKeys: selectedKeys[0],
level: alldata.filter(it => it.key == selectedKeys[0])[0]?.level,
key: e.node.key
} : {
})
}}
>
</TreeRender>
</div> :
<div onDoubleClick={() => {
setCollapsed(false)
}} style={{ writingMode: "vertical-lr", width: "100%", textAlign: "center", height: "80vh", display: "flex", justifyContent: "center", alignItems: "center", userSelect: "none" }}>
双击此处展开
</div>
}
</Sider>
<Layout className={styles.sitelayout}>
<Content
style={{
margin: '0 0 6px 6px',
display: "flex",
flexDirection: "column"
}}
>
<Breadcrumb
style={{
margin: '8px 6px',
}}
>
<Breadcrumb.Item>物料库存</Breadcrumb.Item>
{
select.key != "00000000" && <Breadcrumb.Item style={{ maxWidth: 600 }}>{select.title}</Breadcrumb.Item>
}
</Breadcrumb>
<div
className={styles.sitelayoutbackground}
style={{
padding: 6,
height: "100%",
flex: 1
}}
>
<AutoTable
{
...tableprops
}
withCard={false}
></AutoTable>
</div>
</Content>
</Layout>
</Layout>
);
};
export default Storesearch;
\ No newline at end of file
.sitelayout {
min-height: calc(100vh - 98px) !important;
.sitelayoutbackground {
background: #fff;
}
}
.title{
margin: 0px;
}
\ No newline at end of file
import React, { useEffect, useReducer, useRef } from "react";
import {
Button,
Drawer,
Steps,
Form,
Popconfirm,
Switch,
Tabs,
Tooltip,
Row,
Col,
message,
Card,
} from "antd";
import AutoTable from "@/components/AutoTable";
import getPrem from "@/utils/getPrem"; //权限判断fn
import InitForm from "@/components/InitForm";
import { useRequest, useModel } from "umi";
import { useInterval } from "ahooks";
import moment from "moment";
import Coltext from "@/components/Coltext";
const topleft = {
collectionSitName: "采集站点",
workingProcedureName: "工序名称",
},
middleright = {
jobOrderNo: "派工单编号",
scheduledProductionNum: "排产数量",
materieCode: "物料编号",
qualifiedNum: "合格数量",
productionOrderNo: "生产订单编号",
noQualifiedNum: "不合格数量",
f1: "当前SN号/批次号",
f2: "上线数量",
current: "当前工序",
status: "当前状态",
};
const initState = {
topleftData: {},
time: moment().format("YYYY-MM-DD HH:mm:ss"),
snorbatch: "",
middlerightData: {},
timepage: moment().format("YYYY-MM-DD HH:mm:ss"),
};
function reducer(state, action) {
let { type } = action,
newState = {};
switch (type) {
case "changeTopleft":
newState = {
...state,
topleftData: { ...action.topleftData },
};
break;
case "changeTopright":
newState = {
...state,
topRightData: { ...action.topRightData },
};
break;
case "changeTime":
newState = {
...state,
time: action.time,
};
break;
case "close":
newState = {
topleftData: {},
user: "",
time: moment().format("YYYY-MM-DD HH:mm:ss"),
snorbatch: "",
middlerightData: {},
};
break;
}
return newState;
}
const Gatherprocess = (props) => {
const {
initialState: { currentUser },
setInitialState,
} = useModel("@@initialState");
const [state, dispatch] = useReducer(reducer, initState),
{ topleftData, time, snorbatch, middlerightData, timepage } = state;
useInterval(() => {
dispatch({
type: "changeTime",
time: moment().add(1, "seconds").format("YYYY-MM-DD HH:mm:ss"),
});
}, 1000);
return (
<Card title={props.route.name}>
<div className="spread">
<div style={{ flex: 1, marginRight: 15 }}>
<Row gutter={[16, 10]}>
{Object.keys(topleft).map((item) => {
return (
<Coltext
label={topleft[item]}
value={topleftData[item]}
key={item}
col={{ span: 20 }}
/>
);
})}
<Col>
<Button type="primary">选择</Button>
</Col>
</Row>
</div>
<div style={{ flex: 1, textAlign: "right" }}>
<div style={{ marginBottom: 6 }}>当前时间:{time}</div>
<div>当前采集人:{currentUser.userName}</div>
</div>
</div>
<div className="spread"></div>
<div></div>
</Card>
);
};
export default Gatherprocess;
import React, { useEffect, useMemo, useRef, useState } from "react";
import { Dropdown, Menu, Button, Tooltip } from "antd";
import { ProTable } from "@ant-design/pro-table";
import { doFetch } from "@/utils/doFetch";
import AutoTable from "@/components/AutoTable";
function Instore(props) {
const columns = [
{
title: "操作时间",
dataIndex: "operateTime",
key: "operateTimeList",
valueType: "dateRange",
render: (_, row) => {
return <div>{row.operateTime}</div>;
},
},
{
title: "操作人",
dataIndex: "operateUserName",
key: "operateUserName",
},
{
title: "物料编码",
dataIndex: "materieCode",
key: "materieCode",
},
{
title: "物料名称",
dataIndex: "materieName",
key: "materieName",
},
{
title: "批次号/SN号",
dataIndex: "materieControlNo",
key: "materieControlNo",
},
{
title: "当时库存数量",
dataIndex: "currentNum",
key: "currentNum",
search: false,
},
{
title: "操作数量",
dataIndex: "operateNum",
key: "operateNum",
search: false,
},
{
title: "库存单位",
dataIndex: "productionUnitName",
key: "productionUnitName",
search: false,
},
{
title: "操作类型",
dataIndex: "stockDetailTypeName",
key: "stockDetailTypeName",
},
{
title: "仓库",
dataIndex: "storeName",
key: "storeId",
fieldProps: {
allowClear: true,
showSearch: true,
},
options: {
database: () =>
doFetch({
url: "/ngic-auth/sysStore/selectionBox",
params: { factoryIdList: [] },
}),
params: {},
},
valueType: "select",
},
{
title: "库位",
dataIndex: "storePositionName",
key: "storePositionName",
},
{
title: "相关单号",
dataIndex: "relatedNo",
key: "relatedNo",
},
]
return (
<div>
<AutoTable
{...props}
pageextra="none"
path="/ngic-workmanship/wmsMaterieStockRecord/queryList"
columns={columns}
></AutoTable>
</div>
);
}
export default Instore;
.sitelayout {
min-height: calc(100vh - 98px) !important;
.sitelayoutbackground {
background: #fff;
}
}
.title{
margin: 0px;
}
\ No newline at end of file
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);
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) {
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,
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);
This diff is collapsed.
This diff is collapsed.
export default {
dicName: {
value: null,
type: "input",
title: "数据名称",
name: ["dicName"],
required: true,
col: { span: 24 },
},
dicDescription: {
value: null,
type: "textarea",
title: "数据描述",
name: ["dicDescription"],
required: false,
col: { span: 24 },
},
};
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
.leftTree {
flex-shrink: 0;
height: 100%;
padding: 14px;
overflow: auto;
}
.rightTable {
flex: 1;
border-left: 1px solid #f0f0f0;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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