123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290 |
- import React, { Component } from "react";
- import $ from "jquery/src/ajax";
- import {
- Form,
- Radio,
- Icon,
- Button,
- Input,
- Spin,
- Table,
- message,
- DatePicker,
- Modal,
- Upload,
- Popconfirm,
- Cascader,
- Tabs
- } from "antd";
- import NewService from "./addService.jsx";
- import moment from "moment";
- import "../userMangagement.less";
- import {
- projectProgress,
- specially,
- province,
- invoiceStatus,
- approval,
- approvalA
- } from "../../../dataDic.js";
- import { areaSelect, getProvince } from "@/NewDicProvinceList";
- import {
- getApprovedState,
- getprovince,
- getProcessStatus,
- getLiquidationStatus,
- getNewOrderStatus,
- beforeUploadFile,
- getProvinceA,
- getInvoiceStatus,
- splitUrl
- } from "../../../tools.js";
- class PicturesWall extends Component {
- constructor(props) {
- super(props);
- this.state = {
- previewVisible: false,
- previewImage: "",
- fileList: this.props.pictureUrl
- };
- }
- getDefaultProps = () => {
- return {
- changeClick: this.modifyChange
- };
- };
- handleCancel = () => {
- this.setState({ previewVisible: false });
- };
- handlePreview = file => {
- this.setState({
- previewImage: file.url || file.thumbUrl,
- previewVisible: true
- });
- };
- handleChange = info => {
- let fileList = info.fileList;
- this.setState({ fileList });
- this.props.fileList(fileList);
- };
- componentWillReceiveProps(nextProps) {
- this.state.fileList = nextProps.pictureUrl;
- }
- render() {
- const { previewVisible, previewImage, fileList } = this.state;
- const uploadButton = (
- <div>
- <Icon type="plus" />
- <div className="ant-upload-text">点击上传</div>
- </div>
- );
- return (
- <div style={{ display: "inline-block" }}>
- <Upload
- beforeUpload={beforeUploadFile}
- action={
- globalConfig.context +
- "/api/admin/orderInvoice/uploadOrderInvoiceFile"
- }
- data={{ sign: "order_invoice_file" }}
- listType="picture-card"
- fileList={fileList}
- onPreview={this.handlePreview}
- onChange={this.handleChange}
- >
- {fileList.length >= 18 ? null : uploadButton}
- </Upload>
- <Modal
- maskClosable={false}
- visible={previewVisible}
- footer={null}
- onCancel={this.handleCancel}
- >
- <img alt="example" style={{ width: "100%" }} src={previewImage} />
- </Modal>
- </div>
- );
- }
- }
- class MyService extends Component {
- constructor(props) {
- super(props);
- this.state = {
- loading: false,
- search: {},
- dataSource: [],
- 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: "orderNo",
- key: "orderNo",
- fixed: "left"
- },
- {
- title: "客户名称",
- dataIndex: "userName",
- key: "userName",
- render: text => {
- return text && text.length > 9
- ? text.substr(0, 9) + "..."
- : text;
- }
- },
- {
- title: "下单时间",
- dataIndex: "createDate",
- key: "createTime"
- },
- {
- title: "合同签订时间",
- dataIndex: "signDate",
- key: "signDate"
- },
- {
- title: "流程状态",
- dataIndex: "processStatus",
- key: "processStatus",
- render: text => {
- return getProcessStatus(text);
- }
- },
- {
- title: "签单金额(万元)",
- dataIndex: "totalAmount",
- key: "totalAmount"
- },
- {
- title: "结算状态",
- dataIndex: "liquidationStatus",
- key: "liquidationStatus",
- render: text => {
- return getLiquidationStatus(text);
- }
- },
- {
- title: "是否特批",
- dataIndex: "approval",
- key: "approval",
- render: text => {
- return getApprovedState(text);
- }
- },
- {
- title: "订单状态",
- dataIndex: "orderStatus",
- key: "orderStatus",
- render: text => {
- return getNewOrderStatus(text);
- }
- },
- {
- title: "财务负责人",
- dataIndex: "financeName",
- key: "financeName"
- },
- {
- title: "操作",
- dataIndex: "abc",
- key: "abc",
- render: (text, record, index) => {
- return (
- <div>
- {
- <Button
- type="primary"
- style={{
- marginRight: "10px",
- color: "#ffffff",
- border: "none",
- marginTop: "5px",
- background: "red"
- }}
- onClick={e => {
- e.stopPropagation(),
- this.visit(record, index);
- }}
- >
- 开票
- </Button>
- }
- {
- <Button
- type="primary"
- onClick={e => {
- e.stopPropagation(),
- this.inRecord(record, index);
- }}
- style={{
- border: "none",
- background: "orangered",
- marginRight: "10px"
- }}
- >
- 开票记录
- </Button>
- }
- {record.liquidationStatus == 2 ? (
- <Popconfirm
- title="是否结项?"
- onConfirm={e => {
- this.delectRow(record);
- }}
- okText="是"
- cancelText="否"
- >
- <Button
- type="primary"
- style={{
- marginRight: "10px",
- color: "#ffffff",
- border: "none"
- }}
- onClick={e => {
- e.stopPropagation();
- }}
- >
- 结项
- </Button>
- </Popconfirm>
- ) : (
- ""
- )}
- </div>
- );
- }
- }
- ]
- };
- }
- render() {
- return (
- <div className="user-content">
- <div className="content-title">
- <span style={{ fontSize: "16px" }}>开单与签单</span>
- </div>
- </div>
- );
- }
- }
|