瀏覽代碼

Merge remote-tracking branch 'origin/master' into master

yejian 3 年之前
父節點
當前提交
a08e05d09a

+ 10 - 0
imcs-ui/src/api/resourceProductMgr/areaMgr.js

@@ -17,6 +17,10 @@ const apiList = {
     method: 'POST',
     url: `/authority/zZone/update`
   },
+  changeMode: {
+    method: 'POST',
+    url: `/authority/zZone/changeMode`
+  },
   save: {
     method: 'POST',
     url: `/authority/zZone`
@@ -90,6 +94,12 @@ export default {
       data
     })
   },
+  changeMode (data) {
+    return axiosApi({
+      ...apiList.changeMode,
+      data
+    })
+  },
   updateStatus (data) {
     return axiosApi({
       ...apiList.updateStatus,

+ 3 - 0
imcs-ui/src/views/zuihou/prepareProductMgr/material/components/Edit.vue

@@ -111,6 +111,9 @@
 		    },
 	      roles: [],
 	      rules: {
+          zoneId: [
+            { required: true, message: this.$t("rules.require"), trigger: 'blur' }
+          ],
 	        meterialCode: [
 	        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
 	        ],

+ 3 - 3
imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/TechnologyEdit.vue

@@ -571,12 +571,12 @@ export default {
 		    	// 赋值-三坐标系列				
 		    	this.tenant = {
 					threeDimensionalConf:  res.data.threeDimensionalConf==null? "0" : res.data.threeDimensionalConf,
-                    threeDimensionalPrograme: res.data.threeDimensionalPrograme,
+                    threeDimensionalPrograme: res.data.threeDimensionalPrograme==null? "": res.data.threeDimensionalPrograme,
 					threeDimensionalDeviationConf: res.data.threeDimensionalDeviationConf==null? "0" : res.data.threeDimensionalDeviationConf,
-	    			threeDimensionalDeviationPrograme: res.data.threeDimensionalDeviationPrograme,
+	    			threeDimensionalDeviationPrograme: res.data.threeDimensionalDeviationPrograme==null? "":res.data.threeDimensionalDeviationPrograme,
 	    			// 工序抽检配置
 	    			randomCheckConf: res.data.randomCheckConf==null? "0" : res.data.randomCheckConf,
-	    			threeDimensionalPrograme: res.data.threeDimensionalPrograme
+	    			threeDimensionalPrograme: res.data.threeDimensionalPrograme==null? "" : res.data.threeDimensionalPrograme
 				};
 
 		    	// 获取【人工质检】数据

+ 24 - 1
imcs-ui/src/views/zuihou/prepareProductMgr/technologyVersion/components/programForm/components/ProgramncMgr.vue

@@ -345,7 +345,8 @@ export default {
     			name: val.name,
     			resourceId: val.resourceId,
     			resourceIds: val.resourceId +','+ val.name,
-		        workTime: val.workTime
+		        workTime: val.workTime,
+				filePath: val.filePath
     		};
     		this.fileObj= {
     			nc: '1', // 表示已经上传
@@ -434,6 +435,28 @@ export default {
     },
     submitForm () {
       this.$refs.form.validate((valid) => {
+		let bool = true;
+		let msg = ""
+		if(this.toolList.length ==0){
+            bool = false
+			msg = "刀具设备不能为空"
+		}else {		
+			this.toolList.forEach(item => {
+              if(!item.toolId){				 
+				 bool = false
+				 msg = "刀具名称不能为空"
+				 return false
+			  }			  
+			});  
+		}
+        if(!bool){
+            this.$message({
+	            message: msg,
+	            type: 'warning'
+	        });
+			return false
+		}
+
         if (valid) {
         	//添加数据
         	this.tenant.toolList = this.toolList;

+ 9 - 0
imcs-ui/src/views/zuihou/prepareProductMgr/trayMgr/components/Edit.vue

@@ -111,6 +111,15 @@ export default {
       rules: {
         name: [
         	{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
+        ],
+        zoneId: [
+          { required: true, message: this.$t("rules.require"), trigger: 'blur' }
+        ],
+        no: [
+          { required: true, message: this.$t("rules.require"), trigger: 'blur' }
+        ],
+        num: [
+          { required: true, message: this.$t("rules.require"), trigger: 'blur' }
         ]
       }
     }

+ 183 - 183
imcs-ui/src/views/zuihou/runManageCenter/lineRunModel/Index.vue

@@ -1,183 +1,183 @@
-<template>
-  <div class="formContaner" style="height:200px;">  		
-	    <el-form ref="form" :model="rowData" :rules="rules" label-position="right" label-width="150px">
-		  <el-form-item :label='$t("runCenter.form.areaName")+":"' v-model="rowData.name" >{{rowData.name}}</el-form-item>	
-	      <el-form-item :label='$t("runCenter.form.setModel")+":"' >
-	      	<el-select style="width:300px;" :placeholder='$t("common.pleaseSelect")' v-model="rowData.runMode"  @change="changeMode" >
-	          <el-option :key="value" :label="key" :value="value" v-for="(key, value) in this.dicts.RUN_MODE" />
-	        </el-select>
-	      </el-form-item>
-	    </el-form>
-	    
-	    <div slot="footer" class="dialog-footer">
-	      <el-button type="primary" icon="el-icon-check" :disabled="confirmDisabled" @click="submitForm">{{ $t('runCenter.buttons.ok') }}</el-button>
-	    </div>
-    </div>
-</template>
-
-<script>
-		
-	// 【区域管理】-API
-	import areaMgrApi from "@/api/resourceProductMgr/areaMgr"
-	import orderMgrApi from "@/api/runManageCenter/orderMgr"
-	// 共通的【查询方法】
-	import { initDicts, initQueryParams } from '@/utils/commons'
-	// 共通【工具方法】(字典分解)
-	import { convertEnum } from '@/utils/utils'
-	export default {
-	  name: "SetCurrentLine",
-	  components: {},
-	  props: {
-	    rowData: Object
-	  },
-	  data () {
-	    return {
-	    dicts: {
-          RUN_MODE: {}  //运行模式
-        },
-	      confirmDisabled: false,
-		  bool: true,
-		  orderCount: 0,
-	      tenant: this.initTenant(),
-	      rules: {
-	        runMode: [
-	        	{ required: true, message: this.$t("rules.require"), trigger: 'change' }
-	        ]
-	      }
-	    }
-	  },
-	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-	  created() {	  	
-	  	// 加载【字典】
-	  	initDicts(['RUN_MODE'], this.dicts)		
-		//console.log(this.tenant)
-		this.tenant = this.rowData		
-        this.checkCount()		
-		},
-	  computed: {
-	    currentUser () {
-	      return this.$store.state.account.user
-	    },
-	    runModelList() {
-          return convertEnum(this.dicts.RUN_MODE)
-      	}
-	  },
-	  mounted () {	     
-	  },
-	  methods: {
-	  	initTenant () {
-	      return {
-		    id: '',			
-	      	runMode: '',
-	      }
-	    },
-	    reset () {
-	      // 先清除校验,再清除表单,不然有奇怪的bug
-	      this.$refs.form.clearValidate()
-	      this.$refs.form.resetFields()
-	      this.tenant = this.initTenant()
-	    },		
-		changeMode(val) {			
-		    this.bool = true 
-			let runMode = this.rowData.runMode
-
-			if ( runMode === "1" || runMode === "3"){
-			    //弹框确认
-				this.$confirm('确认要切换产线模式吗?', this.$t("common.tips"), {
-					confirmButtonText: this.$t("common.confirm"),
-					cancelButtonText: this.$t("common.cancel"),
-					type: "warning"
-				}).then(() => {
-					
-				}).catch(() => {
-					this.$emit("close")         
-				});
-                				
-			}
-			else {			  
-			   this.$message({
-                message: "请确保手动操作在系统已登记",
-                type: "success"
-              });			
-			}
-			
-			if (runMode !== "" && runMode !== "2" && val === "2"){			    
-				return new Promise((resolve,reject)=>{
-				    orderMgrApi.getOrderStatusCount({}).then(res => {
-							resolve(res)
-                            //console.log(res)							
-							if(res.data.isSuccess){							     				
-								this.orderCount = parseInt(res.data.data.orderConductCount)
-								if(this.orderCount > 0){				    
-									this.$message({
-											message: "系统有在生产的订单,请先完成订单",
-											type: "error"
-									})
-									this.bool = false	
-                                    this.$emit("close")									
-								}								
-							}					    
-					})
-				})			    			
-			}
-
-			if(this.bool){			
-				this.tenant.runMode = val
-			}
-	
-		},
-	    submitForm () {		 	
-	      this.$refs.form.validate((valid) => {
-	        if (valid && this.bool) {
-				  	// 获取父组件传值ID
-				 	 	this.tenant.id = this.rowData.id
-		        this.confirmDisabled = true
-				  	console.log(this.tenant)
-		        //productionLineMgrApi.update(this.tenant).then(res => {
-				  	areaMgrApi.update(this.tenant).then(res => {
-	          	res = res.data 
-	          	console.log("恢复按钮 == ", res);
-	          	// 恢复按钮
-		          this.confirmDisabled = false
-	          	if (res.isSuccess) {
-		            this.$message({
-		              message: this.$t('tips.optionSuccess'),
-		              type: 'success'
-		            })
-		          } else {
-		          	this.$message({
-										message: res.message,
-										type: "error"
-								})
-		          }
-	          })
-	        } else {
-	          return false
-	        }
-	      })
-		  this.$emit("close")
-		  //location.reload()
-	    },
-		checkCount(){
-
-		}
-	  }
-	}
-</script>
-
-<!-- 本组件的css -->
-<style lang="scss" scoped>
-	.formTitle{
-		font-size: 16px;
-		font-weight: 700;
-		margin: 30px 30px 20px 30px;
-		padding-bottom: 20px;
-		border-bottom: 1px solid #CCCCCC;
-	}
-	.formContaner form{
-		max-width: 600px;
-	}
-	.dialog-footer{
-		margin-left: 180px;
-	}
-</style>
+<template>
+  <div class="formContaner" style="height:200px;">
+	    <el-form ref="form" :model="rowData" :rules="rules" label-position="right" label-width="150px">
+		  <el-form-item :label='$t("runCenter.form.areaName")+":"' v-model="rowData.name" >{{rowData.name}}</el-form-item>
+	      <el-form-item :label='$t("runCenter.form.setModel")+":"' >
+	      	<el-select style="width:300px;" :placeholder='$t("common.pleaseSelect")' v-model="rowData.runMode"  @change="changeMode" >
+	          <el-option :key="value" :label="key" :value="value" v-for="(key, value) in this.dicts.RUN_MODE" />
+	        </el-select>
+	      </el-form-item>
+	    </el-form>
+
+	    <div slot="footer" class="dialog-footer">
+	      <el-button type="primary" icon="el-icon-check" :disabled="confirmDisabled" @click="submitForm">{{ $t('runCenter.buttons.ok') }}</el-button>
+	    </div>
+    </div>
+</template>
+
+<script>
+
+	// 【区域管理】-API
+	import areaMgrApi from "@/api/resourceProductMgr/areaMgr"
+	import orderMgrApi from "@/api/runManageCenter/orderMgr"
+	// 共通的【查询方法】
+	import { initDicts, initQueryParams } from '@/utils/commons'
+	// 共通【工具方法】(字典分解)
+	import { convertEnum } from '@/utils/utils'
+	export default {
+	  name: "SetCurrentLine",
+	  components: {},
+	  props: {
+	    rowData: Object
+	  },
+	  data () {
+	    return {
+	    dicts: {
+          RUN_MODE: {}  //运行模式
+        },
+	      confirmDisabled: false,
+		  bool: true,
+		  orderCount: 0,
+	      tenant: this.initTenant(),
+	      rules: {
+	        runMode: [
+	        	{ required: true, message: this.$t("rules.require"), trigger: 'change' }
+	        ]
+	      }
+	    }
+	  },
+	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+	  created() {
+	  	// 加载【字典】
+	  	initDicts(['RUN_MODE'], this.dicts)
+		//console.log(this.tenant)
+		this.tenant = this.rowData
+        this.checkCount()
+		},
+	  computed: {
+	    currentUser () {
+	      return this.$store.state.account.user
+	    },
+	    runModelList() {
+          return convertEnum(this.dicts.RUN_MODE)
+      	}
+	  },
+	  mounted () {
+	  },
+	  methods: {
+	  	initTenant () {
+	      return {
+		    id: '',
+	      	runMode: '',
+	      }
+	    },
+	    reset () {
+	      // 先清除校验,再清除表单,不然有奇怪的bug
+	      this.$refs.form.clearValidate()
+	      this.$refs.form.resetFields()
+	      this.tenant = this.initTenant()
+	    },
+		changeMode(val) {
+		    this.bool = true
+			let runMode = this.rowData.runMode
+
+			if ( runMode === "1" || runMode === "3"){
+			    //弹框确认
+				this.$confirm('确认要切换产线模式吗?', this.$t("common.tips"), {
+					confirmButtonText: this.$t("common.confirm"),
+					cancelButtonText: this.$t("common.cancel"),
+					type: "warning"
+				}).then(() => {
+
+				}).catch(() => {
+					this.$emit("close")
+				});
+
+			}
+			else {
+			   this.$message({
+                message: "请确保手动操作在系统已登记",
+                type: "success"
+              });
+			}
+
+			if (runMode !== "" && runMode !== "2" && val === "2"){
+				return new Promise((resolve,reject)=>{
+				    orderMgrApi.getOrderStatusCount({}).then(res => {
+							resolve(res)
+                            //console.log(res)
+							if(res.data.isSuccess){
+								this.orderCount = parseInt(res.data.data.orderConductCount)
+								if(this.orderCount > 0){
+									this.$message({
+											message: "系统有在生产的订单,请先完成订单",
+											type: "error"
+									})
+									this.bool = false
+                                    this.$emit("close")
+								}
+							}
+					})
+				})
+			}
+
+			if(this.bool){
+				this.tenant.runMode = val
+			}
+
+		},
+	    submitForm () {
+	      this.$refs.form.validate((valid) => {
+	        if (valid && this.bool) {
+				  	// 获取父组件传值ID
+				 	 	this.tenant.id = this.rowData.id
+		        this.confirmDisabled = true
+				  	console.log(this.tenant)
+		        //productionLineMgrApi.update(this.tenant).then(res => {
+				  	areaMgrApi.changeMode(this.tenant).then(res => {
+	          	res = res.data
+	          	console.log("恢复按钮 == ", res);
+	          	// 恢复按钮
+		          this.confirmDisabled = false
+	          	if (res.isSuccess) {
+		            this.$message({
+		              message: this.$t('tips.optionSuccess'),
+		              type: 'success'
+		            })
+		          } else {
+		          	this.$message({
+										message: res.message,
+										type: "error"
+								})
+		          }
+	          })
+	        } else {
+	          return false
+	        }
+	      })
+		  this.$emit("close")
+		  //location.reload()
+	    },
+		checkCount(){
+
+		}
+	  }
+	}
+</script>
+
+<!-- 本组件的css -->
+<style lang="scss" scoped>
+	.formTitle{
+		font-size: 16px;
+		font-weight: 700;
+		margin: 30px 30px 20px 30px;
+		padding-bottom: 20px;
+		border-bottom: 1px solid #CCCCCC;
+	}
+	.formContaner form{
+		max-width: 600px;
+	}
+	.dialog-footer{
+		margin-left: 180px;
+	}
+</style>

+ 14 - 14
imcs-ui/src/views/zuihou/runManageCenter/setCurrentLine/Index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="formContaner">
   		<div class="formTitle">{{$t("runCenter.searchForm.setCurrent")}}</div>
-			<!-- 表单模块 -->        	    
+			<!-- 表单模块 -->
 			<el-descriptions class="description" :column="2" v-for="item in lineList" :key="item.id" :colon="false">
 			  	<template slot="extra">
       				<el-button type="primary" icon="el-icon-refresh" size="small" @click="config(item)"  >配置</el-button>
@@ -9,9 +9,9 @@
 			 	<el-descriptions-item>
 					   <h1>{{item.name}}</h1>
 				       <span>运行模式:{{ dicts.RUN_MODE[item.runMode] }}</span>
-				</el-descriptions-item>             	
+				</el-descriptions-item>
              	<el-descriptions-item>
-                      <div class="block">    					
+                      <div class="block">
     						<el-image :src="item.imgUrl" fit="cover" lazy>
       							<div slot="placeholder" class="image-slot">
         								加载中<span class="dot">...</span>
@@ -28,7 +28,7 @@
 		  custom-class="dialogNoTop"
 		>
 			<!--【产线模式】 -->
-		    <lineRunMode :rowData="rowData" @close="modeClose" @success="editModeSuccess" />			
+		    <lineRunMode :rowData="rowData" @close="modeClose" @success="editModeSuccess" />
 		</el-dialog>
 
     </div>
@@ -54,7 +54,7 @@
 		  },
 		  modeVisible: false,
 		  rowData: {}, // row数据
-		  queryParams: initQueryParams({}),		  
+		  queryParams: initQueryParams({}),
 	      lineList: [{name:"智能生产保障系统", runMode:"2",imgUrl:require("@/assets/yunMap/layout.png")},{name:"舱体类加工单元", runMode:"2",imgUrl:require("@/assets/yunMap/layout2.png")},{name:"框体类加工单元", runMode:"1",imgUrl:require("@/assets/yunMap/layout3.png")}],
 	      confirmDisabled: false,
 	      tenant: this.initTenant(),
@@ -67,9 +67,9 @@
 	  },
 	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
 	  created() {
-		initDicts(['RUN_MODE'], this.dicts)  
+		initDicts(['RUN_MODE'], this.dicts)
 	  	// 获取【产线】数据下拉
-	    this.fetch()	    
+	    this.fetch()
 		},
 	  computed: {
 	    currentUser () {
@@ -89,17 +89,17 @@
 	      this.$refs.form.clearValidate()
 	      this.$refs.form.resetFields()
 	      this.tenant = this.initTenant()
-	    },	    
+	    },
 	    // 获取【产线】数据下拉
 	    fetch(){
 	    	//productionLineMgrApi.getList({}).then(res => {
-			 areaMgrApi.page(this.queryParams).then(res => {	
-	    		res = res.data 
+			 areaMgrApi.page(this.queryParams).then(res => {
+	    		res = res.data
 	    		if(res.isSuccess){
 	    			this.lineList = res.data.records
 	    		}
 	    	})
-	    },	    
+	    },
 		modeClose(){
 	  		this.modeVisible = false
 	  	},
@@ -107,9 +107,9 @@
 	  		this.fetch()
 	  	},
 		config(item){
-		  this.rowData = item		  
+		  this.rowData = item
 	  	  this.modeVisible = true
-		}  
+		}
 	  }
 	}
 </script>
@@ -126,7 +126,7 @@
 	.description {
 		width:90%;
 		margin: 10px auto;
-		padding:0 3%;		
+		padding:0 3%;
 	}
     .el-descriptions >>> .el-descriptions__table{
 		height:180px;