import React from 'react'; import { Tooltip, Button, AutoComplete, Input, Select, Spin, Popconfirm, Table, message, DatePicker, Upload, Form, Modal, Col, Tag, Tabs, Radio, Checkbox, } from 'antd'; import $ from 'jquery/src/ajax'; import moment from 'moment'; import { boutique, tepi, jiedian, salesList, cuiJieDian } from '@/dataDic.js'; import { getLiquidationStatus, getProcessStatus, splitUrl, getCuikuan, moneyVerify, ShowModal, getProjectName, getApprovedType, compare, } from "@/tools.js"; import './customer.less'; import ShowModalDiv from "@/showModal.jsx" import OrderRiZi from "@/orderRiZi.jsx"; import ResolutionDetail from "@/resolutionDetail"; import ImgList from "../../../common/imgList"; import { ChooseList } from "./chooseList"; import OrderItemStatus from "../../../common/orderItemStatus"; import EnterpriseNameChange from "../../../common/enterpriseNameChange"; import OrderCoor from './changeComponent/orderCoor'; import ProjectOperation from "../../../common/projectOperation"; import NewAddProject from "../../../common/projectOperation/newAddProject" import NewEditProject from "../../../common/projectOperation/newEditProject" import ContentUrl from './contentUrl'; import UpdateSales from './updatesales';//修改销售类型 import PicturesWall from "./changeComponent/picturesWall.js"; import FlowChart from '../../../common/flowchart'; // 流程图 import Gxczx from '../../../common/orderDetail/gxczx' // 高新纯咨询合同说明详情 import Property from '../../../common/orderDetail/property' // 知识产权情况 const CheckboxGroup = Checkbox.Group; const IntentionCustomer = Form.create()( React.createClass({ loadData(pageNo) { this.setState({ visitModul: false, loading: true, ispage: pageNo, modalVisible: false, }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/newOrder/orderNewList", data: { pageNo: pageNo || 1, pageSize: this.state.pagination.pageSize, specially: 2, //审核列表 name: this.state.customerName, //名称 orderNo: this.state.orderNoSearch, //订单编号 starTime: this.state.releaseDate[0], //开始时间 endTime: this.state.releaseDate[1], //结束时间 }, success: function (data) { ShowModal(this); let theArr = []; if (data.error.length || data.data.list == "") { if (data.error && data.error.length) { message.warning(data.error[0].message); } } else { for (let i = 0; i < data.data.list.length; i++) { let thisdata = data.data.list[i]; thisdata.key = i; thisdata.totalAmount = thisdata.totalAmount + ""; //签单金额 theArr.push(thisdata); } this.state.pagination.total = data.data.totalCount; this.state.pagination.current = data.data.pageNo; } if (data.data && data.data.list && !data.data.list.length) { this.state.pagination.total = 0; } this.setState({ dataSource: theArr, pageNo: pageNo, pagination: this.state.pagination, selectedRowKeys: [], }); }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }, getInitialState() { return { approvaType: [], isShow: true, // 高新纯咨询合同默认填写 page: 1, orderNos: '', patentTypeList: [], releaseDate: [], orderStatus: 0, processStatus: 0, selectedRowKeys: [], orgCodeUrl: [], replenishUrl: [], contentUrl: [], customerArr: [], resVisible: false, pagination: { defaultCurrent: 1, defaultPageSize: 10, showQuickJumper: true, pageSize: 10, onChange: function (page) { this.loadData(page); }.bind(this), showTotal: function (total) { return "共" + total + "条数据"; }, }, columns: [ { title: "驳回编号", dataIndex: "backId", key: "backId", }, { title: "驳回日期", dataIndex: "backDate", key: "backDate", }, { title: "下单时间", dataIndex: "createDate", key: "createDate", }, { title: "订单编号", dataIndex: "orderNo", key: "orderNo", }, { title: "客户名称", dataIndex: "userName", key: "userName", render: (text) => { return (
{text}
) }, }, { title: "驳回人", dataIndex: "initiateName", key: "initiateName", }, { title: "驳回原因", dataIndex: "reason", key: "reason", render: (text) => { return text && text.length > 24 ? text.substr(0, 24) + "..." : text; }, }, ], columnsrizhi: [ { title: "流程", dataIndex: "processName", key: "processName", }, { title: "操作人", dataIndex: "adminName", key: "adminName", }, { title: "时间", dataIndex: "createDate", key: "createDate", }, ], data: [], dataSource: [], columnsX: [ { title: "业务项目名称", dataIndex: "commodityName", key: "commodityName", render: (text, record) => { return {text}{record.patentTypeName}{"-" + record.id} } }, { title: "项目类别", dataIndex: "cname", key: "cname", }, { title: "项目数量", dataIndex: "commodityQuantity", key: "commodityQuantity", render: (text, record) => { if (record.splitStatus == 1) { return ( {text}{" "} {/* { e.stopPropagation(); this.showRes(record); }} > 已拆 */} ); } else { return text; } }, }, { title: "金额(万元)", dataIndex: "commodityPrice", key: "commodityPrice", }, { title: "负责人", dataIndex: "contacts", key: "contacts", }, { title: "负责人电话", dataIndex: "contactsMobile", key: "contactsMobile", }, { title: "主要项目", dataIndex: "main", key: "main", render: (text) => { return text ? "是" : "否"; }, }, { title: "总年限", dataIndex: "yearSum", key: "yearSum", render: (text, record) => { return (
{["", "一年", "二年", "三年", "四年", "五年"][text]}
); } }, { title: "年限", dataIndex: "serviceLife", key: "serviceLife", render: (text, record) => { return (
{!!text && JSON.parse(text).toString()}
); } }, { title: "本次派单", dataIndex: "serviceYear", key: "serviceYear", render: (text, record) => { return (
{!text ? "" : text}
); } }, { title: "项目说明", dataIndex: "taskComment", key: "taskComment", render: (text) => { return (
{text}
) }, }, { title: "操作", dataIndex: "ABC", key: "ABC", width: 80, render: (text, record) => { return ( this.state.processStatus == 0 &&
{ this.delectRow(record); }} okText="是" cancelText="否" >
); }, }, ], dataSourceX: [], ContactsListsNew: [ { title: "项目名称", dataIndex: "commodityName", key: "commodityName", render: (text, record, index) => { let dataArr = this.state.dataSourceX || []; if (text) { return {text + "-" + record.tid}; } return ( ); }, }, { title: "项目分类", dataIndex: "projectType", key: "projectType", render: (text, record) => { if (text) { let arr = this.state.dataSourceX || []; let str = ""; for (let i = 0; i < arr.length; i++) { if (this.state.dataSourceX[i].sort == text) { str = this.state.dataSourceX[i].cname; return {str}; } } } if (this.state.getLoad) { return ( ); } else { return ( ); } }, }, { title: "催款科目", dataIndex: "dunTypeName", key: "dunTypeName", render: (text, record) => { if (text) { if (record.customizeName) { return record.customizeName; } return {text}; } if (this.state.getLoad) { let arr = record.arr || []; return (
{record.dunType == 0 ? ( { record.customizeName = e.target.value; this.setState({ contactList: this.state.contactList, }); }} style={{ width: "120px" }} /> ) : ( "" )}
); } else { return ( ); } }, }, { 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) { var str = ""; } else { var str = text + "天"; } return {str}; } return (
{record.dunType == 0 ? ( { record.customizeTimes = t; }} /> ) : ( )}
); }, }, { title: "金额(万元)", dataIndex: "money", key: "money", render: (text, record) => { if (record.dunTypeName) { if (record.appropriationRatio) { let percent = Number(record.appropriationRatio * 100).toFixed(2); percent += "%"; return {percent}(拨款比例); } else { return {text}; } } return (
{ record.money = e.target.value; this.setState({ contactList: this.state.contactList, }); }} style={{ width: "120px" }} />
); // if (this.state.boFlag) { // return ( //
//
// //
//
// { // record.money = e.target.value; // this.setState({ // contactList: this.state.contactList, // }); // }} // style={{ width: "120px" }} // /> //
//
// ); // } else { // return ( //
// { // record.money = e.target.value; // this.setState({ contactList: this.state.contactList }); // }} // style={{ width: "120px" }} // /> //
// ); // } }, }, { title: "服务年限", dataIndex: "startDate", key: "startDate", render: (text, record) => { if (record.dunTypeName) { return {text}; } return (
{ record.dunType != 0 ? :
}
); }, }, { title: "催款状态", dataIndex: "status", key: "status", render: (text) => { return {text == 1 ? "已启动" : "未启动"}; }, }, { title: "操作", dataIndex: "dels", key: "dels", render: (text, record, index) => { return (
{this.state.processStatus == 0 ? ( { this.confirmDeletNew(record); }} okText="删除" cancelText="不删除" > ) : ( "" )} {record.isSave ? ( ) : ( "" )}
); }, }, ], ContactsLists: [ { title: "催款科目", dataIndex: "dunSubject", key: "dunSubject", render: (text, record) => { return ( ); }, }, { title: "金额(万元)", dataIndex: "money", key: "money", render: (text, record) => { return ( { record.money = e.target.value; this.setState({ contactList: this.state.contactList }); }} style={{ width: "120px" }} /> ); }, }, { title: "催款状态", dataIndex: "dunStatus", key: "dunStatus", render: (text) => { return getCuikuan(text); }, }, { title: "操作", dataIndex: "dels", key: "dels", render: (text, record) => { return (
{ { this.confirmDelet(record.key); }} okText="删除" cancelText="不删除" > } {record.id ? ( "" ) : ( )}
); }, }, ], updatas: {}, }; }, //删除 delectRow(record) { this.setState({ loading: true, }); $.ajax({ method: "post", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/newOrder/deleteOrderTask", data: { id: record.id, }, }).done( function (data) { if (!data.error.length) { message.success("删除成功!"); this.setState({ loading: false, }); this.xiangmu(this.state.orderNo); this.jiedianNew(this.state.orderNo); this.jiedian(this.state.orderNo); this.loadData(this.state.pageNo); } else { message.warning(data.error[0].message); } }.bind(this) ); }, //页面加载函数 componentWillMount() { this.loadData(); }, //整行点击 tableRowClick(record) { this.setState({ visible: true, orderNos: record.orderNo, orderStatus: record.orderStatus, processStatus: record.orderStatus }); this.xiangqing(record.orderNo); this.xiangmu(record.orderNo); this.jiedian(record.orderNo); this.jiedianNew(record.orderNo); this.departmentList(); this.getpatentTypeList(); }, //点击打卡项目详情 tableRowClickX(record) { this.setState({ projectOperationVisible: true, dataInfor: record, }) }, //项目详情关闭 nextCancel() { this.setState({ projectOperationVisible: false, editProjectOperationVisible: false, gid: "", dataInfor: {}, }, () => { this.xiangmu(this.state.orderNo); }); }, //订单详情 xiangqing(orderNos) { $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/newOrder/getOrderNewDetail", data: { orderNo: orderNos, }, success: function (data) { if (data.error.length || data.data.list == "") { if (data.error && data.error.length) { message.warning(data.error[0].message); } } else { let thisdata = data.data; if (thisdata.approval == 0) { thisdata.approval = 0; } else { thisdata.approval = 1; } // if (thisdata.approval == 2) { // thisdata.approval = "特批通过"; // } else if (thisdata.approval == 3) { // thisdata.approval = "特批驳回"; // } this.setState({ id: thisdata.id, orderUid: thisdata.uid, kehuId: thisdata.buyerId, orderNo: thisdata.orderNo, //订单编号 contractNo: thisdata.contractNo, //合同编号 userName: thisdata.userName, //客户名称 signDate: thisdata.signDate, //签单时间 examineName: thisdata.examineName, processStatus: thisdata.processStatus, //流程状态 liquidationStatus: thisdata.liquidationStatus, //结算状态 contacts: thisdata.contacts, //企业联系人 contactMobile: thisdata.contactMobile, //联系人电话 legalPerson: thisdata.legalPerson, //法人 legalPersonTel: thisdata.legalPersonTel, //法人电话 firstAmount: thisdata.firstAmount + "", //签单金额 totalAmount: thisdata.totalAmount + "", //首付金额 settlementAmount: thisdata.settlementAmount, //已收款项 orderRemarks: thisdata.orderRemarks, //订单留言 orgCodeUrl: thisdata.contractPictureUrl ? splitUrl( thisdata.contractPictureUrl, ",", globalConfig.avatarHost + "/upload" ) : [], //图片地址 replenishUrl: thisdata.agreementUrl ? splitUrl( thisdata.agreementUrl, ",", globalConfig.avatarHost + "/upload" ) : [], //图片地址 contentUrl: thisdata.serviceContent ? splitUrl( thisdata.serviceContent, ",", globalConfig.avatarHost + "/upload" ) : [], //图片地址 salesmanName: thisdata.salesmanName, //营销员名称 salesmanMobile: thisdata.salesmanMobile, //营销员电话 oldSalesmanName: thisdata.oldSalesmanName, //营销员名称 oldSalesmanMobile: thisdata.oldSalesmanMobile, //营销员电话 financeName: thisdata.financeName, //财务名称 financeMobile: thisdata.financeMobile, //财务电话 nowFinance: thisdata.nowFinance, //财务名称 nowFinanceMobile: thisdata.nowFinanceMobile, //财务电话 initiateName: thisdata.initiateName, //驳回人 backDate: thisdata.backDate, //驳回时间 reason: thisdata.reason, //驳回原因 approval: thisdata.approval, //特批状态 organizationSearch: thisdata.orderDep, //approval:thisdata.approval==0?thisdata.approval.toString():thisdata.approval,//特批状态 outsource: thisdata.outsource == 0 ? "否" : "是", deleteSign: thisdata.deleteSign, updatas: { salesType: thisdata.salesType,//销售类型 userType: thisdata.userType,//客户所属类型 other: thisdata.other,//3渠道名 4,5描述 }, channelName: thisdata.salesType == "3" ? thisdata.other : "",//销售类型为渠道的时候给编辑出的渠道名称赋值 knowledgeServices: thisdata.knowledgeServices, //知识产权服务 auditServices: thisdata.auditServices, //审计服务 addDeductionServices: thisdata.addDeductionServices, //加计扣除服务 knowledgeOther: thisdata.knowledgeOther, //知识产权服务其他描述 auditOther: thisdata.auditOther, //审计服务其他描述 addDeductionOther: thisdata.addDeductionOther, //加计扣除服务其他描述 isShow: thisdata.knowledgeServices ? true : false, //无数据默认隐藏 patentStatus: thisdata.patentStatus, // 知识产权情况 isProperty: thisdata.patentStatus == null ? null : thisdata.patentStatus == 0 ? 1 : 2, approvaType: thisdata.type ? thisdata.type.split(",").map(Number) : [], // 特批类型 typeExplain: thisdata.typeExplain, }); } }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }, // 拆分详细 showRes(record) { this.setState({ resVisible: true, resRecord: record, }); }, resCancel() { this.setState({ resVisible: false, }); }, //项目列表 xiangmu(orderNos) { $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/newOrder/getOrderTask", data: { orderNo: orderNos, }, success: function (data) { let theArr = []; if (data.error.length || data.data.list == "") { if (data.error && data.error.length) { message.warning(data.error[0].message); } } else { for (let i = 0; i < data.data.length; i++) { let thisdata = data.data[i]; thisdata.key = i; thisdata.sort = thisdata.cSort; theArr.push(thisdata); } } this.setState({ dataSourceX: theArr, paginations: false, }); }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }, //节点列表 jiedian(orderNos) { $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/newOrder/selectOrderDun", data: { orderNo: orderNos, }, success: function (data) { let theArr = []; let thisData = []; if (data.error.length || data.data.list == "") { if (data.error && data.error.length) { message.warning(data.error[0].message); } } else { for (let i = 0; i < data.data.length; i++) { thisData = data.data[i]; theArr.push({ key: i, dunSubject: thisData.dunSubject ? thisData.dunSubject.toString() : "", //催款科目 id: thisData.id, //节点Id money: thisData.money, //催款金额 dunStatus: thisData.dunStatus, //催款状态 orderNo: thisData.orderNo, }); } this.setState({ contactList: theArr, }); } }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }, //查看催款节点 jiedianNew(orderNos) { $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/newOrderDun/selectListNewOrderDun", data: { orderNo: orderNos, }, success: function (data) { if (data.error && data.error.length) { message.warning(data.error[0].message); } else { let theArr = []; let thisData = []; let arr = data.data || []; let totalCui = 0; for (let i = 0; i < arr.length; i++) { thisData = arr[i]; totalCui += +thisData.money; theArr.push({ key: i, dunSubject: thisData.dunSubject ? thisData.dunSubject.toString() : "", //催款科目 id: thisData.id, //节点Id money: thisData.money, //催款金额 // orderNo: record ? record.orderNo : this.props.datauser.orderNo, commodityName: thisData.commodityName, projectType: thisData.projectType, dunTypeName: thisData.dunTypeName, status: thisData.status, waitDay: thisData.waitDay, effectiveCount: thisData.effectiveCount, startDate: thisData.startDate, dunType: thisData.dunType, appropriationRatio: thisData.appropriationRatio, customizeName: thisData.customizeName, customizeTimes: thisData.customizeTimes, tid: thisData.tid, }); } if (!totalCui) { totalCui = 0; } totalCui = (Math.round(totalCui * 1000000) / 1000000).toFixed(6); this.setState({ contactListNew: theArr, totalCui: parseFloat(totalCui), }); } }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }, //催款节点保存 contactSave() { for (let i = 0; i < this.state.contactList.length; i++) { if (moneyVerify(this.state.contactList[i].money)) { return; } } this.setState({ loading: true, }); $.ajax({ url: globalConfig.context + "/api/admin/newOrder/createOrderDun", method: "post", data: { orderNo: this.state.orderNo, orderDun: JSON.stringify(this.state.contactList), }, }).done( function (data) { this.setState({ loading: false, }); if (!data.error.length) { message.success("保存成功!"); this.jiedian(this.state.orderNo); } else { message.warning(data.error[0].message); } }.bind(this) ); }, //催款节点保存 contactSaveNew(record) { if (record.dunType == 0) { if (!record.customizeTimes) { message.warning("请输入自定义时间"); return; } else if (!record.customizeName) { message.warning("请输入自定义科目"); return; } } if ( this.state.approval == 1 && record.dunType == 1 && !record.waitDay ) { message.warning("请填写收款时间"); return } if (record.boStatus == "false") { record.boStatus = false; } else if (record.boStatus == "true") { record.boStatus = true; } if (!this.state.yearFlag) { if (!record.effectiveCount && !record.dunTypeCustom) { message.warning("请选择服务年限"); return; } } else { record.effectiveCount = ""; } if (record.money == "") { message.warning("请填写金额"); return; } if (record.boStatus) { if ( typeof +record.money == "number" && +record.money >= 0 && +record.money <= 1 ) { record.appropriationRatio = record.money; } else { message.warning("金额比例填写错误,比例范围0~1"); return; } } if (!record.dunType && record.dunType != 0) { message.warning("请选择对应科目"); return; } if (record.dunType != 1) { record.waitDay = ""; } this.setState({ loading: true, }); if (record.boStatus) { $.ajax({ url: globalConfig.context + "/api/admin/newOrderDun/createDun", method: "post", data: { orderNo: record.orderNo, tid: record.tid, projectType: record.sort, dunType: record.dunType, 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) { this.setState({ loading: false, }); if (!data.error.length) { message.success("保存成功!"); this.setState({ cuiFlag: false, boFlag: false, }); this.jiedianNew(record.orderNo); } else { message.warning(data.error[0].message); } }.bind(this) ); } else { $.ajax({ url: globalConfig.context + "/api/admin/newOrderDun/createDun", method: "post", data: { orderNo: record.orderNo, tid: record.tid, projectType: record.sort, dunType: record.dunType, 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) { this.setState({ loading: false, }); if (!data.error.length) { message.success("保存成功!"); this.setState({ cuiFlag: false, boFlag: false, }); this.jiedianNew(record.orderNo); } else { message.warning(data.error[0].message); } }.bind(this) ); } }, //点击新增催款节点 addcontact() { this.state.contactList.push({ key: this.state.contactList.length, money: "", dunSubject: undefined, orderNo: this.state.orderNo, dunTarget: this.state.kehuId, }); this.setState({ contactList: this.state.contactList, }); }, //点击新增催款节点 addcontactNew() { this.state.contactListNew.push({ key: this.state.contactListNew.length, money: "", dunSubject: undefined, orderNo: this.state.orderNo, dunTarget: this.state.kehuId, }); this.setState({ contactListNew: this.state.contactListNew, cuiFlag: true, }); }, //删除收款节点 confirmDelet(index) { this.state.contactList.splice(index, 1); this.setState({ contactList: this.state.contactList, }); this.contactSave(); }, //删除收款节点 confirmDeletNew(index) { if (index.id) { this.state.contactListNew.splice(index.key, 1); this.setState({ contactListNew: this.state.contactListNew, cuiFlag: false, addFlag: false, boFlag: false, }); $.ajax({ url: globalConfig.context + "/api/admin/newOrderDun/deleteDun", method: "post", data: { id: index.id, }, }).done( function (data) { this.setState({ loading: false, }); if (!data.error.length) { message.success("删除成功!"); this.setState({ cuiFlag: false, }); this.jiedianNew(this.state.orderNo); } else { message.warning(data.error[0].message); } }.bind(this) ); } else { this.state.contactListNew.splice(index.key, 1); this.setState({ contactListNew: this.state.contactListNew, cuiFlag: false, addFlag: false, boFlag: false, }); } }, //重新提交 examOk() { let theorgCodeUrl = []; if (this.state.orgCodeUrl.length) { let picArr = []; this.state.orgCodeUrl.map(function (item) { if ( item.response && item.response.data && item.response.data.length ) { picArr.push(item.response.data); } }); theorgCodeUrl = picArr.join(","); } let theReplenishUrl = []; if (this.state.replenishUrl.length) { let picArr = []; this.state.replenishUrl.map(function (item) { if ( item.response && item.response.data && item.response.data.length ) { picArr.push(item.response.data); } }); theReplenishUrl = picArr.join(","); } // 服务内容上传图片 let contentUrl = []; if (this.state.contentUrl.length) { let picArr = []; this.state.contentUrl.map(function (item) { if ( item.response && item.response.data && item.response.data.length ) { picArr.push(item.response.data); } }); contentUrl = picArr.join(","); } else { message.warning("请上传服务内容图片") return } if (moneyVerify(this.state.totalAmount)) { return; } if (moneyVerify(this.state.firstAmount)) { return; } if (!this.state.totalAmount) { message.warning("签单金额不能为空"); this.refs.signFirstPayment.focus(); return false; } if (!this.state.firstAmount) { message.warning("首付金额不能为空"); this.refs.signFirstPayment.focus(); return false; } if (!this.state.contacts) { message.warning("企业联系人不能为空"); return } if (!this.state.contactMobile) { message.warning("企业联系人电话不能为空"); return } var regeX1 = /^1[3456789]\d{9}$/; var regex2 = /^((0\d{2,3})-)?(\d{7,8})$/; if (regeX1.test(this.state.contactMobile) == false && regex2.test(this.state.contactMobile) == false) { message.warning("请输入正确的企业联系人电话"); return false; } if (this.state.isShow) { if (this.state.knowledgeServices == null || this.state.auditServices == null || this.state.addDeductionServices == null) { message.warn("请完善高新纯咨询合同说明!") return } } if (!this.state.isProperty) { message.warn("请完善知识产权情况!") return } if (this.state.isProperty == 2 && !this.state.patentStatus) { message.warn("请完善知识产权情况!") return } if (!this.state.orderRemarks) { message.warning("订单留言不能为空"); return false; } if (this.state.approval == 1) { if (this.state.approvaType && this.state.approvaType.length == 0) { message.warning("请勾选特批状态!"); return false; } if (this.state.approvaType.indexOf(0) !== -1 && !this.state.typeExplain) { message.warning("请填写特批其他说明!"); return false; } } // if (!theorgCodeUrl) { // message.warning("图片过大,上传失败"); // this.refs.signFirstPayment.focus(); // return false; // } // if ( // this.state.approval == "特批通过" || // this.state.approval == "特批驳回" // ) { // message.warning("特批状态不正确,请重新填写"); // return false; // } const arr = this.state.contactListNew || []; for (let i = 0; i < arr.length; i++) { if ( arr[i].dunType == 1 && arr[i].waitDay != null && this.state.approval == 0 ) { message.warning( "非特批存在填写催款节点首付时间的情况,请删除后重新填写保存" ); return false; } else if ( arr[i].dunType == 1 && arr[i].waitDay == null && this.state.approval == 1 ) { message.warning( "特批存在首付催款节点未填写时间的情况,请删除后重新填写保存" ); return false; } if (!this.state.contactListNew[i].id) { message.warning("请保存催款节点"); return false; } } if (this.state.updatas.salesType == null) { message.warning("请选择销售类型!"); return } this.setState({ flag: true, }); $.ajax({ method: "post", dataType: "json", crossDomain: false, // url: globalConfig.context + "/api/admin/newOrder/updateServiceOrderNew", url: globalConfig.context + "/api/admin/newOrder/submitOrder", data: { orderNo: this.state.orderNo, //订单编号 totalAmount: this.state.totalAmount, //总金额 firstAmount: this.state.firstAmount, //首付 isSubmit: 1, //保存草稿还是提交 signDate: this.state.signDate, //签单日期 contacts: this.state.contacts, //企业负责人 contactMobile: this.state.contactMobile, //负责人联系方式 legalPerson: this.state.legalPerson, //企业法人 legalPersonTel: this.state.legalPersonTel, //企业法人联系电话 approval: this.state.approval, //特批状态 contractNo: this.state.contractNo, //合同编号 orderRemarks: this.state.orderRemarks, //订单备注 contractPictureUrl: theorgCodeUrl.length ? theorgCodeUrl : "", agreementUrl: theReplenishUrl.length ? theReplenishUrl : "", serviceContent: contentUrl.length ? contentUrl : "", orderDep: this.state.organizationSearch, knowledgeServices: this.state.isShow ? this.state.knowledgeServices : undefined, //知识产权服务 auditServices: this.state.isShow ? this.state.auditServices : undefined, //审计服务 addDeductionServices: this.state.isShow ? this.state.addDeductionServices : undefined, //加计扣除服务 knowledgeOther: this.state.isShow ? this.state.knowledgeOther : undefined, //知识产权服务其他描述 auditOther: this.state.isShow ? this.state.auditOther : undefined, //审计服务其他描述 addDeductionOther: this.state.isShow ? this.state.addDeductionOther : undefined, //加计扣除服务其他描述 patentStatus: this.state.patentStatus, //知识产权情况 type: this.state.approvaType.sort(compare).toString(), // 特批类型 typeExplain: this.state.approvaType.indexOf(0) === -1 ? "" : this.state.typeExplain, // 其他备注 }, success: function (data) { if (data.error.length || data.data.list == "") { if (data.error && data.error.length) { message.warning(data.error[0].message); this.setState({ flag: false, }); } } else { message.success("该订单已重新提交~"); this.setState({ visible: false, flag: false, }); this.loadData(this.state.pageNo); } }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }, //订单作废 examOks() { this.setState({ flag: true, }); $.ajax({ method: "post", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/newOrder/deleteOrderNew", data: { orderNo: this.state.orderNo, //订单编号 }, success: function (data) { if (data.error.length || data.data.list == "") { if (data.error && data.error.length) { message.warning(data.error[0].message); } } else { message.success("该订单已作废~"); this.setState({ visible: false, flag: false, }); this.loadData(this.state.pageNo); } }.bind(this), }).always( function () { this.setState({ loading: false, flag: false, }); }.bind(this) ); }, departmentList() { this.setState({ loading: true, }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + "/api/admin/organization/selectSuperId", data: {}, success: function (data) { let thedata = data.data; let theArr = []; if (!thedata) { if (data.error && data.error.length) { message.warning(data.error[0].message); } thedata = {}; } else { thedata.map(function (item, index) { theArr.push({ key: index, name: item.name, id: item.id, depNo: item.depNo, }); }); } this.setState({ departmentArr: theArr, }); }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }, rizhi() { this.setState({ loading: true, }); $.ajax({ method: "get", dataType: "json", crossDomain: false, url: "/api/admin/newOrder/selectOrderLog", data: { orderNo: this.state.orderNo, }, success: function (data) { let theArr = []; let thisData = data.data; if (!thisData.length) { if (data.error && data.error.length) { message.warning(data.error[0].message); } thisData = {}; } else { for (let i = 0; i < data.data.length; i++) { let thisdata = data.data[i]; theArr.push({ processName: thisdata.processName, adminName: thisdata.adminName, createDate: thisdata.createDate, remarks: thisdata.remarks, }); } } this.setState({ dataSourcerizhi: theArr, }); }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }, //查看订单日志 getOrderLog() { this.setState({ rizhivisible: true, }); this.rizhi(); }, closeOrderLog() { this.setState({ rizhivisible: false, }); }, //点击签单 handleCancels() { this.setState({ isSubmit: 1, }); }, //点击签单 handleCancelq() { this.setState({ isSubmit: 0, }); }, resets() { this.state.orderNoSearch = ""; this.state.customerName = ""; this.state.releaseDate[0] = undefined; this.state.releaseDate[1] = undefined; this.loadData(); }, //点击添加项目明细 addDetailed() { const { dataSourceX = [] } = this.state this.setState({ projectOperationVisible: true, newData: dataSourceX, }); }, //搜索 search() { this.setState({ //signBillVisible:false }); this.loadData(); }, getOrgCodeUrl(e) { this.setState({ orgCodeUrl: e }); }, getReplenishUrl(e) { this.setState({ replenishUrl: e }); }, getContentUrl(e) { this.setState({ contentUrl: e }); }, //关闭详情 visitCancel() { this.setState({ visible: false, cuiFlag: false, addFlag: false, boFlag: false, }); this.loadData(this.state.pageNo); }, visitOk() { this.setState({ visible: false, }); this.resets(); }, //客户 selectAutoCUT(value) { let autoIds; let fwList = this.state.customerArr; fwList.map(function (item) { if (value == item.name) { autoIds = item.id; } }); this.setState({ customerName: value, autoId: autoIds, }); }, getpatentTypeList() { $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + '/api/admin/orderProject/getPatentType', success: function (data) { if (data.error.length === 0) { this.setState({ patentTypeList: data.data }) } else { message.warning(data.error[0].message); }; }.bind(this) }); }, //加载(自动补全) supervisor(e, state) { //客户名称与服务名称自动补全 let api = state ? "/api/admin/customer/getCustomerByName" : "/api/admin/order/getBusinessProjectByName"; $.ajax({ method: "get", dataType: "json", crossDomain: false, url: globalConfig.context + api, data: state ? { name: e, type: this.state.customType, } : { businessName: e, }, success: function (data) { let thedata = data.data; if (!thedata) { if (data.error && data.error.length) { message.warning(data.error[0].message); } thedata = {}; } this.setState({ states: state, customerArr: thedata, }); }.bind(this), }).always( function () { this.setState({ loading: false, }); }.bind(this) ); }, //上级主管输入框失去焦点是判断客户是否存在 selectAuto(value) { let kid = []; let fwList = this.state.customerArr; fwList.map(function (item) { if (value == item.bname) { kid = item; } }); if (kid.type == "1") { this.setState({ displayFees: "block", }); } else { this.setState({ displayFees: "none", }); } this.setState({ commodityName: value, gid: kid.id, //commodityPrice:kid.price==0?kid.price.toString():kid.price, commodityFirstPayment: kid.firstPayment == 0 ? kid.firstPayment.toString() : kid.firstPayment, }); }, //服务值改变时请求客户名称 httpChange(e) { this.state.gid = ""; if (e.length >= 1) { this.supervisor(e, false); } this.setState({ commodityName: e, }); }, changeList(arr) { const newArr = []; this.state.columns.forEach(item => { arr.forEach(val => { if (val === item.title) { newArr.push(item); } }); }); this.setState({ changeList: newArr }); }, addRowColor(record) { if (!!record.splitList && record.splitList.length > 0) { return 'light' } else { return 'dark' } }, render() { const expandedRowRenderVip = (e) => { const data = e.splitList; let columns = []; if (data instanceof Array && data.length) { if (e.cSort == 6) { columns = [ { title: "负责人", dataIndex: "receiverName", key: "receiverName", }, { title: "负责人电话", dataIndex: "receiverMobile", key: "receiverMobile", }, { title: "项目状态", dataIndex: "projectStatus", key: "projectStatus", render: (text) => { return getProjectName(text); }, }, { title: "本次派单", dataIndex: "serviceYear", key: "serviceYear", }, { title: "项目说明", dataIndex: "taskComment", key: "taskComment", render: (text) => { return (
{text}
) }, }, ]; } else { columns = [ { title: "子项目名称", dataIndex: "taskName", key: "taskName" }, { title: "子项目数量", dataIndex: "commodityQuantity", key: "commodityQuantity" }, { title: "拆分操作人", dataIndex: "splitAname", key: "splitAname" }, { title: "项目负责人", dataIndex: "receiverName", key: "receiverName" }, { title: "拆分时间", dataIndex: "splitTimes", key: "splitTimes" } ] } return ( ); } else { columns = []; return (

{e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}

); } }; const formItemLayout = { labelCol: { span: 10 }, wrapperCol: { span: 14 }, }; const FormItem = Form.Item; const { RangePicker } = DatePicker; const rowSelection = { selectedRowKeys: this.state.selectedRowKeys, onChange: (selectedRowKeys, selectedRows) => { this.setState({ modalVisible: false, selectedRows: selectedRows.slice(-1), selectedRowKeys: selectedRowKeys.slice(-1), }); }, onSelect: (recordt) => { this.setState({ modalVisible: false, recordt: recordt.id, }); }, }; const cuiDataList = this.state.contactList || []; const dataSources = this.state.customerArr || []; let departmentArr = this.state.departmentArr || []; const options = this.state.states ? dataSources.map((group) => ( {group.name} )) : dataSources.map((group, index) => ( {group.bname} )); const { TabPane } = Tabs; let approvalOptions = [ { label: '无前期款', value: 1 }, { label: '暂无合同款', value: 2 }, { label: '含高风险条款', value: 3 }, { label: '新产品首单', value: 4 }, { label: '通过率低于80%', value: 5 }, { label: '3万以下会员', value: 6 }, { label: '认证首期5K以下', value: 7 }, { label: { this.setState({ typeExplain: e.target.value }) }} />, value: 0 }, ]; return (
{this.state.resVisible ? ( ) : ( "" )} { this.setState({ showModal: false }) }} />
驳回订单列表
{ this.setState({ orderNoSearch: e.target.value }); }} /> { this.setState({ customerName: e.target.value }); }} /> 下单时间 : { this.setState({ releaseDate: dataString }); }} />
{this.state.visible ?
{this.state.orderNo} {this.state.contractNo} {this.state.userName} {(["私有客户-", "签单客户-"][this.state.updatas.userType] || " ") + (salesList[this.state.updatas.salesType] || "")} {/* { this.state.updatas.other != null && this.state.updatas.other != "" && {"(" + this.state.updatas.other.toString().slice(0, 10) + (this.state.updatas.other.toString().length > 9 ? "...)" : ")")} } */} { let ups = this.state.updatas ups.salesType = e.salesType if (e.salesType == "3") { ups.channelId = e.channelId ups.other = e.other } else if (e.salesType == "4" || e.salesType == "5") { ups.other = e.other } this.setState({ updatas: ups }) } //this.xiangqing.bind(this, this.state.orderNo) } /> {getProcessStatus(this.state.processStatus, this.state.examineName, this.state.approval)} {getLiquidationStatus(this.state.liquidationStatus)} {this.state.settlementAmount} * 企业联系人 } > { this.setState({ contacts: e.target.value }); }} style={{ width: "240px" }} /> * 联系人电话 } > { this.setState({ contactMobile: e.target.value }); }} style={{ width: "240px" }} /> { this.setState({ legalPerson: e.target.value }); }} style={{ width: "240px" }} /> { this.setState({ legalPersonTel: e.target.value }); }} style={{ width: "240px" }} /> * 签单金额(万元) } > { this.setState({ totalAmount: e.target.value }); }} style={{ width: "240px" }} /> * 首付金额(万元) } > { this.setState({ firstAmount: e.target.value }); }} style={{ width: "240px" }} />
{ this.state.approval == 1 &&
{ this.setState({ approvaType: e }) }} />
}
{ }} value={ this.state.signDate ? moment(this.state.signDate) : null } onChange={(data, dataString) => { this.setState({ signDate: dataString }); }} /> {this.state.outsource}
* 合同扫描件 } >

图片建议:要清晰。

补充协议 } >

图片建议:要清晰。

{ this.setState({ knowledgeServices: e.knowledgeServices, knowledgeOther: e.knowledgeOther }) }} selaudit={e => { this.setState({ auditServices: e.auditServices, auditOther: e.auditOther }) }} seladdDeduction={e => { this.setState({ addDeductionServices: e.addDeductionServices, addDeductionOther: e.addDeductionOther }) }} onSwitch={e => { this.setState({ isShow: e }) }} /> {/* 服务内容 */} {/* */}
* 服务内容 } >

(请将合同中的服务内容,截图上传!含服务年限,时间节点等;)图片建议:要清晰。

{ this.setState({ isProperty: e, patentStatus: e == 1 && 0 }) }} patentStatus={this.state.patentStatus} setPatentS={e => { this.setState({ patentStatus: e }) }} /> * 订单留言 } > { this.setState({ orderRemarks: e.target.value }); }} />
{this.state.salesmanName} {this.state.salesmanMobile}
{this.state.nowFinance} {this.state.nowFinanceMobile}
{this.state.oldSalesmanName} {this.state.oldSalesmanMobile}
{this.state.financeName} {this.state.financeMobile}
{this.state.initiateName} {this.state.backDate}
{this.state.reason}
{/* 协单人员 */}
项目业务
旧催款节点
新催款节点 金额总计(万元): {this.state.totalCui}
{ // 新需求 除湖南和内蒙古外 不让其他省操作 (adminData.province == "21" || adminData.province == "11") && } { this.examOks() }} okText="确认" cancelText="取消" >
:
} {/*
*/} { // 添加项目 this.state.projectOperationVisible && 0 && this.state.processStatus !== 0} orderNo={this.state.orderNo} visible={this.state.projectOperationVisible} newData={this.state.newData} onCancel={this.nextCancel} /> } { // 编辑项目 this.state.editProjectOperationVisible && 0 && this.state.processStatus !== 0 } orderNo={this.state.orderNo} visible={this.state.editProjectOperationVisible} dataInfor={this.state.dataInfor} newData={this.state.newData} onCancel={this.nextCancel} /> } ); }, }) ); export default IntentionCustomer;