Commit 4ce66f62 authored by alwayOnlie's avatar alwayOnlie

工作流修改

parent 3a6315ed
......@@ -11,17 +11,20 @@ import { IAntdSchemaFormProps } from '@formily/antd'
export interface Iprops extends IAntdSchemaFormProps {
/* 付款计划数组 */
IsShow?: boolean,
payPlanList: any,
basics: any,
contractId: any,
}
}
const PaymentCard: React.FC<Iprops> = ({
IsShow,
payPlanList,
basics,
contractId
contractId,
}) => {
console.log(IsShow, '1111111111111')
/* 非手工单进入请款 */
const like = (sourceType) => {
sessionStorage.setItem('basics', JSON.stringify(basics));
......@@ -47,7 +50,9 @@ const PaymentCard: React.FC<Iprops> = ({
<div className={style.proportion}>{item.payRatio}%</div>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<div className={style.Price}>¥{item.payAmount}</div>
<div onClick={() => like(1)} style={{ cursor: 'pointer', fontSize: 12, backgroundColor: '#00B37A', color: '#fff', padding: '4px 8px' }}>请款</div>
{
!IsShow && <div onClick={() => like(1)} style={{ cursor: 'pointer', fontSize: 12, backgroundColor: '#00B37A', color: '#fff', padding: '4px 8px' }}>请款</div>
}
</div>
<div className={style.warp_List}>
<div className={style.warp_ListItem}>
......@@ -74,6 +79,7 @@ const PaymentCard: React.FC<Iprops> = ({
)
}
PaymentCard.defaultProps = {
IsShow: false,
payPlanList: [],
basics: {},
contractId: 0,
......
......@@ -123,7 +123,11 @@ const contractexecutionList = () => {
return async function () {
const res = await service();
if (res.code === 1000) {
return res.data.map((item) => { return { label: item.name, value: item.status } })
if (res.data.innerList) {
return res.data.innerList.map((item) => { return { label: item.message, value: item.code } })
} else {
return res.data.outerList.map((item) => { return { label: item.message, value: item.code } })
}
}
return [];
}
......@@ -168,7 +172,7 @@ const contractexecutionList = () => {
);
useAsyncSelect(
"outerStatus",
fetchOptions(PublicApi.getContractExecuteGetOuterStatusList)
fetchOptions(PublicApi.getContractExecuteStatusList)
)
},
components: {
......
......@@ -328,7 +328,11 @@ const Details = (props: any) => {
console.log(data)
getContracInfoList(data)
};
/* 非手工单进入请款 */
const like = (sourceType) => {
sessionStorage.setItem('basics', JSON.stringify(basics));
history.push('/memberCenter/contract/funds/addbill/Add?applyId=' + contractId + '&sourceType=' + sourceType)
}
return (
<div className={style.anchorWrap}>
<Anchor
......@@ -376,7 +380,11 @@ const Details = (props: any) => {
{/* 基本信息 */}
<BasicInfo basicInfo={basicInfo} />
{/* 付款计划 */}
<PaymentCard payPlanList={payPlanList} basics={basics} contractId={contractId} />
<PaymentCard
payPlanList={payPlanList}
basics={basics}
contractId={contractId}
/>
{/* 执行情况 */}
<div id='docking' className='ant-card ant-card-bordered'>
<div className='ant-card-head'>
......
......@@ -29,7 +29,7 @@ const coordinationList = () => {
render: (text, record) =>
<div>
<EyePreview
type="button"
url={`/memberCenter/contract/coordination/coordinationList/details?contractId=${record.id}`}
>
{text}
</EyePreview>
......@@ -105,11 +105,17 @@ const coordinationList = () => {
}
]
const fetchOptions = (service) => {
const fetchOptions = (service, Status) => {
console.log(service, 'service', Status)
return async function () {
const res = await service();
if (res.code === 1000) {
return res.data.map((item) => { return { label: item.name, value: item.status } })
if (Status == 'outerStatus') {
return res.data.outerList.map((item) => { return { label: item.message, value: item.code } })
} else {
return res.data.innerList.map((item) => { return { label: item.message, value: item.code } })
}
}
return [];
}
......@@ -153,11 +159,17 @@ const coordinationList = () => {
);
useAsyncSelect(
"outerStatus",
fetchOptions(PublicApi.getContractCoordinationGetOuterStatusList)
fetchOptions(
PublicApi.getContractCoordinationStatusList,
'outerStatus'
)
)
useAsyncSelect(
"innerStatus",
fetchOptions(PublicApi.getContractCoordinationGetInnerStatusList)
fetchOptions(
PublicApi.getContractCoordinationStatusList,
'innerStatus'
)
)
},
components: {
......
......@@ -317,7 +317,7 @@ const Details = (props: any) => {
type != 'implement' && <PurchaseList contractId={contractId} type={type} Refresh={Refresh} />
}
{/* 付款计划 */}
<PaymentCard payPlanList={payPlanList} basics={basicInfo} contractId={contractId} />
<PaymentCard IsShow={true} payPlanList={payPlanList} basics={basicInfo} contractId={contractId} />
{/* 交易条件 */}
{
type != 'implement' &&
......
......@@ -117,6 +117,7 @@ const purchaseList: React.FC<Iprops> = ({
contractId
}).then(res => {
let Totalamount = 0, Numberamount = 0;
if (res.data.data) {
res.data.data.map(item => {
Totalamount += item.bidAmount;
Numberamount += item.bidCount
......@@ -127,6 +128,7 @@ const purchaseList: React.FC<Iprops> = ({
setListData(res.data.data)
Refresh(res.data.data)
setTotal(res.data.totalCount)
}
}).finally(() => {
setListLoading(false);
});
......@@ -135,13 +137,16 @@ const purchaseList: React.FC<Iprops> = ({
/** 确定关联商品 */
const handleConfirm = (params: any) => {
const data = [...ListData];
const productAttributeJson = params.product.name.split('/').filter((_item, index) => index !== 0).join('/');
console.log(data[index])
data[index].associatedCategory = params.product.customerCategoryName;
data[index].associatedBrand = params.product.brandName;
data[index].associatedGoods = params.product.name;
const purchaseMaterielId = data[index].id;
const associatedMaterielNo = data[index].associatedMaterielNo ? data[index].associatedMaterielNo : params.product.code
const associatedMaterielName = data[index].materielName;
const associatedType = data[index].associatedType;
// const associatedType = data[index].name;
const associatedType = `${productAttributeJson}-${params.product.customerCategoryName}`;
const associatedCategory = data[index].associatedCategory
const associatedBrand = data[index].associatedBrand
const res_data = {
......@@ -155,7 +160,7 @@ const purchaseList: React.FC<Iprops> = ({
associatedCategory,
associatedBrand
}
console.log(params, 10086, res_data)
console.log(res_data, '请求过去参数', params.product)
let msg = message.loading({
content: '正在操作',
duration: 0,
......
......@@ -7,7 +7,7 @@ import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { CoordinationSchema } from '../schema'
import { SchemaList } from '../schema'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
......@@ -108,28 +108,18 @@ const Sign = () => {
)
}
},
// {
// title: '操作',
// dataIndex: 'innerStatusName',
// align: 'center',
// render: (text, record) => {
// return (
// <div>
// <span style={{ color: '#00B37A', cursor: 'pointer' }} onClick={() => history.push(`/memberCenter/contract/coordination/pageToBeSubmitExamine/details?contractId=${record.id}&type=submitExamine`)}>执行详情</span>
// </div>
// )
// }
// }
]
const fetchOptions = (service) => {
return async function () {
const res = await service();
if (res.code === 1000) {
return res.data.map((item) => { return { label: item.name, value: item.status } })
return res.data.outerList.map((item) => { return { label: item.message, value: item.code } })
}
return [];
}
}
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
......@@ -161,7 +151,7 @@ const Sign = () => {
formilyProps={{
ctx: {
inline: false,
schema: CoordinationSchema,
schema: SchemaList,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
......@@ -171,7 +161,9 @@ const Sign = () => {
);
useAsyncSelect(
"outerStatus",
fetchOptions(PublicApi.getContractExecuteGetOuterStatusList)
fetchOptions(
PublicApi.getContractCoordinationStatusList,
)
)
},
......
......@@ -7,7 +7,7 @@ import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { CoordinationSchema } from '../schema'
import { Schema } from '../schema'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
......@@ -172,7 +172,7 @@ const pageToBeExamineOne = () => {
formilyProps={{
ctx: {
inline: false,
schema: CoordinationSchema,
schema: Schema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
......@@ -180,14 +180,6 @@ const pageToBeExamineOne = () => {
'contractNo',
FORM_FILTER_PATH,
);
useAsyncSelect(
"outerStatus",
fetchOptions(PublicApi.getContractCoordinationGetOuterStatusList)
)
useAsyncSelect(
"innerStatus",
fetchOptions(PublicApi.getContractCoordinationGetInnerStatusList)
)
},
components: {
DateRangePickerUnix,
......
......@@ -7,7 +7,7 @@ import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { CoordinationSchema } from '../schema'
import { Schema } from '../schema'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
......@@ -170,7 +170,7 @@ const pageToBeExamineTwo = () => {
formilyProps={{
ctx: {
inline: false,
schema: CoordinationSchema,
schema: Schema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
......@@ -178,14 +178,6 @@ const pageToBeExamineTwo = () => {
'contractNo',
FORM_FILTER_PATH,
);
useAsyncSelect(
"outerStatus",
fetchOptions(PublicApi.getContractCoordinationGetOuterStatusList)
)
useAsyncSelect(
"innerStatus",
fetchOptions(PublicApi.getContractCoordinationGetInnerStatusList)
)
},
components: {
DateRangePickerUnix,
......
......@@ -7,13 +7,12 @@ import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { CoordinationSchema } from '../schema'
import { Schema } from '../schema'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { PublicApi } from '@/services/api';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import moment from 'moment';
import { history } from 'umi';
import ExamineFrom from '../../components/examine'
......@@ -33,7 +32,7 @@ const pageToBeSubmitExamine = () => {
render: (text, record) =>
<div>
<EyePreview
url={`/memberCenter/contract/coordination/pageToBeSubmitExamine/details?contractId=${record.id}`}
url={`/memberCenter/contract/coordination/pageToBeSubmitExamine/details?contractId=${record.id}&type=submitExamine`}
>
{text}
</EyePreview>
......@@ -107,22 +106,13 @@ const pageToBeSubmitExamine = () => {
render: (text, record) => {
return (
<div>
<span style={{ color: '#00B37A', cursor: 'pointer', marginRight: 10 }} onClick={() => submitExamine(record.id)}>提交审核</span>
<span style={{ color: '#00B37A', cursor: 'pointer' }} onClick={() => history.push(`/memberCenter/contract/coordination/pageToBeSubmitExamine/details?contractId=${record.id}&type=submitExamine`)}>查看</span>
<span style={{ color: '#00B37A', cursor: 'pointer' }} onClick={() => history.push(`/memberCenter/contract/coordination/pageToBeSubmitExamine/details?contractId=${record.id}&type=submitExamine`)}>提交审核</span>
</div>
)
}
}
]
const fetchOptions = (service) => {
return async function () {
const res = await service();
if (res.code === 1000) {
return res.data.map((item) => { return { label: item.name, value: item.status } })
}
return [];
}
}
// 列表数据
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
......@@ -141,11 +131,6 @@ const pageToBeSubmitExamine = () => {
})
}
/* 提交表单 */
const submitExamine = (id) => {
setid(id)
setIsModalVisible(!Visible)
}
/* 提交审核的回调 */
const getfetchData = (data) => {
......@@ -169,7 +154,7 @@ const pageToBeSubmitExamine = () => {
formilyProps={{
ctx: {
inline: false,
schema: CoordinationSchema,
schema: Schema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
......@@ -177,14 +162,6 @@ const pageToBeSubmitExamine = () => {
'contractNo',
FORM_FILTER_PATH,
);
useAsyncSelect(
"outerStatus",
fetchOptions(PublicApi.getContractCoordinationGetOuterStatusList)
)
useAsyncSelect(
"innerStatus",
fetchOptions(PublicApi.getContractCoordinationGetInnerStatusList)
)
},
components: {
DateRangePickerUnix,
......
......@@ -43,11 +43,137 @@ export const CoordinationSchema: ISchema = {
},
outerStatus: {
type: 'string',
"x-component-props": {
placeholder: '请选择外部状态'
},
// 0.所有状态,1.待提交乙方签订合同,2.待乙方签订合同,3.乙方不同意签订合同,4.待甲方签订合同,5.甲方不同意签订合同,6.已完成签约,7.已作废,8.已停用,9.合同已到期
enum: [],
},
innerStatus: {
type: 'string',
"x-component-props": {
placeholder: '请选择内部状态'
},
enum: [],
},
partyAName: {
type: 'string',
'x-component-props': {
placeholder: '请输入合同甲方',
}
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
}
}
/* 合同协同 */
export const Schema: ISchema = {
type: 'object',
properties: {
contractNo: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入合同编号',
align: 'start',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
colStyle: {
marginRight: 20
}
},
properties: {
contractAbstract: {
type: 'string',
'x-component-props': {
placeholder: '请输入合同摘要',
}
},
"[startTime,endTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间', '结束时间'],
},
},
partyAName: {
type: 'string',
'x-component-props': {
placeholder: '请输入合同甲方',
}
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
}
}
/* 合同执行 */
export const SchemaList: ISchema = {
type: 'object',
properties: {
contractNo: {
type: 'string',
"x-component": 'SearchFilter',
'x-component-props': {
placeholder: '请输入合同编号',
align: 'start',
},
},
[FORM_FILTER_PATH]: {
type: 'object',
'x-component': 'flex-layout',
'x-component-props': {
inline: true,
colStyle: {
marginRight: 20
}
},
properties: {
contractAbstract: {
type: 'string',
'x-component-props': {
placeholder: '请输入合同摘要',
}
},
"[startTime,endTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间', '结束时间'],
},
},
outerStatus: {
type: 'string',
"x-component-props": {
placeholder: '请选择外部状态'
},
title: '请选择外部状态',
// 0.所有状态,1.待提交乙方签订合同,2.待乙方签订合同,3.乙方不同意签订合同,4.待甲方签订合同,5.甲方不同意签订合同,6.已完成签约,7.已作废,8.已停用,9.合同已到期
enum: [],
},
partyAName: {
type: 'string',
'x-component-props': {
placeholder: '请输入合同甲方',
}
},
submit: {
'x-component': 'Submit',
......@@ -58,8 +184,10 @@ export const CoordinationSchema: ISchema = {
},
},
}
}
/** 选择报价商品 */
export const OfferProductSchema: ISchema = {
type: 'object',
......
......@@ -7,7 +7,7 @@ import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import EyePreview from '@/components/EyePreview'
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { CoordinationSchema } from '../schema'
import { Schema } from '../schema'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import Submit from '@/components/NiceForm/components/Submit'
......@@ -128,8 +128,6 @@ const Sign = () => {
return new Promise((resolve, reject) => {
PublicApi.getContractCoordinationPageToBeSign({
...params,
outerStatus: params.outerStatus || 0,
innerStatus: params.innerStatus || 0,
}).then(res => {
resolve(res.data)
}).catch(err => {
......@@ -180,7 +178,7 @@ const Sign = () => {
formilyProps={{
ctx: {
inline: false,
schema: CoordinationSchema,
schema: Schema,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
......@@ -188,14 +186,6 @@ const Sign = () => {
'contractNo',
FORM_FILTER_PATH,
);
useAsyncSelect(
"outerStatus",
fetchOptions(PublicApi.getContractCoordinationGetOuterStatusList)
)
useAsyncSelect(
"innerStatus",
fetchOptions(PublicApi.getContractCoordinationGetInnerStatusList)
)
},
components: {
DateRangePickerUnix,
......
......@@ -141,7 +141,7 @@ const Bill: React.FC<{}> = () => {
return async function () {
const res = await service();
if (res.code === 1000) {
return res.data.map((item) => { return { label: item.name, value: item.status } })
return res.data.innerList.map((item) => { return { label: item.message, value: item.code } })
}
return [];
}
......@@ -208,7 +208,7 @@ const Bill: React.FC<{}> = () => {
);
useAsyncSelect(
"status",
fetchOptions(PublicApi.getContractApplyAmountGetStatusList)
fetchOptions(PublicApi.getContractApplyAmountStatusList)
)
},
components: {
......
......@@ -10,6 +10,7 @@ import Submit from '@/components/NiceForm/components/Submit'
const Materials = (props: any) => {
const { applyId, type } = props;
console.log(type, 'type是什么玩意 ')
const ref = useRef({});
/***
* @function fetchData 请求表格数据
......@@ -67,7 +68,7 @@ const Materials = (props: any) => {
>
{text}
</EyePreview>
<p>{type == 'pageDetailList' ? record.orderAbstract : record.applyAbstract}</p>
<p>{record.orderAbstract ? record.orderAbstract : record.applyAbstract}</p>
</div>
}, {
title: '单据类型',
......
......@@ -15,6 +15,7 @@ import { PublicApi } from '@/services/api';
import { PlayCircleOutlined, PoweroffOutlined } from '@ant-design/icons'
import { history } from 'umi';
import moment from 'moment';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
const QueryList = () => {
......@@ -75,11 +76,7 @@ const QueryList = () => {
dataIndex: 'sourceNo',
align: 'left',
render: (text, record) => {
let sourceTypeList = [
"",
"采购询价",
"采购招标"
]
return (
<div>
{
......@@ -91,7 +88,7 @@ const QueryList = () => {
{text}
</EyePreview>
}
<p>{sourceTypeList[record.sourceType]}</p>
<p>{record.sourceTypeName}</p>
</div>
)
}
......@@ -195,6 +192,22 @@ const QueryList = () => {
const onFinishFailed = (errorInfo: any) => {
console.log('Failed:', errorInfo);
};
const fetchOptions = (service, Status) => {
console.log(service, 'service', Status)
return async function () {
const res = await service();
if (res.code === 1000) {
if (Status == 'outerStatus') {
return res.data.outerList.map((item) => { return { label: item.message, value: item.code } })
} else {
return res.data.innerList.map((item) => { return { label: item.message, value: item.code } })
}
}
return [];
}
}
return (
<PageHeaderWrapper>
<Card>
......@@ -217,6 +230,20 @@ const QueryList = () => {
'contractNo',
FORM_FILTER_PATH,
);
useAsyncSelect(
"outerStatus",
fetchOptions(
PublicApi.getContractManageStatusList,
'outerStatus'
)
)
useAsyncSelect(
"innerStatus",
fetchOptions(
PublicApi.getContractManageStatusList,
'innerStatus'
)
)
},
components: {
DateRangePickerUnix,
......
......@@ -55,7 +55,8 @@ const ContractText = (props: any) => {
templateId: Templatel.id,
isUseElectronicContract: checkNick ? 1 : 0,
contractName: Templatel.name,
contractUrl: Templatel.fileExampleUrl
contractUrl: Templatel.fileExampleUrl,
contractFlag: contractFlag,
}
resolve(contractText)
})
......@@ -126,7 +127,7 @@ const ContractText = (props: any) => {
}
</Form.Item>
{
contractFlag &&
Object.keys(Templatel).length != 0 &&
<Form.Item label="合同文本" labelAlign="left" labelCol={{ span: 2 }}>
<div className={styles.upload_item} style={{ width: 680 }}>
<div className={styles.upload_left} style={{ width: 600 }} onClick={() => onDownload()}>
......
import React, { useState, useRef, useEffect } from 'react'
import { Button, Card, Tabs, Form } from 'antd'
import { Button, Card, Tabs, message } from 'antd'
import { PageHeaderWrapper } from '@ant-design/pro-layout'
import Information from './components/information'
import FormList from './components/FormList'
......@@ -79,9 +79,15 @@ const Add: React.FC<{}> = (props: any) => {
currentRef={payPlan}
/>
},
{ name: '合同文本', components: <ContractText currentRef={contractText} memberId={memberId} /> },
{
name: '合同文本',
components:
<ContractText
currentRef={contractText}
memberId={memberId}
/>
},
]
/* 提交*/
const submit = async () => {
/* 基本信息 */
......@@ -105,6 +111,9 @@ const Add: React.FC<{}> = (props: any) => {
const payPlanList = await payPlan.current.length != 0 ? await payPlan.current.get() : [];
/* 合同管理 */
const contract = await Object.keys(contractText.current).length != 0 ? await contractText.current.get() : {}
if (!contract.contractFlag && contract.isUseElectronicContract == 1) {
message.info('请先操作,生成电子合同')
} else {
let param: any = {
basicsVO: basicsVO.data,
purchaseMaterielList: purchaseMaterielList.data.list,
......@@ -113,7 +122,6 @@ const Add: React.FC<{}> = (props: any) => {
operateType: 1
}
console.log(param)
// return;
PublicApi.postContractManageSave(param).then((res => {
if (res.code === 1000) {
setTimeout(() => {
......@@ -122,6 +130,8 @@ const Add: React.FC<{}> = (props: any) => {
}
}))
}
}
useEffect(() => {
if (sourceType) {
setType(sourceType)
......
......@@ -104,7 +104,7 @@ const BiddingList = () => {
record.sourceNo = record.inviteBidNO;
record.totalAmount = record.bidWinnerAmount;
record.partyBMemberId = record.bidWinnerMemberId;
record.partyBRoleId = record.inviteBidRoleId;
record.partyBRoleId = record.bidWinnerRoleId;
record.partyBName = record.bidWinnerName;
record.sourceType = "2";
sessionStorage.setItem('record', JSON.stringify(record));
......
import React, { useState, useEffect, forwardRef } from 'react';
import { Button, Select, Form, Checkbox } from 'antd'
import { Button, Select, Form, Checkbox, message, Upload } from 'antd'
import styles from '../index.less'
......@@ -67,10 +67,30 @@ const ContractText = (props: any) => {
contractTemplate();
}, [])
useEffect(() => {
if (ctText != null) {
ctText.name = ctText.contractName;
// console.log(ctText, '牛蛙牛蛙')
setTemplatel(ctText)
}
}, [ctText])
/**判断文件类型和大小 */
const beforeDocUpload = (file: any) => {
const isLt20M = file.size / 1024 / 1024 < 20;
if (!isLt20M) {
message.error('上传文件大小不超过 20M!');
}
return isLt20M;
}
// 上传回调
const handleChange = ({ file }) => {
console.log(file.response)
if (file.response) {
if (file.response.code === 1000) {
Templatel.fileUrl = file.response.data
setTemplatel(Templatel)
}
}
}
return (
<div
style={{
......@@ -96,7 +116,18 @@ const ContractText = (props: any) => {
<FileWordFilled />
<span>{Templatel.name}</span>
</div>
<Button type='link' >编辑合同</Button>
<Upload
action="/api/file/file/upload"
data={{ fileType: 1 }}
showUploadList={false}
accept='.doc,.docx,.pdf,.ppt,.pptx,.xls,.xlsx'
beforeUpload={beforeDocUpload}
onChange={handleChange}
>
<div className={styles.uploadIconBtn}>
<Button type='link' >上传合同</Button>
</div>
</Upload>
</div>
</Form.Item>
}
......
......@@ -117,9 +117,10 @@ const Editing: React.FC<{}> = (props: any) => {
/>
},
]
console.log(oldContractId ? '合同变更' : '编辑合同')
return (
<PageHeaderWrapper
title={contractId ? '合同变更' : '编辑合同'}
title={oldContractId ? '合同变更' : '编辑合同'}
extra={[
<Button key="1" type="primary" icon={<SaveOutlined />} onClick={() => submit()} > 保存</Button>
]}
......
......@@ -326,40 +326,14 @@ export const QueryListSchema: ISchema = {
placeholder: '请选择外部状态'
},
// 0.所有状态,1.待提交乙方签订合同,2.待乙方签订合同,3.乙方不同意签订合同,4.待甲方签订合同,5.甲方不同意签订合同,6.已完成签约,7.已作废,8.已停用,9.合同已到期
enum: [
{ label: '所有状态', value: 0 },
{ label: '待提交乙方签订合同', value: 1 },
{ label: '待乙方签订合同', value: 2 },
{ label: '乙方不同意签订合同', value: 3 },
{ label: '待甲方签订合同', value: 4 },
{ label: '甲方不同意签订合同', value: 5 },
{ label: '已完成签约', value: 6 },
{ label: '已作废', value: 7 },
{ label: '已作废', value: 8 },
{ label: '已作废', value: 9 },
],
enum: [],
},
innerStatus: {
type: 'string',
"x-component-props": {
placeholder: '请选择内部状态'
},
enum: [
{ label: '所有状态', value: 0 },
{ label: '待提交乙方签订合同', value: 1 },
{ label: '已提交乙方签订合同', value: 2 },
{ label: '待提交审核合同', value: 3 },
{ label: '合同审核不通过', value: 4 },
{ label: '待审核合同(一级)', value: 5 },
{ label: '待审核合同(二级)', value: 6 },
{ label: '合同审核通过(二级', value: 7 },
{ label: '合同审核不通过(二级)', value: 8 },
{ label: '合同审核不通过(二级)', value: 9 },
{ label: '同意签订合同', value: 10 },
{ label: '不同意签订合同', value: 11 },
{ label: '已作废', value: 12 },
{ label: '已停用', value: 13 },
],
enum: [],
},
submit: {
'x-component': 'Submit',
......
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