Commit 06098d35 authored by TZW's avatar TZW

111

parent d5684962
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* @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-22 15:54:06 * @Last Modified time: 2022-12-30 17:32:29
*/ */
import * as React from 'react'; import * as React from 'react';
import { useState, useMemo, useRef } from 'react'; import { useState, useMemo, useRef, useEffect } from 'react';
import DrawerPro from '@/components/DrawerPro'; import DrawerPro from '@/components/DrawerPro';
import AutoTable from '@/components/AutoTable'; import AutoTable from '@/components/AutoTable';
import PremButton from '@/components/PremButton'; import PremButton from '@/components/PremButton';
...@@ -38,7 +38,14 @@ function Failure(props) { ...@@ -38,7 +38,14 @@ function Failure(props) {
} }
}, },
}); });
const perData = useRequest(async () => {
let res = await doFetch({
url: '/auth/sysPermission/queryButton',
params: { parentId: '400300' },
});
return res?.data?.dataList;
});
console.log(perData.data);
const detail = (text, row, _, action) => { const detail = (text, row, _, action) => {
return ( return (
<PremButton <PremButton
...@@ -105,7 +112,9 @@ function Failure(props) { ...@@ -105,7 +112,9 @@ function Failure(props) {
}; };
// 更多 // 更多
const more = (text, row, _, action) => { const More = (text, row, _, action) => {
console.log(perData.data);
const menu = ( const menu = (
<Menu <Menu
items={[ items={[
...@@ -116,14 +125,14 @@ function Failure(props) { ...@@ -116,14 +125,14 @@ function Failure(props) {
setdrawer((s) => ({ setdrawer((s) => ({
...s, ...s,
open: true, open: true,
type: 'jd', type: 'pd',
item: row, item: row,
val: 'only', val: 'only',
title: '接单', title: row?.status == 8 ? '派单' : '接单',
})); }));
}} }}
> >
接单/派单 {row?.status == 8 ? '派单' : '接单'}
</a> </a>
), ),
key: '0', key: '0',
...@@ -328,7 +337,7 @@ function Failure(props) { ...@@ -328,7 +337,7 @@ function Failure(props) {
); );
}; };
// 派单 // 派单
const disp = () => { const Disp = () => {
return ( return (
<OrderHandle <OrderHandle
type="wxpd" type="wxpd"
...@@ -1101,7 +1110,7 @@ function Failure(props) { ...@@ -1101,7 +1110,7 @@ function Failure(props) {
const selectType = { const selectType = {
jd: <Recevive />, jd: <Recevive />,
pd: <disp />, pd: <Disp />,
wcwx: <Finishrepair />, wcwx: <Finishrepair />,
zzz: <Toracking />, zzz: <Toracking />,
zwx: <Toout />, zwx: <Toout />,
...@@ -1132,7 +1141,7 @@ function Failure(props) { ...@@ -1132,7 +1141,7 @@ function Failure(props) {
title: '操作', title: '操作',
valueType: 'option', valueType: 'option',
width: 150, width: 150,
render: (text, row, _, action) => [more(text, row, _, action)], render: (text, row, _, action) => [More(text, row, _, action)],
}); });
} else { } else {
return defcolumn; return defcolumn;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: Li Hanlin * @Author: Li Hanlin
* @Date: 2022-12-05 11:13:26 * @Date: 2022-12-05 11:13:26
* @Last Modified by: Li Hanlin * @Last Modified by: Li Hanlin
* @Last Modified time: 2022-12-30 10:16:39 * @Last Modified time: 2022-12-30 16:25:12
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
...@@ -10,6 +10,7 @@ import InitForm from '@/components/InitForm'; ...@@ -10,6 +10,7 @@ import InitForm from '@/components/InitForm';
import { doFetch } from '@/utils/doFetch'; import { doFetch } from '@/utils/doFetch';
import { message } from 'antd'; import { message } from 'antd';
const App = ({ type, id, actionRef, url, setdrawer }) => { const App = ({ type, id, actionRef, url, setdrawer }) => {
console.log(type);
const columns = { const columns = {
wxjd: [ wxjd: [
{ {
......
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