|
@@ -1,5 +1,23 @@
|
|
|
import React from 'react';
|
|
|
-import { Icon, Button, AutoComplete,Input, Select, Spin, Popconfirm, Table, message,DatePicker, Upload, Form ,Modal,Col,Tag, Tabs} from 'antd';
|
|
|
+import {
|
|
|
+ Icon,
|
|
|
+ Button,
|
|
|
+ AutoComplete,
|
|
|
+ Input,
|
|
|
+ Select,
|
|
|
+ Spin,
|
|
|
+ Popconfirm,
|
|
|
+ Table,
|
|
|
+ message,
|
|
|
+ DatePicker,
|
|
|
+ Upload,
|
|
|
+ Form,
|
|
|
+ Modal,
|
|
|
+ Col,
|
|
|
+ Tag,
|
|
|
+ Tabs,
|
|
|
+ Radio
|
|
|
+} from 'antd';
|
|
|
import $ from 'jquery/src/ajax';
|
|
|
import moment from 'moment';
|
|
|
import {boutique ,tepi,jiedian} from '@/dataDic.js';
|
|
@@ -91,24 +109,9 @@ const IntentionCustomer = Form.create()(
|
|
|
} else {
|
|
|
for (let i = 0; i < data.data.list.length; i++) {
|
|
|
let thisdata = data.data.list[i];
|
|
|
- theArr.push({
|
|
|
- key: i,
|
|
|
- id: thisdata.id, //用户ID
|
|
|
- orderNo: thisdata.orderNo, //订单编号
|
|
|
- totalAmount: thisdata.totalAmount + "", //签单金额
|
|
|
- processStatus: thisdata.processStatus, //流程状态
|
|
|
- liquidationStatus: thisdata.liquidationStatus, //结算状态
|
|
|
- approval: thisdata.approval, //特批状态
|
|
|
- signDate: thisdata.signDate, //签单时间
|
|
|
- userName: thisdata.userName, //客户名称
|
|
|
- salesmanName: thisdata.salesmanName, //营销员名称
|
|
|
- financeName: thisdata.financeName, //财务名称
|
|
|
- createDate: thisdata.createDate, //下单时间
|
|
|
- initiateName: thisdata.initiateName, //驳回人
|
|
|
- reason: thisdata.reason, //驳回信息
|
|
|
- backDate: thisdata.backDate, //驳回日期
|
|
|
- backId: thisdata.backId, //驳回编号
|
|
|
- });
|
|
|
+ thisdata.key = i;
|
|
|
+ thisdata.totalAmount = thisdata.totalAmount + ""; //签单金额
|
|
|
+ theArr.push(thisdata);
|
|
|
}
|
|
|
this.state.pagination.total = data.data.totalCount;
|
|
|
this.state.pagination.current = data.data.pageNo;
|
|
@@ -874,6 +877,13 @@ const IntentionCustomer = Form.create()(
|
|
|
},
|
|
|
//点击打卡项目详情
|
|
|
tableRowClickX(record) {
|
|
|
+ if (record.type=='1'){
|
|
|
+ this.setState({
|
|
|
+ displayFees: "block",
|
|
|
+ costReduction: record.costReduction,
|
|
|
+ officialCost: record.officialCost,
|
|
|
+ });
|
|
|
+ }
|
|
|
this.setState({
|
|
|
jid: record.id, //项目ID
|
|
|
kid: record.commodityId, //商品ID
|
|
@@ -890,6 +900,9 @@ const IntentionCustomer = Form.create()(
|
|
|
nextCancel() {
|
|
|
this.setState({
|
|
|
addnextVisible: false,
|
|
|
+ displayFees: "none",
|
|
|
+ officialCost: "", //是否有官费
|
|
|
+ costReduction: "", //是否有费减
|
|
|
});
|
|
|
},
|
|
|
//订单详情
|
|
@@ -1005,22 +1018,8 @@ const IntentionCustomer = Form.create()(
|
|
|
} else {
|
|
|
for (let i = 0; i < data.data.length; i++) {
|
|
|
let thisdata = data.data[i];
|
|
|
- theArr.push({
|
|
|
- key: i,
|
|
|
- id: thisdata.id,
|
|
|
- orderNo: thisdata.orderNo, //订单编号
|
|
|
- commodityId: thisdata.commodityId, //项目ID
|
|
|
- commodityName: thisdata.commodityName, //项目名称
|
|
|
- cname: thisdata.cname, //项目类别
|
|
|
- commodityPrice: thisdata.commodityPrice, //项目价格
|
|
|
- commodityQuantity: thisdata.commodityQuantity, //项目数量
|
|
|
- main: thisdata.main, //是否为主要任务
|
|
|
- taskComment: thisdata.taskComment, //任务说明
|
|
|
- contacts: thisdata.contacts, //联系人
|
|
|
- contactsMobile: thisdata.contactsMobile, //联系人电话
|
|
|
- sort: thisdata.cSort,
|
|
|
- splitStatus: thisdata.splitStatus,
|
|
|
- });
|
|
|
+ thisdata.key = i;
|
|
|
+ theArr.push(thisdata);
|
|
|
}
|
|
|
}
|
|
|
this.setState({
|
|
@@ -1617,6 +1616,16 @@ const IntentionCustomer = Form.create()(
|
|
|
message.warning("服务名称不匹配!");
|
|
|
return false;
|
|
|
}
|
|
|
+ if (this.state.displayFees==='block') {
|
|
|
+ if(this.state.officialCost===''){
|
|
|
+ message.warning("请选择官费!");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (this.state.costReduction==='') {
|
|
|
+ message.warning("请选择费减!");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (moneyVerify(this.state.commodityPrice)) {
|
|
|
return;
|
|
|
}
|
|
@@ -1654,6 +1663,8 @@ const IntentionCustomer = Form.create()(
|
|
|
commodityPrice: this.state.commodityPrice, //签单总价
|
|
|
taskComment: this.state.taskComment, //服务说明
|
|
|
main: this.state.main, //是否为主要项目
|
|
|
+ officialCost: this.state.displayFees==='block' ? this.state.officialCost : '', //是否有官费
|
|
|
+ costReduction: this.state.displayFees==='block' ?this.state.costReduction : '', //是否有费减
|
|
|
},
|
|
|
}).done(
|
|
|
function (data) {
|
|
@@ -1759,6 +1770,9 @@ const IntentionCustomer = Form.create()(
|
|
|
commodityPrice: "",
|
|
|
addState: 1,
|
|
|
addnextVisible: true,
|
|
|
+ displayFees: "none",
|
|
|
+ officialCost: "",
|
|
|
+ costReduction: "",
|
|
|
});
|
|
|
},
|
|
|
//修改项目详情
|
|
@@ -1768,6 +1782,16 @@ const IntentionCustomer = Form.create()(
|
|
|
message.warning("金额不能为空!");
|
|
|
return false;
|
|
|
}
|
|
|
+ if (this.state.displayFees==='block') {
|
|
|
+ if(this.state.officialCost===''){
|
|
|
+ message.warning("请选择官费!");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (this.state.costReduction==='') {
|
|
|
+ message.warning("请选择费减!");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (!this.state.commodityQuantity) {
|
|
|
message.warning("数量不能为空!");
|
|
|
return false;
|
|
@@ -1790,6 +1814,8 @@ const IntentionCustomer = Form.create()(
|
|
|
commodityPrice: this.state.commodityPrice, //金额
|
|
|
commodityQuantity: this.state.commodityQuantity, //数量
|
|
|
taskComment: this.state.taskComment, //备注
|
|
|
+ officialCost: this.state.displayFees==='block' ? this.state.officialCost : '', //是否有官费
|
|
|
+ costReduction: this.state.displayFees==='block' ?this.state.costReduction : '', //是否有费减
|
|
|
},
|
|
|
}).done(
|
|
|
function (data) {
|
|
@@ -1901,6 +1927,15 @@ const IntentionCustomer = Form.create()(
|
|
|
kid = item;
|
|
|
}
|
|
|
});
|
|
|
+ if (kid.type == "1") {
|
|
|
+ this.setState({
|
|
|
+ displayFees: "block",
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.setState({
|
|
|
+ displayFees: "none",
|
|
|
+ });
|
|
|
+ }
|
|
|
this.setState({
|
|
|
commodityName: value,
|
|
|
gid: kid.id,
|
|
@@ -2587,7 +2622,7 @@ const IntentionCustomer = Form.create()(
|
|
|
</Spin>
|
|
|
</Form>
|
|
|
</Modal> : <div/>}
|
|
|
- <Modal
|
|
|
+ {this.state.addnextVisible ? <Modal
|
|
|
maskClosable={false}
|
|
|
visible={this.state.addnextVisible}
|
|
|
onOk={this.nextCancel}
|
|
@@ -2647,6 +2682,52 @@ const IntentionCustomer = Form.create()(
|
|
|
<span className="mandatory">*</span>
|
|
|
</FormItem>
|
|
|
<FormItem
|
|
|
+ className="half-item"
|
|
|
+ labelCol={{ span: 3 }}
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
+ label="官费:"
|
|
|
+ style={{
|
|
|
+ display: this.state.displayFees,
|
|
|
+ marginLeft: "55px",
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <span style={{ color: "red", marginRight: "27px" }}>
|
|
|
+ *
|
|
|
+ </span>
|
|
|
+ <Radio.Group
|
|
|
+ value={this.state.officialCost}
|
|
|
+ onChange={(e) => {
|
|
|
+ this.setState({ officialCost: e.target.value });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Radio value="1">含官费</Radio>
|
|
|
+ <Radio value="0">不含官费</Radio>
|
|
|
+ </Radio.Group>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem
|
|
|
+ className="half-item"
|
|
|
+ labelCol={{ span: 3 }}
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
+ label="费减:"
|
|
|
+ style={{
|
|
|
+ display: this.state.displayFees,
|
|
|
+ marginLeft: "55px",
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <span style={{ color: "red", marginRight: "27px" }}>
|
|
|
+ *
|
|
|
+ </span>
|
|
|
+ <Radio.Group
|
|
|
+ value={this.state.costReduction}
|
|
|
+ onChange={(e) => {
|
|
|
+ this.setState({ costReduction: e.target.value });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Radio value="1">有费减</Radio>
|
|
|
+ <Radio value="0">无费减</Radio>
|
|
|
+ </Radio.Group>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem
|
|
|
className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="实签价格(万元)"
|
|
@@ -2748,6 +2829,52 @@ const IntentionCustomer = Form.create()(
|
|
|
<span className="mandatory">*</span>
|
|
|
</FormItem>
|
|
|
<FormItem
|
|
|
+ className="half-item"
|
|
|
+ labelCol={{ span: 3 }}
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
+ label="官费:"
|
|
|
+ style={{
|
|
|
+ display: this.state.displayFees,
|
|
|
+ marginLeft: "55px",
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <span style={{ color: "red", marginRight: "27px" }}>
|
|
|
+ *
|
|
|
+ </span>
|
|
|
+ <Radio.Group
|
|
|
+ value={this.state.officialCost}
|
|
|
+ onChange={(e) => {
|
|
|
+ this.setState({ officialCost: e.target.value });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Radio value={1}>含官费</Radio>
|
|
|
+ <Radio value={0}>不含官费</Radio>
|
|
|
+ </Radio.Group>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem
|
|
|
+ className="half-item"
|
|
|
+ labelCol={{ span: 3 }}
|
|
|
+ wrapperCol={{ span: 14 }}
|
|
|
+ label="费减:"
|
|
|
+ style={{
|
|
|
+ display: this.state.displayFees,
|
|
|
+ marginLeft: "55px",
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <span style={{ color: "red", marginRight: "27px" }}>
|
|
|
+ *
|
|
|
+ </span>
|
|
|
+ <Radio.Group
|
|
|
+ value={this.state.costReduction}
|
|
|
+ onChange={(e) => {
|
|
|
+ this.setState({ costReduction: e.target.value });
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Radio value={1}>有费减</Radio>
|
|
|
+ <Radio value={0}>无费减</Radio>
|
|
|
+ </Radio.Group>
|
|
|
+ </FormItem>
|
|
|
+ <FormItem
|
|
|
className="half-item"
|
|
|
{...formItemLayout}
|
|
|
label="金额(万元)"
|
|
@@ -2824,7 +2951,7 @@ const IntentionCustomer = Form.create()(
|
|
|
)}
|
|
|
</Spin>
|
|
|
</Form>
|
|
|
- </Modal>
|
|
|
+ </Modal> : <div/>}
|
|
|
{/* <Modal
|
|
|
visible={this.state.rizhivisible}
|
|
|
className="admin-desc-content"
|