Browse Source

【修改】调整

howie 2 years ago
parent
commit
a500148772

+ 25 - 14
src/components/Common/file-upload.vue

@@ -36,7 +36,8 @@ export default {
     return {
       oss_url: '',
       dataObj: {},
-      aliosstoken: ''
+      aliosstoken: '',
+      flag: false
     }
   },
   created() {
@@ -72,12 +73,17 @@ export default {
       const fileSuffix = name.substring(name.lastIndexOf('.') + 1)
       return `${date}${uuid}.${fileSuffix}`
     },
+
     handleRemove(file, fileList) {
+      if (!this.flag) {
+        fileList.pop()
+        this.fileList.pop()
+      }
+      this.flag = false
+
       // this.fileList = [{ name: '', url: '' }];
-      this.fileList.pop()
     },
     beforeUpload(file) {
-      console.log(file)
       const fileSuffix = file.name.substring(file.name.lastIndexOf('.') + 1)
       const imgList = ['jpg', 'jpeg', 'png']
       const videoList = ['mp4']
@@ -105,19 +111,23 @@ export default {
       if (this.fileType.includes('pdf')) {
         whiteList = whiteList.concat(pdfList)
       }
-
+      console.log(whiteList.indexOf(fileSuffix))
       if (whiteList.indexOf(fileSuffix) === -1) {
-        return this.$errorMsg('只支持上传' + this.fileType.join(',') + '文件!')
-      }
-      const fileName = this.createName(file.name)
-      const loading = this.$loading({
-        lock: true,
-        text: 'Loading',
-        spinner: 'el-icon-loading',
-        background: 'rgba(0, 0, 0, 0.7)'
-      })
+        this.$errorMsg('只支持上传' + this.fileType.join(',') + '文件!')
+        this.flag = true
+
+        return false
+      } else {
+        const fileName = this.createName(file.name)
+        const loading = this.$loading({
+          lock: true,
+          text: 'Loading',
+          spinner: 'el-icon-loading',
+          background: 'rgba(0, 0, 0, 0.7)'
+        })
 
-      this.dataObj.key = this.dataObj.dir + fileName
+        this.dataObj.key = this.dataObj.dir + fileName
+      }
     },
     handleUploadSuccess(res, file, fileList) {
       const loading = this.$loading({
@@ -129,6 +139,7 @@ export default {
       if (!this.multiple) {
         this.fileList.pop()
       }
+      console.log(4747)
       this.fileList.push({
         name: file.name,
         status: 'success',

+ 21 - 9
src/views/supply/apply/apply_list.vue

@@ -376,9 +376,13 @@
               <template slot-scope="scope">
                 <el-popconfirm
                   v-if="
-                    $checkBtnRole('apply', $route.meta.roles) &&
-                    !scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'SAVE'
+                    ($checkBtnRole('apply', $route.meta.roles) &&
+                      !scope.row.automaticStatus &&
+                      scope.row.examineStatus === 'SAVE') ||
+                    ($checkBtnRole('apply', $route.meta.roles) &&
+                      scope.row.automaticStatus &&
+                      scope.row.examineStatus === 'SAVE' &&
+                      scope.row.type == 2)
                   "
                   style="margin-right: 10px"
                   title="确定申请吗?"
@@ -388,9 +392,13 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
-                    $checkBtnRole('apply', $route.meta.roles) &&
-                    !scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'WAIT'
+                    ($checkBtnRole('apply', $route.meta.roles) &&
+                      !scope.row.automaticStatus &&
+                      scope.row.examineStatus === 'WAIT') ||
+                    ($checkBtnRole('apply', $route.meta.roles) &&
+                      scope.row.automaticStatus &&
+                      scope.row.examineStatus === 'SAVE' &&
+                      scope.row.type == 2)
                   "
                   style="margin-right: 10px"
                   title="确定撤回吗?"
@@ -400,9 +408,13 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
-                    $checkBtnRole('examine', $route.meta.roles) &&
-                    !scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'OK'
+                    ($checkBtnRole('examine', $route.meta.roles) &&
+                      !scope.row.automaticStatus &&
+                      scope.row.examineStatus === 'OK') ||
+                    ($checkBtnRole('examine', $route.meta.roles) &&
+                      scope.row.automaticStatus &&
+                      scope.row.examineStatus === 'SAVE' &&
+                      scope.row.type == 2)
                   "
                   style="margin-right: 10px"
                   title="确定弃审吗?"

+ 19 - 10
src/views/supply/apply/engin_list.vue

@@ -406,9 +406,13 @@
               <template slot-scope="scope">
                 <el-popconfirm
                   v-if="
-                    !scope.row.automaticStatus &&
-                    $checkBtnRole('apply', $route.meta.roles) &&
-                    scope.row.examineStatus === 'SAVE'
+                    (!scope.row.automaticStatus &&
+                      $checkBtnRole('apply', $route.meta.roles) &&
+                      scope.row.examineStatus === 'SAVE') ||
+                    ($checkBtnRole('apply', $route.meta.roles) &&
+                      scope.row.automaticStatus &&
+                      scope.row.examineStatus === 'SAVE' &&
+                      scope.row.type == 2)
                   "
                   style="margin-right: 10px"
                   title="确定申请吗?"
@@ -430,9 +434,13 @@
                 </el-popconfirm>
                 <el-popconfirm
                   v-if="
-                    !scope.row.automaticStatus &&
-                    $checkBtnRole('examine', $route.meta.roles) &&
-                    scope.row.examineStatus === 'OK'
+                    (!scope.row.automaticStatus &&
+                      $checkBtnRole('examine', $route.meta.roles) &&
+                      scope.row.examineStatus === 'OK') ||
+                    ($checkBtnRole('apply', $route.meta.roles) &&
+                      scope.row.automaticStatus &&
+                      scope.row.examineStatus === 'SAVE' &&
+                      scope.row.type == 2)
                   "
                   style="margin-right: 10px"
                   title="确定弃审吗?"
@@ -454,10 +462,11 @@
                 </el-button>
                 <el-button
                   v-if="
-                    !scope.row.automaticStatus &&
-                    $checkBtnRole('edit', $route.meta.roles) &&
-                    (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
-                    scope.row.type === 2
+                    (!scope.row.automaticStatus &&
+                      $checkBtnRole('edit', $route.meta.roles) &&
+                      (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
+                      scope.row.type === 2) ||
+                    ($checkBtnRole('edit', $route.meta.roles) && scope.row.automaticStatus && scope.row.type == 2)
                   "
                   type="text"
                   @click="toReturnForm(scope.row)"

+ 1 - 1
src/views/supply/sales/components/sales_detail.vue

@@ -37,7 +37,7 @@
           <el-col :span="16" class="item">
             <div class="label">备注</div>
             <div class="value">
-              <el-input v-model="detailData.remark" readonly placeholder="请输入备注"></el-input>
+              <el-input v-model="detailData.remark" :readonly="!edit" placeholder="请输入备注"></el-input>
             </div>
           </el-col>
           <el-col :span="24" class="item file" style="width: 100%; height: auto">

+ 1 - 1
src/views/supply/sales/components/sales_examine.vue

@@ -34,7 +34,7 @@
         <el-col :span="16" class="item">
           <div class="label">备注</div>
           <div class="value">
-            <el-input v-model="detailData.remark" readonly placeholder="请输入备注"></el-input>
+            <el-input v-model="detailData.remark" placeholder="请输入备注"></el-input>
           </div>
         </el-col>
         <el-col :span="24" class="item file" style="width: 100%; height: auto">