Browse Source

修复重置页数不重置
修复 软著 专利 官费配置列表删除问题
修复点击项目业务不显示官费与费减的情况

mentoswzq 4 years ago
parent
commit
9c4c067442

+ 5 - 5
js/component/manageCenter/achievement/releaseResults.jsx

@@ -12,7 +12,6 @@ const Organization=Form.create()(React.createClass({
         this.state.data = [];
         this.setState({
             loading: true,
-            ispage:pageNo,
         });
         let nameText=this.state.SuperArr;
         let superText=(this.state.superId)?nameText[parseInt(this.state.superId)].id:undefined;
@@ -65,11 +64,12 @@ const Organization=Form.create()(React.createClass({
                     };
                     this.state.pagination.current = data.data.pageNo;
                     this.state.pagination.total = data.data.totalCount;
+                    this.setState({
+                        dataSource: theArr,
+                        ispage: data.data.pageNo,
+                        pagination: this.state.pagination
+                    });
                 };
-                this.setState({
-                    dataSource: theArr,
-                    pagination: this.state.pagination
-                });
             }.bind(this),
         }).always(function () {
             this.setState({

+ 2 - 0
js/component/manageCenter/order/orderNew/arrearsList.jsx

@@ -64,6 +64,8 @@ const ArrearsList = Form.create()(
               theArr.push(obj);
             }
             this.state.pagination.total = data.data.totalCount;
+            this.state.pagination.current = data.data.pageNo;
+
           }
           if (data.data && data.data.list && !data.data.list.length) {
             this.state.pagination.total = 0;

+ 1 - 0
js/component/manageCenter/order/orderNew/pressList.jsx

@@ -63,6 +63,7 @@ const IntentionCustomer = Form.create()(React.createClass({
 						});
 					};
 				    this.state.pagination.total = data.data.totalCount;
+					this.state.pagination.current = data.data.pageNo;
 				};
 				if(data.data&&data.data.list&&!data.data.list.length){
 					this.state.pagination.total=0

+ 45 - 22
js/component/manageCenter/project/project/outsourceTaskAssignment.jsx

@@ -23,7 +23,6 @@ const OutsourceTaskAssignment = React.createClass({
   loadData(pageNo) {
     this.state.data = [];
     this.setState({
-      page: pageNo,
       loading: true,
     });
     $.ajax({
@@ -84,6 +83,7 @@ const OutsourceTaskAssignment = React.createClass({
         }
         this.setState({
           dataSource: theArr,
+          page: data.data.pageNo,
           pagination: this.state.pagination,
         });
       }.bind(this),
@@ -310,6 +310,10 @@ const OutsourceTaskAssignment = React.createClass({
       ],
       dataSourceX: [],
       resVisible: false,
+
+      displayFees: "none",
+      costReduction: '',
+      officialCost: '',
     };
   },
   /* 分派 */
@@ -431,22 +435,8 @@ const OutsourceTaskAssignment = React.createClass({
         } else {
           for (let i = 0; i < data.data.length; i++) {
             let thisdata = data.data[i];
-            theArr.push({
-              key: i,
-              id: thisdata.id,
-              orderNo: thisdata.orderNo, //订单编号
-              commodityId: thisdata.commodityId, //项目ID
-              commodityName: thisdata.commodityName, //项目名称
-              cname: thisdata.cname, //项目类别
-              commodityPrice: thisdata.commodityPrice, //项目价格
-              commodityQuantity: thisdata.commodityQuantity, //项目数量
-              main: thisdata.main, //是否为主要任务
-              taskComment: thisdata.taskComment, //任务说明
-              contacts: thisdata.contacts, //联系人
-              contactsMobile: thisdata.contactsMobile, //联系人电话
-              taskStatus: thisdata.taskStatus, //是否分配
-              splitStatus: thisdata.splitStatus,
-            });
+            thisdata.key = i;
+            theArr.push(thisdata);
           }
         }
         this.setState({
@@ -467,13 +457,14 @@ const OutsourceTaskAssignment = React.createClass({
       visible: false,
       activeKey: "1"
     });
-    this.loadData();
+    this.loadData(this.state.page);
   },
   visitOk() {
     this.setState({
       visible: false,
     });
     this.reset();
+    this.loadData(this.state.page);
   },
   closeDesc(e, s) {
     this.state.showDesc = e;
@@ -491,10 +482,20 @@ const OutsourceTaskAssignment = React.createClass({
   nextCancel() {
     this.setState({
       addnextVisible: false,
+      displayFees: "none",
+      costReduction: '',
+      officialCost: '',
     });
   },
   //点击打卡项目详情
   tableRowClickX(record) {
+    if (record.type == "1") {
+      this.setState({
+        displayFees: "block",
+        costReduction: record.costReduction,
+        officialCost: record.officialCost,
+      });
+    }
     this.setState({
       jid: record.id, //项目ID
       kid: record.commodityId, //商品ID
@@ -517,7 +518,6 @@ const OutsourceTaskAssignment = React.createClass({
     this.state.taskNoSearch = "";
     this.state.departmenttSearch = undefined;
     this.state.distribution = undefined;
-    this.loadData(this.state.page);
   },
   searchSwitch() {
     this.setState({
@@ -974,7 +974,10 @@ const OutsourceTaskAssignment = React.createClass({
               <Button type="primary" onClick={this.search}>
                 搜索
               </Button>
-              <Button onClick={this.reset}>重置</Button>
+              <Button onClick={()=>{
+                this.reset();
+                this.loadData();
+              }}>重置</Button>
 
               {/* <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
                     <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
@@ -1291,7 +1294,7 @@ const OutsourceTaskAssignment = React.createClass({
             </TabPane>
           </Tabs>
         </Modal>
-        <Modal
+        {this.state.addnextVisible ? <Modal
           maskClosable={false}
           visible={this.state.addnextVisible}
           onOk={this.nextCancel}
@@ -1319,6 +1322,26 @@ const OutsourceTaskAssignment = React.createClass({
                   <span>{this.state.commodityQuantity}</span>
                 </FormItem>
                 <FormItem
+                    className="half-item"
+                    {...formItemLayout}
+                    label="官费"
+                    style={{ display: this.state.displayFees }}
+                >
+                        <span>
+                          {this.state.officialCost == 0 ? "无官费" : "有官费"}
+                        </span>
+                </FormItem>
+                <FormItem
+                    className="half-item"
+                    {...formItemLayout}
+                    label="费减"
+                    style={{ display: this.state.displayFees }}
+                >
+                        <span>
+                          {this.state.costReduction == 0 ? "无费减" : "有费减"}
+                        </span>
+                </FormItem>
+                <FormItem
                   className="half-item"
                   {...formItemLayout}
                   label="金额(万元)"
@@ -1344,7 +1367,7 @@ const OutsourceTaskAssignment = React.createClass({
               </div>
             </Spin>
           </Form>
-        </Modal>
+        </Modal> : <div/>}
       </div>
     );
   },

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

@@ -2042,7 +2042,6 @@ const Task = React.createClass({
     this.state.outsourceName = ''
     this.state.outsourcePrice = undefined
     this.state.distribution = undefined
-    this.loadData(this.state.page)
     this.state.companyName = undefined
     this.state.unitPrice = undefined
     this.state.unitNumber = undefined
@@ -2052,6 +2051,7 @@ const Task = React.createClass({
       oldInfor: {},
       outsourceRemarks: undefined
     })
+    this.loadData(flag ? '' : this.state.page)
   },
   searchSwitch() {
     this.setState({

+ 48 - 33
js/component/manageCenter/project/task/myTaskOutsource.jsx

@@ -52,7 +52,6 @@ const MyTaskOutsource = React.createClass({
   loadData(pageNo) {
     this.state.data = [];
     this.setState({
-      page: pageNo,
       loading: true,
     });
     $.ajax({
@@ -61,7 +60,7 @@ const MyTaskOutsource = React.createClass({
       crossDomain: false,
       url: globalConfig.context + "/api/admin/orderProject/orderTaskList",
       data: {
-        pageNo: pageNo || this.state.page || 1,
+        pageNo: pageNo || 1,
         pageSize: this.state.pagination.pageSize,
         specially: 0, //个人
         name: this.state.nameSearch, //客户名称
@@ -105,6 +104,7 @@ const MyTaskOutsource = React.createClass({
         }
         this.setState({
           dataSource: theArr,
+          page: data.data.pageNo,
           pagination: this.state.pagination,
         });
       }.bind(this),
@@ -227,9 +227,6 @@ const MyTaskOutsource = React.createClass({
         pageSize: 10,
         onChange: function (page) {
           this.loadData(page);
-          this.setState({
-            page,
-          });
         }.bind(this),
         showTotal: function (total) {
           return "共" + total + "条数据";
@@ -716,6 +713,10 @@ const MyTaskOutsource = React.createClass({
           },
         },
       ],
+
+      displayFees: 'none',
+      costReduction: '',
+      officialCost: '',
     };
   },
   /* 分派 */
@@ -1044,26 +1045,8 @@ const MyTaskOutsource = React.createClass({
         } else {
           for (let i = 0; i < data.data.length; i++) {
             let thisdata = data.data[i];
-            theArr.push({
-              key: i,
-              id: thisdata.id,
-              orderNo: thisdata.orderNo, //订单编号
-              commodityId: thisdata.commodityId, //项目ID
-              commodityName: thisdata.commodityName, //项目名称
-              cname: thisdata.cname, //项目类别
-              commodityPrice: thisdata.commodityPrice, //项目价格
-              commodityQuantity: thisdata.commodityQuantity, //项目数量
-              main: thisdata.main, //是否为主要项目
-              taskComment: thisdata.taskComment, //项目说明
-              contacts: thisdata.contacts, //联系人
-              contactsMobile: thisdata.contactsMobile, //联系人电话
-              taskStatus: thisdata.taskStatus, //是否分配
-              contractNo: thisdata.contractNo, //合同编号
-              certificateNumber: thisdata.certificateNumber,
-              splitStatus: thisdata.splitStatus, //是否为子项目 2是 1主项目
-              splitSuper: thisdata.splitSuper,
-              splitId: thisdata.splitId,
-            });
+            thisdata.key = i;
+            theArr.push(thisdata);
           }
         }
         this.setState({
@@ -1110,14 +1093,14 @@ const MyTaskOutsource = React.createClass({
       updataSwicth: false,
     });
     this.companyReset();
-    this.reset();
+    this.reset(this.state.page);
   },
   visitOk() {
     this.setState({
       visible: false,
       speVisible: false,
     });
-    this.reset();
+    this.reset(this.state.page);
   },
   closeDesc(e, s) {
     this.state.showDesc = e;
@@ -1537,10 +1520,20 @@ const MyTaskOutsource = React.createClass({
   nextCancel() {
     this.setState({
       addnextVisible: false,
+      displayFees: "none",
+      costReduction: '',
+      officialCost: '',
     });
   },
   //点击打卡项目详情
   tableRowClickX(record) {
+    if (record.type == "1") {
+      this.setState({
+        displayFees: "block",
+        costReduction: record.costReduction,
+        officialCost: record.officialCost,
+      });
+    }
     this.setState({
       jid: record.id, //项目ID
       kid: record.commodityId, //商品ID
@@ -1563,7 +1556,7 @@ const MyTaskOutsource = React.createClass({
   search() {
     this.loadData();
   },
-  reset() {
+  reset(page) {
     this.state.id = ""; //项目编号
     this.state.orderNo = ""; //订单编号
     this.state.contractNoSearch = undefined; //订单编号
@@ -1577,7 +1570,7 @@ const MyTaskOutsource = React.createClass({
     this.state.reviewDate = ""; //评审日期
     this.state.publicityDate = ""; //公示日期
     this.state.licenceDate = ""; //发证日期
-    attachmentUrl: []; //附件
+    // attachmentUrl: []; //附件
     this.state.contacts = ""; //联系人
     this.state.contactMobile = ""; //联系人电话
     this.state.legalPerson = ""; //法人
@@ -1595,8 +1588,8 @@ const MyTaskOutsource = React.createClass({
     this.state.departmenttSearch = undefined;
     this.state.outsourceName = ""; //外包公司名称
     this.state.outsourcePrice = ""; //外包价格
-    this.loadData(this.state.page);
     this.state.approvalSearch = undefined;
+    this.loadData(page || 0);
     this.setState({
       oldInfor: {}
     })
@@ -2139,7 +2132,9 @@ const MyTaskOutsource = React.createClass({
               <Button type="primary" onClick={this.search}>
                 搜索
               </Button>
-              <Button onClick={this.reset}>重置</Button>
+              <Button onClick={()=>{
+                this.reset();
+              }}>重置</Button>
 
               {/* <span>更多搜索<Switch defaultChecked={false} onChange={this.searchSwitch.bind(this)} /></span>
                     <div className="search-more" style={this.state.searchMore ? { display: 'none' } : {}}>
@@ -3112,7 +3107,7 @@ const MyTaskOutsource = React.createClass({
             </Spin>
           </Form>
         </Modal>
-        <Modal
+        {this.state.addnextVisible ? <Modal
           maskClosable={false}
           visible={this.state.addnextVisible}
           onOk={this.nextCancel}
@@ -3140,6 +3135,26 @@ const MyTaskOutsource = React.createClass({
                   <span>{this.state.commodityQuantity}</span>
                 </FormItem>
                 <FormItem
+                    className="half-item"
+                    {...formItemLayout}
+                    label="官费"
+                    style={{ display: this.state.displayFees }}
+                >
+                        <span>
+                          {this.state.officialCost == 0 ? "无官费" : "有官费"}
+                        </span>
+                </FormItem>
+                <FormItem
+                    className="half-item"
+                    {...formItemLayout}
+                    label="费减"
+                    style={{ display: this.state.displayFees }}
+                >
+                        <span>
+                          {this.state.costReduction == 0 ? "无费减" : "有费减"}
+                        </span>
+                </FormItem>
+                <FormItem
                   className="half-item"
                   {...formItemLayout}
                   label="金额(万元)"
@@ -3165,7 +3180,7 @@ const MyTaskOutsource = React.createClass({
               </div>
             </Spin>
           </Form>
-        </Modal>
+        </Modal> : <div/>}
         <Modal
           maskClosable={false}
           visible={this.state.speVisible}

+ 3 - 1
js/component/manageCenter/project/task/taskCount.jsx

@@ -88,6 +88,7 @@ const IntentionCustomer = Form.create()(
                 });
               }
               this.state.pagination.total = data.data.totalCount;
+              this.state.pagination.current = data.data.pageNo;
             }
             if (data.data && data.data.list && !data.data.list.length) {
               this.state.pagination.total = 0;
@@ -137,6 +138,7 @@ const IntentionCustomer = Form.create()(
                 theArr.push(thisdata);
               }
               this.state.pagination.total = data.data.totalCount;
+              this.state.pagination.current = data.data.pageNo;
             }
             if (data.data && data.data.list && !data.data.list.length) {
               this.state.pagination.total = 0;
@@ -810,7 +812,7 @@ const IntentionCustomer = Form.create()(
       this.state.cid = [];
       this.state.contractNoSearch = "";
       this.state.outsourceSearch = [];
-      this.loadData(this.state.page);
+      this.loadData();
     },
     resets() {
       this.state.orderNo = "";

+ 41 - 38
js/component/manageCenter/project/task/taskQuery.jsx

@@ -337,6 +337,10 @@ const Task = React.createClass({
           key: "notCount",
         },
       ],
+
+      displayFees: "none",
+      costReduction: '',
+      officialCost: '',
     };
   },
   /* 分派 */
@@ -594,24 +598,8 @@ const Task = React.createClass({
         } else {
           for (let i = 0; i < data.data.length; i++) {
             let thisdata = data.data[i];
-            theArr.push({
-              key: i,
-              id: thisdata.id,
-              orderNo: thisdata.orderNo, //订单编号
-              commodityId: thisdata.commodityId, //项目ID
-              commodityName: thisdata.commodityName, //项目名称
-              cname: thisdata.cname, //项目类别
-              commodityPrice: thisdata.commodityPrice, //项目价格
-              commodityQuantity: thisdata.commodityQuantity, //项目数量
-              main: thisdata.main, //是否为主要任务
-              taskComment: thisdata.taskComment, //任务说明
-              contacts: thisdata.contacts, //联系人
-              contactsMobile: thisdata.contactsMobile, //联系人电话
-              taskStatus: thisdata.taskStatus, //是否分配
-              splitStatus: thisdata.splitStatus, //是否为子项目 2是 1主项目
-              splitSuper: thisdata.splitSuper,
-              splitId: thisdata.splitId,
-            });
+            thisdata.key = i;
+            theArr.push(thisdata);
           }
         }
         this.setState({
@@ -712,10 +700,20 @@ const Task = React.createClass({
   nextCancel() {
     this.setState({
       addnextVisible: false,
+      displayFees: "none",
+      costReduction: '',
+      officialCost: '',
     });
   },
   //点击打卡项目详情
   tableRowClickX(record) {
+    if (record.type == "1") {
+      this.setState({
+        displayFees: "block",
+        costReduction: record.costReduction,
+        officialCost: record.officialCost,
+      });
+    }
     this.setState({
       jid: record.id, //项目ID
       kid: record.commodityId, //商品ID
@@ -800,26 +798,11 @@ const Task = React.createClass({
           for (let i = 0; i < arr.length; i++) {
             thisData = arr[i];
             totalCui += +thisData.money;
-            theArr.push({
-              key: i,
-              dunSubject: thisData.dunSubject
+            thisData.key = i;
+            thisData.dunSubject = thisData.dunSubject
                 ? thisData.dunSubject.toString()
                 : "", //催款科目
-              id: thisData.id, //节点Id
-              money: thisData.money, //催款金额
-              // orderNo: record ? record.orderNo : this.props.datauser.orderNo,
-              commodityName: thisData.commodityName,
-              projectType: thisData.projectType,
-              dunTypeName: thisData.dunTypeName,
-              status: thisData.status,
-              waitDay: thisData.waitDay,
-              effectiveCount: thisData.effectiveCount,
-              startDate: thisData.startDate,
-              dunType: thisData.dunType,
-              appropriationRatio: thisData.appropriationRatio,
-              customizeName: thisData.customizeName,
-              customizeTimes: thisData.customizeTimes,
-            });
+            theArr.push(thisData);
           }
           if (!totalCui) {
             totalCui = 0;
@@ -1631,7 +1614,7 @@ const Task = React.createClass({
             )}
           </Tabs>
         </Modal> : <div/>}
-        <Modal
+        {this.state.addnextVisible ? <Modal
           maskClosable={false}
           visible={this.state.addnextVisible}
           onOk={this.nextCancel}
@@ -1659,6 +1642,26 @@ const Task = React.createClass({
                   <span>{this.state.commodityQuantity}</span>
                 </FormItem>
                 <FormItem
+                    className="half-item"
+                    {...formItemLayout}
+                    label="官费"
+                    style={{ display: this.state.displayFees }}
+                >
+                        <span>
+                          {this.state.officialCost == 0 ? "无官费" : "有官费"}
+                        </span>
+                </FormItem>
+                <FormItem
+                    className="half-item"
+                    {...formItemLayout}
+                    label="费减"
+                    style={{ display: this.state.displayFees }}
+                >
+                        <span>
+                          {this.state.costReduction == 0 ? "无费减" : "有费减"}
+                        </span>
+                </FormItem>
+                <FormItem
                   className="half-item"
                   {...formItemLayout}
                   label="金额(万元)"
@@ -1684,7 +1687,7 @@ const Task = React.createClass({
               </div>
             </Spin>
           </Form>
-        </Modal>
+        </Modal> : <div/>}
         <Modal
           width="800px"
           title="操作日志"

+ 3 - 5
js/component/manageCenter/set/organization/organization.jsx

@@ -13,7 +13,6 @@ const Organization=Form.create()(React.createClass({
         this.state.data = [];
         this.setState({
             loading: true,
-            ispage:pageNo,
         });
         $.ajax({
             method: "post",
@@ -21,7 +20,7 @@ const Organization=Form.create()(React.createClass({
             crossDomain: false,
             url: globalConfig.context + '/api/admin/organization/listOrganizationManagement',
             data: {
-                pageNo: pageNo || this.state.page ||  1,
+                pageNo: pageNo ||  1,
                 pageSize: this.state.pagination.pageSize,
                 name: this.state.name, //组织名称
                 superId:this.state.superId,//上级组织
@@ -53,6 +52,7 @@ const Organization=Form.create()(React.createClass({
                 };
                 this.setState({
                     dataSource: theArr,
+                    page:data.data.pageNo,
                     pagination: this.state.pagination
                 });
             }.bind(this),
@@ -76,9 +76,6 @@ const Organization=Form.create()(React.createClass({
                 pageSize: 10,
                 onChange: function (page) {
                     this.loadData(page);
-                    this.setState({
-                        page
-                    })
                 }.bind(this),
                 showTotal: function (total) {
                     return '共' + total + '条数据';
@@ -608,6 +605,7 @@ const Organization=Form.create()(React.createClass({
         this.setState({ visible: false })
     },
     edithandleCancel() {
+        this.loadData(this.state.page);
         this.setState({ editvisible: false })
     },
     search() {

+ 3 - 2
js/component/manageCenter/set/projectConfigure/officialFees.js

@@ -120,6 +120,7 @@ class OfficialFees extends Component{
 
     //删除
     deleteOfficialFeePrice(id) {
+        let _this = this;
         this.setState({
             loading: true
         });
@@ -132,12 +133,12 @@ class OfficialFees extends Component{
                 id: id
             },
         }).done(function (data) {
-            this.setState({
+            _this.setState({
                 loading: false
             });
             if (!data.error.length) {
                 message.success('删除成功!');
-                this.loadData();
+                _this.loadData();
             } else {
                 message.warning(data.error[0].message);
             }

+ 3 - 2
js/component/manageCenter/set/projectConfigure/patentFees.js

@@ -123,6 +123,7 @@ class PatentFees extends Component{
 
     //删除
     deleteOfficialFeePrice(id) {
+        let _this = this;
         this.setState({
             loading: true
         });
@@ -135,12 +136,12 @@ class PatentFees extends Component{
                 id: id
             },
         }).done(function (data) {
-            this.setState({
+            _this.setState({
                 loading: false
             });
             if (!data.error.length) {
                 message.success('删除成功!');
-                this.loadData();
+                _this.loadData();
             } else {
                 message.warning(data.error[0].message);
             }

+ 7 - 4
js/component/manageCenter/set/projectConfigure/softwareConfigure.js

@@ -130,7 +130,7 @@ class SoftwareConfigure extends Component{
             data: {
                 pageNo: pageNo || 1,
                 pageSize: this.state.pagination.pageSize,
-                companyName:this.state.companyName,       //公司名称
+                companyName:this.state.companyName || undefined,       //公司名称
                 urgent: this.state.urgent,    //加急
                 material: this.state.material,  //材料
             },
@@ -181,6 +181,7 @@ class SoftwareConfigure extends Component{
 
     //删除
     deleteSoftWritingPrice(id) {
+        let _this = this;
         this.setState({
             loading: true
         });
@@ -193,12 +194,12 @@ class SoftwareConfigure extends Component{
                 id: id
             },
         }).done(function (data) {
-            this.setState({
+            _this.setState({
                 loading: false
             });
             if (!data.error.length) {
                 message.success('删除成功!');
-                this.loadData();
+                _this.loadData();
             } else {
                 message.warning(data.error[0].message);
             }
@@ -239,7 +240,9 @@ class SoftwareConfigure extends Component{
                                 <Select.Option value={6}>加急26-30个工作日</Select.Option>
                             </Select>
                         </div>
-                        <Button type="primary" onClick={this.loadData} style={{marginRight:'10px'}}>搜索</Button>
+                        <Button type="primary" onClick={()=>{
+                            this.loadData();
+                        }} style={{marginRight:'10px'}}>搜索</Button>
                         <Button onClick={this.reset} style={{marginRight:'10px'}}>重置</Button>
                         <span style={{marginLeft: 'auto'}}>
                             <Button type="primary" size={'middle'} onClick={()=>{