|
@@ -280,6 +280,103 @@ const NewService = Form.create()(
|
|
|
loading: false,
|
|
|
ContactsLists: [
|
|
|
{
|
|
|
+ title: "催款科目",
|
|
|
+ dataIndex: "dunSubject",
|
|
|
+ key: "dunSubject",
|
|
|
+ render: (text, record) => {
|
|
|
+ return (
|
|
|
+ <Select
|
|
|
+ placeholder="请选择催款科目"
|
|
|
+ value={record.dunSubject}
|
|
|
+ style={{ width: "150px" }}
|
|
|
+ disabled
|
|
|
+ onChange={e => {
|
|
|
+ record.dunSubject = e;
|
|
|
+ this.setState({ contactList: this.state.contactList });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {jiedian.map(function(item) {
|
|
|
+ return (
|
|
|
+ <Select.Option key={item.value}>{item.key}</Select.Option>
|
|
|
+ );
|
|
|
+ })}
|
|
|
+ </Select>
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "金额(万)",
|
|
|
+ dataIndex: "money",
|
|
|
+ key: "money",
|
|
|
+ render: (text, record) => {
|
|
|
+ return (
|
|
|
+ <Input
|
|
|
+ value={record.money}
|
|
|
+ placeholder="请输入金额(必填项)"
|
|
|
+ disabled
|
|
|
+ key={record.id}
|
|
|
+ required="required"
|
|
|
+ onChange={e => {
|
|
|
+ record.money = e.target.value;
|
|
|
+ this.setState({ contactList: this.state.contactList });
|
|
|
+ }}
|
|
|
+ style={{ width: "120px" }}
|
|
|
+ />
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "催款状态",
|
|
|
+ dataIndex: "dunStatus",
|
|
|
+ key: "dunStatus",
|
|
|
+ render: text => {
|
|
|
+ return getCuikuan(text);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: "操作",
|
|
|
+ dataIndex: "dels",
|
|
|
+ key: "dels",
|
|
|
+ render: (text, record) => {
|
|
|
+ return (
|
|
|
+ <div>
|
|
|
+ {
|
|
|
+ <Popconfirm
|
|
|
+ title="是否删除?"
|
|
|
+ onConfirm={() => {
|
|
|
+ this.confirmDelet(record.key);
|
|
|
+ }}
|
|
|
+ okText="删除"
|
|
|
+ cancelText="不删除"
|
|
|
+ >
|
|
|
+ <Button
|
|
|
+ style={{
|
|
|
+ marginRight: "10px",
|
|
|
+ color: "#ffffff",
|
|
|
+ background: "#f00",
|
|
|
+ border: "none",
|
|
|
+ display:
|
|
|
+ this.state.processStatus == 0 ? "block" : "none"
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </Button>
|
|
|
+ </Popconfirm>
|
|
|
+ }
|
|
|
+ {record.id ? (
|
|
|
+ ""
|
|
|
+ ) : (
|
|
|
+ <Button type="primary" onClick={this.contactSave}>
|
|
|
+ 保存
|
|
|
+ </Button>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ ContactsListsNew: [
|
|
|
+ {
|
|
|
title: "项目名称",
|
|
|
dataIndex: "commodityName",
|
|
|
key: "commodityName",
|
|
@@ -292,6 +389,9 @@ const NewService = Form.create()(
|
|
|
<Select
|
|
|
placeholder="请选择名称"
|
|
|
style={{ width: "150px" }}
|
|
|
+ disabled={
|
|
|
+ this.state.getLoad && record.sortName ? true : false
|
|
|
+ }
|
|
|
onChange={e => {
|
|
|
record.sortName = e;
|
|
|
dataArr.forEach(item => {
|
|
@@ -300,6 +400,8 @@ const NewService = Form.create()(
|
|
|
record.tid = item.id;
|
|
|
record.isSave = true;
|
|
|
record.sort = item.sort;
|
|
|
+ console.log(record);
|
|
|
+
|
|
|
cuiJieDian.forEach(item => {
|
|
|
if (item.value == record.sort) {
|
|
|
record.arr = item.children;
|
|
@@ -447,7 +549,7 @@ const NewService = Form.create()(
|
|
|
}
|
|
|
return (
|
|
|
<div>
|
|
|
- {this.state.processStatus == 0 ? (
|
|
|
+ {/* {this.state.processStatus == 0 ? (
|
|
|
<Input
|
|
|
value={record.money}
|
|
|
placeholder="请输入金额(必填项)"
|
|
@@ -461,7 +563,18 @@ const NewService = Form.create()(
|
|
|
/>
|
|
|
) : (
|
|
|
<span>{text}</span>
|
|
|
- )}
|
|
|
+ )} */}
|
|
|
+ <Input
|
|
|
+ value={record.money}
|
|
|
+ placeholder="请输入金额(必填项)"
|
|
|
+ key={record.id}
|
|
|
+ required="required"
|
|
|
+ onChange={e => {
|
|
|
+ record.money = e.target.value;
|
|
|
+ this.setState({ contactList: this.state.contactList });
|
|
|
+ }}
|
|
|
+ style={{ width: "120px" }}
|
|
|
+ />
|
|
|
</div>
|
|
|
);
|
|
|
}
|
|
@@ -514,7 +627,7 @@ const NewService = Form.create()(
|
|
|
<Popconfirm
|
|
|
title="是否删除?"
|
|
|
onConfirm={() => {
|
|
|
- this.confirmDelet(record);
|
|
|
+ this.confirmDeletNew(record);
|
|
|
}}
|
|
|
okText="删除"
|
|
|
cancelText="不删除"
|
|
@@ -537,7 +650,7 @@ const NewService = Form.create()(
|
|
|
<Button
|
|
|
type="primary"
|
|
|
onClick={e => {
|
|
|
- this.contactSave(record);
|
|
|
+ this.contactSaveNew(record);
|
|
|
}}
|
|
|
>
|
|
|
保存
|
|
@@ -643,6 +756,12 @@ const NewService = Form.create()(
|
|
|
}
|
|
|
} else {
|
|
|
}
|
|
|
+ for(let i = 0; i < this.state.contactListNew.length; i++) {
|
|
|
+ if(!this.state.contactListNew[i].id) {
|
|
|
+ message.warning("请保存催款节点")
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
@@ -812,29 +931,200 @@ const NewService = Form.create()(
|
|
|
}.bind(this)
|
|
|
);
|
|
|
},
|
|
|
- //查看催款节点
|
|
|
- loaduserss(record) {
|
|
|
- this.state.orderList = [];
|
|
|
- this.setState({
|
|
|
- orderNoss: record ? record.orderNo : this.props.datauser.orderNo
|
|
|
- });
|
|
|
+ // //查看催款节点
|
|
|
+ // loaduserss(record) {
|
|
|
+ // this.state.orderList = [];
|
|
|
+ // this.setState({
|
|
|
+ // orderNoss: record ? record.orderNo : this.props.datauser.orderNo
|
|
|
+ // });
|
|
|
+
|
|
|
+ // $.ajax({
|
|
|
+ // method: "get",
|
|
|
+ // dataType: "json",
|
|
|
+ // crossDomain: false,
|
|
|
+ // url: globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
|
|
|
+ // data: {
|
|
|
+ // orderNo: record ? record.orderNo : this.props.datauser.orderNo
|
|
|
+ // },
|
|
|
+ // success: function(data) {
|
|
|
+ // let theArr = [];
|
|
|
+ // let thisData = [];
|
|
|
+ // if (!thisData) {
|
|
|
+ // if (data.error && data.error.length) {
|
|
|
+ // message.warning(data.error[0].message);
|
|
|
+ // }
|
|
|
+ // thisData = {};
|
|
|
+ // } else {
|
|
|
+ // for (let i = 0; i < data.data.length; i++) {
|
|
|
+ // thisData = data.data[i];
|
|
|
+ // theArr.push({
|
|
|
+ // key: i,
|
|
|
+ // dunSubject: thisData.dunSubject
|
|
|
+ // ? thisData.dunSubject.toString()
|
|
|
+ // : "", //催款科目
|
|
|
+ // id: thisData.id, //节点Id
|
|
|
+ // money: thisData.money, //催款金额
|
|
|
+ // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
|
|
|
+ // commodityName: thisData.commodityName,
|
|
|
+ // projectType: thisData.projectType,
|
|
|
+ // dunTypeName: thisData.dunTypeName,
|
|
|
+ // status: thisData.status,
|
|
|
+ // waitDay: thisData.waitDay,
|
|
|
+ // effectiveCount: thisData.effectiveCount,
|
|
|
+ // startDate: thisData.startDate
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // this.setState({
|
|
|
+ // contactList: theArr
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }.bind(this)
|
|
|
+ // }).always(
|
|
|
+ // function() {
|
|
|
+ // this.setState({
|
|
|
+ // loading: false
|
|
|
+ // });
|
|
|
+ // }.bind(this)
|
|
|
+ // );
|
|
|
+ // },
|
|
|
+ // //催款节点保存
|
|
|
+ // contactSave(record) {
|
|
|
+ // if(!this.state.yearFlag) {
|
|
|
+ // if(!record.effectiveCount) {
|
|
|
+ // message.warning("请选择服务年限")
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // }else {
|
|
|
+ // record.effectiveCount = ""
|
|
|
+ // }
|
|
|
+ // if(record.money == "" ) {
|
|
|
+ // message.warning("请填写金额")
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // if(!record.dunType) {
|
|
|
+ // message.warning("请选择对应科目")
|
|
|
+ // return
|
|
|
+ // }
|
|
|
|
|
|
+ // // if (this.state.contactList) {
|
|
|
+ // // let cuiData = this.state.contactList;
|
|
|
+ // // for (var a = 0; a < cuiData.length; a++) {
|
|
|
+ // // if (cuiData[a].money == "") {
|
|
|
+ // // message.warning("催款金额不能为空");
|
|
|
+ // // this.refs.signFirstPayment.focus();
|
|
|
+ // // return false;
|
|
|
+ // // } else if (!cuiData[a].dunSubject) {
|
|
|
+ // // message.warning("催款科目不能为空");
|
|
|
+ // // this.refs.signFirstPayment.focus();
|
|
|
+ // // return false;
|
|
|
+ // // }
|
|
|
+ // // if (moneyVerify(cuiData[a].money)) {
|
|
|
+ // // return;
|
|
|
+ // // }
|
|
|
+ // // }
|
|
|
+ // // }
|
|
|
+ // this.setState({
|
|
|
+ // loading: true
|
|
|
+ // });
|
|
|
+ // $.ajax({
|
|
|
+ // url: globalConfig.context + "/api/admin/newOrderDun/createDun",
|
|
|
+ // method: "post",
|
|
|
+ // data: {
|
|
|
+ // orderNo: record.orderNo,
|
|
|
+ // tid: record.tid,
|
|
|
+ // projectType: record.sort,
|
|
|
+ // dunType: record.dunType,
|
|
|
+ // money: record.money,
|
|
|
+ // waitDay: record.waitDay,
|
|
|
+ // effectiveCount: record.effectiveCount
|
|
|
+ // }
|
|
|
+ // }).done(
|
|
|
+ // function(data) {
|
|
|
+ // this.setState({
|
|
|
+ // loading: false
|
|
|
+ // });
|
|
|
+ // if (!data.error.length) {
|
|
|
+ // message.success("保存成功!");
|
|
|
+ // this.setState({
|
|
|
+ // cuiFlag: false
|
|
|
+ // });
|
|
|
+ // this.jiedian();
|
|
|
+ // } else {
|
|
|
+ // message.warning(data.error[0].message);
|
|
|
+ // }
|
|
|
+ // }.bind(this)
|
|
|
+ // );
|
|
|
+ // },
|
|
|
+ // //点击新增催款节点
|
|
|
+ // addcontact() {
|
|
|
+ // this.state.contactList.push({
|
|
|
+ // key: this.state.contactList.length,
|
|
|
+ // money: "",
|
|
|
+ // dunSubject: undefined,
|
|
|
+ // orderNo: this.state.orderNoss,
|
|
|
+ // dunTarget: this.state.kehuId
|
|
|
+ // });
|
|
|
+ // this.setState({
|
|
|
+ // contactList: this.state.contactList,
|
|
|
+ // cuiFlag: true
|
|
|
+ // });
|
|
|
+ // },
|
|
|
+
|
|
|
+ // //删除收款节点
|
|
|
+ // confirmDelet(index) {
|
|
|
+ // if (index.id) {
|
|
|
+ // this.state.contactList.splice(index.key, 1);
|
|
|
+ // this.setState({
|
|
|
+ // contactList: this.state.contactList,
|
|
|
+ // cuiFlag: false
|
|
|
+ // });
|
|
|
+ // $.ajax({
|
|
|
+ // url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
|
|
|
+ // method: "post",
|
|
|
+ // data: {
|
|
|
+ // id: index.id,
|
|
|
+ // }
|
|
|
+ // }).done(
|
|
|
+ // function(data) {
|
|
|
+ // this.setState({
|
|
|
+ // loading: false
|
|
|
+ // });
|
|
|
+ // if (!data.error.length) {
|
|
|
+ // message.success("删除成功!");
|
|
|
+ // this.setState({
|
|
|
+ // cuiFlag: false
|
|
|
+ // });
|
|
|
+ // this.jiedian();
|
|
|
+ // } else {
|
|
|
+ // message.warning(data.error[0].message);
|
|
|
+ // }
|
|
|
+ // }.bind(this)
|
|
|
+ // );
|
|
|
+ // } else {
|
|
|
+ // this.state.contactList.splice(index.key, 1);
|
|
|
+ // this.setState({
|
|
|
+ // contactList: this.state.contactList,
|
|
|
+ // cuiFlag: false
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ //节点列表
|
|
|
+ jiedian(orderNos) {
|
|
|
$.ajax({
|
|
|
method: "get",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
- url: globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
|
|
|
+ url: globalConfig.context + "/api/admin/newOrder/selectOrderDun",
|
|
|
data: {
|
|
|
- orderNo: record ? record.orderNo : this.props.datauser.orderNo
|
|
|
+ orderNo: orderNos
|
|
|
},
|
|
|
success: function(data) {
|
|
|
let theArr = [];
|
|
|
let thisData = [];
|
|
|
- if (!thisData) {
|
|
|
+ if (data.error.length || data.data.list == "") {
|
|
|
if (data.error && data.error.length) {
|
|
|
message.warning(data.error[0].message);
|
|
|
}
|
|
|
- thisData = {};
|
|
|
} else {
|
|
|
for (let i = 0; i < data.data.length; i++) {
|
|
|
thisData = data.data[i];
|
|
@@ -845,17 +1135,65 @@ const NewService = Form.create()(
|
|
|
: "", //催款科目
|
|
|
id: thisData.id, //节点Id
|
|
|
money: thisData.money, //催款金额
|
|
|
- orderNo: record ? record.orderNo : this.props.datauser.orderNo,
|
|
|
+ dunStatus: thisData.dunStatus, //催款状态
|
|
|
+ orderNo: thisData.orderNo
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.setState({
|
|
|
+ contactList: theArr
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }.bind(this)
|
|
|
+ }).always(
|
|
|
+ function() {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
+ //查看催款节点
|
|
|
+ jiedianNew(orderNos) {
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url:
|
|
|
+ globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun",
|
|
|
+ data: {
|
|
|
+ orderNo: orderNos
|
|
|
+ },
|
|
|
+ success: function(data) {
|
|
|
+ let theArr = [];
|
|
|
+ let thisData = [];
|
|
|
+ if (!thisData) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ thisData = {};
|
|
|
+ } else {
|
|
|
+ let arr = data.data || []
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
+ thisData = arr[i];
|
|
|
+ theArr.push({
|
|
|
+ key: i,
|
|
|
+ dunSubject: thisData.dunSubject
|
|
|
+ ? thisData.dunSubject.toString()
|
|
|
+ : "", //催款科目
|
|
|
+ id: thisData.id, //节点Id
|
|
|
+ money: thisData.money, //催款金额
|
|
|
+ // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
|
|
|
commodityName: thisData.commodityName,
|
|
|
projectType: thisData.projectType,
|
|
|
dunTypeName: thisData.dunTypeName,
|
|
|
status: thisData.status,
|
|
|
waitDay: thisData.waitDay,
|
|
|
- effectiveCount: thisData.effectiveCount
|
|
|
+ effectiveCount: thisData.effectiveCount,
|
|
|
+ startDate: thisData.startDate
|
|
|
});
|
|
|
}
|
|
|
this.setState({
|
|
|
- contactList: theArr
|
|
|
+ contactListNew: theArr
|
|
|
});
|
|
|
}
|
|
|
}.bind(this)
|
|
@@ -869,41 +1207,53 @@ const NewService = Form.create()(
|
|
|
},
|
|
|
//催款节点保存
|
|
|
contactSave(record) {
|
|
|
- if(!this.state.yearFlag) {
|
|
|
- if(!record.effectiveCount) {
|
|
|
- message.warning("请选择服务年限")
|
|
|
- return
|
|
|
+ for (let i = 0; i < this.state.contactList.length; i++) {
|
|
|
+ if (moneyVerify(this.state.contactList[i].money)) {
|
|
|
+ return;
|
|
|
}
|
|
|
- }else {
|
|
|
- record.effectiveCount = ""
|
|
|
}
|
|
|
- if(record.money == "" ) {
|
|
|
- message.warning("请填写金额")
|
|
|
- return
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ });
|
|
|
+ $.ajax({
|
|
|
+ url: globalConfig.context + "/api/admin/newOrder/createOrderDun",
|
|
|
+ method: "post",
|
|
|
+ data: {
|
|
|
+ orderNo: this.state.orderNo,
|
|
|
+ orderDun: JSON.stringify(this.state.contactList)
|
|
|
+ }
|
|
|
+ }).done(
|
|
|
+ function(data) {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ if (!data.error.length) {
|
|
|
+ message.success("保存成功!");
|
|
|
+ this.jiedian(record.orderNo);
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
+ //催款节点保存
|
|
|
+ contactSaveNew(record) {
|
|
|
+ if (!this.state.yearFlag) {
|
|
|
+ if (!record.effectiveCount) {
|
|
|
+ message.warning("请选择服务年限");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ record.effectiveCount = "";
|
|
|
}
|
|
|
- if(!record.dunType) {
|
|
|
- message.warning("请选择对应科目")
|
|
|
- return
|
|
|
+ if (record.money == "") {
|
|
|
+ message.warning("请填写金额");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!record.dunType) {
|
|
|
+ message.warning("请选择对应科目");
|
|
|
+ return;
|
|
|
}
|
|
|
- console.log("保存",record);
|
|
|
-
|
|
|
- // if (this.state.contactList) {
|
|
|
- // let cuiData = this.state.contactList;
|
|
|
- // for (var a = 0; a < cuiData.length; a++) {
|
|
|
- // if (cuiData[a].money == "") {
|
|
|
- // message.warning("催款金额不能为空");
|
|
|
- // this.refs.signFirstPayment.focus();
|
|
|
- // return false;
|
|
|
- // } else if (!cuiData[a].dunSubject) {
|
|
|
- // message.warning("催款科目不能为空");
|
|
|
- // this.refs.signFirstPayment.focus();
|
|
|
- // return false;
|
|
|
- // }
|
|
|
- // if (moneyVerify(cuiData[a].money)) {
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
this.setState({
|
|
|
loading: true
|
|
|
});
|
|
@@ -929,7 +1279,7 @@ const NewService = Form.create()(
|
|
|
this.setState({
|
|
|
cuiFlag: false
|
|
|
});
|
|
|
- this.loaduserss();
|
|
|
+ this.jiedianNew(record.orderNo);
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|
|
|
}
|
|
@@ -942,28 +1292,50 @@ const NewService = Form.create()(
|
|
|
key: this.state.contactList.length,
|
|
|
money: "",
|
|
|
dunSubject: undefined,
|
|
|
- orderNo: this.state.orderNoss,
|
|
|
+ orderNo: this.state.orderNo,
|
|
|
dunTarget: this.state.kehuId
|
|
|
});
|
|
|
this.setState({
|
|
|
- contactList: this.state.contactList,
|
|
|
+ contactList: this.state.contactList
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //点击新增催款节点
|
|
|
+ addcontactNew() {
|
|
|
+ this.state.contactListNew.push({
|
|
|
+ key: this.state.contactListNew.length,
|
|
|
+ money: "",
|
|
|
+ dunSubject: undefined,
|
|
|
+ orderNo: this.state.orderNo,
|
|
|
+ dunTarget: this.state.kehuId
|
|
|
+ });
|
|
|
+ this.setState({
|
|
|
+ contactListNew: this.state.contactListNew,
|
|
|
cuiFlag: true
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
//删除收款节点
|
|
|
confirmDelet(index) {
|
|
|
+ this.state.contactList.splice(index, 1);
|
|
|
+ this.setState({
|
|
|
+ contactList: this.state.contactList
|
|
|
+ });
|
|
|
+ this.contactSave();
|
|
|
+ },
|
|
|
+ //删除收款节点
|
|
|
+ confirmDeletNew(index) {
|
|
|
+ console.log(index);
|
|
|
+
|
|
|
if (index.id) {
|
|
|
- this.state.contactList.splice(index.key, 1);
|
|
|
+ this.state.contactListNew.splice(index.key, 1);
|
|
|
this.setState({
|
|
|
- contactList: this.state.contactList,
|
|
|
+ contactListNew: this.state.contactListNew,
|
|
|
cuiFlag: false
|
|
|
});
|
|
|
$.ajax({
|
|
|
url: globalConfig.context + "/api/admin/newOrderDun/deleteDun",
|
|
|
method: "post",
|
|
|
data: {
|
|
|
- id: index.id,
|
|
|
+ id: index.id
|
|
|
}
|
|
|
}).done(
|
|
|
function(data) {
|
|
@@ -975,16 +1347,16 @@ const NewService = Form.create()(
|
|
|
this.setState({
|
|
|
cuiFlag: false
|
|
|
});
|
|
|
- this.loaduserss();
|
|
|
+ this.jiedianNew(this.state.orderNo);
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|
|
|
}
|
|
|
}.bind(this)
|
|
|
);
|
|
|
} else {
|
|
|
- this.state.contactList.splice(index.key, 1);
|
|
|
+ this.state.contactListNew.splice(index.key, 1);
|
|
|
this.setState({
|
|
|
- contactList: this.state.contactList,
|
|
|
+ contactListNew: this.state.contactListNew,
|
|
|
cuiFlag: false
|
|
|
});
|
|
|
}
|
|
@@ -1057,8 +1429,9 @@ const NewService = Form.create()(
|
|
|
this.setState({
|
|
|
loading: false
|
|
|
});
|
|
|
- this.loaduserss()
|
|
|
- this.loaduser()
|
|
|
+ this.jiedian(this.state.orderNo);
|
|
|
+ this.jiedianNew(this.state.orderNo);
|
|
|
+ this.loaduser();
|
|
|
this.loadData();
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|
|
@@ -1692,7 +2065,8 @@ const NewService = Form.create()(
|
|
|
}
|
|
|
if (nextProps.userDetaile && nextProps.showDesc) {
|
|
|
this.loaduser(nextProps.datauser);
|
|
|
- this.loaduserss(nextProps.datauser);
|
|
|
+ this.jiedian(nextProps.datauser.orderNo);
|
|
|
+ this.jiedianNew(nextProps.datauser.orderNo);
|
|
|
this.loadData(nextProps.datauser);
|
|
|
} else {
|
|
|
this.setState({
|
|
@@ -1754,6 +2128,7 @@ const NewService = Form.create()(
|
|
|
}
|
|
|
];
|
|
|
const dataSources = this.state.customerArr || [];
|
|
|
+ const cuiDataList = this.state.contactList || [];
|
|
|
let departmentArr = this.state.departmentArr || [];
|
|
|
const options = this.state.states
|
|
|
? dataSources.map(group => (
|
|
@@ -1766,7 +2141,6 @@ const NewService = Form.create()(
|
|
|
{group.bname}
|
|
|
</Select.Option>
|
|
|
));
|
|
|
-
|
|
|
|
|
|
return (
|
|
|
<div>
|
|
@@ -2457,38 +2831,102 @@ const NewService = Form.create()(
|
|
|
/>
|
|
|
</Spin>
|
|
|
</div>
|
|
|
- <div>
|
|
|
+ <div
|
|
|
+ style={{
|
|
|
+ display: cuiDataList.length ? "block" : "none"
|
|
|
+ }}
|
|
|
+ >
|
|
|
<span
|
|
|
style={{ marginLeft: "50px", fontSize: "20px" }}
|
|
|
>
|
|
|
- 催款节点
|
|
|
+ 旧催款节点
|
|
|
</span>
|
|
|
- {this.state.processStatus == 0 ? (
|
|
|
- <Button
|
|
|
- type="primary"
|
|
|
- onClick={this.addcontact}
|
|
|
- style={{
|
|
|
- float: "right",
|
|
|
- marginRight: "50px",
|
|
|
- marginBottom: "15px"
|
|
|
- }}
|
|
|
- disabled={this.state.cuiFlag ? true : false}
|
|
|
- >
|
|
|
- 添加催款节点
|
|
|
- </Button>
|
|
|
- ) : (
|
|
|
- ""
|
|
|
- )}
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ // onClick={this.addcontact}
|
|
|
+ disabled
|
|
|
+ onClick={e => {
|
|
|
+ cuiDataList.length
|
|
|
+ ? this.addcontact()
|
|
|
+ : this.addcontactNew();
|
|
|
+ }}
|
|
|
+ style={{
|
|
|
+ float: "right",
|
|
|
+ marginRight: "50px",
|
|
|
+ marginBottom: "15px",
|
|
|
+ display:
|
|
|
+ this.state.processStatus == 0
|
|
|
+ ? "block"
|
|
|
+ : "none"
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 添加催款节点
|
|
|
+ </Button>
|
|
|
</div>
|
|
|
- <div className="clearfix">
|
|
|
+ <div
|
|
|
+ className="clearfix"
|
|
|
+ style={{
|
|
|
+ display: cuiDataList.length ? "block" : "none"
|
|
|
+ }}
|
|
|
+ >
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
<Form layout="horizontal" id="demand-form">
|
|
|
<Table
|
|
|
pagination={false}
|
|
|
columns={this.state.ContactsLists}
|
|
|
dataSource={this.state.contactList}
|
|
|
- bordered
|
|
|
- size="small"
|
|
|
+ scroll={{ x: "max-content", y: 0 }}
|
|
|
+ />
|
|
|
+ <Col
|
|
|
+ span={24}
|
|
|
+ offset={9}
|
|
|
+ style={{ marginTop: "15px" }}
|
|
|
+ ></Col>
|
|
|
+ </Form>
|
|
|
+ </Spin>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span
|
|
|
+ style={{
|
|
|
+ marginLeft: "50px",
|
|
|
+ fontSize: "20px",
|
|
|
+ display: cuiDataList.length ? "none" : "block"
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 新催款节点
|
|
|
+ </span>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ disabled={cuiDataList.length ? true : false}
|
|
|
+ // onClick={this.addcontact}
|
|
|
+ onClick={e => {
|
|
|
+ this.addcontactNew();
|
|
|
+ }}
|
|
|
+ style={{
|
|
|
+ float: "right",
|
|
|
+ marginRight: "50px",
|
|
|
+ marginBottom: "15px",
|
|
|
+ display:
|
|
|
+ this.state.processStatus == 0
|
|
|
+ ? "block"
|
|
|
+ : "none"
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ 添加催款节点
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ className="clearfix"
|
|
|
+ style={{
|
|
|
+ display: cuiDataList.length ? "none" : "block"
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <Form layout="horizontal" id="demand-form">
|
|
|
+ <Table
|
|
|
+ pagination={false}
|
|
|
+ columns={this.state.ContactsListsNew}
|
|
|
+ dataSource={this.state.contactListNew}
|
|
|
scroll={{ x: "max-content", y: 0 }}
|
|
|
/>
|
|
|
<Col
|