Commit 0922d08a authored by TZW's avatar TZW

12091123

parent 1f03b585
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,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: 2022-12-09 09:48:49 * @Last Modified time: 2022-12-09 11:07:32
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -115,9 +115,7 @@ function Failure(props) { ...@@ -115,9 +115,7 @@ function Failure(props) {
...s, ...s,
open: true, open: true,
type: 'editChildEquipment', type: 'editChildEquipment',
item: { item: row,
id: row.id,
},
val: 'only', val: 'only',
title: '编辑子设备', title: '编辑子设备',
// onFinish: async (vals) => { // onFinish: async (vals) => {
...@@ -155,9 +153,7 @@ function Failure(props) { ...@@ -155,9 +153,7 @@ function Failure(props) {
...s, ...s,
open: true, open: true,
type: 'wcwx', type: 'wcwx',
item: { item: row,
id: row.id,
},
val: 'only', val: 'only',
title: '完成维修', title: '完成维修',
})); }));
...@@ -176,9 +172,7 @@ function Failure(props) { ...@@ -176,9 +172,7 @@ function Failure(props) {
...s, ...s,
open: true, open: true,
type: 'zzz', type: 'zzz',
item: { item: row,
id: row.id,
},
val: 'only', val: 'only',
title: '转追踪', title: '转追踪',
})); }));
...@@ -197,9 +191,7 @@ function Failure(props) { ...@@ -197,9 +191,7 @@ function Failure(props) {
...s, ...s,
open: true, open: true,
type: 'zwx', type: 'zwx',
item: { item: row,
id: row.id,
},
val: 'only', val: 'only',
title: '转外协', title: '转外协',
})); }));
...@@ -218,9 +210,7 @@ function Failure(props) { ...@@ -218,9 +210,7 @@ function Failure(props) {
...s, ...s,
open: true, open: true,
type: 'zd', type: 'zd',
item: { item: row,
id: row.id,
},
val: 'only', val: 'only',
title: '转单', title: '转单',
})); }));
...@@ -239,9 +229,7 @@ function Failure(props) { ...@@ -239,9 +229,7 @@ function Failure(props) {
...s, ...s,
open: true, open: true,
type: 'td', type: 'td',
item: { item: row,
id: row.id,
},
val: 'only', val: 'only',
title: '退单', title: '退单',
})); }));
...@@ -260,9 +248,7 @@ function Failure(props) { ...@@ -260,9 +248,7 @@ function Failure(props) {
...s, ...s,
open: true, open: true,
type: 'xgyz', type: 'xgyz',
item: { item: row,
id: row.id,
},
val: 'only', val: 'only',
title: '效果验证', title: '效果验证',
})); }));
...@@ -274,15 +260,60 @@ function Failure(props) { ...@@ -274,15 +260,60 @@ function Failure(props) {
key: '6', key: '6',
}, },
{ {
label: <a>追踪审核</a>, label: (
<a
onClick={() => {
setdrawer((s) => ({
...s,
open: true,
type: 'zzsh',
item: row,
val: 'only',
title: '追踪审核',
}));
}}
>
追踪审核
</a>
),
key: '7', key: '7',
}, },
{ {
label: <a>外协审核</a>, label: (
<a
onClick={() => {
setdrawer((s) => ({
...s,
open: true,
type: 'wxsh',
item: row,
val: 'only',
title: '外协审核',
}));
}}
>
外协审核
</a>
),
key: '8', key: '8',
}, },
{ {
label: <a>退单审核</a>, label: (
<a
onClick={() => {
setdrawer((s) => ({
...s,
open: true,
type: 'tdsh',
item: row,
val: 'only',
title: '退单审核',
}));
}}
>
退单审核
</a>
),
key: '9', key: '9',
}, },
]} ]}
...@@ -314,7 +345,7 @@ function Failure(props) { ...@@ -314,7 +345,7 @@ function Failure(props) {
options: { options: {
path: '/repair/umFaultSetting/selected/queryList', path: '/repair/umFaultSetting/selected/queryList',
params: { params: {
equipmentId: drawer?.item.id, equipmentId: drawer?.item.equipmentId,
}, },
}, },
}, },
...@@ -332,8 +363,8 @@ function Failure(props) { ...@@ -332,8 +363,8 @@ function Failure(props) {
}, },
{ {
title: '故障原因', title: '故障原因',
dataIndex: 'faultDescription', dataIndex: 'faultCause',
key: 'faultDescription', key: 'faultCause',
valueType: 'textarea', valueType: 'textarea',
formItemProps: { formItemProps: {
rules: [ rules: [
...@@ -346,16 +377,16 @@ function Failure(props) { ...@@ -346,16 +377,16 @@ function Failure(props) {
}, },
{ {
title: '开始维修时间', title: '开始维修时间',
dataIndex: 'equipmentId', dataIndex: 'repairTime',
key: 'equipmentId', key: 'repairTime',
fieldProps: { fieldProps: {
disabled: true, disabled: true,
}, },
}, },
{ {
title: '维修类型', title: '维修类型',
dataIndex: 'equipmentId', dataIndex: 'repairType',
key: 'equipmentId', key: 'repairType',
valueType: 'select', valueType: 'select',
options: { path: '/asset/equipment/selection/user/shop', params: {} }, options: { path: '/asset/equipment/selection/user/shop', params: {} },
formItemProps: { formItemProps: {
...@@ -448,6 +479,7 @@ function Failure(props) { ...@@ -448,6 +479,7 @@ function Failure(props) {
actionRef.current.reload(); actionRef.current.reload();
} }
}} }}
defaultFormValue={drawer?.item}
{...drawer} {...drawer}
/> />
</> </>
...@@ -651,10 +683,298 @@ function Failure(props) { ...@@ -651,10 +683,298 @@ function Failure(props) {
<InitForm <InitForm
fields={[ fields={[
{ {
title: '退单原因', title: '故障描述',
dataIndex: 'faultDescription',
key: 'faultDescription',
fieldProps: {
disabled: true,
},
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
},
{
title: '故障原因',
dataIndex: 'faultDescription',
key: 'faultDescription',
fieldProps: {
disabled: true,
},
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
},
{
title: '维修内容',
dataIndex: 'faultDescription',
key: 'faultDescription',
fieldProps: {
disabled: true,
},
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
},
{
title: '验证结果',
dataIndex: 'resultFlag',
key: 'resultFlag',
valueType: 'radio',
options: [
{ label: '通过', value: '1' },
{ label: '不通过', value: '2' },
],
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
},
{
title: '备注',
dataIndex: 'remaker',
key: 'remaker',
valueType: 'textarea',
formItemProps: {
rules: [
{
required: false,
message: '此项为必填项',
},
],
},
},
]}
onFinish={async (vals) => {
let params = {
repairInfo: { ...vals },
id: drawer?.item.id,
};
let res = await doFetch({
url: '/repair/umRepairOrder/completeRepairValidate',
params,
});
if (res.code === '0000') {
message.success('操作成功!');
setdrawer((s) => ({
...s,
open: false,
}));
actionRef.current.reload();
}
}}
{...drawer}
/>
</>
);
};
// 追踪审核
const Rackaudit = () => {
return (
<>
<InitForm
fields={[
{
title: '申请追踪原因',
dataIndex: 'reason', dataIndex: 'reason',
key: 'reason', key: 'reson',
fieldProps: {
disabled: true,
},
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
},
{
title: '审核结果',
dataIndex: 'resultFlag',
key: 'resultFlag',
valueType: 'radio',
options: [
{ label: '通过', value: '1' },
{ label: '不通过', value: '2' },
],
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
},
{
title: '备注',
dataIndex: 'remaker',
key: 'remaker',
valueType: 'textarea',
formItemProps: {
rules: [
{
required: false,
message: '此项为必填项',
},
],
},
},
]}
onFinish={async (vals) => {
let params = {
repairProcess: { reviewerResult: vals.reviewerResult },
resultFlag: vals.resultFlag,
id: drawer?.item.id,
};
let res = await doFetch({
url: '/repair/umRepairOrder/transferTrackingAudit',
params,
});
if (res.code === '0000') {
message.success('操作成功!');
setdrawer((s) => ({
...s,
open: false,
}));
actionRef.current.reload();
}
}}
{...drawer}
/>
</>
);
};
// 外协审核
const Outaudit = () => {
return (
<>
<InitForm
fields={[
{
title: '申请外协原因',
dataIndex: 'reason',
key: 'reson',
fieldProps: {
disabled: true,
},
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
},
{
title: '审核结果',
dataIndex: 'resultFlag',
key: 'resultFlag',
valueType: 'radio',
options: [
{ label: '通过', value: '1' },
{ label: '不通过', value: '2' },
],
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
},
{
title: '备注',
dataIndex: 'remaker',
key: 'remaker',
valueType: 'textarea', valueType: 'textarea',
formItemProps: {
rules: [
{
required: false,
message: '此项为必填项',
},
],
},
},
]}
onFinish={async (vals) => {
let params = {
repairProcess: { reviewerResult: vals.reviewerResult },
resultFlag: vals.resultFlag,
id: drawer?.item.id,
};
let res = await doFetch({
url: '/repair/umRepairOrder/transferAudit',
params,
});
if (res.code === '0000') {
message.success('操作成功!');
setdrawer((s) => ({
...s,
open: false,
}));
actionRef.current.reload();
}
}}
{...drawer}
/>
</>
);
};
// 退单审核
const Backaudit = () => {
return (
<>
<InitForm
fields={[
{
title: '退单原因',
dataIndex: 'reason',
key: 'reson',
fieldProps: {
disabled: true,
},
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
},
{
title: '审核结果',
dataIndex: 'resultFlag',
key: 'resultFlag',
valueType: 'radio',
options: [
{ label: '通过', value: '1' },
{ label: '不通过', value: '2' },
],
formItemProps: { formItemProps: {
rules: [ rules: [
{ {
...@@ -664,14 +984,29 @@ function Failure(props) { ...@@ -664,14 +984,29 @@ function Failure(props) {
], ],
}, },
}, },
{
title: '备注',
dataIndex: 'remaker',
key: 'remaker',
valueType: 'textarea',
formItemProps: {
rules: [
{
required: false,
message: '此项为必填项',
},
],
},
},
]} ]}
onFinish={async (vals) => { onFinish={async (vals) => {
let params = { let params = {
repairInfo: { ...vals }, repairProcess: { reviewerResult: vals.reviewerResult },
resultFlag: vals.resultFlag,
id: drawer?.item.id, id: drawer?.item.id,
}; };
let res = await doFetch({ let res = await doFetch({
url: '/repair/umRepairOrder/chargeback', url: '/repair/umRepairOrder/chargebackAudit',
params, params,
}); });
if (res.code === '0000') { if (res.code === '0000') {
...@@ -688,6 +1023,7 @@ function Failure(props) { ...@@ -688,6 +1023,7 @@ function Failure(props) {
</> </>
); );
}; };
const selectType = { const selectType = {
jd: <Recevive />, jd: <Recevive />,
wcwx: <Finishrepair />, wcwx: <Finishrepair />,
...@@ -696,6 +1032,9 @@ function Failure(props) { ...@@ -696,6 +1032,9 @@ function Failure(props) {
zd: <Transfer />, zd: <Transfer />,
td: <Singelback />, td: <Singelback />,
xgyz: <EffectCheck />, xgyz: <EffectCheck />,
zzsh: <Rackaudit />,
wxsh: <Outaudit />,
tdsh: <Backaudit />,
}; };
const columns = useMemo(() => { const columns = useMemo(() => {
...@@ -722,25 +1061,7 @@ function Failure(props) { ...@@ -722,25 +1061,7 @@ function Failure(props) {
columns={columns} columns={columns}
path={pathconfig?.list || '/ngic-auth/sysUser/query/page'} path={pathconfig?.list || '/ngic-auth/sysUser/query/page'}
actionRef={actionRef} actionRef={actionRef}
pageextra={pathconfig?.enableadd ? 'add' : null}
resizeable={false} resizeable={false}
addconfig={{
// access: 'sysDepartment_save',
btn: {
disabled: false,
type: 'primary',
onClick: () => {
setdrawer((s) => ({
...s,
open: true,
item: null,
title: '新增',
val: 'only',
type: 'add',
}));
},
},
}}
tabList={getcolumns()} tabList={getcolumns()}
activeTabKey={activeTabKey} activeTabKey={activeTabKey}
onTabChange={(key) => { onTabChange={(key) => {
......
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