浏览代码

采购计划

huangfuli 3 年之前
父节点
当前提交
57cc95cde8
共有 1 个文件被更改,包括 42 次插入0 次删除
  1. 42 0
      src/views/salesManagement/salesPlanList.vue

+ 42 - 0
src/views/salesManagement/salesPlanList.vue

@@ -547,6 +547,48 @@ export default {
       })
     },
     varietyClick(row) {
+      if(row.salePlanType == '期货'){
+        if (
+        row.basisPrice > 10000 ||
+        row.basisPrice < 1 ||
+        (String(row.basisPrice).indexOf(
+          '.'
+        ) != -1 &&
+          String(row.basisPrice).length -
+            (String(row.basisPrice).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '基差输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      }
+      if(row.salePlanType == '现货'){
+        if (
+        row.unitPrice > 100000 ||
+        row.unitPrice < 1 ||
+        (String(row.unitPrice).indexOf(
+          '.'
+        ) != -1 &&
+          String(row.unitPrice).length -
+            (String(row.unitPrice).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '单价输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      }
       if (row.salePlanType == '期货') {
         this.$confirm(`确定要修改基差?`, {
           confirmButtonText: '确定',