|
@@ -4,7 +4,7 @@ import ajax from 'jquery/src/ajax/xhr.js';
|
|
|
import $ from 'jquery/src/ajax';
|
|
|
import '../userMangagement.less';
|
|
|
import {orderType} from '../../../../dataDic.js';
|
|
|
-import {getOrderType,getProjectState,getTaskStatus} from '../../../../tools.js';
|
|
|
+import {getOrderType,getProjectState,getTaskStatus,getOrderChannel,getOrderState,getPaymentState ,getApprovedState} from '../../../../tools.js';
|
|
|
|
|
|
const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
loadData(record) {
|
|
@@ -144,9 +144,112 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
+ contractList:[
|
|
|
+ {
|
|
|
+ title: '姓名',
|
|
|
+ dataIndex: 'name',
|
|
|
+ key: 'name'
|
|
|
+ }, {
|
|
|
+ title: '部门',
|
|
|
+ dataIndex: 'depatrment',
|
|
|
+ key: 'depatrment'
|
|
|
+ },{
|
|
|
+ title: '联系方式',
|
|
|
+ dataIndex: 'mobile',
|
|
|
+ key: 'mobile'
|
|
|
+ }, {
|
|
|
+ title: '职务',
|
|
|
+ dataIndex: 'position',
|
|
|
+ key: 'position'
|
|
|
+ },{
|
|
|
+ title: '微信',
|
|
|
+ dataIndex: 'wechat',
|
|
|
+ key: 'wechat'
|
|
|
+ },{
|
|
|
+ title: 'QQ',
|
|
|
+ dataIndex: 'qq',
|
|
|
+ key: 'qq'
|
|
|
+ },
|
|
|
+
|
|
|
+ ],
|
|
|
};
|
|
|
},
|
|
|
- //查看基本详情基本信息
|
|
|
+ seeOrder(){
|
|
|
+ this.seeOrderAjax();
|
|
|
+ this.setState({
|
|
|
+ seeState:true,
|
|
|
+ orderVisible:true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ seeContract(){
|
|
|
+ this.contract();
|
|
|
+ this.setState({
|
|
|
+ seeState:false,
|
|
|
+ orderVisible:true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ orderCancel(){
|
|
|
+ this.setState({
|
|
|
+ orderVisible:false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //查看联系人
|
|
|
+ contract(){
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + '/api/admin/customer/findAllContacts',
|
|
|
+ data: {
|
|
|
+ uid: this.state.buyerId
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ let thisData = data.data;
|
|
|
+ if (!thisData) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ thisData = {};
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ contractArr:thisData,
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ //查看订单
|
|
|
+ seeOrderAjax(){
|
|
|
+ $.ajax({
|
|
|
+ method: "get",
|
|
|
+ dataType: "json",
|
|
|
+ crossDomain: false,
|
|
|
+ url: globalConfig.context + '/api/admin/order/getServiceOrderDetail',
|
|
|
+ data: {
|
|
|
+ orderNo: this.state.orderNok
|
|
|
+ },
|
|
|
+ success: function (data) {
|
|
|
+ let thisData = data.data;
|
|
|
+ if (!thisData) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ message.warning(data.error[0].message);
|
|
|
+ };
|
|
|
+ thisData = {};
|
|
|
+ };
|
|
|
+ this.setState({
|
|
|
+ orderArr:thisData,
|
|
|
+ });
|
|
|
+ }.bind(this),
|
|
|
+ }).always(function () {
|
|
|
+ this.setState({
|
|
|
+ loading: false
|
|
|
+ });
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
+ //查看详情
|
|
|
loaduser(record){
|
|
|
if(record){
|
|
|
$.ajax({
|
|
@@ -166,10 +269,11 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
thisData = {};
|
|
|
};
|
|
|
this.setState({
|
|
|
+ buyerId:thisData.uid,
|
|
|
id:record.id,
|
|
|
+ orderNok:thisData.orderNo,
|
|
|
orderList:thisData,
|
|
|
technicianName:thisData.technicianName, //项目负责人
|
|
|
- mid:thisData.buyerId
|
|
|
});
|
|
|
}.bind(this),
|
|
|
}).always(function () {
|
|
@@ -674,6 +778,7 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
const hasSelected = this.state.selectedRowKey.length > 0;
|
|
|
const orderDetaiel=this.state.orderList || [];
|
|
|
const dataSources=this.state.customerArr || [];
|
|
|
+ const orderArr=this.state.orderArr ||[];
|
|
|
const options = this.state.states?dataSources.map((group,index) =>
|
|
|
<Option key={index} value={group.name}>{group.name}</Option>
|
|
|
):dataSources.map((group,index) =>
|
|
@@ -695,7 +800,7 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label="订单编号" >
|
|
|
<span>{orderDetaiel.orderNo}</span>
|
|
|
- <Button onClick={this.seeOrder} style={{float:'right',fontSize:'12px'}}>查看订单</Button>
|
|
|
+ {orderDetaiel.orderNo&&<Button onClick={this.seeOrder} style={{float:'right',fontSize:'12px'}}>查看订单</Button>}
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -706,7 +811,7 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
{...formItemLayout}
|
|
|
label="客户名称" >
|
|
|
<span>{orderDetaiel.buyerName}</span>
|
|
|
- <Button onClick={this.seeContract} style={{float:'right',fontSize:'12px'}}>查看联系人</Button>
|
|
|
+ {orderDetaiel.buyerName&&<Button onClick={this.seeContract} style={{float:'right',fontSize:'12px'}}>查看联系人</Button>}
|
|
|
</FormItem>
|
|
|
<FormItem className="half-item"
|
|
|
{...formItemLayout}
|
|
@@ -1019,8 +1124,8 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
</Spin>
|
|
|
</Form>
|
|
|
</Modal>
|
|
|
- {/*<Modal maskClosable={false} visible={this.state.distributionVisible}
|
|
|
- onOk={this.distributionOk} onCancel={this.distributionCancel}
|
|
|
+ <Modal maskClosable={false} visible={this.state.orderVisible}
|
|
|
+ onOk={this.orderCancel} onCancel={this.orderCancel}
|
|
|
width='800px'
|
|
|
title={this.state.seeState?'查看订单':'查看联系人'}
|
|
|
footer=''
|
|
@@ -1029,10 +1134,106 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
<div className="patent-table" style={{marginTop:'10px'}}>
|
|
|
<Spin spinning={this.state.loading}>
|
|
|
- {this.state.seeState?<Table columns={this.state. }
|
|
|
- dataSource={this.state.seeOrderArr}
|
|
|
- pagination={false}
|
|
|
- />:
|
|
|
+ {this.state.seeState?
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="订单编号" >
|
|
|
+ <span>{orderArr.orderNo}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="下单时间" >
|
|
|
+ <span>{orderArr.createTime}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="客户名称" >
|
|
|
+ <span>{orderArr.buyerName}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="订单类型" >
|
|
|
+ <span>{getOrderType(orderArr.orderType)}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="订单渠道" >
|
|
|
+ <span>{getOrderChannel(orderArr.orderChannel)}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="订单状态" >
|
|
|
+ <span>{getOrderState(orderArr.orderStatus)}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="已收款项" >
|
|
|
+ <span>{orderArr.actuallyTotalAmount}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="结算状态" >
|
|
|
+ <span>{getPaymentState(orderArr.liquidationStatus)}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="市价订单金额" >
|
|
|
+ <span>{orderArr.orderAmount}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="市价首款金额" >
|
|
|
+ <span>{orderArr.firstPayment}</span>
|
|
|
+ </FormItem>
|
|
|
+ <div className='clearfix'>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="实签订单金额" >
|
|
|
+ <span>{orderArr.signTotalAmount}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="实签首款金额" >
|
|
|
+ <span>{orderArr.signFirstPayment}</span>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem className="half-item"
|
|
|
+ {...formItemLayout}
|
|
|
+ label="特批立项" >
|
|
|
+ <span>{getApprovedState(orderArr.approval)}</span>
|
|
|
+ </FormItem>
|
|
|
+ <div className="clearfix">
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
+ wrapperCol={{ span: 18 }}
|
|
|
+ label="合同扫描件" >
|
|
|
+ <Upload className="demandDetailShow-upload"
|
|
|
+ listType="customer_sys_file"
|
|
|
+ fileList={this.state.orgCodeUrl}
|
|
|
+ onPreview={(file) => {
|
|
|
+ this.setState({
|
|
|
+ previewImage: file.url || file.thumbUrl,
|
|
|
+ previewVisible: true,
|
|
|
+ });
|
|
|
+ }} >
|
|
|
+ </Upload>
|
|
|
+ <Modal maskClosable={false} footer={null}
|
|
|
+ visible={this.state.previewVisible}
|
|
|
+ onCancel={() => { this.setState({ previewVisible: false }) }}>
|
|
|
+ <img alt="" style={{ width: '100%' }} src={this.state.previewImage || ''} />
|
|
|
+ </Modal>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ <div className='clearfix'>
|
|
|
+ <FormItem
|
|
|
+ labelCol={{ span: 4 }}
|
|
|
+ wrapperCol={{ span: 16 }}
|
|
|
+ label="订单留言" >
|
|
|
+ <span>{orderArr.orderRemarks}</span>
|
|
|
+ </FormItem>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>:
|
|
|
<Table columns={this.state.contractList}
|
|
|
dataSource={this.state.contractArr}
|
|
|
pagination={false}
|
|
@@ -1042,7 +1243,6 @@ const MySettlementDetaile = Form.create()(React.createClass({
|
|
|
</Spin>
|
|
|
</Form>
|
|
|
</Modal>
|
|
|
- */}
|
|
|
</div>
|
|
|
)
|
|
|
}
|