Quellcode durchsuchen

采购计划,销售计划

huangfuli vor 3 Jahren
Ursprung
Commit
1976a4445f

+ 94 - 46
src/views/purchasingManagement/procurementPlanAdd.vue

@@ -23,10 +23,11 @@
           <h3>基本信息</h3>
         </div>
          <el-form ref="dataList" :model="dataList" label-width="140px">
-          <ws-form-item label="标题" span="1" prop="title">
+          <ws-form-item label="标题" span="1" prop="title" >
             <el-input v-model="dataList.title" maxlength="16" placeholder="请输入标题,不超过16个字" />
+              <span class="unchangeable">*</span>
           </ws-form-item>
-          <ws-form-item label="货名" span="1" prop="goodsName">
+          <ws-form-item label="货名" span="1" prop="goodsName" >
             <ws-select
               v-model="dataList.goodsName"
               placeholder
@@ -40,18 +41,21 @@
                 :value="item.constValue"
               />
             </ws-select>
+            <span class="unchangeable">*</span>
           </ws-form-item>
-          <ws-form-item label="计划采购量(吨)" span="1" prop="plannedPurchaseVolume">
+          <ws-form-item label="计划采购量(吨)" span="1" prop="plannedPurchaseVolume" >
             <el-input
               v-model="dataList.plannedPurchaseVolume"
               class="typeselect"
               placeholder="请输入计划采购量"
             />
+            <span class="unchangeable">*</span>
           </ws-form-item>
-          <ws-form-item label="最小成交量(吨)" span="1" prop="minimumVolume">
+          <ws-form-item label="最小成交量(吨)" span="1" prop="minimumVolume" >
             <el-input v-model="dataList.minimumVolume" placeholder="请输入最小成交量" />
+            <span class="unchangeable">*</span>
           </ws-form-item>
-          <ws-form-item label="类型" span="1" prop="procurementPlanType">
+          <ws-form-item label="类型" span="1" prop="procurementPlanType" >
             <ws-select
               v-model="dataList.procurementPlanType"
               placeholder
@@ -65,6 +69,7 @@
                 :value="item.constValue"
               />
             </ws-select>
+            <span class="unchangeable">*</span>
           </ws-form-item>
          <ws-form-item label="价格类型" span="1" prop="priceType">
             <el-input v-model="dataList.priceType" disabled />
@@ -76,6 +81,7 @@
             prop="basisPrice"
           >
             <el-input v-model="dataList.basisPrice" placeholder="请输入基差" />
+            <span class="unchangeable">*</span>
           </ws-form-item>
           <ws-form-item
             v-show="dataList.procurementPlanType=='现货'"
@@ -89,8 +95,9 @@
               size="small"
               placeholder="请输入采购价格"
             />
+            <span class="unchangeable">*</span>
           </ws-form-item>
-          <ws-form-item label="收货库" span="1" prop="receiveWarehouse">
+          <ws-form-item label="收货库" span="1" prop="receiveWarehouse" >
             <ws-select
               v-model="dataList.receiveWarehouse"
               placeholder
@@ -104,8 +111,9 @@
               :value="item.warehouseName"
               />
             </ws-select>
+            <span class="unchangeable">*</span>
           </ws-form-item>
-          <ws-form-item label="收货库所在地区" span="1" prop="receiveArea">
+          <ws-form-item label="收货库所在地区" span="1" prop="receiveArea" > 
             <el-cascader
               :options="options_"
               v-model="selectedOptions"
@@ -115,6 +123,7 @@
               @change="handleChange"
               style="width:200%"
             />
+            <span class="unchangeable">*</span>
           </ws-form-item>
           <ws-form-item label="运费承担方" span="1" prop="freightPayer">
             <ws-select
@@ -131,7 +140,7 @@
               />
             </ws-select>
           </ws-form-item>
-          <ws-form-item label="包装方式" span="1" prop="packingType">
+          <ws-form-item label="包装方式" span="1" prop="packingType" > 
             <ws-select
               v-model="dataList.packingType"
               placeholder
@@ -145,6 +154,7 @@
                 :value="item.constValue"
               />
             </ws-select>
+            <span class="unchangeable">*</span>
           </ws-form-item>
           <el-form-item v-if="dataList.packingType!='散装'" label="装袋备注" span="1" prop="baggingNotes">
             <el-input
@@ -154,10 +164,11 @@
               placeholder="请输入装袋要求如:98斤,王中王彩袋"
             />
           </el-form-item>
-          <ws-form-item label="买方" span="1" prop="buyer">
+          <ws-form-item label="买方" span="1" prop="buyer" >
             <el-input maxlength='25' v-model="dataList.buyer" size="small" placeholder="请输入买方名称" />
+            <span class="unchangeable">*</span>
           </ws-form-item>
-          <el-form-item label="买方电话" span="1" prop="buyerPhone">
+          <el-form-item label="买方电话" span="1" prop="buyerPhone" >
             <el-input
               v-model="dataList.buyerPhone"
               filterable
@@ -165,6 +176,7 @@
               :filter-method="dataFilter"
               placeholder="请输入买方电话"
             ></el-input>
+            <span class="unchangeable">*</span>
           </el-form-item>
           <div class="small-title"></div>
         </el-form>
@@ -174,11 +186,13 @@
           <h3>货物要求</h3>
         </div>
         <el-form ref="dataList" :model="dataList" label-width="140px">
-          <el-form-item label="水分(%)<=" span="1" prop="waterContent">
+          <el-form-item label="水分(%)<=" span="1" prop="waterContent" >
             <el-input v-model="dataList.waterContent" class="typeselect" placeholder="请输入水分占比" />
+            <span class="unchangeable">*</span>
           </el-form-item>
-          <el-form-item label="容重(g/l)<=" span="1" prop="bulkDensity">
+          <el-form-item label="容重(g/l)<=" span="1" prop="bulkDensity" >
             <el-input v-model="dataList.bulkDensity" class="typeselect" placeholder="请输入容重" />
+            <span class="unchangeable">*</span>
           </el-form-item>
           <el-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
             <el-input v-model="dataList.jiaorenli" class="typeselect" placeholder="请输入热损伤占比" />
@@ -642,7 +656,7 @@ export default {
       }
       if (!this.dataList.minimumVolume) {
         this.$message({
-          message: '最小交量不能为空!',
+          message: '最小交量不能为空!',
           type: 'warning'
         })
         return
@@ -650,18 +664,55 @@ export default {
       if (
         this.dataList.minimumVolume>10000000||this.dataList.minimumVolume<1) {
         this.$message({
-          message: '最小交量输入错误!',
+          message: '最小交量输入错误!',
           type: 'warning'
         })
         return
       }
       if (this.dataList.minimumVolume.indexOf('.') != -1 &&this.dataList.minimumVolume.split('.')[1].length >2) {
         this.$message({
-          message: '最小交量输入错误!',
+          message: '最小交量输入错误!',
           type: 'warning'
         })
         return
       }
+      if (
+        this.dataList.basisPrice&&String(this.dataList.basisPrice).indexOf('.') != -1 &&
+          String(dataList.basisPrice).length -
+            (String(this.dataList.basisPrice).indexOf('.') + 1) >
+            2||this.dataList.basisPrice>10000||this.dataList.basisPrice<1){
+        this.$message({
+          message: '基差输入错误',
+          type: 'warning'
+        })
+        return
+      }
+      if (
+        this.dataList.procurementPrice > 100000 ||
+        this.dataList.procurementPrice < 0 ||
+        (String(this.dataList.procurementPrice).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.dataList.procurementPrice).length -
+            (String(this.dataList.procurementPrice).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '采购价格输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.receiveWarehouse) {
+        this.$message({
+          message: '请选择收货库',
+          type: 'warning',
+        })
+        return
+      }
       if (!this.dataList.buyer) {
         this.$message({
           message: '买方不能为空!',
@@ -714,6 +765,13 @@ export default {
         })
         return
       }
+      if (!this.dataList.bulkDensity) {
+        this.$message({
+          message: '容重不能为空!',
+          type: 'warning'
+        })
+        return
+      }
       if (
         this.dataList.bulkDensity&&String(this.dataList.bulkDensity).indexOf('.') != -1 &&
           String(this.dataList.bulkDensity).length -
@@ -729,7 +787,7 @@ export default {
         this.dataList.protein&&String(this.dataList.protein).indexOf('.') != -1 &&
           String(this.dataList.protein).length -
             (String(this.dataList.protein).indexOf('.') + 1) >
-            2||this.dataList.protein>40||this.dataList.protein<1){
+            2||this.dataList.protein>80||this.dataList.protein<1){
         this.$message({
           message: '蛋白占比输入错误',
           type: 'warning'
@@ -739,7 +797,8 @@ export default {
       if (
         this.dataList.impurity&&String(this.dataList.impurity).indexOf('.') != -1 &&
           String(this.dataList.impurity).length -
-            (String(this.dataList.impurity).indexOf('.') + 1) >2) {
+            (String(this.dataList.impurity).indexOf('.') + 1) >2
+            ||this.dataList.impurity>40||this.dataList.impurity<1) {
         this.$message({
           message: '杂质输入错误',
           type: 'warning'
@@ -750,7 +809,7 @@ export default {
         this.dataList.mildewGrain&&String(this.dataList.mildewGrain).indexOf('.') != -1 &&
           String(this.dataList.mildewGrain).length -
             (String(this.dataList.mildewGrain).indexOf('.') + 1) >
-            2) {
+            2||this.dataList.mildewGrain>40||this.dataList.mildewGrain<1) {
         this.$message({
           message: '霉变粒输入错误',
           type: 'warning'
@@ -761,7 +820,7 @@ export default {
         this.dataList.jiaorenli&&String(this.dataList.jiaorenli).indexOf('.') != -1 &&
           String(this.dataList.jiaorenli).length -
             (String(this.dataList.jiaorenli).indexOf('.') + 1) >
-            2) {
+            2||this.dataList.jiaorenli>40||this.dataList.jiaorenli<1) {
         this.$message({
           message: '热损伤输入错误',
           type: 'warning'
@@ -772,13 +831,14 @@ export default {
         this.dataList.imperfectGrain&&String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
           String(this.dataList.imperfectGrain).length -
             (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
-            2) {
+            2||this.dataList.imperfectGrain>40||this.dataList.imperfectGrain<1) {
         this.$message({
           message: '不完整粒输入错误',
           type: 'warning'
         })
         return
       }
+
       this.dataList.id = this.$route.query.id
       this.$confirm(`提交后该采购信息将发布到交易平台,是否确定提交?`, {
         cancelButtonText: '取消',
@@ -799,7 +859,7 @@ export default {
               this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
 
               this.dataList.compId = this.compId
-
+              this.dataList.unitPrice=this.dataList.procurementPrice
               
               // this.dataList.contractType = 1
               // this.dataList.goodsType = 1
@@ -823,22 +883,6 @@ export default {
           return false
         })
     },
-
-    selectwarehouseName() {},
-    tarechange(e) {
-      if (this.dataList.grossWeight && this.dataList.tare) {
-        this.dataList.netWeight = Number(
-          this.dataList.grossWeight - this.dataList.tare
-        )
-      }
-    },
-    grossWeightchange(e) {
-      if (this.dataList.grossWeight && this.dataList.tare) {
-        this.dataList.netWeight = Number(
-          this.dataList.grossWeight - this.dataList.tare
-        )
-      }
-    },
     selectgoodsName(e) {
       for (var i = 0; i < this.goodnameList.length; i++) {
         if (this.goodnameList[i].constValue == e) {
@@ -1113,16 +1157,20 @@ export default {
   width: 400px;
   height: 20px;
 }
-.readonly :after {
-  content: '*';
-  color: #ff2727;
-  position: absolute;
-  right: 8px;
-  z-index: 10;
-  top: 21%;
-  font-size: 20px;
-}
 /deep/.typeselect .el-input__inner {
   color: #8890b1;
 }
+//*号
+.unchangeable {
+  position: absolute;
+  width: 9px;
+  height: 22px;
+  font-size: 16px;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #ff2727;
+  line-height: 22px;
+  display: inline-block;
+  right: -1px;
+}
 </style>

+ 118 - 63
src/views/purchasingManagement/procurementPlanEdit.vue

@@ -661,150 +661,208 @@ export default {
     submit() {
       if (!this.dataList.title) {
         this.$message({
-          message: '标题不能为空',
-          type: 'warning',
+          message: '标题不能为空!',
+          type: 'warning'
+        })
+        return
+      }
+      if (this.dataList.title.length>16) {
+        this.$message({
+          message: '标题输入错误!',
+          type: 'warning'
         })
         return
       }
       if (!this.dataList.plannedPurchaseVolume) {
         this.$message({
-          message: '计划采购量不能为空',
-          type: 'warning',
+          message: '计划采购量不能为空!',
+          type: 'warning'
+        })
+        return
+      }
+      if (this.dataList.plannedPurchaseVolume>10000000||this.dataList.plannedPurchaseVolume<1) {
+        this.$message({
+          message: '计划采购量输入错误!',
+          type: 'warning'
+        })
+        return
+      }
+      if (this.dataList.plannedPurchaseVolume.toString().indexOf('.')!=-1) {
+        if(this.dataList.plannedPurchaseVolume.toString().split('.')[1].length>2){
+          this.$message({
+            message: '计划采购量输入错误!',
+            type: 'warning'
+          })
+          return
+        }
+      }
+      if (!this.dataList.minimumVolume) {
+        this.$message({
+          message: '最小成交量不能为空!',
+          type: 'warning'
         })
         return
       }
       if (
-        !this.dataList.minimumVolume ||
-        (String(this.dataList.minimumVolume).indexOf('.') != -1 &&
-          String(this.dataList.minimumVolume).length -
-            (String(this.dataList.minimumVolume).indexOf('.') + 1) >
-            2)
-      ) {
+        this.dataList.minimumVolume>10000000||this.dataList.minimumVolume<1) {
         this.$message({
-          message: '最小交易量输入错误',
-          type: 'warning',
+          message: '最小成交量输入错误!',
+          type: 'warning'
         })
         return
       }
-      if (!this.dataList.procurementPlanType) {
+      if (this.dataList.minimumVolume.toString().indexOf('.') != -1 &&this.dataList.minimumVolume.toString().split('.')[1].length >2) {
         this.$message({
-          message: '类型不能为空',
-          type: 'warning',
+          message: '最小成交量输入错误!',
+          type: 'warning'
         })
         return
       }
-      if (!this.dataList.packingType) {
+      if (
+        this.dataList.procurementPrice > 100000 ||
+        this.dataList.procurementPrice < 0 ||
+        (String(this.dataList.procurementPrice).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.dataList.procurementPrice).length -
+            (String(this.dataList.procurementPrice).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
         this.$message({
-          message: '包装方式不能为空',
+          message: '采购价格输入错误',
           type: 'warning',
         })
         return
       }
       if (!this.dataList.buyer) {
         this.$message({
-          message: '买方不能为空',
-          type: 'warning',
+          message: '买方不能为空!',
+          type: 'warning'
+        })
+        return
+      }
+      if (this.dataList.buyer.length>25||this.dataList.buyer.length<1) {
+        this.$message({
+          message: '买方输入错误!',
+          type: 'warning'
         })
         return
       }
       if (!this.dataList.buyerPhone) {
         this.$message({
           message: '请输入买方电话!',
-          type: 'warning',
+          type: 'warning'
         })
         return
       }
-      if (isNaN(this.dataList.buyerPhone)) {
+      if (this.dataList.buyerPhone.length!=11) {
         this.$message({
-          message: '输入买方电话有误!',
-          type: 'warning',
+          message: '买方电话输入错误!',
+          type: 'warning'
         })
         return
       }
-      if (
-        this.dataList.buyerPhone.length < 6 ||
-        this.dataList.buyerPhone.length > 15
-      ) {
+      if (!this.dataList.waterContent) {
         this.$message({
-          message: '买方电话输入错误',
-          type: 'warning',
+          message: '水分不能为空!',
+          type: 'warning'
         })
         return
       }
-      if (!this.dataList.waterContent) {
+      if (this.dataList.waterContent>40||this.dataList.waterContent<1) {
         this.$message({
-          message: '水分不能为空',
-          type: 'warning',
+          message: '水分输入错误!',
+          type: 'warning'
+        })
+        return
+      }
+      if (String(this.dataList.waterContent).indexOf('.') != -1 &&
+          String(this.dataList.waterContent).length -
+            (String(this.dataList.waterContent).indexOf('.') + 1) >
+            2) {
+        this.$message({
+          message: '水分输入错误',
+          type: 'warning'
+        })
+        return
+      }
+      if (!this.dataList.bulkDensity) {
+        this.$message({
+          message: '容重不能为空!',
+          type: 'warning'
         })
         return
       }
       if (
-        !this.dataList.bulkDensity ||
-        (String(this.dataList.bulkDensity).indexOf('.') != -1 &&
+        this.dataList.bulkDensity&&String(this.dataList.bulkDensity).indexOf('.') != -1 &&
           String(this.dataList.bulkDensity).length -
             (String(this.dataList.bulkDensity).indexOf('.') + 1) >
-            2)
-      ) {
+            2||this.dataList.bulkDensity>1000||this.dataList.bulkDensity<500){
         this.$message({
           message: '容重输入错误',
-          type: 'warning',
+          type: 'warning'
         })
         return
       }
       if (
-        !this.dataList.impurity ||
-        (String(this.dataList.impurity).indexOf('.') != -1 &&
+        this.dataList.protein&&String(this.dataList.protein).indexOf('.') != -1 &&
+          String(this.dataList.protein).length -
+            (String(this.dataList.protein).indexOf('.') + 1) >
+            2||this.dataList.protein>80||this.dataList.protein<1){
+        this.$message({
+          message: '蛋白占比输入错误',
+          type: 'warning'
+        })
+        return
+      }
+      if (
+        this.dataList.impurity&&String(this.dataList.impurity).indexOf('.') != -1 &&
           String(this.dataList.impurity).length -
-            (String(this.dataList.impurity).indexOf('.') + 1) >
-            2)
-      ) {
+            (String(this.dataList.impurity).indexOf('.') + 1) >2
+            ||this.dataList.impurity>40||this.dataList.impurity<1) {
         this.$message({
           message: '杂质输入错误',
-          type: 'warning',
+          type: 'warning'
         })
         return
       }
       if (
-        !this.dataList.mildewGrain ||
-        (String(this.dataList.mildewGrain).indexOf('.') != -1 &&
+        this.dataList.mildewGrain&&String(this.dataList.mildewGrain).indexOf('.') != -1 &&
           String(this.dataList.mildewGrain).length -
             (String(this.dataList.mildewGrain).indexOf('.') + 1) >
-            2)
-      ) {
+            2||this.dataList.mildewGrain>40||this.dataList.mildewGrain<1) {
         this.$message({
           message: '霉变粒输入错误',
-          type: 'warning',
+          type: 'warning'
         })
         return
       }
       if (
-        !this.dataList.jiaorenli ||
-        (String(this.dataList.jiaorenli).indexOf('.') != -1 &&
+        this.dataList.jiaorenli&&String(this.dataList.jiaorenli).indexOf('.') != -1 &&
           String(this.dataList.jiaorenli).length -
             (String(this.dataList.jiaorenli).indexOf('.') + 1) >
-            2)
-      ) {
+            2||this.dataList.jiaorenli>40||this.dataList.jiaorenli<1) {
         this.$message({
           message: '热损伤输入错误',
-          type: 'warning',
+          type: 'warning'
         })
         return
       }
       if (
-        !this.dataList.imperfectGrain ||
-        (String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
+        this.dataList.imperfectGrain&&String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
           String(this.dataList.imperfectGrain).length -
             (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
-            2)
-      ) {
+            2||this.dataList.imperfectGrain>40||this.dataList.imperfectGrain<1) {
         this.$message({
           message: '不完整粒输入错误',
-          type: 'warning',
+          type: 'warning'
         })
         return
       }
       this.dataList.id = this.$route.query.id
-      // this.deptList.flag = 0
       this.$confirm(`提交后该采购信息将发布到交易平台,是否确定提交?`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
@@ -813,9 +871,6 @@ export default {
         .then(() => {
           this.$refs.dataList.validate((valid) => {
             if (valid) {
-              // this.dataList.sourceProvince = CodeToText[this.selectedOptions[0]]
-              // this.dataList.sourceCity = CodeToText[this.selectedOptions[1]]
-
               this.dataList.receivePrivate = CodeToText[this.selectedOptions[0]]
               this.dataList.receiveCity = CodeToText[this.selectedOptions[1]]
               this.dataList.receiveArea = CodeToText[this.selectedOptions[2]]
@@ -825,7 +880,7 @@ export default {
               this.dataList.compId = this.compId
               // this.dataList.pcFlag = 1
               this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
-
+              this.dataList.unitPrice=this.dataList.procurementPrice
               procurementEdit(this.dataList)
                 .toPromise()
                 .then((response) => {

+ 14 - 1
src/views/purchasingManagement/procurementPlanLook.vue

@@ -66,7 +66,9 @@
           </el-form-item>
           <!--收货库所在地区-->
           <el-form-item label="收货库所在地区" span="1">
+            <div class="forlist">
            {{dataList.receivePrivate}}{{dataList.receiveCity}}{{dataList.receiveArea}}
+            </div>
           </el-form-item>
           <!--运费承担方-->
           <el-form-item label="运费承担方">
@@ -133,8 +135,9 @@
           </el-form-item>
           <!--产地-->
           <el-form-item label="产地" span="1">
-            <!-- <el-input disabled></el-input>    -->
+            <div class="forlist">
             {{dataList.outputPrivate}}{{dataList.outputCity}}
+            </div>
           </el-form-item>
           <!--产出年份-->
           <el-form-item label="产出年份" span="1">
@@ -651,4 +654,14 @@ export default {
   width: 400px;
   height: 20px;
 }
+.forlist{
+  background-color: #F5F7FA;
+  border-radius: 10px;
+  width: 100%;
+  padding-left: 15px;
+  height: 35px;
+  line-height: 35px;
+  color: #C0C4CC;
+  font-size: 14px;
+}
 </style>

+ 97 - 28
src/views/salesManagement/salesPlanAdd.vue

@@ -33,15 +33,16 @@
         </div>
         <el-form ref="dataList" :model="dataList" label-width="140px">
           <!-- 标题 -->
-          <el-form-item label="标题" span="1" prop="title">
+          <el-form-item label="标题" span="1" prop="title" >
             <el-input
               v-model="dataList.title"
               maxlength="16"
               placeholder="请输入标题,不超过16个字"
             />
+            <span class="unchangeable">*</span>
           </el-form-item>
           <!-- 货名 -->
-          <ws-form-item label="货名" span="1" prop="goodsName">
+          <ws-form-item label="货名" span="1" prop="goodsName" >
             <ws-select
               v-model="dataList.goodsName"
               placeholder
@@ -55,6 +56,7 @@
                 :value="item.constValue"
               />
             </ws-select>
+            <span class="unchangeable">*</span>
           </ws-form-item>
           <!-- 计划销售量(吨) -->
           <el-form-item
@@ -67,16 +69,18 @@
               class="typeselect"
               placeholder="请输入计划销售量"
             />
+            <span class="unchangeable">*</span>
           </el-form-item>
           <!-- 最小成交量 -->
-          <el-form-item label="最小成交量(吨)" span="1" prop="minimumVolume">
+          <el-form-item label="最小成交量(吨)" span="1" prop="minimumVolume" >
             <el-input
               v-model="dataList.minimumVolume"
               placeholder="请输入最小成交量"
             />
+            <span class="unchangeable">*</span>
           </el-form-item>
           <!--类型-->
-          <ws-form-item label="类型" span="1" prop="salePlanType">
+          <ws-form-item label="类型" span="1" prop="salePlanType" >
             <ws-select
               v-model="dataList.salePlanType"
               placeholder
@@ -90,6 +94,7 @@
                 :value="item.constValue"
               />
             </ws-select>
+            <span class="unchangeable">*</span>
           </ws-form-item>
           <!-- 价格类型 -->
           <ws-form-item label="价格类型" span="1" prop="priceType">
@@ -102,6 +107,7 @@
             prop="basisPrice"
           >
             <el-input v-model="dataList.basisPrice" placeholder="请输入基差" />
+            <span class="unchangeable">*</span>
           </ws-form-item>
           <ws-form-item
             v-show="dataList.salePlanType == '现货'"
@@ -115,9 +121,10 @@
               size="small"
               placeholder="请输入销售价格"
             />
+            <span class="unchangeable">*</span>
           </ws-form-item>
           <!--出货库-->
-          <ws-form-item label="出货库" span="1" prop="sendWarehouse">
+          <ws-form-item label="出货库" span="1" prop="sendWarehouse" >
             <ws-select
               v-model="dataList.sendWarehouse"
               placeholder
@@ -131,8 +138,9 @@
                 :value="item.warehouseName"
               />
             </ws-select>
+            <span class="unchangeable">*</span>
           </ws-form-item>
-          <ws-form-item label="出货库所在地区" span="1" prop="sendArea">
+          <ws-form-item label="出货库所在地区" span="1" prop="sendArea" > 
             <el-cascader
               :options="options_"
               v-model="selectedOptions"
@@ -142,6 +150,7 @@
               @change="handleChange"
               style="width: 200%"
             />
+            <span class="unchangeable">*</span>
           </ws-form-item>
           <ws-form-item label="运费承担方" span="1" prop="freightPayer">
             <ws-select
@@ -158,7 +167,7 @@
               />
             </ws-select>
           </ws-form-item>
-          <ws-form-item label="包装方式" span="1" prop="packingType">
+          <ws-form-item label="包装方式" span="1" prop="packingType" >
             <ws-select
               v-model="dataList.packingType"
               placeholder
@@ -172,6 +181,7 @@
                 :value="item.constValue"
               />
             </ws-select>
+            <span class="unchangeable">*</span>
           </ws-form-item>
           <el-form-item
             v-if="dataList.packingType != '散装'"
@@ -186,15 +196,16 @@
               placeholder="请输入装袋要求如:98斤,王中王彩袋"
             />
           </el-form-item>
-          <ws-form-item label="卖方" span="1" prop="seller">
+          <ws-form-item label="卖方" span="1" prop="seller" >
             <el-input
               maxlength="25"
               v-model="dataList.seller"
               size="small"
               placeholder="请输入卖方名称"
             />
+            <span class="unchangeable">*</span>
           </ws-form-item>
-          <el-form-item label="卖方电话" span="1" prop="sellerPhone">
+          <el-form-item label="卖方电话" span="1" prop="sellerPhone" >
             <el-input
               v-model="dataList.sellerPhone"
               filterable
@@ -202,6 +213,7 @@
               :filter-method="dataFilter"
               placeholder="请输入卖方电话"
             ></el-input>
+            <span class="unchangeable">*</span>
           </el-form-item>
           <div class="small-title"></div>
         </el-form>
@@ -211,19 +223,21 @@
           <h3>货物要求</h3>
         </div>
         <el-form ref="dataList" :model="dataList" label-width="140px">
-          <el-form-item label="水分(%)<=" span="1" prop="waterContent">
+          <el-form-item label="水分(%)<=" span="1" prop="waterContent" >
             <el-input
               v-model="dataList.waterContent"
               class="typeselect"
               placeholder="请输入水分占比"
             />
+            <span class="unchangeable">*</span>
           </el-form-item>
-          <el-form-item label="容重(g/l)<=" span="1" prop="bulkDensity">
+          <el-form-item label="容重(g/l)<=" span="1" prop="bulkDensity" >
             <el-input
               v-model="dataList.bulkDensity"
               class="typeselect"
               placeholder="请输入容重"
             />
+            <span class="unchangeable">*</span>
           </el-form-item>
           <el-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
             <el-input
@@ -721,7 +735,7 @@ export default {
       }
       if (!this.dataList.minimumVolume) {
         this.$message({
-          message: '最小交量不能为空!',
+          message: '最小交量不能为空!',
           type: 'warning',
         })
         return
@@ -731,7 +745,7 @@ export default {
         this.dataList.minimumVolume < 1
       ) {
         this.$message({
-          message: '最小交量输入错误!',
+          message: '最小交量输入错误!',
           type: 'warning',
         })
         return
@@ -741,7 +755,52 @@ export default {
         this.dataList.minimumVolume.split('.')[1].length > 2
       ) {
         this.$message({
-          message: '最小交易量输入错误!',
+          message: '最小成交量输入错误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.basisPrice > 100000 ||
+        this.dataList.basisPrice < 0 ||
+        (String(this.dataList.basisPrice).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.dataList.basisPrice).length -
+            (String(this.dataList.basisPrice).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '基差输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.salePrice > 100000 ||
+        this.dataList.salePrice < 0 ||
+        (String(this.dataList.salePrice).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.dataList.salePrice).length -
+            (String(this.dataList.salePrice).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '销售价格输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.sendWarehouse) {
+        this.$message({
+          message: '请选择出货库',
           type: 'warning',
         })
         return
@@ -800,6 +859,13 @@ export default {
         })
         return
       }
+      if (!this.dataList.bulkDensity) {
+        this.$message({
+          message: '容重不能为空!',
+          type: 'warning'
+        })
+        return
+      }
       if (
         (this.dataList.bulkDensity &&
           String(this.dataList.bulkDensity).indexOf('.') != -1 &&
@@ -820,9 +886,7 @@ export default {
           String(this.dataList.protein).indexOf('.') != -1 &&
           String(this.dataList.protein).length -
             (String(this.dataList.protein).indexOf('.') + 1) >
-            2) ||
-        this.dataList.protein > 40 ||
-        this.dataList.protein < 1
+            2||this.dataList.protein>80||this.dataList.protein<1)
       ) {
         this.$message({
           message: '蛋白占比输入错误',
@@ -835,7 +899,7 @@ export default {
         String(this.dataList.impurity).indexOf('.') != -1 &&
         String(this.dataList.impurity).length -
           (String(this.dataList.impurity).indexOf('.') + 1) >
-          2
+          2||this.dataList.impurity>40||this.dataList.impurity<1
       ) {
         this.$message({
           message: '杂质输入错误',
@@ -848,7 +912,7 @@ export default {
         String(this.dataList.mildewGrain).indexOf('.') != -1 &&
         String(this.dataList.mildewGrain).length -
           (String(this.dataList.mildewGrain).indexOf('.') + 1) >
-          2
+          2||this.dataList.mildewGrain>40||this.dataList.mildewGrain<1
       ) {
         this.$message({
           message: '霉变粒输入错误',
@@ -861,7 +925,7 @@ export default {
         String(this.dataList.jiaorenli).indexOf('.') != -1 &&
         String(this.dataList.jiaorenli).length -
           (String(this.dataList.jiaorenli).indexOf('.') + 1) >
-          2
+          2||this.dataList.jiaorenli>40||this.dataList.jiaorenli<1
       ) {
         this.$message({
           message: '热损伤输入错误',
@@ -874,7 +938,7 @@ export default {
         String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
         String(this.dataList.imperfectGrain).length -
           (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
-          2
+          2||this.dataList.imperfectGrain>40||this.dataList.imperfectGrain<1
       ) {
         this.$message({
           message: '不完整粒输入错误',
@@ -899,6 +963,7 @@ export default {
               this.dataList.sendArea = CodeToText[this.selectedOptions[2]]
               this.dataList.outputPrivate = CodeToText[this.selectedOptions1[0]]
               this.dataList.outputCity = CodeToText[this.selectedOptions1[1]]
+              this.dataList.unitPrice=this.dataList.salePrice
 
               this.dataList.compId = this.compId
               this.dataList.pcFlag = 1
@@ -1211,14 +1276,18 @@ export default {
   width: 400px;
   height: 20px;
 }
-.readonly :after {
-  content: '*';
-  color: #ff2727;
+//*号
+.unchangeable {
   position: absolute;
-  right: 8px;
-  z-index: 10;
-  top: 21%;
-  font-size: 20px;
+  width: 9px;
+  height: 22px;
+  font-size: 16px;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #ff2727;
+  line-height: 22px;
+  display: inline-block;
+  right: -1px;
 }
 /deep/.typeselect .el-input__inner {
   color: #8890b1;

+ 100 - 10
src/views/salesManagement/salesPlanEdit.vue

@@ -170,11 +170,11 @@
             />
           </el-form-item>
           <!-- 卖方 -->
-          <ws-form-item label="方" span="1" prop="seller">
+          <ws-form-item label="方" span="1" prop="seller">
             <el-input v-model="dataList.seller" maxlength="120" size="small" placeholder="请输入卖方名称" />
           </ws-form-item>
           <!-- 卖方电话 -->
-          <el-form-item label="方电话" span="1" prop="sellerPhone">
+          <el-form-item label="方电话" span="1" prop="sellerPhone">
             <el-input
               v-model="dataList.sellerPhone"
               filterable
@@ -623,9 +623,93 @@ export default {
         })
         return
       }
+      if (
+        this.dataList.plannedSaleVolume > 10000000 ||
+        this.dataList.plannedSaleVolume < 1
+      ) {
+        this.$message({
+          message: '计划销售量输入错误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.plannedSaleVolume.toString().indexOf('.') != -1) {
+        if (this.dataList.plannedSaleVolume.toString().split('.')[1].length > 2) {
+          this.$message({
+            message: '计划销售量输入错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
       if (!this.dataList.minimumVolume) {
         this.$message({
-          message: '最小交易量不能为空!',
+          message: '最小成交量不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.minimumVolume > 10000000 ||
+        this.dataList.minimumVolume < 1
+      ) {
+        this.$message({
+          message: '最小成交量输入错误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.minimumVolume.toString().indexOf('.') != -1 &&
+        this.dataList.minimumVolume.toString().split('.')[1].length > 2
+      ) {
+        this.$message({
+          message: '最小成交量输入错误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.basisPrice > 100000 ||
+        this.dataList.basisPrice < 0 ||
+        (String(this.dataList.basisPrice).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.dataList.basisPrice).length -
+            (String(this.dataList.basisPrice).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '基差输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.salePrice > 100000 ||
+        this.dataList.salePrice < 0 ||
+        (String(this.dataList.salePrice).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.dataList.salePrice).length -
+            (String(this.dataList.salePrice).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '销售价格输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.sendWarehouse) {
+        this.$message({
+          message: '请选择出货库',
           type: 'warning',
         })
         return
@@ -684,6 +768,13 @@ export default {
         })
         return
       }
+      if (!this.dataList.bulkDensity) {
+        this.$message({
+          message: '容重不能为空!',
+          type: 'warning'
+        })
+        return
+      }
       if (
         (this.dataList.bulkDensity &&
           String(this.dataList.bulkDensity).indexOf('.') != -1 &&
@@ -704,9 +795,7 @@ export default {
           String(this.dataList.protein).indexOf('.') != -1 &&
           String(this.dataList.protein).length -
             (String(this.dataList.protein).indexOf('.') + 1) >
-            2) ||
-        this.dataList.protein > 40 ||
-        this.dataList.protein < 1
+            2||this.dataList.protein>80||this.dataList.protein<1)
       ) {
         this.$message({
           message: '蛋白占比输入错误',
@@ -719,7 +808,7 @@ export default {
         String(this.dataList.impurity).indexOf('.') != -1 &&
         String(this.dataList.impurity).length -
           (String(this.dataList.impurity).indexOf('.') + 1) >
-          2
+          2||this.dataList.impurity>40||this.dataList.impurity<1
       ) {
         this.$message({
           message: '杂质输入错误',
@@ -732,7 +821,7 @@ export default {
         String(this.dataList.mildewGrain).indexOf('.') != -1 &&
         String(this.dataList.mildewGrain).length -
           (String(this.dataList.mildewGrain).indexOf('.') + 1) >
-          2
+          2||this.dataList.mildewGrain>40||this.dataList.mildewGrain<1
       ) {
         this.$message({
           message: '霉变粒输入错误',
@@ -745,7 +834,7 @@ export default {
         String(this.dataList.jiaorenli).indexOf('.') != -1 &&
         String(this.dataList.jiaorenli).length -
           (String(this.dataList.jiaorenli).indexOf('.') + 1) >
-          2
+          2||this.dataList.jiaorenli>40||this.dataList.jiaorenli<1
       ) {
         this.$message({
           message: '热损伤输入错误',
@@ -758,7 +847,7 @@ export default {
         String(this.dataList.imperfectGrain).indexOf('.') != -1 &&
         String(this.dataList.imperfectGrain).length -
           (String(this.dataList.imperfectGrain).indexOf('.') + 1) >
-          2
+          2||this.dataList.imperfectGrain>40||this.dataList.imperfectGrain<1
       ) {
         this.$message({
           message: '不完整粒输入错误',
@@ -785,6 +874,7 @@ export default {
 
               this.dataList.compId = this.compId
               this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
+              this.dataList.unitPrice=this.dataList.salePrice
               saleEdit(this.dataList)
                 .toPromise()
                 .then((response) => {

+ 30 - 6
src/views/salesManagement/salesPlanList.vue

@@ -61,18 +61,27 @@
             <div class="inputChenge">
               <el-input
                 v-model="scope.row.basisPrice"
-                @change="varietyClick(scope.row)"
-                class="inputs"
+                v-if="scope.row.identification == 'true'"
               ></el-input>
+              <div v-if="scope.row.identification == 'false'" class="inputs">
+                {{ scope.row.basisPrice }}
+              </div>
             </div>
             <img
               width="17"
               height="18"
               style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/edit.png"
-              @click="varietyClick(scope.row)"
+              @click="whether(scope.row)"
               alt=""
+              v-if="scope.row.identification == 'false'"
             />
+            <i
+              class="el-icon-check"
+              style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification == 'true'"
+              @click="varietyClick(scope.row)"
+            ></i>
           </div>
           <div v-else>—</div>
         </template>
@@ -84,18 +93,27 @@
               <!-- readonly -->
               <el-input
                 v-model="scope.row.unitPrice"
-                v-bind:class="inputs"
-                @change="varietyClick(scope.row)"
+                v-if="scope.row.identification == 'true'"
               ></el-input>
+              <div v-if="scope.row.identification == 'false'" class="inputs">
+                {{ scope.row.unitPrice }}
+              </div>
             </div>
             <img
               width="17"
               height="18"
               style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/edit.png"
-              @click="varietyClick(scope.row)"
+              @click="whether(scope.row)"
+              v-if="scope.row.identification == 'false'"
               alt=""
             />
+            <i
+              class="el-icon-check"
+              style="line-height: 29px; margin-left: 10px"
+              v-if="scope.row.identification == 'true'"
+              @click="varietyClick(scope.row)"
+            ></i>
           </div>
           <div v-else>—</div>
         </template>
@@ -273,6 +291,9 @@ export default {
       })
         .toPromise()
         .then((response) => {
+          for (var i = 0; i < response.records.length; i++) {
+            response.records[i].identification = 'false'
+          }
           this.warehouseList = response
           this.deptCircularPage.currentPage = response.current
           this.deptCircularPage.pageSize = response.size
@@ -392,6 +413,9 @@ export default {
     handleClose() {
       this.accessoryTFs = false
     },
+    whether(row) {
+      row.identification = 'true'
+    },
     handleSizeChange(val) {
       console.log(`每页 ${val} 条`)
       this.pageSize = val

+ 14 - 1
src/views/salesManagement/salesPlanLook.vue

@@ -66,7 +66,9 @@
           </el-form-item>
           <!--出货库所在地区-->
           <el-form-item label="出货库所在地区" span="1">
+            <div class="forlist">
            {{dataList.sendPrivate}}{{dataList.sendCity}}{{dataList.sendArea}}
+            </div>
           </el-form-item>
           <!--运费承担方-->
           <el-form-item label="运费承担方">
@@ -133,8 +135,9 @@
           </el-form-item>
           <!--产地-->
           <el-form-item label="产地" span="1">
-            <!-- <el-input disabled></el-input>    -->
+            <div class="forlist">
             {{dataList.outputPrivate}}{{dataList.outputCity}}
+            </div>
           </el-form-item>
           <!--产出年份-->
           <el-form-item label="产出年份" span="1">
@@ -658,4 +661,14 @@ export default {
   width: 400px;
   height: 20px;
 }
+.forlist{
+  background-color: #F5F7FA;
+  border-radius: 10px;
+  width: 100%;
+  padding-left: 15px;
+  height: 35px;
+  line-height: 35px;
+  color: #C0C4CC;
+  font-size: 14px;
+}
 </style>