Commit ec35a8d1 authored by wuhao's avatar wuhao 🎯

asder

parent 0103c46e
......@@ -11,7 +11,7 @@ export default {
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
"/wms/": {
// 要代理的地址
target: "http://192.168.40.114:18040/", //39:18040 23/wms/ //60 翔 //18
target: "http://192.168.40.114:28040/", //39:18040 23/wms/ //60 翔 //18
changeOrigin: true,
pathRewrite: {
"^/wms": "",
......
......@@ -61,6 +61,7 @@
"lodash": "^4.17.0",
"moment": "^2.29.1",
"omit.js": "^2.0.2",
"print-js": "^1.6.0",
"rc-menu": "^9.1.0",
"rc-util": "^5.16.0",
"react": "^17.0.0",
......
......@@ -11,11 +11,13 @@ const EditTable = ({
rowKey,
recordCreatorProps,
maxLength,
linkconfig
linkconfig,
style
}) => {
const editorFormRef = useRef()
return (
<EditableProTable
style={{ ...(style ?? {}) }}
columns={columns}
rowKey={rowKey}
value={value || []}
......@@ -84,7 +86,6 @@ const EditTable = ({
} else {
let res = await database(parames);
console.log(newvalue);
newvalue = newvalue.map((it, i) => {
if (it[rowKey] == record[rowKey]) {
Object.keys(effectresult).map(items => {
......
import { factorySelect, shopSelectByFactory } from "@/services/system";
import { doFetch } from "@/utils/doFetch";
import { Table } from "antd";
const one = {
"materieInstoreNo": {
"value": null,
"type": "input",
"title": "入库单号",
"name": [
"materieInstoreNo"
],
"required": false
},
"storeId": {
"value": null,
"type": "select",
"title": "仓库",
"name": [
"storeId"
],
"required": true,
"options": {
database: () => doFetch({ url: "/ngic-auth/sysStore/selectionBox", params: { factoryIdList: [] } }),
params: {}
},
},
"supplierId": {
"value": null,
"type": "select",
"title": "供应商",
"name": [
"supplierId"
],
"required": true,
"options": {
database: () => doFetch({ url: "/ngic-auth/sysSupplier/query/selection", params: {} }),
params: {}
},
},
"businessNo": {
"value": null,
"type": "input",
"title": "相关单号",
"name": [
"businessNo"
],
"required": false
},
"remark": {
"value": null,
"type": "textarea",
"title": "备注",
"name": [
"remark"
],
"required": false,
"col": {
"span": 24
}
},
"materialList": {
value: [],
title: "物料信息",
type: "table",
col: { span: 24 },
name: ["materialList"],
required: true,
linkconfig: {
urlchangeval: {//根据url接口 改变某个value
database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterie/queryUnitByMaterieId", params }),
params: { "materieId": "linked" },
effectresult: {
"productionUnit": "productionUnit",//key 为列表更新值 value为response 返回值
"productionUnitName": "productionUnitName"
}
}
},
columns: [
{
"title": <span>物料编码-名称 <b style={{ color: "red" }}>*</b></span>,
"dataIndex": "materieId",
"key": "materieId",
"valueType": "select",
"width": 300,
"request": async () => {
let res = await doFetch({ url: "/ngic-workmanship/pmMaterie/query/selectbox", params: {} })
return res?.data?.dataList
},
"fieldProps": {
allowClear: false,
showSearch: true
},
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
},
{
"title": "批次号/SN号",
"dataIndex": "materieControlNo",
"key": "materieControlNo"
},
{
"title": <span>入库数量 <b style={{ color: "red" }}>*</b></span>,
"dataIndex": "instroeNum",
"key": "instroeNum",
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
},
{
"title": "单位",
"dataIndex": "productionUnitName",
"key": "productionUnitName",
"readonly": 'productionUnitName',
"width": 60
},
{
title: "操作",
valueType: "option",
width: 70,
render: (text, record, _, action) => [
<a key="delete" onClick={() => { }}>
删除
</a>,
],
},
],
rowKey: "id",
}
},
two = {
"materieInstoreNo": {
"value": null,
"type": "input",
"title": "入库单号",
"name": [
"materieInstoreNo"
],
"required": false
},
"storeId": {
"value": null,
"type": "select",
"title": "仓库",
"name": [
"storeId"
],
"required": true,
"options": {
database: () => doFetch({ url: "/ngic-auth/sysStore/selectionBox", params: { factoryIdList: [] } }),
params: {}
},
},
"supplierId": {
"value": "2022070124566476657",
"type": "select",
"title": "供应商",
"name": [
"supplierId"
],
"required": true,
"disabled": true,
"options": [
{
value: "2022070124566476657",
label: "南高(默认)"
}
],
},
"businessNo": {
"value": null,
"type": "input",
"title": "相关单号",
"name": [
"businessNo"
],
"required": false
},
"remark": {
"value": null,
"type": "textarea",
"title": "备注",
"name": [
"remark"
],
"required": false,
"col": {
"span": 24
}
},
"materialList": {
value: [],
title: "物料信息",
type: "table",
col: { span: 24 },
name: ["materialList"],
required: true,
linkconfig: {
urlchangeval: {//根据url接口 改变某个value
database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterie/queryUnitByMaterieId", params }),
params: { "materieId": "linked" },
effectresult: {
"productionUnit": "productionUnit",//key 为列表更新值 value为response 返回值
"productionUnitName": "productionUnitName"
}
}
},
columns: [
{
"title": <span>物料编码-名称 <b style={{ color: "red" }}>*</b></span>,
"dataIndex": "materieId",
"key": "materieId",
"valueType": "select",
"width": 300,
"request": async () => {
let res = await doFetch({ url: "/ngic-workmanship/pmMaterie/query/selectbox", params: {} })
return res?.data?.dataList
},
"fieldProps": {
allowClear: false,
showSearch: true
},
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
},
{
"title": "批次号/SN号",
"dataIndex": "materieControlNo",
"key": "materieControlNo"
},
{
"title": <span>入库数量 <b style={{ color: "red" }}>*</b></span>,
"dataIndex": "instroeNum",
"key": "instroeNum",
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
},
{
"title": "单位",
"dataIndex": "productionUnitName",
"key": "productionUnitName",
"readonly": 'productionUnitName',
"width": 60
},
{
title: "操作",
valueType: "option",
width: 70,
render: (text, record, _, action) => [
<a key="delete" onClick={() => { }}>
删除
</a>,
],
},
],
rowKey: "id",
}
},
three = {
"materieInstoreNo": {
"value": null,
"type": "input",
"title": "入库单号",
"name": [
"materieInstoreNo"
],
"required": false
},
"storeId": {
"value": null,
"type": "select",
"title": "仓库",
"name": [
"storeId"
],
"required": true,
"options": {
database: () => doFetch({ url: "/ngic-auth/sysStore/selectionBox", params: { factoryIdList: [] } }),
params: {}
},
},
"businessNo": {
"value": null,
"type": "input",
"title": "相关单号",
"name": [
"businessNo"
],
"required": false
},
"remark": {
"value": null,
"type": "textarea",
"title": "备注",
"name": [
"remark"
],
"required": false,
"col": {
"span": 24
}
},
"materialList": {
value: [],
title: "物料信息",
type: "table",
col: { span: 24 },
name: ["materialList"],
required: true,
linkconfig: {
urlchangeval: {//根据url接口 改变某个value
database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterie/queryUnitByMaterieId", params }),
params: { "materieId": "linked" },
effectresult: {
"productionUnit": "productionUnit",//key 为列表更新值 value为response 返回值
"productionUnitName": "productionUnitName"
}
}
},
columns: [
{
"title": <span>物料编码-名称 <b style={{ color: "red" }}>*</b></span>,
"dataIndex": "materieId",
"key": "materieId",
"valueType": "select",
"width": 300,
"request": async () => {
let res = await doFetch({ url: "/ngic-workmanship/pmMaterie/query/selectbox", params: {} })
return res?.data?.dataList
},
"fieldProps": {
allowClear: false,
showSearch: true
},
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
},
{
"title": <span>供应商编号-名称 <b style={{ color: "red" }}>*</b></span>,
"dataIndex": "supplierId",
"key": "supplierId",
"valueType": "select",
"width": 300,
"request": async () => {
let res = await doFetch({ url: "/ngic-auth/sysSupplier/query/selection/withNo", params: {} })
return res?.data?.dataList
},
"fieldProps": {
allowClear: false,
showSearch: true
},
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
},
{
"title": "批次号/SN号",
"dataIndex": "materieControlNo",
"key": "materieControlNo"
},
{
"title": <span>入库数量 <b style={{ color: "red" }}>*</b></span>,
"dataIndex": "instroeNum",
"key": "instroeNum",
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
},
{
"title": "单位",
"dataIndex": "productionUnitName",
"key": "productionUnitName",
"readonly": 'productionUnitName',
"width": 60
},
{
title: "操作",
valueType: "option",
width: 70,
render: (text, record, _, action) => [
<a key="delete" onClick={() => { }}>
删除
</a>,
],
},
],
rowKey: "id",
}
},
four = {
"materieInstoreNo": {
"value": null,
"type": "input",
"title": "入库单号",
"name": [
"materieInstoreNo"
],
"required": false
},
"storeId": {
"value": null,
"type": "select",
"title": "仓库",
"name": [
"storeId"
],
"required": true,
"options": {
database: () => doFetch({ url: "/ngic-auth/sysStore/selectionBox", params: { factoryIdList: [] } }),
params: {}
},
},
"businessNo": {
"value": null,
"type": "input",
"title": "相关单号",
"name": [
"businessNo"
],
"required": false
},
"remark": {
"value": null,
"type": "textarea",
"title": "备注",
"name": [
"remark"
],
"required": false,
"col": {
"span": 24
}
},
"materialList": {
value: [],
title: "物料信息",
type: "table",
col: { span: 24 },
name: ["materialList"],
required: true,
linkconfig: {
urlchangeval: {//根据url接口 改变某个value
database: (params) => doFetch({ url: "/ngic-workmanship/pmMaterie/queryUnitByMaterieId", params }),
params: { "materieId": "linked" },
effectresult: {
"productionUnit": "productionUnit",//key 为列表更新值 value为response 返回值
"productionUnitName": "productionUnitName"
}
}
},
columns: [
{
"title": <span>物料编码-名称 <b style={{ color: "red" }}>*</b></span>,
"dataIndex": "materieId",
"key": "materieId",
"valueType": "select",
"width": 300,
"request": async () => {
let res = await doFetch({ url: "/ngic-workmanship/pmMaterie/query/selectbox", params: {} })
return res?.data?.dataList
},
"fieldProps": {
allowClear: false,
showSearch: true
},
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
},
{
"title": <span>供应商编号-名称 <b style={{ color: "red" }}>*</b></span>,
"dataIndex": "supplierId",
"key": "supplierId",
"valueType": "select",
"width": 300,
"request": async () => {
let res = await doFetch({ url: "/ngic-auth/sysSupplier/query/selection/withNo", params: {} })
return res?.data?.dataList
},
"fieldProps": {
allowClear: false,
showSearch: true
},
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
},
{
"title": "批次号/SN号",
"dataIndex": "materieControlNo",
"key": "materieControlNo"
},
{
"title": <span>入库数量 <b style={{ color: "red" }}>*</b></span>,
"dataIndex": "instroeNum",
"key": "instroeNum",
"formItemProps": () => {
return {
rules: [{ required: true, message: '此项为必填项' }],
};
},
},
{
"title": "单位",
"dataIndex": "productionUnitName",
"key": "productionUnitName",
"readonly": 'productionUnitName',
"width": 60
},
{
title: "操作",
valueType: "option",
width: 70,
render: (text, record, _, action) => [
<a key="delete" onClick={() => { }}>
删除
</a>,
],
},
],
rowKey: "id",
}
},
detail = {
totalCard: [
//物料详情
{
cardTitle: "基本信息",
itemData: [
{
title: "入库单号",
key: "materieInstoreNo",
},
{
title: "入库类型",
key: "instoreTypeName",
},
{
title: "入库仓库",
key: "storeName",
},
{
title: "相关单号",
key: "businessNo",
},
{
title: "备注",
key: "remark",
},
{
title: "创建人",
key: "createUserName",
},
{
title: "创建时间",
key: "createTime",
},
],
},
{
cardTitle: "物料信息列表",
itemData: [
{
key: "materialList",
type: "table",
col: { span: 24 },
columns: [
{
title: "物料名称",
dataIndex: "materieName",
key: "materieName",
search: false,
},
{
title: "物料编码",
dataIndex: "materieCode",
key: "materieCode",
search: false,
},
{
title: "入库数量",
dataIndex: "instroeNum",
key: "instroeNum",
search: false,
},
{
title: "单位",
dataIndex: "productionUnitName",
key: "productionUnitName",
search: false,
},
],
expandable: {
expandedRowRender: record => <Table
style={{ marginLeft: 48 }}
columns={[
{
title: "库位名称",
dataIndex: "storeName",
key: "storeName",
search: false,
},
{
title: "上架数量",
dataIndex: "instroeNum",
key: "instroeNum",
search: false,
}
]}
dataSource={record.uploadList}
pagination={false}
/>,
}
},
],
},
]
};
export default {
one,
two,
three,
four,
detail
};
......@@ -6,10 +6,6 @@ import {
message,
} from "antd";
import AutoTable from "@/components/AutoTable";
import defaultFields from "./fields";
import { doFetch } from "@/utils/doFetch";
import DrawInitForm from "@/components/DrawInitForm";
import getPrem from '@/utils/getPrem';//权限判断fn
function Instore(props) {
const actionRef = useRef(),
......
......@@ -23,7 +23,7 @@ const EditUpload = ({ record, fid }) => {
id,
uploadList: value[id]?.map(its => {
return {
storeId: its?.storeId,
storePositionId: its?.storePositionId,
instroeNum: its?.instroeNum,
remark: its?.remark
}
......@@ -41,11 +41,11 @@ const EditUpload = ({ record, fid }) => {
{
title: "库位名称",
dataIndex: "storeName",
key: "storeId",
key: "storePositionId",
search: false,
valueType: "select",
request: async () => {
let res = await doFetch({ url: "/ngic-auth/sysStore/selectionBox", params: { factoryIdList: [] } });
let res = await doFetch({ url: "/ngic-auth/sysStorePosition/queryByStoreId/selection", params: { storeId: record.storeId } });
return res?.data?.dataList
},
editable: (text, record, index) => {
......@@ -750,6 +750,19 @@ const one = {
},
],
},
{
cardTitle: "强制关闭信息",
itemData: [
{
title: "操作人",
key: "closeUserName",
},
{
title: "操作时间",
key: "closeTime",
}
],
},
]
}, doinsert = (fid) => ({
totalCard: [
......
......@@ -98,7 +98,11 @@ function Instore(props) {
title: `查看详情`,
...defaultFields?.detail,
totalPath: "/ngic-workmanship/wmsMaterieInstore/getInStoreInfoById",
totalParams: { id: record.id }
totalParams: { id: record.id },
extra: (<Button>
打印
</Button>)
}))
}}
>{dom}</a>
......
import { factorySelect, shopSelectByFactory } from "@/services/system";
import { doFetch } from "@/utils/doFetch";
import { Button, Table } from "antd";
import { EditableProTable } from "@ant-design/pro-table";
import EditTable from "@/components/EditTable";
import { useEffect, useState } from 'react'
import { useModel } from 'umi'
......@@ -21,12 +21,12 @@ const EditUpload = ({ record, fid }) => {
let id = it;
return {
id,
uploadList: value[id]?.map(its => {
downloadList: value[id]?.map(its => {
return {
storeId: its?.storeId,
storePositionId: its?.storePositionId,
outstroeNum: its?.outstroeNum,
remark: its?.remark,
materieControlNo:its?.materieControlNo
materieControlNo: its?.materieControlNo
}
})
}
......@@ -35,18 +35,28 @@ const EditUpload = ({ record, fid }) => {
}))
}, [value])
return <EditableProTable
return <EditTable
maxLength={1000}
linkconfig={{
urlchangeval: {
database: (params) => doFetch({ url: "/ngic-workmanship/wmsMaterieStore/queryStoreOne", params }),
params: { "materieId": "linked" },
effectresult: {
"productionUnit": "productionUnit",
"productionUnitName": "productionUnitName"
}
}
}}
style={{ marginLeft: 48 }}
columns={[
{
title: "库位名称",
dataIndex: "storeName",
key: "storeId",
key: "storePositionId",
search: false,
valueType: "select",
request: async () => {
let res = await doFetch({ url: "/ngic-auth/sysStore/selectionBox", params: { factoryIdList: [] } });
let res = await doFetch({ url: "/ngic-auth/sysStorePosition/queryByStoreId/selection", params: { storeId: record.storeId } });
return res?.data?.dataList
},
editable: (text, record, index) => {
......@@ -71,6 +81,20 @@ const EditUpload = ({ record, fid }) => {
return !record.materieOutstoreDetailId
}
},
{
title: "供应商编号-名称",
dataIndex: "supplierNo",
key: "supplierNo",
search: false,
"readonly": true,
},
{
title: "库存数量",
dataIndex: "productionNum",
key: "productionNum",
search: false,
"readonly": true,
},
{
title: "备注",
dataIndex: "remark",
......@@ -92,23 +116,11 @@ const EditUpload = ({ record, fid }) => {
}
]}
value={[...(record.downloadList ?? []), ...(value[record.id] ?? [])]}
recordCreatorProps={{
newRecordType: "dataSource",
record: () => ({
id: Date.now(),
}),
}}
editable={{
type: "multiple",
actionRender: (row, config, defaultDoms) => {
return [defaultDoms.delete];
},
onValuesChange: async (records, recordList) => {
setvalue(s => ({
...s,
[record.id]: recordList
}));
},
onChange={(vals) => {
setvalue(s => ({
...s,
[record.id]: vals
}));
}}
pagination={false}
/>
......@@ -674,14 +686,30 @@ const one = {
key: "storeName",
search: false,
},
{
title: "批次号/SN号",
dataIndex: "materieControlNo",
key: "materieControlNo",
search: false,
},
{
title: "供应商编号-名称",
dataIndex: "supplierNo",
key: "supplierNo",
search: false,
render: (dom, row) => {
return (row?.supplierNo ?? '') + " - " + (row?.supplierName ?? '')
}
},
{
title: "下架数量",
dataIndex: "outstroeNum",
key: "outstroeNum",
search: false,
}
]}
dataSource={record.uploadList}
dataSource={record.downloadList}
pagination={false}
/>,
}
......
......@@ -7,7 +7,7 @@ import InitForm from '@/components/InitForm';
import { doFetch } from '@/utils/doFetch';
import { tableField } from "./fields";
import moment from "moment";
import { factory, allDepartment, allShop, allSection, roleList, currentUserList } from "@/services/system";
import { factory, allDepartment, allShop, depart, selectionBoxAll,roleList, currentUserList } from "@/services/system";
const { TextArea } = Input,
{ Paragraph } = Typography;
......@@ -515,13 +515,10 @@ const Formpage = (props) => {
database = factory
break;
case 3:
database = allDepartment
database = depart
break;
case 4:
database = allShop
break;
case 5:
database = allSection
database = selectionBoxAll
break;
}
......
......@@ -48,15 +48,15 @@ const addFields = {
"value": 1
},
{
"label": "组织",
"label": "工厂",
"value": 2
},
{
"label": "仓库",
"label": "组织",
"value": 3
},
{
"label": "工厂",
"label": "仓库",
"value": 4
}
]
......
......@@ -233,15 +233,15 @@ const Pushdeploy = (props) => {
"value": 1
},
{
"label": "组织",
"label": "工厂",
"value": 2
},
{
"label": "仓库",
"label": "组织",
"value": 3
},
{
"label": "工厂",
"label": "仓库",
"value": 4
}
]
......
......@@ -189,6 +189,25 @@ export async function factory(params) {
data: params,
});
}
//
// 4 :
//集团下拉框
export async function depart(params) {
return request(`/wms/ngic-auth/sysDepartment/query/selectbox/depart`, {
method: 'POST',
data: params,
});
}
//集团下拉框
export async function selectionBoxAll(params) {
return request(`/wms/ngic-auth/sysStore/selectionBoxAll`, {
method: 'POST',
data: params,
});
}
//下拉框---当前公司下
export async function currentUserList(params) {
return request(`/wms/ngic-auth/sysUser/query/selectbox/current/company`, {
......
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