Преглед изворни кода

提交审核限制修改,退款搜索加供应商名,附件限制

fan0987 пре 3 недеља
родитељ
комит
8bafaef620

+ 40 - 14
ruoyi-ui/src/components/tender/tenderDocument.vue

@@ -19,9 +19,7 @@
       <!-- <el-table-column label="文件大小(kb)" align="center" prop="wSize" /> -->
       <el-table-column label="上传时间" align="center" prop="wUploadTime" width="180">
         <template slot-scope="scope">
-          <span>{{
-      parseTime(scope.row.wUploadTime, "{y}-{m}-{d}")
-    }}</span>
+          <span>{{ parseTime(scope.row.wUploadTime, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -29,7 +27,6 @@
           <a :href="scope.row.url" target="_blank">
             <el-button size="mini" type="text" icon="el-icon-download">下载</el-button>
           </a>
-
           <el-button style="margin-left: 10px" size="mini" type="text" icon="el-icon-edit"
             @click="handleUpdate(scope.row)">修改</el-button>
           <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
@@ -54,14 +51,16 @@
           <el-input v-model="form.wSize" placeholder="请输入文件大小" />
         </el-form-item> -->
         <el-form-item label="附件">
-          <el-upload ref="upload" class="upload-demo" :limit="1" accept=".doc, .docx, .rar, .txt, .png, .jpg" multiple
+          <el-upload ref="upload" class="upload-demo" :limit="1" multiple
             :action="upload.url" :data="upload" :on-change="changeFileLength" :headers="upload.headers"
-            :file-list="upload.fileList" :before-remove="beforeRemove" :on-progress="handleFileUploadProgress"
-            :on-success="handleFileSuccess" :auto-upload="false">
+            :file-list="upload.fileList" :on-progress="handleFileUploadProgress"
+            :on-success="handleFileSuccess" :auto-upload="false" :before-upload="handleBeforeUpload">
             <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
-            <div slot="tip" class="el-upload__tip">
-              只能上传.doc, .docx, .rar, .txt, .png,
-              .jpg文件,且不超过500MB
+            <div class="el-upload__tip" slot="tip">
+              请上传
+              <template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
+              <template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
+              的文件
             </div>
           </el-upload>
         </el-form-item>
@@ -151,6 +150,10 @@ export default {
       uploadFiles: [],
       // 收集——上传文件的个数
       filesLength: 0,
+      // 大小限制(MB)
+      fileSize: 500,
+      // 文件类型, 例如['png', 'jpg', 'jpeg']
+      fileType: ["doc", "docx", "rar", "txt", "pdf"],
       // 上传参数
       upload: {
         sid: this.$route.query.sid,
@@ -294,6 +297,33 @@ export default {
         }
       });
     },
+    // 上传前校检格式和大小
+    handleBeforeUpload (file) {
+      if (file.name.indexOf('#') > -1) {
+        this.$modal.msgError(`上传文件名不得带有#等特殊字符`);
+        return false;
+      }
+      // 校检文件类型
+      if (this.fileType) {
+        const fileName = file.name.split('.');
+        const fileExt = fileName[fileName.length - 1];
+        const isTypeOk = this.fileType.indexOf(fileExt) >= 0;
+        if (!isTypeOk) {
+          this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
+          return false;
+        }
+      }
+      // 校检文件大小
+      if (this.fileSize) {
+        const isLt = file.size / 1024 / 1024 < this.fileSize;
+        if (!isLt) {
+          this.$modal.msgError(`上传文件大小不能超过 ${this.fileSize} MB!`);
+          return false;
+        }
+      }
+      
+      return true;
+    },
     // 文件提交处理
     submitUpload () {
       this.$refs.upload.submit();
@@ -341,10 +371,6 @@ export default {
       }
       this.upload.isUploading = false;
     },
-    beforeRemove (file, fileList) {
-      this.upload.fileList = [];
-      return this.$confirm(`确定移除 ${file.name}?`);
-    },
     beforeUpload (file) {
       const isLt5M = file.size / 1024 / 1024 < 500;
 

+ 2 - 5
ruoyi-ui/src/views/bank/refund/index.vue

@@ -4,11 +4,8 @@
       <el-form-item label="项目编号" prop="rtnPrjno">
         <el-input v-model="queryParams.rtnPrjno" placeholder="请输入项目编号" clearable @keyup.enter.native="handleQuery" />
       </el-form-item>
-      <el-form-item label="银行流水" prop="trnuid">
-        <el-input v-model="queryParams.trnuid" placeholder="采购公告" clearable @keyup.enter.native="handleQuery" />
-      </el-form-item>
-      <el-form-item label="企业名称" prop="entpnm" v-if="false">
-        <el-input v-model="queryParams.entpnm" placeholder="请输入企业名称" clearable @keyup.enter.native="handleQuery" />
+      <el-form-item label="企业名称" prop="rtnTdracctnm">
+        <el-input v-model="queryParams.rtnTdracctnm" placeholder="请输入企业名称" clearable @keyup.enter.native="handleQuery" />
       </el-form-item>
       <el-form-item label="处理结果等级" prop="rtnSeverity" v-if="false">
         <el-input v-model="queryParams.rtnSeverity" placeholder="请输入处理结果等级(info/warn/error)" clearable

+ 8 - 8
ruoyi-ui/src/views/purchase/stop/bidWinningDetail.vue

@@ -331,10 +331,10 @@
       
       //审核采购计划
       approved () {
-        if (!this.form.bidEditor) {
-          this.$modal.msgError("请输入审核意见")
-          return;
-        }
+        // if (!this.form.bidEditor) {
+        //   this.$modal.msgError("请输入审核意见")
+        //   return;
+        // }
 
         if (this.sState == 3) { // 负责人审核
           this.$modal.confirm("确定要审核终止该采购计划?").then(() => {
@@ -349,10 +349,10 @@
 
       // 申请变更
       approvedChange() {
-        if (!this.form.bidEditor) {
-          this.$modal.msgError("请输入审核意见")
-          return;
-        }
+        // if (!this.form.bidEditor) {
+        //   this.$modal.msgError("请输入审核意见")
+        //   return;
+        // }
 
         if (this.cState == 2) { // 负责人审核
           this.$modal.confirm("确定要审核变更该采购计划?").then(() => {

+ 4 - 4
ruoyi-ui/src/views/purchase/stop/detail.vue

@@ -297,10 +297,10 @@ export default {
     },
     //审核采购计划
     approved () {
-      if (!this.form.editor) {
-        this.$modal.msgError("请输入审核意见")
-        return;
-      }
+      // if (!this.form.editor) {
+      //   this.$modal.msgError("请输入审核意见")
+      //   return;
+      // }
 
       // 4——>8——>5
       if (this.aAstate == 4) { // 负责人审核