Commit 35ac900d authored by alwayOnlie's avatar alwayOnlie

修改bug

parent db702479
......@@ -17,7 +17,8 @@ export interface Iprops extends IAntdSchemaFormProps {
contractId: any,
children?: React.ReactNode,
title?: string,
payItem?: React.ReactNode
payItem?: React.ReactNode,
setkey?: Function
}
......@@ -28,13 +29,17 @@ const PaymentCard: React.FC<Iprops> = ({
contractId,
children,
title,
payItem
payItem,
setkey
}) => {
/* 非手工单进入请款 */
const like = (sourceType, item) => {
sessionStorage.setItem('basics', JSON.stringify(basics));
history.push('/memberCenter/contract/funds/addbill/Add?applyId=' + contractId + '&sourceType=' + sourceType + '&paymentId=' + item.id)
}
const key = (item) => {
setkey(item)
}
return (
<div id='conditions' className='ant-card ant-card-bordered'>
<div className='ant-card-head'>
......@@ -56,7 +61,9 @@ const PaymentCard: React.FC<Iprops> = ({
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<div className={style.Price}>¥{item.payAmount}</div>
{
children ? children : IsShow && <div onClick={() => like(1, item)} style={{ cursor: 'pointer', fontSize: 12, backgroundColor: '#00B37A', color: '#fff', padding: '4px 8px' }}>请款</div>
children ?
<div onClick={() => key(item)}> {children} </div>
: IsShow && <div onClick={() => like(1, item)} style={{ cursor: 'pointer', fontSize: 12, backgroundColor: '#00B37A', color: '#fff', padding: '4px 8px' }}>请款</div>
}
</div>
<div className={style.warp_List}>
......
......@@ -16,13 +16,14 @@ export interface Iprops extends IAntdSchemaFormProps {
const Basic: React.FC<Iprops> = ({
basicInfo
}) => {
return (
<div id='process' className='ant-card ant-card-bordered'>
<div className='ant-card-head'>
<div className='ant-card-head-wrapper'>
<div className='ant-card-head-wrapper'>
基本信息
</div>
</div>
</div>
</div>
<div className='ant-card-body'>
......@@ -32,9 +33,22 @@ const Basic: React.FC<Iprops> = ({
<div className={style.list} key={`col1_${index + 1}`}>
<h5 className={style.listLable}>{item.label}</h5>
{
item.url ? <h5 className={style.gesture} onClick={() => history.push(item.url)}>{item.extra}</h5>
item.url ?
<h5 className={style.gesture} onClick={() => history.push(item.url)}>{item.extra}</h5>
:
item.type == 'StatusTag' ? <StatusTag type="success" title={item.extra} /> : <h5 className={style.listContent}>{item.extra}</h5>
item.List ?
<div>
{
item.extra.map((items) => {
console.log(items.number + '(' + items.invoiceDate + ')')
return (
<p>{items.invoiceDate + '(' + items.number + ')'}</p>
)
})
}
</div> :
item.type == 'StatusTag' ? <StatusTag type="success" title={item.extra} /> : <h5 className={style.listContent}>{item.extra}</h5>
}
</div>
......
import React, { useState, useEffect } from 'react'
import { history } from 'umi'
import { Result, Button, Form, Input, Row, Col, Alert, Spin } from 'antd'
import { Result, Button, Form, Input, Row, Col, Alert, Spin } from 'antd'
import styles from '../index.less'
import { AlipaySquareFilled } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
......@@ -59,7 +59,7 @@ const PublicAccount: React.FC<queryProps> = (props) => {
const paymentVerifyFn = () => {
delete query.orgName;
PublicApi.postContractSignatureAuthPaymentVerify(query).then(res => {
if(res.code === 1000) {
if (res.code === 1000) {
setPaymentVerify(1)
}
})
......@@ -68,13 +68,13 @@ const PublicAccount: React.FC<queryProps> = (props) => {
/**对公银行账号收到的转账金额 */
const paymentVerifyAmountFn = async () => {
const value = await form.validateFields();
if(value) {
if (value) {
const parmas = {
signatureAuthLogId: Number(sessionStorage.getItem('signatureAuthLogId')),
amount: value.amount
}
PublicApi.postContractSignatureAuthPaymentVerifyAmount(parmas).then(res => {
if(res.code === 1000) {
if (res.code === 1000) {
history.goBack()
}
})
......@@ -91,7 +91,7 @@ const PublicAccount: React.FC<queryProps> = (props) => {
agentIdNo: data.transactorIdNumber,
}
PublicApi.postContractSignatureAuthLegalRepSignVerify(parmas).then(res => {
if(res.code === 1000) {
if (res.code === 1000) {
setVisible(true)
console.log('发送成功')
}
......@@ -124,9 +124,9 @@ const PublicAccount: React.FC<queryProps> = (props) => {
signatureAuthLogId: Number(sessionStorage.getItem('signatureAuthLogId')),
mobileNo: data.transactorMobile
}).then(res => {
if(res.code === 1000) {
if (res.code === 1000) {
hanleCountdown()
}else {
} else {
console.log(res)
}
})
......@@ -135,25 +135,28 @@ const PublicAccount: React.FC<queryProps> = (props) => {
/**手机认证验证码校验 */
const onSubmit = async () => {
const value = await form.validateFields();
if(value) {
if (value) {
await PublicApi.postContractSignatureAuthMobileVerifyCode({
signatureAuthLogId: Number(sessionStorage.getItem('signatureAuthLogId')),
authcode: value.authcode
}).then(res => {
if(res.code === 1000) {
if (res.code === 1000) {
history.goBack()
}
})
}
}
const link = () => {
history.goBack('/memberCenter/contract/ElectronicSignature/apply')
}
return (
<>
{payWay === 1 &&
<div className={styles.info_wrap}>
{/** 支付宝认证*/}
<Result
title={authType !== 3 ? '请使用法人手机号注册的支付宝账号登录支付':'请使用当前会员手机号注册的支付宝账号登录支付宝APP'}
title={authType !== 3 ? '请使用法人手机号注册的支付宝账号登录支付' : '请使用当前会员手机号注册的支付宝账号登录支付宝APP'}
extra={[
<div key='key'>
<div className={styles.info_wran}>并使用支付宝首页的扫一扫功能</div>
......@@ -255,18 +258,18 @@ const PublicAccount: React.FC<queryProps> = (props) => {
</div>
<div className={styles.bank_btn} style={{ textAlign: 'center' }}>
<Button type='primary' onClick={mobileVerifyFn}>发送授权短信</Button>
<Button style={{ width: '116px' }}>返回</Button>
<Button style={{ width: '116px' }} onClick={link}>返回</Button>
</div>
</div>
]}
/>
{visible &&
<Alert
style={{width:'420px',margin: 'auto'}}
style={{ width: '420px', margin: 'auto' }}
message="短信发送成功" type="success"
description={
<>
<span>请等待法人在手机页面完成授权书签署,</span><br/>
<span>请等待法人在手机页面完成授权书签署,</span><br />
<span>您可点击返回按钮回到电子签章申请页查看认证结果</span>
</>
}
......
......@@ -53,6 +53,9 @@ const Test: React.FC<queryProps> = (props) => {
}
PublicApi.getManageCountryAreaGetTelCode().then(res => {
setOptions(res.data)
form.setFieldsValue({
code: res.data[0]
})
})
}, [])
......@@ -78,7 +81,7 @@ const Test: React.FC<queryProps> = (props) => {
<Row gutter={24}>
<Col span={7}>
<Form.Item style={{ width: '150px' }} name='code' rules={[{ required: true, message: '请选择区号' }]}>
<Select style={{ width: '100%' }}>
<Select style={{ width: '100%' }} >
{options.map(v => (
<Option key={v} value={v}>{v}</Option>
))}
......@@ -132,4 +135,4 @@ const Test: React.FC<queryProps> = (props) => {
)
}
export default Test
\ No newline at end of file
export default Test
......@@ -113,7 +113,7 @@ const Details = (props: any) => {
col2: [
{ label: '寻源类型:', extra: basics.sourceTypeName ? basics.sourceTypeName : '' },
{ label: '对应单据:', extra: basics.sourceNo ? basics.sourceNo : '', url: '' },
{ label: '合同乙方:', extra: basics.partyAName ? basics.partyAName : '' },
{ label: '合同乙方:', extra: basics.partyBName ? basics.partyBName : '' },
],
col3: [
......@@ -171,7 +171,7 @@ const Details = (props: any) => {
/* 查看付款明细 */
const columns: any = [
{
title: '单据号/摘要', dataIndex: 'orderNO', align: 'center',
title: '单据号/摘要', dataIndex: 'orderNO', align: 'left',
render: (text: any, record: any) => {
return (
<div>
......@@ -186,11 +186,11 @@ const Details = (props: any) => {
},
},
{
title: '单据类型', dataIndex: 'orderTypeName', align: 'center',
title: '单据类型', dataIndex: 'orderTypeName', align: 'left',
},
{ title: '单据状态', dataIndex: 'orderStatusName', align: 'center', },
{ title: '单据状态', dataIndex: 'orderStatusName', align: 'left', },
{
title: '单据时间', dataIndex: 'orderTime', align: 'center',
title: '单据时间', dataIndex: 'orderTime', align: 'left',
render: (text: any, record: any) => {
return (
<Text>{moment(Number(text)).format('YYYY-MM-DD')}</Text>
......@@ -198,7 +198,7 @@ const Details = (props: any) => {
}
},
{
dataIndex: 'orderAmount', align: 'center',
dataIndex: 'orderAmount', align: 'left',
title: (
<Space direction='vertical'>
<Text>单据金额</Text>
......@@ -210,16 +210,16 @@ const Details = (props: any) => {
)
},
{
title: '含税/税率', dataIndex: 'taxRate', align: 'center',
title: '含税/税率', dataIndex: 'taxRate', align: 'left',
render: (text, record) => (
<Space direction='vertical'>
<Text>{record.isHasTax == 1 ? '是' : '否'}</Text>
<Text>%{text}</Text>
<Text>{text}%</Text>
</Space>
)
},
{
dataIndex: 'payAmount', align: 'center',
dataIndex: 'payAmount', align: 'left',
title: (
<Space direction='vertical'>
<Text>已付款</Text>
......@@ -237,7 +237,7 @@ const Details = (props: any) => {
<Text>合计: ¥{unPayApplyAmount}</Text>
</Space>
),
dataIndex: 'unPayApplyAmount', align: 'center',
dataIndex: 'unPayApplyAmount', align: 'left',
render: (text) => (
<span>{text}</span>
)
......@@ -249,13 +249,13 @@ const Details = (props: any) => {
<Text>合计: ¥{unApplyAmount}</Text>
</Space>
),
dataIndex: 'unApplyAmount', align: 'center',
dataIndex: 'unApplyAmount', align: 'left',
render: (text) => (
<span>{text}</span>
)
},
{
title: '操作', dataIndex: 'type', align: 'center',
title: '操作', dataIndex: 'type', align: 'left',
render: (text, record) => {
// 已付款大于0或已请款待付款大于0的才显示查看付款明细按钮。
return (
......
......@@ -59,6 +59,7 @@ const Details = (props: any) => {
const [contractAbstract, setcontractAbstract] = useState('');
const [tabPane, settabPane] = useState([])
const [Popup, setPopup] = useState<any>(false);
const [basicData, setbasicData] = useState<any>({}) // 合同付款基本信息
/* 获取详情的数据 */
const getDetail = () => {
PublicApi.getContractCoordinationGetDetail({ contractId }).then(res => {
......@@ -137,7 +138,6 @@ const Details = (props: any) => {
{ id: 'conditions', title: '付款统计' },
)
} else {
// { id: 'conditions', title: '付款计划' },
tab.push(
{ id: 'progress', title: '流转进度' },
{ id: 'process', title: '基本流程' },
......@@ -150,11 +150,7 @@ const Details = (props: any) => {
setTargetOffset(window.innerHeight / tab.length);
getDetail()
}, []);
/* 查看付款明细回调 */
const setDrawerModal = () => {
console.log(131312);
setPopup(!Popup)
}
const handleAnchorClick = (e) => {
e.preventDefault()
}
......@@ -291,6 +287,27 @@ const Details = (props: any) => {
setListData(data)
getDetail();
}
/* 点击查看详情回调 */
const setkey = (item) => {
console.log(item)
if (item.id) {
PublicApi.getContractExecuteExecuteInfoPayDetailInfo({
contractId,
applyId: item.id
}).then(res => {
console.log(res);
if (res.code === 1000) {
setDrawerModal()
}
})
}
}
/* 查看付款明细回调 */
const setDrawerModal = () => {
setPopup(!Popup)
}
return (
<div className={style.anchorWrap}>
<Anchor
......@@ -367,12 +384,13 @@ const Details = (props: any) => {
borderRadius: 5,
cursor: 'pointer'
}}
onClick={setDrawerModal}
onClick={setkey}
>查看详情</span>}
title="付款统计"
payPlanList={payPlanList}
basics={basicInfo}
contractId={contractId}
setkey={setkey}
payItem={
<div style={{
display: 'flex',
......
......@@ -54,13 +54,17 @@ const AddInfo = (props: any) => {
})
/* 付款阶段 */
const [payPlanList, setpayPlanList] = useState<any>([]);
/* 格式化时间 */
const getdate = (time) => {
return new Date(Date.parse(time.replace(/-/g, "/"))).getTime() / 1000;
}
/* 选中设置值 */
const [Index, setIndex] = useState<number>(1)
const columnsList: any = [
{
title: '单据编号/摘要',
dataIndex: 'contractNo',
align: 'center',
align: 'left',
render: (text, record) =>
<div>
<p> {text}</p>
......@@ -70,9 +74,9 @@ const AddInfo = (props: any) => {
{
title: '合同生效/失效时间',
dataIndex: 'startTime',
align: 'center',
align: 'left',
sorter: {
compare: (a, b) => a.demandPublishTime - b.demandPublishTime,
compare: (a, b) => getdate(a.startTime) - getdate(b.startTime),
multiple: 1,
},
render: (text, record) =>
......@@ -84,12 +88,12 @@ const AddInfo = (props: any) => {
{
title: '合同乙方',
dataIndex: 'partyBName',
align: 'center',
align: 'left',
},
{
title: '合同剩余金额',
dataIndex: 'totalAmount',
align: 'center',
align: 'left',
render: (text) =>
<div>
<p>{text}</p>
......@@ -98,7 +102,7 @@ const AddInfo = (props: any) => {
{
title: '对应单据/寻源类型',
dataIndex: 'sourceNo',
align: 'center',
align: 'left',
render: (text, record) =>
<div>
<p>{text}</p>
......@@ -163,7 +167,7 @@ const AddInfo = (props: any) => {
basicsData.bankAccount = res.data.corporateAccountConfig.bankAccount;
basicsData.bankDeposit = res.data.corporateAccountConfig.bankDeposit;
info.status = "同意签订合同";
info.status = "待提交审核";
setpayPlanList(res.data.payPlanList)
setInfo(info)
/* 设置tab点击数组
......@@ -181,8 +185,7 @@ const AddInfo = (props: any) => {
})
setTag(tagList)
getcontractId({ flag: sourceType == 1 || sourceType == 2 ? false : true, selectRow })
const auth = getAuth();
setaccount(auth.account);
setaccount(selectRow.partyBName);
setBasics(basicsData)
console.log(basicsData, 'basicsData')
attrValueForm.setFieldsValue(basicsData);
......@@ -221,8 +224,8 @@ const AddInfo = (props: any) => {
* @function fetchData 请求表格数据
**/
const fetchData = (params: any) => {
params.startTime = params.startTime ? moment().format('YYYY-MM-DD') : '';
params.endTime = params.endTime ? moment().format('YYYY-MM-DD') : '';
params.startTime = params.startTime ? moment(Number(params.startTime)).format('YYYY-MM-DD') : '';
params.endTime = params.endTime ? moment(Number(params.startTime)).format('YYYY-MM-DD') : '';
return new Promise(resolve => {
PublicApi.getContractManagePageCompleteList({ ...params }).then(res => {
console.log(res)
......@@ -254,7 +257,9 @@ const AddInfo = (props: any) => {
setIndex(key.Index);
attrValueForm.setFieldsValue(basicsData);
}
const disabledDate = (current) => {
return current && current < moment().endOf('day');
}
return (
<div className={style.revise_info}>
<Form
......@@ -365,10 +370,12 @@ const AddInfo = (props: any) => {
labelCol={{ span: 4 }}
wrapperCol={{ span: 18 }}
name="expectPayTime"
>
<DatePicker
style={{ width: '100%' }}
format="YYYY-MM-DD"
disabledDate={disabledDate}
/>
</Form.Item>
{/* tag */}
......@@ -440,12 +447,7 @@ const AddInfo = (props: any) => {
>
<TextArea placeholder='最长160字符,80个汉字' maxLength={160} style={{ height: 72 }} />
</Form.Item>
{/* <Form.Item label="发票编号" labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<span>{Info.number}</span>
</Form.Item>
<Form.Item label="开票日期" labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<span>{Info.time}</span>
</Form.Item> */}
<Form.Item label="单据时间" labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<span>{Info.startTime}</span>
</Form.Item>
......@@ -460,7 +462,7 @@ const AddInfo = (props: any) => {
visible={visible}
onClose={() => setvisible(!visible)}
title="选择采购合同"
width={900}
width={1000}
footer={
<div
style={{
......
......@@ -40,7 +40,7 @@ export const Schema: any = {
// }
},
},
"awardName": {
"partyBName": {
type: 'string',
"x-component-props": {
placeholder: '请输入收款方'
......@@ -56,3 +56,55 @@ export const Schema: any = {
},
}
}
export const SchemaList: any = {
type: 'object',
properties: {
applyNo: {
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: {
"applyAbstract": {
type: 'string',
"x-component-props": {
placeholder: '请款输入单据摘要'
}
},
"[startTime,endTime]": {
type: 'array',
"x-component": 'DateRangePickerUnix',
'x-component-props': {
placeholder: ['开始时间', '结束时间'],
format: 'YYYY-MM-DD HH:mm:ss',
// disabledDate: current => {
// console.log(current);
// return current && current < moment().startOf('day')
// }
},
},
submit: {
'x-component': 'Submit',
'x-component-props': {
children: '查询',
},
},
},
},
}
}
......@@ -7,7 +7,7 @@ import { StandardTable } from 'god';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import Submit from '@/components/NiceForm/components/Submit'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { Schema } from "./schema"
import { SchemaList } from "./schema"
import moment from 'moment';
import {
......@@ -29,6 +29,7 @@ const table = (props: any) => {
* @param tabcolumns 单据表格
*/
const [visible, setvisible] = useState<boolean>(false);
// const [rowSelection, RowCtl] = useRowSelectionTable({ customKey: 'orderId' });
const [toorderAmount, settoorderAmount] = useState<number>(0);
const [topayAmount, settopayAmount] = useState<number>(0);
......@@ -83,7 +84,7 @@ const table = (props: any) => {
render: (text, record) =>
<div>
<div>{record.isHasTax ? '是' : '否'}</div>
<div>%{text}</div>
<div>{text}%</div>
</div>
},
......@@ -166,18 +167,20 @@ const table = (props: any) => {
/* 计算金额 */
const Amount = () => {
// bidCount
let list = [...PlanList]
let tounPayApplyAmount = 0;
let toorderAmount = 0; // 单据金额
let topayAmount = 0;
let payAmount = 0; // 已付款
let applyAmount = 0;
PlanList.map(item => {
list.map(item => {
toorderAmount += item.orderAmount;
tounPayApplyAmount += item.unPayApplyAmount ? item.unPayApplyAmount : 0;
topayAmount += item.payAmount ? Number(item.payAmount) : 0;
payAmount += item.payAmount ? item.payAmount : 0;
applyAmount += item.applyAmount ? Number(item.applyAmount) : 0
})
console.log(toorderAmount, list)
settopayAmount(topayAmount)
setpayAmount(payAmount)
setapplyAmount(applyAmount)
......@@ -190,6 +193,9 @@ const table = (props: any) => {
const dataSource = [...PlanList];
let List = dataSource.filter((item, index) => index !== idx);
setPlanList(List)
setTimeout(() => {
Amount()
}, 1000);
};
const columnsList: any = [
......@@ -268,8 +274,14 @@ const table = (props: any) => {
}
const Confirm = () => {
setPlanList(selectRow)
let toorderAmount = 0; // 单据金额
selectRow.map(item => {
toorderAmount += item.orderAmount;
})
settoorderAmount(toorderAmount)
setvisible(false)
Amount()
}
useEffect(() => {
......@@ -329,7 +341,7 @@ const table = (props: any) => {
visible={visible}
onClose={() => setvisible(!visible)}
title="选择采购合同"
width={900}
width={1000}
footer={
<div
style={{
......@@ -357,12 +369,12 @@ const table = (props: any) => {
formilyProps={{
ctx: {
inline: false,
schema: Schema,
schema: SchemaList,
effects: ($, actions) => {
useStateFilterSearchLinkageEffect(
$,
actions,
'contractNo',
'applyNo',
FORM_FILTER_PATH,
);
},
......
import React, { useState, useRef, ReactNode } from 'react'
import { history, Link } from 'umi';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { Card, Button, Space, Popconfirm } from 'antd';
import { Card, Button, Space, Popconfirm, message } from 'antd';
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from 'god';
import { createFormActions } from '@formily/antd';
import EyePreview from '@/components/EyePreview';
import { PlusOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api'
const formActions = createFormActions();
import Submit from '@/components/NiceForm/components/Submit'
import SearchSelect from '@/components/NiceForm/components/SearchSelect'
import DateRangePickerUnix from '@/components/NiceForm/components/DateRangePickerUnix'
import { addSchemaBli } from '../schema';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch'
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { FORM_FILTER_PATH } from '@/formSchema/const'
import { PlusCircleOutlined } from '@ant-design/icons'
import moment from 'moment';
import Examine from '../../components/examine'
import '../../constants/index.less'
const AddbillList: React.FC<{}> = () => {
const ref = useRef<any>({});
const [selectedRowKeys, setSelectedRowKeys] = useState<Array<string>>([])
const [ExamineFlag, setExamineFlag] = useState<boolean>(false);
const [selectRow, setSelectRow] = useState<any[]>([]) // 模态框选择的行数据
const [applyId, setapplyId] = useState('');
//表头
const columns: ColumnType<any>[] = [{
......@@ -101,11 +97,10 @@ const AddbillList: React.FC<{}> = () => {
default:
break;
}
console.log(node, '1231312')
return (
<>
{
record.status == 1 && <span style={{ color: '#00B37A', marginRight: 20, cursor: 'pointer', }} onClick={() => isModal(record)}>提交</span>
record.status == 1 && <span style={{ color: '#00B37A', marginRight: 20, cursor: 'pointer', }} onClick={() => Submit(record.id)}>提交</span>
}
{node}
{
......@@ -126,10 +121,7 @@ const AddbillList: React.FC<{}> = () => {
)
}
}]
const isModal = (record) => {
setExamineFlag(!ExamineFlag)
setapplyId(record.id)
}
// 模拟请求
const fetchData = (params?: any) => {
console.log(params)//可以直接打印参数
......@@ -153,13 +145,19 @@ const AddbillList: React.FC<{}> = () => {
}
};
/* 提交审核的回调 */
const getfetchData = (data) => {
console.log(data)
setExamineFlag(data.ExamineFlag)
if (data.code === 1000) {
ref.current.reload()
}
const Submit = (applyId) => {
console.log(applyId)
const msg = message.loading({
content: '正在操作',
duration: 0,
});
PublicApi.postContractApplyAmountSubmitExamine({ applyId }).then(res => {
if (res.code === 1000) {
ref.current.reload()
}
}).finally(() => {
msg();
});
}
/**删除 */
......@@ -176,17 +174,6 @@ const AddbillList: React.FC<{}> = () => {
};
// 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 [];
// }
// }
return (
<PageHeaderWrapper>
<Card>
......@@ -245,12 +232,7 @@ const AddbillList: React.FC<{}> = () => {
}}
/>
</Card>
<Examine
ExamineFlag={ExamineFlag}
getfetchData={getfetchData}
applyId={applyId}
type="submitExamine"
/>
</PageHeaderWrapper>
)
......
......@@ -50,6 +50,8 @@ const BillDetails = (props: any) => {
col2: [],
col3: []
})
/* 获取详情的数据 */
const getDetail = () => {
console.log(applyId, 'applyId')
......@@ -61,8 +63,8 @@ const BillDetails = (props: any) => {
{ label: '请款单号:', extra: basics.applyNo ? basics.applyNo : '' },
{ label: '请款摘要:', extra: basics.applyAbstract ? basics.applyAbstract : '' },
{ label: '内部状态:', extra: basics.statusName ? basics.statusName : '' },
{ label: '发票编号:', extra: basics.innerStatusName ? basics.innerStatusName : '' },
{ label: '开票日期:', extra: basics.orderTime ? basics.orderTime : '' },
{ label: '发票编号(开票日期):', extra: basics.invoiceProveVOList ? basics.invoiceProveVOList : '', List: basics.invoiceProveVOList ? true : false },
// { label: ':', extra: basics.orderTime ? basics.orderTime : '' },
{ label: '单据时间:', extra: basics.orderTime ? basics.orderTime : '' },
],
......@@ -237,6 +239,7 @@ const BillDetails = (props: any) => {
</div>
<ColumnsList applyId={applyId} />
</div>
{/* 单据作废 */}
<Modal title="单据作废" visible={isModalVisible} onCancel={handleCancel} onOk={oninvalid}>
<Radio.Group onChange={handleIsAllMemberChange} defaultValue={isAllMember} value={isAllMember}>
<Radio value={true}>作废</Radio>
......
......@@ -146,9 +146,7 @@ const AddInfo = (props: any) => {
})
}
}, [basicsData])
const disabledDate = (current) => {
return current && current < moment().endOf('day');
}
return (
<div className={style.revise_info}>
<Form
......@@ -327,12 +325,10 @@ const AddInfo = (props: any) => {
>
<TextArea placeholder='最长160字符,80个汉字' maxLength={160} style={{ height: 72 }} />
</Form.Item>
<Form.Item label="发票编号" labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<Form.Item label="发票编号(开票日期)" labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<span>{basics.number}</span>
</Form.Item>
{/* <Form.Item label="开票日期" labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<span>{Info.time}</span>
</Form.Item> */}
<Form.Item label="单据时间" labelAlign="left" labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<span>{basics.orderTime}</span>
</Form.Item>
......
......@@ -12,7 +12,7 @@ export const column: any = [
{
title: '订单号/摘要',
dataIndex: 'demandNO',
align: 'center',
align: 'left',
render: (text, record) =>
<div>
<p> {text}</p>
......@@ -22,22 +22,22 @@ export const column: any = [
{
title: '容需求发布时间',
dataIndex: 'demandPublishTime',
align: 'center',
align: 'left',
},
{
title: '授标会员',
dataIndex: 'awardName',
align: 'center',
align: 'left',
},
{
title: '授标时间',
dataIndex: 'awardTime',
align: 'center',
align: 'left',
},
{
title: '授标金额(含税)',
dataIndex: 'awardAmount',
align: 'center',
align: 'left',
},
]
......@@ -45,7 +45,7 @@ export const columnsList: any = [
{
title: '招标/摘要',
dataIndex: 'inviteBidNO',
align: 'center',
align: 'left',
render: (text, record) =>
<div>
<p> {text}</p>
......@@ -55,22 +55,22 @@ export const columnsList: any = [
{
title: '招标发布时间',
dataIndex: 'inviteBidPublishTime',
align: 'center',
align: 'left',
},
{
title: '中标会员',
dataIndex: 'bidWinnerName',
align: 'center',
align: 'left',
},
{
title: '中标通知时间',
dataIndex: 'bidWinnerNoticeTime',
align: 'center',
align: 'left',
},
{
title: '中标金额',
dataIndex: 'bidWinnerAmount',
align: 'center',
align: 'left',
},
]
......@@ -78,7 +78,7 @@ export const columnsGetList: any = [
{
title: '竞价单/摘要',
dataIndex: 'viePriceNO',
align: 'center',
align: 'left',
render: (text, record) =>
<div>
<p> {text}</p>
......@@ -88,22 +88,22 @@ export const columnsGetList: any = [
{
title: '容需求发布时间',
dataIndex: 'publishTime',
align: 'center',
align: 'left',
},
{
title: '授标会员',
dataIndex: 'awardName',
align: 'center',
align: 'left',
},
{
title: '授标时间',
dataIndex: 'awardTime',
align: 'center',
align: 'left',
},
{
title: '授标金额(含税)',
dataIndex: 'awardAmount',
align: 'center',
align: 'left',
},
]
......@@ -112,27 +112,27 @@ export const supplierColumns = [
{
title: '会员ID',
dataIndex: 'memberId',
align: 'center',
align: 'left',
},
{
title: '会员名称',
dataIndex: 'name',
align: 'center',
align: 'left',
},
{
title: '会员类型',
dataIndex: 'memberTypeName',
align: 'center',
align: 'left',
},
{
title: '会员角色',
dataIndex: 'roleName',
align: 'center',
align: 'left',
},
{
title: '会员等级',
dataIndex: 'levelTag',
align: 'center',
align: 'left',
},
]
......@@ -141,20 +141,20 @@ export const supplierColumns = [
* 第二个内容
*/
export const goodcolumns: any = [
{ title: '货号', dataIndex: 'code', align: 'center', },
{ title: '货品名称', dataIndex: 'name', key: 'name', align: 'center', },
{ title: '规格型号', dataIndex: 'type', align: 'center', },
{ title: '货号', dataIndex: 'code', align: 'left', },
{ title: '货品名称', dataIndex: 'name', key: 'name', align: 'left', },
{ title: '规格型号', dataIndex: 'type', align: 'left', },
{
title: '品类', dataIndex: 'type', align: 'center',
title: '品类', dataIndex: 'type', align: 'left',
render: (text, item) => (
<p>{item.customerCategory.name}</p>
)
},
{
title: '品牌', dataIndex: 'type', key: 'name', align: 'center',
title: '品牌', dataIndex: 'type', key: 'name', align: 'left',
render: (text, item) => (
<p>{item.brand != null ? item.brand.name : ''}</p>
)
},
{ title: '单位', dataIndex: 'unitName', align: 'center', },
{ title: '单位', dataIndex: 'unitName', align: 'left', },
]
......@@ -87,7 +87,7 @@ const FormList = (props: any) => {
console.log(res);
// return;
if (res.code === 1000) {
let data = res.data.data.map(item => {
let data = res.data.data.map((item, index) => {
return {
code: sourceType == '1' ? item.number : sourceType == '2' ? item.inviteTenderMateriel.code : item.number, // 物料编号
name: sourceType == '1' ? item.name : sourceType == '2' ? item.inviteTenderMateriel.name : item.name, // 物料名称
......@@ -106,9 +106,10 @@ const FormList = (props: any) => {
bidCount: sourceType == '1' ? item.awardTaxProbability * item.purchaseCount / 100 : sourceType == '2' ? item.awardTenderRatio * item.inviteTenderMateriel.count / 100 : item.purchaseCount,
bidAmount: sourceType == '1' ? item.awardTaxProbability * item.purchaseCount / 100 * item.taxUnitPrice : sourceType == '2' ? item.awardTenderRatio * item.inviteTenderMateriel.count / 100 * item.price : item.price,
associatedDataId: sourceType == '1' ? item.productId : sourceType == '2' ? item.commodityId : '', // 关联商品id
associatedMaterielNo: sourceType == '1' ? item.number : sourceType == '2' ? item.inviteTenderMateriel.code : '', // 关联物料编号
associatedMaterielNo: sourceType == '1' ? item.number : sourceType == '2' ? item.commodityAttribute : '', // 关联物料编号
associatedMaterielName: sourceType == '1' ? item.productName : sourceType == '2' ? item.commodityName : '', // 关联商品名称
associatedGoods: sourceType == '1' ? item.productAttributeJson : sourceType == '2' ? item.commodityName : ''// 关联品牌
associatedGoods: sourceType == '1' ? item.productAttributeJson : sourceType == '2' ? item.commodityBrand : '',// 关联品牌
rowId: index,
}
})
......@@ -309,7 +310,7 @@ const FormList = (props: any) => {
setIsModalVisible(false);
};
/* 下拉的子元素 */
const listItem = (record) => (
const listItem = (record, index) => (
<div className={styles.listItem}>
<div className={styles.label}>
<p>关联</p>
......@@ -321,10 +322,10 @@ const FormList = (props: any) => {
</div>
<div className={styles.text}>
<p>规格:{record.associatedGoods}</p>
<p>品类:{record.customerCategory.name}</p>
<p>品类:{record.associatedType}</p>
</div>
<div className={styles.text}>
<p>品牌:{record.brand ? record.brand.name : ''}</p>
<p>品牌:{record.associatedBrand}</p>
</div>
</div>
......@@ -355,6 +356,7 @@ const FormList = (props: any) => {
setData(item)
}
const onExpand = expandedKeys => {
console.log(expandedKeys)
};
return (
<div className={styles.box}>
......@@ -365,13 +367,11 @@ const FormList = (props: any) => {
}
<Table
columns={columnsTab}
rowKey='id'
rowKey="rowId"
dataSource={dataList}
expandable={{
expandedRowRender: (record, index) => listItem(record),
onExpand: record => onExpand(record)
expandedRowRender: (record, index) => listItem(record, index),
}}
dataSource={dataList}
style={{
width: "100%"
}}
......
......@@ -321,6 +321,9 @@ const Details = (props: any) => {
setIsModalVisible(data.ExamineFlag)
if (data.code === 1000) {
ref.current.reload()
setTimeout(() => {
history.goBack()
}, 1000)
}
}
/* 提交表单 */
......@@ -503,7 +506,7 @@ const Details = (props: any) => {
applyId={contractId}
type={type}
agreeText={type == 'Signacontract' ? "同意签订" : '通过'}
disagree={type == 'Signacontract' ? '不同意签订' : '通过'}
disagree={type == 'Signacontract' ? '不同意签订' : '通过'}
/>
</div>
)
......
......@@ -145,7 +145,7 @@ const FormList = (props: any) => {
currentRef.current = {
get: () => new Promise((resolve: any) => {
let list = [];
dataList.map(item => {
dataList.map((item, idnex) => {
list.push({
id: item.id,
materielNo: item.materielNo,
......@@ -167,6 +167,7 @@ const FormList = (props: any) => {
associatedType: item.associatedType ? item.associatedType : '',
associatedCategory: item.associatedCategory ? item.associatedCategory : '',
associatedBrand: item.associatedBrand ? item.associatedBrand : '',
rowId: index,
})
})
resolve({
......@@ -226,7 +227,7 @@ const FormList = (props: any) => {
return (
<div className={styles.box}>
<Table
rowKey="id"
rowKey="rowId"
dataSource={dataList}
columns={columnsTab}
expandable={{
......
......@@ -186,7 +186,7 @@ const AddContract: React.FC<parmas> = (props) => {
</div>
</div>
</Form.Item>
<Form.Item name="uploadFile" label={<div>合同文件模板&nbsp;<Tooltip placement="top" title='制作完成的合同模板,需要上传至平台,才能在后续的订单中签订电子合同'><QuestionCircleOutlined /></Tooltip></div>} colon={false}
<Form.Item name="uploadFile" rules={[{ required: Object.keys(uploadFile).length === 0, message: '请先上传合同信息' }]} label={<div>合同文件模板&nbsp;<Tooltip placement="top" title='制作完成的合同模板,需要上传至平台,才能在后续的订单中签订电子合同'><QuestionCircleOutlined /></Tooltip></div>} colon={false}
>
<div className={styles.upload_data}>
{Object.keys(uploadFile).length > 0 &&
......
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