Explorar o código

原材料接收页面展示及刷新问题修改

yejian %!s(int64=3) %!d(string=hai) anos
pai
achega
73e0ffad6b

+ 449 - 448
imcs-ui/src/views/zuihou/prepareProductMgr/material/Index.vue

@@ -1,448 +1,449 @@
-<!-- 【原材料管理】模块 -->
-<template>
-  <div class="app-container">
-		<!-- 搜索模块 -->
-    <div class="filter-container">
-    	<!-- 物料编码 -->
-    	<span>
-    		<span>物料编码:</span>
-    		<el-input v-model="queryParams.model.meterialCode" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
-    	</span>
-    	<!-- 材料牌号 -->
-    	<span style="margin-left: 15px;">
-    		<span>材料牌号:</span>
-    		<el-input v-model="queryParams.model.tradeMark" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
-    	</span>
-    	<!-- 规格型号 -->
-    	<span style="margin-left: 15px;">
-    		<span>规格型号:</span>
-    		<el-input v-model="queryParams.model.specification" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
-    	</span>
-    	<!-- 状态 -->
-    	<span style="margin-left: 15px;">
-    		<span>{{$t("prepare.searchForm.status")}}:</span>
-    		<el-select v-model="queryParams.model.status" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 150px;">
-        	<el-option
-			      v-for="item in audioStatus"
-			      :key="item.value"
-			      :label="item.label"
-			      :value="item.value">
-			    </el-option>
-      	</el-select>
-    	</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 class="filter-container">
-    	<el-col>
-    		<el-button type="primary" icon="el-icon-plus" size="medium" v-has-permission="['material:add']" @click="add">{{ $t("common.add") }}</el-button>
-	      <el-button type="primary" icon="el-icon-edit" size="medium" v-has-permission="['material:int']" @click="trayOne">
-	        	接收
-	      </el-button>
-	      <el-button type="success" icon="el-icon-edit" size="medium" v-has-permission="['material:update']" @click="editOne">
-	        {{ $t("common.edit") }}
-	      </el-button>
-	      <el-button type="danger" icon="el-icon-delete" size="medium" v-has-permission="['material:delete']" @click="batchDelete">
-	        {{ $t("table.delete") }}
-	      </el-button>
-	      
-    	</el-col>
-    </el-row>
-
-		<!-- 列表数据 -->
-    <el-table
-      :key="tableKey"
-      ref="table"
-      v-loading="loading"
-      :data="tableData.records"
-      border
-      fit
-      row-key="id"
-      style="width: 100%;"
-      @selection-change="onSelectChange"
-      @cell-click="cellClick"
-    >
-    	<!-- 序号 -->
-    	<el-table-column :label='$t("common.serialNo")' width="55px" align="center">
-	      <template slot-scope="scope">
-	        <div>
-	          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
-	        </div>
-	      </template>
-      </el-table-column>
-      <!-- CheckBox -->
-      <el-table-column align="center" type="selection" width="50" :reserve-selection="true" />
-      <el-table-column prop="meterialCode" label='物料编码' :show-overflow-tooltip="true" width="150px"></el-table-column>
-      <el-table-column prop="tradeMark" label='材料牌号' :show-overflow-tooltip="true" width="200px"></el-table-column>
-      <el-table-column prop="equipmentName" label='器材名称' :show-overflow-tooltip="true"></el-table-column>
-	  	<el-table-column prop="specification" label='规格型号' :show-overflow-tooltip="true" width="150px"></el-table-column>
-      <el-table-column prop="handleStatus" label='处理状态' :show-overflow-tooltip="true" width="150px"></el-table-column>
-      <el-table-column prop="num" label='数量' :show-overflow-tooltip="true" width="150px"></el-table-column>
-      <el-table-column prop="status" label='启用状态' align="center" width="90px">
-      	<template slot-scope="{ row }">
-          <el-tag :type="row.status=='1' ? 'success' : 'danger'">
-          	{{ row.status=='1' ? $t("common.status.valid") : $t("common.frozen") }}
-          </el-tag>
-        </template>
-      </el-table-column>
-      <!-- 操作 -->
-      <el-table-column
-        :label="$t('table.operation')"
-        fixed="right"
-        align="center"
-        column-key="operation"
-        width="120px"
-      >
-        <template slot-scope="{ row }">
-        	<a href="javascript:;" style="color: #2db7f5;" v-has-permission="['material:int']" @click="tray(row)">接收</a>
-        	<a href="javascript:;" style="color: #2db7f5;" v-has-permission="['material:view']" @click="view(row)">接收记录</a>
-        </template>
-      </el-table-column>
-    </el-table>
-    
-    <!-- 分页组件 -->
-    <pagination
-      v-show="tableData.total > 0"
-      :limit.sync="queryParams.size"
-      :page.sync="queryParams.current"
-      :total="Number(tableData.total)"
-      @pagination="fetch"
-    />
-    
-    <!-- 新增、修改 -->
-    <tenant-edit
-      ref="edit"
-      :dialog-visible="dialog.isVisible"
-      :title="dialog.title"
-      @close="editClose"
-      @success="editSuccess"
-    />
-    
-   	<!-- 詳情 -->
-    <tenant-view
-      ref="view"
-      :dialog-visible="tenantViewVisible"
-      @close="viewClose"
-    />
-    
-    <!-- 接收 -->
-    <receive
-      ref="editTray"
-      :dialog-visible="dialogTray.isVisible"
-      :title="dialogTray.title"
-      @close="editTrayClose"
-      @success="editTraySuccess"
-    />
-    
-  </div>
-</template>
-
-<script>
-	// 【分页】组件
-	import Pagination from "@/components/Pagination"
-	// 【新增、修改】组件
-	import TenantEdit from "./components/Edit"
-	// 【详情】组件
-	import TenantView from "./components/View"
-	// 【接收】组件
-	import Receive from "./components/Receive"
-	// 【原材料管理】-API
-	import MaterialApi from "@/api/prepareProductMgr/material"
-	import elDragDialog from '@/directive/el-drag-dialog'
-	import { downloadFile, initEnums, initDicts, initQueryParams } from '@/utils/commons'
-	// 共通工具方法(字典分解)
-	import { convertEnum } from '@/utils/utils'
-	import axios from 'axios'
-	export default {
-	  name: "Material",
-	  directives: { elDragDialog },
-	  components: { Pagination, TenantEdit, TenantView, Receive },
-	  props: {
-	  },
-	  data () {
-	    return {
-	    	audioStatus: [],
-	      dialog: {
-	        isVisible: false,
-	        title: ""
-	      },
-	      dialogTray: {
-	        isVisible: false,
-	        title: ""
-	      },
-	      brand: {
-	      	key: ''
-	      },
-	      preview: {
-	        isVisible: false,
-	        context: ''
-	      },
-	      tenantViewVisible: false,
-	      tableKey: 0,
-	      queryParams: initQueryParams({}),
-	      selection: [],
-	      loading: false,
-	      tableData: {
-	        total: 0
-	      },
-	      dicts: {
-          METERIAL_BRAND: {},  //工具材料品牌
-          METERIAL_CATEGORY: {},  //工具材料分类
-          MATERIAL_TYPE: {}  //工具材料毛坯成品分类
-        },
-	      enums: {
-	        TenantTypeEnum: {},
-	        TenantStatusEnum: {}
-	      }
-	    }
-	  },
-	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-	  created() {
-	  	// 调用常量-审核状态
-	  	this.audioStatus = this.$constWKS.STATUSORTHERLIST
-	  	// 加载【字典】
-	  	initDicts(['METERIAL_BRAND', 'METERIAL_CATEGORY', 'MATERIAL_TYPE'], this.dicts);
-	  	// 加载列表数据
-	  	this.fetch()
-		},
-	  computed: {
-	    currentUser () {
-	      return this.$store.state.account.user
-	    },
-	    metbrandList() {
-        return convertEnum(this.dicts.METERIAL_BRAND)
-      },
-	    metcatgList() {
-        return convertEnum(this.dicts.METERIAL_CATEGORY)
-      },
-      materialTypeList() {
-        return convertEnum(this.dicts.MATERIAL_TYPE)
-      }
-	  },
-	  mounted () {
-
-	  },
-	  methods: {
-	    viewClose () {
-	      this.tenantViewVisible = false
-	    },
-	    editClose () {
-	      this.dialog.isVisible = false
-	    },
-	    editSuccess () {
-	      this.search()
-	    },
-	    editTrayClose () {
-	      this.dialogTray.isVisible = false
-	    },
-	    editTraySuccess () {
-	      this.search()
-	    },
-	    onSelectChange (selection) {
-	      this.selection = selection
-	    },
-	    search () {
-	      this.fetch({
-	        ...this.queryParams
-	      })
-	    },
-	    reset () {
-	      this.queryParams = initQueryParams({})
-	      this.brand = {key: ''};
-	      this.$refs.table.clearSort()
-	      this.$refs.table.clearFilter()
-	      this.search()
-	    },
-	    add () {
-	      this.$refs.edit.type = "add"
-	      this.$refs.edit.setTenant(false, this.dicts)
-	      this.dialog.title = this.$t("common.add")
-	      this.dialog.isVisible = true
-	    },
-	    singleDelete (row) {
-	      this.$refs.table.clearSelection()
-	      this.$refs.table.toggleRowSelection(row, true)
-	      this.batchDelete()
-	    },
-	    batchDelete () {
-	      if (!this.selection.length) {
-	        this.$message({
-	          message: this.$t("tips.noDataSelected"),
-	          type: "warning"
-	        })
-	        return
-	      }
-
-	      const readonlyIndex = this.selection.findIndex(item => item.readonly)
-
-	      if (readonlyIndex > -1) {
-	        this.$message({
-	          message: this.$t("tips.systemData"),
-	          type: "warning"
-	        })
-	        return
-	      }
-
-	      this.$confirm('删除【原材料】数据后,会将【原材料】数据全部删除,确认删除?', this.$t("common.tips"), {
-	      	distinguishCancelAndClose: true,
-	        confirmButtonText: this.$t("common.confirm"),
-	        cancelButtonText: this.$t("common.cancel"),
-	        type: "warning"
-	      }).then(() => {
-	      	const ids = []
-		      let contain = false
-		      this.selection.forEach(item => {
-		        if (item.readonly) {
-		          contain = true
-		          return
-		        }
-		        ids.push(item.id)
-		      })
-		      if (contain) {
-		        this.$message({
-		          message: this.$t("tips.systemData"),
-		          type: "warning"
-		        })
-		      } else {
-		        this.delete(ids)
-		      }
-	      }).catch(() => {})
-	    },
-	    clearSelections () {
-	      this.$refs.table.clearSelection()
-	    },
-	    delete (ids) {
-	      MaterialApi.remove({ ids: ids }).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          this.$message({
-	            message: this.$t("tips.deleteSuccess"),
-	            type: "success"
-	          })
-	          this.search()
-	          // 清理已经删除的数据
-	          this.$refs.table.clearSelection()
-	        }
-	      })
-	    },
-	    view (row) {
-	      this.$refs.view.setTenant(row)
-	      this.tenantViewVisible = true
-	    },
-	    // 【修改】表头上Btn-事件
-	    editOne() {
-	    	if (!this.selection.length) {
-	        this.$message({
-	          message: this.$t("tips.noDataSelected"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	    	if (this.selection.length > 1) {
-	        this.$message({
-	          message: this.$t("tips.mustOne"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	    	this.edit(this.selection[0]);
-	    },
-	    edit (row) {
-	      if (row.readonly) {
-	        this.$message({
-	          message: this.$t("tips.systemData"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	      this.$refs.edit.setTenant(row, this.dicts)
-	      this.$refs.edit.type = "edit"
-	      this.dialog.title = this.$t("common.edit")
-	      this.dialog.isVisible = true
-	    },
-	    // 【接收】表头上Btn-事件
-	    trayOne(row) {
-	    	if (!this.selection.length) {
-		    	// 新增
-	    		// this.addTray();
-	    		this.$message({
-	          message: this.$t("tips.noDataSelected"),
-	          type: "warning"
-	        })
-		    	return
-	      }
-	    	if (this.selection.length > 1) {
-	        this.$message({
-	          message: this.$t("tips.mustOne"),
-	          type: "warning"
-	        })
-	        return
-	      }
-	    	// 打开弹出
-	    	this.tray(this.selection[0]);
-	    },
-	    
-	    // 修改【设置可存放托盘】
-	    tray(row) {
-	    	this.$refs.editTray.setTenant(row)
-	      this.$refs.editTray.type = "edit"
-	      this.dialogTray.title = "接收"
-	      this.dialogTray.isVisible = true
-	    },
-	    
-	    // 新增【设置可存放托盘】
-	    addTray() {
-	      this.$refs.editTray.type = "add"
-	      this.dialogTray.title = "新增接收"
-	      this.dialogTray.isVisible = true
-	    },
-	    
-	    fetch (params = {}) {
-	      this.loading = true
-	      if (this.queryParams.timeRange) {
-	        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
-	        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
-	      }
-				//
-	      this.queryParams.current = params.current ? params.current : this.queryParams.current
-	      this.queryParams.size = params.size ? params.size : this.queryParams.size
-	      // 搜索条件添加
-	      this.queryParams.model.brand = this.brand
-	      MaterialApi.page(this.queryParams).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          this.tableData = res.data
-	        }
-	        // eslint-disable-next-line no-return-assign
-	      }).finally(() => this.loading = false)
-
-	    },
-	    
-	    cellClick (row, column) {
-	      if (column['columnKey'] === "operation") {
-	        return
-	      }
-	      let flag = false
-	      this.selection.forEach((item) => {
-	        if (item.id === row.id) {
-	          flag = true
-	          this.$refs.table.toggleRowSelection(row)
-	        }
-	      })
-
-	      if (!flag) {
-	        this.$refs.table.toggleRowSelection(row, true)
-	      }
-	    }
-	  }
-	}
-</script>
-<style lang="scss" scoped></style>
+<!-- 【原材料管理】模块 -->
+<template>
+  <div class="app-container">
+		<!-- 搜索模块 -->
+    <div class="filter-container">
+    	<!-- 物料编码 -->
+    	<span>
+    		<span>物料编码:</span>
+    		<el-input v-model="queryParams.model.meterialCode" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
+    	</span>
+    	<!-- 材料牌号 -->
+    	<span style="margin-left: 15px;">
+    		<span>材料牌号:</span>
+    		<el-input v-model="queryParams.model.tradeMark" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
+    	</span>
+    	<!-- 规格型号 -->
+    	<span style="margin-left: 15px;">
+    		<span>规格型号:</span>
+    		<el-input v-model="queryParams.model.specification" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
+    	</span>
+    	<!-- 状态 -->
+    	<span style="margin-left: 15px;">
+    		<span>{{$t("prepare.searchForm.status")}}:</span>
+    		<el-select v-model="queryParams.model.status" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 150px;">
+        	<el-option
+			      v-for="item in audioStatus"
+			      :key="item.value"
+			      :label="item.label"
+			      :value="item.value">
+			    </el-option>
+      	</el-select>
+    	</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 class="filter-container">
+    	<el-col>
+    		<el-button type="primary" icon="el-icon-plus" size="medium" v-has-permission="['material:add']" @click="add">{{ $t("common.add") }}</el-button>
+	      <el-button type="primary" icon="el-icon-edit" size="medium" v-has-permission="['material:int']" @click="trayOne">
+	        	接收
+	      </el-button>
+	      <el-button type="success" icon="el-icon-edit" size="medium" v-has-permission="['material:update']" @click="editOne">
+	        {{ $t("common.edit") }}
+	      </el-button>
+	      <el-button type="danger" icon="el-icon-delete" size="medium" v-has-permission="['material:delete']" @click="batchDelete">
+	        {{ $t("table.delete") }}
+	      </el-button>
+
+    	</el-col>
+    </el-row>
+
+		<!-- 列表数据 -->
+    <el-table
+      :key="tableKey"
+      ref="table"
+      v-loading="loading"
+      :data="tableData.records"
+      border
+      fit
+      row-key="id"
+      style="width: 100%;"
+      @selection-change="onSelectChange"
+      @cell-click="cellClick"
+    >
+    	<!-- 序号 -->
+    	<el-table-column :label='$t("common.serialNo")' width="55px" align="center">
+	      <template slot-scope="scope">
+	        <div>
+	          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
+	        </div>
+	      </template>
+      </el-table-column>
+      <!-- CheckBox -->
+      <el-table-column align="center" type="selection" width="50" :reserve-selection="true" />
+      <el-table-column prop="meterialCode" label='物料编码' :show-overflow-tooltip="true" width="150px"></el-table-column>
+      <el-table-column prop="tradeMark" label='材料牌号' :show-overflow-tooltip="true" width="200px"></el-table-column>
+      <el-table-column prop="equipmentName" label='器材名称' :show-overflow-tooltip="true"></el-table-column>
+	  	<el-table-column prop="specification" label='规格型号' :show-overflow-tooltip="true" width="150px"></el-table-column>
+      <el-table-column prop="handleStatus" label='处理状态' :show-overflow-tooltip="true" width="150px"></el-table-column>
+      <el-table-column prop="num" label='数量' :show-overflow-tooltip="true" width="150px"></el-table-column>
+      <el-table-column prop="status" label='启用状态' align="center" width="90px">
+      	<template slot-scope="{ row }">
+          <el-tag :type="row.status=='1' ? 'success' : 'danger'">
+          	{{ row.status=='1' ? $t("common.status.valid") : $t("common.frozen") }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <!-- 操作 -->
+      <el-table-column
+        :label="$t('table.operation')"
+        fixed="right"
+        align="center"
+        column-key="operation"
+        width="120px"
+      >
+        <template slot-scope="{ row }">
+        	<a href="javascript:;" style="color: #2db7f5;" v-has-permission="['material:int']" @click="tray(row)">接收</a>
+        	<a href="javascript:;" style="color: #2db7f5;" v-has-permission="['material:view']" @click="view(row)">接收记录</a>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!-- 分页组件 -->
+    <pagination
+      v-show="tableData.total > 0"
+      :limit.sync="queryParams.size"
+      :page.sync="queryParams.current"
+      :total="Number(tableData.total)"
+      @pagination="fetch"
+    />
+
+    <!-- 新增、修改 -->
+    <tenant-edit
+      ref="edit"
+      :dialog-visible="dialog.isVisible"
+      :title="dialog.title"
+      @close="editClose"
+      @success="editSuccess"
+    />
+
+   	<!-- 詳情 -->
+    <tenant-view
+      ref="view"
+      :dialog-visible="tenantViewVisible"
+      @close="viewClose"
+    />
+
+    <!-- 接收 -->
+    <receive
+      ref="editTray"
+      :dialog-visible="dialogTray.isVisible"
+      :title="dialogTray.title"
+      @close="editTrayClose"
+      @success="editTraySuccess"
+    />
+
+  </div>
+</template>
+
+<script>
+	// 【分页】组件
+	import Pagination from "@/components/Pagination"
+	// 【新增、修改】组件
+	import TenantEdit from "./components/Edit"
+	// 【详情】组件
+	import TenantView from "./components/View"
+	// 【接收】组件
+	import Receive from "./components/Receive"
+	// 【原材料管理】-API
+	import MaterialApi from "@/api/prepareProductMgr/material"
+	import elDragDialog from '@/directive/el-drag-dialog'
+	import { downloadFile, initEnums, initDicts, initQueryParams } from '@/utils/commons'
+	// 共通工具方法(字典分解)
+	import { convertEnum } from '@/utils/utils'
+	import axios from 'axios'
+	export default {
+	  name: "Material",
+	  directives: { elDragDialog },
+	  components: { Pagination, TenantEdit, TenantView, Receive },
+	  props: {
+	  },
+	  data () {
+	    return {
+	    	audioStatus: [],
+	      dialog: {
+	        isVisible: false,
+	        title: ""
+	      },
+	      dialogTray: {
+	        isVisible: false,
+	        title: ""
+	      },
+	      brand: {
+	      	key: ''
+	      },
+	      preview: {
+	        isVisible: false,
+	        context: ''
+	      },
+	      tenantViewVisible: false,
+	      tableKey: 0,
+	      queryParams: initQueryParams({}),
+	      selection: [],
+	      loading: false,
+	      tableData: {
+	        total: 0
+	      },
+	      dicts: {
+          METERIAL_BRAND: {},  //工具材料品牌
+          METERIAL_CATEGORY: {},  //工具材料分类
+          MATERIAL_TYPE: {}  //工具材料毛坯成品分类
+        },
+	      enums: {
+	        TenantTypeEnum: {},
+	        TenantStatusEnum: {}
+	      }
+	    }
+	  },
+	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+	  created() {
+	  	// 调用常量-审核状态
+	  	this.audioStatus = this.$constWKS.STATUSORTHERLIST
+	  	// 加载【字典】
+	  	initDicts(['METERIAL_BRAND', 'METERIAL_CATEGORY', 'MATERIAL_TYPE'], this.dicts);
+	  	// 加载列表数据
+	  	this.fetch()
+		},
+	  computed: {
+	    currentUser () {
+	      return this.$store.state.account.user
+	    },
+	    metbrandList() {
+        return convertEnum(this.dicts.METERIAL_BRAND)
+      },
+	    metcatgList() {
+        return convertEnum(this.dicts.METERIAL_CATEGORY)
+      },
+      materialTypeList() {
+        return convertEnum(this.dicts.MATERIAL_TYPE)
+      }
+	  },
+	  mounted () {
+
+	  },
+	  methods: {
+	    viewClose () {
+	      this.tenantViewVisible = false
+        this.search()
+	    },
+	    editClose () {
+	      this.dialog.isVisible = false
+	    },
+	    editSuccess () {
+	      this.search()
+	    },
+	    editTrayClose () {
+	      this.dialogTray.isVisible = false
+	    },
+	    editTraySuccess () {
+	      this.search()
+	    },
+	    onSelectChange (selection) {
+	      this.selection = selection
+	    },
+	    search () {
+	      this.fetch({
+	        ...this.queryParams
+	      })
+	    },
+	    reset () {
+	      this.queryParams = initQueryParams({})
+	      this.brand = {key: ''};
+	      this.$refs.table.clearSort()
+	      this.$refs.table.clearFilter()
+	      this.search()
+	    },
+	    add () {
+	      this.$refs.edit.type = "add"
+	      this.$refs.edit.setTenant(false, this.dicts)
+	      this.dialog.title = this.$t("common.add")
+	      this.dialog.isVisible = true
+	    },
+	    singleDelete (row) {
+	      this.$refs.table.clearSelection()
+	      this.$refs.table.toggleRowSelection(row, true)
+	      this.batchDelete()
+	    },
+	    batchDelete () {
+	      if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+
+	      const readonlyIndex = this.selection.findIndex(item => item.readonly)
+
+	      if (readonlyIndex > -1) {
+	        this.$message({
+	          message: this.$t("tips.systemData"),
+	          type: "warning"
+	        })
+	        return
+	      }
+
+	      this.$confirm('删除【原材料】数据后,会将【原材料】数据全部删除,确认删除?', this.$t("common.tips"), {
+	      	distinguishCancelAndClose: true,
+	        confirmButtonText: this.$t("common.confirm"),
+	        cancelButtonText: this.$t("common.cancel"),
+	        type: "warning"
+	      }).then(() => {
+	      	const ids = []
+		      let contain = false
+		      this.selection.forEach(item => {
+		        if (item.readonly) {
+		          contain = true
+		          return
+		        }
+		        ids.push(item.id)
+		      })
+		      if (contain) {
+		        this.$message({
+		          message: this.$t("tips.systemData"),
+		          type: "warning"
+		        })
+		      } else {
+		        this.delete(ids)
+		      }
+	      }).catch(() => {})
+	    },
+	    clearSelections () {
+	      this.$refs.table.clearSelection()
+	    },
+	    delete (ids) {
+	      MaterialApi.remove({ ids: ids }).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.$message({
+	            message: this.$t("tips.deleteSuccess"),
+	            type: "success"
+	          })
+	          this.search()
+	          // 清理已经删除的数据
+	          this.$refs.table.clearSelection()
+	        }
+	      })
+	    },
+	    view (row) {
+	      this.$refs.view.setTenant(row)
+	      this.tenantViewVisible = true
+	    },
+	    // 【修改】表头上Btn-事件
+	    editOne() {
+	    	if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	if (this.selection.length > 1) {
+	        this.$message({
+	          message: this.$t("tips.mustOne"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	this.edit(this.selection[0]);
+	    },
+	    edit (row) {
+	      if (row.readonly) {
+	        this.$message({
+	          message: this.$t("tips.systemData"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	      this.$refs.edit.setTenant(row, this.dicts)
+	      this.$refs.edit.type = "edit"
+	      this.dialog.title = this.$t("common.edit")
+	      this.dialog.isVisible = true
+	    },
+	    // 【接收】表头上Btn-事件
+	    trayOne(row) {
+	    	if (!this.selection.length) {
+		    	// 新增
+	    		// this.addTray();
+	    		this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+		    	return
+	      }
+	    	if (this.selection.length > 1) {
+	        this.$message({
+	          message: this.$t("tips.mustOne"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	// 打开弹出
+	    	this.tray(this.selection[0]);
+	    },
+
+	    // 修改【设置可存放托盘】
+	    tray(row) {
+	    	this.$refs.editTray.setTenant(row)
+	      this.$refs.editTray.type = "edit"
+	      this.dialogTray.title = "接收"
+	      this.dialogTray.isVisible = true
+	    },
+
+	    // 新增【设置可存放托盘】
+	    addTray() {
+	      this.$refs.editTray.type = "add"
+	      this.dialogTray.title = "新增接收"
+	      this.dialogTray.isVisible = true
+	    },
+
+	    fetch (params = {}) {
+	      this.loading = true
+	      if (this.queryParams.timeRange) {
+	        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
+	        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
+	      }
+				//
+	      this.queryParams.current = params.current ? params.current : this.queryParams.current
+	      this.queryParams.size = params.size ? params.size : this.queryParams.size
+	      // 搜索条件添加
+	      this.queryParams.model.brand = this.brand
+	      MaterialApi.page(this.queryParams).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.tableData = res.data
+	        }
+	        // eslint-disable-next-line no-return-assign
+	      }).finally(() => this.loading = false)
+
+	    },
+
+	    cellClick (row, column) {
+	      if (column['columnKey'] === "operation") {
+	        return
+	      }
+	      let flag = false
+	      this.selection.forEach((item) => {
+	        if (item.id === row.id) {
+	          flag = true
+	          this.$refs.table.toggleRowSelection(row)
+	        }
+	      })
+
+	      if (!flag) {
+	        this.$refs.table.toggleRowSelection(row, true)
+	      }
+	    }
+	  }
+	}
+</script>
+<style lang="scss" scoped></style>

+ 258 - 284
imcs-ui/src/views/zuihou/prepareProductMgr/material/components/Receive.vue

@@ -1,284 +1,258 @@
-<template>
-  <el-dialog 
-  	:close-on-click-modal="false" 
-  	:close-on-press-escape="false" 
-  	:title="title" 
-  	:append-to-body="true"
-  	:visible.sync="isVisible" 
-  	:width="width" 
-  	top="50px"
-  >
-    <el-form ref="form" :model="tenant" :rules="rules" label-position="right" label-width="120px">
-    	<!--<el-form-item :label='$t("lineSide.form.trayList")+ ":"' prop="trayList">
-	    	<el-select v-model="tenant.trayList" multiple :placeholder='$t("common.pleaseSelect")' style="width: 100%;">
-			    <el-option
-			      v-for="item in options"
-			      :key="item.value"
-			      :label="item.label"
-			      :value="item.value">
-			    </el-option>
-			  </el-select>
-		  </el-form-item>-->
-		  <el-form-item label='原料炉批号:' prop="furnaceBatchNo">
-        <el-input v-model.trim="tenant.furnaceBatchNo" :placeholder='$t("common.pleaseEnter")'/>
-      </el-form-item>
-      <el-form-item label='零件批号:' prop="bomBatchNo">
-        <el-input v-model.trim="tenant.bomBatchNo" :placeholder='$t("common.pleaseEnter")'/>
-      </el-form-item>
-      <el-form-item label='批量标准:' prop="batchStand">
-        <el-input v-model.number="tenant.batchStand" :placeholder='$t("common.pleaseEnter")'/>
-      </el-form-item>
-      <el-form-item label='毛坯生产厂:' prop="factory">
-        <el-input v-model.trim="tenant.factory" :placeholder='$t("common.pleaseEnter")'/>
-      </el-form-item>
-      <el-form-item label='毛坯批号:' prop="meterialBatchNo">
-        <el-input v-model.trim="tenant.meterialBatchNo" :placeholder='$t("common.pleaseEnter")'/>
-      </el-form-item>
-      <el-form-item label='入厂日期:' prop="factoryDate">        
-        <el-date-picker
-            v-model="tenant.factoryDate"
-            type="date"
-            value-format="yyyy-MM-dd"            
-            placeholder="">
-         </el-date-picker>
-      </el-form-item>
-    </el-form>
-    <div slot="footer" class="dialog-footer">
-      <el-button plain type="warning" @click="isVisible = false">{{ $t('common.cancel') }}</el-button>
-      <el-button plain type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('common.confirm') }}</el-button>
-    </div>
-  </el-dialog>
-</template>
-<script>
-// 【仓库类型管理】-API
-import warehouseTypeMgrApi from "@/api/modelingCenter/warehouseTypeMgr"
-// 【原材料接收管理】-API
-import ReceiveApi from "@/api/prepareProductMgr/receive"
-// 【库位管理】-API
-import locationMgrApi from "@/api/lineSideLibrary/locationMgr"
-export default {
-  name: 'TenantEdit',
-  props: {
-    dialogVisible: {
-      type: Boolean,
-      default: false
-    },
-    title: {
-      type: String,
-      default: ''
-    }
-  },
-  data () {
-  	var checkAge = (rule, value, callback) => {
-	    /*if (!value) {
-	      return callback(new Error('批量标准不能为空'));
-	    }*/
-	    setTimeout(() => {
-	      if (!Number.isInteger(value)) {
-	        callback(new Error('请输入数字值'));
-	      } else {
-	        callback();
-	      }
-	    }, 1000);
-	  };
-    return {
-      type: 'add',
-      currNodeName: '',
-      tenant: this.initTenant(),
-      screenWidth: 0,
-      width: this.initWidth(),
-      confirmDisabled: false,
-      wareTypeList: [], // 库位类型下拉数据
-      options: [{
-          value: '选项1',
-          label: '黄金糕'
-        }, {
-          value: '选项2',
-          label: '双皮奶'
-        }, {
-          value: '选项3',
-          label: '蚵仔煎'
-        }, {
-          value: '选项4',
-          label: '龙须面'
-        }, {
-          value: '选项5',
-          label: '北京烤鸭'
-        }],
-      roles: [],
-      rules: {
-      	furnaceBatchNo: [
-        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
-        ],
-        bomBatchNo: [
-        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
-        ],
-        batchStand: [
-        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' },
-        	{ validator: checkAge, trigger: 'blur' }
-        ],
-        factory: [
-        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
-        ],
-        meterialBatchNo: [
-        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
-        ]
-      }
-    }
-  },
-  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
-  created() {
-  	// 获取【库位类型】数据
-  	this.getWareTypeList()
-	},
-  computed: {
-    isVisible: {
-      get () {
-        return this.dialogVisible
-      },
-      set () {
-        this.close()
-        this.reset()
-      }
-    }
-  },
-  mounted () {
-    window.onresize = () => {
-      return (() => {
-        this.width = this.initWidth()
-      })()
-    }
-  },
-  methods: {
-    initTenant () {
-      return {
-      	meterialId: '',
-        furnaceBatchNo: '',
-        bomBatchNo: '',
-        batchStand: '',
-        factory: '',
-        meterialBatchNo: '',
-        factoryDate: ''
-      }
-    },
-    initWidth () {
-      this.screenWidth = document.body.clientWidth
-      if (this.screenWidth < 991) {
-        return '90%'
-      } else if (this.screenWidth < 1400) {
-        return '45%'
-      } else {
-        return '800px'
-      }
-    },
-    setTenant (val) {
-    	if(val){
-    		// 原材料ID
-    		this.tenant.meterialId = val.id;
-    	}
-    },
-    close () {
-      this.$emit('close')
-    },
-    reset () {
-      // 先清除校验,再清除表单,不然有奇怪的bug
-      this.$refs.form.clearValidate()
-      this.$refs.form.resetFields()
-      this.tenant = this.initTenant()
-    },
-    submitForm () {
-      this.$refs.form.validate((valid) => {
-        if (valid) {
-          this.confirmDisabled = true
-          //if (this.type === 'add') {
-            this.save(); // 只有新增
-          /*} else {
-            this.update()
-          }*/
-        } else {
-          return false
-        }
-      })
-    },
-    save () {
-      ReceiveApi.save(this.tenant)
-        .then((response) => {
-          const res = response.data
-          if (res.isSuccess) {
-            this.isVisible = false
-            this.$message({
-              message: this.$t('tips.createSuccess'),
-              type: 'success'
-            })
-            // 通知列表
-	          this.$emit("success");
-	          // 通知列表-并关闭弹出框
-	          this.$emit("close");
-          }
-        }).finally(() => {
-          this.confirmDisabled = false
-          return true
-        })
-    },
-    update () {
-      ReceiveApi.update(this.tenant)
-        .then((response) => {
-          const res = response.data
-          if (res.isSuccess) {
-            this.isVisible = false
-            this.$message({
-              message: this.$t('tips.updateSuccess'),
-              type: 'success'
-            })
-            // 通知列表
-	          this.$emit("success");
-	          // 通知列表-并关闭弹出框
-	          this.$emit("close");
-          }
-        }).finally(() => {
-          this.confirmDisabled = false
-          return true
-        })
-    },
-    // 【库位类型】数据
-		getWareTypeList(){
-			warehouseTypeMgrApi.getList({}).then(res => {
-				res = res.data 
-				if(res.isSuccess){
-					this.wareTypeList = res.data
-				}
-			})
-		}
-  }
-}
-</script>
-<style lang="scss" >
-.avatar-uploader .el-upload {
-  border: 1px dashed #d9d9d9;
-  border-radius: 6px;
-  cursor: pointer;
-  position: relative;
-  overflow: hidden;
-}
-.avatar-uploader .el-upload:hover {
-  border-color: #409eff;
-}
-.avatar-uploader-icon {
-  font-size: 28px;
-  color: #8c939d;
-  width: 100px;
-  height: 100px;
-  line-height: 100px;
-  text-align: center;
-}
-.avatar {
-  width: 100px;
-  height: 100px;
-  display: block;
-}
-.checkUsed{
-	display: inline-block;
-	margin-left: 10px;
-	color: #1890ff;
-}
-</style>
+<template>
+  <el-dialog
+  	:close-on-click-modal="false"
+  	:close-on-press-escape="false"
+  	:title="title"
+  	:append-to-body="true"
+  	:visible.sync="isVisible"
+  	:width="width"
+  	top="50px"
+  >
+    <el-form ref="form" :model="tenant" :rules="rules" label-position="right" label-width="120px">
+		  <el-form-item label='原料炉批号:' prop="furnaceBatchNo">
+        <el-input v-model.trim="tenant.furnaceBatchNo" :placeholder='$t("common.pleaseEnter")'/>
+      </el-form-item>
+      <el-form-item label='零件批号:' prop="bomBatchNo">
+        <el-input v-model.trim="tenant.bomBatchNo" :placeholder='$t("common.pleaseEnter")'/>
+      </el-form-item>
+      <el-form-item label='批量标准:' prop="batchStand">
+        <el-input v-model.number="tenant.batchStand" :placeholder='$t("common.pleaseEnter")'/>
+      </el-form-item>
+      <el-form-item label='毛坯生产厂:' prop="factory">
+        <el-input v-model.trim="tenant.factory" :placeholder='$t("common.pleaseEnter")'/>
+      </el-form-item>
+      <el-form-item label='毛坯批号:' prop="meterialBatchNo">
+        <el-input v-model.trim="tenant.meterialBatchNo" :placeholder='$t("common.pleaseEnter")'/>
+      </el-form-item>
+      <el-form-item label='入厂日期:' prop="factoryDate">
+        <el-date-picker
+            v-model="tenant.factoryDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="">
+         </el-date-picker>
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button plain type="warning" @click="isVisible = false">{{ $t('common.cancel') }}</el-button>
+      <el-button plain type="primary" :disabled="confirmDisabled" @click="submitForm">{{ $t('common.confirm') }}</el-button>
+    </div>
+  </el-dialog>
+</template>
+<script>
+// 【仓库类型管理】-API
+import warehouseTypeMgrApi from "@/api/modelingCenter/warehouseTypeMgr"
+// 【原材料接收管理】-API
+import ReceiveApi from "@/api/prepareProductMgr/receive"
+// 【库位管理】-API
+import locationMgrApi from "@/api/lineSideLibrary/locationMgr"
+export default {
+  name: 'TenantEdit',
+  props: {
+    dialogVisible: {
+      type: Boolean,
+      default: false
+    },
+    title: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+  	var checkAge = (rule, value, callback) => {
+	    /*if (!value) {
+	      return callback(new Error('批量标准不能为空'));
+	    }*/
+	    setTimeout(() => {
+	      if (!Number.isInteger(value)) {
+	        callback(new Error('请输入数字值'));
+	      } else {
+	        callback();
+	      }
+	    }, 1000);
+	  };
+    return {
+      type: 'add',
+      currNodeName: '',
+      tenant: this.initTenant(),
+      screenWidth: 0,
+      width: this.initWidth(),
+      confirmDisabled: false,
+      wareTypeList: [], // 库位类型下拉数据
+      roles: [],
+      rules: {
+      	furnaceBatchNo: [
+        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
+        ],
+        bomBatchNo: [
+        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
+        ],
+        batchStand: [
+        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' },
+        	{ validator: checkAge, trigger: 'blur' }
+        ],
+        factory: [
+        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
+        ],
+        meterialBatchNo: [
+        	{ required: true, message: this.$t("rules.require"), trigger: 'blur' }
+        ]
+      }
+    }
+  },
+  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+  created() {
+  	// 获取【库位类型】数据
+  	this.getWareTypeList()
+	},
+  computed: {
+    isVisible: {
+      get () {
+        return this.dialogVisible
+      },
+      set () {
+        this.close()
+        this.reset()
+      }
+    }
+  },
+  mounted () {
+    window.onresize = () => {
+      return (() => {
+        this.width = this.initWidth()
+      })()
+    }
+  },
+  methods: {
+    initTenant () {
+      return {
+      	meterialId: '',
+        furnaceBatchNo: '',
+        bomBatchNo: '',
+        batchStand: '',
+        factory: '',
+        meterialBatchNo: '',
+        factoryDate: ''
+      }
+    },
+    initWidth () {
+      this.screenWidth = document.body.clientWidth
+      if (this.screenWidth < 991) {
+        return '90%'
+      } else if (this.screenWidth < 1400) {
+        return '45%'
+      } else {
+        return '800px'
+      }
+    },
+    setTenant (val) {
+    	if(val){
+    		// 原材料ID
+    		this.tenant.meterialId = val.id;
+    	}
+    },
+    close () {
+      this.$emit('close')
+    },
+    reset () {
+      // 先清除校验,再清除表单,不然有奇怪的bug
+      this.$refs.form.clearValidate()
+      this.$refs.form.resetFields()
+      this.tenant = this.initTenant()
+    },
+    submitForm () {
+      this.$refs.form.validate((valid) => {
+        if (valid) {
+          this.confirmDisabled = true
+          //if (this.type === 'add') {
+            this.save(); // 只有新增
+          /*} else {
+            this.update()
+          }*/
+        } else {
+          return false
+        }
+      })
+    },
+    save () {
+      ReceiveApi.save(this.tenant)
+        .then((response) => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.isVisible = false
+            this.$message({
+              message: this.$t('tips.createSuccess'),
+              type: 'success'
+            })
+            // 通知列表
+	          this.$emit("success");
+	          // 通知列表-并关闭弹出框
+	          this.$emit("close");
+          }
+        }).finally(() => {
+          this.confirmDisabled = false
+          return true
+        })
+    },
+    update () {
+      ReceiveApi.update(this.tenant)
+        .then((response) => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.isVisible = false
+            this.$message({
+              message: this.$t('tips.updateSuccess'),
+              type: 'success'
+            })
+            // 通知列表
+	          this.$emit("success");
+	          // 通知列表-并关闭弹出框
+	          this.$emit("close");
+          }
+        }).finally(() => {
+          this.confirmDisabled = false
+          return true
+        })
+    },
+    // 【库位类型】数据
+		getWareTypeList(){
+			warehouseTypeMgrApi.getList({}).then(res => {
+				res = res.data
+				if(res.isSuccess){
+					this.wareTypeList = res.data
+				}
+			})
+		}
+  }
+}
+</script>
+<style lang="scss" >
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 100px;
+  height: 100px;
+  line-height: 100px;
+  text-align: center;
+}
+.avatar {
+  width: 100px;
+  height: 100px;
+  display: block;
+}
+.checkUsed{
+	display: inline-block;
+	margin-left: 10px;
+	color: #1890ff;
+}
+</style>

+ 2 - 2
imcs-ui/src/views/zuihou/prepareProductMgr/material/components/View.vue

@@ -38,13 +38,13 @@
 	      <!-- CheckBox -->
 	      <el-table-column align="center" type="selection" width="50" :reserve-selection="false" />
 	      <el-table-column prop="furnaceBatchNo" label='原炉(批)号' :show-overflow-tooltip="true" width="150px"></el-table-column>
-	      <el-table-column prop="meterialCode" label='物料编码' :show-overflow-tooltip="true" width="200px"></el-table-column>
+	      <el-table-column prop="bomBatchNo" label='零件批号' :show-overflow-tooltip="true" width="200px"></el-table-column>
 <!--	      <el-table-column prop="tradeMark" label='材料牌号' :show-overflow-tooltip="true" width="150px"></el-table-column>-->
 		  	<el-table-column prop="factory" label='毛坯生产厂' :show-overflow-tooltip="true" width="150px"></el-table-column>
 	      <el-table-column prop="meterialBatchNo" label='毛坯批号' :show-overflow-tooltip="true" width="150px"></el-table-column>
 	      <el-table-column prop="factoryDate" label='入厂日期' :show-overflow-tooltip="true" width="150px"></el-table-column>
 	      <el-table-column prop="batchStand" label='批量标准' :show-overflow-tooltip="true" width="150px"></el-table-column>
-	      <el-table-column prop="createUser" label='操作人员' :show-overflow-tooltip="true" width="150px"></el-table-column>
+	      <el-table-column prop="operationName" label='操作人员' :show-overflow-tooltip="true" width="150px"></el-table-column>
 	      <el-table-column prop="createTime" label='操作时间' :show-overflow-tooltip="true" width="150px"></el-table-column>
 	      <el-table-column prop="usedNum" label='订单消耗数量' :show-overflow-tooltip="true" width="150px"></el-table-column>
         <el-table-column prop="lastNum" label='剩余数量' :show-overflow-tooltip="true" width="150px"></el-table-column>

+ 146 - 145
imcs-ui/src/views/zuihou/statisticalAnalysis/resouceOee/Index.vue

@@ -1,145 +1,146 @@
-<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.productionLineId = '';
-          this.statisticalDate = '';
-          //this.queryParams = initQueryParams({})
-          //this.$refs.table.clearSort()
-          //this.$refs.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>
+<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.fetch();
+      // this.queryProductionLines()
+		},
+	  computed: {
+	  },
+	  mounted () {
+	  },
+	  methods: {
+      search() {
+          this.fetch()
+      },
+      reset() {
+          this.productionLineId = '';
+          this.statisticalDate = '';
+          //this.queryParams = initQueryParams({})
+          //this.$refs.table.clearSort()
+          //this.$refs.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>