|
@@ -392,8 +392,6 @@ 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;
|
|
@@ -409,7 +407,6 @@ const NewService = Form.create()(
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
- console.log(e);
|
|
|
}}
|
|
|
>
|
|
|
{dataArr.map(item => {
|
|
@@ -471,8 +468,6 @@ const NewService = Form.create()(
|
|
|
}
|
|
|
if (this.state.getLoad) {
|
|
|
let arr = record.arr || [];
|
|
|
- console.log("arrrr", arr);
|
|
|
-
|
|
|
return (
|
|
|
<Select
|
|
|
style={{ width: "150px" }}
|
|
@@ -506,7 +501,6 @@ const NewService = Form.create()(
|
|
|
boFlag: false
|
|
|
});
|
|
|
}
|
|
|
- console.log(e);
|
|
|
}}
|
|
|
>
|
|
|
{arr.map(item => {
|
|
@@ -537,7 +531,9 @@ const NewService = Form.create()(
|
|
|
key: "waitDay",
|
|
|
render: (text, record) => {
|
|
|
if (record.dunTypeName) {
|
|
|
- if (!text) {
|
|
|
+ if (text == 0) {
|
|
|
+ var str = "当天";
|
|
|
+ } else if (!text) {
|
|
|
var str = "";
|
|
|
} else {
|
|
|
var str = text + "天";
|
|
@@ -554,9 +550,7 @@ const NewService = Form.create()(
|
|
|
: true
|
|
|
}
|
|
|
onChange={e => {
|
|
|
- console.log("ee", e);
|
|
|
record.waitDay = e;
|
|
|
- console.log("time", record);
|
|
|
}}
|
|
|
>
|
|
|
<Select.Option key={0}>当天</Select.Option>
|
|
@@ -607,7 +601,7 @@ const NewService = Form.create()(
|
|
|
<div style={{ float: "right" }}>
|
|
|
<Input
|
|
|
value={record.money}
|
|
|
- placeholder="请输入金额(必填项)"
|
|
|
+ placeholder="请根据左侧类型填写"
|
|
|
key={record.id}
|
|
|
required="required"
|
|
|
onChange={e => {
|
|
@@ -652,9 +646,9 @@ const NewService = Form.create()(
|
|
|
style={{ width: "150px" }}
|
|
|
disabled={this.state.yearFlag ? true : false}
|
|
|
onChange={e => {
|
|
|
- console.log("ee", e);
|
|
|
+
|
|
|
record.effectiveCount = e;
|
|
|
- console.log("year", record);
|
|
|
+
|
|
|
}}
|
|
|
>
|
|
|
{/* <Select.Option key={null}>无</Select.Option> */}
|
|
@@ -710,9 +704,6 @@ const NewService = Form.create()(
|
|
|
type="primary"
|
|
|
onClick={e => {
|
|
|
this.contactSaveNew(record);
|
|
|
- this.setState({
|
|
|
- addFlag: false
|
|
|
- });
|
|
|
}}
|
|
|
>
|
|
|
保存
|
|
@@ -822,17 +813,23 @@ const NewService = Form.create()(
|
|
|
for (let i = 0; i < arr.length; i++) {
|
|
|
if (
|
|
|
arr[i].dunType == 1 &&
|
|
|
- arr[i].waitDay &&
|
|
|
- this.state.approval == 0
|
|
|
+ arr[i].waitDay != null &&
|
|
|
+ this.state.approval == 0
|
|
|
) {
|
|
|
message.warning(
|
|
|
"非特批存在填写催款节点首付时间的情况,请删除后重新填写保存"
|
|
|
);
|
|
|
return false;
|
|
|
- }else if(arr[i].dunType == 1 && !arr[i].waitDay && this.state.approval == 1) {
|
|
|
- message.warning("特批存在首付催款节点未填写时间的情况,请删除后重新填写保存")
|
|
|
- return false
|
|
|
- }
|
|
|
+ }else if (
|
|
|
+ arr[i].dunType == 1 &&
|
|
|
+ arr[i].waitDay == null &&
|
|
|
+ this.state.approval == 1
|
|
|
+ ) {
|
|
|
+ message.warning(
|
|
|
+ "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存"
|
|
|
+ );
|
|
|
+ return false;
|
|
|
+ }
|
|
|
if (!this.state.contactListNew[i].id && this.props.userDetaile) {
|
|
|
message.warning("请保存催款节点");
|
|
|
return false;
|
|
@@ -995,7 +992,8 @@ const NewService = Form.create()(
|
|
|
: thisData.approval,
|
|
|
organizationSearch: thisData.orderDep,
|
|
|
depName: thisData.depName,
|
|
|
- status: thisData.status
|
|
|
+ status: thisData.status,
|
|
|
+ outsource: thisData.outsource
|
|
|
});
|
|
|
// console.log("kkkk",this.state.processStatus);
|
|
|
}.bind(this)
|
|
@@ -1240,17 +1238,16 @@ const NewService = Form.create()(
|
|
|
orderNo: orderNos
|
|
|
},
|
|
|
success: function(data) {
|
|
|
- let theArr = [];
|
|
|
- let thisData = [];
|
|
|
- if (!thisData) {
|
|
|
- if (data.error && data.error.length) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
message.warning(data.error[0].message);
|
|
|
- }
|
|
|
- thisData = {};
|
|
|
} else {
|
|
|
+ let theArr = [];
|
|
|
+ let thisData = [];
|
|
|
let arr = data.data || []
|
|
|
+ let totalCui = 0
|
|
|
for (let i = 0; i < arr.length; i++) {
|
|
|
thisData = arr[i];
|
|
|
+ totalCui += +thisData.money
|
|
|
theArr.push({
|
|
|
key: i,
|
|
|
dunSubject: thisData.dunSubject
|
|
@@ -1270,8 +1267,13 @@ const NewService = Form.create()(
|
|
|
appropriationRatio: thisData.appropriationRatio
|
|
|
});
|
|
|
}
|
|
|
+ if(!totalCui) {
|
|
|
+ totalCui = 0
|
|
|
+ }
|
|
|
+ totalCui = (Math.round(totalCui * 10000) / 10000).toFixed(4);
|
|
|
this.setState({
|
|
|
- contactListNew: theArr
|
|
|
+ contactListNew: theArr,
|
|
|
+ totalCui
|
|
|
});
|
|
|
}
|
|
|
}.bind(this)
|
|
@@ -1316,6 +1318,11 @@ const NewService = Form.create()(
|
|
|
},
|
|
|
//催款节点保存
|
|
|
contactSaveNew(record) {
|
|
|
+ if(record.boStatus == "false") {
|
|
|
+ record.boStatus = false
|
|
|
+ }else if(record.boStatus == "true") {
|
|
|
+ record.boStatus = true
|
|
|
+ }
|
|
|
if (!this.state.yearFlag) {
|
|
|
if (!record.effectiveCount) {
|
|
|
message.warning("请选择服务年限");
|
|
@@ -1368,7 +1375,8 @@ const NewService = Form.create()(
|
|
|
message.success("保存成功!");
|
|
|
this.setState({
|
|
|
cuiFlag: false,
|
|
|
- boFlag: false
|
|
|
+ boFlag: false,
|
|
|
+ addFlag: false
|
|
|
});
|
|
|
this.jiedianNew(record.orderNo);
|
|
|
} else {
|
|
@@ -1398,7 +1406,8 @@ const NewService = Form.create()(
|
|
|
message.success("保存成功!");
|
|
|
this.setState({
|
|
|
cuiFlag: false,
|
|
|
- boFlag: false
|
|
|
+ boFlag: false,
|
|
|
+ addFlag: false
|
|
|
});
|
|
|
this.jiedianNew(record.orderNo);
|
|
|
} else {
|
|
@@ -1739,7 +1748,7 @@ const NewService = Form.create()(
|
|
|
this.setState({
|
|
|
customerCuiArr: thedata
|
|
|
});
|
|
|
- console.log(thedata);
|
|
|
+
|
|
|
}.bind(this)
|
|
|
}).always(
|
|
|
function() {
|
|
@@ -2251,18 +2260,18 @@ const NewService = Form.create()(
|
|
|
// label: "首付金额(万元)",
|
|
|
// content: <span>{this.state.firstAmount}</span>
|
|
|
// },
|
|
|
- {
|
|
|
- label: "特批立项",
|
|
|
- content: <span>{getApprovedState(this.state.approval)}</span>
|
|
|
- },
|
|
|
- {
|
|
|
- label: "合同签订时间",
|
|
|
- content: <span>{this.state.signDate}</span>
|
|
|
- },
|
|
|
- {
|
|
|
- label: "订单部门",
|
|
|
- content: <span>{this.state.depName}</span>
|
|
|
- }
|
|
|
+ // {
|
|
|
+ // label: "特批立项",
|
|
|
+ // content: <span>{getApprovedState(this.state.approval)}</span>
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: "合同签订时间",
|
|
|
+ // content: <span>{this.state.signDate}</span>
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: "订单部门",
|
|
|
+ // content: <span>{this.state.depName}</span>
|
|
|
+ // }
|
|
|
];
|
|
|
const dataSources = this.state.customerArr || [];
|
|
|
const cuiDataList = this.state.contactList || [];
|
|
@@ -2533,6 +2542,13 @@ const NewService = Form.create()(
|
|
|
>
|
|
|
<span>{this.state.depName}</span>
|
|
|
</FormItem>
|
|
|
+ <FormItem
|
|
|
+ className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="是否外包"
|
|
|
+ >
|
|
|
+ <span>{this.state.outsource == 0 ? "否" : "是"}</span>
|
|
|
+ </FormItem>
|
|
|
</div>
|
|
|
)}
|
|
|
</div>
|
|
@@ -3040,6 +3056,7 @@ const NewService = Form.create()(
|
|
|
>
|
|
|
新催款节点
|
|
|
</span>
|
|
|
+ <span style={{ display: "inline-block", marginLeft: 10, color: "red" }}>金额总计(万元): {this.state.totalCui}</span>
|
|
|
<Button
|
|
|
type="primary"
|
|
|
disabled={this.state.addFlag ? true : false}
|