Procházet zdrojové kódy

限制分润比例

zhengnaiwen_citu před 4 měsíci
rodič
revize
688a8757b5

+ 5 - 0
src/views/salary/claim/sharingClaim/sharingClaimDetailsClaim.vue

@@ -170,6 +170,11 @@ export default {
       this.$refs.form.validate(async (valid) => {
         if (!valid) {
           this.$message.error('请填写完整')
+          return
+        }
+        if (this.nowRatio > this.formValues.maxRatio) {
+          this.$message.error('分润比例不能超过可分配比例')
+          return
         }
         try {
           await claimPerformanceMore({

+ 5 - 0
src/views/salary/claim/sharingClaim/sharingClaimDetailsClaimByDept.vue

@@ -161,6 +161,11 @@ export default {
       this.$refs.form.validate(async (valid) => {
         if (!valid) {
           this.$message.error('请填写完整')
+          return
+        }
+        if (this.nowRatio > this.formValues.maxRatio) {
+          this.$message.error('分润比例不能超过可分配比例')
+          return
         }
         try {
           await claimPerformanceMoreByBatch({

+ 4 - 0
src/views/salary/claim/staff/staffForm.vue

@@ -129,6 +129,10 @@ export default {
           return
         }
         const { employeeProfitSharingRatio, serialNumber, unifiedCertificationNumber } = this.formValues
+        if (employeeProfitSharingRatio > this.formValues.maxRatio) {
+          this.$message.error('分润比例不能大于可分润比例')
+          return
+        }
         this.loading = true
         try {
           await getCustomerProfitSharingClaimStaffAdd({