Ver código fonte

产品管理-编辑工序-单价工价最大值限制

yangsj 1 ano atrás
pai
commit
9fb195e5f4

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet-workshop/src/i18n/zh.json

@@ -1214,7 +1214,7 @@
   "restartthesuccess": "重启成功",
   "suspensionofsuccess": "暂停成功",
   "projectcompletion": "项目完成",
-  "projectexport": "项目导出",
+  "projectexport": "产品导出",
   "projecttaskgroupexport": "项目任务分组导出",
   "professionalscannotbeempty": "专业人员不能为空",
   "professionalscannotrepeat": "专业人员不能重复",

+ 30 - 29
fhKeeper/formulahousekeeper/timesheet-workshop/src/views/product/list.vue

@@ -214,14 +214,14 @@
                             clearable
                             placeholder="产品特征"
                             v-model="addForm.description">
-                        </el-input>    
+                        </el-input>
 
                     </el-form-item>
                 </el-form>
             </div>
             <div v-if="prodEditActive == 1">
                  <!--此处是录入工序的模块-->
-                
+
 
                 <el-input placeholder="请输入工序版本号" v-model="procedureVersion" clearable maxlength="50" class="input-pM"></el-input>
                 <el-table :data="procedureLit" style="width: 100%">
@@ -261,7 +261,7 @@
             </div>
             <!--此处是录入物料的模块-->
             <!--  <div v-if="prodEditActive == 2">
-               
+
 
                 <el-input placeholder="请输入物料版本号" v-model="prodMaterialVersion" class="input-pM"></el-input>
                 <el-table :data="prodMaterialList" style="width: 100%">
@@ -398,7 +398,7 @@
             <div>
                 <el-form ref="form" :model="category" label-width="80px">
                     <el-form-item label="分类名称">
-                        <el-input v-model="category.name" placeholder="请输入"></el-input>
+                        <el-input v-model="category.name"  maxlength="30" placeholder="请输入"></el-input>
                     </el-form-item>
                 </el-form>
             </div>
@@ -634,7 +634,7 @@ export default {
     },
     data() {
         return {
-            
+
             copyVisible: false,
             pdName: '',
             productSelections: [], //选中的产品id集合
@@ -782,7 +782,7 @@ export default {
                 orderNumber: [{ required: true, message:' 请输入订单数量', trigger: "blur" }],
                 unit: [{ required: true, message: '请输入单位', trigger: "blur" }],
                 groupNumber: [{ required: true, message: '请输入编组', trigger: "blur" }],
-                
+
 
                 projectStageName: [{ required: true, message: this.$t('pleaseentername'), trigger: "blur" }],
                 projectLevelName: [{ required: true, message: this.$t('pleaseentername'), trigger: "blur" }],
@@ -966,7 +966,7 @@ export default {
         exportProduct() {
 
             let productSelectionString = JSON.stringify(this.productSelections);
-            
+
             this.exportDisabled = true
             this.exportNotification = this.$notify({
                 title: '导出产品',
@@ -998,7 +998,7 @@ export default {
                     });
                 }
             );
-            
+
           /*   this.http.post("/product/exportData", {
                 date: productSelectionString,
                 productType: this.category
@@ -1024,7 +1024,7 @@ export default {
         updateCategory(row) {
             this.isganttshowCa = true
             this.title = "编辑"
-            
+
             console.log(row);
             this.category ={...row}
         },
@@ -1053,7 +1053,7 @@ export default {
                         }
                     })
             })
-           
+
         },
         saveCategory() {
             if (this.category.name == null) {
@@ -1066,14 +1066,15 @@ export default {
 
                 this.http.post("/prod-category/saveOrUpdateInfo", this.category,
                     res => {
-                        if (res.code == 'ok') {
+                        if (res.code === 'ok') {
                             this.isganttshowCa = false
                             this.getCategoryList()
                             this.category = {}
                         } else {
+                            console.log(res)
                             this.$message({
                                 showClose: true,
-                                message: '该分类已存在',
+                                message: res.msg,
                                 type: 'warning'
                             });
                         }
@@ -1082,12 +1083,12 @@ export default {
                     })
 
             }
-            
+
         },
 
         getCategoryList() {
             this.isganttshow = true
-           
+
             console.log(this.categoryList)
             this.http.post("/prod-category/getList", null,
                 res => {
@@ -1104,7 +1105,7 @@ export default {
                 .catch(_ => { });
         },
         changeProcedureVersion(row) {
-            
+
             let index = null
             for (var i in this.list) {
                 if (this.list[i].id === row.id) {
@@ -1112,7 +1113,7 @@ export default {
                     break
                 }
             }
-            
+
             this.getProdProcedureVersion(row.id, row.tableProdProcedure.version, index)
         },
         changeMaterialVersion(row) {
@@ -1123,7 +1124,7 @@ export default {
                     break
                 }
             }
-            
+
             this.getProdMaterialVersion(row.id,row. index)
         },
         // 获取row的key值
@@ -1157,7 +1158,7 @@ export default {
                           this.list[index].tableProdMaterial.versions = res.data
                           this.prodMaterialVersion = res.data[res.data.length - 1]
                           this.getProdMaterialVersion(row.id, index)
-  
+
                       }) */
             }
         },
@@ -1186,12 +1187,12 @@ export default {
         submitSequence(addSequence) {
 
             let flag=true
-            
+
             if (this.procedureVersion === null|| this.procedureVersion==='') {
                 flag=false
             }
 
-           
+
             if ((this.procedureVersion != null || this.procedureVersion != '') && (this.procedureLit.length == 0 || this.procedureLit.length == null)) {
                 flag = false
             }
@@ -1212,7 +1213,7 @@ export default {
                             type: "error"
                         });
 
-                        return 
+                        return
                     }
                     console.log("工价:"+this.procedureLit[i].unitPrice)
                    if(this.procedureLit[i].unitPrice> 9999999.999){
@@ -1231,7 +1232,7 @@ export default {
             if ((this.procedureVersion == null || this.procedureVersion === '')  && (this.procedureLit.length == 0 || this.procedureLit.length == null)) {
                 flag = true
             }
-           
+
             if(flag){
 
                  this.addLoading = true;
@@ -1251,7 +1252,7 @@ export default {
                             });
                             if (addSequence) {
                                 //进入物料录入
-/* 
+/*
                                 this.http.post('/prod-material/getProdMaterialList', { productId: this.productId },
                                     res => {
                                         this.prodMaterialList = res.data.prodMaterialList;
@@ -1284,7 +1285,7 @@ export default {
                 });
             }
 
-           
+
 
         },
         //工序返回上一步
@@ -1302,7 +1303,7 @@ export default {
                 if (this.professionList.length == 0) {
                     this.getProfessionList();
                 }
-            }    
+            }
         },
 
         //删除工序
@@ -2377,7 +2378,7 @@ export default {
                 if (arr[i].id != -1 && arr[i].id != 0) {
                     // if(arr[i].userList) {
                     //     if(arr[i].userList.length > 0) {
-                    //         arr[i].children = arr[i].userList 
+                    //         arr[i].children = arr[i].userList
                     //     }
                     // }
                     if (arr[i].children != null && arr[i].children.length > 0) {
@@ -3300,7 +3301,7 @@ export default {
                         flag=false;
                     }
 
-                    
+
                     if(flag){
                             //console.log("valid",valid)
                         this.addLoading = true;
@@ -3590,7 +3591,7 @@ export default {
     },
     activated() {
         var cateId = this.$route.params.cateId;
-        
+
         console.log('activated分类参数', cateId);
     },
     mounted() {
@@ -3699,4 +3700,4 @@ export default {
 .gongcheng .el-table .cell {
     overflow: inherit !important;
 }
-</style>
+</style>