|
@@ -143,6 +143,7 @@ const Addorders = Form.create()(
|
|
|
visible: false,
|
|
|
resVisible: false,
|
|
|
orgCodeUrl: [],
|
|
|
+ replenishUrl: [],
|
|
|
voucherUrl: [],
|
|
|
customerArr: [],
|
|
|
mark: false,
|
|
@@ -482,54 +483,82 @@ const Addorders = Form.create()(
|
|
|
key: "dunTypeName",
|
|
|
render: (text, record) => {
|
|
|
if (text) {
|
|
|
+ if (record.customizeName) {
|
|
|
+ return text + record.customizeName;
|
|
|
+ }
|
|
|
return <span>{text}</span>;
|
|
|
}
|
|
|
if (this.state.getLoad) {
|
|
|
let arr = record.arr || [];
|
|
|
return (
|
|
|
- <Select
|
|
|
- style={{ width: "150px" }}
|
|
|
- placeholder="请选择分类"
|
|
|
- onChange={(e) => {
|
|
|
- record.dunType = e;
|
|
|
- if (e != 1) {
|
|
|
- this.setState({
|
|
|
- timeFlag: true,
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.setState({
|
|
|
- timeFlag: false,
|
|
|
- });
|
|
|
- }
|
|
|
- if (e == 1 && record.sort == 6) {
|
|
|
- this.setState({
|
|
|
- yearFlag: true,
|
|
|
- });
|
|
|
- } else if (e != 1 && record.sort == 6) {
|
|
|
- this.setState({
|
|
|
- yearFlag: false,
|
|
|
- });
|
|
|
- }
|
|
|
- if (record.sort == 3 && e == 3) {
|
|
|
- this.setState({
|
|
|
- boFlag: true,
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.setState({
|
|
|
- boFlag: false,
|
|
|
- });
|
|
|
- }
|
|
|
- }}
|
|
|
- >
|
|
|
- {arr.map((item) => {
|
|
|
- record;
|
|
|
- return (
|
|
|
- <Select.Option key={item.value} value={item.value}>
|
|
|
- {item.key}
|
|
|
- </Select.Option>
|
|
|
- );
|
|
|
- })}
|
|
|
- </Select>
|
|
|
+ <div>
|
|
|
+ <Select
|
|
|
+ style={{ width: "150px", marginRight: 5 }}
|
|
|
+ placeholder="请选择分类"
|
|
|
+ onChange={(e) => {
|
|
|
+ record.dunType = e;
|
|
|
+ if (record.dunType == 0) {
|
|
|
+ record.customizeTimes = "";
|
|
|
+ record.customizeName = "";
|
|
|
+ }
|
|
|
+ if (e != 1) {
|
|
|
+ this.setState({
|
|
|
+ timeFlag: true,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.setState({
|
|
|
+ timeFlag: false,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (e == 1 && record.sort == 6) {
|
|
|
+ this.setState({
|
|
|
+ yearFlag: true,
|
|
|
+ });
|
|
|
+ } else if (e != 1 && record.sort == 6) {
|
|
|
+ this.setState({
|
|
|
+ yearFlag: false,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (record.sort == 3 && e == 3) {
|
|
|
+ this.setState({
|
|
|
+ boFlag: true,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.setState({
|
|
|
+ boFlag: false,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {arr.map((item) => {
|
|
|
+ record;
|
|
|
+ return (
|
|
|
+ <Select.Option key={item.value} value={item.value}>
|
|
|
+ {item.key}
|
|
|
+ </Select.Option>
|
|
|
+ );
|
|
|
+ })}
|
|
|
+ <Select.Option key={0} value={0}>
|
|
|
+ 自定义
|
|
|
+ </Select.Option>
|
|
|
+ </Select>
|
|
|
+ {record.dunType == 0 ? (
|
|
|
+ <Input
|
|
|
+ value={record.customizeName}
|
|
|
+ placeholder="请输入自定义名称"
|
|
|
+ required="required"
|
|
|
+ onChange={(e) => {
|
|
|
+ record.customizeName = e.target.value;
|
|
|
+ this.setState({
|
|
|
+ contactList: this.state.contactList,
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ style={{ width: "120px" }}
|
|
|
+ />
|
|
|
+ ) : (
|
|
|
+ ""
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
);
|
|
|
} else {
|
|
|
return (
|
|
@@ -544,11 +573,14 @@ const Addorders = Form.create()(
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- title: "首付时间(特批需选择时间)",
|
|
|
+ title: "收款时间(特批需选择时间)",
|
|
|
dataIndex: "waitDay",
|
|
|
key: "waitDay",
|
|
|
render: (text, record) => {
|
|
|
if (record.dunTypeName) {
|
|
|
+ if (record.customizeTimes) {
|
|
|
+ return record.customizeTimes;
|
|
|
+ }
|
|
|
if (text == 0) {
|
|
|
var str = "当天";
|
|
|
} else if (!text) {
|
|
@@ -559,24 +591,42 @@ const Addorders = Form.create()(
|
|
|
return <span>{str}</span>;
|
|
|
}
|
|
|
return (
|
|
|
- <Select
|
|
|
- placeholder="请选择时间"
|
|
|
- style={{ width: "150px" }}
|
|
|
- disabled={
|
|
|
- this.state.approval != 0 && !this.state.timeFlag
|
|
|
- ? false
|
|
|
- : true
|
|
|
- }
|
|
|
- onChange={(e) => {
|
|
|
- record.waitDay = e;
|
|
|
- }}
|
|
|
- >
|
|
|
- <Select.Option key={0}>当天</Select.Option>
|
|
|
- <Select.Option key={3}>3天</Select.Option>
|
|
|
- <Select.Option key={5}>5天</Select.Option>
|
|
|
- <Select.Option key={7}>7天</Select.Option>
|
|
|
- <Select.Option key={15}>15天</Select.Option>
|
|
|
- </Select>
|
|
|
+ <div>
|
|
|
+ {record.dunType == 0 ? (
|
|
|
+ <DatePicker
|
|
|
+ style={{ width: 150 }}
|
|
|
+ disabledDate={(e) => {
|
|
|
+ let time = moment(e).valueOf();
|
|
|
+ let today = Date.parse(new Date());
|
|
|
+ if (time <= today) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ onChange={(e, t) => {
|
|
|
+ record.customizeTimes = t;
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ ) : (
|
|
|
+ <Select
|
|
|
+ placeholder="请选择时间"
|
|
|
+ style={{ width: "160px" }}
|
|
|
+ disabled={
|
|
|
+ this.state.approval != 0 && !this.state.timeFlag
|
|
|
+ ? false
|
|
|
+ : true
|
|
|
+ }
|
|
|
+ onChange={(e) => {
|
|
|
+ record.waitDay = e;
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Select.Option key={0}>当天</Select.Option>
|
|
|
+ <Select.Option key={3}>3天</Select.Option>
|
|
|
+ <Select.Option key={5}>5天</Select.Option>
|
|
|
+ <Select.Option key={7}>7天</Select.Option>
|
|
|
+ <Select.Option key={15}>15天</Select.Option>
|
|
|
+ </Select>
|
|
|
+ )}
|
|
|
+ </div>
|
|
|
);
|
|
|
},
|
|
|
},
|
|
@@ -1103,6 +1153,8 @@ const Addorders = Form.create()(
|
|
|
startDate: thisData.startDate,
|
|
|
dunType: thisData.dunType,
|
|
|
appropriationRatio: thisData.appropriationRatio,
|
|
|
+ customizeName: thisData.customizeName,
|
|
|
+ customizeTimes: thisData.customizeTimes,
|
|
|
});
|
|
|
}
|
|
|
if (!totalCui) {
|
|
@@ -1156,6 +1208,15 @@ const Addorders = Form.create()(
|
|
|
},
|
|
|
//催款节点保存
|
|
|
contactSaveNew(record) {
|
|
|
+ if (record.dunType == 0) {
|
|
|
+ if (!record.customizeTimes) {
|
|
|
+ message.warning("请输入自定义时间");
|
|
|
+ return;
|
|
|
+ } else if (!record.customizeName) {
|
|
|
+ message.warning("请输入自定义科目");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (record.boStatus == "false") {
|
|
|
record.boStatus = false;
|
|
|
} else if (record.boStatus == "true") {
|
|
@@ -1185,7 +1246,7 @@ const Addorders = Form.create()(
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- if (!record.dunType) {
|
|
|
+ if (!record.dunType && record.dunType != 0) {
|
|
|
message.warning("请选择对应科目");
|
|
|
return;
|
|
|
}
|
|
@@ -1207,6 +1268,10 @@ const Addorders = Form.create()(
|
|
|
appropriationRatio: record.appropriationRatio,
|
|
|
waitDay: record.waitDay,
|
|
|
effectiveCount: record.effectiveCount,
|
|
|
+ customizeTimes:
|
|
|
+ record.dunType == 0 ? record.customizeTimes : undefined,
|
|
|
+ customizeName:
|
|
|
+ record.dunType == 0 ? record.customizeName : undefined,
|
|
|
},
|
|
|
}).done(
|
|
|
function (data) {
|
|
@@ -1238,6 +1303,10 @@ const Addorders = Form.create()(
|
|
|
money: record.money,
|
|
|
waitDay: record.waitDay,
|
|
|
effectiveCount: record.effectiveCount,
|
|
|
+ customizeTimes:
|
|
|
+ record.dunType == 0 ? record.customizeTimes : undefined,
|
|
|
+ customizeName:
|
|
|
+ record.dunType == 0 ? record.customizeName : undefined,
|
|
|
},
|
|
|
}).done(
|
|
|
function (data) {
|
|
@@ -2453,7 +2522,7 @@ const Addorders = Form.create()(
|
|
|
wrapperCol={{ span: 18 }}
|
|
|
label={
|
|
|
<span>
|
|
|
- <strong style={{ color: "#f00" }}>*</strong>补充协议
|
|
|
+ 补充协议
|
|
|
</span>
|
|
|
}
|
|
|
>
|