|
@@ -13,7 +13,8 @@ import {
|
|
|
AutoComplete,
|
|
|
DatePicker,
|
|
|
Col,
|
|
|
- Tabs
|
|
|
+ Tabs,
|
|
|
+ Tag
|
|
|
} from "antd";
|
|
|
import $ from "jquery/src/ajax";
|
|
|
import "../userMangagement.less";
|
|
@@ -261,6 +262,33 @@ const NewService = Form.create()(
|
|
|
],
|
|
|
proColumns: [
|
|
|
{
|
|
|
+ title: "变更状态",
|
|
|
+ dataIndex: "type",
|
|
|
+ key: "type",
|
|
|
+ render: text => {
|
|
|
+ let str = "";
|
|
|
+ let color = "";
|
|
|
+ if (text == 1) {
|
|
|
+ str = "增";
|
|
|
+ color = "#87d068";
|
|
|
+ } else if (text == 2) {
|
|
|
+ str = "改";
|
|
|
+ color = "#108ee9";
|
|
|
+ } else if (text == 3) {
|
|
|
+ str = "删";
|
|
|
+ color = "#f50";
|
|
|
+ }
|
|
|
+ return (
|
|
|
+ <Tag
|
|
|
+ color={color}
|
|
|
+ style={{ display: text == 0 ? "none" : "inline-block" }}
|
|
|
+ >
|
|
|
+ {str}
|
|
|
+ </Tag>
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
title: "业务项目名称",
|
|
|
dataIndex: "commodityName",
|
|
|
key: "commodityName"
|
|
@@ -782,6 +810,33 @@ const NewService = Form.create()(
|
|
|
],
|
|
|
changeCuiList: [
|
|
|
{
|
|
|
+ title: "变更状态",
|
|
|
+ dataIndex: "type",
|
|
|
+ key: "type",
|
|
|
+ render: text => {
|
|
|
+ let str = "";
|
|
|
+ let color = "";
|
|
|
+ if (text == 1) {
|
|
|
+ str = "增";
|
|
|
+ color = "#87d068";
|
|
|
+ } else if (text == 2) {
|
|
|
+ str = "改";
|
|
|
+ color = "#108ee9";
|
|
|
+ } else if (text == 3) {
|
|
|
+ str = "删";
|
|
|
+ color = "#f50";
|
|
|
+ }
|
|
|
+ return (
|
|
|
+ <Tag
|
|
|
+ color={color}
|
|
|
+ style={{ display: text == 0 ? "none" : "inline-block" }}
|
|
|
+ >
|
|
|
+ {str}
|
|
|
+ </Tag>
|
|
|
+ );
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
title: "项目名称",
|
|
|
dataIndex: "commodityName",
|
|
|
key: "commodityName",
|
|
@@ -1937,7 +1992,7 @@ const NewService = Form.create()(
|
|
|
});
|
|
|
} else if (e == 3) {
|
|
|
this.setState({
|
|
|
- listFlag: true,
|
|
|
+ listFlag: false,
|
|
|
hetongFlag: false,
|
|
|
listCuiFlag: false,
|
|
|
tuiKuanFlag: false
|
|
@@ -1994,10 +2049,10 @@ const NewService = Form.create()(
|
|
|
},
|
|
|
success: function(data) {
|
|
|
if (data.data && data.data.length) {
|
|
|
- if(id) {
|
|
|
+ if (id) {
|
|
|
this.setState({
|
|
|
listCuiFlag: true
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
this.setState({
|
|
|
cuiDataSource: data.data
|
|
@@ -2017,10 +2072,10 @@ const NewService = Form.create()(
|
|
|
},
|
|
|
success: function(data) {
|
|
|
if (data.data && data.data.length) {
|
|
|
- if(id) {
|
|
|
+ if (id) {
|
|
|
this.setState({
|
|
|
listFlag: true
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
this.setState({
|
|
|
proDataSource: data.data
|
|
@@ -2466,10 +2521,9 @@ const NewService = Form.create()(
|
|
|
message.warning("当前订单流程不能发起变更!");
|
|
|
return false;
|
|
|
}
|
|
|
- if (this.state.changeAmount == "") {
|
|
|
+ if (this.state.changeAmount === "") {
|
|
|
message.warning("申请退款金额不能为空!");
|
|
|
// console.log(this.state.changeAmount);
|
|
|
-
|
|
|
return false;
|
|
|
}
|
|
|
if (this.state.remarksC.trim() == "") {
|
|
@@ -2557,12 +2611,15 @@ const NewService = Form.create()(
|
|
|
});
|
|
|
if (!data.error.length) {
|
|
|
message.success("发起变更草稿");
|
|
|
- this.setState({
|
|
|
- isCaoGao: true,
|
|
|
- loading: false,
|
|
|
- },() => {
|
|
|
- this.callback("2");
|
|
|
- });
|
|
|
+ this.setState(
|
|
|
+ {
|
|
|
+ isCaoGao: true,
|
|
|
+ loading: false
|
|
|
+ },
|
|
|
+ () => {
|
|
|
+ this.callback("2");
|
|
|
+ }
|
|
|
+ );
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|
|
|
}
|
|
@@ -2759,9 +2816,10 @@ const NewService = Form.create()(
|
|
|
method: "post",
|
|
|
dataType: "json",
|
|
|
crossDomain: false,
|
|
|
- url: globalConfig.context + "/api/admin/orderChange/deleteChangeTask",
|
|
|
+ url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
|
|
|
data: {
|
|
|
- id: record.id
|
|
|
+ id: record.id,
|
|
|
+ type: 3
|
|
|
},
|
|
|
success: function(data) {
|
|
|
let theArr = [];
|
|
@@ -2805,10 +2863,11 @@ const NewService = Form.create()(
|
|
|
boFlag: false
|
|
|
});
|
|
|
$.ajax({
|
|
|
- url: globalConfig.context + "/api/admin/orderChange/deleteChangeDun",
|
|
|
+ url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
|
|
|
method: "post",
|
|
|
data: {
|
|
|
- id: index.id
|
|
|
+ id: index.id,
|
|
|
+ type: 3,
|
|
|
}
|
|
|
}).done(
|
|
|
function(data) {
|
|
@@ -2820,7 +2879,7 @@ const NewService = Form.create()(
|
|
|
this.setState({
|
|
|
cuiFlag: false
|
|
|
});
|
|
|
- this.cuiList(this.state.orderNo);
|
|
|
+ this.cuiList();
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|
|
|
}
|
|
@@ -2902,7 +2961,7 @@ const NewService = Form.create()(
|
|
|
boFlag: false,
|
|
|
addFlag: false
|
|
|
});
|
|
|
- this.cuiList(record.orderNo);
|
|
|
+ this.cuiList();
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|
|
|
}
|
|
@@ -2934,7 +2993,7 @@ const NewService = Form.create()(
|
|
|
boFlag: false,
|
|
|
addFlag: false
|
|
|
});
|
|
|
- this.cuiList(record.orderNo);
|
|
|
+ this.cuiList();
|
|
|
} else {
|
|
|
message.warning(data.error[0].message);
|
|
|
}
|
|
@@ -2947,10 +3006,8 @@ const NewService = Form.create()(
|
|
|
message.warning("当前订单流程不能发起变更!");
|
|
|
return false;
|
|
|
}
|
|
|
- if (this.state.changeAmount == "") {
|
|
|
+ if (this.state.changeAmount === "") {
|
|
|
message.warning("申请退款金额不能为空!");
|
|
|
- // console.log(this.state.changeAmount);
|
|
|
-
|
|
|
return false;
|
|
|
}
|
|
|
if (this.state.remarksC.trim() == "") {
|
|
@@ -3010,6 +3067,82 @@ const NewService = Form.create()(
|
|
|
}.bind(this)
|
|
|
);
|
|
|
},
|
|
|
+ editCui(record) {
|
|
|
+ this.setState({
|
|
|
+ editCuiVisible: true,
|
|
|
+ editCuiMoney: record.money,
|
|
|
+ editCuiTid: record.tid,
|
|
|
+ editCuiId: record.id
|
|
|
+ });
|
|
|
+ console.log(record);
|
|
|
+ },
|
|
|
+ editPro(record) {
|
|
|
+ this.setState({
|
|
|
+ editProVisible: true,
|
|
|
+ editProMoney: record.commodityPrice,
|
|
|
+ editProTid: record.tid,
|
|
|
+ editProId: record.id
|
|
|
+ });
|
|
|
+ console.log(record);
|
|
|
+ },
|
|
|
+ submitEditCui() {
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ })
|
|
|
+ $.ajax({
|
|
|
+ url: globalConfig.context + "/api/admin/orderChange/updateChangeDun",
|
|
|
+ method: "post",
|
|
|
+ data: {
|
|
|
+ id: this.state.editCuiId,
|
|
|
+ type: this.state.editCuiTid ? 2 : 1,
|
|
|
+ money: this.state.editCuiMoney
|
|
|
+ }
|
|
|
+ }).done(
|
|
|
+ function(data) {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ if (!data.error.length) {
|
|
|
+ message.success("修改成功!");
|
|
|
+ this.cuiList();
|
|
|
+ this.setState({
|
|
|
+ editCuiVisible: false
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
+ submitEditPro() {
|
|
|
+ this.setState({
|
|
|
+ loading: true
|
|
|
+ })
|
|
|
+ $.ajax({
|
|
|
+ url: globalConfig.context + "/api/admin/orderChange/updateChangeTask",
|
|
|
+ method: "post",
|
|
|
+ data: {
|
|
|
+ id: this.state.editProId,
|
|
|
+ type: this.state.editProTid ? 2 : 1,
|
|
|
+ commodityPrice: this.state.editProMoney
|
|
|
+ }
|
|
|
+ }).done(
|
|
|
+ function(data) {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ if (!data.error.length) {
|
|
|
+ message.success("修改成功!");
|
|
|
+ this.proList();
|
|
|
+ this.setState({
|
|
|
+ editProVisible: false
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ }
|
|
|
+ }.bind(this)
|
|
|
+ );
|
|
|
+ },
|
|
|
render() {
|
|
|
const FormItem = Form.Item;
|
|
|
const { TabPane } = Tabs;
|
|
@@ -4007,7 +4140,7 @@ const NewService = Form.create()(
|
|
|
});
|
|
|
} else if (e == 3) {
|
|
|
this.setState({
|
|
|
- listFlag: true,
|
|
|
+ listFlag: false,
|
|
|
hetongFlag: false,
|
|
|
listCuiFlag: false,
|
|
|
tuiKuanFlag: false
|
|
@@ -4156,7 +4289,9 @@ const NewService = Form.create()(
|
|
|
columns={this.state.proColumns}
|
|
|
dataSource={this.state.proDataSource}
|
|
|
pagination={this.state.pagination}
|
|
|
- // onRowClick={this.tableRowClick}
|
|
|
+ onRowDoubleClick={
|
|
|
+ this.listFlag ? "" : this.editPro
|
|
|
+ }
|
|
|
bordered
|
|
|
size="small"
|
|
|
/>
|
|
@@ -4203,6 +4338,9 @@ const NewService = Form.create()(
|
|
|
columns={this.state.changeCuiList}
|
|
|
dataSource={this.state.cuiDataSource}
|
|
|
scroll={{ x: "max-content", y: 0 }}
|
|
|
+ onRowDoubleClick={
|
|
|
+ this.listCuiFlag ? "" : this.editCui
|
|
|
+ }
|
|
|
bordered
|
|
|
size="small"
|
|
|
/>
|
|
@@ -5065,6 +5203,64 @@ const NewService = Form.create()(
|
|
|
</Spin>
|
|
|
</Form>
|
|
|
</Modal>
|
|
|
+ <Modal
|
|
|
+ title="修改项目金额"
|
|
|
+ visible={this.state.editProVisible}
|
|
|
+ onOk={this.submitEditPro}
|
|
|
+ width={300}
|
|
|
+ okText={"保存"}
|
|
|
+ onCancel={() => {
|
|
|
+ this.setState({
|
|
|
+ editProVisible: false
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span: 6 }}
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
+ label="项目金额"
|
|
|
+ >
|
|
|
+ <Input
|
|
|
+ placeholder="请输入金额"
|
|
|
+ rows={4}
|
|
|
+ value={this.state.editProMoney}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({ editProMoney: e.target.value });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ </Modal>
|
|
|
+ <Modal
|
|
|
+ title="修改催款节点金额"
|
|
|
+ visible={this.state.editCuiVisible}
|
|
|
+ onOk={this.submitEditCui}
|
|
|
+ okText={"保存"}
|
|
|
+ width={300}
|
|
|
+ onCancel={e => {
|
|
|
+ this.setState({
|
|
|
+ editCuiVisible: false
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span: 6 }}
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
+ label="催款金额"
|
|
|
+ >
|
|
|
+ <Input
|
|
|
+ placeholder="请输入金额"
|
|
|
+ rows={4}
|
|
|
+ value={this.state.editCuiMoney}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({ editCuiMoney: e.target.value });
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ </Modal>
|
|
|
<OrderRiZi
|
|
|
dataSourcerizhi={this.state.dataSourcerizhi}
|
|
|
closeOrderLog={this.closeOrderLog}
|