@@ -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.7f56e847.js"></script> | |||
<script src="/preload_helper.d951a929.js"></script> | |||
</head> | |||
<body> | |||
<div id="root"></div> | |||
<script src="/umi.5989f13d.js"></script> | |||
<script src="/umi.7fa0d11b.js"></script> | |||
</body> | |||
</html> |
@@ -1 +1 @@ | |||
!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.49094d04.async.js",43],["119.4e6a5656.async.js",119],["145.782fdda3.async.js",145],["p__system__module__index.ef46db37.chunk.css",257],["p__system__module__index.210b5a12.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.a5160833.chunk.css",420],["p__workInfo__index.116bfc38.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.b75fd4df.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.1a76ccc3.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],"/deviceModal/deviceProduct":[6,7,15,16,29,25,11,12,30],"/deviceModal/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)}))}}(); | |||
!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.49094d04.async.js",43],["119.4e6a5656.async.js",119],["145.782fdda3.async.js",145],["p__system__module__index.ef46db37.chunk.css",257],["p__system__module__index.210b5a12.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.a5160833.chunk.css",420],["p__workInfo__index.70520a2f.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.9df8868b.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.1a76ccc3.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],"/deviceModal/deviceProduct":[6,7,15,16,29,25,11,12,30],"/deviceModal/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)}))}}(); |
@@ -64,8 +64,6 @@ export async function getInitialState(): Promise<{ | |||
const fetchUserInfo = async () => { | |||
const response: MyResponse.Content = await userApi.GetUserInfo(); | |||
if (response.statusCode === 200) { | |||
console.log('response', response); | |||
return response.data; | |||
} | |||
return null; | |||
@@ -224,9 +224,8 @@ const final = () => { | |||
finalInfoAPI.LineList(record.id!).then((res: MyResponse.Content) => { | |||
if (res.statusCode === 200) { | |||
console.log(res.data); | |||
setFinalLineList(res.data) | |||
setcurrentproductionline(res.data[0]); | |||
UpdateGY(res.data[0].key, record?.id!) | |||
} | |||
}) | |||
@@ -255,6 +254,7 @@ const final = () => { | |||
const OnSubmit = async (values: FinalTypes.Info) => { | |||
console.log('values', values); | |||
if (values.id) { | |||
const response = await finalInfoAPI.Update(values); | |||
@@ -369,7 +369,7 @@ const final = () => { | |||
/> | |||
: | |||
<Card size="default" title={'当前配置成品工艺: ' + selectRowItem?.name} styles={{ header: { textAlign: 'center', margin: 'auto', fontSize: '22px' } }} extra={ | |||
currentproductionline && lineProcessList.length>0 ? | |||
currentproductionline && lineProcessList.length > 0 ? | |||
<Popconfirm title="确定要保存当前配置?" onConfirm={(i) => { | |||
finalInfoAPI.Saveconfigstatus({ LineId: currentproductionline.key, finalId: selectRowItem.id }).then((res: MyResponse.Content) => { | |||
@@ -471,6 +471,8 @@ const final = () => { | |||
setcurrentproductionProcess(item) | |||
setcurrentproductionDev(devicesItem.code) | |||
setStepTitle(item.processName + '-' + devicesItem.name + '[' + devicesItem.code + ']') | |||
console.log('currentproductionline', currentproductionline); | |||
setIsEditModalOpen(true) | |||
const jsondata = { | |||
lineId: currentproductionline.key, | |||
@@ -499,7 +501,7 @@ const final = () => { | |||
</CheckCard.Group> | |||
</Card> | |||
: <Empty description='未配置工序路线' />} | |||
: <Empty description='未配置工序路线' />} | |||
</Card> | |||
} | |||
@@ -536,12 +538,59 @@ const final = () => { | |||
type="primary" | |||
disabled={selectDev < 0} | |||
onClick={() => { | |||
formRef.resetFields(); | |||
setIsSchemaModalOpen(true) | |||
setDeviceParm([]); | |||
setSpinStatus(true) | |||
const jsonData: deviceProductFunction.queryParms = { | |||
deviceProductId: selectRowItem?.deviceProductId | |||
}; | |||
DeviceProductFunctionAPI.List(jsonData).then((res: MyResponse.Content) => { | |||
if (res.succeeded) { | |||
setDeviceFun(res.data); | |||
setTimeout(() => { | |||
const out = res.data.find((x: any) => x.id === ""); | |||
if (out?.params) { | |||
const b = JSON.parse(out?.params); | |||
console.log(b); | |||
const c: any[] = []; | |||
b.map((paramsItem: paramsType) => { | |||
const element = { | |||
title: paramsItem.paramName, | |||
dataIndex: paramsItem.paramCode, | |||
width: 'md', | |||
renderFormItem: (dom: any, rowData: any, index: any) => { | |||
return ( | |||
paramsItem.paramType | |||
=== 1 ? <Select mode='multiple' options={materialParmList}></Select> : <Input addonAfter={paramsItem.paramUnit} /> | |||
); | |||
}, | |||
colProps: { | |||
xs: 24, | |||
md: 12, | |||
}, | |||
} | |||
c.push(element) | |||
}) | |||
console.log(c); | |||
typeForm.resetFields(); | |||
setIsSetpModalOpen(true); | |||
setDeviceParm(c); | |||
} | |||
if (dongtaiformRef) { | |||
// if (record.params) { | |||
// const element = JSON.parse(record.params!) | |||
// dongtaiformRef.setFieldsValue(element) | |||
// } | |||
} | |||
setSpinStatus(false) | |||
}, 200); | |||
} | |||
}) | |||
}} | |||
> | |||
自定义步骤 | |||
添加工艺参数 | |||
</Button>, | |||
<Button | |||
type="primary" | |||
@@ -665,7 +714,7 @@ const final = () => { | |||
setSpinStatus(true) | |||
const copyFormData = JSON.parse(JSON.stringify(record)); | |||
formRef.setFieldsValue(copyFormData); | |||
console.log('record', record); | |||
console.log('recor1d', record.deviceProductFunctionId); | |||
const jsonData: deviceProductFunction.queryParms = { | |||
deviceProductId: selectRowItem?.deviceProductId | |||
@@ -750,7 +799,6 @@ const final = () => { | |||
params={stepparams} | |||
request={async (params = {}) => { | |||
if (!params.deviceId) { | |||
console.log('我来了'); | |||
return { | |||
data: [], | |||
success: true, | |||
@@ -1073,7 +1121,7 @@ const final = () => { | |||
maskClosable={false} | |||
destroyOnClose | |||
width={800} | |||
title={<Tag color="#cd201f"> 配置设备参数信息</Tag>} | |||
title={<Tag color="#cd201f"> 工艺步骤设备参数信息</Tag>} | |||
open={isSchemaModalOpen} | |||
onCancel={() => { | |||
setIsSchemaModalOpen(false); | |||
@@ -1094,6 +1142,7 @@ const final = () => { | |||
<Form.Item label="id" name="id" hidden> | |||
<Input /> | |||
</Form.Item> | |||
<Form.Item | |||
label="设备功能信息" | |||
name="deviceProductFunctionId" | |||
@@ -1138,6 +1187,9 @@ const final = () => { | |||
} | |||
</Select> | |||
</Form.Item> | |||
<Form.Item label="备注" name="description" > | |||
<Input /> | |||
</Form.Item> | |||
</Form> | |||
<Card> | |||
<BetaSchemaForm<any> | |||
@@ -1150,28 +1202,45 @@ const final = () => { | |||
}} | |||
grid={true} | |||
onFinish={async (values) => { | |||
console.log(formRef.getFieldsValue()); | |||
const froms: CraftsTypes.craftsInfoOutput = formRef.getFieldsValue() | |||
if (!froms.deviceProductFunctionId) { | |||
message.error("请选择设备产品功能"); | |||
return; | |||
} | |||
console.log('froms', froms); | |||
const jsonData: finalCraftStepsTypes.updateInput = { | |||
id: froms.id, | |||
deviceProductFunctionId: froms.deviceProductFunctionId, | |||
params: JSON.stringify(values), | |||
deviceId: '' | |||
} | |||
finalCraftStepsAPI.Update(jsonData).then((res: MyResponse.Content) => { | |||
if (res.data) { | |||
sortActionRef.current?.reload(); | |||
message.success("成功!"); | |||
setIsSchemaModalOpen(false) | |||
if (froms.id) { | |||
const jsonData: finalCraftStepsTypes.updateInput = { | |||
id: froms.id, | |||
deviceProductFunctionId: froms.deviceProductFunctionId, | |||
params: JSON.stringify(values), | |||
description: froms.description, | |||
deviceId: '' | |||
} | |||
finalCraftStepsAPI.Update(jsonData).then((res: MyResponse.Content) => { | |||
if (res.data) { | |||
sortActionRef.current?.reload(); | |||
message.success("修改成功!"); | |||
setIsSchemaModalOpen(false) | |||
} | |||
}); | |||
} else { | |||
const jsonData: finalCraftStepsTypes.addInput = { | |||
productLineStepsId: currentproductionProcess.id, | |||
description: froms.description, | |||
deviceId: currentproductionDev, | |||
finalId: selectRowItem.id, | |||
deviceProductFunctionId: froms.deviceProductFunctionId!, | |||
params: JSON.stringify(values) | |||
} | |||
}); | |||
finalCraftStepsAPI.Add(jsonData).then((res: MyResponse.Content) => { | |||
if (res.statusCode === 200) { | |||
sortActionRef.current?.reload() | |||
message.info('添加成功'); | |||
setIsSchemaModalOpen(false) | |||
} else { | |||
message.error(res.errors); | |||
} | |||
}) | |||
} | |||
}} | |||
columns={deviceParm} | |||
form={dongtaiformRef} | |||
@@ -992,7 +992,9 @@ export default () => { | |||
</div> | |||
<Card title='选择设备' size="small" bordered={false} style={{ height: '200px', overflowY: 'auto', overflowX: 'hidden' }} className={styles.gongyi_tag_device}> | |||
<Form.Item name={'pro:' + item.id} rules={[{ required: item.devicesInfo.length > 0, message: '此项为必选项!' }]} > | |||
<Form.Item name={'pro:' + item.id} rules={[{ required: item.devicesInfo.length > 0, message: `产线工序路线[${index + 1}-${item.processName}]未选择设备!`,validator:(rule, value)=>{ | |||
message.error(rule.message) | |||
} }]} > | |||
<CheckCard.Group > | |||
{ | |||
item.devicesInfo.length > 0 ? | |||