Commit 8824c3b0 authored by alwayOnlie's avatar alwayOnlie

修改bug

parent 29bfa6ff
......@@ -26,9 +26,9 @@ const PaymentCard: React.FC<Iprops> = ({
}) => {
console.log(IsShow, '1111111111111')
/* 非手工单进入请款 */
const like = (sourceType) => {
const like = (sourceType, item) => {
sessionStorage.setItem('basics', JSON.stringify(basics));
history.push('/memberCenter/contract/funds/addbill/Add?applyId=' + contractId + '&sourceType=' + sourceType)
history.push('/memberCenter/contract/funds/addbill/Add?applyId=' + contractId + '&sourceType=' + sourceType + '&paymentId=' + item.id)
}
return (
<div id='conditions' className='ant-card ant-card-bordered'>
......@@ -36,7 +36,7 @@ const PaymentCard: React.FC<Iprops> = ({
<div className='ant-card-head-wrapper'>
<div className='ant-card-head-wrapper'>
付款计划
</div>
</div>
</div>
</div>
<div className='ant-card-body'>
......@@ -51,7 +51,7 @@ const PaymentCard: React.FC<Iprops> = ({
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
<div className={style.Price}>¥{item.payAmount}</div>
{
!IsShow && <div onClick={() => like(1)} style={{ cursor: 'pointer', fontSize: 12, backgroundColor: '#00B37A', color: '#fff', padding: '4px 8px' }}>请款</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}>
......
......@@ -138,9 +138,15 @@ const Details = (props: any) => {
action: '/api/file/file/upload/prefix',
data: {
fileType: 1,
prefix: '/procurment/tender/',
prefix: '',
},
onChange(info) {
if (info.file.response) {
const { code } = info.file.response;
console.log(code);
message.info(info.file.response.message);
}
;
if (info.file.status !== 'uploading') {
}
......
......@@ -16,7 +16,7 @@ const { TabPane } = Tabs;
const Add: React.FC<{}> = (props: any) => {
const { location: { query: { sourceType } } } = props;
const { location: { query: { sourceType, paymentId } } } = props;
console.log(sourceType)
const currentBasic = useRef<any>({});
const detailData = useRef<any>({});
......@@ -37,6 +37,7 @@ const Add: React.FC<{}> = (props: any) => {
currentRef={currentBasic}
getcontractId={getflag}
sourceType={sourceType}
paymentId={paymentId}
/>
},
{
......@@ -58,6 +59,10 @@ const Add: React.FC<{}> = (props: any) => {
basics: basicsVO.data,
detailList: detailList,
}
console.log('====================================');
console.log(data);
console.log('====================================');
return;
PublicApi.postContractApplyAmountSave(data).then(res => {
console.log(res);
if (res.code === 1000) {
......
......@@ -18,7 +18,7 @@ import { Schema } from "./schema"
import style from '../../../constants/styles.less'
const AddInfo = (props: any) => {
const { currentRef, getcontractId, sourceType } = props;
const { currentRef, getcontractId, sourceType, paymentId } = props;
const refs = useRef({});
/* 显示弹出 */
const [attrValueForm] = Form.useForm();
......@@ -129,14 +129,30 @@ const AddInfo = (props: any) => {
const info = Info;
if (res.code == 1000) {
if (res.data.payPlanList.length != 0) {
const expectPayTime = new Date(res.data.payPlanList[0].expectPayTime).getTime();
basicsData.payPlanId = res.data.payPlanList[0].id;
basicsData.payRatio = res.data.payPlanList[0].payRatio;
basicsData.expectPayTime = moment(expectPayTime);
basicsData.payWay = res.data.payPlanList[0].payWay;
basicsData.payParam = res.data.payPlanList[0].payParam;
basicsData.applyAmount = res.data.payPlanList[0].payAmount;
setapplyAmount(res.data.payPlanList[0].payAmount)
res.data.payPlanList.map((item, index) => {
console.log(index)
if (item.id == paymentId) {
const expectPayTime = new Date(item.expectPayTime).getTime();
basicsData.payPlanId = item.id;
basicsData.payRatio = item.payRatio;
basicsData.expectPayTime = moment(expectPayTime);
basicsData.payWay = item.payWay;
basicsData.payParam = item.payParam;
basicsData.applyAmount = item.payAmount;
setapplyAmount(item.payAmount)
setIndex(index + 1)
return;
} else {
const expectPayTime = new Date(res.data.payPlanList[0].expectPayTime).getTime();
basicsData.payPlanId = res.data.payPlanList[0].id;
basicsData.payRatio = res.data.payPlanList[0].payRatio;
basicsData.expectPayTime = moment(expectPayTime);
basicsData.payWay = res.data.payPlanList[0].payWay;
basicsData.payParam = res.data.payPlanList[0].payParam;
basicsData.applyAmount = res.data.payPlanList[0].payAmount;
setapplyAmount(res.data.payPlanList[0].payAmount)
}
})
}
basicsData.contractNo = selectRow.contractNo;
......@@ -230,8 +246,9 @@ const AddInfo = (props: any) => {
basicsData.applyAmount = key.payAmount;
basicsData.payWay = key.payWay;
basicsData.payPlanId = key.id;
basicsData.expectPayTime = moment(key.expectPayTime),
basicsData.payRatio = key.payRatio;
basicsData.expectPayTime = moment(key.expectPayTime);
basicsData.payParam = key.payParam;
basicsData.payRatio = key.payRatio;
setBasics(basicsData)
setIndex(key.Index);
attrValueForm.setFieldsValue(basicsData);
......
......@@ -55,7 +55,7 @@ const ContractText = (props: any) => {
templateId: Templatel.id,
isUseElectronicContract: checkNick ? 1 : 0,
contractName: Templatel.name,
contractUrl: Templatel.fileUrl,
contractUrl: Templatel.fileUrl ? Templatel.fileUrl : Templatel.fileExampleUrl,
contractFlag: contractFlag,
}
resolve(contractText)
......
......@@ -92,7 +92,7 @@ const FormList = (props: any) => {
<Select
style={{ width: 208 }}
onChange={(e) => onSelectChange(e, 'payWay', index)}
defaultValue={item.payWay}
defaultValue={String(item.payWay)}
>
<Option value="3" key={3}>现结</Option>
<Option value="1" key={1}>账期:</Option>
......
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