123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227 |
- import React from "react";
- import $ from "jquery/src/ajax";
- import moment from "moment";
- import "./public.less";
- import {
- Form,
- Button,
- Input,
- Select,
- Spin,
- Table,
- message,
- Modal,
- Upload,
- DatePicker,
- Icon,
- Tabs,
- Popconfirm,
- Tag, Tooltip
- } from "antd";
- import {
- getProvinceA,
- getInvoiceStatus,
- getprovince,
- getStatus,
- getPeople,
- splitUrl,
- moneyVerify
- } from "@/tools";
- import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
- import "./huiKuan.less"
- import LogPopup from "../../../common/logPopup";
- import Cascaders from "../../../common/cascaders";
- const { RangePicker } = DatePicker;
- const FormItem = Form.Item;
- const { TextArea } = Input;
- const { TabPane } = Tabs;
- const HuiKuan = React.createClass({
- loadData(pageNo, pageSize) {
- this.state.data = [];
- this.setState({
- loading: true
- });
- $.ajax({
- method: "get",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/receivables/listReceivables",
- data: {
- pageNo: pageNo || 1,
- pageSize: pageSize || this.state.pagination.pageSize,
- // 订单状态 判断是否重复
- status: this.state.statusSearch,
- // 订单编号
- orderNo: this.state.orderNoSearch,
- // 合同编号
- contractNo: this.state.nameSearch,
- // 付款方
- corporateName: this.state.payFrom,
- // 营销员名字
- adminName: this.state.adminName,
- // 客户名称
- nickname: this.state.nickname,
- // 订单所属部门id
- orderDeps: this.state.orderDeps,
- // 管理员部门id
- adminDeps: this.state.adminDeps
- },
- success: function (data) {
- let theArr = [];
- if (!data.data || !data.data.pagination.list) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- } else {
- for (let i = 0; i < data.data.pagination.list.length; i++) {
- let thisdata = data.data.pagination.list[i];
- theArr.push({
- key: thisdata.id,
- status: {
- first: thisdata.status,
- second: thisdata.inptStatus
- },
- orderNo: thisdata.orderNo,
- contractNo: thisdata.contractNo,
- corporateName: thisdata.corporateName,
- nickname: thisdata.nickname,
- totalAmount: thisdata.totalAmount,
- depName: thisdata.depName,
- amount: thisdata.amount,
- receivablesTimes: thisdata.receivablesTimes,
- createTimes: thisdata.createTimes,
- remarks: thisdata.remarks,
- financialPayNo: thisdata.financialPayNo,
- settlementAmount: thisdata.settlementAmount
- });
- }
- }
- this.state.pagination.current = data.data.pagination.pageNo;
- this.state.pagination.total = data.data.pagination.totalCount;
- if (
- data.data &&
- data.data.pagination.list &&
- !data.data.pagination.list.length
- ) {
- this.state.pagination.current = 0;
- this.state.pagination.total = 0;
- }
- this.setState({
- totalPage: data.data.pagination.totalPage,
- dataSource: theArr,
- pagination: this.state.pagination,
- totalHui: data.data.count ? data.data.count.totalAmount : 0,
- hui: data.data.count ? data.data.count.amount : 0
- });
- // console.log(this.state.dataSource);
- }.bind(this)
- }).always(
- function () {
- this.setState({
- loading: 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);
- }
- } else {
- thedata.map(function (item, index) {
- theArr.push({
- key: index,
- name: item.name,
- id: item.id
- });
- });
- }
- this.setState({
- departmentArr: theArr
- });
- }.bind(this)
- }).always(
- function () {
- this.setState({
- loading: false
- });
- }.bind(this)
- );
- },
- getInitialState() {
- return {
- mergeModal: false,
- visible: false,
- selectedRowKeys: [], // Check here to configure the default column
- loading: false,
- searchMore: true,
- assignVisible: false,
- releaseDate: [],
- totalPage: 0,
- boHuivisible: false,
- selectedRows: [],
- // 弹出层数据
- modalData: {},
- // userName: "",
- contractNo: "",
- reason: "",
- foo: 0,
- // 子组件改变的表格title数组
- changeList: undefined,
- pagination: {
- defaultCurrent: 1,
- defaultPageSize: 10,
- showQuickJumper: true,
- pageSize: 10,
- onChange: function (page) {
- this.loadData(page);
- }.bind(this),
- showTotal: function (total) {
- return "共" + total + "条数据";
- }
- },
- paginationModal: {
- pageSize: 100,
- showTotal: function (total) {
- return "共" + total + "条数据";
- }
- },
- columns: [
- {
- title: "合同编号",
- dataIndex: "contractNo",
- key: "contractNo",
- // fixed: "left"
- className: "title-table"
- },
- {
- title: "订单编号",
- dataIndex: "orderNo",
- key: "orderNo",
- className: "title-table"
- },
- {
- title: "流水编号",
- dataIndex: "financialPayNo",
- key: "financialPayNo",
- className: "title-table"
- },
- {
- title: "客户名称",
- dataIndex: "nickname",
- key: "nickname",
- className: "title-table",
- width: 150,
- render: (text) => {
- return (
- <Tooltip title={text}>
- <div style={{
- maxWidth: '150px',
- overflow: 'hidden',
- textOverflow: "ellipsis",
- whiteSpace: 'nowrap',
- }}>{text}</div>
- </Tooltip>
- )
- },
- },
- {
- title: "付款方",
- dataIndex: "corporateName",
- key: "corporateName",
- className: "title-table"
- },
- {
- title: "合同额(万元)",
- dataIndex: "totalAmount",
- key: "totalAmount",
- className: "title-table"
- },
- {
- title: "已收款(万元)",
- dataIndex: "settlementAmount",
- key: "settlementAmount",
- className: "title-table"
- },
- {
- title: "本次回款(万元)",
- dataIndex: "amount",
- key: "amount",
- className: "title-table"
- },
- {
- title: "回款时间",
- dataIndex: "receivablesTimes",
- key: "receivablesTimes",
- className: "title-table"
- },
- {
- title: "状态",
- dataIndex: "status",
- key: "status",
- className: "title-table",
- render: status => {
- let str = "";
- let color = "";
- let str2 = "";
- let color2 = "";
- if (status.first == 0) {
- color = "#87d068";
- str = "正常"
- if (status.second == 1) {
- str = "内容缺失"
- color = "#000";
- } else if (status.second == 2) {
- str = "订单异常"
- color = "#000";
- } else if (status.second == 3) {
- str = "名称不一致"
- color = "#000";
- }
- } else if (status.first == 1) {
- str = "重复";
- color = "#f50";
- if (status.second == 1) {
- str2 = "内容缺失";
- color2 = "#000";
- } else if (status.second == 2) {
- str2 = "订单异常";
- color2 = "#000";
- } else if (status.second == 3) {
- str2 = "名称不一致";
- color2 = "#000";
- }
- } else {
- color = "#000";
- if (status.first == 2) {
- str = "订单异常";
- } else if (status.first == 3) {
- str = "金额异常";
- } else if (status.first == 4) {
- str = "名称异常";
- } else if (status.first == 5) {
- str = "已收款";
- } else if (status.first == 6) {
- str = "变更锁定";
- }
- }
- return (
- <div>
- <Tag color={color}>{str}</Tag>
- <Tag color={color2} style={{ display: status.first == 1 && status.second != 0 ? "inline-blcok" : "none" }}>{str2}</Tag>
- </div>
- );
- }
- },
- {
- title: "批量导入时间",
- dataIndex: "createTimes",
- key: "createTimes",
- className: "title-table"
- },
- {
- title: "备注",
- dataIndex: "remarks",
- key: "remarks",
- className: "title-table"
- }
- ],
- columnsDate: [
- {
- title: "编号",
- dataIndex: "id",
- key: "id"
- },
- {
- title: "订单编号",
- dataIndex: "orderno",
- key: "orderno"
- },
- {
- title: "开票金额(万元)",
- dataIndex: "amount",
- key: "amount"
- },
- {
- title: "申请时间",
- dataIndex: "createTime",
- key: "createTime"
- },
- {
- title: "开票状态",
- dataIndex: "status",
- key: "status",
- render: (text, record) => {
- return <div>{getInvoiceStatus(text, record)} <LogPopup id={record.id} /></div>;
- },
- }
- ],
- dataSource: [],
- upLoadFlag: false,
- upLoad: {
- name: "file",
- action: globalConfig.context + "/api/admin/receivables/import",
- headers: {
- authorization: "authorization-text"
- },
- onChange: info => {
- if (info.file.status == "done") {
- if (info.file.response.data == 1) {
- message.success("导入成功!");
- this.loadData();
- } else {
- message.warning(info.file.response.error[0].message);
- }
- }
- }
- }
- };
- },
- search() {
- this.setState({
- selectedRowKeys: []
- })
- this.loadData();
- },
- componentWillMount() {
- this.loadData();
- this.departmentList();
- // $("#rcDialogTitle0").on("click", function() {
- // alert(123);
- // console.log(123);
- // });
- },
- reset() {
- this.state.nameSearch = "";
- this.state.releaseDate = [];
- this.state.orderNoSearch = "";
- this.state.adminName = "";
- this.state.departmenttList = [];
- this.state.nickname = "";
- this.state.payFrom = "";
- this.state.statusSearch = [];
- this.state.adminDeps = undefined;
- this.state.orderDeps = undefined;
- this.state.statusSearch = [];
- this.Cascaders1.empty();
- this.Cascaders2.empty();
- this.loadData();
- },
- changeList(arr) {
- const newArr = [];
- this.state.columns.forEach(item => {
- arr.forEach(val => {
- if (val === item.title) {
- newArr.push(item);
- }
- });
- });
- this.setState({
- changeList: newArr
- });
- },
- onSelectChange(selectedRowKeys) {
- // console.log("selectedRowKeys changed: ", selectedRowKeys);
- this.setState({ selectedRowKeys });
- },
- showModal() {
- this.setState({
- visible: true,
- choose: true
- });
- this.state.dataSource.forEach((item) => {
- if (item.key == this.state.selectedRowKeys[0]) {
- this.setState({
- modalData: JSON.parse(JSON.stringify(item))
- })
- // console.log(this.state.modalData);
- }
- })
- },
- tableRowClick(record) {
- this.setState({
- visible: true,
- choose: true
- });
- this.setState({
- modalData: JSON.parse(JSON.stringify(record))
- });
- },
- handleOk() {
- if (moneyVerify(this.state.modalData.amount)) return
- this.setState({ loading: true });
- if (!this.state.choose) {
- $.ajax({
- method: "POST",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/receivables/addReceivables",
- data: {
- orderNo: this.state.modalData.orderNo,
- amount: this.state.modalData.amount,
- receivablesTimes: this.state.modalData.receivablesTimes,
- // totalAmount: this.state.modalData.totalAmount,
- // contractNo: this.state.modalData.contractNo,
- // nickname: this.state.modalData.nickname,
- remarks: this.state.modalData.remarks,
- corporateName: this.state.modalData.corporateName,
- financialPayNo: this.state.modalData.financialPayNo
- },
- success: function (data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- } else {
- // console.log("成功", data);
- message.success("添加成功!")
- this.loadData();
- this.state.selectedRowKeys = [];
- this.setState({
- selectedRowKeys: this.state.selectedRowKeys
- });
- this.setState({ loading: false, visible: false });
- }
- }.bind(this)
- }).always(
- function () {
- this.setState({
- loading: false
- });
- }.bind(this)
- );
- } else {
- $.ajax({
- method: "POST",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/receivables/updateReceivables",
- data: {
- orderNo: this.state.modalData.orderNo,
- amount: this.state.modalData.amount,
- receivablesTimes: this.state.modalData.receivablesTimes,
- // totalAmount: this.state.modalData.totalAmount,
- // contractNo: this.state.modalData.contractNo,
- // nickname: this.state.modalData.nickname,
- corporateName: this.state.modalData.corporateName,
- financialPayNo: this.state.modalData.financialPayNo,
- remarks: this.state.modalData.remarks,
- id: this.state.modalData.key
- },
- success: function (data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- } else {
- // console.log("成功",data);
- message.success("修改成功!")
- this.loadData()
- this.state.selectedRowKeys = [];
- this.setState({
- selectedRowKeys: this.state.selectedRowKeys
- });
- this.setState({ loading: false, visible: false });
- }
- }.bind(this)
- }).always(
- function () {
- this.setState({
- loading: false
- });
- }.bind(this)
- );
- }
- // this.setState({ loading: false, visible: false });
- },
- handleCancel() {
- // this.loadData()
- this.setState({ visible: false });
- },
- callback(key) {
- // console.log(key);
- },
- delChecked() {
- // console.log("被删除列表",this.state.selectedRowKeys);
- let ids = this.state.selectedRowKeys.join(",")
- $.ajax({
- method: "POST",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/receivables/deleteReceivables",
- data: {
- ids,
- type: 0
- },
- success: function (data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- message.success("删除成功!")
- }.bind(this)
- }).always(
- function () {
- this.loadData()
- this.state.selectedRowKeys = [];
- this.setState({
- selectedRowKeys: this.state.selectedRowKeys
- });
- }.bind(this)
- );
- // this.loadData()
- },
- delAllChecked() {
- // console.log("删除全部");
- $.ajax({
- method: "POST",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/receivables/deleteReceivables",
- data: {
- type: 1
- },
- success: function (data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- }
- message.success("删除全部成功!")
- }.bind(this)
- }).always(
- function () {
- this.loadData();
- this.state.selectedRowKeys = [];
- this.setState({
- selectedRowKeys: this.state.selectedRowKeys
- });
- }.bind(this)
- );
- // this.loadData()
- // console.log("aaa", $(".ant-modal-content"));
- },
- mergeAll() {
- // console.log("合并全部");
- this.setState({
- confirmLoading: true
- })
- $.ajax({
- method: "POST",
- dataType: "json",
- crossDomain: false,
- url: globalConfig.context + "/api/admin/receivables/batchImport",
- data: {},
- success: function (data) {
- if (data.error && data.error.length) {
- message.warning(data.error[0].message);
- } else {
- message.success("合并成功!请在收款列表中,查看已收款情况。");
- this.setState({
- mergeModal: false
- });
- }
- }.bind(this)
- }).always(
- function () {
- this.loadData();
- this.state.pagination.pageSize = 10
- this.state.selectedRowKeys = []
- this.setState({
- selectedRowKeys: this.state.selectedRowKeys,
- pagination: this.state.pagination,
- mergeModal: false,
- confirmLoading: false,
- })
- // window.location.reload();
- }.bind(this)
- );
- // message.success("合并成功!请在收款列表中,查看已收款情况。");
- },
- addModal() {
- this.state.modalData = {}
- this.setState({
- modalData: this.state.modalData,
- visible: true,
- choose: false
- })
- },
- download() {
- window.location.href =
- globalConfig.context +
- "/api/admin/receivables/downloadTemplate?" +
- "sign=receivbles_template";
- },
- // daoHui() {
- // window.location.href =
- // globalConfig.context +
- // "/api/admin/receivables/exportReceivables"
- // },
- render() {
- const formItemLayout = {
- labelCol: { span: 8 },
- wrapperCol: { span: 14 }
- };
- var departmentArr = this.state.departmentArr || [];
- const { loading, selectedRowKeys, visible } = this.state;
- const rowSelection = {
- selectedRowKeys,
- onChange: this.onSelectChange,
- hideDefaultSelections: true
- };
- var departmentArr = this.state.departmentArr || [];
- return (
- <div className="user-content" style={{ position: "relative" }}>
- <div className="content-title" style={{ marginBottom: 10 }}>
- <span style={{ fontWeight: 900, fontSize: 16 }}>批量回款</span>
- </div>
- <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
- <TabPane tab="搜索" key="1">
- <div className="user-search" style={{ marginLeft: 10 }}>
- <Input
- placeholder="合同编号"
- value={this.state.nameSearch}
- onChange={e => {
- this.setState({ nameSearch: e.target.value });
- }}
- />
- <Input
- placeholder="订单编号"
- value={this.state.orderNoSearch}
- onChange={e => {
- this.setState({ orderNoSearch: e.target.value });
- }}
- />
- <Input
- placeholder="客户名称"
- value={this.state.nickname}
- onChange={e => {
- this.setState({ nickname: e.target.value });
- }}
- />
- <Select
- placeholder="状态"
- style={{ width: 150, marginRight: 10 }}
- value={this.state.statusSearch}
- onChange={e => {
- this.setState({ statusSearch: e });
- // console.log("状态", e);
- }}
- >
- <Select.Option key={0}>正常</Select.Option>
- <Select.Option key={1}>重复</Select.Option>
- <Select.Option key={2}>异常</Select.Option>
- </Select>
- <Input
- placeholder="订单负责人"
- value={this.state.adminName}
- onChange={e => {
- this.setState({ adminName: e.target.value });
- }}
- />
- <Cascaders
- ref={node => this.Cascaders1 = node}
- placeholder="订单所属部门"
- id="id"
- name="name"
- children="list"
- height={28}
- onSel={(e) => {
- this.setState({
- orderDeps: JSON.stringify(e),
- })
- }}
- />
- {/* <Select
- placeholder="订单所属部门"
- style={{ width: 150, marginRight: 10 }}
- value={this.state.orderBranch}
- onChange={e => {
- this.setState({ orderBranch: e });
- }}
- >
- {departmentArr.map(function (item) {
- return (
- <Select.Option key={item.id}>{item.name}</Select.Option>
- );
- })}
- </Select> */}
- <Cascaders
- ref={node => this.Cascaders2 = node}
- placeholder="负责人所属部门"
- id="id"
- name="name"
- children="list"
- height={28}
- onSel={(e) => {
- this.setState({
- adminDeps: JSON.stringify(e),
- })
- }}
- />
- {/* <Select
- placeholder="负责人所属部门"
- style={{ width: 150, marginRight: 10 }}
- value={this.state.principalList}
- onChange={e => {
- this.setState({ principalList: e });
- }}
- >
- {departmentArr.map(function (item) {
- return (
- <Select.Option key={item.id}>{item.name}</Select.Option>
- );
- })}
- </Select> */}
- <Input
- placeholder="付款方"
- value={this.state.payFrom}
- onChange={e => {
- this.setState({ payFrom: e.target.value });
- }}
- />
- <Button
- type="primary"
- onClick={this.search}
- style={{ marginLeft: 10 }}
- >
- 搜索
- </Button>
- <Button onClick={this.reset}>重置</Button>
- </div>
- </TabPane>
- <TabPane tab="更改表格显示数据" key="2">
- <div style={{ marginLeft: 10 }}>
- <ChooseList
- columns={this.state.columns}
- changeFn={this.changeList}
- changeList={this.state.changeList}
- top={55}
- margin={11}
- display={"inline-block"}
- style={{ marginBottom: 17 }}
- />
- </div>
- </TabPane>
- <TabPane tab="操作" key="3">
- <div
- class={123}
- style={{
- position: "relative",
- top: 10,
- left: 10,
- // zIndex: 99,
- // left: 400,
- // transform: "translateX(-50%)",
- display: "inline-block",
- width: 122,
- height: 28,
- overflow: "hidden"
- }}
- >
- <Upload {...this.state.upLoad}>
- <Button
- type="primary"
- disabled={this.state.dataSource.length != 0 || this.props.look}
- >
- <Icon type="upload" />
- 导入回款列表
- </Button>
- </Upload>
- </div>
- <Button
- type="primary"
- style={{ marginBottom: 11, marginLeft: 25 }}
- onClick={this.download}
- >
- 下载回款列表模板
- </Button>
- {/* <Button
- type="primary"
- style={{ marginBottom: 20, marginLeft: 15 }}
- onClick={this.daoHui}
- >
- 导出回款列表
- </Button> */}
- <Button
- type="primary"
- style={{ marginBottom: 11, marginLeft: 15 }}
- disabled={this.state.selectedRowKeys.length == 1 ? false : true}
- onClick={this.showModal}
- >
- 修改单条数据
- </Button>
- <Button
- type="primary"
- style={{ marginBottom: 11, marginLeft: 15 }}
- onClick={this.addModal}
- >
- 添加单条数据
- </Button>
- <Popconfirm
- placement="top"
- title={"您确定要删除选中项的回款信息吗?删除后,不可以恢复!"}
- onConfirm={this.delChecked}
- okText="确定"
- cancelText="取消"
- >
- <Button
- primary
- type="danger"
- style={{ marginBottom: 11, marginLeft: 15 }}
- disabled={this.state.selectedRowKeys.length > 0 ? false : true}
- >
- 删除选中项
- </Button>
- </Popconfirm>
- <Popconfirm
- placement="top"
- title={"您确定要删除全部的回款信息吗?删除后,不可以恢复!"}
- onConfirm={this.delAllChecked}
- okText="确定"
- cancelText="取消"
- >
- <Button
- type="danger"
- style={{ marginBottom: 11, marginLeft: 15 }}
- disabled={this.state.dataSource.length == 0}
- >
- 删除全部
- </Button>
- </Popconfirm>
- <Button
- type="danger"
- style={{ marginBottom: 11, marginLeft: 15 }}
- disabled={this.state.dataSource.length == 0 || this.props.look}
- onClick={e => {
- this.loadData(1, 100);
- this.setState({
- mergeModal: true
- });
- }}
- >
- 确认合并回款
- </Button>
- <Button
- type="danger"
- style={{ marginBottom: 11, marginLeft: 15 }}
- disabled={this.state.dataSource.length == 0}
- onClick={e => {
- this.setState({
- selectedRowKeys: []
- });
- }}
- >
- 重置选项
- </Button>
- </TabPane>
- </Tabs>
- <div className="patent-table" style={{ position: "relative" }}>
- <Spin spinning={this.state.loading}>
- <Table
- columns={
- this.state.changeList == undefined
- ? this.state.columns
- : this.state.changeList
- }
- scroll={{ x: "max-content" }}
- dataSource={this.state.dataSource}
- pagination={this.state.pagination}
- rowSelection={rowSelection}
- onRowDoubleClick={this.tableRowClick.bind(this)}
- bordered
- size="small"
- />
- </Spin>
- <p
- style={{ display: "inline-block", fontSize: "14px", color: "red" }}
- >
- {
- <span style={{ marginRight: 10 }}>
- {`回款金额总计(万元):${this.state.hui ? this.state.hui : "0"}`}
- </span>
- }
- {
- <span>
- {`合同额总计(万元):${this.state.totalHui ? this.state.totalHui : "0"
- }`}
- </span>
- }
- </p>
- </div>
- <Modal
- width={500}
- visible={visible}
- title="收款记录"
- onOk={this.handleOk}
- onCancel={this.handleCancel}
- footer={[
- <Button key="back" onClick={this.handleCancel}>
- 取消
- </Button>,
- <Button
- key="submit"
- type="primary"
- loading={loading}
- disabled={this.props.look}
- onClick={this.handleOk}
- >
- 保存
- </Button>
- ]}
- >
- <p
- style={{
- marginBottom: 10,
- display: this.state.choose ? "block" : "none"
- }}
- >
- 合同编号:
- <Input
- style={{
- width: "auto"
- }}
- disabled={this.state.choose}
- value={this.state.modalData.contractNo}
- onChange={e => {
- let val = e.target.value;
- this.state.modalData.contractNo = val;
- this.setState({ modalData: this.state.modalData });
- }}
- />
- </p>
- <p style={{ marginBottom: 10 }}>
- 订单编号:
- <Input
- style={{ width: "auto" }}
- value={this.state.modalData.orderNo}
- onChange={e => {
- let val = e.target.value;
- this.state.modalData.orderNo = val;
- this.setState({ modalData: this.state.modalData });
- }}
- />
- </p>
- <p style={{ marginBottom: 10 }}>
- 流水编号:
- <Input
- style={{ width: "auto" }}
- value={this.state.modalData.financialPayNo}
- onChange={e => {
- let val = e.target.value;
- this.state.modalData.financialPayNo = val;
- this.setState({ modalData: this.state.modalData });
- }}
- />
- </p>
- <p style={{ marginBottom: 10 }}>
- 付款方:
- <Input
- style={{ width: "auto" }}
- value={this.state.modalData.corporateName}
- onChange={e => {
- let val = e.target.value;
- this.state.modalData.corporateName = val;
- this.setState({ modalData: this.state.modalData });
- }}
- />
- </p>
- <p
- style={{
- marginBottom: 10,
- display: this.state.choose ? "block" : "none"
- }}
- >
- 客户名称:
- <Input
- style={{
- width: "auto"
- }}
- disabled={this.state.choose}
- value={this.state.modalData.nickname}
- onChange={e => {
- let val = e.target.value;
- this.state.modalData.nickname = val;
- this.setState({ modalData: this.state.modalData });
- }}
- />
- </p>
- <p
- style={{
- marginBottom: 10,
- display: this.state.choose ? "block" : "none"
- }}
- >
- 合同额(万元):
- <Input
- style={{
- width: "auto",
- display: this.state.choose ? "inline-block" : "none"
- }}
- disabled={this.state.choose}
- value={this.state.modalData.totalAmount}
- onChange={e => {
- let val = e.target.value;
- this.state.modalData.totalAmount = val;
- this.setState({ modalData: this.state.modalData });
- }}
- />
- </p>
- <p style={{ marginBottom: 10 }}>
- 本次回款(万元):
- <Input
- style={{ width: "auto" }}
- value={this.state.modalData.amount}
- onChange={e => {
- let val = e.target.value;
- this.state.modalData.amount = val;
- this.setState({ modalData: this.state.modalData });
- }}
- />
- </p>
- <p style={{ marginBottom: 10 }}>
- 回款时间:
- <DatePicker
- showTime
- placeholder="选择回款时间"
- value={
- this.state.modalData.receivablesTimes
- ? moment(this.state.modalData.receivablesTimes, "YYYY-MM-DD")
- : ""
- }
- onChange={(v, e) => {
- this.state.modalData.receivablesTimes = e;
- console.log(e);
- this.setState({ modalData: this.state.modalData });
- }}
- onOk={() => { }}
- />
- </p>
- <p
- style={{
- marginBottom: 10,
- display: this.state.choose ? "block" : "none"
- }}
- >
- 批量导入时间:
- <Input
- style={{ width: "auto" }}
- value={this.state.modalData.createTimes}
- disabled
- onChange={e => {
- let val = e.target.value;
- this.state.modalData.createTimes = val;
- this.setState({ modalData: this.state.modalData });
- }}
- />
- </p>
- <p style={{ marginBottom: 10 }}>
- <span style={{ display: "inline-block", marginBottom: 20 }}>
- 备注:
- </span>
- <TextArea
- style={{ width: "70%" }}
- value={this.state.modalData.remarks}
- onChange={e => {
- this.state.modalData.remarks = e.target.value;
- // console.log(e);
- this.setState({ modalData: this.state.modalData });
- }}
- placeholder="请输入备注信息"
- autosize={{ minRows: 3, maxRows: 5 }}
- />
- </p>
- </Modal>
- <Modal
- title="确认合并列表"
- visible={this.state.mergeModal}
- width={1300}
- onOk={this.mergeAll}
- confirmLoading={this.state.confirmLoading}
- onCancel={() => {
- this.setState({
- mergeModal: false
- });
- }}
- >
- <div className="patent-table" style={{ position: "relative" }}>
- <Spin spinning={this.state.loading}>
- <Table
- columns={this.state.columns}
- scroll={{ x: "max-content" }}
- dataSource={this.state.dataSource}
- bordered
- size="small"
- pagination={this.state.paginationModal}
- />
- </Spin>
- <p
- style={{
- display: "inline-block",
- fontSize: "14px",
- color: "red"
- }}
- >
- {
- <span style={{ marginRight: 10 }}>
- {`回款金额总计(万元):${this.state.hui ? this.state.hui : "0"
- }`}
- </span>
- }
- {
- <span>
- {`合同额总计(万元):${this.state.totalHui ? this.state.totalHui : "0"
- }`}
- </span>
- }
- </p>
- </div>
- </Modal>
- </div>
- );
- }
- });
- export default HuiKuan;
|