瀏覽代碼

修改还款管理展示等bug

cuixq 4 年之前
父節點
當前提交
45711c6e69

+ 1 - 1
front-vue/src/permission.js

@@ -25,7 +25,7 @@ router.beforeEach((to, from, next) => {
       if (store.getters.roles.length === 0) {
         // 判断当前用户是否已拉取完user_info信息
         store.dispatch('GetInfo').then(res => {
-          if (res.code == 501 || res.code == 502) {
+          if (res.code == 501 || res.code == 502 || res.code == 503) {
             return;
           }
           // 拉取user_info

+ 1 - 1
front-vue/src/store/modules/user.js

@@ -142,7 +142,7 @@ const user = {
     GetInfo({ commit, state }) {
       return new Promise((resolve, reject) => {
         getInfo(state.token).then(res => {
-          if (res.code == 501 || res.code == 502) {
+          if (res.code == 501 || res.code == 502 || res.code == 503) {
             resolve(res)
           }
           const user = res.user

+ 12 - 0
front-vue/src/utils/request.js

@@ -120,6 +120,18 @@ service.interceptors.response.use(res => {
         })
       })
       return res.data;
+    } else if (code === 503) {
+      MessageBox.confirm('用户角色更变,请重新登录!', '系统提示', {
+          confirmButtonText: '重新登录',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }
+      ).then(() => {
+        store.dispatch('LogOut').then(() => {
+          location.href = '/home';
+        })
+      })
+      return res.data;
     } else if (code !== 200) {
       Notification.error({
         title: msg

+ 2 - 2
front-vue/src/views/registerUser.vue

@@ -150,9 +150,9 @@ export default {
                         message: "联系人不能为空",
                     },
                     {
-                        pattern:/^[\u4E00-\u9FA5]+$/,
+                        pattern:/^[\u4e00-\u9fa5_a-zA-Z]+$/,
                         trigger: ["blur", "change"],
-                        message: "联系人只能输入汉字",
+                        message: "联系人只能输入汉字和英文",
                     }
                 ],
                 phone: [

+ 28 - 6
front-vue/src/views/service/contract/addContract.vue

@@ -126,6 +126,8 @@
           ref="upload"
           class="upload-demo"
           action=""
+          :class="{uoloadSty:showBtnDealImg,disUoloadSty:noneBtnDealImg}"
+          :on-change="dealImgChange"
           :http-request="httpRequest"
           :before-remove="beforeRemove"
           accept=".docx"
@@ -141,10 +143,6 @@
             <i class="el-icon-upload"></i>
             <div class="zap-upload__text">上传文件</div>
           </div>
-          <div slot="tip" class="zap-contract-add__tip">
-            支持格式:.docx </br>
-            单个文件不能超过20MB
-          </div>
           <!-- 设置缩略图模板 -->
           <div slot="file" slot-scope="{file}" class="zap-contract-add__thumbnail">
             <img
@@ -159,6 +157,12 @@
               <i class="el-icon-error"></i>
             </span>
           </div>
+
+          <div slot="tip" class="zap-contract-add__tip" v-show="!noneBtnDealImg">
+            支持格式:.docx </br>
+            单个文件不能超过20MB
+          </div>
+
         </el-upload>
       </el-form-item>
 
@@ -199,6 +203,10 @@ export default {
       totalProject: 0,
       // 是否显示弹出层
       open: false,
+      //文件上传展示
+     showBtnDealImg:true,
+      noneBtnDealImg:false,
+      limitCountImg:1 ,  //上传文件的最大数量
       // 资方列表
       companyList: [],
       //合同列表
@@ -316,6 +324,7 @@ export default {
           break;
         }
       }
+        this.noneBtnDealImg = fileList.length >= this.limitCountImg;
     },
     handleExceed(files, fileList) {
       this.$message.warning(`当前限制选择 1 个文件`);
@@ -328,6 +337,9 @@ export default {
       }
       return extension2;
     },
+    dealImgChange(files, fileList){
+      this.noneBtnDealImg = fileList.length >= this.limitCountImg;
+     },
     //手动上传文件触发
     httpRequest(param) {
       let fileObj = param.file; // 相当于input里取得的files
@@ -346,10 +358,12 @@ export default {
           this.msgSuccess("上传成功");
           loading.close();
         }
+        this.noneBtnDealImg = fileList.length >= this.limitCountImg;
       }).catch((response) =>{
           if(!response){
             this.$message.warning(`上传失败`);
           }
+           this.noneBtnDealImg = fileList.length >= this.limitCountImg;
           loading.close();
       });
     },
@@ -360,8 +374,9 @@ export default {
       // this.open = false;
     },
     reset() {
+      this.noneBtnImg = false; 
       this.form = {
-        
+       
       };
       this.resetForm("form");
     },
@@ -407,7 +422,8 @@ export default {
       });
     },
     handleRemove(file) {
-      this.fileList = []
+      this.fileList = [];
+      this.noneBtnDealImg = this.fileList.length >= this.limitCountImg;
     },
     handleDownload(file) {
     
@@ -423,6 +439,12 @@ export default {
 .single-select-table thead .el-table-column--selection .cell {
   display: none;
 }
+.uoloadSty .el-upload{
+  line-height:110px;
+}
+.disUoloadSty .el-upload{
+  display:none;   /* 上传按钮隐藏 */
+}
 </style>
 <style lang="scss" scoped>
 .zap-contract-No{

+ 36 - 27
front-vue/src/views/service/repayment/repayment.vue

@@ -319,7 +319,8 @@
                   type="text"
                   @click="handleUp(scope.row)"
                   v-hasPermi="['service:repayment:edit']"
-                  v-if="scope.row.zfrApplyStatus != '01'&&company.scyType == '00'||company.scyType == '03'"
+                  v-if="scope.row.zfrApplyStatus != '01' && (company.scyType == '00'||
+                  company.scyType == '03')"
                 >还款登记</el-button>
               </template>
             </el-table-column>
@@ -440,14 +441,15 @@
                 @click="handleDown(scope.row)"
                 v-hasPermi="['service:repayment:down']"
               >下载</el-button>
-              <el-button
-                class="zap-button-primary"
-                size="mini"
-                type="text"
-                @click="handleUp(scope.row)"
-                v-hasPermi="['service:repayment:up']"
-                v-if="scope.row.zfrApplyStatus != '01'&&company.scyType == '00'||company.scyType == '03'"
-              >还款登记</el-button>
+           <el-button
+                  class="zap-button-primary"
+                  size="mini"
+                  type="text"
+                  @click="handleUp(scope.row)"
+                  v-hasPermi="['service:repayment:edit']"
+                  v-if="scope.row.zfrApplyStatus != '01'&&(company.scyType == '00'||
+                  company.scyType == '03')"
+                >还款登记</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -566,14 +568,6 @@
                 @click="handleDown(scope.row)"
                 v-hasPermi="['service:repayment:down']"
               >下载</el-button>
-              <el-button
-                class="zap-button-primary"
-                size="mini"
-                type="text"
-                @click="handleUp(scope.row)"
-                v-hasPermi="['service:repayment:up']"
-                v-if="scope.row.zfrApplyStatus != '01'&&company.scyType == '00'||company.scyType == '03'"
-              >还款登记</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -693,15 +687,15 @@
                 @click="handleDown(scope.row)"
                 v-hasPermi="['service:repayment:down']"
               >下载</el-button>
-              <el-button
-                class="zap-button-primary"
-                size="mini"
-                type="text"
-                @click="handleUp(scope.row)"
-                v-hasPermi="['service:repayment:up']"
-                v-if="scope.row.zfrApplyStatus != '01'&&
-                  company.scyType == '00'||company.scyType == '03'"
-              >还款登记</el-button>
+           <el-button
+                  class="zap-button-primary"
+                  size="mini"
+                  type="text"
+                  @click="handleUp(scope.row)"
+                  v-hasPermi="['service:repayment:edit']"
+                  v-if="scope.row.zfrApplyStatus != '01'&&(company.scyType == '00'||
+                  company.scyType == '03')"
+                >还款登记</el-button>
             </template>
           </el-table-column>
         </el-table>
@@ -975,9 +969,9 @@ export default {
       this.loading = true;
       return listRepayment(this.queryParams).then(response => {
         this.allRepaymentList = response.data.records;
+         console.log(this.allRepaymentList,"列表")
         this.total = response.data.total;
            getOwnCompany().then((response) => {
-                console.log(response,"企业数据")
                 this.company = response.data;
             });
         this.loading = false;
@@ -991,8 +985,14 @@ export default {
     getUnpayList() {
       this.loading = true;
       this.unRepayment.status = "00";
+        getOwnCompany().then((response) => {
+             console.log(response,"企业数据")
+                this.company = response.data;
       return listRepayment(this.unRepayment).then(response => {
         this.unRepaymentList = response.data.records;
+        console.log(this.unRepaymentList,"列表展示")
+          
+     
         this.total1 = response.data.total;
         this.loading = false;
         return Promise.resolve(response);
@@ -1000,6 +1000,7 @@ export default {
         this.loading = false;
         return Promise.reject("error");
       });
+            });
     },
     /** 查询已还款列表 */
     getRepayList() {
@@ -1007,6 +1008,10 @@ export default {
       this.repayment.status = "01";
       return listRepayment(this.repayment).then(response => {
         this.repaymentList = response.data.records;
+            getOwnCompany().then((response) => {
+                console.log(response,"企业数据")
+                this.company = response.data;
+            });
         this.total2 = response.data.total;
         this.loading = false;
         return Promise.resolve(response);
@@ -1021,6 +1026,10 @@ export default {
       this.overdue.status = "02";
       return listRepayment(this.overdue).then(response => {
         this.overdueList = response.data.records;
+            getOwnCompany().then((response) => {
+                console.log(response,"企业数据")
+                this.company = response.data;
+            });
         this.total3 = response.data.total;
         this.loading = false;
         return Promise.resolve(response);

+ 17 - 7
front-vue/src/views/system/user/index.vue

@@ -581,7 +581,7 @@ export default {
         "form.userName": "getLoginName",
     },
     created() {
-        this.getList();
+        // this.getList();
         this.getNowUser();
         this.getTreeselect();
         this.getUserProfile();
@@ -601,6 +601,9 @@ export default {
     mounted() {
         this.columnQuery();
     },
+    activated(){
+        this.getList();
+    },
     methods: {
         jsfzzImgChange(file, jsfzzList) {
             this.jsfzzBtnImg = jsfzzList.length >= this.limitCountImg;
@@ -794,14 +797,22 @@ export default {
             listUser(this.addDateRange(this.queryParams, this.dateRange)).then(
                 (response) => {
                     let userList = response.rows;
+                      handlerDo(userList[0]).then((response) => {
                     for (let i = 0; i < userList.length; i++) {
-                        handlerDo(userList[i]).then((response) => {
-                            userList[i].handleChange = response.data.handleChange;
-                        });
+                             for (let j = 0; j < response.data.length; j++) {
+                                 console.log(userList[i].userId,"iser")
+                                 console.log(response.data[j].userId,"user")
+                                 if(userList[i].userId==response.data[j].userId){
+                                    userList[i].handleChange = response.data[j].handleChange;
+                                 }
+                                  
+                             }
                     }
-                    this.userList = userList;
-                    this.total = response.total;
+                       this.userList = userList;
+                        console.log(userList,"用户列表")
                     this.loading = false;
+                      });
+                      this.total = response.total;
                 }
             );
             handleUser().then((response) => {
@@ -1062,7 +1073,6 @@ export default {
         /** 确认变更经办人*/
         confirmHandler(row) {
             console.log(row);
-            this.resetForm("queryForm");
             Cookies.set(
                 "/user/detail/" + row.userId + "/" + row.scyId,
                 this.$route.fullPath