|
@@ -217,6 +217,7 @@ class CMSign extends Component {
|
|
|
render(text, record, index) {
|
|
|
let billId = record.values.pk_psndoc_sub.value;
|
|
|
let billNo = record.values.contractnum.value;
|
|
|
+ console.log("=======================>",buttons)
|
|
|
return buttons && buttons.map((item, index) => {
|
|
|
if (item.key === 'edit') {
|
|
|
return (
|
|
@@ -248,6 +249,16 @@ class CMSign extends Component {
|
|
|
</span>
|
|
|
</React.Fragment>
|
|
|
)
|
|
|
+ } else if (item.key === 'toXyy') {
|
|
|
+ return (
|
|
|
+ <React.Fragment>
|
|
|
+ <span style={{color: '#0073E1', cursor: 'pointer', marginLeft: '12px'}}
|
|
|
+ onClick={opt.sendContract.bind(opt, billId, record)}
|
|
|
+ >
|
|
|
+ 发起合同
|
|
|
+ </span>
|
|
|
+ </React.Fragment>
|
|
|
+ )
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -1032,6 +1043,24 @@ class CMSign extends Component {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ sendContract(v, record) {
|
|
|
+ let pks = v
|
|
|
+ ajax({
|
|
|
+ url: '/nccloud/axj/hr/createAndSendContract.do',
|
|
|
+ data: {
|
|
|
+ billId: pks
|
|
|
+ },
|
|
|
+ success: res => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.success && !!res.data) {
|
|
|
+ toast({color: 'success', content: "合同发送成功!"});
|
|
|
+ } else {
|
|
|
+ toast({color: 'warning', content: res.error.message});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
//合同文本
|
|
|
contractText(v, record) {
|
|
|
let pks = v;
|
|
@@ -1169,6 +1198,11 @@ class CMSign extends Component {
|
|
|
let pk_psndoc_sub = cardData.rows[0].values.pk_psndoc_sub.value;
|
|
|
this.contractText(pk_psndoc_sub);
|
|
|
break;
|
|
|
+ case 'toXyy':
|
|
|
+ let selectRows = this.props.editTable.getCheckedRows(tableid);
|
|
|
+ let pk_psndoc_sub1 = selectRows && selectRows.length && selectRows[0].data.values.pk_psndoc_sub.value;
|
|
|
+ pk_psndoc_sub1 ? this.sendContract(pk_psndoc_sub1) : toast({color: 'warning', content: "请选择一条需求发起的合同!"});;
|
|
|
+ break;
|
|
|
case 'refresh':
|
|
|
this.refreshTableData(true);
|
|
|
break;
|