Commit 27dd3144 authored by TZW's avatar TZW

bug

parent 53a951d3
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-19 09:42:58
* @Last Modified time: 2023-01-31 09:34:55
*/
import * as React from 'react';
......@@ -544,7 +544,11 @@ function Model(props) {
{
label: (
<a
onClick={() => {
onClick={async () => {
let res = await doFetch({
url: '/asset/equipmentLog/checkResumeType',
params: {},
});
setDrawer((s) => ({
...s,
visible: true,
......@@ -709,7 +713,6 @@ function Model(props) {
const [request, setrequest] = useState();
useEffect(() => {
const fn = async () => {
let res = await doFetch({
url: '/base/paFormField/queryList',
params: {
......
......@@ -3,7 +3,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-31 09:19:09
* @Last Modified time: 2023-01-31 11:18:25
*/
import * as React from 'react';
......@@ -1030,8 +1030,8 @@ function Failure(props) {
{
valueType: 'textarea',
title: '故障原因',
dataIndex: 'faultDescription',
key: 'faultDescription',
dataIndex: 'faultCause',
key: 'faultCause',
fieldProps: {
disabled: true,
},
......@@ -1047,8 +1047,8 @@ function Failure(props) {
{
valueType: 'textarea',
title: '维修内容',
dataIndex: 'faultDescription',
key: 'faultDescription',
dataIndex: 'repairContent',
key: 'repairContent',
fieldProps: {
disabled: true,
},
......@@ -1205,7 +1205,7 @@ function Failure(props) {
{
title: '申请外协原因',
dataIndex: 'reason',
key: 'reson',
key: 'reason',
fieldProps: {
disabled: true,
},
......@@ -1284,7 +1284,7 @@ function Failure(props) {
{
title: '退单原因',
dataIndex: 'reason',
key: 'reson',
key: 'reason',
fieldProps: {
disabled: true,
},
......
......@@ -10,10 +10,6 @@ function getcolumns(setdrawer, bus) {
label: '外协中',
value: '3',
},
{
label: '已完成',
value: '4',
},
];
} else {
listOptions = [
......@@ -25,10 +21,6 @@ function getcolumns(setdrawer, bus) {
label: '外协中',
value: '3',
},
{
label: '已完成',
value: '4',
},
];
}
return [
......@@ -319,7 +311,7 @@ function getcolumns(setdrawer, bus) {
{
title: '最新外协人员',
dataIndex: 'newRepairUserName',
key: 'newRepairUserName',
key: 'newRepairUserId',
valueType: 'select',
fieldProps: {
showSearch: true,
......@@ -337,8 +329,8 @@ function getcolumns(setdrawer, bus) {
title: '工单状态',
dataIndex: 'statusName',
key: 'status',
valueType: 'select',
options: listOptions,
search: false,
fieldProps: {
dropdownMatchSelectWidth: 150,
},
......
......@@ -3,7 +3,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-29 16:49:15
* @Last Modified time: 2023-01-31 10:54:47
*/
import * as React from 'react';
......@@ -258,82 +258,91 @@ function Failure(props) {
// 更多
const more = (text, row, _, action) => {
const menu = (
<Menu
items={[
{
label:
row?.status == 0 || row?.status == 1 ? (
<PremButton
btn={{
onClick: async () => {
let params = {
id: row?.id,
};
let res = await doFetch({
url: '/repair/umOtherUnitsOrder/orderReceiving',
params,
});
if (res.code === '0000') {
message.success('接单成功!');
setdrawer((s) => ({
...s,
open: false,
}));
actionRef.current.reload();
}
},
}}
>
接单
</PremButton>
) : (
<PremButton
btn={{
onClick: async () => {
setdrawer((s) => ({
...s,
open: true,
type: 'wxpd',
item: row,
val: 'only',
title: '派单',
}));
},
}}
>
派单
</PremButton>
),
key: '0',
// disabled: true,
},
{
label: (
<PremButton
btn={{
onClick: () => {
let menulist = [];
if (row?.status == '1') {
menulist = [
{
label: (
<PremButton
btn={{
onClick: async () => {
let params = {
id: row?.id,
};
let res = await doFetch({
url: '/repair/umOtherUnitsOrder/orderReceiving',
params,
});
if (res.code === '0000') {
message.success('接单成功!');
setdrawer((s) => ({
...s,
open: true,
type: 'comouts',
item: {
id: row.id,
},
val: 'only',
title: '完成外协',
open: false,
}));
},
}}
>
完成外协
</PremButton>
),
key: '1',
},
]}
/>
);
actionRef.current.reload();
}
},
}}
>
接单
</PremButton>
),
key: '0',
},
];
} else if (row?.status == '3') {
menulist = [
{
label: (
<PremButton
btn={{
onClick: () => {
setdrawer((s) => ({
...s,
open: true,
type: 'comouts',
item: {
id: row.id,
},
val: 'only',
title: '完成外协',
}));
},
}}
>
完成外协
</PremButton>
),
key: '1',
},
];
} else if (row?.status == '2') {
menulist = [
{
label: (
<PremButton
btn={{
onClick: async () => {
setdrawer((s) => ({
...s,
open: true,
type: 'wxpd',
item: row,
val: 'only',
title: '派单',
}));
},
}}
>
派单
</PremButton>
),
key: '0',
},
];
}
const menu = <Menu items={menulist} />;
return (
<Dropdown
overlay={menu}
......
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-05 11:13:26
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-30 17:00:18
* @Last Modified time: 2023-01-31 10:58:26
*/
import React, { useState, useEffect } from 'react';
......@@ -19,7 +19,7 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
valueType: 'select',
options: {
path: '/repair/umRepairOrder/selection',
params: { id, permission: 'umRepairOrder:orderReceiving' },
params: { id, permission: 'RECEIVING_TO_VERIFY' },
},
fieldProps: {
placeholder: '请选择',
......@@ -44,7 +44,7 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
valueType: 'select',
options: {
path: '/repair/umRepairOrder/selection',
params: { id, permission: 'umRepairOrder:dispatchById' },
params: { id, permission: 'RECEIVING_TO_VERIFY' },
},
fieldProps: {
placeholder: '请选择',
......
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