Commit 9690d0f7 authored by TZW's avatar TZW

1007

parent f7862cfa
...@@ -83,11 +83,15 @@ function Expandables({ value = [], onChange, item }) { ...@@ -83,11 +83,15 @@ function Expandables({ value = [], onChange, item }) {
editable: false, editable: false,
}, },
{ {
title: '更换数量', title: (
<div>
更换数量 <span style={{ color: 'red' }}>* </span>
</div>
),
dataIndex: 'operateNum', dataIndex: 'operateNum',
search: false, search: false,
key: 'operateNum', key: 'operateNum',
valueType: 'input', valueType: 'digit',
fieldProps: { fieldProps: {
precision: 3, precision: 3,
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2023-01-19 09:53:59 * @Date: 2023-01-19 09:53:59
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2023-02-24 19:18:49 * @Last Modified time: 2023-02-27 09:44:54
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -14,7 +14,7 @@ import getcolumns from './columns'; ...@@ -14,7 +14,7 @@ import getcolumns from './columns';
import { useRequest } from 'ahooks'; import { useRequest } from 'ahooks';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
import AutoTables from '@/components/AutoTable/mtable'; import AutoTables from '@/components/AutoTable/mtable';
import { Radio, InputNumber, Input, Divider } from 'antd'; import { Radio, InputNumber, Input, Divider, message } from 'antd';
import InitForm from '@/components/InitForm'; import InitForm from '@/components/InitForm';
import getDetailColumns from './detailColumns'; import getDetailColumns from './detailColumns';
import { useModel } from '@umijs/max'; import { useModel } from '@umijs/max';
...@@ -34,6 +34,7 @@ function WorkOrder(props) { ...@@ -34,6 +34,7 @@ function WorkOrder(props) {
manual: true, manual: true,
onSuccess: (res, params) => { onSuccess: (res, params) => {
if (res?.code == '0000') { if (res?.code == '0000') {
message.success('操作成功!');
actionRef?.current?.reload(); actionRef?.current?.reload();
setdrawer((s) => ({ setdrawer((s) => ({
...s, ...s,
...@@ -603,8 +604,8 @@ function WorkOrder(props) { ...@@ -603,8 +604,8 @@ function WorkOrder(props) {
valueType: 'split', valueType: 'split',
}, },
{ {
dataIndex: 'ifePieceStockUseList', dataIndex: 'lifePieceStockUseList',
key: 'ifePieceStockUseList', key: 'lifePieceStockUseList',
valueType: 'Expandable', valueType: 'Expandable',
colProps: { colProps: {
span: 24, span: 24,
...@@ -652,7 +653,7 @@ function WorkOrder(props) { ...@@ -652,7 +653,7 @@ function WorkOrder(props) {
], ],
path: '/sparepart/lifePieceAccount/queryPageByEquipment', path: '/sparepart/lifePieceAccount/queryPageByEquipment',
extraparams: { equipmentId: drawer?.item?.equipmentId }, extraparams: { equipmentId: drawer?.item?.equipmentId },
expandablePath: '/sparepart/lineStock/queryReplaceStock', expandablePath: '/sparepart/lineStock/queryReplaceStockAll',
}, },
]} ]}
onFinish={(vals) => { onFinish={(vals) => {
...@@ -677,14 +678,14 @@ function WorkOrder(props) { ...@@ -677,14 +678,14 @@ function WorkOrder(props) {
lineStockId: it?.id, lineStockId: it?.id,
operateNum: it?.operateNum, operateNum: it?.operateNum,
})) ?? []; })) ?? [];
let ifePieceStockUseList = vals?.ifePieceStockUseList ?? []; let lifePieceStockUseList = vals?.lifePieceStockUseList ?? [];
run({ run({
url: '/maintain/umMaintainTask/finishMaintainTask', url: '/maintain/umMaintainTask/finishMaintainTask',
params: { params: {
id: drawer?.item?.id, id: drawer?.item?.id,
maintainTaskItemList, maintainTaskItemList,
lineStockUseList, lineStockUseList,
ifePieceStockUseList, lifePieceStockUseList,
}, },
}); });
}} }}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03 * @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2023-02-24 19:10:16 * @Last Modified time: 2023-02-27 09:12:42
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -711,90 +711,6 @@ function Failure(props) { ...@@ -711,90 +711,6 @@ function Failure(props) {
}; };
// 完成维修 // 完成维修
const Finishrepair = () => { const Finishrepair = () => {
// const EditTableItem = ({ record }) => {
// const [value, setvalue] = useState([]);
// return (
// <div>
// <EditTable
// resizeable={false}
// alwaysShowAlert={false}
// tableAlertRender={false}
// tableAlertOptionRender={false}
// columns={[
// {
// title: '线边库',
// dataIndex: 'supplierNo',
// key: 'supplierNo',
// editable: false,
// },
// {
// title: '供应商编号',
// dataIndex: 'supplierNo',
// key: 'supplierNo',
// span: 3,
// editable: false,
// },
// {
// title: '供应商名称',
// dataIndex: 'supplierName',
// key: 'supplierName',
// span: 3,
// editable: false,
// },
// {
// title: '可用数量',
// dataIndex: 'usedStock',
// key: 'usedStock',
// search: false,
// span: 3,
// editable: false,
// },
// {
// title: (
// <div>
// 更换数量 <span style={{ color: 'red' }}>* </span>
// </div>
// ),
// search: false,
// dataIndex: 'operateNum',
// valueType: 'digit',
// fieldProps: {
// precision: 3,
// },
// key: 'operateNum',
// span: 3,
// hideInForm: true,
// editable: true,
// },
// ]}
// path="/sparepart/lineStock/queryReplaceStock"
// extraparams={{ lifePieceAccountId: record?.id }}
// rowSelection={{
// type: 'checkbox',
// columnWidth: 44,
// preserveSelectedRowKeys: true,
// selectedRowKeys: value?.map((it) => it?.lineStockId) ?? [],
// onChange: (selectedKeys, selectedRows) => {
// const lineStockUseList = selectedRows?.map((it) => {
// return { lineStockId: it?.id, operateNum: it?.operateNum };
// });
// setvalue(lineStockUseList);
// },
// }}
// editable={{
// onValuesChange: (rower, recordList) => {
// setvalue((value) => {
// const curkey = value?.map((it) => it?.lineStockId);
// const newValue = value.concat(rower);
// return [...newValue];
// });
// },
// }}
// />
// </div>
// );
// };
const columns_fsmjxh = [ const columns_fsmjxh = [
{ {
title: '线边库', title: '线边库',
...@@ -846,7 +762,7 @@ function Failure(props) { ...@@ -846,7 +762,7 @@ function Failure(props) {
), ),
search: false, search: false,
dataIndex: 'operateNum', dataIndex: 'operateNum',
valueType: 'input', valueType: 'digit',
fieldProps: { fieldProps: {
precision: 3, precision: 3,
}, },
...@@ -1002,8 +918,8 @@ function Failure(props) { ...@@ -1002,8 +918,8 @@ function Failure(props) {
}, },
{ {
title: '寿命件更换', title: '寿命件更换',
dataIndex: 'ifePieceStockUseList', dataIndex: 'lifePieceStockUseList',
key: 'ifePieceStockUseList', key: 'lifePieceStockUseList',
valueType: 'Expandable', valueType: 'Expandable',
colProps: { colProps: {
span: 24, span: 24,
...@@ -1090,7 +1006,7 @@ function Failure(props) { ...@@ -1090,7 +1006,7 @@ function Failure(props) {
lineStockId: it?.id, lineStockId: it?.id,
operateNum: it?.operateNum, operateNum: it?.operateNum,
})), })),
ifePieceStockUseList: vals?.ifePieceStockUseList, lifePieceStockUseList: vals?.lifePieceStockUseList,
}; };
let res = await doFetch({ let res = await doFetch({
url: '/repair/umRepairOrder/completeRepair', url: '/repair/umRepairOrder/completeRepair',
......
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