王克恕 3 роки тому
батько
коміт
b288887547

+ 35 - 63
imcs-ui/src/views/zuihou/prepareProductMgr/trayMgr/components/Edit.vue

@@ -9,6 +9,21 @@
   	top="50px"
   >
     <el-form ref="form" :model="tenant" :rules="rules" label-position="right" label-width="130px">
+    	<!--所属产线-->
+      <el-form-item label='所属产线:' prop="zoneId">
+        <el-select
+          v-model="tenant.zoneId"
+           :placeholder='$t("common.pleaseSelect")'
+          style="width: 220px"
+        >
+          <el-option
+            v-for="(item, index) in zoneList"
+            :key="index"
+            :label="item.name"
+            :value="item.id"
+          />
+        </el-select>
+      </el-form-item>
       <!--编码-->
       <el-form-item :label='$t("prepare.table.tray.no")+":"' prop="no">
         <el-input v-model="tenant.no" :placeholder='$t("common.pleaseEnter")'/>
@@ -49,68 +64,6 @@
       <el-form-item :label='$t("prepare.table.tray.num")+":"' prop="num">
         <el-input-number v-model="tenant.num" :min="1" :max="1000" label="1"></el-input-number>&nbsp;&nbsp;个
       </el-form-item>
-
-      <!--夹紧位置-->
-<!--      <el-form-item :label='$t("prepare.table.tray.positionSort")+":"'>-->
-<!--        &lt;!&ndash; 功能按钮 &ndash;&gt;-->
-<!--		    <el-row class="filter-container">-->
-<!--		    	<el-col>-->
-<!--		    		<el-button type="primary" icon="el-icon-plus" size="medium" @click="addRes">新增</el-button>-->
-<!--		    	</el-col>-->
-<!--		    </el-row>-->
-<!--		    &lt;!&ndash; Table数据 &ndash;&gt;-->
-<!--				<el-table-->
-<!--		      ref="table"-->
-<!--		      v-loading="loading"-->
-<!--		      :data="tableData"-->
-<!--		      border-->
-<!--		      fit-->
-<!--		      style="width: 100%;"-->
-<!--		      @selection-change="onSelectChange"-->
-<!--		    >-->
-<!--		      <el-table-column prop="positionSort" :label='$t("prepare.table.trayPosition.positionSort")' align="center" width="70px">-->
-<!--		      	<template slot-scope="{ row }">-->
-<!--		      		<span>{{row.positionSort}}</span>-->
-<!--		      	</template>-->
-<!--		      </el-table-column>-->
-<!--		      <el-table-column prop="size" :label='$t("prepare.table.trayPosition.size")' align="center" width="100px">-->
-<!--		      	<template slot-scope="{ row }">-->
-<!--		      		<el-input size="small" v-model="row.size" v-if="row.isEdit" :placeholder='$t("common.pleaseEnter")'></el-input>-->
-<!--		      		<span v-else>{{row.size}}</span>-->
-<!--		      	</template>-->
-<!--		      </el-table-column>-->
-<!--		      <el-table-column prop="remark" :label='$t("prepare.table.trayPosition.remark")'>-->
-<!--		      	<template slot-scope="{ row }">-->
-<!--		      		<el-input size="small" v-model="row.remark" v-if="row.isEdit" :placeholder='$t("common.pleaseEnter")'></el-input>-->
-<!--		      		<span v-else>{{row.remark}}</span>-->
-<!--		      	</template>-->
-<!--		      </el-table-column>-->
-<!--		      <el-table-column-->
-<!--		        :label="$t('table.operation')"-->
-<!--		        fixed="right"-->
-<!--		        align="center"-->
-<!--		        column-key="operation"-->
-<!--		        width="80px"-->
-<!--		      >-->
-<!--		        <template slot-scope="{ row }">-->
-<!--		        	<el-tooltip v-if="type != 'add'" class="item" :content='$t("common.edit")' effect="dark" placement="top-start">-->
-<!--			          <i-->
-<!--			            class="el-icon-edit table-operation"-->
-<!--			            style="color: #2db7f5;"-->
-<!--			            @click="edit(row)"-->
-<!--			          />-->
-<!--			        </el-tooltip>-->
-<!--		          <el-tooltip class="item" :content='$t("common.delete")' effect="dark" placement="top-start">-->
-<!--			          <i-->
-<!--			            class="el-icon-delete table-operation"-->
-<!--			            style="color: #f50;"-->
-<!--			            @click="singleDelete(row)"-->
-<!--			          />-->
-<!--		          </el-tooltip>-->
-<!--		        </template>-->
-<!--		      </el-table-column>-->
-<!--		    </el-table>-->
-<!--      </el-form-item>-->
       <el-form-item :label='$t("prepare.table.tools.status")+":"' prop="status">
         <template>
 				  <el-radio v-model="tenant.status" label="1">{{$t("common.status.valid")}}</el-radio>
@@ -127,7 +80,8 @@
 <script>
 // 【夹具管理】-API
 import trayMgrApi from "@/api/prepareProductMgr/trayMgr"
-
+//【所属产线】-API
+import areaMgrApi from "@/api/resourceProductMgr/areaMgr"
 export default {
   name: 'TenantEdit',
   props: {
@@ -144,6 +98,7 @@ export default {
     return {
     	loading: false,
       type: 'add',
+      zoneList: [],
       tableData: [],
       tenant: this.initTenant(),
       screenWidth: 0,
@@ -160,6 +115,11 @@ export default {
       }
     }
   },
+  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+  created() {
+    // 加载列表数据
+    this.getZoneList();
+  },
   computed: {
     isVisible: {
       get () {
@@ -190,6 +150,17 @@ export default {
       	isEdit: true
       })
     },
+    
+    // 获取【所属产线】下拉数据
+    getZoneList() {
+      areaMgrApi.getList({ status: 1 }).then((res) => {
+        res = res.data;
+        if (res.isSuccess) {
+          this.zoneList = res.data;
+        }
+      });
+    },
+    
     // Table的选择事件
     onSelectChange (selection) {
       this.selection = selection
@@ -230,6 +201,7 @@ export default {
       return {
       	model: '',
         name: '',
+        zoneId: '',
         category: {
           key: ''
         },

+ 13 - 4
imcs-ui/src/views/zuihou/runManageCenter/productionScheduling/components/SchedResource.vue

@@ -3,7 +3,7 @@
 		<el-row>
 		  <el-col>
 		  	<!-- 时间,切换 -->
-		  	<div class="filter-container">
+		  	<!--<div class="filter-container">
 		    	<span>
 		    		<span>{{$t("runCenter.searchForm.shuoming")}}:</span>
 		    		<el-radio-group v-model="cuurentDate" size="small">
@@ -11,7 +11,7 @@
 				      <el-radio-button label="day">{{$t("runCenter.common.day")}}</el-radio-button>
 				    </el-radio-group>
 		    	</span>
-		    </div>
+		    </div>-->
 		    <!-- 主要内容 -->
 		    <el-table
 		      :key="tableKey"
@@ -50,7 +50,7 @@
 					    	<!-- 背景色条(10个)-->
 							<div class="timeDom">
 								<template v-for="child in obj.child">
-									<div v-if="child.isFull" class="timeItem tiActive"></div>
+									<div v-if="child.isFull" :class="obj.flag == '1' ? 'timeItem tiGyActive' : (obj.flag == '2' ? 'timeItem tiOgActive' : 'timeItem tiActive')"></div>
 									<div v-else class="timeItem"></div>
 								</template>
 							</div>
@@ -264,7 +264,8 @@ export default {
 				procedureNo: '',  // 工序编码
 				bomDesc: '', // 零件的名称
 				leftNums: 6.66, // 文字偏移量
-				child: []
+				child: [],
+				flag: '3',  // 是否已经开始
 			}
   		]
   		arr[0].child = JSON.parse(JSON.stringify(this.timeDomList));
@@ -301,6 +302,7 @@ export default {
 					arr[0].procedureNo = item.procedureNo;
 					arr[0].bomDesc = item.bomDesc;
 					arr[0].leftNums = leftNums*6.66;
+					arr[0].flag = item.flag ? item.flag : '3';
   				}
   				// interval【有交集】终止点,在cell中,
   				if(flag == '2') {
@@ -332,6 +334,7 @@ export default {
 					arr[0].procedureNo = item.procedureNo;
 					arr[0].bomDesc = item.bomDesc;
 					arr[0].leftNums = leftNums*6.66;
+					arr[0].flag = item.flag ? item.flag : '3';
   				}
   				
   				// cell【完全包含】,比cell大的多
@@ -446,6 +449,12 @@ export default {
 		.tiActive{
 			background: #3CC787;
 		}
+		.tiOgActive{
+			background: #CC9900;
+		}
+		.tiGyActive{
+			background: #999999;
+		}
 	}
 	.timeItemDesc {
 		position: absolute;