Commit 0c07eee7 authored by 前端-钟卫鹏's avatar 前端-钟卫鹏

fix:

parent d5d98f86
......@@ -2,7 +2,6 @@ import { defineConfig } from 'umi';
import routes from './router';
import proxy from './proxy';
import theme from './lingxi.theme.config';
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
const OPEN_THEME_BUILD = process.env.NODE_ENV === 'production' ? true : false; // 是否开启动态主题
const isProduction = process.env.NODE_ENV === 'production' ? true : false;
......@@ -114,33 +113,6 @@ const config: any = {
},
},
});
// config.plugin('hardSource').use(HardSourceWebpackPlugin)
config.plugin('hardSource').use(
new HardSourceWebpackPlugin({
cacheDirectory: 'node_modules/.cache/hard-source/[confighash]',
configHash: function(webpackConfig) {
return require('node-object-hash')({ sort: false }).hash(
webpackConfig,
);
},
}),
); // 使用中间缓存步骤扩展提升二次编译速度
// 对下面配置的 module 不进行缓存
config
.plugin('hardSourceExcludeModule')
.use(HardSourceWebpackPlugin.ExcludeModulePlugin, [
[
{
test: /mini-css-extract-plugin[\\/]dist[\\/]loader/,
},
// {
// test: /eslint-loader/,
// },
// {
// test: /.*\.DS_Store/,
// },
],
]);
},
cssLoader: {
localsConvention: 'camelCase', // 将style中的class由 .foo-body 转化为fooBody调用
......
......@@ -201,6 +201,7 @@ const AddNewBid:React.FC<AddNewBidProps> = (props) => {
if(state.value === PUBLIC_BID) {
if(pageStatus === PageStatus.EDIT && !publicFlag.current) {
publicRef.current.setVisible(false)
publicFlag.current = true
} else {
publicRef.current.setVisible(true)
}
......
......@@ -61,7 +61,10 @@ export const useMaterialTable = (ctx: ISchemaFormActions | ISchemaFormAsyncActio
await drawerSchemaAction.setFieldValue('unitName', record['unitName'])
await drawerSchemaAction.setFieldValue('count', record['count'])
await drawerSchemaAction.setFieldValue('has', record['has'])
await drawerSchemaAction.setFieldState('code', state => state.props["x-component-props"].disabled = true)
await drawerSchemaAction.setFieldState('code', state => {
state.props["x-component-props"].disabled = true
state.props["x-component-props"].addonAfter = ''
})
}, 200)
if (pageStatus === PageStatus.EDIT) {
await drawerSchemaAction.setFieldValue('file', record['file'])
......
......@@ -69,7 +69,7 @@ export const tableListSchema: ISchema = {
value: item,
}))
},
"[checkStartTime,checkEndTime]": {
"[preCheckStartTime,preCheckEndTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
......
......@@ -58,6 +58,7 @@ const ReadyAddBid:React.FC<ReadyAddBidProps> = (props) => {
// 批量审核
const handleBitchPush = async () => {
const canDelete = !rowSelectionCtl.selectRow.some(v => v.inviteTenderInStatus !== BidInsideWorkState.Not_Submitted_Check_Invite_Tender)
if(!rowSelectionCtl.selectedRowKeys.length) { return message.error('请先选择招标') }
if (canDelete) {
const { code } = await submitRun({idList: rowSelectionCtl.selectedRowKeys})
if (code === 1000) {
......
......@@ -21,8 +21,17 @@ const ReadySubmitBidDetail: React.FC = () => {
const { run, loading } = useHttpRequest(PublicApi.postPurchaseInviteTenderSubmittedInviteTender)
const handleClick = useCallback(() => {
approvedRef.current.setVisible(true)
const handleClick = useCallback(async () => {
// approvedRef.current.setVisible(true)
const params = {
idList: [Number(id)],
}
const result = await run(params)
if (result.code === 1000) {
approvedRef.current.setVisible(false)
history.goBack()
}
}, [])
// 提交审核表单
......@@ -35,7 +44,6 @@ const ReadySubmitBidDetail: React.FC = () => {
const result = await run(params)
if (result.code === 1000) {
approvedRef.current.setVisible(false)
history.goBack()
}
})
......@@ -73,12 +81,12 @@ const ReadySubmitBidDetail: React.FC = () => {
</OrderDetailWrapper>
{/* 点击审核触发的弹窗集合 */}
<ApprovedModal
{/* <ApprovedModal
currentRef={approvedRef}
onConfirm={handleSubmit}
loading={loading}
title="单据审核"
/>
/> */}
</BidDetailContext.Provider>
</div>
......
......@@ -18,7 +18,7 @@ export const useSelfTable = () => {
align: 'center',
dataIndex: 'ctl',
key: 'ctl',
render: (text, record) => <Button type='link' onClick={() => handleSubmit(record)}>审核</Button>
render: (text, record) => <Button type='link' onClick={() => handleSubmit(record)}>提交</Button>
}
])
......
......@@ -112,6 +112,12 @@ export const productInfoColumns: any[] = [
render: (t, r) => <><div>{t}</div><div>{r.name}</div></>
},
{
title: '规格',
dataIndex: 'type',
align: 'center',
key: 'type',
},
{
title: '品类',
dataIndex: 'categoryName',
align: 'center',
......
......@@ -95,7 +95,7 @@ const AddTender:React.FC<AddTenderProps> = (props) => {
file: value['file'],
remark: value['remark'],
submitTenderMateriel: value['submitTenderMateriel'].map(item => {
if(!value?.id) {
if(!value?.id && item?.file?.lengt) {
item.file = item.file.map(_ => {
delete _.id
return _
......@@ -109,6 +109,11 @@ const AddTender:React.FC<AddTenderProps> = (props) => {
return param
})
}
// 校验是否关联商品
if(!params.submitTenderMateriel.some(v => v.productId && v.commodityId)) {
setBtnLoading(false)
return message.error('请先关联投标商品')
}
if(value?.id) params.id = value.id
const res = await PublicApi.postPurchaseSubmitTenderSaveSubmitTender(params)
if(res.code === 1000) {
......
......@@ -88,6 +88,10 @@ const ReadyQualifityCheckedDetail: React.FC = () => {
}
},
beforeUpload(file) {
if(file.name.length > 100) {
message.warning('文件名过长');
return Promise.reject();
}
if (file.size / 1024 / 1024 > 20) {
message.warning('附件大小超过20M');
return Promise.reject();
......
......@@ -42,6 +42,13 @@ export const procurementProcessField = (value) => {
deliveryType: item.logistics.deliveryType,
// @todo 后端暂无返回 写死1
minOrder: 1,
// 物料信息
materialId: item.id,
materialCode: item.code,
materialName: item.name,
materialType: item.type,
materialCategory: item.category,
materialBrand: item.brand,
}
})
return value
......
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