Commit 905daa97 authored by TZW's avatar TZW

1207

parent f95740a1
...@@ -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-07 16:10:34 * @Last Modified time: 2022-12-07 18:15:23
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -81,24 +81,38 @@ function Failure(props) { ...@@ -81,24 +81,38 @@ function Failure(props) {
}; };
const remove = (text, row, _, action) => { const remove = (text, row, _, action) => {
return ( if (row?.status == 1) {
<PremButton return (
pop={{ <PremButton
title: '是否删除?', pop={{
okText: '确认', title: '是否删除?',
cancelText: '取消', okText: '确认',
onConfirm: () => { cancelText: '取消',
run({ url: pathconfig?.delete || '/delete', params: { id: row?.id } }); onConfirm: () => {
}, run({ url: pathconfig?.delete || '/delete', params: { id: row?.id } });
}} },
btn={{ }}
size: 'small', btn={{
type: 'danger', size: 'small',
}} type: 'danger',
> }}
删除 >
</PremButton> 删除
); </PremButton>
);
} else {
return (
<PremButton
btn={{
size: 'small',
type: 'danger',
disabled: true,
}}
>
删除
</PremButton>
);
}
}; };
const columns = useMemo(() => { const columns = useMemo(() => {
...@@ -139,7 +153,7 @@ function Failure(props) { ...@@ -139,7 +153,7 @@ function Failure(props) {
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} pageextra={pathconfig?.enableadd ? 'add' : null}
resizeable={true} resizeable={false}
addconfig={{ addconfig={{
// access: 'sysDepartment_save', // access: 'sysDepartment_save',
btn: { btn: {
......
...@@ -118,7 +118,7 @@ function getcolumns(setdrawer) { ...@@ -118,7 +118,7 @@ function getcolumns(setdrawer) {
key: 'createUserName', key: 'createUserName',
}, },
{ {
title: '最新外协人员', title: '最新追踪人员',
dataIndex: 'newRepairUserName', dataIndex: 'newRepairUserName',
key: 'newRepairUserName', key: 'newRepairUserName',
}, },
...@@ -193,7 +193,7 @@ function getcolumns(setdrawer) { ...@@ -193,7 +193,7 @@ function getcolumns(setdrawer) {
key: 'createUserName', key: 'createUserName',
}, },
{ {
title: '最新外协人员', title: '最新追踪人员',
dataIndex: 'newRepairUserName', dataIndex: 'newRepairUserName',
key: 'newRepairUserName', key: 'newRepairUserName',
}, },
......
...@@ -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-07 14:31:33 * @Last Modified time: 2022-12-07 19:10:04
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -70,15 +70,19 @@ function Failure(props) { ...@@ -70,15 +70,19 @@ function Failure(props) {
fields={[ fields={[
{ {
title: '最新追踪人员', title: '最新追踪人员',
dataIndex: 'causeFailure', dataIndex: 'newRepairUserName',
valueType: 'textarea',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
key: 'causeFailure', fieldProps: { disabled: true },
key: 'newRepairUserName',
}, },
{ {
title: '追踪人员', title: '追踪人员',
dataIndex: 'trackAssistList', dataIndex: 'trackAssistList',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
fieldProps: {
placeholder: '请选择',
mode: 'multiple',
},
key: 'trackAssistList', key: 'trackAssistList',
valueType: 'select', valueType: 'select',
options: { options: {
...@@ -89,15 +93,15 @@ function Failure(props) { ...@@ -89,15 +93,15 @@ function Failure(props) {
]} ]}
onFinish={async (vals) => { onFinish={async (vals) => {
let params = { let params = {
trackAssistList: vals, trackAssistList: vals?.trackAssistList.map((it) => ({ assistUserId: it })),
id: drawer?.item?.id, id: drawer?.item?.id,
}; };
let res = await doFetch({ let res = await doFetch({
url: '/repair/umTrackTraceinfo/queryByTrackOrderId', url: '/repair/umTrackOrder/againTrack',
params, params,
}); });
if (res.code === '0000') { if (res.code === '0000') {
message.success('重新追踪成功!'); message.success('重新指派成功!');
setdrawer((s) => ({ setdrawer((s) => ({
...s, ...s,
open: false, open: false,
...@@ -119,13 +123,12 @@ function Failure(props) { ...@@ -119,13 +123,12 @@ function Failure(props) {
fields={[ fields={[
{ {
title: '计划追踪日期', title: '计划追踪日期',
dataIndex: 'otherUnitsId', dataIndex: 'planTrackTime',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: false, message: '此项为必填项' }] },
key: 'otherUnitsId', key: 'planTrackTime',
valueType: 'select', fieldProps: {
options: { placeholder: '请选择',
path: '/asset/equipmentSupplier/query/selection', disabled: true,
params: {},
}, },
}, },
{ {
...@@ -168,25 +171,30 @@ function Failure(props) { ...@@ -168,25 +171,30 @@ function Failure(props) {
title: '追踪周期', title: '追踪周期',
dataIndex: 'trackCycle', dataIndex: 'trackCycle',
key: 'trackCycle', key: 'trackCycle',
fieldProps: {
placeholder: '请选择',
disabled: true,
},
}, },
{ {
title: '追踪内容', title: '追踪内容',
dataIndex: 'trackContents', dataIndex: 'trackContents',
key: 'trackContents', key: 'trackContents',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
valueType: 'textarea', valueType: 'textarea',
}, },
]} ]}
onFinish={async (vals) => { onFinish={async (vals) => {
let params = { let params = {
otherUnitsFinish: vals, trackTraceinfo: vals,
id: drawer?.item?.id, id: drawer?.item?.id,
}; };
let res = await doFetch({ let res = await doFetch({
url: '/repair/umOtherUnitsOrder/finishOtherUnits', url: '/repair/umTrackOrder/trackById',
params, params,
}); });
if (res.code === '0000') { if (res.code === '0000') {
message.success('成功完成外协!'); message.success('成功完成追踪!');
setdrawer((s) => ({ setdrawer((s) => ({
...s, ...s,
open: false, open: false,
...@@ -246,7 +254,6 @@ function Failure(props) { ...@@ -246,7 +254,6 @@ function Failure(props) {
{ {
title: '追踪内容', title: '追踪内容',
dataIndex: 'trackContents', dataIndex: 'trackContents',
valueType: 'textarea',
key: 'trackContents', key: 'trackContents',
fieldProps: { fieldProps: {
placeholder: '请选择', placeholder: '请选择',
...@@ -272,23 +279,26 @@ function Failure(props) { ...@@ -272,23 +279,26 @@ function Failure(props) {
}, },
{ {
title: '备注', title: '备注',
dataIndex: 'causeFailure', dataIndex: 'remark',
valueType: 'textarea', valueType: 'textarea',
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
key: 'causeFailure', key: 'remark',
}, },
]} ]}
onFinish={async (vals) => { onFinish={async (vals) => {
let params = { let params = {
otherUnitsFinish: vals, trackProcess: {
reviewerResult: vals.reviewerResult,
remark: vals.remark,
},
id: drawer?.item?.id, id: drawer?.item?.id,
}; };
let res = await doFetch({ let res = await doFetch({
url: '/repair/umOtherUnitsOrder/againOtherUnits', url: '/repair/umTrackOrder/verification',
params, params,
}); });
if (res.code === '0000') { if (res.code === '0000') {
message.success('重新外协成功!'); message.success('验证成功!');
setdrawer((s) => ({ setdrawer((s) => ({
...s, ...s,
open: false, open: false,
...@@ -389,8 +399,8 @@ function Failure(props) { ...@@ -389,8 +399,8 @@ function Failure(props) {
item: { item: {
id: row.id, id: row.id,
}, },
detailpath: null, detailpath: '/repair/umTrackTraceinfo/queryByTrackOrderId',
params: null, params: { trackOrderId: row?.id },
val: 'only', val: 'only',
title: '追踪信息', title: '追踪信息',
})); }));
...@@ -459,16 +469,18 @@ function Failure(props) { ...@@ -459,16 +469,18 @@ function Failure(props) {
} else if (row?.status == 3) { } else if (row?.status == 3) {
return ( return (
<PremButton <PremButton
onClick={() => {
setdrawer((s) => ({
...s,
item: row,
type: 'Reassig',
open: true,
}));
}}
btn={{ btn={{
size: 'small', size: 'small',
onClick: () => {
setdrawer((s) => ({
...s,
item: row,
type: 'Reassig',
open: true,
val: 'only',
}));
console.log(drawer);
},
}} }}
> >
重新指派 重新指派
......
...@@ -225,7 +225,14 @@ function getcolumns(setdrawer) { ...@@ -225,7 +225,14 @@ function getcolumns(setdrawer) {
); );
}, },
}, },
{ title: '手机号', hideInTable: true, dataIndex: 'telephone', key: 'telephone' }, {
title: '手机号',
hideInTable: true,
dataIndex: 'telephone',
key: 'telephone',
hideInTable: true,
search: false,
},
{ title: '邮箱', dataIndex: 'mailNo', key: 'mailNo', hideInTable: true, search: false }, { title: '邮箱', dataIndex: 'mailNo', key: 'mailNo', hideInTable: true, search: false },
{ {
title: '公司名称', title: '公司名称',
......
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