Browse Source

生产更新-去除标准上传限制

dev01 2 months ago
parent
commit
757b61e2b1

+ 24 - 11
js/component/common/imgList/index.js

@@ -72,20 +72,25 @@ class ImgList extends Component {
   }
 
   beforeUpload(file) {
-    const { isSupportPDF = false } = this.props
+    const { isSupportPDF = false, limitation = true } = this.props
     const isLt2M = file.size / 1024 / 1024 < 20;
-    if (!isLt2M) {
+    if (!isLt2M && limitation) {
       message.error('文件大小不能超过 20MB!');
       return isLt2M;
     }
     if (this.props.accept) {
-      if (isLt2M) {
-        this.state.newUploadArr.push(file)
-        this.setState({
-          newUploadArr: this.state.newUploadArr
-        })
-      }
-      return isLt2M;
+      this.state.newUploadArr.push(file)
+      this.setState({
+        newUploadArr: this.state.newUploadArr
+      })
+      return true;
+      // if (isLt2M) {
+      //   this.state.newUploadArr.push(file)
+      //   this.setState({
+      //     newUploadArr: this.state.newUploadArr
+      //   })
+      // }
+      // return isLt2M;
     } else {
       const isJPG = file.type.split('/');
       if (isSupportPDF) {
@@ -99,14 +104,22 @@ class ImgList extends Component {
           return false;
         }
       }
-      if (isJPG && isLt2M) {
+      if (isJPG) {
         // 用于计算当次选择的图片数量
         this.state.newUploadArr.push(file)
         this.setState({
           newUploadArr: this.state.newUploadArr
         })
       }
-      return isJPG && isLt2M;
+      return isJPG;
+      // if (isJPG && isLt2M) {
+      //   // 用于计算当次选择的图片数量
+      //   this.state.newUploadArr.push(file)
+      //   this.setState({
+      //     newUploadArr: this.state.newUploadArr
+      //   })
+      // }
+      // return isJPG && isLt2M;
     }
   }
 

+ 1 - 0
js/component/manageCenter/project/task/newSupplier.js

@@ -413,6 +413,7 @@ class NewSupplier extends Component {
                                             <Option value="5">加急21-25个工作日</Option>
                                             <Option value="6">加急26-30个工作日</Option>
                                             <Option value="7">加急45个工作日</Option>
+                                            <Option value="8">加急60个工作日</Option>
                                         </Select>
                                         <span className="mandatory">*</span>
                                     </Form.Item>

+ 1 - 0
js/component/manageCenter/set/projectConfigure/addSoftWritingPrice.js

@@ -104,6 +104,7 @@ class AddSoftWritingPrice extends Component{
                                     <Select.Option value={5}>加急21-25个工作日</Select.Option>
                                     <Select.Option value={6}>加急26-30个工作日</Select.Option>
                                     <Select.Option value={7}>加急45个工作日</Select.Option>
+                                    <Select.Option value={8}>加急60个工作日</Select.Option>
                                 </Select>
                             )}
                         </Form.Item>

+ 3 - 0
js/component/manageCenter/set/projectConfigure/softwareConfigure.js

@@ -64,6 +64,8 @@ class SoftwareConfigure extends Component {
                 return '加急26-30个工作日';
               case 7:
                 return '加急45个工作日';
+              case 8:
+                return '加急60个工作日';
             }
           }
         },
@@ -261,6 +263,7 @@ class SoftwareConfigure extends Component {
                     <Select.Option value={5}>加急21-25个工作日</Select.Option>
                     <Select.Option value={6}>加急26-30个工作日</Select.Option>
                     <Select.Option value={7}>加急45个工作日</Select.Option>
+                    <Select.Option value={8}>加急60个工作日</Select.Option>
                   </Select>
                 </div>
                 <Button type="primary" onClick={() => {

+ 2 - 1
js/component/manageCenter/standard/stList/index.jsx

@@ -53,6 +53,7 @@ const PicturesWall = React.createClass({
       <div style={{ display: "inline-block" }}>
         <ImgList
           isSupportPDF={true}
+          limitation={false}
           domId={this.props.domId}
           uploadConfig={{
             action: globalConfig.context + "/api/admin/standard/uploadPicture",
@@ -117,7 +118,7 @@ const Standard = Form.create()(React.createClass({
           title: '参考',
           dataIndex: 'reference',
           key: 'reference',
-          render: (text, record) => <span>{['国家 ', '行业 ', '地方 ', '团体 ', '国际 ','企业 '][record.type]}{text}</span>
+          render: (text, record) => <span>{['国家 ', '行业 ', '地方 ', '团体 ', '国际 ', '企业 '][record.type]}{text}</span>
         },
         {
           title: '部门',

+ 3 - 1
js/component/tools.js

@@ -1012,7 +1012,7 @@ const obj = {
   },
   //是否文字与数字转换
   getWhether: function (e) {
-    if (e) {
+    if (e || e == 0) {
       let theType = "";
       Whether.map(function (item) {
         if (item.value == e) {
@@ -1835,6 +1835,8 @@ const obj = {
       return "加急26-30个工作日";
     } else if (val == 7) {
       return "加急45个工作日";
+    } else if (val == 8) {
+      return "加急60个工作日";
     }
   },
   //审核状态