Explorar el Código

06-01咨询师项目流程显示bug

mentoswzq hace 4 años
padre
commit
0016ec0a33

+ 81 - 2
js/component/manageCenter/financialManage/distribute/approvedOutsourcing.jsx

@@ -22,6 +22,7 @@ import Receivable from "./receivable";
 import Assign from "@/manageCenter/publicComponent/assign";
 import ReactToPrint from "react-to-print";
 import ResolutionDetail from "@/resolutionDetail";
+import KaiPiaoModal from "./kaiPiaoModal";
 import OrderRiZi from "@/orderRiZi.jsx";
 import {
   getjiedian,
@@ -36,6 +37,7 @@ import {
   getTransactionProject,
   getTaskStatus,
   getNewOrderStatus,
+  getInvoiceStatus, 
   getCuikuan
 } from "@/tools";
 import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
@@ -2340,8 +2342,8 @@ const approvedOutsourcing = React.createClass({
 
   cuiTabChange(index) {
     this.setState({
-      cuiTabKey: index
-    })
+      cuiTabKey: index,
+    });
     if (index == 2) {
       this.setState({
         loading: true,
@@ -2670,6 +2672,76 @@ const approvedOutsourcing = React.createClass({
       }.bind(this)
     );
   },
+  kaiPiaoData(record) {
+    this.setState({
+      avisible: true,
+    });
+    this.invoiceData(record.id);
+  },
+  invoiceData(id) {
+    this.setState({
+      loading: true,
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url:
+        globalConfig.context + "/api/admin/orderInvoice/selectByIdOrderInvoice",
+      data: {
+        id,
+      },
+      success: function (data) {
+        let thisdata = data.data;
+        let obj = {
+          contractNo: thisdata.contractNo,
+          orderNo: thisdata.orderNo,
+          approval: thisdata.approval,
+          type: thisdata.type,
+          status: thisdata.status,
+          remarks: thisdata.remarks,
+          invoiceType: thisdata.invoiceType,
+          unitName: thisdata.unitName,
+          taxNumber: thisdata.taxNumber,
+          amount: thisdata.amount,
+          banks: thisdata.banks,
+          content: thisdata.content,
+          unitAddress: thisdata.unitAddress,
+          invoiceRemarks: thisdata.invoiceRemarks,
+          unitMobile: thisdata.unitMobile,
+          post: thisdata.post,
+          addressee: thisdata.addressee,
+          addresseeMobile: thisdata.addresseeMobile,
+          addresseeProvince: thisdata.addresseeProvince,
+          addresseeCity: thisdata.addresseeCity,
+          addresseeArea: thisdata.addresseeArea,
+          alreadyAmount: thisdata.alreadyAmount,
+          recipientAddress: thisdata.recipientAddress,
+          orgCodeUrl: thisdata.voucherUrl
+            ? splitUrl(
+                thisdata.voucherUrl,
+                ",",
+                globalConfig.avatarHost + "/upload"
+              )
+            : [],
+        };
+        this.setState({
+          modalData: obj,
+        });
+      }.bind(this),
+    }).done(
+      function () {
+        this.setState({
+          loading: false,
+        });
+      }.bind(this)
+    );
+  },
+  visitCancels() {
+    this.setState({
+      avisible: false,
+    });
+  },
   render() {
     const { TextArea } = Input;
     const { RangePicker } = DatePicker;
@@ -3769,6 +3841,7 @@ const approvedOutsourcing = React.createClass({
               <Table
                 columns={this.state.columnsDate}
                 dataSource={this.state.recordData}
+                onRowClick={this.kaiPiaoData}
                 pagination={false}
                 bordered
                 size="small"
@@ -4145,6 +4218,12 @@ const approvedOutsourcing = React.createClass({
             />
           </Modal>
         </Spin>
+        <KaiPiaoModal
+          visible={this.state.avisible}
+          data={this.state.modalData}
+          onCancel={this.visitCancels}
+          loading={this.state.loading}
+        />
       </div>
     );
   },

+ 78 - 0
js/component/manageCenter/financialManage/distribute/approvedOutsourcingAll.jsx

@@ -21,6 +21,7 @@ import Receivable from "./receivable";
 import Assign from "@/manageCenter/publicComponent/assign";
 import ReactToPrint from "react-to-print";
 import ResolutionDetail from "@/resolutionDetail";
+import KaiPiaoModal from "./kaiPiaoModal";
 import OrderRiZi from "@/orderRiZi.jsx";
 import {
   getjiedian,
@@ -2587,6 +2588,76 @@ const approvedOutsourcing = React.createClass({
       );
     }
   },
+  kaiPiaoData(record) {
+    this.setState({
+      avisible: true,
+    });
+    this.invoiceData(record.id);
+  },
+  invoiceData(id) {
+    this.setState({
+      loading: true,
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url:
+        globalConfig.context + "/api/admin/orderInvoice/selectByIdOrderInvoice",
+      data: {
+        id,
+      },
+      success: function (data) {
+        let thisdata = data.data;
+        let obj = {
+          contractNo: thisdata.contractNo,
+          orderNo: thisdata.orderNo,
+          approval: thisdata.approval,
+          type: thisdata.type,
+          status: thisdata.status,
+          remarks: thisdata.remarks,
+          invoiceType: thisdata.invoiceType,
+          unitName: thisdata.unitName,
+          taxNumber: thisdata.taxNumber,
+          amount: thisdata.amount,
+          banks: thisdata.banks,
+          content: thisdata.content,
+          unitAddress: thisdata.unitAddress,
+          invoiceRemarks: thisdata.invoiceRemarks,
+          unitMobile: thisdata.unitMobile,
+          post: thisdata.post,
+          addressee: thisdata.addressee,
+          addresseeMobile: thisdata.addresseeMobile,
+          addresseeProvince: thisdata.addresseeProvince,
+          addresseeCity: thisdata.addresseeCity,
+          addresseeArea: thisdata.addresseeArea,
+          alreadyAmount: thisdata.alreadyAmount,
+          recipientAddress: thisdata.recipientAddress,
+          orgCodeUrl: thisdata.voucherUrl
+            ? splitUrl(
+                thisdata.voucherUrl,
+                ",",
+                globalConfig.avatarHost + "/upload"
+              )
+            : [],
+        };
+        this.setState({
+          modalData: obj,
+        });
+      }.bind(this),
+    }).done(
+      function () {
+        this.setState({
+          loading: false,
+        });
+      }.bind(this)
+    );
+  },
+  visitCancels() {
+    this.setState({
+      avisible: false,
+    });
+  },
   render() {
     const { TextArea } = Input;
     const { RangePicker } = DatePicker;
@@ -3685,6 +3756,7 @@ const approvedOutsourcing = React.createClass({
               <Table
                 columns={this.state.columnsDate}
                 dataSource={this.state.recordData}
+                onRowClick={this.kaiPiaoData}
                 pagination={false}
                 bordered
                 size="small"
@@ -4036,6 +4108,12 @@ const approvedOutsourcing = React.createClass({
             content={() => this.refs.all}
           />
         </Modal>
+        <KaiPiaoModal
+          visible={this.state.avisible}
+          data={this.state.modalData}
+          onCancel={this.visitCancels}
+          loading={this.state.loading}
+        />
       </div>
     );
   },

+ 20 - 298
js/component/manageCenter/financialManage/distribute/invoiceApplyList.jsx

@@ -27,6 +27,7 @@ import {
 import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
 import ShowModalDiv from "@/showModal.jsx";
 import OrderDesc from "../orderDetail/orderDesc";
+import KaiPiaoModal from "./kaiPiaoModal"
 const FormItem = Form.Item;
 const { TabPane } = Tabs
 
@@ -156,7 +157,7 @@ const invoiceApplyList = React.createClass({
       },
       success: function (data) {
         let thisdata = data.data;
-        this.setState({
+        let obj = {
           contractNo: thisdata.contractNo,
           orderNo: thisdata.orderNo,
           approval: thisdata.approval,
@@ -187,7 +188,10 @@ const invoiceApplyList = React.createClass({
               globalConfig.avatarHost + "/upload"
             )
             : []
-        });
+        }
+        this.setState({
+          modalData: obj
+        })
       }.bind(this)
     }).done(
       function () {
@@ -609,24 +613,21 @@ const invoiceApplyList = React.createClass({
         <div className="content-title" style={{ marginBottom: 10 }}>
           <span style={{ fontWeight: 900, fontSize: 16 }}>省内开票审核</span>
         </div>
-        <Tabs
-          defaultActiveKey="1"
-          onChange={this.callback}
-          className="test">
+        <Tabs defaultActiveKey="1" onChange={this.callback} className="test">
           <TabPane tab="搜索" key="1">
             <div className="user-search">
               <Input
                 placeholder="营销员名称"
                 value={this.state.nameSearch}
                 style={{ marginLeft: 10 }}
-                onChange={e => {
+                onChange={(e) => {
                   this.setState({ nameSearch: e.target.value });
                 }}
               />
               <Input
                 placeholder="订单编号"
                 value={this.state.orderNoSearch}
-                onChange={e => {
+                onChange={(e) => {
                   this.setState({ orderNoSearch: e.target.value });
                 }}
               />
@@ -634,12 +635,14 @@ const invoiceApplyList = React.createClass({
                 placeholder="订单部门"
                 style={{ width: 150, marginRight: 10 }}
                 value={this.state.departmenttList}
-                onChange={e => {
+                onChange={(e) => {
                   this.setState({ departmenttList: e });
                 }}
               >
                 {departmentArr.map(function (item) {
-                  return <Select.Option key={item.id}>{item.name}</Select.Option>;
+                  return (
+                    <Select.Option key={item.id}>{item.name}</Select.Option>
+                  );
                 })}
               </Select>
               <Button
@@ -648,7 +651,7 @@ const invoiceApplyList = React.createClass({
                 style={{ marginLeft: 10 }}
               >
                 搜索
-          </Button>
+              </Button>
               <Button onClick={this.reset}>重置</Button>
             </div>
           </TabPane>
@@ -661,7 +664,6 @@ const invoiceApplyList = React.createClass({
                 top={55}
               />
             </div>
-
           </TabPane>
         </Tabs>
         <div className="patent-table">
@@ -693,14 +695,14 @@ const invoiceApplyList = React.createClass({
             placeholder="请输入拒绝理由"
             rows={4}
             value={this.state.reason}
-            onChange={e => {
+            onChange={(e) => {
               this.setState({ reason: e.target.value });
             }}
           ></Input.TextArea>
           <div className="clearfix" style={{ marginTop: "20px" }}>
             <Button
               type="primary"
-              onClick={e => {
+              onClick={(e) => {
                 e.stopPropagation(), this.commit();
               }}
               style={{ float: "right" }}
@@ -709,292 +711,12 @@ const invoiceApplyList = React.createClass({
             </Button>
           </div>
         </Modal>
-        <Modal
-          className="admin-desc-content"
-          footer=""
-          title="开具发票申请单"
-          width="900px"
+        <KaiPiaoModal
           visible={this.state.avisible}
-          onOk={this.visitOks}
+          data={this.state.modalData}
           onCancel={this.visitCancels}
-        >
-          <Form
-            layout="horizontal"
-            id="demand-form"
-            style={{ paddingBottom: "40px" }}
-          >
-            <Spin spinning={this.state.loading}>
-              <div className="clearfix">
-                <div className="clearfix">
-                  <FormItem
-                    className="half-item"
-                    {...formItemLayout}
-                    label="合同编号"
-                  >
-                    <span>{this.state.contractNo}</span>
-                  </FormItem>
-                  <FormItem
-                    className="half-item"
-                    {...formItemLayout}
-                    label="备注"
-                  >
-                    <span>{this.state.remarks}</span>
-                  </FormItem>
-                </div>
-                <div className="clearfix">
-                  <FormItem
-                    className="half-item"
-                    {...formItemLayout}
-                    label={
-                      <span>
-                        <strong style={{ color: "#f00" }}>*</strong>省内/外
-                      </span>
-                    }
-                  >
-                    <span>{getProvinceA(this.state.type)}</span>
-                  </FormItem>
-                  <FormItem
-                    className="half-item"
-                    {...formItemLayout}
-                    label={
-                      <span>
-                        <strong style={{ color: "#f00" }}>*</strong>特批
-                      </span>
-                    }
-                  >
-                    <span>{this.state.approval === 0 ? "否" : "是"}</span>
-                  </FormItem>
-                </div>
-                <hr
-                  style={{
-                    border: "1px dashed #aaa",
-                    width: "90%",
-                    margin: "auto"
-                  }}
-                />
-                <div style={{ marginTop: "13px", marginLeft: "16px" }}>
-                  <span style={{ fontSize: "14px" }}>发票内容</span>
-                </div>
-                <div className="clearfix">
-                  <FormItem
-                    className="half-item"
-                    {...formItemLayout}
-                    label={
-                      <span>
-                        <strong style={{ color: "#f00" }}>*</strong>发票类型
-                      </span>
-                    }
-                  >
-                    <span>
-                      {this.state.invoiceType === 0
-                        ? "增值税专用发票"
-                        : this.state.invoiceType === 1
-                          ? "增值税普通发票"
-                          : "其他"}
-                    </span>
-                  </FormItem>
-                </div>
-                <div className="clearfix">
-                  <FormItem
-                    className="half-item"
-                    {...formItemLayout}
-                    label={
-                      <span>
-                        <strong style={{ color: "#f00" }}>*</strong>单位名称
-                      </span>
-                    }
-                  >
-                    <span>{this.state.unitName}</span>
-                  </FormItem>
-                  <FormItem
-                    className="half-item"
-                    {...formItemLayout}
-                    label={
-                      <span>
-                        <strong style={{ color: "#f00" }}>*</strong>税号
-                      </span>
-                    }
-                  >
-                    <span>{this.state.taxNumber}</span>
-                  </FormItem>
-                  <FormItem
-                    className="half-item"
-                    {...formItemLayout}
-                    label={
-                      <span>
-                        <strong style={{ color: "#f00" }}>*</strong>
-                        开票金额(万元)
-                      </span>
-                    }
-                  >
-                    <span>{this.state.amount}</span>
-                  </FormItem>
-                  <FormItem
-                    className="half-item"
-                    {...formItemLayout}
-                    label={
-                      <span>
-                        <strong style={{ color: "#f00" }}>*</strong>
-                        开户行银行账号
-                      </span>
-                    }
-                  >
-                    <span>{this.state.banks}</span>
-                  </FormItem>
-                  <FormItem
-                    className="half-item"
-                    {...formItemLayout}
-                    label={
-                      <span>
-                        <strong style={{ color: "#f00" }}>*</strong>
-                        开票内容及说明
-                      </span>
-                    }
-                  >
-                    <span>{this.state.content}</span>
-                  </FormItem>
-                  <FormItem
-                    className="half-item"
-                    {...formItemLayout}
-                    label={
-                      <span>
-                        <strong style={{ color: "#f00" }}>*</strong>单位地址
-                      </span>
-                    }
-                  >
-                    <span>{this.state.unitAddress}</span>
-                  </FormItem>
-                  <FormItem
-                    className="half-item"
-                    {...formItemLayout}
-                    label="备注"
-                  >
-                    <span>{this.state.invoiceRemarks}</span>
-                  </FormItem>
-                  <FormItem
-                    className="half-item"
-                    {...formItemLayout}
-                    label={
-                      <span>
-                        <strong style={{ color: "#f00" }}>*</strong>单位电话
-                      </span>
-                    }
-                  >
-                    <span>{this.state.unitMobile}</span>
-                  </FormItem>
-                </div>
-                <div className="clearfix">
-                  <FormItem
-                    labelCol={{ span: 4 }}
-                    wrapperCol={{ span: 18 }}
-                    label={
-                      <span>
-                        <strong style={{ color: "#f00" }}>*</strong>附件
-                      </span>
-                    }
-                  >
-                    <Upload
-                      className="demandDetailShow-upload"
-                      listType="picture-card"
-                      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>
-                <hr
-                  style={{
-                    border: "1px dashed #aaa",
-                    width: "90%",
-                    margin: "auto"
-                  }}
-                />
-                <div className="clearfix" style={{ marginTop: "10px" }}>
-                  <FormItem
-                    className="half-item"
-                    {...formItemLayout}
-                    label="发票是否邮寄:"
-                  >
-                    <span>{this.state.post === 0 ? "是" : "否"}</span>
-                  </FormItem>
-                </div>
-                {this.state.post === 0 ? (
-                  <div>
-                    <div className="clearfix">
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="收信人姓名"
-                      >
-                        <span>{this.state.addressee}</span>
-                      </FormItem>
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="电话"
-                      >
-                        <span>{this.state.addresseeMobile}</span>
-                      </FormItem>
-                    </div>
-                    <div className="clearfix">
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="省-市-区"
-                      >
-                        <span>
-                          {getprovince(this.state.addresseeProvince)}/
-                          {getprovince(this.state.addresseeCity)}/
-                          {getprovince(this.state.addresseeArea)}
-                        </span>
-                      </FormItem>
-                    </div>
-                    <div className="clearfix">
-                      <FormItem
-                        className="half-item"
-                        {...formItemLayout}
-                        label="详细地址"
-                      >
-                        <span>{this.state.recipientAddress}</span>
-                      </FormItem>
-                    </div>
-                  </div>
-                ) : (
-                    ""
-                  )}
-                <FormItem
-                  className="half-item"
-                  {...formItemLayout}
-                  label={
-                    <span>
-                      <strong style={{ color: "#f00" }}>*</strong>开票金额总计
-                    </span>
-                  }
-                >
-                  <span>{this.state.alreadyAmount}万元</span>
-                </FormItem>
-              </div>
-            </Spin>
-          </Form>
-        </Modal>
+          loading={this.state.loading}
+        />
         <Modal
           visible={this.state.bvisible}
           footer=""

+ 392 - 0
js/component/manageCenter/financialManage/distribute/kaiPiaoModal.jsx

@@ -0,0 +1,392 @@
+import React from "react";
+import { Spin, Button, Tabs, Table, message, Modal, Form, Upload } from "antd";
+import $ from "jquery/src/ajax";
+import {
+  getProjectStatus,
+  getProvinceA,
+  getInvoiceStatus,
+  getprovince,
+  getStatus,
+  getPeople,
+  splitUrl,
+  ShowModal,
+  getProcessStatus,
+} from "@/tools";
+const FormItem = Form.Item;
+const KaiPiaoModal = React.createClass({
+  getInitialState() {
+    return {
+      rotateDeg: 0
+    };
+  },
+  componentWillReceiveProps(nextProps) {
+    this.state = nextProps.data;
+    this.setState(this.state);
+  },
+  downImg() {
+    let num = 0;
+    for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
+      if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == this.state.orgCodeUrl.length - 1) {
+      return message.warning("已经是最后一张了哦");
+    }
+    this.state.previewImage = this.state.orgCodeUrl[num + 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0,
+    });
+  },
+  upImg() {
+    let num = 0;
+    for (let i = 0; i < this.state.orgCodeUrl.length; i++) {
+      if (this.state.orgCodeUrl[i].url == this.state.previewImage) {
+        num = i;
+      }
+    }
+    if (num == 0) {
+      return message.warning("已经是第一张了哦");
+    }
+    this.state.previewImage = this.state.orgCodeUrl[num - 1].url;
+    this.setState({
+      previewImage: this.state.previewImage,
+      rotateDeg: 0,
+    });
+  },
+  rotate() {
+    let rotateDeg = this.state.rotateDeg + 90;
+    this.setState({
+      rotateDeg,
+    });
+  },
+  render() {
+    const formItemLayout = {
+      labelCol: { span: 8 },
+      wrapperCol: { span: 14 },
+    };
+    return (
+      <Modal
+        className="admin-desc-content"
+        footer=""
+        title="开具发票申请单"
+        width="900px"
+        visible={this.props.visible}
+        onCancel={this.props.onCancel}
+      >
+        <Form
+          layout="horizontal"
+          id="demand-form"
+          style={{ paddingBottom: "40px" }}
+        >
+          <Spin spinning={this.props.loading}>
+            <div className="clearfix">
+              <div className="clearfix">
+                <FormItem
+                  className="half-item"
+                  {...formItemLayout}
+                  label="合同编号"
+                >
+                  <span>{this.state.contractNo}</span>
+                </FormItem>
+                <FormItem
+                  className="half-item"
+                  {...formItemLayout}
+                  label="备注"
+                >
+                  <span>{this.state.remarks}</span>
+                </FormItem>
+              </div>
+              <div className="clearfix">
+                <FormItem
+                  className="half-item"
+                  {...formItemLayout}
+                  label={
+                    <span>
+                      <strong style={{ color: "#f00" }}>*</strong>省内/外
+                    </span>
+                  }
+                >
+                  <span>{getProvinceA(this.state.type)}</span>
+                </FormItem>
+                <FormItem
+                  className="half-item"
+                  {...formItemLayout}
+                  label={
+                    <span>
+                      <strong style={{ color: "#f00" }}>*</strong>特批
+                    </span>
+                  }
+                >
+                  <span>{this.state.approval === 0 ? "否" : "是"}</span>
+                </FormItem>
+              </div>
+              <hr
+                style={{
+                  border: "1px dashed #aaa",
+                  width: "90%",
+                  margin: "auto",
+                }}
+              />
+              <div style={{ marginTop: "13px", marginLeft: "16px" }}>
+                <span style={{ fontSize: "14px" }}>发票内容</span>
+              </div>
+              <div className="clearfix">
+                <FormItem
+                  className="half-item"
+                  {...formItemLayout}
+                  label={
+                    <span>
+                      <strong style={{ color: "#f00" }}>*</strong>发票类型
+                    </span>
+                  }
+                >
+                  <span>
+                    {this.state.invoiceType === 0
+                      ? "增值税专用发票"
+                      : this.state.invoiceType === 1
+                      ? "增值税普通发票"
+                      : "其他"}
+                  </span>
+                </FormItem>
+              </div>
+              <div className="clearfix">
+                <FormItem
+                  className="half-item"
+                  {...formItemLayout}
+                  label={
+                    <span>
+                      <strong style={{ color: "#f00" }}>*</strong>单位名称
+                    </span>
+                  }
+                >
+                  <span>{this.state.unitName}</span>
+                </FormItem>
+                <FormItem
+                  className="half-item"
+                  {...formItemLayout}
+                  label={
+                    <span>
+                      <strong style={{ color: "#f00" }}>*</strong>税号
+                    </span>
+                  }
+                >
+                  <span>{this.state.taxNumber}</span>
+                </FormItem>
+                <FormItem
+                  className="half-item"
+                  {...formItemLayout}
+                  label={
+                    <span>
+                      <strong style={{ color: "#f00" }}>*</strong>
+                      开票金额(万元)
+                    </span>
+                  }
+                >
+                  <span>{this.state.amount}</span>
+                </FormItem>
+                <FormItem
+                  className="half-item"
+                  {...formItemLayout}
+                  label={
+                    <span>
+                      <strong style={{ color: "#f00" }}>*</strong>
+                      开户行银行账号
+                    </span>
+                  }
+                >
+                  <span>{this.state.banks}</span>
+                </FormItem>
+                <FormItem
+                  className="half-item"
+                  {...formItemLayout}
+                  label={
+                    <span>
+                      <strong style={{ color: "#f00" }}>*</strong>
+                      开票内容及说明
+                    </span>
+                  }
+                >
+                  <span>{this.state.content}</span>
+                </FormItem>
+                <FormItem
+                  className="half-item"
+                  {...formItemLayout}
+                  label={
+                    <span>
+                      <strong style={{ color: "#f00" }}>*</strong>单位地址
+                    </span>
+                  }
+                >
+                  <span>{this.state.unitAddress}</span>
+                </FormItem>
+                <FormItem
+                  className="half-item"
+                  {...formItemLayout}
+                  label="备注"
+                >
+                  <span>{this.state.invoiceRemarks}</span>
+                </FormItem>
+                <FormItem
+                  className="half-item"
+                  {...formItemLayout}
+                  label={
+                    <span>
+                      <strong style={{ color: "#f00" }}>*</strong>单位电话
+                    </span>
+                  }
+                >
+                  <span>{this.state.unitMobile}</span>
+                </FormItem>
+              </div>
+              <div className="clearfix">
+                <FormItem
+                  labelCol={{ span: 4 }}
+                  wrapperCol={{ span: 18 }}
+                  label={
+                    <span>
+                      <strong style={{ color: "#f00" }}>*</strong>附件
+                    </span>
+                  }
+                >
+                  <Upload
+                    className="demandDetailShow-upload"
+                    listType="picture-card"
+                    fileList={this.state.orgCodeUrl}
+                    onPreview={(file) => {
+                      this.setState({
+                        previewImage: file.url || file.thumbUrl,
+                        previewVisible: true,
+                      });
+                    }}
+                  ></Upload>
+                  <Modal
+                    maskClosable={false}
+                    footer={null}
+                    width={"50%"}
+                    visible={this.state.previewVisible}
+                    onCancel={() => {
+                      this.setState({ previewVisible: false, rotateDeg: 0 });
+                    }}
+                  >
+                    <img
+                      alt=""
+                      style={{ width: "100%" }}
+                      src={this.state.previewImage || ""}
+                    />
+                    <Button
+                      onClick={this.rotate}
+                      style={{
+                        position: "relative",
+                        left: "50%",
+                        transform: "translateX(-50%)",
+                      }}
+                    >
+                      旋转
+                    </Button>
+                    <Button
+                      onClick={this.upImg}
+                      style={{
+                        position: "absolute",
+                        left: -81,
+                        top: "50%",
+                        transform: "translateY(-50%)",
+                      }}
+                    >
+                      上一张
+                    </Button>
+                    <Button
+                      onClick={this.downImg}
+                      style={{
+                        position: "absolute",
+                        right: -81,
+                        top: "50%",
+                        transform: "translateY(-50%)",
+                      }}
+                    >
+                      下一张
+                    </Button>
+                  </Modal>
+                </FormItem>
+              </div>
+              <hr
+                style={{
+                  border: "1px dashed #aaa",
+                  width: "90%",
+                  margin: "auto",
+                }}
+              />
+              <div className="clearfix" style={{ marginTop: "10px" }}>
+                <FormItem
+                  className="half-item"
+                  {...formItemLayout}
+                  label="发票是否邮寄:"
+                >
+                  <span>{this.state.post === 0 ? "是" : "否"}</span>
+                </FormItem>
+              </div>
+              {this.state.post === 0 ? (
+                <div>
+                  <div className="clearfix">
+                    <FormItem
+                      className="half-item"
+                      {...formItemLayout}
+                      label="收信人姓名"
+                    >
+                      <span>{this.state.addressee}</span>
+                    </FormItem>
+                    <FormItem
+                      className="half-item"
+                      {...formItemLayout}
+                      label="电话"
+                    >
+                      <span>{this.state.addresseeMobile}</span>
+                    </FormItem>
+                  </div>
+                  <div className="clearfix">
+                    <FormItem
+                      className="half-item"
+                      {...formItemLayout}
+                      label="省-市-区"
+                    >
+                      <span>
+                        {getprovince(this.state.addresseeProvince)}/
+                        {getprovince(this.state.addresseeCity)}/
+                        {getprovince(this.state.addresseeArea)}
+                      </span>
+                    </FormItem>
+                  </div>
+                  <div className="clearfix">
+                    <FormItem
+                      className="half-item"
+                      {...formItemLayout}
+                      label="详细地址"
+                    >
+                      <span>{this.state.recipientAddress}</span>
+                    </FormItem>
+                  </div>
+                </div>
+              ) : (
+                ""
+              )}
+              <FormItem
+                className="half-item"
+                {...formItemLayout}
+                label={
+                  <span>
+                    <strong style={{ color: "#f00" }}>*</strong>开票金额总计
+                  </span>
+                }
+              >
+                <span>{this.state.alreadyAmount}万元</span>
+              </FormItem>
+            </div>
+          </Spin>
+        </Form>
+      </Modal>
+    );
+  },
+});
+
+export default KaiPiaoModal;

+ 81 - 2
js/component/manageCenter/financialManage/distribute/shouKuanAll.jsx

@@ -21,6 +21,7 @@ import OrderDesc from "../orderDetail/orderDesc";
 import Receivable from "./receivable";
 import ResolutionDetail from "@/resolutionDetail";
 import Assign from "@/manageCenter/publicComponent/assign";
+import KaiPiaoModal from "./kaiPiaoModal";
 import ReactToPrint from "react-to-print";
 import {
   getLiquidationStatus,
@@ -31,7 +32,8 @@ import {
   getTaskStatus,
   getNewOrderStatus,
   getProjectStatus,
-  getjiedian
+  getjiedian,
+  splitUrl,
 } from "@/tools";
 import { ChooseList } from "../../order/orderNew/chooseList";
 import Project from "../../../../component/project"
@@ -1565,7 +1567,7 @@ const ShouKuang = React.createClass({
   },
   cuiTabChange(index) {
     this.setState({
-      cuiTabKey: index
+      cuiTabKey: index,
     });
     if (index == 2) {
       this.setState({
@@ -1687,6 +1689,76 @@ const ShouKuang = React.createClass({
       record,
     });
   },
+  kaiPiaoData(record) {
+    this.setState({
+      avisible: true,
+    });
+    this.invoiceData(record.id);
+  },
+  invoiceData(id) {
+    this.setState({
+      loading: true,
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url:
+        globalConfig.context + "/api/admin/orderInvoice/selectByIdOrderInvoice",
+      data: {
+        id,
+      },
+      success: function (data) {
+        let thisdata = data.data;
+        let obj = {
+          contractNo: thisdata.contractNo,
+          orderNo: thisdata.orderNo,
+          approval: thisdata.approval,
+          type: thisdata.type,
+          status: thisdata.status,
+          remarks: thisdata.remarks,
+          invoiceType: thisdata.invoiceType,
+          unitName: thisdata.unitName,
+          taxNumber: thisdata.taxNumber,
+          amount: thisdata.amount,
+          banks: thisdata.banks,
+          content: thisdata.content,
+          unitAddress: thisdata.unitAddress,
+          invoiceRemarks: thisdata.invoiceRemarks,
+          unitMobile: thisdata.unitMobile,
+          post: thisdata.post,
+          addressee: thisdata.addressee,
+          addresseeMobile: thisdata.addresseeMobile,
+          addresseeProvince: thisdata.addresseeProvince,
+          addresseeCity: thisdata.addresseeCity,
+          addresseeArea: thisdata.addresseeArea,
+          alreadyAmount: thisdata.alreadyAmount,
+          recipientAddress: thisdata.recipientAddress,
+          orgCodeUrl: thisdata.voucherUrl
+            ? splitUrl(
+                thisdata.voucherUrl,
+                ",",
+                globalConfig.avatarHost + "/upload"
+              )
+            : [],
+        };
+        this.setState({
+          modalData: obj,
+        });
+      }.bind(this),
+    }).done(
+      function () {
+        this.setState({
+          loading: false,
+        });
+      }.bind(this)
+    );
+  },
+  visitCancels() {
+    this.setState({
+      avisible: false,
+    });
+  },
   render() {
     const formItemLayout = {
       labelCol: { span: 8 },
@@ -2180,6 +2252,7 @@ const ShouKuang = React.createClass({
               <Table
                 columns={this.state.columnsDate}
                 dataSource={this.state.recordData}
+                onRowClick={this.kaiPiaoData}
                 pagination={false}
                 bordered
                 size="small"
@@ -2549,6 +2622,12 @@ const ShouKuang = React.createClass({
             content={() => this.refs.all}
           />
         </Modal>
+        <KaiPiaoModal
+          visible={this.state.avisible}
+          data={this.state.modalData}
+          onCancel={this.visitCancels}
+          loading={this.state.loading}
+        />
       </div>
     );
   },

+ 185 - 106
js/component/manageCenter/financialManage/distribute/shouKuang.jsx

@@ -22,6 +22,7 @@ import OrderDesc from "../orderDetail/orderDesc";
 import ResolutionDetail from "@/resolutionDetail";
 import Receivable from "./receivable";
 import Assign from "@/manageCenter/publicComponent/assign";
+import KaiPiaoModal from "./kaiPiaoModal";
 import ReactToPrint from "react-to-print";
 import {
   getLiquidationStatus,
@@ -32,7 +33,8 @@ import {
   getTaskStatus,
   getNewOrderStatus,
   getProjectStatus,
-  getjiedian
+  getjiedian,
+  splitUrl,
 } from "@/tools";
 import { ChooseList } from "../../order/orderNew/chooseList"
 import Project from "../../../../component/project"
@@ -52,7 +54,7 @@ const ShouKuang = React.createClass({
       crossDomain: false,
       url: globalConfig.context + "/api/admin/organization/selectSuperId",
       data: {},
-      success: function(data) {
+      success: function (data) {
         let thedata = data.data;
         let theArr = [];
         if (!thedata) {
@@ -60,20 +62,20 @@ const ShouKuang = React.createClass({
             message.warning(data.error[0].message);
           }
         } else {
-          thedata.map(function(item, index) {
+          thedata.map(function (item, index) {
             theArr.push({
               key: index,
               name: item.name,
-              id: item.id
+              id: item.id,
             });
           });
         }
         this.setState({
-          departmentArr: theArr
+          departmentArr: theArr,
         });
-      }.bind(this)
+      }.bind(this),
     }).always(
-      function() {
+      function () {
         // this.setState({
         //   loading: false
         // });
@@ -88,7 +90,7 @@ const ShouKuang = React.createClass({
       // selectedRowKey: [],
       page: pageNo || this.state.pageNo,
       loadingA: true,
-      pagination: this.state.pagination
+      pagination: this.state.pagination,
     });
     $.ajax({
       method: "get",
@@ -108,9 +110,9 @@ const ShouKuang = React.createClass({
         processStatus: this.state.processStatusSearch,
         contractNo: this.state.contractNoSearch,
         liquidationStatus: this.state.liquidationStatus,
-        amountStatus: this.state.amountStatus
+        amountStatus: this.state.amountStatus,
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         if (!data.data || !data.data.pagination.list) {
           if (data.error && data.error.length) {
@@ -164,14 +166,14 @@ const ShouKuang = React.createClass({
           dataSource: theArr,
           pagination: this.state.pagination,
           totalHui: data.data.count ? data.data.count.signTotalAmount : 0,
-          hui: data.data.count ? data.data.count.actuallyTotalAmount : 0
+          hui: data.data.count ? data.data.count.actuallyTotalAmount : 0,
         });
-      }.bind(this)
+      }.bind(this),
     }).always(
-      function() {
+      function () {
         // window.setTimeout(() => {
         this.setState({
-          loadingA: false
+          loadingA: false,
         });
         // },5000)
       }.bind(this)
@@ -411,9 +413,9 @@ const ShouKuang = React.createClass({
           title: "催收科目",
           dataIndex: "type",
           key: "type",
-          render: text => {
-            return "按时触发应收欠款"
-          }
+          render: (text) => {
+            return "按时触发应收欠款";
+          },
         },
         {
           title: "催款状态",
@@ -1084,7 +1086,7 @@ const ShouKuang = React.createClass({
 
   changeWater(billNo) {
     this.setState({
-      loading: true
+      loading: true,
     });
     $.ajax({
       method: "get",
@@ -1092,9 +1094,9 @@ const ShouKuang = React.createClass({
       crossDomain: false,
       url: globalConfig.context + "/api/admin/financial/deleteMyBill",
       data: {
-        billNo
+        billNo,
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         if (data.error && data.error.length) {
           message.warning(data.error[0].message);
@@ -1103,11 +1105,11 @@ const ShouKuang = React.createClass({
           this.waterData();
           this.loadData();
         }
-      }.bind(this)
+      }.bind(this),
     }).always(
-      function() {
+      function () {
         this.setState({
-          loading: false
+          loading: false,
         });
       }.bind(this)
     );
@@ -1120,14 +1122,14 @@ const ShouKuang = React.createClass({
       crossDomain: false,
       url: globalConfig.context + "/api/admin/financial/financeApproval",
       data: {
-        orderNo: record.orderNo
-      }
+        orderNo: record.orderNo,
+      },
     }).done(
-      function(data) {
+      function (data) {
         if (!data.error.length) {
           message.success("通过成功!");
           this.setState({
-            loading: false
+            loading: false,
           });
           this.loadData();
         } else {
@@ -1140,7 +1142,7 @@ const ShouKuang = React.createClass({
   evaluateX(recard) {
     this.state.assignDataX = recard;
     this.setState({
-      assignVisibleX: true
+      assignVisibleX: true,
     });
   },
   /* 转交 */
@@ -1148,7 +1150,7 @@ const ShouKuang = React.createClass({
     this.state.assignDataY = recard;
     this.setState({
       nub,
-      assignVisibleY: true
+      assignVisibleY: true,
     });
   },
   /* 驳回 */
@@ -1156,12 +1158,12 @@ const ShouKuang = React.createClass({
     this.setState({
       bohuiData: recard,
       boHuiVisible: true,
-      content: ""
+      content: "",
     });
   },
   boHuiOk() {
     this.setState({
-      boHuiVisible: false
+      boHuiVisible: false,
     });
     if (
       this.state.pagination.current == this.state.totalPage &&
@@ -1174,7 +1176,7 @@ const ShouKuang = React.createClass({
   },
   boHuiCancel() {
     this.setState({
-      boHuiVisible: false
+      boHuiVisible: false,
     });
   },
   componentWillMount() {
@@ -1184,7 +1186,7 @@ const ShouKuang = React.createClass({
   tableRowClick(record) {
     this.state.RowData = record;
     this.setState({
-      showDesc: true
+      showDesc: true,
     });
   },
   closeDesc(e, s) {
@@ -1215,12 +1217,12 @@ const ShouKuang = React.createClass({
   showRes(record) {
     this.setState({
       resVisible: true,
-      resRecord: record
+      resRecord: record,
     });
   },
   resCancel() {
     this.setState({
-      resVisible: false
+      resVisible: false,
     });
   },
 
@@ -1246,7 +1248,7 @@ const ShouKuang = React.createClass({
       return false;
     }
     this.setState({
-      loading: true
+      loading: true,
     });
     $.ajax({
       method: "POST",
@@ -1255,14 +1257,14 @@ const ShouKuang = React.createClass({
       url: globalConfig.context + "/api/admin/financial/reject",
       data: {
         orderNo: this.state.bohuiData.orderNo,
-        reason: this.state.content
-      }
+        reason: this.state.content,
+      },
     }).done(
-      function(data) {
+      function (data) {
         if (!data.error.length) {
           message.success("驳回成功!");
           this.setState({
-            loading: false
+            loading: false,
           });
           this.boHuiOk();
         } else {
@@ -1273,20 +1275,20 @@ const ShouKuang = React.createClass({
   },
   searchSwitch() {
     this.setState({
-      searchMore: !this.state.searchMore
+      searchMore: !this.state.searchMore,
     });
   },
   changeList(arr) {
     const newArr = [];
-    this.state.columns.forEach(item => {
-      arr.forEach(val => {
+    this.state.columns.forEach((item) => {
+      arr.forEach((val) => {
         if (val === item.title) {
           newArr.push(item);
         }
       });
     });
     this.setState({
-      changeList: newArr
+      changeList: newArr,
     });
   },
   callback(key) {
@@ -1306,12 +1308,12 @@ const ShouKuang = React.createClass({
   },
   inRecordCanl() {
     this.setState({
-      bvisible: false
+      bvisible: false,
     });
   },
   inRecordData() {
     this.setState({
-      loading: true
+      loading: true,
     });
     $.ajax({
       method: "get",
@@ -1322,9 +1324,9 @@ const ShouKuang = React.createClass({
         "/api/admin/orderInvoice/salesmanOrderInvoiceList",
       data: {
         orderNo: this.state.selectedRowKeys[0],
-        pageSize: 9999
+        pageSize: 9999,
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         let sum = 0;
         if (!data.data) {
@@ -1341,19 +1343,19 @@ const ShouKuang = React.createClass({
               amount: thisdata.amount, //签单金额
               createTime: thisdata.createTime, //流程状态
               status: thisdata.status, //结算状态
-              rejectReason: thisdata.rejectReason
+              rejectReason: thisdata.rejectReason,
             });
           }
         }
         this.setState({
           recordData: theArr,
-          sum: sum.toFixed(4)
+          sum: sum.toFixed(4),
         });
-      }.bind(this)
+      }.bind(this),
     }).done(
-      function() {
+      function () {
         this.setState({
-          loading: false
+          loading: false,
         });
       }.bind(this)
     );
@@ -1361,7 +1363,7 @@ const ShouKuang = React.createClass({
   waterData() {
     this.state.data = [];
     this.setState({
-      loading: true
+      loading: true,
     });
     $.ajax({
       method: "get",
@@ -1371,9 +1373,9 @@ const ShouKuang = React.createClass({
       data: {
         orderNo: this.state.selectedRowKeys[0],
         pageSize: 9999,
-        whoType: 1
+        whoType: 1,
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         let waterSum = 0;
         if (!data.data || !data.data.list) {
@@ -1409,26 +1411,26 @@ const ShouKuang = React.createClass({
               deleteSign: thisdata.deleteSign,
               deleteTimes: thisdata.deleteTimes,
               refundTimes: thisdata.refundTimes,
-              remarks: thisdata.remarks
+              remarks: thisdata.remarks,
             });
           }
         }
         this.setState({
           waterData: theArr,
-          waterSum: (Math.round(waterSum * 10000) / 10000).toFixed(4)
+          waterSum: (Math.round(waterSum * 10000) / 10000).toFixed(4),
         });
-      }.bind(this)
+      }.bind(this),
     }).always(
-      function() {
+      function () {
         this.setState({
-          loading: false
+          loading: false,
         });
       }.bind(this)
     );
   },
   waterCanl() {
     this.setState({
-      cvisible: false
+      cvisible: false,
     });
   },
   exportKaip() {
@@ -1459,13 +1461,13 @@ const ShouKuang = React.createClass({
   },
   printAll() {
     this.setState({
-      dvisible: true
+      dvisible: true,
     });
     this.loadData(1, 9999);
   },
   timeData() {
     this.setState({
-      loading: true
+      loading: true,
     });
     $.ajax({
       method: "get",
@@ -1474,9 +1476,9 @@ const ShouKuang = React.createClass({
       url: globalConfig.context + "/api/admin/orderProject/taskHoursList",
       data: {
         orderNo: this.state.selectedRowKeys[0],
-        pageSize: 9999
+        pageSize: 9999,
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         if (!data.data || !data.data.list) {
           if (data.error && data.error.length) {
@@ -1508,18 +1510,18 @@ const ShouKuang = React.createClass({
               outsource: thisdata.outsource,
               splitStatus: thisdata.splitStatus,
               splitSuper: thisdata.splitSuper,
-              splitId: thisdata.splitId
+              splitId: thisdata.splitId,
             });
           }
         }
         this.setState({
-          timeDataList: theArr
+          timeDataList: theArr,
         });
-      }.bind(this)
+      }.bind(this),
     }).always(
-      function() {
+      function () {
         this.setState({
-          loading: false
+          loading: false,
         });
       }.bind(this)
     );
@@ -1527,7 +1529,7 @@ const ShouKuang = React.createClass({
   exportTime() {
     const data = {
       orderNo: this.state.selectedRowKeys[0],
-      pageSize: 9999
+      pageSize: 9999,
     };
     window.location.href =
       globalConfig.context +
@@ -1536,7 +1538,7 @@ const ShouKuang = React.createClass({
   },
   exportPro() {
     const data = {
-      orderNo: this.state.selectedRowKeys[0]
+      orderNo: this.state.selectedRowKeys[0],
     };
     window.location.href =
       globalConfig.context +
@@ -1549,7 +1551,7 @@ const ShouKuang = React.createClass({
         ? this.state.selectedRowKeys[0]
         : undefined, //订单编号
       // specially: 1,
-      pageSize: 9999
+      pageSize: 9999,
     };
     window.location.href =
       globalConfig.context +
@@ -1558,7 +1560,7 @@ const ShouKuang = React.createClass({
   },
   cuiData() {
     this.setState({
-      loading: true
+      loading: true,
     });
     $.ajax({
       method: "get",
@@ -1567,9 +1569,9 @@ const ShouKuang = React.createClass({
       url: globalConfig.context + "/api/admin/newOrder/dunOrderNewList",
       data: {
         orderNo: this.state.selectedRowKeys[0],
-        pageSize: 9999
+        pageSize: 9999,
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         if (!data.data || !data.data.list) {
           if (data.error && data.error.length) {
@@ -1602,30 +1604,30 @@ const ShouKuang = React.createClass({
               hours: thisdata.hours,
               taskDistributionTime: thisdata.taskDistributionTime,
               taskEndTime: thisdata.taskEndTime,
-              dunStatus: thisdata.dunStatus == 0 ? "未触发" : "已触发"
+              dunStatus: thisdata.dunStatus == 0 ? "未触发" : "已触发",
             });
           }
         }
         this.setState({
-          cuiDataList: theArr
+          cuiDataList: theArr,
         });
-      }.bind(this)
+      }.bind(this),
     }).always(
-      function() {
+      function () {
         this.setState({
-          loading: false
+          loading: false,
         });
       }.bind(this)
     );
   },
   cuiTabChange(index) {
     this.setState({
-      cuiTabKey: index
+      cuiTabKey: index,
     });
-    if(index == 2) {
+    if (index == 2) {
       this.setState({
-        loading: true
-      })
+        loading: true,
+      });
       $.ajax({
         method: "get",
         dataType: "json",
@@ -1664,7 +1666,7 @@ const ShouKuang = React.createClass({
   },
   proData() {
     this.setState({
-      loading: true
+      loading: true,
     });
     $.ajax({
       method: "get",
@@ -1673,9 +1675,9 @@ const ShouKuang = React.createClass({
       url: globalConfig.context + "/api/admin/newOrder/getOrderTask",
       data: {
         orderNo: this.state.selectedRowKeys[0],
-        pageSize: 9999
+        pageSize: 9999,
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         let totalWaibao = 0;
         if (!data.data) {
@@ -1719,20 +1721,20 @@ const ShouKuang = React.createClass({
               outsourceName: thisdata.outsourceName,
               outsourcePrice: thisdata.outsourcePrice,
               outsource: thisdata.outsource,
-              splitStatus: thisdata.splitStatus
+              splitStatus: thisdata.splitStatus,
             });
           }
         }
         totalWaibao = (Math.round(totalWaibao * 10000) / 10000).toFixed(4);
         this.setState({
           proDataList: theArr,
-          totalWaibao
+          totalWaibao,
         });
-      }.bind(this)
+      }.bind(this),
     }).always(
-      function() {
+      function () {
         this.setState({
-          loading: false
+          loading: false,
         });
       }.bind(this)
     );
@@ -1740,7 +1742,7 @@ const ShouKuang = React.createClass({
   checkRemark(record) {
     this.setState({
       checkVisible: true,
-      checkOrderNo: record.orderNo
+      checkOrderNo: record.orderNo,
     });
   },
   checkOk() {
@@ -1749,7 +1751,7 @@ const ShouKuang = React.createClass({
       return;
     }
     this.setState({
-      loading: true
+      loading: true,
     });
     $.ajax({
       method: "post",
@@ -1758,9 +1760,9 @@ const ShouKuang = React.createClass({
       url: globalConfig.context + "/api/admin/financial/financeApproval",
       data: {
         orderNo: this.state.checkOrderNo,
-        remarks: this.state.checkData
+        remarks: this.state.checkData,
       },
-      success: function(data) {
+      success: function (data) {
         let theArr = [];
         if (!data.data) {
           if (data.error && data.error.length) {
@@ -1771,14 +1773,14 @@ const ShouKuang = React.createClass({
           this.loadData();
           this.setState({
             checkVisible: false,
-            checkData: ""
+            checkData: "",
           });
         }
-      }.bind(this)
+      }.bind(this),
     }).always(
-      function() {
+      function () {
         this.setState({
-          loading: false
+          loading: false,
         });
       }.bind(this)
     );
@@ -1786,13 +1788,83 @@ const ShouKuang = React.createClass({
   tableRowClickPro(record) {
     this.setState({
       pvisible: true,
-      record
+      record,
     });
   },
+  kaiPiaoData(record) {
+    this.setState({
+      avisible: true,
+    });
+    this.invoiceData(record.id)
+  },
+  invoiceData(id) {
+    this.setState({
+      loading: true,
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url:
+        globalConfig.context + "/api/admin/orderInvoice/selectByIdOrderInvoice",
+      data: {
+        id,
+      },
+      success: function (data) {
+        let thisdata = data.data;
+        let obj = {
+          contractNo: thisdata.contractNo,
+          orderNo: thisdata.orderNo,
+          approval: thisdata.approval,
+          type: thisdata.type,
+          status: thisdata.status,
+          remarks: thisdata.remarks,
+          invoiceType: thisdata.invoiceType,
+          unitName: thisdata.unitName,
+          taxNumber: thisdata.taxNumber,
+          amount: thisdata.amount,
+          banks: thisdata.banks,
+          content: thisdata.content,
+          unitAddress: thisdata.unitAddress,
+          invoiceRemarks: thisdata.invoiceRemarks,
+          unitMobile: thisdata.unitMobile,
+          post: thisdata.post,
+          addressee: thisdata.addressee,
+          addresseeMobile: thisdata.addresseeMobile,
+          addresseeProvince: thisdata.addresseeProvince,
+          addresseeCity: thisdata.addresseeCity,
+          addresseeArea: thisdata.addresseeArea,
+          alreadyAmount: thisdata.alreadyAmount,
+          recipientAddress: thisdata.recipientAddress,
+          orgCodeUrl: thisdata.voucherUrl
+            ? splitUrl(
+                thisdata.voucherUrl,
+                ",",
+                globalConfig.avatarHost + "/upload"
+              )
+            : [],
+        };
+        this.setState({
+          modalData: obj,
+        });
+      }.bind(this),
+    }).done(
+      function () {
+        this.setState({
+          loading: false,
+        });
+      }.bind(this)
+    );
+  },
+  visitCancels() {
+    this.setState({
+      avisible: false
+    })
+  },
   render() {
     const formItemLayout = {
       labelCol: { span: 8 },
-      wrapperCol: { span: 14 }
+      wrapperCol: { span: 14 },
     };
     const { RangePicker } = DatePicker;
     var departmentArr = this.state.departmentArr || [];
@@ -1801,7 +1873,7 @@ const ShouKuang = React.createClass({
       selectedRowKeys,
       onChange: this.onSelectChange,
       hideDefaultSelections: true,
-      type: "radio"
+      type: "radio",
     };
     return (
       <div className="user-content">
@@ -2282,6 +2354,7 @@ const ShouKuang = React.createClass({
               <Table
                 columns={this.state.columnsDate}
                 dataSource={this.state.recordData}
+                onRowClick={this.kaiPiaoData}
                 pagination={false}
                 bordered
                 size="small"
@@ -2676,9 +2749,15 @@ const ShouKuang = React.createClass({
             />
           </Modal>
         </Spin>
+        <KaiPiaoModal
+          visible={this.state.avisible}
+          data={this.state.modalData}
+          onCancel={this.visitCancels}
+          loading={this.state.loading}
+        />
       </div>
     );
-  }
+  },
 });
 
 export default ShouKuang;

+ 1 - 1
js/component/manageCenter/order/orderNew/changeComponent/changeApply.js

@@ -1187,7 +1187,7 @@ class ChangeApply extends Component {
         return;
       }
     }
-    if (!record.dunType) {
+    if (!record.dunType && record.dunType != 0) {
       message.warning("请选择对应科目");
       return;
     }

+ 2 - 2
js/component/manageCenter/project/task/myTask.jsx

@@ -340,7 +340,7 @@ const Task = React.createClass({
             } else if (text == 2) {
               return <Tag color="#2db7f5">审核驳回</Tag>;
             } else {
-              return "";
+              return "非外包";
             }
           },
         },
@@ -1766,7 +1766,7 @@ const Task = React.createClass({
         )}
         <ShowModalDiv ShowModal={this.state.showModal} />
         <div className="content-title" style={{ marginBottom: 10 }}>
-          <span style={{ fontWeight: 900, fontSize: 16 }}>项目派单管理</span>
+          <span style={{ fontWeight: 900, fontSize: 16 }}>项目任务</span>
         </div>
         <Tabs defaultActiveKey="2" className="test" bordered>
           <TabPane tab="更改表格显示数据" key="1">

+ 2 - 2
js/component/manageCenter/project/task/taskCount.jsx

@@ -1256,7 +1256,7 @@ const IntentionCustomer = Form.create()(
                       {...formItemLayout}
                       label="项目状态"
                     >
-                      <span>{getProcessStatus(this.state.projectStatus)}</span>
+                      <span>{getProjectStatus(this.state.projectStatus)}</span>
                     </FormItem>
                     <FormItem
                       className="half-item"
@@ -1813,7 +1813,7 @@ const IntentionCustomer = Form.create()(
                 {...formItemLayout}
                 label="项目状态"
               >
-                <span>{getProcessStatus(this.state.projectStatus)}</span>
+                <span>{getProjectStatus(this.state.projectStatus)}</span>
               </FormItem>
               <FormItem
                 className="half-item"

+ 2 - 2
js/component/manageCenter/project/task/taskQuery.jsx

@@ -1144,7 +1144,7 @@ const Task = React.createClass({
                         label="项目状态"
                       >
                         <span>
-                          {getProcessStatus(this.state.projectStatus)}
+                          {getProjectStatus(this.state.projectStatus)}
                         </span>
                       </FormItem>
                       <FormItem
@@ -1729,7 +1729,7 @@ const Task = React.createClass({
                   {...formItemLayout}
                   label="项目状态"
                 >
-                  <span>{getProcessStatus(this.state.projectStatus)}</span>
+                  <span>{getProjectStatus(this.state.projectStatus)}</span>
                 </FormItem>
                 <FormItem
                   className="half-item"

+ 9 - 3
js/component/manageCenter/statistics/personnel/personnelAll.jsx

@@ -1874,6 +1874,10 @@ const PersonnelAll = React.createClass({
     });
   },
   editUpgrade() {
+    if(!this.state.promotionList.oldLvl.length || !this.state.promotionList.newLvl.length) {
+      message.warning("请选择星级")
+      return
+    }
     this.setState({
       loading: true,
     });
@@ -2103,9 +2107,11 @@ const PersonnelAll = React.createClass({
                 style={{ width: 120, marginRight: 10 }}
                 value={this.state.statusSearch}
               >
-                <Option value="0">在职(试用期)</Option>
-                <Option value="1">在职(合同期)</Option>
-                <Option value="2">离职</Option>
+                <Option value="0">实习生</Option>
+                <Option value="1">在职(试用期)</Option>
+                <Option value="2">在职(合同期)</Option>
+                <Option value="3">兼职</Option>
+                <Option value="4">离职</Option>
               </Select>
               <Select
                 placeholder="所属公司"