Browse Source

修改授信额度bug

zhangdan 3 years ago
parent
commit
216ab2f002

+ 5 - 4
src/views/numsGoodsShelves/goodsShelvesAdministration/settlementModifyModal.vue

@@ -78,7 +78,7 @@
                     v-model="form.creditWarnLimit"
                     v-model="form.creditWarnLimit"
                     :precision="2"
                     :precision="2"
                     :min="0.01"
                     :min="0.01"
-                    :max="form.creditLimit-0.1"
+                    :max="999999"
                     placeholder="请输入正数(最多允许两位小数)"
                     placeholder="请输入正数(最多允许两位小数)"
                     style="width: 100%;display: inline-block;" />
                     style="width: 100%;display: inline-block;" />
                 </a-form-model-item>
                 </a-form-model-item>
@@ -201,9 +201,10 @@ export default {
       this.$refs.ruleForm.validate(valid => {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
         if (valid) {
           const params = Object.assign({}, _this.form)
           const params = Object.assign({}, _this.form)
-          // if (params.limitFlag == '') {
-          //   params.limitFlag = 0
-          // }
+          if (params.creditWarnLimit >= params.creditLimit) {
+            _this.$message.warning('结算提醒金额需要小于授信额度')
+            return
+          }
           if (this.shelfInfo) {
           if (this.shelfInfo) {
             console.log(this.shelfInfo, 'this.nowData')
             console.log(this.shelfInfo, 'this.nowData')
             params.shelfSn = this.shelfInfo.shelfSn
             params.shelfSn = this.shelfInfo.shelfSn

+ 7 - 1
src/views/numsGoodsShelves/goodsShelvesAdministration/settlementSet.vue

@@ -100,6 +100,7 @@
                       placeholder="请输入正数(最多允许两位小数)"
                       placeholder="请输入正数(最多允许两位小数)"
                       style="width: 100%;display: inline-block;" />
                       style="width: 100%;display: inline-block;" />
                   </a-form-model-item>
                   </a-form-model-item>
+
                 </a-col>
                 </a-col>
                 <a-col :span="1"> <span style="display: inline-block; padding: 10px;">元</span></a-col>
                 <a-col :span="1"> <span style="display: inline-block; padding: 10px;">元</span></a-col>
                 <a-col :span="1">
                 <a-col :span="1">
@@ -147,7 +148,7 @@
                       v-model="form.creditWarnLimit"
                       v-model="form.creditWarnLimit"
                       :precision="2"
                       :precision="2"
                       :min="0.01"
                       :min="0.01"
-                      :max="form.creditLimit-0.1"
+                      :max="999999"
                       placeholder="请输入正数(最多允许两位小数)"
                       placeholder="请输入正数(最多允许两位小数)"
                       style="width: 100%;display: inline-block;" />
                       style="width: 100%;display: inline-block;" />
                   </a-form-model-item>
                   </a-form-model-item>
@@ -271,6 +272,7 @@ export default {
         labelCol: { span: 13 },
         labelCol: { span: 13 },
         wrapperCol: { span: 11 }
         wrapperCol: { span: 11 }
       },
       },
+      loadData: [],
       settleInfo: null, // 结算详情
       settleInfo: null, // 结算详情
       // shelfInfo: null, // 数字货架详情
       // shelfInfo: null, // 数字货架详情
       settlementType: '', // 结算方式
       settlementType: '', // 结算方式
@@ -423,6 +425,10 @@ export default {
             params.storeSn = this.pageInfo.storeSn
             params.storeSn = this.pageInfo.storeSn
             params.dealerSn = this.pageInfo.dealerSn
             params.dealerSn = this.pageInfo.dealerSn
           }
           }
+          if (params.creditWarnLimit >= params.creditLimit) {
+            _this.$message.warning('结算提醒金额需要小于授信额度')
+            return
+          }
           _this.spinning = true
           _this.spinning = true
           shelfSettleRuleSave(params).then(res => {
           shelfSettleRuleSave(params).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {