Commit 66e565ea authored by TZW's avatar TZW

bug

parent 6885c97e
...@@ -13,9 +13,9 @@ export default { ...@@ -13,9 +13,9 @@ export default {
dev: { dev: {
[defaultSetting.proxypath]: { [defaultSetting.proxypath]: {
// 要代理的地址 // 要代理的地址
target: 'http://192.168.40.64:28000', //jf哥 // target: 'http://192.168.40.64:28000', //jf哥
// target: 'http://192.168.40.64:28000', //gc哥 // target: 'http://192.168.40.64:28000', //gc哥
// target: 'http://192.168.40.203:8000', //dj哥 target: 'http://192.168.40.203:8000', //dj哥
changeOrigin: true, changeOrigin: true,
}, },
'/token': { '/token': {
......
...@@ -29,6 +29,7 @@ const EditTable = (props) => { ...@@ -29,6 +29,7 @@ const EditTable = (props) => {
//调用接口 //调用接口
const request = async (params, sort, filter) => { const request = async (params, sort, filter) => {
console.log(params);
if (!path) if (!path)
return { return {
data: dataSource ?? [], data: dataSource ?? [],
...@@ -125,6 +126,7 @@ const EditTable = (props) => { ...@@ -125,6 +126,7 @@ const EditTable = (props) => {
{...props} {...props}
recordCreatorProps={false} recordCreatorProps={false}
size={size} size={size}
params={{ ...extraparams }}
onSubmit={(params) => { onSubmit={(params) => {
//console.log(params, 'onSubmit'); //console.log(params, 'onSubmit');
}} }}
...@@ -142,20 +144,20 @@ const EditTable = (props) => { ...@@ -142,20 +144,20 @@ const EditTable = (props) => {
scroll={ scroll={
x x
? { ? {
x: x, x: x,
} }
: {} : {}
} }
pagination={ pagination={
ifspagination ifspagination
? false ? false
: { : {
showTotal: (total, range) => <span>{total}</span>, showTotal: (total, range) => <span>{total}</span>,
showQuickJumper: true, showQuickJumper: true,
showSizeChanger: true, showSizeChanger: true,
pageSizeOptions: [5, 10, 15, 30, 50, 100, 200], pageSizeOptions: [5, 10, 15, 30, 50, 100, 200],
defaultPageSize: pageSize || 15, defaultPageSize: pageSize || 15,
} }
} }
editable={{ editable={{
type: 'multiple', type: 'multiple',
...@@ -164,7 +166,7 @@ const EditTable = (props) => { ...@@ -164,7 +166,7 @@ const EditTable = (props) => {
}} }}
search={{ search={{
filterType: 'light', //轻量模式 filterType: 'light', //轻量模式
placement: 'bottomLeft' placement: 'bottomLeft',
}} }}
/> />
); );
......
/* eslint-disable react-hooks/exhaustive-deps */ /* eslint-disable react-hooks/exhaustive-deps */
import React, { useState, useRef, memo, createElement, useEffect } from 'react'; import React, { useState, useRef, memo, createElement, useEffect, useMemo } from 'react';
import { import {
ProForm, ProForm,
ProFormDependency, ProFormDependency,
...@@ -1472,6 +1472,108 @@ function FormList({ item, colProps, formRef }) { ...@@ -1472,6 +1472,108 @@ function FormList({ item, colProps, formRef }) {
); );
} }
const Todo = ({ actionRef, value, item, params, rowKey, chooses, onChange }) => {
console.log(params);
return (
<EditTable
actionRef={actionRef}
defaultValue={value} //调用接口合并初始值
path={item.path}
extraparams={params ?? {}}
rowKey={rowKey}
columns={item.columns}
resizeable={false}
alwaysShowAlert={false}
tableAlertRender={false}
tableAlertOptionRender={false}
rowClassName={(record, index) => {
if (chooses.includes(record[rowKey])) {
return 'lightblue';
} else {
return '';
}
}}
rowSelection={{
...item.rowSelection,
columnWidth: 44,
preserveSelectedRowKeys: true,
selectedRowKeys: value && value?.map((it) => it[rowKey]),
onChange: (selectedKeys, selectedRows) => {
const rowkeylist = value ? value?.map((it) => it[rowKey]) : [];
const newValue = selectedRows?.map((its) => {
if (rowkeylist.includes(its[rowKey])) {
return value.filter((it) => it[rowKey] == its[rowKey])[0];
} else {
return its;
}
});
onChange(newValue);
},
}}
editable={{
onValuesChange: (record, recordList) => {
const newValue = value?.map((its) => {
if (its[rowKey] == record[rowKey]) {
return record;
} else {
return its;
}
});
onChange(newValue);
},
}}
/>
);
};
const Done = ({ actionRef, value, item, params, rowKey, chooses, onChange }) => (
<EditTable
value={value}
rowKey={rowKey}
columns={item.columns}
resizeable={false}
alwaysShowAlert={false}
tableAlertRender={false}
tableAlertOptionRender={false}
rowClassName={(record, index) => {
if (chooses.includes(record[rowKey])) {
return 'lightblue';
} else {
return '';
}
}}
rowSelection={{
...item.rowSelection,
columnWidth: 44,
preserveSelectedRowKeys: true,
selectedRowKeys: value && value?.map((it) => it[rowKey]),
onChange: (selectedKeys, selectedRows) => {
const rowkeylist = value ? value?.map((it) => it[rowKey]) : [];
const newValue = selectedRows?.map((its) => {
if (rowkeylist.includes(its[rowKey])) {
return value.filter((it) => it[rowKey] == its[rowKey])[0];
} else {
return its;
}
});
onChange(newValue);
},
}}
editable={{
onValuesChange: (record, recordList) => {
const newValue = value?.map((its) => {
if (its[rowKey] == record[rowKey]) {
return record;
} else {
return its;
}
});
onChange(newValue);
},
}}
/>
);
function TableSelect({ item, value, onChange, params = {} }) { function TableSelect({ item, value, onChange, params = {} }) {
const rowKey = item?.rowKey ?? 'id'; const rowKey = item?.rowKey ?? 'id';
const [chooses, setchooses] = useState([]); //mark 标记 const [chooses, setchooses] = useState([]); //mark 标记
...@@ -1540,105 +1642,15 @@ function TableSelect({ item, value, onChange, params = {} }) { ...@@ -1540,105 +1642,15 @@ function TableSelect({ item, value, onChange, params = {} }) {
/> />
); );
const Todo = () => ( const propes = {
<EditTable actionRef,
actionRef={actionRef} value,
defaultValue={value} //调用接口合并初始值 item,
path={item.path} params,
extraparams={params ?? {}} rowKey,
rowKey={rowKey} chooses,
columns={item.columns} onChange,
resizeable={false} };
alwaysShowAlert={false}
tableAlertRender={false}
tableAlertOptionRender={false}
rowClassName={(record, index) => {
if (chooses.includes(record[rowKey])) {
return 'lightblue';
} else {
return '';
}
}}
rowSelection={{
...item.rowSelection,
columnWidth: 44,
preserveSelectedRowKeys: true,
selectedRowKeys: value && value?.map((it) => it[rowKey]),
onChange: (selectedKeys, selectedRows) => {
const rowkeylist = value ? value?.map((it) => it[rowKey]) : [];
const newValue = selectedRows?.map((its) => {
if (rowkeylist.includes(its[rowKey])) {
return value.filter((it) => it[rowKey] == its[rowKey])[0];
} else {
return its;
}
});
onChange(newValue);
},
}}
editable={{
onValuesChange: (record, recordList) => {
const newValue = value?.map((its) => {
if (its[rowKey] == record[rowKey]) {
return record;
} else {
return its;
}
});
onChange(newValue);
},
}}
/>
);
const Done = () => (
<EditTable
value={value}
rowKey={rowKey}
columns={item.columns}
resizeable={false}
alwaysShowAlert={false}
tableAlertRender={false}
tableAlertOptionRender={false}
rowClassName={(record, index) => {
if (chooses.includes(record[rowKey])) {
return 'lightblue';
} else {
return '';
}
}}
rowSelection={{
...item.rowSelection,
columnWidth: 44,
preserveSelectedRowKeys: true,
selectedRowKeys: value && value?.map((it) => it[rowKey]),
onChange: (selectedKeys, selectedRows) => {
const rowkeylist = value ? value?.map((it) => it[rowKey]) : [];
const newValue = selectedRows?.map((its) => {
if (rowkeylist.includes(its[rowKey])) {
return value.filter((it) => it[rowKey] == its[rowKey])[0];
} else {
return its;
}
});
onChange(newValue);
},
}}
editable={{
onValuesChange: (record, recordList) => {
const newValue = value?.map((its) => {
if (its[rowKey] == record[rowKey]) {
return record;
} else {
return its;
}
});
onChange(newValue);
},
}}
/>
);
return ( return (
<div className="selecttable"> <div className="selecttable">
<Tabs <Tabs
...@@ -1669,8 +1681,8 @@ function TableSelect({ item, value, onChange, params = {} }) { ...@@ -1669,8 +1681,8 @@ function TableSelect({ item, value, onChange, params = {} }) {
{ label: `选择结果${value?.length ?? 0}`, key: 2 }, { label: `选择结果${value?.length ?? 0}`, key: 2 },
]} ]}
/> />
{activetab == 1 && <Todo />} {activetab == 1 && <Todo {...propes} />}
{activetab == 2 && <Done />} {activetab == 2 && <Done {...propes} />}
</div> </div>
); );
} }
......
...@@ -22,8 +22,8 @@ export default (props) => { ...@@ -22,8 +22,8 @@ export default (props) => {
}, },
{ {
title: '设备型号', title: '设备型号',
dataIndex: 'equipmentName', dataIndex: 'equipmentModelName',
key: 'equipmentName', key: 'equipmentModelName',
}, },
{ {
title: '公司名称', title: '公司名称',
......
...@@ -19,7 +19,76 @@ export default (props) => { ...@@ -19,7 +19,76 @@ export default (props) => {
// 维修工单 // 维修工单
const Wxgd = () => { const Wxgd = () => {
return ( // return (
// <>
// <DesItem
// dataSource={request?.data?.dataList[0]}
// title="报修信息"
// hidden={true}
// index="0"
// // navhidden={false}
// />
// {request?.data?.dataList?.splice(1).map((it, index) => {
// return (
// <>
// <DesItem
// type="wxgd"
// dataSource={it}
// index={index + 2}
// hidden={true}
// navhidden={false}
// />
// </>
// );
// })}
// </>
// );
return hidden ? (
<>
<DesItem
dataSource={request?.data?.dataList[0]}
title="基本信息"
hidden={true}
type="wxgd"
index="0"
// navhidden={false}
/>
<DesItem
type="wxgd"
dataSource={request?.data?.dataList[1]}
index={'2'}
hidden={true}
navhidden={false}
/>
<div className="fault-detail" style={{ paddingTop: 30, paddingBottom: 30 }}>
<Tooltip title="点击展开">
<Button
type="primary"
shape="circle"
icon={<MoreOutlined />}
onClick={() => {
sethidden(false);
}}
/>
</Tooltip>
</div>
<DesItem
type="wxgd"
dataSource={request?.data?.dataList[request?.data?.dataList?.length - 2]}
index={request?.data?.dataList?.length - 1}
hidden={true}
navhidden={false}
/>
<DesItem
type="wxgd"
dataSource={request?.data?.dataList[request?.data?.dataList?.length - 1]}
index={request?.data?.dataList?.length}
hidden={true}
navhidden={false}
/>
</>
) : (
<> <>
<DesItem <DesItem
dataSource={request?.data?.dataList[0]} dataSource={request?.data?.dataList[0]}
...@@ -89,19 +158,6 @@ export default (props) => { ...@@ -89,19 +158,6 @@ export default (props) => {
hidden={true} hidden={true}
navhidden={false} navhidden={false}
/> />
{/* {request?.data?.dataList?.splice(1).map((it, index) => {
return (
<>
<DesItem
type="zzgd"
dataSource={it}
index={index + 2}
hidden={true}
navhidden={false}
/>
</>
);
})} */}
</> </>
) : ( ) : (
<> <>
......
...@@ -14,8 +14,8 @@ const getcolumns = { ...@@ -14,8 +14,8 @@ const getcolumns = {
}, },
{ {
title: '设备型号', title: '设备型号',
dataIndex: 'equipmentName', dataIndex: 'equipmentModelName',
key: 'equipmentName', key: 'equipmentModelName',
}, },
{ {
title: '保养类型', title: '保养类型',
......
...@@ -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: 2023-01-30 15:59:06 * @Last Modified time: 2023-02-07 13:31:07
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -149,9 +149,8 @@ function Failure(props) { ...@@ -149,9 +149,8 @@ function Failure(props) {
}, },
{ {
title: '关单时间', title: '关单时间',
dataIndex: 'faultDescription', dataIndex: 'repairCloseTime',
key: 'faultDescription', key: 'repairCloseTime',
valueType: 'textarea',
}, },
]; ];
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,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: 2023-02-02 17:04:01 * @Last Modified time: 2023-02-07 15:25:45
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -146,8 +146,10 @@ function Failure(props) { ...@@ -146,8 +146,10 @@ function Failure(props) {
type: 'wcwx', type: 'wcwx',
item: { item: {
...row, ...row,
repairType: '101',
isShutdown: 1, isShutdown: 1,
repairContent: res?.data?.data?.faultSolution, repairContent: res?.data?.data?.faultSolution,
repairAssistList: row?.repairAssistList.map((it) => it?.assistUserId),
}, },
val: 'only', val: 'only',
title: '完成维修', title: '完成维修',
...@@ -158,7 +160,12 @@ function Failure(props) { ...@@ -158,7 +160,12 @@ function Failure(props) {
...s, ...s,
open: true, open: true,
type: 'wcwx', type: 'wcwx',
item: { ...row, isShutdown: 1 }, item: {
...row,
isShutdown: 1,
repairType: '101',
repairAssistList: row?.repairAssistList.map((it) => it?.assistUserId),
},
val: 'only', val: 'only',
title: '完成维修', title: '完成维修',
})); }));
...@@ -408,8 +415,10 @@ function Failure(props) { ...@@ -408,8 +415,10 @@ function Failure(props) {
type: 'wcwx', type: 'wcwx',
item: { item: {
...row, ...row,
repairType: '101',
isShutdown: 1, isShutdown: 1,
repairContent: res?.data?.data?.faultSolution, repairContent: res?.data?.data?.faultSolution,
repairAssistList: row?.repairAssistList.map((it) => it?.assistUserId),
}, },
val: 'only', val: 'only',
title: '完成维修', title: '完成维修',
...@@ -420,7 +429,12 @@ function Failure(props) { ...@@ -420,7 +429,12 @@ function Failure(props) {
...s, ...s,
open: true, open: true,
type: 'wcwx', type: 'wcwx',
item: { ...row, isShutdown: 1 }, item: {
...row,
repairType: '101',
isShutdown: 1,
repairAssistList: row?.repairAssistList.map((it) => it?.assistUserId),
},
val: 'only', val: 'only',
title: '完成维修', title: '完成维修',
})); }));
......
...@@ -320,6 +320,12 @@ function getcolumns(setdrawer, bus) { ...@@ -320,6 +320,12 @@ function getcolumns(setdrawer, bus) {
path: '/auth/sysUser/selection', path: '/auth/sysUser/selection',
}, },
}, },
{
title: '关单时间',
dataIndex: 'repairCloseTime',
key: 'repairCloseTime',
valueType: 'dateTimeRange',
},
{ {
title: '来源单号', title: '来源单号',
dataIndex: 'dataSourcesNo', dataIndex: 'dataSourcesNo',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,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: 2023-02-03 10:40:38 * @Last Modified time: 2023-02-07 16:50:52
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -179,7 +179,7 @@ function Failure(props) { ...@@ -179,7 +179,7 @@ function Failure(props) {
]} ]}
onFinish={async (vals) => { onFinish={async (vals) => {
let params = { let params = {
otherUnitsAssistList: vals?.otherUnitsAssistList.map((it) => ({ assistUserId: it })), otherUnitsAssistList: [{ assistUserId: vals?.otherUnitsAssistList }],
id: drawer?.item?.id, id: drawer?.item?.id,
}; };
let res = await doFetch({ let res = await doFetch({
......
import dayjs from 'dayjs'; import dayjs from 'dayjs';
function getcolumns(setdrawer, bus) { function getcolumns(setdrawer, bus) {
let listOptions = bus?.map((it) => ({ label: it?.name, value: it?.code })); let listOptions = bus?.map((it) => ({ label: it?.name, value: it?.code }));
console.log(listOptions);
return [ return [
{ {
tab: '我的待办', tab: '我的待办',
...@@ -325,6 +326,12 @@ function getcolumns(setdrawer, bus) { ...@@ -325,6 +326,12 @@ function getcolumns(setdrawer, bus) {
path: '/auth/sysUser/selection', path: '/auth/sysUser/selection',
}, },
}, },
{
title: '关单时间',
dataIndex: 'repairCloseTime',
key: 'repairCloseTime',
valueType: 'dateTimeRange',
},
{ {
title: '来源单号', title: '来源单号',
dataIndex: 'repairNo', dataIndex: 'repairNo',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,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: 2023-02-01 18:48:57 * @Last Modified time: 2023-02-07 16:08:46
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -54,7 +54,7 @@ function Failure(props) { ...@@ -54,7 +54,7 @@ function Failure(props) {
...s, ...s,
SpecName: res?.data?.dataList, SpecName: res?.data?.dataList,
})); }));
}, []); }, [activeTabKey]);
// 重新指派 // 重新指派
const Reassig = () => { const Reassig = () => {
...@@ -132,11 +132,11 @@ function Failure(props) { ...@@ -132,11 +132,11 @@ function Failure(props) {
formItemProps: { rules: [{ required: true, message: '此项为必填项' }] }, formItemProps: { rules: [{ required: true, message: '此项为必填项' }] },
options: [ options: [
{ {
value: '1', value: 1,
label: '正常', label: '正常',
}, },
{ {
value: '2', value: 2,
label: '异常', label: '异常',
}, },
], ],
...@@ -152,11 +152,11 @@ function Failure(props) { ...@@ -152,11 +152,11 @@ function Failure(props) {
key: 'isFinishTrack', key: 'isFinishTrack',
options: [ options: [
{ {
value: '1', value: 1,
label: '是', label: '是',
}, },
{ {
value: '2', value: 2,
label: '否', label: '否',
}, },
], ],
...@@ -165,6 +165,8 @@ function Failure(props) { ...@@ -165,6 +165,8 @@ function Failure(props) {
title: '追踪周期', title: '追踪周期',
dataIndex: 'trackCycle', dataIndex: 'trackCycle',
key: 'trackCycle', key: 'trackCycle',
valueType: 'digit',
precision: 0,
fieldProps: { fieldProps: {
disabled: true, disabled: true,
}, },
...@@ -424,8 +426,8 @@ function Failure(props) { ...@@ -424,8 +426,8 @@ function Failure(props) {
trackResult: '1', trackResult: '1',
isFinishTrack: '2', isFinishTrack: '2',
}, },
// detailpath: '/repair/umTrackTraceinfo/queryByTrackOrderId', detailpath: '/repair/umTrackTraceinfo/queryByTrackOrderId',
// params: { trackOrderId: row?.id }, params: { trackOrderId: row?.id },
val: 'only', val: 'only',
title: '追踪信息', title: '追踪信息',
})); }));
...@@ -451,7 +453,7 @@ function Failure(props) { ...@@ -451,7 +453,7 @@ function Failure(props) {
open: true, open: true,
val: 'only', val: 'only',
title: '验证', title: '验证',
item: row, item: { ...row, reviewerResult: 1 },
detailpath: '/repair/umTrackTraceinfo/queryByTrackOrderId', detailpath: '/repair/umTrackTraceinfo/queryByTrackOrderId',
params: { trackOrderId: row?.id }, params: { trackOrderId: row?.id },
type: 'check', type: 'check',
...@@ -555,7 +557,7 @@ function Failure(props) { ...@@ -555,7 +557,7 @@ function Failure(props) {
} else if (activeTabKey == '3') { } else if (activeTabKey == '3') {
return defcolumn; return defcolumn;
} }
}, [activeTabKey]); }, [activeTabKey, drawer?.SpecName]);
const pathconfig = useMemo(() => { const pathconfig = useMemo(() => {
let defpath = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {}; let defpath = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {};
......
...@@ -102,6 +102,9 @@ function getcolumns(setdrawer) { ...@@ -102,6 +102,9 @@ function getcolumns(setdrawer) {
title: '入库单号', title: '入库单号',
dataIndex: 'taskNo', dataIndex: 'taskNo',
key: 'taskNo', key: 'taskNo',
fieldProps: {
placeholder: '不填系统自动生成',
},
}, },
{ {
title: '入库类型', title: '入库类型',
...@@ -216,7 +219,7 @@ function getcolumns(setdrawer) { ...@@ -216,7 +219,7 @@ function getcolumns(setdrawer) {
dataIndex: 'createTime', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
hideInForm: true, hideInForm: true,
valueType: 'dateRange', valueType: 'dateTimeRange',
render: (text, row) => { render: (text, row) => {
return <span>{row?.createTime}</span>; return <span>{row?.createTime}</span>;
}, },
...@@ -228,7 +231,6 @@ function getcolumns(setdrawer) { ...@@ -228,7 +231,6 @@ function getcolumns(setdrawer) {
valueType: 'split', valueType: 'split',
}, },
{ {
title: '备件',
dataIndex: 'detailsList', dataIndex: 'detailsList',
key: 'detailsList', key: 'detailsList',
valueType: 'formList', valueType: 'formList',
...@@ -387,7 +389,7 @@ function getcolumns(setdrawer) { ...@@ -387,7 +389,7 @@ function getcolumns(setdrawer) {
dataIndex: 'createTime', dataIndex: 'createTime',
key: 'createTimeList', key: 'createTimeList',
hideInForm: true, hideInForm: true,
valueType: 'dateRange', valueType: 'dateTimeRange',
render: (text, row) => { render: (text, row) => {
return <span>{row?.createTime}</span>; return <span>{row?.createTime}</span>;
}, },
...@@ -397,6 +399,7 @@ function getcolumns(setdrawer) { ...@@ -397,6 +399,7 @@ function getcolumns(setdrawer) {
dataIndex: 'completeTime', dataIndex: 'completeTime',
key: 'completeTimeList', key: 'completeTimeList',
hideInForm: true, hideInForm: true,
span: 3,
valueType: 'dateRange', valueType: 'dateRange',
render: (text, row) => { render: (text, row) => {
return <span>{row?.completeTime}</span>; return <span>{row?.completeTime}</span>;
...@@ -409,7 +412,6 @@ function getcolumns(setdrawer) { ...@@ -409,7 +412,6 @@ function getcolumns(setdrawer) {
valueType: 'split', valueType: 'split',
}, },
{ {
title: '备件',
dataIndex: 'detailsList', dataIndex: 'detailsList',
key: 'detailsList', key: 'detailsList',
valueType: 'formList', valueType: 'formList',
...@@ -445,6 +447,9 @@ function getcolumns(setdrawer) { ...@@ -445,6 +447,9 @@ function getcolumns(setdrawer) {
key: 'status', key: 'status',
hideInForm: true, hideInForm: true,
valueType: 'select', valueType: 'select',
fieldProps: {
dropdownMatchSelectWidth: 120,
},
width: 120, width: 120,
options: [ options: [
{ label: '已入库', value: 2 }, { label: '已入库', value: 2 },
......
...@@ -112,6 +112,14 @@ function getcolumns(setdrawer) { ...@@ -112,6 +112,14 @@ function getcolumns(setdrawer) {
dataIndex: 'isLifeName', dataIndex: 'isLifeName',
key: 'isLife', key: 'isLife',
valueType: 'select', valueType: 'select',
formItemProps: {
rules: [
{
required: true,
message: '此项为必填项',
},
],
},
options: [ options: [
{ {
label: '是', label: '是',
...@@ -132,7 +140,7 @@ function getcolumns(setdrawer) { ...@@ -132,7 +140,7 @@ function getcolumns(setdrawer) {
valueType: 'split', valueType: 'split',
}, },
{ {
title: '供应商', // title: '供应商',
dataIndex: 'relationSupplierList', dataIndex: 'relationSupplierList',
key: 'relationSupplierList', key: 'relationSupplierList',
valueType: 'formSelectList', valueType: 'formSelectList',
......
...@@ -77,9 +77,9 @@ request.interceptors.request.use(async (url, options) => { ...@@ -77,9 +77,9 @@ request.interceptors.request.use(async (url, options) => {
// response拦截器, 处理response // response拦截器, 处理response
request.interceptors.response.use(async (response, options) => { request.interceptors.response.use(async (response, options) => {
if (response?.status == '401') { // if (response?.status == '401') {
window.location.href = '/'; // window.location.href = '/';
} // }
if (options.responseType == 'blob') { if (options.responseType == 'blob') {
const data = await response.clone().blob(); const data = await response.clone().blob();
let blobUrl = window.URL.createObjectURL(data); let blobUrl = window.URL.createObjectURL(data);
......
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