Kaynağa Gözat

保存合同

drew 6 yıl önce
ebeveyn
işleme
745d387fbb

+ 0 - 1
src/main/vue/src/views/Admin.vue

@@ -25,7 +25,6 @@
             </div>
 
             <el-select
-                v-if="role != 'sale'"
                 :value="selectedStoreId"
                 @input="storeIdChange"
                 placeholder="请选择店铺"

+ 1 - 1
src/main/vue/src/views/Operation/RoomStatus.vue

@@ -3399,4 +3399,4 @@ export default {
         padding-bottom: 0;
     }
 }
-</style>
+</style>

+ 29 - 1
src/main/vue/src/views/sale/ContractEdit.vue

@@ -512,7 +512,22 @@ export default {
                         }
                     }
                 ],
-                flowBet: [{ required: true, message: '请输入押金', trigger: 'blur' }]
+                flowBet: [{ required: true, message: '请输入押金', trigger: 'blur' }],
+                PayType: [
+                    {
+                        validator: (rule, value, callback) => {
+                            if (isNaN(Number(this.formData.bet))) {
+                                callback(new Error('请输入押几'));
+                                return;
+                            }
+                            if (isNaN(Number(this.formData.pay))) {
+                                callback(new Error('请输入付几'));
+                                return;
+                            }
+                            callback();
+                        }
+                    }
+                ]
             },
             invoiceType: [
                 {
@@ -693,6 +708,18 @@ export default {
                 this.$message.error('请输入合同结束时间');
                 return;
             }
+            if (isNaN(Number(this.formData.bet))) {
+                this.$message.error('请输入押几');
+                return;
+            }
+            if (isNaN(Number(this.formData.pay))) {
+                this.$message.error('请输入付几');
+                return;
+            }
+            if (!this.formData.advancePayment) {
+                this.$message.error('请输入提前几天收款');
+                return;
+            }
             if (!this.formData.advancePayment) {
                 this.$message.error('请输入提前几天收款');
                 return;
@@ -939,6 +966,7 @@ export default {
                 if (valid) {
                     this.submit();
                 } else {
+                    this.$message.error('表单有误,请修改后重新提交');
                     return false;
                 }
             });