|
@@ -124,7 +124,7 @@ const contractChange = Form.create()(
|
|
|
RefundInvoice: [],
|
|
|
additionalOrderData: {},
|
|
|
paginations: false,
|
|
|
- activeKey: "1",
|
|
|
+ activeKey: "a",
|
|
|
confirmLoading: false,
|
|
|
aloading: false,
|
|
|
pagination: {
|
|
@@ -384,6 +384,7 @@ const contractChange = Form.create()(
|
|
|
this.xiangmu(record.orderNo);
|
|
|
this.jiedian(record.orderNo);
|
|
|
this.jiedianNew(record.orderNo);
|
|
|
+ this.createTabs();
|
|
|
}
|
|
|
);
|
|
|
},
|
|
@@ -521,6 +522,7 @@ const contractChange = Form.create()(
|
|
|
contractNo: thisdata.contractNo,
|
|
|
// arrears: thisdata.arrears,
|
|
|
orderData: thisdata,
|
|
|
+ isAddition: thisdata.additionalOrder ? true : false,
|
|
|
contractPictureUrl: thisdata.contractPictureUrl
|
|
|
? splitUrl(
|
|
|
thisdata.contractPictureUrl,
|
|
@@ -947,26 +949,40 @@ const contractChange = Form.create()(
|
|
|
},
|
|
|
|
|
|
callback(key) {
|
|
|
- this.setState({
|
|
|
- activeKey: key
|
|
|
- });
|
|
|
- if (key === "1") {
|
|
|
+ this.setState(
|
|
|
+ {
|
|
|
+ activeKey: key
|
|
|
+ },
|
|
|
+ () => {
|
|
|
+ if (key != "a" && key != "c" && key.length < 10) {
|
|
|
+ this.ChangeDetail(key);
|
|
|
+ this.loadDataChange(key);
|
|
|
+ this.getProceeds(key);
|
|
|
+ } else if (key != "a" && key != "c" && key.length > 10) {
|
|
|
+ this.primaryOrder(key);
|
|
|
+ this.xiangmu(key);
|
|
|
+ this.jiedian(key);
|
|
|
+ this.jiedianNew(key);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ );
|
|
|
+ if (key === "a") {
|
|
|
this.xiangmu(this.state.orderNo);
|
|
|
this.jiedian(this.state.orderNo);
|
|
|
this.jiedianNew(this.state.orderNo);
|
|
|
}
|
|
|
- if (key === "2") {
|
|
|
- this.ChangeDetail(this.state.id);
|
|
|
- this.loadDataChange();
|
|
|
- this.getProceeds(this.state.id);
|
|
|
- }
|
|
|
- if (key === "3") {
|
|
|
- this.primaryOrder(this.state.primaryOrderNo);
|
|
|
- this.xiangmu(this.state.primaryOrderNo);
|
|
|
- this.jiedian(this.state.primaryOrderNo);
|
|
|
- this.jiedianNew(this.state.primaryOrderNo);
|
|
|
- }
|
|
|
- if (key === "4") {
|
|
|
+ // if (key === "2") {
|
|
|
+ // this.ChangeDetail(this.state.id);
|
|
|
+ // this.loadDataChange();
|
|
|
+ // this.getProceeds(this.state.id);
|
|
|
+ // }
|
|
|
+ // if (key === "3") {
|
|
|
+ // this.primaryOrder(this.state.primaryOrderNo);
|
|
|
+ // this.xiangmu(this.state.primaryOrderNo);
|
|
|
+ // this.jiedian(this.state.primaryOrderNo);
|
|
|
+ // this.jiedianNew(this.state.primaryOrderNo);
|
|
|
+ // }
|
|
|
+ if (key === "c") {
|
|
|
this.additionalOrder(this.state.additionalOrder);
|
|
|
this.xiangmu(this.state.additionalOrder);
|
|
|
this.jiedian(this.state.additionalOrder);
|
|
@@ -982,7 +998,7 @@ const contractChange = Form.create()(
|
|
|
},
|
|
|
|
|
|
closeDesc(e, s) {
|
|
|
- this.state.activeKey = "1";
|
|
|
+ this.state.activeKey = "a";
|
|
|
this.state.userDetaile = false;
|
|
|
this.state.signBillVisible = false;
|
|
|
this.state.visible = e;
|
|
@@ -1122,7 +1138,7 @@ const contractChange = Form.create()(
|
|
|
visitCancel() {
|
|
|
this.setState(
|
|
|
{
|
|
|
- activeKey: "1"
|
|
|
+ activeKey: "a"
|
|
|
},
|
|
|
() => {
|
|
|
this.setState({
|
|
@@ -1212,7 +1228,26 @@ const contractChange = Form.create()(
|
|
|
: ""
|
|
|
}`;
|
|
|
},
|
|
|
+ createTabs() {
|
|
|
+ $.ajax({
|
|
|
+ url: globalConfig.context + "/api/admin/orderChange/getOrderChange",
|
|
|
+ method: "get",
|
|
|
+ data: {
|
|
|
+ orderNo: this.state.orderNo
|
|
|
+ },
|
|
|
+ success: data => {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ } else {
|
|
|
+ this.setState({
|
|
|
+ tabList: data.data
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
render() {
|
|
|
+ const tabList = this.state.tabList || [];
|
|
|
const formItemLayout = {
|
|
|
labelCol: { span: 8 },
|
|
|
wrapperCol: { span: 14 }
|
|
@@ -1306,6 +1341,7 @@ const contractChange = Form.create()(
|
|
|
pagination={this.state.pagination}
|
|
|
onRowClick={this.tableRowClick}
|
|
|
// scroll={{ y: 140 }}
|
|
|
+ size="small"
|
|
|
/>
|
|
|
</Spin>
|
|
|
</div>
|
|
@@ -1318,8 +1354,12 @@ const contractChange = Form.create()(
|
|
|
onOk={this.visitOk}
|
|
|
onCancel={this.visitCancel}
|
|
|
>
|
|
|
- <Tabs activeKey={this.state.activeKey} onChange={this.callback}>
|
|
|
- <TabPane tab="订单详情" key="1">
|
|
|
+ <Tabs
|
|
|
+ activeKey={this.state.activeKey}
|
|
|
+ onChange={this.callback}
|
|
|
+ type="card"
|
|
|
+ >
|
|
|
+ <TabPane tab="订单详情" key="a">
|
|
|
<Form
|
|
|
layout="horizontal"
|
|
|
onSubmit={this.handleSubmit}
|
|
@@ -1341,7 +1381,7 @@ const contractChange = Form.create()(
|
|
|
</Spin>
|
|
|
</Form>
|
|
|
</TabPane>
|
|
|
- <TabPane tab="合同变更记录" key="2">
|
|
|
+ {/* <TabPane tab="合同变更记录" key="2">
|
|
|
<ChangeDetail
|
|
|
data={this.state.contractData}
|
|
|
txt={this.state.processStateText}
|
|
@@ -1356,8 +1396,30 @@ const contractChange = Form.create()(
|
|
|
contactList={this.state.refundInvoice}
|
|
|
onCancel={this.visitCancel}
|
|
|
/>
|
|
|
- </TabPane>
|
|
|
- {this.state.status === 4 ? (
|
|
|
+ </TabPane> */}
|
|
|
+ {tabList.map((item, index, arr) => {
|
|
|
+ return (
|
|
|
+ <TabPane tab={"合同变更记录" + (index + 1)} key={item.id}>
|
|
|
+ <ChangeDetail
|
|
|
+ id={item.id}
|
|
|
+ money={index == arr.length - 1 ? this.state.orderData.totalAmount + "" : undefined}
|
|
|
+ data={this.state.contractData}
|
|
|
+ txt={this.state.processStateText}
|
|
|
+ pictureUrl={this.state.voucherUrl}
|
|
|
+ processState={this.props.processState}
|
|
|
+ loadData={this.callback}
|
|
|
+ reset={this.state.visible}
|
|
|
+ dataSource={this.state.dataProps}
|
|
|
+ proceedsData={this.state.proceedsData}
|
|
|
+ proceedsTotal={this.state.proTotal}
|
|
|
+ invoiceTotal={this.state.invTotal}
|
|
|
+ contactList={this.state.refundInvoice}
|
|
|
+ onCancel={this.visitCancel}
|
|
|
+ />
|
|
|
+ </TabPane>
|
|
|
+ );
|
|
|
+ })}
|
|
|
+ {/* {this.state.status === 4 ? (
|
|
|
<TabPane tab="原订单" key="3">
|
|
|
<Form
|
|
|
layout="horizontal"
|
|
@@ -1381,10 +1443,42 @@ const contractChange = Form.create()(
|
|
|
</TabPane>
|
|
|
) : (
|
|
|
""
|
|
|
- )}
|
|
|
- {this.state.status === 4 ? (
|
|
|
+ )} */}
|
|
|
+ {tabList.map((item, index) => {
|
|
|
+ if (item.usedOrder) {
|
|
|
+ return (
|
|
|
+ <TabPane
|
|
|
+ tab={"原订单" + (index + 1)}
|
|
|
+ key={item.usedOrder}
|
|
|
+ >
|
|
|
+ <Form
|
|
|
+ layout="horizontal"
|
|
|
+ onSubmit={this.handleSubmit}
|
|
|
+ id="demand-form"
|
|
|
+ style={{ paddingBottom: "40px" }}
|
|
|
+ >
|
|
|
+ <Spin spinning={this.state.loading}>
|
|
|
+ <OrderDetail
|
|
|
+ orderData={this.state.primaryOrderData}
|
|
|
+ getOrderLog={this.getOrderLog}
|
|
|
+ dataSourceX={this.state.dataSourceX}
|
|
|
+ contactList={this.state.contactList}
|
|
|
+ orderNo={this.state.primaryOrderNo}
|
|
|
+ totalCui={this.state.totalCui}
|
|
|
+ contactListNew={this.state.contactListNew}
|
|
|
+ isCaiWu={true}
|
|
|
+ />
|
|
|
+ </Spin>
|
|
|
+ </Form>
|
|
|
+ </TabPane>
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ })}
|
|
|
+ {this.state.status === 4 && this.state.isAddition ? (
|
|
|
this.state.type === 4 || this.state.type === 5 ? (
|
|
|
- <TabPane tab="附加订单" key="4">
|
|
|
+ <TabPane tab="附加订单" key="c">
|
|
|
<OrderDetail
|
|
|
orderData={this.state.additionalOrderData}
|
|
|
getOrderLog={this.getOrderLog}
|