Commit 53a951d3 authored by TZW's avatar TZW

cccc

parent 0125451f
......@@ -344,14 +344,17 @@ let Diyrule = (props) => {
{value &&
value.length > 0 &&
value.map((it, i) => {
console.log(it);
return (
<Row key={i} style={{ padding: '6px 0 12px 0' }} gutter={24}>
<Col span={2}>
<p style={{ color: '#999', marginBottom: 24 }}>关联规则</p>
<Checkbox
checked={other.increaseList && other.increaseList.indexOf(it?.id) != -1}
// defaultChecked={
// other.increaseList && other.increaseList.indexOf(it?.sort + 1) != -1
// }
onChange={(e) => {
console.log(e, other, value);
let checked = e.target.checked;
if (checked) {
let newlist = [...other?.increaseList];
......
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2023-01-19 09:53:59
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-19 10:03:55
* @Last Modified time: 2023-01-30 16:18:16
*/
import * as React from 'react';
......@@ -500,7 +500,8 @@ function WorkOrder(props) {
type: 'primary',
loading,
onClick: () => {
let maintainTaskItemList = drawer?.item?.item?.map((it) => {
console.log(drawer);
let maintainTaskItemList = drawer?.item?.maintainTaskItemList?.map((it) => {
if (it.judgeType == 1) {
return {
id: it.id,
......@@ -515,8 +516,9 @@ function WorkOrder(props) {
};
}
});
console.log(maintainTaskItemList);
run({
url: '/maintain/umMaintainTask/finishMaintainTask',
url: '/maintain/umMaintainTask/maintainTaskItemList',
params: { id: drawer?.item?.id, maintainTaskItemList },
});
},
......
......@@ -193,12 +193,12 @@ function getcolumns(setdrawer) {
valueType: 'select',
options: [
{
label: '待维修',
value: '1',
label: '已完成',
value: '3',
},
{
label: '维修中',
value: '2',
label: '已退单',
value: '4',
},
],
},
......
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-04 10:29:44
* @Last Modified time: 2023-01-30 15:59:06
*/
import * as React from 'react';
......@@ -96,6 +96,7 @@ function Failure(props) {
const columns = useMemo(() => {
let defcolumn = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.columns;
let defpath = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {};
if (activeTabKey == 1) {
return defcolumn.concat({
title: '操作',
valueType: 'option',
......@@ -105,6 +106,9 @@ function Failure(props) {
defpath?.enabledelete && remove(text, row, _, action),
],
});
} else {
return defcolumn;
}
}, [activeTabKey]);
const basecolumns = useMemo(() => {
......
......@@ -3,7 +3,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-30 14:34:25
* @Last Modified time: 2023-01-31 09:19:09
*/
import * as React from 'react';
......@@ -121,11 +121,9 @@ function Failure(props) {
// 更多
const More = (text, row, _, action) => {
console.log(drawer);
let menulist = [];
if (drawer?.SpecName?.businessData !== '2') {
// 接单模式
console.log(1);
if (row?.status == '2') {
menulist = [
{
......@@ -366,7 +364,6 @@ function Failure(props) {
];
}
} else {
console.log(2);
if (row?.status == '2') {
menulist = [
{
......@@ -1129,7 +1126,7 @@ function Failure(props) {
{
title: '申请追踪原因',
dataIndex: 'reason',
key: 'reson',
key: 'reason',
fieldProps: {
disabled: true,
},
......
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-05 11:13:26
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-30 14:38:08
* @Last Modified time: 2023-01-30 17:00:18
*/
import React, { useState, useEffect } from 'react';
......@@ -100,7 +100,9 @@ const App = ({ type, id, actionRef, url, setdrawer }) => {
}
},
wxpd: async (vals) => {
let params = {};
let params = {
repairId: vals?.repairId,
};
if (vals.repairAssistList) {
params.repairAssistList = vals?.repairAssistList.map((it) => {
return {
......
import dayjs from 'dayjs';
console.log(dayjs().format('YYYY-MM-DD').valueOf());
function getcolumns(setdrawer, bus) {
let listOptions = [];
if (bus !== '2') {
listOptions = [
{
label: '待接单',
value: '1',
},
{
label: '追踪中',
value: '3',
},
{
label: '待验证',
value: '4',
},
{
label: '已完成',
value: '5',
},
];
} else {
listOptions = [
{
label: '待派单',
value: '2',
},
{
label: '追踪中',
value: '3',
},
{
label: '待验证',
value: '4',
},
{
label: '已完成',
value: '5',
},
];
}
let listOptions = bus?.map((it) => ({ label: it?.name, value: it?.code }));
return [
{
tab: '我的待办',
......@@ -376,8 +334,7 @@ function getcolumns(setdrawer, bus) {
title: '工单状态',
dataIndex: 'statusName',
key: 'status',
valueType: 'select',
options: listOptions,
search: false,
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-01-30 14:33:09
* @Last Modified time: 2023-01-31 09:20:37
*/
import * as React from 'react';
......@@ -43,14 +43,14 @@ function Failure(props) {
useEffect(async () => {
let res = await doFetch({
url: '/base/pmBaseBusinessData/queryBySpecName',
url: '/base/pmBaseBusinessData/queryBySpeNameList',
params: {
businessSpecName: 'TRACKING_ORDER_DISTRIBUTE',
modelType: '2',
},
});
setdrawer((s) => ({
...s,
SpecName: res?.data?.data,
SpecName: res?.data?.dataList,
}));
}, []);
......@@ -514,14 +514,13 @@ function Failure(props) {
};
const columns = useMemo(() => {
let defcolumn = getcolumns(setdrawer, drawer?.SpecName?.businessData).filter(
let defcolumn = getcolumns(setdrawer, drawer?.SpecName).filter(
(it) => it.key == activeTabKey,
)[0]?.columns;
//console.log(defcolumn);
let defpath =
getcolumns(setdrawer, drawer?.SpecName?.businessData).filter(
(it) => it.key == activeTabKey,
)[0]?.pathconfig ?? {};
getcolumns(setdrawer, drawer?.SpecName).filter((it) => it.key == activeTabKey)[0]
?.pathconfig ?? {};
if (activeTabKey == '1') {
return defcolumn.concat({
......
......@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2022-11-09 14:44:44
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-01-30 13:10:55
* @Last Modified time: 2023-01-30 18:43:49
*/
import * as React from 'react';
......@@ -190,14 +190,34 @@ function Rules(props) {
params.nrList = [];
params.nrList = params.nrList.concat(vals?.nrList.value);
if (vals?.nrList.other.sort) {
vals.nrList.other.increaseList = Array.from(
Array(vals?.nrList.value.length + 1),
(_, index) => index + 1,
).filter((it) => it !== vals?.nrList.other.sort + 1);
// vals.nrList.other.increaseList = Array.from(
// Array(vals?.nrList.value.length + 1),
// (_, index) => index + 1,
// ).filter((it) => it !== vals?.nrList.other.sort + 1);
params.nrList.splice(vals?.nrList.other.sort, 0, vals?.nrList.other);
let arr = [];
params.nrList.forEach?.((it, i) => {
it.sort = i + 1;
});
console.log(arr);
params.nrList.forEach((it) => {
if (it.noRuleCode == 'increasing_order') {
let increaseListArr = [];
it.increaseList.forEach((id) => {
increaseListArr = params.nrList
.filter((item) => item?.id == id)
.map((it) => {
return it?.sort;
});
});
arr = increaseListArr;
}
});
params.nrList.forEach((it) => {
if (it.noRuleCode == 'increasing_order') {
it.increaseList = arr;
}
});
} else {
message.warning('请选择顺序递增规则的位置!');
return;
......
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