Browse Source

修复无法通过外包的情况

mentoswzq 4 years ago
parent
commit
5e5b30ec2f

+ 16 - 0
js/component/common/imgList/index.js

@@ -23,6 +23,9 @@ class ImgList extends Component{
             gallery: null,
             loading: true,
             imgLoadNum: 0,
+
+            // fileListSize: 0,
+            // doneFileSize: 0,
         }
         this.imgLoading = this.imgLoading.bind(this);
         this.setTimeOutObj = null;
@@ -120,6 +123,19 @@ class ImgList extends Component{
                             onChange={(infor)=>{
                                 this.state.gallery && this.state.gallery.destroy();
                                 this.props.onChange(infor)
+                                // this.setState({
+                                //     fileListSize: infor.fileList.length
+                                // })
+                                // if(infor.file && infor.file.status === 'done'){
+                                //     let num = this.state.doneFileSize + 1;
+                                //     if(num >= infor.fileList.length){
+                                //         console.log('所有都上传成功')
+                                //     }
+                                //     this.setState({
+                                //         doneFileSize: num
+                                //     })
+                                // }
+                                // console.log(infor.event)
                             }}
                         >
                             {Object.keys(this.props.uploadConfig).length === 0 ? "" : uploadButton}

+ 21 - 5
js/component/manageCenter/order/orderNew/outsourcingPro.jsx

@@ -591,6 +591,7 @@ const outsourcingPro = Form.create()(
     },
     //项目列表
     xiangmu(orderNos) {
+      let _this = this;
       $.ajax({
         method: "get",
         dataType: "json",
@@ -609,6 +610,7 @@ const outsourcingPro = Form.create()(
           } else {
             for (let i = 0; i < data.data.length; i++) {
               let thisdata = data.data[i];
+              localStorage.setItem('cSort', thisdata.cSort)
               theArr.push({
                 key: i,
                 id: thisdata.id,
@@ -627,9 +629,21 @@ const outsourcingPro = Form.create()(
                 sort: thisdata.cSort,
               });
             }
+            // 获取Csort
+            this.setState({
+              getOrderTaskLoading: true
+            });
+            if(data.data.length > 0){
+              _this.getCsortData(data.data[0].cSort);
+            }else{
+              this.setState({
+                getOrderTaskLoading: false
+              });
+            }
           }
           this.setState({
             dataSourceX: theArr,
+            cSort: theArr[0].cSort,
           });
         }.bind(this),
       }).always(
@@ -870,6 +884,9 @@ const outsourcingPro = Form.create()(
         if (item.value == cSort) {
           this.setState({
             paySubject: item.children,
+          },()=>{
+            //获取支付节点信息表格
+            this.payNodeTable(this.state.tid);
           })
         }
       })
@@ -927,6 +944,7 @@ const outsourcingPro = Form.create()(
           function () {
             this.setState({
               loading: false,
+              getOrderTaskLoading: false,
             })
           }.bind(this)
       )
@@ -982,6 +1000,8 @@ const outsourcingPro = Form.create()(
               }
 
               this.setState({
+                id: data.data.id,
+                orderNo: data.data.orderNo,
                 startType: data.data.startType, //类型
                 patentType: data.data.patentType, //专利类型
                 patentNameType: data.data.patentNameType, //专利名称类型
@@ -1040,10 +1060,6 @@ const outsourcingPro = Form.create()(
       this.jiedianNew(record.orderNo);
       // 获取第三方信息表格
       this.thirdTable(record.tid);
-      //获取支付节点信息表格
-      this.payNodeTable(record.tid);
-      // 获取Csort
-      this.getCsortData(localStorage.getItem('cSort'))
     },
     //页面加载函数
     componentWillMount() {
@@ -1465,7 +1481,7 @@ const outsourcingPro = Form.create()(
                   }
               >
                 <TabPane tab="外包审核" key="1">
-                  {this.state.activeKey === '1' ? <Spin spinning={this.state.loading}>
+                  {this.state.activeKey === '1' ? <Spin spinning={this.state.loading || this.state.getOrderTaskLoading}>
                     <CheckProject
                         {...this.props}
                         tid={this.state.tid}

+ 1 - 1
package.json

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