Browse Source

开票优化

dev01 1 year ago
parent
commit
7644653de6

+ 4 - 4
js/component/manageCenter/financialManage/distribute/inSpecial.jsx

@@ -74,7 +74,7 @@ const inSpecial = React.createClass({
               id: thisdata.id,
               status: thisdata.status,
               unitName: thisdata.unitName,
-              orderNo: thisdata.orderno,
+              orderNo: thisdata.orderNo,
               name: thisdata.name,
               examineName: thisdata.examineName,
               processStatus: thisdata.processStatus,
@@ -389,8 +389,8 @@ const inSpecial = React.createClass({
         },
         {
           title: "订单编号",
-          dataIndex: "orderno",
-          key: "orderno",
+          dataIndex: "orderNo",
+          key: "orderNo",
         },
         {
           title: "开票金额(万元)",
@@ -530,7 +530,7 @@ const inSpecial = React.createClass({
             sum += parseFloat(thisdata.amount);
             theArr.push({
               id: thisdata.id,
-              orderno: thisdata.orderno, //订单编号
+              orderNo: thisdata.orderNo, //订单编号
               amount: thisdata.amount, //签单金额
               createTime: thisdata.createTime, //流程状态
               status: thisdata.status, //结算状态

+ 147 - 24
js/component/manageCenter/financialManage/distribute/invoiceApplyList.jsx

@@ -12,6 +12,7 @@ import {
   Modal,
   Popconfirm,
   Tabs,
+  DatePicker,
   Tooltip,
 } from "antd";
 import {
@@ -24,6 +25,7 @@ import {
   ShowModal,
   getProcessStatus,
 } from "@/tools";
+import moment from 'moment';
 import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
 import ShowModalDiv from "@/showModal.jsx";
 import OrderDesc from "../orderDetail/orderDesc";
@@ -35,6 +37,7 @@ import Cascaders from "../../../common/cascaders";
 
 const FormItem = Form.Item;
 const { TabPane } = Tabs;
+const { RangePicker } = DatePicker;
 
 const invoiceApplyList = React.createClass({
   loadData(pageNo) {
@@ -58,6 +61,12 @@ const invoiceApplyList = React.createClass({
         status: this.state.statusSearch,
         type: 0,
         approval: this.state.processStatus,
+
+        contractNo: this.state.contractNo, // 合同编号
+        userName: this.state.userName, // 客户名称
+        invoiceType: this.state.invoiceType, // 开票状态 1处理中 2通过  3驳回
+        startTime: this.state.releaseDate[0],
+        endTime: this.state.releaseDate[1],
       },
       success: function (data) {
         ShowModal(this);
@@ -70,11 +79,13 @@ const invoiceApplyList = React.createClass({
           for (let i = 0; i < data.data.list.length; i++) {
             let thisdata = data.data.list[i];
             theArr.push({
+              userName: thisdata.userName,
+              contractNo: thisdata.contractNo,
               key: i,
               id: thisdata.id,
               status: thisdata.status,
               unitName: thisdata.unitName,
-              orderNo: thisdata.orderno,
+              orderNo: thisdata.orderNo,
               name: thisdata.name,
               examineName: thisdata.examineName,
               processStatus: thisdata.processStatus,
@@ -206,26 +217,35 @@ const invoiceApplyList = React.createClass({
           // fixed: "left"
         },
         {
-          title: "客户",
+          title: "客户名称",
+          dataIndex: "userName",
+          key: "userName",
+          render: text => {
+            return (
+              <Tooltip title={text}>
+                <div style={{
+                }}>{text}</div>
+              </Tooltip>
+            )
+          }
+        },
+        {
+          title: "开票单位名称",
           dataIndex: "unitName",
           key: "unitName",
-          // width: 100,
-          render: (text) => {
+          render: text => {
             return (
               <Tooltip title={text}>
-                <div
-                  style={{
-                    // maxWidth: "100px",
-                    // overflow: "hidden",
-                    // textOverflow: "ellipsis",
-                    // whiteSpace: "nowrap",
-                  }}
-                >
-                  {text}
-                </div>
+                <div style={{
+                }}>{text}</div>
               </Tooltip>
-            );
-          },
+            )
+          }
+        },
+        {
+          title: "合同编号",
+          dataIndex: "contractNo",
+          key: "contractNo"
         },
         {
           title: "跟单人/签单人",
@@ -390,8 +410,8 @@ const invoiceApplyList = React.createClass({
         },
         {
           title: "订单编号",
-          dataIndex: "orderno",
-          key: "orderno",
+          dataIndex: "orderNo",
+          key: "orderNo",
         },
         {
           title: "开票金额(万元)",
@@ -531,7 +551,7 @@ const invoiceApplyList = React.createClass({
             sum += parseFloat(thisdata.amount);
             theArr.push({
               id: thisdata.id,
-              orderno: thisdata.orderno, //订单编号
+              orderNo: thisdata.orderNo, //订单编号
               amount: thisdata.amount, //签单金额
               createTime: thisdata.createTime, //流程状态
               status: thisdata.status, //结算状态
@@ -580,10 +600,64 @@ const invoiceApplyList = React.createClass({
   componentWillMount() {
     this.loadData();
   },
+
+  exportExec() {
+    message.config({
+      duration: 20,
+    });
+    let loading = message.loading("下载中...");
+    this.setState({
+      exportPendingLoading: true,
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: "/api/admin/orderInvoice/financeOrderInvoiceList/export",
+      data: {
+        name: this.state.nameSearch, //客户名称
+        orderNo: this.state.orderNoSearch,
+        deps: this.state.departmenttList,
+        status: this.state.statusSearch,
+        type: 0,
+        approval: this.state.processStatus,
+        contractNo: this.state.contractNo, // 合同编号
+        userName: this.state.userName, // 客户名称
+        invoiceType: this.state.invoiceType, // 开票状态 1处理中 2通过  3驳回
+        startTime: this.state.releaseDate[0],
+        endTime: this.state.releaseDate[1],
+      },
+      success: function (data) {
+        if (data.error.length === 0) {
+          this.download(data.data);
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        loading();
+        this.setState({
+          exportPendingLoading: false,
+        });
+      }.bind(this)
+    );
+  },
+
+  download(fileName) {
+    window.location.href =
+      globalConfig.context + "/open/download?fileName=" + fileName;
+  },
+
+
   reset() {
-    this.state.nameSearch = "";
+    this.state.invoiceType = undefined;
+    this.state.userName = undefined;
+    this.state.contractNo = undefined;
+
+    this.state.nameSearch = undefined;
     this.state.releaseDate = [];
-    this.state.orderNoSearch = "";
+    this.state.orderNoSearch = undefined;
     this.state.processStatus = [];
     this.state.departmenttList = undefined;
     this.state.statusSearch = [];
@@ -616,6 +690,7 @@ const invoiceApplyList = React.createClass({
     }
   },
   render() {
+    const newShiroList = window.adminData.shiroList == "" ? [] : window.adminData.shiroList.split(",");
     const formItemLayout = {
       labelCol: { span: 8 },
       wrapperCol: { span: 14 },
@@ -626,7 +701,7 @@ 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" className="test">
           <TabPane tab="搜索" key="1">
             <div className="user-search" style={{ marginLeft: 10 }}>
               <Input
@@ -637,13 +712,35 @@ const invoiceApplyList = React.createClass({
                 }}
               />
               <Input
+                placeholder="合同编号"
+                value={this.state.contractNo}
+                onChange={e => {
+                  this.setState({ contractNo: e.target.value });
+                }}
+              />
+              <Input
+                placeholder="客户名称"
+                value={this.state.userName}
+                onChange={e => {
+                  this.setState({ userName: e.target.value });
+                }}
+              />
+              <Input
                 placeholder="营销员名称"
                 value={this.state.nameSearch}
-                style={{ marginLeft: 10 }}
-                onChange={(e) => {
+                onChange={e => {
                   this.setState({ nameSearch: e.target.value });
                 }}
               />
+              <Select placeholder="开票状态"
+                style={{ width: 120, }}
+                value={this.state.invoiceType}
+                onChange={(e) => { this.setState({ invoiceType: e }) }}
+              >
+                <Select.Option value="1" >处理中</Select.Option>
+                <Select.Option value="2" >通过</Select.Option>
+                <Select.Option value="3" >驳回</Select.Option>
+              </Select>
               <Cascaders
                 ref={node => this.Cascaders = node}
                 placeholder="订单部门"
@@ -657,6 +754,20 @@ const invoiceApplyList = React.createClass({
                   });
                 }}
               />
+              <span style={{ marginRight: "10px" }}>申请时间 :</span>
+              <RangePicker
+                value={[
+                  this.state.releaseDate[0]
+                    ? moment(this.state.releaseDate[0])
+                    : null,
+                  this.state.releaseDate[1]
+                    ? moment(this.state.releaseDate[1])
+                    : null,
+                ]}
+                onChange={(data, dataString) => {
+                  this.setState({ releaseDate: dataString });
+                }}
+              />
               {/* <DepartmentList
                 value={this.state.departmenttList}
                 onChange={(e) => {
@@ -683,6 +794,18 @@ const invoiceApplyList = React.createClass({
               />
             </div>
           </TabPane>
+          {/* 管理员才能导出 */}
+          <TabPane tab="导出" key="3" disabled={!newShiroList.includes("99")}>
+            <div>
+              <Button
+                loading={this.state.exportPendingLoading}
+                onClick={() => { this.exportExec() }}
+                style={{ margin: 10 }}
+              >
+                导出excel
+              </Button>
+            </div>
+          </TabPane>
         </Tabs>
         <div className="patent-table">
           <Spin spinning={this.state.listLoading}>

+ 144 - 20
js/component/manageCenter/financialManage/distribute/invoiceApplyListQuery.jsx

@@ -11,6 +11,7 @@ import {
   message,
   Modal,
   Upload,
+  DatePicker,
   Tabs, Tooltip
 } from "antd";
 import {
@@ -24,6 +25,7 @@ import {
   ShowModal,
   getApproval
 } from "@/tools";
+import moment from 'moment';
 import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
 import ShowModalDiv from "@/showModal.jsx";
 import OrderDesc from "../orderDetail/orderDesc";
@@ -33,6 +35,7 @@ import LogPopup from "../../../common/logPopup";
 import Cascaders from "../../../common/cascaders";
 const FormItem = Form.Item;
 const { TabPane } = Tabs
+const { RangePicker } = DatePicker;
 
 const invoiceApplyListQuery = React.createClass({
   loadData(pageNo) {
@@ -50,13 +53,19 @@ const invoiceApplyListQuery = React.createClass({
       data: {
         pageNo: pageNo || 1,
         pageSize: this.state.pagination.pageSize,
-        name: this.state.nameSearch, //客户名称
+        name: this.state.nameSearch, // 营销员名称
         orderNo: this.state.orderNoSearch,
         deps: this.state.departmenttList,
         status: this.state.statusSearch,
         type: 0,
         approval: this.state.processStatus,
         all: 1,
+
+        contractNo: this.state.contractNo, // 合同编号
+        userName: this.state.userName, // 客户名称
+        invoiceType: this.state.invoiceType, // 开票状态 1处理中 2通过  3驳回
+        startTime: this.state.releaseDate[0],
+        endTime: this.state.releaseDate[1],
       },
       success: function (data) {
         ShowModal(this);
@@ -69,11 +78,13 @@ const invoiceApplyListQuery = React.createClass({
           for (let i = 0; i < data.data.list.length; i++) {
             let thisdata = data.data.list[i];
             theArr.push({
+              userName: thisdata.userName,
+              contractNo: thisdata.contractNo,
               key: i,
               id: thisdata.id,
               status: thisdata.status,
               unitName: thisdata.unitName,
-              orderNo: thisdata.orderno,
+              orderNo: thisdata.orderNo,
               name: thisdata.name,
               processStatus: thisdata.processStatus,
               projectStatus: thisdata.projectStatus,
@@ -201,24 +212,37 @@ const invoiceApplyListQuery = React.createClass({
           // fixed: "left"
         },
         {
-          title: "客户",
+          title: "客户名称",
+          dataIndex: "userName",
+          key: "userName",
+          render: text => {
+            return (
+              <Tooltip title={text}>
+                <div style={{
+                }}>{text}</div>
+              </Tooltip>
+            )
+          }
+        },
+        {
+          title: "开票单位名称",
           dataIndex: "unitName",
           key: "unitName",
-          // width: 100,
           render: text => {
             return (
               <Tooltip title={text}>
                 <div style={{
-                  // maxWidth: '100px',
-                  // overflow: 'hidden',
-                  // textOverflow: "ellipsis",
-                  // whiteSpace: 'nowrap',
                 }}>{text}</div>
               </Tooltip>
             )
           }
         },
         {
+          title: "合同编号",
+          dataIndex: "contractNo",
+          key: "contractNo"
+        },
+        {
           title: "跟单人/签单人",
           dataIndex: "name",
           key: "name"
@@ -347,8 +371,8 @@ const invoiceApplyListQuery = React.createClass({
         },
         {
           title: "订单编号",
-          dataIndex: "orderno",
-          key: "orderno"
+          dataIndex: "orderNo",
+          key: "orderNo"
         },
         {
           title: "开票金额(万元)",
@@ -411,6 +435,55 @@ const invoiceApplyListQuery = React.createClass({
     );
   },
 
+  exportExec() {
+    message.config({
+      duration: 20,
+    });
+    let loading = message.loading("下载中...");
+    this.setState({
+      exportPendingLoading: true,
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: "/api/admin/orderInvoice/financeOrderInvoiceList/export",
+      data: {
+        name: this.state.nameSearch, // 营销员名称
+        orderNo: this.state.orderNoSearch,
+        deps: this.state.departmenttList,
+        status: this.state.statusSearch,
+        type: 0,
+        approval: this.state.processStatus,
+        all: 1,
+        contractNo: this.state.contractNo, // 合同编号
+        userName: this.state.userName, // 客户名称
+        invoiceType: this.state.invoiceType, // 开票状态 1处理中 2通过  3驳回
+        startTime: this.state.releaseDate[0],
+        endTime: this.state.releaseDate[1],
+      },
+      success: function (data) {
+        if (data.error.length === 0) {
+          this.download(data.data);
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        loading();
+        this.setState({
+          exportPendingLoading: false,
+        });
+      }.bind(this)
+    );
+  },
+
+  download(fileName) {
+    window.location.href =
+      globalConfig.context + "/open/download?fileName=" + fileName;
+  },
+
   //重置拒绝理由
   resetReason() {
     this.setState({
@@ -484,7 +557,7 @@ const invoiceApplyListQuery = React.createClass({
             sum += parseFloat(thisdata.amount);
             theArr.push({
               id: thisdata.id,
-              orderno: thisdata.orderno, //订单编号
+              orderNo: thisdata.orderNo, //订单编号
               amount: thisdata.amount, //签单金额
               createTime: thisdata.createTime, //流程状态
               status: thisdata.status, //结算状态
@@ -534,9 +607,15 @@ const invoiceApplyListQuery = React.createClass({
     this.loadData();
   },
   reset() {
-    this.state.nameSearch = "";
+    // this.state.releaseDate[0] = undefined;
+    // this.state.releaseDate[1] = undefined;
+    this.state.invoiceType = undefined;
+    this.state.userName = undefined;
+    this.state.contractNo = undefined;
+
+    this.state.nameSearch = undefined;
     this.state.releaseDate = [];
-    this.state.orderNoSearch = "";
+    this.state.orderNoSearch = undefined;
     this.state.processStatus = [];
     this.state.departmenttList = undefined;
     this.state.statusSearch = [];
@@ -570,6 +649,7 @@ const invoiceApplyListQuery = React.createClass({
     }
   },
   render() {
+    const newShiroList = window.adminData.shiroList == "" ? [] : window.adminData.shiroList.split(",");
     const formItemLayout = {
       labelCol: { span: 8 },
       wrapperCol: { span: 14 }
@@ -582,25 +662,47 @@ const invoiceApplyListQuery = React.createClass({
         </div>
         <Tabs
           defaultActiveKey="1"
-          onChange={this.callback}
           className="test">
           <TabPane tab="搜索" key="1">
             <div className="user-search">
               <Input
                 placeholder="订单编号"
                 value={this.state.orderNoSearch}
+                style={{ marginLeft: 10 }}
                 onChange={e => {
                   this.setState({ orderNoSearch: e.target.value });
                 }}
               />
               <Input
+                placeholder="合同编号"
+                value={this.state.contractNo}
+                onChange={e => {
+                  this.setState({ contractNo: e.target.value });
+                }}
+              />
+              <Input
+                placeholder="客户名称"
+                value={this.state.userName}
+                onChange={e => {
+                  this.setState({ userName: e.target.value });
+                }}
+              />
+              <Input
                 placeholder="营销员名称"
                 value={this.state.nameSearch}
-                style={{ marginLeft: 10 }}
                 onChange={e => {
                   this.setState({ nameSearch: e.target.value });
                 }}
               />
+              <Select placeholder="开票状态"
+                style={{ width: 120, }}
+                value={this.state.invoiceType}
+                onChange={(e) => { this.setState({ invoiceType: e }) }}
+              >
+                <Select.Option value="1" >处理中</Select.Option>
+                <Select.Option value="2" >通过</Select.Option>
+                <Select.Option value="3" >驳回</Select.Option>
+              </Select>
               <Cascaders
                 ref={node => this.Cascaders = node}
                 placeholder="订单部门"
@@ -614,11 +716,21 @@ const invoiceApplyListQuery = React.createClass({
                   });
                 }}
               />
-              {/* <DepartmentList
-                  value={this.state.departmenttList}
-                  onChange={e => {
-                this.setState({ departmenttList: e });
-              }}/> */}
+              <span style={{ marginRight: "10px" }}>申请时间 :</span>
+              <RangePicker
+                value={[
+                  this.state.releaseDate[0]
+                    ? moment(this.state.releaseDate[0])
+                    : null,
+                  this.state.releaseDate[1]
+                    ? moment(this.state.releaseDate[1])
+                    : null,
+                ]}
+                onChange={(data, dataString) => {
+                  this.setState({ releaseDate: dataString });
+                }}
+              />
+
               <Button
                 type="primary"
                 onClick={this.search}
@@ -640,6 +752,18 @@ const invoiceApplyListQuery = React.createClass({
             </div>
 
           </TabPane>
+          {/* 管理员才能导出 */}
+          <TabPane tab="导出" key="3" disabled={!newShiroList.includes("99")}>
+            <div>
+              <Button
+                loading={this.state.exportPendingLoading}
+                onClick={() => { this.exportExec() }}
+                style={{ margin: 10 }}
+              >
+                导出excel
+              </Button>
+            </div>
+          </TabPane>
         </Tabs>
         <div className="patent-table">
           <Spin spinning={this.state.listLoading}>

+ 147 - 26
js/component/manageCenter/financialManage/distribute/invoiceApplyListWai.jsx

@@ -14,6 +14,7 @@ import {
   Tabs,
   Popconfirm,
   Tooltip,
+  DatePicker,
 } from "antd";
 import {
   getProvinceA,
@@ -24,9 +25,7 @@ import {
   getPeople,
   splitUrl,
 } from "@/tools";
-
-const FormItem = Form.Item;
-const { TabPane } = Tabs;
+import moment from 'moment';
 import OrderDesc from "../orderDetail/orderDesc";
 import { ChooseList } from "../../order/orderNew/chooseList";
 import { getProjectName } from "../../../tools";
@@ -34,6 +33,10 @@ import DepartmentList from "../../../common/departmentList";
 import LogPopup from "../../../common/logPopup";
 import Cascaders from "../../../common/cascaders";
 
+const FormItem = Form.Item;
+const { TabPane } = Tabs;
+const { RangePicker } = DatePicker;
+
 const invoiceApplyListWai = React.createClass({
   loadData(pageNo) {
     this.state.data = [];
@@ -54,6 +57,12 @@ const invoiceApplyListWai = React.createClass({
         orderNo: this.state.orderNoSearch,
         deps: this.state.departmenttList,
         type: 1,
+
+        contractNo: this.state.contractNo, // 合同编号
+        userName: this.state.userName, // 客户名称
+        invoiceType: this.state.invoiceType, // 开票状态 1处理中 2通过  3驳回
+        startTime: this.state.releaseDate[0],
+        endTime: this.state.releaseDate[1],
       },
       success: function (data) {
         let theArr = [];
@@ -65,11 +74,13 @@ const invoiceApplyListWai = React.createClass({
           for (let i = 0; i < data.data.list.length; i++) {
             let thisdata = data.data.list[i];
             theArr.push({
+              userName: thisdata.userName,
+              contractNo: thisdata.contractNo,
               key: i,
               id: thisdata.id,
               status: thisdata.status,
               unitName: thisdata.unitName,
-              orderNo: thisdata.orderno,
+              orderNo: thisdata.orderNo,
               name: thisdata.name,
               projectStatus: thisdata.projectStatus,
               examineName: thisdata.examineName,
@@ -189,7 +200,6 @@ const invoiceApplyListWai = React.createClass({
       selectedRowKeys: [],
       selectedRows: [],
       loading: false,
-      contractNo: "",
       reason: "",
       foo: 0,
       pagination: {
@@ -211,26 +221,35 @@ const invoiceApplyListWai = React.createClass({
           key: "id",
         },
         {
-          title: "客户",
+          title: "客户名称",
+          dataIndex: "userName",
+          key: "userName",
+          render: text => {
+            return (
+              <Tooltip title={text}>
+                <div style={{
+                }}>{text}</div>
+              </Tooltip>
+            )
+          }
+        },
+        {
+          title: "开票单位名称",
           dataIndex: "unitName",
           key: "unitName",
-          // width: 100,
-          render: (text) => {
+          render: text => {
             return (
               <Tooltip title={text}>
-                <div
-                  style={{
-                    // maxWidth: "100px",
-                    // overflow: "hidden",
-                    // textOverflow: "ellipsis",
-                    // whiteSpace: "nowrap",
-                  }}
-                >
-                  {text}
-                </div>
+                <div style={{
+                }}>{text}</div>
               </Tooltip>
-            );
-          },
+            )
+          }
+        },
+        {
+          title: "合同编号",
+          dataIndex: "contractNo",
+          key: "contractNo"
         },
         {
           title: "跟单人/签单人",
@@ -395,8 +414,8 @@ const invoiceApplyListWai = React.createClass({
         },
         {
           title: "订单编号",
-          dataIndex: "orderno",
-          key: "orderno",
+          dataIndex: "orderNo",
+          key: "orderNo",
         },
         {
           title: "开票金额(万元)",
@@ -539,7 +558,7 @@ const invoiceApplyListWai = React.createClass({
             sum += parseFloat(thisdata.amount);
             theArr.push({
               id: thisdata.id,
-              orderno: thisdata.orderno, //订单编号
+              orderNo: thisdata.orderNo, //订单编号
               amount: thisdata.amount, //签单金额
               createTime: thisdata.createTime, //流程状态
               status: thisdata.status, //结算状态
@@ -588,9 +607,60 @@ const invoiceApplyListWai = React.createClass({
   componentWillMount() {
     this.loadData();
   },
+
+  exportExec() {
+    message.config({
+      duration: 20,
+    });
+    let loading = message.loading("下载中...");
+    this.setState({
+      exportPendingLoading: true,
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: "/api/admin/orderInvoice/financeOrderInvoiceList/export",
+      data: {
+        name: this.state.nameSearch, //客户名称
+        orderNo: this.state.orderNoSearch,
+        deps: this.state.departmenttList,
+        type: 1,
+        contractNo: this.state.contractNo, // 合同编号
+        userName: this.state.userName, // 客户名称
+        invoiceType: this.state.invoiceType, // 开票状态 1处理中 2通过  3驳回
+        startTime: this.state.releaseDate[0],
+        endTime: this.state.releaseDate[1],
+      },
+      success: function (data) {
+        if (data.error.length === 0) {
+          this.download(data.data);
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        loading();
+        this.setState({
+          exportPendingLoading: false,
+        });
+      }.bind(this)
+    );
+  },
+
+  download(fileName) {
+    window.location.href =
+      globalConfig.context + "/open/download?fileName=" + fileName;
+  },
+
   reset() {
+    this.state.invoiceType = undefined;
+    this.state.userName = undefined;
+    this.state.contractNo = undefined;
+
     this.state.nameSearch = undefined;
-    this.state.releaseDate = undefined;
+    this.state.releaseDate = [];
     this.state.orderNoSearch = undefined;
     this.state.processStatus = undefined;
     this.state.departmenttList = undefined;
@@ -611,6 +681,7 @@ const invoiceApplyListWai = React.createClass({
     });
   },
   render() {
+    const newShiroList = window.adminData.shiroList == "" ? [] : window.adminData.shiroList.split(",");
     const formItemLayout = {
       labelCol: { span: 8 },
       wrapperCol: { span: 14 },
@@ -620,7 +691,7 @@ const invoiceApplyListWai = 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" className="test">
           <TabPane tab="搜索" key="1">
             <div className="user-search" style={{ padding: "0 10px" }}>
               <Input
@@ -631,12 +702,35 @@ const invoiceApplyListWai = React.createClass({
                 }}
               />
               <Input
+                placeholder="合同编号"
+                value={this.state.contractNo}
+                onChange={e => {
+                  this.setState({ contractNo: e.target.value });
+                }}
+              />
+              <Input
+                placeholder="客户名称"
+                value={this.state.userName}
+                onChange={e => {
+                  this.setState({ userName: e.target.value });
+                }}
+              />
+              <Input
                 placeholder="营销员名称"
                 value={this.state.nameSearch}
-                onChange={(e) => {
+                onChange={e => {
                   this.setState({ nameSearch: e.target.value });
                 }}
               />
+              <Select placeholder="开票状态"
+                style={{ width: 120, }}
+                value={this.state.invoiceType}
+                onChange={(e) => { this.setState({ invoiceType: e }) }}
+              >
+                <Select.Option value="1" >处理中</Select.Option>
+                <Select.Option value="2" >通过</Select.Option>
+                <Select.Option value="3" >驳回</Select.Option>
+              </Select>
               <Cascaders
                 ref={node => this.Cascaders = node}
                 placeholder="订单部门"
@@ -656,6 +750,21 @@ const invoiceApplyListWai = React.createClass({
                   this.setState({ departmenttList: e });
                 }}
               /> */}
+              <span style={{ marginRight: "10px" }}>申请时间 :</span>
+              <RangePicker
+                value={[
+                  this.state.releaseDate[0]
+                    ? moment(this.state.releaseDate[0])
+                    : null,
+                  this.state.releaseDate[1]
+                    ? moment(this.state.releaseDate[1])
+                    : null,
+                ]}
+                onChange={(data, dataString) => {
+                  this.setState({ releaseDate: dataString });
+                }}
+              />
+
               <Button
                 type="primary"
                 onClick={this.search}
@@ -677,6 +786,18 @@ const invoiceApplyListWai = React.createClass({
               />
             </div>
           </TabPane>
+          {/* 管理员才能导出 */}
+          <TabPane tab="导出" key="3" disabled={!newShiroList.includes("99")}>
+            <div>
+              <Button
+                loading={this.state.exportPendingLoading}
+                onClick={() => { this.exportExec() }}
+                style={{ margin: 10 }}
+              >
+                导出excel
+              </Button>
+            </div>
+          </TabPane>
         </Tabs>
         <div className="patent-table">
           <Spin spinning={this.state.loading}>

+ 174 - 113
js/component/manageCenter/financialManage/distribute/outInvoiceQuery.jsx

@@ -11,6 +11,7 @@ import {
   message,
   Modal,
   Upload,
+  DatePicker,
   Tabs, Tooltip
 } from "antd";
 import {
@@ -24,6 +25,7 @@ import {
   splitUrl,
   ShowModal
 } from "@/tools";
+import moment from 'moment';
 import ShowModalDiv from "@/showModal.jsx";
 import { ChooseList } from "../../../../component/manageCenter/order/orderNew/chooseList";
 import ImgList from "../../../common/imgList";
@@ -34,9 +36,11 @@ import Cascaders from "../../../common/cascaders";
 
 const FormItem = Form.Item;
 const { TabPane } = Tabs
+const { RangePicker } = DatePicker;
 
 const outInvoiceQuery = React.createClass({
   loadData(pageNo) {
+    const { pagination } = this.state
     this.state.data = [];
     this.setState({
       loading: true
@@ -58,49 +62,41 @@ const outInvoiceQuery = React.createClass({
         type: 1,
         approval: this.state.processStatus,
         all: 1,
+
+        contractNo: this.state.contractNo, // 合同编号
+        userName: this.state.userName, // 客户名称
+        invoiceType: this.state.invoiceType, // 开票状态 1处理中 2通过  3驳回
+        startTime: this.state.releaseDate[0],
+        endTime: this.state.releaseDate[1],
       },
       success: function (data) {
+        this.setState({
+          loading: false,
+        });
         ShowModal(this);
-        let theArr = [];
-        if (!data.data || !data.data.list) {
-          if (data.error && data.error.length) {
-            message.warning(data.error[0].message);
-          }
-        } else {
-          for (let i = 0; i < data.data.list.length; i++) {
-            let thisdata = data.data.list[i];
-            theArr.push({
-              key: i,
-              id: thisdata.id,
-              status: thisdata.status,
-              unitName: thisdata.unitName,
-              orderno: thisdata.orderno,
-              name: thisdata.name,
-              projectStatus: thisdata.projectStatus,
-              examineName: thisdata.examineName,
-              processStatus: thisdata.processStatus,
-              amount: thisdata.amount,
-              sumAmount: thisdata.sumAmount,
-              createTime: thisdata.createTime
-                ? new Date(thisdata.createTime).toLocaleString()
-                : "",
-              settlementAmount: thisdata.settlementAmount,
-              notAmount: thisdata.notAmount,
-              approval: thisdata.approval
+        if (data.error && data.error.length === 0) {
+          if (data.data.list) {
+            pagination.current = data.data.pageNo;
+            pagination.total = data.data.totalCount;
+            if (data.data && data.data.list && !data.data.list.length) {
+              pagination.current = 0;
+              pagination.total = 0;
+            }
+            this.setState({
+              dataSource: data.data.list,
+              pagination: this.state.pagination,
+              pageNo: data.data.pageNo,
+              totalPage: data.data.totalPage,
+            });
+          } else {
+            this.setState({
+              dataSource: data.data,
+              pagination: false,
             });
           }
+        } else {
+          message.warning(data.error[0].message);
         }
-        this.state.pagination.current = data.data.pageNo;
-        this.state.pagination.total = data.data.totalCount;
-        if (data.data && data.data.list && !data.data.list.length) {
-          this.state.pagination.current = 0;
-          this.state.pagination.total = 0;
-        }
-        this.setState({
-          totalPage: data.data.totalPage,
-          dataSource: theArr,
-          pagination: this.state.pagination
-        });
       }.bind(this)
     }).always(
       function () {
@@ -176,7 +172,6 @@ const outInvoiceQuery = React.createClass({
       boHuivisible: false,
       selectedRowKeys: [],
       selectedRows: [],
-      contractNo: "",
       loading: false,
       reason: "",
       foo: 0,
@@ -186,6 +181,9 @@ const outInvoiceQuery = React.createClass({
         showQuickJumper: true,
         pageSize: 10,
         onChange: function (page) {
+          this.setState({
+            pageNo: page,
+          });
           this.loadData(page);
         }.bind(this),
         showTotal: function (total) {
@@ -199,34 +197,31 @@ const outInvoiceQuery = React.createClass({
           key: "id",
         },
         {
-          title: "客户",
+          title: "客户名称",
+          dataIndex: "userName",
+          key: "userName",
+        },
+        {
+          title: "开票单位名称",
           dataIndex: "unitName",
           key: "unitName",
-          render: text => {
-            return (
-              <Tooltip title={text}>
-                <div style={{
-                  // maxWidth: '100px',
-                  // overflow: 'hidden',
-                  // textOverflow: "ellipsis",
-                  // whiteSpace: 'nowrap',
-                }}>{text}</div>
-              </Tooltip>
-            )
-          }
+        },
+        {
+          title: "合同编号",
+          dataIndex: "contractNo",
+          key: "contractNo",
         },
         {
           title: "跟单人/签单人",
           dataIndex: "name",
-          key: "name"
+          key: "name",
         },
         {
           title: "开票状态",
-          dataIndex: "status",
-          key: "status",
+          dataIndex: "stu",
+          key: "stu",
           render: (text, record) => {
-            // return getStatus(text);
-            return getInvoiceStatus(text, record);
+            return getInvoiceStatus(record.status, record);
           }
         },
         {
@@ -245,47 +240,41 @@ const outInvoiceQuery = React.createClass({
             return getProjectName(text);
           }
         },
-        // {
-        //   title: "特批状态",
-        //   dataIndex: "approval",
-        //   key: "approval",
-        //   render: text => {
-        //     return getApproval(text);
-        //   }
-        // },
         {
           title: "审核状态",
           dataIndex: "status",
-          key: "statusA",
+          key: "status",
           render: text => {
             return text === 1 ? "待审核" : "审核通过";
           }
         },
-
         {
           title: "申请开票(万)",
           dataIndex: "amount",
-          key: "amount"
+          key: "amount",
         },
         {
           title: "已开票(万)",
           dataIndex: "sumAmount",
-          key: "sumAmount"
+          key: "sumAmount",
         },
         {
           title: "已收款",
           dataIndex: "settlementAmount",
-          key: "settlementAmount"
+          key: "settlementAmount",
         },
         {
           title: "未收款",
           dataIndex: "notAmount",
-          key: "notAmount"
+          key: "notAmount",
         },
         {
           title: "申请时间",
           dataIndex: "createTime",
-          key: "createTime"
+          key: "createTime",
+          render: text => {
+            return text ? new Date(text).toLocaleString() : ""
+          }
         },
         {
           title: "操作",
@@ -329,33 +318,27 @@ const outInvoiceQuery = React.createClass({
         {
           title: "编号",
           dataIndex: "id",
-          key: "id"
+          key: "id",
         },
         {
           title: "订单编号",
-          dataIndex: "orderno",
-          key: "orderno"
+          dataIndex: "orderNo",
+          key: "orderNo",
         },
         {
           title: "开票金额(万元)",
           dataIndex: "amount",
-          key: "amount"
+          key: "amount",
         },
         {
           title: "申请时间",
           dataIndex: "createTime",
-          key: "createTime"
+          key: "createTime",
         },
         {
           title: "开票状态",
           dataIndex: "status",
           key: "status",
-          // render: text => {
-          //   return getInvoiceStatus(text, {
-          //     approval: 0
-          //   });
-
-          // }
           render: (text, record) => {
             return <div>{getInvoiceStatus(text, record)} <LogPopup id={record.id} /></div>;
           },
@@ -476,7 +459,7 @@ const outInvoiceQuery = React.createClass({
             sum += parseFloat(thisdata.amount);
             theArr.push({
               id: thisdata.id,
-              orderno: thisdata.orderno, //订单编号
+              orderNo: thisdata.orderNo, //订单编号
               amount: thisdata.amount, //签单金额
               createTime: thisdata.createTime, //流程状态
               status: thisdata.status, //结算状态
@@ -504,7 +487,7 @@ const outInvoiceQuery = React.createClass({
     this.setState(
       {
         bvisible: true,
-        orderNo2: record.orderno
+        orderNo2: record.orderNo
       },
       () => {
         this.inRecordData();
@@ -539,10 +522,64 @@ const outInvoiceQuery = React.createClass({
   componentWillMount() {
     this.loadData();
   },
+
+  exportExec() {
+    message.config({
+      duration: 20,
+    });
+    let loading = message.loading("下载中...");
+    this.setState({
+      exportPendingLoading: true,
+    });
+    $.ajax({
+      method: "get",
+      dataType: "json",
+      crossDomain: false,
+      url: "/api/admin/orderInvoice/financeOrderInvoiceList/export",
+      data: {
+        name: this.state.nameSearch, //客户名称
+        orderNo: this.state.orderNoSearch,
+        deps: this.state.departmenttList,
+        status: this.state.statusSearch,
+        type: 1,
+        approval: this.state.processStatus,
+        all: 1,
+        contractNo: this.state.contractNo, // 合同编号
+        userName: this.state.userName, // 客户名称
+        invoiceType: this.state.invoiceType, // 开票状态 1处理中 2通过  3驳回
+        startTime: this.state.releaseDate[0],
+        endTime: this.state.releaseDate[1],
+      },
+      success: function (data) {
+        if (data.error.length === 0) {
+          this.download(data.data);
+        } else {
+          message.warning(data.error[0].message);
+        }
+      }.bind(this),
+    }).always(
+      function () {
+        loading();
+        this.setState({
+          exportPendingLoading: false,
+        });
+      }.bind(this)
+    );
+  },
+
+  download(fileName) {
+    window.location.href =
+      globalConfig.context + "/open/download?fileName=" + fileName;
+  },
+
   reset() {
-    this.state.nameSearch = "";
+    this.state.invoiceType = undefined;
+    this.state.userName = undefined;
+    this.state.contractNo = undefined;
+
+    this.state.nameSearch = undefined;
     this.state.releaseDate = [];
-    this.state.orderNoSearch = "";
+    this.state.orderNoSearch = undefined;
     this.state.processStatus = [];
     this.state.departmenttList = undefined;
     this.state.statusSearch = [];
@@ -550,6 +587,7 @@ const outInvoiceQuery = React.createClass({
     this.loadData();
   },
   render() {
+    const newShiroList = window.adminData.shiroList == "" ? [] : window.adminData.shiroList.split(",");
     const formItemLayout = {
       labelCol: { span: 8 },
       wrapperCol: { span: 14 }
@@ -562,7 +600,6 @@ const outInvoiceQuery = React.createClass({
         </div>
         <Tabs
           defaultActiveKey="1"
-          onChange={this.callback}
           className="test">
           <TabPane tab="搜索" key="1">
             <div className="user-search">
@@ -574,6 +611,20 @@ const outInvoiceQuery = React.createClass({
                 }}
               />
               <Input
+                placeholder="合同编号"
+                value={this.state.contractNo}
+                onChange={e => {
+                  this.setState({ contractNo: e.target.value });
+                }}
+              />
+              <Input
+                placeholder="客户名称"
+                value={this.state.userName}
+                onChange={e => {
+                  this.setState({ userName: e.target.value });
+                }}
+              />
+              <Input
                 placeholder="营销员名称"
                 value={this.state.nameSearch}
                 style={{ marginLeft: 10 }}
@@ -581,6 +632,15 @@ const outInvoiceQuery = React.createClass({
                   this.setState({ nameSearch: e.target.value });
                 }}
               />
+              <Select placeholder="开票状态"
+                style={{ width: 120, }}
+                value={this.state.invoiceType}
+                onChange={(e) => { this.setState({ invoiceType: e }) }}
+              >
+                <Select.Option value="1" >处理中</Select.Option>
+                <Select.Option value="2" >通过</Select.Option>
+                <Select.Option value="3" >驳回</Select.Option>
+              </Select>
               <Cascaders
                 ref={node => this.Cascaders = node}
                 placeholder="订单部门"
@@ -594,33 +654,22 @@ const outInvoiceQuery = React.createClass({
                   });
                 }}
               />
-              {/* <DepartmentList
-                  value={this.state.departmenttList}
-                  onChange={e => {
-                    this.setState({ departmenttList: e });
-                  }}/> */}
-              {/* <Select
-                placeholder="特批状态"
-                onChange={e => {
-                  this.setState({ processStatus: e });
-                }}
-                style={{ width: 160, marginRight: 5 }}
-                value={this.state.processStatus}
-              >
-                <Option value="1">特批未审核</Option>
-                <Option value="2">特批已审核</Option>
-              </Select>
-              <Select
-                placeholder="审核状态"
-                onChange={e => {
-                  this.setState({ statusSearch: e });
+
+              <span style={{ marginRight: "10px" }}>申请时间 :</span>
+              <RangePicker
+                value={[
+                  this.state.releaseDate[0]
+                    ? moment(this.state.releaseDate[0])
+                    : null,
+                  this.state.releaseDate[1]
+                    ? moment(this.state.releaseDate[1])
+                    : null,
+                ]}
+                onChange={(data, dataString) => {
+                  this.setState({ releaseDate: dataString });
                 }}
-                style={{ width: 160, marginRight: 5 }}
-                value={this.state.statusSearch}
-              >
-                <Option value="1">待审核</Option>
-                <Option value="2">审核通过</Option>
-              </Select> */}
+              />
+
               <Button
                 type="primary"
                 onClick={this.search}
@@ -642,6 +691,18 @@ const outInvoiceQuery = React.createClass({
               />
             </div>
           </TabPane>
+          {/* 管理员才能导出 */}
+          <TabPane tab="导出" key="3" disabled={!newShiroList.includes("99")}>
+            <div>
+              <Button
+                loading={this.state.exportPendingLoading}
+                onClick={() => { this.exportExec() }}
+                style={{ margin: 10 }}
+              >
+                导出excel
+              </Button>
+            </div>
+          </TabPane>
         </Tabs>
         <div className="patent-table">
           <Spin spinning={this.state.loading}>

+ 4 - 4
js/component/manageCenter/financialManage/distribute/outSpecial.jsx

@@ -66,7 +66,7 @@ const outSpecial = React.createClass({
               id: thisdata.id,
               status: thisdata.status,
               unitName: thisdata.unitName,
-              orderNo: thisdata.orderno,
+              orderNo: thisdata.orderNo,
               name: thisdata.name,
               projectStatus: thisdata.projectStatus,
               examineName: thisdata.examineName,
@@ -375,8 +375,8 @@ const outSpecial = React.createClass({
         },
         {
           title: "订单编号",
-          dataIndex: "orderno",
-          key: "orderno",
+          dataIndex: "orderNo",
+          key: "orderNo",
         },
         {
           title: "开票金额(万元)",
@@ -516,7 +516,7 @@ const outSpecial = React.createClass({
             sum += parseFloat(thisdata.amount);
             theArr.push({
               id: thisdata.id,
-              orderno: thisdata.orderno, //订单编号
+              orderNo: thisdata.orderNo, //订单编号
               amount: thisdata.amount, //签单金额
               createTime: thisdata.createTime, //流程状态
               status: thisdata.status, //结算状态

+ 48 - 50
js/component/manageCenter/financialManage/distribute/shouKuanAll.jsx

@@ -193,8 +193,8 @@ const ShouKuang = React.createClass({
   },
   getInitialState() {
     return {
+      isDisplay: true,
       cuiTabKey: "1",
-
       pubVisible: false,
       pubDataList: [],
       pubpageNo: 1,
@@ -431,12 +431,12 @@ const ShouKuang = React.createClass({
             return (
               <Tooltip title={text}>
                 <div
-                  // style={{
-                  //   maxWidth: "150px",
-                  //   overflow: "hidden",
-                  //   textOverflow: "ellipsis",
-                  //   whiteSpace: "nowrap",
-                  // }}
+                // style={{
+                //   maxWidth: "150px",
+                //   overflow: "hidden",
+                //   textOverflow: "ellipsis",
+                //   whiteSpace: "nowrap",
+                // }}
                 >
                   {text}
                 </div>
@@ -562,12 +562,12 @@ const ShouKuang = React.createClass({
             return (
               <Tooltip title={text}>
                 <div
-                  // style={{
-                  //   maxWidth: "150px",
-                  //   overflow: "hidden",
-                  //   textOverflow: "ellipsis",
-                  //   whiteSpace: "nowrap",
-                  // }}
+                // style={{
+                //   maxWidth: "150px",
+                //   overflow: "hidden",
+                //   textOverflow: "ellipsis",
+                //   whiteSpace: "nowrap",
+                // }}
                 >
                   {text}
                 </div>
@@ -678,12 +678,12 @@ const ShouKuang = React.createClass({
             return (
               <Tooltip title={text}>
                 <div
-                  // style={{
-                  //   maxWidth: "150px",
-                  //   overflow: "hidden",
-                  //   textOverflow: "ellipsis",
-                  //   whiteSpace: "nowrap",
-                  // }}
+                // style={{
+                //   maxWidth: "150px",
+                //   overflow: "hidden",
+                //   textOverflow: "ellipsis",
+                //   whiteSpace: "nowrap",
+                // }}
                 >
                   {text}
                 </div>
@@ -790,12 +790,12 @@ const ShouKuang = React.createClass({
             return (
               <Tooltip title={text}>
                 <div
-                  // style={{
-                  //   maxWidth: "150px",
-                  //   overflow: "hidden",
-                  //   textOverflow: "ellipsis",
-                  //   whiteSpace: "nowrap",
-                  // }}
+                // style={{
+                //   maxWidth: "150px",
+                //   overflow: "hidden",
+                //   textOverflow: "ellipsis",
+                //   whiteSpace: "nowrap",
+                // }}
                 >
                   {text}
                 </div>
@@ -912,12 +912,12 @@ const ShouKuang = React.createClass({
             return (
               <Tooltip title={text}>
                 <div
-                  // style={{
-                  //   maxWidth: "150px",
-                  //   overflow: "hidden",
-                  //   textOverflow: "ellipsis",
-                  //   whiteSpace: "nowrap",
-                  // }}
+                // style={{
+                //   maxWidth: "150px",
+                //   overflow: "hidden",
+                //   textOverflow: "ellipsis",
+                //   whiteSpace: "nowrap",
+                // }}
                 >
                   {text}
                 </div>
@@ -1084,12 +1084,12 @@ const ShouKuang = React.createClass({
             return (
               <Tooltip title={text}>
                 <div
-                  // style={{
-                  //   maxWidth: "150px",
-                  //   overflow: "hidden",
-                  //   textOverflow: "ellipsis",
-                  //   whiteSpace: "nowrap",
-                  // }}
+                // style={{
+                //   maxWidth: "150px",
+                //   overflow: "hidden",
+                //   textOverflow: "ellipsis",
+                //   whiteSpace: "nowrap",
+                // }}
                 >
                   {text}
                 </div>
@@ -1174,8 +1174,13 @@ const ShouKuang = React.createClass({
           dataIndex: "serviceProject",
           key: "serviceProject",
           className: "title-table",
-          render: (text) => {
-            return (<div dangerouslySetInnerHTML={{ __html: !!text && text.replace(/[,,]/g, "<br/>") }} />);
+          render: (text, record) => {
+            return (
+              this.state.isDisplay
+                ? <div dangerouslySetInnerHTML={{ __html: !!text && text.replace(/[,,]/g, "<br/>") }} ></div>
+                : <div>{text}</div>
+
+            );
           }
         },
         {
@@ -1746,6 +1751,7 @@ const ShouKuang = React.createClass({
     });
     this.setState({
       changeList: newArr,
+      isDisplay: this.ChooseList.state.checkedValues.length == this.ChooseList.state.columns.length ? true : false
     });
   },
   onSelectChange(selectedRowKeys, selectedRows) {
@@ -3010,6 +3016,7 @@ const ShouKuang = React.createClass({
           <TabPane tab="更改表格显示数据" key="1">
             <div style={{ marginLeft: 10 }}>
               <ChooseList
+                ref={ref => this.ChooseList = ref}
                 columns={this.state.columns}
                 changeFn={this.changeList}
                 changeList={this.state.changeList}
@@ -3053,17 +3060,8 @@ const ShouKuang = React.createClass({
           <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>
-            }
+            {<span style={{ marginRight: 20 }}>{`收款金额总计(万元):${this.state.hui ? this.state.hui : "0"}`}</span>}
+            {<span>{`合同额总计(万元):${this.state.totalHui ? this.state.totalHui : "0"}`}</span>}
           </p>
         </div>
         <Assign

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

@@ -77,7 +77,7 @@ class PrimarySelect extends Component {
 
   render() {
     const Datas = this.props.searchSelectData;
-    const newShiroList = window.adminData.shiroList == "" ? [] : window.adminData.shiroList.split(",");
+    const newShiroList = window.adminData.shiroList.split(",") || [];
     return (
       <Select
         style={{ width: Datas.width, marginRight: 10 }}

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "afanti",
-  "version": "1.2.80",
+  "version": "1.2.81",
   "description": "",
   "main": "index.js",
   "scripts": {