Commit 0aa09e4a authored by TZW's avatar TZW

bug

parent 69ec7e33
......@@ -4,8 +4,8 @@ import { Divider, Image, Collapse } from 'antd';
const { Panel } = Collapse;
export default ({ index, title, dataSource, columns, hidden, navhidden = false, type }) => {
console.log(type);
export default (props) => {
const { index, title, dataSource, columns, hidden, navhidden = false, type } = props;
const [flag, setflag] = useState(true);
// 0:报修 1:接单 2:派单 3:完成维修 4:转追踪 5:转外协 6:转单 7:退单 8:追踪审核 9:外协审核 10:退单审核 11:效果验证
const columns_mes = {
......@@ -452,8 +452,8 @@ export default ({ index, title, dataSource, columns, hidden, navhidden = false,
},
{
title: '实际追踪日期',
dataIndex: 'trackerTime',
key: 'trackerTime',
dataIndex: 'actualTrackTime',
key: 'actualTrackTime',
},
{
title: '追踪结果',
......@@ -492,8 +492,98 @@ export default ({ index, title, dataSource, columns, hidden, navhidden = false,
},
{
title: '验证结果',
dataIndex: 'reviewerResult',
key: 'reviewerResult',
dataIndex: 'reviewerResultName',
key: 'reviewerResultName',
},
{
title: '备注',
dataIndex: 'remark',
key: 'remark',
},
],
},
columns_wgd = {
1: [
{
title: '外协人员',
dataIndex: 'assistUserNames',
key: 'assistUserNames',
},
{
title: '接单时间',
dataIndex: 'repairTime',
key: 'repairTime',
},
],
2: [
{
title: '派单人员',
dataIndex: 'dispatcherName',
key: 'dispatcherName',
},
{
title: '派单时间',
dataIndex: 'dispatcherTime',
key: 'dispatcherTime',
},
{
title: '外协人员',
dataIndex: 'assistUserNames',
key: 'assistUserNames',
},
],
3: [
{
title: '指派人员',
dataIndex: 'dispatcherName',
key: 'dispatcherName',
},
{
title: '指派时间',
dataIndex: 'dispatcherTime',
key: 'dispatcherTime',
},
{
title: '外协人员',
dataIndex: 'assistUserNames',
key: 'assistUserNames',
},
],
4: [
{
title: '外协人员',
dataIndex: 'otherUnitsUserName',
key: 'otherUnitsUserName',
},
{
title: '完成外协时间',
dataIndex: 'otherUnitsUserTime',
key: 'otherUnitsUserTime',
},
{
title: '外协单位',
dataIndex: 'otherUnitsName',
key: 'otherUnitsName',
},
{
title: '故障原因',
dataIndex: 'causeFailure',
key: 'causeFailure',
},
{
title: '维修内容',
dataIndex: 'repairContent',
key: 'repairContent',
},
{
title: '外协时长',
dataIndex: 'otherUnitsHours',
key: 'otherUnitsHours',
},
{
title: '外协费用',
dataIndex: 'otherUnitsCost',
key: 'otherUnitsCost',
},
{
title: '备注',
......@@ -567,6 +657,19 @@ export default ({ index, title, dataSource, columns, hidden, navhidden = false,
</div>
</div>
),
wgd: (
<div style={{ marginTop: 16 }}>
<div style={{ flex: 6 }}>
<div style={{ marginBottom: 16 }}>
<h2 className="page-title">{dataSource?.operationTypeName}信息</h2>
</div>
<ProDescriptions
dataSource={dataSource}
columns={columns_wgd[dataSource?.operationType]}
/>
</div>
</div>
),
};
return (
<>
......@@ -578,9 +681,13 @@ export default ({ index, title, dataSource, columns, hidden, navhidden = false,
<div>
<h2 className="page-title">{title}</h2>
</div>
<Divider orientation="left">设备信息</Divider>
<Divider orientation="left" orientationMargin="0">
<b>设备信息</b>
</Divider>
<ProDescriptions dataSource={dataSource?.equipment} columns={columns_mes.sbxx} />
<Divider orientation="left">故障信息</Divider>
<Divider orientation="left" orientationMargin="0">
<b>故障信息</b>
</Divider>
{type == 'wgd' ? (
<ProDescriptions dataSource={dataSource} columns={columns_mes['gzxx_nouser']} />
) : (
......@@ -603,12 +710,16 @@ export default ({ index, title, dataSource, columns, hidden, navhidden = false,
<div>
<h2 className="page-title">{title}</h2>
</div>
<Divider orientation="left">设备信息</Divider>
<Divider orientation="left" orientationMargin="0">
<b>设备信息</b>
</Divider>
<ProDescriptions
dataSource={dataSource?.equipment}
columns={columns_mes['sbxx']}
/>
<Divider orientation="left">故障信息</Divider>
<Divider orientation="left" orientationMargin="0">
<b>故障信息</b>
</Divider>
{type == 'zzgd' ? (
<ProDescriptions dataSource={dataSource} columns={columns_mes['gzxx_nouser']} />
) : (
......
......@@ -142,6 +142,7 @@ export default (props) => {
navhidden={true}
/>
{request?.data?.dataList?.splice(1).map((it, index) => {
console.log('11', it);
return (
<>
<DesItem
......
......@@ -99,7 +99,7 @@ function Orders(props) {
const order = (text, row, _, action) => {
return (
<PremButton
access="umMaintainTask:orderReceiving"
access="umMaintainTask_orderReceiving"
pop={{
title: '是否接单?',
okText: '确认',
......@@ -122,7 +122,7 @@ function Orders(props) {
const close = (text, row, _, action) => {
return (
<PremButton
access="umMaintainTask:customsDeclaration"
access="umMaintainTask_customsDeclaration"
pop={{
title: '是否关单?',
okText: '确认',
......
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2023-01-19 09:53:59
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-02-01 15:45:38
* @Last Modified time: 2023-02-01 16:14:59
*/
import * as React from 'react';
......@@ -87,8 +87,8 @@ function WorkOrder(props) {
},
{
title: '结果',
dataIndex: 'judgeResultName',
key: 'judgeResultName',
dataIndex: 'qualitativeJudgeResult',
key: 'qualitativeJudgeResult',
hideInForm: true,
},
{
......
function getcolumns(setdrawer, bus) {
let listOptions = [];
if (bus !== "2") {
if (bus !== '2') {
// 0:报修 1:接单 2:派单 3:完成维修 4:转追踪 5:转外协 6:转单 7:退单 8:追踪审核 9:外协审核 10:退单审核 11:效果验证
listOptions = [
{
......@@ -392,7 +392,24 @@ function getcolumns(setdrawer, bus) {
dataIndex: 'statusName',
key: 'status',
valueType: 'select',
options: listOptions,
options: [
{
label: '已完成(维修)',
value: '1',
},
{
label: '已完成(外协)',
value: '2',
},
{
label: '已完成(转追踪)',
value: '3',
},
{
label: '已退单',
value: '4',
},
],
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-02-01 11:20:41
* @Last Modified time: 2023-02-01 17:08:23
*/
import * as React from 'react';
......@@ -173,7 +173,7 @@ function Failure(props) {
valueType: 'select',
options: {
path: '/repair/umOtherUnitsOrder/selectionAgain',
params: { id: drawer?.item.id },
params: { id: drawer?.item.id, permission: 'umOtherUnitsOrder:finishOtherUnits' },
},
},
]}
......@@ -208,7 +208,10 @@ function Failure(props) {
dataIndex: 'otherUnitsAssistList',
key: 'otherUnitsAssistList',
valueType: 'select',
options: { path: '/repair/umOtherUnitsOrder/selection', params: { id: drawer?.item.id } },
options: {
path: '/repair/umOtherUnitsOrder/selection',
params: { id: drawer?.item.id, permission: 'umOtherUnitsOrder:finishOtherUnits' },
},
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
];
......
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-05 11:13:26
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-31 10:58:26
* @Last Modified time: 2023-02-01 18:52:29
*/
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: 'RECEIVING_TO_VERIFY' },
params: { id, permission: 'umRepairOrder:completeRepair' },
},
fieldProps: {
placeholder: '请选择',
......@@ -34,7 +34,7 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
dataIndex: 'repairId',
key: 'repairId',
valueType: 'select',
options: { path: '/auth/sysUser/selection' },
options: { path: '/repair/umRepairOrder/selectionRepair', params: { id } },
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
{
......@@ -44,7 +44,11 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
valueType: 'select',
options: {
path: '/repair/umRepairOrder/selection',
params: { id, permission: 'RECEIVING_TO_VERIFY' },
linkParams: { repairId: 'repairId' },
extraParams: {
id,
permission: 'umRepairOrder:completeRepair',
},
},
fieldProps: {
placeholder: '请选择',
......@@ -59,7 +63,10 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
dataIndex: 'trackAssistList',
key: 'trackAssistList',
valueType: 'select',
options: { path: '/auth/sysUser/selection' },
options: {
path: '/repair/umTrackOrder/selection',
params: { permission: 'umTrackOrder:trackById', id },
},
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
],
......@@ -69,7 +76,10 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
dataIndex: 'otherUnitsAssistList',
key: 'otherUnitsAssistList',
valueType: 'select',
options: { path: '/repair/umOtherUnitsOrder/selection', params: { id } },
options: {
path: '/repair/umOtherUnitsOrder/selection',
params: { id, permission: 'umOtherUnitsOrder:finishOtherUnits' },
},
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
},
],
......
function getcolumns(setdrawer, bus) {
let listOptions = [];
let listOptions_zzgd = [];
if (bus !== '2') {
listOptions = [
{
......@@ -11,6 +13,12 @@ function getcolumns(setdrawer, bus) {
value: '1',
},
];
listOptions_zzgd = [
{
label: '待接单',
value: '0',
},
];
} else {
listOptions = [
{
......@@ -22,6 +30,12 @@ function getcolumns(setdrawer, bus) {
value: '9',
},
];
listOptions_zzgd = [
{
label: '待派单',
value: '8',
},
];
}
return [
{
......@@ -196,7 +210,7 @@ function getcolumns(setdrawer, bus) {
dataIndex: 'statusName',
key: 'status',
valueType: 'select',
options: listOptions,
options: listOptions_zzgd,
fieldProps: {
dropdownMatchSelectWidth: 150,
},
......@@ -291,7 +305,7 @@ function getcolumns(setdrawer, bus) {
dataIndex: 'statusName',
key: 'status',
valueType: 'select',
options: listOptions,
options: listOptions_zzgd,
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-02-01 15:31:06
* @Last Modified time: 2023-02-01 18:48:57
*/
import * as React from 'react';
......@@ -82,7 +82,7 @@ function Failure(props) {
valueType: 'select',
options: {
path: '/repair/umTrackOrder/selectionAgain',
params: { id: drawer?.item.id },
params: { id: drawer?.item.id, permission: 'umTrackOrder:trackById' },
},
},
]}
......@@ -352,7 +352,7 @@ function Failure(props) {
{
label: (
<PremButton
access="umTrackOrder:orderReceiving"
access="umTrackOrder_orderReceiving"
btn={{
onClick: async () => {
let params = {
......@@ -385,7 +385,7 @@ function Failure(props) {
{
label: (
<PremButton
access="umTrackOrder:dispatchById"
access="umTrackOrder_dispatchById"
btn={{
onClick: () => {
setdrawer((s) => ({
......@@ -411,7 +411,7 @@ function Failure(props) {
{
label: (
<PremButton
access="umTrackOrder:trackById"
access="umTrackOrder_trackById"
btn={{
onClick: () => {
setdrawer((s) => ({
......@@ -443,7 +443,7 @@ function Failure(props) {
{
label: (
<PremButton
access="umTrackOrder:verification"
access="umTrackOrder_verification"
btn={{
onClick: () => {
setdrawer((s) => ({
......
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