|
@@ -187,6 +187,7 @@ const Task = React.createClass({
|
|
|
contractNo: thisdata.contractNo,
|
|
|
approval: thisdata.approval, //特批状态
|
|
|
outsourceStatus: thisdata.outsourceStatus, //外包审核状态
|
|
|
+ outsourceType: thisdata.outsourceType, //外包审核状态
|
|
|
splitStatus: thisdata.splitStatus, //是否为子项目 2是 1主项目
|
|
|
splitSuper: thisdata.splitSuper,
|
|
|
splitId: thisdata.splitId,
|
|
@@ -358,18 +359,23 @@ const Task = React.createClass({
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- title: '外包审核',
|
|
|
+ title: '审核状态',
|
|
|
dataIndex: 'outsourceStatus',
|
|
|
key: 'outsourceStatus',
|
|
|
- render: (text) => {
|
|
|
- if (text == 0) {
|
|
|
- return <Tag color="#f50">待审核</Tag>
|
|
|
- } else if (text == 1) {
|
|
|
- return <Tag color="#87d068">审核通过</Tag>
|
|
|
- } else if (text == 2) {
|
|
|
- return <Tag color="#2db7f5">审核驳回</Tag>
|
|
|
- } else {
|
|
|
- return '非外包'
|
|
|
+ render: (text,record) => {
|
|
|
+ if(record.outsourceType === 1){
|
|
|
+ return '供应商'
|
|
|
+ }else{
|
|
|
+ if (text === 0) {
|
|
|
+ return <Tag color="#f50">外包待审核</Tag>
|
|
|
+ } else if (text === 1) {
|
|
|
+ return <Tag color="#87d068">外包已通过</Tag>
|
|
|
+ } else if (text === 2) {
|
|
|
+ return <Tag color="#2db7f5">外包被驳回</Tag>
|
|
|
+ } else {
|
|
|
+ return <div style={{textAlign:'center'}}>/</div>
|
|
|
+ }
|
|
|
+ return text
|
|
|
}
|
|
|
},
|
|
|
},
|
|
@@ -637,194 +643,9 @@ const Task = React.createClass({
|
|
|
},
|
|
|
],
|
|
|
// 专利
|
|
|
- ContactsListsNew: [
|
|
|
- {
|
|
|
- title: '供应商名称',
|
|
|
- dataIndex: 'companyName',
|
|
|
- key: 'companyName',
|
|
|
- render: (text, record, index) => {
|
|
|
- if (text) {
|
|
|
- return <span>{text}</span>
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '单价(万元)',
|
|
|
- dataIndex: 'unitPrice',
|
|
|
- key: 'unitPrice',
|
|
|
- render: (text, record) => {
|
|
|
- if (text) {
|
|
|
- return <span>{text}</span>
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '数量',
|
|
|
- dataIndex: 'quantity',
|
|
|
- key: 'quantity',
|
|
|
- render: (text, record) => {
|
|
|
- if (text) {
|
|
|
- return <span>{text}</span>
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '总价',
|
|
|
- dataIndex: 'totalAmount',
|
|
|
- key: 'totalAmount',
|
|
|
- render: (text, record) => {
|
|
|
- if (text) {
|
|
|
- return <span>{text}</span>
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '材料',
|
|
|
- dataIndex: 'material',
|
|
|
- key: 'material',
|
|
|
- render: (text, record) => {
|
|
|
- return getMaterialStatus(text)
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '加急',
|
|
|
- dataIndex: 'urgent',
|
|
|
- key: 'urgent',
|
|
|
- render: (text, record) => {
|
|
|
- return getUrgentStatus(text)
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '备注',
|
|
|
- dataIndex: 'remarks',
|
|
|
- key: 'remarks',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '操作',
|
|
|
- dataIndex: 'dels',
|
|
|
- key: 'dels',
|
|
|
- render: (text, record, index) => {
|
|
|
- return (
|
|
|
- <div>
|
|
|
- <Popconfirm
|
|
|
- title="是否删除?"
|
|
|
- onConfirm={() => {
|
|
|
- this.confirmDeletNew(record)
|
|
|
- }}
|
|
|
- okText="删除"
|
|
|
- cancelText="不删除"
|
|
|
- >
|
|
|
- <Button
|
|
|
- onClick={(e) => {
|
|
|
- e.stopPropagation()
|
|
|
- }}
|
|
|
- style={{
|
|
|
- marginRight: '10px',
|
|
|
- color: '#ffffff',
|
|
|
- background: '#f00',
|
|
|
- border: 'none',
|
|
|
- }}
|
|
|
- >
|
|
|
- 删除
|
|
|
- </Button>
|
|
|
- </Popconfirm>
|
|
|
- </div>
|
|
|
- )
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
+ ContactsListsNew: [],
|
|
|
//付款节点表头
|
|
|
- PayNodeTableColunms: [
|
|
|
- {
|
|
|
- title: '供应商名称',
|
|
|
- dataIndex: 'companyName',
|
|
|
- key: 'companyName',
|
|
|
- render: (text, record, index) => {
|
|
|
- if (text) {
|
|
|
- return <span>{text}</span>
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '付款科目',
|
|
|
- dataIndex: 'dunType',
|
|
|
- key: 'dunType',
|
|
|
- render: (text, record) => {
|
|
|
- if (text) {
|
|
|
- return <span>{text}</span>
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '付款时间',
|
|
|
- dataIndex: 'partyTimes',
|
|
|
- key: 'partyTimes',
|
|
|
- render: (text, record) => {
|
|
|
- return <span>{text ? text : '/'}</span>
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '数量',
|
|
|
- dataIndex: 'quantity',
|
|
|
- key: 'quantity',
|
|
|
- render: (text, record) => {
|
|
|
- if (text) {
|
|
|
- return <span>{text}</span>
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '总价',
|
|
|
- dataIndex: 'totalAmount',
|
|
|
- key: 'totalAmount',
|
|
|
- render: (text, record) => {
|
|
|
- return <span>***</span>
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '已付',
|
|
|
- dataIndex: 'partyAmount',
|
|
|
- key: 'partyAmount',
|
|
|
- render: (text, record) => {
|
|
|
- if (text) {
|
|
|
- return <span>{text}</span>
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '操作',
|
|
|
- dataIndex: 'dels',
|
|
|
- key: 'dels',
|
|
|
- render: (text, record, index) => {
|
|
|
- return (
|
|
|
- <div>
|
|
|
- <Popconfirm
|
|
|
- title="是否删除?"
|
|
|
- onConfirm={() => {
|
|
|
- this.payNodeConfirmDeletNew(record)
|
|
|
- }}
|
|
|
- okText="删除"
|
|
|
- cancelText="不删除"
|
|
|
- >
|
|
|
- <Button
|
|
|
- onClick={(e) => {
|
|
|
- e.stopPropagation()
|
|
|
- }}
|
|
|
- style={{
|
|
|
- marginRight: '10px',
|
|
|
- color: '#ffffff',
|
|
|
- background: '#f00',
|
|
|
- border: 'none',
|
|
|
- }}
|
|
|
- >
|
|
|
- 删除
|
|
|
- </Button>
|
|
|
- </Popconfirm>
|
|
|
- </div>
|
|
|
- )
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
+ PayNodeTableColunms: [],
|
|
|
}
|
|
|
},
|
|
|
/* 分派 */
|
|
@@ -852,7 +673,7 @@ const Task = React.createClass({
|
|
|
},
|
|
|
//用于判断 第三方信息表格显示
|
|
|
projectTypeTabContent(projectType) {
|
|
|
- if(projectType === 0){ //0正常 1专利 2软著 3审计
|
|
|
+ if(projectType === 0 || !projectType){ //0正常 1专利 2软著 3审计
|
|
|
this.setState({
|
|
|
ContactsListsNew: [
|
|
|
{
|
|
@@ -949,98 +770,6 @@ const Task = React.createClass({
|
|
|
},
|
|
|
},
|
|
|
],
|
|
|
- //付款节点表头
|
|
|
- PayNodeTableColunms: [
|
|
|
- {
|
|
|
- title: '供应商名称',
|
|
|
- dataIndex: 'companyName',
|
|
|
- key: 'companyName',
|
|
|
- render: (text, record, index) => {
|
|
|
- if (text) {
|
|
|
- return <span>{text}</span>
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '付款科目',
|
|
|
- dataIndex: 'dunType',
|
|
|
- key: 'dunType',
|
|
|
- render: (text, record) => {
|
|
|
- if (text) {
|
|
|
- return <span>{text}</span>
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '付款时间',
|
|
|
- dataIndex: 'partyTimes',
|
|
|
- key: 'partyTimes',
|
|
|
- render: (text, record) => {
|
|
|
- return <span>{text ? text : '/'}</span>
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '数量',
|
|
|
- dataIndex: 'quantity',
|
|
|
- key: 'quantity',
|
|
|
- render: (text, record) => {
|
|
|
- if (text) {
|
|
|
- return <span>{text}</span>
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '总价',
|
|
|
- dataIndex: 'totalAmount',
|
|
|
- key: 'totalAmount',
|
|
|
- render: (text, record) => {
|
|
|
- return <span>{text}</span>
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '已付',
|
|
|
- dataIndex: 'partyAmount',
|
|
|
- key: 'partyAmount',
|
|
|
- render: (text, record) => {
|
|
|
- if (text) {
|
|
|
- return <span>{text}</span>
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '操作',
|
|
|
- dataIndex: 'dels',
|
|
|
- key: 'dels',
|
|
|
- render: (text, record, index) => {
|
|
|
- return (
|
|
|
- <div>
|
|
|
- <Popconfirm
|
|
|
- title="是否删除?"
|
|
|
- onConfirm={() => {
|
|
|
- this.payNodeConfirmDeletNew(record)
|
|
|
- }}
|
|
|
- okText="删除"
|
|
|
- cancelText="不删除"
|
|
|
- >
|
|
|
- <Button
|
|
|
- onClick={(e) => {
|
|
|
- e.stopPropagation()
|
|
|
- }}
|
|
|
- style={{
|
|
|
- marginRight: '10px',
|
|
|
- color: '#ffffff',
|
|
|
- background: '#f00',
|
|
|
- border: 'none',
|
|
|
- }}
|
|
|
- >
|
|
|
- 删除
|
|
|
- </Button>
|
|
|
- </Popconfirm>
|
|
|
- </div>
|
|
|
- )
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
})
|
|
|
}else if(projectType === 2){ //2软著
|
|
|
this.setState({
|
|
@@ -1150,98 +879,6 @@ const Task = React.createClass({
|
|
|
},
|
|
|
},
|
|
|
],
|
|
|
- //付款节点表头
|
|
|
- PayNodeTableColunms: [
|
|
|
- {
|
|
|
- title: '供应商名称',
|
|
|
- dataIndex: 'companyName',
|
|
|
- key: 'companyName',
|
|
|
- render: (text, record, index) => {
|
|
|
- if (text) {
|
|
|
- return <span>{text}</span>
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '付款科目',
|
|
|
- dataIndex: 'dunType',
|
|
|
- key: 'dunType',
|
|
|
- render: (text, record) => {
|
|
|
- if (text) {
|
|
|
- return <span>{text}</span>
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '付款时间',
|
|
|
- dataIndex: 'partyTimes',
|
|
|
- key: 'partyTimes',
|
|
|
- render: (text, record) => {
|
|
|
- return <span>{text ? text : '/'}</span>
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '数量',
|
|
|
- dataIndex: 'quantity',
|
|
|
- key: 'quantity',
|
|
|
- render: (text, record) => {
|
|
|
- if (text) {
|
|
|
- return <span>{text}</span>
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '总价',
|
|
|
- dataIndex: 'totalAmount',
|
|
|
- key: 'totalAmount',
|
|
|
- render: (text, record) => {
|
|
|
- return <span>***</span>
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '已付',
|
|
|
- dataIndex: 'partyAmount',
|
|
|
- key: 'partyAmount',
|
|
|
- render: (text, record) => {
|
|
|
- if (text) {
|
|
|
- return <span>{text}</span>
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- title: '操作',
|
|
|
- dataIndex: 'dels',
|
|
|
- key: 'dels',
|
|
|
- render: (text, record, index) => {
|
|
|
- return (
|
|
|
- <div>
|
|
|
- <Popconfirm
|
|
|
- title="是否删除?"
|
|
|
- onConfirm={() => {
|
|
|
- this.payNodeConfirmDeletNew(record)
|
|
|
- }}
|
|
|
- okText="删除"
|
|
|
- cancelText="不删除"
|
|
|
- >
|
|
|
- <Button
|
|
|
- onClick={(e) => {
|
|
|
- e.stopPropagation()
|
|
|
- }}
|
|
|
- style={{
|
|
|
- marginRight: '10px',
|
|
|
- color: '#ffffff',
|
|
|
- background: '#f00',
|
|
|
- border: 'none',
|
|
|
- }}
|
|
|
- >
|
|
|
- 删除
|
|
|
- </Button>
|
|
|
- </Popconfirm>
|
|
|
- </div>
|
|
|
- )
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
})
|
|
|
}else if(projectType === 1){ //1专利
|
|
|
if(this.state.patentType === 0){ //专利申请
|
|
@@ -1597,6 +1234,100 @@ const Task = React.createClass({
|
|
|
]
|
|
|
})
|
|
|
}
|
|
|
+ this.setState({
|
|
|
+ //付款节点表头
|
|
|
+ PayNodeTableColunms: [
|
|
|
+ {
|
|
|
+ title: '供应商名称',
|
|
|
+ dataIndex: 'companyName',
|
|
|
+ key: 'companyName',
|
|
|
+ render: (text, record, index) => {
|
|
|
+ if (text) {
|
|
|
+ return <span>{text}</span>
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '付款科目',
|
|
|
+ dataIndex: 'dunType',
|
|
|
+ key: 'dunType',
|
|
|
+ render: (text, record) => {
|
|
|
+ if (text) {
|
|
|
+ return <span>{text}</span>
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '付款时间',
|
|
|
+ dataIndex: 'partyTimes',
|
|
|
+ key: 'partyTimes',
|
|
|
+ render: (text, record) => {
|
|
|
+ return <span>{text ? text : '/'}</span>
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '数量',
|
|
|
+ dataIndex: 'quantity',
|
|
|
+ key: 'quantity',
|
|
|
+ render: (text, record) => {
|
|
|
+ if (text) {
|
|
|
+ return <span>{text}</span>
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '总价',
|
|
|
+ dataIndex: 'totalAmount',
|
|
|
+ key: 'totalAmount',
|
|
|
+ render: (text, record) => {
|
|
|
+ return <span>{text}</span>
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '已付',
|
|
|
+ dataIndex: 'partyAmount',
|
|
|
+ key: 'partyAmount',
|
|
|
+ render: (text, record) => {
|
|
|
+ if (text) {
|
|
|
+ return <span>{text}</span>
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'dels',
|
|
|
+ key: 'dels',
|
|
|
+ render: (text, record, index) => {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ <Popconfirm
|
|
|
+ title="是否删除?"
|
|
|
+ onConfirm={() => {
|
|
|
+ this.payNodeConfirmDeletNew(record)
|
|
|
+ }}
|
|
|
+ okText="删除"
|
|
|
+ cancelText="不删除"
|
|
|
+ >
|
|
|
+ <Button
|
|
|
+ onClick={(e) => {
|
|
|
+ e.stopPropagation()
|
|
|
+ }}
|
|
|
+ style={{
|
|
|
+ marginRight: '10px',
|
|
|
+ color: '#ffffff',
|
|
|
+ background: '#f00',
|
|
|
+ border: 'none',
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </Button>
|
|
|
+ </Popconfirm>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ })
|
|
|
},
|
|
|
setColor() {
|
|
|
$('.userName span').after(
|
|
@@ -2418,7 +2149,7 @@ const Task = React.createClass({
|
|
|
}
|
|
|
if (this.state.refundStatus === 1) {
|
|
|
//专利
|
|
|
- if (!this.state.patentType) {
|
|
|
+ if (this.state.patentType === -1) {
|
|
|
message.warning('请选择专利类型')
|
|
|
return
|
|
|
}
|
|
@@ -2462,30 +2193,35 @@ const Task = React.createClass({
|
|
|
) */
|
|
|
}, 3000)
|
|
|
|
|
|
+ let data = {
|
|
|
+ tid: this.state.id,
|
|
|
+ orderNo: this.state.orderNo,
|
|
|
+ type: 1, //分类 0订单 1项目
|
|
|
+ startType: this.state.startType, //支付类型 0外包 1供应商 false 0
|
|
|
+ companyName: this.state.companyName,
|
|
|
+ amount: this.state.amount,
|
|
|
+ pictureUrl: this.getUrl(this.state.pictureUrl).length
|
|
|
+ ? this.getUrl(this.state.pictureUrl)
|
|
|
+ : '',
|
|
|
+ patentNameType:this.state.patentNameType,
|
|
|
+ patentName:this.state.patentName,
|
|
|
+ outsourceRemarks: this.state.outsourceRemarks,
|
|
|
+ unitNumber: this.state.unitNumber,
|
|
|
+ unitPrice: this.state.unitPrice,
|
|
|
+ id: this.state.refundStatus == 2 ? this.state.mid : undefined,
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.state.refundStatus === 1) {
|
|
|
+ data.patentType = this.state.patentType;
|
|
|
+ }
|
|
|
+
|
|
|
$.ajax({
|
|
|
method: 'POST',
|
|
|
dataType: 'json',
|
|
|
crossDomain: false,
|
|
|
url:
|
|
|
globalConfig.context + '/api/admin/outsourceOrg/outsourceProjectAudit',
|
|
|
- data: {
|
|
|
- tid: this.state.id,
|
|
|
- orderNo: this.state.orderNo,
|
|
|
- type: 1, //分类 0订单 1项目
|
|
|
- startType: this.state.startType, //支付类型 0外包 1供应商 false 0
|
|
|
- companyName: this.state.companyName,
|
|
|
- amount: this.state.amount,
|
|
|
- pictureUrl: this.getUrl(this.state.pictureUrl).length
|
|
|
- ? this.getUrl(this.state.pictureUrl)
|
|
|
- : '',
|
|
|
- patentType:this.state.patentType,
|
|
|
- patentNameType:this.state.patentNameType,
|
|
|
- patentName:this.state.patentName,
|
|
|
- outsourceRemarks: this.state.outsourceRemarks,
|
|
|
- unitNumber: this.state.unitNumber,
|
|
|
- unitPrice: this.state.unitPrice,
|
|
|
- id: this.state.refundStatus == 2 ? this.state.mid : undefined,
|
|
|
- },
|
|
|
+ data: data,
|
|
|
}).done(
|
|
|
function (data) {
|
|
|
this.setState({
|
|
@@ -2714,6 +2450,7 @@ const Task = React.createClass({
|
|
|
? thisData.dunSubject.toString()
|
|
|
: '', //催款科目
|
|
|
id: thisData.id, //节点Id
|
|
|
+ tid: thisData.tid, //节点指定的第三方id
|
|
|
money: thisData.money, //催款金额
|
|
|
// orderNo: record ? record.orderNo : this.props.datauser.orderNo,
|
|
|
commodityName: thisData.commodityName,
|
|
@@ -2983,21 +2720,7 @@ const Task = React.createClass({
|
|
|
//获取当前供应商名称对应的单价并更新
|
|
|
this.state.thirdInfoList.forEach((item) => {
|
|
|
if (item.companyName === this.state.thirdCompanyName) {
|
|
|
- // assets: null
|
|
|
- // audit: 0
|
|
|
- // cid: 15
|
|
|
- // companyName: "测试1号-751"
|
|
|
- // id: 751
|
|
|
- // income: null
|
|
|
- // key: 6
|
|
|
- // material: 1
|
|
|
- // quantity: 12
|
|
|
- // remarks: "的修改V型分公司的"
|
|
|
- // tid: 810
|
|
|
- // totalAmount: 276
|
|
|
- // unitPrice: 23
|
|
|
- // urgent: 6
|
|
|
- currentTotalPrice = num ? item.quantity * num : item.quantity * item.unitPrice;
|
|
|
+ currentTotalPrice = num ? item.unitPrice * num : item.quantity * item.unitPrice;
|
|
|
currentTotalPrice = currentTotalPrice.toFixed(4);
|
|
|
quantity = num ? num : item.quantity;
|
|
|
unitPrice = item.unitPrice;
|
|
@@ -3012,14 +2735,6 @@ const Task = React.createClass({
|
|
|
thirdUnitPrice: unitPrice
|
|
|
})
|
|
|
}
|
|
|
- console.log(
|
|
|
- 'thirdUnitPrice:',
|
|
|
- this.state.thirdUnitPrice,
|
|
|
- 'payNodeQuantity:',
|
|
|
- this.state.payNodeQuantity,
|
|
|
- 'currentTotalPrice:',
|
|
|
- currentTotalPrice
|
|
|
- )
|
|
|
},
|
|
|
// 保存供应商信息
|
|
|
handleCancelq() {
|
|
@@ -3103,9 +2818,6 @@ const Task = React.createClass({
|
|
|
//新增
|
|
|
api = '/api/admin/company/addPaymentNode'
|
|
|
}
|
|
|
- this.setState({
|
|
|
- loading: true,
|
|
|
- })
|
|
|
// totalAmount: this.state.currentTotalPrice, //总价
|
|
|
// partyAmount: this.state.partyAmount, //付款金额
|
|
|
//
|
|
@@ -3117,6 +2829,18 @@ const Task = React.createClass({
|
|
|
return true;
|
|
|
}
|
|
|
});
|
|
|
+ if(!this.state.thirdCompanyName){
|
|
|
+ message.error('请选择供应商名称');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(!this.state.paySubjectName){
|
|
|
+ message.error('请选择付款科目');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(!this.state.payNodeQuantity){
|
|
|
+ message.error('请输入数量');
|
|
|
+ return;
|
|
|
+ }
|
|
|
let data = {
|
|
|
id: this.state.ThirdId, //id
|
|
|
tid: this.state.tid, //订单编号
|
|
@@ -3127,12 +2851,19 @@ const Task = React.createClass({
|
|
|
projectType: this.state.cSort, //项目分类
|
|
|
}
|
|
|
if(this.state.paySubjectName === '0'){
|
|
|
+ if(!this.state.partyTimes){
|
|
|
+ message.error('请选择付款时间');
|
|
|
+ return;
|
|
|
+ }
|
|
|
data.partyTimes = this.state.partyTimes //付款时间
|
|
|
}
|
|
|
if(this.state.projectType !== 2){ //其他类型 0正常 1专利 2软著 3审计
|
|
|
data.totalAmount = this.state.currentTotalPrice //总价
|
|
|
data.unitPrice = this.state.thirdUnitPrice //单价
|
|
|
}
|
|
|
+ this.setState({
|
|
|
+ loading: true,
|
|
|
+ })
|
|
|
$.ajax({
|
|
|
url: globalConfig.context + api,
|
|
|
method: 'post',
|
|
@@ -3270,17 +3001,6 @@ const Task = React.createClass({
|
|
|
thirdUrgent: record.urgent, //加急情况
|
|
|
thirdRemarks: record.remarks,
|
|
|
})
|
|
|
- console.log({
|
|
|
- ThirdListVisible: true,
|
|
|
- ThirdId: record.id, //供应商id
|
|
|
- thirdCompanyName: record.companyName, //第三方名称
|
|
|
- thirdUnitPrice: record.unitPrice, //单价
|
|
|
- thirdQuantity: record.quantity, //数量
|
|
|
- currentTotalPrice: record.totalAmount, //总价
|
|
|
- thirdMaterial: record.material, //有无材料
|
|
|
- thirdUrgent: record.urgent, //加急情况
|
|
|
- thirdRemarks: record.remarks,
|
|
|
- })
|
|
|
},
|
|
|
//点击付款节点详情
|
|
|
payNodeTableRowClickOne(record) {
|
|
@@ -4881,7 +4601,7 @@ const Task = React.createClass({
|
|
|
</Spin>
|
|
|
</Form>
|
|
|
</Modal>
|
|
|
- <Modal
|
|
|
+ {this.state.addnextVisible ? <Modal
|
|
|
maskClosable={false}
|
|
|
visible={this.state.addnextVisible}
|
|
|
onOk={this.nextCancel}
|
|
@@ -4954,7 +4674,7 @@ const Task = React.createClass({
|
|
|
</div>
|
|
|
</Spin>
|
|
|
</Form>
|
|
|
- </Modal>
|
|
|
+ </Modal> : <div/>}
|
|
|
<Modal
|
|
|
maskClosable={false}
|
|
|
visible={this.state.speVisible}
|
|
@@ -5870,7 +5590,15 @@ const Task = React.createClass({
|
|
|
onCancel={()=>{
|
|
|
this.thirdTable(this.state.tid);
|
|
|
this.setState({
|
|
|
- ThirdListVisible: false
|
|
|
+ ThirdListVisible: false,
|
|
|
+ ThirdId: '', //供应商id
|
|
|
+ thirdCompanyName: '', //第三方名称
|
|
|
+ thirdUnitPrice: '', //单价
|
|
|
+ thirdQuantity: '', //数量
|
|
|
+ currentTotalPrice: '', //总价
|
|
|
+ thirdMaterial: '', //有无材料
|
|
|
+ thirdUrgent: 0, //加急情况
|
|
|
+ thirdRemarks: '',
|
|
|
})
|
|
|
}}
|
|
|
otherOperations={(data)=>{
|
|
@@ -5990,7 +5718,7 @@ const Task = React.createClass({
|
|
|
<Input
|
|
|
value={this.state.currentTotalPrice}
|
|
|
placeholder=""
|
|
|
- required="required"
|
|
|
+ // required="required"
|
|
|
// onBlur={this.payNodeCalculatedAmount}
|
|
|
// onChange={(e) =>
|
|
|
// this.setState({
|