Commit 0922d08a authored by TZW's avatar TZW

12091123

parent 1f03b585
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @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';
......@@ -115,9 +115,7 @@ function Failure(props) {
...s,
open: true,
type: 'editChildEquipment',
item: {
id: row.id,
},
item: row,
val: 'only',
title: '编辑子设备',
// onFinish: async (vals) => {
......@@ -155,9 +153,7 @@ function Failure(props) {
...s,
open: true,
type: 'wcwx',
item: {
id: row.id,
},
item: row,
val: 'only',
title: '完成维修',
}));
......@@ -176,9 +172,7 @@ function Failure(props) {
...s,
open: true,
type: 'zzz',
item: {
id: row.id,
},
item: row,
val: 'only',
title: '转追踪',
}));
......@@ -197,9 +191,7 @@ function Failure(props) {
...s,
open: true,
type: 'zwx',
item: {
id: row.id,
},
item: row,
val: 'only',
title: '转外协',
}));
......@@ -218,9 +210,7 @@ function Failure(props) {
...s,
open: true,
type: 'zd',
item: {
id: row.id,
},
item: row,
val: 'only',
title: '转单',
}));
......@@ -239,9 +229,7 @@ function Failure(props) {
...s,
open: true,
type: 'td',
item: {
id: row.id,
},
item: row,
val: 'only',
title: '退单',
}));
......@@ -260,9 +248,7 @@ function Failure(props) {
...s,
open: true,
type: 'xgyz',
item: {
id: row.id,
},
item: row,
val: 'only',
title: '效果验证',
}));
......@@ -274,15 +260,60 @@ function Failure(props) {
key: '6',
},
{
label: <a>追踪审核</a>,
label: (
<a
onClick={() => {
setdrawer((s) => ({
...s,
open: true,
type: 'zzsh',
item: row,
val: 'only',
title: '追踪审核',
}));
}}
>
追踪审核
</a>
),
key: '7',
},
{
label: <a>外协审核</a>,
label: (
<a
onClick={() => {
setdrawer((s) => ({
...s,
open: true,
type: 'wxsh',
item: row,
val: 'only',
title: '外协审核',
}));
}}
>
外协审核
</a>
),
key: '8',
},
{
label: <a>退单审核</a>,
label: (
<a
onClick={() => {
setdrawer((s) => ({
...s,
open: true,
type: 'tdsh',
item: row,
val: 'only',
title: '退单审核',
}));
}}
>
退单审核
</a>
),
key: '9',
},
]}
......@@ -314,7 +345,7 @@ function Failure(props) {
options: {
path: '/repair/umFaultSetting/selected/queryList',
params: {
equipmentId: drawer?.item.id,
equipmentId: drawer?.item.equipmentId,
},
},
},
......@@ -332,8 +363,8 @@ function Failure(props) {
},
{
title: '故障原因',
dataIndex: 'faultDescription',
key: 'faultDescription',
dataIndex: 'faultCause',
key: 'faultCause',
valueType: 'textarea',
formItemProps: {
rules: [
......@@ -346,16 +377,16 @@ function Failure(props) {
},
{
title: '开始维修时间',
dataIndex: 'equipmentId',
key: 'equipmentId',
dataIndex: 'repairTime',
key: 'repairTime',
fieldProps: {
disabled: true,
},
},
{
title: '维修类型',
dataIndex: 'equipmentId',
key: 'equipmentId',
dataIndex: 'repairType',
key: 'repairType',
valueType: 'select',
options: { path: '/asset/equipment/selection/user/shop', params: {} },
formItemProps: {
......@@ -448,6 +479,7 @@ function Failure(props) {
actionRef.current.reload();
}
}}
defaultFormValue={drawer?.item}
{...drawer}
/>
</>
......@@ -651,10 +683,201 @@ function Failure(props) {
<InitForm
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',
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: [
{
......@@ -664,14 +887,47 @@ function Failure(props) {
],
},
},
{
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 },
repairProcess: { reviewerResult: vals.reviewerResult },
resultFlag: vals.resultFlag,
id: drawer?.item.id,
};
let res = await doFetch({
url: '/repair/umRepairOrder/chargeback',
url: '/repair/umRepairOrder/transferAudit',
params,
});
if (res.code === '0000') {
......@@ -688,6 +944,86 @@ function Failure(props) {
</>
);
};
// 退单审核
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: {
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/chargebackAudit',
params,
});
if (res.code === '0000') {
message.success('操作成功!');
setdrawer((s) => ({
...s,
open: false,
}));
actionRef.current.reload();
}
}}
{...drawer}
/>
</>
);
};
const selectType = {
jd: <Recevive />,
wcwx: <Finishrepair />,
......@@ -696,6 +1032,9 @@ function Failure(props) {
zd: <Transfer />,
td: <Singelback />,
xgyz: <EffectCheck />,
zzsh: <Rackaudit />,
wxsh: <Outaudit />,
tdsh: <Backaudit />,
};
const columns = useMemo(() => {
......@@ -722,25 +1061,7 @@ function Failure(props) {
columns={columns}
path={pathconfig?.list || '/ngic-auth/sysUser/query/page'}
actionRef={actionRef}
pageextra={pathconfig?.enableadd ? 'add' : null}
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()}
activeTabKey={activeTabKey}
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