Commit 4ce66f62 authored by alwayOnlie's avatar alwayOnlie

工作流修改

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