ソースを参照

特批流程修改

dev01 2 年 前
コミット
eef19c960f

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

@@ -86,14 +86,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)

+ 36 - 12
js/component/dataDic.js

@@ -2586,27 +2586,27 @@ module.exports = {
     },
     {
       value: "1",
-      key: "总裁待审核",
+      key: "特批总裁待审核",
     },
     {
       value: "2",
-      key: "总裁通过",
+      key: "特批总裁通过",
     },
     {
       value: "3",
-      key: "总裁驳回",
+      key: "特批总裁驳回",
     },
     {
       value: "4",
-      key: "董事长待审核",
+      key: "特批董事长待审核",
     },
     {
       value: "5",
-      key: "董事长通过",
+      key: "特批董事长通过",
     },
     {
       value: "6",
-      key: "董事长驳回",
+      key: "特批董事长驳回",
     },
   ],
   //交易外联
@@ -3320,15 +3320,27 @@ module.exports = {
     },
     {
       value: "1",
-      key: "待审核",
+      key: "特批总裁待审核",
     },
     {
       value: "2",
-      key: "通过",
+      key: "特批总裁通过",
     },
     {
       value: "3",
-      key: "驳回",
+      key: "特批总裁驳回",
+    },
+    {
+      value: "4",
+      key: "特批董事长待审核",
+    },
+    {
+      value: "5",
+      key: "特批董事长通过",
+    },
+    {
+      value: "6",
+      key: "特批董事长驳回",
     },
   ],
   //任务状态
@@ -3525,15 +3537,27 @@ module.exports = {
     },
     {
       value: "1",
-      key: "特批",
+      key: "特批总裁待审核",
     },
     {
       value: "2",
-      key: "特批通过",
+      key: "特批总裁通过",
     },
     {
       value: "3",
-      key: "特批驳回",
+      key: "特批总裁驳回",
+    },
+    {
+      value: "4",
+      key: "特批董事长待审核",
+    },
+    {
+      value: "5",
+      key: "特批董事长通过",
+    },
+    {
+      value: "6",
+      key: "特批董事长驳回",
     },
   ],
   //省内外

+ 12 - 4
js/component/manageCenter/customer/NEW/query/queryCutomer.jsx

@@ -174,11 +174,19 @@ const QueryCustomer = React.createClass({
           dataIndex: "shareType",
           key: "shareType",
           //0-私有 1-公共 2 签单
-          render: (text) => {
+          render: (text, record) => {
             return (
-              text === '0' ? '私有' :
-                text === '1' ? '公共' :
-                  text === '2' ? '签单' : ''
+              <span>
+                {
+                  text === '0' ? '私有' :
+                    text === '1' ? '公共' :
+                      text === '2' ? '签单' : ''
+                }
+                {
+                  record.newChannel == "1"
+                    ? "渠道" : ""
+                }
+              </span>
             )
           }
         },

+ 4 - 3
js/component/manageCenter/customer/publicSummary/index.jsx

@@ -220,10 +220,11 @@ class PublicSummary extends Component {
           dataIndex: "auditInfo",
           key: "auditInfo",
           width: 200,
-          render: (text) => {
-            return <div style={{ wordBreak: "break-all" }}>
+          render: (text, record) => {
+            return <div style={{ wordBreak: "break-all" }} >
+              {record.auditTimes && `审核时间:${record.auditTimes}`}
               {text}
-            </div>;
+            </div >;
           },
         },
         {

+ 4 - 0
js/component/manageCenter/financialManage/distribute/approvedOutsourcing.jsx

@@ -2033,6 +2033,10 @@ const approvedOutsourcing = React.createClass({
       message.warning('请填写驳回原因')
       return false
     }
+    if (!this.state.reason.replace(/\s+/g, '')) {
+      message.warning("请填写驳回原因");
+      return;
+    }
     this.setState({
       loading: true,
     })

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

@@ -2035,6 +2035,10 @@ const approvedOutsourcing = React.createClass({
       message.warning("请填写驳回原因");
       return false;
     }
+    if (!this.state.reason.replace(/\s+/g, '')) {
+      message.warning("请填写驳回原因");
+      return;
+    }
     this.setState({
       loading: true,
     });

+ 6 - 4
js/component/manageCenter/financialManage/distribute/projectvip.jsx

@@ -91,10 +91,12 @@ const ProjectVip = React.createClass({
                   <div style={{ display: "flex" }}>
                     <OrderItemStatus deleteSign={record.deleteSign} />
                     {
-                      record.approval == 1
-                        ? <Tag color="#faa755">特批待审</Tag> :
-                        record.approval == 2 && <Tag color="#ff0000">特批通过</Tag>
-                    }
+                        record.approval == 1
+                          ? <Tag color="#faa755">特批待审</Tag> : record.approval == 2
+                            ? <Tag color="#ff0000">特批通过</Tag> : record.approval == 4
+                              ? <Tag color="#faa755">特批待审</Tag> : record.approval == 5
+                                ? <Tag color="#ff0000">特批通过</Tag> : ""
+                      }
                   </div>
                 </div>
               </Tooltip>

+ 6 - 4
js/component/manageCenter/financialManage/distribute/projectvipall.jsx

@@ -90,10 +90,12 @@ const ProjectVipAll = React.createClass({
                   <div style={{ display: "flex" }}>
                     <OrderItemStatus deleteSign={record.deleteSign} />
                     {
-                      record.approval == 1
-                        ? <Tag color="#faa755">特批待审</Tag> :
-                        record.approval == 2 && <Tag color="#ff0000">特批通过</Tag>
-                    }
+                        record.approval == 1
+                          ? <Tag color="#faa755">特批待审</Tag> : record.approval == 2
+                            ? <Tag color="#ff0000">特批通过</Tag> : record.approval == 4
+                              ? <Tag color="#faa755">特批待审</Tag> : record.approval == 5
+                                ? <Tag color="#ff0000">特批通过</Tag> : ""
+                      }
                   </div>
                 </div>
               </Tooltip>

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

@@ -1062,8 +1062,10 @@ const ShouKuang = React.createClass({
                     <OrderItemStatus deleteSign={record.deleteSign} />
                     {
                       record.approval == 1
-                        ? <Tag color="#faa755">特批待审</Tag> :
-                        record.approval == 2 && <Tag color="#ff0000">特批通过</Tag>
+                        ? <Tag color="#faa755">特批待审</Tag> : record.approval == 2
+                          ? <Tag color="#ff0000">特批通过</Tag> : record.approval == 4
+                            ? <Tag color="#faa755">特批待审</Tag> : record.approval == 5
+                              ? <Tag color="#ff0000">特批通过</Tag> : ""
                     }
                   </div>
                 </div>
@@ -1608,6 +1610,10 @@ const ShouKuang = React.createClass({
       message.warning("请填写驳回原因");
       return false;
     }
+    if (!this.state.content.replace(/\s+/g, '')) {
+      message.warning("请填写驳回原因");
+      return false;
+    }
     this.setState({
       loading: true,
     });

+ 8 - 2
js/component/manageCenter/financialManage/distribute/shouKuang.jsx

@@ -1072,8 +1072,10 @@ const ShouKuang = React.createClass({
                     <OrderItemStatus deleteSign={record.deleteSign} />
                     {
                       record.approval == 1
-                        ? <Tag color="#faa755">特批待审</Tag> :
-                        record.approval == 2 && <Tag color="#ff0000">特批通过</Tag>
+                        ? <Tag color="#faa755">特批待审</Tag> : record.approval == 2
+                          ? <Tag color="#ff0000">特批通过</Tag> : record.approval == 4
+                            ? <Tag color="#faa755">特批待审</Tag> : record.approval == 5
+                              ? <Tag color="#ff0000">特批通过</Tag> : ""
                     }
                   </div>
                 </div>
@@ -1666,6 +1668,10 @@ const ShouKuang = React.createClass({
       message.warning("请填写驳回原因");
       return false;
     }
+    if (!this.state.content.replace(/\s+/g, '')) {
+      message.warning("请填写驳回原因");
+      return false;
+    }
     this.setState({
       loading: true,
     });

+ 4 - 3
js/component/manageCenter/order/orderNew/addService.jsx

@@ -5944,7 +5944,8 @@ const NewService = Form.create()(
                                   <Select
                                     placeholder="请选择客户所属类型"
                                     style={{ width: "240px" }}
-                                    value={getApprovedState(this.state.approval)}
+                                    value={["非特批", "特批", "特批通过", "特批驳回", "特批", "特批通过", "特批驳回"][Number(this.state.approval)]
+                                    }
                                     onChange={(e) => {
                                       this.setState({ approval: e });
                                     }}
@@ -6014,8 +6015,8 @@ const NewService = Form.create()(
                                   label="特批立项"
                                 >
                                   <span>
-                                    {["非特批", "特批待审核", "特批通过", "特批驳回"][this.state.approval]}
-                                    {/* {getApprovedState(this.state.approval)} */}
+                                    {/* {["非特批", "特批待审核", "特批通过", "特批驳回"][this.state.approval]} */}
+                                    {getApprovedState(this.state.approval)}
                                   </span>
                                 </FormItem>
                                 <FormItem

+ 13 - 1
js/component/manageCenter/order/orderNew/addorders.js

@@ -2152,6 +2152,18 @@ const Addorders = Form.create()(
                     <Select
                       placeholder="请选择客户所属类型"
                       style={{ width: "240px" }}
+                      value={["非特批", "特批", "特批通过", "特批驳回", "特批", "特批通过", "特批驳回"][Number(this.state.approval)]
+                      }
+                      onChange={(e) => {
+                        this.setState({ approval: e });
+                      }}
+                    >
+                      <Select.Option key={0}>非特批</Select.Option>
+                      <Select.Option key={1}>特批</Select.Option>
+                    </Select>
+                    {/* <Select
+                      placeholder="请选择客户所属类型"
+                      style={{ width: "240px" }}
                       value={this.state.approval}
                       onChange={(e) => {
                         this.setState({ approval: e });
@@ -2164,7 +2176,7 @@ const Addorders = Form.create()(
                           </Select.Option>
                         );
                       })}
-                    </Select>
+                    </Select> */}
                   </FormItem>
                   <FormItem
                     className="half-item"

+ 143 - 11
js/component/manageCenter/order/orderNew/approveds.jsx

@@ -41,6 +41,7 @@ import Project from "../../../../component/project";
 import ImgList from "../../../common/imgList";
 import { getProjectName } from "../../../tools";
 import ProjectDetailsReadOnly from "../../../common/projectDetailsReadOnly";
+import NewEditProject from "../../../common/projectOperation/newEditProject"
 import DepartmentList from "../../../common/departmentList";
 import OrderItemStatus from "../../../common/orderItemStatus";
 import EnterpriseNameChange from "../../../common/enterpriseNameChange";
@@ -252,10 +253,11 @@ const IntentionCustomer = Form.create()(
             key: "approval",
             className: "title-table",
             render: (text) => {
-              if (text == 1) {
-                return <Tag color="#f50">{getApproval(text)}</Tag>;
-              }
-              return getApproval(text);
+              return <Tag color="#f50">{getApproval(text)}</Tag>;
+              // if (text == 1) {
+              //   return <Tag color="#f50">{getApproval(text)}</Tag>;
+              // }
+              // return getApproval(text);
             },
           },
           {
@@ -368,7 +370,7 @@ const IntentionCustomer = Form.create()(
                 return (
                   <span>
                     {text}{" "}
-                    <Tag
+                    {/* <Tag
                       color="#108ee9"
                       onClick={(e) => {
                         e.stopPropagation();
@@ -376,7 +378,7 @@ const IntentionCustomer = Form.create()(
                       }}
                     >
                       已拆
-                    </Tag>
+                    </Tag> */}
                   </span>
                 );
               } else {
@@ -1269,6 +1271,10 @@ const IntentionCustomer = Form.create()(
         message.warning("请填写备注");
         return;
       }
+      if (!this.state.reason.replace(/\s+/g, '')) {
+        message.warning("请填写备注");
+        return;
+      }
       this.setState({
         loading: true,
       });
@@ -1310,6 +1316,10 @@ const IntentionCustomer = Form.create()(
         message.warning("请填写备注");
         return;
       }
+      if (!this.state.reason.replace(/\s+/g, '')) {
+        message.warning("请填写备注");
+        return;
+      }
       this.setState({
         loading: true,
       });
@@ -1908,7 +1918,112 @@ const IntentionCustomer = Form.create()(
       });
       this.loadData(1, 9999999);
     },
+    // 可展开颜色不同
+    addRowColor(record) {
+      if (!!record.splitList && record.splitList.length > 0) {
+        return 'light'
+      } else {
+        return 'dark'
+      }
+    },
+
     render() {
+      const expandedRowRenderVip = (e) => {
+        const data = e.splitList;
+        let columns = [];
+        if (data instanceof Array && data.length) {
+          if (e.cSort == 6) {
+            columns = [
+              {
+                title: "负责人",
+                dataIndex: "receiverName",
+                key: "receiverName",
+              },
+              {
+                title: "负责人电话",
+                dataIndex: "receiverMobile",
+                key: "receiverMobile",
+              },
+              {
+                title: "项目状态",
+                dataIndex: "projectStatus",
+                key: "projectStatus",
+                render: (text) => {
+                  return getProjectName(text);
+                },
+              },
+              {
+                title: "本次派单",
+                dataIndex: "serviceYear",
+                key: "serviceYear",
+              },
+              {
+                title: "项目说明",
+                dataIndex: "taskComment",
+                key: "taskComment",
+                render: (text) => {
+                  return (
+                    <Tooltip title={text}>
+                      <div
+                      // style={{
+                      //   width: 100,
+                      //   overflow: "hidden",
+                      //   whiteSpace: "nowrap",
+                      //   textOverflow: "ellipsis",
+                      // }}
+                      >{text}</div>
+                    </Tooltip>
+                  )
+                },
+              },
+            ];
+          } else {
+            columns = [
+              {
+                title: "子项目名称",
+                dataIndex: "taskName",
+                key: "taskName"
+              },
+              {
+                title: "子项目数量",
+                dataIndex: "commodityQuantity",
+                key: "commodityQuantity"
+              },
+              {
+                title: "拆分操作人",
+                dataIndex: "splitAname",
+                key: "splitAname"
+              },
+              {
+                title: "项目负责人",
+                dataIndex: "receiverName",
+                key: "receiverName"
+              },
+              {
+                title: "拆分时间",
+                dataIndex: "splitTimes",
+                key: "splitTimes"
+              }
+            ]
+          }
+          return (
+            <Table
+              columns={columns}
+              dataSource={data}
+              pagination={false}
+            />
+          );
+        } else {
+          columns = [];
+          return (
+            <p
+              style={{ fontWeight: "bold", color: "red", textAlign: "center" }}
+            >
+              {e.cSort == 6 ? "暂无派单" : "此项目暂未拆分"}
+            </p>
+          );
+        }
+      };
       const formItemLayout = {
         labelCol: { span: 8 },
         wrapperCol: { span: 14 },
@@ -2531,6 +2646,8 @@ const IntentionCustomer = Form.create()(
                           dataSource={this.state.dataSourceX}
                           pagination={this.state.paginations}
                           onRowClick={this.tableRowClickX}
+                          expandedRowRender={expandedRowRenderVip}
+                          rowClassName={this.addRowColor}
                           bordered
                           size="small"
                         />
@@ -3082,11 +3199,26 @@ const IntentionCustomer = Form.create()(
               />
             </Modal> : <div />}
           </div>
-          {this.state.addnextVisible && <ProjectDetailsReadOnly
-            infor={this.state.dataInfor}
-            visible={this.state.addnextVisible}
-            onCancel={this.nextCancel}
-          />}
+          {/* {this.state.addnextVisible &&
+            <ProjectDetailsReadOnly
+              infor={this.state.dataInfor}
+              visible={this.state.addnextVisible}
+              onCancel={this.nextCancel}
+            />} */}
+          {
+            // 项目业务详情
+            this.state.addnextVisible &&
+            <NewEditProject
+              readOnly={
+                this.state.dataInfor &&
+                Object.keys(this.state.dataInfor).length > 0 &&
+                this.state.processStatus !== 0
+              }
+              visible={this.state.addnextVisible}
+              dataInfor={this.state.dataInfor}
+              onCancel={this.nextCancel}
+            />
+          }
         </div>
       );
     },

+ 6 - 4
js/component/manageCenter/order/orderNew/approvedvipproject.jsx

@@ -89,10 +89,12 @@ const ApprovedVipProject = React.createClass({
                   <div style={{ display: "flex" }}>
                     <OrderItemStatus deleteSign={record.deleteSign} />
                     {
-                      record.approval == 1
-                        ? <Tag color="#faa755">特批待审</Tag> :
-                        record.approval == 2 && <Tag color="#ff0000">特批通过</Tag>
-                    }
+                        record.approval == 1
+                          ? <Tag color="#faa755">特批待审</Tag> : record.approval == 2
+                            ? <Tag color="#ff0000">特批通过</Tag> : record.approval == 4
+                              ? <Tag color="#faa755">特批待审</Tag> : record.approval == 5
+                                ? <Tag color="#ff0000">特批通过</Tag> : ""
+                      }
                   </div>
                 </div>
               </Tooltip>

+ 4 - 2
js/component/manageCenter/order/orderNew/billing.jsx

@@ -510,8 +510,10 @@ const MyService = Form.create()(
                       <OrderItemStatus deleteSign={record.deleteSign} />
                       {
                         record.approval == 1
-                          ? <Tag color="#faa755">特批待审</Tag> :
-                          record.approval == 2 && <Tag color="#ff0000">特批通过</Tag>
+                          ? <Tag color="#faa755">特批待审</Tag> : record.approval == 2
+                            ? <Tag color="#ff0000">特批通过</Tag> : record.approval == 4
+                              ? <Tag color="#faa755">特批待审</Tag> : record.approval == 5
+                                ? <Tag color="#ff0000">特批通过</Tag> : ""
                       }
                     </div>
                   </div>

+ 8 - 2
js/component/manageCenter/order/orderNew/examine.jsx

@@ -271,8 +271,10 @@ const IntentionCustomer = Form.create()(
                       <OrderItemStatus deleteSign={record.deleteSign} />
                       {
                         record.approval == 1
-                          ? <Tag color="#faa755">特批待审</Tag> :
-                          record.approval == 2 && <Tag color="#ff0000">特批通过</Tag>
+                          ? <Tag color="#faa755">特批待审</Tag> : record.approval == 2
+                            ? <Tag color="#ff0000">特批通过</Tag> : record.approval == 4
+                              ? <Tag color="#faa755">特批待审</Tag> : record.approval == 5
+                                ? <Tag color="#ff0000">特批通过</Tag> : ""
                       }
                     </div>
                   </div>
@@ -1081,6 +1083,10 @@ const IntentionCustomer = Form.create()(
         message.warn("请先填写拒绝理由");
         return
       }
+      if (!this.state.reason.replace(/\s+/g, '')) {
+        message.warning("请先填写拒绝理由");
+        return;
+      }
       this.setState({
         loading: true,
       });

+ 4 - 2
js/component/manageCenter/order/orderNew/inquiry.jsx

@@ -763,8 +763,10 @@ const IntentionCustomer = Form.create()(
                       <OrderItemStatus deleteSign={record.deleteSign} />
                       {
                         record.approval == 1
-                          ? <Tag color="#faa755">特批待审</Tag> :
-                          record.approval == 2 && <Tag color="#ff0000">特批通过</Tag>
+                          ? <Tag color="#faa755">特批待审</Tag> : record.approval == 2
+                            ? <Tag color="#ff0000">特批通过</Tag> : record.approval == 4
+                              ? <Tag color="#faa755">特批待审</Tag> : record.approval == 5
+                                ? <Tag color="#ff0000">特批通过</Tag> : ""
                       }
                     </div>
                   </div>

+ 6 - 4
js/component/manageCenter/order/orderNew/myprojectvip.jsx

@@ -88,10 +88,12 @@ const MyProjectVip = React.createClass({
                   <div style={{ display: "flex" }}>
                     <OrderItemStatus deleteSign={record.deleteSign} />
                     {
-                      record.approval == 1
-                        ? <Tag color="#faa755">特批待审</Tag> :
-                        record.approval == 2 && <Tag color="#ff0000">特批通过</Tag>
-                    }
+                        record.approval == 1
+                          ? <Tag color="#faa755">特批待审</Tag> : record.approval == 2
+                            ? <Tag color="#ff0000">特批通过</Tag> : record.approval == 4
+                              ? <Tag color="#faa755">特批待审</Tag> : record.approval == 5
+                                ? <Tag color="#ff0000">特批通过</Tag> : ""
+                      }
                   </div>
                 </div>
               </Tooltip>

+ 4 - 2
js/component/manageCenter/order/orderNew/pressList.jsx

@@ -209,8 +209,10 @@ const IntentionCustomer = Form.create()(
                       <OrderItemStatus deleteSign={record.deleteSign} />
                       {
                         record.approval == 1
-                          ? <Tag color="#faa755">特批待审</Tag> :
-                          record.approval == 2 && <Tag color="#ff0000">特批通过</Tag>
+                          ? <Tag color="#faa755">特批待审</Tag> : record.approval == 2
+                            ? <Tag color="#ff0000">特批通过</Tag> : record.approval == 4
+                              ? <Tag color="#faa755">特批待审</Tag> : record.approval == 5
+                                ? <Tag color="#ff0000">特批通过</Tag> : ""
                       }
                     </div>
                   </div>

+ 1 - 1
package.json

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