Yanko 2 mesi fa
parent
commit
080690d818
11 ha cambiato i file con 120 aggiunte e 389 eliminazioni
  1. +2
    -2
      frontend/dist/index.html
  2. +0
    -1
      frontend/dist/p__final__index.87d91eca.async.js
  3. +0
    -1
      frontend/dist/p__workInfo__index.13547015.async.js
  4. +0
    -1
      frontend/dist/p__workInfo__plan.215b450d.async.js
  5. +0
    -1
      frontend/dist/preload_helper.cfa1dc59.js
  6. +0
    -304
      frontend/dist/umi.6e29b3be.js
  7. +10
    -0
      frontend/src/api/finalService.ts
  8. +2
    -1
      frontend/src/api/work/plan/dto.d.ts
  9. +97
    -77
      frontend/src/pages/final/index.tsx
  10. +8
    -1
      frontend/src/pages/workInfo/index.tsx
  11. +1
    -0
      frontend/src/pages/workInfo/plan.tsx

+ 2
- 2
frontend/dist/index.html Vedi File

@@ -5,10 +5,10 @@
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="/umi.22bc53e6.css">
<script src="/preload_helper.cfa1dc59.js"></script>
<script src="/preload_helper.210d5aab.js"></script>
</head>
<body>
<div id="root"></div>
<script src="/umi.6e29b3be.js"></script>
<script src="/umi.75e0ff74.js"></script>
</body>
</html>

+ 0
- 1
frontend/dist/p__final__index.87d91eca.async.js
File diff soppresso perché troppo grande
Vedi File


+ 0
- 1
frontend/dist/p__workInfo__index.13547015.async.js
File diff soppresso perché troppo grande
Vedi File


+ 0
- 1
frontend/dist/p__workInfo__plan.215b450d.async.js
File diff soppresso perché troppo grande
Vedi File


+ 0
- 1
frontend/dist/preload_helper.cfa1dc59.js Vedi File

@@ -1 +0,0 @@
!function(){"use strict";var t="/".replace(/([^/])$/,"$1/"),e=location.pathname,n=e.startsWith(t)&&decodeURI("/".concat(e.slice(t.length)));if(n){var a=document,c=a.head,r=a.createElement.bind(a),i=function(t,e,n){var a,c=e.r[t]||(null===(a=Object.entries(e.r).find((function(e){var n=e[0];return new RegExp("^".concat(n.replace(/\/:[^/]+/g,"/[^/]+").replace("/*","/.+"),"$")).test(t)})))||void 0===a?void 0:a[1]);return null==c?void 0:c.map((function(t){var a=e.f[t][1],c=e.f[t][0];return{type:c.split(".").pop(),url:"".concat(n.publicPath).concat(c),attrs:[["data-".concat(e.b),"".concat(e.p,":").concat(a)]]}}))}(n,{"p":"ant-design-pro","b":"webpack","f":[["20.ba2fc27d.async.js",20],["p__system__role__index.455b2d03.async.js",24],["p__deviceInfo__index.8878b771.async.js",36],["p__user__login__index.26100c69.chunk.css",37],["p__user__login__index.b934e735.async.js",37],["p__workInfo__plan.215b450d.async.js",43],["119.4e6a5656.async.js",119],["145.301a8164.async.js",145],["p__system__module__index.ef46db37.chunk.css",257],["p__system__module__index.ed9bfb89.async.js",257],["p__materials__index.8b1d798e.async.js",262],["t__plugin-layout__Layout.5012e1ab.chunk.css",301],["t__plugin-layout__Layout.2c017a91.async.js",301],["390.c53868f3.async.js",390],["393.e127e60f.async.js",393],["p__deviceProductInfo__index.835c0c6c.chunk.css",402],["p__deviceProductInfo__index.1f88a9d8.async.js",402],["p__workInfo__index.8c499684.chunk.css",420],["p__workInfo__index.13547015.async.js",420],["p__welcome__index.dde73410.async.js",446],["p__stock__index.3cc68eb4.async.js",450],["p__final__index.49759dc4.chunk.css",460],["p__final__index.87d91eca.async.js",460],["p__system__user__index.695d982e.chunk.css",472],["p__system__user__index.60325376.async.js",472],["t__plugin-maxtabs__Layout.b832af3b.async.js",558],["565.b1a57ede.async.js",565],["p__404.a52587bb.async.js",571],["635.973728c8.async.js",635],["821.b970c16a.async.js",821],["838.1fdf35ab.async.js",838],["p__dict__index.84f57017.async.js",918],["p__plantModel__process.2e985b3e.async.js",988],["p__productLine__line.74e003b9.async.js",990]],"r":{"/*":[27,29],"/":[14,19,25,6,11,12,29,30],"/user/login":[3,4],"/system/user":[6,7,23,24,29,25,11,12,30],"/system/role":[1,6,7,29,25,11,12,30],"/system/module":[6,7,8,9,29,25,11,12,30],"/system/dict":[6,7,29,31,25,11,12,30],"/wmx/deviceProduct":[6,7,15,16,29,25,11,12,30],"/wmx/deviceinfo":[2,6,7,29,25,11,12,30],"/factory/process":[6,7,29,32,25,11,12,30],"/factory/line":[6,7,26,28,29,33,25,11,12,30],"/production/materials":[6,7,10,29,25,11,12,30],"/production/godown":[6,7,20,29,25,11,12,30],"/production/final":[0,6,7,14,21,22,28,29,25,11,12,30],"/work/workPlan":[5,6,7,29,25,11,12,30],"/work/workInfo":[0,6,7,14,17,18,29,25,11,12,30]}},{publicPath:"/"});null==i||i.forEach((function(t){var e,n=t.type,a=t.url;if("js"===n)(e=r("script")).src=a,e.async=!0;else{if("css"!==n)return;(e=r("link")).href=a,e.rel="preload",e.as="style"}t.attrs.forEach((function(t){e.setAttribute(t[0],t[1]||"")})),c.appendChild(e)}))}}();

+ 0
- 304
frontend/dist/umi.6e29b3be.js
File diff soppresso perché troppo grande
Vedi File


+ 10
- 0
frontend/src/api/finalService.ts Vedi File

@@ -81,6 +81,16 @@ export default {
return request(`/api/finalsinfo/linelist/${id}`, {
method: 'GET'
});
},
/**
* 根据成品查询已配置产线
* @param parms
* @returns
*/
FinishLineList(id:string){
return request(`/api/finalsinfo/finishlinelist/${id}`, {
method: 'GET'
});
},
/**
* 未绑定的设备列表


+ 2
- 1
frontend/src/api/work/plan/dto.d.ts Vedi File

@@ -56,7 +56,8 @@ declare namespace workPlanTypes {
interface queryPage {
pageIndex: number,
pageSize: number,
name:string
name:string,
finalId:string
}
/**
* 查询输出参数


+ 97
- 77
frontend/src/pages/final/index.tsx Vedi File

@@ -69,7 +69,7 @@ const final = () => {
const [lineProcessDevList, setLineProcessDevList] = useState<any[]>([])
const [selectDev, setSelectDev] = useState(0)
const [isConfigDevOpen, setisConfigDevOpen] = useState<boolean>(false);
const [m_device,setM_device] = useState<any[]>([])
const [m_device, setM_device] = useState<any[]>([])
const [isSetpModalOpen, setIsSetpModalOpen] = useState(false);
const [isSchemaModalOpen, setIsSchemaModalOpen] = useState(false);
const [deviceParm, setDeviceParm] = useState<any>([]);
@@ -227,7 +227,7 @@ const final = () => {
console.log(res.data);

setFinalLineList(res.data)
UpdateGY(res.data[0].key,record?.id!)
UpdateGY(res.data[0].key, record?.id!)
}
})
const copyFormData = JSON.parse(JSON.stringify(record));
@@ -292,7 +292,7 @@ const final = () => {
const [formula, setformula] = useState([])


const UpdateGY = (lineId:string,finalId:string)=>{
const UpdateGY = (lineId: string, finalId: string) => {
productlineInfoStepsAPI.List({ lineId: lineId, finalId: finalId }).then((res: MyResponse.Content) => {
if (res.statusCode === 200) {
setLineProcessList(res.data);
@@ -368,9 +368,30 @@ const final = () => {
]}
/>
:
<Card size="default" title={'当前配置成品工艺: ' + selectRowItem?.name} styles={{ header: { textAlign: 'center', margin: 'auto', fontSize: '22px' } }} extra={<Button style={{ position: 'absolute', top: '20px', right: '20px' }} icon={<LeftCircleOutlined />} type='primary' size='small' onClick={() => {
setIsLineStepOpen(false)
}}>返回</Button>}>
<Card size="default" title={'当前配置成品工艺: ' + selectRowItem?.name} styles={{ header: { textAlign: 'center', margin: 'auto', fontSize: '22px' } }} extra={
currentproductionline && lineProcessList.length>0 ?
<Popconfirm title="确定要保存当前配置?" onConfirm={(i) => {

finalInfoAPI.Saveconfigstatus({ LineId: currentproductionline.key, finalId: selectRowItem.id }).then((res: MyResponse.Content) => {
if (res.statusCode === 200) {
message.success('保存成功!');
setTimeout(() => {
setIsLineStepOpen(false);
}, 1000);
} else {
message.error(res.errors || res.message);
}
})
}} onCancel={() => {
message.info('未保存配置');
setIsLineStepOpen(false);
}} > <Button style={{ position: 'absolute', top: '20px', right: '20px' }} icon={<LeftCircleOutlined />} type='primary' size='small'>返回</Button>
</Popconfirm> : <Button
onClick={() => {
setIsLineStepOpen(false);
}}
style={{ position: 'absolute', top: '20px', right: '20px' }} icon={<LeftCircleOutlined />} type='primary' size='small'>返回</Button>
}>
<Divider />

<Card title={'选择产线'}>
@@ -422,64 +443,64 @@ const final = () => {
{/* <Button type='primary' danger>取消配置</Button> */}
</Space>
}>
<CheckCard.Group onChange={() => {
<CheckCard.Group onChange={() => {

}} >
<div className={styles.gongyi_tag}>
<Flex wrap gap="small">
{lineProcessList.map((item, index) => (
<div className={styles.gongyi_tag_box} key={index} >
<div

className={`${styles.gongyi_tag_item} ${index === selectProcess ? styles.gongyi_tag_item_activeItem : ''}`}>
<Space size="middle">
<div color="#2db7f5" style={{ fontSize: '22px' }}> 0{index + 1}-{item.processName}</div>
</Space>
<div className={index === selectProcess ? styles.gongyi_tag_item_active : ''}></div>
<Flex wrap gap="small">

</div>
<Card title='所属设备' size="small" bordered={false} style={{ height: '200px', overflowY: 'auto', overflowX: 'hidden' }} className={styles.gongyi_tag_device}>
{
item.devicesInfo.length>0?
<Space title='设备' direction="vertical">
{item.devicesInfo.map((devicesItem: any, devicesIndex: number) => (
<Badge.Ribbon text={devicesItem.status == '0' ? '未配置' : '已配置'} color={devicesItem.status == '0' ? '' : 'pink'}>
<CheckCard onClick={(v) => {
setcurrentproductionProcess(item)
setcurrentproductionDev(devicesItem.code)
setStepTitle(item.processName + '-' + devicesItem.name + '[' + devicesItem.code + ']')
setIsEditModalOpen(true)
const jsondata = {
lineId: currentproductionline.key,
deviceId: devicesItem.code,
finalId: selectRowItem.id,
productLineStepsId: item.id
}
setStepparams(jsondata)
}} size='small' title={devicesItem.name} value={devicesItem.id} />
</Badge.Ribbon>
))}
{lineProcessList.map((item, index) => (
<div className={styles.gongyi_tag_box} key={index} >
<div

className={`${styles.gongyi_tag_item} ${index === selectProcess ? styles.gongyi_tag_item_activeItem : ''}`}>
<Space size="middle">
<div color="#2db7f5" style={{ fontSize: '22px' }}> 0{index + 1}-{item.processName}</div>
</Space>
: <Empty />
}
</Card>
{/* <Card title='备注' size="small" style={{ height: '150px' }}>
<div className={index === selectProcess ? styles.gongyi_tag_item_active : ''}></div>

</div>
<Card title='所属设备' size="small" bordered={false} style={{ height: '200px', overflowY: 'auto', overflowX: 'hidden' }} className={styles.gongyi_tag_device}>
{
item.devicesInfo.length > 0 ?
<Space title='设备' direction="vertical">
{item.devicesInfo.map((devicesItem: any, devicesIndex: number) => (
<Badge.Ribbon text={devicesItem.status == '0' ? '未设置' : '已设置'} color={devicesItem.status == '0' ? '' : 'pink'}>
<CheckCard onClick={(v) => {
setcurrentproductionProcess(item)
setcurrentproductionDev(devicesItem.code)
setStepTitle(item.processName + '-' + devicesItem.name + '[' + devicesItem.code + ']')
setIsEditModalOpen(true)
const jsondata = {
lineId: currentproductionline.key,
deviceId: devicesItem.code,
finalId: selectRowItem.id,
productLineStepsId: item.id
}
setStepparams(jsondata)
}} size='small' title={devicesItem.name} value={devicesItem.id} />
</Badge.Ribbon>
))}
</Space>
: <Empty description='未绑定设备' />
}
</Card>
{/* <Card title='备注' size="small" style={{ height: '150px' }}>
<Input aria-label='备注' />
</Card> */}

<Divider/>
</div>
))}
</Flex>
<Divider />
</div>
))}
</Flex>
</div>
</CheckCard.Group>
</Card>
: <Empty />}
: <Empty description='未配置工序路线' />}
</Card>
}
<Modal maskClosable={false} open={isEditModalOpen}
@@ -487,9 +508,9 @@ const final = () => {


// title={<Tag color='#0960bd' bordered style={{fontSize:'18px',borderRadius:'0px'}}>{stepTitle}</Tag>}
onCancel={() =>{
onCancel={() => {
setIsEditModalOpen(false)
UpdateGY(currentproductionline.key,selectRowItem.id)
UpdateGY(currentproductionline.key, selectRowItem.id)
}
}
onOk={() => setIsEditModalOpen(false)}
@@ -527,10 +548,10 @@ const final = () => {
danger
disabled={selectDev < 0}
onClick={() => {
console.log('sss',currentproductionProcess?.devicesInfo);
console.log('sss', currentproductionProcess?.devicesInfo);
const b = JSON.stringify(currentproductionProcess?.devicesInfo);
const c:any[] = JSON.parse(b);
const d = c.filter(x=>x.code!=currentproductionDev);
const c: any[] = JSON.parse(b);
const d = c.filter(x => x.code != currentproductionDev);
setM_device(d);
setisConfigDevOpen(true)
}}
@@ -596,20 +617,19 @@ const final = () => {
deviceFunParams?.map((item: any, index: number) => {
Object.keys(deviceStepParms).forEach((citem, cindex) => {
if (item.paramCode == citem) {
if (item.paramType==1) {
let wl:string='';
deviceStepParms[citem]?.map(
(s:any)=>
{
if (wl=='') {
wl = materialParmList.find((x:any)=>x.value==s).label
}else{
wl = wl+','+materialParmList.find((x:any)=>x.value==s).label
}
if (item.paramType == 1) {
let wl: string = '';
deviceStepParms[citem]?.map(
(s: any) => {
if (wl == '') {
wl = materialParmList.find((x: any) => x.value == s).label
} else {
wl = wl + ',' + materialParmList.find((x: any) => x.value == s).label
}
}
)
newParms.push({ name: item.paramName + ':' + wl! })
}else{
} else {
newParms.push({ name: item.paramName + ':' + deviceStepParms[citem] + item.paramUnit })
}
}
@@ -1242,15 +1262,15 @@ const final = () => {
}}
footer={false}
>
<ProForm onFinish={(value:any)=>{
<ProForm onFinish={(value: any) => {
finalCraftStepsAPI.Copyfinalcraftsteps({
finalId: selectRowItem?.id,
lineId: currentproductionline.key,
copyDeviceId: value.deviceId,
productLineStepsId: currentproductionProcess.id,
toDeviceId: currentproductionDev
}).then((res:MyResponse.Content)=>{
if (res.statusCode===200) {
}).then((res: MyResponse.Content) => {
if (res.statusCode === 200) {
message.success('同步成功!');
setisConfigDevOpen(false);
setTimeout(() => {
@@ -1263,11 +1283,11 @@ const final = () => {
setStepparams(jsondata)
sortActionRef.current?.reload();
}, 2000);
}
})
}}>
<Form.Item label="设备" name="deviceId" rules={[{ required: true, message: '此项为必填项!' }]}>
<Select onChange={(v: processType.output) => {
@@ -1275,8 +1295,8 @@ const final = () => {
{
m_device?.map((item: any) => {
return <Select.Option value={item.code} key={item.code}>
<span>{item.name+'['+item.code+']'}</span>
</Select.Option>
<span>{item.name + '[' + item.code + ']'}</span>
</Select.Option>
})
}
</Select>


+ 8
- 1
frontend/src/pages/workInfo/index.tsx Vedi File

@@ -150,7 +150,9 @@ export default () => {
title: '进度',
dataIndex: 'status',
ellipsis: true,
width:300,
hideInSearch: true,
fixed:'right',
render(_, record) {
return <ConfigProvider
theme={{
@@ -192,7 +194,7 @@ export default () => {
console.log(record);
typeForm.resetFields()
setModelTitle('编辑信息');
FinalAPI.LineList(record.finalId).then((res: MyResponse.Content) => {
FinalAPI.FinishLineList(record.finalId).then((res: MyResponse.Content) => {
if (res.statusCode === 200) {
setLineData(res.data)
}
@@ -666,6 +668,7 @@ export default () => {
const OnSubmit = async (values: any) => {

values.batchId = selectBatchItemRow?.id

const WorkDeviceAddInputs: any[] = []

@@ -930,6 +933,10 @@ export default () => {
</ProFormSelect>
<Row gutter={18}>
<Col xl={6} md={12} sm={24}>
<Form.Item name='finalId' hidden
label="成品" >
<Input readOnly disabled value={selectfinal?.id}></Input>
</Form.Item>
<Form.Item name='finalName'
label="成品" >
<Input readOnly disabled value={selectfinal?.name}></Input>


+ 1
- 0
frontend/src/pages/workInfo/plan.tsx Vedi File

@@ -185,6 +185,7 @@ export default () => {
pageIndex: params.current || 1,
pageSize: params.pageSize || 10,
name: params.name || '',
finalId:params.finalId || ''
};
const response = await workplanApi.PagedList(jsonData);
if (response.statusCode === 200) {


Caricamento…
Annulla
Salva