فهرست منبع

fix:合同管理提交按钮校验

刘恒 1 سال پیش
والد
کامیت
fcdb740333
1فایلهای تغییر یافته به همراه19 افزوده شده و 17 حذف شده
  1. 19 17
      src/views/FinancialManagement/ContractManagement/ContractManagement.vue

+ 19 - 17
src/views/FinancialManagement/ContractManagement/ContractManagement.vue

@@ -137,7 +137,7 @@
       size="small"
       :data="tableData"
       style="width: 100%"
-      height="650"
+      height="640"
       border
       :header-cell-style="{
         background: '#F2F7FC',
@@ -638,24 +638,16 @@
 
       <div slot="footer" class="dialog-footer">
         <el-button @click="cancel">取 消</el-button>
-        <el-button type="primary" @click="submit">确 定</el-button>
+        <el-button type="primary" @click="submit" :disabled="btnDisabled"
+          >确 定</el-button
+        >
       </div>
     </el-dialog>
     <el-dialog title="附件" :visible.sync="fileDialog" width="50%">
-      <div class="block">
-        <el-carousel trigger="click" height="1200px" :autoplay="false">
-          <el-carousel-item
-            v-for="item in showFileList"
-            :key="item.url"
-            style="height: 1200px; overflow-y: auto"
-          >
-            <div
-              style="
-                display: flex;
-                justify-content: center;
-                margin-bottom: 10px;
-              "
-            >
+      <div class="block" style="height: 700px">
+        <el-carousel trigger="click" :autoplay="false">
+          <el-carousel-item v-for="item in showFileList" :key="item.url">
+            <div style="display: flex; justify-content: center">
               <kt-button
                 type="primary"
                 icon="el-icon-download"
@@ -1094,7 +1086,7 @@ export default {
       messageDialog: false,
       tableDialog: false,
       multipleSelection: [],
-
+      btnDisabled: false,
       base: process.env.BASE_URL,
       form: {
         contractCode: "",
@@ -1414,6 +1406,7 @@ export default {
         this.$api.contract
           .copyContractList({
             id: row.id,
+            isView: true,
           })
           .then((res) => {
             if (res.code === 200) {
@@ -1494,6 +1487,7 @@ export default {
     submit() {
       this.$refs["ruleForm"].validate((valid) => {
         if (valid) {
+          this.btnDisabled = true;
           if (this.operation != "supplement") {
             this.$api.contract
               .constractSave({
@@ -1519,12 +1513,14 @@ export default {
                 if (res.code === 200) {
                   this.$message.success(res.msg);
                   this.dialogVisible = false;
+                  this.btnDisabled = false;
                   this.$nextTick(() => {
                     this.$refs.ruleForm.clearValidate();
                   });
                   this.getList();
                 } else {
                   this.$message.error(res.msg);
+                  this.btnDisabled = false;
                 }
               });
           } else {
@@ -1553,9 +1549,12 @@ export default {
                   this.$nextTick(() => {
                     this.$refs.ruleForm.clearValidate();
                   });
+                  this.btnDisabled = false;
+
                   this.getList();
                 } else {
                   this.$message.error(res.msg);
+                  this.btnDisabled = false;
                 }
               });
           }
@@ -1771,4 +1770,7 @@ export default {
     }
   }
 }
+/deep/ .el-carousel__container {
+  height: 700px !important;
+}
 </style>