|
@@ -53,7 +53,7 @@ const PicturesWall = React.createClass({
|
|
|
<Upload
|
|
|
beforeUpload={beforeUploadFile}
|
|
|
action={globalConfig.context + "/api/admin/orderInvoice/uploadOrderInvoiceFile"}
|
|
|
- data={{ 'sign': '' }}
|
|
|
+ data={{ 'sign': 'order_invoice_file' }}
|
|
|
listType="picture-card"
|
|
|
fileList={fileList}
|
|
|
onPreview={this.handlePreview}
|
|
@@ -149,6 +149,7 @@ const MyService=Form.create()(React.createClass({
|
|
|
flag:false,
|
|
|
searchMore: true,
|
|
|
loading: false,
|
|
|
+ alreadyAmount:0,
|
|
|
intentOrder:true,
|
|
|
formalOrder:true,
|
|
|
pagination: {
|
|
@@ -284,7 +285,7 @@ const MyService=Form.create()(React.createClass({
|
|
|
invoiceType:this.state.invoiceType,
|
|
|
unitName:this.state.unitName,
|
|
|
taxNumber:this.state.taxNumber,
|
|
|
- amount:this.state.amount,
|
|
|
+ amount:parseFloat(this.state.amount),
|
|
|
banks:this.state.banks,
|
|
|
content:this.state.content,
|
|
|
unitAddress:this.state.unitAddress,
|
|
@@ -297,7 +298,8 @@ const MyService=Form.create()(React.createClass({
|
|
|
addresseeProvince:this.state.post === 0?this.state.ProvinceCity[0]:'',
|
|
|
addresseeCity:this.state.post === 0?this.state.ProvinceCity[1]:'',
|
|
|
addresseeArea:this.state.post === 0?this.state.ProvinceCity[2]:'',
|
|
|
- recipientAddress:this.state.recipientAddress},
|
|
|
+ recipientAddress:this.state.recipientAddress,
|
|
|
+ alreadyAmount:parseFloat(this.state.alreadyAmount)},
|
|
|
sumData = {},
|
|
|
sumData1 = {};
|
|
|
switch (this.state.status) {
|
|
@@ -308,7 +310,30 @@ const MyService=Form.create()(React.createClass({
|
|
|
case 1:api = '/api/admin/orderInvoice/createOrderInvoice';
|
|
|
api1 = '/api/admin/orderInvoice/updateOrderInvoice'
|
|
|
sumData = fdata;
|
|
|
- sumData1 = fdata;
|
|
|
+ sumData1 = {
|
|
|
+ orderNo:this.state.orderNo3,
|
|
|
+ type:this.state.type,
|
|
|
+ status:this.state.status,
|
|
|
+ approval:this.state.ordapproval,
|
|
|
+ remarks:this.state.remarks,
|
|
|
+ invoiceType:this.state.invoiceType,
|
|
|
+ unitName:this.state.unitName,
|
|
|
+ taxNumber:this.state.taxNumber,
|
|
|
+ amount:parseFloat(this.state.amount),
|
|
|
+ banks:this.state.banks,
|
|
|
+ content:this.state.content,
|
|
|
+ unitAddress:this.state.unitAddress,
|
|
|
+ invoiceRemarks:this.state.invoiceRemarks,
|
|
|
+ unitMobile:this.state.unitMobile,
|
|
|
+ voucherUrl:theorgCodeUrl.length?theorgCodeUrl:'',
|
|
|
+ post:this.state.post,
|
|
|
+ addressee:this.state.addressee,
|
|
|
+ addresseeMobile:this.state.addresseeMobile,
|
|
|
+ addresseeProvince:this.state.post === 0?this.state.ProvinceCity[0]:'',
|
|
|
+ addresseeCity:this.state.post === 0?this.state.ProvinceCity[1]:'',
|
|
|
+ addresseeArea:this.state.post === 0?this.state.ProvinceCity[2]:'',
|
|
|
+ recipientAddress:this.state.recipientAddress,
|
|
|
+ alreadyAmount:parseFloat(this.state.alreadyAmount)};
|
|
|
sumData1.id = this.state.id;
|
|
|
method = 'post'
|
|
|
break;
|
|
@@ -344,6 +369,18 @@ const MyService=Form.create()(React.createClass({
|
|
|
message.warning('金额不能为空')
|
|
|
return
|
|
|
}
|
|
|
+ if (isNaN(this.state.amount)) {
|
|
|
+ message.warning('开票金额包含非法字符,请重新输入')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (isNaN(this.state.alreadyAmount)) {
|
|
|
+ message.warning('开票金额总计包含非法字符,请重新输入')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (parseFloat(this.state.alreadyAmount)<0) {
|
|
|
+ message.warning('开票金额总计不能小于0,请重新输入')
|
|
|
+ return
|
|
|
+ }
|
|
|
if (!this.state.banks) {
|
|
|
message.warning('开户行不能为空')
|
|
|
return
|
|
@@ -360,7 +397,12 @@ const MyService=Form.create()(React.createClass({
|
|
|
message.warning('单位电话不能为空')
|
|
|
return
|
|
|
}
|
|
|
+ if (this.state.alreadyAmount === '') {
|
|
|
+ message.warning('开票金额总计不能为空')
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
+ console.log(this.state.flag,this.state.status)
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
@@ -399,6 +441,7 @@ const MyService=Form.create()(React.createClass({
|
|
|
addresseeProvince:thisdata.addresseeProvince,
|
|
|
addresseeCity:thisdata.addresseeCity,
|
|
|
addresseeArea:thisdata.addresseeArea,
|
|
|
+ alreadyAmount:thisdata.alreadyAmount,
|
|
|
ProvinceCity: ProvinceCityArr[0]!=null?ProvinceCityArr:undefined,//省市区
|
|
|
recipientAddress:thisdata.recipientAddress,
|
|
|
orgCodeUrl: thisdata.voucherUrl ? splitUrl(thisdata.voucherUrl, ',', globalConfig.avatarHost + '/upload') : [],
|
|
@@ -412,8 +455,10 @@ const MyService=Form.create()(React.createClass({
|
|
|
if(!data.error.length) {
|
|
|
if(this.state.status === 1){
|
|
|
message.success('提交成功!');
|
|
|
- this.inRecordData()
|
|
|
this.visitCancels()
|
|
|
+ if (this.state.flag) {
|
|
|
+ this.inRecordData()
|
|
|
+ }
|
|
|
}else if(this.state.status === 0){
|
|
|
message.success('保存成功!');
|
|
|
this.visitCancels()
|
|
@@ -450,6 +495,7 @@ const MyService=Form.create()(React.createClass({
|
|
|
addresseeArea:'',
|
|
|
recipientAddress:'',
|
|
|
ordapproval:undefined,
|
|
|
+ alreadyAmount:'',
|
|
|
ProvinceCity:[]
|
|
|
})
|
|
|
},
|
|
@@ -510,10 +556,9 @@ const MyService=Form.create()(React.createClass({
|
|
|
orderNo3:record.orderNo,
|
|
|
avisible:true,
|
|
|
flag:false,
|
|
|
- type:0,
|
|
|
invoiceType:0,
|
|
|
+ alreadyAmount:0,
|
|
|
unitName:this.state.dataSource[index].userName,
|
|
|
- ordapproval:0,
|
|
|
post:1
|
|
|
})
|
|
|
},
|
|
@@ -564,6 +609,7 @@ const MyService=Form.create()(React.createClass({
|
|
|
addresseeProvince:thisdata.addresseeProvince,
|
|
|
addresseeCity:thisdata.addresseeCity,
|
|
|
addresseeArea:thisdata.addresseeArea,
|
|
|
+ alreadyAmount:thisdata.alreadyAmount,
|
|
|
recipientAddress:thisdata.recipientAddress,
|
|
|
orgCodeUrl: thisdata.voucherUrl ? splitUrl(thisdata.voucherUrl, ',', globalConfig.avatarHost + '/upload') : [],
|
|
|
})
|
|
@@ -963,7 +1009,7 @@ const MyService=Form.create()(React.createClass({
|
|
|
className="admin-desc-content"
|
|
|
footer=''
|
|
|
title = '开具发票申请单'
|
|
|
- width='900px'
|
|
|
+ width='1000px'
|
|
|
visible={this.state.avisible}
|
|
|
onOk={this.visitOks}
|
|
|
onCancel={this.visitCancels}
|
|
@@ -995,6 +1041,9 @@ const MyService=Form.create()(React.createClass({
|
|
|
<Radio value={0}>省内</Radio>
|
|
|
<Radio value={1}>省外</Radio>
|
|
|
</RadioGroup>
|
|
|
+ <span style={{position:'absolute',color:'red',fontSize:'10px',lineHeight:'20px'}}>
|
|
|
+ 省内:湖南省<br></br>省外:除湖南省以外
|
|
|
+ </span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -1005,6 +1054,9 @@ const MyService=Form.create()(React.createClass({
|
|
|
<Radio value={0}>否</Radio>
|
|
|
<Radio value={1}>是</Radio>
|
|
|
</RadioGroup>
|
|
|
+ <span style={{position:'absolute',color:'red',fontSize:'10px',lineHeight:'15px'}}>
|
|
|
+ 注:特批单,省内省外,<br></br>分别由周总,省外总经理<br></br>特批后,方可至开票流程
|
|
|
+ </span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>
|
|
@@ -1039,6 +1091,9 @@ const MyService=Form.create()(React.createClass({
|
|
|
} >
|
|
|
{<Input placeholder="请输入单位名称" value={this.state.unitName}
|
|
|
onChange={(e)=>{this.setState({unitName:e.target.value})}} style={{width:'240px'}} />}
|
|
|
+ <span style={{position:'absolute',color:'red',fontSize:'10px',lineHeight:'15px',width:'30%'}}>
|
|
|
+ 系统读取单位<br></br>名称,可修改
|
|
|
+ </span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -1054,20 +1109,23 @@ const MyService=Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label={
|
|
|
<span>
|
|
|
- <strong style={{ color: '#f00' }}>*</strong>开票金额
|
|
|
+ <strong style={{ color: '#f00' }}>*</strong>开票金额(万元)
|
|
|
</span>
|
|
|
} >
|
|
|
{<Input placeholder="请输入开票金额" value={this.state.amount}
|
|
|
- onChange={(e)=>{this.setState({amount:e.target.value})}} style={{width:'240px'}} />}
|
|
|
+ onChange={(e)=>{this.setState({amount:e.target.value}),console.log(typeof this.state.amount)}} style={{width:'240px'}} />}
|
|
|
+ <span style={{position:'absolute',color:'red',fontSize:'10px',lineHeight:'15px',width:'30%'}}>
|
|
|
+ 退票请写负数<br></br>金额
|
|
|
+ </span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label={
|
|
|
<span>
|
|
|
- <strong style={{ color: '#f00' }}>*</strong>开户行银行账号
|
|
|
+ <strong style={{ color: '#f00' }}>*</strong>开户行及银行账号
|
|
|
</span>
|
|
|
} >
|
|
|
- {<Input placeholder="请输入开户行银行账号" value={this.state.banks}
|
|
|
+ {<Input placeholder="请输入开户行及银行账号" value={this.state.banks}
|
|
|
onChange={(e)=>{this.setState({banks:e.target.value})}} style={{width:'240px'}} />}
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
@@ -1095,6 +1153,9 @@ const MyService=Form.create()(React.createClass({
|
|
|
label="备注" >
|
|
|
{<Input placeholder="请备注开票公司名称" value={this.state.invoiceRemarks}
|
|
|
onChange={(e)=>{this.setState({invoiceRemarks:e.target.value})}} style={{width:'240px'}} />}
|
|
|
+ <span style={{position:'absolute',color:'red',fontSize:'10px',lineHeight:'15px',width:'30%'}}>
|
|
|
+ 开票公司名称,<br></br>如:科德集团
|
|
|
+ </span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -1169,6 +1230,19 @@ const MyService=Form.create()(React.createClass({
|
|
|
onChange={(e)=>{this.setState({recipientAddress:e.target.value})}} style={{width:'240px'}} />}
|
|
|
</FormItem>
|
|
|
</div>:''}
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label={
|
|
|
+ <span>
|
|
|
+ <strong style={{ color: '#f00' }}>*</strong>开票金额总计
|
|
|
+ </span>
|
|
|
+ } >
|
|
|
+ {<Input value={this.state.alreadyAmount}
|
|
|
+ onChange={(e)=>{this.setState({alreadyAmount:e.target.value})}} style={{width:'40px'}} />}万元
|
|
|
+ <span style={{position:'absolute',color:'red',fontSize:'10px',lineHeight:'15px',marginLeft:'20px'}}>
|
|
|
+ 默认值为0.新开票订单此项不用填.<br></br>以前已开票订单,请填写已开票的总计<br></br>金额,便于审核核对!
|
|
|
+ </span>
|
|
|
+ </FormItem>
|
|
|
</div>
|
|
|
<Button className="cancel" type="primary" style={{marginRight:"50px",float:'right'}} size="large" onClick={this.submitApp}>提交申请</Button>
|
|
|
{/*<Button className="cancel" type="primary" style={{marginRight:"50px",float:'right',background:'deepskyblue',border:'none'}} size="large" onClick={this.saveApp}>保存</Button>*/}
|
|
@@ -1219,7 +1293,7 @@ const MyService=Form.create()(React.createClass({
|
|
|
className="admin-desc-content"
|
|
|
footer=''
|
|
|
title = '开具发票申请单'
|
|
|
- width='900px'
|
|
|
+ width='1000px'
|
|
|
visible={this.state.cvisible}
|
|
|
onOk={this.visitOks}
|
|
|
onCancel={this.visitCancels}
|
|
@@ -1251,16 +1325,22 @@ const MyService=Form.create()(React.createClass({
|
|
|
<Radio value={0}>省内</Radio>
|
|
|
<Radio value={1}>省外</Radio>
|
|
|
</RadioGroup>
|
|
|
+ <span style={{position:'absolute',color:'red',fontSize:'10px',lineHeight:'20px'}}>
|
|
|
+ 省内:湖南省<br></br>省外:除湖南省以外
|
|
|
+ </span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="特批:" >
|
|
|
- <RadioGroup value={this.state.ordapproval}
|
|
|
+ <RadioGroup value={!this.state.ordapproval?0:1}
|
|
|
onChange={(e)=>{this.setState({ordapproval:e.target.value})}}
|
|
|
>
|
|
|
<Radio value={0}>否</Radio>
|
|
|
<Radio value={1}>是</Radio>
|
|
|
</RadioGroup>
|
|
|
+ <span style={{position:'absolute',color:'red',fontSize:'10px',lineHeight:'15px'}}>
|
|
|
+ 注:特批单,省内省外,<br></br>分别由周总,省外总经理<br></br>特批后,方可至开票流程
|
|
|
+ </span>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
<hr style={{border:'1px dashed #aaa', width:"90%",margin:'auto'}}/>
|
|
@@ -1295,6 +1375,9 @@ const MyService=Form.create()(React.createClass({
|
|
|
} >
|
|
|
{<Input placeholder="请输入单位名称" value={this.state.unitName}
|
|
|
onChange={(e)=>{this.setState({unitName:e.target.value})}} style={{width:'240px'}} />}
|
|
|
+ <span style={{position:'absolute',color:'red',fontSize:'10px',lineHeight:'15px',width:'30%'}}>
|
|
|
+ 系统读取单位<br></br>名称,可修改
|
|
|
+ </span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -1310,20 +1393,23 @@ const MyService=Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label={
|
|
|
<span>
|
|
|
- <strong style={{ color: '#f00' }}>*</strong>开票金额
|
|
|
+ <strong style={{ color: '#f00' }}>*</strong>开票金额(万元)
|
|
|
</span>
|
|
|
} >
|
|
|
{<Input placeholder="请输入开票金额" value={this.state.amount}
|
|
|
onChange={(e)=>{this.setState({amount:e.target.value})}} style={{width:'240px'}} />}
|
|
|
+ <span style={{position:'absolute',color:'red',fontSize:'10px',lineHeight:'15px',width:'30%'}}>
|
|
|
+ 填写本次开票<br></br>金额
|
|
|
+ </span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label={
|
|
|
<span>
|
|
|
- <strong style={{ color: '#f00' }}>*</strong>开户行银行账号
|
|
|
+ <strong style={{ color: '#f00' }}>*</strong>开户行及银行账号
|
|
|
</span>
|
|
|
} >
|
|
|
- {<Input placeholder="请输入开户行银行账号" value={this.state.banks}
|
|
|
+ {<Input placeholder="请输入开户行及银行账号" value={this.state.banks}
|
|
|
onChange={(e)=>{this.setState({banks:e.target.value})}} style={{width:'240px'}} />}
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
@@ -1351,6 +1437,9 @@ const MyService=Form.create()(React.createClass({
|
|
|
label="备注" >
|
|
|
{<Input placeholder="请备注开票公司名称" value={this.state.invoiceRemarks}
|
|
|
onChange={(e)=>{this.setState({invoiceRemarks:e.target.value})}} style={{width:'240px'}} />}
|
|
|
+ <span style={{position:'absolute',color:'red',fontSize:'10px',lineHeight:'15px',width:'30%'}}>
|
|
|
+ 开票公司名称,<br></br>如:科德集团
|
|
|
+ </span>
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -1393,8 +1482,7 @@ const MyService=Form.create()(React.createClass({
|
|
|
</RadioGroup>
|
|
|
</FormItem>
|
|
|
</div>
|
|
|
- {this.state.post === 0?<div>
|
|
|
- <div className="clearfix">
|
|
|
+ {this.state.post === 0?<div className="clearfix">
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="收信人姓名" >
|
|
@@ -1407,8 +1495,8 @@ const MyService=Form.create()(React.createClass({
|
|
|
{<Input placeholder="请输入电话" value={this.state.addresseeMobile}
|
|
|
onChange={(e)=>{this.setState({addresseeMobile:e.target.value})}} style={{width:'240px'}} />}
|
|
|
</FormItem>
|
|
|
- </div>
|
|
|
- <div className="clearfix">
|
|
|
+ </div>:''}
|
|
|
+ {this.state.post === 0?<div className="clearfix">
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="省-市-区"
|
|
@@ -1416,8 +1504,8 @@ const MyService=Form.create()(React.createClass({
|
|
|
<Cascader options={areaSelect()} value={this.state.ProvinceCity} placeholder="选择城市" style={{width:'95%'}}
|
|
|
onChange={(e,pre) => { this.setState({ ProvinceCity: e }) }} />
|
|
|
</FormItem>
|
|
|
- </div>
|
|
|
- <div className="clearfix">
|
|
|
+ </div>:''}
|
|
|
+ {this.state.post === 0?<div className="clearfix">
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="详细地址"
|
|
@@ -1425,8 +1513,20 @@ const MyService=Form.create()(React.createClass({
|
|
|
{<Input placeholder="请输入详细地址" value={this.state.recipientAddress}
|
|
|
onChange={(e)=>{this.setState({recipientAddress:e.target.value})}} style={{width:'240px'}} />}
|
|
|
</FormItem>
|
|
|
- </div>
|
|
|
</div>:''}
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label={
|
|
|
+ <span>
|
|
|
+ <strong style={{ color: '#f00' }}>*</strong>开票金额总计
|
|
|
+ </span>
|
|
|
+ } >
|
|
|
+ {<Input value={this.state.alreadyAmount}
|
|
|
+ onChange={(e)=>{this.setState({alreadyAmount:e.target.value})}} style={{width:'40px'}} />}万元
|
|
|
+ <span style={{position:'absolute',color:'red',fontSize:'10px',lineHeight:'15px',marginLeft:'20px'}}>
|
|
|
+ 默认值为0.新开票订单此项不用填.<br></br>以前已开票订单,请填写已开票的总计<br></br>金额,便于审核核对!
|
|
|
+ </span>
|
|
|
+ </FormItem>
|
|
|
</div>
|
|
|
<Button className="cancel" type="primary" style={{marginRight:"50px",float:'right'}} size="large" onClick={this.submitApp}>提交申请</Button>
|
|
|
{/*<Button className="cancel" type="primary" style={{marginRight:"50px",float:'right',background:'deepskyblue',border:'none'}} size="large" onClick={this.saveApp}>保存</Button>*/}
|
|
@@ -1515,7 +1615,7 @@ const MyService=Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label={
|
|
|
<span>
|
|
|
- <strong style={{ color: '#f00' }}>*</strong>开票金额
|
|
|
+ <strong style={{ color: '#f00' }}>*</strong>开票金额(万元)
|
|
|
</span>
|
|
|
} >
|
|
|
<span>{this.state.amount}</span>
|
|
@@ -1628,6 +1728,15 @@ const MyService=Form.create()(React.createClass({
|
|
|
</div>
|
|
|
</div>:''}
|
|
|
</div>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label={
|
|
|
+ <span>
|
|
|
+ <strong style={{ color: '#f00' }}>*</strong>开票金额总计
|
|
|
+ </span>
|
|
|
+ } >
|
|
|
+ <span>{this.state.alreadyAmount}万元</span>
|
|
|
+ </FormItem>
|
|
|
</Spin>
|
|
|
</Form>
|
|
|
</Modal>
|