Explorar el Código

Merge branch 'master' of http://git.minpay.cc/SupplyChain/front

tudc hace 3 años
padre
commit
7ccec6e5d6

+ 7 - 0
front-vue/src/api/system/user.js

@@ -117,7 +117,14 @@ export function handlerChange(data) {
     data: data
   })
 }
+//经办人确认变更
+export function confirmChange(userId) {
+  return request({
+    url: '/system/ownUser/confirmChange/'+ userId,
+    method: 'post',
 
+  })
+}
 //查询员工姓名
 export function nameList(userId) {
   return request({

+ 28 - 8
front-vue/src/views/system/company/certification.vue

@@ -1374,6 +1374,10 @@ export default {
         this.$message.error("上传图片大小不能超过 2MB!");
         loading.close();
       }
+      const isJPG = fileObj.type === "image/jpeg";
+      if (!isJPG) {
+        this.$message.error("上传头像图片只能是 JPG 格式!");
+      }
       let fd = new FormData(); // FormData 对象
       fd.append("file", fileObj); // 文件对象
       const loading = this.$loading({
@@ -1410,7 +1414,9 @@ export default {
             loading.close();
           }, 2000);
         }
-      });
+      }).catch((response) => {
+              loading.close();
+            });
     },
     //法人身份证正面ocr识别
     fsfzzRequest(param) {
@@ -1438,7 +1444,9 @@ export default {
             loading.close();
           }, 2000);
         }
-      });
+      }).catch((response) => {
+              loading.close();
+            });
     },
     //法人身份证反面
     fsfzfRequest(param) {
@@ -1462,7 +1470,9 @@ export default {
             loading.close();
           }, 2000);
         }
-      });
+      }).catch((response) => {
+              loading.close();
+            });
     },
     //经办人身份证正面
     jsfzzRequest(param) {
@@ -1490,7 +1500,9 @@ export default {
             loading.close();
           }, 2000);
         }
-      });
+      }).catch((response) => {
+              loading.close();
+            });
     },
     //经办人身份证反面
     jsfzfRequest(param) {
@@ -1514,7 +1526,9 @@ export default {
             loading.close();
           }, 2000);
         }
-      });
+      }).catch((response) => {
+              loading.close();
+            });
     },
     //法人授权书
     frsqsRequest(param) {
@@ -1538,7 +1552,9 @@ export default {
             loading.close();
           }, 2000);
         }
-      });
+      }).catch((response) => {
+              loading.close();
+            });
     },
     //数字证书授权
     szzssqRequest(param) {
@@ -1562,7 +1578,9 @@ export default {
             loading.close();
           }, 2000);
         }
-      });
+      }).catch((response) => {
+              loading.close();
+            });
     },
     //其他附件
     qtfjRequest(param) {
@@ -1586,7 +1604,9 @@ export default {
             loading.close();
           }, 2000);
         }
-      });
+      }).catch((response) => {
+              loading.close();
+            });
     },
     // 取消按钮
     cancel() {

+ 17 - 4
front-vue/src/views/system/fundSide/fundSide.vue

@@ -291,20 +291,20 @@
             :on-exceed="handleExceed"
             list-type="picture-card"
             :file-list="sfzList"
-            :auto-upload="false"
+            :auto-upload="true"
           >
             <el-button slot="trigger" size="small" type="primary"
               >点击选择</el-button
             >
           </el-upload>
         </el-form-item>
-        <el-button
+        <!-- <el-button
           style="margin-left: 10px"
           size="small"
           type="success"
           @click="submitUpload"
           >上传到服务器</el-button
-        >
+        > -->
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -691,6 +691,17 @@ export default {
     //手动上传文件触发
     sfzRequest(param) {
       let fileObj = param.file; // 相当于input里取得的files
+        const isLt2M = fileObj.size / 1024 / 1024 < 2;
+      if (!isLt2M) {
+        this.$message.error("上传图片大小不能超过 2MB!");
+        loading.close();
+      }
+      const isJPG = fileObj.type === "image/jpeg"||
+      fileObj.type === "image/png";
+      if (!isJPG) {
+        this.$message.error("上传头像图片只能是 JPG ,PNG格式!");
+         loading.close();
+      }
       let fd = new FormData(); // FormData 对象
       fd.append("file", fileObj); // 文件对象
       fd.append("fileType", "00"); //文件类型
@@ -710,7 +721,9 @@ export default {
             loading.close();
           }, 2000);
         }
-      });
+      }).catch((response) => {
+              loading.close();
+            });
     },
   },
 };

+ 32 - 3
front-vue/src/views/system/user/detail.vue

@@ -69,12 +69,13 @@
     </el-dialog>
     <div style="text-align: center">
       <el-button type="primary" @click="submit()">确认</el-button>
+        <el-button @click="cancel">关闭</el-button>
     </div>
   </div>
 </template>
 
 <script>
-import { getFund } from "@/api/system/user";
+import { getFund,confirmChange} from "@/api/system/user";
 import { uploadFileNew } from "@/api/common/file";
 import { getToken } from "@/utils/auth";
 
@@ -298,7 +299,8 @@ export default {
     },
     //授权书
     handleDown() {
-       this.queryParams.userId = this.userId;
+       const userId = this.$route.params && this.$route.params.userId;
+       this.queryParams.userId = userId;
       this.download(
         "system_cc/ownUser/jpgAuthorization",{
              ...this.queryParams
@@ -307,7 +309,9 @@ export default {
       );
     },
     handleDowns() {
-            this.queryParams.userId = this.userId;
+       const userId = this.$route.params && this.$route.params.userId;
+       this.queryParams.userId = userId;
+      console.log(this.queryParams.userId)
         this.download(
         "system_cc/ownUser/jpgApply",{
              ...this.queryParams
@@ -315,6 +319,31 @@ export default {
         `安心签用户信息变更申请表.jpg`
       );
     },
+        // 取消按钮
+    cancel() {
+      this.$store.dispatch("tagsView/delView", this.$route);
+      this.$router.go(-1);
+    },
+          /** 确认变更经办人 */
+    submit() {
+       const userId = this.$route.params && this.$route.params.userId;
+            const loading = this.$loading({
+              lock: true,
+              text: "Loading",
+              spinner: "el-icon-loading",
+              background: "rgba(0, 0, 0, 0.7)",
+            });
+            confirmChange(userId)
+              .then((response) => {
+                loading.close();
+                this.msgSuccess("变更成功");
+                this.$store.dispatch("tagsView/delView", this.$route);
+                this.$router.go(-1);
+              })
+              .catch((response) => {
+                loading.close();
+              });
+    },
   },
 };
 </script>

+ 11 - 4
front-vue/src/views/system/user/index.vue

@@ -230,6 +230,7 @@
                 icon="el-icon-edit"
                 @click="handleChange(scope.row)"
                 v-hasPermi="['system:ownUser:adminChange']"
+                v-if="scope.row.scyStatus=='03'&&scope.row.scyID!='000000'"
                 >变更管理员</el-button
               >
               <el-button
@@ -238,7 +239,8 @@
                 icon="el-icon-edit"
                 @click="handleHandler(scope.row)"
                 v-hasPermi="['system:ownUser:handlerChange']"
-                >变更经办人</el-button
+                 v-if="scope.row.scyStatus!='03'&&scope.row.zhcStatus!='00'"
+                >申请变更经办人</el-button
               >
               <el-button
                 size="mini"
@@ -246,7 +248,8 @@
                 icon="el-icon-edit"
                 @click="confirmHandler(scope.row)"
                 v-hasPermi="['system:ownUser:confirmChange']"
-                >确认变更</el-button
+                v-if="scope.row.scyStatus!='03'&&scope.row.zhcStatus=='00'"
+                >确认变更经办人</el-button
               >
               <el-button
                 v-if="scope.row.userId !== 1"
@@ -1037,7 +1040,9 @@ export default {
             loading.close();
           }, 2000);
         }
-      });
+      }).catch((response) => {
+              loading.close();
+            });
     },
     sqsRequest(param) {
       let fileObj = param.file; // 相当于input里取得的files
@@ -1060,7 +1065,9 @@ export default {
             loading.close();
           }, 2000);
         }
-      });
+      }).catch((response) => {
+              loading.close();
+            });
     },
     /** 新增按钮操作 */
     handleAdd() {