Commit 905daa97 authored by TZW's avatar TZW

1207

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