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

+ 3 - 0
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/draftOrder/components/Edit.vue

@@ -423,7 +423,10 @@ export default {
     	let arr = [];
     	this.tableData.map(item => {
     		if(item.id == this.currRow.id) {
+    			// 赋值,原料炉批号
     			item.furnaceBatchNo = obj.furnaceBatchNo;
+    			// 带入参数
+    			item.meterialReceiveId = obj.id;
     		}
     		arr.push(item);
     	})

+ 142 - 127
imcs-ui/src/views/zuihou/statisticalAnalysis/resouceOee/Index.vue

@@ -1,127 +1,142 @@
-<template>
-  <div class="app-container">
-    <el-row class="rowCls">
-		<!-- 搜索模块 -->
-    <div class="filter-container">
-    	<span style="margin-left: 15px;">
-    		<span>{{$t("statisticalAnalysis.searchForm.oee.productlineName")}}:</span>
-    		<el-select v-model="productionLineId" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 150px;">
-        	<el-option
-			      v-for="item in productionLines"
-			      :key="item.id"
-			      :label="item.name"
-			      :value="item.id">
-			    </el-option>
-      	</el-select>
-    	</span>
-
-      <span style="margin-left: 15px;">
-    		<span>{{$t("statisticalAnalysis.searchForm.oee.statisticalDate")}}:</span>
-    		<el-date-picker
-          v-model="statisticalDate"
-          type="datetime"
-          format="yyyy-MM"
-          value-format="yyyy-MM"
-          style="width: 20%;"
-        />
-    	</span>
-      <span style="margin-left: 15px;">
-	      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
-	        {{ $t("table.search") }}
-	      </el-button>
-	      <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
-	        {{ $t("table.reset") }}
-	      </el-button>
-      </span>
-    </div>
-    </el-row>
-		<!-- OEE柱状图 -->
-    <el-row class="rowCls">
-      <div class="bottomDiv">
-      <!-- 标题 -->
-      <div class="modelTitle marginBottom15">本月设备OEE</div>
-      <!-- 柱状图数据 -->
-      <div class="chart-wrapper">
-        <bar-chart :barData="barData" :height="heightStr"/>
-      </div>
-      </div>
-    </el-row>
-
-  </div>
-</template>
-
-<script>
-  import productionLineMgrApi from "@/api/runManageCenter/productionLineMgr"
-  import productlineAvailabilityApi from "@/api/statisticalAnalysis/productlineAvailability"
-  import BarChart from '@/components/Charts/BarChart'
-	export default {
-	  name: "oee",
-    components: {BarChart },
-	  props: {
-	  },
-	  data () {
-	    return {
-        heightStr: "380px",
-        productionLines: [],
-	      tableKey: 0,
-	      loading: false,
-        productionLineId:"",
-        statisticalDate:"",
-        barData: {
-            name: 'OEE',
-            xData: [],
-            yData: []
-        },
-	    }
-	  },
-	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-	  created() {
-	  	// 加载产线下拉框数据
-      this.queryProductionLines()
-		},
-	  computed: {
-	  },
-	  mounted () {
-	  },
-	  methods: {
-      search() {
-          this.fetch()
-      },
-      reset() {
-          this.$refs.table.clearSort()
-          this.$refs.table.clearFilter()
-          this.search()
-      },
-	    fetch () {
-	  	  this.tableKey = !this.tableKey
-	      this.loading = true
-          console.log(this.productionLineId)
-          let params = {}
-          params.statisticalDate = this.statisticalDate
-          params.productionlineId = this.productionLineId
-          console.log(params)
-        productlineAvailabilityApi.queryProductionLineOee(params).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-              this.barData.xData =  res.data.xData
-              this.barData.yData =  res.data.yData
-	        }
-	      }).finally(() => this.loading = false)
-	    },
-      // 产线查找
-      queryProductionLines(){
-          this.productionLines = []
-          productionLineMgrApi.getList({}).then(response => {
-              const res = response.data
-              if (res.isSuccess) {
-                  this.productionLines = res.data
-                  if(this.productionLines.length > 0){
-                      this.productionLineId = this.productionLines[0].id
-                  }
-              }
-          })
-      }
-	  }
-	}
-</script>
-<style lang="scss" scoped></style>
+<template>
+  <div class="app-container">
+    <el-row class="rowCls">
+		<!-- 搜索模块 -->
+    <div class="filter-container">
+    	<span style="margin-left: 15px;">
+    		<span>{{$t("statisticalAnalysis.searchForm.oee.productlineName")}}:</span>
+    		<el-select v-model="productionLineId" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 150px;">
+        	<el-option
+			      v-for="item in productionLines"
+			      :key="item.id"
+			      :label="item.name"
+			      :value="item.id">
+			    </el-option>
+      	</el-select>
+    	</span>
+
+      <span style="margin-left: 15px;">
+    		<span>{{$t("statisticalAnalysis.searchForm.oee.statisticalDate")}}:</span>
+    		<el-date-picker
+          v-model="statisticalDate"
+          type="datetime"
+          format="yyyy-MM"
+          value-format="yyyy-MM"
+          style="width: 20%;"
+        />
+    	</span>
+      <span style="margin-left: 15px;">
+	      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
+	        {{ $t("table.search") }}
+	      </el-button>
+	      <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
+	        {{ $t("table.reset") }}
+	      </el-button>
+      </span>
+    </div>
+    </el-row>
+		<!-- OEE柱状图 -->
+    <el-row class="rowCls">
+      <div class="bottomDiv">
+      <!-- 标题 -->
+      <div class="modelTitle marginBottom15">本月设备OEE</div>
+      <!-- 柱状图数据 -->
+      <div class="chart-wrapper">
+        <bar-chart :barData="barData" :height="heightStr"/>
+      </div>
+      </div>
+    </el-row>
+
+  </div>
+</template>
+
+<script>
+  import productionLineMgrApi from "@/api/runManageCenter/productionLineMgr"
+  import productlineAvailabilityApi from "@/api/statisticalAnalysis/productlineAvailability"
+  import BarChart from '@/components/Charts/BarChart'
+  // 【产线管理】-API
+	import areaMgrApi from "@/api/resourceProductMgr/areaMgr"
+	export default {
+	  name: "oee",
+    components: {BarChart },
+	  props: {
+	  },
+	  data () {
+	    return {
+        heightStr: "380px",
+        productionLines: [],
+	      tableKey: 0,
+	      loading: false,
+        productionLineId:"",
+        statisticalDate:"",
+        barData: {
+            name: 'OEE',
+            xData: [],
+            yData: []
+        },
+	    }
+	  },
+	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+	  created() {
+	  	// 加载产线下拉框数据
+	  	this.getLineList();
+      // this.queryProductionLines()
+		},
+	  computed: {
+	  },
+	  mounted () {
+	  },
+	  methods: {
+      search() {
+          this.fetch()
+      },
+      reset() {
+          this.$refs.table.clearSort()
+          this.$refs.table.clearFilter()
+          this.search()
+      },
+	    fetch () {
+	  	  this.tableKey = !this.tableKey
+	      this.loading = true
+          console.log(this.productionLineId)
+          let params = {}
+          params.statisticalDate = this.statisticalDate
+          params.productionlineId = this.productionLineId
+          console.log(params)
+        productlineAvailabilityApi.queryProductionLineOee(params).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+              this.barData.xData =  res.data.xData
+              this.barData.yData =  res.data.yData
+	        }
+	      }).finally(() => this.loading = false)
+	    },
+	    
+	    // 产线下拉数据
+	  	getLineList(){
+	  		areaMgrApi.getList().then(res => {
+	  			res = res.data;
+	  			// console.log("产线下拉数据: ", res);
+	  			if(res.code == 0) {
+	  				this.productionLines = res.data;
+	  			}
+	  		})
+	  	},
+	  	
+      // 产线查找
+      queryProductionLines(){
+          this.productionLines = []
+          productionLineMgrApi.getList({}).then(response => {
+              const res = response.data
+              if (res.isSuccess) {
+                  this.productionLines = res.data
+                  if(this.productionLines.length > 0){
+                      this.productionLineId = this.productionLines[0].id
+                  }
+              }
+          })
+      }
+	  }
+	}
+</script>
+<style lang="scss" scoped></style>