Browse Source

流程变更

dev01 1 year ago
parent
commit
7ae625fb4d

+ 11 - 11
js/component/common/flowchart/index.jsx

@@ -65,8 +65,8 @@ class FlowChart extends Component {
           } else {
             let pstatus = -1;
             let info = data.data;
-            // 0-非特批 ,1-总裁待审核,2-总裁通过,3-总裁驳回 4董事长待审核 5董事长通过 6董事长驳回 7副总裁待审核 8副总裁通过 9副总裁驳回
-            let tpname = ["-", info.zc, info.zc, info.zc, info.dsz, info.dsz, info.dsz, info.fzc, info.fzc, info.fzc][info.approval];
+            // 0非特批 1总裁待审核 2总裁通过 3总裁驳回 4董事长待审核 5董事长通过 6董事长驳回 7副总裁待审核 8副总裁通过 9副总裁驳回
+            let tpname = ["-", info.approvalName, info.approvalName, info.approvalName, info.dsz, info.dsz, info.dsz][info.approval];
             theArr = [
               { status: 0, title: "营销员发起", name: info.yxy, time: "" },
               { status: 1, title: "经理审核", name: !info.yxjl ? "-" : info.yxjl, time: "" },
@@ -139,8 +139,8 @@ class FlowChart extends Component {
               { status: 5, title: "技术总监审核", name: info.zxsgly, time: "" },
               { status: 6, title: "财务专员审核", name: info.cwzy, time: "" },
               { status: 7, title: "财务总监审核", name: info.cwgly, time: "" },
-              { status: 8, title: info.isHN == 1 ? "副总裁审核" : "总裁审核", name: info.isHN == 1 ? info.fzc : info.zc, time: "" },
-              { status: 9, title: "董事长审核", name: info.isHN == 1 ? (info.changeAmount > 0.2 ? info.dsz : "-") : "-", time: "" },
+              { status: 8, title: "公司/部门管理审核", name: info.special == 1 ? "-" : info.approvalName },
+              { status: 9, title: "董事长审核", name: info.special == 1 ? info.dsz : (info.changeAmount > 0.2 ? info.dsz : "-"), time: "" },
             ]
             // 1 项目&金额
             let theArr1 = [
@@ -152,7 +152,7 @@ class FlowChart extends Component {
               { status: 5, title: "技术总监审核", name: info.zxsgly, time: "" },
               { status: 6, title: "财务专员审核", name: info.cwzy, time: "" },
               { status: 7, title: "财务总监审核", name: info.cwgly, time: "" },
-              { status: 8, title: info.isHN == 1 ? "副总裁审核" : "总裁审核", name: info.isHN == 1 ? info.fzc : info.zc, time: "" },
+              { status: 8, title: "公司/部门管理审核", name: info.approvalName, time: "" },
             ]
             // 2 仅项目
             let theArr2 = [
@@ -164,7 +164,7 @@ class FlowChart extends Component {
               { status: 5, title: "技术总监审核", name: info.zxsgly, time: "" },
               { status: 6, title: "财务专员审核", name: info.cwzy, time: "" },
               { status: 7, title: "财务总监审核", name: info.cwgly, time: "" },
-              { status: 8, title: info.isHN == 1 ? "副总裁审核" : "总裁审核", name: info.isHN == 1 ? info.fzc : info.zc, time: "" },
+              { status: 8, title: "公司/部门管理审核", name: info.approvalName, time: "" },
             ]
             // 3 仅金额
             let theArr3 = [
@@ -174,7 +174,7 @@ class FlowChart extends Component {
               { status: 5, title: "技术总监审核", name: info.zxsgly, time: "" },
               { status: 6, title: "财务专员审核", name: info.cwzy, time: "" },
               { status: 7, title: "财务总监审核", name: info.cwgly, time: "" },
-              { status: 8, title: info.isHN == 1 ? "副总裁审核" : "总裁审核", name: info.isHN == 1 ? info.fzc : info.zc, time: "" },
+              { status: 8, title: "公司/部门管理审核", name: info.approvalName, time: "" },
             ]
             // 4 重报
             let theArr4 = [
@@ -185,7 +185,7 @@ class FlowChart extends Component {
               { status: 4, title: "技术经理审核", name: info.zxsjl, time: "" },
               { status: 6, title: "财务专员审核", name: info.cwzy, time: "" },
               { status: 7, title: "财务总监审核", name: info.cwgly, time: "" },
-              { status: 8, title: info.isHN == 1 ? "副总裁审核" : "总裁审核", name: info.isHN == 1 ? info.fzc : info.zc, time: "" },
+              { status: 8, title: "公司/部门管理审核", name: info.approvalName, time: "" },
             ]
             // 5 赠送
             let theArr5 = [
@@ -193,7 +193,7 @@ class FlowChart extends Component {
               { status: 1, title: "经理审核", name: !info.yxjl ? "-" : info.yxjl, time: "" },
               { status: 2, title: "营销管理员审核", name: info.yxgly, time: "" },
               { status: 6, title: "财务专员审核", name: info.cwzy, time: "" },
-              { status: 8, title: info.isHN == 1 ? "副总裁审核" : "总裁审核", name: info.isHN == 1 ? info.fzc : info.zc, time: "" },
+              { status: 8, title: "公司/部门管理审核", name: info.approvalName, time: "" },
             ]
             // 6 退单不退款
             let theArr6 = [
@@ -205,7 +205,7 @@ class FlowChart extends Component {
               { status: 5, title: "技术总监审核", name: info.zxsgly, time: "" },
               { status: 6, title: "财务专员审核", name: info.cwzy, time: "" },
               { status: 7, title: "财务总监审核", name: info.cwgly, time: "" },
-              { status: 8, title: info.isHN == 1 ? "副总裁审核" : "总裁审核", name: info.isHN == 1 ? info.fzc : info.zc, time: "" },
+              { status: 8, title: "公司/部门管理审核", name: info.approvalName, time: "" },
             ]
             // 7 仅变更合同
             let theArr7 = [
@@ -264,7 +264,7 @@ class FlowChart extends Component {
               list.forEach((item, index) => {
                 if (info.processState == 10 && item.status == 8) { // 副总裁审核processState == 10 
                   pstatus = index
-                } else if ((item.status == info.processState) && info.processState != 10) {  
+                } else if ((item.status == info.processState) && info.processState != 10) {
                   pstatus = index
                 }
               })

+ 7 - 6
js/component/common/imgList/index.js

@@ -87,14 +87,14 @@ class ImgList extends Component {
       return isLt2M;
     } else {
       const isJPG = file.type.split('/');
-      // if (isJPG[0] !== 'image' && isJPG[0] !== "application") {
-      //     message.error('只能上传图片或pdf文件!');
-      //     return false;
-      // }
-      if (isJPG[0] !== 'image') {
-        message.error('只能上传图片!');
+      if (isJPG[0] !== 'image' && isJPG[0] !== "application") {
+        message.error('只能上传图片或pdf文件!');
         return false;
       }
+      // if (isJPG[0] !== 'image') {
+      //   message.error('只能上传图片!');
+      //   return false;
+      // }
       if (isJPG && isLt2M) {
         // 用于计算当次选择的图片数量
         this.state.newUploadArr.push(file)
@@ -322,6 +322,7 @@ class ImgList extends Component {
             }}
           >
             <embed src={this.state.file} type="application/pdf" style={{ width: "100%", height: 700 }} />
+            <div className='no'></div>
           </Modal>
         }
       </div>

+ 9 - 0
js/component/common/imgList/index.less

@@ -127,4 +127,13 @@
     background: red;
     color: #FFF;
   }
+}
+
+.no{
+  position: absolute;
+  width: 100px;
+  height: 50px;
+  top: 20px;
+  right: 70px;
+  background:#323639;
 }

+ 30 - 30
js/component/dataDic.js

@@ -2595,15 +2595,15 @@ module.exports = {
     },
     {
       value: "1",
-      key: "特批总裁待审核",
+      key: "特批待审核",
     },
     {
       value: "2",
-      key: "特批总裁通过",
+      key: "特批通过",
     },
     {
       value: "3",
-      key: "特批总裁驳回",
+      key: "特批驳回",
     },
     {
       value: "4",
@@ -2617,18 +2617,18 @@ module.exports = {
       value: "6",
       key: "特批董事长驳回",
     },
-    {
-      value: "7",
-      key: "特批副总裁待审核",
-    },
-    {
-      value: "8",
-      key: "特批副总裁通过",
-    },
-    {
-      value: "9",
-      key: "特批副总裁驳回",
-    },
+    // {
+    //   value: "7",
+    //   key: "特批副总裁待审核",
+    // },
+    // {
+    //   value: "8",
+    //   key: "特批副总裁通过",
+    // },
+    // {
+    //   value: "9",
+    //   key: "特批副总裁驳回",
+    // },
   ],
   //交易外联
   transactionChannel: [
@@ -3337,15 +3337,15 @@ module.exports = {
     },
     {
       value: "1",
-      key: "特批总裁待审核",
+      key: "特批待审核",
     },
     {
       value: "2",
-      key: "特批总裁通过",
+      key: "特批通过",
     },
     {
       value: "3",
-      key: "特批总裁驳回",
+      key: "特批驳回",
     },
     {
       value: "4",
@@ -3359,18 +3359,18 @@ module.exports = {
       value: "6",
       key: "特批董事长驳回",
     },
-    {
-      value: "7",
-      key: "特批副总裁待审核",
-    },
-    {
-      value: "8",
-      key: "特批副总裁通过",
-    },
-    {
-      value: "9",
-      key: "特批副总裁驳回",
-    },
+    // {
+    //   value: "7",
+    //   key: "特批副总裁待审核",
+    // },
+    // {
+    //   value: "8",
+    //   key: "特批副总裁通过",
+    // },
+    // {
+    //   value: "9",
+    //   key: "特批副总裁驳回",
+    // },
   ],
   //任务状态
   taskStatus: [

+ 1 - 1
js/component/manageCenter/financialManage/distribute/projectvip.jsx

@@ -226,7 +226,7 @@ const ProjectVip = React.createClass({
           render: (text, record) => {
             return (
               <div>
-                {text != 1 && <div>{["", "财务审核", `${["", "总裁", "副总裁"][record.approvalType]}特批审核`, "通过", "驳回"][text]}</div>}
+                {text != 1 && <div>{["", "财务审核", `公司/部门管理审核`, "通过", "驳回"][text]}</div>}
                 {text == 1 &&
                   <div>
                     {record.examineType == 1

+ 1 - 1
js/component/manageCenter/order/orderNew/approvedvipproject.jsx

@@ -223,7 +223,7 @@ const ApprovedVipProject = React.createClass({
           render: (text, record) => {
             return (
               <div>
-                {text != 1 && <div>{["", "财务审核", `${["", "总裁", "副总裁"][record.approvalType]}特批审核`, "通过", "驳回"][text]}</div>}
+                {text != 1 && <div>{["", "财务审核", `公司/部门管理审核`, "通过", "驳回"][text]}</div>}
                 {text == 1 &&
                   <div>
                     {record.examineType == 1

+ 1 - 1
js/component/manageCenter/order/orderNew/myprojectvip.jsx

@@ -224,7 +224,7 @@ const MyProjectVip = React.createClass({
           render: (text, record) => {
             return (
               <div>
-                {text != 1 && <div style={{ color: text == 4 && "red" }}>{["", "财务审核", `${["", "总裁", "副总裁"][record.approvalType]}特批审核`, "通过", "驳回"][text]}</div>}
+                {text != 1 && <div style={{ color: text == 4 && "red" }}>{["", "财务审核", `公司/部门管理审核`, "通过", "驳回"][text]}</div>}
                 {text == 1 &&
                   <div>
                     {record.examineType == 1

+ 99 - 4
js/component/manageCenter/set/organization/organization.jsx

@@ -53,6 +53,7 @@ const Organization = Form.create()(React.createClass({
               status: thisdata.status,//组织状态
               workingHoursName: thisdata.workingHoursName,
               hideSign: thisdata.hideSign,//显示标识
+              approval: thisdata.approval,
             });
           };
           this.state.pagination.current = data.data.pageNo;
@@ -73,6 +74,7 @@ const Organization = Form.create()(React.createClass({
   },
   getInitialState() {
     return {
+      approval: 1,
       editvisible: false,
       workingHoursType: 0,
       searchMore: true,
@@ -254,6 +256,9 @@ const Organization = Form.create()(React.createClass({
                     financeId: _this.state.theTypes2
                       ? _this.state.theTypes2
                       : _this.state.financeId, //负责人ID
+                    approvalAid: _this.state.theTypes1
+                      ? _this.state.theTypes1
+                      : _this.state.approvalAid, //审核人ID
                     retrialFinanceId: _this.state.theTypes3
                       ? _this.state.theTypes3
                       : _this.state.reviewerId, // 复审人
@@ -266,6 +271,7 @@ const Organization = Form.create()(React.createClass({
                     workingHoursType: _this.state.workingHoursType,
                     hideSign: _this.state.hideSign,//显示标识
                     depNo: _this.state.depNo,//组织编号
+                    approval: _this.state.approval, //是否需要特批审核
                   }
                 }).done(
                   function (data) {
@@ -301,6 +307,9 @@ const Organization = Form.create()(React.createClass({
                 financeId: _this.state.theTypes2
                   ? _this.state.theTypes2
                   : _this.state.financeId, //负责人ID
+                approvalAid: _this.state.theTypes1
+                  ? _this.state.theTypes1
+                  : _this.state.approvalAid, //审核人ID
                 retrialFinanceId: _this.state.theTypes3
                   ? _this.state.theTypes3
                   : _this.state.reviewerId, // 复审人
@@ -312,6 +321,7 @@ const Organization = Form.create()(React.createClass({
                 workingHoursType: _this.state.workingHoursType,
                 hideSign: _this.state.hideSign,//显示标识
                 depNo: _this.state.depNo,//组织编号
+                approval: _this.state.approval, //是否需要特批审核
               }
             }).done(
               function (data) {
@@ -351,6 +361,9 @@ const Organization = Form.create()(React.createClass({
                 financeId: _this.state.theTypes2
                   ? _this.state.theTypes2
                   : _this.state.financeId, //负责人ID
+                approvalAid: _this.state.theTypes1
+                  ? _this.state.theTypes1
+                  : _this.state.approvalAid, //审核人ID
                 retrialFinanceId: _this.state.theTypes3
                   ? _this.state.theTypes3
                   : _this.state.reviewerId, // 复审人
@@ -363,6 +376,7 @@ const Organization = Form.create()(React.createClass({
                 workingHoursType: _this.state.workingHoursType,
                 hideSign: _this.state.hideSign,//显示标识
                 depNo: _this.state.depNo,//组织编号
+                approval: _this.state.approval, //是否需要特批审核
               }
             }).done(
               function (data) {
@@ -398,6 +412,9 @@ const Organization = Form.create()(React.createClass({
             financeId: _this.state.theTypes2
               ? _this.state.theTypes2
               : _this.state.financeId, //负责人ID
+            approvalAid: _this.state.theTypes1
+              ? _this.state.theTypes1
+              : _this.state.approvalAid, //审核人ID
             retrialFinanceId: _this.state.theTypes3
               ? _this.state.theTypes3
               : _this.state.reviewerId, // 复审人
@@ -410,6 +427,7 @@ const Organization = Form.create()(React.createClass({
             workingHoursType: _this.state.workingHoursType,
             hideSign: _this.state.hideSign,//显示标识
             depNo: _this.state.depNo,//组织编号
+            approval: _this.state.approval,
           }
         }).done(
           function (data) {
@@ -463,13 +481,17 @@ const Organization = Form.create()(React.createClass({
             editRemarks: thisdata.remarks, //组织职能说明
             workingHoursType: thisdata.workingHoursType,//作息时间类型
             financeId: thisdata.financeId, // 财务负责人
+            approvalAid: thisdata.approvalAid, // 审核人
             reviewerId: thisdata.retrialFinanceId, // 财务复审
             hideSign: thisdata.hideSign,//显示标识
+            approval: thisdata.approval, // 特批审核
           });
           this.setState({
             editId: thisdata.id, //每一条记录的ID
             financeId: thisdata.financeId,
             financeName: thisdata.financeName,
+            approvalAid: thisdata.approvalAid, // 审核人
+            approvalName: thisdata.approvalName, // 审核人
             editName: thisdata.name, //组织名称
             managerIdOrganization: thisdata.managerName, //负责人名字
             managerIdOrganizationId: thisdata.managerId, //负责人idmanagerName
@@ -487,6 +509,7 @@ const Organization = Form.create()(React.createClass({
             editDataSource: theArr,
             abbreviation: thisdata.abbreviation,
             hideSign: thisdata.hideSign,//显示标识
+            approval: thisdata.approval, // 特批审核
           });
         } else {
           message.warning(data.error[0].message);
@@ -632,6 +655,23 @@ const Organization = Form.create()(React.createClass({
       theTypes: theType
     })
   },
+  selectAuto1(value, options) {
+    this.setState({
+      approvalAid: value
+    })
+    let theType = '';
+    let contactLists = this.state.customerArr || [];
+    if (value) {
+      contactLists.map(function (item) {
+        if (item.name == value.toString()) {
+          theType = item.id;
+        }
+      });
+    }
+    this.setState({
+      theTypes1: theType
+    })
+  },
   selectAuto2(value, options) {
     this.setState({
       financeId: value
@@ -694,6 +734,14 @@ const Organization = Form.create()(React.createClass({
       managerIdOrganization: e
     })
   },
+  httpChange1(e) {
+    if (e.length >= 1) {
+      this.supervisor(e);
+    }
+    this.setState({
+      approvalName: e
+    })
+  },
   httpChange2(e) {
     if (e.length >= 1) {
       this.supervisor(e);
@@ -717,12 +765,16 @@ const Organization = Form.create()(React.createClass({
     this.state.managerIdOrganization = '';//负责人ID清零
     this.state.financeId = "";//负责人ID清零
     this.state.financeName = "";//负责人ID清零
+    this.state.approvalAid = "";//审核人ID清零
+    this.state.approvalName = "";//审核人清零
     this.state.reviewerId = "";//复审人
     this.state.reviewerName = "";//复审人
+    this.state.approvalName = ""; //特批审核人
     this.state.typeOrganization = undefined; //组织类型清零
     this.state.upOrganization = undefined;//上级组织清零
     this.state.remarksOrganization = '';//组织职能说明清零
     this.state.hideSign = 1;//显示标识默认为1(显示)
+    this.state.approval = 1;//特批审核 1(需要)
     this.state.RowData = {};
     this.setState({
       workingHoursType: 0,
@@ -918,7 +970,7 @@ const Organization = Form.create()(React.createClass({
                         filterOption={true}
                         // onBlur={this.blurChange}
                         onSelect={this.selectAuto}
-                        style={{ width: '95%' }}
+                      // style={{ width: '95%' }}
                       >
                         <Input />
                       </AutoComplete>
@@ -1065,13 +1117,56 @@ const Organization = Form.create()(React.createClass({
                         filterOption={true}
                         // onBlur={this.blurChange}
                         onSelect={this.selectAuto}
-                        style={{ width: '95%' }}
+                      // 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="特批审核"
+                        value={this.state.approval}
+                        onChange={(e) => { this.setState({ approval: e }) }}
+                        required="required"
+                      >
+                        <Option value={0}>不需要</Option>
+                        <Option value={1}>需要</Option>
+                      </Select>
+                    </FormItem>
+                  </div>
+
+                  <div className="clearfix">
+                    <FormItem
+                      labelCol={{ span: 7 }}
+                      wrapperCol={{ span: 12 }}
+                      label="审核人"
+                    >
+                      <AutoComplete
+                        disabled={this.state.approval != 1}
+                        className="certain-category-search"
+                        dropdownClassName="certain-category-search-dropdown"
+                        dropdownMatchSelectWidth={false}
+                        dataSource={options}
+                        placeholder="输入名称"
+                        value={this.state.approvalName}
+                        onChange={this.httpChange1}
+                        filterOption={true}
+                        // onBlur={this.blurChange}
+                        onSelect={this.selectAuto1}
+                      >
+                        <Input />
+                      </AutoComplete>
+                      {/* <span className="mandatory" style={{color:'red',marginLeft:'5px'}}>特批/变更审核</span> */}
+                    </FormItem>
+                  </div>
+
                   <div className="clearfix">
                     <FormItem
                       labelCol={{ span: 7 }}
@@ -1165,7 +1260,7 @@ const Organization = Form.create()(React.createClass({
                         filterOption={true}
                         // onBlur={this.blurChange}
                         onSelect={this.selectAuto2}
-                        style={{ width: '95%' }}
+                      // style={{ width: '95%' }}
                       >
                         <Input />
                       </AutoComplete>
@@ -1190,7 +1285,7 @@ const Organization = Form.create()(React.createClass({
                         filterOption={true}
                         onBlur={this.blurChange}
                         onSelect={this.selectAuto3}
-                        style={{ width: '95%' }}
+                      // style={{ width: '95%' }}
                       >
                         <Input />
                       </AutoComplete>

+ 25 - 20
js/component/tools.js

@@ -1756,24 +1756,26 @@ const obj = {
       if (e == 0) {
         return "非特批";
       } else if (e == 1) {
-        return "特批总裁待审核";
+        return "特批待审核";
       } else if (e == 2) {
-        return "特批总裁通过";
+        return "特批通过";
       } else if (e == 3) {
-        return "特批总裁驳回";
+        return "特批驳回";
       } else if (e == 4) {
         return "特批董事长待审核";
       } else if (e == 5) {
         return "特批董事长通过";
       } else if (e == 6) {
         return "特批董事长驳回";
-      } else if (e == 7) {
-        return "特批副总裁待审核";
-      } else if (e == 8) {
-        return "特批副总裁通过";
-      } else if (e == 9) {
-        return "特批副总裁驳回";
-      } else {
+      } 
+      // else if (e == 7) {
+      //   return "特批副总裁待审核";
+      // } else if (e == 8) {
+      //   return "特批副总裁通过";
+      // } else if (e == 9) {
+      //   return "特批副总裁驳回";
+      // } 
+      else {
         return "未知";
       }
     }
@@ -1872,13 +1874,15 @@ const obj = {
       if (e == 0 || e == 6 || e == 7 || !name) {
         theName = ""
       } else if (e == 4) {
-        if (state == "1" || state == "2" || state == "3") {
-          theName = "(总裁)"
-        } else if (state == "4" || state == "5" || state == "6") {
+        // if (state == "1" || state == "2" || state == "3") {
+        //   theName = "(公司/部门管理)"
+        // } else
+         if (state == "4" || state == "5" || state == "6") {
           theName = "(董事长)"
-        } else if (state == "7" || state == "8" || state == "9") {
-          theName = "(副总裁)"
-        }
+        } 
+        // else if (state == "7" || state == "8" || state == "9") {
+        //   theName = "(副总裁)"
+        // }
       }
       return theType + theName;
     }
@@ -2072,12 +2076,13 @@ const obj = {
     } else if (pro == 7) {
       str = "财务总监";
     } else if (pro == 8) {
-      str = "总裁";
+      str = "公司/部门管理";
     } else if (pro == 9) {
       str = "董事长";
-    } else if (pro == 10) {
-      str = "副总裁";
-    }
+    } 
+    // else if (pro == 10) {
+    //   str = "副总裁";
+    // }
     let num = "";
     if (status == 0) {
       num = "发起";

+ 1 - 1
package.json

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