Commit a5dffbe5 authored by wuhao's avatar wuhao 🎯

asder

parent 3e98328f
...@@ -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.18:18040/", //39:18040 23/wms/ //60 翔 //18 target: "http://192.168.40.215:18040/", //39:18040 23/wms/ //60 翔 //18
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
"^/wms": "", "^/wms": "",
......
...@@ -259,15 +259,12 @@ const Materiel = (props) => { ...@@ -259,15 +259,12 @@ const Materiel = (props) => {
{ {
title: "库存单位", title: "库存单位",
dataIndex: "productionUnitName", dataIndex: "productionUnitName",
key: "productionUnitName", key: "productionUnit",
options: { options: {
database: () => doFetch({ url: "/ngic-base-business/sysDic/queryMaterieUnitSelect" }), database: () => doFetch({ url: "/ngic-base-business/sysDic/queryMaterieUnitSelect" }),
params: {} params: {}
}, },
valueType: "select", valueType: "select",
formItemProps: {
name: "productionUnit",
},
}, },
......
import { factorySelect, shopSelectByFactory } from "@/services/system"; import { factorySelect, shopSelectByFactory } from "@/services/system";
import { doFetch } from "@/utils/doFetch";
import regValue from "@/utils/regValue"; import regValue from "@/utils/regValue";
export default {
processLineCode: {
value: null, const one = {
type: "input", "materieInstoreNo": {
title: "工艺路线编号", "value": null,
name: ["processLineCode"], "type": "input",
required: true, "title": "入库单号",
"name": [
"materieInstoreNo"
],
"required": false
}, },
processLineName: { "storeId": {
value: null, "value": null,
type: "input", "type": "select",
title: "工艺路线名称", "title": "仓库",
name: ["processLineName"], "name": [
required: true, "storeId"
],
"required": true,
"options": {
database: () => doFetch({ url: "/ngic-auth/sysStore/selectionBox", params: { factoryIdList: [] } }),
params: {}
},
}, },
factoryId: { "supplierId": {
value: null, "value": null,
type: "select", "type": "select",
title: "所属工厂", "title": "供应商",
name: ["factoryId"], "name": [
required: true, "supplierId"
options: { ],
database: factorySelect, "required": true,
params: {}, "options": {
database: () => doFetch({ url: "/ngic-auth/sysSupplier/query/selection", params: { } }),
params: {}
}, },
linked: true,
}, },
shopId: { "businessNo": {
value: null, "value": null,
type: "select", "type": "input",
title: "所属车间", "title": "相关单号",
name: ["shopId"], "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, required: true,
belinked: { columns: [
options: { {
database: shopSelectByFactory, "title": "物料编码-名称",
params: { factoryId: "linked" }, "dataIndex": "materieId",
"key": "materieId",
"valueType":"select",
"width":300,
"request":async ()=>{
let res = await doFetch({url:"/ngic-workmanship/pmMaterie/query/selectbox",params:{}})
console.log(res);
return res?.data?.dataList
},
"fieldProps":{
allowClear:true,
showSearch:true
}
}, },
},
linked: true,
},
processLineType: {
value: null,
type: "select",
title: "工艺路线类型",
name: ["processLineType"],
required: false,
options: [
{ {
label: "常规", "title": "批次号/SN号",
value: 1, "dataIndex": "materieControlNo",
"key": "materieControlNo"
}, },
{ {
label: "返工", "title": "入库数量",
value: 2, "dataIndex": "instroeNum",
"key": "instroeNum"
},
{
"title": "单位",
"dataIndex": "productionUnit",
"key": "productionUnit"
},
{
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
}, },
capacity: { "storeId": {
value: null, "value": null,
type: "inputnumber", "type": "select",
title: "能力", "title": "仓库",
name: ["capacity"], "name": [
required: false, "storeId"
...regValue(null, 6, 3), ],
"required": true,
"options": {
database: () => doFetch({ url: "/ngic-auth/sysStore/selectionBox", params: { factoryIdList: [] } }),
params: {}
},
}, },
remark: { "supplierId": {
value: null, "value": null,
type: "textarea", "type": "select",
title: "描述", "title": "供应商",
name: ["remark"], "name": [
required: false, "supplierId"
col: { span: 24 }, ],
"required": true,
"options": {
database: () => doFetch({ url: "/ngic-auth/sysSupplier/query/selection", params: { factoryIdList: [] } }),
params: {}
},
}, },
materieProductUnitList: { "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: [], value: [],
title: "转换单位", title: "物料信息",
type: "table", type: "table",
col: { span: 24 }, col: { span: 24 },
name: ["materieProductUnitList"], name: ["materialList"],
required: true, required: true,
columns: [ columns: [
{ {
title: "辅助单位", "title": "物料名称",
dataIndex: "productionUnit", "dataIndex": "materieName",
key: "productionUnit", "key": "materieName"
search: false, },
valueType: "select", {
request: async () => { "title": "物料编码",
let res = await doFetch({url:"/ngic-base-business/sysDic/queryMaterieUnitSelect",params:{}}) "dataIndex": "materieCode",
return res?.data?.dataList "key": "materieCode"
},
}, },
{ {
title: "转换比", "title": "批次号/SN号",
dataIndex: "conversionRate", "dataIndex": "materieControlNo",
key: "conversionRate", "key": "materieControlNo"
search: false, },
valueType: "digit", {
width:200 "title": "入库数量",
"dataIndex": "instroeNum",
"key": "instroeNum"
},
{
"title": "单位",
"dataIndex": "productionUnit",
"key": "productionUnit"
}, },
{ {
title: "操作", title: "操作",
...@@ -113,5 +215,17 @@ export default { ...@@ -113,5 +215,17 @@ export default {
}, },
], ],
rowKey: "id", rowKey: "id",
}, }
},
three = {},
four = {}
export default {
one,
two,
three,
four
}; };
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useMemo, useRef, useState } from "react";
import { import {
Dropdown,
Menu,
Button, Button,
Tooltip, Tooltip,
Row, Row,
...@@ -26,9 +28,11 @@ import { ...@@ -26,9 +28,11 @@ import {
ArrowDownOutlined, ArrowDownOutlined,
ArrowUpOutlined, ArrowUpOutlined,
} from "@ant-design/icons"; } from "@ant-design/icons";
import getPrem from '@/utils/getPrem';//权限判断fn
function Instore(props) { function Instore(props) {
console.log(defaultFields)
const [activeTabKey, onTabChange] = useState("1"); const [activeTabKey, onTabChange] = useState("1");
const [drawprops, setdrawprops] = useState({ const [drawprops, setdrawprops] = useState({
title: "", title: "",
...@@ -39,33 +43,208 @@ function Instore(props) { ...@@ -39,33 +43,208 @@ function Instore(props) {
visible: false, visible: false,
})) }))
}, },
fields: defaultFields fields: {}
}); });
const columns = useMemo(() => {
return [
{
"title": "入库单号",
"dataIndex": "materieInstoreNo",
"key": "materieInstoreNo"
},
{
"title": "入库类型",
"dataIndex": "instoreTypeName",
"key": "instoreType",
"valueType": "select",
"options": [
{
"label": "采购入库",
"value": "1"
},
{
"label": "生产入库",
"value": "2"
},
{
"label": "退料入库",
"value": "3"
},
{
"label": "其他入库",
"value": "4"
}
]
},
{
"title": "入库仓库",
"dataIndex": "storeName",
"key": "storeId",
options: {
database: () => doFetch({ url: "/ngic-auth/sysStore/selectionBox", params: { factoryIdList: [] } }),
params: {}
},
valueType: "select",
},
{
"title": "相关单号",
"dataIndex": "businessNo",
"key": "businessNo"
},
{
"title": "备注",
"dataIndex": "remark",
"key": "remark",
"search": false
},
{
"title": "创建人",
"dataIndex": "createUserName",
"key": "createUserName"
},
{
"title": "创建时间",
"dataIndex": "createTime",
"key": "createTime",
"search": false
},
{
"title": "创建时间开始时间",
"dataIndex": "createTimeStart",
"key": "createTimeStart",
"valueType": "date",
"hideInTable": true
},
{
"title": "创建时间结束时间",
"dataIndex": "createTimeEnd",
"key": "createTimeEnd",
"valueType": "date",
"hideInTable": true
},
{
"title": "状态",
"dataIndex": "statusName",
"key": "statusName",
"valueType": "select",
"request": [
{
"label": "待上架",
"value": "0"
},
{
"label": "上架中",
"value": "1"
}
]
},
{
"title": "操作",
"valueType": "option",
"width": 240,
"render": (text, row, _, action) => {
return [
getPrem("equipmentCustomer_save", action, '上架采集', async () => {
}),
getPrem("equipmentCustomer_deleteById", action, '关单', null, {
title: "确认关单?",
onConfirm: () => {
run({ url: "/ngic-auth/sysCustomer/deleteById", params: { id: record.id } })
}
}),
getPrem("equipmentCustomer_deleteById", action, '删除', null, {
title: "确认删除?",
onConfirm: () => {
run({ url: "/ngic-auth/sysCustomer/deleteById", params: { id: record.id } })
}
})
];
}
}
]
}, [activeTabKey])
const tableprops = { const tableprops = {
...props, ...props,
addconfig: { // addconfig: {
premkey: "sysDepartment_save", // premkey: "sysDepartment_save",
btnprops: {}, // btnprops: {},
onClick: () => { // onClick: () => {
// setdrawprops(s => ({
// ...s,
// visible: true,
// title: "新增",
// width: 600
// }))
// },
// },
// exportconfig: {
// premkey: "sysDepartment_save",
// btnprops: {
// },
// onClick: () => {
// alert(1)
// },
// },
pageextra: activeTabKey == "1" ? <Dropdown placement="bottomRight" overlay={<Menu
onClick={(e) => {
console.log(e.key)
setdrawprops(s => ({ setdrawprops(s => ({
...s, ...s,
visible: true, visible: true,
title: "新增", title: "新增",
width:600 width: 800,
fields:defaultFields[e.key],
instoreType:e.key
})) }))
}, }}
}, items={[
exportconfig: { {
premkey: "sysDepartment_save", key: 'one',
btnprops: { label: (
}, <a>
onClick: () => { 采购入库
alert(1) </a>
}, ),
}, },
pageextra: activeTabKey == "1" ? "add" : "none", {
key: 'two',
label: (
<a>
生产入库
</a>
),
},
{
key: 'three',
label: (
<a>
退料入库
</a>
),
},
{
key: 'four',
label: (
<a>
其他入库
</a>
),
},
]}
/>}>
<Button type="primary">新增</Button>
</Dropdown> : "none",
tabList: [ tabList: [
{ {
tab: "未完成", tab: "未完成",
...@@ -76,7 +255,9 @@ function Instore(props) { ...@@ -76,7 +255,9 @@ function Instore(props) {
} }
], ],
activeTabKey, activeTabKey,
onTabChange onTabChange,
columns,
path: "/ngic-workmanship/wmsMaterieInstore/queryList"
} }
......
...@@ -488,7 +488,7 @@ const Formpage = (props) => { ...@@ -488,7 +488,7 @@ const Formpage = (props) => {
detailList, detailList,
...editId ...editId
}; };
run({ url: "/qj/ngic-base-business/paBusinessMsgOption/save", params: { ...params } }) run({ url: "/ngic-base-business/paBusinessMsgOption/save", params: { ...params } })
}) })
......
...@@ -299,7 +299,7 @@ const Pushdeploy = (props) => { ...@@ -299,7 +299,7 @@ const Pushdeploy = (props) => {
getPrem("paBusinessMsgOption_deleteById", action, "删除", null, { getPrem("paBusinessMsgOption_deleteById", action, "删除", null, {
title: "确认删除该推送配置?", title: "确认删除该推送配置?",
onConfirm: () => { onConfirm: () => {
run({ url: "/qj/ngic-base-business/paBusinessMsgOption/deleteById", params: { id: record.id } }) run({ url: "/ngic-base-business/paBusinessMsgOption/deleteById", params: { id: record.id } })
} }
}) })
} }
......
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