Commit 8bc2bb5d by gq777

'update'

parents 33c0200e 5c6a2a37
......@@ -133,7 +133,7 @@ export class LeadPage extends Component
<Col span={3}/>
<Col span={18}>
<Table columns={this.columns} dataSource={this.state.fil?mty.filter(item=>item.mty.startsWith('mt'+this.state.fil)):mty} />
<Table columns={this.columns} dataSource={this.state.fil?mty.filter(item=>item.mty.indexOf('mt'+this.state.fil)==0):mty} />
</Col>
<Col span={3}/>
......
......@@ -110,7 +110,7 @@ export default function MTFactory(mty)
return MT600
if(mty=="mt700")
return MT700
if(mty=="mt202COV")
if(mty=="mt202cov")
return MT202COV
if(mty=="mt305")
return MT305
......
import {RegMap} from './TagRegMap'
export function TagV(tag,status,value,tno,mty)
export function isTagValueEmpty(tag,tagValue)
{
let obj = tagValue[0]
let regobj = RegMap[tag]
for(let key in regobj)
{
if(obj[key])
return false
}
return true
}
export function TagV(tag,status,value,tno,mty,seqlist,countMap={})
{
let regobj = RegMap[tag]
let obj = value[0]
let mval = value[1]
//计算状态 status,是否是必填的,要参考所在序列是否是必填,上一层序列计数,来决定当前序列是否必填
if(seqlist && seqlist.length && status == 'M' && isTagValueEmpty(tag,value))
{
let curseq = seqlist[seqlist.length - 1]
let curcnt = countMap[curseq.seqlist] || 0
if(curseq.status == 'O' && curcnt==0)
{
status = 'O'
}
else if(curseq.status == 'M' && curcnt==0)
{
//验证上层是否有计数为O,且上层计数
for(let i = seqlist.length - 2 ; i >=0;i--)
{
let itemseq = seqlist[i]
let itemcnt = countMap[itemseq.seqlist] || 0
if(itemcnt>0)
break
if(itemseq.status == 'O' && itemcnt == 0)
status = 'O'
}
}
}
let errmsg = null
if(value.length == 3)
errmsg = value[2] || {}
......
......@@ -13,7 +13,12 @@ export default class T15A extends Component
tno = -1
render(){
return (<Row></Row>)
return (<Row>
<FormItem
>
<h3 className="ant-form-text" >New Sequence</h3>
</FormItem>
</Row>)
}
}
\ No newline at end of file
......@@ -17,7 +17,10 @@ export default class T15B extends Component
render()
{
return (<Row>
<FormItem
>
<h3 className="ant-form-text" >New Sequence</h3>
</FormItem>
</Row>)
}
......
......@@ -18,7 +18,10 @@ export default class T15C extends Component
{
return (<Row>
<FormItem
>
<h3 className="ant-form-text" >New Sequence</h3>
</FormItem>
</Row>)
}
......
......@@ -18,7 +18,10 @@ export default class T15D extends Component
{
return (<Row>
<FormItem
>
<h3 className="ant-form-text" >New Sequence</h3>
</FormItem>
</Row>)
}
......
......@@ -17,7 +17,10 @@ export default class T15E extends Component
render()
{
return (<Row>
<FormItem
>
<h3 className="ant-form-text" >New Sequence</h3>
</FormItem>
</Row>)
}
......
......@@ -2,9 +2,13 @@ import React, { Component } from 'react'
import { Form, Input, DatePicker, Row, Col, Button, Icon, Select } from 'antd';
import { InputSize, Currency } from "./Utils"
import YBIC from './YBIC'
const FormItem = Form.Item;
const Option = Select.Option
export default class T17A extends Component {
name = '17A'
......
......@@ -12,9 +12,9 @@ const code2 = ["ISSUE","REQUEST"]
export default function(props)
{
let {mty} = props
if(mtys1.findIndex(m=>m==mty)>= 0)
if(mty=='mt752')
return <T23_1 {...props} SELCode={code1} />
if(mtys2.findIndex(m=>m==mty)>= 0)
if(mty== 'mt760' || mty == 'mt767')
return <T23_1 {...props} SELCode={code2} />
return <T23_d {...props} />
}
\ No newline at end of file
import React,{Component} from 'react'
import { Form, Input, DatePicker,Row, Col,Button,Icon ,Select} from 'antd';
import {InputSize,Currency,FormatAmount} from "./Utils"
const FormItem = Form.Item;
const Option = Select.Option
export default class T37K extends Component
{
name='37K'
desp = "(Currency)(Rate)"
pattern = "3!a12d"
tno = -1
keys=[1,2]
onChange=(index,value)=>
{
let obj = {};
if(!value)
value = ""
let objtemp =this.props.value
objtemp = objtemp && objtemp.length? objtemp[0] : {}
objtemp["s"+index] = value;
this.keys.forEach(i=>{
obj['s'+i] = objtemp['s'+i]
});
let temp = FormatAmount(obj.s2);
let mval = `${obj.s1}${temp}`.replace(/\//g,'')
this.props.onValue([obj,mval])
}
render()
{
let value =this.props.value
let mval = value && value.length? value[1] : ''
let errmsg = value && value.length==3?value[2]:{}
value = value && value.length? value[0] : {}
return (<Row>
<Col style={{"minWidth":'100px'}} span={3}>
<FormItem
label="Currency"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<Select
placeholder="Currency"
showSearch
allowClear={true}
optionFilterProp="children"
notFoundContent="Wrong Code"
style={{ width: "100%" }} value={value.s1} onChange={val=>this.onChange(1,val)} >
{
Currency.map(cur=><Option key={cur} value={cur}>{cur}</Option>)
}
</Select>
</FormItem>
</Col>
<Col span={12}>
<FormItem
label="Rate"
required={this.props.status=='M' || mval?'required':null}
help={errmsg.s2}
validateStatus={errmsg.s2?'error':null}
>
<Input value={value.s2} onChange={e=>this.onChange(2,e.target.value)} maxLength={12} style={{imeMode:'disabled'}} placeholder="Rate"/>
</FormItem>
</Col>
</Row>)
}
}
\ No newline at end of file
......@@ -155,6 +155,7 @@ import T14S from './T14S'
import T15A from './T15A'
import T94A from './T94A'
import T22C from './T22C'
import T17A from './T17A'
import T17E from './T17E'
import T17F from './T17F'
import T17H from './T17H'
......@@ -189,6 +190,8 @@ import T39M from './T39M'
import T21A from './T21A'
import T14E from './T14E'
import T15B from './T15B'
import T15C from './T15C'
import T15D from './T15D'
import T30T from './T30T'
import T30V from './T30V'
import T29A from './T29A'
......@@ -257,12 +260,12 @@ import T33G from './T33G';
import T71C from './T71C';
import T32F from './T32F';
import T26D from './T26D';
import T17R from './T17R';
import T32R from './T32R';
import T34J from './T34J';
import T33J from './T33J';
import T22Z from './T22Z';
import T37K from './T37K';
import T17R from './T17R';
export default function(tag,props,onValue){
......@@ -425,6 +428,9 @@ export default function(tag,props,onValue){
case "T21A" :return <T21A {...props} onValue={onValue} />;
case "T14E" :return <T14E {...props} onValue={onValue} />;
case "T15B" :return <T15B {...props} onValue={onValue} />;
case "T15C" :return <T15C {...props} onValue={onValue} />;
case "T15D" :return <T15D {...props} onValue={onValue} />;
case "T30T" :return <T30T {...props} onValue={onValue} />;
case "T30V" :return <T30V {...props} onValue={onValue} />;
case "T29A" :return <T29A {...props} onValue={onValue} />;
......@@ -441,6 +447,7 @@ export default function(tag,props,onValue){
case "T15A" :return <T15A {...props} onValue={onValue} />;
case "T94A" :return <T94A {...props} onValue={onValue} />;
case "T22C" :return <T22C {...props} onValue={onValue} />;
case "T17A" :return <T17A {...props} onValue={onValue} />;
case "T17E" :return <T17E {...props} onValue={onValue} />;
case "T17F" :return <T17F {...props} onValue={onValue} />;
case "T17H" :return <T17H {...props} onValue={onValue} />;
......@@ -527,11 +534,13 @@ export default function(tag,props,onValue){
case "T71C" :return <T71C {...props} onValue={onValue} />;
case "T32F" :return <T32F {...props} onValue={onValue} />;
case "T26D" :return <T26D {...props} onValue={onValue} />;
case "T17R" :return <T17R {...props} onValue={onValue} />;
case "T32R" :return <T32R {...props} onValue={onValue} />;
case "T34J" :return <T34J {...props} onValue={onValue} />;
case "T33J" :return <T33J {...props} onValue={onValue} />;
case "T22Z" :return <T22Z {...props} onValue={onValue} />;
case "T37K" :return <T37K {...props} onValue={onValue} />;
case "T17R" :return <T17R {...props} onValue={onValue} />;
}
}
\ No newline at end of file
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