dev01 1 year ago
parent
commit
3db5185fcb

+ 6 - 4
js/component/manageCenter/financialManage/account/accountDetaillist.jsx

@@ -15,7 +15,7 @@ import {
   Modal,
 } from "antd";
 import { ChooseList } from "../../order/orderNew/chooseList";
-import { ShowModal, getVehicleName, getTypeName, commonAdd, dealBigMoney } from "../../../tools"
+import { ShowModal, getAccountName, getSecondaryAccountName } from "../../../tools"
 import ShowModalDiv from "@/showModal.jsx";
 import AccountDetails from "./accountDetails";
 import { accountType, typeLists, accountStatus } from "@/dataDic";
@@ -61,7 +61,9 @@ const AccountDetaillist = React.createClass({
           render: (text, record) => {
             return (
               <span>
-                {text == 0 ? record.typeOther : typeLists.find(item => item.value === text).label}
+                {(text == 0 && !record.typeOther)
+                  ? getAccountName(record.sonType, record.sonTypeOther)
+                  : getSecondaryAccountName(text, record.typeOther)}
               </span>
             );
           },
@@ -209,8 +211,8 @@ const AccountDetaillist = React.createClass({
           width: 120,
           render: (text, record) => {
             return (
-              <span style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#1D4FEA"][text] }}>
-                {["【发起】", "【通过】", "【完成】", "【驳回】", "【重新发起】"][text]}
+              <span style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#808080", "#1D4FEA"][text] }}>
+                {["【发起】", "【通过】", "【完成】", "【驳回】", "【撤销】", "【修改】"][text]}
                 {this.state.processStatus == record.processStatus && !record.id &&
                   <span style={{ color: "#FFA500" }}>&nbsp;审核中...</span>}
               </span>

+ 42 - 36
js/component/manageCenter/financialManage/account/accountDetails.jsx

@@ -36,8 +36,8 @@ class AccountDetails extends Component {
           width: 120,
           render: (text, record) => {
             return (
-              <span style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#1D4FEA"][text] }}>
-                {["【发起】", "【通过】", "【完成】", "【驳回】", "【重新发起】"][text]}
+              <span style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#808080", "#1D4FEA"][text] }}>
+                {["【发起】", "【通过】", "【完成】", "【驳回】", "【撤销】", "【修改】"][text]}
                 {this.state.processStatus == record.processStatus && !record.id &&
                   <span style={{ color: "#FFA500" }}>&nbsp;审核中...</span>}
               </span>
@@ -90,7 +90,7 @@ class AccountDetails extends Component {
           title: "出差时长",
           dataIndex: "duration",
           key: "duration",
-          width: "4%",
+          width: 40,
           render: (text, record) => {
             return (
               <div>{record.types == 1 ? text : ""}</div>
@@ -131,7 +131,18 @@ class AccountDetails extends Component {
           }
         },
         {
-          title: "交通工具",
+          title: "类型",
+          dataIndex: "types",
+          key: "types",
+          width: "6%",
+          render: (text, record) => {
+            return (
+              <div>{getAccountName(text, record.typesOther)}</div>
+            )
+          }
+        },
+        {
+          title: "详细",
           dataIndex: "cost",
           key: "cost",
           width: "8%",
@@ -176,17 +187,6 @@ class AccountDetails extends Component {
           }
         },
         {
-          title: "类型",
-          dataIndex: "types",
-          key: "types",
-          width: "8%",
-          render: (text, record) => {
-            return (
-              <div>{getAccountName(text, record.typesOther)}</div>
-            )
-          }
-        },
-        {
           title: "出差事由",
           dataIndex: "plan",
           key: "plan",
@@ -211,17 +211,17 @@ class AccountDetails extends Component {
             )
           }
         },
-        {
-          title: "报销事由",
-          dataIndex: "remarks",
-          key: "remarks",
-          // width: "10%",
-          render: (text, record) => {
-            return (
-              <div>{text}</div>
-            )
-          }
-        },
+        // {
+        //   title: "报销事由",
+        //   dataIndex: "remarks",
+        //   key: "remarks",
+        //   // width: "10%",
+        //   render: (text, record) => {
+        //     return (
+        //       <div>{text}</div>
+        //     )
+        //   }
+        // },
       ]
     };
   }
@@ -545,9 +545,10 @@ class AccountDetails extends Component {
                 <div className="m_head">
                   <div>报销编号:{data.checkNo}</div>
                   <div>申请部门:{data.applyDepName}</div>
-                  <div>收款方式:{data.bank + " " + data.accounts + " " + data.name}</div>
+                  <div>收款方式:{!data.name ? "" : (data.bank + " " + data.accounts + " " + data.name)}</div>
                   <div>报销人:{data.aname}</div>
                   <div>报销日期:{moment(data.createTimeStr).format('YYYY年MM月DD日')}</div>
+                  <div>报销事由:{data.remarks}</div>
                 </div>
                 <Table
                   columns={columns}
@@ -556,10 +557,15 @@ class AccountDetails extends Component {
                   size="middle"
                   pagination={false}
                 />
-                {/* <div className="m_head">
-                  <div>报销公司:{data.applyDepName}</div>
-                  <div>报销人:{data.aname}</div>
-                </div> */}
+                <div className="m_head">
+                  <div style={{ width: "100%", marginTop: 8 }}>审核日志:
+                    {
+                      this.state.logdataSour.map(item =>
+                        !!item.createTimeStr && <span key={item.id}>{item.auditorName + " " + item.createTimeStr + " " + item.remarks + " "}&nbsp;&nbsp;&nbsp;</span>
+                      )
+                    }
+                  </div>
+                </div>
               </div>
               : <Form layout="horizontal" id="demand-form">
                 <Spin spinning={this.state.loading}>
@@ -872,7 +878,7 @@ class AccountDetails extends Component {
                           {...formItemLayout}
                           label="收款人"
                         >
-                          <span>{data.name}</span>
+                          <span>{!!data.name && data.name}</span>
                         </FormItem>
                       </div>
                       <div className="clearfix">
@@ -880,7 +886,7 @@ class AccountDetails extends Component {
                           {...formItemLayout}
                           label="收款银行"
                         >
-                          <span>{data.bank}</span>
+                          <span>{!!data.bank && data.bank}</span>
                         </FormItem>
                       </div>
                       <div className="clearfix">
@@ -888,7 +894,7 @@ class AccountDetails extends Component {
                           {...formItemLayout}
                           label="收款账户"
                         >
-                          <span>{data.accounts}</span>
+                          <span>{!!data.accounts && data.accounts}</span>
                         </FormItem>
                       </div>
                     </div>}
@@ -914,8 +920,8 @@ class AccountDetails extends Component {
                         >
                           {/* {item.auditorName + ":" + item.status + item.remarks + "(" + item.createTimeStr + ")"} */}
                           <span>{item.auditorName}:</span>
-                          <span style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#1D4FEA"][item.status] }}>
-                            {["【发起】,", "【通过】,", "【完成】,", "【驳回】,", "【重新发起】,"][item.status]}
+                          <span style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#808080", "#1D4FEA"][item.status] }}>
+                            {["【发起】,", "【通过】,", "【完成】,", "【驳回】,", "【撤销】,", "【修改】,"][item.status]}
                             {this.state.processStatus == item.processStatus && !item.id && data.status != 0 &&
                               <span style={{ color: "#FFA500" }}>&nbsp;审核中...</span>}
                           </span>

+ 3 - 3
js/component/manageCenter/financialManage/account/accountReview.jsx

@@ -211,8 +211,8 @@ const AccountReview = React.createClass({
           width: 120,
           render: (text, record) => {
             return (
-              <span style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#1D4FEA"][text] }}>
-                {["【发起】", "【通过】", "【完成】", "【驳回】", "【重新发起】"][text]}
+              <span style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#808080", "#1D4FEA"][text] }}>
+                {["【发起】", "【通过】", "【完成】", "【驳回】", "【撤销】", "【修改】"][text]}
                 {this.state.processStatus == record.processStatus && !record.id &&
                   <span style={{ color: "#FFA500" }}>&nbsp;审核中...</span>}
               </span>
@@ -492,7 +492,7 @@ const AccountReview = React.createClass({
   reset() {
     this.setState({
       aname: "",
-      searchValues: JSON.parse(JSON.stringify({})),
+      searchValues: JSON.parse(JSON.stringify({ examineStatus: this.props.isOperate ? "1" : undefined })),
     }, () => {
       this.loadData();
     })

+ 2 - 2
js/component/manageCenter/financialManage/account/accountlist.jsx

@@ -209,8 +209,8 @@ const AccountList = React.createClass({
           width: 120,
           render: (text, record) => {
             return (
-              <span style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#1D4FEA"][text] }}>
-                {["【发起】", "【通过】", "【完成】", "【驳回】", "【重新发起】"][text]}
+              <span style={{ color: ["#1D4FEA", "#34DE38", "#108EE9", "red", "#808080", "#1D4FEA"][text] }}>
+                {["【发起】", "【通过】", "【完成】", "【驳回】", "【撤销】", "【修改】"][text]}
                 {this.state.processStatus == record.processStatus && !record.id &&
                   <span style={{ color: "#FFA500" }}>&nbsp;审核中...</span>}
               </span>

+ 69 - 0
js/component/manageCenter/set/organization/organization.jsx

@@ -262,6 +262,9 @@ const Organization = Form.create()(React.createClass({
                     retrialFinanceId: _this.state.theTypes3
                       ? _this.state.theTypes3
                       : _this.state.reviewerId, // 复审人
+                    expenseFinanceId: _this.state.theTypes4
+                      ? _this.state.theTypes4
+                      : _this.state.accountrId, // 报销审核人
                     superId: _this.state.editSuperId, //上级组织
                     status: _this.state.editStatus, //组织状态
                     remarks: remarksText, //组织职能说明
@@ -313,6 +316,9 @@ const Organization = Form.create()(React.createClass({
                 retrialFinanceId: _this.state.theTypes3
                   ? _this.state.theTypes3
                   : _this.state.reviewerId, // 复审人
+                expenseFinanceId: _this.state.theTypes4
+                  ? _this.state.theTypes4
+                  : _this.state.accountrId, // 报销审核人
                 superId: oldId, //上级组织
                 status: _this.state.editStatus, //组织状态
                 remarks: remarksText, //组织职能说明
@@ -367,6 +373,9 @@ const Organization = Form.create()(React.createClass({
                 retrialFinanceId: _this.state.theTypes3
                   ? _this.state.theTypes3
                   : _this.state.reviewerId, // 复审人
+                expenseFinanceId: _this.state.theTypes4
+                  ? _this.state.theTypes4
+                  : _this.state.accountrId, // 报销审核人
                 superId: _this.state.editSuperId, //上级组织
                 status: _this.state.editStatus, //组织状态
                 province: _this.state.province,//省份
@@ -418,6 +427,9 @@ const Organization = Form.create()(React.createClass({
             retrialFinanceId: _this.state.theTypes3
               ? _this.state.theTypes3
               : _this.state.reviewerId, // 复审人
+            expenseFinanceId: _this.state.theTypes4
+              ? _this.state.theTypes4
+              : _this.state.accountrId, // 报销审核人
             superId: oldId, //上级组织
             status: _this.state.editStatus, //组织状态
             remarks: remarksText, //组织职能说明
@@ -483,6 +495,9 @@ const Organization = Form.create()(React.createClass({
             financeId: thisdata.financeId, // 财务负责人
             approvalAid: thisdata.approvalAid, // 审核人
             reviewerId: thisdata.retrialFinanceId, // 财务复审
+            reviewerName: thisdata.retrialFinanceName,
+            accountrId: thisdata.expenseFinanceId, // 报销审核
+            accountrName: thisdata.expenseFinanceName,
             hideSign: thisdata.hideSign,//显示标识
             approval: thisdata.approval, // 特批审核
           });
@@ -497,6 +512,8 @@ const Organization = Form.create()(React.createClass({
             managerIdOrganizationId: thisdata.managerId, //负责人idmanagerName
             reviewerId: thisdata.retrialFinanceId, // 财务复审
             reviewerName: thisdata.retrialFinanceName,
+            accountrId: thisdata.expenseFinanceId, // 报销审核
+            accountrName: thisdata.expenseFinanceName,
             editType: thisdata.type, //组织类型
             editStatus: thisdata.status, //组织状态
             province: thisdata.province, //省份
@@ -706,6 +723,23 @@ const Organization = Form.create()(React.createClass({
       theTypes3: theType
     })
   },
+  selectAuto4(value, options) {
+    this.setState({
+      accountrId: value
+    })
+    let theType = '';
+    let contactLists = this.state.customerArr || [];
+    if (value) {
+      contactLists.map(function (item) {
+        if (item.name == value.toString()) {
+          theType = item.id;
+        }
+      });
+    }
+    this.setState({
+      theTypes4: theType
+    })
+  },
   //失去焦点时
   blurChange(e) {
     let theType = '';
@@ -758,6 +792,14 @@ const Organization = Form.create()(React.createClass({
       reviewerName: e
     })
   },
+  httpChange4(e) {
+    if (e.length >= 1) {
+      this.supervisor(e);
+    }
+    this.setState({
+      accountrName: e
+    })
+  },
   addClick() {
     this.state.DepN = '';//组织编号
     this.state.theTypes = '';
@@ -769,6 +811,8 @@ const Organization = Form.create()(React.createClass({
     this.state.approvalName = "";//审核人清零
     this.state.reviewerId = "";//复审人
     this.state.reviewerName = "";//复审人
+    this.state.accountrId = "";//报销审核人
+    this.state.accountrName = "";//报销审核人
     this.state.approvalName = ""; //特批审核人
     this.state.typeOrganization = undefined; //组织类型清零
     this.state.upOrganization = undefined;//上级组织清零
@@ -1297,6 +1341,31 @@ const Organization = Form.create()(React.createClass({
                     <FormItem
                       labelCol={{ span: 7 }}
                       wrapperCol={{ span: 12 }}
+                      label="报销审核人"
+                    >
+                      <AutoComplete
+                        className="certain-category-search"
+                        dropdownClassName="certain-category-search-dropdown"
+                        dropdownMatchSelectWidth={false}
+                        dataSource={options}
+                        placeholder="输入名称"
+                        value={this.state.accountrName}
+                        onChange={this.httpChange4}
+                        filterOption={true}
+                        // onBlur={this.blurChange}
+                        onSelect={this.selectAuto4}
+                      // style={{ width: '95%' }}
+                      >
+                        <Input />
+                      </AutoComplete>
+                      {/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>*</span> */}
+                    </FormItem>
+                  </div>
+
+                  <div className="clearfix">
+                    <FormItem
+                      labelCol={{ span: 7 }}
+                      wrapperCol={{ span: 12 }}
                       label="选择作息时间类型"
                     >
                       <Select placeholder="请选择作息时间类型"

+ 9 - 12
js/component/tools.js

@@ -1767,7 +1767,7 @@ const obj = {
         return "特批董事长通过";
       } else if (e == 6) {
         return "特批董事长驳回";
-      } 
+      }
       // else if (e == 7) {
       //   return "特批副总裁待审核";
       // } else if (e == 8) {
@@ -1877,9 +1877,9 @@ const obj = {
         // if (state == "1" || state == "2" || state == "3") {
         //   theName = "(公司/部门管理)"
         // } else
-         if (state == "4" || state == "5" || state == "6") {
+        if (state == "4" || state == "5" || state == "6") {
           theName = "(董事长)"
-        } 
+        }
         // else if (state == "7" || state == "8" || state == "9") {
         //   theName = "(副总裁)"
         // }
@@ -2079,7 +2079,7 @@ const obj = {
       str = "公司/部门管理";
     } else if (pro == 9) {
       str = "董事长";
-    } 
+    }
     // else if (pro == 10) {
     //   str = "副总裁";
     // }
@@ -2311,20 +2311,20 @@ const obj = {
       if (item.value == type) {
         theType = item.label;
         if (item.value == 0) {
-          theType = other
+          theType = "其他(" + other + ")"
         }
       }
     });
     return theType;
   },
 
-  getSecondaryAccountName(type, other = "其他"){
+  getSecondaryAccountName(type, other = "其他") {
     let theType = "";
     typeLists.map(function (item) {
       if (item.value == type) {
         theType = item.label;
         if (item.value == 0) {
-          theType = other
+          theType = "其他(" + other + ")"
         }
       }
     });
@@ -2337,7 +2337,7 @@ const obj = {
       if (item.value == type) {
         theType = item.label;
         if (item.value == 0) {
-          theType = other
+          theType = "其他(" + other + ")"
         }
       }
     });
@@ -2351,7 +2351,7 @@ const obj = {
       if (item.value == type) {
         theType = item.label;
         if (item.value == 0) {
-          theType = other
+          theType = "其他(" + other + ")"
         }
       }
     });
@@ -2387,15 +2387,12 @@ const obj = {
     var unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
     var head = n < 0 ? '欠' : '';
     n = Math.abs(n);
-
     var s = '';
-
     for (var i = 0; i < fraction.length; i++) {
       s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
     }
     s = s || '整';
     n = Math.floor(n);
-
     for (var i = 0; i < unit[0].length && n > 0; i++) {
       var p = '';
       for (var j = 0; j < unit[1].length && n > 0; j++) {

+ 1 - 1
package.json

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