Commit 8fed24cd authored by wuhao's avatar wuhao 🎯

asder

parent c65efff5
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
// localhost:8000/api/** -> https://preview.pro.ant.design/api/** // localhost:8000/api/** -> https://preview.pro.ant.design/api/**
"/wms/": { "/wms/": {
// 要代理的地址 // 要代理的地址
target: "http://192.168.40.102:28040/", //39:18040 23/wms/ //60 翔 //18 target: "http://192.168.40.114:28040/", //39:18040 23/wms/ //60 翔 //18
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
"^/wms": "", "^/wms": "",
......
...@@ -68,12 +68,12 @@ const EditTable = ({ ...@@ -68,12 +68,12 @@ const EditTable = ({
//参数获取 //参数获取
let parames = {}; let parames = {};
let ifs = false; let ifs = true;
Object.keys(params).map(it => { Object.keys(params).map(it => {
if (params[it] == "linked") { if (params[it] == "linked") {
parames[it] = record[it] parames[it] = record[it]
if (record[it] == curvaluerow[it]) { if (record[it] != curvaluerow[it]) {
ifs = true; ifs = false;
} }
} else { } else {
parames[it] = params[it] parames[it] = params[it]
...@@ -89,7 +89,8 @@ const EditTable = ({ ...@@ -89,7 +89,8 @@ const EditTable = ({
newvalue = newvalue.map((it, i) => { newvalue = newvalue.map((it, i) => {
if (it[rowKey] == record[rowKey]) { if (it[rowKey] == record[rowKey]) {
Object.keys(effectresult).map(items => { Object.keys(effectresult).map(items => {
it[items] = res?.data?.data[effectresult[items]]; let result = res?.data?.data ?? {}
it[items] = result[effectresult[items]];
}) })
} }
editorFormRef.current?.setRowData?.(i, it) editorFormRef.current?.setRowData?.(i, it)
......
...@@ -5,10 +5,14 @@ import { EditableProTable } from "@ant-design/pro-table"; ...@@ -5,10 +5,14 @@ import { EditableProTable } from "@ant-design/pro-table";
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { useModel } from 'umi' import { useModel } from 'umi'
const EditUpload = ({ record, fid }) => { const EditUpload = ({ record, fid ,storeId}) => {
const [value, setvalue] = useState({}); const [value, setvalue] = useState({
[record.id]: record.uploadList
});
const { initialState, setInitialState } = useModel("@@initialState"); const { initialState, setInitialState } = useModel("@@initialState");
console.log('====================================');
console.log(storeId);
console.log('====================================');
useEffect(() => { useEffect(() => {
if (!value) { if (!value) {
return return
...@@ -40,12 +44,12 @@ const EditUpload = ({ record, fid }) => { ...@@ -40,12 +44,12 @@ const EditUpload = ({ record, fid }) => {
columns={[ columns={[
{ {
title: "库位名称", title: "库位名称",
dataIndex: "storeName", dataIndex: "storePositionName",
key: "storePositionId", key: "storePositionId",
search: false, search: false,
valueType: "select", valueType: "select",
request: async () => { request: async () => {
let res = await doFetch({ url: "/ngic-auth/sysStorePosition/queryByStoreId/selection", params: { storeId: record.storeId } }); let res = await doFetch({ url: "/ngic-auth/sysStorePosition/queryByStoreId/selection", params: { storeId: storeId } });
return res?.data?.dataList return res?.data?.dataList
}, },
editable: (text, record, index) => { editable: (text, record, index) => {
...@@ -81,7 +85,7 @@ const EditUpload = ({ record, fid }) => { ...@@ -81,7 +85,7 @@ const EditUpload = ({ record, fid }) => {
], ],
} }
]} ]}
value={[...(record.downloadList ?? []), ...(value[record.id] ?? [])]} value={value[record.id]}
recordCreatorProps={{ recordCreatorProps={{
newRecordType: "dataSource", newRecordType: "dataSource",
record: () => ({ record: () => ({
...@@ -733,8 +737,8 @@ const one = { ...@@ -733,8 +737,8 @@ const one = {
columns={[ columns={[
{ {
title: "库位名称", title: "库位名称",
dataIndex: "storeName", dataIndex: "storePositionName",
key: "storeName", key: "storePositionName",
search: false, search: false,
}, },
{ {
...@@ -744,7 +748,7 @@ const one = { ...@@ -744,7 +748,7 @@ const one = {
search: false, search: false,
} }
]} ]}
dataSource={record.downloadList} dataSource={record.uploadList}
pagination={false} pagination={false}
/>, />,
}, },
...@@ -767,7 +771,7 @@ const one = { ...@@ -767,7 +771,7 @@ const one = {
}, },
{ {
cardTitle: "上架明细", cardTitle: "上架明细",
noPrint:true, noPrint: true,
itemData: [ itemData: [
{ {
key: "materialUploadList", key: "materialUploadList",
...@@ -818,8 +822,8 @@ const one = { ...@@ -818,8 +822,8 @@ const one = {
columns={[ columns={[
{ {
title: "库位名称", title: "库位名称",
dataIndex: "storeName", dataIndex: "storePositionName",
key: "storeName", key: "storePositionName",
search: false, search: false,
}, },
{ {
...@@ -850,7 +854,7 @@ const one = { ...@@ -850,7 +854,7 @@ const one = {
search: false, search: false,
} }
]} ]}
dataSource={record.downloadList} dataSource={record.uploadList}
pagination={false} pagination={false}
/>, />,
}, },
...@@ -859,7 +863,7 @@ const one = { ...@@ -859,7 +863,7 @@ const one = {
], ],
}, },
] ]
}, doinsert = (fid) => ({ }, doinsert = (fid,storeId) => ({
totalCard: [ totalCard: [
//物料详情 //物料详情
{ {
...@@ -944,7 +948,7 @@ const one = { ...@@ -944,7 +948,7 @@ const one = {
}, },
], ],
expandable: { expandable: {
expandedRowRender: record => <EditUpload record={record} fid={fid} />, expandedRowRender: record => <EditUpload record={record} fid={fid} storeId={storeId}/>,
} }
}, },
], ],
......
...@@ -211,7 +211,7 @@ function Instore(props) { ...@@ -211,7 +211,7 @@ function Instore(props) {
"render": (text, record, _, action) => { "render": (text, record, _, action) => {
return [ return [
getPrem("equipmentCustomer_save", action, '上架采集', async () => { getPrem("equipmentCustomer_save", action, '上架采集', async () => {
let extra = defaultFields.doinsert(record.id); let extra = defaultFields.doinsert(record.id,record.storeId);
setdrawprops(s => ({ setdrawprops(s => ({
...s, ...s,
visible: true, visible: true,
......
...@@ -5,10 +5,14 @@ import EditTable from "@/components/EditTable"; ...@@ -5,10 +5,14 @@ import EditTable from "@/components/EditTable";
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { useModel } from 'umi' import { useModel } from 'umi'
const EditUpload = ({ record, fid }) => { const EditUpload = ({ record, fid, storeId }) => {
const [value, setvalue] = useState({}); const [value, setvalue] = useState({
[record.id]: record.downloadList
});
const { initialState, setInitialState } = useModel("@@initialState"); const { initialState, setInitialState } = useModel("@@initialState");
console.log('====================================');
console.log(storeId);
console.log('====================================');
useEffect(() => { useEffect(() => {
if (!value) { if (!value) {
return return
...@@ -40,10 +44,11 @@ const EditUpload = ({ record, fid }) => { ...@@ -40,10 +44,11 @@ const EditUpload = ({ record, fid }) => {
linkconfig={{ linkconfig={{
urlchangeval: { urlchangeval: {
database: (params) => doFetch({ url: "/ngic-workmanship/wmsMaterieStore/queryStoreOne", params }), database: (params) => doFetch({ url: "/ngic-workmanship/wmsMaterieStore/queryStoreOne", params }),
params: { "materieId": "linked" }, params: { "storePositionId": "linked", "materieControlNo": "linked" },
effectresult: { effectresult: {
"productionUnit": "productionUnit", "supplierNo": "supplierNo",
"productionUnitName": "productionUnitName" "supplierName": "supplierName",
"productionNum": "productionNum",
} }
} }
}} }}
...@@ -51,12 +56,12 @@ const EditUpload = ({ record, fid }) => { ...@@ -51,12 +56,12 @@ const EditUpload = ({ record, fid }) => {
columns={[ columns={[
{ {
title: "库位名称", title: "库位名称",
dataIndex: "storeName", dataIndex: "storePositionName",
key: "storePositionId", key: "storePositionId",
search: false, search: false,
valueType: "select", valueType: "select",
request: async () => { request: async () => {
let res = await doFetch({ url: "/ngic-auth/sysStorePosition/queryByStoreId/selection", params: { storeId: record.storeId } }); let res = await doFetch({ url: "/ngic-auth/sysStorePosition/queryByStoreId/selection", params: { storeId: storeId } });
return res?.data?.dataList return res?.data?.dataList
}, },
editable: (text, record, index) => { editable: (text, record, index) => {
...@@ -86,7 +91,10 @@ const EditUpload = ({ record, fid }) => { ...@@ -86,7 +91,10 @@ const EditUpload = ({ record, fid }) => {
dataIndex: "supplierNo", dataIndex: "supplierNo",
key: "supplierNo", key: "supplierNo",
search: false, search: false,
"readonly": true, readonly: true,
render: (dom, row) => {
return (row?.supplierNo ?? '') + " - " + (row?.supplierName ?? '')
}
}, },
{ {
title: "库存数量", title: "库存数量",
...@@ -115,7 +123,7 @@ const EditUpload = ({ record, fid }) => { ...@@ -115,7 +123,7 @@ const EditUpload = ({ record, fid }) => {
], ],
} }
]} ]}
value={[...(record.downloadList ?? []), ...(value[record.id] ?? [])]} value={value[record.id]}
onChange={(vals) => { onChange={(vals) => {
setvalue(s => ({ setvalue(s => ({
...s, ...s,
...@@ -682,8 +690,8 @@ const one = { ...@@ -682,8 +690,8 @@ const one = {
columns={[ columns={[
{ {
title: "库位名称", title: "库位名称",
dataIndex: "storeName", dataIndex: "storePositionName",
key: "storeName", key: "storePositionName",
search: false, search: false,
}, },
{ {
...@@ -716,9 +724,115 @@ const one = { ...@@ -716,9 +724,115 @@ const one = {
}, },
], ],
}, },
{
cardTitle: "强制关闭信息",
itemData: [
{
title: "操作人",
key: "closeUserName",
},
{
title: "操作时间",
key: "closeTime",
}
],
},
{
cardTitle: "下架明细",
noPrint: true,
itemData: [
{
key: "materialDownloadList",
type: "table",
col: { span: 24 },
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,
},
],
expandable: {
defaultExpandAllRows: true,
expandedRowRender: record => <Table
style={{ marginLeft: 48 }}
columns={[
{
title: "库位名称",
dataIndex: "storePositionName",
key: "storePositionName",
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,
}
,
{
title: "备注",
dataIndex: "remark",
key: "remark",
search: false,
}
,
{
title: "操作人",
dataIndex: "uploadUserName",
key: "uploadUserName",
search: false,
}
,
{
title: "操作时间",
dataIndex: "uploadTime",
key: "uploadTime",
search: false,
}
]}
dataSource={record.downloadList}
pagination={false}
/>,
},
pagination: "false"
},
],
},
] ]
}, },
dooutside = (fid) => ({ dooutside = (fid, storeId) => ({
totalCard: [ totalCard: [
//物料详情 //物料详情
{ {
...@@ -788,7 +902,7 @@ const one = { ...@@ -788,7 +902,7 @@ const one = {
}, },
], ],
expandable: { expandable: {
expandedRowRender: record => <EditUpload record={record} fid={fid} />, expandedRowRender: record => <EditUpload record={record} fid={fid} storeId={storeId} />,
} }
}, },
], ],
......
...@@ -10,6 +10,7 @@ import defaultFields from "./fields"; ...@@ -10,6 +10,7 @@ import defaultFields from "./fields";
import { doFetch } from "@/utils/doFetch"; import { doFetch } from "@/utils/doFetch";
import DrawInitForm from "@/components/DrawInitForm"; import DrawInitForm from "@/components/DrawInitForm";
import getPrem from '@/utils/getPrem';//权限判断fn import getPrem from '@/utils/getPrem';//权限判断fn
import { useReactToPrint } from 'react-to-print';
const keytoval = { const keytoval = {
...@@ -67,7 +68,8 @@ function Instore(props) { ...@@ -67,7 +68,8 @@ function Instore(props) {
width:1200 width:1200
}), }),
actionRef = useRef(), actionRef = useRef(),
ChildRef = null; ChildRef = null,
printRef = useRef();
//操作完成后刷新 //操作完成后刷新
function reload() { function reload() {
...@@ -80,6 +82,11 @@ function Instore(props) { ...@@ -80,6 +82,11 @@ function Instore(props) {
})) }))
} }
const handlePrint = useReactToPrint({
content: () => printRef.current,
});
const columns = useMemo(() => { const columns = useMemo(() => {
if (activeTabKey == "1") { if (activeTabKey == "1") {
return [ return [
...@@ -98,7 +105,15 @@ function Instore(props) { ...@@ -98,7 +105,15 @@ function Instore(props) {
title: `查看详情`, title: `查看详情`,
...defaultFields?.detail, ...defaultFields?.detail,
totalPath: "/ngic-workmanship/wmsMaterieOutstore/getOutStoreInfoById", totalPath: "/ngic-workmanship/wmsMaterieOutstore/getOutStoreInfoById",
totalParams: { id: record.id } totalParams: { id: record.id },
printRef: printRef,
extra: (<Button
onClick={async () => {
handlePrint()
}}
>
打印
</Button>)
})) }))
}} }}
>{dom}</a> >{dom}</a>
...@@ -198,7 +213,7 @@ function Instore(props) { ...@@ -198,7 +213,7 @@ function Instore(props) {
return [ return [
getPrem("equipmentCustomer_save", action, '下架采集', async () => { getPrem("equipmentCustomer_save", action, '下架采集', async () => {
let extra = defaultFields.dooutside(record.id); let extra = defaultFields.dooutside(record.id,record.storeId);
setdrawprops(s => ({ setdrawprops(s => ({
...s, ...s,
visible: true, visible: true,
......
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